cloudinary-video-player 1.6.2-edge.13
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/.eslintignore +4 -0
- package/.snyk +19 -0
- package/.travis.yml +8 -0
- package/CHANGELOG.md +329 -0
- package/LICENSE +21 -0
- package/README.md +87 -0
- package/dist/cld-video-player.css +2110 -0
- package/dist/cld-video-player.js +5249 -0
- package/dist/cld-video-player.light.css +1766 -0
- package/dist/cld-video-player.light.js +1399 -0
- package/dist/cld-video-player.light.min.css +1 -0
- package/dist/cld-video-player.light.min.js +2 -0
- package/dist/cld-video-player.light.min.js.LICENSE.txt +23 -0
- package/dist/cld-video-player.min.css +1 -0
- package/dist/cld-video-player.min.js +2 -0
- package/dist/cld-video-player.min.js.LICENSE.txt +26 -0
- package/dist/fonts/cloudinary_icon_for_black_bg.svg +69 -0
- package/dist/fonts/cloudinary_icon_for_white_bg.svg +69 -0
- package/docs/360.html +102 -0
- package/docs/_template.html +93 -0
- package/docs/adaptive-streaming.html +297 -0
- package/docs/analytics.html +140 -0
- package/docs/api.html +302 -0
- package/docs/audio.html +136 -0
- package/docs/autoplay-fallback.html +138 -0
- package/docs/autoplay-on-scroll.html +107 -0
- package/docs/codec-fallback.html +158 -0
- package/docs/colors.html +135 -0
- package/docs/components.html +284 -0
- package/docs/custom-cld-errors.html +134 -0
- package/docs/floating-player.html +98 -0
- package/docs/fluid.html +117 -0
- package/docs/force-hls-subtitles-ios.html +159 -0
- package/docs/index.html +83 -0
- package/docs/interaction-area.html +398 -0
- package/docs/live-customer.html +128 -0
- package/docs/multiple-players.html +125 -0
- package/docs/playlist-by-tag-cap.html +182 -0
- package/docs/playlist-by-tag.html +133 -0
- package/docs/playlist.html +133 -0
- package/docs/poster.html +155 -0
- package/docs/raw-url.html +104 -0
- package/docs/recommendations.html +155 -0
- package/docs/scripts.js +156 -0
- package/docs/seek-thumbs.html +90 -0
- package/docs/shoppable.html +335 -0
- package/docs/subtitles-and-captions.html +267 -0
- package/docs/transformations.html +171 -0
- package/docs/ui-config.html +108 -0
- package/docs/vast-vpaid.html +149 -0
- package/env.example.js +6 -0
- package/env.js +6 -0
- package/jest-puppeteer.config.js +14 -0
- package/jest.config.js +196 -0
- package/package.json +99 -0
- package/sandbox.config.json +3 -0
- package/setupJest.js +1 -0
- package/src/assets/fonts/VideoJS.svg +120 -0
- package/src/assets/fonts/VideoJS.ttf +0 -0
- package/src/assets/fonts/VideoJS.woff +0 -0
- package/src/assets/fonts/icons.json +120 -0
- package/src/assets/icons/cloudinary_icon_for_black_bg.svg +69 -0
- package/src/assets/icons/cloudinary_icon_for_white_bg.svg +69 -0
- package/src/assets/icons/cloudinary_logo_for_dark_bg.svg +188 -0
- package/src/assets/icons/cloudinary_logo_for_white_bg.svg +188 -0
- package/src/assets/icons/info-circle.svg +17 -0
- package/src/assets/styles/ads-label.scss +16 -0
- package/src/assets/styles/components/interaction-areas.scss +158 -0
- package/src/assets/styles/components/playlist.scss +213 -0
- package/src/assets/styles/components/themedButton.scss +48 -0
- package/src/assets/styles/components/thumbnail.scss +94 -0
- package/src/assets/styles/components/title-bar.scss +67 -0
- package/src/assets/styles/components/triangle-volume-bar.scss +52 -0
- package/src/assets/styles/icons.scss +257 -0
- package/src/assets/styles/main.scss +324 -0
- package/src/assets/styles/mixins/aspect-ratio.scss +16 -0
- package/src/assets/styles/mixins/disable-transition.scss +3 -0
- package/src/assets/styles/mixins/mixins.scss +5 -0
- package/src/assets/styles/mixins/skin.scss +64 -0
- package/src/assets/styles/variables.scss +2 -0
- package/src/assets/styles/videojs-ima.scss +252 -0
- package/src/components/component-utils.js +20 -0
- package/src/components/index.js +21 -0
- package/src/components/interaction-area/interaction-area.const.js +30 -0
- package/src/components/interaction-area/interaction-area.service.js +223 -0
- package/src/components/interaction-area/interaction-area.utils.js +236 -0
- package/src/components/jumpButtons/jump-10-minus.js +21 -0
- package/src/components/jumpButtons/jump-10-plus.js +20 -0
- package/src/components/logoButton/logo-button.const.js +3 -0
- package/src/components/logoButton/logo-button.js +30 -0
- package/src/components/logoButton/logo-button.scss +15 -0
- package/src/components/playlist/components/playlist-button.js +34 -0
- package/src/components/playlist/components/playlist-next-button.js +18 -0
- package/src/components/playlist/components/playlist-previous-button.js +18 -0
- package/src/components/playlist/components/playlist.js +5 -0
- package/src/components/playlist/components/playlist.scss +15 -0
- package/src/components/playlist/components/upcoming-video-overlay.js +149 -0
- package/src/components/playlist/components/upcoming-video-overlay.scss +86 -0
- package/src/components/playlist/layout/playlist-layout-custom.js +21 -0
- package/src/components/playlist/layout/playlist-layout-horizontal.js +16 -0
- package/src/components/playlist/layout/playlist-layout-vertical.js +19 -0
- package/src/components/playlist/layout/playlist-layout.js +110 -0
- package/src/components/playlist/panel/playlist-panel-item.js +86 -0
- package/src/components/playlist/panel/playlist-panel.js +92 -0
- package/src/components/playlist/playlist-widget.js +119 -0
- package/src/components/playlist/playlist.const.js +14 -0
- package/src/components/playlist/playlist.js +413 -0
- package/src/components/playlist/thumbnail/thumbnail.js +69 -0
- package/src/components/progress-control-events-blocker/progress-control-events-blocker.js +17 -0
- package/src/components/qualitySelector/quality-selector.scss +10 -0
- package/src/components/qualitySelector/qualitySelector.js +152 -0
- package/src/components/recommendations-overlay/index.js +3 -0
- package/src/components/recommendations-overlay/recommendations-overlay-content.js +57 -0
- package/src/components/recommendations-overlay/recommendations-overlay-hide-button.js +18 -0
- package/src/components/recommendations-overlay/recommendations-overlay-item.js +35 -0
- package/src/components/recommendations-overlay/recommendations-overlay-primary-item.js +81 -0
- package/src/components/recommendations-overlay/recommendations-overlay-secondary-item.js +48 -0
- package/src/components/recommendations-overlay/recommendations-overlay-secondary-items-container.js +35 -0
- package/src/components/recommendations-overlay/recommendations-overlay.js +94 -0
- package/src/components/recommendations-overlay/recommendations-overlay.scss +182 -0
- package/src/components/shoppable-bar/layout/bar-layout.js +111 -0
- package/src/components/shoppable-bar/layout/shoppable-panel-toggle.js +64 -0
- package/src/components/shoppable-bar/layout/shoppable-products-overlay.js +87 -0
- package/src/components/shoppable-bar/panel/shoppable-panel-item.js +105 -0
- package/src/components/shoppable-bar/panel/shoppable-panel.js +172 -0
- package/src/components/shoppable-bar/shoppable-post-widget.js +110 -0
- package/src/components/shoppable-bar/shoppable-widget.const.js +52 -0
- package/src/components/shoppable-bar/shoppable-widget.js +111 -0
- package/src/components/shoppable-bar/shoppable-widget.scss +359 -0
- package/src/components/themeButton/themedButton.const.js +3 -0
- package/src/components/themeButton/themedButton.js +25 -0
- package/src/components/title-bar/title-bar.js +79 -0
- package/src/config/defaults.js +25 -0
- package/src/extended-events.js +228 -0
- package/src/index.js +18 -0
- package/src/mixins/eventable.js +54 -0
- package/src/mixins/playlistable.js +106 -0
- package/src/plugins/analytics/index.js +245 -0
- package/src/plugins/autoplay-on-scroll/index.js +86 -0
- package/src/plugins/cloudinary/common.js +216 -0
- package/src/plugins/cloudinary/event-handler-registry.js +46 -0
- package/src/plugins/cloudinary/index.js +345 -0
- package/src/plugins/cloudinary/models/audio-source/audio-source.const.js +11 -0
- package/src/plugins/cloudinary/models/audio-source/audio-source.js +82 -0
- package/src/plugins/cloudinary/models/base-source.js +107 -0
- package/src/plugins/cloudinary/models/image-source.js +26 -0
- package/src/plugins/cloudinary/models/video-source/video-source.const.js +32 -0
- package/src/plugins/cloudinary/models/video-source/video-source.js +239 -0
- package/src/plugins/cloudinary/models/video-source/video-source.utils.js +57 -0
- package/src/plugins/colors/index.js +303 -0
- package/src/plugins/context-menu/components/context-menu-item.js +12 -0
- package/src/plugins/context-menu/components/context-menu.js +63 -0
- package/src/plugins/context-menu/context-menu.scss +30 -0
- package/src/plugins/context-menu/contextMenuContent.js +53 -0
- package/src/plugins/context-menu/index.js +134 -0
- package/src/plugins/dash/index.js +26 -0
- package/src/plugins/dash/setup-audio-tracks.js +112 -0
- package/src/plugins/dash/setup-text-tracks.js +195 -0
- package/src/plugins/dash/videojs-dash.js +372 -0
- package/src/plugins/floating-player/floating-player.scss +74 -0
- package/src/plugins/floating-player/index.js +129 -0
- package/src/plugins/ima/index.js +1775 -0
- package/src/plugins/index.js +31 -0
- package/src/plugins/interactive-plugin/index.js +10 -0
- package/src/plugins/videojs-http-source-selector/components/SourceMenuButton.js +98 -0
- package/src/plugins/videojs-http-source-selector/components/SourceMenuItem.js +52 -0
- package/src/plugins/videojs-http-source-selector/plugin.js +82 -0
- package/src/plugins/videojs-http-source-selector/plugin.scss +9 -0
- package/src/plugins/vtt-thumbnails/index.js +526 -0
- package/src/plugins/vtt-thumbnails/vtt-thumbnails.scss +29 -0
- package/src/utils/api.js +32 -0
- package/src/utils/apply-with-props.js +32 -0
- package/src/utils/array.js +22 -0
- package/src/utils/assign.js +27 -0
- package/src/utils/attributes-normalizer.js +72 -0
- package/src/utils/cloudinary.js +165 -0
- package/src/utils/css-prefix.js +43 -0
- package/src/utils/dom.js +74 -0
- package/src/utils/find.js +28 -0
- package/src/utils/fontFace.js +25 -0
- package/src/utils/groupBy.js +12 -0
- package/src/utils/index.js +29 -0
- package/src/utils/matches.js +11 -0
- package/src/utils/mixin.js +5 -0
- package/src/utils/object.js +26 -0
- package/src/utils/playButton.js +9 -0
- package/src/utils/positioning.js +78 -0
- package/src/utils/querystring.js +12 -0
- package/src/utils/slicing.js +21 -0
- package/src/utils/string.js +15 -0
- package/src/utils/throttle.js +30 -0
- package/src/utils/time.js +77 -0
- package/src/utils/type-inference.js +35 -0
- package/src/validators/validators-functions.js +48 -0
- package/src/validators/validators-types.js +78 -0
- package/src/validators/validators.js +110 -0
- package/src/video-player.const.js +68 -0
- package/src/video-player.js +761 -0
- package/src/video-player.utils.js +123 -0
- package/test/adaptive-streaming.test.js +38 -0
- package/test/ads.test.js +35 -0
- package/test/analytics.test.js +111 -0
- package/test/api.test.js +111 -0
- package/test/autoplay.scroll.test.js +23 -0
- package/test/basic-ui.test.js +59 -0
- package/test/colors.test.js +58 -0
- package/test/components.test.js +21 -0
- package/test/custom-error.test.js +24 -0
- package/test/fluid.test.js +36 -0
- package/test/isValidConfig.test.js +224 -0
- package/test/mocks/cloudinary-core-mock.js +0 -0
- package/test/mocks/styleMock.js +1 -0
- package/test/multiplayer.test.js +25 -0
- package/test/playlist.test.js +60 -0
- package/test/puppeteer/vp-env.js +19 -0
- package/test/recommendations.test.js +38 -0
- package/test/title-bar.test.js +28 -0
- package/test/ui-conf.test.js +49 -0
- package/test/unit/cloudinaryConfig.test.js +22 -0
- package/test/unit/cloudinaryUtils.test.js +53 -0
- package/test/unit/utils.test.js +27 -0
- package/test/unit/videoSource.test.js +454 -0
- package/tsconfig.json +15 -0
- package/types/video-player-tests.js +12 -0
- package/types/video-player-tests.ts +31 -0
- package/types/video-player.d.ts +570 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see cld-video-player.min.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cloudinary-core")):"function"==typeof define&&define.amd?define(["cloudinary-core"],t):"object"==typeof exports?exports.cloudinaryVideoPlayer=t(require("cloudinary-core")):e.cloudinaryVideoPlayer=t(e.cloudinary)}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=157)}([function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(18))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e=void 0,t=[],n={},r={};function i(e,n){for(var r in t){var i=t[r];if(i.context===e&&i.name===n)return i.instance}return null}function a(e,t){return t[e]}function o(e,t,n){e in n&&(n[e]=t)}function s(t,n,r){var i=void 0,a=t.__dashjs_factory_name,o=n[a];if(o){var s=o.instance;if(!o.override)return s.apply({context:n,factory:e},r);for(var u in i=t.apply({context:n},r),s=s.apply({context:n,factory:e,parent:i},r))i.hasOwnProperty(u)&&(i[u]=s[u])}else i=t.apply({context:n},r);return i.getClassName=function(){return a},i}return e={extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getSingletonInstance:i,setSingletonInstance:function(e,n,r){for(var i in t){var a=t[i];if(a.context===e&&a.name===n)return void(t[i].instance=r)}t.push({name:n,context:e,instance:r})},deleteSingletonInstances:function(e){t=t.filter((function(t){return t.context!==e}))},getSingletonFactory:function(e){var r=a(e.__dashjs_factory_name,n);return r||(r=function(n){var r=void 0;return void 0===n&&(n={}),{getInstance:function(){return r||(r=i(n,e.__dashjs_factory_name)),r||(r=s(e,n,arguments),t.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}},n[e.__dashjs_factory_name]=r),r},getSingletonFactoryByName:function(e){return a(e,n)},updateSingletonFactory:function(e,t){o(e,t,n)},getClassFactory:function(e){var t=a(e.__dashjs_factory_name,r);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return s(e,t,arguments)}}},r[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return a(e,r)},updateClassFactory:function(e,t){o(e,t,r)}}}();t.default=r},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},a=n(160);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r}).call(this,n(18))},function(e,t,n){var r=n(64);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){(function(t){e.exports=t.videojs=n(419)}).call(this,n(18))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}return r(e,[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.FRAGMENTED_TEXT="fragmentedText",this.EMBEDDED_TEXT="embeddedText",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_L2A="abrL2A",this.ABR_STRATEGY_LoLP="abrLoLP",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA="abrFetchThroughputCalculationDownloadedData",this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING="abrFetchThroughputCalculationMoofParsing",this.LIVE_CATCHUP_MODE_DEFAULT="liveCatchupModeDefault",this.LIVE_CATCHUP_MODE_LOLP="liveCatchupModeLoLP",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.TRACK_SWITCH_MODE_ALWAYS_REPLACE="alwaysReplace",this.TRACK_SWITCH_MODE_NEVER_REPLACE="neverReplace",this.TRACK_SELECTION_MODE_FIRST_TRACK="firstTrack",this.TRACK_SELECTION_MODE_HIGHEST_BITRATE="highestBitrate",this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY="highestEfficiency",this.TRACK_SELECTION_MODE_WIDEST_RANGE="widestRange",this.CMCD_MODE_QUERY="query",this.CMCD_MODE_HEADER="header",this.LOCATION="Location",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer",this.DVB_REPORTING_URL="dvb:reportingUrl",this.DVB_PROBABILITY="dvb:probability"}}]),e}());t.default=i},function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return o[e];var n,a=String(e);return(n=r[a.toLowerCase()])?n:(n=i[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var a;if(a=r[t.toLowerCase()])return a===n;if(a=i[t.toLowerCase()])return a===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++)r[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)r[a-48]=a;for(a=1;a<13;a++)r["f"+a]=a+111;for(a=0;a<10;a++)r["numpad "+a]=a+96;var o=t.names=t.title={};for(a in r)o[r[a]]=a;for(var s in i)r[s]=i[s]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(9)),i=o(n(10)),a=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var s=1,u=2,l=3,c=4,d=5;function f(e){e=e||{};var t,n=this.context,a=(0,r.default)(n).getInstance(),o=e.settings,f=[],h=void 0,p=void 0,g=void 0;function m(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function y(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];E.apply(void 0,[s,this].concat(t))}function v(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];E.apply(void 0,[u,this].concat(t))}function _(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];E.apply(void 0,[l,this].concat(t))}function T(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];E.apply(void 0,[c,this].concat(t))}function b(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];E.apply(void 0,[d,this].concat(t))}function E(e,t){var n="",r=null;h&&(r=(new Date).getTime(),n+="["+(r-g)+"]"),p&&t&&t.getClassName&&(n+="["+t.getClassName()+"]",t.getType&&(n+="["+t.getType()+"]")),n.length>0&&(n+=" ");for(var s=arguments.length,u=Array(s>2?s-2:0),l=2;l<s;l++)u[l-2]=arguments[l];Array.apply(null,u).forEach((function(e){n+=e+" "})),f[e]&&o.get().debug.logLevel>=e&&f[e](n),o&&o.get().debug.dispatchEvent&&a.trigger(i.default.LOG,{message:n,level:e})}return t={getLogger:function(e){return{fatal:y.bind(e),error:v.bind(e),warn:_.bind(e),info:T.bind(e),debug:b.bind(e)}},setLogTimestampVisible:function(e){h=e},setCalleeNameVisible:function(e){p=e}},h=!0,p=!0,g=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(f[s]=m(window.console.error),f[u]=m(window.console.error),f[l]=m(window.console.warn),f[c]=m(window.console.info),f[d]=m(window.console.debug)),t}f.__dashjs_factory_name="Debug";var h=a.default.getSingletonFactory(f);h.LOG_LEVEL_NONE=0,h.LOG_LEVEL_FATAL=s,h.LOG_LEVEL_ERROR=u,h.LOG_LEVEL_WARNING=l,h.LOG_LEVEL_INFO=c,h.LOG_LEVEL_DEBUG=d,a.default.updateSingletonFactory(f.__dashjs_factory_name,h),t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(31));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e={};function t(t,n,r){var i=-1;return e[t]?(e[t].some((function(e,t){if(e&&e.callback===n&&(!r||r===e.scope))return i=t,!0})),i):i}return{on:function(n,r,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)throw new Error("event type cannot be null or undefined");if(!r||"function"!=typeof r)throw new Error("listener must be a function: "+r);var o=a.priority||0;if(!(t(n,r,i)>=0)){e[n]=e[n]||[];var s={callback:r,scope:i,priority:o};i&&i.getStreamId&&(s.streamId=i.getStreamId()),i&&i.getType&&(s.mediaType=i.getType()),a&&a.mode&&(s.mode=a.mode);var u=e[n].some((function(t,r){if(t&&o>t.priority)return e[n].splice(r,0,s),!0}));u||e[n].push(s)}},off:function(n,r,i){if(n&&r&&e[n]){var a=t(n,r,i);a<0||(e[n][a]=null)}},trigger:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&e[t]){if((n=n||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");n.type=t,r.streamId&&(n.streamId=r.streamId),r.mediaType&&(n.mediaType=r.mediaType),e[t].filter((function(e){return!!e&&((!r.streamId||!e.streamId||e.streamId===r.streamId)&&((!r.mediaType||!e.mediaType||e.mediaType===r.mediaType)&&!(r.mode&&e.mode&&e.mode!==r.mode||!e.mode&&r.mode&&r.mode===i.default.EVENT_MODE_ON_RECEIVE)))})).forEach((function(e){return e&&e.callback.call(e.scope,n)}))}},reset:function(){e={}}}}o.__dashjs_factory_name="EventBus";var s=r.default.getSingletonFactory(o);s.EVENT_PRIORITY_LOW=0,s.EVENT_PRIORITY_HIGH=5e3,r.default.updateSingletonFactory(o.__dashjs_factory_name,s),t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(207);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=new(function(e){function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default));t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t||null,this.message=n||null,this.data=r||null}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(){r(this,e),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null};i.GET="GET",i.HEAD="HEAD",i.MPD_TYPE="MPD",i.XLINK_EXPANSION_TYPE="XLinkExpansion",i.INIT_SEGMENT_TYPE="InitializationSegment",i.INDEX_SEGMENT_TYPE="IndexSegment",i.MEDIA_SEGMENT_TYPE="MediaSegment",i.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",i.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",i.LICENSE="license",i.OTHER_TYPE="other",t.HTTPRequest=i,t.HTTPRequestTrace=function e(){r(this,e),this.s=null,this.d=null,this.b=[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assign=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(Object.assign)return Object.assign.apply(Object,[e].concat(n));return n.forEach((function(t){t&&Object.keys(t).forEach((function(n){var r=t[n];e[n]=r}))})),e}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){return null!==e&&"object"===r(e)&&"[object Object]"===Object.prototype.toString.call(e)},t.isString=function(e){return e instanceof String||"string"==typeof e},t.isInteger=function(e){return"number"==typeof e&&e%1==0},t.isNumber=function(e){return e instanceof Number||"number"==typeof e},t.isElement=function(e){return e instanceof Element},t.noop=function(){return null},t.isFunction=function(e){return"function"==typeof e},t.isBoolean=function(e){return"boolean"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}return r(e,[{key:"init",value:function(){this.BASE_URL="BaseURL",this.SEGMENT_BASE="SegmentBase",this.SEGMENT_TEMPLATE="SegmentTemplate",this.SEGMENT_LIST="SegmentList",this.SEGMENT_URL="SegmentURL",this.SEGMENT_TIMELINE="SegmentTimeline",this.SEGMENT_PROFILES="segmentProfiles",this.ADAPTATION_SET="AdaptationSet",this.REPRESENTATION="Representation",this.REPRESENTATION_INDEX="RepresentationIndex",this.SUB_REPRESENTATION="SubRepresentation",this.INITIALIZATION="Initialization",this.INITIALIZATION_MINUS="initialization",this.MPD="MPD",this.PERIOD="Period",this.ASSET_IDENTIFIER="AssetIdentifier",this.EVENT_STREAM="EventStream",this.ID="id",this.PROFILES="profiles",this.SERVICE_LOCATION="serviceLocation",this.RANGE="range",this.INDEX="index",this.MEDIA="media",this.BYTE_RANGE="byteRange",this.INDEX_RANGE="indexRange",this.MEDIA_RANGE="mediaRange",this.VALUE="value",this.CONTENT_TYPE="contentType",this.MIME_TYPE="mimeType",this.BITSTREAM_SWITCHING="BitstreamSwitching",this.BITSTREAM_SWITCHING_MINUS="bitstreamSwitching",this.CODECS="codecs",this.DEPENDENCY_ID="dependencyId",this.MEDIA_STREAM_STRUCTURE_ID="mediaStreamStructureId",this.METRICS="Metrics",this.METRICS_MINUS="metrics",this.REPORTING="Reporting",this.WIDTH="width",this.HEIGHT="height",this.SAR="sar",this.FRAMERATE="frameRate",this.AUDIO_SAMPLING_RATE="audioSamplingRate",this.MAXIMUM_SAP_PERIOD="maximumSAPPeriod",this.START_WITH_SAP="startWithSAP",this.MAX_PLAYOUT_RATE="maxPlayoutRate",this.CODING_DEPENDENCY="codingDependency",this.SCAN_TYPE="scanType",this.FRAME_PACKING="FramePacking",this.AUDIO_CHANNEL_CONFIGURATION="AudioChannelConfiguration",this.CONTENT_PROTECTION="ContentProtection",this.ESSENTIAL_PROPERTY="EssentialProperty",this.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.INBAND_EVENT_STREAM="InbandEventStream",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.ROLE_ASARRAY="Role_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",this.STATIC="static",this.MEDIA_PRESENTATION_DURATION="mediaPresentationDuration",this.MINIMUM_UPDATE_PERIOD="minimumUpdatePeriod",this.CODEC_PRIVATE_DATA="codecPrivateData",this.BANDWITH="bandwidth",this.SOURCE_URL="sourceURL",this.TIMESCALE="timescale",this.DURATION="duration",this.START_NUMBER="startNumber",this.PRESENTATION_TIME_OFFSET="presentationTimeOffset",this.AVAILABILITY_START_TIME="availabilityStartTime",this.AVAILABILITY_END_TIME="availabilityEndTime",this.TIMESHIFT_BUFFER_DEPTH="timeShiftBufferDepth",this.MAX_SEGMENT_DURATION="maxSegmentDuration",this.PRESENTATION_TIME="presentationTime",this.MIN_BUFFER_TIME="minBufferTime",this.MAX_SUBSEGMENT_DURATION="maxSubsegmentDuration",this.START="start",this.AVAILABILITY_TIME_OFFSET="availabilityTimeOffset",this.AVAILABILITY_TIME_COMPLETE="availabilityTimeComplete",this.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SERVICE_DESCRIPTION="ServiceDescription",this.SERVICE_DESCRIPTION_SCOPE="Scope",this.SERVICE_DESCRIPTION_LATENCY="Latency",this.SERVICE_DESCRIPTION_PLAYBACK_RATE="PlaybackRate",this.PATCH_LOCATION="PatchLocation",this.PUBLISH_TIME="publishTime",this.ORIGINAL_PUBLISH_TIME="originalPublishTime",this.ORIGINAL_MPD_ID="mpdId"}}]),e}());t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}return r(e,[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_LOADED="bufferLoaded",this.ABANDON_LOAD="abandonload",this.ALLOW_LOAD="allowload",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors"}}]),e}());t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(119);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,e.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,e.SEGMENTS_UPDATE_FAILED_ERROR_CODE=13,e.SEGMENTS_UNAVAILABLE_ERROR_CODE=14,e.SEGMENT_BASE_LOADER_ERROR_CODE=15,e.TIME_SYNC_FAILED_ERROR_CODE=16,e.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,e.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,e.APPEND_ERROR_CODE=20,e.REMOVE_ERROR_CODE=21,e.DATA_UPDATE_FAILED_ERROR_CODE=22,e.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,e.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,e.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,e.DOWNLOAD_ERROR_ID_SIDX_CODE=26,e.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,e.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,e.DOWNLOAD_ERROR_ID_XLINK_CODE=29,e.MANIFEST_ERROR_ID_CODEC_CODE=30,e.MANIFEST_ERROR_ID_PARSE_CODE=31,e.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,e.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,e.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,e.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,e.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",e.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",e.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",e.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",e.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segments",e.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize time",e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",e.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",e.APPEND_ERROR_MESSAGE="chunk is not defined",e.REMOVE_ERROR_MESSAGE="buffer is not defined",e.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",e.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",e.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",e.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",e.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default));t.default=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return r.reduce((function(n,r){return Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r],t&&delete e[r]),n}),{})}Object.defineProperty(t,"__esModule",{value:!0}),t.sliceProperties=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return r.apply(void 0,[e,!1].concat(n))},t.sliceAndUnsetProperties=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return r.apply(void 0,[e,!0].concat(n))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};var o={DEFAULT:.5,STRONG:1,WEAK:0};function s(e,t,n){return{quality:void 0===e?-1:e,reason:void 0===t?null:t,priority:function(e){var t=o.DEFAULT;return e!==o.DEFAULT&&e!==o.STRONG&&e!==o.WEAK||(t=e),t}(n)}}s.__dashjs_factory_name="SwitchRequest";var u=a.default.getClassFactory(s);u.NO_CHANGE=-1,u.PRIORITY=o,a.default.updateClassFactory(s.__dashjs_factory_name,u),t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(262));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=void 0,t=[],n=this.context;function r(n,r,i){var a=function(n){var r=void 0;for(r=0;r<t.length;r++)if(t[r].regex.test(n))return t[r].utils;return e}(i||r);return a&&"function"==typeof a[n]?a[n](r,i):e[n](r,i)}return e=(0,i.default)(n).getInstance(),{registerUrlRegex:function(e,n){t.push({regex:e,utils:n})},parseBaseUrl:function(e){return r("parseBaseUrl",e)},parseOrigin:function(e){return r("parseOrigin",e)},parseScheme:function(e){return r("parseScheme",e)},isRelative:function(e){return r("isRelative",e)},isPathAbsolute:function(e){return r("isPathAbsolute",e)},isSchemeRelative:function(e){return r("isSchemeRelative",e)},isHTTPURL:function(e){return r("isHTTPURL",e)},isHTTPS:function(e){return r("isHTTPS",e)},removeHostname:function(e){return r("removeHostname",e)},resolve:function(e,t){return r("resolve",e,t)}}}o.__dashjs_factory_name="URLUtils";var s=r.default.getSingletonFactory(o);t.default=s},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.checkParameterType=function(e,t){if((void 0===e?"undefined":r(e))!==t)throw o.default.BAD_ARGUMENT_ERROR},t.checkInteger=function(e){if(null===e||isNaN(e)||e%1!=0)throw o.default.BAD_ARGUMENT_ERROR+" : argument is not an integer"},t.checkRange=function(e,t,n){if(e<t||e>n)throw o.default.BAD_ARGUMENT_ERROR+" : argument out of range"},t.checkIsVideoOrAudioType=function(e){if("string"!=typeof e||e!==o.default.AUDIO&&e!==o.default.VIDEO)throw o.default.BAD_ARGUMENT_ERROR};var i,a=n(6),o=(i=a)&&i.__esModule?i:{default:i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_CODE=t.codecToSrcTransformation=t.h264avcToString=t.codecShorthandTrans=t.cloudinaryErrorsConverter=t.mergeTransformation=t.mergeCloudinaryConfig=t.isSrcEqual=t.normalizeOptions=t.VIDEO_CODEC=void 0;var r,i=(r=n(48))&&r.__esModule?r:{default:r},a=n(13),o=n(19),s=n(14);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.normalizeOptions=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.tolerateMissingId,i=void 0!==r&&r;if((0,s.isPlainObject)(e)){var u=(0,a.assign)({},e);if(e=(0,o.sliceAndUnsetProperties)(u,"publicId").publicId,!(0,s.isString)(e)&&!i)throw new Error("Source is missing 'publicId'.");t&&(t=(0,a.assign)({},u,t))}return{publicId:e,options:t}};t.isSrcEqual=function(e,t){var n=e,r=t;return"object"===u(e)&&(n=e.src),"object"===u(t)&&(r=t.src),/^\/\//.test(n)&&(r=r.slice(r.indexOf("//"))),/^\/\//.test(r)&&(n=n.slice(n.indexOf("//"))),n===r};t.mergeCloudinaryConfig=function(e,t){"Cloudinary"===e.constructor.name&&e.config&&(e=e.config());var n=new i.default.Cloudinary(e);return"Cloudinary"===t.constructor.name&&t.config&&(t=e.config()),n.config(t)};t.mergeTransformation=function(e,t){return"Transformation"===e.constructor.name&&e.toOptions&&(e=e.toOptions()),new i.default.Transformation(e).fromOptions(t)};var l={NO_SUPPORTED_MEDIA:6,CUSTOM:10,UNKNOWN_CUSTOMER:11,RESOURCE_NOT_FOUND:12,PRIVATE_RESOURCE:13,UNAUTHENTICATED:14};t.ERROR_CODE=l;t.cloudinaryErrorsConverter=function(e){var t=e.errorMsg,n=e.publicId,r=e.cloudName,i=e.statusCode,a="Video cannot be played",o={code:l.CUSTOM,message:"".concat(a).concat(t?"- "+t:""),statusCode:i},s=t.toLowerCase();return s.startsWith("unknown customer")&&(o.code=l.UNKNOWN_CUSTOMER,o.message="".concat(a," Unknown cloud-name ").concat(r)),s.startsWith("resource not found")&&(o.code=l.RESOURCE_NOT_FOUND,o.message="".concat(a," Public ID ").concat(n," not found")),s.startsWith("private resource")&&(o.code=l.PRIVATE_RESOURCE,o.message="".concat(a," Private video")),s.startsWith("unauthenticated access")&&(o.message="".concat(a," Requires authentication"),o.code=l.UNAUTHENTICATED),o};t.codecShorthandTrans=function(e){var t={h265:"hev1.1.6.L93.B0",vp9:"vp09.00.50.08",h264:"avc1.42E01E"};return t[e]?t[e]:e};var c={avc1:"h264",avc2:"h264",svc1:"Scalable Video Coding",mvc1:"Multiview Video Coding",mvc2:"Multiview Video Coding"},d={0:"No",42:"baseline","4d":"main",58:"extended",64:"high","6e":"high 10","7a":"high 4:2:2",f4:"high 4:4:4","2c":"CAVLC 4:4:4",53:"Scalable Baseline",56:"Scalable High",80:"Stereo High",76:"Multiview High","8a":"Multiview Depth High"};var f=function(e){var t=/(avc1|avc2|svc1|mvc1|mvc2)\.([0-9a-f]{6})/i;if(!1===t.test("avc1.42001e"))throw new Error("Codec string is not formatted according to H.264/AVC standards for example avc1.42001e (maybe an iOS friendly version...)");var n=e.match(t);if(null!==n){n.shift();return c[n[0]]+":"+function(e){var t=/([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i;if(!1===t.test(e))throw new Error("error: please provide a 3-bytes hex-sequence for example: 42001e");var n=e.match(t);n.shift();var r=n[0];r="string"==typeof(r=d[r])?r:"Unknown";var i=n[2];return i=parseInt(i,16),i=String(i).split("").join("."),"".concat(r,":").concat(i)}(n[1])}return e};t.h264avcToString=f;var h={VP9:"vp9",HEV1:"hev1",H265:"h265",H264:"h264"};t.VIDEO_CODEC=h;t.codecToSrcTransformation=function(e){if(!e)return{};switch(e){case h.VP9:return{video_codec:h.VP9};case h.HEV1:return{video_codec:h.H265};case h.H264:return{video_codec:"".concat(h.H264,":baseline:3.0")};default:return{video_codec:f(e)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLD_SPBL_IMAGE=t.CLD_SPBL_ITEM=t.SHOPPABLE_ANIMATION_CLASS=t.CLOSE_ICON_CLASS=t.ICON_CART_CLASS=t.CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS=t.CLD_SPBL_INNER_BAR=t.CLD_SPBL_TOGGLE_ICON_CLASS=t.CLD_SPBL_TOGGLE_CLASS=t.CLD_SPBL_PANEL_CLASS=t.SHOPPABLE_PRODUCTS_OVERLAY_CLASS=t.SHOPPABLE_PANEL_HIDDEN_CLASS=t.SHOPPABLE_PANEL_VISIBLE_CLASS=t.SHOPPABLE_WIDGET_RESPONSIVE_CLASS=t.SHOPPABLE_HOVER_ACTIONS=t.SHOPPABLE_CLICK_ACTIONS=t.SHOPPABLE_WIDGET_OPTIONS_DEFAULTS=void 0;t.SHOPPABLE_WIDGET_OPTIONS_DEFAULTS={location:"right",toggleIcon:"",width:"20%",startState:"openOnPlay",autoClose:2,transformation:{quality:"auto",width:"auto",fetch_format:"auto",crop:"scale"},products:[],showPostPlayOverlay:!1};t.SHOPPABLE_CLICK_ACTIONS={GO_TO:"goto",SEEk:"seek"};t.SHOPPABLE_HOVER_ACTIONS={OVERLAY:"overlay"};t.SHOPPABLE_WIDGET_RESPONSIVE_CLASS="cld-vp-responsive";t.SHOPPABLE_PANEL_VISIBLE_CLASS="shoppable-panel-visible";t.SHOPPABLE_PANEL_HIDDEN_CLASS="shoppable-panel-hidden";t.SHOPPABLE_PRODUCTS_OVERLAY_CLASS="shoppable-products-overlay";t.CLD_SPBL_PANEL_CLASS="cld-spbl-panel";t.CLD_SPBL_TOGGLE_CLASS="cld-spbl-toggle";t.CLD_SPBL_TOGGLE_ICON_CLASS="cld-spbl-toggle-icon";t.CLD_SPBL_INNER_BAR="cld-spbl-bar-inner";t.CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS="cld-spbl-toggle-custom-icon";t.ICON_CART_CLASS="vjs-icon-cart";t.CLOSE_ICON_CLASS="vjs-icon-close";t.SHOPPABLE_ANIMATION_CLASS="animate";t.CLD_SPBL_ITEM="cld-spbl-item";t.CLD_SPBL_IMAGE="cld-spbl-img"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(12);var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.action=e.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaStartTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=t||null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null}return r(e,[{key:"isInitializationRequest",value:function(){return this.type&&this.type===i.HTTPRequest.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(e){this.type=e&&e.init?i.HTTPRequest.INIT_SEGMENT_TYPE:i.HTTPRequest.MEDIA_SEGMENT_TYPE,this.url=e&&e.url?e.url:null,this.range=e&&e.range?e.range.start+"-"+e.range.end:null,this.mediaType=e&&e.mediaType?e.mediaType:null}}]),e}();a.ACTION_DOWNLOAD="download",a.ACTION_COMPLETE="complete",t.default=a},function(e,t,n){"use strict";var r=n(59),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var a=Object.create(n(41));a.inherits=n(32);var o=n(115),s=n(75);a.inherits(d,o);for(var u=i(s.prototype),l=0;l<u.length;l++){var c=u[l];d.prototype[c]||(d.prototype[c]=s.prototype[c])}function d(e){if(!(this instanceof d))return new d(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}return r(e,[{key:"init",value:function(){this.CLEARKEY_KEYSTEM_STRING="org.w3.clearkey",this.WIDEVINE_KEYSTEM_STRING="com.widevine.alpha",this.PLAYREADY_KEYSTEM_STRING="com.microsoft.playready"}}]),e}());t.default=i},function(e,t,n){"use strict";(function(e){var r=n(167),i=n(168),a=n(95);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|h(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(c(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|h(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return H(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return w(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=n;a<s;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){for(var d=!0,f=0;f<u;f++)if(l(e,a+f)!==l(t,f)){d=!1;break}if(d)return a}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function T(e,t,n,r){return q(H(t,e.length-n),e,n,r)}function b(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return b(e,t,n,r)}function S(e,t,n,r){return q(G(t),e,n,r)}function A(e,t,n,r){return q(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function w(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,u,l=e[i],c=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&l)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=I));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?w(this,0,e):g.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(r,i),c=e.slice(t,n),d=0;d<s;++d)if(l[d]!==c[d]){a=l[d],o=c[d];break}return a<o?-1:o<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return T(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=j(e[a]);return i}function D(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function k(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function x(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,r,a){return a||x(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,a){return a||x(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=u.isBuffer(e)?e:H(new u(e,r).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function G(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(18))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t(r,n,e))return[r,n]}return[void 0,-1]}Object.defineProperty(t,"__esModule",{value:!0}),t.find=function(e,t){if(Array.prototype.find&&Array.isArray(e))return e.find(t);return r(e,t)[0]},t.findIndex=function(e,t){if(Array.prototype.findIndex)return e.findIndex(t);return r(e,t)[1]},t.findElementAndIndex=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(55);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.AST_IN_FUTURE="astInFuture",e.BUFFER_EMPTY="bufferStalled",e.BUFFER_LOADED="bufferLoaded",e.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",e.DYNAMIC_TO_STATIC="dynamicToStatic",e.ERROR="error",e.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",e.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",e.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",e.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",e.LOG="log",e.MANIFEST_LOADED="manifestLoaded",e.METRICS_CHANGED="metricsChanged",e.METRIC_CHANGED="metricChanged",e.METRIC_ADDED="metricAdded",e.METRIC_UPDATED="metricUpdated",e.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",e.PERIOD_SWITCH_STARTED="periodSwitchStarted",e.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",e.QUALITY_CHANGE_RENDERED="qualityChangeRendered",e.TRACK_CHANGE_RENDERED="trackChangeRendered",e.SOURCE_INITIALIZED="sourceInitialized",e.STREAM_INITIALIZING="streamInitializing",e.STREAM_UPDATED="streamUpdated",e.STREAM_INITIALIZED="streamInitialized",e.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",e.TEXT_TRACKS_ADDED="allTextTracksAdded",e.TEXT_TRACK_ADDED="textTrackAdded",e.TTML_PARSED="ttmlParsed",e.TTML_TO_PARSE="ttmlToParse",e.CAPTION_RENDERED="captionRendered",e.CAPTION_CONTAINER_RESIZE="captionContainerResize",e.CAN_PLAY="canPlay",e.PLAYBACK_ENDED="playbackEnded",e.PLAYBACK_ERROR="playbackError",e.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",e.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",e.PLAYBACK_PAUSED="playbackPaused",e.PLAYBACK_PLAYING="playbackPlaying",e.PLAYBACK_PROGRESS="playbackProgress",e.PLAYBACK_RATE_CHANGED="playbackRateChanged",e.PLAYBACK_SEEKED="playbackSeeked",e.PLAYBACK_SEEKING="playbackSeeking",e.PLAYBACK_SEEK_ASKED="playbackSeekAsked",e.PLAYBACK_STALLED="playbackStalled",e.PLAYBACK_STARTED="playbackStarted",e.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",e.PLAYBACK_WAITING="playbackWaiting",e.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",e.GAP_CAUSED_SEEK_TO_PERIOD_END="gapCausedSeekToPeriodEnd",e.GAP_CAUSED_INTERNAL_SEEK="gapCausedInternalSeek",e.EVENT_MODE_ON_START="eventModeOnStart",e.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",e.CONFORMANCE_VIOLATION="conformanceViolation",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default));t.default=a},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unescapeDollarsInTemplate=function(e){return e?e.split("$$").join("$"):e},t.replaceIDForTemplate=function(e,t){if(!t||!e||-1===e.indexOf("$RepresentationID$"))return e;var n=t.toString();return e.split("$RepresentationID$").join(n)},t.replaceTokenForTemplate=s,t.getIndexBasedSegment=function(e,t,n,r){var i,a,o=void 0;o=n.segmentDuration,isNaN(o)&&(o=n.adaptation.period.duration);i=parseFloat((n.adaptation.period.start+r*o).toFixed(5)),a=parseFloat((i+o).toFixed(5));var s=u(n,o,i,e.calcMediaTimeFromPresentationTime(i,n),e.calcAvailabilityStartTimeFromPresentationTime(i,n.adaptation.period.mpd,t),e,a,t,r);if(!l(e,n,s,t))return null;return s},t.getTimeBasedSegment=function(e,t,n,r,i,a,o,c,d,f){var h,p,g=r/a,m=Math.min(i/a,n.adaptation.period.mpd.maxSegmentDuration),y=void 0;if(h=e.calcPresentationTimeFromMediaTime(g,n),p=h+m,y=u(n,m,h,g,n.adaptation.period.mpd.manifest.loadedTime,e,p,t,d),!l(e,n,y,t))return null;return y.replacementTime=f||r,o=s(o,"Number",y.replacementNumber),o=s(o,"Time",y.replacementTime),y.media=o,y.mediaRange=c,y};var r,i=n(78),a=(r=i)&&r.__esModule?r:{default:r};function o(e,t){for(;e.length<t;)e="0"+e;return e}function s(e,t,n){var r=void 0,i=void 0,a=void 0,s=void 0,u=void 0,l=void 0,c=t.length,d="%0".length;if(!e)return e;for(;;){if((r=e.indexOf("$"+t))<0)return e;if((i=e.indexOf("$",r+c))<0)return e;if((a=e.indexOf("%0",r+c))>r&&a<i)switch(s=e.charAt(i-1),u=parseInt(e.substring(a+d,i-1),10),s){case"d":case"i":case"u":l=o(n.toString(),u);break;case"x":l=o(n.toString(16),u);break;case"X":l=o(n.toString(16),u).toUpperCase();break;case"o":l=o(n.toString(8),u);break;default:return e}else l=n;e=e.substring(0,r)+l+e.substring(i+1)}}function u(e,t,n,r,i,o,s,u,l){var c,d=new a.default;return d.representation=e,d.duration=t,d.presentationStartTime=n,d.mediaStartTime=r,d.availabilityStartTime=i,d.availabilityEndTime=o.calcAvailabilityEndTimeFromPresentationTime(s,e.adaptation.period.mpd,u),d.wallStartTime=o.calcWallTimeForSegment(d,u),d.replacementNumber=(c=l,d.representation.startNumber+c),d.availabilityIdx=l,d}function l(e,t,n,r){var i=e.getPeriodEnd(t,r),a=e.calcPeriodRelativeTimeFromMpdRelativeTime(t,i);if(e.calcPeriodRelativeTimeFromMpdRelativeTime(t,n.presentationStartTime)>=a){if(!r)return!1;if(t.segmentAvailabilityRange&&n.presentationStartTime>=t.segmentAvailabilityRange.end)return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=l(n(1)),a=l(n(43)),o=l(n(8)),s=l(n(6)),u=n(12);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){var e,t,n={debug:{logLevel:o.default.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{metricsMaxListDepth:1e3,abandonLoadTimeout:1e4,liveDelayFragmentCount:NaN,liveDelay:null,scheduleWhilePaused:!0,fastSwitchEnabled:!1,flushBufferAtTrackSwitch:!1,calcSegmentAvailabilityRangeFromTimeline:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,stableBufferTime:12,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,longFormContentDurationThreshold:600,wallclockTimeUpdateInterval:50,lowLatencyEnabled:!1,keepProtectionMediaKeys:!1,useManifestDateHeaderTimeSource:!0,useSuggestedPresentationDelay:!0,useAppendWindow:!0,manifestUpdateRetryInterval:100,stallThreshold:.5,filterUnsupportedEssentialProperties:!0,eventControllerRefreshDelay:100,utcSynchronization:{backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"http://time.akamai.com/?iso&ms"}},liveCatchup:{minDrift:.02,maxDrift:0,playbackRate:.5,latencyThreshold:60,playbackBufferMin:.5,enabled:!1,mode:s.default.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:s.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:s.default.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:s.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE,fragmentRequestTimeout:0,retryIntervals:(e={},c(e,u.HTTPRequest.MPD_TYPE,500),c(e,u.HTTPRequest.XLINK_EXPANSION_TYPE,500),c(e,u.HTTPRequest.MEDIA_SEGMENT_TYPE,1e3),c(e,u.HTTPRequest.INIT_SEGMENT_TYPE,1e3),c(e,u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),c(e,u.HTTPRequest.INDEX_SEGMENT_TYPE,1e3),c(e,u.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),c(e,u.HTTPRequest.OTHER_TYPE,1e3),c(e,"lowLatencyReductionFactor",10),e),retryAttempts:(t={},c(t,u.HTTPRequest.MPD_TYPE,3),c(t,u.HTTPRequest.XLINK_EXPANSION_TYPE,1),c(t,u.HTTPRequest.MEDIA_SEGMENT_TYPE,3),c(t,u.HTTPRequest.INIT_SEGMENT_TYPE,3),c(t,u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),c(t,u.HTTPRequest.INDEX_SEGMENT_TYPE,3),c(t,u.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),c(t,u.HTTPRequest.OTHER_TYPE,3),c(t,"lowLatencyMultiplyFactor",5),t),abr:{movingAverageMethod:s.default.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:s.default.ABR_STRATEGY_DYNAMIC,bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0},fetchThroughputCalculationMode:s.default.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:s.default.CMCD_MODE_QUERY}}},i=a.default.clone(n);function l(e,t,n){for(var i in e)e.hasOwnProperty(i)&&t.hasOwnProperty(i)&&("object"===r(e[i])&&null!==e[i]?l(e[i],t[i],n.slice()+i+"."):t[i]=a.default.clone(e[i]))}return{get:function(){return i},update:function(e){"object"===(void 0===e?"undefined":r(e))&&l(e,i,"")},reset:function(){i=a.default.clone(n)}}}d.__dashjs_factory_name="Settings";var f=i.default.getSingletonFactory(d);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"findCencContentProtection",value:function(e){for(var t=null,n=0;n<e.length;++n){var r=e[n];"urn:mpeg:dash:mp4protection:2011"!==r.schemeIdUri.toLowerCase()||"cenc"!==r.value.toLowerCase()&&"cbcs"!==r.value.toLowerCase()||(t=r)}return t}},{key:"getPSSHData",value:function(e){var t=8,n=new DataView(e),r=n.getUint8(t);return t+=20,r>0&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}},{key:"getPSSHForKeySystem",value:function(t,n){var r=e.parsePSSHList(n);return t&&r.hasOwnProperty(t.uuid.toLowerCase())?r[t.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e,t){return"pssh"in e?(e.pssh.__text=e.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),t.decodeArray(e.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(e){if(null==e)return[];for(var t=new DataView(e.buffer||e),n={},r=0;;){var i,a,o=void 0,s=r;if(r>=t.buffer.byteLength)break;if(i=r+t.getUint32(r),r+=4,1886614376===t.getUint32(r))if(r+=4,0===(a=t.getUint8(r))||1===a){r++,r+=3,o="";var u=void 0,l=void 0;for(u=0;u<4;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;for(r+=4,o+="-",u=0;u<2;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;for(r+=2,o+="-",u=0;u<2;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;for(r+=2,o+="-",u=0;u<2;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;for(r+=2,o+="-",u=0;u<6;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;r+=6,o=o.toLowerCase(),t.getUint32(r),r+=4,n[o]=t.buffer.slice(s,i),r=i}else r=i;else r=i}return n}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){var t=e.getBoundingClientRect(),n=document.body,r=document.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,a=window.pageXOffset||r.scrollLeft||n.scrollLeft,o=r.clientTop||n.clientTop||0,s=r.clientLeft||n.clientLeft||0,u=t.top+i-o,l=t.left+a-s;return{top:Math.round(u),left:Math.round(l)}}Object.defineProperty(t,"__esModule",{value:!0}),t.getElementPosition=r,t.getPointerPosition=function(e,t){var n={},i=r(e),a=e.offsetWidth,o=e.offsetHeight,s=i.top,u=i.left,l=t.pageY,c=t.pageX;t.changedTouches&&(c=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY);return n.y=Math.max(0,Math.min(1,(s-l+o)/o)),n.x=Math.max(0,Math.min(1,(c-u)/a)),n},t.isElementInViewport=function(e,t){var n=t.fraction,i=r(e),a=i.left,o=i.top,s=e.offsetHeight,u=e.offsetWidth,l=a+u,c=o+s,d=Math.max(0,Math.min(u,window.pageXOffset+window.innerWidth-a,l-window.pageXOffset)),f=Math.max(0,Math.min(u,window.pageYOffset+window.innerHeight-o,c-window.pageYOffset));return d*f/(u*s)>n},t.setPosition=function(e,t,n){e.style.left="".concat(t,"px"),e.style.top="".concat(n,"px")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PRELOAD=t.ADS_IN_PLAYLIST=t.FLOATING_TO=t.AUTO_PLAY_MODE=t.FLUID_CLASS_NAME=t.DEFAULT_HLS_OPTIONS=t.PLAYER_PARAMS=t.CLOUDINARY_PARAMS=void 0;var r,i=(r=n(4))&&r.__esModule?r:{default:r};var a=["cloudinaryConfig","transformation","sourceTypes","sourceTransformation","posterOptions","autoShowRecommendations","fontFace","secure"];t.CLOUDINARY_PARAMS=a;var o=a.concat(["publicId","source","autoplayMode","playedEventPercents","playedEventTimes","analytics","fluid","ima","playlistWidget","hideContextMenu","colors","floatingWhenNotVisible","ads","showJumpControls","textTracks","qualitySelector","fetchErrorUsingGet","withCredentials","seekThumbnails"]);t.PLAYER_PARAMS=o;var s={html5:{handlePartialData:!1,hls:{overrideNative:!i.default||!i.default.browser||!i.default.browser.IS_IOS&&!i.default.browser.IS_SAFARI}}};t.DEFAULT_HLS_OPTIONS=s;t.FLUID_CLASS_NAME="cld-fluid";t.AUTO_PLAY_MODE={ALWAYS:"always",ON_SCROLL:"on-scroll",NEVER:"never"};t.FLOATING_TO={LEFT:"left",RIGHT:"right",NONE:"none"};t.ADS_IN_PLAYLIST={FIRST_VIDEO:"first-video",EVERY_VIDEO:"every-video"};t.PRELOAD={AUTO:"auto",METADATA:"metadata",NONE:"none"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsMediaSource=t.Debug=t.MediaPlayerFactory=t.MetricsReporting=t.Protection=t.MediaPlayer=void 0;var r=n(205),i=n(135),a=l(n(335)),o=l(n(354)),s=l(n(371)),u=l(n(8));function l(e){return e&&e.__esModule?e:{default:e}}dashjs.Protection=o.default,dashjs.MetricsReporting=a.default,dashjs.MediaPlayerFactory=s.default,dashjs.Debug=u.default,dashjs.supportsMediaSource=i.supportsMediaSource,t.default=dashjs,t.MediaPlayer=r.MediaPlayer,t.Protection=o.default,t.MetricsReporting=a.default,t.MediaPlayerFactory=s.default,t.Debug=u.default,t.supportsMediaSource=i.supportsMediaSource},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(26));function a(e){return e&&e.__esModule?e:{default:e}}var o="loading",s="executed",u="failed";function l(e){var t=(e=e||{}).eventBus,n=e.events,r=e.dashMetrics,a=e.fragmentLoader,l=e.debug,c=e.streamInfo,d=e.type,f=void 0,h=void 0,p=void 0,g=void 0;function m(e){var t;return!!e&&(t=!1,p.some((function(n){if(r=e,a=n,!isNaN(r.index)&&r.startTime===a.startTime&&r.adaptationIndex===a.adaptationIndex&&r.type===a.type||function(e,t){return isNaN(e.index)&&isNaN(t.index)&&e.quality===t.quality}(e,n)||function(e,t){return e.action===i.default.ACTION_COMPLETE&&e.action===t.action}(e,n))return t=!0;var r,a})),t)}function y(e){return isNaN(e.duration)?.25:Math.min(e.duration/8,.5)}function v(e){p=p.filter((function(t){var n=y(t);return isNaN(t.startTime)||void 0!==e&&t.startTime>=e-n}))}function _(e,t){t<=e+.5||(p=p.filter((function(n){var r=y(n);return isNaN(n.startTime)||n.startTime>=t-r||isNaN(n.duration)||n.startTime+n.duration<=e+r})))}function T(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r],a=i.startTime,o=a+i.duration;if(n=isNaN(n)?y(i):n,!isNaN(a)&&!isNaN(o)&&t+n>=a&&t-n<o||isNaN(a)&&isNaN(t))return i}return null}function b(e,t){r.addSchedulingInfo(e,t),r.addRequestsQueue(e.mediaType,g,p)}function E(e){e.sender===a&&(g.splice(g.indexOf(e.request),1),e.response&&!e.error&&p.push(e.request),b(e.request,e.error?u:s),t.trigger(n.FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:c.id,mediaType:d}))}function S(e){e.sender===a&&t.trigger(n.FRAGMENT_LOADING_PROGRESS,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:c.id,mediaType:d})}function A(e){e.sender===a&&t.trigger(n.FRAGMENT_LOADING_ABANDONED,{request:e.request},{streamId:c.id,mediaType:d})}function C(){p=[],g=[]}return f={getStreamId:function(){return c.id},getType:function(){return d},getRequests:function(e){var t=e?e.state instanceof Array?e.state:[e.state]:[],n=[];return t.forEach((function(t){var r=function(e){var t=void 0;switch(e){case o:t=g;break;case s:t=p;break;default:t=[]}return t}(t);n=n.concat(function(e,t){if(t.hasOwnProperty("time"))return[T(e,t.time,t.threshold)];return e.filter((function(e){for(var n in t)if("state"!==n&&t.hasOwnProperty(n)&&e[n]!=t[n])return!1;return!0}))}(r,e))})),n},isFragmentLoaded:m,isFragmentLoadedOrPending:function(e){var t=!1,n=0,r=void 0;if(!(t=m(e)))for(n=0;n<g.length;n++)r=g[n],e.url===r.url&&e.startTime===r.startTime&&(t=!0);return t},removeExecutedRequestsBeforeTime:v,removeExecutedRequestsAfterTime:function(e){p=p.filter((function(t){return isNaN(t.startTime)||void 0!==e&&t.startTime<e}))},syncExecutedRequestsWithBufferedRange:function(e,t){if(e&&0!==e.length){for(var n=0,r=0,i=e.length;r<i;r++)_(n,e.start(r)),n=e.end(r);t>0&&_(n,t)}else v()},abortRequests:function(){h.debug("abort requests"),a.abort(),g=[]},executeRequest:function(e){switch(e.action){case i.default.ACTION_COMPLETE:p.push(e),b(e,s),h.debug("STREAM_COMPLETED"),t.trigger(n.STREAM_COMPLETED,{request:e},{streamId:e.mediaInfo.streamInfo.id,mediaType:e.mediaType});break;case i.default.ACTION_DOWNLOAD:b(e,o),g.push(e),function(e){t.trigger(n.FRAGMENT_LOADING_STARTED,{request:e},{streamId:c.id,mediaType:d}),a.load(e)}(e);break;default:h.warn("Unknown request action.")}},reset:function(){t.off(n.LOADING_COMPLETED,E,this),t.off(n.LOADING_DATA_PROGRESS,S,this),t.off(n.LOADING_ABANDONED,A,this),a&&a.reset(),C()},addExecutedRequest:function(e){p.push(e)}},h=l.getLogger(f),C(),t.on(n.LOADING_COMPLETED,E,f),t.on(n.LOADING_DATA_PROGRESS,S,f),t.on(n.LOADING_ABANDONED,A,f),f}l.__dashjs_factory_name="FragmentModel";var c=r.default.getClassFactory(l);c.FRAGMENT_MODEL_LOADING=o,c.FRAGMENT_MODEL_EXECUTED=s,c.FRAGMENT_MODEL_CANCELED="canceled",c.FRAGMENT_MODEL_FAILED=u,r.default.updateClassFactory(l.__dashjs_factory_name,c),t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(8)),i=u(n(213)),a=u(n(1)),o=u(n(70)),s=u(n(215));function u(e){return e&&e.__esModule?e:{default:e}}function l(){var e=void 0,t=void 0,n=this.context;function a(e){if(!e)return null;void 0===e.fileStart&&(e.fileStart=0);var t=o.default.parseBuffer(e),r=(0,i.default)(n).create();return r.setData(t),r}function u(e,t){return e[t+3]>>>0|e[t+2]<<8>>>0|e[t+1]<<16>>>0|e[t]<<24>>>0}function l(e,t){return String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t])}return t={parse:a,findLastTopIsoBoxCompleted:function(e,t,n){if(void 0===n&&(n=0),!t||n+8>=t.byteLength)return new s.default(0,!1);for(var r=t instanceof ArrayBuffer?new Uint8Array(t):t,i=void 0,a=0;n<r.byteLength;){var o=u(r,n),c=l(r,n+4);if(0===o)break;n+o<=r.byteLength&&(e.indexOf(c)>=0?i=new s.default(n,!0,o):a=n+o),n+=o}return i||new s.default(a,!1)},getMediaTimescaleFromMoov:function(e){var t=a(e),n=t?t.getBox("mdhd"):void 0;return n?n.timescale:NaN},getSamplesInfo:function(e){if(!e||0===e.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var t,n,r=a(e),i=r.getBoxes("moof"),o=r.getBoxes("mfhd"),s=void 0,u=void 0,l=void 0,c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0;n=r.getBoxes("moof").length,t=o[o.length-1].sequence_number,u=0,d=[];var b=-1,E=-1;for(m=0;m<i.length;m++){var S=i[m],A=S.getChildBoxes("traf");for(p=0;p<A.length;p++){var C=A[p],w=C.getChildBox("tfhd"),I=C.getChildBox("tfdt");c=I.baseMediaDecodeTime;var R=C.getChildBoxes("trun"),O=C.getChildBoxes("subs");for(g=0;g<R.length;g++){var P=R[g];for(u=P.sample_count,_=(w.base_data_offset||0)+(P.data_offset||0),h=0;h<u;h++){s=void 0!==(f=P.samples[h]).sample_duration?f.sample_duration:w.default_sample_duration,l=void 0!==f.sample_size?f.sample_size:w.default_sample_size;var D={dts:c,cts:c+(void 0!==f.sample_composition_time_offset?f.sample_composition_time_offset:0),duration:s,offset:S.offset+_,size:l,subSizes:[l]};if(O)for(y=0;y<O.length;y++){var M=O[y];if(b<M.entry_count-1&&h>E&&(b++,E+=M.entries[b].sample_delta),h==E){D.subSizes=[];var N=M.entries[b];for(v=0;v<N.subsample_count;v++)D.subSizes.push(N.subsamples[v].subsample_size)}}d.push(D),_+=l,c+=s}}T=c-I.baseMediaDecodeTime}}return{sampleList:d,lastSequenceNumber:t,totalDuration:T,numSequences:n}},findInitRange:function(t){var n=null,r=a(t);if(!r)return n;var i=r.getBox("ftyp"),o=r.getBox("moov");return e.debug("Searching for initialization."),o&&o.isComplete&&(n=(i?i.offset:o.offset)+"-"+(o.offset+o.size-1),e.debug("Found the initialization. Range: "+n)),n},parsePayload:function(e,t,n){if(void 0===n&&(n=0),!t||n+8>=t.byteLength)return new s.default(0,!1);for(var r=t instanceof ArrayBuffer?new Uint8Array(t):t,i=void 0,a=0;n<r.byteLength;){var o=u(r,n),c=l(r,n+4);if(0===o)break;n+o<=r.byteLength&&(e.indexOf(c)>=0?i=new s.default(n,!0,o,c):a=n+o),n+=o}return i||new s.default(a,!1)}},e=(0,r.default)(n).getInstance().getLogger(t),t}l.__dashjs_factory_name="BoxParser",t.default=a.default.getSingletonFactory(l)},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(29).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(125));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){e=e||{};var t=this.context,n=void 0,r=void 0;return n=(0,i.default)(t).getInstance(),{load:function(i){var a=n.getLoader(i&&i.request?i.request.url:null);(r=a(t).create({errHandler:e.errHandler,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,useFetch:e.useFetch||null,dashMetrics:e.dashMetrics,boxParser:e.boxParser?e.boxParser:null,constants:e.constants?e.constants:null,dashConstants:e.dashConstants?e.dashConstants:null,urlUtils:e.urlUtils?e.urlUtils:null,requestTimeout:isNaN(e.requestTimeout)?0:e.requestTimeout,errors:e.errors})).load(i)},abort:function(){r&&r.abort()}}}o.__dashjs_factory_name="URLLoader";var s=r.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"mixin",value:function(t,n,i){var a=void 0,o={};if(t)for(var s in n)n.hasOwnProperty(s)&&(a=n[s],s in t&&(t[s]===a||s in o&&o[s]===a)||("object"===r(t[s])&&null!==t[s]?t[s]=e.mixin(t[s],a,i):t[s]=i(a)));return t}},{key:"clone",value:function(t){if(!t||"object"!==(void 0===t?"undefined":r(t)))return t;var n=void 0;if(t instanceof Array){n=[];for(var i=0,a=t.length;i<a;++i)i in t&&n.push(e.clone(t[i]))}else n={};return e.mixin(n,t,e.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(e,t){try{if(!t||0===t.length)return e;var n=new URL(e);return t.forEach((function(e){e.key&&e.value&&n.searchParams.set(e.key,e.value)})),n.href}catch(t){return e}}},{key:"parseHttpHeaders",value:function(e){var t={};if(!e)return t;for(var n=e.trim().split("\r\n"),r=0,i=n.length;r<i;r++){var a=n[r],o=a.indexOf(": ");o>0&&(t[a.substring(0,o)]=a.substring(o+2))}return t}},{key:"generateUuid",value:function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t|=0}return t}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(55);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",e.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",e.CMCD_DATA_GENERATED="cmcdDataGenerated",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default));t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(119);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.MEDIA_KEYERR_CODE=100,e.MEDIA_KEYERR_UNKNOWN_CODE=101,e.MEDIA_KEYERR_CLIENT_CODE=102,e.MEDIA_KEYERR_SERVICE_CODE=103,e.MEDIA_KEYERR_OUTPUT_CODE=104,e.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,e.MEDIA_KEYERR_DOMAIN_CODE=106,e.MEDIA_KEY_MESSAGE_ERROR_CODE=107,e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,e.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,e.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,e.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,e.KEY_SESSION_CREATED_ERROR_CODE=113,e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,e.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",e.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",e.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",e.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",e.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",e.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",e.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",e.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",e.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",e.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",e.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default));t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=t.some=t.forEach=t.castArray=void 0;t.castArray=function(e){return Array.isArray(e)?e:[e]};t.forEach=function(e,t){Array.isArray(e)&&e.length&&e.forEach(t)};t.some=function(e,t){return!(!Array.isArray(e)||!e.length)&&e.some(t)};t.map=function(e,t){if(Array.isArray(e)&&e.length)return e.map(t)}},function(e,t){var n,r,i,a,o,s,u,l=9e4;n=function(e){return e*l},r=function(e,t){return e*t},i=function(e){return e/l},a=function(e,t){return e/t},o=function(e,t){return n(a(e,t))},s=function(e,t){return r(i(e),t)},u=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:l,secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:i,audioTsToSeconds:a,audioTsToVideoTs:o,videoTsToAudioTs:s,metadataTsToSeconds:u}},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.overrideDefaultVideojsComponents=t.extractOptions=t.normalizeAutoplay=t.getResolveVideoElement=t.isLight=t.addMetadataTrack=void 0;var r=u(n(4)),i=u(n(97)),a=u(n(67)),o=n(37),s=n(14);function u(e){return e&&e.__esModule?e:{default:e}}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.addMetadataTrack=function(e,t){return e.addRemoteTextTrack({kind:"metadata",srclang:"en",src:t,default:!0},!0).track};t.isLight=function(e){return e.class.indexOf("cld-video-player-skin-light")>-1||"light"===e.skin};t.getResolveVideoElement=function(e){if((0,s.isString)(e)){var t=e;0===t.indexOf("#")&&(t=t.slice(1));try{e=document.querySelector("#".concat(t))||r.default.getPlayer(t)}catch(t){e=null}if(!e)throw new Error("Could not find element with id ".concat(t))}if(!e.tagName)throw new Error("Must specify either an element or an element id.");if("VIDEO"!==e.tagName)throw new Error("Element is not a video tag.");return e};var d=function(e){var t=e.autoplayMode;if(t)switch(t){case o.AUTO_PLAY_MODE.ALWAYS:e.autoplay=!0;break;case o.AUTO_PLAY_MODE.ON_SCROLL:case o.AUTO_PLAY_MODE.NEVER:default:e.autoplay=!1}};t.normalizeAutoplay=d;t.extractOptions=function(e,t){var n=i.default.normalizeAttributes(e);(r.default.dom.hasClass(e,o.FLUID_CLASS_NAME)||r.default.dom.hasClass(e,"vjs-fluid"))&&(t.fluid=!0),t=i.default.assign({},o.DEFAULT_HLS_OPTIONS,a.default,n,t),d(t);var s=i.default.sliceAndUnsetProperties.apply(i.default,[t].concat(l(o.PLAYER_PARAMS)));return s.cloudinary=i.default.sliceAndUnsetProperties.apply(i.default,[s].concat(l(o.CLOUDINARY_PARAMS))),t.videojs&&(i.default.assign(t,t.videojs),delete t.videojs),{playerOptions:s,videojsOptions:t}};t.overrideDefaultVideojsComponents=function(){var e=r.default.getComponent("Player").prototype.options_.children;e.push("titleBar"),e.push("upcomingVideoOverlay"),e.push("recommendationsOverlay");var t=r.default.getComponent("ControlBar");t&&((e=t.prototype.options_.children).splice(e.indexOf("progressControl"),0,"spacer","progressControlEventsBlocker"),e.splice(e.indexOf("playToggle"),1,"playlistPreviousButton","JumpBackButton","playToggle","JumpForwardButton","playlistNextButton"),e.splice(e.indexOf("fullscreenToggle"),1,"logoButton","fullscreenToggle"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelize=function(e){return e.replace(/[_.-](\w|$)/g,(function(e,t){return t.toUpperCase()}))},t.startsWith=function(e,t,n){if(String.prototype.startsWith)return e.startsWith(t,n);var r=r||0;return e.indexOf(t,r)===r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCloudinaryInstanceOf=function e(t,n){if(Array.isArray(n))return n.map((function(n){return e(t,n)}));return n instanceof t?n:new t(n)},t.filterAndAddTextTracks=t.isKeyInTransformation=t.handleCldError=void 0;var r=s(n(65)),i=s(n(99)),a=n(24),o=n(30);function s(e){return e&&e.__esModule?e:{default:e}}var u=(0,i.default)({Promise:r.default}).fetch,l={method:"head"},c={method:"get",credentials:"include",headers:{"Content-Range":"bytes=0-0"}};function d(e){for(var t={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},n=t.parser[t.strictMode?"strict":"loose"].exec(e),r={},i=14;i--;)r[t.key[i]]=n[i]||"";return r[t.q.name]={},r[t.key[12]].replace(t.q.parser,(function(e,n,i){n&&(r[t.q.name][n]=i)})),r}t.handleCldError=function(e,t){var n=t.fetchErrorUsingGet?c:l,i=e.videojs.cloudinary.getCurrentSources();i.length>0?r.default.all(i.map((function(e){return u(e.src,n)}))).then((function(t){var n=function(e){return e.reduce((function(e,t){if(t.status>=200&&t.status<399&&""!==t.url){var n=d(t.url);e.push(n.host+n.path)}return e}),[])}(t),r=t[0];if(n.length){var o=function(e,t){return e.filter((function(e){var n=d(e.src);return-1!==t.indexOf(n.host+n.path)&&!0!==e.try}))}(i,n);o&&o.length?function(e,t){JSON.stringify(t),t.forEach((function(e){e.try=!0})),e.videojs.autoplay(e.videojs.autoplay()||e.playWasCalled),e.videojs.src(t)}(e,o):e.videojs.error({code:a.ERROR_CODE.NO_SUPPORTED_MEDIA,message:"No supported media sources",statusCode:t.status})}else!function(e,t){e.videojs.error((0,a.cloudinaryErrorsConverter)({errorMsg:t.headers.get("x-cld-error")||"",publicId:e.currentPublicId(),cloudName:e.cloudinaryConfig().config().cloud_name,error:t,statusCode:t.status}))}(e,r)})).catch((function(t){e.videojs.error({code:7,message:t&&t.message?t.message:"Failed to test sources"})})):e.videojs.error({code:a.ERROR_CODE.NO_SUPPORTED_MEDIA,message:"No supported media sources"})};t.isKeyInTransformation=function e(t,n){return!(!t||!n)&&(Array.isArray(t)?!!(0,o.find)(t,(function(t){return e(t,n)})):t.getValue?!!t.getValue(n):!!t[n])};t.filterAndAddTextTracks=function(e,t){e.forEach((function(e){u(e.src,l).then((function(n){n.status>=200&&n.status<=399&&t.addRemoteTextTrack(e,!0)}))}))}},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.debounce=t.parseTime=t.parseISO8601=void 0;var r=void 0;function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o=[1,4,5,6,7,10,11];t.parseISO8601=function(e){var t=0,n=0,r=0;if(n=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(e)){for(var i,a=0;i=o[a];++a)n[i]=+n[i]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,"Z"!==n[8]&&void 0!==n[9]&&(r=60*n[10]+n[11],"+"===n[9]&&(r=0-r)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+r,n[6],n[7])}else t=NaN;return t};t.parseTime=function(e){var t=i(e.split(":").reverse(),3),n=t[0],r=t[1],a=t[2],o=null;return isNaN(n)||(o=60*(+a||0)*60+60*(+r||0)+ +n),o};t.debounce=function(e,t){var n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){e.apply(r,a)}),t)}};t.throttle=function(e,t){var n=0;return function(){var i=new Date;if(i-n>=t){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];e.apply(r,o),n=i}}}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(107))&&i.__esModule?i:{default:i},o=n(24),s=n(13);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=RegExp("\\.(".concat(["jpg","png","gif","webp"].join("|"),")$$")),p={resource_type:"image",type:"upload",transformation:[]},g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(n,e);var t=c(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,n);var a=(0,o.normalizeOptions)(e,i);return e=a.publicId,i=a.options,e=e.replace(h,""),i=(0,s.assign)({},p,i),(r=t.call(this,e,i))._type="ImageSource",r}return n}(a.default);t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===e[i].indexOf("public_")||(this[i]=e[i])}}}]),e}();t.default=i},function(e,t,n){!function(e){e.ns_tt="http://www.w3.org/ns/ttml",e.ns_tts="http://www.w3.org/ns/ttml#styling",e.ns_ttp="http://www.w3.org/ns/ttml#parameter",e.ns_xml="http://www.w3.org/XML/1998/namespace",e.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",e.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",e.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",e.ns_ebutts="urn:ebu:tt:style"}(t)},function(e,t,n){!function(e){var t=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,n=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,r=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,i={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};e.parseColor=function(e){var a,o=null,s=i[e.toLowerCase()];return void 0!==s?o=s:null!==(a=t.exec(e))?o=[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),void 0!==a[4]?parseInt(a[4],16):255]:null!==(a=n.exec(e))?o=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),255]:null!==(a=r.exec(e))&&(o=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),parseInt(a[4])]),o};var a=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;e.parseLength=function(e){var t,n=null;return null!==(t=a.exec(e))&&(n={value:parseFloat(t[1]),unit:t[2]}),n},e.parseTextShadow=function(t){var n=t.split(","),r=[];for(var i in n){var a=n[i].split(" ");if(1===a.length&&"none"===a[0])return"none";if(a.length>1&&a.length<5){var o=[null,null,null,null],s=e.parseLength(a.shift());if(null===s)return null;if(o[0]=s,null===(s=e.parseLength(a.shift())))return null;if(o[1]=s,0===a.length){r.push(o);continue}if(null!==(s=e.parseLength(a[0]))&&(o[2]=s,a.shift()),0===a.length){r.push(o);continue}var u=e.parseColor(a[0]);if(null===u)return null;o[3]=u,r.push(o)}}return r},e.parsePosition=function(t){var n=t.split(" "),r=function(e){return"center"===e||"left"===e||"top"===e||"bottom"===e||"right"===e};if(n.length>4)return null;for(var i in n)if(!r(n[i])){var a=e.parseLength(n[i]);if(null===a)return null;n[i]=a}for(var o={h:{edge:"left",offset:{value:50,unit:"%"}},v:{edge:"top",offset:{value:50,unit:"%"}}},s=0;s<n.length;){var u=n[s++];if(r(u)){var l={value:0,unit:"%"};2!==n.length&&s<n.length&&!r(n[s])&&(l=n[s++]),"right"===u?(o.h.edge=u,o.h.offset=l):"bottom"===u?(o.v.edge=u,o.v.offset=l):"left"===u?o.h.offset=l:"top"===u&&(o.v.offset=l)}else{if(1!==n.length&&2!==n.length)return null;1===s?o.h.offset=u:o.v.offset=u}}return o},e.ComputedLength=function(e,t){this.rw=e,this.rh=t},e.ComputedLength.prototype.toUsedLength=function(e,t){return e*this.rw+t*this.rh},e.ComputedLength.prototype.isZero=function(){return 0===this.rw&&0===this.rh},e.toComputedLength=function(t,n,r,i,a,o){return"%"===n&&i?new e.ComputedLength(i.rw*t/100,i.rh*t/100):"em"===n&&r?new e.ComputedLength(r.rw*t,r.rh*t):"c"===n&&a?new e.ComputedLength(t*a.rw,t*a.rh):"px"===n&&o?new e.ComputedLength(t*o.rw,t*o.rh):"rh"===n?new e.ComputedLength(0,t/100):"rw"===n?new e.ComputedLength(t/100,0):null}}(t)},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a,o;if(l(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,console&&console.warn}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var l=u.length,c=m(u,l);for(n=0;n<l;++n)a(c[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick((function(){e.apply(null,a)}))}}}:e.exports=t}).call(this,n(52))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._test=t,this._converter=n}return r(e,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(35)),i=h(n(359)),a=h(n(360)),o=h(n(361)),s=h(n(362)),u=h(n(363)),l=h(n(364)),c=h(n(365)),d=h(n(366)),f=h(n(28));function h(e){return e&&e.__esModule?e:{default:e}}function p(){var e=this.context,t=void 0,n=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0;return t={initialize:function(){p=[];var t=void 0;t=(0,s.default)(e).getInstance({BASE64:g}),p.push(t),t=(0,o.default)(e).getInstance({BASE64:g}),p.push(t),t=(0,i.default)(e).getInstance({BASE64:g}),p.push(t),m=t,t=(0,a.default)(e).getInstance({BASE64:g,debug:n}),p.push(t),y=t},setProtectionData:function(e){for(var t,n,r=0;r<p.length;r++){var i=p[r];i.hasOwnProperty("init")&&i.init((t=i.systemString,n=void 0,n=null,e&&(n=t in e?e[t]:null),n))}},isClearKey:function(e){return e===m||e===y},initDataEquals:function(e,t){if(e.byteLength===t.byteLength){for(var n=new Uint8Array(e),r=new Uint8Array(t),i=0;i<n.length;i++)if(n[i]!==r[i])return!1;return!0}return!1},getKeySystems:function(){return p},setKeySystems:function(e){p=e},getKeySystemBySystemString:function(e){for(var t=0;t<p.length;t++)if(p[t].systemString===e)return p[t];return null},getSupportedKeySystemsFromContentProtection:function(e){var t=void 0,n=void 0,i=void 0,a=void 0,o=[];if(e){var s=r.default.findCencContentProtection(e);for(i=0;i<p.length;++i)for(n=p[i],a=0;a<e.length;++a)if((t=e[a]).schemeIdUri.toLowerCase()===n.schemeIdURI){var u=n.getInitData(t,s);o.push({ks:p[i],initData:u,cdmData:n.getCDMData(),sessionId:n.getSessionId(t)})}}return o},getSupportedKeySystems:function(e,t){for(var n=[],i=r.default.parsePSSHList(e),a=void 0,o=void 0,s=void 0,u=0;u<p.length;++u)o=(a=p[u]).systemString,s=!t||o in t,a.uuid in i&&s&&n.push({ks:a,initData:i[a.uuid],cdmData:a.getCDMData(),sessionId:a.getSessionId()});return n},getLicenseServer:function(t,n,r){if("license-release"===r||"individualization-request"===r)return null;var i=null;return n&&n.hasOwnProperty("drmtoday")?i=(0,u.default)(e).getInstance({BASE64:g}):t.systemString===f.default.WIDEVINE_KEYSTEM_STRING?i=(0,c.default)(e).getInstance():t.systemString===f.default.PLAYREADY_KEYSTEM_STRING?i=(0,l.default)(e).getInstance():t.systemString===f.default.CLEARKEY_KEYSTEM_STRING&&(i=(0,d.default)(e).getInstance()),i},processClearKeyLicenseRequest:function(e,t,n){try{return e.getClearKeysFromProtectionData(t,n)}catch(e){return h.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(e){e&&(e.debug&&(n=e.debug,h=n.getLogger(t)),e.BASE64&&(g=e.BASE64))}}}p.__dashjs_factory_name="ProtectionKeyController",t.default=dashjs.FactoryMaker.getSingletonFactory(p)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=p(n(107)),a=p(n(54)),o=n(24),s=n(19),u=n(13),l=n(68),c=p(n(4)),d=n(143),f=n(394),h=n(46);function p(e){return e&&e.__esModule?e:{default:e}}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var i=E(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=0,A=function(){return S++},C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(p,e);var t,n,r,i=T(p);function p(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y(this,p);var r=d.URL_PATTERN.test(e),a=(0,o.normalizeOptions)(e,n),l=a.publicId,c=a.options;r||(l=l.replace(d.VIDEO_SUFFIX_REMOVAL_PATTERN,"")),(c=(0,u.assign)({},d.DEFAULT_VIDEO_PARAMS,c)).poster||(c.poster=(0,u.assign)({publicId:l},d.DEFAULT_POSTER_PARAMS));var f=(0,s.sliceAndUnsetProperties)(c,"poster","sourceTypes","sourceTransformation","info","recommendations","textTracks","withCredentials","interactionAreas"),h=f.poster,g=f.sourceTypes,m=f.sourceTransformation,v=f.info,_=f.recommendations,T=f.textTracks,b=f.withCredentials,E=f.interactionAreas;return(t=i.call(this,l,c))._sourceTypes=null,t._recommendations=null,t._textTracks=null,t._poster=null,t._info=null,t._sourceTransformation=null,t._interactionAreas=null,t._type="VideoSource",t.isRawUrl=r,t._rawTransformation=c.raw_transformation,t.withCredentials=!!b,t.getInitOptions=function(){return n},t.poster(h),t.sourceTypes(g),t.sourceTransformation(m),t.info(v),t.interactionAreas(E),t.recommendations(_),t.textTracks(T),t.objectId=A(),t}return t=p,(n=[{key:"textTracks",value:function(e){return void 0===e?this._textTracks:(this._textTracks=e,this)}},{key:"recommendations",value:function(e){return void 0===e?this._recommendations:(this._recommendations=e,this)}},{key:"sourceTypes",value:function(e){return e?(this._sourceTypes=e,this):this._sourceTypes}},{key:"info",value:function(e){return e?(this._info=e,this):this._info}},{key:"interactionAreas",value:function(e){return e?(this._interactionAreas=e,this):this._interactionAreas}},{key:"sourceTransformation",value:function(e){return e?(this._sourceTransformation=e,this):this._sourceTransformation}},{key:"poster",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return this._poster;if(e instanceof a.default)return this._poster=e,this;var n=(0,o.normalizeOptions)(e,t,{tolerateMissingId:!0});return e=n.publicId,t=n.options,e||(e=this.publicId(),t=(0,u.assign)({},t,d.DEFAULT_POSTER_PARAMS)),t.cloudinaryConfig=t.cloudinaryConfig||this.cloudinaryConfig(),this._poster=new a.default(e,t),this}},{key:"contains",value:function(e){return this.generateSources().some((function(t){return(0,o.isSrcEqual)(t,e)}))}},{key:"generateSources",value:function(){var e=this;if(this.isRawUrl){var t=this.sourceTypes().length>1?null:this.sourceTypes()[0];return[this.generateRawSource(this.publicId(),t)]}var n=this.sourceTypes().map((function(t){var n=e.sourceTransformation()[t]||e.transformation(),r=(0,f.normalizeFormat)(t),i=-1!==["mpd","m3u8"].indexOf(r),a={};n&&(a.transformation=(0,h.castArray)(n)),(0,u.assign)(a,{resource_type:"video",format:r});var o=g((0,f.formatToMimeTypeAndTransformation)(t),2),s=o[0],c=o[1];c&&!(0,f.isCodecAlreadyExist)(a.transformation,e._rawTransformation)&&a.transformation.push(c),"auto"===a.format&&delete a.format;var d=e.queryParams()?(0,l.objectToQuerystring)(e.queryParams()):"",p=e.config().url(e.publicId(),a),m=p.indexOf("?")>-1?d.replace("?","&"):d;return{type:s,src:p+m,cldSrc:e,isAdaptive:i,withCredentials:e.withCredentials}}));return"undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))?n.filter((function(e){return'video/mp4; codec="hev1.1.6.L93.B0"'!==e.type})):c.default.browser.IS_ANY_SAFARI?n.filter((function(e){return-1===e.type.indexOf("application/dash+xml")})):n}},{key:"generateRawSource",value:function(e,t){var n=t||e.split(".").pop(),r=!!d.CONTAINER_MIME_TYPES[n];return{type:t=r?d.CONTAINER_MIME_TYPES[n][0]:t?"video/".concat(t):null,src:e,cldSrc:this,isAdaptive:r,withCredentials:this.withCredentials}}},{key:"getInteractionAreas",value:function(){return this._interactionAreas}}])&&v(t.prototype,n),r&&v(t,r),p}(i.default);t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addEventListener=t.elementsCreator=t.createElement=t.wrap=t.styleElement=void 0;var r=n(46),i=n(14);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.wrap=function(e,t){return e.parentNode.insertBefore(t,e),t.appendChild(e),t};var o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&i.setAttribute(a,t[a]);return(0,r.castArray)(n).forEach((function(e){return s(e,i)})),i};t.createElement=o;var s=function(e,t){if((0,i.isElement)(e))t.appendChild(e);else if(e&&"object"!==a(e)){var n=document.createTextNode(e);t.appendChild(n)}},u=function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e.style[n]=t[n]);return e};t.styleElement=u;t.elementsCreator=function e(t){var n=Array.isArray(t.children)?t.children.map(e):t.children,r=(0,i.isElement)(t)?t:o(t.tag,t.attr,n);return t.onClick&&(t.event={name:"click",callback:t.onClick}),t.event&&r.addEventListener(t.event.name,t.event.callback,!1),t.style&&u(r,t.style),r};t.addEventListener=function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),function(e){var r=n(155),i=n(156),a=setTimeout;function o(e){return Boolean(e&&void 0!==e.length)}function s(){}function u(e){if(!(this instanceof u))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function l(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,u._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void d(t.promise,e)}c(t.promise,r)}else(1===e._state?c:d)(t.promise,e._value)}))):e._deferreds.push(t)}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof u)return e._state=3,e._value=t,void f(e);if("function"==typeof n)return void p((r=n,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,f(e)}catch(t){d(e,t)}var r,i}function d(e,t){e._state=2,e._value=t,f(e)}function f(e){2===e._state&&0===e._deferreds.length&&u._immediateFn((function(){e._handled||u._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)l(e,e._deferreds[t]);e._deferreds=null}function h(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function p(e,t){var n=!1;try{e((function(e){n||(n=!0,c(t,e))}),(function(e){n||(n=!0,d(t,e))}))}catch(e){if(n)return;n=!0,d(t,e)}}u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){var n=new this.constructor(s);return l(this,new h(e,t,n)),n},u.prototype.finally=r.a,u.all=function(e){return new u((function(t,n){if(!o(e))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var i=r.length;function a(e,o){try{if(o&&("object"==typeof o||"function"==typeof o)){var s=o.then;if("function"==typeof s)return void s.call(o,(function(t){a(e,t)}),n)}r[e]=o,0==--i&&t(r)}catch(e){n(e)}}for(var s=0;s<r.length;s++)a(s,r[s])}))},u.allSettled=i.a,u.resolve=function(e){return e&&"object"==typeof e&&e.constructor===u?e:new u((function(t){t(e)}))},u.reject=function(e){return new u((function(t,n){n(e)}))},u.race=function(e){return new u((function(t,n){if(!o(e))return n(new TypeError("Promise.race accepts an array"));for(var r=0,i=e.length;r<i;r++)u.resolve(e[r]).then(t,n)}))},u._immediateFn="function"==typeof e&&function(t){e(t)}||function(e){a(e,0)},u._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console},t.default=u}.call(this,n(98).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setSkinClassPrefix=t.skinClass=t.skinClassPrefix=t.playerClassPrefix=t.CLASS_PREFIX=void 0;var r,i=n(50),a=(r=n(67))&&r.__esModule?r:{default:r},o=n(30);var s="cld-video-player";t.CLASS_PREFIX=s;var u="".concat(s,"-skin-");t.playerClassPrefix=function(e){return"".concat(s,"-").concat(e.id_)};var l=function(e){return"".concat(u).concat(e)};t.skinClass=l;var c=function(e){return(0,o.find)(e.el().classList,(function(e){return(0,i.startsWith)(e,u)}))};t.skinClassPrefix=c;t.setSkinClassPrefix=function(e,t){var n=c(e),r=!!t&&t.replace(u,""),i="";(i=r?l(r):e.options_.skin?l(e.options_.skin):l(a.default.skin))!==n&&(n&&e.removeClass(n),e.addClass(i)),r&&e.options_.skin!==r&&(e.options_.skin=r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(182))&&r.__esModule?r:{default:r},a=n(37);var o={logoOnclickUrl:"https://cloudinary.com/",showLogo:!0,showJumpControls:!1,skin:"dark",controls:!1,controlBar:{pictureInPictureToggle:!1},preload:a.PRELOAD.AUTO,loop:!1,muted:!1,posterOptions:{},sourceTypes:["webm/vp9","mp4/h265","mp4"],contextMenu:{content:i.default},floatingWhenNotVisible:a.FLOATING_TO.NONE,hideContextMenu:!1,analytics:!1,playedEventPercents:[25,50,75,100]};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objectToQuerystring=void 0;t.objectToQuerystring=function(e){var t=Object.keys(e);if(!t.length)return"";var n=t.map((function(t){return"".concat(t,"=").concat(e[t])})).join("&");return"?".concat(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(6)),i=f(n(1)),a=f(n(211)),o=f(n(71)),s=f(n(232)),u=f(n(233)),l=f(n(9)),c=f(n(10)),d=n(23);function f(e){return e&&e.__esModule?e:{default:e}}function h(){var e=this.context,t=void 0,n=void 0,i=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0,b=void 0,E=void 0,S=void 0,A=void 0,C=void 0,w=void 0,I=void 0,R=void 0,O=void 0;function P(e){void 0===O&&null!==e.fromStreamInfo&&(O=this.getCurrentTrackIdx())}function D(){void 0===O&&(O=this.getCurrentTrackIdx())}function M(){void 0!==O&&(this.setTextTrack(O),O=void 0)}function N(e){var t=this,n=e.tracks,r=e.index;b&&n.some((function(e,n){if(p.matchSettings(b,e))return t.setTextTrack(n),r=n,!0})),(!1===A||void 0===A&&!b||R)&&this.setTextTrack(-1),S=r,T.trigger(c.default.TEXT_TRACKS_ADDED,{enabled:k(),index:r,tracks:n}),I=!0}function L(e){if(!E&&e&&e.newMediaInfo){var t=e.newMediaInfo;t.type===r.default.FRAGMENTED_TEXT&&(b={lang:t.lang,role:t.roles[0],accessibility:t.accessibility[0]})}}function k(){var e=!0;return C&&!w&&(e=!1),e}function x(){C=!0,I=!1,R=!1}return t={setConfig:function(e){e&&(e.errHandler&&(i=e.errHandler),e.adapter&&(f=e.adapter),e.manifestModel&&(h=e.manifestModel),e.mediaController&&(p=e.mediaController),e.videoModel&&(g=e.videoModel),e.streamController&&(m=e.streamController),e.textTracks&&(y=e.textTracks),e.vttParser&&(v=e.vttParser),e.ttmlParser&&(_=e.ttmlParser),n.setConfig({errHandler:i,adapter:f,manifestModel:h,mediaController:p,videoModel:g,streamController:m,textTracks:y,vttParser:v,ttmlParser:_}))},getTextSourceBuffer:function(){return n},getAllTracksAreDisabled:function(){return C},addEmbeddedTrack:function(e){n.addEmbeddedTrack(e)},getTextDefaultLanguage:function(){return b&&b.lang||""},setTextDefaultLanguage:function(e){(0,d.checkParameterType)(e,"string"),b||(b={}),b.lang=e,E=!0},setTextDefaultEnabled:function(e){(0,d.checkParameterType)(e,"boolean"),(A=e)?C=!1:this.setTextTrack(-1)},getTextDefaultEnabled:function(){return void 0!==A&&A},setInitialSettings:function(e){b=e,E=!0},enableText:function(e){(0,d.checkParameterType)(e,"boolean"),!A&&e&&(A=!0),k()!==e&&(e&&this.setTextTrack(S),e||(S=this.getCurrentTrackIdx(),I?this.setTextTrack(-1):R=!0))},isTextEnabled:k,setTextTrack:function(e){var t=n.getConfig(),i=t.fragmentModel,a=t.fragmentedTracks,o=t.videoModel,s=void 0,u=void 0;C=-1===e;var l=y.getCurrentTrackIdx();if(l!==e){C&&p&&p.saveTextSettingsDisabled(),y.setModeForTrackIdx(l,r.default.TEXT_HIDDEN),y.setCurrentTrackIdx(e),y.setModeForTrackIdx(e,r.default.TEXT_SHOWING);var c=y.getCurrentTrackInfo();if(c&&c.isFragmented&&!c.isEmbedded)for(var d=0;d<a.length;d++){var f=a[d];if(c.lang===f.lang&&c.index===f.index&&(f.id?c.id===f.id:c.id===f.index))if(f!==p.getCurrentTrackFor(r.default.FRAGMENTED_TEXT,m.getActiveStreamInfo()))i.abortRequests(),i.removeExecutedRequestsBeforeTime(),n.remove(),y.deleteCuesFromTrackIdx(l),p.setTrack(f),n.setCurrentFragmentedTrackIdx(d);else if(-1===l){for(var h=m.getActiveStreamProcessors(),g=0;g<h.length;g++)if(h[g].getType()===r.default.FRAGMENTED_TEXT){u=h[g];break}u.setBufferingTime(o.getTime()),u.getScheduleController().start()}}else if(c&&!c.isFragmented){for(var v=m.getActiveStreamProcessors(),_=0;_<v.length;_++)if(v[_].getType()===r.default.TEXT){s=(u=v[_]).getMediaInfoArr();break}if(u&&s)for(var T=0;T<s.length;T++)if(s[T].index===c.index&&s[T].lang===c.lang){u.selectMediaInfo(s[T]);break}}}},getCurrentTrackIdx:function(){return y.getCurrentTrackIdx()},enableForcedTextStreaming:function(e){(0,d.checkParameterType)(e,"boolean"),w=e},reset:function(){x(),n.resetEmbedded(),n.reset()}},b=null,S=-1,w=!1,I=!1,E=!1,R=!1,y=(0,o.default)(e).getInstance(),v=(0,s.default)(e).getInstance(),_=(0,u.default)(e).getInstance(),n=(0,a.default)(e).getInstance(),T=(0,l.default)(e).getInstance(),y.initialize(),T.on(c.default.TEXT_TRACKS_QUEUE_INITIALIZED,N,t),T.on(c.default.CURRENT_TRACK_CHANGED,L,t),T.on(c.default.PERIOD_SWITCH_STARTED,P,t),T.on(c.default.STREAM_COMPLETED,D,t),T.on(c.default.PERIOD_SWITCH_COMPLETED,M,t),x(),t}h.__dashjs_factory_name="TextController",t.default=i.default.getSingletonFactory(h)},function(e,t,n){var r={parseBuffer:function(e){return new i(e).parse()},addBoxProcessor:function(e,t){"string"==typeof e&&"function"==typeof t&&(a.prototype._boxProcessors[e]=t)},createFile:function(){return new i},createBox:function(e,t,n){var r=a.create(e);return t&&t.append(r,n),r},createFullBox:function(e,t,n){var i=r.createBox(e,t,n);return i.version=0,i.flags=0,i},Utils:{}};r.Utils.dataViewToString=function(e,t){var n=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(e);var r=[],i=0;if("utf-8"===n)for(;i<e.byteLength;){var a=e.getUint8(i++);a<128||(a<224?(a=(31&a)<<6,a|=63&e.getUint8(i++)):a<240?(a=(15&a)<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++)):(a=(7&a)<<18,a|=(63&e.getUint8(i++))<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++))),r.push(String.fromCharCode(a))}else for(;i<e.byteLength;)r.push(String.fromCharCode(e.getUint8(i++)));return r.join("")},r.Utils.utf8ToByteArray=function(e){var t,n;if("undefined"!=typeof TextEncoder)t=(new TextEncoder).encode(e);else for(t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},r.Utils.appendBox=function(e,t,n){if(t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,-1!==n)if(null!=n){var r,i=-1;if("number"==typeof n)i=n;else{if("string"==typeof n)r=n;else{if("object"!=typeof n||!n.type)return void e.boxes.push(t);r=n.type}for(var a=0;a<e.boxes.length;a++)if(r===e.boxes[a].type){i=a+1;break}}e.boxes.splice(i,0,t)}else e.boxes.push(t)},t.parseBuffer=r.parseBuffer,t.addBoxProcessor=r.addBoxProcessor,t.createFile=r.createFile,t.createBox=r.createBox,t.createFullBox=r.createFullBox,t.Utils=r.Utils,r.Cursor=function(e){this.offset=void 0===e?0:e};var i=function(e){this._cursor=new r.Cursor,this.boxes=[],e&&(this._raw=new DataView(e))};i.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},i.prototype.fetchAll=function(e,t){var n=[];return i._sweep.call(this,e,n,t),n},i.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=a.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},i._sweep=function(e,t,n){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&n)return;i._sweep.call(this.boxes[r],e,t,n)}},i.prototype.write=function(){var e,t=0;for(e=0;e<this.boxes.length;e++)t+=this.boxes[e].getLength(!1);var n=new Uint8Array(t);for(this._rawo=new DataView(n.buffer),this.bytes=n,this._cursor.offset=0,e=0;e<this.boxes.length;e++)this.boxes[e].write();return n.buffer},i.prototype.append=function(e,t){r.Utils.appendBox(this,e,t)};var a=function(){this._cursor=new r.Cursor};a.parse=function(e){var t=new a;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},a.create=function(e){var t=new a;return t.type=e,t.boxes=[],t},a.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],a.prototype._boxProcessors={},a.prototype._procField=function(e,t,n){this._parsing?this[e]=this._readField(t,n):this._writeField(t,n,this[e])},a.prototype._procFieldArray=function(e,t,n,r){var i;if(this._parsing)for(this[e]=[],i=0;i<t;i++)this[e][i]=this._readField(n,r);else for(i=0;i<this[e].length;i++)this._writeField(n,r,this[e][i])},a.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},a.prototype._procEntries=function(e,t,n){var r;if(this._parsing)for(this[e]=[],r=0;r<t;r++)this[e].push({}),n.call(this,this[e][r]);else for(r=0;r<t;r++)n.call(this,this[e][r])},a.prototype._procSubEntries=function(e,t,n,r){var i;if(this._parsing)for(e[t]=[],i=0;i<n;i++)e[t].push({}),r.call(this,e[t][i]);else for(i=0;i<n;i++)r.call(this,e[t][i])},a.prototype._procEntryField=function(e,t,n,r){this._parsing?e[t]=this._readField(n,r):this._writeField(n,r,e[t])},a.prototype._procSubBoxes=function(e,t){var n;if(this._parsing)for(this[e]=[],n=0;n<t;n++)this[e].push(a.parse(this));else for(n=0;n<t;n++)this._rawo?this[e][n].write():this.size+=this[e][n].getLength()},a.prototype._readField=function(e,t){switch(e){case"uint":return this._readUint(t);case"int":return this._readInt(t);case"template":return this._readTemplate(t);case"string":return-1===t?this._readTerminatedString():this._readString(t);case"data":return this._readData(t);case"utf8":return this._readUTF8String();default:return-1}},a.prototype._readInt=function(e){var t=null,n=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:t=this._raw.getInt8(n);break;case 16:t=this._raw.getInt16(n);break;case 32:t=this._raw.getInt32(n);break;case 64:var r=this._raw.getInt32(n),i=this._raw.getInt32(n+4);t=r*Math.pow(2,32)+i}return this._cursor.offset+=e>>3,t},a.prototype._readUint=function(e){var t,n,r=null,i=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:r=this._raw.getUint8(i);break;case 16:r=this._raw.getUint16(i);break;case 24:r=((t=this._raw.getUint16(i))<<8)+(n=this._raw.getUint8(i+2));break;case 32:r=this._raw.getUint32(i);break;case 64:t=this._raw.getUint32(i),n=this._raw.getUint32(i+4),r=t*Math.pow(2,32)+n}return this._cursor.offset+=e>>3,r},a.prototype._readString=function(e){for(var t="",n=0;n<e;n++){var r=this._readUint(8);t+=String.fromCharCode(r)}return t},a.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},a.prototype._readTerminatedString=function(){for(var e="";this._cursor.offset-this._offset<this._raw.byteLength;){var t=this._readUint(8);if(0===t)break;e+=String.fromCharCode(t)}return e},a.prototype._readData=function(e){var t=e>0?e:this._raw.byteLength-(this._cursor.offset-this._offset);if(t>0){var n=new Uint8Array(this._raw.buffer,this._cursor.offset,t);return this._cursor.offset+=t,n}return null},a.prototype._readUTF8String=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;return e>0&&(t=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=e),t?r.Utils.dataViewToString(t):t},a.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset+8);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},a.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},a.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(a.parse(this))},a.prototype.append=function(e,t){r.Utils.appendBox(this,e,t)},a.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.size+=this.boxes[e].getLength();return this._data&&this._writeData(this._data),this.size},a.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.boxes[e].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},a.prototype._writeInt=function(e,t){if(this._rawo){var n=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setInt8(n,t);break;case 16:this._rawo.setInt16(n,t);break;case 32:this._rawo.setInt32(n,t);break;case 64:var r=Math.floor(t/Math.pow(2,32)),i=t-r*Math.pow(2,32);this._rawo.setUint32(n,r),this._rawo.setUint32(n+4,i)}this._cursor.offset+=e>>3}else this.size+=e>>3},a.prototype._writeUint=function(e,t){if(this._rawo){var n,r,i=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setUint8(i,t);break;case 16:this._rawo.setUint16(i,t);break;case 24:n=(16776960&t)>>8,r=255&t,this._rawo.setUint16(i,n),this._rawo.setUint8(i+2,r);break;case 32:this._rawo.setUint32(i,t);break;case 64:r=t-(n=Math.floor(t/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(i,n),this._rawo.setUint32(i+4,r)}this._cursor.offset+=e>>3}else this.size+=e>>3},a.prototype._writeString=function(e,t){for(var n=0;n<e;n++)this._writeUint(8,t.charCodeAt(n))},a.prototype._writeTerminatedString=function(e){if(0!==e.length){for(var t=0;t<e.length;t++)this._writeUint(8,e.charCodeAt(t));this._writeUint(8,0)}},a.prototype._writeTemplate=function(e,t){var n=Math.floor(t),r=(t-n)*Math.pow(2,e/2);this._writeUint(e/2,n),this._writeUint(e/2,r)},a.prototype._writeData=function(e){if(e)if(this._rawo){if(e instanceof Array){for(var t=this._cursor.offset-this._rawo.byteOffset,n=0;n<e.length;n++)this._rawo.setInt8(t+n,e[n]);this._cursor.offset+=e.length}e instanceof Uint8Array&&(this._root.bytes.set(e,this._cursor.offset),this._cursor.offset+=e.length)}else this.size+=e.length},a.prototype._writeUTF8String=function(e){var t=r.Utils.utf8ToByteArray(e);if(this._rawo)for(var n=new DataView(this._rawo.buffer,this._cursor.offset,t.length),i=0;i<t.length;i++)n.setUint8(i,t[i]);else this.size+=t.length},a.prototype._writeField=function(e,t,n){switch(e){case"uint":this._writeUint(t,n);break;case"int":this._writeInt(t,n);break;case"template":this._writeTemplate(t,n);break;case"string":-1==t?this._writeTerminatedString(n):this._writeString(t,n);break;case"data":this._writeData(n);break;case"utf8":this._writeUTF8String(n)}},a.prototype._boxProcessors.avc1=a.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},a.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},a.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"segment_duration","uint",1===this.version?64:32),this._procEntryField(e,"media_time","int",1===this.version?64:32),this._procEntryField(e,"media_rate_integer","int",16),this._procEntryField(e,"media_rate_fraction","int",16)}))},a.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},a.prototype._boxProcessors.free=a.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},a.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},a.prototype._boxProcessors.ftyp=a.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var e=-1;this._parsing&&(e=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",e,"string",4)},a.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},a.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},a.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},a.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},a.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},a.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},a.prototype._boxProcessors.mp4a=a.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},a.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},a.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},a.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},a.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},a.prototype._boxProcessors.sdtp=function(){this._procFullBox();var e=-1;this._parsing&&(e=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",e,"uint",8)},a.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,(function(e){this._parsing||(e.reference=(1&e.reference_type)<<31,e.reference|=2147483647&e.referenced_size,e.sap=(1&e.starts_with_SAP)<<31,e.sap|=(3&e.SAP_type)<<28,e.sap|=268435455&e.SAP_delta_time),this._procEntryField(e,"reference","uint",32),this._procEntryField(e,"subsegment_duration","uint",32),this._procEntryField(e,"sap","uint",32),this._parsing&&(e.reference_type=e.reference>>31&1,e.referenced_size=2147483647&e.reference,e.starts_with_SAP=e.sap>>31&1,e.SAP_type=e.sap>>28&7,e.SAP_delta_time=268435455&e.sap)}))},a.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},a.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(e){this._procEntryField(e,"ranges_count","uint",32),this._procSubEntries(e,"ranges",e.ranges_count,(function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)}))}))},a.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},a.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_delta","uint",32),this._procEntryField(e,"subsample_count","uint",16),this._procSubEntries(e,"subsamples",e.subsample_count,(function(e){this._procEntryField(e,"subsample_size","uint",1===this.version?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)}))}))},a.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},a.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},a.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},a.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,(function(e){this._procEntryField(e,"time","uint",1===this.version?64:32),this._procEntryField(e,"moof_offset","uint",1===this.version?64:32),this._procEntryField(e,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(e,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(e,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},a.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},a.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},a.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,(function(e){256&this.flags&&this._procEntryField(e,"sample_duration","uint",32),512&this.flags&&this._procEntryField(e,"sample_size","uint",32),1024&this.flags&&this._procEntryField(e,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(e,"sample_composition_time_offset",1===this.version?"int":"uint",32)}))},a.prototype._boxProcessors["url "]=a.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},a.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},a.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},a.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},a.prototype._boxProcessors.vtte=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(6)),i=c(n(9)),a=c(n(10)),o=c(n(1)),s=c(n(8)),u=n(114),l=n(23);function c(e){return e&&e.__esModule?e:{default:e}}function d(){var e=this.context,t=(0,i.default)(e).getInstance(),n=void 0,o=void 0,c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0,b=void 0,E=void 0,S=void 0,A=void 0,C=void 0;function w(e){var t=f[e].kind,n=void 0!==f[e].id?f[e].id:f[e].lang,r=f[e].lang,i=f[e].isTTML,a=f[e].isEmbedded;return d.addTextTrack(t,n,r,i,a)}function I(e,t,n,r,i,a){var o=0,s=0;e/t>n/r?o=(s=t)/r*n:s=(o=e)/n*r;var u,l,c=0,d=0;return o/s>i?(d=s,c=s*i):(c=o,d=o/i),u=(e-c)/2,l=(t-d)/2,a?{x:u+.1*c,y:l+.1*d,w:.8*c,h:.8*d}:{x:u,y:l,w:c,h:d}}function R(e,n){var r=d.getClientWidth(),i=d.getClientHeight(),o=d.getVideoWidth(),s=d.getVideoHeight(),u=d.getVideoRelativeOffsetTop(),l=d.getVideoRelativeOffsetLeft();if(0!==o&&0!==s){var c=o/s,f=!1;e.isFromCEA608&&(c=3.5/3,f=!0);var h=I.call(this,r,i,o,s,c,f),p=h.w,T=h.h,S=h.x,C=h.y;if(p!=y||T!=v||S!=g||C!=m||n){if(g=S+l,m=C+u,y=p,v=T,_){var w=_.style;w&&(w.left=g+"px",w.top=m+"px",w.width=y+"px",w.height=v+"px",w.zIndex=b&&document[b]||E?A:null,t.trigger(a.default.CAPTION_CONTAINER_RESIZE))}var R=e.activeCues;if(R)for(var O=R.length,P=0;P<O;++P){var D=R[P];D.scaleCue(D)}}}}function O(e){var t=y,n=v,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0;if(e.cellResolution){var u=[t/e.cellResolution[0],n/e.cellResolution[1]];if(e.linePadding)for(r in e.linePadding)if(e.linePadding.hasOwnProperty(r)){i=(e.linePadding[r]*u[0]).toString();for(var l=document.getElementsByClassName("spanPadding"),c=0;c<l.length;c++)l[c].style.cssText=l[c].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i),l[c].style.cssText=l[c].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i)}if(e.fontSize){for(r in e.fontSize)if(e.fontSize.hasOwnProperty(r)){"%"===e.fontSize[r][0]?a=e.fontSize[r][1]/100:"c"===e.fontSize[r][0]&&(a=e.fontSize[r][1]),i=(a*u[1]).toString(),s="defaultFontSize"!==r?document.getElementsByClassName(r):document.getElementsByClassName("paragraph");for(var d=0;d<s.length;d++)s[d].style.cssText=s[d].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i)}if(e.lineHeight)for(r in e.lineHeight)if(e.lineHeight.hasOwnProperty(r)){"%"===e.lineHeight[r][0]?o=e.lineHeight[r][1]/100:"c"===e.fontSize[r][0]&&(o=e.lineHeight[r][1]),i=(o*u[1]).toString(),s=document.getElementsByClassName(r);for(var f=0;f<s.length;f++)s[f].style.cssText=s[f].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i)}}}if(e.isd){var h=document.getElementById(e.cueID);h&&_.removeChild(h),P(e)}}function P(e){if(_){var n=document.createElement("div");_.appendChild(n),S=(0,u.renderHTML)(e.isd,n,(function(t){var n=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,r=/^#(.*)$/;if(n.test(t)){var i=n.exec(t),a=parseInt(i[4],10)-1;return"data:image/png;base64,"+btoa(e.images[a])}if(r.test(t)){var o=r.exec(t)[1];return"data:image/png;base64,"+e.embeddedImages[o]}return null}),_.clientHeight,_.clientWidth,!1,(function(e){o.info("renderCaption :",e)}),S,!0),n.id=e.cueID,t.trigger(a.default.CAPTION_RENDERED,{captionDiv:n,currentTrackIdx:p})}}function D(e){return e>=0&&f[e]?d.getTextTrack(f[e].kind,f[e].id,f[e].lang,f[e].isTTML,f[e].isEmbedded):null}function M(e){var t=this;if(e!==p){var n=D(p=e);N.call(this,n),T&&(clearInterval(T),T=null),n&&"html"===n.renderingType&&(R.call(this,n,!0),window.ResizeObserver?(C=new window.ResizeObserver((function(){R.call(t,n,!0)}))).observe(d.getElement()):T=setInterval(R.bind(this,n),500))}}function N(e){U.call(this),e&&"html"===e.renderingType?x.call(this):F.call(this)}function L(e,t,n){return(isNaN(t)||e.startTime>=t)&&(isNaN(n)||e.endTime<=n)}function k(e,t,n){if(e.cues)for(var r=e.cues,i=r.length-1;i>=0;i--)L(r[i],t,n)&&e.removeCue(r[i])}function x(){var e=document.getElementById("native-cue-style");if(!e){(e=document.createElement("style")).id="native-cue-style",document.head.appendChild(e);var t=e.sheet,n=d.getElement();try{n&&(n.id?t.insertRule("#"+n.id+"::cue {background: transparent}",0):0!==n.classList.length?t.insertRule("."+n.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0))}catch(e){o.info(""+e.message)}}}function F(){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}function U(){if(_)for(;_.firstChild;)_.removeChild(_.firstChild)}return n={initialize:function(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(c=window.VTTCue||window.TextTrackCue,f=[],h=[],p=-1,g=0,m=0,y=0,v=0,_=null,T=null,E=!1,A=2147483647,S=null,void 0!==document.fullscreenElement?b="fullscreenElement":void 0!==document.webkitIsFullScreen?b="webkitIsFullScreen":document.msFullscreenElement?b="msFullscreenElement":document.mozFullScreen&&(b="mozFullScreen"))},setDisplayCConTop:function(e){(0,l.checkParameterType)(e,"boolean"),E=e,_&&!document[b]&&(_.style.zIndex=e?A:null)},addTextTrack:function(e,n){if(f.length!==n){if(f.push(e),f.length===n){f.sort((function(e,t){return e.index-t.index})),_=d.getTTMLRenderingDiv();for(var i=-1,s=0;s<f.length;s++){var u=w.call(this,s);h.push(u),f[s].defaultTrack&&(u.default=!0,i=s);var l=D(s);l&&(l.mode=r.default.TEXT_SHOWING,_&&(f[s].isTTML||f[s].isEmbedded)?l.renderingType="html":l.renderingType="default"),this.addCaptions(s,0,f[s].captionData),t.trigger(a.default.TEXT_TRACK_ADDED)}if(M.call(this,i),i>=0){t.on(a.default.PLAYBACK_METADATA_LOADED,(function e(){var n=D(i);n&&R.call(this,n,!0),t.off(a.default.PLAYBACK_METADATA_LOADED,e,this)}),this);for(var c=0;c<f.length;c++){var g=D(c);g&&(g.mode=c===i?r.default.TEXT_SHOWING:r.default.TEXT_HIDDEN)}}t.trigger(a.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:p,tracks:f})}}else o.error("Trying to add too many tracks.")},addCaptions:function(e,n,i){var s=D(e),u=this;if(s&&Array.isArray(i)&&0!==i.length)for(var l=0;l<i.length;l++){var d=void 0,f=i[l];s.cellResolution=f.cellResolution,s.isFromCEA608=f.isFromCEA608,"html"===f.type&&_?((d=new c(f.start-n,f.end-n,"")).cueHTMLElement=f.cueHTMLElement,d.isd=f.isd,d.images=f.images,d.embeddedImages=f.embeddedImages,d.cueID=f.cueID,d.scaleCue=O.bind(u),d.cellResolution=f.cellResolution,d.lineHeight=f.lineHeight,d.linePadding=f.linePadding,d.fontSize=f.fontSize,_.style.left=g+"px",_.style.top=m+"px",_.style.width=y+"px",_.style.height=v+"px",d.onenter=function(){s.mode===r.default.TEXT_SHOWING&&(this.isd?(P(this),o.debug("Cue enter id:"+this.cueID)):(_.appendChild(this.cueHTMLElement),O.call(u,this),t.trigger(a.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:p})))},d.onexit=function(){if(_)for(var e=_.childNodes,t=0;t<e.length;++t)e[t].id===this.cueID&&(o.debug("Cue exit id:"+e[t].id),_.removeChild(e[t]),--t)}):f.data&&(d=new c(f.start-n,f.end-n,f.data),f.styles&&(void 0!==f.styles.align&&"align"in d&&(d.align=f.styles.align),void 0!==f.styles.line&&"line"in d&&(d.line=f.styles.line),void 0!==f.styles.position&&"position"in d&&(d.position=f.styles.position),void 0!==f.styles.size&&"size"in d&&(d.size=f.styles.size)),d.onenter=function(){s.mode===r.default.TEXT_SHOWING&&t.trigger(a.default.CAPTION_RENDERED,{currentTrackIdx:p})});try{d?s.addCue(d):o.error("impossible to display subtitles.")}catch(e){throw k(s),s.addCue(d),e}}},getCurrentTrackIdx:function(){return p},setCurrentTrackIdx:M,getTrackIdxForId:function(e){for(var t=-1,n=0;n<f.length;n++)if(f[n].id===e){t=n;break}return t},getCurrentTrackInfo:function(){return f[p]},setModeForTrackIdx:function(e,t){var n=D(e);n&&n.mode!==t&&(n.mode=t)},deleteCuesFromTrackIdx:function(e,t,n){var r=D(e);r&&k(r,t,n)},deleteAllTextTracks:function(){for(var e=h?h.length:0,t=0;t<e;t++){var n=D(t);n&&(k.call(this,n),n.mode="disabled")}h=[],f=[],T&&(clearInterval(T),T=null),C&&d&&(C.unobserve(d.getElement()),C=null),p=-1,U.call(this)},deleteTextTrack:function(e){d.removeChild(h[e]),h.splice(e,1)},setConfig:function(e){e&&e.videoModel&&(d=e.videoModel)}},o=(0,s.default)(e).getInstance().getLogger(n),n}d.__dashjs_factory_name="TextTracks",t.default=o.default.getSingletonFactory(d)},function(e,t,n){!function(e,t,n){function r(e,t,n,r,i,a,o,s){this.name=t,this.ns=e,this.qname=e+" "+t,this.inherit=i,this.animatable=a,this.initial=n,this.applies=r,this.parse=o,this.compute=s}for(var i in e.all=[new r(t.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,n.parseColor,null),new r(t.ns_tts,"color","white",["span"],!0,!0,n.parseColor,null),new r(t.ns_tts,"direction","ltr",["p","span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"displayAlign","before",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"extent","auto",["tt","region"],!1,!0,(function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var r=n.parseLength(t[0]),i=n.parseLength(t[1]);return i&&r?{h:i,w:r}:null}),(function(e,t,r,i,a){var o,s;if("auto"===i)o=new n.ComputedLength(0,1);else if(null===(o=n.toComputedLength(i.h.value,i.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(1,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}})),new r(t.ns_tts,"fontFamily","default",["span"],!0,!0,(function(e){var t=e.split(","),n=[];for(var r in t)"'"!==t[r].charAt(0)&&'"'!==t[r].charAt(0)&&"default"===t[r]?n.push("monospaceSerif"):n.push(t[r]);return n}),null),new r(t.ns_tts,"shear","0%",["p"],!0,!0,n.parseLength,(function(e,t,n,r){return"%"!==r.unit?null:Math.abs(r.value)>100?100*Math.sign(r.value):r.value})),new r(t.ns_tts,"fontSize","1c",["span"],!0,!0,n.parseLength,(function(t,r,i,a,o){return n.toComputedLength(a.value,a.unit,null!==r?r.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,null!==r?r.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,t.cellLength.h,t.pxLength.h)})),new r(t.ns_tts,"fontStyle","normal",["span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"fontWeight","normal",["span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"lineHeight","normal",["p"],!0,!0,(function(e){return"normal"===e?e:n.parseLength(e)}),(function(t,r,i,a,o){var s;if("normal"===a)s=a;else if(null===(s=n.toComputedLength(a.value,a.unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h)))return null;return s})),new r(t.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new r(t.ns_tts,"origin","auto",["region"],!1,!0,(function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var r=n.parseLength(t[0]),i=n.parseLength(t[1]);return i&&r?{h:i,w:r}:null}),(function(e,t,r,i,a){var o,s;if("auto"===i)o=new n.ComputedLength(0,0);else if(null===(o=n.toComputedLength(i.h.value,i.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(0,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}})),new r(t.ns_tts,"overflow","hidden",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"padding","0px",["region"],!1,!0,(function(e){var t=e.split(" ");if(t.length>4)return null;var r=[];for(var i in t){var a=n.parseLength(t[i]);if(!a)return null;r.push(a)}return r}),(function(t,r,i,a,o){var s;if(1===a.length)s=[a[0],a[0],a[0],a[0]];else if(2===a.length)s=[a[0],a[1],a[0],a[1]];else if(3===a.length)s=[a[0],a[1],a[2],a[1]];else{if(4!==a.length)return null;s=[a[0],a[1],a[2],a[3]]}var u=i.styleAttrs[e.byName.writingMode.qname];if("lrtb"===u||"lr"===u)s=[s[0],s[3],s[2],s[1]];else if("rltb"===u||"rl"===u)s=[s[0],s[1],s[2],s[3]];else if("tblr"===u)s=[s[3],s[0],s[1],s[2]];else{if("tbrl"!==u&&"tb"!==u)return null;s=[s[3],s[2],s[1],s[0]]}var l=[];for(var c in s)if(0===s[c].value)l[c]=new n.ComputedLength(0,0);else if(l[c]=n.toComputedLength(s[c].value,s[c].unit,i.styleAttrs[e.byName.fontSize.qname],"0"===c||"2"===c?i.styleAttrs[e.byName.extent.qname].h:i.styleAttrs[e.byName.extent.qname].w,"0"===c||"2"===c?t.cellLength.h:t.cellLength.w,"0"===c||"2"===c?t.pxLength.h:t.pxLength.w),null===l[c])return null;return l})),new r(t.ns_tts,"position","top left",["region"],!1,!0,(function(e){return n.parsePosition(e)}),(function(t,r,i,a){var o,s;return null===(o=n.toComputedLength(a.v.offset.value,a.v.offset.unit,null,new n.ComputedLength(-i.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-i.styleAttrs[e.byName.extent.qname].h.rh),null,t.pxLength.h))?null:("bottom"===a.v.edge&&(o=new n.ComputedLength(-o.rw-i.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-o.rh-i.styleAttrs[e.byName.extent.qname].h.rh)),s=n.toComputedLength(a.h.offset.value,a.h.offset.unit,null,new n.ComputedLength(t.dimensions.w.rw-i.styleAttrs[e.byName.extent.qname].w.rw,-i.styleAttrs[e.byName.extent.qname].w.rh),null,t.pxLength.w),null===o?null:("right"===a.h.edge&&(s=new n.ComputedLength(t.dimensions.w.rw-s.rw-i.styleAttrs[e.byName.extent.qname].w.rw,-s.rh-i.styleAttrs[e.byName.extent.qname].w.rh)),{h:o,w:s}))})),new r(t.ns_tts,"ruby","none",["span"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"rubyAlign","center",["span"],!0,!0,(function(e){return"center"!==e&&"spaceAround"!==e?null:e}),null),new r(t.ns_tts,"rubyPosition","outside",["span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"rubyReserve","none",["p"],!0,!0,(function(e){var t=e.split(" "),r=[null,null];if(0===t.length||t.length>2)return null;if("none"!==t[0]&&"both"!==t[0]&&"after"!==t[0]&&"before"!==t[0]&&"outside"!==t[0])return null;if(r[0]=t[0],2===t.length&&"none"!==t[0]){var i=n.parseLength(t[1]);if(!i)return null;r[1]=i}return r}),(function(t,r,i,a,o){if("none"===a[0])return a;var s=null;return null===(s=null===a[1]?new n.ComputedLength(.5*i.styleAttrs[e.byName.fontSize.qname].rw,.5*i.styleAttrs[e.byName.fontSize.qname].rh):n.toComputedLength(a[1].value,a[1].unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h))?null:[a[0],s]})),new r(t.ns_tts,"showBackground","always",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"textAlign","start",["p"],!0,!0,(function(e){return e}),(function(e,t,n,r,i){return"left"===r?"start":"right"===r?"end":r})),new r(t.ns_tts,"textCombine","none",["span"],!0,!0,(function(e){var t=e.split(" ");return 1!==t.length||"none"!==t[0]&&"all"!==t[0]?null:[t[0]]}),null),new r(t.ns_tts,"textDecoration","none",["span"],!0,!0,(function(e){return e.split(" ")}),null),new r(t.ns_tts,"textEmphasis","none",["span"],!0,!0,(function(e){var t=e.split(" "),r={style:null,symbol:null,color:null,position:null};for(var i in t)if("none"===t[i]||"auto"===t[i])r.style=t[i];else if("filled"===t[i]||"open"===t[i])r.style=t[i];else if("circle"===t[i]||"dot"===t[i]||"sesame"===t[i])r.symbol=t[i];else if("current"===t[i])r.color=t[i];else if("outside"===t[i]||"before"===t[i]||"after"===t[i])r.position=t[i];else if(r.color=n.parseColor(t[i]),null===r.color)return null;return null==r.style&&null==r.symbol?r.style="auto":(r.symbol=r.symbol||"circle",r.style=r.style||"filled"),r.position=r.position||"outside",r.color=r.color||"current",r}),null),new r(t.ns_tts,"textOutline","none",["span"],!0,!0,(function(e){if("none"===e)return e;var t={},r=e.split(" ");if(0===r.length||r.length>2)return null;var i=n.parseColor(r[0]);if(t.color=i,null!==i&&r.shift(),1!==r.length)return null;var a=n.parseLength(r[0]);return a?(t.thickness=a,t):null}),(function(t,r,i,a,o){if("none"===a)return a;var s={};return null===a.color?s.color=i.styleAttrs[e.byName.color.qname]:s.color=a.color,s.thickness=n.toComputedLength(a.thickness.value,a.thickness.unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h),null===s.thickness?null:s})),new r(t.ns_tts,"textShadow","none",["span"],!0,!0,n.parseTextShadow,(function(t,r,i,a){if("none"===a)return a;var o=[];for(var s in a){var u={};if(u.x_off=n.toComputedLength(a[s][0].value,a[s][0].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.w),null===u.x_off)return null;if(u.y_off=n.toComputedLength(a[s][1].value,a[s][1].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===u.y_off)return null;if(null===a[s][2])u.b_radius=0;else if(u.b_radius=n.toComputedLength(a[s][2].value,a[s][2].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===u.b_radius)return null;null===a[s][3]?u.color=i.styleAttrs[e.byName.color.qname]:u.color=a[s][3],o.push(u)}return o})),new r(t.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"wrapOption","wrap",["span"],!0,!0,(function(e){return e}),null),new r(t.ns_tts,"writingMode","lrtb",["region"],!1,!0,(function(e){return e}),null),new r(t.ns_tts,"zIndex","auto",["region"],!1,!0,(function(e){var t;return"auto"===e?t=e:(t=parseInt(e),isNaN(t)&&(t=null)),t}),null),new r(t.ns_ebutts,"linePadding","0c",["p"],!0,!1,n.parseLength,(function(e,t,r,i,a){return n.toComputedLength(i.value,i.unit,null,null,e.cellLength.w,null)})),new r(t.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,(function(e){return e}),null),new r(t.ns_smpte,"backgroundImage",null,["div"],!1,!1,(function(e){return e}),null),new r(t.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,(function(e){return"true"===e}),null),new r(t.ns_itts,"fillLineGap","false",["p"],!0,!0,(function(e){return"true"===e}),null)],e.byQName={},e.all)e.byQName[e.all[i].qname]=e.all[i];for(var a in e.byName={},e.all)e.byName[e.all[a].name]=e.all[a]}(t,"undefined"==typeof imscNames?n(56):imscNames,"undefined"==typeof imscUtils?n(57):imscUtils)},function(e,t,n){(t=e.exports=n(115)).Stream=t,t.Readable=t,t.Writable=n(75),t.Duplex=n(27),t.Transform=n(118),t.PassThrough=n(225)},function(e,t,n){var r=n(29),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t,r,i){var a=n(59);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=v;var s,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:a.nextTick;v.WritableState=y;var l=Object.create(n(41));l.inherits=n(32);var c={deprecate:n(223)},d=n(116),f=n(74).Buffer,h=i.Uint8Array||function(){};var p,g=n(117);function m(){}function y(e,t){s=s||n(27),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(a.nextTick(i,r),a.nextTick(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),A(e,t))}(e,n,r,t,i);else{var o=E(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||b(e,n),r?u(T,e,n,o,i):T(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function v(e){if(s=s||n(27),!(p.call(v,this)||this instanceof s))return new v(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function _(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function T(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),A(e,t)}function b(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,_(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,d=n.callback;if(_(e,t,!1,t.objectMode?1:l.length,l,c,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var n=E(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}l.inherits(v,d),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===v&&(e&&e._writableState instanceof y)}})):p=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,n){var r,i=this._writableState,o=!1,s=!i.objectMode&&(r=e,f.isBuffer(r)||r instanceof h);return s&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=m),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),a.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),a.nextTick(r,o),i=!1),i}(this,i,e,n))&&(i.pendingcb++,o=function(e,t,n,r,i,a){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,s,r,i,a);return u}(this,i,s,e,t,n)),o},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},v.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,A(e,t),n&&(t.finished?a.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(52),n(98).setImmediate,n(18))},function(e,t,n){"use strict";var r=n(224).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=o(t[r]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=o(t[r]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(){var e={};return{save:function(t){var n=t.streamId,r=t.representationId;e[n]=e[n]||{},e[n][r]=t},extract:function(t,n){return e&&e[t]&&e[t][n]?e[t][n]:null},reset:function(){e={}}}}o.__dashjs_factory_name="InitCache",t.default=a.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.availabilityIdx=NaN,this.wallStartTime=NaN,this.representation=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(){return{modifyRequestURL:function(e){return e},modifyRequestHeader:function(e){return e}}}o.__dashjs_factory_name="RequestModifier",t.default=a.default.getSingletonFactory(o)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(){r(this,e),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};i.INITIAL_PLAYOUT_START_REASON="initial_playout",i.SEEK_START_REASON="seek",i.RESUME_FROM_PAUSE_START_REASON="resume",i.METRICS_COLLECTION_START_REASON="metrics_collection_start";var a=function e(){r(this,e),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};a.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",a.REBUFFERING_REASON="rebuffering",a.USER_REQUEST_STOP_REASON="user_request",a.END_OF_PERIOD_STOP_REASON="end_of_period",a.END_OF_CONTENT_STOP_REASON="end_of_content",a.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",a.FAILURE_STOP_REASON="failure",t.PlayList=i,t.PlayListTrace=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var t=(e=e||{}).requestModifier;return{load:function(e){var n=new Date,r=e.request,i=new XMLHttpRequest;if(i.open(e.method,e.url,!0),r.responseType&&(i.responseType=r.responseType),r.range&&i.setRequestHeader("Range","bytes="+r.range),r.requestStartDate||(r.requestStartDate=n),t&&(i=t.modifyRequestHeader(i)),e.headers)for(var a in e.headers){var o=e.headers[a];o&&i.setRequestHeader(a,o)}i.withCredentials=e.withCredentials,i.onload=e.onload,i.onloadend=e.onend,i.onerror=e.onerror,i.onprogress=e.progress,i.onabort=e.onabort,i.ontimeout=e.ontimeout,i.timeout=e.timeout,i.send(),e.response=i},abort:function(e){var t=e.response;t.onloadend=t.onerror=t.onprogress=void 0,t.abort()}}}o.__dashjs_factory_name="XHRLoader";var s=a.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=T(n(6)),i=T(n(15)),a=T(n(268)),o=T(n(269)),s=T(n(270)),u=T(n(271)),l=T(n(127)),c=T(n(128)),d=T(n(129)),f=T(n(272)),h=T(n(130)),p=T(n(21)),g=T(n(1)),m=T(n(8)),y=T(n(11)),v=T(n(17)),_=n(83);function T(e){return e&&e.__esModule?e:{default:e}}function b(){var e=void 0,t=void 0,n=void 0,g=void 0,T=this.context,b=(0,p.default)(T).getInstance(),E=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function S(e,t){var n=void 0,a=void 0,o=void 0,s=void 0,u=void 0,l=void 0,c=!1,d=!1;if(!e)throw new Error("adaptation is not defined");if(!t)throw new Error("type is not defined");if(e.hasOwnProperty("ContentComponent_asArray")&&(s=e.ContentComponent_asArray),u=t!==r.default.TEXT?new RegExp(t):new RegExp("(vtt|ttml)"),e.Representation_asArray&&e.Representation_asArray.length&&e.Representation_asArray.length>0){var f=L(e.Representation_asArray[0]);if(f&&f.length>0&&_.THUMBNAILS_SCHEME_ID_URIS.indexOf(f[0].schemeIdUri)>=0)return t===r.default.IMAGE;if(e.Representation_asArray[0].hasOwnProperty(i.default.CODECS)&&(0===(l=e.Representation_asArray[0].codecs).search(r.default.STPP)||0===l.search(r.default.WVTT)))return t===r.default.FRAGMENTED_TEXT}if(s){if(s.length>1)return t===r.default.MUXED;s[0]&&s[0].contentType===t&&(c=!0,d=!0)}if(e.hasOwnProperty(i.default.MIME_TYPE)&&(c=u.test(e.mimeType),d=!0),!d)for(n=0,a=e.Representation_asArray&&e.Representation_asArray.length?e.Representation_asArray.length:0;!d&&n<a;)(o=e.Representation_asArray[n]).hasOwnProperty(i.default.MIME_TYPE)&&(c=u.test(o.mimeType),d=!0),n++;return c}function A(e){return S(e,r.default.AUDIO)}function C(e){return S(e,r.default.VIDEO)}function w(e){return S(e,r.default.FRAGMENTED_TEXT)}function I(e){return S(e,r.default.IMAGE)}function R(e){return"text/vtt"===e||"application/ttml+xml"===e}function O(){return function(e,t){return e.bandwidth-t.bandwidth}}function P(e){return e&&Array.isArray(e.Representation_asArray)&&e.Representation_asArray.sort((function(e,t){return e.bandwidth-t.bandwidth})),e}function D(e,t){return e&&e.Period_asArray&&E(t)&&e.Period_asArray[t]?e.Period_asArray[t].AdaptationSet_asArray:[]}function M(e){return e&&e.Period_asArray?e.Period_asArray:[]}function N(e){var t=!1;return e&&e.hasOwnProperty("type")&&(t=e.type===i.default.DYNAMIC),t}function L(e){return e&&e.EssentialProperty_asArray&&e.EssentialProperty_asArray.length?e.EssentialProperty_asArray.map((function(e){return{schemeIdUri:e.schemeIdUri,value:e.value}})):null}function k(e,t){if(!e)throw new Error("Period cannot be null or undefined");var n=s.default.DEFAULT_ID+"_"+t;return e.hasOwnProperty(i.default.ID)&&e.id.length>0&&"__proto__"!==e.id&&(n=e.id),n}function x(e,t){var n=[],a=void 0;if(!e)return n;for(a=0;a<e.length;a++){var o=new f.default;if(o.timescale=1,o.representation=t,!e[a].hasOwnProperty(r.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");o.schemeIdUri=e[a].schemeIdUri,e[a].hasOwnProperty(i.default.TIMESCALE)&&(o.timescale=e[a].timescale),e[a].hasOwnProperty(i.default.VALUE)&&(o.value=e[a].value),n.push(o)}return n}function F(e){var t=[],n=e.BaseURL_asArray||[e.baseUri],r=!1;return n.some((function(n){if(n){var a=new d.default,o=n.__text||n;return b.isRelative(o)&&(r=!0,e.baseUri&&(o=b.resolve(o,e.baseUri))),a.url=o,n.hasOwnProperty(i.default.SERVICE_LOCATION)&&n.serviceLocation.length?a.serviceLocation=n.serviceLocation:a.serviceLocation=o,n.hasOwnProperty(i.default.DVB_PRIORITY)&&(a.dvb_priority=n[i.default.DVB_PRIORITY]),n.hasOwnProperty(i.default.DVB_WEIGHT)&&(a.dvb_weight=n[i.default.DVB_WEIGHT]),n.hasOwnProperty(i.default.AVAILABILITY_TIME_OFFSET)&&(a.availabilityTimeOffset=n[i.default.AVAILABILITY_TIME_OFFSET]),n.hasOwnProperty(i.default.AVAILABILITY_TIME_COMPLETE)&&(a.availabilityTimeComplete="false"!==n[i.default.AVAILABILITY_TIME_COMPLETE]),t.push(a),r}})),t}return e={getIsTypeOf:S,getIsTextTrack:R,getLanguageForAdaptation:function(e){var t="";return e&&e.hasOwnProperty(i.default.LANG)&&(t=e.lang.replace(/[^A-Za-z0-9-]/g,"")),t},getViewpointForAdaptation:function(e){return e&&e.hasOwnProperty(i.default.VIEWPOINT)?e.Viewpoint:null},getRolesForAdaptation:function(e){return e&&e.hasOwnProperty(i.default.ROLE_ASARRAY)?e.Role_asArray:[]},getAccessibilityForAdaptation:function(e){return e&&e.hasOwnProperty(i.default.ACCESSIBILITY_ASARRAY)?e.Accessibility_asArray:[]},getAudioChannelConfigurationForAdaptation:function(e){return e&&e.hasOwnProperty(i.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?e.AudioChannelConfiguration_asArray:[]},getAudioChannelConfigurationForRepresentation:function(e){return e&&e.hasOwnProperty(i.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?e.AudioChannelConfiguration_asArray:[]},getAdaptationForIndex:function(e,t,n){var r=D(t,n);return r.length>0&&E(e)?r[e]:null},getIndexForAdaptation:function(e,t,n){if(!e)return-1;for(var r=D(t,n),i=0;i<r.length;i++){if((0,h.default)(T).getInstance().areEqual(r[i],e))return i}return-1},getAdaptationForId:function(e,t,n){var r,a=D(t,n),o=void 0;for(o=0,r=a.length;o<r;o++)if(a[o].hasOwnProperty(i.default.ID)&&a[o].id===e)return a[o];return null},getAdaptationsForType:function(e,t,n){var r,i=D(e,t),a=void 0,o=[];for(a=0,r=i.length;a<r;a++)S(i[a],n)&&o.push(P(i[a]));return o},getRealPeriods:M,getRealPeriodForIndex:function(e,t){var n=M(t);return n.length>0&&E(e)?n[e]:null},getCodec:function(e,t,n){var r=null;if(e&&e.Representation_asArray&&e.Representation_asArray.length>0){var i=E(t)&&t>=0&&t<e.Representation_asArray.length?e.Representation_asArray[t]:e.Representation_asArray[0];i&&(r=i.mimeType+';codecs="'+i.codecs+'"',n&&void 0!==i.width&&(r+=';width="'+i.width+'";height="'+i.height+'"'))}return r&&(r=r.replace(/\sprofiles=[^;]*/g,"")),r},getMimeType:function(e){return e&&e.Representation_asArray&&e.Representation_asArray.length>0?e.Representation_asArray[0].mimeType:null},getKID:function(e){return e&&e.hasOwnProperty(i.default.CENC_DEFAULT_KID)?e[i.default.CENC_DEFAULT_KID]:null},getLabelsForAdaptation:function(e){if(!e||!Array.isArray(e.Label_asArray))return[];for(var t=[],n=0;n<e.Label_asArray.length;n++)t.push({lang:e.Label_asArray[n].lang,text:e.Label_asArray[n].__text||e.Label_asArray[n]});return t},getContentProtectionData:function(e){return e&&e.hasOwnProperty(i.default.CONTENTPROTECTION_ASARRAY)&&0!==e.ContentProtection_asArray.length?e.ContentProtection_asArray:null},getIsDynamic:N,getId:function(e){return e&&e[i.default.ID]||null},hasProfile:function(e,t){var n=!1;return e&&e.profiles&&e.profiles.length>0&&(n=-1!==e.profiles.indexOf(t)),n},getDuration:function(e){return e&&e.hasOwnProperty(i.default.MEDIA_PRESENTATION_DURATION)?e.mediaPresentationDuration:e&&"dynamic"==e.type?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE},getBandwidth:function(e){return e&&e.bandwidth?e.bandwidth:NaN},getManifestUpdatePeriod:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=NaN;return e&&e.hasOwnProperty(i.default.MINIMUM_UPDATE_PERIOD)&&(n=e.minimumUpdatePeriod),isNaN(n)?n:Math.max(n-t,1)},getPublishTime:function(e){return e&&e.hasOwnProperty(i.default.PUBLISH_TIME)?new Date(e[i.default.PUBLISH_TIME]):null},getRepresentationCount:function(e){return e&&Array.isArray(e.Representation_asArray)?e.Representation_asArray.length:0},getBitrateListForAdaptation:function(e){var t=P(e);return(t&&Array.isArray(t.Representation_asArray)?t.Representation_asArray:[]).map((function(e){return{bandwidth:e.bandwidth,width:e.width||0,height:e.height||0,scanType:e.scanType||null,id:e.id||null}}))},getRepresentationFor:function(e,t){return t&&t.Representation_asArray&&t.Representation_asArray.length>0&&E(e)?t.Representation_asArray[e]:null},getRepresentationsForAdaptation:function(e){var t,n,r,o,s,u=[],l=function(e){if(e&&e.period&&E(e.period.index)){var t=e.period.mpd.manifest.Period_asArray[e.period.index];if(t&&t.AdaptationSet_asArray&&E(e.index))return P(t.AdaptationSet_asArray[e.index])}}(e),c=void 0,d=void 0;if(l&&l.Representation_asArray){if(e&&e.period&&E(e.period.index)){var f=F(e.period.mpd.manifest);f&&(d=f[0])}for(var h=0,p=l.Representation_asArray.length;h<p;++h){var g=l.Representation_asArray[h],m=new a.default;if(m.index=h,m.adaptation=e,g.hasOwnProperty(i.default.ID)&&(m.id=g.id),g.hasOwnProperty(i.default.CODECS)&&(m.codecs=g.codecs),g.hasOwnProperty(i.default.CODEC_PRIVATE_DATA)&&(m.codecPrivateData=g.codecPrivateData),g.hasOwnProperty(i.default.BANDWITH)&&(m.bandwidth=g.bandwidth),g.hasOwnProperty(i.default.WIDTH)&&(m.width=g.width),g.hasOwnProperty(i.default.HEIGHT)&&(m.height=g.height),g.hasOwnProperty(i.default.SCAN_TYPE)&&(m.scanType=g.scanType),g.hasOwnProperty(i.default.MAX_PLAYOUT_RATE)&&(m.maxPlayoutRate=g.maxPlayoutRate),g.hasOwnProperty(i.default.SEGMENT_BASE)?(c=g.SegmentBase,m.segmentInfoType=i.default.SEGMENT_BASE):g.hasOwnProperty(i.default.SEGMENT_LIST)?(c=g.SegmentList).hasOwnProperty(i.default.SEGMENT_TIMELINE)?m.segmentInfoType=i.default.SEGMENT_TIMELINE:m.segmentInfoType=i.default.SEGMENT_LIST:g.hasOwnProperty(i.default.SEGMENT_TEMPLATE)?((c=g.SegmentTemplate).hasOwnProperty(i.default.SEGMENT_TIMELINE)?m.segmentInfoType=i.default.SEGMENT_TIMELINE:m.segmentInfoType=i.default.SEGMENT_TEMPLATE,c.hasOwnProperty(i.default.INITIALIZATION_MINUS)&&(m.initialization=c.initialization.split("$Bandwidth$").join(g.bandwidth).split("$RepresentationID$").join(g.id))):m.segmentInfoType=i.default.BASE_URL,m.essentialProperties=L(g),c){if(c.hasOwnProperty(i.default.INITIALIZATION)){var y=c.Initialization;y.hasOwnProperty(i.default.SOURCE_URL)&&(m.initialization=y.sourceURL),y.hasOwnProperty(i.default.RANGE)&&(m.range=y.range)}else g.hasOwnProperty(i.default.MIME_TYPE)&&R(g.mimeType)&&(m.range=0);c.hasOwnProperty(i.default.TIMESCALE)&&(m.timescale=c.timescale),c.hasOwnProperty(i.default.DURATION)?m.segmentDuration=c.duration/m.timescale:g.hasOwnProperty(i.default.SEGMENT_TEMPLATE)&&(c=g.SegmentTemplate).hasOwnProperty(i.default.SEGMENT_TIMELINE)&&(m.segmentDuration=(r=c.SegmentTimeline,o=void 0,s=void 0,o=r.S_asArray[0],s=r.S_asArray[1],(o.hasOwnProperty("d")?o.d:s.t-o.t)/m.timescale)),c.hasOwnProperty(i.default.MEDIA)&&(m.media=c.media),c.hasOwnProperty(i.default.START_NUMBER)&&(m.startNumber=c.startNumber),c.hasOwnProperty(i.default.INDEX_RANGE)&&(m.indexRange=c.indexRange),c.hasOwnProperty(i.default.PRESENTATION_TIME_OFFSET)&&(m.presentationTimeOffset=c.presentationTimeOffset/m.timescale),c.hasOwnProperty(i.default.AVAILABILITY_TIME_OFFSET)?m.availabilityTimeOffset=c.availabilityTimeOffset:d&&void 0!==d.availabilityTimeOffset&&(m.availabilityTimeOffset=d.availabilityTimeOffset),c.hasOwnProperty(i.default.AVAILABILITY_TIME_COMPLETE)?m.availabilityTimeComplete="false"!==c.availabilityTimeComplete:d&&void 0!==d.availabilityTimeComplete&&(m.availabilityTimeComplete=d.availabilityTimeComplete)}m.MSETimeOffset=(n=void 0,void 0,n=(t=m).presentationTimeOffset,t.adaptation.period.start-n),m.path=[e.period.index,e.index,h],u.push(m)}}return u},getAdaptationsForPeriod:function(e){var t=e&&E(e.index)?e.mpd.manifest.Period_asArray[e.index]:null,n=[],a=void 0,s=void 0,u=void 0;if(t&&t.AdaptationSet_asArray)for(u=0;u<t.AdaptationSet_asArray.length;u++)s=t.AdaptationSet_asArray[u],a=new o.default,s.hasOwnProperty(i.default.ID)&&(a.id=s.id),a.index=u,a.period=e,S(s,r.default.MUXED)?a.type=r.default.MUXED:A(s)?a.type=r.default.AUDIO:C(s)?a.type=r.default.VIDEO:w(s)?a.type=r.default.FRAGMENTED_TEXT:I(s)?a.type=r.default.IMAGE:a.type=r.default.TEXT,n.push(a);return n},getRegularPeriods:function(e){var a,o=!!e&&N(e.manifest),u=[],l=null,c=null,d=null,f=null,h=void 0;for(h=0,a=e&&e.manifest&&e.manifest.Period_asArray?e.manifest.Period_asArray.length:0;h<a;h++)(c=e.manifest.Period_asArray[h]).hasOwnProperty(i.default.START)?(f=new s.default).start=c.start:null!==l&&l.hasOwnProperty(i.default.DURATION)&&null!==d?(f=new s.default).start=parseFloat((d.start+d.duration).toFixed(5)):0!==h||o||((f=new s.default).start=0),null!==d&&isNaN(d.duration)&&(null!==f?d.duration=parseFloat((f.start-d.start).toFixed(5)):t.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),null!==f&&(f.id=k(c,h),f.index=h,f.mpd=e,c.hasOwnProperty(i.default.DURATION)&&(f.duration=c.duration),u.push(f),l=c,d=f),c=null,f=null;return 0===u.length||null!==d&&isNaN(d.duration)&&(d.duration=parseFloat((function(e){!function(){if(!n||!n.hasOwnProperty("error"))throw new Error(r.default.MISSING_CONFIG_ERROR)}();var t=N(e.mpd.manifest),i=void 0;e.mpd.manifest.mediaPresentationDuration?i=e.mpd.manifest.mediaPresentationDuration:e.duration?i=e.duration:t?i=Number.POSITIVE_INFINITY:n.error(new y.default(v.default.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",e));return i}(d)-d.start).toFixed(5))),u},getMpd:function(e){var t=new u.default;return e&&(t.manifest=e,e.hasOwnProperty(i.default.AVAILABILITY_START_TIME)?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):e.loadedTime&&(t.availabilityStartTime=new Date(e.loadedTime.getTime())),e.hasOwnProperty(i.default.AVAILABILITY_END_TIME)&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty(i.default.MINIMUM_UPDATE_PERIOD)&&(t.minimumUpdatePeriod=e.minimumUpdatePeriod),e.hasOwnProperty(i.default.MEDIA_PRESENTATION_DURATION)&&(t.mediaPresentationDuration=e.mediaPresentationDuration),e.hasOwnProperty(i.default.SUGGESTED_PRESENTATION_DELAY)&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty(i.default.TIMESHIFT_BUFFER_DEPTH)&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty(i.default.MAX_SEGMENT_DURATION)&&(t.maxSegmentDuration=e.maxSegmentDuration),e.hasOwnProperty(i.default.PUBLISH_TIME)&&(t.publishTime=new Date(e.publishTime))),t},getEventsForPeriod:function(e){var t=e&&e.mpd&&e.mpd.manifest?e.mpd.manifest:null,n=t?t.Period_asArray:null,a=n&&e&&E(e.index)?n[e.index].EventStream_asArray:null,o=[],s=void 0,u=void 0;if(a)for(s=0;s<a.length;s++){var l=new f.default;if(l.period=e,l.timescale=1,!a[s].hasOwnProperty(r.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(l.schemeIdUri=a[s][r.default.SCHEME_ID_URI],a[s].hasOwnProperty(i.default.TIMESCALE)&&(l.timescale=a[s][i.default.TIMESCALE]),a[s].hasOwnProperty(i.default.VALUE)&&(l.value=a[s][i.default.VALUE]),a[s].hasOwnProperty(i.default.PRESENTATION_TIME_OFFSET)&&(l.presentationTimeOffset=a[s][i.default.PRESENTATION_TIME_OFFSET]),u=0;a[s].Event_asArray&&u<a[s].Event_asArray.length;u++){var d=a[s].Event_asArray[u],h=new c.default;if(h.presentationTime=0,h.eventStream=l,d.hasOwnProperty(i.default.PRESENTATION_TIME)){h.presentationTime=d.presentationTime;var p=l.presentationTimeOffset?l.presentationTimeOffset/l.timescale:0;h.calculatedPresentationTime=h.presentationTime/l.timescale+e.start-p}d.hasOwnProperty(i.default.DURATION)&&(h.duration=d.duration/l.timescale),d.hasOwnProperty(i.default.ID)&&(h.id=d.id),d.Signal&&d.Signal.Binary?h.messageData=g.decodeArray(d.Signal.Binary.toString()):h.messageData=d.messageData||d.__text,o.push(h)}}return o},getEssentialPropertiesForRepresentation:L,getEventStreamForAdaptationSet:function(e,t){var n=void 0,r=void 0,i=void 0;return e&&e.Period_asArray&&t&&t.period&&E(t.period.index)&&(r=e.Period_asArray[t.period.index])&&r.AdaptationSet_asArray&&E(t.index)&&(i=r.AdaptationSet_asArray[t.index])&&(n=i.InbandEventStream_asArray),x(n,null)},getEventStreamForRepresentation:function(e,t){var n=void 0,r=void 0,i=void 0,a=void 0;return e&&e.Period_asArray&&t&&t.adaptation&&t.adaptation.period&&E(t.adaptation.period.index)&&(r=e.Period_asArray[t.adaptation.period.index])&&r.AdaptationSet_asArray&&E(t.adaptation.index)&&(i=r.AdaptationSet_asArray[t.adaptation.index])&&i.Representation_asArray&&E(t.index)&&(a=i.Representation_asArray[t.index])&&(n=a.InbandEventStream_asArray),x(n,t)},getUTCTimingSources:function(e){var t=N(e),n=!!e&&e.hasOwnProperty(i.default.AVAILABILITY_START_TIME),a=e?e.UTCTiming_asArray:null,o=[];return(t||n)&&a&&a.forEach((function(e){var t=new l.default;e.hasOwnProperty(r.default.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty(i.default.VALUE)&&(t.value=e.value.toString(),o.push(t)))})),o},getBaseURLsFromElement:F,getRepresentationSortFunction:O,getLocation:function(e){if(e&&e.hasOwnProperty(r.default.LOCATION))return e.Location=e.Location_asArray[0],e.Location},getPatchLocation:function(e){if(e&&e.hasOwnProperty(i.default.PATCH_LOCATION))return e.PatchLocation=e.PatchLocation_asArray[0],e.PatchLocation},getSuggestedPresentationDelay:function(e){return e&&e.hasOwnProperty(i.default.SUGGESTED_PRESENTATION_DELAY)?e.suggestedPresentationDelay:null},getAvailabilityStartTime:function(e){return e&&e.hasOwnProperty(i.default.AVAILABILITY_START_TIME)&&null!==e.availabilityStartTime?e.availabilityStartTime.getTime():null},getServiceDescriptions:function(e){var t=[];if(e&&e.hasOwnProperty(i.default.SERVICE_DESCRIPTION)){var n=!0,a=!1,o=void 0;try{for(var s,u=e.ServiceDescription_asArray[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){var l=s.value,c=void 0,d=void 0,f=void 0,h=void 0;for(var p in l)l.hasOwnProperty(p)&&(p===i.default.ID?c=l[p]:p===i.default.SERVICE_DESCRIPTION_SCOPE?d=l[p].schemeIdUri:p===i.default.SERVICE_DESCRIPTION_LATENCY?f={target:l[p].target,max:l[p].max,min:l[p].min}:p===i.default.SERVICE_DESCRIPTION_PLAYBACK_RATE&&(h={max:l[p].max,min:l[p].min}));d===r.default.SERVICE_DESCRIPTION_LL_SCHEME&&(f||h)&&t.push({id:c,schemeIdUri:d,latency:f,playbackRate:h})}}catch(e){a=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(a)throw o}}}return t},getSupplementalPropperties:function(e){var t={};if(e&&e.hasOwnProperty(i.default.SUPPLEMENTAL_PROPERTY)){var n=!0,a=!1,o=void 0;try{for(var s,u=e.SupplementalProperty_asArray[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){var l=s.value;l.hasOwnProperty(r.default.SCHEME_ID_URI)&&l.hasOwnProperty(i.default.VALUE)&&(t[l[r.default.SCHEME_ID_URI]]=l[i.default.VALUE])}}catch(e){a=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(a)throw o}}}return t},setConfig:function(e){e&&(e.errHandler&&(n=e.errHandler),e.BASE64&&(g=e.BASE64))}},t=(0,m.default)(T).getInstance().getLogger(e),e}b.__dashjs_factory_name="DashManifestModel",t.default=g.default.getSingletonFactory(b)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.THUMBNAILS_SCHEME_ID_URIS=void 0;var r=h(n(6)),i=h(n(15)),a=h(n(1)),o=h(n(274)),s=h(n(21)),u=n(33),l=h(n(10)),c=h(n(40)),d=h(n(81)),f=h(n(124));function h(e){return e&&e.__esModule?e:{default:e}}var p=t.THUMBNAILS_SCHEME_ID_URIS=["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"];function g(e){var t,n=this.context,a=e.adapter,h=e.baseURLController,g=e.streamInfo,m=e.timelineConverter,y=e.debug,v=e.eventBus,_=e.events,T=e.dashConstants,b=(0,s.default)(n).getInstance(),E=void 0,S=void 0,A=void 0,C=void 0,w=void 0,I=void 0;function R(){P(),w=(0,d.default)(n).create({}),I=(0,c.default)(n).getInstance(),(S=(0,f.default)(n).create({streamInfo:g,timelineConverter:m,baseURLController:h,debug:y,eventBus:v,events:_,dashConstants:T,urlUtils:b})).initialize(!!a&&a.getIsDynamic()),function(){if(!g||!a)return;if(!(C=a.getMediaInfoForType(g,r.default.IMAGE)))return;var e=a.getVoRepresentations(C);e&&e.length>0&&e.forEach((function(e){(e.segmentInfoType===i.default.SEGMENT_TEMPLATE&&e.segmentDuration>0&&e.media||e.segmentInfoType===i.default.SEGMENT_TIMELINE)&&O(e),e.segmentInfoType===i.default.SEGMENT_BASE&&O(e,!0)}));E.length>0&&(E.sort((function(e,t){return e.bitrate-t.bitrate})),A=E.length-1)}()}function O(e,t){var n=new o.default;n.id=e.id,n.bitrate=e.bandwidth,n.width=e.width,n.height=e.height,n.tilesHor=1,n.tilesVert=1,e.essentialProperties&&e.essentialProperties.forEach((function(e){if(p.indexOf(e.schemeIdUri)>=0&&e.value){var t=e.value.split("x");2!==t.length||isNaN(t[0])||isNaN(t[1])||(n.tilesHor=parseInt(t[0],10),n.tilesVert=parseInt(t[1],10))}})),t?v.trigger(l.default.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{streamId:g.id,mediaType:r.default.IMAGE,mimeType:C.mimeType,representation:e,callback:function(e,t,r,i){var o=[];r=function(e,t){var n,r=[],i=0,o=void 0,s=void 0,l=void 0;for(o=0,n=e.length;o<n;o++)s=e[o],(l=(0,u.getTimeBasedSegment)(m,a.getIsDynamic(),t,s.startTime,s.duration,s.timescale,s.media,s.mediaRange,i))&&(r.push(l),l=null,i++);return r}(r,i),n.segmentDuration=r[0].duration,n.readThumbnail=function(e,t){var n=null;o.some((function(t){if(t.start<=e&&t.end>e)return n=t.url,!0})),n?t(n):r.some((function(n){if(n.mediaStartTime<=e&&n.mediaStartTime+n.duration>e){var r=h.resolve(i.path);return w.load({method:"get",url:r.url,request:{range:n.mediaRange,responseType:"arraybuffer"},onload:function(e){var r=I.getSamplesInfo(e.target.response),i=new Blob([e.target.response.slice(r.sampleList[0].offset,r.sampleList[0].offset+r.sampleList[0].size)],{type:"image/jpeg"}),a=window.URL.createObjectURL(i);o.push({start:n.mediaStartTime,end:n.mediaStartTime+n.duration,url:a}),t&&t(a)}}),!0}}))}}}):(n.startNumber=e.startNumber,n.segmentDuration=e.segmentDuration,n.timescale=e.timescale,n.templateUrl=function(e){var t=b.isRelative(e.media)?b.resolve(e.media,h.resolve(e.path).url):e.media;if(!t)return"";return(0,u.replaceIDForTemplate)(t,e.id)}(e)),n.tilesHor>0&&n.tilesVert>0&&(n.widthPerTile=n.width/n.tilesHor,n.heightPerTile=n.height/n.tilesVert,E.push(n))}function P(){E=[],A=-1,C=null}return t={initialize:R,getTracks:function(){return E},reset:P,setTrackByIndex:function(e){E&&0!==E.length&&(e>=E.length&&(e=E.length-1),A=e)},getCurrentTrack:function(){return A<0?null:E[A]},getCurrentTrackIndex:function(){return A},getThumbnailRequestForTime:function(e){for(var t=void 0,n=a.getVoRepresentations(C),r=0;r<n.length;r++)if(E[A].id===n[r].id){t=n[r];break}return S.getSegmentRequestForTime(C,t,e)}},R(),t}g.__dashjs_factory_name="ThumbnailTracks",t.default=a.default.getClassFactory(g)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,r,i,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initDataTypes=["cenc"],t&&t.length&&(this.audioCapabilities=t),n&&n.length&&(this.videoCapabilities=n),this.distinctiveIdentifier=r,this.persistentState=i,this.sessionTypes=a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keyID=t,this.key=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n&&"persistent"!==n&&"temporary"!==n)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=t,this.type=n}return r(e,[{key:"toJWK",value:function(){var e=void 0,t=this.keyPairs.length,n={keys:[]};for(e=0;e<t;e++){var r={kty:"oct",alg:"A128KW",kid:this.keyPairs[e].keyID,k:this.keyPairs[e].key};n.keys.push(r)}this.type&&(n.type=this.type);var i=JSON.stringify(n),a=i.length,o=new ArrayBuffer(a),s=new Uint8Array(o);for(e=0;e<a;e++)s[e]=i.charCodeAt(e);return o}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initData=t,this.initDataType=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sessionToken=t,this.message=n,this.defaultURL=r,this.messageType=i||"license-request"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keySystem=t,this.ksConfiguration=n}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(4))&&i.__esModule?i:{default:i},o=n(63),s=n(66);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t,n){return(m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=a.default.dom||a.default,_=a.default.getComponent("Component"),T={wrap:!1},b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(a,e);var t,n,r,i=h(a);function a(e,t){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var s=l(l({},T),t);(r=i.call(this,e,s)).player_=e,r.setCls();var u,c=function(e,t){r.options_.fluid=t,r.removeCls(),r.setCls()};return s.wrap&&(u=r.el(),r.videoWrap_=v.createEl("div",{className:"cld-plw-col-player"}),r.contentEl_=r.contentEl_=v.createEl("div",{className:"cld-plw-col-list"}),(0,o.wrap)(r.player().el(),u),u.appendChild(r.videoWrap_),u.appendChild(r.contentEl_),(0,o.wrap)(r.player().el(),r.videoWrap_)),e.on("fluid",c),r.addChild("PlaylistPanel",r.options_),r.dispose=function(){r.removeLayout(),m((n=g(r),y(a.prototype)),"dispose",n).call(n),e.off("fluid",c)},r}return t=a,(n=[{key:"getCls",value:function(){var e=["cld-video-player","cld-plw-layout"];return e.push((0,s.skinClassPrefix)(this.player())),e.push((0,s.playerClassPrefix)(this.player())),this.options_.fluid&&e.push("cld-plw-layout-fluid"),e}},{key:"setCls",value:function(){var e=this;this.removeClass((0,s.skinClassPrefix)(this)),this.getCls().forEach((function(t){e.addClass(t)}))}},{key:"removeCls",value:function(){var e=this;this.getCls().forEach((function(t){e.removeClass(t)}))}},{key:"update",value:function(e,t){this.options(t),this.removeChild("PlaylistPanel"),this.addChild("PlaylistPanel",this.options_),this.trigger("playlistlayoutupdate")}},{key:"removeLayout",value:function(){var e=this.el().parentElement;e&&e.appendChild(this.player().el())}},{key:"createEl",value:function(){var e=m(y(a.prototype),"createEl",this).call(this,"div");return e.style.fontFamily=this.player().el().style.fontFamily,e}}])&&d(t.prototype,n),r&&d(t,r),a}(_);a.default.registerComponent("playlistLayout",b);var E=b;t.default=E},function(e,t,n){"use strict";var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_INTERACTION_ARE_TRANSITION=t.CLOSE_INTERACTION_AREA_LAYOUT_DELAY=t.INTERACTION_AREA_HAND_ICON=t.TEMPLATE_INTERACTION_AREAS_VTT=t.INTERACTION_AREAS_THEME=t.INTERACTION_AREAS_TEMPLATE=t.INTERACTION_AREAS_CONTAINER_CLASS_NAME=t.INTERACTION_AREAS_PREFIX=t.INTERACTION_AREA_LAYOUT_LOCAL_STORAGE_NAME=void 0;t.INTERACTION_AREA_LAYOUT_LOCAL_STORAGE_NAME="cld-ia-layout-state";t.INTERACTION_AREAS_PREFIX="vp-ia";t.INTERACTION_AREAS_CONTAINER_CLASS_NAME="interaction-areas-container";var a={PORTRAIT:"portrait",LANDSCAPE:"landscape",All:"all",CENTER:"center"};t.INTERACTION_AREAS_TEMPLATE=a;t.INTERACTION_AREAS_THEME={PULSING:"pulsing",SHADOWED:"shadowed"};var o=(i(r={},a.PORTRAIT,"https://res.cloudinary.com/prod/raw/upload/v1623772481/video-player/vtts/portrait.vtt"),i(r,a.LANDSCAPE,"https://res.cloudinary.com/prod/raw/upload/v1623772303/video-player/vtts/landscape.vtt"),i(r,a.All,"https://res.cloudinary.com/prod/raw/upload/v1623250266/video-player/vtts/all.vtt"),i(r,a.CENTER,"https://res.cloudinary.com/prod/raw/upload/v1623250265/video-player/vtts/center.vtt"),r);t.TEMPLATE_INTERACTION_AREAS_VTT=o;t.INTERACTION_AREA_HAND_ICON="https://res.cloudinary.com/prod/image/upload/v1626764643/video-player/interaction-area-hand.svg";t.CLOSE_INTERACTION_AREA_LAYOUT_DELAY=4500;t.DEFAULT_INTERACTION_ARE_TRANSITION=250},function(e,t,n){"use strict";var r=n(0),i=n(161),a=n(162);function o(e,t,n){var r=e;return a(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function s(e,t,n){return u(t=o(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=l.response?l.response:l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l),m)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,y)}function a(){if(!u){var t;clearTimeout(c),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=y,a=null;return 0!==t?(i={body:r(),statusCode:t,method:f,headers:{},url:d,rawRequest:l},l.getAllResponseHeaders&&(i.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}(l.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,i,i.body)}}var o,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var c,d=l.url=e.uri||e.url,f=l.method=e.method||"GET",h=e.body||e.data,p=l.headers=e.headers||{},g=!!e.sync,m=!1,y={body:void 0,headers:{},statusCode:0,method:f,url:d,rawRequest:l};if("json"in e&&!1!==e.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),h=JSON.stringify(!0===e.json?h:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(a,0)},l.onload=a,l.onerror=i,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=i,l.open(f,d,!g,e.username,e.password),g||(l.withCredentials=!!e.withCredentials),!g&&e.timeout>0&&(c=setTimeout((function(){if(!u){u=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),l.setRequestHeader)for(o in p)p.hasOwnProperty(o)&&l.setRequestHeader(o,p[o]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(h||null),l}e.exports=s,e.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){s["delete"===e?"del":e]=function(t,n,r){return(n=o(t,n,r)).method=e.toUpperCase(),u(n)}}))},function(e,t,n){var r=n(0),i=e.exports={WebVTT:n(163),VTTCue:n(164),VTTRegion:n(165)};r.vttjs=i,r.WebVTT=i.WebVTT;var a=i.VTTCue,o=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=a,r.VTTRegion=o},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},function(e,t,n){var r,i,a,o,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,i=/^([^\/?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var u=i.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(l.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;l.path=s.normalizePath(d)}else l.path=o.path,a.params||(l.params=o.params,a.query||(l.query=o.query));return null===l.path&&(l.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(l)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(!(r instanceof t)){function i(){}i.prototype=t.prototype,n(r,i=new i),e.prototype=r=i}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},a=i.ELEMENT_NODE=1,o=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,l=i.ENTITY_REFERENCE_NODE=5,c=i.ENTITY_NODE=6,d=i.PROCESSING_INSTRUCTION_NODE=7,f=i.COMMENT_NODE=8,h=i.DOCUMENT_NODE=9,p=i.DOCUMENT_TYPE_NODE=10,g=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,y={},v={},_=(y.INDEX_SIZE_ERR=(v[1]="Index size error",1),y.DOMSTRING_SIZE_ERR=(v[2]="DOMString size error",2),y.HIERARCHY_REQUEST_ERR=(v[3]="Hierarchy request error",3)),T=(y.WRONG_DOCUMENT_ERR=(v[4]="Wrong document",4),y.INVALID_CHARACTER_ERR=(v[5]="Invalid character",5),y.NO_DATA_ALLOWED_ERR=(v[6]="No data allowed",6),y.NO_MODIFICATION_ALLOWED_ERR=(v[7]="No modification allowed",7),y.NOT_FOUND_ERR=(v[8]="Not found",8)),b=(y.NOT_SUPPORTED_ERR=(v[9]="Not supported",9),y.INUSE_ATTRIBUTE_ERR=(v[10]="Attribute in use",10));y.INVALID_STATE_ERR=(v[11]="Invalid state",11),y.SYNTAX_ERR=(v[12]="Syntax error",12),y.INVALID_MODIFICATION_ERR=(v[13]="Invalid modification",13),y.NAMESPACE_ERR=(v[14]="Invalid namespace",14),y.INVALID_ACCESS_ERR=(v[15]="Invalid access",15);function E(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,v[e]),this.message=v[e],Error.captureStackTrace&&Error.captureStackTrace(this,E);return n.code=e,t&&(this.message=this.message+": "+t),n}function S(){}function A(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);re(e,"length",r.length),n(r,e),e._inc=t}}function w(){}function I(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function R(e,t,n,r){if(r?t[I(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&k(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function O(e,t,n){var r=I(t,n);if(!(r>=0))throw E(T,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var a=e.ownerDocument;a&&(k(a,e,n),n.ownerElement=null)}}function P(e){if(this._features={},e)for(var t in e)this._features=e[t]}function D(){}function M(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function N(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(N(e,t))return!0}while(e=e.nextSibling)}function L(){}function k(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function x(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function F(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,x(e.ownerDocument,e),t}function U(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===g){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var o=n?n.previousSibling:e.lastChild;i.previousSibling=o,a.nextSibling=n,o?o.nextSibling=i:e.firstChild=i,null==n?e.lastChild=a:n.previousSibling=a;do{i.parentNode=e}while(i!==a&&(i=i.nextSibling));return x(e.ownerDocument||e,e),t.nodeType==g&&(t.firstChild=t.lastChild=null),t}function B(){this._nsMap={}}function j(){}function H(){}function G(){}function q(){}function V(){}function Y(){}function K(){}function W(){}function z(){}function X(){}function Q(){}function $(){}function J(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&null==i&&null==(i=r.lookupPrefix(a)))var o=[{namespace:a,prefix:null}];return ee(this,n,e,t,o),n.join("")}function Z(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix==r)return o.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case a:i||(i=[]);i.length;var c=e.attributes,m=c.length,y=e.firstChild,v=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",v);for(var _=0;_<m;_++){"xmlns"==(T=c.item(_)).prefix?i.push({prefix:T.localName,namespace:T.value}):"xmlns"==T.nodeName&&i.push({prefix:"",namespace:T.value})}for(_=0;_<m;_++){var T;if(Z(T=c.item(_),0,i)){var b=T.prefix||"",E=T.namespaceURI,S=b?" xmlns:"+b:" xmlns";t.push(S,'="',E,'"'),i.push({prefix:b,namespace:E})}ee(T,t,n,r,i)}if(Z(e,0,i)){b=e.prefix||"",E=e.namespaceURI,S=b?" xmlns:"+b:" xmlns";t.push(S,'="',E,'"'),i.push({prefix:b,namespace:E})}if(y||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(v)){if(t.push(">"),n&&/^script$/i.test(v))for(;y;)y.data?t.push(y.data):ee(y,t,n,r,i),y=y.nextSibling;else for(;y;)ee(y,t,n,r,i),y=y.nextSibling;t.push("</",v,">")}else t.push("/>");return;case h:case g:for(y=e.firstChild;y;)ee(y,t,n,r,i),y=y.nextSibling;return;case o:return t.push(" ",e.name,'="',e.value.replace(/[&"]/g,M),'"');case s:return t.push(e.data.replace(/[<&]/g,M).replace(/]]>/g,"]]>"));case u:return t.push("<![CDATA[",e.data,"]]>");case f:return t.push("\x3c!--",e.data,"--\x3e");case p:var A=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),A)t.push(" PUBLIC ",A),C&&"."!=C&&t.push(" ",C),t.push(">");else if(C&&"."!=C)t.push(" SYSTEM ",C,">");else{var w=e.internalSubset;w&&t.push(" [",w,"]"),t.push(">")}return;case d:return t.push("<?",e.target," ",e.data,"?>");case l:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){var r;switch(t.nodeType){case a:(r=t.cloneNode(!1)).ownerDocument=e;case g:break;case o:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(te(e,i,n)),i=i.nextSibling;return r}function ne(e,t,n){var r=new t.constructor;for(var i in t){var s=t[i];"object"!=typeof s&&s!=r[i]&&(r[i]=s)}switch(t.childNodes&&(r.childNodes=new S),r.ownerDocument=e,r.nodeType){case a:var u=t.attributes,l=r.attributes=new w,c=u.length;l._ownerElement=r;for(var d=0;d<c;d++)r.setAttributeNode(ne(e,u.item(d),!0));break;case o:n=!0}if(n)for(var f=t.firstChild;f;)r.appendChild(ne(e,f,n)),f=f.nextSibling;return r}function re(e,t,n){e[t]=n}E.prototype=Error.prototype,n(y,E),S.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},A.prototype.item=function(e){return C(this),this[e]},r(A,S),w.prototype={length:0,item:S.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new E(b);var n=this.getNamedItem(e.nodeName);return R(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new E(b);return t=this.getNamedItemNS(e.namespaceURI,e.localName),R(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return O(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return O(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},P.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new L;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new Y;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},D.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return U(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return F(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ne(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==s&&e.nodeType==s?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==o?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==o?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,D),n(i,D.prototype),L.prototype={nodeName:"#document",nodeType:h,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==g){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==a&&(this.documentElement=e),U(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),F(this,e)},importNode:function(e,t){return te(this,e,t)},getElementById:function(e){var t=null;return N(this.documentElement,(function(n){if(n.nodeType==a&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new A(this,(function(e){var n=[];return N(e.documentElement,(function(r){r!==e&&r.nodeType==a&&t.test(r.getAttribute("class"))&&n.push(r)})),n}))},createElement:function(e){var t=new B;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new S,(t.attributes=new w)._ownerElement=t,t},createDocumentFragment:function(){var e=new X;return e.ownerDocument=this,e.childNodes=new S,e},createTextNode:function(e){var t=new G;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new q;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new V;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new Q;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new j;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new z;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new B,r=t.split(":"),i=n.attributes=new w;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new j,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(L,D),B.prototype={nodeType:a,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===g?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t),r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,x(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new A(this,(function(t){var n=[];return N(t,(function(r){r===t||r.nodeType!=a||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new A(this,(function(n){var r=[];return N(n,(function(i){i===n||i.nodeType!==a||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},L.prototype.getElementsByTagName=B.prototype.getElementsByTagName,L.prototype.getElementsByTagNameNS=B.prototype.getElementsByTagNameNS,r(B,D),j.prototype.nodeType=o,r(j,D),H.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(v[_])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(H,D),G.prototype={nodeName:"#text",nodeType:s,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(G,H),q.prototype={nodeName:"#comment",nodeType:f},r(q,H),V.prototype={nodeName:"#cdata-section",nodeType:u},r(V,H),Y.prototype.nodeType=p,r(Y,D),K.prototype.nodeType=m,r(K,D),W.prototype.nodeType=c,r(W,D),z.prototype.nodeType=l,r(z,D),X.prototype.nodeName="#document-fragment",X.prototype.nodeType=g,r(X,D),Q.prototype.nodeType=d,r(Q,D),$.prototype.serializeToString=function(e,t,n){return J.call(e,t,n)},D.prototype.toString=J;try{if(Object.defineProperty){function ie(e){switch(e.nodeType){case a:case g:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(ie(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(A.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(D.prototype,"textContent",{get:function(){return ie(this)},set:function(e){switch(this.nodeType){case a:case g:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),re=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.Node=D,t.DOMException=E,t.DOMImplementation=P,t.XMLSerializer=$},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=y(n(13)),a=y(n(19)),o=y(n(36)),s=y(n(50)),u=y(n(51)),l=y(n(100)),c=y(n(178)),d=y(n(101)),f=y(n(179)),h=y(n(181)),p=y(n(66)),g=y(n(183));function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function y(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}return i.default=e,n&&n.set(e,i),i}var v=i.assign({},i,a,o,s,u,f,h,c,l,d,p,g);t.default=v},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(177),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(18))},function(e,t,n){(function(r){var i;!function(r){"use strict";function a(e){var n=e&&e.Promise||r.Promise,i=e&&e.XMLHttpRequest||r.XMLHttpRequest;return function(){var e=Object.create(r,{fetch:{value:void 0,writable:!0}});return function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,a={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function o(e){return e&&DataView.prototype.isPrototypeOf(e)}if(a.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a.iterable&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return n.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new n((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function m(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}function y(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function _(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a.arrayBuffer&&a.blob&&o(e)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return n.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return n.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return n.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?n.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):n.resolve(this._bodyArrayBuffer))}return this.blob().then(g)}),this.text=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return m(this._bodyBlob);if(this._bodyArrayBuffer)return n.resolve(y(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return n.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=l(e),t=c(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[l(e)]},f.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},f.prototype.set=function(e,t){this.map[l(e)]=c(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},a.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e){var t=e.toUpperCase();return T.indexOf(t)>-1?t:e}function E(e,t){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof E){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=b(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function S(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function A(e){var t=new f;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function C(e,t){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},_.call(E.prototype),_.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},C.error=function(){var e=new C(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];C.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new C(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function I(e,o){return new n((function(n,s){var u=new E(e,o);if(u.signal&&u.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var l=new i;function d(){l.abort()}function h(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}l.onload=function(){var e={status:l.status,statusText:l.statusText,headers:A(l.getAllResponseHeaders()||"")};e.url="responseURL"in l?l.responseURL:e.headers.get("X-Request-URL");var t="response"in l?l.response:l.responseText;setTimeout((function(){n(new C(t,e))}),0)},l.onerror=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},l.ontimeout=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},l.onabort=function(){setTimeout((function(){s(new t.DOMException("Aborted","AbortError"))}),0)},l.open(u.method,h(u.url),!0),"include"===u.credentials?l.withCredentials=!0:"omit"===u.credentials&&(l.withCredentials=!1),"responseType"in l&&(a.blob?l.responseType="blob":a.arrayBuffer&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(l.responseType="arraybuffer")),!o||"object"!=typeof o.headers||o.headers instanceof f?u.headers.forEach((function(e,t){l.setRequestHeader(t,e)})):Object.getOwnPropertyNames(o.headers).forEach((function(e){l.setRequestHeader(e,c(o.headers[e]))})),u.signal&&(u.signal.addEventListener("abort",d),l.onreadystatechange=function(){4===l.readyState&&u.signal.removeEventListener("abort",d)}),l.send(void 0===u._bodyInit?null:u._bodyInit)}))}I.polyfill=!0,r.fetch||(r.fetch=I,r.Headers=f,r.Request=E,r.Response=C),t.Headers=f,t.Request=E,t.Response=C,t.fetch=I,Object.defineProperty(t,"__esModule",{value:!0})}(t),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response,DOMException:e.DOMException}}()}void 0===(i=function(){return a}.call(t,n,t,e))||(e.exports=i)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==r?r:this)}).call(this,n(18))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyWithProps=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.order,o=void 0===a?null:a,s=t,u=function(n){var r=t[n];void 0!==r&&e[n]&&(0,i.isFunction)(e[n])&&e[n](r)};o&&(s=(0,r.assign)({},t),o.forEach((function(e){u(e),delete s[e]})));Object.keys(s).forEach((function(e){u(e)}))};var r=n(13),i=n(14)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.mixin=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return t(e)}),(function e(){r(this,e)}))}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,r,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"setItem",value:function(e){var t=e.action,n=e.source;this.source=n;var r=n.info();this.setTitle(r.title||n.publicId()),this.setPoster(this.source.poster().url({transformation:{aspect_ratio:"16:9",crop:"pad",background:"black"}})),this.setAction(t)}},{key:"setTitle",value:function(e){this.title.innerText=e}},{key:"setAction",value:function(e){this.action=e}},{key:"handleClick",value:function(){s(d(c.prototype),"handleClick",this).call(this),this.player().trigger("recommendationshide"),this.action()}}])&&o(t.prototype,n),r&&o(t,r),c}(((i=n(4))&&i.__esModule?i:{default:i}).default.getComponent("ClickableComponent"));t.default=f},function(e,t,n){"use strict";var r=function(e){e.style.display="none"},i=function(e){e.style.display=""};e.exports={hide:r,show:i,setText:function(e,t){if(!t||t.length<=0)return e.innerText="",void r(e);e.innerText=t,i(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(4)),i=n(13),a=n(197),o=n(53);n(102);var s=c(n(198)),u=c(n(54)),l=n(25);function c(e){return e&&e.__esModule?e:{default:e}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var i=_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(m,e);var t,n,r,c=g(m);function m(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,m),(n=c.call(this,e,r)).options=r;var i=function(){n.render()};return e.on("shoppableitemchanged",i),n.render(),n.dispose=function(){v((t=y(n),_(m.prototype)),"dispose",t).call(t),e.off("shoppableitemchanged",i)},n}return t=m,(n=[{key:"createEl",value:function(){var e=v(_(m.prototype),"createEl",this).call(this);return[l.CLD_SPBL_PANEL_CLASS,"base-color-bg"].map((function(t){return e.classList.add(t)})),e}},{key:"removeAll",value:function(){for(var e=this.children(),t=e.length-1;t>=0;--t)this.removeChild(e[t])}},{key:"getItems",value:function(){var e=this,t=this.player_.cloudinary.cloudinaryConfig();return this.options.products.map((function(n){n.onHover&&"object"===d(n.onHover.args)&&(n.onHover.args.transformation=(0,i.assign)({},e.options.transformation,n.onHover.args.transformation));var r={productId:n.productId,productName:n.productName,title:n.title,onHover:n.onHover,onClick:n.onClick,startTime:n.startTime,endTime:n.endTime};return{imageSrc:new u.default(n.publicId,{cloudinaryConfig:t,transformation:(0,i.assign)({},e.options.transformation,n.transformation)}),conf:r}}))}},{key:"scrollToActiveItem",value:function(){var e=this.el_.getElementsByClassName("active");if(e.length>0){var t=e[0].offsetTop-12;"scrollBehavior"in document.documentElement.style?this.el_.scrollTo({top:t,behavior:"smooth"}):this.el_.scrollTop=t}}},{key:"render",value:function(){var e=this;this.removeAll();var t=this.getItems(),n=(0,a.throttle)((function(){return e.scrollToActiveItem()}),1e3);t.forEach((function(t,r){var i=new s.default(e.player(),{item:t.imageSrc,conf:t.conf,next:1===r,current:0===r,clickHandler:function(t){var n=t.currentTarget||t.target,r=e.player_.ended()?"productClickPost":"productClick";if(e.player_.trigger(r,{productId:n.dataset.productId,productName:n.dataset.productName}),n.dataset.clickAction===l.SHOPPABLE_CLICK_ACTIONS.GO_TO)window.open(n.dataset.gotoUrl,"_blank");else if(n.dataset.clickAction===l.SHOPPABLE_CLICK_ACTIONS.SEEk){var i=(0,o.parseTime)(n.dataset.seek);null!==i&&(e.player_.addClass("vjs-has-started"),e.player_.postModal&&e.player_.postModal.close(),e.player_.currentTime(i),e.player_.removeClass(l.SHOPPABLE_PANEL_VISIBLE_CLASS),e.player_.addClass(l.SHOPPABLE_PANEL_HIDDEN_CLASS),e.player_.addClass(l.SHOPPABLE_PRODUCTS_OVERLAY_CLASS),e.player_.one("seeked",(function(){return e.player_.trigger("showProductsOverlay")})))}"false"!==n.dataset.pause&&(e.player_.pause(),(0,o.parseTime)(n.dataset.pause)&&setTimeout((function(){e.player_.play()}),1e3*(0,o.parseTime)(n.dataset.pause)))}});i.on("mouseover",(function(t){var n=t.currentTarget||t.target,r=e.player_.ended()?"productHoverPost":"productHover";e.player_.trigger(r,{productId:n.dataset.productId,productName:n.dataset.productName})})),void 0!==t.conf.startTime&&void 0!==t.conf.endTime&&e.player_.on("timeupdate",(function(){var r=e.player_.currentTime();r>=t.conf.startTime&&r<t.conf.endTime?(i.el_.classList.add("active"),n()):i.el_.classList.contains("active")&&i.el_.classList.remove("active")})),e.addChild(i)}))}}])&&h(t.prototype,n),r&&h(t,r),m}(r.default.getComponent("Component"));r.default.registerComponent("shoppablePanel",T);var b=T;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elMatches=void 0;t.elMatches=function(e,t){var n=Element.prototype;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(e){return-1!==[].indexOf.call(document.querySelectorAll(e),this)}).call(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(48))&&r.__esModule?r:{default:r},a=n(24),o=n(19),s=n(51),u=n(68);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e);var u=(0,a.normalizeOptions)(t,r);t=u.publicId,r=u.options;var c=null,d=null,f=null,h=null,p=null;this.publicId=function(e){return e?(c=e,n):c},this.cloudinaryConfig=function(e){return e?(d=(0,s.getCloudinaryInstanceOf)(i.default.Cloudinary,e),n):d},this.resourceConfig=function(e){return e?(h=e,n):h},this.transformation=function(e){return e?(f=(0,s.getCloudinaryInstanceOf)(i.default.Transformation,e),n):f},this.queryParams=function(e){return e?(p=e,n):p},this.getType=function(){return n._type};var g=(0,o.sliceAndUnsetProperties)(r,"cloudinaryConfig"),m=g.cloudinaryConfig;if(!m)throw new Error("Source is missing 'cloudinaryConfig'.");this.cloudinaryConfig(m);var y=(0,o.sliceAndUnsetProperties)(r,"transformation"),v=y.transformation;this.transformation(v);var _=(0,o.sliceAndUnsetProperties)(r,"queryParams"),T=_.queryParams;this.queryParams(T),this.resourceConfig(r),this.publicId(t)}var t,n,r;return t=e,(n=[{key:"config",value:function(){var e=new i.default.Cloudinary(this.cloudinaryConfig().config());return e.config(this.resourceConfig()),e}},{key:"url",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.transformation,n=this.config().url(this.publicId(),{transformation:t||this.transformation()}),r="";return this.queryParams()&&(r=(0,u.objectToQuerystring)(this.queryParams())),"".concat(n).concat(r)}}])&&c(t.prototype,n),r&&c(t,r),e}();t.default=d},function(e,t,n){e.exports=function(e,t,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n;var r="6.9.0",i=function(e,t){t.isImmediatePropagationStopped=function(){return!0},t.cancelBubble=!0,t.isPropagationStopped=function(){return!0}},a=function(e,t,n){i(0,n),e.trigger({type:t+n.type,originalEvent:n})},o=function(e,t){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&a(e,"content",t):a(e,"ad",t))},s=function(e,t){e.ads.isInAdMode()?e.ads.isContentResuming()?(i(0,t),e.trigger("resumeended")):a(e,"ad",t):e.ads._contentHasEnded||e.ads.stitchedAds()||(a(e,"content",t),e.trigger("readyforpostroll"))},u=function(e,t){if(!("loadstart"===t.type&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===t.type&&!e.ads._hasThereBeenALoadedData||"loadedmetadata"===t.type&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())a(e,"ad",t);else{if(e.currentSrc()!==e.ads.contentSrc)return;a(e,"content",t)}},l=function(e,t){e.ads.inAdBreak()?a(e,"ad",t):e.ads.isContentResuming()&&a(e,"content",t)};function c(e){"playing"===e.type?o(this,e):"ended"===e.type?s(this,e):"loadstart"===e.type||"loadeddata"===e.type||"loadedmetadata"===e.type?u(this,e):"play"===e.type?l(this,e):this.ads.isInAdMode()&&(this.ads.isContentResuming()?a(this,"content",e):a(this,"ad",e))}var d={},f=function(){!function(n){if(e.dom.isInFrame()&&"function"!=typeof t.__tcfapi){for(var r,i=t,a={};i;){try{if(i.frames.__tcfapiLocator){r=i;break}}catch(e){}if(i===t.top)break;i=i.parent}if(!r)return;t.__tcfapi=function(e,t,n,i){var o=Math.random()+"",s={__tcfapiCall:{command:e,parameter:i,version:t,callId:o}};a[o]=n,r.postMessage(s,"*")},t.addEventListener("message",(function(e){var t={};try{t="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){}var n=t.__tcfapiReturn;n&&"function"==typeof a[n.callId]&&(a[n.callId](n.returnValue,n.success),a[n.callId]=null)}),!1)}}(),"function"==typeof t.__tcfapi&&t.__tcfapi("addEventListener",2,(function(e,t){t&&(d=e)}))},h=function(e,t){return t?encodeURIComponent(e):e},p=function(e,t,n){if(e&&e[n])for(var r=e[n],i=Object.keys(r),a=0;a<i.length;a++)t["{mediainfo."+n+"."+i[a]+"}"]=r[i[a]]},g={processMetadataTracks:function(e,t){for(var n=e.textTracks(),r=function(n){"metadata"===n.kind&&(e.ads.cueTextTracks.setMetadataTrackMode(n),t(e,n))},i=0;i<n.length;i++)r(n[i]);n.addEventListener("addtrack",(function(e){r(e.track)}))},setMetadataTrackMode:function(e){},getSupportedAdCue:function(e,t){return t},isSupportedAdCue:function(e,t){return!0},getCueId:function(e,t){return t.id}},m=function(e,t){return void 0!==t&&e.ads.includedCues[t]},y=function(e,t){void 0!==t&&""!==t&&(e.ads.includedCues[t]=!0)};function v(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug("Playback was canceled by cancelContentPlay"),this.pause()),this.ads._cancelledPlay=!0)}g.processAdTrack=function(t,n,r,i){t.ads.includedCues={};for(var a=0;a<n.length;a++){var o=n[a],s=this.getSupportedAdCue(t,o);if(!this.isSupportedAdCue(t,o))return void e.log.warn("Skipping as this is not a supported ad cue.",o);var u=this.getCueId(t,o),l=o.startTime;if(m(t,u))return void e.log("Skipping ad already seen with ID "+u);i&&i(t,s,u,l),r(t,s,u,l),y(t,u)}};var _={},T=e;_.isMiddlewareMediatorSupported=function(){return!T.browser.IS_IOS&&!T.browser.IS_ANDROID&&!!(T.use&&T.middleware&&T.middleware.TERMINATOR)},_.playMiddleware=function(t){return{setSource:function(e,t){t(null,e)},callPlay:function(){if(t.ads&&!0===t.ads._shouldBlockPlay)return t.ads.debug("Using playMiddleware to block content playback"),t.ads._playBlocked=!0,T.middleware.TERMINATOR},play:function(n,r){t.ads&&t.ads._playBlocked&&n?(t.ads.debug("Play call to Tech was terminated."),t.trigger("play"),t.addClass("vjs-has-started"),t.ads._playBlocked=!1):r&&r.catch&&r.catch((function(n){"NotAllowedError"!==n.name||e.browser.IS_SAFARI||t.trigger("pause")}))}}},_.testHook=function(e){T=e};var b=_.playMiddleware,E=_.isMiddlewareMediatorSupported,S=function(){if(e.getPlugin)return Boolean(e.getPlugin("ads"));var t=e.getComponent("Player");return Boolean(t&&t.prototype.ads)},A=function(){function e(){}return e.getState=function(t){if(t)return e.states_&&e.states_[t]?e.states_[t]:void 0},e.registerState=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal state name, "'+t+'"; must be a non-empty string.');return e.states_||(e.states_={}),e.states_[t]=n,n},e}(),C=function(){function t(e){this.player=e}t._getName=function(){return"Anonymous State"};var n=t.prototype;return n.transitionTo=function(e){var t=this.player;this.cleanup(t);var n=new e(t);t.ads._state=n,t.ads.debug(this.constructor._getName()+" -> "+n.constructor._getName());for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];n.init.apply(n,[t].concat(i))},n.init=function(){},n.cleanup=function(){},n.onPlay=function(){},n.onPlaying=function(){},n.onEnded=function(){},n.onAdEnded=function(){},n.onAdsReady=function(){e.log.warn("Unexpected adsready event")},n.onAdsError=function(){},n.onAdsCanceled=function(){},n.onAdTimeout=function(){},n.onAdStarted=function(){},n.onContentChanged=function(){},n.onContentResumed=function(){},n.onReadyForPostroll=function(){e.log.warn("Unexpected readyforpostroll event")},n.onNoPreroll=function(){},n.onNoPostroll=function(){},n.startLinearAdMode=function(){e.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor._getName()+")")},n.endLinearAdMode=function(){e.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor._getName()+")")},n.skipLinearAdMode=function(){e.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor._getName()+")")},n.isAdState=function(){throw new Error("isAdState unimplemented for "+this.constructor._getName())},n.isWaitingForAdBreak=function(){return!1},n.isContentResuming=function(){return!1},n.inAdBreak=function(){return!1},n.handleEvent=function(e){var t=this.player;"play"===e?this.onPlay(t):"adsready"===e?this.onAdsReady(t):"adserror"===e?this.onAdsError(t):"adscanceled"===e?this.onAdsCanceled(t):"adtimeout"===e?this.onAdTimeout(t):"ads-ad-started"===e?this.onAdStarted(t):"contentchanged"===e?this.onContentChanged(t):"contentresumed"===e?this.onContentResumed(t):"readyforpostroll"===e?this.onReadyForPostroll(t):"playing"===e?this.onPlaying(t):"ended"===e?this.onEnded(t):"nopreroll"===e?this.onNoPreroll(t):"nopostroll"===e?this.onNoPostroll(t):"adended"===e&&this.onAdEnded(t)},t}();function w(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}A.registerState("State",C);var I=function(e){function t(t){var n;return(n=e.call(this,t)||this).contentResuming=!1,n.waitingForAdBreak=!1,n}w(t,e);var n=t.prototype;return n.isAdState=function(){return!0},n.onPlaying=function(){var e=A.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},n.onContentResumed=function(){var e=A.getState("ContentPlayback");this.contentResuming&&this.transitionTo(e)},n.isWaitingForAdBreak=function(){return this.waitingForAdBreak},n.isContentResuming=function(){return this.contentResuming},n.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},t}(C);A.registerState("AdState",I);var R=function(e){function t(){return e.apply(this,arguments)||this}w(t,e);var n=t.prototype;return n.isAdState=function(){return!1},n.onContentChanged=function(e){var t=A.getState("BeforePreroll"),n=A.getState("Preroll");e.ads.debug("Received contentchanged event (ContentState)"),e.paused()?this.transitionTo(t):(this.transitionTo(n,!1),e.pause(),e.ads._pausedOnContentupdate=!0)},t}(C);A.registerState("ContentState",R);var O,P=function(t){function n(){return t.apply(this,arguments)||this}w(n,t),n._getName=function(){return"AdsDone"};var r=n.prototype;return r.init=function(e){e.ads._contentHasEnded=!0,e.trigger("ended")},r.startLinearAdMode=function(){e.log.warn("Unexpected startLinearAdMode invocation (AdsDone)")},n}(A.getState("ContentState"));A.registerState("AdsDone",P);var D={start:function(t){t.ads.debug("Starting ad break"),t.ads._inLinearAdMode=!0,t.trigger("adstart"),t.ads.shouldTakeSnapshots()&&(t.ads.snapshot=function(t){var n;n=e.browser.IS_IOS&&t.ads.isLive(t)&&t.seekable().length>0?t.currentTime()-t.seekable().end(0):t.currentTime();var r=t.$(".vjs-tech"),i=t.textTracks?t.textTracks():[],a=[],o={ended:t.ended(),currentSrc:t.currentSrc(),sources:t.currentSources(),src:t.tech_.src(),currentTime:n,type:t.currentType()};r&&(o.style=r.getAttribute("style"));for(var s=0;s<i.length;s++){var u=i[s];a.push({track:u,mode:u.mode}),u.mode="disabled"}return o.suppressedTracks=a,o}(t)),t.ads.shouldPlayContentBehindAd(t)&&(t.ads.preAdVolume_=t.volume(),t.volume(0)),t.addClass("vjs-ad-playing"),t.hasClass("vjs-live")&&t.removeClass("vjs-live"),t.ads.removeNativePoster()},end:function(t,n){t.ads.debug("Ending ad break"),void 0===n&&(n=function(){}),t.ads.adType=null,t.ads._inLinearAdMode=!1,t.trigger("adend"),t.removeClass("vjs-ad-playing"),t.ads.isLive(t)&&t.addClass("vjs-live"),t.ads.shouldTakeSnapshots()?function(t,n){var r=t.ads.snapshot;if(void 0===n&&(n=function(){}),!0===t.ads.disableNextSnapshotRestore)return t.ads.disableNextSnapshotRestore=!1,delete t.ads.snapshot,void n();var i,a=t.$(".vjs-tech"),o=20,s=r.suppressedTracks,u=function(){for(var e=0;e<s.length;e++)(i=s[e]).track.mode=i.mode},l=function(){var n;if(e.browser.IS_IOS&&t.ads.isLive(t)){if(r.currentTime<0&&(n=t.seekable().length>0?t.seekable().end(0)+r.currentTime:t.currentTime(),t.currentTime(n)),t.paused()){var i=t.play();i&&i.catch&&i.catch((function(t){e.log.warn("Play promise rejected in IOS snapshot resume",t)}))}}else if(r.ended)t.currentTime(t.duration());else{t.currentTime(r.currentTime);var a=t.play();a&&a.catch&&a.catch((function(t){e.log.warn("Play promise rejected in snapshot resume",t)}))}t.ads.shouldRemoveAutoplay_&&(t.autoplay(!1),t.ads.shouldRemoveAutoplay_=!1)},c=function n(){if(t.off("contentcanplay",n),O&&t.clearTimeout(O),(a=t.el().querySelector(".vjs-tech")).readyState>1)return l();if(void 0===a.seekable)return l();if(a.seekable.length>0)return l();if(o--)t.setTimeout(n,50);else try{l()}catch(t){e.log.warn("Failed to resume the content after an advertisement",t)}};if("style"in r&&a.setAttribute("style",r.style||""),t.ads.videoElementRecycled())t.one("resumeended",(function(){delete t.ads.snapshot,n()})),t.one("contentloadedmetadata",u),e.browser.IS_IOS&&!t.autoplay()&&(t.autoplay(!0),t.ads.shouldRemoveAutoplay_=!0),t.src(r.sources),t.one("contentcanplay",c),O=t.setTimeout(c,2e3);else{if(u(),!t.ended()){var d=t.play();d&&d.catch&&d.catch((function(t){e.log.warn("Play promise rejected in snapshot restore",t)}))}delete t.ads.snapshot,n()}}(t,n):(t.volume(t.ads.preAdVolume_),n())}},M=function(t){function n(){return t.apply(this,arguments)||this}w(n,t),n._getName=function(){return"Preroll"};var r=n.prototype;return r.init=function(e,t,n){if(this.waitingForAdBreak=!0,e.addClass("vjs-ad-loading"),n||e.ads.nopreroll_)return this.resumeAfterNoPreroll(e);var r=e.ads.settings.timeout;"number"==typeof e.ads.settings.prerollTimeout&&(r=e.ads.settings.prerollTimeout),this._timeout=e.setTimeout((function(){e.trigger("adtimeout")}),r),t?this.handleAdsReady():this.adsReady=!1},r.onAdsReady=function(t){t.ads.inAdBreak()?e.log.warn("Unexpected adsready event (Preroll)"):(t.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},r.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},r.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},r.noPreroll=function(){var e=this;this.afterLoadStart((function(){e.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),e.resumeAfterNoPreroll(e.player)}))},r.readyForPreroll=function(){var e=this.player;this.afterLoadStart((function(){e.ads.debug("Triggered readyforpreroll event (Preroll)"),e.trigger("readyforpreroll")}))},r.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (Preroll)"),this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},r.onAdsError=function(t){var n=this;e.log("adserror (Preroll)"),this.inAdBreak()?t.ads.endLinearAdMode():this.afterLoadStart((function(){n.resumeAfterNoPreroll(t)}))},r.startLinearAdMode=function(){var t=this.player;!this.adsReady||t.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(this.clearTimeout(t),t.ads.adType="preroll",this.waitingForAdBreak=!1,D.start(t),t.ads._shouldBlockPlay=!1)},r.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},r.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(e.removeClass("vjs-ad-loading"),e.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,D.end(e))},r.skipLinearAdMode=function(){var t=this,n=this.player;n.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){n.trigger("adskip"),n.ads.debug("skipLinearAdMode (Preroll)"),t.resumeAfterNoPreroll(n)}))},r.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (Preroll)"),t.resumeAfterNoPreroll(e)}))},r.onNoPreroll=function(t){t.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()},r.resumeAfterNoPreroll=function(e){if(this.contentResuming=!0,e.ads._shouldBlockPlay=!1,this.cleanupPartial(e),e.ads._playRequested||e.ads._pausedOnContentupdate)if(e.paused()){e.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var t=e.play();t&&t.then&&t.then(null,(function(e){}))}else e.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),e.trigger("play"),e.trigger("playing")},r.cleanup=function(t){t.ads._hasThereBeenALoadStartDuringPlayerLife||e.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(t)},r.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},r.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},n}(A.getState("AdState"));A.registerState("Preroll",M);var N=function(e){function t(){return e.apply(this,arguments)||this}w(t,e),t._getName=function(){return"BeforePreroll"};var n=t.prototype;return n.init=function(e){this.adsReady=!1,this.shouldResumeToContent=!1,e.ads._shouldBlockPlay=!e.ads.settings.allowVjsAutoplay||!e.autoplay()},n.onAdsReady=function(e){e.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0},n.onPlay=function(e){var t=A.getState("Preroll");e.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(t,this.adsReady,this.shouldResumeToContent)},n.onAdsCanceled=function(e){e.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0},n.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.shouldResumeToContent=!0},n.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0},n.skipLinearAdMode=function(){var e=this.player;e.trigger("adskip"),e.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0},n.onContentChanged=function(){this.init(this.player)},t}(A.getState("ContentState"));A.registerState("BeforePreroll",N);var L=function(e){function t(){return e.apply(this,arguments)||this}w(t,e),t._getName=function(){return"Midroll"};var n=t.prototype;return n.init=function(e){e.ads.adType="midroll",D.start(e),e.addClass("vjs-ad-loading")},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(this.contentResuming=!0,e.addClass("vjs-ad-content-resuming"),e.removeClass("vjs-ad-loading"),D.end(e))},n.onAdsError=function(e){this.inAdBreak()&&e.ads.endLinearAdMode()},n.cleanup=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming")},t}(A.getState("AdState"));A.registerState("Midroll",L);var k=function(t){function n(){return t.apply(this,arguments)||this}w(n,t),n._getName=function(){return"Postroll"};var r=n.prototype;return r.init=function(e){if(this.waitingForAdBreak=!0,e.ads._contentEnding=!0,e.ads.nopostroll_){this.resumeContent(e);var t=A.getState("AdsDone");this.transitionTo(t)}else{e.addClass("vjs-ad-loading");var n=e.ads.settings.timeout;"number"==typeof e.ads.settings.postrollTimeout&&(n=e.ads.settings.postrollTimeout),this._postrollTimeout=e.setTimeout((function(){e.trigger("adtimeout")}),n)}},r.startLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(t.ads.adType="postroll",t.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,D.start(t))},r.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},r.endLinearAdMode=function(){var e=this,t=this.player,n=A.getState("AdsDone");this.inAdBreak()&&(t.removeClass("vjs-ad-loading"),this.resumeContent(t),D.end(t,(function(){e.transitionTo(n)})))},r.skipLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?e.log.warn("Unexpected skipLinearAdMode invocation"):(t.ads.debug("Postroll abort (skipLinearAdMode)"),t.trigger("adskip"),this.abort(t))},r.onAdTimeout=function(e){e.ads.debug("Postroll abort (adtimeout)"),this.abort(e)},r.onAdsError=function(e){e.ads.debug("Postroll abort (adserror)"),e.ads.inAdBreak()?e.ads.endLinearAdMode():this.abort(e)},r.onContentChanged=function(e){if(this.isContentResuming()){var t=A.getState("BeforePreroll");this.transitionTo(t)}else if(!this.inAdBreak()){var n=A.getState("Preroll");this.transitionTo(n)}},r.onNoPostroll=function(t){this.isContentResuming()||this.inAdBreak()?e.log.warn("Unexpected nopostroll event (Postroll)"):this.abort(t)},r.resumeContent=function(e){this.contentResuming=!0,e.addClass("vjs-ad-content-resuming")},r.abort=function(e){var t=A.getState("AdsDone");this.resumeContent(e),e.removeClass("vjs-ad-loading"),this.transitionTo(t)},r.cleanup=function(e){e.removeClass("vjs-ad-content-resuming"),e.clearTimeout(this._postrollTimeout),e.ads._contentEnding=!1},n}(A.getState("AdState"));A.registerState("Postroll",k);var x=function(e){function t(){return e.apply(this,arguments)||this}w(t,e),t._getName=function(){return"ContentPlayback"};var n=t.prototype;return n.init=function(e){e.ads._shouldBlockPlay=!1},n.onAdsReady=function(e){e.ads.debug("Received adsready event (ContentPlayback)"),e.ads.nopreroll_||(e.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),e.trigger("readyforpreroll"))},n.onReadyForPostroll=function(e){var t=A.getState("Postroll");e.ads.debug("Received readyforpostroll event"),this.transitionTo(t)},n.startLinearAdMode=function(){var e=A.getState("Midroll");this.transitionTo(e)},t}(A.getState("ContentState"));A.registerState("ContentPlayback",x);var F=function(e){function t(){return e.apply(this,arguments)||this}w(t,e),t._getName=function(){return"StitchedContentPlayback"};var n=t.prototype;return n.init=function(){this.player.ads._shouldBlockPlay=!1},n.onContentChanged=function(){this.player.ads.debug("Received contentchanged event ("+this.constructor._getName()+")")},n.startLinearAdMode=function(){var e=A.getState("StitchedAdRoll");this.transitionTo(e)},t}(A.getState("ContentState"));A.registerState("StitchedContentPlayback",F);var U=function(e){function t(){return e.apply(this,arguments)||this}w(t,e),t._getName=function(){return"StitchedAdRoll"};var n=t.prototype;return n.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",D.start(this.player)},n.onPlaying=function(){},n.onContentResumed=function(){},n.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended")},n.endLinearAdMode=function(){var e=A.getState("StitchedContentPlayback");D.end(this.player),this.transitionTo(e)},t}(A.getState("AdState"));A.registerState("StitchedAdRoll",U);var B=_.isMiddlewareMediatorSupported,j=e.getTech("Html5").Events,H={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:e.options.normalizeAutoplay||!1},G=function(i){var a=this,o=e.mergeOptions(H,i),s=[];j.concat(["firstplay","loadedalldata"]).forEach((function(e){-1===s.indexOf(e)&&s.push(e)})),a.on(s,c),B()||function(t,n){n&&e.log("Using cancelContentPlay to block content playback"),t.on("play",v)}(a,o.debug),a.setTimeout((function(){a.ads._hasThereBeenALoadStartDuringPlayerLife||""===a.src()||e.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html")}),5e3),a.on("ended",(function(){a.hasClass("vjs-has-started")||a.addClass("vjs-has-started")})),a.on("contenttimeupdate",(function(){a.removeClass("vjs-waiting")})),a.on(["addurationchange","adcanplay"],(function(){if(!a.ads.settings.stitchedAds&&!a.hasStarted()&&(!a.ads.snapshot||a.currentSrc()!==a.ads.snapshot.currentSrc)&&a.ads.inAdBreak()){var t=a.play();t&&t.catch&&t.catch((function(t){e.log.warn("Play promise rejected when playing ad",t)}))}})),a.on("nopreroll",(function(){a.ads.debug("Received nopreroll event"),a.ads.nopreroll_=!0})),a.on("nopostroll",(function(){a.ads.debug("Received nopostroll event"),a.ads.nopostroll_=!0})),a.on("playing",(function(){a.ads._cancelledPlay=!1,a.ads._pausedOnContentupdate=!1})),a.on("play",(function(){a.ads._playRequested=!0})),a.one("loadstart",(function(){a.ads._hasThereBeenALoadStartDuringPlayerLife=!0})),a.on("loadeddata",(function(){a.ads._hasThereBeenALoadedData=!0})),a.on("loadedmetadata",(function(){a.ads._hasThereBeenALoadedMetaData=!0})),a.ads=function(t){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,adType:null,VERSION:r,reset:function(){t.ads.disableNextSnapshotRestore=!1,t.ads._contentEnding=!1,t.ads._contentHasEnded=!1,t.ads.snapshot=null,t.ads.adType=null,t.ads._hasThereBeenALoadedData=!1,t.ads._hasThereBeenALoadedMetaData=!1,t.ads._cancelledPlay=!1,t.ads._shouldBlockPlay=!1,t.ads._playBlocked=!1,t.ads.nopreroll_=!1,t.ads.nopostroll_=!1,t.ads._playRequested=!1},startLinearAdMode:function(){t.ads._state.startLinearAdMode()},endLinearAdMode:function(){t.ads._state.endLinearAdMode()},skipLinearAdMode:function(){t.ads._state.skipLinearAdMode()},stitchedAds:function(t){return void 0!==t&&(e.log.warn("Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads."),this.settings.stitchedAds=!!t),this.settings.stitchedAds},videoElementRecycled:function(){if(t.ads.shouldPlayContentBehindAd(t))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var e=t.tech_.src()!==this.snapshot.src,n=t.currentSrc()!==this.snapshot.currentSrc;return e||n},isLive:function(n){return void 0===n&&(n=t),"boolean"==typeof n.ads.settings.contentIsLive?n.ads.settings.contentIsLive:n.duration()===1/0||"8"===e.browser.IOS_VERSION&&0===n.duration()},shouldPlayContentBehindAd:function(n){if(void 0===n&&(n=t),n)return!!n.ads.settings.liveCuePoints&&!e.browser.IS_IOS&&!e.browser.IS_ANDROID&&n.duration()===1/0;throw new Error("shouldPlayContentBehindAd requires a player as a param")},shouldTakeSnapshots:function(e){return void 0===e&&(e=t),!this.shouldPlayContentBehindAd(e)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var e=t.$(".vjs-tech");e&&e.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];1===n.length&&"string"==typeof n[0]?e.log("ADS: "+n[0]):e.log.apply(e,["ADS:"].concat(n))}}}}(a),a.ads.settings=o,o.stitchedAds=!!o.stitchedAds,o.stitchedAds?a.ads._state=new(A.getState("StitchedContentPlayback"))(a):a.ads._state=new(A.getState("BeforePreroll"))(a),a.ads._state.init(a),a.ads.cueTextTracks=g,a.ads.adMacroReplacement=function(r,i,a){var o=this,s={};r=r.replace(/{([^}=]+)=([^}]+)}/g,(function(e,t,n){return s["{"+t+"}"]=n,"{"+t+"}"})),void 0===i&&(i=!1);var u={};for(var l in void 0!==a&&(u=a),u["{player.id}"]=this.options_["data-player"]||this.id_,u["{player.height}"]=this.currentHeight(),u["{player.width}"]=this.currentWidth(),u["{mediainfo.id}"]=this.mediainfo?this.mediainfo.id:"",u["{mediainfo.name}"]=this.mediainfo?this.mediainfo.name:"",u["{mediainfo.duration}"]=this.mediainfo?this.mediainfo.duration:"",u["{player.duration}"]=this.duration(),u["{player.pageUrl}"]=e.dom.isInFrame()?n.referrer:t.location.href,u["{playlistinfo.id}"]=this.playlistinfo?this.playlistinfo.id:"",u["{playlistinfo.name}"]=this.playlistinfo?this.playlistinfo.name:"",u["{timestamp}"]=(new Date).getTime(),u["{document.referrer}"]=n.referrer,u["{window.location.href}"]=t.location.href,u["{random}"]=Math.floor(1e12*Math.random()),["description","tags","reference_id","ad_keys"].forEach((function(e){o.mediainfo&&o.mediainfo[e]?u["{mediainfo."+e+"}"]=o.mediainfo[e]:s["{mediainfo."+e+"}"]?u["{mediainfo."+e+"}"]=s["{mediainfo."+e+"}"]:u["{mediainfo."+e+"}"]=""})),p(this.mediainfo,u,"custom_fields"),p(this.mediainfo,u,"customFields"),Object.keys(d).forEach((function(e){u["{tcf."+e+"}"]=d[e]})),u["{tcf.gdprAppliesInt}"]=d.gdprApplies?1:0,u)r=r.split(l).join(h(u[l],i));for(var c in r=r.replace(/{pageVariable\.([^}]+)}/g,(function(n,r){for(var a,o=t,u=r.split("."),l=0;l<u.length;l++)l===u.length-1?a=o[u[l]]:o=o[u[l]];var c=typeof a;return null===a?"null":void 0===a?s["{pageVariable."+r+"}"]?s["{pageVariable."+r+"}"]:(e.log.warn('Page variable "'+r+'" not found'),""):"string"!==c&&"number"!==c&&"boolean"!==c?(e.log.warn('Page variable "'+r+'" is not a supported type'),""):h(String(a),i)})),s)r=r.replace(c,s[c]);return r}.bind(a),function(e){e.ads.contentSrc=e.currentSrc(),e.ads._seenInitialLoadstart=!1,e.on("loadstart",(function(){if(!e.ads.inAdBreak()){var t=e.currentSrc();t!==e.ads.contentSrc&&(e.ads._seenInitialLoadstart&&e.trigger({type:"contentchanged"}),e.trigger({type:"contentupdate",oldValue:e.ads.contentSrc,newValue:t}),e.ads.contentSrc=t),e.ads._seenInitialLoadstart=!0}}))}(a),a.on("contentchanged",a.ads.reset);var u=function(){var t=a.textTracks();if(!a.ads.shouldPlayContentBehindAd(a)&&a.ads.inAdBreak()&&a.tech_.featuresNativeTextTracks&&e.browser.IS_IOS&&!Array.isArray(a.textTracks()))for(var n=0;n<t.length;n++){var r=t[n];"showing"===r.mode&&(r.mode="disabled")}};a.ready((function(){a.textTracks().addEventListener("change",u)})),a.on(["play","playing","ended","adsready","adscanceled","adskip","adserror","adtimeout","adended","ads-ad-started","contentchanged","dispose","contentresumed","readyforpostroll","nopreroll","nopostroll"],(function(e){a.ads._state.handleEvent(e.type)})),a.on("dispose",(function(){a.ads.reset(),a.textTracks().removeEventListener("change",u)})),f(),a.ads.listenToTcf=f};return G.VERSION=r,function(t){!S(e)&&((e.registerPlugin||e.plugin)("ads",t),E()&&!e.usingContribAdsMiddleware_&&(e.use("*",b),e.usingContribAdsMiddleware_=!0,e.log.debug("Play middleware has been registered with videojs")))}(G),G}(n(4),n(0),n(2))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=W(n(110)),i=W(n(6)),a=W(n(15)),o=W(n(16)),s=W(n(206)),u=W(n(208)),l=W(n(281)),c=W(n(282)),d=W(n(283)),f=W(n(289)),h=W(n(301)),p=W(n(135)),g=W(n(302)),m=W(n(71)),y=W(n(79)),v=W(n(69)),_=W(n(303)),T=W(n(305)),b=W(n(306)),E=W(n(121)),S=W(n(125)),A=W(n(307)),C=W(n(126)),w=W(n(308)),I=W(n(8)),R=W(n(17)),O=W(n(9)),P=W(n(10)),D=W(n(31)),M=W(n(1)),N=W(n(34)),L=n(136),k=W(n(309)),x=W(n(313)),F=W(n(321)),U=W(n(333)),B=n(12),j=W(n(334)),H=W(n(70)),G=W(n(11)),q=n(23),V=W(n(131)),Y=W(n(21)),K=W(n(40));function W(e){return e&&e.__esModule?e:{default:e}}function z(){var e="You must first call initialize() and set a source before calling this method",t="You must first call initialize() and set a valid source and view before calling this method",n="You must first call attachView() to set the video element before calling this method",W="You must first call attachSource() with a valid source before calling this method",z="MediaPlayer not initialized!",X=this.context,Q=(0,O.default)(X).getInstance(),$=(0,N.default)(X).getInstance(),J=(0,I.default)(X).getInstance({settings:$}),Z=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,ce=void 0,de=void 0,fe=void 0,he=void 0,pe=void 0,ge=void 0,me=void 0,ye=void 0,ve=void 0,_e=void 0,Te=void 0,be=void 0,Ee=void 0,Se=void 0,Ae=void 0,Ce=void 0,we=void 0,Ie=void 0,Re=void 0,Oe=void 0,Pe=void 0,De=void 0,Me=void 0,Ne=void 0,Le=void 0;function ke(){Xe(null),Ke(null),ne=null,de&&(de.reset(),de=null),fe&&(fe.reset(),fe=null),De.reset(),$.reset(),pe&&(pe.reset(),pe=null)}function xe(){return!!te&&!!Ie.getElement()}function Fe(){return(0,L.getVersionString)()}function Ue(){if(!ae)throw t;return Se.isPaused()}function Be(e){var t=Ae.getCurrentDVRInfo();if(!t)return 0;var n=Se.getLiveDelay(),r=t.range.start+e;return r>t.range.end-n&&(r=t.range.end-n),r}function je(e){if(!ae)throw t;var n=Ye().currentTime;if(void 0!==e)n=be.getTimeRelativeToStreamId(n,e);else if(Se.getIsDynamic()){var r=Ae.getCurrentDVRInfo();n=null===r||0===n?0:Math.max(0,n-r.range.start)}return n}function He(){if(!ae)throw t;var e=Ye().duration;if(Se.getIsDynamic()){var n=Ae.getCurrentDVRInfo();e=n?n.range.end-n.range.start:0}return e}function Ge(e){(0,q.checkParameterType)(e,"boolean"),oe=e}function qe(){me.restoreDefaultUTCTimingSources()}function Ve(){return Ae}function Ye(){if(!Ie.getElement())throw n;return Ie.getElement()}function Ke(e){if(!re)throw z;Ie.setElement(e),e&&(Ze(),function(){if(fe)return;var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(X).create();fe=t.createMetricsReporting({debug:J,eventBus:Q,mediaElement:Ye(),adapter:ge,dashMetrics:Ae,events:P.default,constants:i.default,metricsConstants:o.default})}}(),function(){if(he)return;var e=dashjs.MssHandler;"function"==typeof e&&(R.default.extend(e.errors),he=e(X).create({eventBus:Q,mediaPlayerModel:me,dashMetrics:Ae,manifestModel:Ce,playbackController:Se,streamController:be,protectionController:de,baseURLController:ve,errHandler:ye,events:P.default,constants:i.default,debug:J,initSegmentType:B.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:j.default,ISOBoxer:H.default,settings:$}))}(),be&&be.switchToVideoElement()),ae&&$e(),nt()}function We(t){if(!ie)throw e;var n=be.getActiveStreamInfo();return ce.getTracksFor(t,n)}function ze(e,t){var n=-1;e.some((function(e,r){if(e===t)return n=r,!0})),n<0||e.splice(n,1)}function Xe(e){if(!re)throw z;"string"==typeof e&&Oe.initialize(e),te=e,(ie||ae)&&$e(),xe()&&nt()}function Qe(){if(!ie)throw e;var t=be.getActiveStreamInfo();return t?be.getStreamById(t.id):null}function $e(){ae=!1,ie=!1,ge.reset(),be.reset(),Ee.reset(),Se.reset(),se.reset(),ce.reset(),Re.reset(),de&&($.get().streaming.keepProtectionMediaKeys?de.stop():(de.reset(),de=null,Ze())),we.reset()}function Je(){return(0,f.default)(X).create({debug:J,errHandler:ye,dashMetrics:Ae,mediaPlayerModel:me,requestModifier:(0,y.default)(X).getInstance(),mssHandler:he,settings:$})}function Ze(){if(de)return de;var e=dashjs.Protection;if("function"==typeof e){var t=e(X).create();return P.default.extend(e.events),D.default.extend(e.events,{publicOnly:!0}),R.default.extend(e.errors),_e||(_e=(0,p.default)(X).getInstance()),(de=t.createProtectionSystem({debug:J,errHandler:ye,videoModel:Ie,capabilities:_e,eventBus:Q,events:P.default,BASE64:j.default,constants:i.default,cmcdModel:we,settings:$}))&&(de.setLicenseRequestFilters(Me),de.setLicenseResponseFilters(Ne)),de}return null}function et(){if(!re)throw z;if(pe)return pe;var e=dashjs.OfflineController;if("function"==typeof e){P.default.extend(e.events),D.default.extend(e.events,{publicOnly:!0}),R.default.extend(e.errors);var t=Je(),n=(0,V.default)(X).create();return n.setConfig({manifestModel:Ce,adapter:ge,manifestLoader:t,errHandler:ye}),pe=e(X).create({debug:J,manifestUpdater:n,baseURLController:ve,manifestLoader:t,manifestModel:Ce,mediaPlayerModel:me,abrController:se,playbackController:Se,adapter:ge,errHandler:ye,dashMetrics:Ae,timelineConverter:le,schemeLoaderFactory:ue,eventBus:Q,events:P.default,errors:R.default,constants:i.default,settings:$,dashConstants:a.default,urlUtils:(0,Y.default)(X).getInstance()})}return null}function tt(e){var t=Ae.getCurrentDVRInfo();return t?e+(t.manifestInfo.availableFrom.getTime()/1e3+t.range.start):0}function nt(){var e;pe&&pe.resetRecords(),!ie&&te&&(ie=!0,ee.info("Streaming Initialized"),e=Je(),be||(be=(0,u.default)(X).getInstance()),Te.setConfig({capabilities:_e,adapter:ge,settings:$}),Te.setCustomCapabilitiesFilters(Le),be.setConfig({capabilities:_e,capabilitiesFilter:Te,manifestLoader:e,manifestModel:Ce,mediaPlayerModel:me,protectionController:de,adapter:ge,dashMetrics:Ae,errHandler:ye,timelineConverter:le,videoModel:Ie,playbackController:Se,abrController:se,mediaController:ce,textController:Re,settings:$,baseURLController:ve}),Ee.setConfig({settings:$,playbackController:Se,streamController:be,videoModel:Ie,timelineConverter:le,adapter:ge}),Se.setConfig({streamController:be,dashMetrics:Ae,mediaPlayerModel:me,adapter:ge,videoModel:Ie,timelineConverter:le,uriFragmentModel:Oe,settings:$}),se.setConfig({streamController:be,domStorage:Pe,mediaPlayerModel:me,dashMetrics:Ae,adapter:ge,videoModel:Ie,settings:$}),Re.setConfig({errHandler:ye,manifestModel:Ce,adapter:ge,mediaController:ce,streamController:be,videoModel:Ie}),we.setConfig({abrController:se,dashMetrics:Ae,playbackController:Se}),be.initialize(oe,ne),Ee.initialize(),we.initialize(),"string"==typeof te?be.load(te):be.loadWithManifest(te)),!ae&&xe()&&(ae=!0,ee.info("Playback Initialized"))}return Z={initialize:function(e,t,n){_e||(_e=(0,p.default)(X).getInstance()),ye=(0,h.default)(X).getInstance(),_e.supportsMediaSource()?re||(re=!0,le=(0,U.default)(X).getInstance(),se||(se=(0,E.default)(X).getInstance()).setConfig({settings:$}),ue||(ue=(0,S.default)(X).getInstance()),Se||(Se=(0,s.default)(X).getInstance()),ce||(ce=(0,c.default)(X).getInstance()),be||(be=(0,u.default)(X).getInstance()),Ee||(Ee=(0,l.default)(X).getInstance()),Te||(Te=(0,g.default)(X).getInstance()),ge=(0,x.default)(X).getInstance(),Ce=(0,T.default)(X).getInstance(),we=(0,C.default)(X).getInstance(),Ae=(0,F.default)(X).getInstance({settings:$}),Re=(0,v.default)(X).getInstance(),Pe=(0,w.default)(X).getInstance({settings:$}),ge.setConfig({constants:i.default,cea608parser:r.default,errHandler:ye,BASE64:j.default}),ve||(ve=(0,d.default)(X).create()),ve.setConfig({adapter:ge}),(De=(0,k.default)(X).getInstance({dashMetrics:Ae,mediaPlayerModel:me,errHandler:ye,baseURLController:ve,events:P.default,eventBus:Q,debug:J,boxParser:(0,K.default)(X).getInstance(),requestModifier:(0,y.default)(X).getInstance(),errors:R.default})).initialize(),ce.setConfig({domStorage:Pe,settings:$}),qe(),Ge(void 0===n||n),et(),e&&Ke(e),t&&Xe(t),ee.info("[dash.js "+Fe()+"] MediaPlayer has been initialized")):ye.error(new G.default(R.default.CAPABILITY_MEDIASOURCE_ERROR_CODE,R.default.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(e){e&&(e.capabilities&&(_e=e.capabilities),e.capabilitiesFilter&&(Te=e.capabilitiesFilter),e.streamController&&(be=e.streamController),e.gapController&&(Ee=e.gapController),e.playbackController&&(Se=e.playbackController),e.mediaPlayerModel&&(me=e.mediaPlayerModel),e.abrController&&(se=e.abrController),e.schemeLoaderFactory&&(ue=e.schemeLoaderFactory),e.mediaController&&(ce=e.mediaController),e.settings&&($=e.settings))},on:function(e,t,n,r){Q.on(e,t,n,r)},off:function(e,t,n){Q.off(e,t,n)},extend:function(e,t,n){M.default.extend(e,t,n,X)},attachView:Ke,attachSource:Xe,isReady:xe,preload:function(){if(Ie.getElement()||ie)return!1;if(!te)throw W;nt()},play:function(){if(!ae)throw t;(!oe||Ue()&&ae)&&Se.play()},isPaused:Ue,pause:function(){if(!ae)throw t;Se.pause()},isSeeking:function(){if(!ae)throw t;return Se.isSeeking()},isDynamic:function(){if(!ae)throw t;return Se.getIsDynamic()},seek:function(e){if(!ae)throw t;if((0,q.checkParameterType)(e,"number"),isNaN(e))throw i.default.BAD_ARGUMENT_ERROR;var n=Se.getIsDynamic()?Be(e):e;Se.seek(n)},setPlaybackRate:function(e){Ye().playbackRate=e},getPlaybackRate:function(){return Ye().playbackRate},setMute:function(e){(0,q.checkParameterType)(e,"boolean"),Ye().muted=e},isMuted:function(){return Ye().muted},setVolume:function(e){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw i.default.BAD_ARGUMENT_ERROR;Ye().volume=e},getVolume:function(){return Ye().volume},time:je,duration:He,timeAsUTC:function(){if(!ae)throw t;return je()<0?NaN:tt(je())},durationAsUTC:function(){if(!ae)throw t;return tt(He())},getActiveStream:Qe,getDVRWindowSize:function(){var e=Ae.getCurrentDVRInfo();return e?e.manifestInfo.DVRWindowSize:0},getDVRSeekOffset:Be,convertToTimeCode:function(e){e=Math.max(e,0);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);return(0===t?"":t<10?"0"+t.toString()+":":t.toString()+":")+(n<10?"0"+n.toString():n.toString())+":"+(r<10?"0"+r.toString():r.toString())},formatUTC:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=new Date(1e3*e),a=i.toLocaleDateString(t),o=i.toLocaleTimeString(t,{hour12:n});return r?o+" "+a:o},getVersion:Fe,getDebug:function(){return J},getBufferLength:function(e){var t=[i.default.VIDEO,i.default.AUDIO,i.default.FRAGMENTED_TEXT];if(e){if(-1!==t.indexOf(e)){var n=Ve().getCurrentBufferLevel(e);return n||NaN}return ee.warn("getBufferLength requested for invalid type"),NaN}var r=t.map((function(e){return We(e).length>0?Ve().getCurrentBufferLevel(e):Number.MAX_VALUE})).reduce((function(e,t){return Math.min(e,t)}));return r===Number.MAX_VALUE?NaN:r},getTTMLRenderingDiv:function(){return Ie?Ie.getTTMLRenderingDiv():null},getVideoElement:Ye,getSource:function(){if(!te)throw W;return te},getCurrentLiveLatency:function(){if(!re)throw z;return ae?Se.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(t){if(!ie)throw e;return se.getTopBitrateInfoFor(t)},setAutoPlay:Ge,getAutoPlay:function(){return oe},getDashMetrics:Ve,getQualityFor:function(t){if(!ie)throw e;if(t===i.default.IMAGE){var n=Qe();if(!n)return-1;var r=n.getThumbnailController();return r?r.getCurrentTrackIndex():-1}return se.getQualityFor(t)},setQualityFor:function(t,n){if(!ie)throw e;if(t===i.default.IMAGE){var r=Qe();if(!r)return;var a=r.getThumbnailController();a&&a.setTrackByIndex(n)}se.setPlaybackQuality(t,be.getActiveStreamInfo(),n)},updatePortalSize:function(){se.setElementSize(),se.setWindowResizeEventCalled(!0)},setTextDefaultLanguage:function(e){ee.warn('setTextDefaultLanguage is deprecated and will be removed in version 3.2.0. Please use setInitialMediaSettingsFor("fragmentedText", { lang: lang }) instead'),void 0===Re&&(Re=(0,v.default)(X).getInstance()),Re.setTextDefaultLanguage(e)},getTextDefaultLanguage:function(){return ee.warn('getTextDefaultLanguage is deprecated and will be removed in version 3.2.0. Please use getInitialMediaSettingsFor("fragmentedText").lang instead'),void 0===Re&&(Re=(0,v.default)(X).getInstance()),Re.getTextDefaultLanguage()},setTextDefaultEnabled:function(e){void 0===Re&&(Re=(0,v.default)(X).getInstance()),Re.setTextDefaultEnabled(e)},getTextDefaultEnabled:function(){return void 0===Re&&(Re=(0,v.default)(X).getInstance()),Re.getTextDefaultEnabled()},enableText:function(e){void 0===Re&&(Re=(0,v.default)(X).getInstance()),Re.enableText(e)},enableForcedTextStreaming:function(e){void 0===Re&&(Re=(0,v.default)(X).getInstance()),Re.enableForcedTextStreaming(e)},isTextEnabled:function(){return void 0===Re&&(Re=(0,v.default)(X).getInstance()),Re.isTextEnabled()},setTextTrack:function(e){if(!ae)throw t;void 0===Re&&(Re=(0,v.default)(X).getInstance()),Re.setTextTrack(e)},getBitrateInfoListFor:function(t){if(!ie)throw e;var n=Qe();return n?n.getBitrateListFor(t):[]},getStreamsFromManifest:function(t){if(!ie)throw e;return ge.getStreamsInfo(t)},getTracksFor:We,getTracksForTypeFromManifest:function(t,n,r){if(!ie)throw e;return(r=r||ge.getStreamsInfo(n,1)[0])?ge.getAllMediaInfoForType(r,t,n):[]},getCurrentTrackFor:function(t){if(!ie)throw e;var n=be.getActiveStreamInfo();return ce.getCurrentTrackFor(t,n)},setInitialMediaSettingsFor:function(e,t){if(!re)throw z;ce.setInitialSettings(e,t),e===i.default.FRAGMENTED_TEXT&&Re.setInitialSettings(t)},getInitialMediaSettingsFor:function(e){if(!re)throw z;return ce.getInitialSettings(e)},setCurrentTrack:function(t){if(!ie)throw e;ce.setTrack(t)},getTrackSwitchModeFor:function(e){if(!re)throw z;return ce.getSwitchMode(e)},setTrackSwitchModeFor:function(e,t){if(!re)throw z;ce.setSwitchMode(e,t)},setSelectionModeForInitialTrack:function(e){if(!re)throw z;ce.setSelectionModeForInitialTrack(e)},getSelectionModeForInitialTrack:function(){if(!re)throw z;return ce.getSelectionModeForInitialTrack()},addABRCustomRule:function(e,t,n){me.addABRCustomRule(e,t,n)},removeABRCustomRule:function(e){me.removeABRCustomRule(e)},removeAllABRCustomRule:function(){me.removeABRCustomRule()},getAverageThroughput:function(e){var t=se.getThroughputHistory();return t?t.getAverageThroughput(e):0},retrieveManifest:function(e,t){var n=Je(),r=this;Q.on(P.default.INTERNAL_MANIFEST_LOADED,(function e(i){i.error?t(null,i.error):t(i.manifest),Q.off(P.default.INTERNAL_MANIFEST_LOADED,e,r),n.reset()}),r),Oe.initialize(e),n.load(e)},addUTCTimingSource:function(e,t){me.addUTCTimingSource(e,t)},removeUTCTimingSource:function(e,t){me.removeUTCTimingSource(e,t)},clearDefaultUTCTimingSources:function(){me.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:qe,setXHRWithCredentialsForType:function(e,t){me.setXHRWithCredentialsForType(e,t)},getXHRWithCredentialsForType:function(e){return me.getXHRWithCredentialsForType(e)},getProtectionController:function(){return Ze()},attachProtectionController:function(e){de=e},setProtectionData:function(e){ne=e,be&&be.setProtectionData(ne)},registerLicenseRequestFilter:function(e){Me.push(e),de&&de.setLicenseRequestFilters(Me)},registerLicenseResponseFilter:function(e){Ne.push(e),de&&de.setLicenseResponseFilters(Ne)},unregisterLicenseRequestFilter:function(e){ze(Me,e),de&&de.setLicenseRequestFilters(Me)},unregisterLicenseResponseFilter:function(e){ze(Ne,e),de&&de.setLicenseResponseFilters(Ne)},registerCustomCapabilitiesFilter:function(e){Le.push(e),Te&&Te.setCustomCapabilitiesFilters(Le)},unregisterCustomCapabilitiesFilter:function(e){ze(Le,e),Te&&Te.setCustomCapabilitiesFilters(Le)},displayCaptionsOnTop:function(e){var t=(0,m.default)(X).getInstance();t.setConfig({videoModel:Ie}),t.initialize(),t.setDisplayCConTop(e)},attachTTMLRenderingDiv:function(e){if(!Ie.getElement())throw n;Ie.setTTMLRenderingDiv(e)},getCurrentTextTrackIndex:function(){var e=NaN;return Re&&(e=Re.getCurrentTrackIdx()),e},provideThumbnail:function(e,t){if("function"==typeof t)if(e<0)t(null);else{var n=Se.getIsDynamic()?Be(e):e,r=be.getStreamForTime(n);if(null!==r){var i=r.getThumbnailController();if(i){var a=be.getTimeRelativeToStreamId(n,r.getId());return i.provide(a,t)}t(null)}else t(null)}},getDashAdapter:function(){return ge},getOfflineController:function(){return et()},getSettings:function(){return $.get()},updateSettings:function(e){$.update(e)},resetSettings:function(){$.reset()},reset:ke,destroy:function(){ke(),Me=[],Ne=[],Le=[],M.default.deleteSingletonInstances(X)}},ee=J.getLogger(Z),re=!1,ae=!1,ie=!1,oe=!0,de=null,pe=null,ne=null,ge=null,De=null,P.default.extend(D.default),me=(0,b.default)(X).getInstance(),Ie=(0,A.default)(X).getInstance(),Oe=(0,_.default)(X).getInstance(),Me=[],Ne=[],Le=[],Z}z.__dashjs_factory_name="MediaPlayer";var X=M.default.getClassFactory(z);X.events=D.default,X.errors=R.default,M.default.updateClassFactory(z.__dashjs_factory_name,X),t.default=X},function(e,t,n){"use strict";!function(e){var t={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},n=function(e){var n=e;return t.hasOwnProperty(e)&&(n=t[e]),String.fromCharCode(n)},r=15,i=32,a={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},l=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&this.time}},d=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},f=function(e,t,n,r,i){this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1};f.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},copy:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var h=function(e,t,n,r,i,a){this.uchar=e||" ",this.penState=new f(t,n,r,i,a)};h.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(e,t){this.uchar=e,this.penState.copy(t)},setPenState:function(e){this.penState.copy(e)},equals:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},copy:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var p=function(){this.chars=[];for(var e=0;e<i;e++)this.chars.push(new h);this.pos=0,this.currPenState=new f};p.prototype={equals:function(e){for(var t=!0,n=0;n<i;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<i;t++)this.chars[t].copy(e.chars[t])},isEmpty:function(){for(var e=!0,t=0;t<i;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},setCursor:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(c.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>i&&(c.log("ERROR","Too large cursor position "+this.pos),this.pos=i)},moveCursor:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(e){e>=144&&this.backSpace();var t=n(e);this.pos>=i?c.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t<i;t++)this.chars[t].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var e=[],t=!0,n=0;n<i;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},setPenStyles:function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}};var g=function(){this.rows=[];for(var e=0;e<r;e++)this.rows.push(new p);this.currRow=14,this.nrRollUpRows=null,this.reset()};g.prototype={reset:function(){for(var e=0;e<r;e++)this.rows[e].clear();this.currRow=14},equals:function(e){for(var t=!0,n=0;n<r;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<r;t++)this.rows[t].copy(e.rows[t])},isEmpty:function(){for(var e=!0,t=0;t<r;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(e){this.rows[this.currRow].insertChar(e)},setPen:function(e){this.rows[this.currRow].setPenStyles(e)},moveCursor:function(e){this.rows[this.currRow].moveCursor(e)},setCursor:function(e){c.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},setPAC:function(e){c.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.currRow=t;var n=this.rows[this.currRow];if(null!==e.indent){var r=e.indent,i=Math.max(r-1,0);n.setCursor(e.indent),e.color=n.chars[i].penState.foreground}var a={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(a)},setBkgData:function(e){c.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},setRollUpRows:function(e){this.nrRollUpRows=e},rollUp:function(){if(null!==this.nrRollUpRows){c.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),c.log("INFO","Rolling up")}else c.log("DEBUG","roll_up but nrRollUpRows not set yet")},getDisplayText:function(e){e=e||!1;for(var t=[],n="",i=-1,a=0;a<r;a++){var o=this.rows[a].getTextString();o&&(i=a+1,e?t.push("Row "+i+': "'+o+'"'):t.push(o.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},getTextAndFormat:function(){return this.rows}};var m=function(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new g,this.nonDisplayedMemory=new g,this.lastOutputScreen=new g,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};m.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(e){this.outputFilter=e},setPAC:function(e){this.writeScreen.setPAC(e)},setBkgData:function(e){this.writeScreen.setBkgData(e)},setMode:function(e){e!==this.mode&&(this.mode=e,c.log("INFO","MODE="+e),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},insertChars:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";c.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(c.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){c.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){c.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){c.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(e){c.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},cc_FON:function(){c.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){c.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){c.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){c.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){c.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){c.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){c.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(c.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,c.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(e){c.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},cc_MIDROW:function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}c.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=c.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}};var y=function(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new m(1,t),new m(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};y.prototype={getHandler:function(e){return this.channels[e].getHandler()},setHandler:function(e,t){this.channels[e].setHandler(t)},addData:function(e,t){var n,r,i,a=!1;this.lastTime=e,c.setTime(e);for(var o=0;o<t.length;o+=2)if(r=127&t[o],i=127&t[o+1],r>=16&&r<=31&&r===this.lastCmdA&&i===this.lastCmdB)this.lastCmdA=null,this.lastCmdB=null,c.log("DEBUG","Repeated command ("+d([r,i])+") is dropped");else if(0!==r||0!==i){if(c.log("DATA","["+d([t[o],t[o+1]])+"] -> ("+d([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n)if(a=this.parseChars(r,i))if(this.currChNr&&this.currChNr>=0)this.channels[this.currChNr-1].insertChars(a);else c.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,c.log("WARNING","Couldn't parse cleaned data "+d([r,i])+" orig: "+d([t[o],t[o+1]])))}else this.dataCounters.padding+=2},parseCmd:function(e,t){var n=null;if(!((20===e||21===e||28===e||29===e)&&32<=t&&t<=47)&&!((23===e||31===e)&&33<=t&&t<=35))return!1;n=20===e||21===e||23===e?1:2;var r=this.channels[n-1];return 20===e||21===e||28===e||29===e?32===t?r.cc_RCL():33===t?r.cc_BS():34===t?r.cc_AOF():35===t?r.cc_AON():36===t?r.cc_DER():37===t?r.cc_RU(2):38===t?r.cc_RU(3):39===t?r.cc_RU(4):40===t?r.cc_FON():41===t?r.cc_RDC():42===t?r.cc_TR():43===t?r.cc_RTD():44===t?r.cc_EDM():45===t?r.cc_CR():46===t?r.cc_ENM():47===t&&r.cc_EOC():r.cc_TO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},parseMidrow:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){if((n=17===e?1:2)!==this.currChNr)return c.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.insertChars([32]),r.cc_MIDROW(t),c.log("DEBUG","MIDROW ("+d([e,t])+")"),this.lastCmdA=e,this.lastCmdB=t,!0}return!1},parsePAC:function(e,t){var n,r=null;if(!((17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127)&&!((16===e||24===e)&&64<=t&&t<=95))return!1;n=e<=23?1:2,r=64<=t&&t<=95?1===n?a[e]:s[e]:1===n?o[e]:u[e];var i=this.interpretPAC(r,t);return this.channels[n-1].setPAC(i),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},interpretPAC:function(e,t){var n=t,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},parseChars:function(e,t){var r=null,i=null,a=null;if(e>=25?(r=2,a=e-8):(r=1,a=e),17<=a&&a<=19){var o=t;o=17===a?t+80:18===a?t+112:t+144,c.log("INFO","Special char '"+n(o)+"' in channel "+r),i=[o],this.lastCmdA=e,this.lastCmdB=t}else 32<=e&&e<=127&&(i=0===t?[e]:[e,t],this.lastCmdA=null,this.lastCmdB=null);if(i){var s=d(i);c.log("DEBUG","Char codes = "+s.join(","))}return i},parseBackgroundAttributes:function(e,t){var n,r,i;return((16===e||24===e)&&32<=t&&t<=47||(23===e||31===e)&&45<=t&&t<=47)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=l[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,this.channels[i-1].setBkgData(n),this.lastCmdA=e,this.lastCmdB=t,!0)},reset:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}};e.logger=c,e.PenState=f,e.CaptionScreen=g,e.Cea608Parser=y,e.findCea608Nalus=function(e,t,n){for(var r=0,i=t,a=[],o=function(e,t,n,r){if(4!==e||t<8)return null;var i=n.getUint8(r),a=n.getUint16(r+1),o=n.getUint32(r+3),s=n.getUint8(r+7);return 181==i&&49==a&&1195456820==o&&3==s};i<t+n;){if(r=e.getUint32(i),6===(31&e.getUint8(i+4)))for(var s=i+5,u=-1;s<i+4+r-1;){u=0;for(var l=255;255===l;)u+=l=e.getUint8(s),s++;var c=0;for(l=255;255===l;)c+=l=e.getUint8(s),s++;o(u,c,e,s)&&a.push([s,c]),s+=c}i+=r+4}return a},e.extractCea608DataFromRange=function(e,t){var n=t[0],r=[[],[]];n+=8;var i=31&e.getUint8(n);n+=2;for(var a=0;a<i;a++){var o=e.getUint8(n),s=4&o,u=3&o;n++;var l=e.getUint8(n);n++;var c=e.getUint8(n);n++,s&&(127&l)+(127&c)!=0&&(0===u?(r[0].push(l),r[0].push(c)):1===u&&(r[1].push(l),r[1].push(c)))}return r}}(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=y(n(6)),i=y(n(16)),a=y(n(39)),o=y(n(112)),s=y(n(234)),u=y(n(121)),l=y(n(9)),c=y(n(10)),d=y(n(1)),f=y(n(8)),h=y(n(77)),p=y(n(11)),g=y(n(17)),m=n(12);function y(e){return e&&e.__esModule?e:{default:e}}var v=.5,_=.01,T="BufferController";function b(e){e=e||{};var t=this.context,n=(0,l.default)(t).getInstance(),d=e.errHandler,y=e.fragmentModel,b=e.representationController,E=e.mediaController,S=e.adapter,A=e.textController,C=e.abrController,w=e.playbackController,I=e.streamInfo,R=e.type,O=e.settings,P=void 0,D=void 0,M=void 0,N=void 0,L=void 0,k=void 0,x=void 0,F=void 0,U=void 0,B=void 0,j=void 0,H=void 0,G=void 0,q=void 0,V=void 0,Y=void 0,K=void 0,W=void 0,z=void 0,X=void 0,Q=void 0,$=void 0,J=void 0;function Z(e){return S.convertDataToRepresentationInfo(b.getRepresentationForQuality(e))}function ee(e,n){if(!W||!e)return null;var r=e[0];if(x)try{B=n&&n[R]?(0,o.default)(t).create(x,r,ae.bind(this),n[R]):(0,o.default)(t).create(x,r,ae.bind(this),null),O.get().streaming.useAppendWindow&&B.updateAppendWindow(I),"function"==typeof B.getBuffer().initialize&&B.getBuffer().initialize(R,I,e,y)}catch(e){D.fatal("Caught error on create SourceBuffer: "+e),d.error(new p.default(g.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,g.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+R))}else B=(0,s.default)(t).create(ae.bind(this));return be(Z(M)),B}function te(e){D.info("Init fragment finished loading saving to",R+"'s init cache"),W.save(e.chunk),D.debug("Append Init fragment",R," with representationId:",e.chunk.representationId," and quality:",e.chunk.quality,", data size:",e.chunk.bytes.byteLength),re(e.chunk)}function ne(e){var t=e.chunk;if($){J=t;var n=B&&B.getAllBufferRanges();n&&n.length>0&&w.getTimeToStreamEnd()>O.get().streaming.stallThreshold&&(D.debug("Clearing buffer because track changed - "+(n.end(n.length-1)+.5)),ve([{start:0,end:n.end(n.length-1)+.5,force:!0}]))}else re(t)}function re(e){B.append(e),e.mediaInfo.type===r.default.VIDEO&&Pe(c.default.VIDEO_CHUNK_RECEIVED,{chunk:e})}function ie(e){if(e&&e.length>0)for(var t=0,n=e.length;t<n;t++)D.debug("Buffered range: "+e.start(t)+" - "+e.end(t)+", currentTime = ",w.getTime())}function ae(e){if(e.error){if(22===e.error.code&&(K=!0,k=.8*Re(),D.warn("Quota exceeded, Critical Buffer: "+k),k>0)){var t=Math.max(.2*k,1),n=k-t,i=Math.min(O.get().streaming.bufferTimeAtTopQuality,.9*n),a=Math.min(O.get().streaming.bufferTimeAtTopQualityLongForm,.9*n),o={streaming:{bufferToKeep:parseFloat(t.toFixed(5)),bufferTimeAtTopQuality:parseFloat(i.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(a.toFixed(5))}};O.update(o)}22!==e.error.code&&Oe()||(D.warn("Clearing playback buffer to overcome quota exceed situation"),Pe(c.default.QUOTA_EXCEEDED,{criticalBufferLevel:k,quotaExceededTime:e.chunk.start}),ve(ye()))}else{K=!1,(q=e.chunk)&&!isNaN(q.index)&&(F=Math.max(q.index,F),pe());var s=B.getAllBufferRanges();if(q.segmentType===m.HTTPRequest.MEDIA_SEGMENT_TYPE)ie(s),le(),function(){if(R!==r.default.AUDIO&&R!==r.default.VIDEO)return;if(isNaN(z))return;var e=w.getTime(),t=fe(z,0);if(e===z&&t)return;var n=b.getCurrentRepresentation().segmentDuration;if(!(t=fe(z,n)))return;Math.abs(e-z)>n?z<=t.end&&(w.seek(Math.max(z,t.start),!1,!0),z=NaN):e<t.start&&(w.seek(t.start,!1,!0),z=NaN)}();else if($){var u=w.getTime();D.debug("AppendToBuffer seek target should be "+u),Pe(c.default.SEEK_TARGET,{time:u})}var l=!1;H&&(H.indexOf(q)>0&&(l=!0),H=null),q&&!l&&Pe(q.endFragment?c.default.BYTES_APPENDED_END_FRAGMENT:c.default.BYTES_APPENDED,{quality:q.quality,startTime:q.start,index:q.index,bufferedRanges:s,mediaType:R})}}function oe(e){M!==e.newQuality&&(be(this.getRepresentationInfo(e.newQuality)),M=e.newQuality)}function se(e){B&&(z=e.seekTime,N&&(X=!0,N=!1,U=Number.POSITIVE_INFINITY),R!==r.default.FRAGMENTED_TEXT?function(){if(!B)return;B.waitForUpdateEnd((function(){var e=function(){if(!B)return;var e=[],t=B.getAllBufferRanges();if(!t||0===t.length)return e;var n=w.getTime(),r=t.end(t.length-1)+v,i=y.getRequests({state:a.default.FRAGMENT_MODEL_EXECUTED,time:n,threshold:_})[0];if(i){var o={start:0,end:i.startTime-O.get().streaming.stallThreshold},s=y.getRequests({state:a.default.FRAGMENT_MODEL_EXECUTED,time:i.startTime-i.duration/2,threshold:_})[0];s&&s.startTime!=i.startTime&&(o.end=s.startTime),o.start<o.end&&o.end>t.start(0)&&e.push(o);var u={start:i.startTime+i.duration+O.get().streaming.stallThreshold,end:r},l=y.getRequests({state:a.default.FRAGMENT_MODEL_EXECUTED,time:i.startTime+i.duration+O.get().streaming.stallThreshold,threshold:_})[0];l&&l.startTime!==i.startTime&&(u.start=l.startTime+l.duration+O.get().streaming.stallThreshold),u.start<u.end&&u.start<r&&e.push(u)}else D.debug("getAllRangesWithSafetyFactor - No request found in current time position, removing full buffer 0 -",r),e.push({start:0,end:r});return e}();e&&0!==e.length||le(),ve(e)}))}():le())}function ue(){z=NaN}function le(){(!$||R===r.default.FRAGMENTED_TEXT&&A.isTextEnabled())&&he()}function ce(){ge()}function de(){z=NaN,ge()}function fe(e,t){var n=B.getAllBufferRanges(),r=0,i=0,a=null,o=null,s=0,u=void 0,l=void 0,c=isNaN(t)?.15:t;if(null!=n){for(l=0,u=n.length;l<u;l++)if(r=n.start(l),i=n.end(l),null===a)s=Math.abs(r-e),(e>=r&&e<i||s<=c)&&(a=r,o=i);else{if(!((s=r-o)<=c))break;o=i}if(null!==a)return{start:a,end:o}}return null}function he(){var e,t,n;w&&(e=(isNaN(z)?w.getTime():z)||0,O.get().streaming.jumpGaps&&(t=O.get().streaming.smallGapLimit),L=null===(n=fe(e,t))?0:n.end-e,Pe(c.default.BUFFER_LEVEL_UPDATED,{bufferLevel:L}),ge())}function pe(){F>=U-1&&!N&&void 0===B.discharge&&(N=!0,D.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED for "+R),Pe(c.default.BUFFERING_COMPLETED))}function ge(){R!==r.default.AUDIO&&R!==r.default.VIDEO||(X&&!N&&L>0&&w&&w.getTimeToStreamEnd()-L<.1&&(X=!1,N=!0,D.debug("checkIfSufficientBuffer trigger BUFFERING_COMPLETED for type "+R),Pe(c.default.BUFFERING_COMPLETED)),(!O.get().streaming.lowLatencyEnabled&&L<O.get().streaming.stallThreshold||0===L)&&!N?me(i.default.BUFFER_EMPTY):(N||L>=I.manifestInfo.minBufferTime)&&me(i.default.BUFFER_LOADED))}function me(e){G===e||e===i.default.BUFFER_EMPTY&&0===w.getTime()||R===r.default.FRAGMENTED_TEXT&&!A.isTextEnabled()||(G=e,Pe(c.default.BUFFER_LEVEL_STATE_CHANGED,{state:e}),Pe(e===i.default.BUFFER_LOADED?c.default.BUFFER_LOADED:c.default.BUFFER_EMPTY),D.debug(e===i.default.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function ye(){var e=[],t=B.getAllBufferRanges();if(!t||0===t.length)return e;var n=w.getTime(),r=Math.max(0,n-O.get().streaming.bufferToKeep),i=y.getRequests({state:a.default.FRAGMENT_MODEL_EXECUTED,time:n,threshold:_})[0];if(i)r=Math.min(i.startTime,r);else if(0===n&&w.getIsDynamic())return[];if(t.start(0)<=r){for(var o={start:0,end:r},s=0;s<t.length&&t.end(s)<=r;s++)o.end=t.end(s);o.start<o.end&&e.push(o)}return e}function ve(e){e&&B&&0!==e.length&&(Q.push.apply(Q,e),Y||_e())}function _e(){if(0===Q.length||!B)return D.debug("Nothing to prune, halt pruning"),Q=[],void(Y=!1);var e=B.getBuffer();if(!e||!e.buffered||0===e.buffered.length)return D.debug("SourceBuffer is empty (or does not exist), halt pruning"),Q=[],void(Y=!1);var t=Q.shift();D.debug("Removing buffer from:",t.start,"to",t.end),Y=!0,w.getTime()<t.end&&(N=!1,F=0),B.remove(t.start,t.end,t.force)}function Te(e){B===e.buffer&&(D.debug("onRemoved buffer from:",e.from,"to",e.to),ie(B.getAllBufferRanges()),0===Q.length&&(Y=!1),e.unintended&&(D.warn("Detected unintended removal from:",e.from,"to",e.to,"setting index handler time to",e.from),Pe(c.default.SEEK_TARGET,{time:e.from,mediaType:R,streamId:I.id})),Y?_e():($?($=!1,J&&re(J)):he(),Pe(c.default.BUFFER_CLEARED,{from:e.from,to:e.to,unintended:e.unintended,hasEnoughSpaceToAppend:Oe(),quotaExceeded:K})))}function be(e){e&&void 0!==e.MSETimeOffset&&B&&B.updateTimestampOffset&&B.updateTimestampOffset(e.MSETimeOffset)}function Ee(e){e.error||N||be(e.currentRepresentation)}function Se(e){U=e.request.index,pe()}function Ae(e){if(e.newMediaInfo.streamInfo.id===I.id&&e.newMediaInfo.type===R){var t=B&&B.getAllBufferRanges();t&&(D.info("Track change asked"),E.getSwitchMode(R)===r.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&t&&t.length>0&&w.getTimeToStreamEnd()>O.get().streaming.stallThreshold&&(N=!1,U=Number.POSITIVE_INFINITY))}}function Ce(){++V*(O.get().streaming.wallclockTimeUpdateInterval/1e3)>=O.get().streaming.bufferPruningInterval&&(V=0,B&&R!==r.default.FRAGMENTED_TEXT&&(N||ve(ye())))}function we(){ge()}function Ie(e,t){x=e,B&&t&&"function"==typeof B.discharge&&(j=B,ee(t))}function Re(){var e,t=B.getAllBufferRanges(),n=0,r=void 0;if(!t)return n;for(r=0,e=t.length;r<e;r++)n+=t.end(r)-t.start(r);return n}function Oe(){return Re()<k}function Pe(e,t){var r=t||{};n.trigger(e,r,{streamId:I.id,mediaType:R})}function De(e,t){k=Number.POSITIVE_INFINITY,G=void 0,M=u.default.QUALITY_DEFAULT,U=Number.POSITIVE_INFINITY,F=0,q=null,N=!1,Y=!1,K=!1,X=!1,L=0,V=0,Q=[],z=NaN,B&&(e||B.abort(),B.reset(t),B=null),$=!1}return P={initialize:function(e){Ie(e),M=C.getQualityFor(R),n.on(c.default.DATA_UPDATE_COMPLETED,Ee,this),n.on(c.default.INIT_FRAGMENT_LOADED,te,this),n.on(c.default.MEDIA_FRAGMENT_LOADED,ne,this),n.on(c.default.QUALITY_CHANGE_REQUESTED,oe,this),n.on(c.default.STREAM_COMPLETED,Se,this),n.on(c.default.PLAYBACK_PLAYING,de,this),n.on(c.default.PLAYBACK_PROGRESS,le,this),n.on(c.default.PLAYBACK_TIME_UPDATED,le,this),n.on(c.default.PLAYBACK_RATE_CHANGED,we,this),n.on(c.default.PLAYBACK_SEEKING,se,this),n.on(c.default.PLAYBACK_SEEKED,ue,this),n.on(c.default.PLAYBACK_STALLED,ce,this),n.on(c.default.WALLCLOCK_TIME_UPDATED,Ce,this),n.on(c.default.CURRENT_TRACK_CHANGED,Ae,this,{priority:l.default.EVENT_PRIORITY_HIGH}),n.on(c.default.SOURCEBUFFER_REMOVE_COMPLETED,Te,this)},getStreamId:function(){return I.id},getType:function(){return R},getBufferControllerType:function(){return T},getRepresentationInfo:Z,createBuffer:ee,dischargePreBuffer:function(){if(B&&j&&"function"==typeof j.discharge){var e=j.getAllBufferRanges();if(e.length>0){for(var t="Beginning "+R+"PreBuffer discharge, adding buffer for:",n=0;n<e.length;n++)t+=" start: "+e.start(n)+", end: "+e.end(n)+";";D.debug(t)}else D.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");H=[];for(var r=j.discharge(),i=null,a=0;a<r.length;a++){var o=r[a];if("InitializationSegment"!==o.segmentType){var s=W.extract(o.streamId,o.representationId);s&&i!==s&&(H.push(s),B.append(s),i=s)}H.push(o),B.append(o)}j.reset(),j=null}},getBuffer:function(){return B},setBuffer:function(e){B=e},getBufferLevel:function(){return L},getRangeAt:fe,setMediaSource:Ie,getMediaSource:function(){return x},appendInitSegment:function(e){var t=W.extract(I.id,e);return!!t&&(D.info("Append Init fragment",R," with representationId:",t.representationId," and quality:",t.quality,", data size:",t.bytes.byteLength),re(t),!0)},replaceBuffer:function(){$=!0},getIsBufferingCompleted:function(){return N},getIsPruningInProgress:function(){return Y},reset:function(e,t){n.off(c.default.DATA_UPDATE_COMPLETED,Ee,this),n.off(c.default.INIT_FRAGMENT_LOADED,te,this),n.off(c.default.MEDIA_FRAGMENT_LOADED,ne,this),n.off(c.default.QUALITY_CHANGE_REQUESTED,oe,this),n.off(c.default.STREAM_COMPLETED,Se,this),n.off(c.default.PLAYBACK_PLAYING,de,this),n.off(c.default.PLAYBACK_PROGRESS,le,this),n.off(c.default.PLAYBACK_TIME_UPDATED,le,this),n.off(c.default.PLAYBACK_RATE_CHANGED,we,this),n.off(c.default.PLAYBACK_SEEKING,se,this),n.off(c.default.PLAYBACK_SEEKED,ue,this),n.off(c.default.PLAYBACK_STALLED,ce,this),n.off(c.default.WALLCLOCK_TIME_UPDATED,Ce,this),n.off(c.default.CURRENT_TRACK_CHANGED,Ae,this),n.off(c.default.SOURCEBUFFER_REMOVE_COMPLETED,Te,this),De(e,t)},updateAppendWindow:function(){B&&!N&&B.updateAppendWindow(I)}},D=(0,f.default)(t).getInstance().getLogger(P),W=(0,h.default)(t).getInstance(),De(),P}b.__dashjs_factory_name=T,t.default=d.default.getClassFactory(b)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(8)),i=c(n(11)),a=c(n(9)),o=c(n(10)),s=c(n(1)),u=c(n(69)),l=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n,s){var c=this.context,d=(0,a.default)(c).getInstance(),f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=[],_=[],T=n;function b(){try{return g.buffered}catch(e){return p.error("getAllBufferRanges exception: "+e.message),null}}function E(t){g&&R((function(){try{var n=e.duration,r=0;t&&!isNaN(t.start)&&!isNaN(t.duration)&&isFinite(t.duration)&&(n=t.start+t.duration),t&&!isNaN(t.start)&&(r=t.start),g.appendWindowStart=0,g.appendWindowEnd=n,g.appendWindowStart=r,p.debug("Updated append window. Set start to "+g.appendWindowStart+" and end to "+g.appendWindowEnd)}catch(e){p.warn("Failed to set append window")}}))}function S(){var e=this;if(_.length>0){m=!0;var t=_[0];_.splice(0,1);var n=[],r=function(){var r=b();!function(e,t,n,r){t&&t.length>0&&t.length<n.length&&function(e,t){for(var n=0;n<e.length;n++){var r=Math.round(e.start(n)),i=Math.round(e.end(n));if(i===t.start||r===t.end||t.start>=r&&t.end<=i)return!0}return!1}(t,r)&&d.trigger(o.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:n.end(n.length-2),to:n.start(n.length-1),unintended:!0})}(e,n,r,t),_.length>0?S.call(this):(m=!1,T&&T({chunk:t}))};try{0===t.bytes.length?r.call(this):(n=b(),g.appendBuffer?g.appendBuffer(t.bytes):g.append(t.bytes,t),R(r.bind(this)))}catch(e){p.fatal('SourceBuffer append failed "'+e+'"'),_.length>0?S():m=!1,T&&T({chunk:t,error:new i.default(e.code,e.message)})}}}function A(){if(v.length>0){var e=v.shift();g.updating?R(e):(e(),A())}}function C(){g.updating||A()}function w(){g.updating||A()}function I(){p.error("SourceBufferSink error")}function R(e){v.push(e),g.updating||A()}return f={getType:function(){return h},getAllBufferRanges:b,getBuffer:function(){return g},append:function(e){e?(_.push(e),m||R(S.bind(this))):T({chunk:e,error:new i.default(l.default.APPEND_ERROR_CODE,l.default.APPEND_ERROR_MESSAGE)})},remove:function(t,n,r){var a=this;R((function(){try{t>=0&&n>t&&(r||"ended"!==e.readyState)&&g.remove(t,n),R((function(){d.trigger(o.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:a,from:t,to:n,unintended:!1})}))}catch(e){d.trigger(o.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:a,from:t,to:n,unintended:!1,error:new i.default(e.code,e.message)})}}))},abort:function(){try{("open"===e.readyState||g.setTextTrack&&"ended"===e.readyState)&&g.abort()}catch(e){p.error('SourceBuffer append abort failed: "'+e+'"')}_=[]},reset:function(t){if(g){if("function"==typeof g.removeEventListener&&(g.removeEventListener("updateend",w,!1),g.removeEventListener("error",I,!1),g.removeEventListener("abort",I,!1)),clearInterval(y),v=[],!t){try{g.getClassName&&"TextSourceBuffer"===g.getClassName()||(p.debug("Removing sourcebuffer from media source"),e.removeSourceBuffer(g))}catch(e){p.error("Failed to remove source buffer from media source.")}g=null}m=!1}_=[],T=null},updateTimestampOffset:function(e){g.timestampOffset===e||isNaN(e)||R((function(){e<0&&(e+=.001),g.timestampOffset=e}))},hasDiscontinuitiesAfter:function(e){try{var t=b();if(t&&t.length>1)for(var n=0,r=t.length;n<r;n++)if(n>0&&e<t.start(n)&&t.start(n)>t.end(n-1)+.1)return!0}catch(e){p.error("hasDiscontinuities exception: "+e.message)}return!1},waitForUpdateEnd:R,updateAppendWindow:E},function(){p=(0,r.default)(c).getInstance().getLogger(f),m=!1,h=t.type;var n=t.codec;try{if(n.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))throw new Error("not really supported");(g=s||e.addSourceBuffer(n)).changeType&&s&&(p.debug("Doing period transition with changeType"),g.changeType(n)),E();if("function"==typeof g.addEventListener)try{g.addEventListener("updateend",w,!1),g.addEventListener("error",I,!1),g.addEventListener("abort",I,!1)}catch(e){y=setInterval(C,50)}else y=setInterval(C,50)}catch(e){if(!t.isText&&-1===n.indexOf('codecs="stpp')&&-1===n.indexOf('codecs="wvtt'))throw e;var i=(0,u.default)(c).getInstance();g=i.getTextSourceBuffer()}}(),f}d.__dashjs_factory_name="SourceBufferSink";var f=s.default.getClassFactory(d);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r},o=n(23);function s(){return{customTimeRangeArray:[],length:0,add:function(e,t){var n=0;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++)this.mergeRanges(n,n+1)&&n--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(e,t){for(var n=0;n<this.customTimeRangeArray.length;n++)if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){this.customTimeRangeArray.splice(n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}this.length=this.customTimeRangeArray.length},mergeRanges:function(e,t){var n=this.customTimeRangeArray[e],r=this.customTimeRangeArray[t];return n.start<=r.start&&r.start<=n.end&&n.end<=r.end?(n.end=r.end,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&r.end<=n.end?(n.start=r.start,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&n.end<=r.end?(this.customTimeRangeArray.splice(e,1),!0):n.start<=r.start&&r.start<=n.end&&r.end<=n.end&&(this.customTimeRangeArray.splice(t,1),!0)},start:function(e){return(0,o.checkInteger)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return(0,o.checkInteger)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}s.__dashjs_factory_name="CustomTimeRanges",t.default=a.default.getClassFactory(s)},function(e,t,n){t.generateISD=n(216).generateISD,t.fromXML=n(217).fromXML,t.renderHTML=n(230).render},function(e,t,n){"use strict";(function(t,r){var i=n(59);e.exports=_;var a,o=n(95);_.ReadableState=v;n(58).EventEmitter;var s=function(e,t){return e.listeners(t).length},u=n(116),l=n(74).Buffer,c=t.Uint8Array||function(){};var d=Object.create(n(41));d.inherits=n(32);var f=n(220),h=void 0;h=f&&f.debuglog?f.debuglog("stream"):function(){};var p,g=n(221),m=n(117);d.inherits(_,u);var y=["error","close","destroy","pause","resume"];function v(e,t){e=e||{};var r=t instanceof(a=a||n(27));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(76).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function _(e){if(a=a||n(27),!(this instanceof _))return new _(e);this._readableState=new v(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function T(e,t,n,r,i){var a,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,A(e)}(e,o)):(i||(a=function(e,t){var n;r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):b(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?b(e,o,t,!1):w(e,o)):b(e,o,t,!1))):r||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function b(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&A(e)),w(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=m.destroy,_.prototype._undestroy=m.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),T(this,e,t,!1,n)},_.prototype.unshift=function(e){return T(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return p||(p=n(76).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var E=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(C,e):C(e))}function C(e){h("emit readable"),e.emit("readable"),P(e)}function w(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function R(e){h("readable nexttick read 0"),e.read(0)}function O(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=l.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),0===(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}_.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):A(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&M(this),null;var r,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",i=!0),t.ended||t.reading?h("reading or ended",i=!1):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(n,t))),null===(r=e>0?D(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&M(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,h("pipe count=%d opts=%j",a.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:_;function l(t,r){h("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),e.removeListener("close",y),e.removeListener("finish",v),e.removeListener("drain",d),e.removeListener("error",m),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",_),n.removeListener("data",g),f=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function c(){h("onend"),e.end()}a.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",l);var d=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(n);e.on("drain",d);var f=!1;var p=!1;function g(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==L(a.pipes,e))&&!f&&(h("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function m(t){h("onerror",t),_(),e.removeListener("error",m),0===s(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",v),_()}function v(){h("onfinish"),e.removeListener("close",y),_()}function _(){h("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",m),e.once("close",y),e.once("finish",v),e.emit("pipe",n),a.flowing||(h("pipe resume"),n.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var o=L(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},_.prototype.on=function(e,t){var n=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&A(this):i.nextTick(R,this))}return n},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(O,e,t))}(this,e)),this},_.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(h("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<y.length;a++)e.on(y[a],this.emit.bind(this,y[a]));return this._read=function(t){h("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=D}).call(this,n(18),n(52))},function(e,t,n){e.exports=n(58).EventEmitter},function(e,t,n){"use strict";var r=n(59);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";e.exports=o;var r=n(27),i=Object.create(n(41));function a(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);r.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){u(e,t,n)})):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(32),i.inherits(o,r),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===e[i].indexOf("public_")||(this[i]=e[i])}}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={LEVELS:{SUGGESTION:"Suggestion",WARNING:"Warning",ERROR:"Error"},EVENTS:{NO_UTC_TIMING_ELEMENT:{key:"NO_UTC_TIMING_ELEMENT",message:"No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/"},NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE:{key:"NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE",message:'SMPTE 2052-1:2013 defines the attribute name as "imageType" and does not define "imagetype"'}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=_(n(122)),i=_(n(6)),a=_(n(16)),o=_(n(123)),s=_(n(39)),u=_(n(9)),l=_(n(10)),c=_(n(1)),d=_(n(247)),f=_(n(20)),h=_(n(248)),p=_(n(249)),g=_(n(250)),m=_(n(8)),y=n(12),v=n(23);function _(e){return e&&e.__esModule?e:{default:e}}function T(){var e=this.context,t=(0,m.default)(e).getInstance(),n=(0,u.default)(e).getInstance(),c=void 0,_=void 0,T=void 0,b=void 0,E=void 0,S=void 0,A=void 0,C=void 0,w=void 0,I=void 0,R=void 0,O=void 0,P=void 0,D=void 0,M=void 0,N=void 0,L=void 0,k=void 0,x=void 0,F=void 0,U=void 0,B=void 0,j=void 0,H=void 0,G=void 0;function q(){(T=(0,r.default)(e).create({dashMetrics:H,mediaPlayerModel:M,settings:G})).initialize()}function V(){E={},S={},C={},A={},k={},U={},B={},j={},void 0===I&&(I=!1),L=void 0,x=void 0,F=void 0,clearTimeout(w),w=null}function Y(e){e.mediaType===i.default.VIDEO&&(void 0!==L&&x.push(L,D.getPlaybackQuality()),L=e.newQuality)}function K(e){e.metric!==a.default.HTTP_REQUEST||!e.value||e.value.type!==y.HTTPRequest.MEDIA_SEGMENT_TYPE||e.mediaType!==i.default.AUDIO&&e.mediaType!==i.default.VIDEO||F.push(e.mediaType,e.value,G.get().streaming.abr.useDeadTimeLatency),e.metric!==a.default.BUFFER_LEVEL||e.mediaType!==i.default.AUDIO&&e.mediaType!==i.default.VIDEO||function(e,t){var n=G.get().streaming.abr.ABRStrategy;if(n===i.default.ABR_STRATEGY_L2A)return U[e]=!1,j[e]=!1,void(B[e]=!0);if(n===i.default.ABR_STRATEGY_LoLP)return U[e]=!1,j[e]=!0,void(B[e]=!1);if(n===i.default.ABR_STRATEGY_BOLA)return U[e]=!0,j[e]=!1,void(B[e]=!1);if(n===i.default.ABR_STRATEGY_THROUGHPUT)return U[e]=!1,j[e]=!1,void(B[e]=!1);!function(e,t){var n=M.getStableBufferTime(),r=n,i=.5*n,a=U[e],o=t>(a?i:r);U[e]=o,o!==a&&(o?_.info("["+e+"] switching from throughput to buffer occupancy ABR rule (buffer: "+t.toFixed(3)+")."):_.info("["+e+"] switching from buffer occupancy to throughput ABR rule (buffer: "+t.toFixed(3)+")."))}(e,t)}(e.mediaType,.001*e.value.level)}function W(e,t){return E[t]=E[t]||{},E[t].hasOwnProperty(e)||(E[t][e]=0),function(e,t){if(t!==i.default.VIDEO||!G.get().streaming.abr.limitBitrateByPortal||!A[t])return e;I||ae();var n=P.getAdaptationForType(0,t).Representation,r=e;if(R>0&&O>0){for(;r>0&&n[r]&&R<n[r].width&&R-n[r-1].width<n[r].width-R;)r-=1;for(;r<n.length-1&&n[r].width===n[r+1].width;)r+=1}return r}(function(e,t,n){var r=G.get().streaming.abr.maxRepresentationRatio[t];if(isNaN(r)||r>=1||r<0)return e;return Math.min(e,Math.round(n*r))}(function(e,t){var n=e;if(!A[t])return n;var r=X(t);void 0!==r&&(n=Math.max(e,r));var i=z(t);void 0!==i&&(n=Math.min(n,i));return n}(E[t][e],e),e,E[t][e]),e)}function z(e){var t=function(e){return G.get().streaming.abr.maxBitrate[e]}(e);return t>-1?Z(A[e].getMediaInfo(),t):void 0}function X(e){var t=function(e){return G.get().streaming.abr.minBitrate[e]}(e);if(t>-1){var n=A[e].getMediaInfo(),r=ee(n),i=Z(n,t);return r[i]&&i<r.length-1&&r[i].bitrate<1e3*t&&i++,i}}function Q(e,t,n,r){var i=t.id,a=ie(e);(0,v.checkInteger)(n);var o=W(e,i);n!==a&&n>=0&&n<=o&&$(e,a,n,o,r)}function $(e,t,r,i,a){if(e&&A[e]){var o=A[e].getStreamInfo(),s=o?o.id:null;if(G.get().debug.logLevel===m.default.LOG_LEVEL_DEBUG){var u=H.getCurrentBufferLevel(e);_.info("["+e+"] switch from "+t+" to "+r+"/"+i+" (buffer: "+u+") "+(a?JSON.stringify(a):"."))}!function(e,t,n){S[t]=S[t]||{},S[t][e]=n}(e,s,r),n.trigger(l.default.QUALITY_CHANGE_REQUESTED,{oldQuality:t,newQuality:r,reason:a},{streamId:o.id,mediaType:e});var c=F.getAverageThroughput(e);isNaN(c)||N.setSavedBitrateSettings(e,c)}}function J(e,t){C[e].state=t}function Z(e,t,n){var r=e&&e.type?A[e.type].getRepresentationInfo():null;if(G.get().streaming.abr.useDeadTimeLatency&&n&&r&&r.fragmentDuration){n/=1e3;var i=r.fragmentDuration;if(n>i)return 0;t*=1-n/i}for(var a=ee(e),o=a.length-1;o>=0;o--){if(1e3*t>=a[o].bitrate)return o}return 0}function ee(e){var t=[];if(!e||!e.bitrateList)return t;for(var n=e.bitrateList,r=e.type,i=void 0,a=0,s=n.length;a<s;a++)(i=new o.default).mediaType=r,i.qualityIndex=a,i.bitrate=n[a].bandwidth,i.width=n[a].width,i.height=n[a].height,i.scanType=n[a].scanType,t.push(i);return t}function te(e){return U[e]}function ne(e){return B[e]}function re(e){return j[e]}function ie(e){if(e&&A[e]){var t=A[e].getStreamInfo(),n=t?t.id:null;if(n)return S[n]=S[n]||{},S[n].hasOwnProperty(e)||(S[n][e]=0),S[n][e]}return 0}function ae(){if(D){var e=G.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;R=D.getClientWidth()*e,O=D.getClientHeight()*e}}function oe(t){var n=t.request.mediaType;if(G.get().streaming.abr.autoSwitchBitrate[n]){var r=A[n];if(!r)return;var i=(0,d.default)(e).create({abrController:c,streamProcessor:r,currentRequest:t.request,useBufferOccupancyABR:te(n),useL2AABR:ne(n),useLoLPABR:re(n),videoModel:D}),o=T.shouldAbandonFragment(i);if(o.quality>f.default.NO_CHANGE){var u=r.getFragmentModel();u.getRequests({state:s.default.FRAGMENT_MODEL_LOADING,index:t.request.index})[0]&&(u.abortRequests(),J(n,a.default.ABANDON_LOAD),k[n].reset(),k[n].push({oldValue:ie(n),newValue:o.quality,confidence:1,reason:o.reason}),Q(n,b.getActiveStreamInfo(),o.quality,o.reason),clearTimeout(w),w=setTimeout((function(){J(n,a.default.ALLOW_LOAD),w=null}),G.get().streaming.abandonLoadTimeout))}}}return c={isPlayingAtTopQuality:function(e){var t=e?e.id:null,n=ie(i.default.AUDIO),r=ie(i.default.VIDEO);return n===W(i.default.AUDIO,t)&&r===W(i.default.VIDEO,t)},updateTopQualityIndex:function(e){var t=e.type,n=e.streamInfo.id,r=e.representationCount-1;return function(e,t,n){E[t]=E[t]||{},E[t][e]=n}(t,n,r),r},getThroughputHistory:function(){return F},getBitrateList:ee,getQualityForBitrate:Z,getTopBitrateInfoFor:function(e){if(e&&A&&A[e]){var t=A[e].getStreamInfo();if(t&&t.id){var n=W(e,t.id),r=ee(A[e].getMediaInfo());return r[n]?r[n]:null}}return null},getMaxAllowedIndexFor:z,getMinAllowedIndexFor:X,getInitialBitrateFor:function(e){if(function(){if(!N||!N.hasOwnProperty("getSavedBitrateSettings"))throw new Error(i.default.MISSING_CONFIG_ERROR)}(),e===i.default.TEXT||e===i.default.FRAGMENTED_TEXT)return NaN;var t=N.getSavedBitrateSettings(e),n=G.get().streaming.abr.initialBitrate[e],r=G.get().streaming.abr.initialRepresentationRatio[e];if(-1===n)if(r>-1){var a=P.getAdaptationForType(0,e).Representation;if(Array.isArray(a))n=a[Math.max(Math.round(a.length*r)-1,0)].bandwidth;else n=0}else n=isNaN(t)?e===i.default.VIDEO?1e3:100:t;return n},getQualityFor:ie,getAbandonmentStateFor:function(e){return C[e]?C[e].state:null},setPlaybackQuality:Q,checkPlaybackQuality:function(t){if(t&&A&&A[t]){var n=A[t].getStreamInfo(),r=n?n.id:null,i=ie(t),o=(0,d.default)(e).create({abrController:c,streamProcessor:A[t],currentValue:i,switchHistory:k[t],droppedFramesHistory:x,useBufferOccupancyABR:te(t),useL2AABR:ne(t),useLoLPABR:re(t),videoModel:D});if(x){var s=D.getPlaybackQuality();s&&x.push(L,s)}if(G.get().streaming.abr.autoSwitchBitrate[t]){var u=X(t),l=W(t,r),h=T.getMaxQuality(o),p=h.quality;if(void 0!==u&&(p>f.default.NO_CHANGE?p:i)<u&&(p=u),p>l&&(p=l),k[t].push({oldValue:i,newValue:p}),p>f.default.NO_CHANGE&&p!=i)(C[t].state===a.default.ALLOW_LOAD||p>i)&&$(t,i,p,l,h.reason);else if(G.get().debug.logLevel===m.default.LOG_LEVEL_DEBUG){var g=H.getCurrentBufferLevel(t,!0);_.debug("["+t+"] stay on "+i+"/"+l+" (buffer: "+g+")")}}}},getTopQualityIndexFor:W,setElementSize:ae,setWindowResizeEventCalled:function(e){I=e},createAbrRulesCollection:q,registerStreamType:function(t,r){k[t]=k[t]||(0,h.default)(e).create(),A[t]=r,C[t]=C[t]||{},C[t].state=a.default.ALLOW_LOAD,U[t]=!1,B[t]=!1,j[t]=!1,n.on(l.default.LOADING_PROGRESS,oe,c),t===i.default.VIDEO&&(n.on(l.default.QUALITY_CHANGE_RENDERED,Y,c),x=x||(0,p.default)(e).create(),ae()),n.on(l.default.METRIC_ADDED,K,c),n.on(l.default.PERIOD_SWITCH_COMPLETED,q,c),F=F||(0,g.default)(e).create({settings:G})},unRegisterStreamType:function(e){delete A[e]},setConfig:function(e){e&&(e.streamController&&(b=e.streamController),e.domStorage&&(N=e.domStorage),e.mediaPlayerModel&&(M=e.mediaPlayerModel),e.dashMetrics&&(H=e.dashMetrics),e.adapter&&(P=e.adapter),e.videoModel&&(D=e.videoModel),e.settings&&(G=e.settings))},reset:function(){V(),n.off(l.default.LOADING_PROGRESS,oe,c),n.off(l.default.QUALITY_CHANGE_RENDERED,Y,c),n.off(l.default.METRIC_ADDED,K,c),n.off(l.default.PERIOD_SWITCH_COMPLETED,q,c),T&&T.reset()}},_=t.getLogger(c),V(),c}T.__dashjs_factory_name="AbrController";var b=c.default.getSingletonFactory(T);b.QUALITY_DEFAULT=0,c.default.updateSingletonFactory(T.__dashjs_factory_name,b),t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(235)),i=p(n(236)),a=p(n(237)),o=p(n(238)),s=p(n(239)),u=p(n(240)),l=p(n(241)),c=p(n(242)),d=p(n(1)),f=p(n(20)),h=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}var g="qualitySwitchRules",m="abandonFragmentRules";function y(e){e=e||{};var t=this.context,n=e.mediaPlayerModel,d=e.dashMetrics,p=e.settings,y=void 0,v=void 0;function _(e){return e.filter((function(e){return e.quality>f.default.NO_CHANGE}))}function T(e){var n,r={},i=null,a=void 0,o=void 0,s=void 0,u=void 0;if(0!==e.length){for(r[f.default.PRIORITY.STRONG]={quality:f.default.NO_CHANGE,reason:null},r[f.default.PRIORITY.WEAK]={quality:f.default.NO_CHANGE,reason:null},r[f.default.PRIORITY.DEFAULT]={quality:f.default.NO_CHANGE,reason:null},a=0,n=e.length;a<n;a+=1)(o=e[a]).quality!==f.default.NO_CHANGE&&(r[o.priority].quality===f.default.NO_CHANGE||r[o.priority].quality>o.quality)&&(r[o.priority].quality=o.quality,r[o.priority].reason=o.reason||null);return r[f.default.PRIORITY.WEAK].quality!==f.default.NO_CHANGE&&(i=r[f.default.PRIORITY.WEAK]),r[f.default.PRIORITY.DEFAULT].quality!==f.default.NO_CHANGE&&(i=r[f.default.PRIORITY.DEFAULT]),r[f.default.PRIORITY.STRONG].quality!==f.default.NO_CHANGE&&(i=r[f.default.PRIORITY.STRONG]),i&&(s=i.quality,u=i.reason),(0,f.default)(t).create(s,u)}}return{initialize:function(){y=[],v=[],p.get().streaming.abr.useDefaultABRRules&&(p.get().streaming.abr.ABRStrategy===h.default.ABR_STRATEGY_L2A?y.push((0,l.default)(t).create({dashMetrics:d,mediaPlayerModel:n,settings:p})):p.get().streaming.abr.ABRStrategy===h.default.ABR_STRATEGY_LoLP?y.push((0,c.default)(t).create({dashMetrics:d})):(y.push((0,u.default)(t).create({dashMetrics:d,mediaPlayerModel:n,settings:p})),y.push((0,r.default)(t).create({dashMetrics:d})),y.push((0,i.default)(t).create({dashMetrics:d})),y.push((0,s.default)(t).create()),y.push((0,o.default)(t).create()),v.push((0,a.default)(t).create({dashMetrics:d,mediaPlayerModel:n,settings:p})))),n.getABRCustomRules().forEach((function(e){e.type===g&&y.push(e.rule(t).create()),e.type===m&&v.push(e.rule(t).create())}))},reset:function(){[y,v].forEach((function(e){e&&e.length&&e.forEach((function(e){return e.reset&&e.reset()}))})),y=[],v=[]},getMaxQuality:function(e){return T(_(y.map((function(t){return t.getMaxIndex(e)}))))||(0,f.default)(t).create()},getMinSwitchRequest:T,shouldAbandonFragment:function(e){return T(_(v.map((function(t){return t.shouldAbandon(e)}))))||(0,f.default)(t).create()},getQualitySwitchRules:function(){return y}}}y.__dashjs_factory_name="ABRRulesCollection";var v=d.default.getClassFactory(y);v.QUALITY_SWITCH_RULES=g,v.ABANDON_FRAGMENT_RULES=m,d.default.updateSingletonFactory(y.__dashjs_factory_name,v),t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(26)),i=n(12),a=u(n(1)),o=n(33),s=u(n(257));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){e=e||{};var t=this.context,n=e.eventBus,a=e.events,u=e.debug,l=e.dashConstants,c=e.urlUtils,d=e.type,f=e.streamInfo,h=e.timelineConverter,p=e.dashMetrics,g=e.baseURLController,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0,b=void 0,E=void 0,S=void 0,A=void 0;function C(){return d}function w(){v=-1,_=null}function I(){w(),T=null,A=null,S=null}function R(e,t,n){var r=g.resolve(n.path),i=void 0,a=void 0;return r&&t!==r.url&&c.isRelative(t)?(i=r.url,a=r.serviceLocation,t&&(i=c.resolve(t,i))):i=t,!c.isRelative(i)&&(e.url=i,e.serviceLocation=a,!0)}function O(e){var t,r,i;t=e.representation,r=t.hasInitialization(),i=t.hasSegments(),r&&i?n.trigger(a.REPRESENTATION_UPDATE_COMPLETED,{representation:t},{streamId:f.id,mediaType:d}):A.update(t,S,r,i)}function P(e,t){if(null==t)return null;var n=new r.default,a=t.representation,s=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].bandwidth,u=t.media;return u=(0,o.replaceTokenForTemplate)(u,"Number",t.replacementNumber),u=(0,o.replaceTokenForTemplate)(u,"Time",t.replacementTime),u=(0,o.replaceTokenForTemplate)(u,"Bandwidth",s),u=(0,o.replaceIDForTemplate)(u,a.id),u=(0,o.unescapeDollarsInTemplate)(u),n.mediaType=C(),n.type=i.HTTPRequest.MEDIA_SEGMENT_TYPE,n.range=t.mediaRange,n.startTime=t.presentationStartTime,n.mediaStartTime=t.mediaStartTime,n.duration=t.duration,n.timescale=a.timescale,n.availabilityStartTime=t.availabilityStartTime,n.availabilityEndTime=t.availabilityEndTime,n.wallStartTime=t.wallStartTime,n.quality=a.index,n.index=t.availabilityIdx,n.mediaInfo=e,n.adaptationIndex=a.adaptation.index,n.representationId=a.id,R(n,u,a)?n:void 0}function D(e){var t=!1;if(!e)return t;if(b){if(E)t=!0;else if(_){var n=parseFloat((_.presentationStartTime-e.adaptation.period.start).toFixed(5));t=(_.duration>0?n+1.5*_.duration:n)>=e.adaptation.period.duration}}else v>=e.availableSegmentsNumber&&(t=!0);return t}function M(e){var t=e.representation;t.segments&&n.trigger(a.REPRESENTATION_UPDATE_COMPLETED,{representation:t},{streamId:f.id,mediaType:d})}function N(e){if(!e.error){var t,r=e.segments,i=e.representation,s=[],u=0,l=void 0,c=void 0,g=void 0;for(l=0,t=r?r.length:0;l<t;l++)c=r[l],(g=(0,o.getTimeBasedSegment)(h,b,i,c.startTime,c.duration,c.timescale,c.media,c.mediaRange,u))&&(s.push(g),g=null,u++);if(s.length>0)if(i.segmentAvailabilityRange={start:s[0].presentationStartTime,end:s[s.length-1].presentationStartTime},i.availableSegmentsNumber=s.length,i.segments=s,b)!function(e){h.setExpectedLiveEdge(e),p.updateManifestUpdateInfo({presentationStartTime:e})}(s[s.length-1].presentationStartTime-8);i.hasInitialization()&&n.trigger(a.REPRESENTATION_UPDATE_COMPLETED,{representation:i},{streamId:f.id,mediaType:d})}}function L(){y.debug("Dynamic stream complete"),E=!0}return m={initialize:function(e){b=e,E=!1,A.initialize(e)},getStreamId:function(){return f.id},getType:C,getStreamInfo:function(){return f},getInitRequest:function(e,t){return t?function(e,t,n){var a=new r.default,s=t.adaptation.period,u=s.start;if(a.mediaType=n,a.type=i.HTTPRequest.INIT_SEGMENT_TYPE,a.range=t.range,a.availabilityStartTime=h.calcAvailabilityStartTimeFromPresentationTime(u,s.mpd,b),a.availabilityEndTime=h.calcAvailabilityEndTimeFromPresentationTime(u+s.duration,s.mpd,b),a.quality=t.index,a.mediaInfo=e,a.representationId=t.id,R(a,t.initialization,t))return a.url=(0,o.replaceTokenForTemplate)(a.url,"Bandwidth",t.bandwidth),a}(e,t,C()):null},getRequestForSegment:P,getSegmentRequestForTime:function(e,t,n,i){var a=null;if(!t||!t.segmentInfoType)return a;var o=v,s=!!i&&i.keepIdx,u=!(!i||!i.ignoreIsFinished);T!==n&&(T=n,y.debug("Getting the request for time : "+n));var c=A.getSegmentByTime(t,n);return c?(v=c.availabilityIdx,_=c,y.debug("Index for time "+n+" is "+v),a=P(e,c)):!u&&D(t)&&((a=new r.default).action=r.default.ACTION_COMPLETE,a.index=v-1,a.mediaType=d,a.mediaInfo=e,y.debug("Signal complete in getSegmentRequestForTime")),s&&o>=0&&(v=t.segmentInfoType===l.SEGMENT_TIMELINE&&b?v:o),a},getNextSegmentRequest:function(e,t){var n=null;if(!t||!t.segmentInfoType)return null;T=null;var i=v+1;y.debug("Getting the next request at index: "+i);var a=A.getSegmentByIndex(t,i,_?_.mediaStartTime:-1);return a||!function(e){return!isFinite(e.adaptation.period.duration)}(t)||E?(a?(n=P(e,a),v=a.availabilityIdx):v=b?i-1:i,a?_=a:D(t)&&((n=new r.default).action=r.default.ACTION_COMPLETE,n.index=v-1,n.mediaType=C(),n.mediaInfo=e,y.debug("Signal complete")),n):(y.debug(C()+" No segment found at index: "+i+". Wait for next loop"),null)},setCurrentIndex:function(e){v=e},getCurrentIndex:function(){return v},isMediaFinished:D,reset:function(){I(),n.off(a.INITIALIZATION_LOADED,M,m),n.off(a.SEGMENTS_LOADED,N,m),n.off(a.REPRESENTATION_UPDATE_STARTED,O,m),n.off(a.DYNAMIC_TO_STATIC,L,m)},resetIndex:w,setMimeType:function(e){S=e},getNextSegmentRequestIdempotent:function(e,t){var n=v+1,r=A.getSegmentByIndex(t,n,_?_.mediaStartTime:-1);return r?P(e,r):null}},y=u.getLogger(m),I(),A=(0,s.default)(t).create(e),n.on(a.INITIALIZATION_LOADED,M,m),n.on(a.SEGMENTS_LOADED,N,m),n.on(a.REPRESENTATION_UPDATE_STARTED,O,m),n.on(a.DYNAMIC_TO_STATIC,L,m),m}l.__dashjs_factory_name="DashHandler",t.default=a.default.getClassFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(266));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=void 0;function t(){e={}}function n(){t()}return n(),{getLoader:function(t){for(var n in e)if(e.hasOwnProperty(n)&&t.startsWith(n))return e[n];return i.default},registerLoader:function(t,n){e[t]=n},unregisterLoader:function(t){e[t]&&delete e[t]},unregisterAllLoader:t,reset:n}}o.__dashjs_factory_name="SchemeLoaderFactory";var s=r.default.getSingletonFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(9)),i=h(n(31)),a=h(n(44)),o=h(n(1)),s=h(n(8)),u=h(n(34)),l=h(n(6)),c=n(12),d=h(n(82)),f=h(n(43));function h(e){return e&&e.__esModule?e:{default:e}}var p="m",g="a",m="v",y="i",v="c",_="tt",T="k",b="o",E="d",S="s",A="v",C="l";function w(){var e=void 0,t=void 0,n=void 0,o=void 0,h=void 0,w=void 0,I=void 0,R=void 0,O=void 0,P=void 0,D=this.context,M=(0,r.default)(D).getInstance(),N=(0,u.default)(D).getInstance();function L(){n={pr:1,nor:null,st:null,sf:null,sid:""+f.default.generateUuid(),cid:null},O={},R={},P={},x()}function k(){x()}function x(){if(w){var e=w.getStreamController();if(e&&"function"==typeof e.getActiveStream){var t=e.getActiveStream();t&&(I=t.getProcessors())}}}function F(e,t){var n={},r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;e[u]&&(n[u]=e[u])}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}function U(e){try{return e.type===c.HTTPRequest.MPD_TYPE?((t=B()).ot=""+p,t):e.type===c.HTTPRequest.MEDIA_SEGMENT_TYPE?(function(e){P.hasOwnProperty(e)||(P[e]=!1);R.hasOwnProperty(e)||(R[e]=!1);O.hasOwnProperty(e)||(O[e]=!1)}(e.mediaType),function(e){var t=B(),r=function(e){try{var t=e.quality,n=e.mediaInfo.bitrateList;return parseInt(n[t].bandwidth/1e3)}catch(e){return null}}(e),i=function(e){try{return isNaN(e.duration)?null:Math.round(1e3*e.duration)}catch(e){return null}}(e),a=function(e){try{return 100*parseInt(o.getThroughputHistory().getSafeAverageThroughput(e)/100)}catch(e){return null}}(e.mediaType),s=function(e){try{var t=n.pr,r=h.getCurrentBufferLevel(e);return isNaN(t)||isNaN(r)?null:100*parseInt(r/t*10)}catch(e){return null}}(e.mediaType),u=j(e.mediaType),c=function(e){try{var t=o.getTopBitrateInfoFor(e);return Math.round(t.bitrate/1e3)}catch(e){return null}}(e.mediaType),d=n.pr,f=function(e){if(!I||0===I.length)return;var t=!0,n=!1,r=void 0;try{for(var i,a=I[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;if(o.getType()===e)return o.probeNextRequest()}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}}(e.mediaType),p=void 0;e.mediaType===l.default.VIDEO&&(p=m);e.mediaType===l.default.AUDIO&&(p=g);e.mediaType===l.default.FRAGMENTED_TEXT&&(p="application/mp4"===e.mediaInfo.mimeType?_:v);var y=N.get().streaming.cmcd.rtp;y||(y=function(e){var t=w.getPlaybackRate();t||(t=1);var n=e.quality,r=e.mediaType,i=e.mediaInfo,a=e.duration,o=j(r);0===o&&(o=500);var s=i.bitrateList[n].bandwidth*a/1e3/(o/t/1e3),u=N.get().streaming.cmcd.rtpSafetyFactor&&!isNaN(N.get().streaming.cmcd.rtpSafetyFactor)?N.get().streaming.cmcd.rtpSafetyFactor:5;return 100*(parseInt(s*u/100)+1)}(e));if(t.rtp=y,f)if(e.url!==f.url){var T=new URL(f.url);t.nor=T.pathname}else f.range&&(t.nrr=f.range);r&&(t.br=r);p&&(t.ot=p);isNaN(i)||(t.d=i);isNaN(a)||(t.mtp=a);isNaN(s)||(t.dl=s);isNaN(u)||(t.bl=u);isNaN(c)||(t.tb=c);isNaN(d)||1===d||(t.pr=d);O[e.mediaType]&&(t.bs=!0,O[e.mediaType]=!1);!R[e.mediaType]&&P[e.mediaType]||(t.su=!0,R[e.mediaType]=!1,P[e.mediaType]=!0);return t}(e)):e.type===c.HTTPRequest.INIT_SEGMENT_TYPE?function(){var e=B();return e.ot=""+y,e.su=!0,e}():e.type===c.HTTPRequest.OTHER_TYPE||e.type===c.HTTPRequest.XLINK_EXPANSION_TYPE?function(){var e=B();return e.ot=""+b,e}():e.type===c.HTTPRequest.LICENSE?function(e){var t=B();return t.ot=T,t}():null}catch(e){return null}var t}function B(){var e={},t=N.get().streaming.cmcd.cid?N.get().streaming.cmcd.cid:n.cid;return e.v=1,e.sid=N.get().streaming.cmcd.sid?N.get().streaming.cmcd.sid:n.sid,e.sid=""+e.sid,t&&(e.cid=""+t),isNaN(n.pr)||1===n.pr||null===n.pr||(e.pr=n.pr),n.st&&(e.st=n.st),n.sf&&(e.sf=n.sf),e}function j(e){try{var t=h.getCurrentBufferLevel(e);return isNaN(t)?null:100*parseInt(10*t)}catch(e){return null}}function H(e){try{n.pr=e.playbackRate}catch(e){}}function G(t){try{var r=e.getIsDynamic(t.data)?""+C:""+A,i=t.protocol&&"MSS"===t.protocol?""+S:""+E;n.st=""+r,n.sf=""+i}catch(e){}}function q(e){try{e.state&&e.mediaType&&e.state===i.default.BUFFER_EMPTY&&(O[e.mediaType]||(O[e.mediaType]=!0),R[e.mediaType]||(R[e.mediaType]=!0))}catch(e){}}function V(){for(var e in O)O.hasOwnProperty(e)&&(O[e]=!0);for(var t in R)R.hasOwnProperty(t)&&(R[t]=!0)}function Y(e){try{if(!e)return null;var t=Object.keys(e).sort((function(e,t){return e.localeCompare(t)})),n=t.length,r=t.reduce((function(t,r,i){if("v"===r&&1===e[r])return t;"string"!=typeof e[r]||"ot"===r&&"sf"===r&&"st"===r?t+=r+"="+e[r]:t+=r+'="'+e[r].replace(/"/g,'"')+'"';return i<n-1&&(t+=","),t}),"");return r=r.replace(/=true/g,"")}catch(e){return null}}return t={getQueryParameter:function(e){try{if(N.get().streaming.cmcd&&N.get().streaming.cmcd.enabled){var t=U(e),n=Y(t);return M.trigger(a.default.CMCD_DATA_GENERATED,{url:e.url,mediaType:e.mediaType,cmcdData:t,cmcdString:n}),{key:"CMCD",value:n}}return null}catch(e){return null}},getHeaderParameters:function(e){try{if(N.get().streaming.cmcd&&N.get().streaming.cmcd.enabled){var t=U(e),n=F(t,["br","d","ot","tb"]),r=F(t,["bl","dl","mtp","nor","nrr","su"]),i=F(t,["bs","rtp"]),o=F(t,["cid","pr","sf","sid","st","v"]),s={"CMCD-Object":Y(n),"CMCD-Request":Y(r),"CMCD-Status":Y(i),"CMCD-Session":Y(o)};return M.trigger(a.default.CMCD_DATA_GENERATED,{url:e.url,mediaType:e.mediaType,cmcdData:t}),s}return null}catch(e){return null}},setConfig:function(e){e&&(e.abrController&&(o=e.abrController),e.dashMetrics&&(h=e.dashMetrics),e.playbackController&&(w=e.playbackController))},reset:function(){M.off(i.default.PLAYBACK_RATE_CHANGED,H,this),M.off(i.default.MANIFEST_LOADED,G,this),M.off(i.default.BUFFER_LEVEL_STATE_CHANGED,q,t),M.off(i.default.PLAYBACK_SEEKED,V,t),L()},initialize:function(){M.on(i.default.PLAYBACK_RATE_CHANGED,H,t),M.on(i.default.MANIFEST_LOADED,G,t),M.on(i.default.BUFFER_LEVEL_STATE_CHANGED,q,t),M.on(i.default.PLAYBACK_SEEKED,V,t),M.on(i.default.PERIOD_SWITCH_COMPLETED,k,t)}},(0,s.default)(D).getInstance().getLogger(t),e=(0,d.default)(D).getInstance(),L(),t}w.__dashjs_factory_name="CmcdModel",t.default=o.default.getSingletonFactory(w)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t||"",this.serviceLocation=n||t||"",this.dvb_priority=r||1,this.dvb_weight=i||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0};r.DEFAULT_DVB_PRIORITY=1,r.DEFAULT_DVB_WEIGHT=1,t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(273));function a(e){return e&&e.__esModule?e:{default:e}}function o(){return{areEqual:function(e,t){return(0,i.default)(e,t)}}}o.__dashjs_factory_name="ObjectUtils",t.default=r.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(9)),i=c(n(10)),a=c(n(1)),o=c(n(8)),s=c(n(17)),u=c(n(15)),l=c(n(21));function c(e){return e&&e.__esModule?e:{default:e}}function d(){var e=this.context,t=(0,r.default)(e).getInstance(),n=(0,l.default)(e).getInstance(),a=void 0,c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0;function b(){d=NaN,g=!1,h=!0,p=!1,E()}function E(){null!==f&&(clearTimeout(f),f=null)}function S(e){E(),p||(isNaN(e)&&!isNaN(d)&&(e=1e3*d),isNaN(e)||(c.debug("Refresh manifest in "+e+" milliseconds."),f=setTimeout(w,e)))}function A(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];g=!0;var t=y.getValue(),r=t.url,i=v.getPatchLocation(t),a=v.getLocation(t);i&&!e?r=i:a&&(r=a),n.isRelative(r)&&(r=n.resolve(r,t.url)),m.load(r)}function C(e){if(e){if(v.getIsPatch(e)){var n=e;e=y.getValue();var r=v.isPatchValid(e,n),a=r;if(r){var o=v.getPublishTime(e);a=v.applyPatchToManifest(e,n);var s=v.getPublishTime(e);a=o.getTime()!=s.getTime()}if(!a)return c.debug("Patch provided is invalid, performing full manifest refresh"),void A(!0);e.loadedTime=new Date}}else(e=y.getValue()).loadedTime=new Date;if(y.getValue()&&y.getValue().type===u.default.DYNAMIC&&e.type===u.default.STATIC)return t.trigger(i.default.DYNAMIC_TO_STATIC),g=!1,void(p=!0);y.setValue(e);var l=new Date,f=(l.getTime()-e.loadedTime.getTime())/1e3;1e3*(d=v.getManifestUpdatePeriod(e,f))>2147483647&&(d=2147483.647),t.trigger(i.default.MANIFEST_UPDATED,{manifest:e}),c.info("Manifest has been refreshed at "+l+"["+l.getTime()/1e3+"] "),h||S()}function w(){h||(g?S(T.get().streaming.manifestUpdateRetryInterval):A())}function I(e){e.error?e.error.code===s.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&_.error(e.error):C(e.manifest)}function R(){h=!1,S()}function O(){(h=!T.get().streaming.scheduleWhilePaused)&&E()}function P(){g=!1}return a={initialize:function(){b(),t.on(i.default.STREAMS_COMPOSED,P,this),t.on(i.default.PLAYBACK_STARTED,R,this),t.on(i.default.PLAYBACK_PAUSED,O,this),t.on(i.default.INTERNAL_MANIFEST_LOADED,I,this)},setManifest:function(e){C(e)},refreshManifest:A,setConfig:function(e){e&&(e.manifestModel&&(y=e.manifestModel),e.adapter&&(v=e.adapter),e.manifestLoader&&(m=e.manifestLoader),e.errHandler&&(_=e.errHandler),e.settings&&(T=e.settings))},reset:function(){t.off(i.default.PLAYBACK_STARTED,R,this),t.off(i.default.PLAYBACK_PAUSED,O,this),t.off(i.default.STREAMS_COMPOSED,P,this),t.off(i.default.INTERNAL_MANIFEST_LOADED,I,this),b()}},c=(0,o.default)(e).getInstance().getLogger(a),a}d.__dashjs_factory_name="ManifestUpdater",t.default=a.default.getClassFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.url=e||null,i.type=n||null,i.mediaType=r.default.STREAM,i.responseType="",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i(n(26)).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e=e||{},function(){void 0===e.escapeMode&&(e.escapeMode=!0);void 0===e.attributePrefix&&(e.attributePrefix="_");e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0);e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0);void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0);e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1);e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1);void 0===e.ignoreRoot&&(e.ignoreRoot=!1)}();var t=1,n=3,r=4,i=8,a=9;function o(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function s(e){return"string"==typeof e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):e}function u(e,t,n,r){for(var i=0;i<e.length;i++){var a=e[i];if("string"==typeof a){if(a==r)break}else if(a instanceof RegExp){if(a.test(r))break}else if("function"==typeof a&&a(t,n,r))break}return i!=e.length}function l(t,n,r){switch(e.arrayAccessForm){case"property":t[n]instanceof Array?t[n+"_asArray"]=t[n]:t[n+"_asArray"]=[t[n]]}!(t[n]instanceof Array)&&e.arrayAccessFormPaths.length>0&&u(e.arrayAccessFormPaths,t,n,r)&&(t[n]=[t[n]])}function c(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),r=t[5].split(".");if(n.setHours(t[3],t[4],r[0]),r.length>1&&n.setMilliseconds(r[1]),t[6]&&t[7]){var i=60*t[6]+Number(t[7]);i=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*i:i),n.setMinutes(n.getMinutes()-i-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function d(n,r,i,a){return!(r==t&&e.xmlElementsFilter.length>0)||u(e.xmlElementsFilter,n,i,a)}function f(s,h){if(s.nodeType==a){for(var p=new Object,g=s.childNodes,m=0;m<g.length;m++){if((v=g[m]).nodeType==t)if(e.ignoreRoot)p=f(v);else(p={})[_=o(v)]=f(v)}return p}if(s.nodeType==t){(p=new Object).__cnt=0;var y=[];for(g=s.childNodes,m=0;m<g.length;m++){var v,_=o(v=g[m]);if(v.nodeType!=i){var T=h+"."+_;if(d(p,v.nodeType,_,T))if(p.__cnt++,null==p[_]){var b=f(v,T);if("#text"!=_||/[^\s]/.test(b))(E={})[_]=b,y.push(E);p[_]=b,l(p,_,T)}else{null!=p[_]&&(p[_]instanceof Array||(p[_]=[p[_]],l(p,_,T)));var E;b=f(v,T);if("#text"!=_||/[^\s]/.test(b))(E={})[_]=b,y.push(E);p[_][p[_].length]=b}}}p.__children=y;for(var S=o(s),A=0;A<s.attributes.length;A++){var C=s.attributes[A];p.__cnt++;for(var w=C.value,I=0,R=e.matchers.length;I<R;I++){var O=e.matchers[I];O.test(C,S)&&(w=O.converter(C.value))}p[e.attributePrefix+C.name]=w}var P=function(e){return e.prefix}(s);return null!=P&&""!=P&&(p.__cnt++,p.__prefix=P),null!=p["#text"]&&(p.__text=p["#text"],p.__text instanceof Array&&(p.__text=p.__text.join("\n")),e.stripWhitespaces&&(p.__text=p.__text.trim()),delete p["#text"],"property"==e.arrayAccessForm&&delete p["#text_asArray"],p.__text=function(t,n,r){if(e.datetimeAccessFormPaths.length>0){var i=r.split(".#")[0];return u(e.datetimeAccessFormPaths,t,n,i)?c(t):t}return t}(p.__text,_,h+"."+_)),null!=p["#cdata-section"]&&(p.__cdata=p["#cdata-section"],delete p["#cdata-section"],"property"==e.arrayAccessForm&&delete p["#cdata-section_asArray"]),0==p.__cnt&&"text"==e.emptyNodeForm?p="":1==p.__cnt&&null!=p.__text?p=p.__text:1!=p.__cnt||null==p.__cdata||e.keepCData?p.__cnt>1&&null!=p.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==p.__text||""==p.__text.trim())&&delete p.__text:p=p.__cdata,delete p.__cnt,!e.enableToStringFunc||null==p.__text&&null==p.__cdata||(p.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),p}if(s.nodeType==n||s.nodeType==r)return s.nodeValue}function h(t,n,r,i){var a="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=r)for(var o=0;o<r.length;o++){var u=r[o],l=t[u];e.escapeMode&&(l=s(l)),a+=" "+u.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?a+='"'+l+'"':a+="'"+l+"'"}return a+=i?"/>":">"}function p(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function g(t,n){return"property"==e.arrayAccessForm&&(r=n.toString(),i="_asArray",-1!==r.indexOf(i,r.length-i.length))||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function;var r,i}function m(e){var t=0;if(e instanceof Object)for(var n in e)g(e,n)||t++;return t}function y(t,n,r){return 0==e.jsonPropertiesFilter.length||""==r||u(e.jsonPropertiesFilter,t,n,r)}function v(t){var n=[];if(t instanceof Object)for(var r in t)-1==r.toString().indexOf("__")&&0==r.toString().indexOf(e.attributePrefix)&&n.push(r);return n}function _(t){var n="";return t instanceof Object?n+=function(t){var n="";return null!=t.__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),null!=t.__text&&(e.escapeMode?n+=s(t.__text):n+=t.__text),n}(t):null!=t&&(e.escapeMode?n+=s(t):n+=t),n}function T(e,t){return""===e?t:e+"."+t}function b(e,t,n,r){var i="";if(0==e.length)i+=h(e,t,n,!0);else for(var a=0;a<e.length;a++)i+=h(e[a],t,v(e[a]),!1),i+=E(e[a],T(r,t)),i+=p(e[a],t);return i}function E(e,t){var n="";if(m(e)>0)for(var r in e)if(!g(e,r)&&(""==t||y(e,r,T(t,r)))){var i=e[r],a=v(i);if(null==i||null==i)n+=h(i,r,a,!0);else if(i instanceof Object)if(i instanceof Array)n+=b(i,r,a,t);else if(i instanceof Date)n+=h(i,r,a,!1),n+=i.toISOString(),n+=p(i,r);else{m(i)>0||null!=i.__text||null!=i.__cdata?(n+=h(i,r,a,!1),n+=E(i,T(t,r)),n+=p(i,r)):n+=h(i,r,a,!0)}else n+=h(i,r,a,!1),n+=_(i),n+=p(i,r)}return n+=_(e)}this.parseXmlString=function(e){var t;window.ActiveXObject||window;if(void 0===e)return null;if(window.DOMParser){var n=new window.DOMParser;try{(t=n.parseFromString(e,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?c(e):e},this.xml2json=function(e){return f(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return E(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(299),o=(r=a)&&r.__esModule?r:{default:r};var s=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t||"",this._properties=[],this._children=r||[],Array.isArray(n)&&n.forEach((function(e){i._properties.push(new o.default(e))}))}return i(e,[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsMediaSource=u;var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r},o=n(83);var s=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function u(){var e="WebKitMediaSource"in window,t="MediaSource"in window;return e||t}function l(){var e,t=void 0;return e={supportsMediaSource:u,supportsEncryptedMedia:function(){return t},supportsCodec:function(e){return!(!("MediaSource"in window)||!MediaSource.isTypeSupported(e))||!(!("WebKitMediaSource"in window)||!WebKitMediaSource.isTypeSupported(e))},setEncryptedMediaSupported:function(e){t=e},supportsEssentialProperty:function(e){try{return-1!==o.THUMBNAILS_SCHEME_ID_URIS.indexOf(e.schemeIdUri)}catch(e){return!0}},codecRootCompatibleWithCodec:function(e,t){for(var n=e.split(".")[0],r=0===t.indexOf(n),i=void 0,a=0;a<s.length;a++)if(s[a].codec===n){i=s[a];break}return i?r||i.compatibleCodecs.some((function(e){return 0===t.indexOf(e)})):r}},t=!1,e}l.__dashjs_factory_name="Capabilities",t.default=a.default.getSingletonFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVersionString=function(){return"3.2.2"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(342),a=(r=i)&&r.__esModule?r:{default:r};function o(e){e=e||{};var t={"urn:dvb:dash:reporting:2014":a.default},n=this.context,r=void 0,i=e.debug?e.debug.getLogger(r):{},o=e.metricsConstants;return r={create:function(e,r){var a=void 0;try{(a=t[e.schemeIdUri](n).create({metricsConstants:o})).initialize(e,r)}catch(t){a=null,i.error("ReportingFactory: could not create Reporting with schemeIdUri "+e.schemeIdUri+" ("+t.message+")")}return a},register:function(e,n){t[e]=n},unregister:function(e){delete t[e]}}}o.__dashjs_factory_name="ReportingFactory",t.default=dashjs.FactoryMaker.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(346)),i=s(n(347)),a=s(n(348)),o=s(n(349));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=void 0,n=(e=e||{}).debug?e.debug.getLogger(t):{},s=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,u=this.context,l={BufferLevel:r.default,DVBErrors:i.default,HttpList:a.default,PlayList:o.default,RepSwitchList:o.default,TcpList:o.default};return t={create:function(t,r){var i,a=t.match(s);if(a){try{(i=l[a[1]](u).create({eventBus:e.eventBus,metricsConstants:e.metricsConstants})).initialize(a[1],r,a[3],a[5])}catch(e){i=null,n.error("MetricsHandlerFactory: Could not create handler for type "+a[1]+" with args "+a[3]+", "+a[5]+" ("+e.message+")")}return i}},register:function(e,t){l[e]=t},unregister:function(e){delete l[e]}}}u.__dashjs_factory_name="MetricsHandlerFactory",t.default=dashjs.FactoryMaker.getSingletonFactory(u)},function(e,t,n){"use strict";function r(){return{reconstructFullMetricName:function(e,t,n){var r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}Object.defineProperty(t,"__esModule",{value:!0}),r.__dashjs_factory_name="HandlerHelpers",t.default=dashjs.FactoryMaker.getSingletonFactory(r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(4)),i=o(n(382)),a=o(n(141));function o(e){return e&&e.__esModule?e:{default:e}}var s={},u=r.default.registerPlugin||r.default.plugin,l=function(e){var t=this;this.ready((function(){!function(e){if(e.addClass("vjs-http-source-selector"),e.techName_,"Html5"!==e.techName_)return!1;e.on(["loadedmetadata"],(function(){if(r.default.log("loadmetadata event"),"undefined"===e.videojs_http_source_selector_initialized||!0===e.videojs_http_source_selector_initialized);else{e.videojs_http_source_selector_initialized=!0;var t=e.controlBar,n=t.getChild("fullscreenToggle").el();t.el().insertBefore(t.addChild("SourceMenuButton").el(),n)}}))}(t,r.default.mergeOptions(s,e))})),r.default.registerComponent("SourceMenuButton",i.default),r.default.registerComponent("SourceMenuItem",a.default)};u("httpSourceSelector",l);var c=l;t.default=c},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(4))&&i.__esModule?i:{default:i};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=a.default.getComponent("MenuItem"),h=a.default.getComponent("Component"),p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(a,e);var t,n,r,i=l(a);function a(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t.selectable=!0,t.multiSelectable=!1,i.call(this,e,t)}return t=a,(n=[{key:"handleClick",value:function(){var e=this.options_;e.label,s(d(a.prototype),"handleClick",this).call(this);for(var t=this.player().qualityLevels(),n=e.index===t.length,r=0;r<t.length;r++)n||e.index===r?t[r].enabled=!0:t[r].enabled=!1;n?this.deselectRest(6):this.deselectRest(e.index)}},{key:"deselectRest",value:function(e){this.parentComponent_&&this.parentComponent_.children().forEach((function(t){t.selected(e===t.options_.index)}))}},{key:"update",value:function(){var e=this.player().qualityLevels().selectedIndex;this.selected(this.options_.index===e)}}])&&o(t.prototype,n),r&&o(t,r),a}(f);h.registerComponent("SourceMenuItem",p);var g=p;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};new f(this,e).init()},t.getDefaultPlayerColor=void 0;var r=n(13),i=n(66),a=n(49);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="\n .PLAYER-CLASS-PREFIX {\n --color-accent: --accent-color;\n --color-base: --base-color;\n --color-text: --text-color;\n\n color: --text-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-time-tooltip,\n .PLAYER-CLASS-PREFIX .vjs-mouse-display:after,\n .PLAYER-CLASS-PREFIX .vjs-play-progress:after {\n color: --base-color;\n background-color: --text-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-slider {\n background-color: rgba(--accent-color, 0.3);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-load-progress,\n .PLAYER-CLASS-PREFIX .vjs-load-progress div {\n background: rgba(--accent-color, 0.2);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-volume-level,\n .PLAYER-CLASS-PREFIX .vjs-play-progress {\n background: --accent-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-volume-vertical {\n background-color: rgba(--base-color, 0.7);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-volume-panel-horizontal .vjs-control:before {\n border-color: transparent transparent rgba(--accent-color, 0.4) transparent;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-volume-panel-horizontal .vjs-volume-level:before {\n border-color: transparent transparent --accent-color transparent;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-title-bar {\n color: --text-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay {\n color: --text-color;\n background-color: rgba(--base-color, 0.4);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item {\n box-shadow: 0 0.5em 1.2em 0px --base-color;\n color: --text-color;\n border: 1px solid --text-color !important;\n position: relative;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item:active,\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item:hover {\n border: 1px solid --accent-color !important;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content .vjs-menu-item:active,\n .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content .vjs-menu-item:hover {\n color: --text-color;\n background-color: --accent-color;\n }\n\n .PLAYER-CLASS-PREFIX.vjs-ad-playing .vjs-progress-control .vjs-play-progress {\n background: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX.cld-plw-layout {\n background-color: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX .cld-plw-item-info-wrap {\n color: --text-color;\n }\n\n .PLAYER-CLASS-PREFIX .cld-plw-panel-item {\n border-color: --text-color;\n }\n\n .PLAYER-CLASS-PREFIX .cld-video-player-floater-close polygon {\n fill: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX .cld-spbl-product-hotspot:after {\n background: --base-color;\n box-shadow: 0 0 0 4px --accent-color, 0 0 0 8px rgba(--text-color, 0.24);\n }\n\n .PLAYER-CLASS-PREFIX .cld-spbl-product-tooltip {\n color: --base-color;\n background: --text-color;\n }\n\n .PLAYER-CLASS-PREFIX .base-color-semi-bg {\n background: rgba(--base-color, 0.7);\n }\n\n .PLAYER-CLASS-PREFIX .text-color-semi-bg {\n background: rgba(--text-color, 0.7);\n }\n\n .PLAYER-CLASS-PREFIX .text-color-text {\n color: --text-color;\n }\n\n .PLAYER-CLASS-PREFIX .base-color-text {\n color: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX .accent-color-text {\n color: --accent-color;\n }\n",u="\n\n .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .base-color-bg,\n .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .vjs-control-bar,\n .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .vjs-big-play-button,\n .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .vjs-menu-button\n .vjs-menu-content {\n background-color: rgba(--base-color, 0.6);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-title-bar {\n background-image: linear-gradient(--base-color, rgba(255, 255, 255, 0) 100%);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary .vjs-recommendations-overlay-item-primary-content {\n background-color: rgba(--base-color, 0.6);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary div {\n background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 80%);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-upcoming-video {\n border: 1px solid rgba(--text-color, 0.5);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-upcoming-video .vjs-upcoming-video-bar {\n background-color: rgba(--base-color, 0.6);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content {\n background-color: rgba(--base-color, 0.6);\n }\n",l="\n .PLAYER-CLASS-PREFIX .vjs-title-bar {\n flex-direction: row;\n justify-content: left;\n height: 3.6em;\n background: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-title-bar div {\n width: auto;\n padding: 0 inherit;\n margin: 0;\n }\n\n .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .base-color-bg,\n .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .vjs-control-bar,\n .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .vjs-big-play-button,\n .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .vjs-menu-button .vjs-menu-content {\n background-color: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary .vjs-recommendations-overlay-item-primary-content {\n background-color: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary:active .vjs-recommendations-overlay-item-primary-content,\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary:hover .vjs-recommendations-overlay-item-primary-content {\n color: --base-color;\n background-color: rgba(--accent-color, 0.8);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary:active div,\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary:hover div {\n color: --base-color;\n background-color: rgba(--accent-color, 0.8);\n }\n\n .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary div {\n background: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-upcoming-video {\n border: 1px solid --text-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-upcoming-video .vjs-upcoming-video-bar {\n background-color: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content {\n background-color: --base-color;\n }\n\n .PLAYER-CLASS-PREFIX .cld-plw-item-info-wrap {\n color: --text-color;\n }\n\n @media only screen and (max-width: 768px) {\n .PLAYER-CLASS-PREFIX.cld-plw-vertical .cld-plw-item-info-wrap {\n color: --accent-color;\n }\n }\n",c={colorsDark:{base:"#000000",accent:"#FF620C",text:"#FFFFFF"},colorsLight:{base:"#FFFFFF",accent:"#0078FF",text:"#0E2F5A"}},d=function(e){return(0,a.isLight)(e)?c.colorsLight:c.colorsDark};t.getDefaultPlayerColor=d;var f=function e(t){var n=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.player=t;var c=d(this.player.options_);a.colors=(0,r.assign)({},c,a.colors),this.init=function(){f(p(s)),"light"===n.player.options_.skin?f(p(l)):f(p(u))};var f=function(e){var t=document.createElement("style");t.innerHTML=e,n.player.el_.appendChild(t)},h=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return t+t+n+n+r+r}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null},p=function(e){return e.replace(/PLAYER\-CLASS\-PREFIX/g,(0,i.playerClassPrefix)(n.player)).replace(/rgba\(\-\-base\-color/g,"rgba("+h(a.colors.base)).replace(/rgba\(\-\-accent\-color/g,"rgba("+h(a.colors.accent)).replace(/rgba\(\-\-text\-color/g,"rgba("+h(a.colors.text)).replace(/\-\-base\-color/g,a.colors.base).replace(/\-\-accent\-color/g,a.colors.accent).replace(/\-\-text\-color/g,a.colors.text)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FORMAT_MAPPINGS=t.CONTAINER_MIME_TYPES=t.URL_PATTERN=t.VIDEO_SUFFIX_REMOVAL_PATTERN=t.DEFAULT_VIDEO_PARAMS=t.DEFAULT_POSTER_PARAMS=void 0;t.DEFAULT_POSTER_PARAMS={format:"jpg",resource_type:"video"};var r=["webm/vp9","mp4/h265","mp4"],i={resource_type:"video",type:"upload",transformation:[],sourceTransformation:{},sourceTypes:r,recommendations:null,info:{},interactionAreas:{}};t.DEFAULT_VIDEO_PARAMS=i;var a=RegExp("\\.(".concat(r.join("|"),")$$"));t.VIDEO_SUFFIX_REMOVAL_PATTERN=a;var o=RegExp("https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)");t.URL_PATTERN=o;t.CONTAINER_MIME_TYPES={dash:["application/dash+xml"],hls:["application/x-mpegURL"],mpd:["application/dash+xml"],m3u8:["application/x-mpegURL"]};t.FORMAT_MAPPINGS={hls:"m3u8",dash:"mpd"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PLAYLIST_DEFAULTS_OPTIONS=t.UPCOMING_VIDEO_TRANSITION=t.DEFAULT_PRESENT_UPCOMING=t.DEFAULT_AUTO_ADVANCE=void 0;t.DEFAULT_AUTO_ADVANCE=0;t.DEFAULT_PRESENT_UPCOMING=10;t.UPCOMING_VIDEO_TRANSITION=1;t.PLAYLIST_DEFAULTS_OPTIONS={fluid:!1,show:!0,direction:"vertical",total:4,selector:!1,renderTo:[]}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.normalizeEventsParam=void 0;var i=u(n(4)),a=u(n(58)),o=n(13),s=n(14);function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g={percentsplayed:{percents:[25,50,75,100]}},m={events:["percentsplayed","pausenoseek","seek","mute","unmute","qualitychanged"]},y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(n,e);var t=d(n);function n(e){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,n),(r=t.call(this)).player=e;var o=i.default.mergeOptions(m,a),s={lastState:void 0},u=0,c=0,d=!1,f=[],p=[],y=null,b=!1,E=function(e){r.player.muted()&&"muted"!==s.lastState?(s.lastState="muted",r.emit("mute",e)):r.player.muted()||"unmuted"===s.lastState||(s.lastState="unmuted",r.emit("unmute",e))},S=function(e){var t=r.player.currentTime(),n=r.player.duration(),i=function(t,n){n.originalType="timeupdate",r.emit(t,e,n)};if(r.events.percentsplayed&&r.events.percentsplayed.percents.forEach((function(e){_(t,n,e)&&-1===f.indexOf(e)&&(f.push(e),i("percentsplayed",{percent:e}))})),r.events.timeplayed){var a=r.events.timeplayed;(a.interval?[Math.floor(t/a.interval)*a.interval]:a.times).forEach((function(e){T(t,e)&&-1===p.indexOf(e)&&(p.push(e),i("timeplayed",{time:e}))}))}r.events.seek&&(u=c,c=t,Math.abs(u-c)>1&&(d=!0,P(),i("seek",{seekStart:u,seekEnd:c})))},A=function(e){Math.round(r.player.currentTime())===Math.round(r.player.duration())||d||r.emit("pausenoseek",e)},C=function(){d=!1},w=function(){b&&(r.player.trigger("replay"),b=!1)},I=function(){r.player.currentSource().src!==y&&(P(),y=r.player.currentSource().src)},R=function(e){for(var t=h(r),n=r.player.textTracks(),i=null,a=0;a<n.length;a++)"segment-metadata"===n[a].label&&(i=n[a]);var o=null;i&&i.on("cuechange",(function(){var n=i.activeCues[0];if(n){var r=n.value.resolution;if(o!==r){var a={from:o,to:r};t.emit("qualitychanged",e,a)}o=r}}))},O=function(){s={lastState:void 0},u=c=0,d=!1,P()},P=function(){f=[],p=[]},D=function(){b=!0};return r.events=v(o.events,g),O(),r.player.on("play",w.bind(h(r))),r.player.on("ended",D.bind(h(r))),(r.events.percentsplayed||r.events.timeplayed||r.events.seek||r.events.totaltimeplayed)&&r.player.on("timeupdate",S.bind(h(r))),(r.events.mute||r.events.unmute)&&r.player.on("volumechange",E.bind(h(r))),r.events.pausenoseek&&(r.player.on("pause",A.bind(h(r))),r.player.on("play",C.bind(h(r)))),r.player.on("loadedmetadata",I.bind(h(r))),r.player.on("loadeddata",R.bind(h(r))),r}return n}(a.default),v=function(e,t){var n=e;return"Array"===e.constructor.name&&(n=e.reduce((function(e,n){var r=t[n]||{};return(0,s.isPlainObject)(n)?e[n.type]=(0,o.assign)({},r,n):e[n]=r,e}),{})),n};t.normalizeEventsParam=v;var _=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,i=t*n/100;return T(e,i,r)},T=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5;return e<=t+n&&e>=t-n},b=y;t.default=b},function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=void 0;t.get=function(e,t,n){if(e&&"object"===a(e)){var i,o=e,s=r(t.split("."));try{for(s.s();!(i=s.n()).done;){var u=i.value;if(!Object.prototype.hasOwnProperty.call(o,u)||void 0===o[u])return n;o=o[u]}}catch(e){s.e(e)}finally{s.f()}return o}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidConfig=t.isValueValid=t.getValidatorItem=void 0;var r=n(14),i=function(e){return(0,r.isFunction)(e)?e():e};t.getValidatorItem=i;var a=function(e,t,n){var r=i(e),a=r.value(t);return a||console.error("cloudinary video player: ".concat(r.message(n))),a};t.isValueValid=a;t.isValidConfig=function e(t,n){if((0,r.isPlainObject)(n))for(var i in t)if(Object.prototype.hasOwnProperty.call(n,i)){var o=t[i],s=n[i],u=(0,r.isPlainObject)(o);if(u&&!e(o,s))return!1;if(!u&&!a(s,o,i))return!1}return!0}},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){var r=n(64),i=n(166);function a(t,n,o){return i()?(e.exports=a=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=a=function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a},e.exports.default=e.exports,e.exports.__esModule=!0),a.apply(null,arguments)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(64);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(0),i=n.n(r);function a(t){for(var n=function(t){return i.a.atob?i.a.atob(t):e.from(t,"base64").toString("binary")}(t),r=new Uint8Array(n.length),a=0;a<n.length;a++)r[a]=n.charCodeAt(a);return r}}).call(this,n(29).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(0),i=n.n(r);function a(t){for(var n=function(t){return i.a.atob?i.a.atob(t):e.from(t,"base64").toString("binary")}(t),r=new Uint8Array(n.length),a=0;a<n.length;a++)r[a]=n.charCodeAt(a);return r}}).call(this,n(29).Buffer)},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function a(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function o(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new d,a=n.domBuilder||new i,s=n.errorHandler,u=n.locator,c=n.xmlns||{},f=/\/x?html?$/.test(t),h=f?l.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&a.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},a=e instanceof Function;function s(t){var i=e[t];!i&&a&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+o(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,a,u),r.domBuilder=n.domBuilder||a,f&&(c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?r.parse(e,c,h):r.errorHandler.error("invalid doc source"),a.doc},i.prototype={startDocument:function(){this.doc=(new h).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,o=i.createElementNS(e,n||t),s=r.length;u(this,o),this.currentElement=o,this.locator&&a(this.locator,o);for(var l=0;l<s;l++){e=r.getURI(l);var c=r.getValue(l),d=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&a(r.getLocator(l),d),d.value=d.nodeValue=c,o.setAttributeNode(d)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&a(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&a(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&a(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&a(this.locator,i),u(this,i)}},warning:function(e){o(this.locator)},error:function(e){console.error("[xmldom error]\t"+e,o(this.locator))},fatalError:function(e){throw new f(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(169),c=n(170),d=c.XMLReader,f=c.ParseError,h=t.DOMImplementation=n(96).DOMImplementation;t.XMLSerializer=n(96).XMLSerializer,t.DOMParser=r,t.__DOMHandler=i},function(e,t){var n=Math.pow(2,32);e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=t.getUint32(i),r.firstOffset=t.getUint32(i+4),i+=8):(r.earliestPresentationTime=t.getUint32(i)*n+t.getUint32(i+4),r.firstOffset=t.getUint32(i+8)*n+t.getUint32(i+12),i+=16),i+=2;var a=t.getUint16(i);for(i+=2;a>0;i+=12,a--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return r}},function(e,t,n){"use strict";t.a=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}},function(e,t,n){"use strict";t.a=function(e){return new this((function(t,n){if(!e||void 0===e.length)return n(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var i=r.length;function a(e,n){if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if("function"==typeof o)return void o.call(n,(function(t){a(e,t)}),(function(n){r[e]={status:"rejected",reason:n},0==--i&&t(r)}))}r[e]={status:"fulfilled",value:n},0==--i&&t(r)}for(var o=0;o<r.length;o++)a(o,r[o])}))}},function(e,t,n){"use strict";n(158);var r=o(n(48)),i=o(n(159)),a=n(13);function o(e){return e&&e.__esModule?e:{default:e}}r.default.VideoPlayer=i.default;var s=r.default.Cloudinary.prototype;s.videoPlayer=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,a.assign)(t,{cloudinaryConfig:this}),new i.default(e,t,n)},s.videoPlayers=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,a.assign)(t,{cloudinaryConfig:this}),i.default.all(e,t,n)}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=v(n(4));n(171);var i=v(n(202)),a=v(n(97)),o=v(n(67)),s=v(n(404)),u=v(n(145)),l=v(n(405)),c=v(n(409)),d=v(n(62)),f=n(14),h=n(49),p=n(37),g=n(413),m=n(147),y=n(417);function v(e){return e&&e.__esModule?e:{default:e}}function _(e,t,n){return(_=C()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&E(i,n.prototype),i}).apply(null,arguments)}function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?A(e):t}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.keys(i.default).forEach((function(e){r.default.registerPlugin(e,i.default[e])})),(0,h.overrideDefaultVideojsComponents)();var I=!0,R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(P,e);var t,n,s,v,R,O=(t=P,n=C(),function(){var e,r=w(t);if(n){var i=w(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return S(this,e)});function P(e,t,n){var o;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),(o=O.call(this))._playlistWidget=null,o.nbCalls=0,o._firstPlayed=!1,o.videoElement=(0,h.getResolveVideoElement)(e),o.options=(0,h.extractOptions)(o.videoElement,t),o._videojsOptions=o.options.videojsOptions,o.videoElement.classList.add("video-js"),a.default.fontFace(o.videoElement,o.playerOptions),a.default.playButton(o.videoElement,o._videojsOptions),i.default.dashPlugin&&i.default.dashPlugin(),o.videojs=(0,r.default)(o.videoElement,o._videojsOptions),o._isPlayerConfigValid=(0,m.isValidConfig)(o.options,y.playerValidators),!o._isPlayerConfigValid)return o.videojs.error("invalid player configuration"),S(o);o._videojsOptions.muted&&o.videojs.volume(.4),o.playerOptions.fluid&&o.fluid(o.playerOptions.fluid);var s={contribAdsLoaded:(0,f.isFunction)(o.videojs.ads),imaAdsLoaded:"object"===("undefined"==typeof google?"undefined":T(google))&&"object"===T(google.ima)};return o.interactionArea=(0,g.interactionAreaService)(A(o),o.playerOptions,o._videojsOptions),o._setCssClasses(),o._initPlugins(s),o._initPlaylistWidget(),o._initJumpButtons(),o._setVideoJsListeners(n),o}return s=P,R=[{key:"all",value:function(e){for(var t=document.querySelectorAll(e),n=[],r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];for(var o=0;o<t.length;o++)n.push(_(P,[t[o]].concat(i)));return n}},{key:"allowUsageReport",value:function(e){return void 0===e?I:I=!!e}},{key:"buildTextTrackObj",value:function(e,t){return{kind:e,label:t.label,srclang:t.language,default:!!t.default,src:t.url}}}],(v=[{key:"_setVideoJsListeners",value:function(e){var t=this;this.videojs.on("error",(function(){var e=t.videojs.error();if(e){var n=t._isPlayerConfigValid&&t.videojs.cloudinary.currentSourceType();4!==e.code||"VideoSource"!==n&&"AudioSource"!==n?t.videojs.clearTimeout(t.reTryId):(t.videojs.error(null),a.default.handleCldError(t,t.playerOptions))}})),this.videojs.on("play",(function(){t.videojs.clearTimeout(t.reTryId)})),this.videojs.on("canplaythrough",(function(){t.videojs.clearTimeout(t.reTryId)})),this.videojs.ready((function(){t._onReady(),e&&e(t),t.interactionArea.init()})),this.adsEnabled&&Object.keys(this.playerOptions.ads).length>0&&"object"===T(this.videojs.ima)&&("first-video"===this.playerOptions.ads.adsInPlaylist?this.videojs.one("sourcechanged",(function(){t.videojs.ima.playAd()})):this.videojs.on("sourcechanged",(function(){t.videojs.ima.playAd()})))}},{key:"_initPlugins",value:function(e){this.adsEnabled=this._initIma(e),this._initAutoplay(),this._initContextMenu(),this._initPerSrcBehaviors(),this._initCloudinary(),this._initAnalytics(),this._initFloatingPlayer(),this._initColors(),this._initTextTracks(),this._initSeekThumbs()}},{key:"_isFullScreen",value:function(){return this.videojs.player().isFullscreen()}},{key:"_initIma",value:function(e){if(!e.contribAdsLoaded||!e.imaAdsLoaded)return this.playerOptions.ads&&(e.contribAdsLoaded,e.imaAdsLoaded),!1;this.playerOptions.ads||(this.playerOptions.ads={});var t=this.playerOptions.ads;return 0!==Object.keys(t).length&&(this.videojs.ima({id:this.el().id,adTagUrl:t.adTagUrl,disableFlashAds:!0,prerollTimeout:t.prerollTimeout||5e3,postrollTimeout:t.postrollTimeout||5e3,showCountdown:!1!==t.showCountdown,adLabel:t.adLabel||"Advertisement",locale:t.locale||"en",autoPlayAdBreaks:!1!==t.autoPlayAdBreaks,debug:!0}),!0)}},{key:"setTextTracks",value:function(e){var t=this.videojs.remoteTextTracks();if(t)for(var n=t.tracks_.length-1;n>=0;n--)this.videojs.removeRemoteTextTrack(t.tracks_[n]);if(e){for(var r=[],i=0,o=Object.keys(e);i<o.length;i++){var s=o[i];if(Array.isArray(e[s]))for(var u=e[s],l=0;l<u.length;l++)r.push(P.buildTextTrackObj(s,u[l]));else r.push(P.buildTextTrackObj(s,e[s]))}a.default.filterAndAddTextTracks(r,this.videojs)}}},{key:"_initSeekThumbs",value:function(){var e=this;this.playerOptions.seekThumbnails&&this.videojs.on("cldsourcechanged",(function(t,n){var r=n.source;if(!("AudioSource"===r.getType()||e.videojs&&e.videojs.activePlugins_&&e.videojs.activePlugins_.vr)){var i=r.cloudinaryConfig(),a=r.publicId(),o=r.transformation().toOptions();o&&o.streaming_profile&&delete o.streaming_profile,o.flags=o.flags||[],o.flags.push("sprite");var s=i.video_url(a+".vtt",{transformation:o});(0,f.isFunction)(e.videojs.vttThumbnails)?e.videojs.vttThumbnails({src:s}):e.videojs.vttThumbnails.src(s)}}))}},{key:"_initColors",value:function(){this.videojs.colors(this.playerOptions.colors?{colors:this.playerOptions.colors}:{})}},{key:"_initQualitySelector",value:function(){var e=this;this._videojsOptions.controlBar&&!1!==this.playerOptions.qualitySelector&&(null===r.default.browser.IE_VERSION&&this.videojs.httpSourceSelector({default:"auto"}),this.videojs.on("loadedmetadata",(function(){c.default.init(e.videojs)})),this.videojs.on("loadeddata",(function(){c.default.setVisibility(e.videojs)})))}},{key:"_initTextTracks",value:function(){var e=this;this.videojs.on("refreshTextTracks",(function(t,n){e.setTextTracks(n)}))}},{key:"_initPerSrcBehaviors",value:function(){this.videojs.perSourceBehaviors&&this.videojs.perSourceBehaviors()}},{key:"_initJumpButtons",value:function(){!this.playerOptions.showJumpControls&&this.videojs.controlBar&&(this.videojs.controlBar.removeChild("JumpForwardButton"),this.videojs.controlBar.removeChild("JumpBackButton"))}},{key:"_initCloudinary",value:function(){var e=this.playerOptions.cloudinary;e.chainTarget=this,!1!==e.secure&&this.playerOptions.cloudinary.cloudinaryConfig.config("secure",!0),this.videojs.cloudinary(this.playerOptions.cloudinary)}},{key:"_initAnalytics",value:function(){var e=this.playerOptions.analytics;if(window.ga||!e){if(e){var t="object"===T(e)?e:{};this.videojs.analytics(t)}}else console.error("Google Analytics script is missing")}},{key:"reTryVideo",value:function(e,t){var n=this;if(!this.isVideoReady())if(this.nbCalls<e)this.nbCalls++,this.reTryId=this.videojs.setTimeout((function(){return n.reTryVideo(e,t)}),t);else{var r=new Error("Video is not ready please try later");this.videojs.trigger("error",r)}}},{key:"isVideoReady",value:function(){return this.videojs.readyState()>=(/iPad|iPhone|iPod/.test(navigator.userAgent)?1:4)&&(this.nbCalls=0,!0)}},{key:"_initPlaylistWidget",value:function(){var e=this;this.videojs.on("playlistcreated",(function(){e._playlistWidget&&e._playlistWidget.dispose();var t=e.playerOptions.playlistWidget;(0,f.isPlainObject)(t)&&(e.playerOptions.fluid&&(t.fluid=!0),e.playerOptions.cloudinary.fontFace&&(t.fontFace=e.playerOptions.cloudinary.fontFace),e._playlistWidget=new l.default(e.videojs,t))}))}},{key:"playlistWidget",value:function(e){return!(!e&&!this._playlistWidget)&&(!e&&this._playlistWidget||(0,f.isPlainObject)(e)&&this._playlistWidget.options(e),this._playlistWidget)}},{key:"_initAutoplay",value:function(){"on-scroll"===this.playerOptions.autoplayMode&&this.videojs.autoplayOnScroll()}},{key:"_initContextMenu",value:function(){this.playerOptions.hideContextMenu||this.videojs.contextMenu(o.default.contextMenu)}},{key:"_initFloatingPlayer",value:function(){this.playerOptions.floatingWhenNotVisible!==p.FLOATING_TO.NONE&&this.videojs.floatingPlayer({floatTo:this.playerOptions.floatingWhenNotVisible})}},{key:"_setCssClasses",value:function(){this.videojs.addClass(a.default.CLASS_PREFIX),this.videojs.addClass(a.default.playerClassPrefix(this.videojs)),a.default.setSkinClassPrefix(this.videojs,a.default.skinClassPrefix(this.videojs)),11===r.default.browser.IE_VERSION&&this.videojs.addClass("cld-ie11")}},{key:"_onReady",value:function(){this._setExtendedEvents();var e=this.playerOptions.source||this.playerOptions.publicId;e&&this.source(e,this.playerOptions)}},{key:"_setExtendedEvents",value:function(){var e=this,t=[];this.playerOptions.playedEventPercents&&t.push({type:"percentsplayed",percents:this.playerOptions.playedEventPercents}),this.playerOptions.playedEventTimes&&t.push({type:"timeplayed",times:this.playerOptions.playedEventTimes}),t.push.apply(t,["seek","mute","unmute","qualitychanged"]);var n=new u.default(this.videojs,{events:t});Object.keys(n.events).forEach((function(t){n.on(t,(function(n,r){e.videojs.trigger({type:t,eventData:r})}))}))}},{key:"cloudinaryConfig",value:function(e){return this.videojs.cloudinary.cloudinaryConfig(e)}},{key:"playerOptions",get:function(){return this.options.playerOptions}},{key:"currentPublicId",value:function(){return this.videojs.cloudinary.currentPublicId()}},{key:"currentSourceUrl",value:function(){return this.videojs.currentSource().src}},{key:"currentPoster",value:function(){return this.videojs.cloudinary.currentPoster()}},{key:"source",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._isPlayerConfigValid){var n=(0,m.isValidConfig)(t,y.sourceValidators);if(n){if(e instanceof d.default)return this.videojs.cloudinary.source(e,t);this.videojs.interactive&&this.videojs.interactive(this.videojs,t),P.allowUsageReport()&&(t.usageReport=!0),this.setTextTracks(t.textTracks),this._initQualitySelector(),clearTimeout(this.reTryId),this.nbCalls=0;var r=this.videojs.options_.maxTries||3,i=this.videojs.options_.videoTimeout||55e3;return this.reTryVideo(r,i),this.videojs.cloudinary.source(e,t)}this.videojs.error("invalid source configuration")}}},{key:"posterOptions",value:function(e){return this.videojs.cloudinary.posterOptions(e)}},{key:"skin",value:function(e){if(void 0!==e&&(0,f.isString)(e)){a.default.setSkinClassPrefix(this.videojs,e);var t=this.playlistWidget();this.playlistWidget()&&t.setSkin()}return a.default.skinClassPrefix(this.videojs)}},{key:"playlist",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.videojs.cloudinary.playlist(e,t)}},{key:"playlistByTag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.videojs.cloudinary.playlistByTag(e,t)}},{key:"sourcesByTag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.videojs.cloudinary.sourcesByTag(e,t)}},{key:"fluid",value:function(e){return void 0===e?this.videojs.fluid():(e?this.videojs.addClass(p.FLUID_CLASS_NAME):this.videojs.removeClass(p.FLUID_CLASS_NAME),this.videojs.fluid(e),this.videojs.trigger("fluid",e),this)}},{key:"play",value:function(){return this.playWasCalled=!0,this.videojs.play(),this}},{key:"stop",value:function(){return this.pause(),this.currentTime(0),this}},{key:"playPrevious",value:function(){return this.playlist().playPrevious(),this}},{key:"playNext",value:function(){return this.playlist().playNext(),this}},{key:"transformation",value:function(e){return this.videojs.cloudinary.transformation(e)}},{key:"sourceTypes",value:function(e){return this.videojs.cloudinary.sourceTypes(e)}},{key:"sourceTransformation",value:function(e){return this.videojs.cloudinary.sourceTransformation(e)}},{key:"autoShowRecommendations",value:function(e){return this.videojs.cloudinary.autoShowRecommendations(e)}},{key:"duration",value:function(){return this.videojs.duration()}},{key:"height",value:function(e){return e?(this.videojs.height(e),this):this.videojs.height()}},{key:"width",value:function(e){return e?(this.videojs.width(e),this):this.videojs.width()}},{key:"volume",value:function(e){return e?(this.videojs.volume(e),this):this.videojs.volume()}},{key:"mute",value:function(){return this.isMuted()||this.videojs.muted(!0),this}},{key:"unmute",value:function(){return this.isMuted()&&this.videojs.muted(!1),this}},{key:"isMuted",value:function(){return this.videojs.muted()}},{key:"pause",value:function(){return this.videojs.pause(),this}},{key:"currentTime",value:function(e){return e||0===e?(this.videojs.currentTime(e),this):this.videojs.currentTime()}},{key:"maximize",value:function(){return this.isMaximized()||this.videojs.requestFullscreen(),this}},{key:"exitMaximize",value:function(){return this.isMaximized()&&this.videojs.exitFullscreen(),this}},{key:"isMaximized",value:function(){return this.videojs.isFullscreen()}},{key:"dispose",value:function(){this.videojs.dispose()}},{key:"controls",value:function(e){return void 0===e?this.videojs.controls():(this.videojs.controls(e),this)}},{key:"ima",value:function(){return{playAd:this.videojs.ima.playAd}}},{key:"loop",value:function(e){return void 0===e?this.videojs.loop():(this.videojs.loop(e),this)}},{key:"el",value:function(){return this.videojs.el()}}])&&b(s.prototype,v),R&&b(s,R),P}(a.default.mixin(s.default));t.default=R},function(e,t){},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t,n){var r=n(2),i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function o(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function s(){this.values=i(null)}function u(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);if(2===o.length)t(o[0],o[1])}}function l(e,t,n){var r=e;function i(){var t=o(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=i(),l(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),l(),t.endTime=i(),l(),function(e,t){var r=new s;u(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}a.prototype=i(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var c=r.createElement&&r.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},f={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},h={v:"title",lang:"lang"},p={rt:"ruby"};function g(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return c.innerHTML=e,e=c.textContent,c.textContent="",e}function i(e,t){return!p[t.localName]||p[t.localName]===e.localName}function a(t,n){var r=d[t];if(!r)return null;var i=e.document.createElement(r),a=h[t];return a&&n&&(i[a]=n.trim()),i}for(var s,u=e.document.createElement("div"),l=u,g=[];null!==(s=n());)if("<"!==s[0])l.appendChild(e.document.createTextNode(r(s)));else{if("/"===s[1]){g.length&&g[g.length-1]===s.substr(2).replace(">","")&&(g.pop(),l=l.parentNode);continue}var m,y=o(s.substr(1,s.length-2));if(y){m=e.document.createProcessingInstruction("timestamp",y),l.appendChild(m);continue}var v=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(!(m=a(v[1],v[3])))continue;if(!i(l,m))continue;if(v[2]){var _=v[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(f.hasOwnProperty(n)){var r=t?"background-color":"color",i=f[n];m.style[r]=i}})),m.className=_.join(" ")}g.push(v[1]),l.appendChild(m),l=m}return u}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function y(e){for(var t=0;t<m.length;t++){var n=m[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function v(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(y(n.charCodeAt(a)))return"rtl";return"ltr"}function _(){}function T(e,t,n){_.call(this),this.cue=t,this.cueDiv=g(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:v(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function b(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function E(e,t,n,r){var i=new b(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(a),s=[];if(a.snapToLines){var u;switch(a.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var l=i.lineHeight,c=l*Math.round(o),d=n[u]+l,f=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),o<0&&(c+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(f,c)}else{var h=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":o-=h/2;break;case"end":o-=h}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new b(t)}var p=function(e,t){for(var i,a=new b(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var u=e.intersectPercentage(n);o>u&&(i=new b(e),o=u),e=new b(a)}return i||a}(i,s);t.move(p.toCSSCompatValues(n))}function S(){}_.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},T.prototype=i(_.prototype),T.prototype.constructor=T,b.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},b.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},b.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},b.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},b.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},b.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},b.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},b.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},S.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},S.convertCueToDOMTree=function(e,t){return e&&t?g(e,t):null};S.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],a=b.getSimpleBoxPosition(r),o={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,s,u=0;u<t.length;u++)s=t[u],n=new T(e,s,o),r.appendChild(n.div),E(0,n,a,i),s.displayState=n.div,i.push(b.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},S.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},S.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof a))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){e.match(/X-TIMESTAMP-MAP/)?u(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new s;u(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",o(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):u(e,(function(e,n){switch(e){case"Region":!function(e){var n=new s;if(u(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var c=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new a(a.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{l(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var f=-1!==i.indexOf("--\x3e");if(!i||f&&(d=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new a(a.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=S},function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function a(e,t,r){this.hasBeenReset=!1;var a="",o=!1,s=e,u=t,l=r,c=null,d="",f=!0,h="auto",p="start",g="auto",m="auto",y=100,v="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(e){a=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!e}},startTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");s=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return l},set:function(e){l=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(e){var t=function(e){return"string"==typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return f},set:function(e){f=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");h=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=i(e);t&&(p=t,this.hasBeenReset=!0)}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=i(e);t&&(m=t,this.hasBeenReset=!0)}},size:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");y=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return v},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");v=t,this.hasBeenReset=!0}}}),this.displayState=void 0}a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=a},function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,a=100,o=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var t=function(e){return"string"==typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t||(u=t)}}})}},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),o=r[0],s=r[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),c=0,d=s>0?o-4:o;for(n=0;n<d;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,a,o=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+d],d+=f,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=l}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,d=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*u-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+h]=255&o,h+=p,o/=256,l-=8);e[n+h-p]|=128*g}},function(e,t){t.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},function(e,t){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function a(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,a)}function o(){}function s(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function u(e,t,n,r,i,a){function o(e,t,r){e in n.attributeNames&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,t,r)}for(var s,u=++t,l=0;;){var c=e.charAt(u);switch(c){case"=":if(1===l)s=e.slice(t,u),l=3;else{if(2!==l)throw new Error("attribute equal must after attrName");l=3}break;case"'":case'"':if(3===l||1===l){if(1===l&&(a.warning('attribute value must after "="'),s=e.slice(t,u)),t=u+1,!((u=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");o(s,d=e.slice(t,u).replace(/&#?\w+;/g,i),t-1),l=5}else{if(4!=l)throw new Error('attribute value must after "="');o(s,d=e.slice(t,u).replace(/&#?\w+;/g,i),t),a.warning('attribute "'+s+'" missed start quot('+c+")!!"),t=u+1,l=5}break;case"/":switch(l){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:l=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==l&&n.setTagName(e.slice(t,u)),u;case">":switch(l){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,u)).slice(-1)&&(n.closed=!0,d=d.slice(0,-1));case 2:2===l&&(d=s),4==l?(a.warning('attribute "'+d+'" missed quot(")!'),o(s,d.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&d.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),o(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"":c=" ";default:if(c<=" ")switch(l){case 0:n.setTagName(e.slice(t,u)),l=6;break;case 1:s=e.slice(t,u),l=2;break;case 4:var d=e.slice(t,u).replace(/&#?\w+;/g,i);a.warning('attribute "'+d+'" missed quot(")!!'),o(s,d,t);case 5:l=6}else switch(l){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),o(s,s,t),t=u,l=1;break;case 5:a.warning('attribute space is required"'+s+'"!!');case 6:l=1,t=u;break;case 3:l=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function l(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],s=o.qName,u=o.value;if((h=s.indexOf(":"))>0)var l=o.prefix=s.slice(0,h),c=s.slice(h+1),d="xmlns"===l&&c;else c=s,l=null,d="xmlns"===s&&"";o.localName=c,!1!==d&&(null==i&&(i={},f(n,n={})),n[d]=i[d]=u,o.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(d,u))}for(a=e.length;a--;){(l=(o=e[a]).prefix)&&("xml"===l&&(o.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(o.uri=n[l||""]))}var h;(h=r.indexOf(":"))>0?(l=e.prefix=r.slice(0,h),c=e.localName=r.slice(h+1)):(l=null,c=e.localName=r);var p=e.uri=n[l||""];if(t.startElement(p,c,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,c,r),i)for(l in i)t.endPrefixMapping(l)}function c(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function d(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function f(e,t){for(var n in e)t[n]=e[n]}function h(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],u=!1,l=!1;o>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],l=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var c=a[o-1];return n.startDTD(s,u,l),n.endDTD(),c.index+c[0].length}}return-1}function p(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function g(){this.attributeNames={}}a.prototype=new Error,a.prototype.name=a.name,o.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,i){function o(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function f(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?o(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function m(t){if(t>A){var n=e.substring(A,t).replace(/&#?\w+;/g,f);b&&y(A),r.characters(n,0,t-A),A=t}}function y(t,n){for(;t>=_&&(n=T.exec(e));)v=n.index,_=v+n[0].length,b.lineNumber++;b.columnNumber=t-v+1}var v=0,_=0,T=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,E=[{currentNSMap:t}],S={},A=0;for(;;){try{var C=e.indexOf("<",A);if(C<0){if(!e.substr(A).match(/^\s*$/)){var w=r.doc,I=w.createTextNode(e.substr(A));w.appendChild(I),r.currentElement=I}return}switch(C>A&&m(C),e.charAt(C+1)){case"/":var R=e.indexOf(">",C+3),O=e.substring(C+2,R),P=E.pop();R<0?(O=e.substring(C+2).replace(/[\s<].*/,""),i.error("end tag name: "+O+" is not complete:"+P.tagName),R=C+1+O.length):O.match(/\s</)&&(O=O.replace(/[\s<].*/,""),i.error("end tag name: "+O+" maybe not complete"),R=C+1+O.length);var D=P.localNSMap,M=P.tagName==O;if(M||P.tagName&&P.tagName.toLowerCase()==O.toLowerCase()){if(r.endElement(P.uri,P.localName,O),D)for(var N in D)r.endPrefixMapping(N);M||i.fatalError("end tag name: "+O+" is not match the current start tagName:"+P.tagName)}else E.push(P);R++;break;case"?":b&&y(C),R=p(e,C,r);break;case"!":b&&y(C),R=h(e,C,r,i);break;default:b&&y(C);var L=new g,k=E[E.length-1].currentNSMap,x=(R=u(e,C,L,k,f,i),L.length);if(!L.closed&&d(e,R,L.tagName,S)&&(L.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&x){for(var F=s(b,{}),U=0;U<x;U++){var B=L[U];y(B.offset),B.locator=s(b,{})}r.locator=F,l(L,r,k)&&E.push(L),r.locator=b}else l(L,r,k)&&E.push(L);"http://www.w3.org/1999/xhtml"!==L.uri||L.closed?R++:R=c(e,R,L.tagName,f,r)}}catch(e){if(e instanceof a)throw e;i.error("element parse error: "+e),R=-1}R>A?A=R:m(Math.max(C,A)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},g.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=o,t.ParseError=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"JumpForwardButton",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"JumpBackButton",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"LogoButton",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"PlaylistPanel",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"ProgressControlEventsBlocker",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"RecommendationsOverlay",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"ShoppablePanel",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"TitleBar",{enumerable:!0,get:function(){return c.default}});var r=d(n(172)),i=d(n(173)),a=d(n(174)),o=d(n(184)),s=d(n(188)),u=d(n(189)),l=d(n(105)),c=d(n(199));function d(e){return e&&e.__esModule?e:{default:e}}n(201)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(4))&&i.__esModule?i:{default:i};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(d,e);var t,n,r,i=c(d);function d(){return o(this,d),i.apply(this,arguments)}return t=d,(n=[{key:"handleClick",value:function(e){u(f(d.prototype),"handleClick",this).call(this,e),this.player().currentTime(this.player().currentTime()+10)}},{key:"createEl",value:function(){return a.default.dom.createEl("button",{className:"vjs-control vjs-icon-skip-10-plus vjs-button"})}}])&&s(t.prototype,n),r&&s(t,r),d}(a.default.getComponent("ClickableComponent"));a.default.registerComponent("JumpForwardButton",h);var p=h;t.default=p},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(4))&&i.__esModule?i:{default:i};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(d,e);var t,n,r,i=c(d);function d(){return o(this,d),i.apply(this,arguments)}return t=d,(n=[{key:"handleClick",value:function(e){u(f(d.prototype),"handleClick",this).call(this,e),this.player().currentTime(this.player().currentTime()-10)}},{key:"createEl",value:function(){return a.default.dom.createEl("button",{className:"vjs-control vjs-icon-skip-10-min vjs-button"})}}])&&s(t.prototype,n),r&&s(t,r),d}(a.default.getComponent("ClickableComponent"));a.default.registerComponent("JumpBackButton",h);var p=h;t.default=p},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(4))&&i.__esModule?i:{default:i};n(175);var o=n(176),s=n(49);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(f,e);var t,n,r,i=d(f);function f(){return u(this,f),i.apply(this,arguments)}return t=f,(n=[{key:"createEl",value:function(){var e=this.options_.playerOptions,t=e.showLogo?"block":"none",n=(0,s.isLight)(e)?o.LIGHT_BG_ICON:o.DARK_BG_ICON,r=e.logoImageUrl?e.logoImageUrl:n;return a.default.dom.createEl("a",{},{class:"vjs-control vjs-cloudinary-button vjs-button",href:e.logoOnclickUrl,target:"_blank",style:"display: ".concat(t,"; background-image: url(").concat(r,")")})}}])&&l(t.prototype,n),r&&l(t,r),f}(a.default.getComponent("ClickableComponent"));a.default.registerComponent("logoButton",p);var g=p;t.default=g},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DARK_BG_ICON=t.LIGHT_BG_ICON=void 0;t.LIGHT_BG_ICON="https://res.cloudinary.com/cloudinary-marketing/image/upload/v1597164189/creative_source/Logo/Cloud%20Glyph/cloudinary_cloud_glyph_regular.svg";t.DARK_BG_ICON="https://res.cloudinary.com/cloudinary-marketing/image/upload/v1597164191/creative_source/Logo/Cloud%20Glyph/cloudinary_cloud_glyph_white.svg"},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,a,o,s,u=1,l={},c=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){a.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return l[u]=i,r(u),u++},f.clearImmediate=h}function h(e){delete l[e]}function p(e){if(c)setTimeout(p,0,e);else{var t=l[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{h(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(18),n(52))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;t.groupBy=function(e,t){return e.reduce((function(e,n,r){return r=t(n),Object.prototype.hasOwnProperty.call(e,r)?e[r].push(n):e[r]=[n],e}),{})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fontFace=void 0;var r,i=(r=n(180))&&r.__esModule?r:{default:r};t.fontFace=function(e,t){var n=t.cloudinary.fontFace;void 0===n&&(n="Fira Sans"),n&&"inherit"!==n?(i.default.load({google:{families:[n]}}),e.style.fontFamily=n):"inherit"===n&&(e.style.fontFamily="inherit")}},function(e,t,n){var r;!function(){function i(e,t,n){return e.call.apply(e.bind,arguments)}function a(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function o(e,t,n){return(o=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?i:a).apply(null,arguments)}var s=Date.now||function(){return+new Date};function u(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var l=!!window.FontFace;function c(e,t,n,r){if(t=e.c.createElement(t),n)for(var i in n)n.hasOwnProperty(i)&&("style"==i?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r&&t.appendChild(e.c.createTextNode(r)),t}function d(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function f(e){e.parentNode&&e.parentNode.removeChild(e)}function h(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),i=0;i<t.length;i+=1){for(var a=!1,o=0;o<r.length;o+=1)if(t[i]===r[o]){a=!0;break}a||r.push(t[i])}for(t=[],i=0;i<r.length;i+=1){for(a=!1,o=0;o<n.length;o+=1)if(r[i]===n[o]){a=!0;break}a||t.push(r[i])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function p(e,t){for(var n=e.className.split(/\s+/),r=0,i=n.length;r<i;r++)if(n[r]==t)return!0;return!1}function g(e,t,n){function r(){s&&i&&a&&(s(o),s=null)}t=c(e,"link",{rel:"stylesheet",href:t,media:"all"});var i=!1,a=!0,o=null,s=n||null;l?(t.onload=function(){i=!0,r()},t.onerror=function(){i=!0,o=Error("Stylesheet failed to load"),r()}):setTimeout((function(){i=!0,r()}),0),d(e,"head",t)}function m(e,t,n,r){var i=e.c.getElementsByTagName("head")[0];if(i){var a=c(e,"script",{src:t}),o=!1;return a.onload=a.onreadystatechange=function(){o||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(o=!0,n&&n(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&i.removeChild(a))},i.appendChild(a),setTimeout((function(){o||(o=!0,n&&n(Error("Script load timeout")))}),r||5e3),a}return null}function y(){this.a=0,this.c=null}function v(e){return e.a++,function(){e.a--,T(e)}}function _(e,t){e.c=t,T(e)}function T(e){0==e.a&&e.c&&(e.c(),e.c=null)}function b(e){this.a=e||"-"}function E(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function S(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function A(e){return e.a+e.f}function C(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function w(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function I(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new b("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function R(e){if(e.g){var t=p(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),h(e.f,n,r)}O(e,"inactive")}function O(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,A(n)):e.h[t]())}function P(){this.c={}}function D(e,t){this.c=e,this.f=t,this.a=c(this.c,"span",{"aria-hidden":"true"},this.f)}function M(e){d(e.c,"body",e.a)}function N(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+S(e.c)+";font-style:"+C(e)+";font-weight:"+e.f+"00;"}function L(e,t,n,r,i,a){this.g=e,this.j=t,this.a=r,this.c=n,this.f=i||3e3,this.h=a||void 0}function k(e,t,n,r,i,a,o){this.v=e,this.B=t,this.c=n,this.a=r,this.s=o||"BESbswy",this.f={},this.w=i||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new D(this.c,this.s),this.h=new D(this.c,this.s),this.j=new D(this.c,this.s),this.m=new D(this.c,this.s),e=N(e=new E(this.a.c+",serif",A(this.a))),this.g.a.style.cssText=e,e=N(e=new E(this.a.c+",sans-serif",A(this.a))),this.h.a.style.cssText=e,e=N(e=new E("serif",A(this.a))),this.j.a.style.cssText=e,e=N(e=new E("sans-serif",A(this.a))),this.m.a.style.cssText=e,M(this.g),M(this.h),M(this.j),M(this.m)}b.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},L.prototype.start=function(){var e=this.c.o.document,t=this,n=s(),r=new Promise((function(r,i){!function a(){s()-n>=t.f?i():e.fonts.load(function(e){return C(e)+" "+e.f+"00 300px "+S(e.c)}(t.a),t.h).then((function(e){1<=e.length?r():setTimeout(a,25)}),(function(){i()}))}()})),i=null,a=new Promise((function(e,n){i=setTimeout(n,t.f)}));Promise.race([a,r]).then((function(){i&&(clearTimeout(i),i=null),t.g(t.a)}),(function(){t.j(t.a)}))};var x={D:"serif",C:"sans-serif"},F=null;function U(){if(null===F){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);F=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return F}function B(e,t,n){for(var r in x)if(x.hasOwnProperty(r)&&t===e.f[x[r]]&&n===e.f[x[r]])return!0;return!1}function j(e){var t,n=e.g.a.offsetWidth,r=e.h.a.offsetWidth;(t=n===e.f.serif&&r===e.f["sans-serif"])||(t=U()&&B(e,n,r)),t?s()-e.A>=e.w?U()&&B(e,n,r)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?H(e,e.v):H(e,e.B):function(e){setTimeout(o((function(){j(this)}),e),50)}(e):H(e,e.v)}function H(e,t){setTimeout(o((function(){f(this.g.a),f(this.h.a),f(this.j.a),f(this.m.a),t(this.a)}),e),0)}function G(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}k.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=s(),j(this)};var q=null;function V(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&h(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),O(e,"active")):R(e.a))}function Y(e){this.j=e,this.a=new P,this.h=0,this.f=this.g=!0}function K(e,t,n,r,i){var a=0==--e.h;(e.f||e.g)&&setTimeout((function(){var e=i||null,s=r||{};if(0===n.length&&a)R(t.a);else{t.f+=n.length,a&&(t.j=a);var u,l=[];for(u=0;u<n.length;u++){var c=n[u],d=s[c.c],f=t.a,p=c;if(f.g&&h(f.f,[f.a.c("wf",p.c,A(p).toString(),"loading")]),O(f,"fontloading",p),f=null,null===q)if(window.FontFace){p=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var g=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);q=p?42<parseInt(p[1],10):!g}else q=!1;f=q?new L(o(t.g,t),o(t.h,t),t.c,c,t.s,d):new k(o(t.g,t),o(t.h,t),t.c,c,t.s,e,d),l.push(f)}for(u=0;u<l.length;u++)l[u].start()}}),0)}function W(e,t){this.c=e,this.a=t}function z(e,t){this.c=e,this.a=t}function X(e,t){this.c=e||Q,this.a=[],this.f=[],this.g=t||""}G.prototype.g=function(e){var t=this.a;t.g&&h(t.f,[t.a.c("wf",e.c,A(e).toString(),"active")],[t.a.c("wf",e.c,A(e).toString(),"loading"),t.a.c("wf",e.c,A(e).toString(),"inactive")]),O(t,"fontactive",e),this.m=!0,V(this)},G.prototype.h=function(e){var t=this.a;if(t.g){var n=p(t.f,t.a.c("wf",e.c,A(e).toString(),"active")),r=[],i=[t.a.c("wf",e.c,A(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,A(e).toString(),"inactive")),h(t.f,r,i)}O(t,"fontinactive",e),V(this)},Y.prototype.load=function(e){this.c=new u(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],i=n.timeout;!function(e){e.g&&h(e.f,[e.a.c("wf","loading")]),O(e,"loading")}(t);r=function(e,t,n){var r,i=[];for(r in t)if(t.hasOwnProperty(r)){var a=e.c[r];a&&i.push(a(t[r],n))}return i}(e.a,n,e.c);var a=new G(e.c,t,i);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load((function(t,n,r){K(e,a,t,n,r)}))}(this,new I(this.c,e),e)},W.prototype.load=function(e){function t(){if(a["__mti_fntLst"+r]){var n,i=a["__mti_fntLst"+r](),o=[];if(i)for(var s=0;s<i.length;s++){var u=i[s].fontfamily;null!=i[s].fontStyle&&null!=i[s].fontWeight?(n=i[s].fontStyle+i[s].fontWeight,o.push(new E(u,n))):o.push(new E(u))}e(o)}else setTimeout((function(){t()}),50)}var n=this,r=n.a.projectId,i=n.a.version;if(r){var a=n.c.o;m(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(i?"?v="+i:""),(function(i){i?e([]):(a["__MonotypeConfiguration__"+r]=function(){return n.a},t())})).id="__MonotypeAPIScript__"+r}else e([])},z.prototype.load=function(e){var t,n,r=this.a.urls||[],i=this.a.families||[],a=this.a.testStrings||{},o=new y;for(t=0,n=r.length;t<n;t++)g(this.c,r[t],v(o));var s=[];for(t=0,n=i.length;t<n;t++)if((r=i[t].split(":"))[1])for(var u=r[1].split(","),l=0;l<u.length;l+=1)s.push(new E(r[0],u[l]));else s.push(new E(r[0]));_(o,(function(){e(s,a)}))};var Q="https://fonts.googleapis.com/css";function $(e){this.f=e,this.a=[],this.c={}}var J={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Z={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},ee={i:"i",italic:"i",n:"n",normal:"n"},te=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function ne(e,t){this.c=e,this.a=t}var re={Arimo:!0,Cousine:!0,Tinos:!0};function ie(e,t){this.c=e,this.a=t}function ae(e,t){this.c=e,this.f=t,this.a=[]}ne.prototype.load=function(e){var t=new y,n=this.c,r=new X(this.a.api,this.a.text),i=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r].split(":");3==i.length&&e.f.push(i.pop());var a="";2==i.length&&""!=i[1]&&(a=":"),e.a.push(i.join(a))}}(r,i);var a=new $(i);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),i=r[0].replace(/\+/g," "),a=["n4"];if(2<=r.length){var o;if(o=[],s=r[1])for(var s,u=(s=s.split(",")).length,l=0;l<u;l++){var c;if((c=s[l]).match(/^[\w-]+$/))if(null==(d=te.exec(c.toLowerCase())))c="";else{if(c=null==(c=d[2])||""==c?"n":ee[c],null==(d=d[1])||""==d)d="4";else var d=Z[d]||(isNaN(d)?"4":d.substr(0,1));c=[c,d].join("")}else c="";c&&o.push(c)}0<o.length&&(a=o),3==r.length&&(o=[],0<(r=(r=r[2])?r.split(","):o).length&&(r=J[r[0]])&&(e.c[i]=r))}for(e.c[i]||(r=J[i])&&(e.c[i]=r),r=0;r<a.length;r+=1)e.a.push(new E(i,a[r]))}}(a),g(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),v(t)),_(t,(function(){e(a.a,a.c,re)}))},ie.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?m(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",(function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],i=0;i<t.length;i+=2)for(var a=t[i],o=t[i+1],s=0;s<o.length;s++)r.push(new E(a,o[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(r)}}),2e3):e([])},ae.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var i=0,a=n.fonts.length;i<a;++i){var o=n.fonts[i];r.a.push(new E(o.name,w("font-weight:"+o.weight+";font-style:"+o.style)))}e(r.a)},m(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",(function(t){t&&e([])}))):e([])};var oe=new Y(window);oe.a.c.custom=function(e,t){return new z(t,e)},oe.a.c.fontdeck=function(e,t){return new ae(t,e)},oe.a.c.monotype=function(e,t){return new W(t,e)},oe.a.c.typekit=function(e,t){return new ie(t,e)},oe.a.c.google=function(e,t){return new ne(t,e)};var se={load:o(oe.load,oe)};void 0===(r=function(){return se}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.playButton=void 0;t.playButton=function(e,t){"init"===t.bigPlayButton&&(e.classList.add("vjs-big-play-button-init-only"),t.bigPlayButton=!0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){var t=e.loop(),n=e.paused(),r=e.muted(),i=e.isFullscreen(),a={label:'<span class="player-version">Cloudinary Player v1.6.2-edge.13</span>'};return e.controls()?[{label:t?"Unloop":"Loop",listener:function(){e.loop(!t)}},{label:n?"Play":"Pause",listener:function(){n?e.play():e.pause()}},{label:r?"Unmute":"Mute",listener:function(){e.muted(!r)}},{label:i?"Exit Fullscreen":"Fullscreen",listener:function(){i?e.exitFullscreen():e.requestFullscreen()}},a]:[a]};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeAttributes=void 0;var r=n(50),i=/^(data-cld-)(\w+)/,a={};var o=function(e){return function(e){var t=null;if(""===e)return!0;try{t=JSON.parse(e)}catch(e){}return t||(t=Number(e))||e}(e)};t.normalizeAttributes=function(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,s=n.length-1;s>=0;s--){var u=n[s].name,l=n[s].value;if(u.match(i)&&(u=(0,r.camelize)(u.replace(i,"$2"))),"boolean"==typeof e[u])l=null!==l;else l=(a[u]||o)(l);t[u]=l}return t}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(4));n(102);var a=o(n(185));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t,n){return(h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(d,e);var t,n,r,o=c(d);function d(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,d),n=o.call(this,e,r);var i=function(){n.render()};return e.on("playlistitemchanged",i),n.render(),n.dispose=function(){h((t=f(n),p(d.prototype)),"dispose",t).call(t),e.off("playlistitemchanged",i)},n}return t=d,(n=[{key:"createEl",value:function(){var e=h(p(d.prototype),"createEl",this).call(this);return e.classList.add("cld-plw-panel"),e}},{key:"removeAll",value:function(){for(var e=this.children(),t=e.length-1;t>=0;--t)this.removeChild(e[t])}},{key:"getItems",value:function(){var e=this.player().cloudinary.playlist(),t=e._repeat;if(this.options_.showAll)return e.list();var n=[],r=this.options_.total,i=e.currentIndex(),a=e.list()[i];for(n.push(a);n.length<r;){if(-1===(i=e.nextIndex(i))){if(!t&&n.length>0)break;i=0}a=e.list()[i],n.push(a)}return n}},{key:"render",value:function(){var e=this,t=this.getItems();this.removeAll(),t.forEach((function(t,n){var r=new a.default(e.player(),i.default.mergeOptions(e.options_,{item:t,next:1===n,current:0===n}));e.addChild(r)}))}}])&&u(t.prototype,n),r&&u(t,r),d}(i.default.getComponent("Component"));i.default.registerComponent("playlistPanel",g);var m=g;t.default=m},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(4)),a=o(n(186));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=i.default.dom||i.default,p={source:null,next:!1},g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(o,e);var t,n,r,a=c(o);function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n=i.default.mergeOptions(p,t);return a.call(this,e,n)}return t=o,(n=[{key:"handleClick",value:function(e){u(f(o.prototype),"handleClick",this).call(this,e),this.play()}},{key:"play",value:function(){var e=this.getItem(),t=this.player().cloudinary.playlist().list().indexOf(e);if(-1===t)throw new Error("Invalid playlist item...");this.player().cloudinary.playlist().playAtIndex(t)}},{key:"isCurrent",value:function(){return this.options_.current}},{key:"getTitle",value:function(){return u(f(o.prototype),"getTitle",this).call(this)}},{key:"getDuration",value:function(){return u(f(o.prototype),"getDuration",this).call(this)}},{key:"createEl",value:function(){var e=u(f(o.prototype),"createEl",this).call(this);e.classList.add("cld-plw-panel-item");var t=h.createEl("div",{className:"cld-plw-item-info-wrap"}),n=h.createEl("div",{className:"cld-plw-item-title"});if(this.isCurrent()){e.classList.add("cld-plw-panel-item-active");var r=h.createEl("span",{className:"cld-plw-item-title-curr"},{},"Now Playing: ");n.appendChild(r)}var i=h.createEl("span",{className:"cld-plw-item-title"},{},this.getTitle());n.appendChild(i);var a=h.createEl("div",{className:"cld-plw-item-duration"},{},this.getDuration());return t.appendChild(n),t.appendChild(a),e&&e.appendChild(t),e.appendChild(t),e}}])&&s(t.prototype,n),r&&s(t,r),o}(a.default);i.default.registerComponent("playlistPanelItem",g);var m=g;t.default=m},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(4))&&i.__esModule?i:{default:i};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(187);var f=a.default.getComponent("ClickableComponent"),h={item:null,transformation:{width:300,aspect_ratio:"16:9",crop:"pad",background:"black"}},p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,r,i=l(c);function c(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);var n=a.default.mergeOptions(h,t);return i.call(this,e,n)}return t=c,(n=[{key:"getItem",value:function(){return this.options_.item}},{key:"getTitle",value:function(){return this.getItem().info().title}},{key:"getDuration",value:function(){return" "}},{key:"getThumbnail",value:function(){return this.getItem().poster().url({transformation:this.options_.transformation})}},{key:"handleClick",value:function(e){e.preventDefault()}},{key:"createControlTextEl",value:function(){}},{key:"createEl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"a",t=s(d(c.prototype),"createEl",this).call(this,e,{className:"cld-thumbnail",href:"#"}),n=s(d(c.prototype),"createEl",this).call(this,"img",{className:"cld-thumbnail-img",src:this.getThumbnail()});return t.appendChild(n),t.style.backgroundImage="url('".concat(this.getThumbnail(),"')"),t}}])&&o(t.prototype,n),r&&o(t,r),c}(f);t.default=p},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,a=(i=n(4))&&i.__esModule?i:{default:i};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(a,e);var t,n,r,i=c(a);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,a),i.call(this,e,t)}return t=a,(n=[{key:"createEl",value:function(){return u(f(a.prototype),"createEl",this).call(this,"div",{className:"vjs-progress-control-events-blocker"})}}])&&s(t.prototype,n),r&&s(t,r),a}(a.default.getComponent("Component"));a.default.registerComponent("progressControlEventsBlocker",h)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((r=n(190))&&r.__esModule?r:{default:r}).default;t.default=i},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(4)),a=s(n(191)),o=s(n(195));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){return(c=m()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&p(i,n.prototype),i}).apply(null,arguments)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return(h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(196);var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(_,e);var t,n,r,s,l,v=(t=_,n=m(),function(){var e,r=y(t);if(n){var i=y(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return g(this,e)});function _(e,t){var n;d(this,_);for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return(n=v.call.apply(v,[this,e].concat(i)))._content=new a.default(e),n.addChild(n._content),n.addChild(c(o.default,[e,{clickHandler:function(){n.close()}}].concat(i))),n.setEvents(e),n.doNotOpen=!1,n}return r=_,(s=[{key:"setEvents",value:function(e){var t=this;this.on(e,"recommendationschanged",(function(e,n){t.setItems.apply(t,u(n.items))})),this.on(e,"recommendationsnoshow",this.setDoNotOpen),this.on(e,"recommendationsshow",this.open),this.on(e,"recommendationshide",this.close),this.on(e,"cldsourcechanged",(function(){t.clearItems(),t.close()}))}},{key:"setDoNotOpen",value:function(){this.doNotOpen=!0}},{key:"open",value:function(){this.doNotOpen||(this._showControlsOnClose=this.player().controls(),this.player().controls(!1),this.el().style.visibility="visible")}},{key:"clearItems",value:function(){this._content.clearItems()}},{key:"close",value:function(){this.el().style.visibility="hidden",this._showControlsOnClose&&this.player().controls(!0)}},{key:"createEl",value:function(){var e="vjs-recommendations-overlay",t=h(y(_.prototype),"createEl",this).call(this,"div",{className:e});return i.default.dom.addClass(t,e),t}},{key:"setItems",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.doNotOpen=!1,r=r.slice(0,3),(t=this._content).setItems.apply(t,[e].concat(u(r)))}},{key:"handleClick",value:function(){this.stopPropagation()}},{key:"dispose",value:function(){h(y(_.prototype),"dispose",this).call(this)}}])&&f(r.prototype,s),l&&f(r,l),_}(i.default.getComponent("Component"));i.default.registerComponent("recommendationsOverlay",v);var _=v;t.default=_},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(4)),a=s(n(192)),o=s(n(193));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function d(e,t,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=i.default.getComponent("Component"),v=function(e){f(n,e);var t=p(n);function n(e){var r;u(this,n);for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return(r=t.call.apply(t,[this,e].concat(a)))._content=new _(e),r.addChild(r._content),r}return c(n,[{key:"setItems",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=this._content).setItems.apply(t,[e].concat(r))}},{key:"clearItems",value:function(){this._content._primary.clearItem(),this._content._secondaryContainer.clearItems()}},{key:"createEl",value:function(){return d(m(n.prototype),"createEl",this).call(this,"div",{className:"vjs-recommendations-overlay-content"})}}]),n}(y),_=function(e){f(n,e);var t=p(n);function n(e){var r;u(this,n);for(var i=arguments.length,s=new Array(i>1?i-1:0),l=1;l<i;l++)s[l-1]=arguments[l];return(r=t.call.apply(t,[this,e].concat(s)))._primary=new a.default(e),r._secondaryContainer=new o.default(e),r.addChild(r._primary),r.addChild(r._secondaryContainer),r}return c(n,[{key:"setItems",value:function(e){var t;this._primary.setItem(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=this._secondaryContainer).setItems.apply(t,r)}},{key:"createEl",value:function(){return d(m(n.prototype),"createEl",this).call(this,"div",{className:"aspect-ratio-content"})}}]),n}(y),T=v;t.default=T},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(4)),a=s(n(103)),o=s(n(104));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=i.default.dom||i.default,m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(a,e);var t,n,r,i=f(a);function a(){return u(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"setItem",value:function(e){c(p(a.prototype),"setItem",this).call(this,e);var t=this.source.info();if(this.setTitle(t.title),this.setSubtitle(t.subtitle),t.description){var n=t.description.length>300?t.description.substring(0,300)+"...":t.description;this.setDescription(n)}}},{key:"setPoster",value:function(e){this.poster.style.backgroundImage="url('".concat(e,"')")}},{key:"setTitle",value:function(e){o.default.setText(this.title,e)}},{key:"setSubtitle",value:function(e){o.default.setText(this.subtitle,e)}},{key:"setDescription",value:function(e){o.default.setText(this.description,e)}},{key:"clearItem",value:function(){this.setTitle(""),this.setSubtitle(""),this.setDescription(""),this.poster.style.backgroundImage=null}},{key:"createEl",value:function(){var e=c(p(a.prototype),"createEl",this).call(this,"div",{className:"vjs-recommendations-overlay-item vjs-recommendations-overlay-item-primary"});return this.poster=g.createEl("div",{className:"vjs-recommendations-overlay-item-primary-image"}),this.title=g.createEl("h2"),this.title.innerHTML="",this.subtitle=g.createEl("h3"),this.subtitle.innerHTML="",this.description=g.createEl("p"),this.description.innerHTML="",this.content=g.createEl("div",{className:"vjs-recommendations-overlay-item-info vjs-recommendations-overlay-item-primary-content"}),this.content.appendChild(this.title),this.content.appendChild(this.subtitle),this.content.appendChild(this.description),e.appendChild(this.poster),e.appendChild(this.content),e}}])&&l(t.prototype,n),r&&l(t,r),a}(a.default);t.default=m},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(4)),a=o(n(194));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(o,e);var t,n,r,i=d(o);function o(){return s(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setItems",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.clearItems(),n&&n.forEach((function(t){var n=new a.default(e.player());n.setItem(t),e.addChild(n)}))}},{key:"clearItems",value:function(){var e=this;this.children().forEach((function(){e.removeChild(e.children()[0])}))}},{key:"createEl",value:function(){return l(h(o.prototype),"createEl",this).call(this,"div",{className:"vjs-recommendations-overlay-item-secondary-container"})}}])&&u(t.prototype,n),r&&u(t,r),o}(i.default.getComponent("Component"));t.default=p},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(4)),a=o(n(103));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=i.default.dom||i.default,g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(a,e);var t,n,r,i=d(a);function a(){return s(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"setItem",value:function(e){l(h(a.prototype),"setItem",this).call(this,e),this.setDuration("")}},{key:"setPoster",value:function(e){this.el().style.backgroundImage="url('".concat(e,"')")}},{key:"setDuration",value:function(e){this.duration.innerText=e}},{key:"createEl",value:function(){var e=l(h(a.prototype),"createEl",this).call(this,"div",{className:"vjs-recommendations-overlay-item vjs-recommendations-overlay-item-secondary"});this.title=p.createEl("span",{className:"vjs-recommendations-overlay-item-secondary-title"}),this.title.innerHTML="",this.duration=p.createEl("span",{className:"vjs-recommendations-overlay-item-secondary-duration"}),this.duration.innerHTML="";var t=p.createEl("div",{className:"vjs-recommendations-overlay-item-info"});return t.appendChild(this.title),t.appendChild(this.duration),e.appendChild(t),e}},{key:"handleClick",value:function(){l(h(a.prototype),"handleClick",this).call(this),this.action()}}])&&u(t.prototype,n),r&&u(t,r),a}(a.default);t.default=g},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,r,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"createEl",value:function(){return s(d(c.prototype),"createEl",this).call(this,"span",{className:"vjs-recommendations-overlay-hide vjs-icon-close"})}},{key:"handleClick",value:function(){this.options_.clickHandler()}}])&&o(t.prototype,n),r&&o(t,r),c}(((i=n(4))&&i.__esModule?i:{default:i}).default.getComponent("ClickableComponent"));t.default=f},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=function(e,t){var n=window.performance.now();return function(){var r=window.performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=u(n(4)),a=n(106),o=u(n(54)),s=n(25);function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=i.default.getComponent("ClickableComponent"),m=i.default.dom||i.default,y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(o,e);var t,n,r,i=f(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n.isDragged=!1,n}return t=o,(n=[{key:"handleClick",value:function(e){e.preventDefault(),e.stopPropagation(),(0,a.elMatches)(this.el_,".dragged .".concat(s.CLD_SPBL_ITEM))||this.options_.clickHandler(e),this.isDragged=!1}},{key:"getTitle",value:function(){return this.options_.conf.title}},{key:"createEl",value:function(){var e=c(p(o.prototype),"createEl",this).call(this,"a",{className:"".concat(s.CLD_SPBL_ITEM," base-color-bg accent-color-text"),href:"#"});e.setAttribute("data-product-id",this.options_.conf.productId||""),e.setAttribute("data-product-name",this.options_.conf.productName||""),this.options_.conf.onHover&&v(e,this.options_.conf.onHover,this.options_.item.cloudinaryConfig()),this.options_.conf.onClick&&_(e,this.options_.conf.onClick);var t=c(p(o.prototype),"createEl",this).call(this,"img",{className:"".concat(s.CLD_SPBL_IMAGE," ").concat(s.SHOPPABLE_WIDGET_RESPONSIVE_CLASS)},{"data-src":this.options_.item.url()});if(e.appendChild(t),this.getTitle()){var n=m.createEl("div",{className:"cld-spbl-item-info base-color-semi-bg text-color-text"}),r=m.createEl("span",{className:"cld-spbl-item-title"},{},this.getTitle());n.appendChild(r),e.appendChild(n)}return e}}])&&l(t.prototype,n),r&&l(t,r),o}(g),v=function(e,t,n){if(e.setAttribute("data-hover-action",t.action),t.action===s.SHOPPABLE_HOVER_ACTIONS.OVERLAY){var r=m.createEl("span",{className:"cld-spbl-overlay-text base-color-text"},{},t.args),i=m.createEl("span",{className:"cld-spbl-overlay text-color-semi-bg base-color-text"},{title:t.args},r);e.appendChild(i)}else{var a=new o.default(t.args.publicId,{cloudinaryConfig:n,transformation:t.args.transformation}),u=m.createEl("img",{className:"".concat(s.CLD_SPBL_IMAGE," cld-spbl-hover-img ").concat(s.SHOPPABLE_WIDGET_RESPONSIVE_CLASS)},{"data-src":a.url()});e.appendChild(u)}},_=function(e,t){e.setAttribute("data-click-action",t.action),e.setAttribute("data-pause",t.pause),t.action===s.SHOPPABLE_CLICK_ACTIONS.SEEk?e.setAttribute("data-seek",t.args.time):t.action===s.SHOPPABLE_CLICK_ACTIONS.GO_TO&&e.setAttribute("data-goto-url",t.args.url)};i.default.registerComponent("shoppablePanelItem",y);var T=y;t.default=T},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(4));n(200);var a=o(n(104));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=i.default.dom||i.default,g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(o,e);var t,n,r,i=d(o);function o(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this,o),(t=i.call(this,e,n)).on(e,"cldsourcechanged",(function(e,n){var r=n.source;return t.setItem(r)})),t}return t=o,(n=[{key:"setItem",value:function(e){if(!e)return this.setTitle(""),void this.setSubtitle("");var t=e.info();this.setTitle(t.title),this.setSubtitle(t.subtitle)}},{key:"setTitle",value:function(e){return a.default.setText(this.titleEl,e),this.refresh(),e}},{key:"setSubtitle",value:function(e){return a.default.setText(this.subtitleEl,e),this.refresh(),e}},{key:"refresh",value:function(){var e=this;e.titleEl.innerText||e.subtitleEl.innerText?this.show():this.hide()}},{key:"createEl",value:function(){this.titleEl=p.createEl("div",{className:"vjs-title-bar-title"}),this.subtitleEl=p.createEl("div",{className:"vjs-title-bar-subtitle"});var e=l(h(o.prototype),"createEl",this).call(this,"div",{append:this.titleEl,className:"vjs-title-bar"});return e.appendChild(this.titleEl),e.appendChild(this.subtitleEl),e}}])&&u(t.prototype,n),r&&u(t,r),o}(i.default.getComponent("Component"));i.default.registerComponent("titleBar",g);var m=g;t.default=m},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(108),n(203);var r=f(n(204)),i=f(n(375));n(140);var a=f(n(383)),o=f(n(384)),s=f(n(142)),u=f(n(386)),l=f(n(391)),c=f(n(401)),d=f(n(402));function f(e){return e&&e.__esModule?e:{default:e}}var h={autoplayOnScroll:a.default,floatingPlayer:o.default,colors:s.default,contextMenu:u.default,cloudinary:l.default,analytics:c.default,vttThumbnails:d.default,interactive:i.default,dashPlugin:r.default};t.default=h},function(e,t,n){"use strict";var r,i;r=[n(4),n(108)],void 0===(i=function(e){!function(e,t,n){var r=function(e){var t,n,r;for(n=1;n<arguments.length;n++)for(r in t=arguments[n])t.hasOwnProperty(r)&&(e[r]=t[r]);return e},i={debug:!1,timeout:5e3,prerollTimeout:100,adLabel:"Advertisement",showControlsForAds:!0,showControlsForJSAds:!0,adsRenderingSettings:{uiElements:[]}},a=n.browser.IS_ANDROID||n.browser.IS_IOS?{click:"touchend",mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"}:{click:"click",mousedown:"mousedown",mouseup:"mouseup",mousemove:"mousemove"},o=function(e,t){this.ima=new s(this,e,t)},s=function(o,s,u){this.player=o;var l=function(e,t){e.id=this.controlPrefix+t,e.className=this.controlPrefix+t+" "+t}.bind(this),c=function(e){return new RegExp("(^|[^A-Za-z-])"+e+"((?![A-Za-z-])|$)","gi")},d=function(e,t){return c(t).test(e.className)?e:e.className=e.className.trim()+" "+t},f=function(e,t){var n=c(t);return n.test(e.className)?e.className=e.className.trim().replace(n,""):e},h=function(){this.vjsControls=this.player.getChild("controlBar"),this.adContainerDiv=this.vjsControls.el().parentNode.appendChild(t.createElement("div")),l(this.adContainerDiv,"ima-ad-container"),this.adContainerDiv.style.position="absolute",this.adContainerDiv.addEventListener("mouseenter",C,!1),this.adContainerDiv.addEventListener("mouseleave",A,!1),p(),this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerDiv,this.contentPlayer),this.showAdContainer(!this.settings.manual)}.bind(this),p=function(){this.controlsDiv=t.createElement("div"),l(this.controlsDiv,"ima-controls-div"),this.controlsDiv.style.width="100%",this.countdownDiv=t.createElement("div"),l(this.countdownDiv,"ima-countdown-div"),this.countdownDiv.innerHTML=this.settings.adLabel,this.countdownDiv.style.display=this.showCountdown?"":"none",this.seekBarDiv=t.createElement("div"),l(this.seekBarDiv,"ima-seek-bar-div"),this.seekBarDiv.style.width="100%",this.progressDiv=t.createElement("div"),l(this.progressDiv,"ima-progress-div"),this.playPauseDiv=t.createElement("div"),l(this.playPauseDiv,"ima-play-pause-div"),d(this.playPauseDiv,"ima-playing"),this.playPauseDiv.addEventListener(a.click,R,!1),this.muteDiv=t.createElement("div"),l(this.muteDiv,"ima-mute-div"),d(this.muteDiv,"ima-non-muted"),this.muteDiv.addEventListener(a.click,O,!1),this.sliderDiv=t.createElement("div"),l(this.sliderDiv,"ima-slider-div"),this.sliderDiv.addEventListener(a.mousedown,P,!1),this.sliderLevelDiv=t.createElement("div"),l(this.sliderLevelDiv,"ima-slider-level-div"),this.fullscreenDiv=t.createElement("div"),l(this.fullscreenDiv,"ima-fullscreen-div"),d(this.fullscreenDiv,"ima-non-fullscreen"),this.fullscreenDiv.addEventListener(a.click,L,!1),this.adContainerDiv.appendChild(this.controlsDiv),this.controlsDiv.appendChild(this.seekBarDiv),this.controlsDiv.appendChild(this.playPauseDiv),this.controlsDiv.appendChild(this.muteDiv),this.controlsDiv.appendChild(this.sliderDiv),this.controlsDiv.appendChild(this.fullscreenDiv),this.seekBarDiv.appendChild(this.progressDiv),this.sliderDiv.appendChild(this.sliderLevelDiv),this.settings.vjsControls?(this.initVjsControls(),this.controlsDiv.style.display="none",this.vjsControls.el().appendChild(this.countdownDiv)):this.controlsDiv.appendChild(this.countdownDiv)}.bind(this);this.showAdContainer=function(e){this.adContainerDiv.style.display=e?"block":"none",this.player.toggleClass("vjs-ima-ad",e)}.bind(this),this.initializeAdDisplayContainer=function(){this.adDisplayContainerInitialized=!0,this.adDisplayContainer.initialize()}.bind(this),this.requestAds=function(){this.adDisplayContainerInitialized||this.adDisplayContainer.initialize();var e=new google.ima.AdsRequest;this.settings.adTagUrl?e.adTagUrl=this.settings.adTagUrl:e.adsResponse=this.settings.adsResponse,this.settings.forceNonLinearFullSlot&&(e.forceNonLinearFullSlot=!0),e.linearAdSlotWidth=this.getPlayerWidth(),e.linearAdSlotHeight=this.getPlayerHeight(),e.nonLinearAdSlotWidth=this.settings.nonLinearWidth||this.getPlayerWidth(),e.nonLinearAdSlotHeight=this.settings.nonLinearHeight||this.getPlayerHeight()/3,e.vastLoadTimeout=Math.max(this.settings.prerollTimeout,this.settings.postrollTimeout),this.adsLoader.requestAds(e)}.bind(this);var g=function(e){this.adsManager=e.getAdsManager(this.contentPlayheadTracker,this.adsRenderingSettings),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,y),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,v),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.onContentPauseRequested_),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.onContentResumeRequested_),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,_),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,T),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,b),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,R),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.onAdComplete_),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this.onAdComplete_),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this.onAdPaused_),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this.onAdResumed_);var t={load:google.ima.AdEvent.Type.LOADED,"ad-started":google.ima.AdEvent.Type.STARTED,click:google.ima.AdEvent.Type.CLICK,"ad-ended":google.ima.AdEvent.Type.COMPLETE,"ad-skipped":google.ima.AdEvent.Type.SKIPPED,"first-quartile":google.ima.AdEvent.Type.FIRST_QUARTILE,midpoint:google.ima.AdEvent.Type.MIDPOINT,"third-quartile":google.ima.AdEvent.Type.THIRD_QUARTILE,impression:google.ima.AdEvent.Type.IMPRESSION,pause:google.ima.AdEvent.Type.PAUSED,play:google.ima.AdEvent.Type.RESUMED,mute:google.ima.AdEvent.Type.VOLUME_MUTED,"allpods-completed":google.ima.AdEvent.Type.ALL_ADS_COMPLETED};if(Object.keys(t).forEach(function(e){this.adsManager.addEventListener(t[e],function(){this.player.trigger("ads-"+e)}.bind(this))}.bind(this)),H(this.player.muted()),!this.autoPlayAdBreaks)try{var n=this.getPlayerWidth(),r=this.getPlayerHeight();this.adsManagerDimensions.width=n,this.adsManagerDimensions.height=r,this.adsManager.init(n,r,google.ima.ViewMode.NORMAL),this.adsManager.setVolume(this.player.muted()?0:this.player.volume())}catch(e){y(e)}var i=this.adsManager.getCuePoints(),a=!i.length,o=!1;i.forEach((function(e){e?-1==e&&(o=!0):a=!0})),a||this.player.trigger("nopreroll"),o||this.player.trigger("nopostroll"),i.length&&this.player.trigger("ads-cuepoints",i),this.player.trigger("adsready")}.bind(this);this.start=function(){e.console.log("WARNING: player.ima.start is deprecated. Use player.ima.startFromReadyCallback instead.")},this.startFromReadyCallback=function(){if(this.autoPlayAdBreaks&&this.adsManager)try{this.adsManager.init(this.getPlayerWidth(),this.getPlayerHeight(),google.ima.ViewMode.NORMAL),this.adsManager.setVolume(this.player.muted()?0:this.player.volume()),this.adsManager.start()}catch(e){y(e)}}.bind(this);var m=function(e){e.getError(),this.showAdContainer(!1),this.adsManager&&this.adsManager.destroy(),this.player.trigger({type:"adserror",data:{AdError:e.getError(),AdErrorEvent:e}})}.bind(this),y=function(e){var t=void 0!==e.getError?e.getError():e.stack;this.adsActive=!1,this.adPlaying=!1,this.restoreLoop(),this.vjsControls.show(),this.adsManager.destroy(),this.showAdContainer(!1),this.updateVjsControls(),this.player.trigger({type:"adserror",data:{AdError:t,AdErrorEvent:e}})}.bind(this),v=function(e){this.adBreakReadyListener(e)}.bind(this);this.playAdBreak=function(){this.autoPlayAdBreaks||this.adsManager.start()}.bind(this),this.resetLoop=function(){this.contentLoop=this.contentPlayer&&this.contentPlayer.loop,this.contentLoop&&(this.contentPlayer.loop=!1)}.bind(this),this.restoreLoop=function(){this.contentLoop&&(this.contentPlayer.loop=!0,this.contentLoop=!1)}.bind(this),this.onContentPauseRequested_=function(e){this.contentSource=this.player.currentSrc(),this.resetLoop(),this.player.off("contentended",this.localContentEndedListener),this.player.ads.startLinearAdMode(),this.showAdContainer(!0);var t=e.getAd().getContentType();this.settings.vjsControls&&this.settings.showControlsForAds||(!this.settings.showControlsForAds||"application/javascript"===t&&!this.settings.showControlsForJSAds?this.controlsDiv.style.display="none":this.controlsDiv.style.display="block",this.vjsControls.hide()),I(),this.player.pause(),this.adsActive=!0,this.adPlaying=!0,this.updateVjsControls()}.bind(this),this.onContentResumeRequested_=function(e){this.contentResumeTimer=clearTimeout(this.contentResumeTimer),this.restoreLoop(),this.adsActive=!1,this.adPlaying=!1,this.player.on("contentended",this.localContentEndedListener),(null==this.currentAd||this.currentAd.isLinear())&&this.showAdContainer(!1),this.vjsControls.show(),this.player.ads.endLinearAdMode(),this.countdownDiv.innerHTML="",this.updateVjsControls()}.bind(this);var _=function(e){if(this.allAdsCompleted=!0,this.showAdContainer(!1),1==this.contentComplete)for(var t in this.contentPlayer.src&&!/^blob:/.test(this.contentPlayer.src)&&this.contentSource&&this.contentPlayer.src!=this.contentSource&&this.player.src(this.contentSource),this.player.trigger(""),this.contentAndAdsEndedListeners)this.contentAndAdsEndedListeners[t]()}.bind(this),T=function(e){e.getAd().isLinear()||this.player.ended()||(this.player.ads.endLinearAdMode(),this.player.play())}.bind(this),b=function(e){this.currentAd=e.getAd(),this.currentAd.isLinear()?(this.adTrackingTimer=setInterval(S,250),f(this.adContainerDiv,"bumpable-ima-ad-container")):(d(this.adContainerDiv,"bumpable-ima-ad-container"),this.player.addClass("vjs-ima-non-linear"),this.showAdContainer(!0))}.bind(this);this.onAdComplete_=function(e){if(this.currentAd.isLinear()){clearInterval(this.adTrackingTimer);var t=this.currentAd.getAdPodInfo();if(t&&t.getAdPosition()<t.getTotalAds())return void this.player.trigger("ads-pod-ended");this.contentResumeTimer=setTimeout(function(){this.onContentResumeRequested_(null)}.bind(this),1e3)}else this.player.removeClass("vjs-ima-non-linear")}.bind(this),this.onAdPaused_=function(e){w(),this.adPlaying=!1}.bind(this),this.onAdResumed_=function(e){I(),this.adPlaying=!0}.bind(this);var E=function(e){var t=Math.floor(e/60),n=Math.floor(e%60);return n.toString().length<2&&(n="0"+n),t+":"+n},S=function(){var e=this.adsManager.getRemainingTime(),t=this.currentAd.getDuration(),n=t-e;n=n>0?n:0;var r,i=!1,a=0;this.currentAd.getAdPodInfo()&&(i=!0,r=this.currentAd.getAdPodInfo().getAdPosition(),a=this.currentAd.getAdPodInfo().getTotalAds());var o=": ";i&&a>1&&(o=" ("+r+" of "+a+"): "),this.countdownDiv.innerHTML=this.settings.adLabel+o+E(e);var s=n/t*100;this.progressDiv.style.width=s+"%",this.updateVjsControls()}.bind(this);this.getPlayerWidth=function(){return parseInt(getComputedStyle(this.player.el()).width,10)||this.player.width()}.bind(this),this.getPlayerHeight=function(){return parseInt(getComputedStyle(this.player.el()).height,10)||this.player.height()}.bind(this);var A=function(){this.controlsDiv.style.height="14px",this.playPauseDiv.style.display="none",this.muteDiv.style.display="none",this.sliderDiv.style.display="none",this.fullscreenDiv.style.display="none"}.bind(this),C=function(){this.controlsDiv.style.height="37px",this.playPauseDiv.style.display="block",this.muteDiv.style.display="block",this.sliderDiv.style.display="block",this.fullscreenDiv.style.display="block"}.bind(this),w=function(){d(this.playPauseDiv,"ima-paused"),f(this.playPauseDiv,"ima-playing")}.bind(this),I=function(){d(this.playPauseDiv,"ima-playing"),f(this.playPauseDiv,"ima-paused")}.bind(this),R=function(){this.adPlaying?(w(),this.adsManager.pause(),this.adPlaying=!1):(I(),this.adsManager.resume(),this.adPlaying=!0)}.bind(this),O=function(){H(!this.adMuted)}.bind(this),P=function(){t.addEventListener(a.mouseup,M,!1),t.addEventListener(a.mousemove,D,!1)},D=function(e){N(e)},M=function e(n){N(n),t.removeEventListener(a.mousemove,D),t.removeEventListener(a.mouseup,e)},N=function(e){var t=((e.changedTouches?e.changedTouches[0].clientX:e.clientX)-this.sliderDiv.getBoundingClientRect().left)/this.sliderDiv.offsetWidth;t*=100,t=Math.min(Math.max(t,0),100),this.sliderLevelDiv.style.width=t+"%",this.player.volume(t/100),this.adsManager.setVolume(t/100),0==this.player.volume()?(d(this.muteDiv,"ima-muted"),f(this.muteDiv,"ima-non-muted"),this.player.muted(!0),this.adMuted=!0):(d(this.muteDiv,"ima-non-muted"),f(this.muteDiv,"ima-muted"),this.player.muted(!1),this.adMuted=!1)}.bind(this),L=function(){this.player.isFullscreen()?this.player.exitFullscreen():this.player.requestFullscreen()}.bind(this),k=function(){this.player.isFullscreen()?(d(this.fullscreenDiv,"ima-fullscreen"),f(this.fullscreenDiv,"ima-non-fullscreen"),this.adsManager&&this.adsManager.resize(e.screen.width,e.screen.height,google.ima.ViewMode.FULLSCREEN)):(d(this.fullscreenDiv,"ima-non-fullscreen"),f(this.fullscreenDiv,"ima-fullscreen"),this.adsManager&&this.adsManager.resize(this.getPlayerWidth(),this.getPlayerHeight(),google.ima.ViewMode.NORMAL))}.bind(this),x=function(){var e=this.player.muted()?0:this.player.volume();this.adsManager&&this.adsManager.setVolume(e),0==e?(this.adMuted=!0,d(this.muteDiv,"ima-muted"),f(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"):(this.adMuted=!1,d(this.muteDiv,"ima-non-muted"),f(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*e+"%")}.bind(this),F=function(){this.player.off("loadedmetadata",F),this.player.currentTime(0)}.bind(this),U=function(){this.player.off("loadedmetadata",U),this.player.currentTime(0),this.player.play()}.bind(this),B=function(){this.adsActive=!1,this.adPlaying=!1,this.restoreLoop(),this.player.on("contentended",this.localContentEndedListener),this.currentAd&&this.currentAd.isLinear()&&this.showAdContainer(!1),this.vjsControls.show(),this.player.ads.endLinearAdMode(),this.contentPlayheadTracker.currentTime=0,this.countdownDiv.innerHTML="",this.updateVjsControls(),this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null),this.adsLoader&&!this.contentComplete&&this.adsLoader.contentComplete(),this.contentComplete=!1,this.allAdsCompleted=!1}.bind(this);this.addEventListener=function(e,t){this.adsManager&&this.adsManager.addEventListener(e,t)}.bind(this),this.getAdsManager=function(){return this.adsManager}.bind(this),this.setContent=function(t,n,r){e.console.log("WARNING: player.ima.setContent is deprecated. Use player.ima.setContentWithAdTag instead."),this.setContentWithAdTag(t,n,r)}.bind(this),this.setContentWithAdTag=function(e,t,n){B(),this.settings.adTagUrl=t||this.settings.adTagUrl,j(e,n)}.bind(this),this.setContentWithAdsResponse=function(e,t,n){B(),this.settings.adsResponse=t||this.settings.adsResponse,j(e,n)}.bind(this),this.playAd=function(e){B(),this.settings.adTagUrl=e||this.settings.adTagUrl,this.requestAds()}.bind(this);var j=function(e,t){this.player.currentSrc()&&(this.player.currentTime(0),this.player.pause()),e&&this.player.src(e),t?this.player.on("loadedmetadata",U):this.player.on("loadedmetadata",F)}.bind(this),H=function(e){e?(d(this.muteDiv,"ima-muted"),f(this.muteDiv,"ima-non-muted"),this.adsManager.setVolume(0),this.player.muted(!0),this.adMuted=!0,this.sliderLevelDiv.style.width="0%"):(d(this.muteDiv,"ima-non-muted"),f(this.muteDiv,"ima-muted"),this.adsManager.setVolume(this.player.volume()),this.player.muted(!1),this.adMuted=!1,this.sliderLevelDiv.style.width=100*this.player.volume()+"%")}.bind(this);this.addContentEndedListener=function(e){this.contentEndedListeners.push(e)}.bind(this),this.addContentAndAdsEndedListener=function(e){this.contentAndAdsEndedListeners.push(e)}.bind(this),this.setAdBreakReadyListener=function(e){this.adBreakReadyListener=e}.bind(this),this.pauseAd=function(){this.adsActive&&this.adPlaying&&(w(),this.adsManager.pause(),this.adPlaying=!1)}.bind(this),this.resumeAd=function(){this.adsActive&&!this.adPlaying&&(I(),this.adsManager.resume(),this.adPlaying=!0)}.bind(this);var G=function(){this.updateTimeIntervalHandle=setInterval(V,this.seekCheckInterval),this.seekCheckIntervalHandle=setInterval(Y,this.seekCheckInterval),this.resizeCheckIntervalHandle=setInterval(K,this.resizeCheckInterval)}.bind(this),q=function(){var e=this.player.currentTime();e&&"content-playback"==this.player.ads.state&&(e<1&&(e=0),this.contentPlayheadTracker.startTime=e,this.player.off("timeupdate",q))}.bind(this),V=function(){"content-playback"==this.player.ads.state&&!this.contentPlayheadTracker.seeking&&this.contentPlayheadTracker.startTime>=0&&(this.contentPlayheadTracker.currentTime=this.player.currentTime()-this.contentPlayheadTracker.startTime)}.bind(this),Y=function(){if("content-playback"==this.player.ads.state){var e=1e3*(this.player.currentTime()-this.contentPlayheadTracker.previousTime);Math.abs(e)>this.seekCheckInterval+this.seekThreshold?this.contentPlayheadTracker.seeking=!0:this.contentPlayheadTracker.seeking=!1,this.contentPlayheadTracker.previousTime=this.player.currentTime()}}.bind(this),K=function(){var e=this.getPlayerWidth(),t=this.getPlayerHeight();!this.adsManager||e==this.adsManagerDimensions.width&&t==this.adsManagerDimensions.height||(this.adsManagerDimensions.width=e,this.adsManagerDimensions.height=t,this.adsManager.resize(e,t,google.ima.ViewMode.NORMAL))}.bind(this);this.setShowCountdown=function(e){this.showCountdown=e,this.countdownDiv.style.display=this.showCountdown?"":"none"}.bind(this),this.VERSION="0.2.0",this.settings,this.controlPrefix,this.contentPlayer,this.showCountdown,this.autoPlayAdBreaks,this.vjsControls,this.adContainerDiv,this.controlsDiv,this.countdownDiv,this.seekBarDiv,this.progressDiv,this.playPauseDiv,this.muteDiv,this.sliderDiv,this.sliderLevelDiv,this.fullscreenDiv,this.adDisplayContainer,this.adDisplayContainerInitialized=!1,this.adsLoader,this.adsManager,this.adsRenderingSettings=null,this.adTagUrl,this.adsResponse,this.currentAd,this.contentTrackingTimer,this.adTrackingTimer,this.adsActive=!1,this.adPlaying=!1,this.adMuted=!1,this.contentComplete=!1,this.allAdsCompleted=!1,this.updateTimeIntervalHandle,this.seekCheckIntervalHandle,this.seekCheckInterval=1e3,this.resizeCheckIntervalHandle,this.resizeCheckInterval=250,this.seekThreshold=100,this.contentPlayheadTracker={currentTime:0,previousTime:0,seeking:!1,duration:0,startTime:-1},this.adPlayheadTracker={currentTime:0,duration:0,isPod:!1,adPosition:0,totalAds:0},this.adsManagerDimensions={width:0,height:0},this.contentEndedListeners=[],this.contentAndAdsEndedListeners=[],this.adBreakReadyListener=function(){},this.contentSource="",this.localContentEndedListener=function(){for(var e in this.adsLoader&&!this.contentComplete&&(this.adsLoader.contentComplete(),this.contentComplete=!0),this.contentEndedListeners)this.contentEndedListeners[e]();if(this.allAdsCompleted)for(var e in this.contentAndAdsEndedListeners)this.contentAndAdsEndedListeners[e]();clearInterval(this.updateTimeIntervalHandle),clearInterval(this.seekCheckIntervalHandle),clearInterval(this.resizeCheckIntervalHandle),this.player.el()&&this.player.one("play",G)}.bind(this),this.playerDisposedListener=function(){this.contentEndedListeners,this.contentAndAdsEndedListeners=[],this.contentComplete=!0,this.player.off("contentended",this.localContentEndedListener),this.player.off("timeupdate",q),this.player.ads.adTimeoutTimeout&&clearTimeout(this.player.ads.adTimeoutTimeout);var e=[this.updateTimeIntervalHandle,this.seekCheckIntervalHandle,this.adTrackingTimer,this.resizeCheckIntervalHandle];for(var t in e){var n=e[t];n&&clearInterval(n)}this.adsManager&&(this.adsManager.destroy(),this.adsManager=null)}.bind(this),this.initVjsControls=function(){var e=this,t=function(t,n,r,i,a){var o=t.prototype[r];return n[r]=function(){return e.adsActive||a?i&&i.apply(this,arguments):o&&o.apply(this,arguments)}},r=function(e,n,r,i,a,o,s){var u=e.prototype[a],l=t(e,n,a,o);r?(n.off(r,i,u),n.on(r,i,l)):(n.off(i,u),n.on(i,l))},i=n.getComponent("PlayToggle"),a=this.vjsControls.playToggle;r(i,a,null,["tap","click"],"handleClick",(function(){R(),e.adPlaying?this.handlePlay():this.handlePause()})),t(i,a,"update",(function(){var t=e.adsActive?!e.adPlaying:o.paused();this.toggleClass("vjs-play-control-ad",e.adsActive),this.toggleClass("vjs-paused",t),this.toggleClass("vjs-playing",!t);var n=t?"Play":"Pause";n!=this.controlText()&&this.controlText(n)}),!0),r(i,a,o,"play","handlePlay",(function(){this.update()}),!0),r(i,a,o,"pause","handlePause",(function(){this.update()}),!0);var s=n.getComponent("SeekBar"),u=n.getComponent("DvrSeekBar"),l=this.vjsControls.progressControl.seekBar,c=function(){var t=e.currentAd&&e.currentAd.getDuration();if(!t||t<0)return 0;var n=e.adsManager.getRemainingTime();return Math.max(t-n,0)/t};t(s,l,"getPercent",c),u&&t(u,l,"getPercent",c),r(s,l,null,["mousedown","touchstart"],"handleMouseDown",null),r(s,l,null,"focus","handleFocus",null),r(n.getComponent("DurationDisplay"),this.vjsControls.durationDisplay,o,["timeupdate","loadedmetadata"],"updateContent",(function(){var t=e.currentAd&&e.currentAd.getDuration();t&&t!=this.duration_&&(this.duration_=t,this.contentEl_.innerHTML='<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> "+E(t))})),r(n.getComponent("CurrentTimeDisplay"),this.vjsControls.currentTimeDisplay,o,["timeupdate","loadedmetadata"],"updateContent",(function(){var t=e.currentAd&&e.currentAd.getDuration();if(t){var n=t-e.adsManager.getRemainingTime(),r=E(n);r!==this.formattedTime_&&(this.formattedTime_=r,this.contentEl_.innerHTML='<span class="vjs-control-text">'+this.localize("Current Time")+"</span> "+r)}}))}.bind(this),this.updateVjsControls=function(){if(this.settings.vjsControls){this.player.toggleClass("vjs-ad-paused",this.adsActive&&!this.adPlaying);var e=this.vjsControls;e.playToggle.update(),e.progressControl.seekBar.update(),e.durationDisplay.updateContent(),e.currentTimeDisplay.updateContent();var t=this.currentAd&&this.currentAd.getDuration(),n=!this.adsActive||t&&t>=0?"":"none";e.durationDisplay.el().style.display=n,e.currentTimeDisplay.el().style.display=n,e.timeDivider.el().style.display=n}}.bind(this);var W=function(n){var r=n.getBoundingClientRect(),i=t.documentElement,a=t.body,o=i.clientLeft||a.clientLeft||0,s=e.pageXOffset||a.scrollLeft,u=r.left+s-o,l=i.clientTop||a.clientTop||0,c=e.pageYOffset||a.scrollTop;return{left:u,top:r.top+c-l,width:r.width,height:r.height}};if(this.proxyClickEvents=function(){var e=n&&n.browser&&n.browser.IS_ANDROID||n.browser.IS_IOS?["touchstart","touchend"]:["click","dblclick","mousedown","mouseup"],r=this.player,i=r.el(),a=this;e.forEach((function(e){i.addEventListener(e,(function(e){var n=a.currentAd,i=e.target;if(n&&!n.isLinear()&&"IFRAME"==i.nodeName&&!e.isTrusted){var o=n.getWidth()||n.getVastMediaWidth(),s=n.getHeight()||n.getVastMediaHeight(),u=W(i),l=e.touches&&e.touches[0],c=l?l.pageX:e.clientX,d=l?l.pageY:e.clientY,f=u.left+u.width-(u.width-o)/2,h=u.top+u.height-s-4;if(!(c<f&&c>f-40&&d>h&&d<h+30||c>u.left+u.width/2-15&&c<u.left+u.width/2+15&&d>u.top+u.height-15)){var p,g={};for(var m in e)g[m]=e[m];g.bubbles=!1;try{p=new e.constructor(e.type,g)}catch(n){(p=t.createEvent("MouseEvent")).initMouseEvent(e.type,g.bubbles,g.cancelable,g.view,g.detail,g.screenX,g.screenY,g.clientX,g.clientY,g.ctrlKey,g.altKey,g.shiftKey,g.metaKey,g.button,null)}p.stopPropagation(),r.tech_.trigger(p)}}}))}))}.bind(this),this.settings=r({},i,s||{}),this.settings.adLabel=this.player.localize(this.settings.adLabel),this.settings.id){this.controlPrefix=this.settings.id+"_"||!1,this.contentPlayer=this.player.$(".vjs-tech"),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1),this.autoPlayAdBreaks=!0,!1===this.settings.autoPlayAdBreaks&&(this.autoPlayAdBreaks=!1);var z={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout,postrollTimeout:this.settings.postrollTimeout},X=r({},z,s.contribAdsSettings||{});if(o.ads(X),o.one("play",G),o.on("contentended",this.localContentEndedListener),o.on("dispose",this.playerDisposedListener),o.on("timeupdate",q),this.adsRenderingSettings=new google.ima.AdsRenderingSettings,this.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete=!0,this.settings.adsRenderingSettings)for(var Q in this.settings.adsRenderingSettings)this.adsRenderingSettings[Q]=this.settings.adsRenderingSettings[Q];this.settings.locale&&google.ima.settings.setLocale(this.settings.locale),h(),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),0==this.settings.vpaidAllowed&&this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.DISABLED),this.settings.vpaidMode&&this.adsLoader.getSettings().setVpaidMode(this.settings.vpaidMode),this.settings.locale&&this.adsLoader.getSettings().setLocale(this.settings.locale),this.settings.numRedirects&&this.adsLoader.getSettings().setNumRedirects(this.settings.numRedirects),this.adsLoader.getSettings().setPlayerType("videojs-ima"),this.adsLoader.getSettings().setPlayerVersion(this.VERSION),this.adsLoader.getSettings().setAutoPlayAdBreaks(this.autoPlayAdBreaks),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,g,!1),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,m,!1),u||(u=this.startFromReadyCallback),o.on("readyforpreroll",u),o.ready((function(){o.on("fullscreenchange",k),o.on("volumechange",x)})),this.proxyClickEvents()}else e.console.log("Error: must provide id of video.js div")};n.registerPlugin("ima",o)}(window,document,e.default||e)}.apply(t,r))||(e.exports=i)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){r.default.Html5DashJS.hook("beforeinitialize",(function(e,t){(t=i.default.MediaPlayer().create()).updateSettings({streaming:{liveDelayFragmentCount:null}}),t.on(i.default.MediaPlayer.events.PLAYBACK_STALLED,(function(e){}))}))};var r=a(n(4)),i=a(n(38));a(n(372));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Debug=t.FactoryMaker=t.MediaPlayer=void 0;var r=s(n(109)),i=s(n(1)),a=s(n(8)),o=n(136);function s(e){return e&&e.__esModule?e:{default:e}}var u="undefined"!=typeof window&&window||e,l=u.dashjs;l||(l=u.dashjs={}),l.MediaPlayer=r.default,l.FactoryMaker=i.default,l.Debug=a.default,l.Version=(0,o.getVersionString)(),t.default=l,t.MediaPlayer=r.default,t.FactoryMaker=i.default,t.Debug=a.default}).call(this,n(18))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(6)),i=l(n(16)),a=l(n(9)),o=l(n(10)),s=l(n(1)),u=l(n(8));function l(e){return e&&e.__esModule?e:{default:e}}function c(){var e=this.context,t=(0,a.default)(e).getInstance(),n=void 0,s=void 0,l=void 0,c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0,b=void 0,E=void 0,S=void 0,A=void 0,C=void 0,w=void 0,I=void 0,R=void 0,O=void 0,P=void 0;function D(e){if(!p||!isNaN(g)){var n=g;if(isNaN(n))if(_){n=e.liveStartTime;var r=c.getCurrentDVRInfo(),i=r?r.range:null;if(i){var a=K(!0);isNaN(a)||(s.info("Start time from URI parameters: "+a),n=Math.max(Math.min(n,a),i.start))}}else{n=v.start;var u=K(!1);!isNaN(u)&&u<n+v.duration&&(s.info("Start time from URI parameters: "+u),n=Math.max(n,u))}isNaN(n)||n===f.getTime()||(t.trigger(o.default.PLAYBACK_SEEKING,{seekTime:n}),U(n,!1,!0))}}function M(){return parseFloat((N()-B()).toFixed(5))}function N(){return v.start+v.duration}function L(){v&&f&&f.getElement()?f.play():b=!0}function k(){return v&&f?f.isPaused():null}function x(){v&&f&&f.pause()}function F(){return v&&f?f.isSeeking():null}function U(e,n,r){v&&f&&(e!==(isNaN(A)?f.getTime():A)&&((C=!0===r)||(A=e,t.trigger(o.default.PLAYBACK_SEEK_ASKED)),s.info("Requesting seek to time: "+e+(C?" (internal)":"")),f.setCurrentTime(e,n)))}function B(){return v&&f?f.getTime():null}function j(){var e=B();if(_&&!isNaN(S)){var t=S/1e3;e>t&&(e-=t)}return e}function H(){return v&&f?f.getPlaybackRate():null}function G(){return v&&f?f.getEnded():null}function q(){return _}function V(){if(!_||isNaN(S))return NaN;var e=j();if(isNaN(e)||0===e)return 0;var t=(new Date).getTime()+1e3*h.getClientTimeOffset();return Math.max(((t-S-1e3*e)/1e3).toFixed(3),0)}function Y(){b=!1,p=!1,g=NaN,y=0,S=0,A=NaN,f&&(t.off(o.default.STREAM_INITIALIZED,D,this),t.off(o.default.DATA_UPDATE_COMPLETED,Q,this),t.off(o.default.BUFFER_LEVEL_STATE_CHANGED,ye,this),t.off(o.default.LOADING_PROGRESS,me,this),t.off(o.default.PLAYBACK_PROGRESS,de,this),t.off(o.default.PLAYBACK_TIME_UPDATED,de,this),t.off(o.default.PLAYBACK_ENDED,le,this),t.off(o.default.STREAM_INITIALIZING,_e,this),z(),f.removeEventListener("canplay",$),f.removeEventListener("play",J),f.removeEventListener("waiting",Z),f.removeEventListener("playing",ee),f.removeEventListener("pause",te),f.removeEventListener("error",ce),f.removeEventListener("seeking",ne),f.removeEventListener("seeked",re),f.removeEventListener("timeupdate",ie),f.removeEventListener("progress",ae),f.removeEventListener("ratechange",oe),f.removeEventListener("loadedmetadata",se),f.removeEventListener("stalled",ve),f.removeEventListener("ended",ue)),m=null,f=null,v=null,_=null}function K(e){var t=O.getURIFragmentData();if(!t||!t.t)return NaN;var n=l.getStreams()[0].getStreamInfo().start;t.t=t.t.split(",")[0];var r=-1!==t.t.indexOf("posix:")?"now"===t.t.substring(6)?Date.now()/1e3:parseInt(t.t.substring(6)):NaN;return e&&!isNaN(r)?r-S/1e3:parseInt(t.t)+n}function W(){if(null===m){m=setInterval((function(){var e;t.trigger(o.default.WALLCLOCK_TIME_UPDATED,{isDynamic:_,time:new Date}),q()&&k()&&(e=Date.now(),(!E||e>E+500)&&(E=e,ie()))}),P.get().streaming.wallclockTimeUpdateInterval)}}function z(){clearInterval(m),m=null}function X(e){if(!k()&&_&&0!==f.getReadyState()){var t=j(),n=function(e,t){var n=c.getCurrentDVRInfo(t),r=n?n.range:null;return r?(s.debug("Checking DVR window for at "+e+" with DVR window range "+r.start+" - "+r.end),e>r.end?Math.max(r.end-y,r.start):e>0&&e+.25<r.start&&Math.abs(e-r.start)<31536e4?r.start:e):NaN}(t,e);!isNaN(n)&&n!==t&&!F()&&(s.debug("UpdateCurrentTime: Seek to actual time: "+n+" from currentTime: "+t),U(n))}}function Q(e){if(!e.error){var t=d.convertDataToRepresentationInfo(e.currentRepresentation),n=t?t.mediaInfo.streamInfo:null;null!==n&&v.id===n.id&&(v=n,X())}}function $(){t.trigger(o.default.CAN_PLAY)}function J(){s.info("Native video element event: play"),X(),W(),t.trigger(o.default.PLAYBACK_STARTED,{startTime:B()})}function Z(){s.info("Native video element event: waiting"),t.trigger(o.default.PLAYBACK_WAITING,{playingTime:B()})}function ee(){s.info("Native video element event: playing"),t.trigger(o.default.PLAYBACK_PLAYING,{playingTime:B()})}function te(){s.info("Native video element event: pause"),t.trigger(o.default.PLAYBACK_PAUSED,{ended:G()})}function ne(){if(C)C=!1;else{var e=B();isNaN(A)||A===e||(e=A),A=NaN,s.info("Seeking to: "+e),W(),t.trigger(o.default.PLAYBACK_SEEKING,{seekTime:e})}}function re(){s.info("Native video element event: seeked"),t.trigger(o.default.PLAYBACK_SEEKED)}function ie(){v&&t.trigger(o.default.PLAYBACK_TIME_UPDATED,{timeToEnd:M(),time:B()})}function ae(){t.trigger(o.default.PLAYBACK_PROGRESS)}function oe(){var e=H();s.info("Native video element event: ratechange: ",e),t.trigger(o.default.PLAYBACK_RATE_CHANGED,{playbackRate:e})}function se(){s.info("Native video element event: loadedmetadata"),t.trigger(o.default.PLAYBACK_METADATA_LOADED),W()}function ue(){s.info("Native video element event: ended"),x(),z();var e=l?l.getActiveStreamInfo():null;e&&t.trigger(o.default.PLAYBACK_ENDED,{isLast:e.isLast})}function le(e){if(m&&e.isLast){s.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var t=e.seekTime?e.seekTime:N();f.setCurrentTime(t),x(),z()}}function ce(e){var n=e.target||e.srcElement;t.trigger(o.default.PLAYBACK_ERROR,{error:n.error})}function de(){_&&fe()&&P.get().streaming.liveCatchup.playbackRate>0&&!k()&&!F()&&(function(){try{if(fe()&&P.get().streaming.liveCatchup.playbackRate>0&&B()>0){var e=pe(),t=V(),n=T.getLiveDelay(),i=T.getLiveCatchupLatencyThreshold(),a=P.get().streaming.liveCatchup.minDrift;return e===r.default.LIVE_CATCHUP_MODE_LOLP?function(e,t,n,r,i,a){try{var o=Math.abs(e-t);return(isNaN(a)||e<=a)&&(o>n||r<i)}catch(e){return!1}}(t,n,a,he(),P.get().streaming.liveCatchup.playbackBufferMin,i):function(e,t,n,r){try{return Math.abs(e-t)>r&&(isNaN(n)||e<=n)}catch(e){return!1}}(t,n,i,a)}}catch(e){return!1}}()?function(){if(f){var e=void 0,t=f.getPlaybackRate(),n=P.get().streaming.liveCatchup.playbackRate,i=V(),a=T.getLiveDelay(),o=he();if(pe()===r.default.LIVE_CATCHUP_MODE_LOLP){P.get().streaming.liveCatchup.minDrift;e=function(e,t,n,r,i,a,o){var u=e,l=void 0;if(a<i){var c=5*(a-i);l=1-u+2*u/(1+Math.pow(Math.E,-c)),s.debug("[LoL+ playback control_buffer-based] bufferLevel: "+a+", newRate: "+l)}else{var d=.02;if(Math.abs(t-n)<=d*n)l=1;else{var f=5*(t-n);l=1-u+2*u/(1+Math.pow(Math.E,-f))}s.debug("[LoL+ playback control_latency-based] latency: "+t+", newRate: "+l)}I&&a>n/2&&(I=!1);Math.abs(o-l)<=R&&(l=null);return{newRate:l}}(n,i,a,0,P.get().streaming.liveCatchup.playbackBufferMin,o,t)}else e=function(e,t,n,r,i){var a=e,o=t-n,s=5*o,u=2*a/(1+Math.pow(Math.E,-s)),l=1-a+u;I&&(r>n/2?I=!1:o>0&&(l=1));Math.abs(i-l)<=R&&(l=null);return{newRate:l}}(n,i,a,o,t);var u=e.newRate;u&&f.setPlaybackRate(u);var l=i-a;P.get().streaming.liveCatchup.maxDrift>0&&!w&&l>P.get().streaming.liveCatchup.maxDrift?(s.info("Low Latency catchup mechanism. Latency too high, doing a seek to live point"),w=!0,U(((d=c.getCurrentDVRInfo())?d.range:null).end-T.getLiveDelay(),!0,!1)):w=!1}var d}():ge())}function fe(){return P.get().streaming.liveCatchup.enabled||P.get().streaming.lowLatencyEnabled}function he(){var e=null;return l.getActiveStreamProcessors().forEach((function(t){var n=t.getBufferLevel();e=null===e?n:Math.min(e,n)})),e}function pe(){var e=P.get().streaming.liveCatchup.playbackBufferMin;return P.get().streaming.liveCatchup.mode!==r.default.LIVE_CATCHUP_MODE_LOLP||null===e||isNaN(e)?r.default.LIVE_CATCHUP_MODE_DEFAULT:r.default.LIVE_CATCHUP_MODE_LOLP}function ge(){f&&f.setPlaybackRate(1)}function me(e){if(!1===e.stream&&P.get().streaming.lowLatencyEnabled&&!isNaN(e.request.duration)){var t=1.2*e.request.duration;if(t>T.getLiveDelay()){s.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",t.toFixed(2));var n={streaming:{liveDelay:t}};P.update(n)}}}function ye(e){e.streamId===v.id&&(fe()?e.state!==i.default.BUFFER_EMPTY||F()||I||(I=!0,ge()):f.setStallState(e.mediaType,e.state===i.default.BUFFER_EMPTY))}function ve(e){t.trigger(o.default.PLAYBACK_STALLED,{e})}function _e(e){!function(e,t){if(e&&e.manifestInfo&&e.manifestInfo.serviceDescriptions){for(var n=void 0,i=0;i<e.manifestInfo.serviceDescriptions.length;i++){var a=e.manifestInfo.serviceDescriptions[i];if(a.schemeIdUri===r.default.SERVICE_DESCRIPTION_LL_SCHEME){n=a;break}}n&&t&&t.supplementalProperties&&"true"===t.supplementalProperties[r.default.SUPPLEMENTAL_PROPERTY_LL_SCHEME]&&(n.latency&&n.latency.target>0&&(s.debug("Apply LL properties coming from service description. Target Latency (ms):",n.latency.target),P.update({streaming:{lowLatencyEnabled:!0,liveDelay:n.latency.target/1e3,liveCatchup:{minDrift:n.latency.max>n.latency.target?(n.latency.max-n.latency.target)/1e3:void 0}}})),n.playbackRate&&n.playbackRate.max>1&&(s.debug("Apply LL properties coming from service description. Max PlaybackRate:",n.playbackRate.max),P.update({streaming:{lowLatencyEnabled:!0,liveCatchup:{playbackRate:n.playbackRate.max-1}}})))}}(e.streamInfo,e.mediaInfo)}return n={initialize:function(e,n,r){v=e,f.addEventListener("canplay",$),f.addEventListener("play",J),f.addEventListener("waiting",Z),f.addEventListener("playing",ee),f.addEventListener("pause",te),f.addEventListener("error",ce),f.addEventListener("seeking",ne),f.addEventListener("seeked",re),f.addEventListener("timeupdate",ie),f.addEventListener("progress",ae),f.addEventListener("ratechange",oe),f.addEventListener("loadedmetadata",se),f.addEventListener("stalled",ve),f.addEventListener("ended",ue),_=v.manifestInfo.isDynamic,w=!1,I=!1,p=!0===n,g=r,C=!1;var i="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",s=/safari/.test(i)&&!/chrome/.test(i);R=s?.25:.02,t.on(o.default.STREAM_INITIALIZED,D,this),t.on(o.default.DATA_UPDATE_COMPLETED,Q,this),t.on(o.default.LOADING_PROGRESS,me,this),t.on(o.default.BUFFER_LEVEL_STATE_CHANGED,ye,this),t.on(o.default.PLAYBACK_PROGRESS,de,this),t.on(o.default.PLAYBACK_TIME_UPDATED,de,this),t.on(o.default.PLAYBACK_ENDED,le,this,{priority:a.default.EVENT_PRIORITY_HIGH}),t.on(o.default.STREAM_INITIALIZING,_e,this),b&&(b=!1,L())},setConfig:function(e){e&&(e.streamController&&(l=e.streamController),e.dashMetrics&&(c=e.dashMetrics),e.mediaPlayerModel&&(T=e.mediaPlayerModel),e.adapter&&(d=e.adapter),e.videoModel&&(f=e.videoModel),e.timelineConverter&&(h=e.timelineConverter),e.uriFragmentModel&&(O=e.uriFragmentModel),e.settings&&(P=e.settings))},getStartTimeFromUriParameters:K,getTimeToStreamEnd:M,getTime:B,getNormalizedTime:j,getPlaybackRate:H,getPlayedRanges:function(){return v&&f?f.getPlayedRanges():null},getEnded:G,getIsDynamic:q,getStreamController:function(){return l},computeAndSetLiveDelay:function(e,t,n){var r,i=void 0,a=void 0,o=!isNaN(e)&&isFinite(e)?e:NaN,s=d.getSuggestedPresentationDelay();if(i=P.get().streaming.lowLatencyEnabled?0:T.getLiveDelay()?T.getLiveDelay():null===P.get().streaming.liveDelayFragmentCount||isNaN(P.get().streaming.liveDelayFragmentCount)||isNaN(o)?!0===P.get().streaming.useSuggestedPresentationDelay&&null!==s&&!isNaN(s)&&s>0?s:isNaN(o)?isNaN(n)?4*v.manifestInfo.minBufferTime:4*n:4*o:o*P.get().streaming.liveDelayFragmentCount,null!==(r=d.getAvailabilityStartTime())&&(S=r),t>0){var u=Math.max(t-10,t/2);a=Math.min(i,u)}else a=i;return y=a,a},getLiveDelay:function(){return y},setLiveDelay:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&e<y||(y=e)},getCurrentLiveLatency:V,play:L,isPaused:k,pause:x,isSeeking:F,getStreamEndTime:N,seek:U,updateCurrentTime:X,reset:Y},s=(0,u.default)(e).getInstance().getLogger(n),Y(),n}c.__dashjs_factory_name="PlaybackController",t.default=s.default.getSingletonFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(55);var a=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",e.BUFFERING_COMPLETED="bufferingCompleted",e.BUFFER_CLEARED="bufferCleared",e.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",e.BYTES_APPENDED="bytesAppended",e.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",e.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",e.CURRENT_TRACK_CHANGED="currentTrackChanged",e.DATA_UPDATE_COMPLETED="dataUpdateCompleted",e.DATA_UPDATE_STARTED="dataUpdateStarted",e.INBAND_EVENTS="inbandEvents",e.INITIALIZATION_LOADED="initializationLoaded",e.INIT_FRAGMENT_LOADED="initFragmentLoaded",e.INIT_FRAGMENT_NEEDED="initFragmentNeeded",e.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",e.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",e.LIVE_EDGE_SEARCH_COMPLETED="liveEdgeSearchCompleted",e.LOADING_COMPLETED="loadingCompleted",e.LOADING_PROGRESS="loadingProgress",e.LOADING_DATA_PROGRESS="loadingDataProgress",e.LOADING_ABANDONED="loadingAborted",e.MANIFEST_UPDATED="manifestUpdated",e.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",e.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",e.QUOTA_EXCEEDED="quotaExceeded",e.REPRESENTATION_UPDATE_STARTED="representationUpdateStarted",e.REPRESENTATION_UPDATE_COMPLETED="representationUpdateCompleted",e.SEGMENTS_LOADED="segmentsLoaded",e.SERVICE_LOCATION_BLACKLIST_ADD="serviceLocationBlacklistAdd",e.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",e.SOURCEBUFFER_REMOVE_COMPLETED="sourceBufferRemoveCompleted",e.STREAMS_COMPOSED="streamsComposed",e.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",e.STREAM_COMPLETED="streamCompleted",e.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",e.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",e.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",e.URL_RESOLUTION_FAILED="urlResolutionFailed",e.VIDEO_CHUNK_RECEIVED="videoChunkReceived",e.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",e.XLINK_ELEMENT_LOADED="xlinkElementLoaded",e.XLINK_READY="xlinkReady",e.SEGMENTBASE_INIT_REQUEST_NEEDED="segmentBaseInitRequestNeeded",e.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED="segmentBaseSegmentsListRequestNeeded",e.SEEK_TARGET="seekTarget",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=b(n(6)),i=b(n(16)),a=b(n(209)),o=b(n(131)),s=b(n(9)),u=b(n(10)),l=b(n(1)),c=n(80),d=b(n(8)),f=b(n(77)),h=b(n(21)),p=b(n(31)),g=b(n(278)),m=b(n(279)),y=b(n(11)),v=b(n(17)),_=b(n(280)),T=b(n(120));function b(e){return e&&e.__esModule?e:{default:e}}function E(){var e=this.context,t=(0,s.default)(e).getInstance(),n=void 0,l=void 0,b=void 0,E=void 0,S=void 0,A=void 0,C=void 0,w=void 0,I=void 0,R=void 0,O=void 0,P=void 0,D=void 0,M=void 0,N=void 0,L=void 0,k=void 0,x=void 0,F=void 0,U=void 0,B=void 0,j=void 0,H=void 0,G=void 0,q=void 0,V=void 0,Y=void 0,K=void 0,W=void 0,z=void 0,X=void 0,Q=void 0,$=void 0,J=void 0,Z=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0;function ae(){if(Ie()){var e=z.getPlaybackQuality();e&&I.addDroppedFrames(e)}}function oe(e){var t=ge(e.seekTime);t===j&&ne&&ne.length>0&&ne.forEach((function(e){e.deactivate(!0)})),t&&t!==j?(Oe(c.PlayListTrace.END_OF_PERIOD_STOP_REASON),_e(t,j,e.seekTime)):Oe(c.PlayListTrace.USER_REQUEST_STOP_REASON),Pe(c.PlayList.SEEK_START_REASON)}function se(e){var t=ve();Oe(c.PlayListTrace.END_OF_PERIOD_STOP_REASON),_e(t,j,e.seekTime),Pe(c.PlayList.SEEK_START_REASON)}function ue(){l.debug("[onPlaybackStarted]"),J?(J=!1,Pe(c.PlayList.INITIAL_PLAYOUT_START_REASON)):$&&($=!1,Pe(c.PlayList.RESUME_FROM_PAUSE_START_REASON))}function le(e){l.debug("[onPlaybackPaused]"),e.ended||($=!0,Oe(c.PlayListTrace.USER_REQUEST_STOP_REASON))}function ce(){Z&&(clearInterval(Z),Z=null)}function de(){ee||(ee=setInterval((function(){!function(){if(!j||!fe(j))return;var e=function(e){try{var t=e||(j||null);if(t){var n=t.getStreamInfo().start;return B.filter((function(e){return e.getStreamInfo().start>n}))}}catch(e){return[]}}(j),t=0,n=function(){var n=e[t],i=0===t?j:e[t-1];if(!n.getPreloadingScheduled()&&fe(i)&&W){var a=[r.default.VIDEO,r.default.AUDIO],o=!0;a.forEach((function(e){var t=w.getMediaInfoForType(n.getStreamInfo(),e);w.getVoRepresentations(t).forEach((function(e){var t=w.getIsDynamic(),n=U.calcSegmentAvailabilityRange(e,t);n.end<n.start&&(o=!1)}))})),o&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(W&&!e.getPreloaded()){pe(e,t)&&(e.setPreloadingScheduled(!0),l.info("[onStreamCanLoadNext] Preloading next stream with id "+e.getId()),!0,e.preload(W,te),ne.push(e),e.getProcessors().forEach((function(t){t.setBufferingTime(e.getStartTime())})))}}(n,i)}t+=1};for(;t<e.length;)n()}()}),500))}function fe(e){try{if(!e)return!1;var t=e.getProcessors().filter((function(e){return e.getType()===r.default.AUDIO||e.getType()===r.default.VIDEO}));if(!t||0===t.length)return!1;var n=t.filter((function(e){return!e.isBufferingCompleted()}));return n&&0===n.length}catch(e){return!1}}function he(){var e=Me().isLast;W&&e&&(l.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),R.signalEndOfStream(W))}function pe(e,t){try{return ie.get().streaming.reuseExistingSourceBuffers&&t.isProtectionCompatible(e,t)&&(re||t.isMediaCodecCompatible(e,t))&&!function(e){try{var t=e.getStreamInfo(),n=w.getAdaptationForType(t.index,r.default.FRAGMENTED_TEXT,t);return!!n&&(-1!==n.codecs.indexOf("stpp")||-1!==n.codecs.indexOf("wvtt"))}catch(e){return!1}}(e)}catch(e){return!1}}function ge(e){if(isNaN(e))return null;var t=0,n=null,r=B.length;r>0&&(t+=B[0].getStartTime());for(var i=0;i<r;i++)if(n=B[i],e<(t=parseFloat((t+n.getDuration()).toFixed(5))))return n;return null}function me(){return j?j.getProcessors():[]}function ye(e){if(!j.getIsEndedEventSignaled()){j.setIsEndedEventSignaled(!0);var t=ve();t?(l.debug("StreamController onEnded, found next stream with id "+t.getStreamInfo().id),_e(t,j,NaN)):(l.debug("StreamController no next stream found"),j.setIsEndedEventSignaled(!1)),Oe(t?c.PlayListTrace.END_OF_PERIOD_STOP_REASON:c.PlayListTrace.END_OF_CONTENT_STOP_REASON),!1}e&&e.isLast&&ce()}function ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||(j||null);if(t){for(var n=t.getStreamInfo().start,r=t.getStreamInfo().duration,i=parseFloat((n+r).toFixed(5)),a=0,o=-1,s=NaN;a<B.length;){var u=B[a],l=u.getStreamInfo().start-i;l>=0&&(isNaN(s)||l<s)&&(s=l,o=a),a+=1}return o>=0?B[o]:null}return null}function _e(e,n,r){if(!(V||!e||n===e&&e.isActive())){V=!0,t.trigger(u.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:n?n.getStreamInfo():null,toStreamInfo:e.getStreamInfo()});var i=!1;n&&(i=pe(e,n),n.deactivate(i)),r=isNaN(r)?!i&&n?e.getStreamInfo().start:NaN:r,l.info("Switch to stream "+e.getId()+". Seektime is "+r+", current playback time is "+X.getTime()),l.info("Seamless period switch is set to "+i),j=e,ne=ne.filter((function(e){return e.getId()!==j.getId()})),X.initialize(Me(),!!n,r),z.getElement()?Te(r,null===n,!1,i):be(r,i),!1}}function Te(e,n,r,i){var a=void 0;function o(){W&&"open"===W.readyState&&(l.debug("MediaSource is open!"),window.URL.revokeObjectURL(a),W.removeEventListener("sourceopen",o),W.removeEventListener("webkitsourceopen",o),Ee(),n||t.trigger(u.default.SOURCE_INITIALIZED),r?j.setMediaSource(W):be(e,i))}W?i?(be(e,i),n||t.trigger(u.default.SOURCE_INITIALIZED)):(R.detachMediaSource(z),W.addEventListener("sourceopen",o,!1),W.addEventListener("webkitsourceopen",o,!1),a=R.attachMediaSource(W,z),l.debug("MediaSource attached to element. Waiting on open...")):((W=R.createMediaSource()).addEventListener("sourceopen",o,!1),W.addEventListener("webkitsourceopen",o,!1),a=R.attachMediaSource(W,z),l.debug("MediaSource attached to element. Waiting on open..."))}function be(e,n){if(te=j.activate(W,n?te:void 0)){var r=Object.keys(te);r.length>0&&te[r[0]].changeType&&(re=!0)}J||isNaN(e)||(e===X.getTime()?t.trigger(u.default.SEEK_TARGET,{time:e},{streamId:j.getId()}):X.seek(e)),!q&&J||X.play(),V=!1,t.trigger(u.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Me()})}function Ee(e){var t=e||Me().manifestInfo.duration;R.setDuration(W,t)}function Se(e){for(var t=0,n=B.length;t<n;t++)if(B[t].getId()===e.id)return B[t];return null}function Ae(){try{var n=w.getStreamsInfo();if(0===n.length)throw new Error("There are no streams");I.updateManifestUpdateInfo({currentTime:X.getTime(),buffered:z.getBufferRange(),presentationStartTime:n[0].start,clientTimeOffset:U.getClientTimeOffset()}),B.length>0&&(B=B.filter((function(e){var t=n.filter((function(t){return t.id===e.getId()})).length>0||e.getId()===j.getId();return t||l.debug("Removing stream "+e.getId()),t})));for(var i=0,o=n.length;i<o;i++){var s=n[i],c=Se(s);c?c.updateData(s):(c=(0,a.default)(e).create({manifestModel:C,mediaPlayerModel:Q,dashMetrics:I,manifestUpdater:S,adapter:w,timelineConverter:U,capabilities:b,capabilitiesFilter:E,errHandler:F,baseURLController:P,abrController:D,playbackController:X,eventController:N,mediaController:M,textController:L,protectionController:H,videoModel:z,streamInfo:s,settings:ie}),B.push(c),c.initialize()),I.addManifestUpdateStreamInfo(s)}if(!j){if(w.getIsDynamic()&&B.length){var d=n[0].manifestInfo,f=function(e,t){try{var n=NaN;if(t&&!isNaN(t.maxFragmentDuration)&&isFinite(t.maxFragmentDuration))return t.maxFragmentDuration;if(e&&1===e.length){var i=e[0],a=[r.default.VIDEO,r.default.AUDIO,r.default.FRAGMENTED_TEXT].reduce((function(e,t){var n=w.getMediaInfoForType(i,t);return n&&e.push(n),e}),[]).reduce((function(e,t){var n=w.getVoRepresentations(t);return n&&n.length>0&&n.forEach((function(t){t&&e.push(t)})),e}),[]).reduce((function(e,t){var n=w.convertDataToRepresentationInfo(t);return n&&n.fragmentDuration&&!isNaN(n.fragmentDuration)&&e.push(n.fragmentDuration),e}),[]);n=Math.max.apply(Math,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(a))}return isFinite(n)?n:NaN}catch(e){return NaN}}(n,d);X.computeAndSetLiveDelay(f,d.DVRWindowSize,d.minBufferTime)}var h=null;!(h=ge(X.getStartTimeFromUriParameters(w.getIsDynamic())))&&w.getIsDynamic()&&B.length&&(l.debug("Dynamic stream: Trying to find the correct starting period"),h=function(){try{return ge(U.calcPresentationTimeFromWallTime(new Date,w.getRegularPeriods()[0])-X.getLiveDelay())}catch(e){return null}}()),_e(null!==h?h:B[0],null,NaN),Z||(Z=setInterval((function(){!V&&X.getTimeToStreamEnd()<=0&&t.trigger(u.default.PLAYBACK_ENDED,{isLast:Me().isLast})}),200)),de()}t.trigger(u.default.STREAMS_COMPOSED)}catch(e){F.error(new y.default(v.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e.message+"nostreamscomposed",C.getValue())),K=!0,xe()}}function Ce(){var e=C.getValue();H&&(t.trigger(u.default.PROTECTION_CREATED,{controller:H,manifest:e}),H.setMediaElement(z.getElement()),G&&H.setProtectionData(G)),Ae()}function we(e){if(e.error)K=!0,xe();else{var n=e.manifest;w.updatePeriods(n);var r=w.getUTCTimingSources();!w.getIsDynamic()||r&&0!==r.length||t.trigger(p.default.CONFORMANCE_VIOLATION,{level:T.default.LEVELS.WARNING,event:T.default.EVENTS.NO_UTC_TIMING_ELEMENT});var i=w.getIsDynamic()?r.concat(Q.getUTCTimingSources()):r,a=x.isHTTPS(e.manifest.url);i.forEach((function(e){e.value.replace(/.*?:\/\//g,"")===Q.getDefaultUtcTimingSource().value.replace(/.*?:\/\//g,"")&&(e.value=e.value.replace(a?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),a?"https://":"http://"),l.debug("Matching default timing source protocol to manifest protocol: ",e.value))})),P.initialize(n),O.attemptSync(i)}}function Ie(){return!!j&&j.getHasVideoTrack()}function Re(){return!!j&&j.getHasAudioTrack()}function Oe(e,t){t=t||new Date,me().forEach((function(n){n.finalisePlayList(t,e)})),I.addPlayList()}function Pe(e){I.createPlaylistMetrics(1e3*X.getTime(),e)}function De(e){if(e.error){var t="";switch(e.error.code){case 1:t="MEDIA_ERR_ABORTED";break;case 2:t="MEDIA_ERR_NETWORK";break;case 3:t="MEDIA_ERR_DECODE";break;case 4:t="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:t="MEDIA_ERR_ENCRYPTED";break;default:t="UNKNOWN"}Y=!0,e.error.message&&(t+=" ("+e.error.message+")"),e.error.msExtendedCode&&(t+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),l.fatal("Video Element Error: "+t),e.error&&l.fatal(e.error),F.error(new y.default(e.error.code,t)),xe()}}function Me(){return j?j.getStreamInfo():null}function Ne(){if(!(A&&A.hasOwnProperty("load")&&U&&U.hasOwnProperty("initialize")&&U.hasOwnProperty("reset")&&U.hasOwnProperty("getClientTimeOffset")&&C&&F&&I&&X))throw new Error(r.default.MISSING_CONFIG_ERROR)}function Le(e){isNaN(e.newDuration)||Ee(e.newDuration)}function ke(){B=[],H=null,V=!1,j=null,Y=!1,K=!1,J=!0,$=!1,q=!0,Z=null,!1,ee=null,!1,ne=[]}function xe(){Ne(),O.reset(),Oe(Y||K?c.PlayListTrace.FAILURE_STOP_REASON:c.PlayListTrace.USER_REQUEST_STOP_REASON);for(var e=0,r=B?B.length:0;e<r;e++){B[e].reset(Y)}t.off(u.default.PLAYBACK_TIME_UPDATED,ae,n),t.off(u.default.PLAYBACK_SEEKING,oe,n),t.off(u.default.GAP_CAUSED_SEEK_TO_PERIOD_END,se,n),t.off(u.default.PLAYBACK_ERROR,De,n),t.off(u.default.PLAYBACK_STARTED,ue,n),t.off(u.default.PLAYBACK_PAUSED,le,n),t.off(u.default.PLAYBACK_ENDED,ye,n),t.off(u.default.MANIFEST_UPDATED,we,n),t.off(u.default.STREAM_BUFFERING_COMPLETED,he,n),t.off(u.default.MANIFEST_VALIDITY_CHANGED,Le,n),t.off(u.default.TIME_SYNCHRONIZATION_COMPLETED,Ce,n),t.off(p.default.METRIC_ADDED,Fe,n),P.reset(),S.reset(),N.reset(),I.clearAllCurrentMetrics(),C.setValue(null),A.reset(),U.reset(),k.reset(),W&&(R.detachMediaSource(z),W=null),z=null,H&&(H.setMediaElement(null),H=null,G=null,C.getValue()&&t.trigger(u.default.PROTECTION_DESTROYED,{data:C.getValue().url})),ce(),clearInterval(ee),ee=null,t.trigger(u.default.STREAM_TEARDOWN_COMPLETE),ke()}function Fe(e){if(e.metric===i.default.DVR_INFO){var t=Re()?r.default.AUDIO:r.default.VIDEO;e.mediaType===t&&R.setSeekable(W,e.value.range.start,e.value.range.end)}}return n={initialize:function(r,i){Ne(),q=r,G=i,U.initialize(),(S=(0,o.default)(e).create()).setConfig({manifestModel:C,adapter:w,manifestLoader:A,errHandler:F,settings:ie}),S.initialize(),(N=(0,_.default)(e).getInstance()).setConfig({manifestUpdater:S,playbackController:X,settings:ie}),N.start(),O.setConfig({dashMetrics:I,baseURLController:P,settings:ie}),O.initialize(),t.on(u.default.PLAYBACK_TIME_UPDATED,ae,n),t.on(u.default.PLAYBACK_SEEKING,oe,n),t.on(u.default.GAP_CAUSED_SEEK_TO_PERIOD_END,se,n),t.on(u.default.PLAYBACK_ERROR,De,n),t.on(u.default.PLAYBACK_STARTED,ue,n),t.on(u.default.PLAYBACK_PAUSED,le,n),t.on(u.default.PLAYBACK_ENDED,ye,n,{priority:s.default.EVENT_PRIORITY_HIGH}),t.on(u.default.MANIFEST_UPDATED,we,n),t.on(u.default.STREAM_BUFFERING_COMPLETED,he,n),t.on(u.default.MANIFEST_VALIDITY_CHANGED,Le,n),t.on(u.default.TIME_SYNCHRONIZATION_COMPLETED,Ce,n),t.on(p.default.METRIC_ADDED,Fe,n)},getActiveStreamInfo:Me,hasVideoTrack:Ie,hasAudioTrack:Re,switchToVideoElement:function(e){j&&(X.initialize(Me()),Te(e,!1,!0,!1))},getStreamById:function(e){return B.filter((function(t){return t.getId()===e}))[0]},getStreamForTime:ge,getTimeRelativeToStreamId:function(e,t){for(var n=null,r=0,i=0,a=null,o=0;o<B.length;o++){if(i=(n=B[o]).getStartTime(),a=n.getDuration(),Number.isFinite(i)&&(r=i),n.getId()===t)return e-r;Number.isFinite(a)&&(r+=a)}return null},load:function(e){Ne(),A.load(e)},loadWithManifest:function(e){!function(){if(!S||!S.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}(),S.setManifest(e)},getActiveStreamProcessors:me,setConfig:function(e){e&&(e.capabilities&&(b=e.capabilities),e.capabilitiesFilter&&(E=e.capabilitiesFilter),e.manifestLoader&&(A=e.manifestLoader),e.manifestModel&&(C=e.manifestModel),e.mediaPlayerModel&&(Q=e.mediaPlayerModel),e.protectionController&&(H=e.protectionController),e.adapter&&(w=e.adapter),e.dashMetrics&&(I=e.dashMetrics),e.errHandler&&(F=e.errHandler),e.timelineConverter&&(U=e.timelineConverter),e.videoModel&&(z=e.videoModel),e.playbackController&&(X=e.playbackController),e.abrController&&(D=e.abrController),e.mediaController&&(M=e.mediaController),e.textController&&(L=e.textController),e.settings&&(ie=e.settings),e.baseURLController&&(P=e.baseURLController))},setProtectionData:function(e){G=e},getIsStreamSwitchInProgress:function(){return V},getHasMediaOrIntialisationError:function(){return Y||K},hasStreamFinishedBuffering:fe,getStreams:function(){return B},getActiveStream:function(){return j},reset:xe},l=(0,d.default)(e).getInstance().getLogger(n),O=(0,g.default)(e).getInstance(),R=(0,m.default)(e).getInstance(),k=(0,f.default)(e).getInstance(),x=(0,h.default)(e).getInstance(),ke(),n}E.__dashjs_factory_name="StreamController",t.default=l.default.getSingletonFactory(E)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=m(n(6)),i=m(n(15)),a=m(n(210)),o=m(n(263)),s=m(n(276)),u=m(n(9)),l=m(n(10)),c=m(n(8)),d=m(n(17)),f=m(n(1)),h=m(n(11)),p=m(n(40)),g=m(n(21));function m(e){return e&&e.__esModule?e:{default:e}}function y(e){e=e||{};var t=this.context,n=(0,u.default)(t).getInstance(),f=(0,g.default)(t).getInstance(),m=e.manifestModel,y=e.mediaPlayerModel,v=e.manifestUpdater,_=e.adapter,T=e.capabilities,b=e.capabilitiesFilter,E=e.errHandler,S=e.timelineConverter,A=e.dashMetrics,C=e.abrController,w=e.playbackController,I=e.eventController,R=e.mediaController,O=e.textController,P=e.protectionController,D=e.videoModel,M=e.settings,N=e.streamInfo,L=void 0,k=void 0,x=void 0,F=void 0,U=void 0,B=void 0,j=void 0,H=void 0,G=void 0,q=void 0,V=void 0,Y=void 0,K=void 0,W=void 0,z=void 0,X=void 0,Q=void 0,$=void 0;function J(e){for(var t=x?x.length:0,r=0;r<t;r++){x[r].getFragmentModel().removeExecutedRequestsBeforeTime(ne()+te()),x[r].reset(false,e)}x=[],U=!1,B=!1,Ee(!1),n.off(l.default.CURRENT_TRACK_CHANGED,le,L)}function Z(){J(),F=!1,j=!1,H=!1,G={},q=!1,z=!1,Q=!1}function ee(){w&&w.pause(),V&&(V.reset(),V=null),N=null,Z(),n.off(l.default.DATA_UPDATE_COMPLETED,ge,L),n.off(l.default.BUFFERING_COMPLETED,pe,L),n.off(l.default.INBAND_EVENTS,me,L),P&&(n.off(l.default.KEY_ERROR,se,L),n.off(l.default.SERVER_CERTIFICATE_UPDATED,se,L),n.off(l.default.LICENSE_REQUEST_COMPLETE,se,L),n.off(l.default.KEY_SYSTEM_SELECTED,se,L),n.off(l.default.KEY_SESSION_CREATED,se,L),n.off(l.default.KEY_STATUSES_CHANGED,se,L)),Ee(!1)}function te(){return N?N.duration:NaN}function ne(){return N?N.start:NaN}function re(){if(!N.manifestInfo.isDynamic)return NaN;for(var e=0;e<x.length;e++)if(x[e].getType()===r.default.AUDIO||x[e].getType()===r.default.VIDEO)return x[e].getLiveStartTime();return NaN}function ie(){return N?N.id:null}function ae(){return N}function oe(){if(!(D&&C&&C.hasOwnProperty("getBitrateList")&&_&&_.hasOwnProperty("getAllMediaInfoForType")&&_.hasOwnProperty("getEventsFor")))throw new Error(r.default.MISSING_CONFIG_ERROR)}function se(e){e.error&&(E.error(e.error),k.fatal(e.error.message),ee())}function ue(e){var t,n=e?e.type:null,i=void 0;if(n===r.default.MUXED)return i="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",k.fatal(i),E.error(new h.default(d.default.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,i,m.getValue())),!1;if(n===r.default.TEXT||n===r.default.FRAGMENTED_TEXT||n===r.default.EMBEDDED_TEXT||n===r.default.IMAGE)return!0;if(t=e.codec,k.debug(n+" codec: "+t),e.contentProtection&&!T.supportsEncryptedMedia())E.error(new h.default(d.default.CAPABILITY_MEDIAKEYS_ERROR_CODE,d.default.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE));else if(!T.supportsCodec(t))return i=n+"Codec ("+t+") is not supported.",k.error(i),!1;return!0}function le(e){if(N&&e.newMediaInfo.streamInfo.id===N.id){var t=e.newMediaInfo,n=m.getValue();_.setCurrentMediaInfo(N.id,t.type,t);var i=ye(t);if(i){var a=w.getTime();k.info("Stream - Process track changed at current time "+a),k.debug("Stream - Update stream controller"),n.refreshManifestOnSwitchTrack?(k.debug("Stream - Refreshing manifest for switch track"),$=e,v.refreshManifest()):(i.selectMediaInfo(t),t.type!==r.default.FRAGMENTED_TEXT?(C.updateTopQualityIndex(t),i.switchTrackAsked(),i.getFragmentModel().abortRequests()):(i.getScheduleController().setSeekTarget(a),i.setBufferingTime(a),i.resetIndexHandler()))}}}function ce(o,u){var c,d=_.getAllMediaInfoForType(N,o),f=null;if(d&&0!==d.length){o===r.default.VIDEO&&(j=!0),o===r.default.AUDIO&&(H=!0);for(var h=0,p=d.length;h<p;h++)if(f=d[h],o===r.default.EMBEDDED_TEXT)O.addEmbeddedTrack(f);else{if(!ue(f))continue;R.addTrack(f)}o!==r.default.EMBEDDED_TEXT&&0!==R.getTracksFor(o,N).length&&(o!==r.default.IMAGE?(R.checkInitialMediaSettingsForType(o,N),c=R.getCurrentTrackFor(o,N),n.trigger(l.default.STREAM_INITIALIZING,{streamInfo:N,mediaInfo:f}),function(n,i,o,s){var u=V.getModel(n?n.type:null),l=(0,a.default)(t).create({streamInfo:N,type:n?n.type:null,mimeType:n?n.mimeType:null,timelineConverter:S,adapter:_,manifestModel:m,mediaPlayerModel:y,fragmentModel:u,dashMetrics:e.dashMetrics,baseURLController:e.baseURLController,abrController:C,playbackController:w,mediaController:R,textController:O,errHandler:E,settings:M,boxParser:W});if(l.initialize(o,j),C.updateTopQualityIndex(n),s?(l.setBuffer(s.buffer),l.setBufferingTime(s.currentTime),x[s.replaceIdx]=l):x.push(l),!s||!s.ignoreMediaInfo)if(!n||n.type!==r.default.TEXT&&n.type!==r.default.FRAGMENTED_TEXT)l.addMediaInfo(n,!0);else{for(var c=void 0,d=0;d<i.length;d++)i[d].index===n.index&&(c=d),l.addMediaInfo(i[d]);l.selectMediaInfo(i[c])}}(c,d,u)):Y=(0,s.default)(t).create({streamInfo:N,adapter:_,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:X,eventBus:n,events:l.default,dashConstants:i.default}))}else k.info("No "+o+" data.")}function de(){if(I){var e=_.getEventsFor(N);I.addInlineEvents(e)}}function fe(){for(var e=x.length,t=!!G.audio||!!G.video?new h.default(d.default.DATA_UPDATE_FAILED_ERROR_CODE,d.default.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,i=0;i<e;i++)if(x[i].isUpdating()||q)return;if(B){if(P){P.clearMediaInfoArrayByStreamId(ie());for(var a=0;a<e&&x[a];a++){var o=x[a].getType();if(o===r.default.AUDIO||o===r.default.VIDEO||o===r.default.FRAGMENTED_TEXT){var s=x[a].getMediaInfo();s&&P.initializeForMedia(s)}}}t?E.error(t):F||(F=!0,n.trigger(l.default.STREAM_INITIALIZED,{streamInfo:N,liveStartTime:K?NaN:re()}));for(var u=0;u<e&&x[u];u++)x[u].getScheduleController().start()}}function he(e){for(var t={},n=0,r=x.length;n<r;n++){var i=x[n].createBuffer(e);i&&(t[x[n].getType()]=i.getBuffer())}return t}function pe(){var e=ve(),t=e.length;if(0!==t){for(var i=0;i<t;i++)if(!e[i].isBufferingCompleted()&&(e[i].getType()===r.default.AUDIO||e[i].getType()===r.default.VIDEO))return void k.warn("onBufferingCompleted - One streamProcessor has finished but",e[i].getType(),"one is not buffering completed");k.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),n.trigger(l.default.STREAM_BUFFERING_COMPLETED,{streamInfo:N})}else k.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function ge(e){G[e.mediaType]=e.error,fe()}function me(e){var t;t=e.events,I&&I.addInbandEvents(t)}function ye(e){return e?ve().filter((function(t){return t.getType()===e.type}))[0]:null}function ve(){for(var e=[],t=void 0,n=void 0,i=0;i<x.length;i++)(t=(n=x[i]).getType())!==r.default.AUDIO&&t!==r.default.VIDEO&&t!==r.default.FRAGMENTED_TEXT&&t!==r.default.TEXT||e.push(n);return e}function _e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return!1;var r=e.getStreamInfo(),i=n?n.getStreamInfo():ae();if(!r||!i)return!1;var a=_.getAdaptationForType(r.index,t,r),o=_.getAdaptationForType(i.index,t,i);return a&&o?!(!Te(o)&&Te(a)):!a&&!o}function Te(e){return!!e&&!!(e.ContentProtection||e.Representation&&e.Representation.length>0&&e.Representation[0].ContentProtection)}function be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e||!e.hasOwnProperty("getStreamInfo"))return!1;var r=e.getStreamInfo(),i=n?n.getStreamInfo():ae();if(!r||!i)return!1;var a=_.getAdaptationForType(r.index,t,r),o=_.getAdaptationForType(i.index,t,i);if(!a||!o)return!a&&!o;var s=a&&o&&a.mimeType===o.mimeType,u=o.Representation_asArray.map((function(e){return e.codecs})),l=a.Representation_asArray.map((function(e){return e.codecs})),c=l.some((function(e){return u.indexOf(e)>-1})),d=l.some((function(e){return u.some((function(t){return T.codecRootCompatibleWithCodec(t,e)}))}));return c||d&&s}function Ee(e){K=e}function Se(){return K}return L={initialize:function(){n.on(l.default.BUFFERING_COMPLETED,pe,L),n.on(l.default.DATA_UPDATE_COMPLETED,ge,L),n.on(l.default.INBAND_EVENTS,me,L),P&&(n.on(l.default.KEY_ERROR,se,L),n.on(l.default.SERVER_CERTIFICATE_UPDATED,se,L),n.on(l.default.LICENSE_REQUEST_COMPLETE,se,L),n.on(l.default.KEY_SYSTEM_SELECTED,se,L),n.on(l.default.KEY_SESSION_CREATED,se,L),n.on(l.default.KEY_STATUSES_CHANGED,se,L)),n.trigger(l.default.STREAM_UPDATED,{streamInfo:N})},getStreamId:function(){return N?N.id:null},activate:function(e,t){if(!U){var i=void 0;return n.on(l.default.CURRENT_TRACK_CHANGED,le,L),Se()?(!function(){if(q=!0,oe(),b.filterUnsupportedFeaturesOfPeriod(N),B=!0,q=!1,0===x.length){var e="No streams to play.";E.error(new h.default(d.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e,m.getValue())),k.debug(e)}else fe()}(),i=t):i=function(e,t){oe();var n=D.getElement();de(),q=!0,b.filterUnsupportedFeaturesOfPeriod(N),(!n||n&&/^VIDEO$/i.test(n.nodeName))&&ce(r.default.VIDEO,e);ce(r.default.AUDIO,e),ce(r.default.TEXT,e),ce(r.default.FRAGMENTED_TEXT,e),ce(r.default.EMBEDDED_TEXT,e),ce(r.default.MUXED,e),ce(r.default.IMAGE,e);var i=he(t);if(B=!0,q=!1,0===x.length){var a="No streams to play.";E.error(new h.default(d.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,a,m.getValue())),k.fatal(a)}else fe();return i}(e,t),U=!0,i}return t},deactivate:J,isActive:function(){return U},getDuration:te,getStartTime:ne,getId:ie,getStreamInfo:ae,getHasAudioTrack:function(){return H},getHasVideoTrack:function(){return j},preload:function(e,t){if(!Se()){de(),ce(r.default.VIDEO,e),ce(r.default.AUDIO,e),ce(r.default.TEXT,e),ce(r.default.FRAGMENTED_TEXT,e),ce(r.default.EMBEDDED_TEXT,e),ce(r.default.MUXED,e),ce(r.default.IMAGE,e),he(t),n.on(l.default.CURRENT_TRACK_CHANGED,le,L);for(var i=0;i<x.length&&x[i];i++)x[i].getScheduleController().start();Ee(!0)}},getThumbnailController:function(){return Y},getBitrateListFor:function(e){if(oe(),e===r.default.IMAGE)return Y?Y.getBitrateList():[];var t=function(e){for(var t=null,n=0;n<x.length;n++)if((t=x[n]).getType()===e)return t.getMediaInfo();return null}(e);return C.getBitrateList(t)},updateData:function(e){k.info("Manifest updated... updating data system wide."),U=!1,q=!0,N=e,n.trigger(l.default.STREAM_UPDATED,{streamInfo:N}),I&&de(),b.filterUnsupportedFeaturesOfPeriod(N);for(var t=0,i=x.length;t<i;t++){var a=x[t];a.updateStreamInfo(N);var o=_.getMediaInfoForType(N,a.getType());o&&(C.updateTopQualityIndex(o),a.addMediaInfo(o,!0))}if($&&$.newMediaInfo.type!==r.default.FRAGMENTED_TEXT){var s=ye($.oldMediaInfo);if(!s)return;s.switchTrackAsked(),$=void 0}q=!1,fe()},reset:ee,getProcessors:ve,setMediaSource:function(e){for(var t=0;t<x.length;)ue(x[t].getMediaInfo())?(x[t].setMediaSource(e),t++):(x[t].reset(),x.splice(t,1));for(var n=0;n<x.length;n++)x[n].dischargePreBuffer();if(0===x.length){var r="No streams to play.";E.error(new h.default(d.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,r+"nostreams",m.getValue())),k.fatal(r)}},isMediaCodecCompatible:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return be(e,r.default.VIDEO,t)&&be(e,r.default.AUDIO,t)},isProtectionCompatible:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return _e(e,r.default.VIDEO,t)&&_e(e,r.default.AUDIO,t)},getPreloaded:Se,getPreloadingScheduled:function(){return z},setPreloadingScheduled:function(e){z=e},getIsEndedEventSignaled:function(){return Q},setIsEndedEventSignaled:function(e){Q=e}},X=(0,c.default)(t).getInstance(),k=X.getLogger(L),Z(),W=(0,p.default)(t).getInstance(),V=(0,o.default)(t).create({streamInfo:N,mediaPlayerModel:y,dashMetrics:A,errHandler:E,settings:M,boxParser:W,dashConstants:i.default,urlUtils:f}),L}y.__dashjs_factory_name="Stream",t.default=f.default.getClassFactory(y)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=C(n(6)),i=C(n(15)),a=C(n(16)),o=C(n(39)),s=C(n(111)),u=C(n(251)),l=C(n(253)),c=C(n(255)),d=C(n(256)),f=C(n(1)),h=n(23),p=C(n(9)),g=C(n(10)),m=C(n(124)),y=C(n(17)),v=C(n(11)),_=C(n(8)),T=C(n(79)),b=C(n(21)),E=C(n(40)),S=C(n(26)),A=n(80);function C(e){return e&&e.__esModule?e:{default:e}}function w(e){e=e||{};var t=this.context,n=(0,p.default)(t).getInstance(),f=e.streamInfo,C=e.type,w=e.errHandler,I=e.mimeType,R=e.timelineConverter,O=e.adapter,P=e.manifestModel,D=e.mediaPlayerModel,M=e.fragmentModel,N=e.abrController,L=e.playbackController,k=e.mediaController,x=e.textController,F=e.dashMetrics,U=e.settings,B=e.boxParser,j=void 0,H=void 0,G=void 0,q=void 0,V=void 0,Y=void 0,K=void 0,W=void 0,z=void 0,X=void 0,Q=void 0,$=void 0;function J(){return C}function Z(){V=[],q=null,Q=0}function ee(e){(e.error||K.setCurrentRepresentation(O.convertDataToRepresentationInfo(e.currentRepresentation)),e.error&&e.error.code!==y.default.SEGMENTS_UPDATE_FAILED_ERROR_CODE)||L.getStreamController().getActiveStreamInfo().id===f.id&&oe()}function te(e){var t=ce(e.newQuality);K.setCurrentRepresentation(t),F.pushPlayListTraceMetrics(new Date,A.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),F.createPlaylistTraceMetrics(t.id,1e3*L.getTime(),L.getPlaybackRate())}function ne(e){F.addBufferLevel(C,new Date,1e3*e.bufferLevel);var t=L.getStreamController().getActiveStreamInfo().id;P.getValue().doNotUpdateDVRWindowOnBufferUpdated||f.id!==t||oe()}function re(e){F.addBufferState(C,e.state,K.getBufferTarget()),e.state!==a.default.BUFFER_EMPTY||L.isSeeking()||F.pushPlayListTraceMetrics(new Date,A.PlayListTrace.REBUFFERING_REASON)}function ie(e){M.syncExecutedRequestsWithBufferedRange(Y.getBuffer().getAllBufferRanges(),f.duration),e.from>L.getTime()&&(Q=e.from,$=!0)}function ae(e){Q=e.quotaExceededTime,$=!0}function oe(){var e=f.manifestInfo,t=e.isDynamic,n=R.calcSegmentAvailabilityRange(W.getCurrentRepresentation(),t);F.addDVRInfo(J(),L.getTime(),e,n)}function se(){return Y?Y.getBuffer():null}function ue(){return V}function le(){return q}function ce(e){var t=void 0;return void 0!==e?((0,h.checkInteger)(e),t=W?W.getRepresentationForQuality(e):null):t=W?W.getCurrentRepresentation():null,O.convertDataToRepresentationInfo(t)}function de(e){if(e.sender&&(!O.getIsTextTrack(I)||x.isTextEnabled())&&Y&&e.representationId&&!Y.appendInitSegment(e.representationId)){var t=X?X.getInitRequest(le(),W.getCurrentRepresentation()):null;K.processInitRequest(t)}}function fe(e){var t=void 0;Y.getIsPruningInProgress()||(t=function(e,t){var n=ce(),i=!isNaN(e),a=L.getNormalizedTime(),o=i?e:Q,s=!1,u=void 0;if(isNaN(o)||J()===r.default.FRAGMENTED_TEXT&&!x.isTextEnabled())return null;if(Y){var l=Y.getRangeAt(o),c=Y.getRangeAt(a);if((null!==l||null!==c)&&!i)if(!l||c&&c.start!=l.start&&c.end!=l.end)Y.getBuffer().hasDiscontinuitiesAfter(a)&&J()!==r.default.FRAGMENTED_TEXT&&(M.removeExecutedRequestsAfterTime(c.end),s=!0)}if(t)u=ge(n,o=t.startTime+t.duration/2,{timeThreshold:0,ignoreIsFinished:!0});else{var d=i||$||s;for(u=ge(n,d?o:void 0,{keepIdx:!d}),$=!1;u&&u.action!==S.default.ACTION_COMPLETE&&M.isFragmentLoaded(u);)u=ge(n)}return u}(e.seekTarget,e.replacement))&&(K.setSeekTarget(NaN),e.replacement||(isNaN(t.startTime+t.duration)||(Q=t.startTime+t.duration),t.delayLoadingTime=(new Date).getTime()+K.getTimeToLoadDelay(),K.setTimeToLoadDelay(0))),K.processMediaRequest(t)}function he(e){var r=e.chunk,i=r.bytes,a=r.quality,s=ce(a),u=W&&s?W.getRepresentationForQuality(s.quality):null,l=O.getEventsFor(s.mediaInfo),c=O.getEventsFor(s,u);if(l&&l.length>0||c&&c.length>0){var d=function(e,n,r,i){try{for(var a={},o=[],s=r.concat(i),u=0,l=s.length;u<l;u++)a[s[u].schemeIdUri+"/"+s[u].value]=s[u];var c=(0,E.default)(t).getInstance().parse(e),d=c.getBoxes("emsg");if(!d||0===d.length)return o;for(var f=c.getBox("sidx"),h=!f||isNaN(f.earliest_presentation_time)||isNaN(f.timescale)?n&&!isNaN(n.mediaStartTime)?n.mediaStartTime:0:f.earliest_presentation_time/f.timescale,p=Math.max(h,0),g=W.getCurrentRepresentation(),m=0,y=d.length;m<y;m++){var v=O.getEvent(d[m],a,p,g);v&&o.push(v)}return o}catch(e){return[]}}(i,M.getRequests({state:o.default.FRAGMENT_MODEL_EXECUTED,quality:a,index:r.index})[0],l,c);n.trigger(g.default.INBAND_EVENTS,{events:d},{streamId:f.id})}}function pe(e){Q=e.time,K.setSeekTarget(e.time)}function ge(e,t,n){var r=null;if(X){var i=W&&e?W.getRepresentationForQuality(e.quality):null;r=void 0!==t&&void 0!==n?X.getSegmentRequestForTime(le(),i,t,n):X.getNextSegmentRequest(le(),i)}return r}return j={initialize:function(a,o){X=(0,m.default)(t).create({streamInfo:f,type:C,timelineConverter:R,dashMetrics:F,mediaPlayerModel:D,baseURLController:e.baseURLController,errHandler:w,settings:U,boxParser:B,events:g.default,eventBus:n,errors:y.default,debug:(0,_.default)(t).getInstance(),requestModifier:(0,T.default)(t).getInstance(),dashConstants:i.default,constants:r.default,urlUtils:(0,b.default)(t).getInstance()}),(G=f.manifestInfo.isDynamic)&&(z=(0,d.default)(t).create({timelineConverter:R})),X.initialize(G),N.registerStreamType(C,j),W=(0,c.default)(t).create({streamInfo:f,type:C,abrController:N,dashMetrics:F,playbackController:L,timelineConverter:R,dashConstants:i.default,events:g.default,eventBus:n,errors:y.default}),(Y=function(e){var n=null;if(!e)return w.error(new v.default(y.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,y.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null;n=e===r.default.VIDEO||e===r.default.AUDIO?(0,s.default)(t).create({streamInfo:f,type:e,mediaPlayerModel:D,manifestModel:P,fragmentModel:M,errHandler:w,mediaController:k,representationController:W,adapter:O,textController:x,abrController:N,playbackController:L,settings:U}):(0,u.default)(t).create({streamInfo:f,type:e,mimeType:I,mediaPlayerModel:D,manifestModel:P,fragmentModel:M,errHandler:w,mediaController:k,representationController:W,adapter:O,textController:x,abrController:N,playbackController:L,settings:U});return n}(C))&&Y.initialize(a),(K=(0,l.default)(t).create({streamInfo:f,type:C,mimeType:I,adapter:O,dashMetrics:F,mediaPlayerModel:D,fragmentModel:M,abrController:N,playbackController:L,textController:x,mediaController:k,bufferController:Y,settings:U})).initialize(o),Q=0,$=!1},getStreamId:function(){return f.id},getType:J,isUpdating:function(){return!!W&&W.isUpdating()},getBufferController:function(){return Y},getFragmentModel:function(){return M},getScheduleController:function(){return K},getRepresentationController:function(){return W},getRepresentationInfo:ce,getBufferLevel:function(){return Y?Y.getBufferLevel():0},isBufferingCompleted:function(){return!!Y&&Y.getIsBufferingCompleted()},createBuffer:function(e){return se()||Y?Y.createBuffer(V,e):null},updateStreamInfo:function(e){f=e,U.get().streaming.useAppendWindow&&Y.updateAppendWindow()},getStreamInfo:function(){return f},selectMediaInfo:function(e){e===q||e&&q&&e.type!==q.type||(q=e);var t=O.getRealAdaptation(f,q),n=O.getVoRepresentations(q);if(W){var i=W.getData(),a=N.getTopQualityIndexFor(C,f.id),o=N.getMinAllowedIndexFor(C),s=void 0,u=null;null!==i&&i.id==t.id||C===r.default.FRAGMENTED_TEXT?s=N.getQualityFor(C):(u=N.getThroughputHistory().getAverageThroughput(C)||N.getInitialBitrateFor(C),s=N.getQualityForBitrate(q,u)),void 0!==o&&s<o&&(s=o),s>a&&(s=a),X.setMimeType(q?q.mimeType:null),W.updateData(t,n,C,s)}},addMediaInfo:function(e,t){-1===V.indexOf(e)&&V.push(e),t&&this.selectMediaInfo(e)},getLiveStartTime:function(){if(!G)return NaN;if(!z)return NaN;var e=NaN,t=ce(),n=z.getLiveEdge(t);if(isNaN(n))return NaN;var r=function(e,t){try{var n=null,r=L.getLiveDelay(),i=isNaN(f.manifestInfo.DVRWindowSize)?r:f.manifestInfo.DVRWindowSize,a=.1*i,o=void 0;if(!isFinite(i)||ge(t,e-i+a,{ignoreIsFinished:!0}))for(;!n&&r<=i;)(n=ge(t,o=e-r,{ignoreIsFinished:!0}))||(r+=1);return n&&L.setLiveDelay(r,!0),H.debug("live edge: "+e+", live delay: "+r+", live target: "+o),n}catch(e){return null}}(n,t);return r&&(e=U.get().streaming.lowLatencyEnabled?r.duration<D.getLiveDelay()?r.startTime:r.startTime+r.duration-D.getLiveDelay():r.startTime),e},switchTrackAsked:function(){K.switchTrackAsked()},getMediaInfoArr:ue,getMediaInfo:le,getMediaSource:function(){return Y.getMediaSource()},setMediaSource:function(e){Y.setMediaSource(e,ue())},dischargePreBuffer:function(){Y.dischargePreBuffer()},getBuffer:se,setBuffer:function(e){Y.setBuffer(e)},setBufferingTime:function(e){Q=e},resetIndexHandler:function(){X&&X.resetIndex()},getInitRequest:function(e){(0,h.checkInteger)(e);var t=W?W.getRepresentationForQuality(e):null;return X?X.getInitRequest(le(),t):null},getFragmentRequest:ge,finalisePlayList:function(e,t){F.pushPlayListTraceMetrics(e,t)},probeNextRequest:function(){var e=ce(),t=W&&e?W.getRepresentationForQuality(e.quality):null;return X.getNextSegmentRequestIdempotent(le(),t)},reset:function(e,t){X&&X.reset(),Y&&(Y.reset(e,t),Y=null),K&&(K.reset(),K=null),W&&(W.reset(),W=null),z&&(z.reset(),z=null),N&&!t&&N.unRegisterStreamType(C),n.off(g.default.DATA_UPDATE_COMPLETED,ee,j),n.off(g.default.QUALITY_CHANGE_REQUESTED,te,j),n.off(g.default.INIT_FRAGMENT_NEEDED,de,j),n.off(g.default.MEDIA_FRAGMENT_NEEDED,fe,j),n.off(g.default.MEDIA_FRAGMENT_LOADED,he,j),n.off(g.default.BUFFER_LEVEL_UPDATED,ne,j),n.off(g.default.BUFFER_LEVEL_STATE_CHANGED,re,j),n.off(g.default.BUFFER_CLEARED,ie,j),n.off(g.default.SEEK_TARGET,pe,j),Z(),C=null,f=null}},H=(0,_.default)(t).getInstance().getLogger(j),Z(),n.on(g.default.DATA_UPDATE_COMPLETED,ee,j,{priority:p.default.EVENT_PRIORITY_HIGH}),n.on(g.default.QUALITY_CHANGE_REQUESTED,te,j),n.on(g.default.INIT_FRAGMENT_NEEDED,de,j),n.on(g.default.MEDIA_FRAGMENT_NEEDED,fe,j),n.on(g.default.MEDIA_FRAGMENT_LOADED,he,j),n.on(g.default.BUFFER_LEVEL_UPDATED,ne,j),n.on(g.default.BUFFER_LEVEL_STATE_CHANGED,re,j),n.on(g.default.BUFFER_CLEARED,ie,j),n.on(g.default.QUOTA_EXCEEDED,ae,j),n.on(g.default.SEEK_TARGET,pe,j),j}w.__dashjs_factory_name="StreamProcessor",t.default=f.default.getClassFactory(w)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(6)),i=n(12),a=v(n(212)),o=v(n(40)),s=v(n(113)),u=v(n(1)),l=v(n(8)),c=v(n(71)),d=v(n(231)),f=v(n(70)),h=v(n(110)),p=v(n(9)),g=v(n(10)),m=v(n(11)),y=v(n(17));function v(e){return e&&e.__esModule?e:{default:e}}function _(){var e=this.context,t=(0,p.default)(e).getInstance(),n=!1,u=void 0,v=void 0,_=void 0,T=void 0,b=void 0,E=void 0,S=void 0,A=void 0,C=void 0,w=void 0,I=void 0,R=void 0,O=void 0,P=void 0,D=void 0,M=void 0,N=void 0,L=void 0,k=void 0,x=void 0,F=void 0,U=void 0,B=void 0,j=void 0,H=void 0,G=void 0;function q(){O=null,D=NaN,M=[],k=null,P=!1}function V(){q(),I=[],A=null}function Y(e){var t=e.chunk;t.mediaInfo.embeddedCaptions&&X(t.bytes,t)}function K(){F=[],(R=(0,c.default)(e).getInstance()).setConfig({videoModel:N}),R.initialize(),_=(0,o.default)(e).getInstance(),x=null,U=0,j=[],B=null,n=!0,H=(0,d.default)(e).getInstance();var r=L.getActiveStreamProcessors();for(var i in r)if("video"===r[i].getType()){G=r[i].getRepresentationInfo().MSETimeOffset;break}t.on(g.default.VIDEO_CHUNK_RECEIVED,Y,this),t.on(g.default.BUFFER_CLEARED,$,this)}function W(e){x=e}function z(e,t){var n,i,o=new a.default,s={subtitle:"subtitles",caption:"captions"};o.captionData=e,o.lang=t.lang,o.labels=t.labels,o.id=t.id?t.id:t.index,o.index=t.index,o.isTTML=(n=!1,t.codec&&t.codec.search(r.default.STPP)>=0&&(n=!0),t.mimeType&&t.mimeType.search(r.default.TTML)>=0&&(n=!0),n),o.defaultTrack=function(e){var t=!1;F.length>1&&e.isEmbedded?t=e.id&&e.id===r.default.CC1:1===F.length?e.id&&"string"==typeof e.id&&"CC"===e.id.substring(0,2)&&(t=!0):0===F.length&&(t=e.index===I[0].index);return t}(t),o.isFragmented=!b.getIsTextTrack(t.mimeType),o.isEmbedded=!!t.isEmbedded,o.kind=i=(i=t.roles.length>0?s[t.roles[0]]:s.caption)===s.caption||i===s.subtitle?i:s.caption,o.roles=t.roles,o.accessibility=t.accessibility;var u=(I?I.length:0)+F.length;R.addTextTrack(o,u)}function X(e,t){var n=void 0,a=void 0,o=void 0,s=void 0,u=void 0,l=void 0,c=void 0,d=t.mediaInfo,p=d.type,g=d.mimeType,b=d.codec||g;if(b){if(p===r.default.FRAGMENTED_TEXT)if(P||"InitializationSegment"!==t.segmentType){if(!P)return;if(a=(l=_.getSamplesInfo(e)).sampleList,null===k&&a.length>0&&(k=a[0].cts-t.start*D),b.search(r.default.STPP)>=0)for(A=null!==A?A:Q(b),o=0;o<a.length;o++){var S=a[o],C=S.cts,w=C-k;this.buffered.add(w/D,(w+S.duration)/D);var I=new DataView(e,S.offset,S.subSizes[0]);c=f.default.Utils.dataViewToString(I,r.default.UTF8);var M=[],L=S.offset+S.subSizes[0];for(s=1;s<S.subSizes.length;s++){var q=new Uint8Array(e,L,S.subSizes[s]),V=String.fromCharCode.apply(null,q);M.push(V),L+=S.subSizes[s]}try{var Y=E.getValue().ttmlTimeIsRelative?C/D:0;n=A.parse(c,Y,C/D,(C+S.duration)/D,M),R.addCaptions(x,k/D,n)}catch(e){O.removeExecutedRequestsBeforeTime(),this.remove(),v.error("TTML parser error: "+e.message)}}else{var K=[];for(o=0;o<a.length;o++){var W=a[o];W.cts-=k,this.buffered.add(W.cts/D,(W.cts+W.duration)/D);var X=e.slice(W.offset,W.offset+W.size),$=f.default.parseBuffer(X);for(s=0;s<$.boxes.length;s++){var J=$.boxes[s];if(v.debug("VTT box1: "+J.type),"vtte"!==J.type&&"vttc"===J.type)for(v.debug("VTT vttc boxes.length = "+J.boxes.length),u=0;u<J.boxes.length;u++){var Z=J.boxes[u];if(v.debug("VTT box2: "+Z.type),"payl"===Z.type){var ee=Z.cue_text;v.debug("VTT cue_text = "+ee);var te=W.cts/D,ne=(W.cts+W.duration)/D;K.push({start:te,end:ne,data:ee,styles:{}}),v.debug("VTT "+te+"-"+ne+" : "+ee)}}}}K.length>0&&R.addCaptions(x,0,K)}}else P=!0,D=_.getMediaTimescaleFromMoov(e);else if(p===r.default.TEXT){var re=new DataView(e,0,e.byteLength);c=f.default.Utils.dataViewToString(re,r.default.UTF8);try{n=Q(b).parse(c,0),R.addCaptions(R.getCurrentTrackIdx(),0,n)}catch(e){T.error(new m.default(y.default.TIMED_TEXT_ERROR_ID_PARSE_CODE,y.default.TIMED_TEXT_ERROR_MESSAGE_PARSE+e.message,c))}}else if(p===r.default.VIDEO)if(t.segmentType===i.HTTPRequest.INIT_SEGMENT_TYPE){if(0===U)for(U=_.getMediaTimescaleFromMoov(e),o=0;o<F.length;o++)z(null,F[o])}else{if(0===U)return void v.warn("CEA-608: No timescale for embeddedTextTrack yet");var ie=function(e,t){return function(e,n,r){var i=null;i=N.getTTMLRenderingDiv()?H.createHTMLCaptionsFromScreen(N.getElement(),e,n,r):[{start:e,end:n,data:r.getDisplayText(),styles:{}}],i&&R.addCaptions(t,0,i)}},ae=(l=_.getSamplesInfo(e)).lastSequenceNumber;if(!j[0]&&!j[1]){var oe=void 0,se=void 0;for(o=0;o<F.length;o++){if(F[o].id===r.default.CC1?(0,se=R.getTrackIdxForId(r.default.CC1)):F[o].id===r.default.CC3&&(1,se=R.getTrackIdxForId(r.default.CC3)),-1===se)return void v.warn("CEA-608: data before track is ready.");oe=ie(0,se),j[o]=new h.default.Cea608Parser(o+1,{newCue:oe},null)}}if(U){if(null!==B&&ae!==B+l.numSequences)for(o=0;o<j.length;o++)j[o]&&j[o].reset();for(var ue=function(e,t){if(0===t.length)return null;for(var n={splits:[],fields:[[],[]]},r=new DataView(e),i=0;i<t.length;i++)for(var a=t[i],o=h.default.findCea608Nalus(r,a.offset,a.size),s=null,u=0,l=0;l<o.length;l++)for(var c=h.default.extractCea608DataFromRange(r,o[l]),d=0;d<2;d++)c[d].length>0&&(a.cts!==s?u=0:u+=1,n.fields[d].push([a.cts+G*U,c[d],u]),s=a.cts);return n.fields.forEach((function(e){e.sort((function(e,t){return e[0]===t[0]?e[2]-t[2]:e[0]-t[0]}))})),n}(e,l.sampleList),le=0;le<j.length;le++){var ce=ue.fields[le],de=j[le];if(de)for(o=0;o<ce.length;o++)de.addData(ce[o][0]/U,ce[o][1])}B=ae}}}else v.error("No text type defined")}function Q(e){var t=void 0;return e.search(r.default.VTT)>=0?t=C:(e.search(r.default.TTML)>=0||e.search(r.default.STPP)>=0)&&(t=w),t}function $(e){F.forEach((function(t){var n=R.getTrackIdxForId(t.id);n>=0&&R.deleteCuesFromTrackIdx(n,e.from,e.to)}))}return u={initialize:function(t,i,a,l){n||K(),R.setConfig({videoModel:N}),R.initialize(),_||(_=(0,o.default)(e).getInstance()),function(t,n,i,a){var o=!b.getIsTextTrack(t);if(I=I.concat(i),o){O=a,u.buffered=(0,s.default)(e).create(),M=S.getTracksFor(r.default.FRAGMENTED_TEXT,n);for(var l=S.getCurrentTrackFor(r.default.FRAGMENTED_TEXT,n),c=0;c<M.length;c++)if(M[c]===l){W(c);break}}for(var d=0;d<I.length;d++)z(null,I[d])}(t,i,a,l)},append:X,abort:function(){R.deleteAllTextTracks(),q(),_=null,I=[]},addEmbeddedTrack:function(e){if(n||K(),e)if(e.id===r.default.CC1||e.id===r.default.CC3){for(var t=0;t<F.length;t++)if(F[t].id===e.id)return;F.push(e)}else v.warn("Embedded track "+e.id+" not supported!")},resetEmbedded:function(){t.off(g.default.VIDEO_CHUNK_RECEIVED,Y,this),t.off(g.default.BUFFER_CLEARED,$,this),R&&R.deleteAllTextTracks(),n=!1,F=[],j=[null,null],B=null},setConfig:function(e){e&&(e.errHandler&&(T=e.errHandler),e.adapter&&(b=e.adapter),e.manifestModel&&(E=e.manifestModel),e.mediaController&&(S=e.mediaController),e.videoModel&&(N=e.videoModel),e.streamController&&(L=e.streamController),e.textTracks&&(R=e.textTracks),e.vttParser&&(C=e.vttParser),e.ttmlParser&&(w=e.ttmlParser))},getConfig:function(){return{fragmentModel:O,fragmentedTracks:M,videoModel:N}},setCurrentFragmentedTrackIdx:W,remove:function(e,t){void 0===e&&e===t&&(e=this.buffered.start(0),t=this.buffered.end(this.buffered.length-1)),this.buffered.remove(e,t)},reset:function(){V(),L=null,N=null,R=null}},v=(0,l.default)(e).getInstance().getLogger(u),V(),u}_.__dashjs_factory_name="TextSourceBuffer",t.default=u.default.getSingletonFactory(_)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.captionData=null,this.label=null,this.lang=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(214)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=void 0;function t(t){var r=[];if(!t||!e||"function"!=typeof e.fetchAll)return r;for(var i=e.fetchAll(t),a=void 0,o=0,s=i.length;o<s;o++)(a=n(i[o]))&&r.push(a);return r}function n(e){if(!e)return null;var t=new r.default(e);return e.hasOwnProperty("_incomplete")&&(t.isComplete=!e._incomplete),t}return{getBox:function(t){return t&&e&&e.boxes&&0!==e.boxes.length&&"function"==typeof e.fetch?n(e.fetch(t)):null},getBoxes:t,setData:function(t){e=t},getLastBox:function(){if(!e||!e.boxes||!e.boxes.length)return null;var n=t(e.boxes[e.boxes.length-1].type);return n.length>0?n[n.length-1]:null}}}o.__dashjs_factory_name="IsoFile",t.default=i.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.offset=t._offset,this.type=t.type,this.size=t.size,this.boxes=[],t.boxes)for(var n=0;n<t.boxes.length;n++)this.boxes.push(new e(t.boxes[n]));switch(this.isComplete=!0,t.type){case"sidx":if(this.timescale=t.timescale,this.earliest_presentation_time=t.earliest_presentation_time,this.first_offset=t.first_offset,this.references=t.references,t.references){this.references=[];for(var r=0;r<t.references.length;r++){var i={reference_type:t.references[r].reference_type,referenced_size:t.references[r].referenced_size,subsegment_duration:t.references[r].subsegment_duration};this.references.push(i)}}break;case"emsg":this.id=t.id,this.version=1===t.version?1:0,this.value=t.value,this.timescale=t.timescale,this.scheme_id_uri=t.scheme_id_uri,this.presentation_time_delta=1===t.version?t.presentation_time:t.presentation_time_delta,this.event_duration=t.event_duration,this.message_data=t.message_data;break;case"mdhd":this.timescale=t.timescale;break;case"mfhd":this.sequence_number=t.sequence_number;break;case"subs":this.entry_count=t.entry_count,this.entries=t.entries;break;case"tfhd":this.base_data_offset=t.base_data_offset,this.sample_description_index=t.sample_description_index,this.default_sample_duration=t.default_sample_duration,this.default_sample_size=t.default_sample_size,this.default_sample_flags=t.default_sample_flags,this.flags=t.flags;break;case"tfdt":this.version=t.version,this.baseMediaDecodeTime=t.baseMediaDecodeTime,this.flags=t.flags;break;case"trun":if(this.sample_count=t.sample_count,this.first_sample_flags=t.first_sample_flags,this.data_offset=t.data_offset,this.flags=t.flags,this.samples=t.samples,t.samples){this.samples=[];for(var a=0,o=t.samples.length;a<o;a++){var s={sample_size:t.samples[a].sample_size,sample_duration:t.samples[a].sample_duration,sample_composition_time_offset:t.samples[a].sample_composition_time_offset};this.samples.push(s)}}}}return r(e,[{key:"getChildBox",value:function(e){for(var t=0;t<this.boxes.length;t++)if(this.boxes[t].type===e)return this.boxes[t]}},{key:"getChildBoxes",value:function(e){for(var t=[],n=0;n<this.boxes.length;n++)this.boxes[n].type===e&&t.push(this.boxes[n]);return t}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.lastCompletedOffset=t,this.found=n,this.size=r}},function(e,t,n){!function(e,t,n,r){e.generateISD=function(e,t,n){var r=new u(e),i={};for(var o in e.head.layout.regions){var s=a(e,t,e.head.layout.regions[o],e.body,null,"",e.head.layout.regions[o],n,i);null!==s&&r.contents.push(s.element)}return r};var i=[n.byName.color.qname,n.byName.textCombine.qname,n.byName.textDecoration.qname,n.byName.textEmphasis.qname,n.byName.textOutline.qname,n.byName.textShadow.qname];function a(e,t,u,d,f,h,p,g,m){if(t<p.begin||t>=p.end)return null;var y="regionID"in p&&""!==p.regionID?p.regionID:h;if(null!==f&&y!==u.id&&(!("contents"in p)||"contents"in p&&0===p.contents.length||""!==y))return null;var v=new l(p);for(var _ in p.sets)t<p.sets[_].begin||t>=p.sets[_].end||(v.styleAttrs[p.sets[_].qname]=p.sets[_].value);var T,b={};for(var E in v.styleAttrs)if(b[E]=!0,E===n.byName.writingMode.qname&&!(n.byName.direction.qname in v.styleAttrs)){var S=v.styleAttrs[E];"lrtb"===S||"lr"===S?v.styleAttrs[n.byName.direction.qname]="ltr":"rltb"!==S&&"rl"!==S||(v.styleAttrs[n.byName.direction.qname]="rtl")}if(null!==f)for(var A in n.all){var C=n.all[A];if(C.qname===n.byName.textDecoration.qname){var w=f.styleAttrs[C.qname],I=v.styleAttrs[C.qname],R=[];void 0===I?R=w:-1===I.indexOf("none")?((-1===I.indexOf("noUnderline")&&-1!==w.indexOf("underline")||-1!==I.indexOf("underline"))&&R.push("underline"),(-1===I.indexOf("noLineThrough")&&-1!==w.indexOf("lineThrough")||-1!==I.indexOf("lineThrough"))&&R.push("lineThrough"),(-1===I.indexOf("noOverline")&&-1!==w.indexOf("overline")||-1!==I.indexOf("overline"))&&R.push("overline")):R.push("none"),v.styleAttrs[C.qname]=R}else if(C.qname!==n.byName.fontSize.qname||C.qname in v.styleAttrs||"span"!==v.kind||"textContainer"!==v.styleAttrs[n.byName.ruby.qname])if(C.qname!==n.byName.fontSize.qname||C.qname in v.styleAttrs||"span"!==v.kind||"text"!==v.styleAttrs[n.byName.ruby.qname])C.inherit&&C.qname in f.styleAttrs&&!(C.qname in v.styleAttrs)&&(v.styleAttrs[C.qname]=f.styleAttrs[C.qname]);else{var O=f.styleAttrs[n.byName.fontSize.qname];"textContainer"===f.styleAttrs[n.byName.ruby.qname]?v.styleAttrs[C.qname]=O:v.styleAttrs[C.qname]=new r.ComputedLength(.5*O.rw,.5*O.rh)}else{var P=f.styleAttrs[n.byName.fontSize.qname];v.styleAttrs[C.qname]=new r.ComputedLength(.5*P.rw,.5*P.rh)}}for(var D in n.all){var M=n.all[D];if(!(M.qname in v.styleAttrs)&&!(M.qname===n.byName.position.qname&&n.byName.origin.qname in v.styleAttrs||M.qname===n.byName.origin.qname&&n.byName.position.qname in v.styleAttrs)){var N=e.head.styling.initials[M.qname]||M.initial;("region"===v.kind||!1===M.inherit&&null!==N)&&(v.styleAttrs[M.qname]=M.parse(N),b[M.qname]=!0)}}for(var L in n.all){var k=n.all[L];if(k.qname in b&&null!==k.compute){var x=k.compute(e,f,v,v.styleAttrs[k.qname],m);null!==x?v.styleAttrs[k.qname]=x:(v.styleAttrs[k.qname]=k.compute(e,f,v,k.parse(k.initial),m),c(g,"Style '"+k.qname+"' on element '"+v.kind+"' cannot be computed"))}}if("none"===v.styleAttrs[n.byName.display.qname])return null;for(var F in null===f?T=null===d?[]:[d]:"contents"in p&&(T=p.contents),T){var U=a(e,t,u,d,v,y,T[F],g,m);null!==U&&v.contents.push(U.element)}for(var B in v.styleAttrs){var j=!1;if("span"===v.kind){var H=v.styleAttrs[n.byName.ruby.qname];(j=("container"===H||"textContainer"===H||"baseContainer"===H)&&-1!==i.indexOf(B))||(j="container"!==H&&B===n.byName.rubyAlign.qname),j||(j=!("textContainer"===H||"text"===H)&&B===n.byName.rubyPosition.qname)}if(!j)j=-1===n.byQName[B].applies.indexOf(v.kind);j&&delete v.styleAttrs[B]}if("span"===v.kind&&v.text&&"default"===v.space){var G=v.text.replace(/[\t\r\n ]+/g," ");v.text=G}if("p"===v.kind){var q=[];o(v,q);for(var V=0,Y="after_br",K=0;;)if("after_br"===Y)V>=q.length||"br"===q[V].kind?(Y="before_br",K=V,V--):("preserve"!==q[V].space&&(q[V].text=q[V].text.replace(/^[\t\r\n ]+/g,"")),q[V].text.length>0?(Y="looking_br",V++):q.splice(V,1));else if("before_br"===Y)if(V<0||"br"===q[V].kind){if(Y="after_br",(V=K+1)>=q.length)break}else if("preserve"!==q[V].space&&(q[V].text=q[V].text.replace(/[\t\r\n ]+$/g,"")),q[V].text.length>0){if(Y="after_br",(V=K+1)>=q.length)break}else q.splice(V,1),V--;else V>=q.length||"br"===q[V].kind?(Y="before_br",K=V,V--):V++;s(v)}return"div"===v.kind&&n.byName.backgroundImage.qname in v.styleAttrs||"br"===v.kind||"image"===v.kind||"contents"in v&&v.contents.length>0||"span"===v.kind&&null!==v.text||"region"===v.kind&&"always"===v.styleAttrs[n.byName.showBackground.qname]?{region_id:y,element:v}:null}function o(e,t){if("contents"in e)for(var n in e.contents)o(e.contents[n],t);else"span"!==e.kind&&"br"!==e.kind||t.push(e)}function s(e){if("br"===e.kind)return!1;if("text"in e)return 0===e.text.length;if("contents"in e){for(var t=e.contents.length;t--;)s(e.contents[t])&&e.contents.splice(t,1);return 0===e.contents.length}}function u(e){this.contents=[],this.aspectRatio=e.aspectRatio}function l(e){for(var t in this.kind=e.kind||"region",e.id&&(this.id=e.id),this.styleAttrs={},e.styleAttrs)this.styleAttrs[t]=e.styleAttrs[t];"src"in e&&(this.src=e.src),"type"in e&&(this.type=e.type),"text"in e?this.text=e.text:("region"===this.kind||"contents"in e)&&(this.contents=[]),"space"in e&&(this.space=e.space)}function c(e,t){if(e&&e.error&&e.error(t))throw t}}(t,"undefined"==typeof imscNames?n(56):imscNames,"undefined"==typeof imscStyles?n(72):imscStyles,"undefined"==typeof imscUtils?n(57):imscUtils)},function(e,t,n){!function(e,t,n,r,i){function a(e){if("contents"in e)for(var t=("styleAttrs"in e?e.styleAttrs[r.byName.ruby.qname]:null),n="span"===e.kind&&("container"===t||"textContainer"===t||"baseContainer"===t),i=e.contents.length-1;i>=0;i--)!n||"styleAttrs"in e.contents[i]&&r.byName.ruby.qname in e.contents[i].styleAttrs?a(e.contents[i]):delete e.contents[i]}function o(e,t,n,r){var i=r&&"seq"===r.timeContainer,a=0;r&&(a=i&&n?n.end:r.begin),t.begin=t.explicit_begin?t.explicit_begin+a:a;var s=t.begin,u=null;for(var l in t.sets)o(e,t.sets[l],u,t),s="seq"===t.timeContainer?t.sets[l].end:Math.max(s,t.sets[l].end),u=t.sets[l];if("contents"in t)for(var c in t.contents)o(e,t.contents[c],u,t),s="seq"===t.timeContainer?t.contents[c].end:Math.max(s,t.contents[c].end),u=t.contents[c];else s=i?t.begin:Number.POSITIVE_INFINITY;null!==t.explicit_end&&null!==t.explicit_dur?t.end=Math.min(t.begin+t.explicit_dur,a+t.explicit_end):null===t.explicit_end&&null!==t.explicit_dur?t.end=t.begin+t.explicit_dur:null!==t.explicit_end&&null===t.explicit_dur?t.end=a+t.explicit_end:t.end=s,delete t.explicit_begin,delete t.explicit_dur,delete t.explicit_end,e._registerEvent(t)}function s(e){this.node=e}function u(){this.events=[],this.head=new l,this.body=null}function l(){this.styling=new c,this.layout=new h}function c(){this.styles={},this.initials={}}function d(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function f(){this.styleAttrs=null}function h(){this.regions={}}function p(e,t){g.call(this,"image"),this.src=e,this.type=t}function g(e){this.kind=e}function m(e){this.id=e}function y(e){this.regionID=e}function v(e){this.styleAttrs=e}function _(e){this.sets=e}function T(e){this.contents=e}function b(e,t,n){this.explicit_begin=e,this.explicit_end=t,this.explicit_dur=n}function E(){g.call(this,"body")}function S(){g.call(this,"div")}function A(){g.call(this,"p")}function C(){g.call(this,"span")}function w(){g.call(this,"span")}function I(){g.call(this,"br")}function R(){}function O(){}function P(e){return e&&"xml:id"in e.attributes&&e.attributes["xml:id"].value||null}function D(e){return e&&"style"in e.attributes?e.attributes.style.value.split(" "):[]}function M(e,t){var n={};if(null!==e)for(var i in e.attributes){var a=e.attributes[i].uri+" "+e.attributes[i].local,o=r.byQName[a];if(void 0!==o){var s=o.parse(e.attributes[i].value);null!==s?(n[a]=s,o===r.byName.zIndex&&U(t,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):B(t,"Cannot parse styling attribute "+a+" --\x3e "+e.attributes[i].value)}}return n}function N(e,t,n){for(var r in e.attributes)if(e.attributes[r].uri===t&&e.attributes[r].local===n)return e.attributes[r].value;return null}function L(e,t,n){var r,i=null;return null!==(r=/^(\d+(?:\.\d+)?)f$/.exec(n))?null!==t&&(i=parseFloat(r[1])/t):null!==(r=/^(\d+(?:\.\d+)?)t$/.exec(n))?null!==e&&(i=parseFloat(r[1])/e):null!==(r=/^(\d+(?:\.\d+)?)ms$/.exec(n))?i=parseFloat(r[1])/1e3:null!==(r=/^(\d+(?:\.\d+)?)s$/.exec(n))?i=parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)h$/.exec(n))?i=3600*parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)m$/.exec(n))?i=60*parseFloat(r[1]):null!==(r=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(n))?i=3600*parseInt(r[1])+60*parseInt(r[2])+parseFloat(r[3]):null!==(r=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(n))&&null!==t&&(i=3600*parseInt(r[1])+60*parseInt(r[2])+parseInt(r[3])+(null===r[4]?0:parseInt(r[4])/t)),i}function k(e,t,n){for(;t.styleRefs.length>0;){var r=t.styleRefs.pop();r in e.styles?(k(e,e.styles[r],n),F(e.styles[r].styleAttrs,t.styleAttrs)):B(n,"Non-existant style id referenced")}}function x(e,t,n,r){for(var i=t.length-1;i>=0;i--){var a=t[i];a in e.styles?F(e.styles[a].styleAttrs,n):B(r,"Non-existant style id referenced")}}function F(e,t){for(var n in e)n in t||(t[n]=e[n])}function U(e,t){if(e&&e.warn&&e.warn(t))throw t}function B(e,t){if(e&&e.error&&e.error(t))throw t}function j(e,t){throw e&&e.fatal&&e.fatal(t),t}function H(e,t){for(var n,r=0,i=e.length-1;r<=i;){var a=e[n=Math.floor((r+i)/2)];if(a<t)r=n+1;else{if(!(a>t))return{found:!0,index:n};i=n-1}}return{found:!1,index:r}}e.fromXML=function(e,i,g){var m=t.parser(!0,{xmlns:!0}),y=[],v=[],_=[],T=0,b=null;m.onclosetag=function(e){if(y[0]instanceof c)for(var t in y[0].styles)k(y[0],y[0].styles[t],i);else if(y[0]instanceof A||y[0]instanceof C){if(y[0].contents.length>1){var r,a=[y[0].contents[0]];for(r=1;r<y[0].contents.length;r++)y[0].contents[r]instanceof w&&a[a.length-1]instanceof w?a[a.length-1].text+=y[0].contents[r].text:a.push(y[0].contents[r]);y[0].contents=a}y[0]instanceof C&&1===y[0].contents.length&&y[0].contents[0]instanceof w&&(y[0].text=y[0].contents[0].text,delete y[0].contents)}else y[0]instanceof s&&(y[0].node.uri===n.ns_tt&&"metadata"===y[0].node.local?T--:T>0&&g&&"onCloseTag"in g&&g.onCloseTag());_.shift(),v.shift(),y.shift()},m.ontext=function(e){if(void 0===y[0]);else if(y[0]instanceof C||y[0]instanceof A){if(y[0]instanceof C){var t=y[0].styleAttrs[r.byName.ruby.qname];if("container"===t||"textContainer"===t||"baseContainer"===t)return}var n=new w;n.initFromText(b,y[0],e,_[0],i),y[0].contents.push(n)}else y[0]instanceof s&&T>0&&g&&"onText"in g&&g.onText(e)},m.onopentag=function(e){var t=e.attributes["xml:space"];t?_.unshift(t.value):0===_.length?_.unshift("default"):_.unshift(_[0]);var a=e.attributes["xml:lang"];if(a?v.unshift(a.value):0===v.length?v.unshift(""):v.unshift(v[0]),e.uri===n.ns_tt)if("tt"===e.local)null!==b&&j(i,"Two <tt> elements at ("+this.line+","+this.column+")"),(b=new u).initFromNode(e,i),y.unshift(b);else if("head"===e.local)y[0]instanceof u||j(i,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),y.unshift(b.head);else if("styling"===e.local)y[0]instanceof l||j(i,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),y.unshift(b.head.styling);else if("style"===e.local){var o;y[0]instanceof c?((o=new d).initFromNode(e,i),o.id?b.head.styling.styles[o.id]=o:B(i,"<style> element missing @id attribute"),y.unshift(o)):y[0]instanceof R?((o=new d).initFromNode(e,i),F(o.styleAttrs,y[0].styleAttrs),y.unshift(o)):j(i,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("initial"===e.local){var m;if(y[0]instanceof c){for(var w in(m=new f).initFromNode(e,i),m.styleAttrs)b.head.styling.initials[w]=m.styleAttrs[w];y.unshift(m)}else j(i,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if("layout"===e.local)y[0]instanceof l||j(i,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),y.unshift(b.head.layout);else if("region"===e.local){y[0]instanceof h||j(i,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var P=new R;P.initFromNode(b,e,i),!P.id||P.id in b.head.layout.regions?B(i,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):b.head.layout.regions[P.id]=P,y.unshift(P)}else if("body"===e.local){y[0]instanceof u||j(i,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==b.body&&j(i,"Second <body> element at "+this.line+","+this.column+")");var D=new E;D.initFromNode(b,e,i),b.body=D,y.unshift(D)}else if("div"===e.local){y[0]instanceof S||y[0]instanceof E||j(i,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var M=new S;M.initFromNode(b,y[0],e,i);var N=M.styleAttrs[r.byName.backgroundImage.qname];N&&(M.contents.push(new p(N)),delete M.styleAttrs[r.byName.backgroundImage.qname]),y[0].contents.push(M),y.unshift(M)}else if("image"===e.local){y[0]instanceof S||j(i,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var L=new p;L.initFromNode(b,y[0],e,i),y[0].contents.push(L),y.unshift(L)}else if("p"===e.local){y[0]instanceof S||j(i,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var k=new A;k.initFromNode(b,y[0],e,i),y[0].contents.push(k),y.unshift(k)}else if("span"===e.local){y[0]instanceof C||y[0]instanceof A||j(i,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var x=new C;x.initFromNode(b,y[0],e,_[0],i),y[0].contents.push(x),y.unshift(x)}else if("br"===e.local){y[0]instanceof C||y[0]instanceof A||j(i,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var U=new I;U.initFromNode(b,y[0],e,i),y[0].contents.push(U),y.unshift(U)}else if("set"===e.local){y[0]instanceof C||y[0]instanceof A||y[0]instanceof S||y[0]instanceof E||y[0]instanceof R||y[0]instanceof I||j(i,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var H=new O;H.initFromNode(b,y[0],e,i),y[0].sets.push(H),y.unshift(H)}else y.unshift(new s(e));else y.unshift(new s(e));if(y[0]instanceof s)if(e.uri===n.ns_tt&&"metadata"===e.local)T++;else if(T>0&&g&&"onOpenTag"in g){var G=[];for(var q in e.attributes)G[e.attributes[q].uri+" "+e.attributes[q].local]={uri:e.attributes[q].uri,local:e.attributes[q].local,value:e.attributes[q].value};g.onOpenTag(e.uri,e.local,G)}},m.write(e).close(),delete b.head.styling.styles;var P=!1;for(var D in b.head.layout.regions){P=!0;break}if(!P){var M=R.prototype.createDefaultRegion();b.head.layout.regions[M.id]=M}for(var N in b.head.layout.regions)o(b,b.head.layout.regions[N],null,null);return b.body&&o(b,b.body,null,null),b.body&&a(b.body),b},u.prototype.initFromNode=function(e,t){var r=function(e,t){var r=N(e,n.ns_ttp,"cellResolution"),i=15,a=32;if(null!==r){var o=/(\d+) (\d+)/.exec(r);null!==o?(a=parseInt(o[1]),i=parseInt(o[2])):U(t,"Malformed cellResolution value (using initial value instead)")}return{w:a,h:i}}(e,t);this.cellLength={h:new i.ComputedLength(0,1/r.h),w:new i.ComputedLength(1/r.w,0)};var a=function(e,t){var r,i=N(e,n.ns_ttp,"frameRate"),a=30;if(null!==i){null!==(r=/(\d+)/.exec(i))?a=parseInt(r[1]):U(t,"Malformed frame rate attribute (using initial value instead)")}var o=N(e,n.ns_ttp,"frameRateMultiplier"),s=1;if(null!==o){null!==(r=/(\d+) (\d+)/.exec(o))?s=parseInt(r[1])/parseInt(r[2]):U(t,"Malformed frame rate multiplier attribute (using initial value instead)")}var u=s*a,l=1,c=N(e,n.ns_ttp,"tickRate");if(null===c)null!==i&&(l=u);else{null!==(r=/(\d+)/.exec(c))?l=parseInt(r[1]):U(t,"Malformed tick rate attribute (using initial value instead)")}return{effectiveFrameRate:u,tickRate:l}}(e,t);this.effectiveFrameRate=a.effectiveFrameRate,this.tickRate=a.tickRate,this.aspectRatio=function(e,t){var r=N(e,n.ns_ittp,"aspectRatio");null===r&&(r=N(e,n.ns_ttp,"displayAspectRatio"));var i=null;if(null!==r){var a=/(\d+)\s+(\d+)/.exec(r);if(null!==a){var o=parseInt(a[1]),s=parseInt(a[2]);0!==o&&0!==s?i=o/s:B(t,"Illegal aspectRatio values (ignoring)")}else B(t,"Malformed aspectRatio attribute (ignoring)")}return i}(e,t);var o=N(e,n.ns_ttp,"timeBase");null!==o&&"media"!==o&&j(t,"Unsupported time base");var s=function(e,t){var r=N(e,n.ns_tts,"extent");if(null===r)return null;var a=r.split(" ");if(2!==a.length)return U(t,"Malformed extent (ignoring)"),null;var o=i.parseLength(a[0]),s=i.parseLength(a[1]);if(!s||!o)return U(t,"Malformed extent values (ignoring)"),null;return{h:s,w:o}}(e,t);null===s?this.pxLength={h:null,w:null}:("px"===s.h.unit&&"px"===s.w.unit||j(t,"Extent on TT must be in px or absent"),this.pxLength={h:new i.ComputedLength(0,1/s.h.value),w:new i.ComputedLength(1/s.w.value,0)}),this.dimensions={h:new i.ComputedLength(0,1),w:new i.ComputedLength(1,0)}},u.prototype._registerEvent=function(e){if(!(e.end<=e.begin)){var t=H(this.events,e.begin);if(t.found||this.events.splice(t.index,0,e.begin),e.end!==Number.POSITIVE_INFINITY){var n=H(this.events,e.end);n.found||this.events.splice(n.index,0,e.end)}}},u.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},u.prototype.getMediaTimeEvents=function(){return this.events},d.prototype.initFromNode=function(e,t){this.id=P(e),this.styleAttrs=M(e,t),this.styleRefs=D(e)},f.prototype.initFromNode=function(e,t){for(var r in this.styleAttrs={},e.attributes)if(e.attributes[r].uri===n.ns_itts||e.attributes[r].uri===n.ns_ebutts||e.attributes[r].uri===n.ns_tts){var i=e.attributes[r].uri+" "+e.attributes[r].local;this.styleAttrs[i]=e.attributes[r].value}},p.prototype.initFromNode=function(e,t,n,r){this.src="src"in n.attributes?n.attributes.src.value:null,this.src||B(r,"Invalid image@src attribute"),this.type="type"in n.attributes?n.attributes.type.value:null,this.type||B(r,"Invalid image@type attribute"),v.prototype.initFromNode.call(this,e,t,n,r),b.prototype.initFromNode.call(this,e,t,n,r),_.prototype.initFromNode.call(this,e,t,n,r),y.prototype.initFromNode.call(this,e,t,n,r)},m.prototype.initFromNode=function(e,t,n,r){this.id=P(n)},y.prototype.initFromNode=function(e,t,n,r){this.regionID=function(e){return e&&"region"in e.attributes?e.attributes.region.value:""}(n)},v.prototype.initFromNode=function(e,t,n,r){this.styleAttrs=M(n,r),null!==e.head&&null!==e.head.styling&&x(e.head.styling,D(n),this.styleAttrs,r)},_.prototype.initFromNode=function(e,t,n,r){this.sets=[]},T.prototype.initFromNode=function(e,t,n,r){this.contents=[]},b.prototype.initFromNode=function(e,t,n,r){var i=function(e,t,n,r){var i=null;n&&"begin"in n.attributes&&null===(i=L(e.tickRate,e.effectiveFrameRate,n.attributes.begin.value))&&U(r,"Malformed begin value "+n.attributes.begin.value+" (using 0)");var a=null;n&&"dur"in n.attributes&&null===(a=L(e.tickRate,e.effectiveFrameRate,n.attributes.dur.value))&&U(r,"Malformed dur value "+n.attributes.dur.value+" (ignoring)");var o=null;n&&"end"in n.attributes&&null===(o=L(e.tickRate,e.effectiveFrameRate,n.attributes.end.value))&&U(r,"Malformed end value (ignoring)");return{explicit_begin:i,explicit_end:o,explicit_dur:a}}(e,0,n,r);this.explicit_begin=i.explicit_begin,this.explicit_end=i.explicit_end,this.explicit_dur=i.explicit_dur,this.timeContainer=function(e,t){var n=e&&"timeContainer"in e.attributes?e.attributes.timeContainer.value:null;return n&&"par"!==n?"seq"===n?"seq":(B(t,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}(n,r)},E.prototype.initFromNode=function(e,t,n){v.prototype.initFromNode.call(this,e,null,t,n),b.prototype.initFromNode.call(this,e,null,t,n),_.prototype.initFromNode.call(this,e,null,t,n),y.prototype.initFromNode.call(this,e,null,t,n),T.prototype.initFromNode.call(this,e,null,t,n)},S.prototype.initFromNode=function(e,t,n,r){v.prototype.initFromNode.call(this,e,t,n,r),b.prototype.initFromNode.call(this,e,t,n,r),_.prototype.initFromNode.call(this,e,t,n,r),y.prototype.initFromNode.call(this,e,t,n,r),T.prototype.initFromNode.call(this,e,t,n,r)},A.prototype.initFromNode=function(e,t,n,r){v.prototype.initFromNode.call(this,e,t,n,r),b.prototype.initFromNode.call(this,e,t,n,r),_.prototype.initFromNode.call(this,e,t,n,r),y.prototype.initFromNode.call(this,e,t,n,r),T.prototype.initFromNode.call(this,e,t,n,r)},C.prototype.initFromNode=function(e,t,n,r,i){v.prototype.initFromNode.call(this,e,t,n,i),b.prototype.initFromNode.call(this,e,t,n,i),_.prototype.initFromNode.call(this,e,t,n,i),y.prototype.initFromNode.call(this,e,t,n,i),T.prototype.initFromNode.call(this,e,t,n,i),this.space=r},w.prototype.initFromText=function(e,t,n,r,i){b.prototype.initFromNode.call(this,e,t,null,i),this.text=n,this.space=r},I.prototype.initFromNode=function(e,t,n,r){y.prototype.initFromNode.call(this,e,t,n,r),b.prototype.initFromNode.call(this,e,t,n,r)},R.prototype.createDefaultRegion=function(){var e=new R;return m.call(e,""),v.call(e,{}),_.call(e,[]),b.call(e,0,Number.POSITIVE_INFINITY,null),e},R.prototype.initFromNode=function(e,t,n){m.prototype.initFromNode.call(this,e,null,t,n),v.prototype.initFromNode.call(this,e,null,t,n),b.prototype.initFromNode.call(this,e,null,t,n),_.prototype.initFromNode.call(this,e,null,t,n),null!==e.head&&null!==e.head.styling&&x(e.head.styling,D(t),this.styleAttrs,n)},O.prototype.initFromNode=function(e,t,n,r){b.prototype.initFromNode.call(this,e,t,n,r);var i=M(n,r);for(var a in this.qname=null,this.value=null,i){if(this.qname){B(r,"More than one style specified on set");break}this.qname=a,this.value=i[a]}}}(t,"undefined"==typeof sax?n(218):sax,"undefined"==typeof imscNames?n(56):imscNames,"undefined"==typeof imscStyles?n(72):imscStyles,"undefined"==typeof imscUtils?n(57):imscUtils)},function(e,t,n){(function(e){!function(t){t.parser=function(e,t){return new a(e,t)},t.SAXParser=a,t.SAXStream=s,t.createStream=function(e,t){return new s(e,t)},t.MAX_BUFFER_LENGTH=65536;var r,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function a(e,n){if(!(this instanceof a))return new a(e,n);var r=this;!function(e){for(var t=0,n=i.length;t<n;t++)e[i[t]]=""}(r),r.q=r.c="",r.bufferCheckPosition=t.MAX_BUFFER_LENGTH,r.opt=n||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!e,r.noscript=!(!e&&!r.opt.noscript),r.state=w.BEGIN,r.strictEntities=r.opt.strictEntities,r.ENTITIES=r.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=Object.create(g)),r.trackPosition=!1!==r.opt.position,r.trackPosition&&(r.position=r.line=r.column=0),R(r,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),a.prototype={end:function(){N(this)},write:function(e){var n=this;if(this.error)throw this.error;if(n.closed)return M(n,"Cannot write after close. Assign an onready handler.");if(null===e)return N(n);"object"==typeof e&&(e=e.toString());var r=0,a="";for(;a=G(e,r++),n.c=a,a;)switch(n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++),n.state){case w.BEGIN:if(n.state=w.BEGIN_WHITESPACE,"\ufeff"===a)continue;H(n,a);continue;case w.BEGIN_WHITESPACE:H(n,a);continue;case w.TEXT:if(n.sawRoot&&!n.closedRoot){for(var o=r-1;a&&"<"!==a&&"&"!==a;)(a=G(e,r++))&&n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++);n.textNode+=e.substring(o,r-1)}"<"!==a||n.sawRoot&&n.closedRoot&&!n.strict?(!E(u,a)||n.sawRoot&&!n.closedRoot||L(n,"Text data outside of root node."),"&"===a?n.state=w.TEXT_ENTITY:n.textNode+=a):(n.state=w.OPEN_WAKA,n.startTagPosition=n.position);continue;case w.SCRIPT:"<"===a?n.state=w.SCRIPT_ENDING:n.script+=a;continue;case w.SCRIPT_ENDING:"/"===a?n.state=w.CLOSE_TAG:(n.script+="<"+a,n.state=w.SCRIPT);continue;case w.OPEN_WAKA:if("!"===a)n.state=w.SGML_DECL,n.sgmlDecl="";else if(b(u,a));else if(b(m,a))n.state=w.OPEN_TAG,n.tagName=a;else if("/"===a)n.state=w.CLOSE_TAG,n.tagName="";else if("?"===a)n.state=w.PROC_INST,n.procInstName=n.procInstBody="";else{if(L(n,"Unencoded <"),n.startTagPosition+1<n.position){var s=n.position-n.startTagPosition;a=new Array(s).join(" ")+a}n.textNode+="<"+a,n.state=w.TEXT}continue;case w.SGML_DECL:"[CDATA["===(n.sgmlDecl+a).toUpperCase()?(O(n,"onopencdata"),n.state=w.CDATA,n.sgmlDecl="",n.cdata=""):n.sgmlDecl+a==="--"?(n.state=w.COMMENT,n.comment="",n.sgmlDecl=""):"DOCTYPE"===(n.sgmlDecl+a).toUpperCase()?(n.state=w.DOCTYPE,(n.doctype||n.sawRoot)&&L(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===a?(O(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=w.TEXT):b(d,a)?(n.state=w.SGML_DECL_QUOTED,n.sgmlDecl+=a):n.sgmlDecl+=a;continue;case w.SGML_DECL_QUOTED:a===n.q&&(n.state=w.SGML_DECL,n.q=""),n.sgmlDecl+=a;continue;case w.DOCTYPE:">"===a?(n.state=w.TEXT,O(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=a,"["===a?n.state=w.DOCTYPE_DTD:b(d,a)&&(n.state=w.DOCTYPE_QUOTED,n.q=a));continue;case w.DOCTYPE_QUOTED:n.doctype+=a,a===n.q&&(n.q="",n.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:n.doctype+=a,"]"===a?n.state=w.DOCTYPE:b(d,a)&&(n.state=w.DOCTYPE_DTD_QUOTED,n.q=a);continue;case w.DOCTYPE_DTD_QUOTED:n.doctype+=a,a===n.q&&(n.state=w.DOCTYPE_DTD,n.q="");continue;case w.COMMENT:"-"===a?n.state=w.COMMENT_ENDING:n.comment+=a;continue;case w.COMMENT_ENDING:"-"===a?(n.state=w.COMMENT_ENDED,n.comment=D(n.opt,n.comment),n.comment&&O(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+a,n.state=w.COMMENT);continue;case w.COMMENT_ENDED:">"!==a?(L(n,"Malformed comment"),n.comment+="--"+a,n.state=w.COMMENT):n.state=w.TEXT;continue;case w.CDATA:"]"===a?n.state=w.CDATA_ENDING:n.cdata+=a;continue;case w.CDATA_ENDING:"]"===a?n.state=w.CDATA_ENDING_2:(n.cdata+="]"+a,n.state=w.CDATA);continue;case w.CDATA_ENDING_2:">"===a?(n.cdata&&O(n,"oncdata",n.cdata),O(n,"onclosecdata"),n.cdata="",n.state=w.TEXT):"]"===a?n.cdata+="]":(n.cdata+="]]"+a,n.state=w.CDATA);continue;case w.PROC_INST:"?"===a?n.state=w.PROC_INST_ENDING:b(u,a)?n.state=w.PROC_INST_BODY:n.procInstName+=a;continue;case w.PROC_INST_BODY:if(!n.procInstBody&&b(u,a))continue;"?"===a?n.state=w.PROC_INST_ENDING:n.procInstBody+=a;continue;case w.PROC_INST_ENDING:">"===a?(O(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=w.TEXT):(n.procInstBody+="?"+a,n.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:b(y,a)?n.tagName+=a:(k(n),">"===a?U(n):"/"===a?n.state=w.OPEN_TAG_SLASH:(E(u,a)&&L(n,"Invalid character in tag name"),n.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:">"===a?(U(n,!0),B(n)):(L(n,"Forward-slash in opening tag not followed by >"),n.state=w.ATTRIB);continue;case w.ATTRIB:if(b(u,a))continue;">"===a?U(n):"/"===a?n.state=w.OPEN_TAG_SLASH:b(m,a)?(n.attribName=a,n.attribValue="",n.state=w.ATTRIB_NAME):L(n,"Invalid attribute name");continue;case w.ATTRIB_NAME:"="===a?n.state=w.ATTRIB_VALUE:">"===a?(L(n,"Attribute without value"),n.attribValue=n.attribName,F(n),U(n)):b(u,a)?n.state=w.ATTRIB_NAME_SAW_WHITE:b(y,a)?n.attribName+=a:L(n,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if("="===a)n.state=w.ATTRIB_VALUE;else{if(b(u,a))continue;L(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",O(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===a?U(n):b(m,a)?(n.attribName=a,n.state=w.ATTRIB_NAME):(L(n,"Invalid attribute name"),n.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(b(u,a))continue;b(d,a)?(n.q=a,n.state=w.ATTRIB_VALUE_QUOTED):(L(n,"Unquoted attribute value"),n.state=w.ATTRIB_VALUE_UNQUOTED,n.attribValue=a);continue;case w.ATTRIB_VALUE_QUOTED:if(a!==n.q){"&"===a?n.state=w.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=a;continue}F(n),n.q="",n.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:b(u,a)?n.state=w.ATTRIB:">"===a?U(n):"/"===a?n.state=w.OPEN_TAG_SLASH:b(m,a)?(L(n,"No whitespace between attributes"),n.attribName=a,n.attribValue="",n.state=w.ATTRIB_NAME):L(n,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(E(f,a)){"&"===a?n.state=w.ATTRIB_VALUE_ENTITY_U:n.attribValue+=a;continue}F(n),">"===a?U(n):n.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(n.tagName)">"===a?B(n):b(y,a)?n.tagName+=a:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=w.SCRIPT):(E(u,a)&&L(n,"Invalid tagname in closing tag"),n.state=w.CLOSE_TAG_SAW_WHITE);else{if(b(u,a))continue;E(m,a)?n.script?(n.script+="</"+a,n.state=w.SCRIPT):L(n,"Invalid tagname in closing tag."):n.tagName=a}continue;case w.CLOSE_TAG_SAW_WHITE:if(b(u,a))continue;">"===a?B(n):L(n,"Invalid characters in closing tag");continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var l,c;switch(n.state){case w.TEXT_ENTITY:l=w.TEXT,c="textNode";break;case w.ATTRIB_VALUE_ENTITY_Q:l=w.ATTRIB_VALUE_QUOTED,c="attribValue";break;case w.ATTRIB_VALUE_ENTITY_U:l=w.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===a?(n[c]+=j(n),n.entity="",n.state=l):b(n.entity.length?_:v,a)?n.entity+=a:(L(n,"Invalid character in entity name"),n[c]+="&"+n.entity+a,n.entity="",n.state=l);continue;default:throw new Error(n,"Unknown state: "+n.state)}n.position>=n.bufferCheckPosition&&function(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),r=0,a=0,o=i.length;a<o;a++){var s=e[i[a]].length;if(s>n)switch(i[a]){case"textNode":P(e);break;case"cdata":O(e,"oncdata",e.cdata),e.cdata="";break;case"script":O(e,"onscript",e.script),e.script="";break;default:M(e,"Max buffer length exceeded: "+i[a])}r=Math.max(r,s)}var u=t.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=u+e.position}(n);return n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;P(e=this),""!==e.cdata&&(O(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(O(e,"onscript",e.script),e.script="")}};try{r=n(219).Stream}catch(e){r=function(){}}var o=t.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function s(e,t){if(!(this instanceof s))return new s(e,t);r.apply(this),this._parser=new a(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,o.forEach((function(e){Object.defineProperty(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})}))}s.prototype=Object.create(r.prototype,{constructor:{value:s}}),s.prototype.write=function(t){if("function"==typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)){if(!this._decoder){var r=n(76).StringDecoder;this._decoder=new r("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},s.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},s.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===o.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),r.prototype.on.call(n,e,t)};var u="\r\n\t ",l="0124356789",c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",d="'\"",f=u+">",h="http://www.w3.org/XML/1998/namespace",p="http://www.w3.org/2000/xmlns/",g={xml:h,xmlns:p};u=T(u),l=T(l),c=T(c);var m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,v=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,_=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;function T(e){return e.split("").reduce((function(e,t){return e[t]=!0,e}),{})}function b(e,t){return function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}(e)?!!t.match(e):e[t]}function E(e,t){return!b(e,t)}d=T(d),f=T(f);var S,A,C,w=0;for(var I in t.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r})),t.STATE)t.STATE[t.STATE[I]]=I;function R(e,t,n){e[t]&&e[t](n)}function O(e,t,n){e.textNode&&P(e),R(e,t,n)}function P(e){e.textNode=D(e.opt,e.textNode),e.textNode&&R(e,"ontext",e.textNode),e.textNode=""}function D(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function M(e,t){return P(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,R(e,"onerror",t),e}function N(e){return e.sawRoot&&!e.closedRoot&&L(e,"Unclosed root tag"),e.state!==w.BEGIN&&e.state!==w.BEGIN_WHITESPACE&&e.state!==w.TEXT&&M(e,"Unexpected end"),P(e),e.c="",e.closed=!0,R(e,"onend"),a.call(e,e.strict,e.opt),e}function L(e,t){if("object"!=typeof e||!(e instanceof a))throw new Error("bad call to strictFail");e.strict&&M(e,t)}function k(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,O(e,"onopentagstart",n)}function x(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}function F(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=x(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==h)L(e,"xml: prefix must be bound to "+h+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==p)L(e,"xmlns: prefix must be bound to "+p+"\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,O(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function U(e,t){if(e.opt.xmlns){var n=e.tag,r=x(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(L(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(t){O(e,"onopennamespace",{prefix:t,uri:n.ns[t]})}));for(var a=0,o=e.attribList.length;a<o;a++){var s=e.attribList[a],u=s[0],l=s[1],c=x(u,!0),d=c.prefix,f=c.local,h=""===d?"":n.ns[d]||"",p={name:u,value:l,prefix:d,local:f,uri:h};d&&"xmlns"!==d&&!h&&(L(e,"Unbound namespace prefix: "+JSON.stringify(d)),p.uri=d),e.tag.attributes[u]=p,O(e,"onattribute",p)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),O(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=w.TEXT:e.state=w.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function B(e){if(!e.tagName)return L(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=w.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=w.SCRIPT);O(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--;){if(e.tags[t].name===r)break;L(e,"Unexpected close tag")}if(t<0)return L(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=w.TEXT);e.tagName=n;for(var i=e.tags.length;i-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,O(e,"onclosetag",e.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var u=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==u.ns&&Object.keys(a.ns).forEach((function(t){var n=a.ns[t];O(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=w.TEXT}function j(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(t=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),i.toLowerCase()!==n?(L(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function H(e,t){"<"===t?(e.state=w.OPEN_WAKA,e.startTagPosition=e.position):E(u,t)&&(L(e,"Non-whitespace before first tag."),e.textNode=t,e.state=w.TEXT)}function G(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}w=t.STATE,String.fromCodePoint||(S=String.fromCharCode,A=Math.floor,C=function(){var e,t,n=16384,r=[],i=-1,a=arguments.length;if(!a)return"";for(var o="";++i<a;){var s=Number(arguments[i]);if(!isFinite(s)||s<0||s>1114111||A(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,r.push(e,t)),(i+1===a||r.length>n)&&(o+=S.apply(null,r),r.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:C,configurable:!0,writable:!0}):String.fromCodePoint=C)}(t)}).call(this,n(29).Buffer)},function(e,t,n){e.exports=i;var r=n(58).EventEmitter;function i(){r.call(this)}n(32)(i,r),i.Readable=n(73),i.Writable=n(226),i.Duplex=n(227),i.Transform=n(228),i.PassThrough=n(229),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t){},function(e,t,n){"use strict";var r=n(74).Buffer,i=n(222);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i,a=r.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,n=a,i=s,t.copy(n,i),s+=o.data.length,o=o.next;return a},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")&&console.trace(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(18))},function(e,t,n){var r=n(29),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";e.exports=a;var r=n(118),i=Object.create(n(41));function a(e){if(!(this instanceof a))return new a(e);r.call(this,e)}i.inherits=n(32),i.inherits(a,r),a.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(75)},function(e,t,n){e.exports=n(27)},function(e,t,n){e.exports=n(73).Transform},function(e,t,n){e.exports=n(73).PassThrough},function(e,t,n){!function(e,t,n){function r(e,t,s){var l;if("region"===s.kind)(l=document.createElement("div")).style.position="absolute";else if("body"===s.kind)l=document.createElement("div");else if("div"===s.kind)l=document.createElement("div");else if("image"===s.kind){if(l=document.createElement("img"),null!==e.imgResolver&&null!==s.src){var c=e.imgResolver(s.src,l);c&&(l.src=c),l.height=e.regionH,l.width=e.regionW}}else if("p"===s.kind)l=document.createElement("p");else if("span"===s.kind){if("container"===s.styleAttrs[n.byName.ruby.qname])l=document.createElement("ruby"),e.ruby=!0;else if("base"===s.styleAttrs[n.byName.ruby.qname])l=document.createElement("rb");else if("text"===s.styleAttrs[n.byName.ruby.qname])l=document.createElement("rt");else if("baseContainer"===s.styleAttrs[n.byName.ruby.qname])l=document.createElement("rbc");else if("textContainer"===s.styleAttrs[n.byName.ruby.qname])l=document.createElement("rtc");else{if("delimiter"===s.styleAttrs[n.byName.ruby.qname])return;l=document.createElement("span")}var d=s.styleAttrs[n.byName.textEmphasis.qname];d&&"none"!==d.style&&(e.textEmphasis=!0)}else"br"===s.kind&&(l=document.createElement("br"));if(l){for(var f in t.appendChild(l),l.style.margin="0",u){var h=u[f],p=s.styleAttrs[h.qname];void 0!==p&&null!==h.map&&h.map(e,l,s,p)}var g=l;if("region"===s.kind){var m=s.styleAttrs[n.byName.writingMode.qname];"lrtb"===m||"lr"===m?(e.ipd="lr",e.bpd="tb"):"rltb"===m||"rl"===m?(e.ipd="rl",e.bpd="tb"):"tblr"===m?(e.ipd="tb",e.bpd="lr"):"tbrl"!==m&&"tb"!==m||(e.ipd="tb",e.bpd="rl")}var y=s.styleAttrs[n.byName.linePadding.qname];if(y&&!y.isZero()){var v=y.toUsedLength(e.w,e.h);if(v>0){var _=Math.ceil(v)+"px";"tb"===e.bpd?(g.style.paddingLeft=_,g.style.paddingRight=_):(g.style.paddingTop=_,g.style.paddingBottom=_),e.lp=y}}var T=s.styleAttrs[n.byName.multiRowAlign.qname];if(T&&"auto"!==T){var b=document.createElement("span");b.style.display="inline-block",b.style.textAlign=T,l.appendChild(b),g=b,e.mra=T}var E=s.styleAttrs[n.byName.rubyReserve.qname];if(E&&"none"!==E[0]&&(e.rubyReserve=E),s.styleAttrs[n.byName.fillLineGap.qname]&&(e.flg=!0),"span"===s.kind&&s.text)if(n.byName.textCombine.qname in s.styleAttrs&&"all"===s.styleAttrs[n.byName.textCombine.qname][0])l.textContent=s.text;else for(var S="",A=0;A<s.text.length;A++){S+=s.text.charAt(A);var C=s.text.charCodeAt(A);if(C<55296||C>56319||A===s.text.length){var w=document.createElement("span");w.textContent=S,l.appendChild(w),S=""}}for(var I in s.contents)r(e,g,s.contents[I]);var R=[];if((e.lp||e.mra||e.flg||e.ruby||e.textEmphasis||e.rubyReserve)&&"p"===s.kind&&(o(e,g,R,null),e.rubyReserve&&(!function(e,t){for(var n=0;n<e.length;n++){var r,i,a=document.createElement("ruby"),o=document.createElement("rb");o.textContent="",a.appendChild(o);var s=t.rubyReserve[1].toUsedLength(t.w,t.h)+"px";"both"===t.rubyReserve[0]?((r=document.createElement("rtc")).style.rubyPosition="under",r.textContent="",r.style.fontSize=s,(i=document.createElement("rtc")).style.rubyPosition="over",i.textContent="",i.style.fontSize=s,a.appendChild(r),a.appendChild(i)):((r=document.createElement("rtc")).textContent="",r.style.fontSize=s,"after"===t.rubyReserve[0]||"outside"===t.rubyReserve[0]&&n>0?r.style.rubyPosition="tb"===t.bpd||"rl"===t.bpd?"under":"over":r.style.rubyPosition="tb"===t.bpd||"rl"===t.bpd?"over":"under",a.appendChild(r));e[n].elements[0].node.parentElement.insertBefore(a,e[n].elements[0].node)}}(R,e),e.rubyReserve=null),(e.ruby||e.rubyReserve)&&(!function(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<e[n].rbc.length;r++){var i;if(!e[n].rbc[r].style.rubyPosition)i="tb"===t.bpd||"rl"===t.bpd?0===n?"over":"under":0===n?"under":"over",e[n].rbc[r].style.rubyPosition=i}}(R,e),e.ruby=null),e.textEmphasis&&(!function(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<e[n].te.length;r++){var i;if(!e[n].te[r].style.textEmphasisPosition||"none"===e[n].te[r].style.textEmphasisPosition)i="tb"===t.bpd?0===n?"left over":"left under":"rl"===t.bpd?0===n?"right under":"left under":0===n?"left under":"right under",e[n].te[r].style.textEmphasisPosition=i}}(R,e),e.textEmphasis=null),e.mra&&(!function(e){for(var t=0;t<e.length-1;t++){var n=e[t].elements.length;if(0!==n&&!1===e[t].br){var r=document.createElement("br"),i=e[t].elements[n-1].node;i.parentElement.insertBefore(r,i.nextSibling)}}}(R),e.mra=null),e.lp&&(!function(e,t,n){for(var r in e){var i=e[r].elements.length,a=e[r].elements[e[r].start_elem],o=e[r].elements[e[r].end_elem],s=Math.ceil(t)+"px",u="-"+Math.ceil(t)+"px";0!==i&&("lr"===n.ipd?(a.node.style.borderLeftColor=a.bgcolor||"#00000000",a.node.style.borderLeftStyle="solid",a.node.style.borderLeftWidth=s,a.node.style.marginLeft=u):"rl"===n.ipd?(a.node.style.borderRightColor=a.bgcolor||"#00000000",a.node.style.borderRightStyle="solid",a.node.style.borderRightWidth=s,a.node.style.marginRight=u):"tb"===n.ipd&&(a.node.style.borderTopColor=a.bgcolor||"#00000000",a.node.style.borderTopStyle="solid",a.node.style.borderTopWidth=s,a.node.style.marginTop=u),"lr"===n.ipd?(o.node.style.borderRightColor=o.bgcolor||"#00000000",o.node.style.borderRightStyle="solid",o.node.style.borderRightWidth=s,o.node.style.marginRight=u):"rl"===n.ipd?(o.node.style.borderLeftColor=o.bgcolor||"#00000000",o.node.style.borderLeftStyle="solid",o.node.style.borderLeftWidth=s,o.node.style.marginLeft=u):"tb"===n.ipd&&(o.node.style.borderBottomColor=o.bgcolor||"#00000000",o.node.style.borderBottomStyle="solid",o.node.style.borderBottomWidth=s,o.node.style.marginBottom=u))}}(R,e.lp.toUsedLength(e.w,e.h),e),e.lp=null),e.flg)){var O=a(g.getBoundingClientRect(),e);!function(e,t,n,r){for(var i=Math.sign(n-t),a=0;a<=e.length;a++){var o,s,u;if(o=0===a?t:a===e.length?n:(e[a].before+e[a-1].after)/2,a>0)for(var l=0;l<e[a-1].elements.length;l++)null!==e[a-1].elements[l].bgcolor&&i*((u=e[a-1].elements[l]).after-o)<0&&(s=Math.ceil(Math.abs(o-u.after))+"px",u.node.style.backgroundColor=u.bgcolor,"lr"===r.bpd?u.node.style.paddingRight=s:"rl"===r.bpd?u.node.style.paddingLeft=s:"tb"===r.bpd&&(u.node.style.paddingBottom=s));if(a<e.length)for(var c=0;c<e[a].elements.length;c++)null!==(u=e[a].elements[c]).bgcolor&&i*(u.before-o)>0&&(s=Math.ceil(Math.abs(u.before-o))+"px",u.node.style.backgroundColor=u.bgcolor,"lr"===r.bpd?u.node.style.paddingLeft=s:"rl"===r.bpd?u.node.style.paddingRight=s:"tb"===r.bpd&&(u.node.style.paddingTop=s))}}(R,O.before,O.after,e),e.flg=null}if("region"===s.kind&&(o(e,g,R),"tb"===e.bpd&&e.enableRollUp&&s.contents.length>0&&"after"===s.styleAttrs[n.byName.displayAlign.qname])){var P=new i(""===s.id?"_":s.id,R);if(e.currentISDState[P.id]=P,e.previousISDState&&P.id in e.previousISDState&&e.previousISDState[P.id].plist.length>0&&P.plist.length>1&&P.plist[P.plist.length-2].text===e.previousISDState[P.id].plist[e.previousISDState[P.id].plist.length-1].text){var D=l.firstElementChild,M=P.plist[P.plist.length-1].after-P.plist[P.plist.length-1].before;D.style.bottom="-"+M+"px",D.style.transition="transform 0.4s",D.style.position="relative",D.style.transform="translateY(-"+M+"px)"}}}else!function(e,t){if(e&&e.error&&e.error(t))throw t}(e.errorHandler,"Error processing ISD element kind: "+s.kind)}function i(e,t){this.id=e,this.plist=t}function a(e,t){var n={before:null,after:null,start:null,end:null};return"tb"===t.bpd?(n.before=e.top,n.after=e.bottom,"lr"===t.ipd?(n.start=e.left,n.end=e.right):(n.start=e.right,n.end=e.left)):"lr"===t.bpd?(n.before=e.left,n.after=e.right,n.start=e.top,n.end=e.bottom):"rl"===t.bpd&&(n.before=e.right,n.after=e.left,n.start=e.top,n.end=e.bottom),n}function o(e,t,n,r){if("rt"!==t.localName&&"rtc"!==t.localName){var i,s,u,l,c=t.style.backgroundColor||r;if(0===t.childElementCount)if("span"===t.localName||"rb"===t.localName){var d=t.getBoundingClientRect();if(0===d.height||0===d.width)return;var f=a(d,e);if(0!==n.length&&(i=f.before,s=f.after,u=n[n.length-1].before,l=n[n.length-1].after,s<l&&i>u||l<=s&&u>=i)){var h=Math.sign(f.after-f.before),p=Math.sign(f.end-f.start);h*(f.before-n[n.length-1].before)<0&&(n[n.length-1].before=f.before),h*(f.after-n[n.length-1].after)>0&&(n[n.length-1].after=f.after),p*(f.start-n[n.length-1].start)<0&&(n[n.length-1].start=f.start,n[n.length-1].start_elem=n[n.length-1].elements.length),p*(f.end-n[n.length-1].end)>0&&(n[n.length-1].end=f.end,n[n.length-1].end_elem=n[n.length-1].elements.length)}else n.push({before:f.before,after:f.after,start:f.start,end:f.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});n[n.length-1].text+=t.textContent,n[n.length-1].elements.push({node:t,bgcolor:c,before:f.before,after:f.after})}else"br"===t.localName&&0!==n.length&&(n[n.length-1].br=!0);else for(var g=t.firstChild;g;)g.nodeType===Node.ELEMENT_NODE&&(o(e,g,n,c),"ruby"===g.localName||"rtc"===g.localName?n.length>0&&n[n.length-1].rbc.push(g):"span"===g.localName&&g.style.textEmphasisStyle&&"none"!==g.style.textEmphasisStyle&&n.length>0&&n[n.length-1].te.push(g)),g=g.nextSibling}}function s(e,t){this.qname=e,this.map=t}e.render=function(e,t,n,i,a,o,s,u,l){var c=i||t.clientHeight,d=a||t.clientWidth;if(null!==e.aspectRatio){var f=c*e.aspectRatio;f>d?c=Math.round(d/e.aspectRatio):d=f}var h=document.createElement("div");h.style.position="relative",h.style.width=d+"px",h.style.height=c+"px",h.style.margin="auto",h.style.top=0,h.style.bottom=0,h.style.left=0,h.style.right=0,h.style.zIndex=0;var p={h:c,w:d,regionH:null,regionW:null,imgResolver:n,displayForcedOnlyMode:o||!1,isd:e,errorHandler:s,previousISDState:u,enableRollUp:l||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};for(var g in t.appendChild(h),e.contents)r(p,h,e.contents[g]);return p.currentISDState};var u=[new s("http://www.w3.org/ns/ttml#styling backgroundColor",(function(e,t,n,r){0!==r[3]&&(t.style.backgroundColor="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")")})),new s("http://www.w3.org/ns/ttml#styling color",(function(e,t,n,r){t.style.color="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")"})),new s("http://www.w3.org/ns/ttml#styling direction",(function(e,t,n,r){t.style.direction=r})),new s("http://www.w3.org/ns/ttml#styling display",(function(e,t,n,r){})),new s("http://www.w3.org/ns/ttml#styling displayAlign",(function(e,t,n,r){t.style.display="flex",t.style.flexDirection="column","before"===r?t.style.justifyContent="flex-start":"center"===r?t.style.justifyContent="center":"after"===r&&(t.style.justifyContent="flex-end")})),new s("http://www.w3.org/ns/ttml#styling extent",(function(e,t,n,r){e.regionH=r.h.toUsedLength(e.w,e.h),e.regionW=r.w.toUsedLength(e.w,e.h);var i=0,a=0,o=n.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];o&&(i=o[0].toUsedLength(e.w,e.h)+o[2].toUsedLength(e.w,e.h),a=o[1].toUsedLength(e.w,e.h)+o[3].toUsedLength(e.w,e.h)),t.style.height=e.regionH-i+"px",t.style.width=e.regionW-a+"px"})),new s("http://www.w3.org/ns/ttml#styling fontFamily",(function(e,t,n,r){var i=[];for(var a in r)"monospaceSerif"===r[a]?(i.push("Courier New"),i.push('"Liberation Mono"'),i.push("Courier"),i.push("monospace")):"proportionalSansSerif"===r[a]?(i.push("Arial"),i.push("Helvetica"),i.push('"Liberation Sans"'),i.push("sans-serif")):"monospace"===r[a]?i.push("monospace"):"sansSerif"===r[a]?i.push("sans-serif"):"serif"===r[a]?i.push("serif"):"monospaceSansSerif"===r[a]?(i.push("Consolas"),i.push("monospace")):"proportionalSerif"===r[a]?i.push("serif"):i.push(r[a]);t.style.fontFamily=i.join(",")})),new s("http://www.w3.org/ns/ttml#styling shear",(function(e,t,n,r){if(0!==r){var i=-.9*r;"tb"===e.bpd?t.style.transform="skewX("+i+"deg)":t.style.transform="skewY("+i+"deg)"}})),new s("http://www.w3.org/ns/ttml#styling fontSize",(function(e,t,n,r){t.style.fontSize=r.toUsedLength(e.w,e.h)+"px"})),new s("http://www.w3.org/ns/ttml#styling fontStyle",(function(e,t,n,r){t.style.fontStyle=r})),new s("http://www.w3.org/ns/ttml#styling fontWeight",(function(e,t,n,r){t.style.fontWeight=r})),new s("http://www.w3.org/ns/ttml#styling lineHeight",(function(e,t,n,r){t.style.lineHeight="normal"===r?"normal":r.toUsedLength(e.w,e.h)+"px"})),new s("http://www.w3.org/ns/ttml#styling opacity",(function(e,t,n,r){t.style.opacity=r})),new s("http://www.w3.org/ns/ttml#styling origin",(function(e,t,n,r){t.style.top=r.h.toUsedLength(e.w,e.h)+"px",t.style.left=r.w.toUsedLength(e.w,e.h)+"px"})),new s("http://www.w3.org/ns/ttml#styling overflow",(function(e,t,n,r){t.style.overflow=r})),new s("http://www.w3.org/ns/ttml#styling padding",(function(e,t,n,r){var i=[];i[0]=r[0].toUsedLength(e.w,e.h)+"px",i[1]=r[3].toUsedLength(e.w,e.h)+"px",i[2]=r[2].toUsedLength(e.w,e.h)+"px",i[3]=r[1].toUsedLength(e.w,e.h)+"px",t.style.padding=i.join(" ")})),new s("http://www.w3.org/ns/ttml#styling position",(function(e,t,n,r){t.style.top=r.h.toUsedLength(e.w,e.h)+"px",t.style.left=r.w.toUsedLength(e.w,e.h)+"px"})),new s("http://www.w3.org/ns/ttml#styling rubyAlign",(function(e,t,n,r){t.style.rubyAlign=r})),new s("http://www.w3.org/ns/ttml#styling rubyPosition",(function(e,t,n,r){var i;"before"!==r&&"after"!==r||(i="tb"===e.bpd||"rl"===e.bpd?"before"===r?"over":"under":"before"===r?"under":"over",t.parentElement.style.rubyPosition=i)})),new s("http://www.w3.org/ns/ttml#styling showBackground",null),new s("http://www.w3.org/ns/ttml#styling textAlign",(function(e,t,r,i){var a,o=r.styleAttrs[n.byName.direction.qname];a="start"===i?"rtl"===o?"right":"left":"end"===i?"rtl"===o?"left":"right":i,t.style.textAlign=a})),new s("http://www.w3.org/ns/ttml#styling textDecoration",(function(e,t,n,r){t.style.textDecoration=r.join(" ").replace("lineThrough","line-through")})),new s("http://www.w3.org/ns/ttml#styling textOutline",(function(e,t,n,r){})),new s("http://www.w3.org/ns/ttml#styling textShadow",(function(e,t,r,i){var a=r.styleAttrs[n.byName.textOutline.qname];if("none"===i&&"none"===a)t.style.textShadow="";else{var o=[];if("none"!==a&&o.push("rgba("+a.color[0].toString()+","+a.color[1].toString()+","+a.color[2].toString()+","+(a.color[3]/255).toString()+") 0px 0px "+a.thickness.toUsedLength(e.w,e.h)+"px"),"none"!==i)for(var s in i)o.push(i[s].x_off.toUsedLength(e.w,e.h)+"px "+i[s].y_off.toUsedLength(e.w,e.h)+"px "+i[s].b_radius.toUsedLength(e.w,e.h)+"px rgba("+i[s].color[0].toString()+","+i[s].color[1].toString()+","+i[s].color[2].toString()+","+(i[s].color[3]/255).toString()+")");t.style.textShadow=o.join(",")}})),new s("http://www.w3.org/ns/ttml#styling textCombine",(function(e,t,n,r){t.style.textCombineUpright=r.join(" ")})),new s("http://www.w3.org/ns/ttml#styling textEmphasis",(function(e,t,n,r){var i;"none"!==r.style?("auto"===r.style?t.style.textEmphasisStyle="filled":t.style.textEmphasisStyle=r.style+" "+r.symbol,("before"===r.position||"after"===r.position)&&(i="tb"===e.bpd?"before"===r.position?"left over":"left under":"rl"===e.bpd?"before"===r.position?"right under":"left under":"before"===r.position?"left under":"right under",t.style.textEmphasisPosition=i)):t.style.textEmphasisStyle="none"})),new s("http://www.w3.org/ns/ttml#styling unicodeBidi",(function(e,t,n,r){var i;i="bidiOverride"===r?"bidi-override":r,t.style.unicodeBidi=i})),new s("http://www.w3.org/ns/ttml#styling visibility",(function(e,t,n,r){t.style.visibility=r})),new s("http://www.w3.org/ns/ttml#styling wrapOption",(function(e,t,n,r){"wrap"===r?"preserve"===n.space?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="normal":"preserve"===n.space?t.style.whiteSpace="pre":t.style.whiteSpace="noWrap"})),new s("http://www.w3.org/ns/ttml#styling writingMode",(function(e,t,n,r){"lrtb"===r||"lr"===r||"rltb"===r||"rl"===r?e.writingMode="horizontal-tb":"tblr"===r?e.writingMode="vertical-lr":"tbrl"!==r&&"tb"!==r||(e.writingMode="vertical-rl"),t.style.writingMode=e.writingMode})),new s("http://www.w3.org/ns/ttml#styling zIndex",(function(e,t,n,r){t.style.zIndex=r})),new s("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",(function(e,t,n,r){e.displayForcedOnlyMode&&!1===r&&(t.style.visibility="hidden")}))],l={};for(var c in u)l[u[c].qname]=u[c]}(t,"undefined"==typeof imscNames?n(56):imscNames,"undefined"==typeof imscStyles?n(72):imscStyles,"undefined"==typeof imscUtils?n(57):imscUtils)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(){var e=0;function t(e){for(var t="",n=0;n<e.length;++n){t+=e[n].uchar}return t.length-t.replace(/^\s+/,"").length}function n(e){return"left: "+3.125*e.x+"%; top: "+6.66*e.y1+"%; width: "+(100-3.125*e.x)+"%; height: "+6.66*Math.max(e.y2-1-e.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function r(e){return"red"===e?"rgb(255, 0, 0)":"green"===e?"rgb(0, 255, 0)":"blue"===e?"rgb(0, 0, 255)":"cyan"===e?"rgb(0, 255, 255)":"magenta"===e?"rgb(255, 0, 255)":"yellow"===e?"rgb(255, 255, 0)":"white"===e?"rgb(255, 255, 255)":"black"===e?"rgb(0, 0, 0)":e}function i(e,t){var n=e.videoHeight/15;return t?"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(t.foreground?r(t.foreground):"rgb(255, 255, 255)")+"; font-style: "+(t.italics?"italic":"normal")+"; text-decoration: "+(t.underline?"underline":"none")+"; white-space: pre; background-color: "+(t.background?r(t.background):"transparent")+";":"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function a(e){return e.replace(/^\s+/g,"")}function o(e){return e.replace(/\s+$/g,"")}return{createHTMLCaptionsFromScreen:function(r,s,u,l){var c=null,d=!1,f=-1,h={start:s,end:u,spans:[]},p="style_cea608_white_black",g={},m={},y=[],v=void 0,_=void 0;for(v=0;v<15;++v){var T=l.rows[v],b="",E=null;if(!1===T.isEmpty()){var S=t(T.chars);null===c&&(c={x:S,y1:v,y2:v+1,p:[]}),S!==f&&d&&(c.p.push(h),h={start:s,end:u,spans:[]},c.y2=v,c.name="region_"+c.x+"_"+c.y1+"_"+c.y2,!1===g.hasOwnProperty(c.name)?(y.push(c),g[c.name]=c):g[c.name].p.contat(c.p),c={x:S,y1:v,y2:v+1,p:[]});for(var A=0;A<T.chars.length;++A){var C=T.chars[A],w=C.penState;if(null===E||!w.equals(E)){b.trim().length>0&&(h.spans.push({name:p,line:b,row:v}),b="");var I="style_cea608_"+w.foreground+"_"+w.background;w.underline&&(I+="_underline"),w.italics&&(I+="_italics"),m.hasOwnProperty(I)||(m[I]=JSON.parse(JSON.stringify(w))),E=w,p=I}b+=C.uchar}b.trim().length>0&&h.spans.push({name:p,line:b,row:v}),d=!0,f=S}else d=!1,f=-1,c&&(c.p.push(h),h={start:s,end:u,spans:[]},c.y2=v,c.name="region_"+c.x+"_"+c.y1+"_"+c.y2,!1===g.hasOwnProperty(c.name)?(y.push(c),g[c.name]=c):g[c.name].p.contat(c.p),c=null)}c&&(c.p.push(h),c.y2=v+1,c.name="region_"+c.x+"_"+c.y1+"_"+c.y2,!1===g.hasOwnProperty(c.name)?(y.push(c),g[c.name]=c):g[c.name].p.contat(c.p),c=null);var R=[];for(v=0;v<y.length;++v){var O=y[v],P="sub_cea608_"+e++,D=document.createElement("div");D.id=P;var M=n(O);D.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+M;var N=document.createElement("div");N.className="paragraph bodyStyle",N.style.cssText=i(r);var L=document.createElement("div");L.className="cueUniWrapper",L.style.cssText="unicode-bidi: normal; direction: ltr;";for(var k=0;k<O.p.length;++k){var x=O.p[k],F=0;for(_=0;_<x.spans.length;++_){var U=x.spans[_];if(U.line.length>0){if(0!==_&&F!=U.row){var B=document.createElement("br");B.className="lineBreak",L.appendChild(B)}var j=!1;F===U.row&&(j=!0),F=U.row;var H=m[U.name],G=document.createElement("span");G.className="spanPadding "+U.name+" customSpanColor",G.style.cssText=i(r,H),0!==_&&j?_===x.spans.length-1?G.textContent=o(U.line):G.textContent=U.line:x.spans.length>1&&_<x.spans.length-1&&U.row===x.spans[_+1].row?G.textContent=a(U.line):G.textContent=U.line.trim(),L.appendChild(G)}}}N.appendChild(L),D.appendChild(N);var q={bodyStyle:["%",90]};for(var V in m)m.hasOwnProperty(V)&&(q[V]=["%",90]);R.push({type:"html",start:s,end:u,cueHTMLElement:D,cueID:P,cellResolution:[32,15],isFromCEA608:!0,fontSize:q,lineHeight:{},linePadding:{}})}return R}}}o.__dashjs_factory_name="EmbeddedTextHtmlRender",t.default=a.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(8));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=this.context,t=void 0,n=void 0,r=void 0,a=void 0,o=void 0,s=void 0;function u(e){var t=e.split(":"),n=t.length-1;return e=60*parseInt(t[n-1],10)+parseFloat(t[n]),2===n&&(e+=3600*parseInt(t[0],10)),e}function l(e){var t=e.split(a),n=t[1].split(s);return n.shift(),t[1]=n[0],n.shift(),{cuePoints:t,styles:c(n)}}function c(e){var t={};return e.forEach((function(e){if(e.split(/:/).length>1){var n=e.split(/:/)[1];n&&-1!=n.search(/%/)&&(n=parseInt(n.replace(/%/,""),10)),(e.match(/align/)||e.match(/A/))&&(t.align=n),(e.match(/line/)||e.match(/L/))&&(t.line=n),(e.match(/position/)||e.match(/P/))&&(t.position=n),(e.match(/size/)||e.match(/S/))&&(t.size=n)}})),t}function d(e,t){for(var n,r=t,i="",o="";""!==e[r]&&r<e.length;)r++;if((n=r-t)>1)for(var s=0;s<n;s++){if((o=e[t+s]).match(a)){i="";break}i+=o,s!==n-1&&(i+="\n")}else(o=e[t]).match(a)||(i=o);return i}return t={parse:function(e){var t,i=[],s=void 0;if(!e)return i;t=(e=e.split(r)).length,s=-1;for(var c=0;c<t;c++){var f=e[c];if(f.length>0&&"WEBVTT"!==f&&f.match(a)){var h=l(f),p=h.cuePoints,g=h.styles,m=d(e,c+1),y=u(p[0].replace(o,"")),v=u(p[1].replace(o,""));!isNaN(y)&&!isNaN(v)&&y>=s&&v>y?""!==m?(s=y,i.push({start:y,end:v,data:m,styles:g})):n.error("Skipping cue due to empty/malformed cue text"):n.error("Skipping cue due to incorrect cue timing")}}return i}},n=(0,i.default)(e).getInstance().getLogger(t),r=/(?:\r\n|\r|\n)/gm,a=/-->/,o=/(^[\s]+|[\s]+$)/g,s=/\s\b/g,t}o.__dashjs_factory_name="VTTParser",t.default=r.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(1)),i=c(n(8)),a=c(n(9)),o=c(n(10)),s=n(114),u=c(n(31)),l=c(n(120));function c(e){return e&&e.__esModule?e:{default:e}}function d(){var e=this.context,t=(0,a.default)(e).getInstance(),n=void 0,r=void 0,c=0;return n={parse:function(e,n,i,a,d){var f="",h=[],p=void 0,g=void 0,m=void 0,y={},v={},_="",T="",b={onOpenTag:function(e,n,i){if(i[" imagetype"]&&!i[" imageType"]&&(t.trigger(u.default.CONFORMANCE_VIOLATION,{level:l.default.LEVELS.ERROR,event:l.default.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),i[" imageType"]=i[" imagetype"]),"image"===n&&("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===e||"http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"===e)){if(!i[" imageType"]||"PNG"!==i[" imageType"].value)return void r.warn("smpte-tt imageType != PNG. Discarded");_=i["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){_&&(v[_]=T.trim()),T="",_=""},onText:function(e){_&&(T+=e)}};if(!e)throw f="no ttml data to parse",new Error(f);y.data=e,t.trigger(o.default.TTML_TO_PARSE,y);var E=(0,s.fromXML)(y.data,(function(e){f=e}),b);t.trigger(o.default.TTML_PARSED,{ttmlString:y.data,ttmlDoc:E});var S,A=E.getMediaTimeEvents();for(m=0;m<A.length;m++){var C=(0,s.generateISD)(E,A[m],(function(e){f=e}));C.contents.some((function(e){return e.contents.length}))&&(p=A[m]+n<i?i:A[m]+n)<(g=A[m+1]+n>a?a:A[m+1]+n)&&h.push({start:p,end:g,type:"html",cueID:(S=void 0,S="cue_TTML_"+c,c++,S),isd:C,images:d,embeddedImages:v})}if(""!==f)throw r.error(f),new Error(f);return h}},r=(0,i.default)(e).getInstance().getLogger(n),n}d.__dashjs_factory_name="TTMLParser",t.default=r.default.getSingletonFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(8)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=this.context,n=void 0,i=void 0,a=void 0,o=[],s=e;function u(e,t){o=o.filter((function(n){return!((isNaN(t)||n.start<t)&&(isNaN(e)||n.end>e))}))}return n={getAllBufferRanges:function(){for(var e=[],t=0;t<o.length;t++){var n=o[t];0===e.length||n.start>e[e.length-1].end?e.push({start:n.start,end:n.end}):e[e.length-1].end=n.end}var r={start:function(t){return e[t].start},end:function(t){return e[t].end}};return Object.defineProperty(r,"length",{get:function(){return e.length}}),r},append:function(e){"InitializationSegment"!==e.segmentType?(o.push(e),o.sort((function(e,t){return e.start-t.start})),a=null):a=e,i.debug("PreBufferSink appended chunk s: "+e.start+"; e: "+e.end),s&&s({chunk:e})},remove:u,abort:function(){},discharge:function(e,t){var n=function(e,t){return o.filter((function(n){return(isNaN(t)||n.start<t)&&(isNaN(e)||n.end>e)}))}(e,t);return a&&(n.push(a),a=null),u(e,t),n},reset:function(){o=[],a=null,s=null},updateTimestampOffset:function(){},hasDiscontinuitiesAfter:function(){return!1},waitForUpdateEnd:function(e){e()},getBuffer:function(){return this}},i=(0,r.default)(t).getInstance().getLogger(n),n}o.__dashjs_factory_name="PreBufferSink";var s=i.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(1)),i=u(n(8)),a=u(n(20)),o=u(n(6)),s=u(n(16));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){e=e||{};var t=this.context,n=e.dashMetrics,r=void 0,u=void 0;return r={getMaxIndex:function(e){var r=(0,a.default)(t).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("useBufferOccupancyABR")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("getScheduleController")))return r;!function(){if(!n||!n.hasOwnProperty("getCurrentBufferState"))throw new Error(o.default.MISSING_CONFIG_ERROR)}();var i=e.getMediaInfo(),l=e.getMediaType(),c=n.getCurrentBufferState(l),d=e.getScheduleController(),f=e.getAbrController(),h=e.getStreamInfo(),p=h&&h.manifestInfo?h.manifestInfo.isDynamic:null,g=f.getThroughputHistory(),m=g.getSafeAverageThroughput(l,p),y=g.getAverageLatency(l),v=e.useBufferOccupancyABR();return isNaN(m)||!c||v||f.getAbandonmentStateFor(l)!==s.default.ABANDON_LOAD&&(c.state===s.default.BUFFER_LOADED||p)&&(r.quality=f.getQualityForBitrate(i,m,y),d.setTimeToLoadDelay(0),u.debug("["+l+"] requesting switch to index: ",r.quality,"Average throughput",Math.round(m),"kbps"),r.reason={throughput:m,latency:y}),r},reset:function(){}},u=(0,i.default)(t).getInstance().getLogger(r),r}l.__dashjs_factory_name="ThroughputRule",t.default=r.default.getClassFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(9)),i=c(n(10)),a=c(n(1)),o=c(n(8)),s=c(n(20)),u=c(n(6)),l=c(n(16));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){e=e||{};var t=this.context,n=(0,r.default)(t).getInstance(),a=e.dashMetrics,c=void 0,d=void 0,f=void 0;function h(){(f={})[u.default.VIDEO]={ignoreCount:2},f[u.default.AUDIO]={ignoreCount:2}}function p(){h()}function g(e){isNaN(e.startTime)||e.mediaType!==u.default.AUDIO&&e.mediaType!==u.default.VIDEO||f[e.mediaType].ignoreCount>0&&f[e.mediaType].ignoreCount--}return c={getMaxIndex:function(e){var n=(0,s.default)(t).create();if(!e||!e.hasOwnProperty("getMediaType"))return n;!function(){if(!a||!a.hasOwnProperty("getCurrentBufferLevel")||!a.hasOwnProperty("getCurrentBufferState"))throw new Error(u.default.MISSING_CONFIG_ERROR)}();var r=e.getMediaType(),i=a.getCurrentBufferState(r),o=e.getRepresentationInfo().fragmentDuration;if(function(e){return f[e].ignoreCount>0}(r)||!o)return n;if(i&&i.state===l.default.BUFFER_EMPTY)d.debug("["+r+"] Switch to index 0; buffer is empty."),n.quality=0,n.reason="InsufficientBufferRule: Buffer is empty";else{var c=e.getMediaInfo(),h=e.getAbrController(),p=h.getThroughputHistory(),g=a.getCurrentBufferLevel(r),m=p.getAverageThroughput(r),y=p.getAverageLatency(r),v=m*(g/o)*.5;n.quality=h.getQualityForBitrate(c,v,y),n.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return n},reset:function(){h(),n.off(i.default.PLAYBACK_SEEKING,p,c),n.off(i.default.BYTES_APPENDED_END_FRAGMENT,g,c)}},d=(0,o.default)(t).getInstance().getLogger(c),h(),n.on(i.default.PLAYBACK_SEEKING,p,c),n.on(i.default.BYTES_APPENDED_END_FRAGMENT,g,c),c}d.__dashjs_factory_name="InsufficientBufferRule",t.default=a.default.getClassFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(20)),i=o(n(1)),a=o(n(8));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){e=e||{};var t=this.context,n=e.mediaPlayerModel,i=e.dashMetrics,o=e.settings,u=void 0,l=void 0,c=void 0,d=void 0,f=void 0;function h(){c={},d={},f=[]}return u={shouldAbandon:function(e){var a=(0,r.default)(t).create(r.default.NO_CHANGE,{name:s.__dashjs_factory_name});if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getCurrentRequest")&&e.hasOwnProperty("getRepresentationInfo")&&e.hasOwnProperty("getAbrController")))return a;var u,h,p=e.getMediaInfo(),g=e.getMediaType(),m=e.getCurrentRequest();if(!isNaN(m.index)){u=g,h=m.index,c[u]=c[u]||{},c[u][h]=c[u][h]||{};var y=n.getStableBufferTime();if(i.getCurrentBufferLevel(g)>y)return a;var v=c[g][m.index];if(null===v||null===m.firstByteDate||d.hasOwnProperty(v.id))return a;if(void 0===v.firstByteTime&&(f[g]=[],v.firstByteTime=m.firstByteDate.getTime(),v.segmentDuration=m.duration,v.bytesTotal=m.bytesTotal,v.id=m.index),v.bytesLoaded=m.bytesLoaded,v.elapsedTime=(new Date).getTime()-v.firstByteTime,v.bytesLoaded>0&&v.elapsedTime>0&&function(e,t){f[e]=f[e]||[],f[e].push(t)}(g,Math.round(8*v.bytesLoaded/v.elapsedTime)),f[g].length>=5&&v.elapsedTime>500&&v.bytesLoaded<v.bytesTotal){var _=f[g].reduce((function(e,t){return e+t}),0);if(v.measuredBandwidthInKbps=Math.round(_/f[g].length),v.estimatedTimeOfDownload=+(8*v.bytesTotal/v.measuredBandwidthInKbps/1e3).toFixed(2),v.estimatedTimeOfDownload<1.8*v.segmentDuration||0===e.getRepresentationInfo().quality)return a;if(!d.hasOwnProperty(v.id)){var T=e.getAbrController(),b=v.bytesTotal-v.bytesLoaded,E=T.getBitrateList(p),S=T.getQualityForBitrate(p,v.measuredBandwidthInKbps*o.get().streaming.abr.bandwidthSafetyFactor),A=T.getMinAllowedIndexFor(g),C=void 0!==A?Math.max(A,S):S;b>v.bytesTotal*E[C].bitrate/E[T.getQualityFor(g)].bitrate&&(a.quality=C,a.reason.throughput=v.measuredBandwidthInKbps,a.reason.fragmentID=v.id,d[v.id]=v,l.debug("["+g+"] frag id",v.id," is asking to abandon and switch to quality to ",C," measured bandwidth was",v.measuredBandwidthInKbps),delete c[g][v.id])}}else v.bytesLoaded===v.bytesTotal&&delete c[g][v.id]}return a},reset:h},l=(0,a.default)(t).getInstance().getLogger(u),h(),u}s.__dashjs_factory_name="AbandonRequestsRule",t.default=i.default.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1)),i=o(n(20)),a=o(n(8));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=void 0,n=void 0;return t={getMaxIndex:function(t){var r=(0,i.default)(e).create();if(!t||!t.hasOwnProperty("getDroppedFramesHistory"))return r;var a=t.getDroppedFramesHistory();if(a){for(var o=a.getFrameHistory(),s=0,u=0,l=i.default.NO_CHANGE,c=1;c<o.length;c++)if(o[c]&&(s=o[c].droppedVideoFrames,(u=o[c].totalVideoFrames)>375&&s/u>.15)){l=c-1,n.debug("index: "+l+" Dropped Frames: "+s+" Total Frames: "+u);break}return(0,i.default)(e).create(l,{droppedFrames:s})}return r}},n=(0,a.default)(e).getInstance().getLogger(t),t}s.__dashjs_factory_name="DroppedFramesRule",t.default=r.default.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1)),i=o(n(8)),a=o(n(20));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=void 0,n=void 0;return t={getMaxIndex:function(t){for(var r=t?t.getSwitchHistory():null,i=r?r.getSwitchRequests():[],o=0,s=0,u=0,l=(0,a.default)(e).create(),c=0;c<i.length;c++)if(void 0!==i[c]&&(o+=i[c].drops,s+=i[c].noDrops,u+=i[c].dropSize,o+s>=6&&o/s>.075)){l.quality=c>0&&i[c].drops>0?c-1:c,l.reason={index:l.quality,drops:o,noDrops:s,dropSize:u},n.debug("Switch history rule index: "+l.quality+" samples: "+(o+s)+" drops: "+o);break}return l}},n=(0,i.default)(e).getInstance().getLogger(t),t}s.__dashjs_factory_name="SwitchHistoryRule",t.default=r.default.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(16)),i=c(n(20)),a=c(n(1)),o=n(12),s=c(n(9)),u=c(n(10)),l=c(n(8));function c(e){return e&&e.__esModule?e:{default:e}}var d=10;function f(e){e=e||{};var t=this.context,n=e.dashMetrics,a=e.mediaPlayerModel,c=(0,s.default)(t).getInstance(),f=void 0,h=void 0,p=void 0;function g(e,t,n){var r=n.reduce((function(e,t,r){return t>n[e]?r:e}),0);if(0===r)return null;var i=Math.max(e,d+2*t.length),a=(n[r]-1)/(i/d-1);return{gp:a,Vp:d/a}}function m(e){var t={},n=e.getMediaInfo().bitrateList.map((function(e){return e.bandwidth})),r=function(e){return e.map((function(e){return Math.log(e)}))}(n);r=r.map((function(e){return e-r[0]+1}));var i=a.getStableBufferTime(),o=g(i,n,r);return o?(t.state=1,t.bitrates=n,t.utilities=r,t.stableBufferTime=i,t.Vp=o.Vp,t.gp=o.gp,t.lastQuality=0,y(t)):t.state=0,t}function y(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function v(e,t){var r=a.getStableBufferTime();if(e.stableBufferTime!==r){var i=g(r,e.bitrates,e.utilities);if(i.Vp!==e.Vp||i.gp!==e.gp){var o=n.getCurrentBufferLevel(t),s=o+e.placeholderBuffer;s-=d,s*=i.Vp/e.Vp,s+=d,e.stableBufferTime=r,e.Vp=i.Vp,e.gp=i.gp,e.placeholderBuffer=Math.max(0,s-o)}}}function _(e,t){return e.Vp*(e.utilities[t]+e.gp)}function T(e,t){for(var n=e.bitrates[t],r=e.utilities[t],i=0,a=t-1;a>=0;--a)if(e.utilities[a]<e.utilities[t]){var o=e.bitrates[a],s=e.utilities[a],u=e.Vp*(e.gp+(n*s-o*r)/(n-o));i=Math.max(i,u)}return i}function b(){for(var e in p)p.hasOwnProperty(e)&&2===p[e].state&&(p[e].placeholderBuffer=0)}function E(){for(var e in p)if(p.hasOwnProperty(e)){var t=p[e];0!==t.state&&(t.state=1,y(t))}}function S(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=p[e.chunk.mediaInfo.type];if(t&&0!==t.state){var n=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||n>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,C(t,e.chunk.mediaInfo.type)}}}function A(e){if(e&&e.metric===r.default.HTTP_REQUEST&&e.value&&e.value.type===o.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=p[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),C(t,e.mediaType))}}function C(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){var r=n.getCurrentBufferLevel(t)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),i=_(e,e.lastQuality),a=Math.max(0,i-r);e.placeholderBuffer=Math.min(a,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function w(e){if(e){var t=p[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function I(e){if(e){var t=p[e.mediaType];if(t&&0!==t.state){var r=n.getCurrentBufferLevel(e.mediaType),i=void 0;i=t.abrQuality>0?T(t,t.abrQuality):d;var a=Math.max(0,i-r);t.placeholderBuffer=Math.min(t.placeholderBuffer,a)}}}function R(){p={}}return f={getMaxIndex:function(e){var r=(0,i.default)(t).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useBufferOccupancyABR")))return r;var a=e.getMediaInfo(),o=e.getMediaType(),s=e.getScheduleController(),u=e.getStreamInfo(),l=e.getAbrController(),c=l.getThroughputHistory(),d=u?u.id:null,f=u&&u.manifestInfo&&u.manifestInfo.isDynamic,g=e.useBufferOccupancyABR();if(r.reason=r.reason||{},!g)return r;s.setTimeToLoadDelay(0);var b=function(e){var t=e.getMediaType(),n=p[t];return n?0!==n.state&&v(n,t):(n=m(e),p[t]=n),n}(e);if(0===b.state)return r;var E=n.getCurrentBufferLevel(o),S=c.getAverageThroughput(o,f),A=c.getSafeAverageThroughput(o,f),C=c.getAverageLatency(o),w=void 0;if(r.reason.state=b.state,r.reason.throughput=S,r.reason.latency=C,isNaN(S))return r;switch(b.state){case 1:w=l.getQualityForBitrate(a,A,C),r.quality=w,r.reason.throughput=A,b.placeholderBuffer=Math.max(0,T(b,w)-E),b.lastQuality=w,!isNaN(b.lastSegmentDurationS)&&E>=b.lastSegmentDurationS&&(b.state=2);break;case 2:!function(e,t){var n=Date.now();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){var r=.001*(n-e.lastCallTimeMs);e.placeholderBuffer+=Math.max(0,r)}}else{var i=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,i)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,v(e,t)}(b,o),w=function(e,t){for(var n=e.bitrates.length,r=NaN,i=NaN,a=0;a<n;++a){var o=(e.Vp*(e.utilities[a]+e.gp)-t)/e.bitrates[a];(isNaN(i)||o>=i)&&(i=o,r=a)}return r}(b,E+b.placeholderBuffer);var I=l.getQualityForBitrate(a,A,C);w>b.lastQuality&&w>I&&(w=Math.max(I,b.lastQuality));var R=Math.max(0,E+b.placeholderBuffer-_(b,w));R<=b.placeholderBuffer?(b.placeholderBuffer-=R,R=0):(R-=b.placeholderBuffer,b.placeholderBuffer=0,w<l.getTopQualityIndexFor(o,d)?s.setTimeToLoadDelay(1e3*R):R=0),r.quality=w,r.reason.throughput=S,r.reason.latency=C,r.reason.bufferLevel=E,r.reason.placeholderBuffer=b.placeholderBuffer,r.reason.delay=R,b.lastQuality=w;break;default:h.debug("BOLA ABR rule invoked in bad state."),r.quality=l.getQualityForBitrate(a,A,C),r.reason.state=b.state,r.reason.throughput=A,r.reason.latency=C,b.state=1,y(b)}return r},reset:function(){R(),c.off(u.default.BUFFER_EMPTY,b,f),c.off(u.default.PLAYBACK_SEEKING,E,f),c.off(u.default.MEDIA_FRAGMENT_LOADED,S,f),c.off(u.default.METRIC_ADDED,A,f),c.off(u.default.QUALITY_CHANGE_REQUESTED,w,f),c.off(u.default.FRAGMENT_LOADING_ABANDONED,I,f)}},h=(0,l.default)(t).getInstance().getLogger(f),R(),c.on(u.default.BUFFER_EMPTY,b,f),c.on(u.default.PLAYBACK_SEEKING,E,f),c.on(u.default.MEDIA_FRAGMENT_LOADED,S,f),c.on(u.default.METRIC_ADDED,A,f),c.on(u.default.QUALITY_CHANGE_REQUESTED,w,f),c.on(u.default.FRAGMENT_LOADING_ABANDONED,I,f),f}f.__dashjs_factory_name="BolaRule",t.default=a.default.getClassFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(16)),i=d(n(20)),a=d(n(1)),o=n(12),s=d(n(9)),u=d(n(10)),l=d(n(8)),c=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){e=e||{};var t=this.context,n=e.dashMetrics,a=(0,s.default)(t).getInstance(),d=void 0,f=void 0,h=void 0,p=void 0;function g(e){var t={},n=e.getMediaInfo(),r=n.bitrateList.map((function(e){return e.bandwidth/1e3}));return t.state=1,t.bitrates=r,t.lastQuality=0,function(e){if(!e||!e.type)return;h[e.type]={},h[e.type].w=[],h[e.type].prev_w=[],h[e.type].Q=0,h[e.type].segment_request_start_s=0,h[e.type].segment_download_finish_s=0,h[e.type].B_target=1.5}(n),m(t),t}function m(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function y(){for(var e in f)if(f.hasOwnProperty(e)){var t=f[e];0!==t.state&&(t.state=1,m(t))}}function v(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=f[e.chunk.mediaInfo.type],n=h[e.chunk.mediaInfo.type];if(t&&0!==t.state){var r=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||r>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=r,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=r,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,T(t,n)}}}function _(e){if(e&&e.metric===r.default.HTTP_REQUEST&&e.value&&e.value.type===o.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=f[e.mediaType],n=h[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),T(t,n))}}function T(e,t){isNaN(e.lastSegmentStart)||isNaN(e.lastSegmentRequestTimeMs)||(t.segment_request_start_s=.001*e.lastSegmentRequestTimeMs,t.segment_download_finish_s=.001*e.lastSegmentFinishTimeMs,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN)}function b(e){if(e&&e.mediaType){var t=f[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function E(e,t){if(e.length!==t.length)return-1;for(var n=0,r=0;r<e.length;r++)n+=e[r]*t[r];return n}function S(){f={},h={}}return d={getMaxIndex:function(e){var r=(0,i.default)(t).create(),a=Math.pow(4,.99),o=Math.max(Math.pow(4,1),a*Math.sqrt(4)),s=e.getMediaInfo(),u=e.getMediaType(),l=s.bitrateList.map((function(e){return e.bandwidth})),d=l.length,y=e.getScheduleController(),v=e.getStreamInfo(),_=e.getAbrController(),T=_.getThroughputHistory(),b=v&&v.manifestInfo&&v.manifestInfo.isDynamic,S=e.useL2AABR(),A=n.getCurrentBufferLevel(u,!0),C=T.getSafeAverageThroughput(u,b),w=T.getAverageThroughput(u,b),I=T.getAverageLatency(u),R=void 0,O=e.getVideoModel().getPlaybackRate();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useL2AABR")))return r;if(r.reason=r.reason||{},!S||u===c.default.AUDIO)return r;y.setTimeToLoadDelay(0);var P=function(e){var t=e.getMediaType(),n=f[t];return n||(n=g(e),f[t]=n),n}(e);if(0===P.state)return r;var D=h[u];if(!D)return r;if(r.reason.state=P.state,r.reason.throughput=w,r.reason.latency=I,isNaN(w))return r;switch(P.state){case 1:if(R=_.getQualityForBitrate(s,C,I),r.quality=R,r.reason.throughput=C,P.lastQuality=R,!isNaN(P.lastSegmentDurationS)&&A>=D.B_target){P.state=2,D.Q=a;for(var M=0;M<d;++M)M===P.lastQuality?D.prev_w[M]=1:D.prev_w[M]=0}break;case 2:var N=[],L=n.getCurrentHttpRequest(u).trace.reduce((function(e,t){return e+t.d}),0),k=n.getCurrentHttpRequest(u).trace.reduce((function(e,t){return e+t.b[0]}),0),x=Math.round(8*k/L);x<1&&(x=1);for(var F=P.lastSegmentDurationS,U=1,B=0;B<d;++B)l[B]=l[B]/1e3,O*l[B]>x&&(U=-1),D.w[B]=D.prev_w[B]+U*(F/(2*o))*((D.Q+a)*(O*l[B]/x));D.w=function(e){for(var t=e.length,n=!1,r=[],i=0;i<t;++i)r[i]=e[i];for(var a=e.sort((function(e,t){return t-e})),o=0,s=0,u=[],l=0;l<t-1;++l)if((s=((o+=a[l])-1)/(l+1))>=a[l+1]){n=!0;break}n||(s=(o+a[t-1]-1)/t);for(var c=0;c<t;++c)u[c]=Math.max(r[c]-s,0);return u}(D.w);for(var j=0;j<d;++j)N[j]=D.w[j]-D.prev_w[j],D.prev_w[j]=D.w[j];D.Q=Math.max(0,D.Q-F+F*O*((E(l,D.prev_w)+E(l,N))/x));for(var H=[],G=0;G<d;++G)H[G]=Math.abs(l[G]-E(D.w,l));(R=H.indexOf(Math.min.apply(Math,H)))>P.lastQuality&&l[P.lastQuality+1]<=x&&(R=P.lastQuality+1),l[R]>=x&&(D.Q=2*Math.max(a,D.Q)),r.quality=R,r.reason.throughput=w,r.reason.latency=I,r.reason.bufferLevel=A,P.lastQuality=r.quality;break;default:p.debug("L2A ABR rule invoked in bad state."),r.quality=_.getQualityForBitrate(s,C,I),r.reason.state=P.state,r.reason.throughput=C,r.reason.latency=I,P.state=1,m(P)}return r},reset:function(){S(),a.off(u.default.PLAYBACK_SEEKING,y,d),a.off(u.default.MEDIA_FRAGMENT_LOADED,v,d),a.off(u.default.METRIC_ADDED,_,d),a.off(u.default.QUALITY_CHANGE_REQUESTED,b,d)}},p=(0,l.default)(t).getInstance().getLogger(d),S(),a.on(u.default.PLAYBACK_SEEKING,y,d),a.on(u.default.MEDIA_FRAGMENT_LOADED,v,d),a.on(u.default.METRIC_ADDED,_,d),a.on(u.default.QUALITY_CHANGE_REQUESTED,b,d),d}f.__dashjs_factory_name="L2ARule",t.default=a.default.getClassFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(8)),i=d(n(1)),a=d(n(243)),o=d(n(244)),s=d(n(20)),u=d(n(16)),l=d(n(246)),c=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){var t=(e=e||{}).dashMetrics,n=this.context,i=void 0,d=void 0,f=void 0,h=void 0;return d={getMaxIndex:function(e){try{var r=(0,s.default)(n).create(),a=e.getMediaInfo().type,o=e.getAbrController(),d=e.getStreamInfo(),p=o.getQualityFor(a,d),g=e.getMediaInfo(),m=t.getCurrentBufferState(a),y=e.getScheduleController(),v=t.getCurrentBufferLevel(a,!0),_=d&&d.manifestInfo?d.manifestInfo.isDynamic:null,T=y.getPlaybackController(),b=T.getCurrentLiveLatency();if(!e.useLoLPABR()||a===c.default.AUDIO)return r;b||(b=0);var E=T.getPlaybackRate(),S=o.getThroughputHistory().getSafeAverageThroughput(a,_);if(i.debug("Throughput "+Math.round(S)+" kbps"),isNaN(S)||!m)return r;if(o.getAbandonmentStateFor(a)===u.default.ABANDON_LOAD)return r;for(var A=g.bitrateList,C=e.getRepresentationInfo().fragmentDuration,w=A[0].bandwidth/1e3,I=A[A.length-1].bandwidth/1e3,R=0;R<A.length;R++){var O=A[R].bandwidth/1e3;O>I?I=O:O<w&&(w=O)}var P=A[p].bandwidth/1e3,D=t.getCurrentHttpRequest(a,!0),M=(D.tresponse.getTime()-D.trequest.getTime())/1e3,N=M>C?M-C:0;h.setupPerSegmentQoe(C,I,w),h.logSegmentMetrics(P,N,b,E);var L=(0,l.default)(n).create({targetLatency:1.5,bufferMin:.3,segmentDuration:C,qoeEvaluator:h});return r.quality=f.getNextQuality(g,1e3*S,b,v,E,p,L),r.reason={throughput:S,latency:b},r.priority=s.default.PRIORITY.STRONG,y.setTimeToLoadDelay(0),r.quality!==p&&(r.quality,Math.round(S)),r}catch(e){throw e}},reset:function(){f.reset(),h.reset()}},i=(0,r.default)(n).getInstance().getLogger(d),f=(0,a.default)(n).create(),h=(0,o.default)(n).create(),d}f.__dashjs_factory_name="LoLPRule",t.default=i.default.getClassFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(8));function a(e){return e&&e.__esModule?e:{default:e}}var o="manual_weight_selection",s="random_weight_selection",u="dynamic_weight_selection";function l(){var e=this.context,t=void 0,n=void 0,r=void 0,a=void 0,l=void 0,c=void 0,d=void 0,f=void 0,h=void 0;function p(){r=null,a=1,l=100,c=0,null,d=null,f=null,h=u}function g(){var e=0;if(r)for(var t=0;t<r.length;t++){var n=r[t];n.state.throughput>e&&(e=n.state.throughput)}return e}function m(e,t,n){var r=e.map((function(e,r){return n[r]*Math.pow(e-t[r],2)})).reduce((function(e,t){return e+t}));return(r<0?-1:1)*Math.sqrt(Math.abs(r))}function y(e,t){return m([e.state.throughput,e.state.latency,e.state.rebuffer,e.state.switch],[t.state.throughput,t.state.latency,t.state.rebuffer,t.state.switch],[1,1,1,1])}function v(e,t,n){for(var r=0;r<t.length;r++){var i=t[r],a=y(i,e);_(i,n,Math.exp(-1*Math.pow(a,2)/(2*Math.pow(.1,2))))}}function _(e,t,n){var r=e.state,i=[.01,.01,.01,.01];r.throughput=r.throughput+(t[0]-r.throughput)*i[0]*n,r.latency=r.latency+(t[1]-r.latency)*i[1]*n,r.rebuffer=r.rebuffer+(t[2]-r.rebuffer)*i[2]*n,r.switch=r.switch+(t[3]-r.switch)*i[3]*n}function T(e,t,n,r,i,a,o){d||(d=f[f.length-1]);var s=e.findWeightVector(t,n,r,i,a,o);null!==s&&-1!==s&&(d=s)}return t={getNextQuality:function(e,t,i,p,y,_,b){var E=i,S=p,A=t,C=function(e){if(!r){r=[];var t=e.bitrateList,n=[];c=t[0].bandwidth,t.forEach((function(e){n.push(e.bandwidth),e.bandwidth<c&&(c=e.bandwidth)})),s=n.map((function(e){return Math.pow(e,2)})).reduce((function(e,t){return e+t})),a=Math.sqrt(s);for(var i=0;i<t.length;i++){var o={qualityIndex:i,bitrate:t[i].bandwidth,state:{throughput:t[i].bandwidth/a,latency:0,rebuffer:0,switch:0}};r.push(o),o.bitrate===c&&o}f=function(e){var t=[],n=function(e){for(var t=[],n=0;n<e;n++){var r=[Math.random()*g(),Math.random(),Math.random(),Math.random()];t.push(r)}return t}(Math.pow(e.length,2));t.push(n[0]);for(var r=[1,1,1,1],i=1;i<e.length;i++){for(var a=null,o=null,s=0;s<n.length;s++){for(var u=n[s],l=null,c=0;c<t.length;c++){var d=m(u,t[c],r);(null===l||d<l)&&(l=d)}(null===o||l>o)&&(a=u,o=l)}t.push(a)}for(var f=null,h=null,p=0;p<t.length;p++){for(var y=0,v=0;v<t.length;v++)p!==v&&(y+=m(t[p],t[v],r));(null===f||y>f)&&(f=y,h=p)}var _=[];_.push(t[h]),t.splice(h,1);for(;t.length>0;){for(var T=null,b=null,E=0;E<t.length;E++){var S=m(_[0],t[E],r);(null===T||S<T)&&(T=S,b=E)}_.push(t[b]),t.splice(b,1)}return _}(r)}var s;return r}(e),w=t/a;w>1&&(w=g()),i/=l,n.debug("getNextQuality called throughput:"+w+" latency:"+i+" bufferSize:"+p+" currentQualityIndex:"+_+" playbackRate:"+y);var I=C[_],R=I.bitrate*b.getSegmentDuration()/A,O=Math.max(0,R-S);if(S-R<b.getMinBuffer())return n.debug("Buffer is low for bitrate= "+I.bitrate+" downloadTime="+R+" currentBuffer="+S+" rebuffer="+O),function(e,t){var n=0,i=e;if(r)for(var a=0;a<r.length;a++){var o=r[a];o.bitrate<e.bitrate&&o.bitrate>n&&t>o.bitrate&&(n=o.bitrate,i=o)}return i}(I,A).qualityIndex;switch(h){case o:d=[.4,.4,.4,.4];break;case s:!function(e){d=function(e,t){for(var n=[],r=Math.sqrt(2/e),i=0;i<t;i++)n.push(Math.random()*r);return d=n}(e.length,4)}(C);break;case u:T(b,C,E,S,O,A,y);break;default:T(b,C,E,S,O,A,y)}for(var P=null,D=null,M=null,N=0;N<C.length;N++){var L=C[N],k=L.state,x=[k.throughput,k.latency,k.rebuffer,k.switch],F=d.slice(),U=b.getNextBufferWithBitrate(L.bitrate,S,A),B=U<b.getMinBuffer();B&&n.debug("Buffer is low for bitrate="+L.bitrate+" downloadTime="+R+" currentBuffer="+S+" nextBuffer="+U),(L.bitrate>t-1e4||B)&&L.bitrate!==c&&(F[0]=100);var j=m(x,[w,0,0,0],F);(null===P||j<P)&&(P=j,D=L.qualityIndex,M=L,F)}var H=Math.abs(I.bitrate-M.bitrate)/a;return v(I,C,[w,i,O,H]),v(M,C,[w,0,0,H]),D},reset:function(){p()}},n=(0,i.default)(e).getInstance().getLogger(t),p(),t}l.__dashjs_factory_name="LearningAbrController",t.default=r.default.getClassFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(245));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e,t=void 0,n=void 0,r=void 0,a=void 0;function o(){t=null,n=null,r=null,a=null}function s(e,t,n,r){var a=new i.default;return a.type=e,a.weights.bitrateReward=t||1,a.weights.bitrateSwitchPenalty=1,a.weights.rebufferPenalty=n||1e3,a.weights.latencyPenalty=[],a.weights.latencyPenalty.push({threshold:1.1,penalty:.05*r}),a.weights.latencyPenalty.push({threshold:1e8,penalty:.1*n}),a.weights.playbackSpeedPenalty=r||200,a}function u(e,t,n,r,i){i.bitrateWSum+=i.weights.bitrateReward*e,i.lastBitrate&&(i.bitrateSwitchWSum+=i.weights.bitrateSwitchPenalty*Math.abs(e-i.lastBitrate)),i.lastBitrate=e,i.rebufferWSum+=i.weights.rebufferPenalty*t;for(var a=0;a<i.weights.latencyPenalty.length;a++){var o=i.weights.latencyPenalty[a];if(n<=o.threshold){i.latencyWSum+=o.penalty*n;break}}i.playbackSpeedWSum+=i.weights.playbackSpeedPenalty*Math.abs(1-r),i.totalQoe=i.bitrateWSum-i.bitrateSwitchWSum-i.rebufferWSum-i.latencyWSum-i.playbackSpeedWSum}return e={setupPerSegmentQoe:function(e,i,o){t=s("segment",e,i,o),n=e,r=i,a=o},logSegmentMetrics:function(e,n,r,i){t&&u(e,n,r,i,t)},getPerSegmentQoe:function(){return t},calculateSingleUseQoe:function(e,t,i,o){var l=null;return n&&r&&a&&(l=s("segment",n,r,a)),l?(u(e,t,i,o,l),l.totalQoe):0},reset:function(){o()}},o(),e}o.__dashjs_factory_name="LoLpQoeEvaluator",t.default=r.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=null,this.lastBitrate=null,this.weights={},this.weights.bitrateReward=null,this.weights.bitrateSwitchPenalty=null,this.weights.rebufferPenalty=null,this.weights.latencyPenalty=null,this.weights.playbackSpeedPenalty=null,this.bitrateWSum=0,this.bitrateSwitchWSum=0,this.rebufferWSum=0,this.latencyWSum=0,this.playbackSpeedWSum=0,this.totalQoe=0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var t,n,r,i=e.targetLatency,a=e.bufferMin,o=e.segmentDuration,s=e.qoeEvaluator,u=void 0,l=void 0;function c(){return o}function d(e,t){var n=c();return t>n?e-n:e+n-t}return t={getMinBuffer:function(){return a},getSegmentDuration:c,getNextBufferWithBitrate:function(e,t,n){return d(t,e*o/n)},getNextBuffer:d,findWeightVector:function(e,t,n,r,c,f){var h=null,p=null,g=null,m=Math.abs(t-l);return e.forEach((function(e){u.forEach((function(r){r[0];var u=r[1],l=r[2],y=(r[3],e.bitrate*o/c),v=d(n,y),_=(0===l?10:1/l)*Math.max(1e-5,y-v),T=(0===u?10:1/u)*e.state.latency,b=s.calculateSingleUseQoe(e.bitrate,_,T,f);(null===h||b>h)&&function(e,t,n){if(e>i+n)return!1;return t>=a}(t,v,m)&&(h=b,p=r,g=e.bitrate)}))})),null===p&&null===g&&(p=-1),l=t,p}},n=[.2,.4,.6,.8,1],r=4,u=function e(t,r,i){if(i===r)return t;for(var a=t.length,o=0;o<a;o++)for(var s=t.shift(),u=0;u<n.length;u++)t.push(s.concat(n[u]));return e(t,r,i+1)}(n.map((function(e){return[e]})),r,1),l=0,t}o.__dashjs_factory_name="LoLpWeightSelector",t.default=a.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var t=(e=e||{}).abrController,n=e.switchHistory,r=e.droppedFramesHistory,i=e.currentRequest,a=e.useBufferOccupancyABR,o=e.useL2AABR,s=e.useLoLPABR,u=e.streamProcessor?e.streamProcessor.getScheduleController():null,l=e.streamProcessor?e.streamProcessor.getRepresentationInfo():null,c=e.videoModel?e.videoModel:null;function d(){return l?l.mediaInfo:null}return{getMediaType:function(){var e=d();return e?e.type:null},getMediaInfo:d,getDroppedFramesHistory:function(){return r},getCurrentRequest:function(){return i},getSwitchHistory:function(){return n},getStreamInfo:function(){var e=d();return e?e.streamInfo:null},getScheduleController:function(){return u},getAbrController:function(){return t},getRepresentationInfo:function(){return l},useBufferOccupancyABR:function(){return a},useL2AABR:function(){return o},useLoLPABR:function(){return s},getVideoModel:function(){return c}}}o.__dashjs_factory_name="RulesContext",t.default=a.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(20));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=[],t=[];return{push:function(n){n.newValue===i.default.NO_CHANGE&&(n.newValue=n.oldValue),e[n.oldValue]||(e[n.oldValue]={noDrops:0,drops:0,dropSize:0});var r=n.newValue-n.oldValue,a=r<0?1:0,o=a?-r:0,s=a?0:1;if(e[n.oldValue].drops+=a,e[n.oldValue].dropSize+=o,e[n.oldValue].noDrops+=s,t.push({idx:n.oldValue,noDrop:s,drop:a,dropSize:o}),t.length>8){var u=t.shift();e[u.idx].drops-=u.drop,e[u.idx].dropSize-=u.dropSize,e[u.idx].noDrops-=u.noDrop}},getSwitchRequests:function(){return e},reset:function(){e=[],t=[]}}}o.__dashjs_factory_name="SwitchRequestHistory";var s=r.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(){var e=[],t=0,n=0;return{push:function(r,i){var a=i&&i.droppedVideoFrames?i.droppedVideoFrames:0,o=i&&i.totalVideoFrames?i.totalVideoFrames:0,s=a-t;t=a;var u=o-n;n=o,isNaN(r)||(e[r]?(e[r].droppedVideoFrames+=s,e[r].totalVideoFrames+=u):e[r]={droppedVideoFrames:s,totalVideoFrames:u})},getFrameHistory:function(){return e},reset:function(r){e=[],t=r.droppedVideoFrames,n=r.totalVideoFrames}}}o.__dashjs_factory_name="DroppedFramesHistory";var s=a.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(6)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(e=e||{}).settings,n=void 0,i=void 0,a=void 0,o=void 0,s=void 0;function u(e,t,n,r){var i=Math.pow(.5,n/r.fast);e.fastEstimate=(1-i)*t+i*e.fastEstimate;var a=Math.pow(.5,n/r.slow);e.slowEstimate=(1-a)*t+a*e.slowEstimate,e.totalWeight+=n}function l(e,u,l){return t.get().streaming.abr.movingAverageMethod!==r.default.MOVING_AVERAGE_SLIDING_WINDOW?function(e,t){var n=e?s.throughputHalfLife:s.latencyHalfLife,r=e?a[t]:o[t];if(!r||r.totalWeight<=0)return NaN;var i=r.fastEstimate/(1-Math.pow(.5,r.totalWeight/n.fast)),u=r.slowEstimate/(1-Math.pow(.5,r.totalWeight/n.slow));return e?Math.min(i,u):Math.max(i,u)}(e,u):function(e,t,r){var a=function(e,t,r){var a=void 0,o=void 0;if(e?(a=n[t],o=r?3:4):(a=i[t],o=4),a){if(o>=a.length)o=a.length;else if(e)for(var s=1;s<o;++s){var u=a[a.length-s]/a[a.length-s-1];if((u>=1.3||u<=1/1.3)&&(o+=1)===a.length)break}}else o=0;return o}(e,t,r),o=(e?n:i)[t];if(0===a||!o||0===o.length)return NaN;return(o=o.slice(-a)).reduce((function(e,t){return e+t}))/o.length}(e,u,l)}function c(e,t){return l(!0,e,t)}function d(e){n[e]=n[e]||[],i[e]=i[e]||[],a[e]=a[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0},o[e]=o[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function f(){n={},i={},a={},o={}}var h={push:function(e,l,c){if(l.trace&&l.trace.length){var f=l.tresponse.getTime()-l.trequest.getTime()||1,h=l._tfinish.getTime()-l.tresponse.getTime()||1,p=l.trace.reduce((function(e,t){return e+t.b[0]}),0),g=void 0;g=t.get().streaming.lowLatencyEnabled?l.trace.reduce((function(e,t){return e+t.d}),0):c?h:f+h;var m=Math.round(8*p/g);if(d(e),function(e,n,i){return e===r.default.VIDEO?i<t.get().streaming.cacheLoadThresholds[r.default.VIDEO]:e===r.default.AUDIO?i<t.get().streaming.cacheLoadThresholds[r.default.AUDIO]:void 0}(e,0,h)){if(n[e].length>0&&!n[e].hasCachedEntries)return;n[e].hasCachedEntries=!0}else n[e]&&n[e].hasCachedEntries&&function(e){delete n[e],delete i[e],delete a[e],delete o[e],d(e)}(e);n[e].push(m),n[e].length>20&&n[e].shift(),i[e].push(f),i[e].length>20&&i[e].shift(),u(a[e],m,.001*h,s.throughputHalfLife),u(o[e],f,1,s.latencyHalfLife)}},getAverageThroughput:c,getSafeAverageThroughput:function(e,n){var r=c(e,n);return isNaN(r)||(r*=t.get().streaming.abr.bandwidthSafetyFactor),r},getAverageLatency:function(e){return l(!1,e)},reset:f};return s={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},f(),h}o.__dashjs_factory_name="ThroughputHistory",t.default=i.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(6)),i=s(n(1)),a=s(n(111)),o=s(n(252));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){e=e||{};var t,n=this.context,i=void 0;function s(){return i.getBuffer()}return t={getBufferControllerType:function(){return i.getBufferControllerType()},initialize:function(e,t){return i.initialize(e,t)},createBuffer:function(e,t){return i.createBuffer(e,t)},getType:function(){return i.getType()},getBuffer:s,setBuffer:function(e){i.setBuffer(e)},getBufferLevel:function(){return i.getBufferLevel()},setMediaSource:function(e){i.setMediaSource(e)},getMediaSource:function(){return i.getMediaSource()},getIsBufferingCompleted:function(){return i.getIsBufferingCompleted()},getIsPruningInProgress:function(){return i.getIsPruningInProgress()},dischargePreBuffer:function(){return i.dischargePreBuffer()},appendInitSegment:function(e){i.appendInitSegment(e)},getRangeAt:function(e){return i.getRangeAt(e)},reset:function(e){i.reset(e)},updateTimestampOffset:function(e){var t=s();t.timestampOffset===e||isNaN(e)||(t.timestampOffset=e)},updateAppendWindow:function(){i.updateAppendWindow()},getRepresentationInfo:function(e){return i.getRepresentationInfo(e)}},i=e.type===r.default.FRAGMENTED_TEXT?(0,a.default)(n).create({streamInfo:e.streamInfo,type:e.type,mediaPlayerModel:e.mediaPlayerModel,manifestModel:e.manifestModel,fragmentModel:e.fragmentModel,errHandler:e.errHandler,mediaController:e.mediaController,representationController:e.representationController,adapter:e.adapter,textController:e.textController,abrController:e.abrController,playbackController:e.playbackController,settings:e.settings}):(0,o.default)(n).create({streamInfo:e.streamInfo,type:e.type,mimeType:e.mimeType,fragmentModel:e.fragmentModel,errHandler:e.errHandler}),t}u.__dashjs_factory_name="TextBufferController",t.default=i.default.getClassFactory(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(6)),i=f(n(9)),a=f(n(10)),o=f(n(1)),s=f(n(77)),u=f(n(112)),l=f(n(69)),c=f(n(11)),d=f(n(17));function f(e){return e&&e.__esModule?e:{default:e}}var h="NotFragmentedTextBufferController";function p(e){e=e||{};var t=this.context,n=(0,i.default)(t).getInstance(),o=(0,l.default)(t).getInstance(),f=e.errHandler,p=e.streamInfo,g=e.type,m=e.mimeType,y=e.fragmentModel,v=void 0,_=void 0,T=void 0,b=void 0,E=void 0,S=void 0;function A(e){b=e}function C(e){null===S.extract(p.id,e.currentRepresentation.id)&&(_=!1,n.trigger(a.default.INIT_FRAGMENT_NEEDED,{representationId:e.currentRepresentation.id,sender:v},{streamId:p.id,mediaType:g}))}function w(e){e.chunk.bytes&&(S.save(e.chunk),E.append(e.chunk),_=!0,n.trigger(a.default.STREAM_COMPLETED,{request:e.request},{streamId:p.id,mediaType:g}))}return v={getBufferControllerType:function(){return h},initialize:function(e){A(e),S=(0,s.default)(t).getInstance()},createBuffer:function(e){var n=e[0];try{if(E=(0,u.default)(t).create(b,n),!T){var i=E.getBuffer();i.hasOwnProperty(r.default.INITIALIZE)&&i.initialize(m,p,e,y),T=!0}return E}catch(e){if(n&&(n.isText||-1!==n.codec.indexOf('codecs="stpp')||-1!==n.codec.indexOf('codecs="wvtt')))try{E=o.getTextSourceBuffer()}catch(e){f.error(new c.default(d.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,d.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+g+" : "+e.message))}else f.error(new c.default(d.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,d.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+g))}},getStreamId:function(){return p.id},getType:function(){return g},getBuffer:function(){return E},getBufferLevel:function(){return 0},setMediaSource:A,getMediaSource:function(){return b},getIsBufferingCompleted:function(){return _},getIsPruningInProgress:function(){return!1},dischargePreBuffer:function(){},appendInitSegment:function(e){return null!==S.extract(p.id,e)},getRangeAt:function(){return null},reset:function(e){n.off(a.default.DATA_UPDATE_COMPLETED,C,v),n.off(a.default.INIT_FRAGMENT_LOADED,w,v),!e&&E&&(E.abort(),E.reset(),E=null)},updateTimestampOffset:function(e){E.timestampOffset===e||isNaN(e)||(E.timestampOffset=e)}},T=!1,b=null,_=!1,n.on(a.default.DATA_UPDATE_COMPLETED,C,v),n.on(a.default.INIT_FRAGMENT_LOADED,w,v),v}p.__dashjs_factory_name=h,t.default=o.default.getClassFactory(p)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(6)),i=d(n(16)),a=d(n(254)),o=d(n(39)),s=d(n(9)),u=d(n(10)),l=d(n(1)),c=d(n(8));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){e=e||{};var t=this.context,n=(0,s.default)(t).getInstance(),l=e.adapter,d=e.dashMetrics,f=e.mediaPlayerModel,h=e.fragmentModel,p=e.abrController,g=e.playbackController,m=e.textController,y=e.type,v=e.mimeType,_=e.mediaController,T=e.bufferController,b=e.settings,E=void 0,S=void 0,A=void 0,C=void 0,w=void 0,I=void 0,R=void 0,O=void 0,P=void 0,D=void 0,M=void 0,N=void 0,L=void 0,k=void 0,x=void 0,F=void 0,U=void 0,B=void 0,j=void 0,H=void 0,G=void 0;function q(){return!1===I}function V(){S&&(q()||C&&!T.getIsBufferingCompleted()&&(A.debug("Schedule Controller starts"),I=!1,d.createPlaylistTraceMetrics(C.id,1e3*g.getTime(),g.getPlaybackRate()),w&&(w=!1),W(0)))}function Y(){I||(A.debug("Schedule Controller stops"),A.debug(y+" Schedule Controller stops"),I=!0,clearTimeout(P))}function K(){if(S)if(I||R||g.isPaused()&&!b.get().streaming.scheduleWhilePaused||(y===r.default.FRAGMENTED_TEXT||y===r.default.TEXT)&&!m.isTextEnabled()||T.getIsBufferingCompleted())Y();else{!function(){if(!isNaN(D))return;if(!x)return;var e=g.getTime(),t=1.5;if(isNaN(x.fragmentDuration)){var n=d.getCurrentSchedulingInfo(C.mediaInfo.type);t=n?1.5*n.duration:1.5}var a=h.getRequests({state:o.default.FRAGMENT_MODEL_EXECUTED,time:e+t,threshold:0})[0];if(a&&-1===F.indexOf(a)&&!l.getIsTextTrack(v)){var s=b.get().streaming.fastSwitchEnabled,u=T.getBufferLevel(),c=p.getAbandonmentStateFor(y),f=!_.isCurrentTrack(a.mediaInfo)&&_.getSwitchMode(a.mediaInfo.type)===r.default.TRACK_SWITCH_MODE_NEVER_REPLACE,m=a.quality<x.quality;s&&(f||m)&&u>=t&&c!==i.default.ABANDON_LOAD?(X(a),G=!0,A.debug("Reloading outdated fragment at index: ",a.index)):a.quality>x.quality&&!B&&ce(g.getTime()+u)}}();var e=F.length>0,t=x?x.quality:NaN;if(B||isNaN(t)||U||e||function(e,t){k[t]=k[t]||{};var n=p.getTopQualityIndexFor(e,t);return k[t][e]!=n&&(A.info("Top quality "+e+" index has changed from "+k[t][e]+" to "+n),k[t][e]=n,!0)}(y,S.id)||N.execute(y,C,M)){z(!0),!e&&H&&p.checkPlaybackQuality(y),function(){if(C.quality===t&&!U||B){var e=F.shift();e&&e.isInitializationRequest()?(n.trigger(u.default.INIT_FRAGMENT_NEEDED,{representationId:e.representationId,sender:E},{streamId:S.id,mediaType:y}),H=!1):(n.trigger(u.default.MEDIA_FRAGMENT_NEEDED,{seekTarget:D,replacement:e},{streamId:S.id,mediaType:y}),H=!0)}else U?(A.debug("Switch track for "+y+", representation id = "+C.id),(B=_.getSwitchMode(y)===r.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE)&&T.replaceBuffer&&T.replaceBuffer(),U=!1):A.debug("Quality has changed, get init request for representationid = "+C.id),n.trigger(u.default.INIT_FRAGMENT_NEEDED,{representationId:C.id,sender:E},{streamId:S.id,mediaType:y}),H=!1}()}else W(500)}}function W(e){clearTimeout(P),P=setTimeout(K,e)}function z(e){R!==e?R=e:A.debug("isFragmentProcessingInProgress is already equal to",e)}function X(e){F.push(e)}function Q(e){if(g&&h){var t=h.getRequests({state:o.default.FRAGMENT_MODEL_EXECUTED,time:g.getTime(),threshold:0})[0];t&&g.getTime()>=t.startTime&&((!L.mediaInfo||t.mediaInfo.type===L.mediaInfo.type&&t.mediaInfo.id!==L.mediaInfo.id)&&e&&n.trigger(u.default.TRACK_CHANGE_RENDERED,{mediaType:y,oldMediaInfo:L.mediaInfo,newMediaInfo:t.mediaInfo}),t.quality===L.quality&&t.adaptationIndex===L.adaptationIndex||!e||n.trigger(u.default.QUALITY_CHANGE_RENDERED,{mediaType:y,oldQuality:L.quality,newQuality:t.quality}),L={mediaInfo:t.mediaInfo,quality:t.quality,adaptationIndex:t.adaptationIndex})}}function $(){Y(),z(!1),A.info("Stream "+S.id+" is complete")}function J(e){e.request.mediaInfo.streamInfo.id===S.id&&e.request.mediaType===y&&(A.info("OnFragmentLoadingCompleted - Url:",e.request?e.request.url:"undefined",e.request.range?", Range:"+e.request.range:""),l.getIsTextTrack(v)&&z(!1),e.error&&e.request.serviceLocation&&!I&&(X(e.request),z(!1),W(0)),B&&(j=e.request))}function Z(){Q(!0)}function ee(e){if(B&&!isNaN(e.startTime)&&(B=!1,h.addExecutedRequest(j)),z(!1),isNaN(e.index)&&(x=T.getRepresentationInfo(e.quality),A.info("["+y+"] lastInitializedRepresentationInfo changed to "+e.quality)),G&&!isNaN(e.startTime)){var t=g.getTime(),n=e.startTime+C.fragmentDuration,r=1.5*C.fragmentDuration;W(t+r>=n?0:1e3*(n-(t+r))),G=!1}else W(0)}function te(e){A.info("onFragmentLoadingAbandoned request: "+e.request.url+" has been aborted"),g.isSeeking()||U||(A.info("onFragmentLoadingAbandoned request: "+e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),X(e.request)),z(!1),W(0)}function ne(){}function re(){Y()}function ie(e){B&&b.get().streaming.flushBufferAtTrackSwitch&&g.seek(g.getTime()+.001,!1,!0),e.hasEnoughSpaceToAppend&&e.quotaExceeded&&V()}function ae(){Y(),z(!1)}function oe(){h.abortRequests(),Y()}function se(){!I&&b.get().streaming.scheduleWhilePaused||V()}function ue(e){if(S){ce(e.seekTime),de(0),I&&V();var t=C&&C.DVRWindow&&g?C.DVRWindow.end-g.getTime():NaN;d.updateManifestUpdateInfo({latency:t}),R?h.abortRequests():W(0)}}function le(e){d.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()})}function ce(e){D=e}function de(e){O=e}function fe(){H=!0,R=!1,O=0,D=NaN,w=!0,x=void 0,L={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},k={},F=[],I=!0,U=!1,B=!1,j=null,G=!1}return E={initialize:function(e){M=e,N=(0,a.default)(t).create({abrController:p,dashMetrics:d,mediaPlayerModel:f,textController:m,settings:b}),n.on(u.default.DATA_UPDATE_STARTED,ne,this),n.on(u.default.FRAGMENT_LOADING_COMPLETED,J,this),n.on(u.default.STREAM_COMPLETED,$,this),n.on(u.default.BUFFER_CLEARED,ie,this),n.on(u.default.BYTES_APPENDED_END_FRAGMENT,ee,this),n.on(u.default.QUOTA_EXCEEDED,ae,this),n.on(u.default.PLAYBACK_SEEKING,ue,this),n.on(u.default.PLAYBACK_STARTED,se,this),n.on(u.default.PLAYBACK_RATE_CHANGED,le,this),n.on(u.default.PLAYBACK_TIME_UPDATED,Z,this),n.on(u.default.URL_RESOLUTION_FAILED,oe,this),n.on(u.default.FRAGMENT_LOADING_ABANDONED,te,this),n.on(u.default.BUFFERING_COMPLETED,re,this)},getType:function(){return y},getStreamId:function(){return S.id},setCurrentRepresentation:function(e){C=e},setSeekTarget:ce,setTimeToLoadDelay:de,getTimeToLoadDelay:function(){return O},switchTrackAsked:function(){U=!0},isStarted:q,start:V,stop:Y,reset:function(){n.off(u.default.DATA_UPDATE_STARTED,ne,this),n.off(u.default.FRAGMENT_LOADING_COMPLETED,J,this),n.off(u.default.STREAM_COMPLETED,$,this),n.off(u.default.BUFFER_CLEARED,ie,this),n.off(u.default.BYTES_APPENDED_END_FRAGMENT,ee,this),n.off(u.default.QUOTA_EXCEEDED,ae,this),n.off(u.default.PLAYBACK_SEEKING,ue,this),n.off(u.default.PLAYBACK_STARTED,se,this),n.off(u.default.PLAYBACK_RATE_CHANGED,le,this),n.off(u.default.PLAYBACK_TIME_UPDATED,Z,this),n.off(u.default.URL_RESOLUTION_FAILED,oe,this),n.off(u.default.FRAGMENT_LOADING_ABANDONED,te,this),n.off(u.default.BUFFERING_COMPLETED,re,this),Y(),Q(!1),fe(),S=null},getBufferTarget:function(){return N.getBufferTarget(y,C,M)},processInitRequest:function(e){e&&(z(!0),h.executeRequest(e))},processMediaRequest:function(e){e?(A.debug("Next fragment request url is "+e.url),h.executeRequest(e)):(g.getIsDynamic()&&A.debug("Next fragment seems to be at the bleeding live edge and is not available yet. Rescheduling."),z(!1),W(b.get().streaming.lowLatencyEnabled?100:500))},getPlaybackController:function(){return g}},A=(0,c.default)(t).getInstance().getLogger(E),fe(),S=e.streamInfo,E}f.__dashjs_factory_name="ScheduleController",t.default=l.default.getClassFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(6)),i=o(n(1)),a=o(n(16));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=(e=e||{}).dashMetrics,n=e.mediaPlayerModel,i=e.textController,o=e.abrController,s=e.settings;function u(e,u,l){var c=NaN;if(!e||!u)return c;if(e===r.default.FRAGMENTED_TEXT)if(i.isTextEnabled())if(isNaN(u.fragmentDuration)){var d=t.getCurrentSchedulingInfo(a.default.SCHEDULING_INFO);c=d?d.duration:0}else c=u.fragmentDuration;else c=0;else if(e===r.default.AUDIO&&l){var f=t.getCurrentBufferLevel(r.default.VIDEO);c=isNaN(u.fragmentDuration)?f:Math.max(f,u.fragmentDuration)}else{var h=u.mediaInfo.streamInfo;if(o.isPlayingAtTopQuality(h))c=h.manifestInfo.duration>=s.get().streaming.longFormContentDurationThreshold?s.get().streaming.bufferTimeAtTopQualityLongForm:s.get().streaming.bufferTimeAtTopQuality;else c=n.getStableBufferTime()}return c}return{execute:function(e,n,r){return!e||!n||t.getCurrentBufferLevel(e)<u(e,n,r)},getBufferTarget:u}}s.__dashjs_factory_name="BufferLevelRule",t.default=i.default.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(6)),i=o(n(11)),a=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=(e=e||{}).eventBus,n=e.events,a=e.errors,o=e.abrController,s=e.dashMetrics,u=e.playbackController,l=e.timelineConverter,c=e.type,d=e.streamInfo,f=e.dashConstants,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0;function v(){return c}function _(){if(!(o&&s&&u&&l))throw new Error(r.default.MISSING_CONFIG_ERROR)}function T(){return g}function b(){return y}function E(){p=null,g=!0,m=[]}function S(){_();var e=new Date,t=b(),n=1e3*u.getTime();t&&s.addRepresentationSwitch(t.adaptation.type,e,n,t.id)}function A(e){return null==e||e>=m.length?null:m[e]}function C(e,t){var n;(e.segmentAvailabilityRange=l.calcSegmentAvailabilityRange(e,t),e.segmentAvailabilityRange.end<e.segmentAvailabilityRange.start)?R(new i.default(a.SEGMENTS_UNAVAILABLE_ERROR_CODE,a.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE,{availabilityDelay:e.segmentAvailabilityRange.start-e.segmentAvailabilityRange.end})):t&&(n=e.segmentAvailabilityRange.end,l.setExpectedLiveEdge(n),s.updateManifestUpdateInfo({presentationStartTime:n}))}function w(e,r){_();for(var i=0,a=m.length;i<a;i++)C(m[i],e),r&&t.trigger(n.REPRESENTATION_UPDATE_STARTED,{representation:m[i]},{streamId:d.id,mediaType:c})}function I(){g=!0,t.trigger(n.DATA_UPDATE_STARTED,{},{streamId:d.id,mediaType:c})}function R(e){g=!1,t.trigger(n.DATA_UPDATE_COMPLETED,{data:p,currentRepresentation:y,error:e},{streamId:d.id,mediaType:c})}function O(e){var r=e;t.trigger(n.AST_IN_FUTURE,{delay:r}),setTimeout((function(){T()||(I(),m.forEach((function(e){e.segmentAvailabilityRange=null})),w(u.getIsDynamic(),!0))}),r)}function P(e){if(T())if(e.error)R(e.error);else{var t,n=e.representation,r=s.getCurrentManifestUpdate(),l=!1,c=0,h=void 0;if(n.adaptation.period.mpd.manifest.type===f.DYNAMIC&&!n.adaptation.period.mpd.manifest.ignorePostponeTimePeriod&&u.getStreamController().getStreams().length<=1&&(c=function(e){try{var t=u.getStreamController().getActiveStreamInfo(),n=e.segmentAvailabilityRange.start;t&&t.id&&t.id!==d.id&&(n=Math.min(u.getTime(),n));var r=e.segmentAvailabilityRange.end-n;return 1e3*(u.getLiveDelay()-r)}catch(e){return 0}}(n)),c>0)return O(c),void R(new i.default(a.SEGMENTS_UPDATE_FAILED_ERROR_CODE,a.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE));if(r){for(var p=0;p<r.representationInfo.length;p++)if((h=r.representationInfo[p]).index===n.index&&h.mediaType===v()){l=!0;break}l||s.addManifestUpdateRepresentationInfo(n,v())}(function(){for(var e=0,t=m.length;e<t;e++){var n=m[e].segmentInfoType;if(null===m[e].segmentAvailabilityRange||!m[e].hasInitialization()||(n===f.SEGMENT_BASE||n===f.BASE_URL)&&!m[e].segments)return!1}return!0})()&&(o.setPlaybackQuality(v(),d,(t=y,m.indexOf(t))),s.updateManifestUpdateInfo({latency:y.segmentAvailabilityRange.end-u.getTime()}),s.getCurrentRepresentationSwitch(b().adaptation.type)||S(),R())}}function D(e){e.isDynamic&&w(e.isDynamic)}function M(e){y=A(e.newQuality),S()}function N(e){if(e.newDuration){var t=b();if(t&&t.adaptation.period)t.adaptation.period.duration=e.newDuration}}return h={getStreamId:function(){return d.id},getType:v,getData:function(){return p},isUpdating:T,updateData:function(e,t,n,i){_(),I(),m=t,y=A(i),p=e,n===r.default.VIDEO||n===r.default.AUDIO||n===r.default.FRAGMENTED_TEXT?w(u.getIsDynamic(),!0):R()},updateRepresentation:C,getCurrentRepresentation:b,getRepresentationForQuality:A,reset:function(){t.off(n.QUALITY_CHANGE_REQUESTED,M,h),t.off(n.REPRESENTATION_UPDATE_COMPLETED,P,h),t.off(n.WALLCLOCK_TIME_UPDATED,D,h),t.off(n.MANIFEST_VALIDITY_CHANGED,N,h),E()}},E(),t.on(n.QUALITY_CHANGE_REQUESTED,M,h),t.on(n.REPRESENTATION_UPDATE_COMPLETED,P,h),t.on(n.WALLCLOCK_TIME_UPDATED,D,h),t.on(n.MANIFEST_VALIDITY_CHANGED,N,h),h}s.__dashjs_factory_name="RepresentationController",t.default=a.default.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(6));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(e=e||{}).timelineConverter;return{getLiveEdge:function(e){return function(){if(!t||!t.hasOwnProperty("getExpectedLiveEdge"))throw new Error(i.default.MISSING_CONFIG_ERROR)}(),e.DVRWindow?e.DVRWindow.end:0},reset:function(){t=null}}}o.__dashjs_factory_name="LiveEdgeFinder",t.default=r.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(1)),i=u(n(258)),a=u(n(259)),o=u(n(260)),s=u(n(261));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){e=e||{};var t,n=this.context,r=e.events,u=e.eventBus,l=e.dashConstants,c=e.streamInfo,d=e.type,f=void 0;function h(e){return e?e.segments?f[l.SEGMENT_BASE]:f[e.segmentInfoType]:null}return t={initialize:function(t){f[l.SEGMENT_TIMELINE]=(0,i.default)(n).create(e,t),f[l.SEGMENT_TEMPLATE]=(0,a.default)(n).create(e,t),f[l.SEGMENT_LIST]=(0,o.default)(n).create(e,t),f[l.SEGMENT_BASE]=(0,s.default)(n).create(e,t)},update:function(e,t,n,i){n||u.trigger(r.SEGMENTBASE_INIT_REQUEST_NEEDED,{streamId:c.id,mediaType:d,mimeType:t,representation:e}),i||u.trigger(r.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{streamId:c.id,mediaType:d,mimeType:t,representation:e})},getSegmentByIndex:function(e,t,n){var r=h(e);return r?r.getSegmentByIndex(e,t,n):null},getSegmentByTime:function(e,t){var n=h(e);return n?n.getSegmentByTime(e,t):null}},f={},t}l.__dashjs_factory_name="SegmentsController";var c=r.default.getClassFactory(l);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1)),i=o(n(6)),a=n(33);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=(e=e||{}).timelineConverter;function r(){if(!n||!n.hasOwnProperty("calcMediaTimeFromPresentationTime")||!n.hasOwnProperty("calcSegmentAvailabilityRange"))throw new Error(i.default.MISSING_CONFIG_ERROR)}function o(e,r){var i,a,o,s=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,u=s.SegmentTimeline,l=s.SegmentURL_asArray,c=0,d=0,f=-1,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0;o=e.timescale;var _=!1;for(p=0,a=(i=u.S_asArray).length;p<a&&!_;p++){if(m=0,(h=i[p]).hasOwnProperty("r")&&(m=h.r),h.hasOwnProperty("t")&&(d=(c=h.t)/o),m<0){if((v=i[p+1])&&v.hasOwnProperty("t"))y=v.t/o;else{var T=e.segmentAvailabilityRange?e.segmentAvailabilityRange.end:n.calcSegmentAvailabilityRange(e,t).end;y=n.calcMediaTimeFromPresentationTime(T,e),e.segmentDuration=h.d/o}m=Math.ceil((y-d)/(h.d/o))-1}for(g=0;g<=m&&!_;g++)(_=r(c,d,s,l,h,o,++f,p))&&(e.segmentDuration=h.d/o,(g<m-1||p<a-1)&&f++),d=(c+=h.d)/o}e.availableSegmentsNumber=f}return{getSegmentByIndex:function(e,i,s){if(r(),!e)return null;var u=null,l=!1;return o(e,(function(r,i,o,c,d,f,h,p){if(l||s<0){var g=o.media,m=d.mediaRange;return c&&(g=c[p].media||"",m=c[p].mediaRange),u=(0,a.getTimeBasedSegment)(n,t,e,r,d.d,f,g,m,h,d.tManifest),!0}return i>=s-.5*d.d/f&&(l=!0),!1})),u},getSegmentByTime:function(e,i){if(r(),!e)return null;void 0===i&&(i=null);var s=null,u=n.calcMediaTimeFromPresentationTime(i,e);return o(e,(function(r,i,o,l,c,d,f,h){if(u<i+c.d/d){var p=o.media,g=c.mediaRange;return l&&(p=l[h].media||"",g=l[h].mediaRange),s=(0,a.getTimeBasedSegment)(n,t,e,r,c.d,d,p,g,f,c.tManifest),!0}return!1})),s}}}s.__dashjs_factory_name="TimelineSegmentsGetter";var u=r.default.getClassFactory(s);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1)),i=o(n(6)),a=n(33);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=(e=e||{}).timelineConverter;function r(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(i.default.MISSING_CONFIG_ERROR)}function o(e,i){if(r(),!e)return null;var o=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate;i=Math.max(i,0);var s=(0,a.getIndexBasedSegment)(n,t,e,i);if(s){s.replacementTime=Math.round((i-1)*e.segmentDuration*e.timescale,10);var u=o.media;u=(0,a.replaceTokenForTemplate)(u,"Number",s.replacementNumber),u=(0,a.replaceTokenForTemplate)(u,"Time",s.replacementTime),s.media=u}var l=e.segmentDuration,c=e.segmentAvailabilityRange;return isNaN(l)?e.availableSegmentsNumber=1:e.availableSegmentsNumber=Math.ceil((c.end-c.start)/l),s}return{getSegmentByIndex:o,getSegmentByTime:function(e,t){if(r(),!e)return null;var i=e.segmentDuration;if(isNaN(i))return null;var a=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return o(e,Math.floor(a/i))}}}s.__dashjs_factory_name="TemplateSegmentsGetter";var u=r.default.getClassFactory(s);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1)),i=o(n(6)),a=n(33);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=(e=e||{}).timelineConverter;function r(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(i.default.MISSING_CONFIG_ERROR)}function o(e,i){if(r(),!e)return null;var o=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,s=o.SegmentURL_asArray.length,u=e&&!isNaN(e.startNumber)?e.startNumber:1,l=Math.max(u-1,0),c=Math.max(i-l,0),d=null;if(c<s){var f=o.SegmentURL_asArray[c];(d=(0,a.getIndexBasedSegment)(n,t,e,i))&&(d.replacementTime=(u+i-1)*e.segmentDuration,d.media=f.media?f.media:"",d.mediaRange=f.mediaRange,d.index=i,d.indexRange=f.indexRange)}return e.availableSegmentsNumber=s,d}return{getSegmentByIndex:o,getSegmentByTime:function(e,t){if(r(),!e)return null;var i=e.segmentDuration;if(isNaN(i))return null;var a=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return o(e,Math.floor(a/i))}}}s.__dashjs_factory_name="ListSegmentsGetter";var u=r.default.getClassFactory(s);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(6));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(e=e||{}).timelineConverter;function n(){if(!t||!t.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(i.default.MISSING_CONFIG_ERROR)}function r(e,t){if(n(),!e)return null;var r=e.segments?e.segments.length:-1,i=void 0;if(t<r&&(i=e.segments[t])&&i.availabilityIdx===t)return i;for(var a=0;a<r;a++)if((i=e.segments[a])&&i.availabilityIdx===t)return i;return null}return{getSegmentByIndex:r,getSegmentByTime:function(e,t){return n(),r(e,function(e,t){if(!e)return-1;var n=e.segments,r=n?n.length:null,i=-1,a=void 0,o=void 0,s=void 0,u=void 0,l=void 0;if(n&&r>0)for(l=0;l<r;l++)if(s=(o=n[l]).presentationStartTime,t+(a=(u=o.duration)/2)>=s&&t-a<s+u){i=o.availabilityIdx;break}return i}(e,t))}}}o.__dashjs_factory_name="SegmentBaseGetter";var s=r.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(){var e=void 0,t=/^[a-z][a-z0-9+\-_.]*:/i,n=/^https?:\/\//i,r=/^https:\/\//i,i=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,a=function(e,t){try{return new window.URL(e,t).toString()}catch(t){return e}},o=function(e,t){var n=s;if(!t)return e;if(!c(e))return e;d(e)&&(n=u),f(e)&&(n=l);var r=n(t),i="/"!==r.charAt(r.length-1)&&"/"!==e.charAt(0)?"/":"";return[r,e].join(i)};function s(e){var t=e.indexOf("/"),n=e.lastIndexOf("/");return-1!==t?n===t+1?e:(-1!==e.indexOf("?")&&(e=e.substring(0,e.indexOf("?"))),e.substring(0,n+1)):""}function u(e){var t=e.match(i);return t?t[1]:""}function l(e){var n=e.match(t);return n?n[0]:""}function c(e){return!t.test(e)}function d(e){return c(e)&&"/"===e.charAt(0)}function f(e){return 0===e.indexOf("//")}return function(){try{new window.URL("x","http://y");e=a}catch(e){}finally{e=e||o}}(),{parseBaseUrl:s,parseOrigin:u,parseScheme:l,isRelative:c,isPathAbsolute:d,isSchemeRelative:f,isHTTPURL:function(e){return n.test(e)},isHTTPS:function(e){return r.test(e)},removeHostname:function(e){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(e)[2].substring(1)},resolve:function(t,n){return e(t,n)}}}o.__dashjs_factory_name="DefaultURLUtils",t.default=a.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(6)),i=h(n(264)),a=h(n(39)),o=h(n(265)),s=h(n(79)),u=h(n(9)),l=h(n(10)),c=h(n(17)),d=h(n(1)),f=h(n(8));function h(e){return e&&e.__esModule?e:{default:e}}function p(e){e=e||{};var t=this.context,n=(0,u.default)(t).getInstance(),d=e.errHandler,h=e.mediaPlayerModel,p=e.dashMetrics,g=(0,f.default)(t).getInstance(),m=e.streamInfo,y=void 0,v=void 0,_=void 0;function T(){for(var e in _)_[e].reset();_={}}function b(e){if(e.sender){var t=e.request,a=e.response,o=t.isInitializationRequest(),s=t.mediaInfo.streamInfo;if(e.error&&(t.mediaType!==r.default.AUDIO&&t.mediaType!==r.default.VIDEO&&t.mediaType!==r.default.FRAGMENTED_TEXT||n.trigger(l.default.SERVICE_LOCATION_BLACKLIST_ADD,{entry:e.request.serviceLocation})),a&&s){var u=function(e,t,n,r){var a=new i.default;return a.streamId=n,a.mediaInfo=t.mediaInfo,a.segmentType=t.type,a.start=t.startTime,a.duration=t.duration,a.end=a.start+a.duration,a.bytes=e,a.index=t.index,a.quality=t.quality,a.representationId=t.representationId,a.endFragment=r,a}(a,t,m.id,e.type!==l.default.FRAGMENT_LOADING_PROGRESS);n.trigger(o?l.default.INIT_FRAGMENT_LOADED:l.default.MEDIA_FRAGMENT_LOADED,{chunk:u,request:t},{streamId:s.id,mediaType:t.mediaType})}else v.warn("No "+t.mediaType+" bytes to push or stream is inactive.")}}return y={getStreamId:function(){return m.id},getModel:function(r){var i=_[r];return i||(i=(0,a.default)(t).create({streamInfo:m,type:r,dashMetrics:p,fragmentLoader:(0,o.default)(t).create({dashMetrics:p,mediaPlayerModel:h,errHandler:d,requestModifier:(0,s.default)(t).getInstance(),settings:e.settings,boxParser:e.boxParser,eventBus:n,events:l.default,errors:c.default,dashConstants:e.dashConstants,urlUtils:e.urlUtils}),debug:g,eventBus:n,events:l.default}),_[r]=i),i},reset:function(){n.off(l.default.FRAGMENT_LOADING_COMPLETED,b,this),n.off(l.default.FRAGMENT_LOADING_PROGRESS,b,this),T()}},v=g.getLogger(y),T(),n.on(l.default.FRAGMENT_LOADING_COMPLETED,b,y),n.on(l.default.FRAGMENT_LOADING_PROGRESS,b,y),y}p.__dashjs_factory_name="FragmentController",t.default=d.default.getClassFactory(p)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(6)),i=u(n(42)),a=u(n(275)),o=u(n(11)),s=u(n(1));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){e=e||{};var t=this.context,n=e.eventBus,s=e.events,u=e.urlUtils,l=e.errors,c=void 0,d=void 0;return c={checkForExistence:function(e){var t=function(t){n.trigger(s.CHECK_FOR_EXISTENCE_COMPLETED,{request:e,exists:t})};if(e){var r=new a.default(e.url);d.load({request:r,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)},load:function(e){var t=function(t,r){n.trigger(s.LOADING_COMPLETED,{request:e,response:t||null,error:r||null,sender:c})};e?d.load({request:e,progress:function(t){n.trigger(s.LOADING_PROGRESS,{request:e,stream:t.stream}),t.data&&n.trigger(s.LOADING_DATA_PROGRESS,{request:e,response:t.data||null,error:null,sender:c})},success:function(e){t(e)},error:function(e,n,r){t(void 0,new o.default(l.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,r,n))},abort:function(e){e&&n.trigger(s.LOADING_ABANDONED,{mediaType:e.mediaType,request:e,sender:c})}}):t(void 0,new o.default(l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},abort:function(){d&&d.abort()},reset:function(){d&&(d.abort(),d=null)}},d=(0,i.default)(t).create({errHandler:e.errHandler,errors:l,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,useFetch:e.settings.get().streaming.lowLatencyEnabled,urlUtils:u,constants:r.default,boxParser:e.boxParser,dashConstants:e.dashConstants,requestTimeout:e.settings.get().streaming.fragmentRequestTimeout}),c}l.__dashjs_factory_name="FragmentLoader",t.default=s.default.getClassFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=g(n(81)),i=g(n(267)),a=n(12),o=g(n(1)),s=g(n(11)),u=g(n(126)),l=g(n(43)),c=g(n(8)),d=g(n(9)),f=g(n(10)),h=g(n(34)),p=g(n(6));function g(e){return e&&e.__esModule?e:{default:e}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){e=e||{};var t,n=this.context,o=e.errHandler,g=e.dashMetrics,y=e.mediaPlayerModel,v=e.requestModifier,_=e.boxParser,T=e.useFetch||!1,b=e.errors,E=e.requestTimeout||0,S=(0,d.default)(n).getInstance(),A=(0,h.default)(n).getInstance(),C=void 0,w=void 0,I=void 0,R=void 0,O=void 0,P=void 0,D=void 0;function M(e,t){var u=e.request,c=[],d=!0,h=!0,m=new Date,b=m,C=0,N=void 0;if(!v||!g||!o)throw new Error("config object is not correct or missing");var L=function(e){h=!1,u.requestStartDate=m,u.requestEndDate=new Date,u.firstByteDate=u.firstByteDate||m,u.checkExistenceOnly||(g.addHttpRequest(u,N.response?N.response.responseURL:null,N.response?N.response.status:null,N.response&&N.response.getAllResponseHeaders?N.response.getAllResponseHeaders():N.response?N.response.responseHeaders:[],e?c:null),u.type===a.HTTPRequest.MPD_TYPE&&g.addManifestUpdate(u))},k=function(){if(-1!==w.indexOf(N)&&(w.splice(w.indexOf(N),1),h))if(L(!1),t>0){try{if(A.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&u.type===a.HTTPRequest.MEDIA_SEGMENT_TYPE)y.getRetryAttemptsForType(a.HTTPRequest.MEDIA_SEGMENT_TYPE)===t&&S.trigger(f.default.ATTEMPT_BACKGROUND_SYNC)}catch(e){}t--;var n={config:e};R.push(n),n.timeout=setTimeout((function(){-1!==R.indexOf(n)&&(R.splice(R.indexOf(n),1),M(e,t))}),y.getRetryIntervalsForType(u.type))}else{if(u.type===a.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;o.error(new s.default(O[u.type],u.url+" is not available",{request:u,response:N.response})),e.error&&e.error(u,"error",N.response.statusText),e.complete&&e.complete(u,N.response.statusText)}},x=void 0;x=T&&window.fetch&&"arraybuffer"===u.responseType&&u.type===a.HTTPRequest.MEDIA_SEGMENT_TYPE?(0,i.default)(n).create({requestModifier:v,boxParser:_}):(0,r.default)(n).create({requestModifier:v});var F=null,U=v.modifyRequestURL(u.url);if(A.get().streaming.cmcd&&A.get().streaming.cmcd.enabled){var B=A.get().streaming.cmcd.mode;if(B===p.default.CMCD_MODE_QUERY){var j=function(e){try{var t=[],n=P.getQueryParameter(e);return n&&t.push(n),t}catch(e){return[]}}(u);U=l.default.addAditionalQueryParameterToUrl(U,j)}else B===p.default.CMCD_MODE_HEADER&&(F=P.getHeaderParameters(u))}var H=u.checkExistenceOnly?a.HTTPRequest.HEAD:a.HTTPRequest.GET,G=y.getXHRWithCredentialsForType(u.type);N={url:U,method:H,withCredentials:G,request:u,onload:function(){N.response.status>=200&&N.response.status<=299&&(L(!0),e.success&&e.success(N.response.response,N.response.statusText,N.response.responseURL),e.complete&&e.complete(u,N.response.statusText))},onend:k,onerror:k,progress:function(t){var n=new Date;d&&(d=!1,(!t.lengthComputable||t.lengthComputable&&t.total!==t.loaded)&&(u.firstByteDate=n)),t.lengthComputable&&(u.bytesLoaded=t.loaded,u.bytesTotal=t.total),t.noTrace||(c.push({s:b,d:t.time?t.time:n.getTime()-b.getTime(),b:[t.loaded?t.loaded-C:0]}),b=n,C=t.loaded),e.progress&&t&&e.progress(t)},onabort:function(){e.abort&&e.abort(u)},ontimeout:function(e){var t=void 0;if(e.lengthComputable){var n=e.loaded/e.total*100;t="Request timeout: loaded: "+e.loaded+", out of: "+e.total+" : "+n.toFixed(3)+"% Completed"}else t="Request timeout: non-computable download size";D.warn(t)},loader:x,timeout:E,headers:F};var q=(new Date).getTime();if(isNaN(u.delayLoadingTime)||q>=u.delayLoadingTime)w.push(N),x.load(N);else{var V={httpRequest:N};I.push(V),V.delayTimeout=setTimeout((function(){if(-1!==I.indexOf(V)){I.splice(I.indexOf(V),1);try{m=new Date,b=m,w.push(V.httpRequest),x.load(V.httpRequest)}catch(e){V.httpRequest.onerror()}}}),u.delayLoadingTime-q)}}return C={load:function(e){e.request?M(e,y.getRetryAttemptsForType(e.request.type)):e.error&&e.error(e.request,"error")},abort:function(){R.forEach((function(e){clearTimeout(e.timeout),e.config.request&&e.config.abort&&e.config.abort(e.config.request)})),R=[],I.forEach((function(e){return clearTimeout(e.delayTimeout)})),I=[],w.forEach((function(e){e.request.type!==a.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE&&(e.onloadend=e.onerror=e.onprogress=void 0,e.loader.abort(e))})),w=[]}},D=(0,c.default)(n).getInstance().getLogger(C),w=[],I=[],R=[],P=(0,u.default)(n).getInstance(),m(t={},a.HTTPRequest.MPD_TYPE,b.DOWNLOAD_ERROR_ID_MANIFEST_CODE),m(t,a.HTTPRequest.XLINK_EXPANSION_TYPE,b.DOWNLOAD_ERROR_ID_XLINK_CODE),m(t,a.HTTPRequest.INIT_SEGMENT_TYPE,b.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),m(t,a.HTTPRequest.MEDIA_SEGMENT_TYPE,b.DOWNLOAD_ERROR_ID_CONTENT_CODE),m(t,a.HTTPRequest.INDEX_SEGMENT_TYPE,b.DOWNLOAD_ERROR_ID_CONTENT_CODE),m(t,a.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,b.DOWNLOAD_ERROR_ID_CONTENT_CODE),m(t,a.HTTPRequest.OTHER_TYPE,b.DOWNLOAD_ERROR_ID_CONTENT_CODE),O=t,C}y.__dashjs_factory_name="HTTPLoader";var v=o.default.getClassFactory(y);t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1)),i=o(n(34)),a=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){e=e||{};var t=this.context,n=e.requestModifier,r=e.boxParser,o=(0,i.default)(t).getInstance();function s(e,t){e.reader.read().then(t).catch((function(t){e.onerror&&200===e.response.status&&e.onerror(t)}))}function u(e,t,n,r,i){switch(e){case a.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING:return function(e,t){try{var n=void 0,r=void 0;n=e.filter((function(t,n){return n>0&&n<e.length-1})),r=t.filter((function(e,n){return n>0&&n<t.length-1}));var i=0;if(n.length>1){for(var a=0;a<n.length;a++){if(n[a]&&r[a])i+=r[a].ts-n[a].ts}return i}return null}catch(e){return null}}(t,n);case a.default.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA:default:return l(r,i)}}function l(e,t){try{if((e=e.filter((function(n){return n.bytes>t/4/e.length}))).length>1){var n=0,r=(e[e.length-1].ts-e[0].ts)/e.length;return e.forEach((function(t,i){var a=e[i+1];if(a){var o=a.ts-t.ts;n+=o<r?o:0}})),n}return null}catch(e){return null}}return{load:function(e){var t=new Date,i=e.request,l=new Headers;if(i.range&&l.append("Range","bytes="+i.range),e.headers)for(var c in e.headers){var d=e.headers[c];d&&l.append(c,d)}i.requestStartDate||(i.requestStartDate=t),n&&n.modifyRequestHeader({setRequestHeader:function(e,t){l.append(e,t)}});var f=void 0;"function"==typeof window.AbortController&&(f=new AbortController,e.abortController=f,f.signal.onabort=e.onabort);var h={method:e.method,headers:l,credentials:e.withCredentials?"include":void 0,signal:f?f.signal:void 0};fetch(e.url,h).then((function(t){e.response||(e.response={}),e.response.status=t.status,e.response.statusText=t.statusText,e.response.responseURL=t.url,t.ok||e.onerror();var n="",i=!0,l=!1,c=void 0;try{for(var d,f=t.headers.keys()[Symbol.iterator]();!(i=(d=f.next()).done);i=!0){var h=d.value;n+=h+": "+t.headers.get(h)+"\r\n"}}catch(e){l=!0,c=e}finally{try{!i&&f.return&&f.return()}finally{if(l)throw c}}if(e.response.responseHeaders=n,!t.body)return t.arrayBuffer().then((function(t){e.response.response=t;var n={loaded:t.byteLength,total:t.byteLength,stream:!1};e.progress(n),e.onload(),e.onend()}));var p=parseInt(t.headers.get("Content-Length"),10),g=0,m=!1,y=new Uint8Array,v=0;e.reader=t.body.getReader();var _=[],T=[],b=[],E=!0,S=o.get().streaming.abr.fetchThroughputCalculationMode;s(e,(function t(n){var i=n.value;if(n.done)return y&&(e.progress({loaded:g,total:isNaN(p)?g:p,lengthComputable:!0,time:u(S,T,b,_,g),stream:!0}),e.response.response=y.buffer),e.onload(),void e.onend();if(i&&i.length>0){if(y=function(e,t){if(0===e.length)return t;var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(y,i),g+=i.length,_.push({ts:Date.now(),bytes:i.length}),S===a.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&E)r.findLastTopIsoBoxCompleted(["moof"],y,v).found&&(E=!1,T.push({ts:performance.now(),bytes:i.length}));var o=r.findLastTopIsoBoxCompleted(["moov","mdat"],y,v);if(o.found){var l=o.lastCompletedOffset+o.size;S===a.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&(E=!0,b.push({ts:performance.now(),bytes:y.length}));var c=void 0;l===y.length?(c=y,y=new Uint8Array):(c=new Uint8Array(y.subarray(0,l)),y=y.subarray(l)),e.progress({data:c.buffer,lengthComputable:!1,noTrace:!0}),v=0}else v=o.lastCompletedOffset,m||(e.progress({lengthComputable:!1,noTrace:!0}),m=!0)}s(e,t)}))})).catch((function(t){e.onerror&&e.onerror(t)}))},abort:function(e){if(e.abortController)e.abortController.abort();else if(e.reader)try{e.reader.cancel(),e.onabort()}catch(e){}},calculateDownloadedTime:u}}s.__dashjs_factory_name="FetchLoader";var u=r.default.getClassFactory(s);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(15),o=(r=a)&&r.__esModule?r:{default:r};var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.codecs=null,this.codecPrivateData=null,this.segmentDuration=NaN,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=NaN,this.segmentAvailabilityRange=null,this.availableSegmentsNumber=0,this.bandwidth=NaN,this.width=NaN,this.height=NaN,this.scanType=null,this.maxPlayoutRate=NaN,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0}return i(e,[{key:"hasInitialization",value:function(){return null!==this.initialization||null!==this.range}},{key:"hasSegments",value:function(){return this.segmentInfoType!==o.default.BASE_URL&&this.segmentInfoType!==o.default.SEGMENT_BASE&&!this.indexRange}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.period=null,this.index=-1,this.type=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null};r.DEFAULT_ID="defaultId",t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.publishTime=null,this.minimumUpdatePeriod=NaN,this.mediaPresentationDuration=NaN}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0}},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,a=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var o,s,u,l=r(t),c=r(n);if(l&&c){if((s=t.length)!=n.length)return!1;for(o=s;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(l!=c)return!1;var d=t instanceof Date,f=n instanceof Date;if(d!=f)return!1;if(d&&f)return t.getTime()==n.getTime();var h=t instanceof RegExp,p=n instanceof RegExp;if(h!=p)return!1;if(h&&p)return t.toString()==n.toString();var g=i(t);if((s=g.length)!==i(n).length)return!1;for(o=s;0!=o--;)if(!a.call(n,g[o]))return!1;for(o=s;0!=o--;)if(!e(t[u=g[o]],n[u]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(26);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.checkForExistenceOnly=!0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(1)),i=l(n(6)),a=l(n(277)),o=l(n(83)),s=l(n(123)),u=n(33);function l(e){return e&&e.__esModule?e:{default:e}}function c(e){var t,n=this.context,r=e.streamInfo,l=void 0;function c(){l&&l.reset()}return t={getStreamId:function(){return r.id},provide:function(e,t){if("function"==typeof t){var n,r=l.getCurrentTrack(),i=void 0;if(!r||r.segmentDuration<=0||null==e)t(null);else{isNaN(r.segmentDuration)&&(i=l.getThumbnailRequestForTime(e))&&(r.segmentDuration=i.duration),n=e%r.segmentDuration;var o=Math.floor(n*r.tilesHor*r.tilesVert/r.segmentDuration),s=new a.default;if(s.width=Math.floor(r.widthPerTile),s.height=Math.floor(r.heightPerTile),s.x=Math.floor(o%r.tilesHor)*r.widthPerTile,s.y=Math.floor(o/r.tilesHor)*r.heightPerTile,"readThumbnail"in r)return r.readThumbnail(e,(function(e){s.url=e,t(s)}));if(i)s.url=i.url,r.segmentDuration=NaN;else{var c=Math.floor(e/r.segmentDuration);s.url=function(e,t){var n=t+e.startNumber,r=(0,u.replaceTokenForTemplate)(e.templateUrl,"Number",n);return r=(0,u.replaceTokenForTemplate)(r,"Time",(n-1)*e.segmentDuration*e.timescale),r=(0,u.replaceTokenForTemplate)(r,"Bandwidth",e.bandwidth),(0,u.unescapeDollarsInTemplate)(r)}(r,c)}t(s)}}},setTrackByIndex:function(e){l.setTrackByIndex(e)},getCurrentTrackIndex:function(){return l.getCurrentTrackIndex()},getBitrateList:function(){var e=l.getTracks(),t=0;return e.map((function(e){var n=new s.default;return n.mediaType=i.default.IMAGE,n.qualityIndex=t++,n.bitrate=e.bitrate,n.width=e.width,n.height=e.height,n}))},reset:c},c(),l=(0,o.default)(n).create({streamInfo:r,adapter:e.adapter,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:e.debug,eventBus:e.eventBus,events:e.events,dashConstants:e.dashConstants}),t}c.__dashjs_factory_name="ThumbnailController",t.default=r.default.getClassFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(11)),i=n(12),a=d(n(9)),o=d(n(10)),s=d(n(17)),u=d(n(1)),l=d(n(8)),c=d(n(21));function d(e){return e&&e.__esModule?e:{default:e}}function f(){var e=this.context,t=(0,a.default)(e).getInstance(),n=(0,c.default)(e).getInstance(),u=void 0,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0,b=void 0,E=void 0,S=void 0,A=void 0;function C(){y=[],v=[],_=null,T=null,E=null,b=NaN,f=!1,h=!1,S=p.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function w(){f||h||!E||!E.value||!E.schemeIdUri||isNaN(b)||isNaN(p.get().streaming.utcSynchronization.backgroundAttempts)||(T&&(Date.now()-T)/1e3<30||(y=[],h=!0,I(isNaN(p.get().streaming.utcSynchronization.backgroundAttempts)?2:p.get().streaming.utcSynchronization.backgroundAttempts)))}function I(e){try{if(e<=0)return void j();var t=Date.now();g[E.schemeIdUri](E.value,(function(n){var r=Date.now(),i=O(t,r,n);y.push(i),I(e-1)}),(function(){j()}))}catch(e){j()}}function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||0;if(!v||0===v.length||t>=v.length)P();else{var n=v[t];if(n)if(g.hasOwnProperty(n.schemeIdUri)){var r=(new Date).getTime();g[n.schemeIdUri](n.value,(function(e){var t=(new Date).getTime(),i=O(r,t,e);E=n,P(i)}),(function(){R(t+1)}))}else R(t+1);else P()}}function O(e,t,n){return n-(t-(t-e)/2)}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN,t=isNaN(e);t&&p.get().streaming.useManifestDateHeaderTimeSource?U():B(t,e)}function D(e){var t=Date.parse(e);return isNaN(t)&&(t=function(e){var t=void 0,n=void 0,r=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(e);return t=Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10),r[6]&&(parseInt(r[6],10)||0),r[7]&&1e3*parseFloat(r[7])||0),r[9]&&r[10]&&(n=60*parseInt(r[9],10)+parseInt(r[10],10),t+=("+"===r[8]?-1:1)*n*60*1e3),new Date(t).getTime()}(e)),t}function M(e){return Date.parse(e)}function N(e){return Date.parse(e)}function L(e,t,n){n()}function k(e,t,n){var r=D(e);isNaN(r)?n():t(r)}function x(e,t,r,a,o){var s,u,l=!1,c=new XMLHttpRequest,d=o?i.HTTPRequest.HEAD:i.HTTPRequest.GET,f=t.match(/\S+/g);if(t=f.shift(),s=function(){l||(l=!0,f.length?x(e,f.join(" "),r,a,o):a())},u=function(){var t=void 0,n=void 0;200===c.status&&(t=o?c.getResponseHeader("Date"):c.response,n=e(t),isNaN(n)||(r(n),l=!0))},n.isRelative(t)){var h=A.resolve();h&&(t=n.resolve(t,h.url))}c.open(d,t),c.timeout=5e3,c.onload=u,c.onloadend=s,c.send()}function F(e,t,n){x(N,e,t,n,!0)}function U(){var e=m.getLatestMPDRequestHeaderValueByID("Date"),t=null!==e?new Date(e).getTime():Number.NaN;isNaN(t)?B(!0):B(!1,t-Date.now())}function B(e,n){if(isNaN(b)||isNaN(n)||e||function(e){try{var t=H(e),n=isNaN(S)?30:S,r=isNaN(p.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:p.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,i=isNaN(p.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:p.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,a=isNaN(p.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:p.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts,o=void 0;t?(o=Math.min(n*r,i),d.debug("Increasing timeBetweenSyncAttempts to "+o)):(o=Math.max(n/r,a),d.debug("Decreasing timeBetweenSyncAttempts to "+o)),S=o}catch(e){}}(n),!e&&!isNaN(n)){_=Date.now(),f=!1;var i=isNaN(b);b=n,i&&w(),d.debug("Completed UTC sync. Setting client - server offset to "+n)}e&&(E=null),t.trigger(o.default.UPDATE_TIME_SYNC_OFFSET,{offset:n,error:e?new r.default(s.default.TIME_SYNC_FAILED_ERROR_CODE,s.default.TIME_SYNC_FAILED_ERROR_MESSAGE):null}),t.trigger(o.default.TIME_SYNCHRONIZATION_COMPLETED)}function j(){if(y&&0!==y.length){var e=y.reduce((function(e,t){return e+t}),0)/y.length;H(e)?d.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(d.debug("Completed background UTC sync. Setting client - server offset to "+e),b=e,t.trigger(o.default.UPDATE_TIME_SYNC_OFFSET,{offset:b})),h=!1,T=Date.now()}}function H(e){try{if(isNaN(b))return!0;var t=p.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(p.get().streaming.utcSynchronization.maximumAllowedDrift)?p.get().streaming.utcSynchronization.maximumAllowedDrift:100;return e>=b-t&&e<=b+t}catch(e){return!0}}return u={initialize:function(){C(),g={"urn:mpeg:dash:utc:http-head:2014":F,"urn:mpeg:dash:utc:http-xsdate:2014":x.bind(null,D),"urn:mpeg:dash:utc:http-iso:2014":x.bind(null,M),"urn:mpeg:dash:utc:direct:2014":k,"urn:mpeg:dash:utc:http-head:2012":F,"urn:mpeg:dash:utc:http-xsdate:2012":x.bind(null,D),"urn:mpeg:dash:utc:http-iso:2012":x.bind(null,M),"urn:mpeg:dash:utc:direct:2012":k,"urn:mpeg:dash:utc:http-ntp:2014":L,"urn:mpeg:dash:utc:ntp:2014":L,"urn:mpeg:dash:utc:sntp:2014":L}},attemptSync:function(e){v=e,f||(!function(){try{var e=isNaN(S)?30:S;return!(_&&e&&!isNaN(e))||(Date.now()-_)/1e3>=e}catch(e){return!0}}()?t.trigger(o.default.TIME_SYNCHRONIZATION_COMPLETED):(f=!0,R()))},setConfig:function(e){e&&(e.dashMetrics&&(m=e.dashMetrics),e.baseURLController&&(A=e.baseURLController),e.settings&&(p=e.settings))},reset:function(){C(),t.off(o.default.ATTEMPT_BACKGROUND_SYNC,w,u)}},d=(0,l.default)(e).getInstance().getLogger(u),t.on(o.default.ATTEMPT_BACKGROUND_SYNC,w,u),u}f.__dashjs_factory_name="TimeSyncController";var h=u.default.getSingletonFactory(f);h.HTTP_TIMEOUT_MS=5e3,u.default.updateSingletonFactory(f.__dashjs_factory_name,h),t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(8));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=void 0,t=void 0,n=this.context;return e={createMediaSource:function(){var e="WebKitMediaSource"in window;return"MediaSource"in window?new MediaSource:e?new WebKitMediaSource:null},attachMediaSource:function(e,t){var n=window.URL.createObjectURL(e);return t.setSource(n),n},detachMediaSource:function(e){e.setSource(null)},setDuration:function e(n,r){n&&"open"===n.readyState&&(null===r&&isNaN(r)||n.duration!==r&&(!function(e){for(var t=e.sourceBuffers,n=0;n<t.length;n++)if(t[n].updating)return!0;return!1}(n)?(t.info("Set MediaSource duration:"+r),n.duration=r):setTimeout(e.bind(null,n,r),50)))},setSeekable:function(e,t,n){e&&"function"==typeof e.setLiveSeekableRange&&"function"==typeof e.clearLiveSeekableRange&&"open"===e.readyState&&t>=0&&t<n&&(e.clearLiveSeekableRange(),e.setLiveSeekableRange(t,n))},signalEndOfStream:function(e){if(e&&"open"===e.readyState){for(var n=e.sourceBuffers,r=0;r<n.length;r++){if(n[r].updating)return;if(0===n[r].buffered.length)return}t.info("call to mediaSource endOfStream"),e.endOfStream()}}},t=(0,i.default)(n).getInstance().getLogger(e),e}o.__dashjs_factory_name="MediaSourceController",t.default=r.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(1)),i=u(n(8)),a=u(n(9)),o=u(n(31)),s=u(n(81));function u(e){return e&&e.__esModule?e:{default:e}}function l(){var e="urn:mpeg:dash:event:2012",t="discarded",n="updated",r="added",u=this.context,l=(0,a.default)(u).getInstance(),c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0;function b(){if(!m||!y)throw new Error("setConfig function has to be called previously")}function E(){T=!1,f={},h={},p=null,_=!1,g=Date.now()/1e3}function S(){try{null!==p&&T&&(clearInterval(p),p=null,T=!1,function(){try{R(h),R(f)}catch(e){}}())}catch(e){throw e}}function A(e,i){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.eventStream.schemeIdUri,s=e.eventStream.value,u=e.id,l=t;i[o]||(i[o]=[]);var c=i[o].findIndex((function(e){return(!s||e.eventStream.value&&e.eventStream.value===s)&&e.id===u}));return-1===c?(i[o].push(e),l=r):a&&(i[o][c]=e,l=n),l}function C(e){try{if(1==e.eventStream.value){var t=e.calculatedPresentationTime,n=void 0;n=4294967295==e.calculatedPresentationTime?NaN:e.calculatedPresentationTime+e.duration,l.trigger(o.default.MANIFEST_VALIDITY_CHANGED,{id:e.id,validUntil:t,newDuration:n,newManifestValidAfter:NaN},{mode:o.default.EVENT_MODE_ON_START})}}catch(e){}}function w(){try{if(!_){_=!0;var e=y.getTime(),t=e-g;t=g>0?Math.max(0,t):0,I(h,t,e),I(f,t,e),g=e,_=!1}}catch(e){_=!1}}function I(e,t,n){try{O(e,(function(r){if(void 0!==r){var i=isNaN(r.duration)?0:r.duration;r.calculatedPresentationTime<=n&&r.calculatedPresentationTime+t+i>=n?P(r,e,o.default.EVENT_MODE_ON_START):(function(e,t,n){try{return e-t>n}catch(e){return!1}}(n,i+t,r.calculatedPresentationTime)||function(e){try{var t=e.eventStream.period.start+e.eventStream.period.duration;return e.calculatedPresentationTime>t}catch(e){return!1}}(r))&&(d.debug("Deleting event "+r.id+" as it is expired or invalid"),D(e,r))}}))}catch(e){}}function R(e){try{var t=y.getTime();O(e,function(n){var r=n.eventStream&&n.eventStream.period&&!isNaN(n.eventStream.period.duration)?n.eventStream.period.duration:NaN,i=n.eventStream&&n.eventStream.period&&!isNaN(n.eventStream.period.start)?n.eventStream.period.start:NaN;if(!isNaN(r)&&!isNaN(i)){var a=n.calculatedPresentationTime;Math.abs(a-t)<300&&P(n,e,o.default.EVENT_MODE_ON_START)}}())}catch(e){}}function O(e,t){try{if(e)for(var n=Object.keys(e),r=0;r<n.length;r++){e[n[r]].forEach((function(e){void 0!==e&&t(e)}))}}catch(e){}}function P(t,n,r){try{var i=y.getTime(),a=t.id;if(r===o.default.EVENT_MODE_ON_RECEIVE)return d.debug("Received event "+a),void l.trigger(t.eventStream.schemeIdUri,{event:t},{mode:r});t.eventStream.schemeIdUri===e&&1===t.eventStream.value?0===t.duration&&0===t.presentationTimeDelta||(d.debug("Starting manifest refresh event "+a+" at "+i),D(n,t),function(){try{b(),m.refreshManifest()}catch(e){}}()):"urn:mpeg:dash:event:callback:2015"===t.eventStream.schemeIdUri&&1===t.eventStream.value?(d.debug("Starting callback event "+a+" at "+i),D(n,t),function(e){try{(0,s.default)(u).create({}).load({method:"get",url:e,request:{responseType:"arraybuffer"}})}catch(e){throw e}}(t.messageData)):(d.debug("Starting event "+a+" at "+i),D(n,t),l.trigger(t.eventStream.schemeIdUri,{event:t},{mode:r}))}catch(e){}}function D(e,t){var n=t.eventStream.schemeIdUri,r=t.eventStream.value,i=t.id;e[n]=e[n].filter((function(e){return r&&e.eventStream.value&&e.eventStream.value!==r||e.id!==i})),0===e[n].length&&delete e[n]}return c={addInlineEvents:function(e){try{if(b(),e)for(var t=0;t<e.length;t++){var i=e[t],a=A(i,f,!0);a===r?(d.debug("Added inline event with id "+i.id),P(i,e,o.default.EVENT_MODE_ON_RECEIVE)):a===n&&d.debug("Updated inline event with id "+i.id)}d.debug("Added "+e.length+" inline events")}catch(e){throw e}},addInbandEvents:function(t){try{b();for(var n=0;n<t.length;n++){var i=t[n];A(i,h,!1)===r?(i.eventStream.schemeIdUri===e&&void 0===h[i.id]&&C(i),d.debug("Added inband event with id "+i.id),P(i,t,o.default.EVENT_MODE_ON_RECEIVE)):d.debug("Inband event with scheme_id_uri "+i.eventStream.schemeIdUri+", value "+i.eventStream.value+" and id "+i.id+" was ignored because it has been added before.")}w()}catch(e){throw e}},getInbandEvents:function(){return h},getInlineEvents:function(){return f},start:function(){try{b(),d.debug("Start Event Controller");var e=v.get().streaming.eventControllerRefreshDelay;T||isNaN(e)||(T=!0,p=setInterval(w,e))}catch(e){throw e}},setConfig:function(e){try{if(!e)return;e.manifestUpdater&&(m=e.manifestUpdater),e.playbackController&&(y=e.playbackController),e.settings&&(v=e.settings)}catch(e){throw e}},reset:function(){S(),E()}},d=(0,i.default)(u).getInstance().getLogger(c),E(),c}l.__dashjs_factory_name="EventController",t.default=r.default.getSingletonFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(1)),i=s(n(8)),a=s(n(10)),o=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(){var e=this.context,t=(0,o.default)(e).getInstance(),n=void 0,r=void 0,s=void 0,u=void 0,l=void 0,c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0;function m(){g.debug("Stopping the gap controller"),l&&(clearInterval(l),l=null),function(){t.off(a.default.WALLCLOCK_TIME_UPDATED,_,this),t.off(a.default.PLAYBACK_SEEKING,v,this),t.off(a.default.BYTES_APPENDED_END_FRAGMENT,y,n)}(),l=null,c=NaN,u=0,p=null}function y(){l||function(){try{l||(g.debug("Starting the gap controller"),l=setInterval((function(){T()&&E(d.getTime())}),100))}catch(e){}}()}function v(){p&&(clearTimeout(p),p=null)}function _(){if(T()&&++u>=30){var e=d.getTime();r===e?E(e,!0):(r=e,c=NaN),u=0}}function T(){return s.get().streaming.jumpGaps&&f.getActiveStreamProcessors().length>0&&(!d.isSeeking()||f.hasStreamFinishedBuffering(f.getActiveStream()))&&!d.isPaused()&&!f.getIsStreamSwitchInProgress()&&!f.getHasMediaOrIntialisationError()}function b(e,t){try{if(!e||e.length<=1&&t>0)return NaN;for(var n=NaN,r=0;isNaN(n)&&r<e.length;){var i=r>0?e.end(r-1):0;t<e.start(r)&&i-t<.1&&(n=r),r+=1}return n}catch(e){return null}}function E(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=s.get().streaming.smallGapLimit,i=s.get().streaming.jumpLargeGaps,o=h.getBufferRange(),u=void 0,l=NaN,f=!1;if(u=b(o,e),!isNaN(u)){var m=o.start(u),y=m-e;y>0&&(y<=r||i)&&(l=m)}var v=d.getTimeToStreamEnd();if(isNaN(l)&&n&&isFinite(v)&&!isNaN(v)&&v<r&&(l=parseFloat(d.getStreamEndTime().toFixed(5)),f=!0),l>0&&c!==l&&l>e&&!p){var _=l-e;if(f)g.warn("Jumping to end of stream because of gap from "+e+" to "+l+". Gap duration: "+_),t.trigger(a.default.GAP_CAUSED_SEEK_TO_PERIOD_END,{seekTime:l,duration:_});else{var T=d.getIsDynamic(),E=u>0?o.end(u-1):e,S=T?1e3*_:0;p=window.setTimeout((function(){d.seek(l,!0,!0),g.warn("Jumping gap starting at "+E+" and ending at "+l+". Jumping by: "+_),t.trigger(a.default.GAP_CAUSED_INTERNAL_SEEK,{seekTime:l,duration:_}),p=null}),S)}c=l}}return n={reset:m,setConfig:function(e){e&&(e.settings&&(s=e.settings),e.playbackController&&(d=e.playbackController),e.streamController&&(f=e.streamController),e.videoModel&&(h=e.videoModel),e.timelineConverter&&e.timelineConverter,e.adapter&&e.adapter)},initialize:function(){!function(){t.on(a.default.WALLCLOCK_TIME_UPDATED,_,this),t.on(a.default.PLAYBACK_SEEKING,v,this),t.on(a.default.BYTES_APPENDED_END_FRAGMENT,y,n)}()}},g=(0,i.default)(e).getInstance().getLogger(n),m(),n}u.__dashjs_factory_name="GapController",t.default=r.default.getSingletonFactory(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(6)),i=u(n(10)),a=u(n(9)),o=u(n(1)),s=u(n(8));function u(e){return e&&e.__esModule?e:{default:e}}function l(){var e=this.context,t=(0,a.default)(e).getInstance(),n=void 0,o=void 0,u=void 0,l=void 0,c=void 0,d=void 0,f=[r.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,r.default.TRACK_SWITCH_MODE_NEVER_REPLACE],h=[r.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE,r.default.TRACK_SELECTION_MODE_FIRST_TRACK,r.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY,r.default.TRACK_SELECTION_MODE_WIDEST_RANGE];function p(e,t){if(!e||!t)return[];var n=t.id;return u[n]&&u[n][e]?u[n][e].list:[]}function g(e,t){return!e||!t||t&&!u[t.id]?null:u[t.id][e].current}function m(e,n){if(e&&e.streamInfo){var a=e.type,o=e.streamInfo,s=o.id,l=g(a,o);if(u[s]&&u[s][a]&&!E(e,l)&&(u[s][a].current=e,!u[s][a].current||n&&a===r.default.FRAGMENTED_TEXT||t.trigger(i.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:l,newMediaInfo:e,switchMode:_(a)}),!n)){var c=function(e){var t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration};return t.lang||t.viewpoint||t.role&&t.role.length>0||t.accessibility&&t.accessibility.length>0||t.audioChannelConfiguration&&t.audioChannelConfiguration.length>0?t:null}(e);if(!c||!u[s][a].storeLastSettings)return;c.roles&&(c.role=c.roles[0],delete c.roles),c.accessibility&&(c.accessibility=c.accessibility[0]),c.audioChannelConfiguration&&(c.audioChannelConfiguration=c.audioChannelConfiguration[0]),d.setSavedMediaSettings(a,c)}}}function y(e,t){e&&t&&(c[e]=t)}function v(e){return e?c[e]:null}function _(e){return l.get().streaming.trackSwitchMode[e]}function T(){return l.get().streaming.selectionModeForInitialTrack}function b(e){return e===r.default.AUDIO||e===r.default.VIDEO||e===r.default.TEXT||e===r.default.FRAGMENTED_TEXT||e===r.default.IMAGE}function E(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=e.id===t.id,r=e.viewpoint===t.viewpoint,i=e.lang===t.lang,a=e.roles.toString()===t.roles.toString(),o=e.accessibility.toString()===t.accessibility.toString(),s=e.audioChannelConfiguration.toString()===t.audioChannelConfiguration.toString();return n&&r&&i&&a&&o&&s}function S(){u={},c={audio:null,video:null,fragmentedText:null}}function A(e,t){var n=!e.lang||t.lang.match(e.lang),r=void 0===e.index||null===e.index||t.index===e.index,i=!e.viewpoint||e.viewpoint===t.viewpoint,a=!e.role||!!t.roles.filter((function(t){return t===e.role}))[0],o=!e.accessibility||!!t.accessibility.filter((function(t){return t===e.accessibility}))[0],s=!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter((function(t){return t===e.audioChannelConfiguration}))[0];return n&&r&&i&&a&&o&&s}function C(e){var t=0,n=[],r=void 0;return e.forEach((function(e){(r=Math.max.apply(Math,e.bitrateList.map((function(e){return e.bandwidth}))))>t?(t=r,n=[e]):r===t&&n.push(e)})),n}function w(e){var t=1/0,n=[],r=void 0;return e.forEach((function(e){var i=e.bitrateList.reduce((function(e,t){var n=Math.max(1,t.width*t.height);return e+t.bandwidth/n}),0);(r=i/e.bitrateList.length)<t?(t=r,n=[e]):r===t&&n.push(e)})),n}function I(e){var t=0,n=[],r=void 0;return e.forEach((function(e){(r=e.representationCount)>t?(t=r,n=[e]):r===t&&n.push(e)})),n}return n={checkInitialMediaSettingsForType:function(e,t){var n=v(e),r=p(e,t),i=[];n||y(e,n=d.getSavedMediaSettings(e)),r&&0!==r.length&&(n&&r.forEach((function(e){A(n,e)&&i.push(e)})),0===i.length?m(this.selectInitialTrack(e,r),!0):i.length>1?m(this.selectInitialTrack(e,i)):m(i[0]))},addTrack:function(e){if(e){var t=e.type;if(b(t)){var n=e.streamInfo.id;u[n]||(u[n]={audio:{list:[],storeLastSettings:!0,current:null},video:{list:[],storeLastSettings:!0,current:null},text:{list:[],storeLastSettings:!0,current:null},fragmentedText:{list:[],storeLastSettings:!0,current:null},image:{list:[],storeLastSettings:!0,current:null}});for(var r=u[n][t].list,i=0,a=r.length;i<a;++i)if(E(r[i],e))return;r.push(e);var o=v(t);o&&A(o,e)&&!g(t,e.streamInfo)&&m(e)}}},getTracksFor:p,getCurrentTrackFor:g,isCurrentTrack:function(e){if(!e)return!1;var t=e.type,n=e.streamInfo.id;return u[n]&&u[n][t]&&E(u[n][t].current,e)},setTrack:m,setInitialSettings:y,getInitialSettings:v,setSwitchMode:function(e,t){if(o.warn("deprecated: Please use updateSettings({streaming: { trackSwitchMode: mode } }) instead"),-1!==f.indexOf(t)){var n={};n[e]=t,l.update({streaming:{trackSwitchMode:n}})}else o.warn("Track switch mode is not supported: "+t)},getSwitchMode:_,selectInitialTrack:function(e,t){if(e===r.default.FRAGMENTED_TEXT)return t[0];var n=T(),i=[];switch(n){case r.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE:(i=C(t)).length>1&&(i=I(i));break;case r.default.TRACK_SELECTION_MODE_FIRST_TRACK:i.push(t[0]);break;case r.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:(i=w(t)).length>1&&(i=C(i));break;case r.default.TRACK_SELECTION_MODE_WIDEST_RANGE:(i=I(t)).length>1&&(i=C(t));break;default:o.warn("Track selection mode is not supported: "+n)}return i[0]},getTracksWithHighestBitrate:C,getTracksWithHighestEfficiency:w,getTracksWithWidestRange:I,setSelectionModeForInitialTrack:function(e){o.warn("deprecated: Please use updateSettings({streaming: { selectionModeForInitialTrack: mode } }) instead"),-1!==h.indexOf(e)?l.update({streaming:{selectionModeForInitialTrack:e}}):o.warn("Track selection mode is not supported: "+e)},getSelectionModeForInitialTrack:T,isMultiTrackSupportedByType:b,isTracksEqual:E,matchSettings:A,saveTextSettingsDisabled:function(){d.setSavedMediaSettings(r.default.FRAGMENTED_TEXT,null)},setConfig:function(e){e&&(e.domStorage&&(d=e.domStorage),e.settings&&(l=e.settings))},reset:S},o=(0,s.default)(e).getInstance().getLogger(n),S(),n}l.__dashjs_factory_name="MediaController";var c=o.default.getSingletonFactory(l);o.default.updateSingletonFactory(l.__dashjs_factory_name,c),t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(284)),i=c(n(285)),a=c(n(21)),o=c(n(129)),s=c(n(1)),u=c(n(9)),l=c(n(10));function c(e){return e&&e.__esModule?e:{default:e}}function d(){var e=void 0,t=void 0,n=this.context,s=(0,u.default)(n).getInstance(),c=(0,a.default)(n).getInstance(),d=void 0,f=void 0;function h(e){d.invalidateSelectedIndexes(e.entry)}return e={reset:function(){d.reset(),f.reset()},initialize:function(e){var n;d.setConfig({adapter:t}),n=e,d.update(n),f.chooseSelector(t.getIsDVB(n))},resolve:function(e){var t=d.getForPath(e).reduce((function(e,t){var n=f.select(t);return n?(c.isRelative(n.url)?e.url=c.resolve(n.url,e.url):(e.url=n.url,e.serviceLocation=n.serviceLocation),e.availabilityTimeOffset=n.availabilityTimeOffset,e.availabilityTimeComplete=n.availabilityTimeComplete,e):new o.default}),new o.default);if(!c.isRelative(t.url))return t},setConfig:function(e){e.baseURLTreeModel&&(d=e.baseURLTreeModel),e.baseURLSelector&&(f=e.baseURLSelector),e.adapter&&(t=e.adapter)}},d=(0,r.default)(n).create(),f=(0,i.default)(n).create(),s.on(l.default.SERVICE_LOCATION_BLACKLIST_CHANGED,h,e),e}d.__dashjs_factory_name="BaseURLController",t.default=s.default.getClassFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(130)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var o=NaN,s=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data={baseUrls:t||null,selectedIdx:n||o},this.children=[]};function u(){var e,t=void 0,n=void 0,i=this.context,a=(0,r.default)(i).getInstance();function u(e,t,r){var i=n.getBaseURLsFromElement(r);e[t]?a.areEqual(i,e[t].data.baseUrls)||(e[t].data.baseUrls=i,e[t].data.selectedIdx=o):e[t]=new s(i)}function l(e){!function(){if(!n||!n.hasOwnProperty("getBaseURLsFromElement")||!n.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")}();var r=n.getBaseURLsFromElement(e);a.areEqual(r,t.data.baseUrls)||(t.data.baseUrls=r,t.data.selectedIdx=o),e&&e.Period_asArray&&e.Period_asArray.forEach((function(e,r){u(t.children,r,e),e.AdaptationSet_asArray&&e.AdaptationSet_asArray.forEach((function(e,i){u(t.children[r].children,i,e),e.Representation_asArray&&e.Representation_asArray.sort(n.getRepresentationSortFunction()).forEach((function(e,n){u(t.children[r].children[i].children,n,e)}))}))}))}function c(e,n){var r=n||t;e(r.data),r.children&&r.children.forEach((function(t){return c(e,t)}))}function d(){t=new s}return e={reset:d,update:function(e){l(e)},getForPath:function(e){var n=t,r=[n.data];return e&&e.forEach((function(e){(n=n.children[e])&&r.push(n.data)})),r.filter((function(e){return e.baseUrls.length}))},invalidateSelectedIndexes:function(e){c((function(t){isNaN(t.selectedIdx)||e===t.baseUrls[t.selectedIdx].serviceLocation&&(t.selectedIdx=o)}))},setConfig:function(e){e.adapter&&(n=e.adapter)}},d(),e}u.__dashjs_factory_name="BaseURLTreeModel",t.default=i.default.getClassFactory(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(17)),i=f(n(9)),a=f(n(10)),o=f(n(286)),s=f(n(287)),u=f(n(288)),l=f(n(1)),c=f(n(11)),d=n(23);function f(e){return e&&e.__esModule?e:{default:e}}function h(){var e,t=this.context,n=(0,i.default)(t).getInstance(),l=void 0,f=void 0,h=void 0,p=void 0;function g(){l.reset()}return e={chooseSelector:function(e){(0,d.checkParameterType)(e,"boolean"),p=e?h:f},select:function(e){if(e){var t=e.baseUrls,i=e.selectedIdx;if(!isNaN(i))return t[i];var o=p.select(t);return o?(e.selectedIdx=t.indexOf(o),o):(n.trigger(a.default.URL_RESOLUTION_FAILED,{error:new c.default(r.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,r.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(p===f&&g()))}},reset:g,setConfig:function(e){e.selector&&(p=e.selector)}},l=(0,o.default)(t).create({updateEventName:a.default.SERVICE_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:a.default.SERVICE_LOCATION_BLACKLIST_ADD}),f=(0,u.default)(t).create({blacklistController:l}),h=(0,s.default)(t).create({blacklistController:l}),p=f,e}h.__dashjs_factory_name="BaseURLSelector",t.default=l.default.getClassFactory(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),i=a(n(9));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){e=e||{};var t=void 0,n=[],r=(0,i.default)(this.context).getInstance(),a=e.updateEventName,o=e.addBlacklistEventName;function s(e){-1===n.indexOf(e)&&(n.push(e),r.trigger(a,{entry:e}))}function u(e){s(e.entry)}return t={add:s,contains:function(e){return!!(n.length&&e&&e.length)&&-1!==n.indexOf(e)},reset:function(){n=[]}},o&&r.on(o,u,t),t}o.__dashjs_factory_name="BlackListController",t.default=r.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var t=(e=e||{}).blacklistController;return{select:function(e){return e&&function(e){var t=0,n=[],r=0,i=void 0,a=void 0;if((a=e.sort((function(e,t){var n=e.dvb_priority-t.dvb_priority;return isNaN(n)?0:n})).filter((function(e,t,n){return!t||n[0].dvb_priority&&e.dvb_priority&&n[0].dvb_priority===e.dvb_priority}))).length)return a.length>1&&(a.forEach((function(e){t+=e.dvb_weight,n.push(t)})),i=Math.floor(Math.random()*(t-1)),n.every((function(e,t){return r=t,!(i<e)}))),a[r]}((n=[],e.filter((function(e){return!t.contains(e.serviceLocation)||(e.dvb_priority&&n.push(e.dvb_priority),!1)})).filter((function(e){return!n.length||!e.dvb_priority||-1===n.indexOf(e.dvb_priority)}))));var n}}}o.__dashjs_factory_name="DVBSelector",t.default=a.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var t=(e=e||{}).blacklistController;return{select:function(e){var n=0,r=void 0;return e&&e.some((function(e,r){return n=r,!t.contains(e.serviceLocation)}))&&(r=e[n]),r}}}o.__dashjs_factory_name="BasicSelector",t.default=a.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=m(n(6)),i=m(n(15)),a=m(n(290)),o=m(n(42)),s=m(n(21)),u=m(n(132)),l=m(n(11)),c=n(12),d=m(n(9)),f=m(n(10)),h=m(n(17)),p=m(n(1)),g=m(n(292));function m(e){return e&&e.__esModule?e:{default:e}}function y(e){e=e||{};var t=this.context,n=e.debug,p=(0,d.default)(t).getInstance(),m=(0,s.default)(t).getInstance(),y=void 0,v=void 0,_=void 0,T=void 0,b=void 0,E=e.mssHandler,S=e.errHandler;function A(e){p.trigger(f.default.INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}return y={load:function(e){var i=new u.default(e,c.HTTPRequest.MPD_TYPE);_.load({request:i,success:function(i,a,o){if(T){var s=void 0,u=void 0,c=void 0;if(o&&o!==e?(u=m.parseBaseUrl(o),s=o):(m.isRelative(e)&&(e=m.resolve(e,window.location.href)),u=m.parseBaseUrl(e)),"No Content"!=a)if(null===b&&(b=function(e){var r=null;return e.indexOf("SmoothStreamingMedia")>-1?(E&&(r=E.createMssParser(),E.registerEvents()),r):e.indexOf("MPD")>-1||e.indexOf("Patch")>-1?(0,g.default)(t).create({debug:n}):r}(i)),null!==b){T.setMatchers(b.getMatchers()),T.setIron(b.getIron());try{c=b.parse(i)}catch(t){return void p.trigger(f.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new l.default(h.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,h.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+e)})}c?(c.url=s||e,c.originalUrl||(c.originalUrl=c.url),c.hasOwnProperty(r.default.LOCATION)&&(u=m.parseBaseUrl(c.Location_asArray[0]),v.debug("BaseURI set by Location to: "+u)),c.baseUri=u,c.loadedTime=new Date,T.resolveManifestOnLoad(c),p.trigger(f.default.ORIGINAL_MANIFEST_LOADED,{originalManifest:i})):p.trigger(f.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new l.default(h.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,h.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+e)})}else p.trigger(f.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new l.default(h.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,h.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+e)});else p.trigger(f.default.INTERNAL_MANIFEST_LOADED,{manifest:null})}},error:function(t,n,r){p.trigger(f.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new l.default(h.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,h.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+(e+", ")+r)})}})},reset:function(){p.off(f.default.XLINK_READY,A,y),E&&E.reset(),T&&(T.reset(),T=null),_&&(_.abort(),_=null)}},v=n.getLogger(y),p.on(f.default.XLINK_READY,A,y),_=(0,o.default)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,useFetch:e.settings.get().streaming.lowLatencyEnabled,urlUtils:m,constants:r.default,dashConstants:i.default,errors:h.default}),T=(0,a.default)(t).create({errHandler:S,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,settings:e.settings}),b=null,y}y.__dashjs_factory_name="ManifestLoader";var v=p.default.getClassFactory(y);t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(291)),i=c(n(9)),a=c(n(10)),o=c(n(1)),s=c(n(133)),u=c(n(21)),l=c(n(15));function c(e){return e&&e.__esModule?e:{default:e}}var d="onLoad";function f(e){e=e||{};var t=this.context,n=(0,i.default)(t).getInstance(),o=(0,u.default)(t).getInstance(),c=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0;function y(e,t,n){var r={},i=void 0,a=void 0;r.elements=e,r.type=t,r.resolveType=n,0===r.elements.length&&_(r);for(var s=0;s<r.elements.length;s++)i=r.elements[s],a=o.isHTTPURL(i.url)?i.url:i.originalContent.BaseURL+i.url,m.load(a,i,r)}function v(e){var t,n=void 0,r="";if(n=e.element,t=e.resolveObject,n.resolvedContent){var i=0;0===n.resolvedContent.indexOf("<?xml")&&(i=n.resolvedContent.indexOf("?>")+2),r=n.resolvedContent.substr(0,i)+"<response>"+n.resolvedContent.substr(i)+"</response>",n.resolvedContent=g.xml_str2json(r)}(function(e){var t=void 0;for(t=0;t<e.elements.length;t++)if(!1===e.elements[t].resolved)return!1;return!0})(t)&&_(t)}function _(e){var t=[],r=void 0,i=void 0;if(function(e){var t=[],n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0;for(a=e.elements.length-1;a>=0;a--){if(r=(n=e.elements[a]).type+"_asArray",n.resolvedContent){if(n.resolvedContent)for(o=0;o<n.resolvedContent[r].length;o++)i=n.resolvedContent[r][o],t.push(i)}else delete n.originalContent["xlink:actuate"],delete n.originalContent["xlink:href"],t.push(n.originalContent);for(n.parentElement[r].splice(n.index,1),s=0;s<t.length;s++)n.parentElement[r].splice(n.index+s,0,t[s]);t=[]}e.elements.length>0&&h.run(p)}(e),"onActuate"===e.resolveType&&n.trigger(a.default.XLINK_READY,{manifest:p}),e.resolveType===d)switch(e.type){case l.default.PERIOD:for(r=0;r<p[l.default.PERIOD+"_asArray"].length;r++)(i=p[l.default.PERIOD+"_asArray"][r]).hasOwnProperty(l.default.ADAPTATION_SET+"_asArray")&&(t=t.concat(T(i[l.default.ADAPTATION_SET+"_asArray"],i,l.default.ADAPTATION_SET,d))),i.hasOwnProperty(l.default.EVENT_STREAM+"_asArray")&&(t=t.concat(T(i[l.default.EVENT_STREAM+"_asArray"],i,l.default.EVENT_STREAM,d)));y(t,l.default.ADAPTATION_SET,d);break;case l.default.ADAPTATION_SET:n.trigger(a.default.XLINK_READY,{manifest:p})}}function T(e,t,n,r){var i=[],a=void 0,o=void 0,s=void 0;for(o=e.length-1;o>=0;o--)(a=e[o]).hasOwnProperty("xlink:href")&&"urn:mpeg:dash:resolve-to-zero:2013"===a["xlink:href"]&&e.splice(o,1);for(o=0;o<e.length;o++)(a=e[o]).hasOwnProperty("xlink:href")&&a.hasOwnProperty("xlink:actuate")&&a["xlink:actuate"]===r&&(s=b(a["xlink:href"],t,n,o,r,a),i.push(s));return i}function b(e,t,n,r,i,a){return{url:e,parentElement:t,type:n,index:r,resolveType:i,originalContent:a,resolvedContent:null,resolved:!1}}return c={resolveManifestOnLoad:function(e){g=new s.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:f}),(p=e).Period_asArray?y(T(p.Period_asArray,p,l.default.PERIOD,d),l.default.PERIOD,d):n.trigger(a.default.XLINK_READY,{manifest:p})},setMatchers:function(e){e&&(f=e)},setIron:function(e){e&&(h=e)},reset:function(){n.off(a.default.XLINK_ELEMENT_LOADED,v,c),m&&(m.reset(),m=null)}},n.on(a.default.XLINK_ELEMENT_LOADED,v,c),m=(0,r.default)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,settings:e.settings}),c}f.__dashjs_factory_name="XlinkController",t.default=o.default.getClassFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(11)),i=d(n(42)),a=n(12),o=d(n(132)),s=d(n(9)),u=d(n(10)),l=d(n(1)),c=d(n(17));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){e=e||{};var t=this.context,n=(0,s.default)(t).getInstance(),l=(0,i.default)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,useFetch:e.settings?e.settings.get().streaming.lowLatencyEnabled:null,errors:c.default});return{load:function(e,t,i){var s=function(a,o){t.resolved=!0,t.resolvedContent=a||null,n.trigger(u.default.XLINK_ELEMENT_LOADED,{element:t,resolveObject:i,error:a||o?null:new r.default(c.default.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,c.default.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+e)})};if("urn:mpeg:dash:resolve-to-zero:2013"===e)s(null,!0);else{var d=new o.default(e,a.HTTPRequest.XLINK_EXPANSION_TYPE);l.load({request:d,success:function(e){s(e)},error:function(){s(null)}})}},reset:function(){l&&(l.abort(),l=null)}}}f.__dashjs_factory_name="XlinkLoader",t.default=l.default.getClassFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(1)),i=f(n(293)),a=f(n(133)),o=f(n(294)),s=f(n(295)),u=f(n(296)),l=f(n(297)),c=f(n(298)),d=f(n(300));function f(e){return e&&e.__esModule?e:{default:e}}function h(e){e=e||{};var t=this.context,n=e.debug,r=void 0,f=void 0,h=void 0,p=void 0,g=void 0;return r={parse:function(e){var t=void 0,n=window.performance.now();if(!(t=p.xml_str2json(e)))throw new Error("parsing the manifest failed");var r=window.performance.now();t.Patch?((t=t.Patch).add_asArray&&t.add_asArray.forEach((function(e){return g.run(e)})),t.replace_asArray&&t.replace_asArray.forEach((function(e){return g.run(e)}))):(t=t.MPD,g.run(t));var i=window.performance.now();return f.info("Parsing complete: ( xml2json: "+(r-n).toPrecision(3)+"ms, objectiron: "+(i-r).toPrecision(3)+"ms, total: "+((i-n)/1e3).toPrecision(3)+"s)"),t.protocol="DASH",t},getMatchers:function(){return h},getIron:function(){return g}},f=n.getLogger(r),h=[new s.default,new u.default,new l.default,new o.default],p=new a.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!1,matchers:h}),g=(0,i.default)(t).create({adaptationset:new c.default,period:new d.default}),r}h.__dashjs_factory_name="DashParser",t.default=r.default.getClassFactory(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=n(1),o=(r=a)&&r.__esModule?r:{default:r};function s(e){function t(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function n(e,n,r){for(var a=0,o=e.length;a<o;++a){var s=e[a];if(n[s.name])if(r[s.name]){if(s.merge){var u=n[s.name],l=r[s.name];"object"===(void 0===u?"undefined":i(u))&&"object"===(void 0===l?"undefined":i(l))?t(u,l):r[s.name]=u+l}}else r[s.name]=n[s.name]}}function r(e,t){for(var i=0,a=e.children.length;i<a;++i){var o=e.children[i],s=t[o.name+"_asArray"];if(s)for(var u=0,l=s.length;u<l;++u){var c=s[u];n(e.properties,t,c),r(o,c)}}}return{run:function(t){if(null===t||"object"!==(void 0===t?"undefined":i(t)))return t;if(t.Period_asArray&&"period"in e)for(var n=e.period,a=t.Period_asArray,o=0,s=a.length;o<s;++o){var u=a[o];if(r(n,u),"adaptationset"in e){var l=u.AdaptationSet_asArray;if(l)for(var c=e.adaptationset,d=0,f=l.length;d<f;++d)r(c,l[d])}}return t}}}s.__dashjs_factory_name="ObjectIron";var u=o.default.getClassFactory(s);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(60)),i=a(n(15));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(function(e,t){var n,r=(o(n={},i.default.MPD,[i.default.ID,i.default.PROFILES]),o(n,i.default.PERIOD,[i.default.ID]),o(n,i.default.BASE_URL,[i.default.SERVICE_LOCATION,i.default.BYTE_RANGE]),o(n,i.default.SEGMENT_BASE,[i.default.INDEX_RANGE]),o(n,i.default.INITIALIZATION,[i.default.RANGE]),o(n,i.default.REPRESENTATION_INDEX,[i.default.RANGE]),o(n,i.default.SEGMENT_LIST,[i.default.INDEX_RANGE]),o(n,i.default.BITSTREAM_SWITCHING,[i.default.RANGE]),o(n,i.default.SEGMENT_URL,[i.default.MEDIA_RANGE,i.default.INDEX_RANGE]),o(n,i.default.SEGMENT_TEMPLATE,[i.default.INDEX_RANGE,i.default.MEDIA,i.default.INDEX,i.default.INITIALIZATION_MINUS,i.default.BITSTREAM_SWITCHING_MINUS]),o(n,i.default.ASSET_IDENTIFIER,[i.default.VALUE,i.default.ID]),o(n,i.default.EVENT_STREAM,[i.default.VALUE]),o(n,i.default.ADAPTATION_SET,[i.default.PROFILES,i.default.MIME_TYPE,i.default.SEGMENT_PROFILES,i.default.CODECS,i.default.CONTENT_TYPE]),o(n,i.default.FRAME_PACKING,[i.default.VALUE,i.default.ID]),o(n,i.default.AUDIO_CHANNEL_CONFIGURATION,[i.default.VALUE,i.default.ID]),o(n,i.default.CONTENT_PROTECTION,[i.default.VALUE,i.default.ID]),o(n,i.default.ESSENTIAL_PROPERTY,[i.default.VALUE,i.default.ID]),o(n,i.default.SUPPLEMENTAL_PROPERTY,[i.default.VALUE,i.default.ID]),o(n,i.default.INBAND_EVENT_STREAM,[i.default.VALUE,i.default.ID]),o(n,i.default.ACCESSIBILITY,[i.default.VALUE,i.default.ID]),o(n,i.default.ROLE,[i.default.VALUE,i.default.ID]),o(n,i.default.RATING,[i.default.VALUE,i.default.ID]),o(n,i.default.VIEWPOINT,[i.default.VALUE,i.default.ID]),o(n,i.default.CONTENT_COMPONENT,[i.default.CONTENT_TYPE]),o(n,i.default.REPRESENTATION,[i.default.ID,i.default.DEPENDENCY_ID,i.default.MEDIA_STREAM_STRUCTURE_ID]),o(n,i.default.SUBSET,[i.default.ID]),o(n,i.default.METRICS,[i.default.METRICS_MINUS]),o(n,i.default.REPORTING,[i.default.VALUE,i.default.ID]),n);if(r.hasOwnProperty(t)){var a=r[t];return void 0!==a&&a.indexOf(e.name)>=0}return!1}),(function(e){return String(e)})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(60)),i=o(n(6)),a=o(n(15));function o(e){return e&&e.__esModule?e:{default:e}}var s=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(function(e){for(var t=[a.default.MIN_BUFFER_TIME,a.default.MEDIA_PRESENTATION_DURATION,a.default.MINIMUM_UPDATE_PERIOD,a.default.TIMESHIFT_BUFFER_DEPTH,a.default.MAX_SEGMENT_DURATION,a.default.MAX_SUBSEGMENT_DURATION,a.default.SUGGESTED_PRESENTATION_DELAY,a.default.START,i.default.START_TIME,a.default.DURATION],n=t.length,r=0;r<n;r++)if(e.nodeName===t[r])return s.test(e.value);return!1}),(function(e){var t=s.exec(e),n=31536e3*parseFloat(t[3]||0)+2592e3*parseFloat(t[5]||0)+86400*parseFloat(t[7]||0)+3600*parseFloat(t[9]||0)+60*parseFloat(t[11]||0)+parseFloat(t[13]||0);return void 0!==t[1]&&(n=-n),n})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(60),a=(r=i)&&r.__esModule?r:{default:r};var o=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/,s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(function(e){return o.test(e.value)}),(function(e){var t=o.exec(e),n=void 0;if(n=Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),t[6]&&parseInt(t[6],10)||0,t[7]&&1e3*parseFloat(t[7])||0),t[9]&&t[10]){var r=60*parseInt(t[9],10)+parseInt(t[10],10);n+=("+"===t[8]?-1:1)*r*60*1e3}return new Date(n)})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(a.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(60),a=(r=i)&&r.__esModule?r:{default:r};var o=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(function(e){return o.test(e.value)}),(function(e){return parseFloat(e)})))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(a.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(134)),i=a(n(15));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=[i.default.PROFILES,i.default.WIDTH,i.default.HEIGHT,i.default.SAR,i.default.FRAMERATE,i.default.AUDIO_SAMPLING_RATE,i.default.MIME_TYPE,i.default.SEGMENT_PROFILES,i.default.CODECS,i.default.MAXIMUM_SAP_PERIOD,i.default.START_WITH_SAP,i.default.MAX_PLAYOUT_RATE,i.default.CODING_DEPENDENCY,i.default.SCAN_TYPE,i.default.FRAME_PACKING,i.default.AUDIO_CHANNEL_CONFIGURATION,i.default.CONTENT_PROTECTION,i.default.ESSENTIAL_PROPERTY,i.default.SUPPLEMENTAL_PROPERTY,i.default.INBAND_EVENT_STREAM];return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,i.default.ADAPTATION_SET,e,[new r.default(i.default.REPRESENTATION,e,[new r.default(i.default.SUB_REPRESENTATION,e)])]))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n;this._name=t,this._merge=(n=t)&&n.length&&n.charAt(0)===n.charAt(0).toUpperCase()}return r(e,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(134)),i=a(n(15));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=[i.default.SEGMENT_BASE,i.default.SEGMENT_TEMPLATE,i.default.SEGMENT_LIST];return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,i.default.PERIOD,e,[new r.default(i.default.ADAPTATION_SET,e,[new r.default(i.default.REPRESENTATION,e)])]))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(9)),i=o(n(10)),a=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=(0,r.default)(e).getInstance();return{error:function(e){t.trigger(i.default.ERROR,{error:e})}}}s.__dashjs_factory_name="ErrorHandler",t.default=a.default.getSingletonFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1)),i=o(n(8)),a=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=void 0,n=void 0,r=void 0,o=void 0,s=void 0,u=void 0;function l(e,t){var i=n.getRealPeriodByIndex(t?t.index:null);i&&i.AdaptationSet_asArray&&0!==i.AdaptationSet_asArray.length&&(i.AdaptationSet_asArray=i.AdaptationSet_asArray.filter((function(t){return!t.Representation_asArray||0===t.Representation_asArray.length||!n.getIsTypeOf(t,e)||(t.Representation_asArray=t.Representation_asArray.filter((function(e,i){var a=n.getCodec(t,i,!0);return!!r.supportsCodec(a)||(s.error("[Stream] codec not supported: "+a),!1)})),t.Representation_asArray&&t.Representation_asArray.length>0)})))}return t={setConfig:function(e){e&&(e.adapter&&(n=e.adapter),e.capabilities&&(r=e.capabilities),e.settings&&(o=e.settings))},filterUnsupportedFeaturesOfPeriod:function(e){l(a.default.VIDEO,e),l(a.default.AUDIO,e),o.get().streaming.filterUnsupportedEssentialProperties&&function(e){var t=n.getRealPeriodByIndex(e?e.index:null);if(!t||!t.AdaptationSet_asArray||0===t.AdaptationSet_asArray.length)return;t.AdaptationSet_asArray=t.AdaptationSet_asArray.filter((function(e){return!e.Representation_asArray||0===e.Representation_asArray.length||(e.Representation_asArray=e.Representation_asArray.filter((function(e){var t=n.getEssentialPropertiesForRepresentation(e);if(t&&t.length>0)for(var i=0;i<t.length;){if(!r.supportsEssentialProperty(t[i]))return s.debug("[Stream] EssentialProperty not supported: "+t[i].schemeIdUri),!1;i+=1}return!0})),e.Representation_asArray&&e.Representation_asArray.length>0)}))}(e),function(e){if(!u||0===u.length)return;var t=n.getRealPeriodByIndex(e?e.index:null);if(!t||!t.AdaptationSet_asArray||0===t.AdaptationSet_asArray.length)return;t.AdaptationSet_asArray=t.AdaptationSet_asArray.filter((function(e){return!e.Representation_asArray||0===e.Representation_asArray.length||(e.Representation_asArray=e.Representation_asArray.filter((function(e){return!u.some((function(t){return!t(e)}))})),e.Representation_asArray&&e.Representation_asArray.length>0)}))}(e)},setCustomCapabilitiesFilters:function(e){u=e}},s=(0,i.default)(e).getInstance().getLogger(t),t}s.__dashjs_factory_name="CapabilitiesFilter",t.default=r.default.getSingletonFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(304)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=void 0;return{initialize:function(t){if(e=new r.default,!t)return null;var n=t.indexOf("#");if(-1!==n)for(var i=t.substr(n+1).split("&"),a=0,o=i.length;a<o;++a){var s=i[a],u=s.indexOf("=");if(-1!==u){var l=s.substring(0,u);e.hasOwnProperty(l)&&(e[l]=s.substr(u+1))}}},getURIFragmentData:function(){return e}}}o.__dashjs_factory_name="URIFragmentModel",t.default=i.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(9)),i=o(n(10)),a=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=(0,r.default)(e).getInstance(),n=void 0;return{getValue:function(){return n},setValue:function(e){n=e,e&&t.trigger(i.default.MANIFEST_LOADED,{data:e})}}}s.__dashjs_factory_name="ManifestModel",t.default=a.default.getSingletonFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(127)),i=l(n(1)),a=l(n(6)),o=l(n(122)),s=l(n(34)),u=n(23);function l(e){return e&&e.__esModule?e:{default:e}}function c(){var e,t=void 0,n=void 0,i=void 0,l=this.context,c=(0,s.default)(l).getInstance();function d(e){var t=void 0;for(t=0;t<i.length;t++)if(i[t].rulename===e)return t;return-1}function f(){return c.get().streaming.lowLatencyEnabled?c.get().streaming.liveDelay||3:c.get().streaming.liveDelay}function h(e,n){p(e,n);var i=new r.default;i.schemeIdUri=e,i.value=n,t.push(i)}function p(e,n){(0,u.checkParameterType)(e,"string"),(0,u.checkParameterType)(n,"string"),t.forEach((function(r,i){r.schemeIdUri===e&&r.value===n&&t.splice(i,1)}))}return e={getABRCustomRules:function(){return i},addABRCustomRule:function(e,t,n){if("string"!=typeof e||e!==o.default.ABANDON_FRAGMENT_RULES&&e!==o.default.QUALITY_SWITCH_RULES||"string"!=typeof t)throw a.default.BAD_ARGUMENT_ERROR;var r=d(t);-1===r?i.push({type:e,rulename:t,rule:n}):(i[r].type=e,i[r].rule=n)},removeABRCustomRule:function(e){if(e){var t=d(e);-1!==t&&i.splice(t,1)}else i=[]},getStableBufferTime:function(){if(c.get().streaming.lowLatencyEnabled)return.6*f();var e=c.get().streaming.stableBufferTime;return e>-1?e:c.get().streaming.fastSwitchEnabled?20:12},getRetryAttemptsForType:function(e){var t=isNaN(c.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?5:c.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return c.get().streaming.lowLatencyEnabled?c.get().streaming.retryAttempts[e]*t:c.get().streaming.retryAttempts[e]},getRetryIntervalsForType:function(e){var t=isNaN(c.get().streaming.retryIntervals.lowLatencyReductionFactor)?10:c.get().streaming.retryIntervals.lowLatencyReductionFactor;return c.get().streaming.lowLatencyEnabled?c.get().streaming.retryIntervals[e]/t:c.get().streaming.retryIntervals[e]},getLiveDelay:f,getLiveCatchupLatencyThreshold:function(){try{var e=c.get().streaming.liveCatchup.latencyThreshold,t=f();if(null!==e&&!isNaN(e))return Math.max(e,t);var n=c.get().streaming.liveCatchup.minDrift,r=!isNaN(t)&&t?isNaN(n)?f():c.get().streaming.liveCatchup.minDrift+f():NaN;return r&&!isNaN(r)?Math.max(4*r,5):NaN}catch(e){return NaN}},addUTCTimingSource:h,removeUTCTimingSource:p,getUTCTimingSources:function(){return t},clearDefaultUTCTimingSources:function(){t=[]},restoreDefaultUTCTimingSources:function(){var e=c.get().streaming.utcSynchronization.defaultTimingSource;h(e.scheme,e.value)},setXHRWithCredentialsForType:function e(t,r){t?n[t]=!!r:Object.keys(n).forEach((function(t){e(t,r)}))},getXHRWithCredentialsForType:function(e){var t=n[e];return void 0===t?n.default:t},getDefaultUtcTimingSource:function(){return c.get().streaming.utcSynchronization.defaultTimingSource},reset:function(){}},t=[],n={default:!1},i=[],e}c.__dashjs_factory_name="MediaPlayerModel",t.default=i.default.getSingletonFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(1)),i=s(n(9)),a=s(n(10)),o=s(n(8));function s(e){return e&&e.__esModule?e:{default:e}}function u(){var e=void 0,t=void 0,n=void 0,r=void 0,s=void 0,u=this.context,l=(0,i.default)(u).getInstance(),c=[];function d(){n&&(n.playbackRate=s||1,n.removeEventListener("canplay",d))}function f(e){n&&(n.readyState<=2&&e>0?n.addEventListener("canplay",d):n.playbackRate=e)}function h(){return c.length>0}function p(e){var t=c.indexOf(e),r=void 0;null!==e&&(-1!==t&&c.splice(t,1),n&&!1===h()&&0===n.playbackRate&&(f(s||1),n.paused||((r=document.createEvent("Event")).initEvent("playing",!0,!1),n.dispatchEvent(r))))}function g(){if(n&&h()&&0===n.playbackRate){var e=document.createEvent("Event");e.initEvent("waiting",!0,!1),n.dispatchEvent(e)}}function m(){return n?n.buffered:null}function y(e,t,r,i,a){if(n)for(var o=0;o<n.textTracks.length;o++)if(n.textTracks[o].kind===e&&(!t||n.textTracks[o].label==t)&&n.textTracks[o].language===r&&n.textTracks[o].isTTML===i&&n.textTracks[o].isEmbedded===a)return n.textTracks[o];return null}return e={initialize:function(){l.on(a.default.PLAYBACK_PLAYING,g,this)},setCurrentTime:function(e,t){if(n){if(n.currentTime==e)return;try{e=t?function(e){var t=m(),n=e,r=9999999999;if(t)for(var i=0;i<t.length;i++){var a=t.start(i),o=t.end(i),s=Math.abs(a-e),u=Math.abs(o-e);if(e>=a&&e<=o)return e;s<r&&(r=s,n=a),u<r&&(r=u,n=o)}return n}(e):e,n.currentTime=e}catch(t){0===n.readyState&&t.code===t.INVALID_STATE_ERR&&setTimeout((function(){n.currentTime=e}),400)}}},play:function(){if(n){n.autoplay=!0;var e=n.play();e&&e.catch&&"undefined"!=typeof Promise&&e.catch((function(e){"NotAllowedError"===e.name&&l.trigger(a.default.PLAYBACK_NOT_ALLOWED),t.warn("Caught pending play exception - continuing ("+e+")")}))}},isPaused:function(){return n?n.paused:null},pause:function(){n&&(n.pause(),n.autoplay=!1)},isStalled:h,isSeeking:function(){return n?n.seeking:null},getTime:function(){return n?n.currentTime:null},getPlaybackRate:function(){return n?n.playbackRate:null},setPlaybackRate:f,getPlayedRanges:function(){return n?n.played:null},getEnded:function(){return n?n.ended:null},setStallState:function(e,t){!function(e,t){t?function(e){var t=void 0;if(null===e||!n||n.seeking||-1!==c.indexOf(e))return;c.push(e),n&&1===c.length&&((t=document.createEvent("Event")).initEvent("waiting",!0,!1),s=n.playbackRate,f(0),n.dispatchEvent(t))}(e):p(e)}(e,t)},getElement:function(){return n},setElement:function(e){if(!(null==e||e&&/^(VIDEO|AUDIO)$/i.test(e.nodeName)))throw"element is not video or audio DOM type!";(n=e)&&(n.preload="auto")},setSource:function(e){n&&(e?n.src=e:(n.removeAttribute("src"),n.load()))},getSource:function(){return n?n.src:null},getTTMLRenderingDiv:function(){return r},setTTMLRenderingDiv:function(e){(r=e).style.position="absolute",r.style.display="flex",r.style.overflow="hidden",r.style.pointerEvents="none",r.style.top=0,r.style.left=0},getPlaybackQuality:function(){if(!n)return null;var e="webkitDroppedFrameCount"in n&&"webkitDecodedFrameCount"in n,t=null;return"getVideoPlaybackQuality"in n?t=n.getVideoPlaybackQuality():e&&(t={droppedVideoFrames:n.webkitDroppedFrameCount,totalVideoFrames:n.webkitDroppedFrameCount+n.webkitDecodedFrameCount,creationTime:new Date}),t},addEventListener:function(e,t){n&&n.addEventListener(e,t)},removeEventListener:function(e,t){n&&n.removeEventListener(e,t)},getReadyState:function(){return n?n.readyState:NaN},getBufferRange:m,getClientWidth:function(){return n?n.clientWidth:NaN},getClientHeight:function(){return n?n.clientHeight:NaN},getTextTracks:function(){return n?n.textTracks:[]},getTextTrack:y,addTextTrack:function(e,t,r,i,a){if(!n)return null;var o=y(e,t,r,i,a);return o||((o=n.addTextTrack(e,t,r)).isEmbedded=a,o.isTTML=i),o},appendChild:function(e){n&&(n.appendChild(e),void 0!==e.isTTML&&(n.textTracks[n.textTracks.length-1].isTTML=e.isTTML,n.textTracks[n.textTracks.length-1].isEmbedded=e.isEmbedded))},removeChild:function(e){n&&n.removeChild(e)},getVideoWidth:function(){return n?n.videoWidth:NaN},getVideoHeight:function(){return n?n.videoHeight:NaN},getVideoRelativeOffsetTop:function(){var e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().top-e.getBoundingClientRect().top:NaN},getVideoRelativeOffsetLeft:function(){var e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().left-e.getBoundingClientRect().left:NaN},reset:function(){l.off(a.default.PLAYBACK_PLAYING,g,this)}},t=(0,o.default)(u).getInstance().getLogger(e),e}u.__dashjs_factory_name="VideoModel",t.default=r.default.getSingletonFactory(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1)),i=o(n(8)),a=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}var s=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],u="dashjs_?_bitrate",l="dashjs_?_settings",c="localStorage",d="lastBitrate",f="lastMediaSettings";function h(e){e=e||{};var t=this.context,n=e.settings,r=void 0,o=void 0,h=void 0;function p(e){if(void 0!==h)return h;h=!1;var t=void 0;try{"undefined"!=typeof window&&(t=window[e])}catch(e){return o.warn("DOMStorage access denied: "+e.message),h}if(!t||e!==c&&"sessionStorage"!==e)return h;try{t.setItem("1","1"),t.removeItem("1"),h=!0}catch(e){o.warn("DOMStorage is supported, but cannot be used: "+e.message)}return h}function g(){var e=6e5;return Math.round((new Date).getTime()/e)*e}function m(e,t){return p(e)&&n.get().streaming[t+"CachingInfo"].enabled}function y(){if(!n)throw new Error(a.default.MISSING_CONFIG_ERROR)}return r={getSavedBitrateSettings:function(e){var t=NaN;if(y(),m(c,d)){var r=u.replace(/\?/,e);try{var i=JSON.parse(localStorage.getItem(r))||{},a=(new Date).getTime()-parseInt(i.timestamp,10)>=n.get().streaming.lastBitrateCachingInfo.ttl||!1,s=parseFloat(i.bitrate);isNaN(s)||a?a&&localStorage.removeItem(r):(t=s,o.debug("Last saved bitrate for "+e+" was "+s))}catch(e){return null}}return t},setSavedBitrateSettings:function(e,t){if(m(c,d)&&t){var n=u.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({bitrate:t.toFixed(3),timestamp:g()}))}catch(e){o.error(e.message)}}},getSavedMediaSettings:function(e){var t=null;if(y(),m(c,f)){var r=l.replace(/\?/,e);try{var i=JSON.parse(localStorage.getItem(r))||{},a=(new Date).getTime()-parseInt(i.timestamp,10)>=n.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;t=i.settings,a&&(localStorage.removeItem(r),t=null)}catch(e){return null}}return t},setSavedMediaSettings:function(e,t){if(m(c,f)){var n=l.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({settings:t,timestamp:g()}))}catch(e){o.error(e.message)}}}},o=(0,i.default)(t).getInstance().getLogger(r),p(c)&&s.forEach((function(e){var t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(e){o.error(e.message)}}})),r}h.__dashjs_factory_name="DOMStorage";var p=r.default.getSingletonFactory(h);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(1)),i=o(n(310)),a=o(n(311));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){e=e||{};var t=this.context,n=e.eventBus,r=e.events,o=e.dashMetrics,s=e.mediaPlayerModel,u=e.errHandler,l=e.baseURLController,c=e.debug,d=e.boxParser,f=e.requestModifier,h=e.errors,p=void 0,g=void 0,m=void 0;function y(e){return"webm"===(e?e.split("/")[1]:"").toLowerCase()}function v(e){y(e.mimeType)?m.loadInitialization(e.streamId,e.mediaType,e.representation):g.loadInitialization(e.streamId,e.mediaType,e.representation)}function _(e){y(e.mimeType)?m.loadSegments(e.streamId,e.mediaType,e.representation,e.representation?e.representation.indexRange:null,e.callback):g.loadSegments(e.streamId,e.mediaType,e.representation,e.representation?e.representation.indexRange:null,e.callback)}return p={initialize:function(){n.on(r.SEGMENTBASE_INIT_REQUEST_NEEDED,v,p),n.on(r.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,_,p),g.initialize(),m.initialize()},reset:function(){n.off(r.SEGMENTBASE_INIT_REQUEST_NEEDED,v,p),n.off(r.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,_,p)}},g=(0,i.default)(t).getInstance(),m=(0,a.default)(t).getInstance(),g.setConfig({baseURLController:l,dashMetrics:o,mediaPlayerModel:s,errHandler:u,eventBus:n,events:r,errors:h,debug:c,boxParser:d,requestModifier:f}),m.setConfig({baseURLController:l,dashMetrics:o,mediaPlayerModel:s,errHandler:u,eventBus:n,events:r,errors:h,debug:c,requestModifier:f}),p}s.__dashjs_factory_name="SegmentBaseController";var u=r.default.getSingletonFactory(s);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(78)),i=u(n(11)),a=u(n(1)),o=u(n(26)),s=u(n(42));function u(e){return e&&e.__esModule?e:{default:e}}function l(){var e=this.context,t=void 0,n=void 0,a=void 0,u=void 0,l=void 0,c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0;function b(){if(!T||!T.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function E(e){if(e.url){var t=new o.default;return t.setInfo(e),t}}function S(e,t,n,r){g.trigger(p.SEGMENTS_LOADED,{segments:n,representation:r,error:n?void 0:new i.default(m.SEGMENT_BASE_LOADER_ERROR_CODE,m.SEGMENT_BASE_LOADER_ERROR_MESSAGE)},{streamId:e,mediaType:t})}return t={setConfig:function(e){e.baseURLController&&(T=e.baseURLController),e.dashMetrics&&(c=e.dashMetrics),e.mediaPlayerModel&&(f=e.mediaPlayerModel),e.errHandler&&(a=e.errHandler),e.settings&&(d=e.settings),e.boxParser&&(u=e.boxParser),e.events&&(p=e.events),e.eventBus&&(g=e.eventBus),e.debug&&(n=e.debug.getLogger(t)),e.requestModifier&&(l=e.requestModifier),e.errors&&(m=e.errors),e.urlUtils&&(_=e.urlUtils),e.constants&&(y=e.constants),e.dashConstants&&(v=e.dashConstants)},initialize:function(){h=(0,s.default)(e).create({errHandler:a,dashMetrics:c,mediaPlayerModel:f,requestModifier:l,useFetch:d?d.get().streaming.lowLatencyEnabled:null,boxParser:u,errors:m,urlUtils:_,constants:y,dashConstants:v})},loadInitialization:function e(t,r,i,a){b();var o=null,s=i?T.resolve(i.path):null,l=a||{init:!0,url:s?s.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:r};n.debug("Start searching for initialization.");var c=E(l);h.load({request:c,success:function(n){l.bytesLoaded=l.range.end,(o=u.findInitRange(n))?(i.range=o,g.trigger(p.INITIALIZATION_LOADED,{representation:i},{streamId:t,mediaType:r})):(l.range.end=l.bytesLoaded+l.bytesToLoad,e(t,r,i,l))},error:function(){g.trigger(p.INITIALIZATION_LOADED,{representation:i},{streamId:t,mediaType:r})}}),n.debug("Perform init search: "+l.url)},loadSegments:function e(t,i,a,o,s,l){if(b(),o&&(void 0===o.start||void 0===o.end)){var c=o?o.toString().split("-"):null;o=c?{start:parseFloat(c[0]),end:parseFloat(c[1])}:null}s=s||S;var d=null,f=null,p=!!o,g=a?T.resolve(a.path):null,m={init:!1,url:g?g.url:void 0,range:p?o:{start:0,end:1500},searching:!p,bytesLoaded:l?l.bytesLoaded:0,bytesToLoad:1500,mediaType:i},y=E(m);h.load({request:y,success:function(o){var l=m.bytesToLoad,c=o.byteLength;if(m.bytesLoaded=m.range.end-m.range.start,d=u.parse(o),(f=d.getBox("sidx"))&&f.isComplete){var h=f.references,p=void 0,g=void 0;if(null!=h&&h.length>0&&(p=1===h[0].reference_type),p){n.debug("Initiate multiple SIDX load."),m.range.end=m.range.start+f.size;var y=void 0,v=void 0,_=void 0,T=void 0,b=[],E=0,S=(f.offset||m.range.start)+f.size,A=function(e,t,n){n?(b=b.concat(n),++E>=v&&(b.sort((function(e,t){return e.startTime-t.startTime<0?-1:0})),s(e,t,b,a))):s(e,t,null,a)};for(y=0,v=h.length;y<v;y++)_=S,T=S+h[y].referenced_size-1,S+=h[y].referenced_size,e(t,i,a,{start:_,end:T},A,m)}else n.debug("Parsing segments from SIDX. representation "+i+" - id: "+a.id+" for range : "+m.range.start+" - "+m.range.end),g=function(e,t){for(var n=e.references,i=n.length,a=e.timescale,o=e.earliest_presentation_time,s=t.range.start+e.offset+e.first_offset+e.size,u=[],l=void 0,c=void 0,d=void 0,f=void 0,h=0;h<i;h++)d=n[h].subsegment_duration,f=n[h].referenced_size,(l=new r.default).duration=d,l.startTime=o,l.timescale=a,c=s+f-1,l.mediaRange=s+"-"+c,u.push(l),o+=d,s+=f;return u}(f,m),s(t,i,g,a)}else{if(f)m.range.start=f.offset||m.range.start,m.range.end=m.range.start+(f.size||l);else{if(c<m.bytesLoaded)return void s(t,i,null,a);var C=d.getLastBox();C&&C.size?(m.range.start=C.offset+C.size,m.range.end=m.range.start+l):m.range.end+=l}e(t,i,a,m.range,s,m)}},error:function(){s(t,i,null,a)}}),n.debug("Perform SIDX load: "+m.url+" with range : "+m.range.start+" - "+m.range.end)},reset:function(){h.abort(),h=null,a=null,u=null,l=null}}}l.__dashjs_factory_name="SegmentBaseLoader",t.default=a.default.getSingletonFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(312)),i=c(n(6)),a=c(n(1)),o=c(n(78)),s=c(n(26)),u=c(n(42)),l=c(n(11));function c(e){return e&&e.__esModule?e:{default:e}}function d(){var e=this.context,t=void 0,n=void 0,a=void 0,c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0;function T(t,i,s,u){var l,c,d=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0;for(f=[],p=0,c=(l=function(t){var n=[],i=(0,r.default)(e).create({data:t}),o=void 0,s=void 0;for(i.consumeTagAndSize(a.Segment.Cues);i.moreData()&&i.consumeTagAndSize(a.Segment.Cues.CuePoint,!0);){for((o={}).CueTime=i.parseTag(a.Segment.Cues.CuePoint.CueTime),o.CueTracks=[];i.moreData()&&i.consumeTag(a.Segment.Cues.CuePoint.CueTrackPositions,!0);){var u=i.getMatroskaCodedNum(),l=i.getPos();if((s={}).Track=i.parseTag(a.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===s.Track)throw new Error("Cue track cannot be 0");s.ClusterPosition=i.parseTag(a.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),o.CueTracks.push(s),i.setPos(l+u)}if(0===o.CueTracks.length)throw new Error("Mandatory cuetrack not found");n.push(o)}if(0===n.length)throw new Error("mandatory cuepoint not found");return n}(t)).length;p<c;p+=1)h=new o.default,d=0,d=p<l.length-1?l[p+1].CueTime-l[p].CueTime:u-l[p].CueTime,h.duration=d,h.startTime=l[p].CueTime,h.timescale=1e3,g=l[p].CueTracks[0].ClusterPosition+i,m=p<l.length-1?l[p+1].CueTracks[0].ClusterPosition+i-1:s-1,h.mediaRange=g+"-"+m,f.push(h);return n.debug("Parsed cues: "+f.length+" cues."),f}function b(){if(!_||!_.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function E(e,t,n,r){m.trigger(y.SEGMENTS_LOADED,{segments:n,representation:r,error:n?void 0:new l.default(v.SEGMENT_BASE_LOADER_ERROR_CODE,v.SEGMENT_BASE_LOADER_ERROR_MESSAGE)},{streamId:e,mediaType:t})}function S(e){var t=new s.default;return t.setInfo(e),t}return t={setConfig:function(e){if(!(e.baseURLController&&e.dashMetrics&&e.mediaPlayerModel&&e.errHandler))throw new Error(i.default.MISSING_CONFIG_ERROR);_=e.baseURLController,f=e.dashMetrics,h=e.mediaPlayerModel,c=e.errHandler,g=e.settings,y=e.events,m=e.eventBus,v=e.errors,n=e.debug.getLogger(t),d=e.requestModifier},initialize:function(){p=(0,u.default)(e).create({errHandler:c,dashMetrics:f,mediaPlayerModel:h,requestModifier:d,useFetch:g?g.get().streaming.lowLatencyEnabled:null,errors:v})},loadInitialization:function(e,t,r,i){b();var a=null,o=r?_.resolve(r.path):null,s=r?r.range.split("-"):null,u=i||{range:{start:s?parseFloat(s[0]):null,end:s?parseFloat(s[1]):null},request:a,url:o?o.url:void 0,init:!0,mediaType:t};n.info("Start loading initialization."),a=S(u),p.load({request:a,success:function(){m.trigger(y.INITIALIZATION_LOADED,{representation:r},{streamId:e,mediaType:t})},error:function(){m.trigger(y.INITIALIZATION_LOADED,{representation:r},{streamId:e,mediaType:t})}}),n.debug("Perform init load: "+u.url)},loadSegments:function(t,i,o,s,u){b();var l=null,c=o?_.resolve(o.path):null,d=c?c.url:void 0;u=u||E,l=S({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:l,url:d,init:!1,mediaType:i}),n.debug("Parsing ebml header"),p.load({request:l,success:function(l){!function(t,i,o,s){if(t&&0!==t.byteLength){var u,l=(0,r.default)(e).create({data:t}),c=void 0,d=void 0,f=void 0,h=o?o.split("-"):null,g=null,m={url:i,range:{start:h?parseFloat(h[0]):null,end:h?parseFloat(h[1]):null},request:g};for(n.debug("Parse EBML header: "+m.url),l.skipOverElement(a.EBML),l.consumeTag(a.Segment),f=l.getMatroskaCodedNum(),f+=l.getPos(),u=l.getPos();l.moreData()&&!l.consumeTagAndSize(a.Segment.Info,!0);)if(!(l.skipOverElement(a.Segment.SeekHead,!0)||l.skipOverElement(a.Segment.Tracks,!0)||l.skipOverElement(a.Segment.Cues,!0)||l.skipOverElement(a.Void,!0)))throw new Error("no valid top level element found");for(;void 0===c;){var y=l.getMatroskaCodedNum(!0),v=l.getMatroskaCodedNum();switch(y){case a.Segment.Info.Duration.tag:c=l[a.Segment.Info.Duration.parse](v);break;default:l.setPos(l.getPos()+v)}}g=S(m),p.load({request:g,success:function(e){d=T(e,u,f,c),s(d)},error:function(){n.error("Download Error: Cues "+m.url),s(null)}}),n.debug("Perform cues load: "+m.url+" bytes="+m.range.start+"-"+m.range.end)}else s(null)}(l,d,s,(function(e){u(t,i,e,o)}))},error:function(){u(t,i,null,o)}})},reset:function(){c=null,d=null}},a={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}},t}d.__dashjs_factory_name="WebmSegmentBaseLoader",t.default=a.default.getSingletonFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1),a=(r=i)&&r.__esModule?r:{default:r};function o(e){e=e||{};var t=void 0,n=new DataView(e.data),r=0;function i(e,t){var i=!0,a=0;if(void 0===t&&(t=!1),e.tag>16777215?(n.getUint32(r)!==e.tag&&(i=!1),a=4):e.tag>65535?(256*n.getUint16(r)+n.getUint8(r+2)!==e.tag&&(i=!1),a=3):e.tag>255?(n.getUint16(r)!==e.tag&&(i=!1),a=2):(n.getUint8(r)!==e.tag&&(i=!1),a=1),!i&&e.required&&!t)throw new Error("required tag not found");return i&&(r+=a),i}function a(e){var t=1,i=128,a=-1,o=0,s=n.getUint8(r),u=0;for(u=0;u<8;u+=1){if((s&i)===i){o=void 0===e?s&~i:s,a=u;break}i>>=1}for(u=0;u<a;u+=1,t+=1)o=o<<8|255&n.getUint8(r+t);return r+=t,o}return t={getPos:function(){return r},setPos:function(e){r=e},consumeTag:i,consumeTagAndSize:function(e,t){var n=i(e,t);return n&&a(),n},parseTag:function(e){var n;return i(e),n=a(),t[e.parse](n)},skipOverElement:function(e,t){var n=i(e,t),o=void 0;return n&&(o=a(),r+=o),n},getMatroskaCodedNum:a,getMatroskaFloat:function(e){var t=void 0;switch(e){case 4:t=n.getFloat32(r),r+=4;break;case 8:t=n.getFloat64(r),r+=8}return t},getMatroskaUint:function(e){for(var t=0,i=0;i<e;i+=1)t<<=8,t|=255&n.getUint8(r+i);return r+=e,t},moreData:function(){return r<n.byteLength}}}o.__dashjs_factory_name="EBMLParser",t.default=a.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(15)),i=f(n(314)),a=f(n(315)),o=f(n(316)),s=f(n(317)),u=f(n(128)),l=f(n(1)),c=f(n(82)),d=f(n(318));function f(e){return e&&e.__esModule?e:{default:e}}function h(){var e,t=void 0,n=void 0,l=void 0,f=void 0,h=void 0,p=void 0,g=void 0,m=this.context;function y(e,n,i){var a,o=t.getAdaptationsForType(l[0].mpd.manifest,e,n);if(!o||0===o.length)return null;if(o.length>1&&i){var s=_(i,n);if(h[i.id]&&h[i.id][n])for(var u=0,c=o.length;u<c;u++)if(v(h[i.id][n],s[u]))return o[u];for(var d=0,f=o.length;d<f;d++)if(a=o[d],t.getRolesForAdaptation(a).filter((function(e){return e.value===r.default.MAIN}))[0])return o[d]}return o[0]}function v(e,t){if(!e||!t)return!1;var n=e.id===t.id,r=e.viewpoint===t.viewpoint,i=e.lang===t.lang,a=e.roles.toString()===t.roles.toString(),o=e.accessibility.toString()===t.accessibility.toString(),s=e.audioChannelConfiguration.toString()===t.audioChannelConfiguration.toString();return n&&r&&i&&a&&o&&s}function _(e,n,r){var i,a=l,o=r,s=[],u=void 0,c=void 0,d=void 0,h=void 0,g=void 0,m=void 0;if(o)O(),a=T(o);else{if(!(l.length>0))return s;o=l[0].mpd.manifest}var y=C(e,a);y&&(m=y.id);var v=t.getAdaptationsForType(o,e?e.index:null,n!==p.EMBEDDED_TEXT?n:p.VIDEO);if(!v||0===v.length)return s;for(f[m]=f[m]||t.getAdaptationsForPeriod(y),h=0,i=v.length;h<i;h++)if(u=v[h],d=t.getIndexForAdaptation(u,o,e.index),c=w(f[m][d]),n===p.EMBEDDED_TEXT){var _=c.accessibility.length;for(g=0;g<_;g++)if(c){var b=c.accessibility[g];if(0===b.indexOf("cea-608:")){var E=b.substring(8).split(";");if("CC"===E[0].substring(0,2))for(g=0;g<E.length;g++)c||(c=w.call(this,f[m][d])),I(c,E[g].substring(0,3),E[g].substring(4)),s.push(c),c=null;else for(g=0;g<E.length;g++)c||(c=w.call(this,f[m][d])),I(c,"CC"+(g+1),E[g]),s.push(c),c=null}else 0===b.indexOf("cea-608")&&(I(c,p.CC1,"eng"),s.push(c),c=null)}}else n===p.IMAGE?(c.type=p.IMAGE,s.push(c),c=null):c&&s.push(c);return s}function T(e){var n=b(e);return t.getRegularPeriods(n)}function b(e){var n=S(e);return t.getMpd(n)}function E(){l=[],f={},h={}}function S(e){return e||(l.length>0?l[0].mpd.manifest:null)}function A(e){return e&&e.streamInfo&&void 0!==e.streamInfo.id&&f[e.streamInfo.id]?f[e.streamInfo.id][e.index]:null}function C(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r];if(e&&e.id===i.id)return i}return null}function w(e){if(!e)return null;var n,r=new a.default,i=e.period.mpd.manifest.Period_asArray[e.period.index].AdaptationSet_asArray[e.index];return r.id=e.id,r.index=e.index,r.type=e.type,r.streamInfo=R(e.period),r.representationCount=t.getRepresentationCount(i),r.labels=t.getLabelsForAdaptation(i),r.lang=t.getLanguageForAdaptation(i),n=t.getViewpointForAdaptation(i),r.viewpoint=n?n.value:void 0,r.accessibility=t.getAccessibilityForAdaptation(i).map((function(e){var t=e.value,n=t;return e.schemeIdUri&&e.schemeIdUri.search("cea-608")>=0&&void 0!==g&&(n=t?"cea-608:"+t:"cea-608",r.embeddedCaptions=!0),n})),r.audioChannelConfiguration=t.getAudioChannelConfigurationForAdaptation(i).map((function(e){return e.value})),0===r.audioChannelConfiguration.length&&Array.isArray(i.Representation_asArray)&&i.Representation_asArray.length>0&&(r.audioChannelConfiguration=t.getAudioChannelConfigurationForRepresentation(i.Representation_asArray[0]).map((function(e){return e.value}))),r.roles=t.getRolesForAdaptation(i).map((function(e){return e.value})),r.codec=t.getCodec(i),r.mimeType=t.getMimeType(i),r.contentProtection=t.getContentProtectionData(i),r.bitrateList=t.getBitrateListForAdaptation(i),r.contentProtection&&r.contentProtection.forEach((function(e){e.KID=t.getKID(e)})),r.isText=t.getIsTextTrack(r.mimeType),r.supplementalProperties=t.getSupplementalPropperties(i),r}function I(e,t,n){e.id=t,e.index=100+parseInt(t.substring(2,3)),e.type=p.EMBEDDED_TEXT,e.codec="cea-608-in-SEI",e.isText=!0,e.isEmbedded=!0,e.lang=n,e.roles=["caption"]}function R(e){var n,r,i=new o.default;return i.id=e.id,i.index=e.index,i.start=e.start,i.duration=e.duration,i.manifestInfo=(n=e.mpd,(r=new s.default).DVRWindowSize=n.timeShiftBufferDepth,r.loadedTime=n.manifest.loadedTime,r.availableFrom=n.availabilityStartTime,r.minBufferTime=n.manifest.minBufferTime,r.maxFragmentDuration=n.maxSegmentDuration,r.duration=t.getDuration(n.manifest),r.isDynamic=t.getIsDynamic(n.manifest),r.serviceDescriptions=t.getServiceDescriptions(n.manifest),r.protocol=n.manifest.protocol,r),i.isLast=1===e.mpd.manifest.Period_asArray.length||Math.abs(i.start+i.duration-i.manifestInfo.duration)<1,i}function O(){if(!p)throw new Error("setConfig function has to be called previously")}function P(e){return l.length>0?l[0].mpd.manifest.Period_asArray[e]:null}function D(e,t,n){var r=void 0,i=void 0,a=void 0,o=void 0,s=void 0;if(e)for(r=e.AdaptationSet_asArray,o=0;o<r.length;o+=1)for(a=r[o].Representation_asArray,s=0;s<a.length;s+=1)if(t===(i=a[s]).id)return n?s:i;return null}return e={getBandwidthForRepresentation:function(e,t){var n;return(n=D(P(t),e))?n.bandwidth:null},getIndexForRepresentation:function(e,t){return function(e,t){var n=D(e,t,!0);return null!==n?n:-1}(P(t),e)},getMaxIndexForBufferType:function(e,n){return function(e,n){var r=void 0,i=void 0,a=void 0,o=void 0;if(!e||!n)return-1;for(i=e.AdaptationSet_asArray,o=0;o<i.length;o+=1)if(a=(r=i[o]).Representation_asArray,t.getIsTypeOf(r,n))return a.length;return-1}(P(n),e)},convertDataToRepresentationInfo:function(e){if(e){var n=new i.default,r=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index],a=t.getRepresentationFor(e.index,r);return n.id=e.id,n.quality=e.index,n.bandwidth=t.getBandwidth(a),n.DVRWindow=e.segmentAvailabilityRange,n.fragmentDuration=e.segmentDuration||(e.segments&&e.segments.length>0?e.segments[0].duration:NaN),n.MSETimeOffset=e.MSETimeOffset,n.mediaInfo=w(e.adaptation),n}return null},getDataForMedia:A,getStreamsInfo:function(e,t){var n=[],r=l;if(e&&(O(),r=T(e)),r.length>0){(!t||t>r.length)&&(t=r.length);for(var i=0;i<t;i++)n.push(R(r[i]))}return n},getMediaInfoForType:function(e,n){if(0===l.length||!e)return null;var r=C(e,l);if(!r)return null;var i=r.id;f[i]=f[i]||t.getAdaptationsForPeriod(r);var a=y(e.index,n,e);if(!a)return null;var o=t.getIndexForAdaptation(a,l[0].mpd.manifest,e.index);return w(f[i][o])},getAllMediaInfoForType:_,getAdaptationForType:y,getRealAdaptation:function(e,n){var r,i=void 0,a=C(e,l);return r=n?n.id:null,l.length>0&&a&&(i=r?t.getAdaptationForId(r,l[0].mpd.manifest,a.index):t.getAdaptationForIndex(n?n.index:null,l[0].mpd.manifest,a.index)),i},getRealPeriodByIndex:function(e){return t.getRealPeriodForIndex(e,l[0].mpd.manifest)},getEssentialPropertiesForRepresentation:function(e){try{return t.getEssentialPropertiesForRepresentation(e)}catch(e){return[]}},getVoRepresentations:function(e){var n=A(e);return t.getRepresentationsForAdaptation(n)},getEventsFor:function(e,n){var r=[];if(l.length>0){var s=l[0].mpd.manifest;e instanceof o.default?r=t.getEventsForPeriod(C(e,l)):e instanceof a.default?r=t.getEventStreamForAdaptationSet(s,A(e)):e instanceof i.default&&(r=t.getEventStreamForRepresentation(s,n))}return r},getEvent:function(e,t,n,r){try{if(!e||!t||isNaN(n)||!r)return null;var i=e.scheme_id_uri,a=e.value;if(!t[i+"/"+a])return null;var o=new u.default,s=e.timescale||1,l=r.adaptation.period.start,c=t[i+"/"+a],d=isNaN(r.presentationTimeOffset)?isNaN(c.presentationTimeOffset)?0:c.presentationTimeOffset:r.presentationTimeOffset,f=e.presentation_time_delta/s,h=void 0;h=0===e.version?l+n-d+f:l-d+f;var p=e.event_duration,g=e.id,m=e.message_data;return o.eventStream=c,o.eventStream.value=a,o.eventStream.timescale=s,o.duration=p,o.id=g,o.calculatedPresentationTime=h,o.messageData=m,o.presentationTimeDelta=f,o}catch(e){return null}},getMpd:b,setConfig:function(e){e&&(e.constants&&(p=e.constants),e.cea608parser&&(g=e.cea608parser),e.errHandler&&t.setConfig({errHandler:e.errHandler}),e.BASE64&&t.setConfig({BASE64:e.BASE64}))},updatePeriods:function(e){if(!e)return null;O(),l=T(e),f={}},getIsTextTrack:function(e){return t.getIsTextTrack(e)},getUTCTimingSources:function(){var e=S();return t.getUTCTimingSources(e)},getSuggestedPresentationDelay:function(){var e=l.length>0?l[0].mpd:null;return t.getSuggestedPresentationDelay(e)},getAvailabilityStartTime:function(e){var n=b(e);return t.getAvailabilityStartTime(n)},getIsTypeOf:function(e,n){return t.getIsTypeOf(e,n)},getIsDynamic:function(e){var n=S(e);return t.getIsDynamic(n)},getDuration:function(e){var n=S(e);return t.getDuration(n)},getRegularPeriods:T,getLocation:function(e){return t.getLocation(e)},getPatchLocation:function(e){var n=t.getPatchLocation(e),r=t.getPublishTime(e);if(!n||!r)return null;if(n.hasOwnProperty("ttl")&&r){var i=1e3*parseFloat(n.ttl);if(r.getTime()+i<=(new Date).getTime())return null}return n.__text},getManifestUpdatePeriod:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.getManifestUpdatePeriod(e,n)},getPublishTime:function(e){return t.getPublishTime(e)},getIsDVB:function(e){return t.hasProfile(e,"urn:dvb:dash:profile:dvb-dash:2014")},getIsPatch:function(e){return n.getIsPatch(e)},getBaseURLsFromElement:function(e){return t.getBaseURLsFromElement(e)},getRepresentationSortFunction:function(){return t.getRepresentationSortFunction()},getCodec:function(e,n,r){return t.getCodec(e,n,r)},getVoAdaptations:function(){return f},getVoPeriods:function(){return l},getPeriodById:function(e){if(!e||0===l.length)return null;var t=l.filter((function(t){return t.id===e}));return t&&t.length>0?t[0]:null},setCurrentMediaInfo:function(e,t,n){h[e]=h[e]||{},h[e][t]=h[e][t]||{},h[e][t]=n},isPatchValid:function(e,r){var i=t.getId(e),a=n.getMpdId(r),o=t.getPublishTime(e),s=n.getPublishTime(r),u=n.getOriginalPublishTime(r);return!!(i&&a&&i==a&&o&&u&&o.getTime()==u.getTime()&&s&&o.getTime()<s.getTime())},applyPatchToManifest:function(e,t){n.getPatchOperations(t).forEach((function(t){var n=t.getMpdTarget(e);if(null!==n){var r=n.name,i=n.target,a=n.leaf;if(t.xpath.findsAttribute())switch(t.action){case"add":case"replace":i[r]=t.value;break;case"remove":delete i[r]}else{var o=(i[r+"_asArray"]||[]).indexOf(a),s="prepend"===t.position||"before"===t.position;if(("remove"===t.action||"replace"===t.action)&&(delete i[r],-1!=o)){var u=i[r+"_asArray"];u.splice(o,1),u.length>1?i[r]=u:1==u.length?i[r]=u[0]:delete i[r+"_asArray"]}"add"!==t.action&&"replace"!==t.action||Object.keys(t.value).forEach((function(e){var n=t.value[e],a=i[e+"_asArray"]||[];if(0===a.length&&i[e]&&a.push(i[e]),0===a.length)a=n;else{var u=a.length;u=e==r&&-1!=o?o+(s?0:1)+("replace"==t.action?-1:0):s?0:a.length,a.splice.apply(a,[u,0].concat(n))}i[e+"_asArray"]=a,i[e]=1==a.length?a[0]:a}))}}}))},reset:E},t=(0,c.default)(m).getInstance(),n=(0,d.default)(m).getInstance(),E(),e}h.__dashjs_factory_name="DashAdapter",t.default=l.default.getSingletonFactory(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.lang=null,this.viewpoint=null,this.accessibility=null,this.audioChannelConfiguration=null,this.roles=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.DVRWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(15)),i=u(n(1)),a=u(n(8)),o=u(n(319)),s=u(n(320));function u(e){return e&&e.__esModule?e:{default:e}}function l(){var e=void 0,t=void 0,n=this.context;return e={getIsPatch:function(e){return e&&e.hasOwnProperty(r.default.ORIGINAL_MPD_ID)||!1},getPublishTime:function(e){return e&&e.hasOwnProperty(r.default.PUBLISH_TIME)?new Date(e[r.default.PUBLISH_TIME]):null},getOriginalPublishTime:function(e){return e&&e.hasOwnProperty(r.default.ORIGINAL_PUBLISH_TIME)?new Date(e[r.default.ORIGINAL_PUBLISH_TIME]):null},getMpdId:function(e){return e&&e[r.default.ORIGINAL_MPD_ID]||null},getPatchOperations:function(e){return e?(e.__children||[]).map((function(e){var n=Object.keys(e)[0];if("add"!==n&&"remove"!==n&&"replace"!==n)return t.warn("Ignoring node of invalid action: "+n),null;var r=e[n],i=r.sel;if("add"===n&&r.type){if(!r.type.startsWith("@"))return t.warn("Ignoring add action for prefixed namespace declaration: "+r.type+"="+r.__text),null;i=i+"/"+r.type}var a=new o.default(i);if(!a.isValid())return t.warn("Ignoring action with invalid selector: "+n+" - "+i),null;var u=null;a.findsAttribute()?u=r.__text||"":"remove"!==n&&(u=r.__children.reduce((function(e,t){var n=Object.keys(t)[0];return"#text"!==n&&(e[n]=e[n]||[],e[n].push(t[n])),e}),{}));var l=new s.default(n,a,u);return"add"===n&&(l.position=r.pos),l})).filter((function(e){return!!e})):[]}},t=(0,a.default)(n).getInstance().getLogger(e),e}l.__dashjs_factory_name="PatchManifestModel",t.default=i.default.getSingletonFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.valid="/"==t[0],this.path=t.split("/").filter((function(e){return 0!==e.length})).map((function(e){var t={name:e},r=e.indexOf("[");if(-1!=r){t.name=e.substring(0,r);var i=e.substring(r+1,e.length-1);n.valid=n.valid&&-1==i.indexOf("[");var a=i.indexOf("=");-1!=a?(t.attribute={name:i.substring(1,a),value:i.substring(a+1)},-1!=["'",'"'].indexOf(t.attribute.value[0])&&(t.attribute.value=t.attribute.value.substring(1,t.attribute.value.length-1))):t.position=parseInt(i,10)-1}return t}))}return r(e,[{key:"isValid",value:function(){return this.valid}},{key:"findsElement",value:function(){return!this.findsAttribute()}},{key:"findsAttribute",value:function(){return this.path[this.path.length-1].name.startsWith("@")}},{key:"getMpdTarget",value:function(e,t){for(var n=null,r=e,i=1,a="MPD";i<this.path.length&&null!==r;){n=r;var o=this.path[i];if(a=o.name,i!==this.path.length-1||!a.startsWith("@")){var s=n[a+"_asArray"]||[];0===s.length&&n[a]&&s.push(n[a]),o.position?r=s[o.position]||null:o.attribute?function(){var e=o.attribute;r=s.filter((function(t){return t[e.name]==e.value}))[0]||null}():r=s[0]||null}i++}return null===r?null:a.startsWith("@")?{name:a.substring(1),leaf:r,target:r}:{name:a,leaf:r,target:t?n:r}}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.action=t,this.xpath=n,this.value=r,this.position=null}return r(e,[{key:"getMpdTarget",value:function(e){var t="remove"===this.action||"replace"===this.action||"before"===this.position||"after"===this.position;return this.xpath.getMpdTarget(e,t)}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(6)),i=n(12),a=d(n(1)),o=d(n(16)),s=d(n(322)),u=d(n(323)),l=d(n(43)),c=n(80);function d(e){return e&&e.__esModule?e:{default:e}}function f(e){e=e||{};var t,n=this.context,a=void 0,d=void 0,f=void 0,h=e.metricsModel;function p(e){var t=h.getMetricsFor(e,!0);if(!t)return null;var n=t.HttpList,r=null,i=void 0;if(!n||n.length<=0)return null;for(i=n.length-1;i>=0;){if(n[i].responsecode){r=n[i];break}i--}return r}function g(e){var t=h.getMetricsFor(e,!0);return t&&t.HttpList?t.HttpList:[]}function m(e,t){if(!e)return null;var n=e[t];return n&&0!==n.length?n[n.length-1]:null}return t={getCurrentRepresentationSwitch:function(e){return m(h.getMetricsFor(e,!0),o.default.TRACK_SWITCH)},getCurrentBufferState:function(e){return m(h.getMetricsFor(e,!0),o.default.BUFFER_STATE)},getCurrentBufferLevel:function(e){var t=m(h.getMetricsFor(e,!0),o.default.BUFFER_LEVEL);return t?s.default.round10(t.level/1e3,-3):0},getCurrentHttpRequest:p,getHttpRequests:g,getCurrentDroppedFrames:function(){return m(h.getMetricsFor(r.default.VIDEO,!0),o.default.DROPPED_FRAMES)},getCurrentSchedulingInfo:function(e){return m(h.getMetricsFor(e,!0),o.default.SCHEDULING_INFO)},getCurrentDVRInfo:function(e){return m(e?h.getMetricsFor(e,!0):h.getMetricsFor(r.default.VIDEO,!0)||h.getMetricsFor(r.default.AUDIO,!0),o.default.DVR_INFO)},getCurrentManifestUpdate:function(){return m(h.getMetricsFor(r.default.STREAM),o.default.MANIFEST_UPDATE)},getLatestFragmentRequestHeaderValueByID:function(e,t){var n={},r=p(e);return r&&(n=l.default.parseHttpHeaders(r._responseHeaders)),void 0===n[t]?null:n[t]},getLatestMPDRequestHeaderValueByID:function(e){var t,n={},a=void 0,o=void 0;for(o=(t=g(r.default.STREAM)).length-1;o>=0;o--)if((a=t[o]).type===i.HTTPRequest.MPD_TYPE){n=l.default.parseHttpHeaders(a._responseHeaders);break}return void 0===n[e]?null:n[e]},addRepresentationSwitch:function(e,t,n,r,i){h.addRepresentationSwitch(e,t,n,r,i)},addDVRInfo:function(e,t,n,r){h.addDVRInfo(e,t,n,r)},updateManifestUpdateInfo:function(e){var t=this.getCurrentManifestUpdate();h.updateManifestUpdateInfo(t,e)},addManifestUpdateStreamInfo:function(e){if(e){var t=this.getCurrentManifestUpdate();h.addManifestUpdateStreamInfo(t,e.id,e.index,e.start,e.duration)}},addManifestUpdateRepresentationInfo:function(e,t){if(e){var n=this.getCurrentManifestUpdate();h.addManifestUpdateRepresentationInfo(n,e.id,e.index,e.streamIndex,t,e.presentationTimeOffset,e.startNumber,e.fragmentInfoType)}},addManifestUpdate:function(e){h.addManifestUpdate(r.default.STREAM,e.type,e.requestStartDate,e.requestEndDate)},addHttpRequest:function(e,t,n,r,i){h.addHttpRequest(e.mediaType,null,e.type,e.url,e.quality,t,e.serviceLocation||null,e.range||null,e.requestStartDate,e.firstByteDate,e.requestEndDate,n,e.duration,r,i)},addSchedulingInfo:function(e,t){h.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.quality,e.range,t)},addRequestsQueue:function(e,t,n){h.addRequestsQueue(e,t,n)},addBufferLevel:function(e,t,n){h.addBufferLevel(e,t,n)},addBufferState:function(e,t,n){h.addBufferState(e,t,n)},addDroppedFrames:function(e){h.addDroppedFrames(r.default.VIDEO,e)},addPlayList:function(){f&&(h.addPlayList(f),f=null)},addDVBErrors:function(e){h.addDVBErrors(e)},createPlaylistMetrics:function(e,t){(f=new c.PlayList).start=new Date,f.mstart=e,f.starttype=t},createPlaylistTraceMetrics:function(e,t,n){!0===a&&(a=!1,(d=new c.PlayListTrace).representationid=e,d.start=new Date,d.mstart=t,d.playbackspeed=null!==n?n.toString():null)},updatePlayListTraceMetrics:function(e){if(d)for(var t in d)d[t]=e[t]},pushPlayListTraceMetrics:function(e,t){if(!1===a&&f&&d&&d.start){var n=d.start,r=e.getTime()-n.getTime();d.duration=r,d.stopreason=t,f.trace.push(d),a=!0}},clearAllCurrentMetrics:function(){h.clearAllCurrentMetrics()}},h=h||(0,u.default)(n).getInstance({settings:e.settings}),a=!0,d=null,f=null,t}f.__dashjs_factory_name="DashMetrics",t.default=a.default.getSingletonFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"round10",value:function(e,t){return function(e,t,n){if(void 0===n||0==+n)return Math[e](t);if(n=+n,null===(t=+t)||isNaN(t)||!("number"==typeof n&&n%1==0))return NaN;return t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))}("round",e,t)}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(6)),i=v(n(16)),a=v(n(324)),o=n(12),s=v(n(325)),u=v(n(326)),l=v(n(327)),c=v(n(328)),d=v(n(329)),f=n(330),h=v(n(331)),p=v(n(9)),g=v(n(332)),m=v(n(10)),y=v(n(1));function v(e){return e&&e.__esModule?e:{default:e}}function _(e){var t,n=(e=e||{}).settings,y=this.context,v=(0,p.default)(y).getInstance(),_=void 0;function T(){v.trigger(m.default.METRICS_CHANGED)}function b(e){v.trigger(m.default.METRIC_CHANGED,{mediaType:e}),T()}function E(e,t,n){v.trigger(m.default.METRIC_UPDATED,{mediaType:e,metric:t,value:n}),b(e)}function S(e,t,n){v.trigger(m.default.METRIC_ADDED,{mediaType:e,metric:t,value:n}),b(e)}function A(e,t){var n=null;return e?(_.hasOwnProperty(e)?n=_[e]:t||(n=new a.default,_[e]=n),n):n}function C(e,t,r){var i=A(e);null!==i&&(i[t].push(r),i[t].length>n.get().streaming.metricsMaxListDepth&&i[t].shift())}function w(e,t,n){C(e,t,n),S(e,t,n)}return t={clearCurrentMetricsForType:function(e){delete _[e],b(e)},clearAllCurrentMetrics:function(){_={},T()},getMetricsFor:A,addHttpRequest:function e(t,n,r,a,s,u,l,c,d,f,h,p,g,m,y){var v=new o.HTTPRequest;u&&u!==a&&(e(t,null,r,a,s,null,null,c,d,null,null,null,g,null,null),v.actualurl=u),v.tcpid=n,v.type=r,v.url=a,v.range=c,v.trequest=d,v.tresponse=f,v.responsecode=p,v._tfinish=h,v._stream=t,v._mediaduration=g,v._quality=s,v._responseHeaders=m,v._serviceLocation=l,y?y.forEach((function(e){!function(e,t,n,r){var i=new o.HTTPRequestTrace;i.s=t,i.d=n,i.b=r,e.trace.push(i),e.interval||(e.interval=0),e.interval+=n}(v,e.s,e.d,e.b)})):(delete v.interval,delete v.trace),w(t,i.default.HTTP_REQUEST,v)},addRepresentationSwitch:function(e,t,n,r,a){var o=new s.default;o.t=t,o.mt=n,o.to=r,a?o.lto=a:delete o.lto,w(e,i.default.TRACK_SWITCH,o)},addBufferLevel:function(e,t,n){var r=new u.default;r.t=t,r.level=n,w(e,i.default.BUFFER_LEVEL,r)},addBufferState:function(e,t,n){var r=new l.default;r.target=n,r.state=t,w(e,i.default.BUFFER_STATE,r)},addDVRInfo:function(e,t,n,r){var a=new c.default;a.time=t,a.range=r,a.manifestInfo=n,w(e,i.default.DVR_INFO,a)},addDroppedFrames:function(e,t){var n=new d.default,r=A(e).DroppedFrames;t&&(n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,r.length>0&&r[r.length-1]==n||w(e,i.default.DROPPED_FRAMES,n))},addSchedulingInfo:function(e,t,n,r,a,o,s,u,l){var c=new h.default;c.mediaType=e,c.t=t,c.type=n,c.startTime=r,c.availabilityStartTime=a,c.duration=o,c.quality=s,c.range=u,c.state=l,w(e,i.default.SCHEDULING_INFO,c)},addRequestsQueue:function(e,t,n){var r=new g.default;r.loadingRequests=t,r.executedRequests=n,A(e).RequestsQueue=r,S(e,i.default.REQUESTS_QUEUE,r)},addManifestUpdate:function(e,t,n,a,o,s,u,l,c,d){var h=new f.ManifestUpdate;h.mediaType=e,h.type=t,h.requestTime=n,h.fetchTime=a,h.availabilityStartTime=o,h.presentationStartTime=s,h.clientTimeOffset=u,h.currentTime=l,h.buffered=c,h.latency=d,C(r.default.STREAM,i.default.MANIFEST_UPDATE,h),S(e,i.default.MANIFEST_UPDATE,h)},updateManifestUpdateInfo:function(e,t){if(e){for(var n in t)e[n]=t[n];E(e.mediaType,i.default.MANIFEST_UPDATE,e)}},addManifestUpdateStreamInfo:function(e,t,n,r,a){if(e){var o=new f.ManifestUpdateStreamInfo;o.id=t,o.index=n,o.start=r,o.duration=a,e.streamInfo.push(o),E(e.mediaType,i.default.MANIFEST_UPDATE_STREAM_INFO,e)}},addManifestUpdateRepresentationInfo:function(e,t,n,r,a,o,s,u){if(e&&e.representationInfo){var l=new f.ManifestUpdateRepresentationInfo;l.id=t,l.index=n,l.streamIndex=r,l.mediaType=a,l.startNumber=s,l.fragmentInfoType=u,l.presentationTimeOffset=o,e.representationInfo.push(l),E(e.mediaType,i.default.MANIFEST_UPDATE_TRACK_INFO,e)}},addPlayList:function(e){e.trace&&Array.isArray(e.trace)?e.trace.forEach((function(e){e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel})):delete e.trace,w(r.default.STREAM,i.default.PLAY_LIST,e)},addDVBErrors:function(e){w(r.default.STREAM,i.default.DVB_ERRORS,e)}},_={},t}_.__dashjs_factory_name="MetricsModel",t.default=y.default.getSingletonFactory(_)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.mt=null,this.to=null,this.lto=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.level=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(16),a=(r=i)&&r.__esModule?r:{default:r};t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.target=null,this.state=a.default.BUFFER_EMPTY}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.range=null,this.manifestInfo=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.droppedFrames=null}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});t.ManifestUpdate=function e(){r(this,e),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]},t.ManifestUpdateStreamInfo=function e(){r(this,e),this.id=null,this.index=null,this.start=null,this.duration=null},t.ManifestUpdateRepresentationInfo=function e(){r(this,e),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadingRequests=[],this.executedRequests=[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(9)),i=l(n(10)),a=l(n(1)),o=l(n(15)),s=l(n(82)),u=l(n(34));function l(e){return e&&e.__esModule?e:{default:e}}function c(){var e,t=this.context,n=(0,r.default)(t).getInstance(),a=(0,u.default)(t).getInstance(),l=void 0,c=void 0,d=void 0,f=void 0;function h(e){c=e}function p(e,t,n,r){return r?n&&t.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?new Date(t.availabilityStartTime.getTime()+1e3*(e+t.timeShiftBufferDepth)):t.availabilityEndTime:n?new Date(t.availabilityStartTime.getTime()+1e3*(e-c)):t.availabilityStartTime}function g(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*c)/1e3}function m(e,t){return e+(t.adaptation.period.start-t.presentationTimeOffset)}function y(e){void 0!==e.offset&&(h(e.offset/1e3),d=!0)}function v(){c=0,d=!1,f=NaN}function _(){n.off(i.default.UPDATE_TIME_SYNC_OFFSET,y,this),v()}return e={initialize:function(){v(),n.on(i.default.UPDATE_TIME_SYNC_OFFSET,y,this)},getClientTimeOffset:function(){return c},setClientTimeOffset:h,getExpectedLiveEdge:function(){return f},setExpectedLiveEdge:function(e){f=e},calcAvailabilityStartTimeFromPresentationTime:function(e,t,n){return p.call(this,e,t,n)},calcAvailabilityEndTimeFromPresentationTime:function(e,t,n){return p.call(this,e,t,n,!0)},calcPresentationTimeFromWallTime:g,calcPresentationTimeFromMediaTime:m,calcPeriodRelativeTimeFromMpdRelativeTime:function(e,t){return t-e.adaptation.period.start},calcMediaTimeFromPresentationTime:function(e,t){return e-t.adaptation.period.start+t.presentationTimeOffset},calcSegmentAvailabilityRange:function(e,t){var n=e.adaptation.period,r={start:n.start,end:n.start+n.duration};if(!t)return r;if(!d&&e.segmentAvailabilityRange)return e.segmentAvailabilityRange;var i=e.segmentDuration||(e.segments&&e.segments.length?e.segments[e.segments.length-1].duration:0);if(e.segmentInfoType===o.default.SEGMENT_TIMELINE&&a.get().streaming.calcSegmentAvailabilityRangeFromTimeline)return function(e){var t=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index],n=l.getRepresentationFor(e.index,t),r=n.SegmentTemplate.SegmentTimeline,i=n.SegmentTemplate.timescale,a=r.S_asArray,o={start:0,end:0},s=0,u=void 0,c=void 0,d=void 0,f=void 0;for(o.start=m(a[0].t/i,e),d=0,f=a.length;d<f;d++)c=0,(u=a[d]).hasOwnProperty("r")&&(c=u.r),s+=u.d/i*(1+c);return o.end=o.start+s,o}(e);var s=g(new Date,n),u=n.start+n.duration;r.start=Math.max(s-n.mpd.timeShiftBufferDepth,n.start);var c=void 0!==e.availabilityTimeOffset&&e.availabilityTimeOffset<i?i-e.availabilityTimeOffset:i;return r.end=s>=u&&s-c<u?u:s-c,r},getPeriodEnd:function(e,t){var n=e.adaptation.period;if(!t)return n.start+n.duration;if(!d&&e.segmentAvailabilityRange)return e.segmentAvailabilityRange;var r=e.segmentDuration||(e.segments&&e.segments.length?e.segments[e.segments.length-1].duration:0),i=g(new Date,n),a=n.start+n.duration,o=void 0!==e.availabilityTimeOffset&&e.availabilityTimeOffset<r?r-e.availabilityTimeOffset:r;return Math.min(i-o,a)},calcWallTimeForSegment:function(e,t){var n=void 0,r=void 0,i=void 0;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,r=e.presentationStartTime+n,i=new Date(e.availabilityStartTime.getTime()+1e3*r)),i},reset:_},l=(0,s.default)(t).getInstance(),_(),e}c.__dashjs_factory_name="TimelineConverter",t.default=a.default.getSingletonFactory(c)},function(e,t,n){"use strict";var r,i,o,u,l,c={encode:function(e){for(var t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},decode:function(e){for(var t=[],n=0;n<e.length;){var r=e[n++];r<128||(r<224?(r=(31&r)<<6,r|=63&e[n++]):r<240?(r=(15&r)<<12,r|=(63&e[n++])<<6,r|=63&e[n++]):(r=(7&r)<<18,r|=(63&e[n++])<<12,r|=(63&e[n++])<<6,r|=63&e[n++])),t.push(String.fromCharCode(r))}return t.join("")}},d={};r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=function(e){for(var t=0,n=[],i=0|e.length/3;0<i--;){var a=(e[t]<<16)+(e[t+1]<<8)+e[t+2];t+=3,n.push(r.charAt(63&a>>18)),n.push(r.charAt(63&a>>12)),n.push(r.charAt(63&a>>6)),n.push(r.charAt(63&a))}return 2==e.length-t?(a=(e[t]<<16)+(e[t+1]<<8),n.push(r.charAt(63&a>>18)),n.push(r.charAt(63&a>>12)),n.push(r.charAt(63&a>>6)),n.push("=")):1==e.length-t&&(a=e[t]<<16,n.push(r.charAt(63&a>>18)),n.push(r.charAt(63&a>>12)),n.push("==")),n.join("")},o=function(){for(var e=[],t=0;t<r.length;++t)e[r.charCodeAt(t)]=t;return e["=".charCodeAt(0)]=0,e}(),u=function(e){for(var t=0,n=[],r=0|e.length/4;0<r--;){var i=(o[e.charCodeAt(t)]<<18)+(o[e.charCodeAt(t+1)]<<12)+(o[e.charCodeAt(t+2)]<<6)+o[e.charCodeAt(t+3)];n.push(255&i>>16),n.push(255&i>>8),n.push(255&i),t+=4}return n&&("="==e.charAt(t-2)?(n.pop(),n.pop()):"="==e.charAt(t-1)&&n.pop()),n},l={encode:function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t},decode:function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")}},d.decodeArray=function(e){var t=u(e);return new Uint8Array(t)},d.encodeASCII=function(e){var t=l.encode(e);return i(t)},d.decodeASCII=function(e){var t=u(e);return l.decode(t)},d.encode=function(e){var t=c.encode(e);return i(t)},d.decode=function(e){var t=u(e);return c.decode(t)},t.decode=d.decode,t.decodeArray=d.decodeArray,t.encode=d.encode,t.encodeASCII=d.encodeASCII},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(336)),i=u(n(44)),a=u(n(338)),o=u(n(138)),s=u(n(137));function u(e){return e&&e.__esModule?e:{default:e}}function l(){var e=this.context;return{createMetricsReporting:function(t){return(0,r.default)(e).getInstance({eventBus:t.eventBus,dashMetrics:t.dashMetrics,metricsConstants:t.metricsConstants,events:t.events}),(0,a.default)(e).create(t)},getReportingFactory:function(){return(0,s.default)(e).getInstance()},getMetricsHandlerFactory:function(){return(0,o.default)(e).getInstance()}}}l.__dashjs_factory_name="MetricsReporting";var c=dashjs.FactoryMaker.getClassFactory(l);c.events=i.default,dashjs.FactoryMaker.updateClassFactory(l.__dashjs_factory_name,c),t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(337)),i=a(n(44));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=void 0,n=void 0,a=(e=e||{}).eventBus,o=e.dashMetrics,s=e.metricsConstants,u=e.events;function l(e){var t=new r.default;if(n){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);t.mpdurl||(t.mpdurl=n.originalUrl||n.url),t.terror||(t.terror=new Date),o.addDVBErrors(t)}}function c(e){e.error||(n=e.manifest)}function d(e){l({errorcode:r.default.BASE_URL_CHANGED,servicelocation:e.entry})}function f(){l({errorcode:r.default.BECAME_REPORTER})}function h(e){switch(e.metric){case s.HTTP_REQUEST:(0===(t=e.value).responsecode||t.responsecode>=400||t.responsecode<100||t.responsecode>=600)&&l({errorcode:t.responsecode||r.default.CONNECTION_ERROR,url:t.url,terror:t.tresponse,servicelocation:t._serviceLocation})}var t}function p(e){var t=void 0;switch(e.error?e.error.code:0){case MediaError.MEDIA_ERR_NETWORK:t=r.default.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:t=r.default.CORRUPT_MEDIA_OTHER;break;default:return}l({errorcode:t})}function g(){a.on(u.MANIFEST_UPDATED,c,t),a.on(u.SERVICE_LOCATION_BLACKLIST_CHANGED,d,t),a.on(u.METRIC_ADDED,h,t),a.on(u.METRIC_UPDATED,h,t),a.on(u.PLAYBACK_ERROR,p,t),a.on(i.default.BECAME_REPORTING_PLAYER,f,t)}return t={initialise:g,reset:function(){a.off(u.MANIFEST_UPDATED,c,t),a.off(u.SERVICE_LOCATION_BLACKLIST_CHANGED,d,t),a.off(u.METRIC_ADDED,h,t),a.off(u.METRIC_UPDATED,h,t),a.off(u.PLAYBACK_ERROR,p,t),a.off(i.default.BECAME_REPORTING_PLAYER,f,t)}},g(),t}o.__dashjs_factory_name="DVBErrorsTranslator",t.default=dashjs.FactoryMaker.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};r.SSL_CONNECTION_FAILED_PREFIX="SSL",r.DNS_RESOLUTION_FAILED="C00",r.HOST_UNREACHABLE="C01",r.CONNECTION_REFUSED="C02",r.CONNECTION_ERROR="C03",r.CORRUPT_MEDIA_ISOBMFF="M00",r.CORRUPT_MEDIA_OTHER="M01",r.BASE_URL_CHANGED="F00",r.BECAME_REPORTER="S00",t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(339)),i=o(n(350)),a=o(n(44));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){e=e||{};var t=void 0,n={},o=this.context,s=e.eventBus,u=e.events;function l(t){if(!t.error){var u=Object.keys(n);(0,i.default)(o).getInstance({adapter:e.adapter,constants:e.constants}).getMetrics(t.manifest).forEach((function(t){var i=JSON.stringify(t);if(n.hasOwnProperty(i))u.splice(i,1);else try{var a=(0,r.default)(o).create(e);a.initialize(t),n[i]=a}catch(e){}})),u.forEach((function(e){n[e].reset(),delete n[e]})),s.trigger(a.default.METRICS_INITIALISATION_COMPLETE)}}function c(){Object.keys(n).forEach((function(e){n[e].reset()})),n={}}return t={reset:function(){s.off(u.MANIFEST_UPDATED,l,t),s.off(u.STREAM_TEARDOWN_COMPLETE,c,t)}},s.on(u.MANIFEST_UPDATED,l,t),s.on(u.STREAM_TEARDOWN_COMPLETE,c,t),t}s.__dashjs_factory_name="MetricsCollectionController",t.default=dashjs.FactoryMaker.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(340)),i=o(n(341)),a=o(n(345));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){e=e||{};var t=void 0,n=void 0,o=void 0,s=this.context;function u(){t&&t.reset(),n&&n.reset(),o&&o.reset()}return{initialize:function(l){try{(o=(0,r.default)(s).create({mediaElement:e.mediaElement})).initialize(l.Range),(n=(0,i.default)(s).create({debug:e.debug,metricsConstants:e.metricsConstants})).initialize(l.Reporting,o),(t=(0,a.default)(s).create({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants,events:e.events})).initialize(l.metrics,n)}catch(e){throw u(),e}},reset:u}}s.__dashjs_factory_name="MetricsController",t.default=dashjs.FactoryMaker.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(113),a=(r=i)&&r.__esModule?r:{default:r};function o(e){e=e||{};var t,n=!1,r=this.context,i=void 0,o=e.mediaElement;return t={initialize:function(e){e&&e.length&&(e.forEach((function(e){var t=e.starttime,n=t+e.duration;i.add(t,n)})),n=!!e[0]._useWallClockTime)},reset:function(){i.clear()},isEnabled:function(){var e,t=i.length;if(!t)return!0;e=n?(new Date).getTime()/1e3:o.currentTime;for(var r=0;r<t;r+=1){var a=i.start(r),s=i.end(r);if(a<=e&&e<s)return!0}return!1}},i=(0,a.default)(r).create(),t}o.__dashjs_factory_name="RangeController",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(137),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var t=[],n=(0,a.default)(this.context).getInstance(e);return{initialize:function(e,r){e.some((function(e){var i=n.create(e,r);if(i)return t.push(i),!0}))},reset:function(){t.forEach((function(e){return e.reset()})),t=[]},report:function(e,n){t.forEach((function(t){return t.report(e,n)}))}}}o.__dashjs_factory_name="ReportingController",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(343)),i=a(n(344));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){e=e||{};var t,n=this.context,a=void 0,o=void 0,s=void 0,u=void 0,l=void 0,c=void 0,d=[],f=e.metricsConstants;function h(){s=!1,u=!1,l=null,c=null}return t={report:function(e,t){Array.isArray(t)||(t=[t]),u&&c.isEnabled()&&t.forEach((function(t){var n=a.serialise(t);e!==f.DVB_ERRORS&&(n="metricname="+e+"&"+n),function(e,t,n){var r=new XMLHttpRequest,i=function(){var e=d.indexOf(r);-1!==e&&(d.splice(e,1),r.status>=200&&r.status<300?t&&t():n&&n())};d.push(r);try{r.open("GET",e),r.onloadend=i,r.onerror=i,r.send()}catch(e){r.onerror()}}(n=l+"?"+n,null,(function(){u=!1}))}))},initialize:function(e,t){var n=void 0;if(c=t,!(l=e.dvb_reportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");s||((n=e.dvb_probability)&&(1e3===n||n/1e3>=o.random())&&(u=!0),s=!0)},reset:function(){h()}},a=(0,r.default)(n).getInstance(),o=(0,i.default)(n).getInstance(),h(),t}o.__dashjs_factory_name="DVBReporting",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";function r(){return{serialise:function e(t){var n=[],r=[],i=void 0,a=void 0;for(i in t)if(t.hasOwnProperty(i)&&0!==i.indexOf("_")){if(null==(a=t[i])&&(a=""),Array.isArray(a)){if(!a.length)continue;r=[],a.forEach((function(t){var n="Object"!==Object.prototype.toString.call(t).slice(8,-1);r.push(n?t:e(t))})),a=r.map(encodeURIComponent).join(",")}else"string"==typeof a?a=encodeURIComponent(a):a instanceof Date?a=a.toISOString():"number"==typeof a&&(a=Math.round(a));n.push(i+"="+a)}return n.join("&")}}}Object.defineProperty(t,"__esModule",{value:!0}),r.__dashjs_factory_name="MetricSerialiser",t.default=dashjs.FactoryMaker.getSingletonFactory(r)},function(e,t,n){"use strict";function r(){var e,t=window.crypto||window.msCrypto,n=Uint32Array,r=Math.pow(2,8*n.BYTES_PER_ELEMENT)-1,i=void 0,a=void 0;function o(){t&&(i||(i=new n(10)),t.getRandomValues(i),a=0)}return e={random:function(e,n){var s=void 0;return e||(e=0),n||(n=1),t?(a===i.length&&o(),s=i[a]/r,a+=1):s=Math.random(),s*(n-e)+e}},o(),e}Object.defineProperty(t,"__esModule",{value:!0}),r.__dashjs_factory_name="RNG",t.default=dashjs.FactoryMaker.getSingletonFactory(r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(138),a=(r=i)&&r.__esModule?r:{default:r};function o(e){e=e||{};var t=[],n=void 0,r=this.context,i=e.eventBus,o=e.events,s=(0,a.default)(r).getInstance({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants});function u(e){t.forEach((function(t){t.handleNewMetric(e.metric,e.value,e.mediaType)}))}return n={initialize:function(e,r){e.split(",").forEach((function(e,n,i){var a;if(-1!==e.indexOf("(")&&-1===e.indexOf(")")){var o=i[n+1];o&&-1===o.indexOf("(")&&-1!==o.indexOf(")")&&(e+=","+o,delete i[n+1])}(a=s.create(e,r))&&t.push(a)})),i.on(o.METRIC_ADDED,u,n),i.on(o.METRIC_UPDATED,u,n)},reset:function(){i.off(o.METRIC_ADDED,u,n),i.off(o.METRIC_UPDATED,u,n),t.forEach((function(e){return e.reset()})),t=[]}}}o.__dashjs_factory_name="MetricsHandlersController",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(139),a=(r=i)&&r.__esModule?r:{default:r};function o(e){e=e||{};var t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,s=this.context,u=(0,a.default)(s).getInstance(),l=[],c=e.metricsConstants;function d(){var e=function(){try{return Object.keys(l).map((function(e){return l[e]})).reduce((function(e,t){return e.level<t.level?e:t}))}catch(e){return}}();e&&o!==e.t&&(o=e.t,t.report(r,e))}return{initialize:function(e,a,o){a&&(n=u.validateN(o),t=a,r=u.reconstructFullMetricName(e,o),i=setInterval(d,n))},reset:function(){clearInterval(i),i=null,n=0,t=null,o=null},handleNewMetric:function(e,t,n){e===c.BUFFER_LEVEL&&(l[n]=t)}}}o.__dashjs_factory_name="BufferLevelHandler",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(44),a=(r=i)&&r.__esModule?r:{default:r};t.default=dashjs.FactoryMaker.getClassFactory((function(e){var t=void 0,n=(e=e||{}).eventBus,r=e.metricsConstants;function i(){n.off(a.default.METRICS_INITIALISATION_COMPLETE,i,this),n.trigger(a.default.BECAME_REPORTING_PLAYER)}return{initialize:function(e,r){r&&(t=r,n.on(a.default.METRICS_INITIALISATION_COMPLETE,i,this))},reset:function(){t=null},handleNewMetric:function(e,n){e===r.DVB_ERRORS&&t&&t.report(e,n)}}}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(139),a=(r=i)&&r.__esModule?r:{default:r};function o(e){e=e||{};var t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,s=[],u=(0,a.default)(this.context).getInstance(),l=e.metricsConstants;function c(){var e=s;e.length&&t&&t.report(i,e),s=[]}return{initialize:function(e,a,s,l){a&&(n=u.validateN(s),t=a,l&&l.length&&(r=l),i=u.reconstructFullMetricName(e,s,l),o=setInterval(c,n))},reset:function(){clearInterval(o),o=null,n=null,r=null,s=[],t=null},handleNewMetric:function(e,t){e===l.HTTP_REQUEST&&(r&&r!==t.type||s.push(t))}}}o.__dashjs_factory_name="HttpListHandler",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";function r(){var e=void 0,t=void 0;return{initialize:function(n,r){e=n,t=r},reset:function(){t=null,e=void 0},handleNewMetric:function(n,r){n===e&&t&&t.report(e,r)}}}Object.defineProperty(t,"__esModule",{value:!0}),r.__dashjs_factory_name="GenericMetricHandler",t.default=dashjs.FactoryMaker.getClassFactory(r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(351)),i=o(n(352)),a=o(n(353));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=(e=e||{}).adapter,n=e.constants;return{getMetrics:function(e){var o=[];return e&&e.Metrics_asArray&&e.Metrics_asArray.forEach((function(s){var u=new r.default,l=t.getIsDynamic(e);s.hasOwnProperty("metrics")&&(u.metrics=s.metrics,s.Range_asArray&&s.Range_asArray.forEach((function(r){var a=new i.default;a.starttime=function(e,r,i){var a=void 0,o=void 0,s=0;return r?s=t.getAvailabilityStartTime(e)/1e3:(a=t.getRegularPeriods(e)).length&&(s=a[0].start),o=s,i&&i.hasOwnProperty(n.START_TIME)&&(o+=i.starttime),o}(e,l,r),r.hasOwnProperty("duration")?a.duration=r.duration:a.duration=t.getDuration(e),a._useWallClockTime=l,u.Range.push(a)})),s.Reporting_asArray&&(s.Reporting_asArray.forEach((function(e){var t=new a.default;e.hasOwnProperty(n.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty("value")&&(t.value=e.value),e.hasOwnProperty(n.DVB_REPORTING_URL)&&(t.dvb_reportingUrl=e[n.DVB_REPORTING_URL]),e.hasOwnProperty(n.DVB_PROBABILITY)&&(t.dvb_probability=e[n.DVB_PROBABILITY]),u.Reporting.push(t))})),o.push(u)))})),o}}}s.__dashjs_factory_name="ManifestParsing",t.default=dashjs.FactoryMaker.getSingletonFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metrics="",this.Range=[],this.Reporting=[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value="",this.dvb_reportingUrl="",this.dvb_probability=1e3}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(355)),i=c(n(61)),a=c(n(367)),o=c(n(45)),s=c(n(368)),u=c(n(369)),l=c(n(370));function c(e){return e&&e.__esModule?e:{default:e}}var d=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],f=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function h(){var e=void 0,t=this.context;function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("function"==typeof e[r[Object.keys(r)[0]]])return r}return null}return e={createProtectionSystem:function(a){var o=null,c=(0,i.default)(t).getInstance();c.setConfig({debug:a.debug,BASE64:a.BASE64}),c.initialize();var h=function(r){var i=r.debug,a=i.getLogger(e),o=r.eventBus,c=r.errHandler,h=r.videoModel?r.videoModel.getElement():null;return h&&void 0===h.onencrypted||h&&void 0===h.mediaKeys?n(h,f)?(a.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),(0,u.default)(t).create({debug:i,eventBus:o,events:r.events,api:n(h,f)})):n(h,d)?(a.info("EME detected on this user agent! (ProtectionModel_01b)"),(0,l.default)(t).create({debug:i,eventBus:o,errHandler:c,events:r.events,api:n(h,d)})):(a.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(a.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),(0,s.default)(t).create({debug:i,eventBus:o,events:r.events}))}(a);return!o&&h&&(o=(0,r.default)(t).create({protectionModel:h,protectionKeyController:c,eventBus:a.eventBus,debug:a.debug,events:a.events,BASE64:a.BASE64,constants:a.constants,cmcdModel:a.cmcdModel,settings:a.settings}),a.capabilities.setEncryptedMediaSupported(!0)),o}}}h.__dashjs_factory_name="Protection";var p=dashjs.FactoryMaker.getClassFactory(h);p.events=a.default,p.errors=o.default,dashjs.FactoryMaker.updateClassFactory(h.__dashjs_factory_name,p),t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=p(n(35)),a=p(n(356)),o=p(n(84)),s=p(n(45)),u=p(n(11)),l=p(n(357)),c=p(n(358)),d=n(12),f=p(n(43)),h=p(n(6));function p(e){return e&&e.__esModule?e:{default:e}}function g(e){var t=(e=e||{}).protectionKeyController,n=e.protectionModel,p=e.eventBus,g=e.events,m=e.debug,y=e.BASE64,v=e.constants,_=[],T=e.cmcdModel,b=e.settings,E=void 0,S=void 0,A=void 0,C=void 0,w=void 0,I=void 0,R=void 0,O=void 0,P=void 0,D=void 0;function M(){if(!(p&&p.hasOwnProperty("on")&&t&&t.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function N(e,t){var r=i.default.getPSSHForKeySystem(O,e),a=F(O);if(r){if(L(r))return;try{n.createKeySession(r,a,B(O),t)}catch(e){p.trigger(g.KEY_SESSION_CREATED,{data:null,error:new u.default(s.default.KEY_SESSION_CREATED_ERROR_CODE,s.default.KEY_SESSION_CREATED_ERROR_MESSAGE+e.message)})}}else e?n.createKeySession(e,a,B(O),t):p.trigger(g.KEY_SESSION_CREATED,{data:null,error:new u.default(s.default.KEY_SESSION_CREATED_ERROR_CODE,s.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(O?O.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function L(e){if(!e)return!1;try{for(var r=n.getAllInitData(),i=0;i<r.length;i++)if(t.initDataEquals(e,r[i]))return S.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch(e){return!1}}function k(e,t){M(),n.loadKeySession(e,t,B(O))}function x(e){M(),e?(n.setMediaElement(e),p.on(g.NEED_KEY,Y,this)):null===e&&(n.setMediaElement(e),p.off(g.NEED_KEY,Y,this))}function F(e){var t=null;if(e){var n=e.systemString;w&&(t=n in w?w[n]:null)}return t}function U(e){var t=F(e),n=[],r=[],i=t&&t.audioRobustness&&t.audioRobustness.length>0?t.audioRobustness:R,s=t&&t.videoRobustness&&t.videoRobustness.length>0?t.videoRobustness:R,u=B(e),l=t&&t.distinctiveIdentifier?t.distinctiveIdentifier:"optional",c=t&&t.persistentState?t.persistentState:"temporary"===u?"optional":"required";return C.forEach((function(e){e.type===v.AUDIO?n.push(new a.default(e.codec,i)):e.type===v.VIDEO&&r.push(new a.default(e.codec,s))})),new o.default(n,r,l,c,[u])}function B(e){var t=F(e);return t&&t.sessionType?t.sessionType:I}function j(e,r){e=e.sort((function(t,n){return(w&&w[t.ks.systemString]&&w[t.ks.systemString].priority>=0?w[t.ks.systemString].priority:e.length)-(w&&w[n.ks.systemString]&&w[n.ks.systemString].priority>=0?w[n.ks.systemString].priority:e.length)})),void 0===O?function(e,r){var i=this,a=[],o=void 0;O=null,A.push(e);for(var l=0;l<e.length;l++)a.push({ks:e[l].ks,configs:[U(e[l].ks)]});var c=void 0,d=function e(t){p.off(g.KEY_SYSTEM_ACCESS_COMPLETE,e,i),t.error?(O=void 0,p.off(g.INTERNAL_KEY_SYSTEM_SELECTED,f,i),r||p.trigger(g.KEY_SYSTEM_SELECTED,{data:null,error:new u.default(s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+t.error)})):(c=t.data,S.info("DRM: KeySystem Access Granted ("+c.keySystem.systemString+")! Selecting key system..."),n.selectKeySystem(c))},f=function e(a){if(p.off(g.INTERNAL_KEY_SYSTEM_SELECTED,e,i),p.off(g.KEY_SYSTEM_ACCESS_COMPLETE,d,i),a.error)O=void 0,r||p.trigger(g.KEY_SYSTEM_SELECTED,{data:null,error:new u.default(s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+a.error)});else{if(!n)return;O=n.getKeySystem(),p.trigger(g.KEY_SYSTEM_SELECTED,{data:c});var l=F(O);l&&l.serverCertificate&&l.serverCertificate.length>0&&n.setServerCertificate(y.decodeArray(l.serverCertificate).buffer);for(var f=0;f<A.length;f++)for(o=0;o<A[f].length;o++)if(O===A[f][o].ks){if(t.isClearKey(O)&&l&&l.hasOwnProperty("clearkeys")){var h={kids:Object.keys(l.clearkeys)};A[f][o].initData=(new TextEncoder).encode(JSON.stringify(h))}A[f][o].sessionId?k(A[f][o].sessionId,A[f][o].initData):null!==A[f][o].initData&&N(A[f][o].initData,A[f][o].cdmData);break}}};p.on(g.INTERNAL_KEY_SYSTEM_SELECTED,f,i),p.on(g.KEY_SYSTEM_ACCESS_COMPLETE,d,i),n.requestKeySystemAccess(a)}(e,r):O?function(e,r){var a=this,o=[],l=e.findIndex((function(e){return e.ks===O}));if(-1===l||!e[l].initData)return;if(L(i.default.getPSSHForKeySystem(O,e[l].initData)))return;o.push({ks:e[l].ks,configs:[U(O)]});var c=function n(i){if(p.off(g.KEY_SYSTEM_ACCESS_COMPLETE,n,a),i.error)r||p.trigger(g.KEY_SYSTEM_SELECTED,{error:new u.default(s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+i.error)});else{S.info("DRM: KeySystem Access Granted"),p.trigger(g.KEY_SYSTEM_SELECTED,{data:i.data});var o=F(O);if(t.isClearKey(O)&&o&&o.hasOwnProperty("clearkeys")){var c={kids:Object.keys(o.clearkeys)};e[l].initData=(new TextEncoder).encode(JSON.stringify(c))}e[l].sessionId?k(e[l].sessionId,e[l].initData):e[l].initData&&N(e[l].initData,e[l].cdmData)}};p.on(g.KEY_SYSTEM_ACCESS_COMPLETE,c,a),n.requestKeySystemAccess(o)}(e,r):A.push(e)}function H(e,t){p.trigger(g.LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function G(e){e.error?p.trigger(g.KEY_STATUSES_CHANGED,{data:null,error:e.error}):S.debug("DRM: key status = "+e.status)}function q(e){S.debug("DRM: onKeyMessage");var a=e.data;p.trigger(g.KEY_MESSAGE,{data:a});var o=a.messageType?a.messageType:"license-request",d=a.message,h=a.sessionToken,m=F(O),y=O?O.systemString:null,v=t.getLicenseServer(O,m,o),_={sessionToken:h,messageType:o};if(d&&0!==d.byteLength){if(!v)return S.debug("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+h.getSessionID()),void H(_);if(t.isClearKey(O)){var T=t.processClearKeyLicenseRequest(O,m,d);if(T)return S.debug("DRM: ClearKey license request handled by application!"),H(_),void n.updateKeySession(h,T)}var b=null;if(m&&m.serverURL){var E=m.serverURL;"string"==typeof E&&""!==E?b=E:"object"===(void 0===E?"undefined":r(E))&&E.hasOwnProperty(o)&&(b=E[o])}else if(m&&m.laURL&&""!==m.laURL)b=m.laURL;else if(t.isClearKey(O))b=O.getLicenseServerUrlFromMediaInfo(C);else{var A=i.default.getPSSHData(h.initData);(b=O.getLicenseServerURLFromInitData(A))||(b=e.data.laURL)}if(b=v.getServerURLFromMessage(b,d,o)){var w={},I=!1,R=function(e){if(e)for(var t in e)"authorization"===t.toLowerCase()&&(I=!0),w[t]=e[t]};m&&R(m.httpRequestHeaders),R(O.getRequestHeadersFromMessage(d)),m&&"boolean"==typeof m.withCredentials&&(I=m.withCredentials);var M=function(e,t,n,r){var i=e.response?v.getErrorResponse(e.response,n,r):"NONE";H(t,new u.default(s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+n+' update, XHR complete. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState+". Response is "+i))},N=function(e){if(n)if(200===e.status){var t=new c.default(e.responseURL,f.default.parseHttpHeaders(e.getAllResponseHeaders?e.getAllResponseHeaders():null),e.response);K(D,t).then((function(){var r=v.getLicenseMessage(t.data,y,o);null!==r?(H(_),n.updateKeySession(h,r)):M(e,_,y,o)}))}else M(e,_,y,o)},L=function(e){H(_,new u.default(s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+y+' update, XHR aborted. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},k=function(e){H(_,new u.default(s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+y+' update, XHR error. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},x=O.getLicenseRequestFromMessage(d),U=v.getHTTPMethod(o),B=v.getResponseType(y,o),j=m&&!isNaN(m.httpTimeout)?m.httpTimeout:8e3,G=h.getSessionID()||null,q=new l.default(b,U,B,w,I,o,G,x);K(P,q).then((function(){V(q,3,j,N,L,k)}))}else H(_,new u.default(s.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))}else H(_,new u.default(s.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function V(e,t,n,r,i,a){var o=new XMLHttpRequest;if(b.get().streaming.cmcd&&b.get().streaming.cmcd.enabled&&b.get().streaming.cmcd.mode===h.default.CMCD_MODE_QUERY){var s=T.getQueryParameter({url:e.url,type:d.HTTPRequest.LICENSE});s&&(e.url=f.default.addAditionalQueryParameterToUrl(e.url,[s]))}for(var u in o.open(e.method,e.url,!0),o.responseType=e.responseType,o.withCredentials=e.withCredentials,n>0&&(o.timeout=n),e.headers)o.setRequestHeader(u,e.headers[u]);if(b.get().streaming.cmcd&&b.get().streaming.cmcd.enabled&&b.get().streaming.cmcd.mode===h.default.CMCD_MODE_HEADER){var l=T.getHeaderParameters({url:e.url,type:d.HTTPRequest.LICENSE});if(l)for(var c in l){var m=l[c];m&&o.setRequestHeader(c,m)}}var y=function(){t--,setTimeout((function(){V(e,t,n,r,i,a)}),1e3)};o.onload=function(){200===this.status||t<=0?r(this):(S.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+t),y())},o.ontimeout=o.onerror=function(){t<=0?a(this):(S.warn("License request network request failed . Retrying it... Pending retries: "+t),y())},o.onabort=function(){i(this)},p.trigger(g.LICENSE_REQUEST_SENDING,{url:e.url,headers:e.headers,payload:e.data,sessionId:e.sessionId}),o.send(e.data)}function Y(e,n){if(S.debug("DRM: onNeedKey"),"cenc"===e.key.initDataType)if(0===C.length&&(S.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(n=void 0===n?1:n+1)<5))_.push(setTimeout((function(){Y(e,n)}),500));else{var r=e.key.initData;if(ArrayBuffer.isView(r)&&(r=r.buffer),O){var a=i.default.getPSSHForKeySystem(O,r);if(a&&L(a))return}S.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(r)));var o=t.getSupportedKeySystems(r,w);0!==o.length?j(o,!1):S.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!")}else S.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+e.key.initDataType)}function K(e,t){return e?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}return E={initializeForMedia:function(e){if(!e)throw new Error("mediaInfo can not be null or undefined");M(),p.on(g.INTERNAL_KEY_MESSAGE,q,this),p.on(g.INTERNAL_KEY_STATUS_CHANGED,G,this),C.push(e);var n=t.getSupportedKeySystemsFromContentProtection(e.contentProtection);n&&n.length>0&&j(n,!0)},clearMediaInfoArrayByStreamId:function(e){C=C.filter((function(t){return t.streamInfo.id!==e}))},createKeySession:N,loadKeySession:k,removeKeySession:function(e){M(),n.removeKeySession(e)},closeKeySession:function(e){M(),n.closeKeySession(e)},setServerCertificate:function(e){M(),n.setServerCertificate(e)},setMediaElement:x,setSessionType:function(e){I=e},setRobustnessLevel:function(e){R=e},setProtectionData:function(e){w=e,t.setProtectionData(e)},getSupportedKeySystemsFromContentProtection:function(e){return M(),t.getSupportedKeySystemsFromContentProtection(e)},getKeySystems:function(){return t?t.getKeySystems():[]},setKeySystems:function(e){t&&t.setKeySystems(e)},setLicenseRequestFilters:function(e){P=e},setLicenseResponseFilters:function(e){D=e},stop:function(){n&&n.stop()},reset:function(){M(),P=[],D=[],p.off(g.INTERNAL_KEY_MESSAGE,q,this),p.off(g.INTERNAL_KEY_STATUS_CHANGED,G,this),x(null),O=void 0,n&&(n.reset(),n=null),_.forEach((function(e){return clearTimeout(e)})),_=[],C=[]}},S=m.getLogger(E),A=[],C=[],I="temporary",R="",P=[],D=[],E}g.__dashjs_factory_name="ProtectionController",t.default=dashjs.FactoryMaker.getClassFactory(g)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.contentType=t,this.robustness=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,r,i,a,o,s,u){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t,this.method=n,this.responseType=r,this.headers=i,this.withCredentials=a,this.messageType=o,this.sessionId=s,this.data=u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t,this.headers=n,this.data=r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(85)),i=s(n(86)),a=s(n(35)),o=s(n(28));function s(e){return e&&e.__esModule?e:{default:e}}var u="e2719d58-a985-b3c9-781a-b030af78d30e",l=o.default.CLEARKEY_KEYSTEM_STRING,c="urn:uuid:"+u;function d(e){var t=(e=e||{}).BASE64,n={attributes:["Laurl","laurl"],prefixes:["clearkey","dashif"]};return{uuid:u,schemeIdURI:c,systemString:l,getInitData:function(e,n){try{var r=a.default.parseInitDataFromContentProtection(e,t);if(!r&&n){var i={kids:[function(e){try{var t=e.replace(/-/g,"");return(t=btoa(t.match(/\w{2}/g).map((function(e){return String.fromCharCode(parseInt(e,16))})).join(""))).replace(/=/g,"")}catch(e){return null}}(n["cenc:default_KID"])]};r=(new TextEncoder).encode(JSON.stringify(i))}return r}catch(e){return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(e){return JSON.parse(String.fromCharCode.apply(null,new Uint8Array(e)))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getSessionId:function(){return null},getLicenseServerUrlFromMediaInfo:function(e){try{if(!e||0===e.length)return null;for(var t=0,r=null;t<e.length&&!r;){var i=e[t];if(i&&i.contentProtection&&i.contentProtection.length>0){var a=i.contentProtection.filter((function(e){return e.schemeIdUri&&e.schemeIdUri===c}));if(a&&a.length>0)for(var o=0;o<a.length&&!r;){for(var s=a[o],u=0;u<n.attributes.length&&!r;){for(var l=0,d=n.attributes[u];l<n.prefixes.length&&!r;){var f=n.prefixes[l];s[d]&&s[d].__prefix&&s[d].__prefix===f&&s[d].__text&&(r=s[d].__text),l+=1}u+=1}o+=1}}t+=1}return r}catch(e){return null}},getClearKeysFromProtectionData:function(e,t){var n=null;if(e){for(var a=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),o=[],s=0;s<a.kids.length;s++){var u=a.kids[s],l=e.clearkeys&&e.clearkeys.hasOwnProperty(u)?e.clearkeys[u]:null;if(!l)throw new Error("DRM: ClearKey keyID ("+u+") is not known!");o.push(new r.default(u,l))}n=new i.default(o)}return n}}}d.__dashjs_factory_name="KeySystemClearKey",t.default=dashjs.FactoryMaker.getSingletonFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(85)),i=s(n(86)),a=s(n(35)),o=s(n(28));function s(e){return e&&e.__esModule?e:{default:e}}var u="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",l=o.default.CLEARKEY_KEYSTEM_STRING;function c(e){var t=void 0,n=e.BASE64,o=e.debug.getLogger(t);return t={uuid:u,schemeIdURI:"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",systemString:l,getInitData:function(e){return a.default.parseInitDataFromContentProtection(e,n)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getSessionId:function(){return null},getClearKeysFromProtectionData:function(e,t){var n=null;if(e){for(var a=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),s=[],u=0;u<a.kids.length;u++){var l=a.kids[u],c=e.clearkeys&&e.clearkeys.hasOwnProperty(l)?e.clearkeys[l]:null;if(!c)throw new Error("DRM: ClearKey keyID ("+l+") is not known!");s.push(new r.default(l,c))}n=new i.default(s),o.warn("ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return n}}}c.__dashjs_factory_name="KeySystemW3CClearKey",t.default=dashjs.FactoryMaker.getSingletonFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(35)),i=a(n(28));function a(e){return e&&e.__esModule?e:{default:e}}var o="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",s=i.default.WIDEVINE_KEYSTEM_STRING;function u(e){var t=null,n=(e=e||{}).BASE64;return{uuid:o,schemeIdURI:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",systemString:s,init:function(e){e&&(t=e)},getInitData:function(e){return r.default.parseInitDataFromContentProtection(e,n)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getSessionId:function(e){return t&&t.sessionId?t.sessionId:e&&e.sessionId?e.sessionId:null}}}u.__dashjs_factory_name="KeySystemWidevine",t.default=dashjs.FactoryMaker.getSingletonFactory(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(35)),i=a(n(28));function a(e){return e&&e.__esModule?e:{default:e}}var o="9a04f079-9840-4286-ab92-e65be0885f95",s=i.default.PLAYREADY_KEYSTEM_STRING,u=void 0;function l(e){var t="utf-16",n=(e=e||{}).BASE64;function i(){if(!n||!n.hasOwnProperty("decodeArray")||!n.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return{uuid:o,schemeIdURI:"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",systemString:s,getInitData:function(e){var t,a,o,s=new Uint8Array([112,115,115,104,0,0,0,0]),u=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=0,c=null,d=void 0,f=void 0;if(i(),!e)return null;if("pssh"in e)return r.default.parseInitDataFromContentProtection(e,n);if("pro"in e)c=n.decodeArray(e.pro.__text);else{if(!("prheader"in e))return null;c=n.decodeArray(e.prheader.__text)}return t=c.length,a=4+s.length+u.length+4+t,o=new ArrayBuffer(a),d=new Uint8Array(o),(f=new DataView(o)).setUint32(l,a),l+=4,d.set(s,l),l+=s.length,d.set(u,l),l+=u.length,f.setUint32(l,t),l+=4,d.set(c,l),l+=t,d.buffer},getRequestHeadersFromMessage:function(e){var n,r=void 0,i={},a=new DOMParser,o="utf-16"===t?new Uint16Array(e):new Uint8Array(e);n=String.fromCharCode.apply(null,o);for(var s=(r=a.parseFromString(n,"application/xml")).getElementsByTagName("name"),u=r.getElementsByTagName("value"),l=0;l<s.length;l++)i[s[l].childNodes[0].nodeValue]=u[l].childNodes[0].nodeValue;return i.hasOwnProperty("Content")&&(i["Content-Type"]=i.Content,delete i.Content),i.hasOwnProperty("Content-Type")||(i["Content-Type"]="text/xml; charset=utf-8"),i},getLicenseRequestFromMessage:function(e){var r=null,a=new DOMParser,o="utf-16"===t?new Uint16Array(e):new Uint8Array(e);i();var s=String.fromCharCode.apply(null,o),u=a.parseFromString(s,"application/xml");if(!u.getElementsByTagName("PlayReadyKeyMessage")[0])return e;var l=u.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;return l&&(r=n.decode(l)),r},getLicenseServerURLFromInitData:function(e){if(e)for(var t=new DataView(e),n=t.getUint16(4,!0),r=6,i=new DOMParser,a=0;a<n;a++){var o=t.getUint16(r,!0);r+=2;var s=t.getUint16(r,!0);if(r+=2,1===o){var u=e.slice(r,r+s),l=String.fromCharCode.apply(null,new Uint16Array(u)),c=i.parseFromString(l,"application/xml");if(c.getElementsByTagName("LA_URL")[0]){var d=c.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(d)return d}if(c.getElementsByTagName("LUI_URL")[0]){var f=c.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(f)return f}}else r+=s}return null},getCDMData:function(){var e=void 0,t=void 0,r=void 0,a=void 0;if(i(),u&&u.cdmData){for(e=[],a=0;a<u.cdmData.length;++a)e.push(u.cdmData.charCodeAt(a)),e.push(0);for(e=String.fromCharCode.apply(null,e),e=n.encode(e),t='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",e),r=[],a=0;a<t.length;++a)r.push(t.charCodeAt(a)),r.push(0);return new Uint8Array(r).buffer}return null},getSessionId:function(e){return u&&u.sessionId?u.sessionId:e&&e.sessionId?e.sessionId:null},setPlayReadyMessageFormat:function(e){if("utf-8"!==e&&"utf-16"!==e)throw new Error('Specified message format is not one of "utf-8" or "utf-16"');t=e},init:function(e){e&&(u=e)}}}l.__dashjs_factory_name="KeySystemPlayReady",t.default=dashjs.FactoryMaker.getSingletonFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(28),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var t=(e=e||{}).BASE64,n={};n[a.default.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(e){return t.decodeArray(e.license)},getErrorResponse:function(e){return e}},n[a.default.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}};return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(e){return n[e].responseType},getLicenseMessage:function(e,r){return function(){if(!t||!t.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}(),n[r].getLicenseMessage(e)},getErrorResponse:function(e,t){return n[t].getErrorResponse(e)}}}o.__dashjs_factory_name="DRMToday",t.default=dashjs.FactoryMaker.getSingletonFactory(o)},function(e,t,n){"use strict";function r(){var e="http://schemas.xmlsoap.org/soap/envelope/";function t(e){var t=String.fromCharCode.apply(null,new Uint8Array(e));return decodeURIComponent(escape(t))}function n(n){if(window.DOMParser){var r=t(n),i=(new window.DOMParser).parseFromString(r,"text/xml"),a=i?i.getElementsByTagNameNS(e,"Envelope")[0]:null,o=a?a.getElementsByTagNameNS(e,"Body")[0]:null;if(o?o.getElementsByTagNameNS(e,"Fault")[0]:null)return null}return n}function r(n){var r="",i="",a="",o=-1,s=-1;if(window.DOMParser){var u=t(n),l=(new window.DOMParser).parseFromString(u,"text/xml"),c=l?l.getElementsByTagNameNS(e,"Envelope")[0]:null,d=c?c.getElementsByTagNameNS(e,"Body")[0]:null,f=d?d.getElementsByTagNameNS(e,"Fault")[0]:null,h=f?f.getElementsByTagName("detail")[0]:null,p=h?h.getElementsByTagName("Exception")[0]:null,g=null;if(null===f)return u;r=(g=f.getElementsByTagName("faultstring")[0].firstChild)?g.nodeValue:null,null!==p&&(i=(g=p.getElementsByTagName("StatusCode")[0])?g.firstChild.nodeValue:null,o=(a=(g=p.getElementsByTagName("Message")[0])?g.firstChild.nodeValue:null)?a.lastIndexOf("[")+1:-1,s=a?a.indexOf("]"):-1,a=a?a.substring(o,s):"")}var m="code: "+i+", name: "+r;return a&&(m+=", message: "+a),m}return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return n.call(this,e)},getErrorResponse:function(e){return r.call(this,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),r.__dashjs_factory_name="PlayReady",t.default=dashjs.FactoryMaker.getSingletonFactory(r)},function(e,t,n){"use strict";function r(){return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}Object.defineProperty(t,"__esModule",{value:!0}),r.__dashjs_factory_name="Widevine",t.default=dashjs.FactoryMaker.getSingletonFactory(r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(85)),i=a(n(86));function a(e){return e&&e.__esModule?e:{default:e}}function o(){return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(e){if(!e.hasOwnProperty("keys"))return null;for(var t=[],n=0;n<e.keys.length;n++){var a=e.keys[n],o=a.kid.replace(/=/g,""),s=a.k.replace(/=/g,"");t.push(new r.default(o,s))}return new i.default(t)},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}o.__dashjs_factory_name="ClearKey",t.default=dashjs.FactoryMaker.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(55);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.INTERNAL_KEY_MESSAGE="internalKeyMessage",e.INTERNAL_KEY_SYSTEM_SELECTED="internalKeySystemSelected",e.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",e.KEY_ADDED="public_keyAdded",e.KEY_ERROR="public_keyError",e.KEY_MESSAGE="public_keyMessage",e.KEY_SESSION_CLOSED="public_keySessionClosed",e.KEY_SESSION_CREATED="public_keySessionCreated",e.KEY_SESSION_REMOVED="public_keySessionRemoved",e.KEY_STATUSES_CHANGED="public_keyStatusesChanged",e.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",e.KEY_SYSTEM_SELECTED="public_keySystemSelected",e.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",e.LICENSE_REQUEST_SENDING="public_licenseRequestSending",e.NEED_KEY="needkey",e.PROTECTION_CREATED="public_protectioncreated",e.PROTECTION_DESTROYED="public_protectiondestroyed",e.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",e.TEARDOWN_COMPLETE="protectionTeardownComplete",e.VIDEO_ELEMENT_SELECTED="videoElementSelected",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default));t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(61)),i=c(n(87)),a=c(n(45)),o=c(n(11)),s=c(n(88)),u=c(n(89)),l=c(n(28));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){e=e||{};var t=this.context,n=e.eventBus,c=e.events,d=e.debug,f=void 0,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0;function T(e,t){void 0!==navigator.requestMediaKeySystemAccess&&"function"==typeof navigator.requestMediaKeySystemAccess?function(t){var r=e[t].ks,i=e[t].configs,a=r.systemString;a===l.default.PLAYREADY_KEYSTEM_STRING&&"required"===i[0].persistentState&&(a+=".recommendation"),navigator.requestMediaKeySystemAccess(a,i).then((function(e){var t="function"==typeof e.getConfiguration?e.getConfiguration():null,i=new u.default(r,t);i.mksa=e,n.trigger(c.KEY_SYSTEM_ACCESS_COMPLETE,{data:i})})).catch((function(r){++t<e.length?T(e,t):n.trigger(c.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! "+r.message})}))}(t):n.trigger(c.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Insecure origins are not allowed"})}function b(e){var t=e.session;return t.removeEventListener("keystatuseschange",e),t.removeEventListener("message",e),t.close()}function E(e){for(var t=0;t<y.length;t++)if(y[t]===e){y.splice(t,1);break}}function S(e){var t=void 0,n=void 0;return e&&e.length>0&&(e[0]&&("string"==typeof e[0]?t=e[0]:n=e[0]),e[1]&&("string"==typeof e[1]?t=e[1]:n=e[1])),{status:t,keyId:n}}function A(e,t,r,i){var u={session:e,initData:t,sessionId:i,handleEvent:function(e){switch(e.type){case"keystatuseschange":n.trigger(c.KEY_STATUSES_CHANGED,{data:this}),e.target.keyStatuses.forEach((function(){var e=S(arguments);switch(e.status){case"expired":n.trigger(c.INTERNAL_KEY_STATUS_CHANGED,{error:new o.default(a.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,a.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)});break;default:n.trigger(c.INTERNAL_KEY_STATUS_CHANGED,e)}}));break;case"message":var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;n.trigger(c.INTERNAL_KEY_MESSAGE,{data:new s.default(this,t,void 0,e.messageType)})}},getSessionID:function(){return e.sessionId},getExpirationTime:function(){return e.expiration},getKeyStatuses:function(){return e.keyStatuses},getUsable:function(){var t=!1;return e.keyStatuses.forEach((function(){var e=S(arguments);"usable"===e.status&&(t=!0)})),t},getSessionType:function(){return r}};return e.addEventListener("keystatuseschange",u),e.addEventListener("message",u),e.closed.then((function(){E(u),h.debug("DRM: Session closed. SessionID = "+u.getSessionID()),n.trigger(c.KEY_SESSION_CLOSED,{data:u.getSessionID()})})),y.push(u),u}return f={getAllInitData:function(){for(var e=[],t=0;t<y.length;t++)y[t].initData&&e.push(y[t].initData);return e},requestKeySystemAccess:function(e){T(e,0)},getKeySystem:function(){return p},selectKeySystem:function(e){e.mksa.createMediaKeys().then((function(t){p=e.keySystem,m=t,g?g.setMediaKeys(m).then((function(){n.trigger(c.INTERNAL_KEY_SYSTEM_SELECTED)})):n.trigger(c.INTERNAL_KEY_SYSTEM_SELECTED)})).catch((function(){n.trigger(c.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+e.keySystem.systemString+")! Could not create MediaKeys -- TODO"})}))},setMediaElement:function(e){g!==e&&(g&&(g.removeEventListener("encrypted",v),g.setMediaKeys&&g.setMediaKeys(null)),(g=e)&&(g.addEventListener("encrypted",v),g.setMediaKeys&&m&&g.setMediaKeys(m)))},setServerCertificate:function(e){if(!p||!m)throw new Error("Can not set server certificate until you have selected a key system");m.setServerCertificate(e).then((function(){h.info("DRM: License server certificate successfully updated."),n.trigger(c.SERVER_CERTIFICATE_UPDATED)})).catch((function(e){n.trigger(c.SERVER_CERTIFICATE_UPDATED,{error:new o.default(a.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,a.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+e.name)})}))},createKeySession:function(e,t,r){if(!p||!m)throw new Error("Can not create sessions until you have selected a key system");var i=m.createSession(r),s=A(i,e,r),u=this.getKeySystem().systemString===l.default.CLEARKEY_KEYSTEM_STRING&&(e||t&&t.clearkeys)?"keyids":"cenc";i.generateRequest(u,e).then((function(){h.debug("DRM: Session created. SessionID = "+s.getSessionID()),n.trigger(c.KEY_SESSION_CREATED,{data:s})})).catch((function(e){E(s),n.trigger(c.KEY_SESSION_CREATED,{data:null,error:new o.default(a.default.KEY_SESSION_CREATED_ERROR_CODE,a.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+e.name)})}))},updateKeySession:function(e,t){var r=e.session;_.isClearKey(p)&&(t=t.toJWK()),r.update(t).catch((function(t){n.trigger(c.KEY_ERROR,{data:new o.default(a.default.MEDIA_KEYERR_CODE,"Error sending update() message! "+t.name,e)})}))},loadKeySession:function(e,t,r){if(!p||!m)throw new Error("Can not load sessions until you have selected a key system");for(var i=0;i<y.length;i++)if(e===y[i].sessionId)return void h.warn("DRM: Ignoring session ID because we have already seen it!");var s=m.createSession(r),u=A(s,t,r,e);s.load(e).then((function(t){t?(h.debug("DRM: Session loaded. SessionID = "+u.getSessionID()),n.trigger(c.KEY_SESSION_CREATED,{data:u})):(E(u),n.trigger(c.KEY_SESSION_CREATED,{data:null,error:new o.default(a.default.KEY_SESSION_CREATED_ERROR_CODE,a.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+e+")")}))})).catch((function(t){E(u),n.trigger(c.KEY_SESSION_CREATED,{data:null,error:new o.default(a.default.KEY_SESSION_CREATED_ERROR_CODE,a.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+e+")! "+t.name)})}))},removeKeySession:function(e){e.session.remove().then((function(){h.debug("DRM: Session removed. SessionID = "+e.getSessionID()),n.trigger(c.KEY_SESSION_REMOVED,{data:e.getSessionID()})}),(function(t){n.trigger(c.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+e.getSessionID()+"). "+t.name})}))},closeKeySession:function(e){b(e).catch((function(t){E(e),n.trigger(c.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.getSessionID()+") "+t.name})}))},stop:function(){for(var e=void 0,t=0;t<y.length;t++)(e=y[t]).getUsable()||b(e).catch((function(){E(e)}))},reset:function(){var e=y.length,t=void 0;0!==e?function(){for(var r=function(e){E(e),0===y.length&&(g?(g.removeEventListener("encrypted",v),g.setMediaKeys(null).then((function(){n.trigger(c.TEARDOWN_COMPLETE)}))):n.trigger(c.TEARDOWN_COMPLETE))},i=0;i<e;i++)!function(e){t.session.closed.then((function(){r(e)})),b(t).catch((function(){r(e)}))}(t=y[i])}():n.trigger(c.TEARDOWN_COMPLETE)}},h=d.getLogger(f),p=null,g=null,m=null,y=[],_=(0,r.default)(t).getInstance(),v={handleEvent:function(e){switch(e.type){case"encrypted":if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;n.trigger(c.NEED_KEY,{key:new i.default(t,e.initDataType)})}}}},f}d.__dashjs_factory_name="ProtectionModel_21Jan2015",t.default=dashjs.FactoryMaker.getClassFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(61)),i=c(n(87)),a=c(n(11)),o=c(n(45)),s=c(n(88)),u=c(n(84)),l=c(n(89));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){e=e||{};var t=this.context,n=e.eventBus,c=e.events,d=e.debug,f=e.api,h=void 0,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0,b=void 0;function E(){try{for(var e=0;e<_.length;e++)S(_[e]);g&&g.removeEventListener(f.needkey,T),n.trigger(c.TEARDOWN_COMPLETE)}catch(e){n.trigger(c.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+e.message})}}function S(e){var t=e.session;t.removeEventListener(f.error,e),t.removeEventListener(f.message,e),t.removeEventListener(f.ready,e),t.removeEventListener(f.close,e);for(var n=0;n<_.length;n++)if(_[n]===e){_.splice(n,1);break}t[f.release]()}function A(){var e=null,t=function(){g.removeEventListener("loadedmetadata",e),g[f.setMediaKeys](y),n.trigger(c.VIDEO_ELEMENT_SELECTED)};g.readyState>=1?t():(e=t.bind(this),g.addEventListener("loadedmetadata",e))}return h={getAllInitData:function(){for(var e=[],t=0;t<_.length;t++)e.push(_[t].initData);return e},requestKeySystemAccess:function(e){for(var t=!1,r=0;r<e.length;r++)for(var i=e[r].ks.systemString,a=e[r].configs,o=null,s=null,d=0;d<a.length;d++){var h=a[d].audioCapabilities,p=a[d].videoCapabilities;if(h&&0!==h.length){o=[];for(var g=0;g<h.length;g++)window[f.MediaKeys].isTypeSupported(i,h[g].contentType)&&o.push(h[g])}if(p&&0!==p.length){s=[];for(var m=0;m<p.length;m++)window[f.MediaKeys].isTypeSupported(i,p[m].contentType)&&s.push(p[m])}if(!(!o&&!s||o&&0===o.length||s&&0===s.length)){t=!0;var y=new u.default(o,s),v=b.getKeySystemBySystemString(i);n.trigger(c.KEY_SYSTEM_ACCESS_COMPLETE,{data:new l.default(v,y)});break}}t||n.trigger(c.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})},getKeySystem:function(){return m},selectKeySystem:function(e){try{y=e.mediaKeys=new window[f.MediaKeys](e.keySystem.systemString),m=e.keySystem,v=e,g&&A(),n.trigger(c.INTERNAL_KEY_SYSTEM_SELECTED)}catch(e){n.trigger(c.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+m.systemString+")! Could not create MediaKeys -- TODO"})}},setMediaElement:function(e){g!==e&&(g&&g.removeEventListener(f.needkey,T),(g=e)&&(g.addEventListener(f.needkey,T),y&&A()))},createKeySession:function(e,t,r,i){if(!m||!y||!v)throw new Error("Can not create sessions until you have selected a key system");var u=null;if(v.ksConfiguration.videoCapabilities&&v.ksConfiguration.videoCapabilities.length>0&&(u=v.ksConfiguration.videoCapabilities[0]),null===u&&v.ksConfiguration.audioCapabilities&&v.ksConfiguration.audioCapabilities.length>0&&(u=v.ksConfiguration.audioCapabilities[0]),null===u)throw new Error("Can not create sessions for unknown content types.");var l=u.contentType,d=y.createSession(l,new Uint8Array(e),i?new Uint8Array(i):null),h=function(e,t){return{session:e,initData:t,getSessionID:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(e){switch(e.type){case f.error:var t="KeyError";n.trigger(c.KEY_ERROR,{data:new a.default(o.default.MEDIA_KEYERR_CODE,t,this)});break;case f.message:var r=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;n.trigger(c.INTERNAL_KEY_MESSAGE,{data:new s.default(this,r,e.destinationURL)});break;case f.ready:p.debug("DRM: Key added."),n.trigger(c.KEY_ADDED);break;case f.close:p.debug("DRM: Session closed. SessionID = "+this.getSessionID()),n.trigger(c.KEY_SESSION_CLOSED,{data:this.getSessionID()})}}}}(d,e);d.addEventListener(f.error,h),d.addEventListener(f.message,h),d.addEventListener(f.ready,h),d.addEventListener(f.close,h),_.push(h),p.debug("DRM: Session created. SessionID = "+h.getSessionID()),n.trigger(c.KEY_SESSION_CREATED,{data:h})},updateKeySession:function(e,t){var n=e.session;b.isClearKey(m)?n.update(new Uint8Array(t.toJWK())):n.update(new Uint8Array(t))},closeKeySession:S,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:E,reset:E},p=d.getLogger(h),g=null,m=null,y=null,v=null,_=[],b=(0,r.default)(t).getInstance(),T={handleEvent:function(e){switch(e.type){case f.needkey:if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;n.trigger(c.NEED_KEY,{key:new i.default(t,"cenc")})}}}},h}d.__dashjs_factory_name="ProtectionModel_3Feb2014",t.default=dashjs.FactoryMaker.getClassFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(61)),i=c(n(87)),a=c(n(11)),o=c(n(88)),s=c(n(84)),u=c(n(89)),l=c(n(45));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){e=e||{};var t=this.context,n=e.eventBus,c=e.events,d=e.debug,f=e.api,h=e.errHandler,p=void 0,g=void 0,m=void 0,y=void 0,v=void 0,_=void 0,T=void 0,b=void 0,E=void 0;function S(){m&&w();for(var e=0;e<T.length;e++)A(T[e]);n.trigger(c.TEARDOWN_COMPLETE)}function A(e){try{m[f.cancelKeyRequest](y.systemString,e.sessionID)}catch(t){n.trigger(c.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.sessionID+") "+t.message})}}function C(e,t){if(t&&e){for(var n=e.length,r=0;r<n;r++)if(e[r].sessionID==t)return e[r];return null}return null}function w(){m.removeEventListener(f.keyerror,E),m.removeEventListener(f.needkey,E),m.removeEventListener(f.keymessage,E),m.removeEventListener(f.keyadded,E)}return p={getAllInitData:function(){for(var e=[],t=0;t<_.length;t++)e.push(_[t].initData);for(var n=0;n<T.length;n++)e.push(T[n].initData);return e},requestKeySystemAccess:function(e){var t=m;t||(t=document.createElement("video"));for(var r=!1,i=0;i<e.length;i++)for(var a=e[i].ks.systemString,o=e[i].configs,l=null,d=null,f=0;f<o.length;f++){var h=o[f].videoCapabilities;if(h&&0!==h.length){d=[];for(var p=0;p<h.length;p++)""!==t.canPlayType(h[p].contentType,a)&&d.push(h[p])}if(d&&(!d||0!==d.length)){r=!0;var g=new s.default(l,d),y=v.getKeySystemBySystemString(a);n.trigger(c.KEY_SYSTEM_ACCESS_COMPLETE,{data:new u.default(y,g)});break}}r||n.trigger(c.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})},getKeySystem:function(){return y},selectKeySystem:function(e){y=e.keySystem,n.trigger(c.INTERNAL_KEY_SYSTEM_SELECTED)},setMediaElement:function(e){if(m!==e){if(m){w();for(var t=0;t<T.length;t++)A(T[t]);T=[]}(m=e)&&(m.addEventListener(f.keyerror,E),m.addEventListener(f.needkey,E),m.addEventListener(f.keymessage,E),m.addEventListener(f.keyadded,E),n.trigger(c.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(e){if(!y)throw new Error("Can not create sessions until you have selected a key system");if(b||0===T.length){var t={sessionID:null,initData:e,getSessionID:function(){return this.sessionID},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return _.push(t),m[f.generateKeyRequest](y.systemString,new Uint8Array(e)),t}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(e,t){var n=e.sessionID;if(v.isClearKey(y))for(var r=0;r<t.keyPairs.length;r++)m[f.addKey](y.systemString,t.keyPairs[r].key,t.keyPairs[r].keyID,n);else m[f.addKey](y.systemString,new Uint8Array(t),new Uint8Array(e.initData),n)},closeKeySession:A,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:S,reset:S},g=d.getLogger(p),m=null,y=null,_=[],T=[],v=(0,r.default)(t).getInstance(),E={handleEvent:function(e){var t=null;switch(e.type){case f.needkey:var r=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;n.trigger(c.NEED_KEY,{key:new i.default(r,"cenc")});break;case f.keyerror:if((t=C(T,e.sessionId))||(t=C(_,e.sessionId)),t){var s=l.default.MEDIA_KEYERR_CODE,u="";switch(e.errorCode.code){case 1:s=l.default.MEDIA_KEYERR_UNKNOWN_CODE,u+="MEDIA_KEYERR_UNKNOWN - "+l.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:s=l.default.MEDIA_KEYERR_CLIENT_CODE,u+="MEDIA_KEYERR_CLIENT - "+l.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:s=l.default.MEDIA_KEYERR_SERVICE_CODE,u+="MEDIA_KEYERR_SERVICE - "+l.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:s=l.default.MEDIA_KEYERR_OUTPUT_CODE,u+="MEDIA_KEYERR_OUTPUT - "+l.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:s=l.default.MEDIA_KEYERR_HARDWARECHANGE_CODE,u+="MEDIA_KEYERR_HARDWARECHANGE - "+l.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:s=l.default.MEDIA_KEYERR_DOMAIN_CODE,u+="MEDIA_KEYERR_DOMAIN - "+l.default.MEDIA_KEYERR_DOMAIN_MESSAGE}u+=" System Code = "+e.systemCode,n.trigger(c.KEY_ERROR,{data:new a.default(s,u,t)})}else g.error("No session token found for key error");break;case f.keyadded:(t=C(T,e.sessionId))||(t=C(_,e.sessionId)),t?(g.debug("DRM: Key added."),n.trigger(c.KEY_ADDED,{data:t})):g.debug("No session token found for key added");break;case f.keymessage:if((b=null!==e.sessionId&&void 0!==e.sessionId)?!(t=C(T,e.sessionId))&&_.length>0&&(t=_.shift(),T.push(t),t.sessionID=e.sessionId,n.trigger(c.KEY_SESSION_CREATED,{data:t})):_.length>0&&(t=_.shift(),T.push(t),0!==_.length&&h.error(new a.default(l.default.MEDIA_KEY_MESSAGE_ERROR_CODE,l.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),t){var d=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=d,n.trigger(c.INTERNAL_KEY_MESSAGE,{data:new o.default(t,d,e.defaultURL)})}else g.warn("No session token found for key message")}}},p}d.__dashjs_factory_name="ProtectionModel_01b",t.default=dashjs.FactoryMaker.getClassFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(109),a=(r=i)&&r.__esModule?r:{default:r};var o=function(){var e="application/dash+xml",t=void 0;function n(n,r,i){if(!n||!/^VIDEO$/i.test(n.nodeName))return null;if(n._dashjs_player)return n._dashjs_player;var o=void 0,s=n.id||n.name||"video element";if(!(r=r||[].slice.call(n.querySelectorAll("source")).filter((function(t){return t.type==e}))[0])&&n.src)(r=document.createElement("source")).src=n.src;else if(!r&&!n.src)return null;return i=i||{},(o=(0,a.default)(i).create()).initialize(n,r.src,n.autoplay),t||(t=o.getDebug().getLogger()),t.debug("Converted "+s+" to dash.js player and added content: "+r.src),n._dashjs_player=o,o}function r(e){return/^VIDEO$/i.test(e.nodeName)?e:r(e.parentNode)}return{create:n,createAll:function(e,t){var i=[];e=e||"[data-dashjs-player]";for(var a=(t=t||document).querySelectorAll(e),o=0;o<a.length;o++){var s=n(a[o],null);i.push(s)}for(var u=t.querySelectorAll('source[type="application/dash+xml"]'),l=0;l<u.length;l++){var c=n(r(u[l]),null);i.push(c)}return i}}}(),s=void 0;!("undefined"!=typeof window&&window&&window.dashjs&&window.dashjs.skipAutoCreate)&&"undefined"!=typeof window&&window&&window.addEventListener&&("complete"===window.document.readyState?window.dashjs?o.createAll():s=window.setInterval((function(){window.dashjs&&(window.clearInterval(s),o.createAll())}),500):window.addEventListener("load",(function e(){window.removeEventListener("load",e),o.createAll()}))),t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),i=c(n(4)),a=c(n(38)),o=c(n(373)),s=c(n(374)),u=c(n(2)),l=n(13);function c(e){return e&&e.__esModule?e:{default:e}}function d(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=function(){function e(t,n,r){var u=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=r||n.options_,this.player=(0,i.default)(r.playerId),this.player.dash=this.player.dash||{},this.tech_=n,this.el_=n.el(),this.elParent_=this.el_.parentNode,this.hasFiniteDuration_=!1,t.src){n.isReady_=!1,e.updateSourceData&&(i.default.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),t=e.updateSourceData(t)),e.hooks("updatesource").forEach((function(e){t=e(t)}));var l=t.src;this.keySystemOptions_=e.buildDashJSProtData(t.keySystemOptions),this.player.dash.mediaPlayer=a.default.MediaPlayer().create(),this.mediaPlayer_=this.player.dash.mediaPlayer,this.mediaPlayer_.setTextDefaultEnabled(!1),e.useVideoJSDebug&&(i.default.log.warn('useVideoJSDebug has been deprecated. Please switch to using hook("beforeinitialize", callback).'),e.useVideoJSDebug(this.mediaPlayer_)),e.beforeInitialize&&(i.default.log.warn('beforeInitialize has been deprecated. Please switch to using hook("beforeinitialize", callback).'),e.beforeInitialize(this.player,this.mediaPlayer_)),e.hooks("beforeinitialize").forEach((function(e){e(u.player,u.mediaPlayer_)})),this.mediaPlayer_.initialize(),this.retriggerError_=function(e){"error"===e.type&&(e.error.code>=10&&e.error.code<=35?u.player.error({code:4,dashjsErrorCode:e.error.code,message:e.error.message}):e.error.code<10?u.player.error({code:e.error.code,dashjsErrorCode:e.error.code,message:e.error.message}):e.error.code>=100&&e.error.code<=114?u.player.error({code:5,dashjsErrorCode:e.error.code,message:e.error.message}):u.player.error({code:e.error.code,message:e.error.message})),setTimeout((function(){u.mediaPlayer_.reset()}),10)},this.mediaPlayer_.on(a.default.MediaPlayer.events.ERROR,this.retriggerError_),this.getDuration_=function(e){var t=e.data.Period_asArray,n=u.hasFiniteDuration_;e.data.mediaPresentationDuration||t[t.length-1].duration?u.hasFiniteDuration_=!0:u.hasFiniteDuration_=!1,u.hasFiniteDuration_!==n&&u.player.trigger("durationchange")},this.mediaPlayer_.on(a.default.MediaPlayer.events.MANIFEST_LOADED,this.getDuration_),r.dash&&Object.keys(r.dash).forEach((function(e){var t,n="set"+e.charAt(0).toUpperCase()+e.slice(1),a=r.dash[e];u.mediaPlayer_.hasOwnProperty(n)&&(i.default.log.warn("Using dash options in videojs-contrib-dash without the set prefix "+"has been deprecated. Change '".concat(e,"' to '").concat(n,"'")),e=n),u.mediaPlayer_.hasOwnProperty(e)?(Array.isArray(a)||(a=[a]),(t=u.mediaPlayer_)[e].apply(t,d(a))):i.default.log.warn("Warning: dash configuration option unrecognized: ".concat(e))})),this.mediaPlayer_.attachView(this.el_),this.mediaPlayer_.setAutoPlay(!1),o.default.call(null,this.player,n),s.default.call(null,this.player,n,r),this.mediaPlayer_.setProtectionData(this.keySystemOptions_),this.mediaPlayer_.attachSource(l),this.tech_.triggerReady(),this.player.on(this.tech_,"seeking",(function(){u.mediaPlayer_.seek((u.tech_.currentTime()-8).toFixed(2))}))}}var t,n,r;return t=e,r=[{key:"buildDashJSProtData",value:function(e){var t={};if(!e||!Array.isArray(e))return null;for(var n=0;n<e.length;n++){var r=e[n],a=i.default.mergeOptions({},r.options);a.licenseUrl&&(a.serverURL=a.licenseUrl,delete a.licenseUrl),t[r.name]=a}return t}},{key:"hooks",value:function(t,n){return e.hooks_[t]=e.hooks_[t]||[],n&&(e.hooks_[t]=e.hooks_[t].concat(n)),e.hooks_[t]}},{key:"hook",value:function(t,n){e.hooks(t,n)}},{key:"removeHook",value:function(t,n){var r=e.hooks(t).indexOf(n);return-1!==r&&(e.hooks_[t]=e.hooks_[t].slice(),e.hooks_[t].splice(r,1),!0)}}],(n=[{key:"dispose",value:function(){this.mediaPlayer_&&(this.mediaPlayer_.off(a.default.MediaPlayer.events.ERROR,this.retriggerError_),this.mediaPlayer_.off(a.default.MediaPlayer.events.MANIFEST_LOADED,this.getDuration_),this.mediaPlayer_.reset()),this.player.dash&&delete this.player.dash}},{key:"duration",value:function(){return this.mediaPlayer_.isDynamic()&&!this.hasFiniteDuration_?1/0:this.mediaPlayer_.duration()}}])&&h(t.prototype,n),r&&h(t,r),e}();p.hooks_={};i.default.DashSourceHandler=function(){return{canHandleSource:function(e){return function(e){e=(0,l.assign)({},e),p.updateSourceData&&(i.default.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),e=p.updateSourceData(e)),p.hooks("updatesource").forEach((function(t){e=t(e)}));var t=u.default.createElement("video");return!(e.keySystemOptions&&!r.default.navigator.requestMediaKeySystemAccess&&!t.msSetMediaKeys)}(e)?i.default.DashSourceHandler.canPlayType(e.type)?"probably":/\.mpd/i.test(e.src)?"maybe":"":""},handleSource:function(e,t,n){return new p(e,t,n)},canPlayType:function(e){return i.default.DashSourceHandler.canPlayType(e)}}},i.default.DashSourceHandler.canPlayType=function(e){return/^application\/dash\+xml/i.test(e)?"probably":""},r.default.MediaSource&&i.default.getTech("Html5").registerSourceHandler(i.default.DashSourceHandler(),0),i.default.Html5DashJS=p;var g=p;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e.dash.mediaPlayer.on(r.default.MediaPlayer.events.PLAYBACK_METADATA_LOADED,s.bind(null,e,t))};var r=o(n(38)),i=o(n(4)),a=n(30);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=e.dash.mediaPlayer,o=n.getTracksFor("audio"),s=e.audioTracks();function u(e){return"dash-audio-".concat(e)}function l(e,t){return(0,a.find)(e,(function(e){return u(e.index)===t.id}))}s.length&&t.clearTracks(["audio"]);var c=n.getCurrentTrackFor("audio");o.forEach((function(t){var n=null;if(Array.isArray(t.labels))for(var r=0;r<t.labels.length;r++)if(t.labels[r].lang&&-1!==e.language().indexOf(t.labels[r].lang.toLowerCase())){n=t.labels[r];break}var a=null;n?a=n.text:Array.isArray(t.labels)&&1===t.labels.length?a=t.labels[0].text:(a=t.lang,t.roles&&t.roles.length&&(a+=" ("+t.roles.join(", ")+")")),s.addTrack(new i.default.AudioTrack({enabled:t===c,id:u(t.index),kind:t.kind||"main",label:a,language:t.lang}))}));var d=function(){for(var e=0;e<s.length;e++){var t=s[e];if(t.enabled){var r=l(o,t);n.setCurrentTrack(r)}else;}};s.addEventListener("change",d),e.dash.mediaPlayer.on(r.default.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,(function(){s.removeEventListener("change",d)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){a.default.VTTCue&&!/\[native code\]/.test(a.default.VTTCue.toString())&&(a.default.VTTCue=!1);var o=[];if(t.featuresNativeTextTracks)return void i.default.log.error("You must pass {html: {nativeCaptions: false}} in the videojs constructor to use text tracks in videojs-contrib-dash");var s=e.dash.mediaPlayer;function u(t){t.index;var n=t.tracks;s.off(r.default.MediaPlayer.events.TEXT_TRACKS_ADDED,u),o.forEach(e.removeRemoteTextTrack.bind(e)),o=[],n.length&&(o=function(e,t,n){var i=[],a=n.map((function(t){var n=null;if(Array.isArray(t.labels))for(var r=0;r<t.labels.length;r++)if(t.labels[r].lang&&-1!==e.language().indexOf(t.labels[r].lang.toLowerCase())){n=t.labels[r];break}return{dashTrack:t,trackConfig:{label:n?n.text:Array.isArray(t.labels)&&1===t.labels.length?t.labels[0].text:t.lang||t.label,language:t.lang,srclang:t.lang,kind:t.kind}}})).map((function(t){var n=t.trackConfig,r=t.dashTrack,a=e.addRemoteTextTrack(n,!1);return i.push({textTrack:a.track,dashTrack:r}),a}));function o(){for(var t=e.dash.mediaPlayer,r=e.textTracks(),a=-1,o=function(e){var t=r[e];if("showing"===t.mode){var o=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}(i,(function(e){return e.textTrack===t})),s=o?o.dashTrack:null;s&&(a=n.indexOf(s))}},s=0;s<r.length;s+=1)o(s);a!==t.getCurrentTextTrackIndex()&&t.setTextTrack(a)}return e.textTracks().on("change",o),e.dash.mediaPlayer.on(r.default.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,(function(){e.textTracks().off("change",o)})),o(),a}(e,0,n))}s.on(r.default.MediaPlayer.events.TEXT_TRACKS_ADDED,u),s.on(r.default.MediaPlayer.events.CAN_PLAY,(function(){s.off(r.default.MediaPlayer.events.TEXT_TRACKS_ADDED,u)}))};var r=o(n(38)),i=o(n(4)),a=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t.shoppable&&new i.default(e,t.shoppable).init()};var r,i=(r=n(376))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(4)),i=s(n(377)),a=s(n(380));n(381);var o=n(25);function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d(this,e),this.options_=r.default.mergeOptions(o.SHOPPABLE_WIDGET_OPTIONS_DEFAULTS,i),this.player_=t,this.options_.showPostPlayOverlay&&this.player_.on("ended",(function(){n.player_.addChild(new a.default(n.player_,n.options_)),n.player_.player_.cloudinary.cloudinaryConfig().responsive({responsive_class:o.SHOPPABLE_WIDGET_RESPONSIVE_CLASS})}));var s=this.options_.width;this._injectCSS("\n .".concat(o.CLD_SPBL_INNER_BAR," {\n transform: translateX(").concat(s,");\n }\n .").concat(o.SHOPPABLE_PANEL_VISIBLE_CLASS," .vjs-control-bar {\n width: calc(100% - ").concat(s,");\n }\n .").concat(o.CLD_SPBL_TOGGLE_CLASS," {\n right: ").concat(s,";\n }\n .").concat(o.CLD_SPBL_PANEL_CLASS,"{\n width: ").concat(s,";\n }\n ")),this._setListeners()}var t,n,s;return t=e,(n=[{key:"_setListeners",value:function(){var e=this,t=this._resizeHandler.bind(this);this.player_.on("resize",t),window.addEventListener("resize",t),this.dispose=function(){e.player_.off("resize",t),window.removeEventListener("resize",t),e.layout_.dispose()}}},{key:"_injectCSS",value:function(e){var t=document.createElement("style");t.innerHTML=e,this.player_.el_.appendChild(t)}},{key:"_resizeHandler",value:function(){var e=parseFloat(this.options_.width)/100*this.player_.el_.clientWidth,t=!1;if(e){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}([["sm",0,80],["md",81,110],["lg",111,170]]);try{for(r.s();!(n=r.n()).done;){var i=u(n.value,3),a=i[0],o=i[1],s=i[2];e>o&&e<=s&&(this.layout_.contentWrpEl_.setAttribute("size",a),t=a)}}catch(e){r.e(e)}finally{r.f()}t||this.layout_.contentWrpEl_.removeAttribute("size")}}},{key:"init",value:function(){this.render()}},{key:"render",value:function(){var e=this;this.layout_=new i.default(this.player_,this.options_),this.player_.on("loadeddata",(function(){e.player_.player_.cloudinary.cloudinaryConfig().responsive({responsive_class:o.SHOPPABLE_WIDGET_RESPONSIVE_CLASS})}))}}])&&f(t.prototype,n),s&&f(t,s),e}();t.default=h},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=l(n(4)),a=n(106),o=l(n(378)),s=l(n(379)),u=n(25);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t,n){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=i.default.dom||i.default,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(l,e);var t,n,r,i=f(l);function l(e,t){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(r=i.call(this,e,t)).player_=e,r.player().addClass("cld-shoppable-panel"),r.player().addClass(u.SHOPPABLE_PANEL_HIDDEN_CLASS),r.contentWrpEl_=y.createEl("div",{className:"cld-spbl-bar"}),r.contentBannerEl_=y.createEl("div",{className:"cld-spbl-banner-msg base-color-text"},{},r.options_.bannerMsg||"Shop the Video"),r.contentWrpEl_.appendChild(r.contentBannerEl_);var c=new o.default(r.player_,r.options_);return r.contentWrpEl_.appendChild(c.el_),r.contentEl_=y.createEl("div",{className:u.CLD_SPBL_INNER_BAR}),r.contentWrpEl_.appendChild(r.contentEl_),r.player().el().appendChild(r.contentWrpEl_),r.addChild(new s.default(r.player_,{toggleIcon:r.options_.toggleIcon,clickHandler:function(){r.togglePanel()}})),r.addChild("ShoppablePanel",r.options_),r.dispose=function(){r.removeLayout(),g((n=p(r),m(l.prototype)),"dispose",n).call(n)},r.togglePanel=function(e){!0===e?(r.player().removeClass(u.SHOPPABLE_PANEL_HIDDEN_CLASS),r.player().addClass(u.SHOPPABLE_PANEL_VISIBLE_CLASS)):!1===e?(r.player().removeClass(u.SHOPPABLE_PANEL_VISIBLE_CLASS),r.player().addClass(u.SHOPPABLE_PANEL_HIDDEN_CLASS)):(r.player().toggleClass(u.SHOPPABLE_PANEL_HIDDEN_CLASS),r.player().toggleClass(u.SHOPPABLE_PANEL_VISIBLE_CLASS));var t=r.player().hasClass(u.SHOPPABLE_PANEL_VISIBLE_CLASS)?"productBarMax":"productBarMin";r.player().trigger(t)},"open"===r.options_.startState&&r.togglePanel(!0),r.player_.on("play",(function(){r.player_.currentTime()<.01&&("openOnPlay"===r.options_.startState&&r.togglePanel(!0,r.options_.autoClose),r.options_.autoClose&&-1!==r.options_.startState.indexOf("open")&&setTimeout((function(){(0,a.elMatches)(r.contentEl_,":hover")?r.contentEl_.addEventListener("mouseleave",(function(){r.togglePanel(!1)}),{once:!0}):r.togglePanel(!1)}),1e3*r.options_.autoClose))})),r}return t=l,(n=[{key:"createEl",value:function(){return g(m(l.prototype),"createEl",this).call(this,"div")}}])&&c(t.prototype,n),r&&c(t,r),l}(i.default.getComponent("Component"));i.default.registerComponent("shoppableBarLayout",v);var _=v;t.default=_},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(4))&&i.__esModule?i:{default:i},o=n(53),s=n(30),u=n(25);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=a.default.dom||a.default,m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,a),(t=i.call(this,e,n)).options_=n,t.player_=e,t.player_.on("showProductsOverlay",(function(){t.renderProducts()})),t.dispose=function(){t.layout_.dispose()},t}return t=a,(n=[{key:"renderProducts",value:function(){var e=this;this.player_.removeClass(u.SHOPPABLE_PANEL_VISIBLE_CLASS),this.player_.addClass(u.SHOPPABLE_PANEL_HIDDEN_CLASS),this.player_.addClass(u.SHOPPABLE_PRODUCTS_OVERLAY_CLASS),this.layout_.innerHTML="";var t=this.player_.currentTime();this.options_.products.filter((function(e){return e.hotspots&&e.hotspots.some((function(e){return(0,o.parseTime)(e.time)===t}))})).forEach((function(n){var r=(0,s.find)(n.hotspots,(function(e){return(0,o.parseTime)(e.time)===t})),i=g.createEl("div",{className:"cld-spbl-product-hotspot-name"},{},n.productName),a=g.createEl("div",{className:"cld-spbl-product-tooltip cld-spbl-product-tooltip-"+r.tooltipPosition},{},i),u=g.createEl("a",{className:"cld-spbl-product-hotspot accent-color-text",href:r.clickUrl,target:"_blank"},{style:"left:"+r.x+"; top:"+r.y+";"},a);e.layout_.appendChild(u)})),this.player_.one("seeking",(function(t){return e.clearLayout(t)})),this.player_.one("play",(function(t){return e.clearLayout(t)}))}},{key:"clearLayout",value:function(){this.layout_.innerHTML="",this.player_.removeClass(u.SHOPPABLE_PRODUCTS_OVERLAY_CLASS)}},{key:"createEl",value:function(){return this.layout_=g.createEl("div",{className:"cld-spbl-products-overlay"}),this.layout_}}])&&c(t.prototype,n),r&&c(t,r),a}(a.default.getComponent("Component"));a.default.registerComponent("ShoppableProductsOverlay",m);var y=m;t.default=y},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(4))&&i.__esModule?i:{default:i},o=n(25);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=a.default.dom||a.default,p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(a,e);var t,n,r,i=c(a);function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=i.call(this,e,t)).options_=t,n}return t=a,(n=[{key:"handleClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.options_.clickHandler()}},{key:"createEl",value:function(){var e={},t={};this.options_.toggleIcon?(e={className:"".concat(o.CLD_SPBL_TOGGLE_ICON_CLASS," ").concat(o.CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS," ").concat(o.CLOSE_ICON_CLASS)},t={style:"background-image: url(".concat(this.options_.toggleIcon,")")}):e={className:"".concat(o.CLD_SPBL_TOGGLE_ICON_CLASS," ").concat(o.ICON_CART_CLASS)};var n=h.createEl("span",e,t),r=u(f(a.prototype),"createEl",this).call(this,"a",{className:"".concat(o.CLD_SPBL_TOGGLE_CLASS," base-color-bg")});return r.appendChild(n),this.player_.on("productBarMin",(function(){setTimeout((function(){n.classList.add(o.SHOPPABLE_ANIMATION_CLASS),setTimeout((function(){n.classList.remove(o.SHOPPABLE_ANIMATION_CLASS)}),1e3)}),500)})),r}}])&&s(t.prototype,n),r&&s(t,r),a}(a.default.getComponent("ClickableComponent"));a.default.registerComponent("shoppablePanelToggle",p);var g=p;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(4)),i=o(n(105)),a=n(25);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var f=r.default.dom||r.default,h=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(this,e),this.options_=u(u({},r),{},{postPlay:!0}),this.player_=t,this.render(),this.handleDragToScroll(),this.dispose=function(){n.layout_.dispose()}}var t,n,r;return t=e,(n=[{key:"handleDragToScroll",value:function(){var e=this.player_.postModal.el_.querySelector(".".concat(a.CLD_SPBL_PANEL_CLASS)),t=!1,n=0,r=0;e.addEventListener("mousedown",(function(i){t=!0,n=i.pageX-e.offsetLeft,r=e.scrollLeft})),document.addEventListener("mouseup",(function(r){t=!1,setTimeout((function(){e.classList.remove("dragged")}),300);var i=r.pageX-e.offsetLeft-n;Math.abs(i)>5&&r.preventDefault()})),document.addEventListener("mousemove",(function(i){if(t){i.preventDefault();var a=i.pageX-e.offsetLeft-n;e.scrollLeft=r-a,Math.abs(a)>5&&!e.classList.contains("dragged")&&e.classList.add("dragged")}}))}},{key:"render",value:function(){var e=this;this.player_.postModal=null;var t=f.createEl("div",{className:"cld-spbl-post-play"}),n=new i.default(this.player_,this.options_),r=f.createEl("div",{className:"cld-spbl-post-title base-color-text"},{},this.options_.bannerMsg||"Shop the Video"),a=this.player_.cloudinary.currentPoster();a.transformation([a.transformation().toOptions(),{effect:"blur:3000"}]);var o=f.createEl("div",{className:"cld-spbl-post-play-bg",style:'background-image: url("'.concat(a.url(),'")')}),s=f.createEl("button",{className:"cld-spbl-replay-btn base-color-bg vjs-icon-replay",onclick:function(){e.player_.trigger("replay"),e.player_.postModal.close(),e.player_.play()}},{},"Replay");t.appendChild(o),t.appendChild(r),t.appendChild(n.el()),t.appendChild(s),this.player_.postModal=this.player_.createModal(t,{name:"postModal",uncloseable:!0}),this.player_.addClass("cld-spbl-post-modal"),this.player_.postModal.on("beforemodalclose",(function(){e.player_.removeClass("cld-spbl-post-modal")}))}}])&&d(t.prototype,n),r&&d(t,r),e}();t.default=h},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(4)),a=o(n(141));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=i.default.getComponent("MenuButton"),g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(d,e);var t,n,r,o=c(d);function d(e,t){var n;s(this,d),n=o.call(this,e,t),p.apply(f(n),arguments);var r=n.player().qualityLevels();if(t&&t.default)if("low"===t.default)for(var a=0;a<r.length;a++)r[a].enabled=0===a;else if("high"===t.default)for(var u=0;u<r.length;u++)r[u].enabled=u===r.length-1;return n.player().qualityLevels().on(["addqualitylevel"],i.default.bind(f(n),n.update)),n}return t=d,(n=[{key:"createEl",value:function(){return i.default.dom.createEl("div",{className:"vjs-http-source-selector vjs-menu-button vjs-menu-button-popup vjs-control vjs-button"})}},{key:"buildCSSClass",value:function(){return p.prototype.buildCSSClass.call(this)+" vjs-icon-cog"}},{key:"update",value:function(){return p.prototype.update.call(this)}},{key:"createItems",value:function(){for(var e=[],t=this.player().qualityLevels(),n=[],r=0;r<t.length;r++){var i=t.length-(r+1),o=i===t.selectedIndex,s="".concat(i),u=i;t[i].height?(s="".concat(t[i].height,"p"),u=parseInt(t[i].height,10)):t[i].bitrate&&(s="".concat(Math.floor(t[i].bitrate/1e3)," kbps"),u=parseInt(t[i].bitrate,10)),n.indexOf(s)>=0||(n.push(s),e.push(new a.default(this.player_,{label:s,index:i,selected:o,sortVal:u})))}return t.length>1&&e.push(new a.default(this.player_,{label:"Auto",index:t.length,selected:!1,sortVal:99999})),e.sort((function(e,t){return e.options_.sortVal<t.options_.sortVal?1:e.options_.sortVal>t.options_.sortVal?-1:0})),e}}])&&u(t.prototype,n),r&&u(t,r),d}(p);t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};new u(this,e).init()};var r=n(36),i=n(19),a=n(13);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s={fraction:.5,isMuted:!0},u=function e(t){var n=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),u=(0,a.assign)({},s,u),this.player=t;var l=(0,i.sliceProperties)(u,"fraction"),c=!1,d=!1,f=null,h=null;this.init=function(){v(),y()};var p=function(){window.removeEventListener("DOMContentLoaded",y,!1),window.removeEventListener("load",y,!1),window.removeEventListener("scroll",y,!1),window.removeEventListener("resize",y,!1),n.player.off("pause",f),n.player.off("play",h)},g=function(){c=!0,d=!1,n.player.pause()},m=function(){c=!1,d=!0,n.player.play()},y=function(){(0,r.isElementInViewport)(n.player.el(),{fraction:l.fraction})?n.player.paused()&&m():n.player.paused()||n.player.activePlugins_.floatingPlayer||g()},v=function(){f=function(){n.player.waiting||c||p()},h=function(){d||p()},window.addEventListener("DOMContentLoaded",y,!1),window.addEventListener("load",y,!1),window.addEventListener("scroll",y,!1),window.addEventListener("resize",y,!1),n.player.on("pause",f),n.player.on("play",h)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};new l(this,e).init()};var r=n(36),i=n(19),a=n(13);n(385);var o=n(37);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u={fraction:.5,collapsedWidth:300,floatTo:"right"},l=function e(t){var n=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,e),(l=(0,a.assign)({},u,l)).floatTo&&l.floatTo!==o.FLOATING_TO.LEFT&&l.floatTo!==o.FLOATING_TO.RIGHT&&(l.floatTo=u.floatTo),this.player=t;var c=(0,i.sliceProperties)(l,"fraction"),d=null,f=!1,h=!1;this.init=function(){y()};var p=function(e){var t=document.createElement("div");for(e.appendChild(t);e.firstChild!==t;)t.appendChild(e.firstChild);return t},g=function(){window.removeEventListener("DOMContentLoaded",b,!1),window.removeEventListener("load",b,!1),window.removeEventListener("scroll",b,!1),window.removeEventListener("resize",b,!1)},m=function(){window.addEventListener("DOMContentLoaded",b,!1),window.addEventListener("load",b,!1),window.addEventListener("scroll",b,!1),window.addEventListener("resize",b,!1)},y=function(){n.player.on("play",b),n.player.on("play",m),n.player.on("dispose",g)},v=function(){var e=n.player.el(),t=e.getBoundingClientRect();if(!h){(d=p(e)).setAttribute("class","cld-video-player-floater cld-video-player-floater-bottom-"+l.floatTo),d.setAttribute("style",["width: "+l.collapsedWidth+"px;","top: "+t.top+"px;","left: "+t.left+"px;","right: "+(document.documentElement.clientWidth-t.right)+"px;","bottom: "+(document.documentElement.clientHeight-t.bottom)+"px;"].join(""));var r=p(d);r.setAttribute("class","cld-video-player-floater-inner"),r.setAttribute("style","padding-bottom: "+100*t.height/t.width+"%;");var i=document.createElement("button");i.setAttribute("class","cld-video-player-floater-close"),i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><polygon fill-rule="evenodd" points="370 7.41 368.59 6 364 10.59 359.41 6 358 7.41 362.59 12 358 16.59 359.41 18 364 13.41 368.59 18 370 16.59 365.41 12" transform="translate(-358 -6)"/></svg>',i.onclick=function(){_(),T()},d.appendChild(i),h=!0}setTimeout((function(){d.classList.add("cld-video-player-floating")})),f=!0},_=function(){d.classList.remove("cld-video-player-floating"),f=!1},T=function(){g(),n.player.off("play",b),n.player.off("play",m)},b=function(){(0,r.isElementInViewport)(n.player.el(),{fraction:c.fraction})?f&&_():f||v()}}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};new d(this,e).init()};var r=l(n(4));n(387),n(388);var i=l(n(389)),a=n(36),o=n(19),s=n(13),u=n(14);function l(e){return e&&e.__esModule?e:{default:e}}var c={showNativeOnRecurringEvent:!1},d=function e(t,n){var l=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!Array.isArray(n.content)&&!(0,u.isFunction)(n.content))throw new Error('"content" required');var d=(0,s.assign)({},c,n);this.player=t;var f=(0,o.sliceProperties)(d,"content","showNativeOnRecurringEvent");this.init=function(){l.player.contextmenu(),l.player.on("vjs-contextmenu",h),l.player.ready((function(){return l.player.addClass("vjs-context-menu")}))};var h=function(e){if(!l.menu||(l.menu.dispose(),!f.showNativeOnRecurringEvent)){f.showNativeOnRecurringEvent&&(l.player.contextmenu.options.cancel=!1),e.preventDefault();var t=f.content;(0,u.isFunction)(t)&&(t=t(l.player)),l.menu=new i.default(l.player,{content:t});var n=function(e){var t=l.menu.el();t.style.visibility="hidden",l.player.el().appendChild(t);var n=t.getBoundingClientRect();l.player.el().removeChild(t),t.style.visibility="visible";var r=(0,a.getPointerPosition)(l.player.el(),e),i=l.player.el().getBoundingClientRect(),o=i.height-i.height*r.y+1,s=Math.round(i.width*r.x)+1,u=o,c=s;return o+n.height>i.height&&(u=o+n.height-i.height>n.height/2?o-n.height-1:i.height-n.height),s+n.width>i.width&&(c=s+n.width-i.width>n.width/2?s-n.width-1:i.width-n.width),u<o&&c<s&&(u=o-n.height-1,c=s-n.width-1),u=Math.max(0,u),{left:c=Math.max(0,c),top:u}}(e),o=n.left,s=n.top;l.menu.setPosition(o,s);var c=function(e){("click"!==e.type||3!==e.which&&2!==e.button)&&l.menu.dispose()};l.menu.on("dispose",(function(){l.player.contextmenu.options.cancel=!0,l.player.removeChild(l.menu),r.default.off(document,["click","tap"],c),delete l.menu})),l.player.addChild(l.menu),r.default.on(document,["click","tap"],c)}}}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r),a=i.a.registerPlugin||i.a.plugin,o={cancel:!0,sensitivity:10,wait:500,disabled:!1},s="vjs-contextmenu";function u(e,t){if(e.contextmenu.options.disabled)return e;var n={target:e,type:s};return["clientX","clientY","pageX","pageY","screenX","screenY"].forEach((function(e){n[e]=t[e]})),e.trigger(n)}function l(e){var t=this.contextmenu.current;if(t){var n=this.contextmenu.options.wait;"touchend"===e.type&&Number(new Date)-t.time>=n&&u(this,e),this.contextmenu.current=null}}function c(e){var t=this.contextmenu.current;if(t){var n=e.touches[0],r=this.contextmenu.options.sensitivity;(n.screenX-t.screenX>r||n.screenY-t.screenY>r)&&(this.contextmenu.current=null)}}function d(e){if(!this.contextmenu.current){var t=e.touches[0];this.contextmenu.current={screenX:t.screenX,screenY:t.screenY,time:Number(new Date)}}}function f(e){this.contextmenu.options.cancel&&!this.contextmenu.options.disabled&&e.preventDefault(),u(this,e),this.off(["touchcancel","touchend"],l),this.off("touchmove",c),this.off("touchstart",d)}function h(e){var t=this;this.contextmenu.options=i.a.mergeOptions(o,e),this.contextmenu.VERSION="__VERSION__",this.on("contextmenu",f),this.on(["touchcancel","touchend"],l),this.on("touchmove",c),this.on("touchstart",d),this.ready((function(){return t.addClass(s)}))}a("contextmenu",h),h.VERSION="2.0.2",t.default=h},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=u(n(4)),a=u(n(390)),o=n(36),s=n(14);function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=i.default.getComponent("Menu"),y=i.default.dom||i.default,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(h,e);var t,n,r,u=f(h);function h(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(n=u.call(this,e,t)).dispose=i.default.bind(p(n),n.dispose),t.content.forEach((function(t){var r=null;r=(0,s.isFunction)(t.listener)?t.listener:"string"==typeof t.href?function(){return window.open(t.href)}:function(){return!0};var o=p(n);n.addItem(new a.default(e,{label:t.label,listener:i.default.bind(e,(function(){r(this),window.setTimeout((function(){o.dispose()}),1)}))}))})),n}return t=h,(n=[{key:"setPosition",value:function(e,t){(0,o.setPosition)(this.el(),e,t)}},{key:"createEl",value:function(){var e=c(g(h.prototype),"createEl",this).call(this);if(y.addClass(e,"vjs-context-menu-ui"),this.options_.position){var t=this.options_.position,n=t.left,r=t.top;this.setPosition(n,r)}return e}}])&&l(t.prototype,n),r&&l(t,r),h}(m);t.default=v},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,r,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"handleClick",value:function(){s(d(c.prototype),"handleClick",this).call(this),this.options_.listener()}}])&&o(t.prototype,n),r&&o(t,r),c}(((i=n(4))&&i.__esModule?i:{default:i}).default.getComponent("MenuItem"));t.default=f},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.chainTarget=e.chainTarget||this,this.cloudinary=new I(this,e)},t.CONSTRUCTOR_PARAMS=void 0;var i=y(n(48)),a=y(n(4)),o=n(101),s=n(100),u=n(19),l=n(51),c=n(13),d=n(24),f=y(n(392)),h=y(n(62)),p=y(n(398)),g=y(n(399)),m=n(14);function y(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A(e);if(t){var i=A(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?S(e):t}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C={transformation:{},sourceTypes:[],sourceTransformation:[],posterOptions:{}},w=["cloudinaryConfig","transformation","sourceTypes","sourceTransformation","posterOptions","autoShowRecommendations"];t.CONSTRUCTOR_PARAMS=w;var I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(f,e);var t,n,r,o=b(f);function f(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(this,f),(t=o.call(this,e,n)).player=e,n=(0,c.assign)({},C,n);var r=null,y=null,_=null,T=null,b=null,E=null,A=null,I=null,R=null,O=n.chainTarget,P=null,D=null,M=!1;t.source=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n=(0,c.assign)({},n),!e)return r;var i=null;if(e instanceof h.default)i=e;else{var a=(0,d.normalizeOptions)(e,n),o=a.publicId,s=a.options;i=t.buildSource(o,s)}if(i.recommendations()){var l=i.recommendations(),f=null,p=!1;if(n.recommendationOptions){var g=(0,u.sliceAndUnsetProperties)(n.recommendationOptions,"disableAutoShow","itemBuilder");p=g.disableAutoShow,f=g.itemBuilder}N(l,{disableAutoShow:p,itemBuilder:f})}else L();return r=i,n.skipRefresh||k(),t.player.trigger("cldsourcechanged",{source:i}),O},t.buildSource=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,d.normalizeOptions)(e,n);return e=r.publicId,(n=r.options).cloudinaryConfig=(0,d.mergeCloudinaryConfig)(t.cloudinaryConfig(),n.cloudinaryConfig||{}),n.transformation=(0,d.mergeTransformation)(t.transformation(),n.transformation||{}),n.sourceTransformation=n.sourceTransformation||t.sourceTransformation(),n.sourceTypes=n.sourceTypes||t.sourceTypes(),n.poster=n.poster||F(),n.queryParams=n.usageReport?{_s:"vp-".concat("1.6.2-edge.13")}:{},n.sourceTypes.indexOf("audio")>-1?new g.default(e,n):new h.default(e,n)},t.posterOptions=function(e){return e?(b=e,O):b},t.cloudinaryConfig=function(e){return e?(E=(0,l.getCloudinaryInstanceOf)(i.default.Cloudinary,e),O):E},t.transformation=function(e){return e?(A=(0,l.getCloudinaryInstanceOf)(i.default.Transformation,e),O):A},t.sourceTypes=function(e){return e?(I=e,O):I},t.getCurrentSources=function(){return y},t.sourceTransformation=function(e){return e?(R=e,O):R},t.on=function(){var e;return(e=P).on.apply(e,arguments)},t.one=function(){var e;return(e=P).one.apply(e,arguments)},t.off=function(){var e;return(e=P).off.apply(e,arguments)},t.autoShowRecommendations=function(e){return void 0===e?M:(M=e,O)},t.dispose=function(){t.playlist()&&t.disposePlaylist(),L(),r=void 0,P.removeAllListeners()};var N=function(e,n){var r=n.disableAutoShow,i=void 0!==r&&r,a=n.itemBuilder,o=void 0===a?null:a;if(L(),!Array.isArray(e)&&"function"!=typeof e&&!e.then)throw new Error('"recommendations" must be either an array or a function');o=o||function(e){return{source:e instanceof h.default?e:t.buildSource(e),action:function(){return t.source(e)}}},(D={}).sourceChangedHandler=function(){var n=function(e){if(void 0!==e&&e.length>0){var n=e.map((function(e){return o(e)}));t.player.trigger("recommendationschanged",{items:n})}else t.player.trigger("recommendationsnoshow");D.sources=e};(0,m.isFunction)(e)?n(e()):e.then?e.then(n):n(e)},t.one("cldsourcechanged",D.sourceChangedHandler),D.endedHandler=function(){!i&&t.autoShowRecommendations()&&t.player.trigger("recommendationsshow")},t.on("ended",D.endedHandler)},L=function(){D&&(t.off("cldsourcechanged",D.sourceChangedHandler),t.off("ended",D.endedHandler),delete D.endedHandler,delete D.sourceChangedHandler),D=null},k=function(){var e=t.source();e.poster()&&t.player.poster(e.poster().url()),y=e.generateSources().reduce((function(e,t){if(t.isAdaptive)if((t.type.split("; ")[1]||null)&&"MediaSource"in window){var n=t.type.split("; "),r="video/mp4; ".concat(n[1]||""),i=x(r);a.default.browser.IS_ANY_SAFARI&&(t.type="".concat(n[0],"; ").concat((0,d.codecShorthandTrans)("h264"))),i&&e.push(t)}else e.push(t);else e.push(t);return e}),[]),t.player.src(y),_=e,T=t.playlist()},x=function(e){return document.createElement("video").canPlayType(e)||"MediaSource"in window&&MediaSource.isTypeSupported(e)},F=function(){var e=(0,c.assign)({},t.posterOptions());e.transformation&&(!e.transformation.width&&!e.transformation.height||e.transformation.crop||(e.transformation.crop="scale")),e.transformation=(0,l.getCloudinaryInstanceOf)(i.default.Transformation,e.transformation||{});var n=t.player.el();if(n&&n.clientWidth&&n.clientHeight&&!(0,l.isKeyInTransformation)(e.transformation,"width")&&!(0,l.isKeyInTransformation)(e.transformation,"height")){var r=function(e){return 100*Math.ceil(e/100)};e.transformation.width(r(n.clientWidth)).height(r(n.clientHeight)).crop("limit")}return e},U=function(e,n){var r=n.to;_&&_.contains(r)?t.source()||(T&&t.playlist(T),t.source(_,{skipRefresh:!0})):(t.player.trigger("cldsourcechanged",{}),t.dispose())};P=new p.default(t.player);var B=u.sliceAndUnsetProperties.apply(void 0,[n].concat(w));return(0,s.applyWithProps)(S(t),B),t.on("sourcechanged",U),t}return t=f,(n=[{key:"currentSourceType",value:function(){return this.source().getType()}},{key:"currentPublicId",value:function(){return this.source()&&this.source().publicId()}},{key:"currentPoster",value:function(){return this.source()&&this.source().poster()}}])&&_(t.prototype,n),r&&_(t,r),f}((0,o.mixin)(f.default))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=c(n(393)),a=c(n(65)),o=c(n(99)),s=n(19),u=n(397),l=n(13);function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=(0,o.default)({Promise:a.default}).fetch,_={format:"json",resource_type:"video",type:"list"},T=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(o,e);var t,n,r,a=p(o);function o(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d(this,o),t=a.call(this);var r=(0,s.sliceProperties)(n,"chainTarget").chainTarget,u=null,l=null;t.playlist=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0===n?u:(t.playlist()&&t.disposePlaylist(),c(n,i),e.trigger("playlistcreated"),r)},t.disposePlaylist=function(){e.removeClass("vjs-playlist");var n=t.playlist();u=void 0,n.dispose(),t.off("cldsourcechanged",l)};var c=function(n,r){n instanceof i.default?((u=n).resetState(),u.currentIndex(u.currentIndex())):(u=new i.default(m(t),n,r)).currentIndex(0),l=f(),e.addClass("vjs-playlist")},f=function(){var e=function(){t.playlist()&&!t.playlist().currentSource().contains(t.player.currentSource())&&t.disposePlaylist()};return t.on("cldsourcechanged",e),e};return t}return t=o,(n=[{key:"playlistByTag",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.sourcesByTag(e,n).then((function(e){return t.playlist(e,n)}))}},{key:"sourcesByTag",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.cloudinaryConfig().url(e,_);return v(r).then((function(e){return e.json()})).then((function(e){var r=(0,u.normalizeJsonResponse)(e.resources);return n.sorter&&r.sort(n.sorter),r.map((function(e){var r=n.sourceParams||{};"function"==typeof r&&(r=r(e));var i=e.context&&e.context.custom||{},a=(0,l.assign)({info:i},r,{publicId:e.publicId});return t.buildSource(a)}))}))}}])&&f(t.prototype,n),r&&f(t,r),o}(e)};t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(62))&&r.__esModule?r:{default:r},a=n(14);n(395);var o=n(144);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.repeat,o=void 0!==a&&a,u=i.autoAdvance,l=void 0!==u&&u,c=i.presentUpcoming,d=void 0!==c&&c;s(this,e),this._context=t,this._sources=[],this._defaultRecResolverCache={},this._currentIndex=null,this._recommendationsHandler=null,this._autoAdvance=null,this._presentUpcoming=null,this.resetState=function(){n.repeat(o),n.autoAdvance(l),n.presentUpcoming(d)},r.forEach((function(e){return n.enqueue(e)})),this.resetState()}var t,n,r;return t=e,(n=[{key:"list",value:function(){return this._sources}},{key:"player",value:function(){return this._context.player}},{key:"presentUpcoming",value:function(e){if(this._presentUpcoming=this._presentUpcoming||{},void 0===e)return this._presentUpcoming.delay;if(!0===e)e=o.DEFAULT_PRESENT_UPCOMING;else if(!1===e)e=!1;else if(!(0,a.isInteger)(e)||e<0)throw new Error("presentUpcoming 'delay' must be either a boolean or a positive integer.");return this._presentUpcoming.delay=e,this._setupPresentUpcoming(),this._presentUpcoming.delay}},{key:"autoAdvance",value:function(e){if(this._autoAdvance=this._autoAdvance||{},void 0===e)return this._autoAdvance.delay;if(!0===e)e=o.DEFAULT_AUTO_ADVANCE;else if(!1===e)e=!1;else if(!(0,a.isInteger)(e)||e<0)throw new Error("Auto advance 'delay' must be either a boolean or a positive integer.");return this._autoAdvance.delay=e,this._setupAutoAdvance(),this._autoAdvance.delay}},{key:"_setupAutoAdvance",value:function(){var e=this;this._resetAutoAdvance();var t=this._autoAdvance.delay;!1!==t&&(this._autoAdvance={delay:t,trigger:function(){e.player().ended()&&(e._autoAdvance.timeout=setTimeout((function(){e.playNext()}),1e3*t))}},this._context.on("ended",this._autoAdvance.trigger))}},{key:"dispose",value:function(){this._resetAutoAdvance(),this._resetPresentUpcoming(),this._resetRecommendations()}},{key:"_resetPresentUpcoming",value:function(){this.player().trigger("upcomingvideohide"),this._presentUpcoming||(this._presentUpcoming={}),this._presentUpcoming.trigger&&this._context.off("timeupdate",this._presentUpcoming.trigger),this._presentUpcoming.trigger=null,this._presentUpcoming.showTriggered=!1}},{key:"_setupPresentUpcoming",value:function(){var e=this;this._resetPresentUpcoming(),!1!==this._presentUpcoming.delay&&(this._presentUpcoming.trigger=function(){var t=e.player().currentTime(),n=e.player().duration()-t;n<o.UPCOMING_VIDEO_TRANSITION+.5?e._presentUpcoming.showTriggered&&(e.player().trigger("upcomingvideohide"),e._presentUpcoming.showTriggered=!1):n<=e._presentUpcoming.delay&&!e._presentUpcoming.showTriggered&&!e.player().loop()?(e.player().trigger("upcomingvideoshow"),e._presentUpcoming.showTriggered=!0):e._presentUpcoming.showTriggered&&(n>e._presentUpcoming.delay||e.player().loop())&&(e.player().trigger("upcomingvideohide"),e._presentUpcoming.showTriggered=!1)},this._context.on("timeupdate",this._presentUpcoming.trigger))}},{key:"_resetAutoAdvance",value:function(){this._autoAdvance||(this._autoAdvance={}),this._autoAdvance.timeout&&clearTimeout(this._autoAdvance.timeout),this._autoAdvance.trigger&&this._context.off("ended",this._autoAdvance.trigger),this._autoAdvance.timeout=null,this._autoAdvance.trigger=null}},{key:"_resetRecommendations",value:function(){this._recommendationsHandler&&this._context.off("ended",this._recommendationsHandler)}},{key:"_refreshRecommendations",value:function(){var e=this;this._resetRecommendations(),this._recommendationsHandler=function(){!1===e.autoAdvance()&&e._context.autoShowRecommendations()&&e.player().trigger("recommendationsshow")},this._context.on("ended",this._recommendationsHandler)}},{key:"_refreshTextTracks",value:function(){this.player().trigger("refreshTextTracks",this.currentSource().textTracks())}},{key:"_recommendationItemBuilder",value:function(e){var t=this,n=this._defaultRecResolverCache[e.objectId];if(!e.recommendations()||n&&e.recommendations()===n)return function(e){return{source:e,action:function(){return t.playItem(e)}}}}},{key:"currentIndex",value:function(e){if(void 0===e)return this._currentIndex;if(e>=this.length()||e<0)throw new Error("Invalid playlist index.");this._currentIndex=e;var t=this.currentSource(),n=this._recommendationItemBuilder(t);t.recommendations()||t.recommendations(this._defaultRecommendationsResolver(t)),this._context.source(t,{recommendationOptions:{disableAutoShow:!0,itemBuilder:n}});var r={playlist:this,current:t,next:this.next()};return this.player().trigger("playlistitemchanged",r),this._refreshRecommendations(),this._refreshTextTracks(),t}},{key:"_defaultRecommendationsResolver",value:function(e){var t=this,n=this._defaultRecResolverCache[e.objectId];return n||(this._defaultRecResolverCache[e.objectId]=function(){for(var n=t.list().indexOf(e),r=[],i=Math.min(4,t.length()-1);r.length<i&&-1!==(n=t.nextIndex(n));){var a=t.list()[n];r.push(a)}return r},this._defaultRecResolverCache[e.objectId])}},{key:"buildSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._context.buildSource(e,t)}},{key:"enqueue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e instanceof i.default?e:this.buildSource(e,t);return this._sources.push(n),n}},{key:"playItem",value:function(e){var t=this.list().indexOf(e);if(-1===t)throw new Error("Invalid playlist item.");this.playAtIndex(t)}},{key:"playAtIndex",value:function(e){return this.currentIndex(e),this.player().play(),this.currentSource()}},{key:"currentSource",value:function(){return this.list()[this.currentIndex()]}},{key:"removeAt",value:function(e){if(e>=this.length()||e<0)throw new Error("Invalid playlist index.");return this._sources.splice(e,1),this}},{key:"repeat",value:function(e){return void 0===e||(this._repeat=!!e),this._repeat}},{key:"first",value:function(){return this.list()[0]}},{key:"last",value:function(){return this.list()[this.length()-1]}},{key:"next",value:function(){var e=this.nextIndex();return-1===e?null:this.list()[e]}},{key:"nextIndex",value:function(e){if((e=void 0!==e?e:this.currentIndex())>=this.length()||e<0)throw new Error("Invalid playlist index.");var t=e+1;if(e===this.length()-1){if(!this.repeat())return-1;t=0}return t}},{key:"previousIndex",value:function(){return this.isFirst()?-1:this.currentIndex()-1}},{key:"playFirst",value:function(){return this.playAtIndex(0)}},{key:"playLast",value:function(){var e=this.list().length-1;return this.playAtIndex(e)}},{key:"isLast",value:function(){return this.currentIndex()>=this.length()-1}},{key:"isFirst",value:function(){return 0===this.currentIndex()}},{key:"length",value:function(){return this.list().length}},{key:"playNext",value:function(){var e=this.nextIndex();return-1===e?null:this.playAtIndex(e)}},{key:"playPrevious",value:function(){var e=this.previousIndex();return-1===e?null:this.playAtIndex(e)}}])&&u(t.prototype,n),r&&u(t,r),e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatToMimeTypeAndTransformation=function(e){var t=(l=e.toLowerCase().split("/"),c=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(l,c)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(l,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),n=t[0],a=t[1],o=r.CONTAINER_MIME_TYPES[n],s=null;var l,c;o||(o=["video/".concat(n),s]);a&&(s=(0,i.codecToSrcTransformation)(a),o=["".concat(o[0],'; codecs="').concat((0,i.codecShorthandTrans)(a),'"'),s]);return o},t.normalizeFormat=function(e){e=e.toLowerCase().split("/").shift();var t=r.FORMAT_MAPPINGS[e];t||(t=e.split("/").shift());return t},t.isCodecAlreadyExist=void 0;var r=n(143),i=n(24),a=n(14),o=n(51),s=n(46);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=function(e){return e&&(0,s.some)(Object.values(i.VIDEO_CODEC),(function(t){return e.includes(t)}))};t.isCodecAlreadyExist=function(e,t){return!(!e&&!t)&&(!!function(e){return(0,s.some)(["video_codec","streaming_profile"],(function(t){return(0,o.isKeyInTransformation)(e,t)}))}(e)||((0,a.isString)(t)?l(t):(0,s.some)(e,(function(e){var t=e.toOptions();return(0,s.some)(t&&t.transformation,(function(e){return l((0,a.isPlainObject)(e)?e.video_codec:e)}))}))))}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=n(4))&&i.__esModule?i:{default:i};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(396);var g=a.default.dom||a.default,m=a.default.getComponent("Component"),y=function(e){c(n,e);var t=f(n);function n(e){var r;o(this,n);for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return(r=t.call.apply(t,[this,e].concat(a)))._setEvents(e),r}return u(n,[{key:"_setEvents",value:function(e){e.on("upcomingvideoshow",this._show.bind(this)),e.on("upcomingvideohide",this._hide.bind(this)),e.on("playlistitemchanged",this._onPlaylistItemChange.bind(this))}},{key:"_hide",value:function(){this.removeClass("vjs-upcoming-video-show")}},{key:"_disableTransition",value:function(e){this.addClass("disable-transition"),e(),this.removeClass("disable-transition")}},{key:"_onPlaylistItemChange",value:function(e,t){var n=this;this._hide(),this._disableTransition((function(){t.next&&n.setItem(t.next)}))}},{key:"_show",value:function(){var e="vjs-upcoming-video-show",t=this.player().ima,n="object"===t&&t.getAdsManager();n&&n.getCurrentAd()&&!n.getCurrentAd().isLinear()||this.addClass(e)}},{key:"setTitle",value:function(e){this.getChild("upcomingVideoOverlayContent").getChild("upcomingVideoOverlayBar").getChild("upcomingVideoOverlayTitle").setContent(e.info().title||e.publicId())}},{key:"setItem",value:function(e){this._source=e;var t=parseInt(window.getComputedStyle(this.el(),null).getPropertyValue("max-width"),10),n={crop:"pad",background:"auto:predominant",width:t,height:Math.round(t*(9/16))},r=this.getChild("upcomingVideoOverlayContent");this.setTitle(e),r.el().style.backgroundImage="url(".concat(this._source.poster().url({transformation:n}),")")}},{key:"handleClick",value:function(){l(p(n.prototype),"handleClick",this).call(this,event),this.player().cloudinary.playlist().playNext()}},{key:"createEl",value:function(){return l(p(n.prototype),"createEl",this).call(this,"div",{className:"vjs-upcoming-video"})}}]),n}(a.default.getComponent("ClickableComponent")),v=function(e){c(n,e);var t=f(n);function n(){return o(this,n),t.apply(this,arguments)}return u(n,[{key:"createEl",value:function(){return l(p(n.prototype),"createEl",this).call(this,"div",{className:"aspect-ratio-content"})}}]),n}(m),_=function(e){c(n,e);var t=f(n);function n(){return o(this,n),t.apply(this,arguments)}return u(n,[{key:"setContent",value:function(e){this._contentSpan.innerText=e}},{key:"createEl",value:function(){var e=l(p(n.prototype),"createEl",this).call(this,"div",{className:"vjs-control vjs-upcoming-video-title"}),t=g.createEl("div",{className:"vjs-upcoming-video-title-display",innerHTML:'<span class="vjs-control-text">Next up</span>Next up: '});return this._contentSpan=g.createEl("span",{className:"vjs-upcoming-video-title-display-label"}),t.appendChild(this._contentSpan),e.appendChild(t),e}}]),n}(m),T=function(e){c(n,e);var t=f(n);function n(){return o(this,n),t.apply(this,arguments)}return u(n,[{key:"createEl",value:function(){return l(p(n.prototype),"createEl",this).call(this,"div",{className:"vjs-upcoming-video-bar"})}}]),n}(m);y.prototype.options_={children:["upcomingVideoOverlayContent"]},a.default.registerComponent("upcomingVideoOverlay",y),v.prototype.options_={children:["upcomingVideoOverlayBar"]},a.default.registerComponent("upcomingVideoOverlayContent",v),T.prototype.options_={children:["upcomingVideoOverlayTitle","playlistNextButton"]},a.default.registerComponent("upcomingVideoOverlayBar",T),a.default.registerComponent("upcomingVideoOverlayTitle",_);var b=y;t.default=b},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeJsonResponse=void 0;var r=n(14),i=n(50),a=n(53),o=["created_at","updated_at"];t.normalizeJsonResponse=function e(t){var n={};return(0,r.isPlainObject)(t)?(Object.keys(t).reduce((function(n,r){var s=(0,i.camelize)(r);return-1!==o.indexOf(r)?n[s]=new Date((0,a.parseISO8601)(t[r])):n[s]=e(t[r]),n}),n),n):Array.isArray(t)?t.map((function(t){return e(t)})):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(30);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._emitter=t,this._eventHandlers=[]}var t,n,a;return t=e,(n=[{key:"on",value:function(e,t){this._eventHandlers.push({type:e,handler:t}),this._emitter.on(e,t)}},{key:"one",value:function(e,t){var n=this;this._eventHandlers.push({type:e,handler:t,wrapper:function(){t.apply(void 0,arguments),n.off(e,t)}}),this._emitter.one(e,t)}},{key:"off",value:function(e,t){var n=(0,r.findIndex)(this._eventHandlers,(function(n){return n.type===e&&n.handler===t}));if(-1!==n){var i=this._eventHandlers[n];this._emitter.off(e,i.wrapper||i.handler),this._eventHandlers.splice(n,1)}}},{key:"removeAllListeners",value:function(){var e=this;this._eventHandlers.forEach((function(t){e.off(t)}))}}])&&i(t.prototype,n),a&&i(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=d(n(62)),a=d(n(54)),o=n(24),s=n(19),u=n(13),l=n(68),c=n(400);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(d,e);var t,n,r,i=g(d);function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,d);var r=(0,o.normalizeOptions)(e,n);e=r.publicId,n=r.options,e=e.replace(c.AUDIO_SUFFIX_REMOVAL_PATTERN,""),n=(0,u.assign)({},c.DEFAULT_AUDIO_PARAMS,n);var a=(0,s.sliceAndUnsetProperties)(n,"poster"),l=a.poster;return(t=i.call(this,e,n))._poster=null,t._type="AudioSource",t.poster(l),t}return t=d,(n=[{key:"getPoster",value:function(){return this._poster}},{key:"poster",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return this._poster;if(e instanceof a.default)return this._poster=e,this;var n=(0,o.normalizeOptions)(e,t,{tolerateMissingId:!0});return e=n.publicId,t=n.options,e||(e=this.publicId(),t=(0,u.assign)({},t,c.DEFAULT_POSTER_PARAMS)),t.cloudinaryConfig=t.cloudinaryConfig||this.cloudinaryConfig(),this._poster=new a.default(e,t),this}},{key:"generateSources",value:function(){var e=this;return this.sourceTypes().map((function(t){if("audio"===t){var n={},r=e.sourceTransformation()[t]||[e.transformation()];r&&(n.transformation=r),(0,u.assign)(n,{resource_type:"video",format:"mp3"});var i="";return e.queryParams()&&(i=(0,l.objectToQuerystring)(e.queryParams())),{type:"video/mp4",src:"".concat(e.config().url(e.publicId(),n)).concat(i),cldSrc:e,poster:e.getPoster().url()}}return null}),this)}}])&&h(t.prototype,n),r&&h(t,r),d}(i.default);t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_AUDIO_PARAMS=t.AUDIO_SUFFIX_REMOVAL_PATTERN=t.COMMON_AUDIO_FORMATS=t.DEFAULT_POSTER_PARAMS=void 0;t.DEFAULT_POSTER_PARAMS={format:"jpg",resource_type:"video",transformation:{flags:"waveform"}};var r=["mp3","ogg","wav","mp4"];t.COMMON_AUDIO_FORMATS=r;var i=RegExp("\\.(".concat(r.join("|"),")$$"));t.AUDIO_SUFFIX_REMOVAL_PATTERN=i;t.DEFAULT_AUDIO_PARAMS={resource_type:"video",type:"upload",transformation:[]}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};new h(this,e).init()};var i,a=(i=n(4))&&i.__esModule?i:{default:i},o=n(19),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}i.default=e,n&&n.set(e,i);return i}(n(145));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d={percentsplayed:{percents:[25,50,75,100]}},f={events:["play","pause","ended","volumechange","resize","error","fullscreenchange","start","videoload","percentsplayed","seek","playerload"],category:"Video",defaultLabel:function(e){return e.cloudinary&&e.cloudinary.currentPublicId()||e.currentSource().src}},h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),this.player=t,this.options=a.default.mergeOptions(f,n),this.events=(0,s.normalizeEventsParam)(this.options.events,d);var r=(0,o.sliceProperties)(this.events,"percentsplayed","timeplayed","pause","seek");r.pause&&(delete r.pause,r.pausenoseek={}),this._extendedEvents=new s.default(t,{events:r}),this._currentSource=null,this._startTracked=null,this._endTracked=null,this.resetState()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e=this;this.events.shoppable&&(this.player.on("productHover",function(t,n){e.track({action:"productHover",label:n.productName})}.bind(this)),this.player.on("productClick",function(t,n){e.track({action:"productClick",label:n.productName})}.bind(this)),this.player.on("productHoverPost",function(t,n){e.track({action:"productHoverPostPlay",label:n.productName})}.bind(this)),this.player.on("productClickPost",function(t,n){e.track({action:"productClickPostPlay",label:n.productName})}.bind(this)),this.player.on("productBarMin",function(){e.track({action:"shoppableBar",label:"closed"})}.bind(this)),this.player.on("productBarMax",function(){e.track({action:"shoppableBar",label:"opened"})}.bind(this)),this.player.on("replay",function(){e.track({action:"replay"})}.bind(this))),this.events.play&&this.player.on("play",function(){e.track({action:"Play"})}.bind(this)),this.events.ended&&this.player.on("ended",function(){e._endTracked||(e.track({action:"Ended",nonInteraction:!0}),e._endTracked=!0)}.bind(this)),this.events.volumechange&&this.player.on("volumechange",function(){var t=e.player.muted()?0:e.player.volume();e.track({action:"Volume Change",value:t})}.bind(this)),this.events.resize&&this.player.on("resize",function(){var t="Resize - ".concat(e.player.width(),"x").concat(e.player.height(),"}");e.track({action:t})}.bind(this)),this.events.error&&this.player.on("error",function(){e.track({action:"Error",nonInteraction:!0})}.bind(this)),this.events.start&&this.player.on("playing",function(){e._startTracked&&(e.track({action:"Start"}),e._startTracked=!0)}.bind(this)),this.events.fullscreenchange&&this.player.on("fullscreenchange",function(){var t=e.player.isFullscreen()?"Enter Fullscreen":"Exit Fullscreen";e.track({action:t})}.bind(this)),this.events.percentsplayed&&this._extendedEvents.on("percentsplayed",function(t,n){var r=n.percent;e.track({action:"".concat(r," Percents Played"),nonInteraction:!0})}.bind(this)),this.events.timeplayed&&this._extendedEvents.on("timeplayed",function(t,n){var r=n.time;e.track({action:"".concat(r," Seconds Played"),value:r,nonInteraction:!0})}.bind(this)),this.events.pause&&this._extendedEvents.on("pausenoseek",function(){e.track({action:"Pause"})}.bind(this)),this.events.seek&&this._extendedEvents.on("seek",function(t,n){var r=n.seekStart,i=n.seekEnd;e.track({action:"Seek Start",value:r}),e.track({action:"Seek End",value:i})}.bind(this)),this.events.playerload&&e.track({action:"Player Load",label:window.location.href,nonInteraction:!0}),this.player.on("loadedmetadata",this.loadedmetadata.bind(this))}},{key:"track",value:function(e){var t=e.action,n=e.label,r=e.value,i=void 0===r?null:r,a=e.nonInteraction,o=void 0!==a&&a,s={eventCategory:this.options.category,eventAction:t,eventLabel:n||this.options.defaultLabel(this.player),eventValue:i||Math.round(this.player.currentTime()),nonInteraction:o};window.ga("send","event",s)}},{key:"videoload",value:function(){this.track({action:"Video Load",nonInteraction:!0})}},{key:"resetState",value:function(){this._currentSource="",this._startTracked=!1,this._endTracked=!1}},{key:"loadedmetadata",value:function(){var e=this.player.currentSource().src;e!==this._currentSource&&(this.resetState(),this._currentSource=e,this.events.videoload&&this.videoload())}}])&&c(t.prototype,n),r&&c(t,r),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(4)),i=a(n(65));function a(e){return e&&e.__esModule?e:{default:e}}n(403);var o={},s={},u=function(){function e(e,t){return this.player=e,this.options=t,this.listenForDurationChange(),this.initializeThumbnails(),this.registeredEvents={},this}return e.prototype.src=function(e){this.resetPlugin(),this.options.src=e,this.initializeThumbnails()},e.prototype.detach=function(){this.resetPlugin()},e.prototype.resetPlugin=function(){this.thumbnailHolder&&this.thumbnailHolder.parentNode.removeChild(this.thumbnailHolder),this.progressBar&&(this.progressBar.removeEventListener("mouseenter",this.registeredEvents.progressBarMouseEnter),this.progressBar.removeEventListener("mouseleave",this.registeredEvents.progressBarMouseLeave),this.progressBar.removeEventListener("mousemove",this.registeredEvents.progressBarMouseMove)),delete this.registeredEvents.progressBarMouseEnter,delete this.registeredEvents.progressBarMouseLeave,delete this.registeredEvents.progressBarMouseMove,delete this.progressBar,delete this.vttData,delete this.thumbnailHolder,delete this.lastStyle},e.prototype.listenForDurationChange=function(){this.player.on("durationchange",(function(){}))},e.prototype.initializeThumbnails=function(){var e=this;if(this.options.src){var t=this.getBaseUrl(),n=this.getFullyQualifiedUrl(this.options.src,t);this.getVttFile(n).then((function(t){e.vttData=e.processVtt(t),e.setupThumbnailElement()}))}},e.prototype.getBaseUrl=function(){return[window.location.protocol,"//",window.location.hostname,window.location.port?":"+window.location.port:"",window.location.pathname].join("").split(/([^\/]*)$/gi).shift()},e.prototype.getVttFile=function(e){var t=this;return new i.default((function(n){var r=new XMLHttpRequest;r.data={resolve:n},r.addEventListener("load",t.vttFileLoaded),r.open("GET",e),r.send()}))},e.prototype.vttFileLoaded=function(){this.data.resolve(this.responseText)},e.prototype.setupThumbnailElement=function(){var e=this,t=this.player.$(".vjs-mouse-display");this.progressBar=this.player.$(".vjs-progress-control");var n=document.createElement("div");n.setAttribute("class","vjs-vtt-thumbnail-display"),this.progressBar.appendChild(n),this.thumbnailHolder=n;var r=document.createElement("div");r.setAttribute("class","vjs-vtt-time-display"),this.thumbnailHolder.appendChild(r),this.timeHolder=r,t&&t.classList.add("vjs-hidden"),this.registeredEvents.progressBarMouseEnter=function(){return e.onBarMouseenter()},this.registeredEvents.progressBarMouseLeave=function(){return e.onBarMouseleave()},this.progressBar.addEventListener("mouseenter",this.registeredEvents.progressBarMouseEnter),this.progressBar.addEventListener("mouseleave",this.registeredEvents.progressBarMouseLeave)},e.prototype.onBarMouseenter=function(){var e=this;this.progressBar.offsetWidth<400||(this.mouseMoveCallback=function(t){e.onBarMousemove(t)},this.registeredEvents.progressBarMouseMove=this.mouseMoveCallback,this.progressBar.addEventListener("mousemove",this.registeredEvents.progressBarMouseMove),this.showThumbnailHolder())},e.prototype.onBarMouseleave=function(){this.registeredEvents.progressBarMouseMove&&this.progressBar.removeEventListener("mousemove",this.registeredEvents.progressBarMouseMove),this.hideThumbnailHolder()},e.prototype.getXCoord=function(e,t){var n=e.getBoundingClientRect(),r=document.documentElement;return t-(n.left+(window.pageXOffset||r.scrollLeft||0))},e.prototype.onBarMousemove=function(e){this.updateThumbnailStyle(r.default.dom.getPointerPosition(this.progressBar,e).x,this.progressBar.offsetWidth)},e.prototype.getStyleForTime=function(e){for(var t=0;t<this.vttData.length;++t){var n=this.vttData[t];if(e>=n.start&&e<n.end){if(n.css.url&&!s[n.css.url]){var r=new Image;r.src=n.css.url,s[n.css.url]=r}return n.css}}},e.prototype.showThumbnailHolder=function(){this.thumbnailHolder.style.opacity="1"},e.prototype.hideThumbnailHolder=function(){this.thumbnailHolder.style.opacity="0"},e.prototype.updateThumbnailStyle=function(e,t){var n=e*this.player.duration(),r=this.getStyleForTime(n);if(!r)return this.hideThumbnailHolder();var i=e*t,a=parseInt(r.width,10),o=a/2,s=t-(i+o),u=i-o;if(u>0&&s>0?this.thumbnailHolder.style.transform="translateX("+(i-o)+"px)":u<=0?this.thumbnailHolder.style.transform="translateX(0px)":s<=0&&(this.thumbnailHolder.style.transform="translateX("+(t-a)+"px)"),this.timeHolder.innerHTML=this.getTimestampFromSeconds(n),!this.lastStyle||this.lastStyle!==r)for(var l in this.lastStyle=r,r)Object.prototype.hasOwnProperty.call(r,l)&&(this.thumbnailHolder.style[l]=r[l])},e.prototype.processVtt=function(e){var t=this,n=[];return e.split(/[\r\n][\r\n]/i).forEach((function(e){if(e.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?[\r\n]{1}.*/gi)){var r=e.split(/[\r\n]/i),i=r[0].split(/ ?--> ?/i),a=i[0],o=i[1],s=r[1].split("/").pop(),u=t.getVttCss(s);n.push({start:t.getSecondsFromTimestamp(a),end:t.getSecondsFromTimestamp(o),css:u})}})),n},e.prototype.getFullyQualifiedUrl=function(e,t){return e.indexOf("//")>=0?e:0===t.indexOf("//")?[t.replace(/\/$/gi,""),this.trim(e,"/")].join("/"):t.indexOf("//")>0?[this.trim(t,"/"),this.trim(e,"/")].join("/"):e},e.prototype.getPropsFromDef=function(e){var t=e.split(/#xywh=/i),n=t[0],r=t[1].match(/[0-9]+/gi);return{x:r[0],y:r[1],w:r[2],h:r[3],image:n}},e.prototype.getVttCss=function(e){var t={},n="";if(n=this.options.src.indexOf("//")>=0?this.options.src.split(/([^\/]*)$/gi).shift():this.getBaseUrl()+this.options.src.split(/([^\/]*)$/gi).shift(),!(e=this.getFullyQualifiedUrl(e,n)).match(/#xywh=/i))return t.background='url("'+e+'")',t;var r=this.getPropsFromDef(e);return t.background='url("'+r.image+'") no-repeat -'+r.x+"px -"+r.y+"px",t.width=r.w+"px",t.height=r.h+"px",t.url=r.image,t},e.prototype.doconstructTimestamp=function(e){var t=e.split("."),n=t[0].split(":");return{milliseconds:parseInt(t[1],10)||0,seconds:parseInt(n.pop(),10)||0,minutes:parseInt(n.pop(),10)||0,hours:parseInt(n.pop(),10)||0}},e.prototype.getSecondsFromTimestamp=function(e){var t=this.doconstructTimestamp(e);return parseInt(3600*t.hours+60*t.minutes+t.seconds+t.milliseconds/1e3,10)},e.prototype.getTimestampFromSeconds=function(e){var t=Math.floor(e/60),n=Math.floor(e%60);return n<10&&(n="0"+n),t+":"+n},e.prototype.trim=function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","","\u2028","\u2029"," "].join(""),r=0,i=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),r=e.length,i=0;i<r;i++)if(-1===n.indexOf(e.charAt(i))){e=e.substring(i);break}for(i=(r=e.length)-1;i>=0;i--)if(-1===n.indexOf(e.charAt(i))){e=e.substring(0,i+1);break}return-1===n.indexOf(e.charAt(0))?e:""},e}(),l=function(e){var t=this;this.ready((function(){!function(e,t){e.addClass("vjs-vtt-thumbnails"),e.vttThumbnails=new u(e,t)}(t,r.default.mergeOptions(o,e))}))};t.default=l},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function o(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e);var t=a(n);function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=t.call(this);var r={data:{},handlers:{}};return e.on=function(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.length-1,u=i[o];return r.handlers[u]=function(t){t.Player=s(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];u.apply(void 0,[t].concat(r))},i[o]=r.handlers[u],(t=e.videojs).on.apply(t,i)},e.one=function(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.length-1,u=i[o];return r.handlers[u]=function(t){t.Player=s(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];u.apply(void 0,[t].concat(i)),delete r.handlers[u]},i[o]=r.handlers[u],(t=e.videojs).one.apply(t,i)},e.off=function(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.length-1,s=i[o];i[o]=r.handlers[s];var u=(t=e.videojs).off.apply(t,i);return delete r.handlers[s],u},e.trigger=function(){var t;(t=e.videojs).trigger.apply(t,arguments)},e}return n}(e)};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(4)),i=u(n(406)),a=u(n(407)),o=u(n(408)),s=n(144);function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(e,t){var n=f(f({},s.PLAYLIST_DEFAULTS_OPTIONS),t);if(n.show&&"string"==typeof n.selector&&(n.useDefaultLayout=!1,n.useCustomLayout=!0,n.renderTo=document.querySelector(n.selector),n.showAll=!0,0===!n.renderTo.length))throw new Error("Couldn't find element(s) by selector '".concat(n.selector,"' for playlist"));return n.show&&!n.selector&&(n.useDefaultLayout=!0,n.useCustomLayout=!1),n.direction="horizontal"===n.direction.toLowerCase()?"horizontal":"vertical",n.skin=e.options_.skin,n},g=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),i=p(t,i),this.options_=i,this.player_=t,this.render();var a=function(e,t){n.options_.fluid=t};t.on("fluid",a),this.options=function(e){return e?(n.options_=r.default.mergeOptions(n.options_,e),t.trigger("playlistwidgetoption",n.options_.playlistWidget),n.options_):n.options_},this.dispose=function(){n.layout_.dispose(),t.off("fluid",a)}}var t,n,u;return t=e,(n=[{key:"render",value:function(){this.options_.useDefaultLayout&&("horizontal"===this.options_.direction?this.layout_=new i.default(this.player_,this.options_):this.layout_=new a.default(this.player_,this.options_)),this.options_.useCustomLayout&&(this.layout_=new o.default(this.player_,this.options_))}},{key:"getLayout",value:function(){return this.layout_}},{key:"update",value:function(e,t){this.options(t),"direction"===e?(this.layout_.removeLayout(),this.layout_.dispose(),this.render()):this.layout_.update(e,this.options_)}},{key:"setSkin",value:function(){this.layout_.setCls()}},{key:"total",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.PLAYLIST_DEFAULTS_OPTIONS.total,t=parseInt(e,10);return t!==this.options_.total&&"number"==typeof t&&t>0&&this.update("total",{total:t}),this}},{key:"direction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.PLAYLIST_DEFAULTS_OPTIONS.direction;return"horizontal"!==e&&"vertical"!==e||this.update("direction",{direction:e}),this}}])&&c(t.prototype,n),u&&c(t,u),e}();t.default=g},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,i=u(l);function l(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),t.wrap=!0,i.call(this,e,t)}return t=l,(n=[{key:"getCls",value:function(){var e=o(c(l.prototype),"getCls",this).call(this);return e.push("cld-plw-horizontal"),e}}])&&a(t.prototype,n),r&&a(t,r),l}(((i=n(90))&&i.__esModule?i:{default:i}).default);t.default=d},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,i=u(l);function l(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),t.wrap=!0,i.call(this,e,t)}return t=l,(n=[{key:"getCls",value:function(){var e=o(c(l.prototype),"getCls",this).call(this);return e.push("cld-plw-vertical"),e}}])&&a(t.prototype,n),r&&a(t,r),l}(((i=n(90))&&i.__esModule?i:{default:i}).default);t.default=d},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,r,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getCls",value:function(){var e=s(d(c.prototype),"getCls",this).call(this);return e.push("cld-plw-custom"),e}},{key:"createEl",value:function(){var e=s(d(c.prototype),"createEl",this).call(this);return this.options_.renderTo.appendChild(e),e}}])&&o(t.prototype,n),r&&o(t,r),c}(((i=n(90))&&i.__esModule?i:{default:i}).default);t.default=f},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=a?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(i,s,u):i[s]=e[s]}i.default=e,n&&n.set(e,i);return i}(n(38));n(410),n(411),n(140);var a=n(30);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}n(412);var s={init:function(e){if(e&&e.qualityLevels&&e.dash&&e.dash.mediaPlayer){var t=i.default.MediaPlayer;e.dash.qualityLevels=e.qualityLevels(),e.dash.mediaPlayer.getAutoSwitchQualityFor=function(t){var n=e.dash.mediaPlayer.getSettings();return!n||n.streaming.abr.autoSwitchBitrate[t]},e.dash.mediaPlayer.setAutoSwitchQualityFor=function(t,n){var r=e.dash.mediaPlayer,i={streaming:{abr:{autoSwitchBitrate:{}}}};i.streaming.abr.autoSwitchBitrate[t]=n,r.updateSettings(i)},e.dash.mediaPlayer.on(t.events.PLAYBACK_METADATA_LOADED,(function(){var t=e.dash.mediaPlayer.getBitrateInfoListFor("video"),n=e.dash.mediaPlayer.getBitrateInfoListFor("audio");if(t.length>0){var r=t[t.length-1].bitrate;e.dash.audioMapper=t.map((function(e){return Math.round(e.bitrate/r*(n.length-1))})),t.forEach((function(t){e.dash.qualityLevels.addQualityLevel({id:t.bitrate,width:t.width,height:t.height,bandwidth:t.bitrate,selected:!0,enabled:function(t){var n=this;if(void 0===t)return void 0===this.selected||this.selected;if(this.selected=t,!0===t){var r=(0,a.findIndex)(e.qualityLevels().levels_,(function(e){return e.id===n.id}));e.qualityLevels().selectedIndex_=r,e.qualityLevels().trigger({type:"change",selectedIndex:r})}}})}))}})),e.qualityLevels().on("change",(function(t){1===e.dash.qualityLevels.levels_.filter((function(e){return e.enabled})).length?(e.dash.mediaPlayer.setQualityFor("video",t.selectedIndex),e.dash.mediaPlayer.setQualityFor("audio",e.dash.audioMapper[t.selectedIndex])):e.dash.mediaPlayer.getAutoSwitchQualityFor("video")||(e.dash.mediaPlayer.setAutoSwitchQualityFor("video",!0),e.dash.mediaPlayer.setAutoSwitchQualityFor("audio",!0))}))}},setVisibility:function(e){var t=e.controlBar.getChild("sourceMenuButton");if(t){var n=e.qualityLevels();if(n&&n.length>1){var r=n.levels_.filter((function(e){return e.enabled}));if(1===r.length){var i=n.levels_.findIndex((function(e){return e.id===r[0].id}));t.children()[1].children()[i].selected(!0)}else t.children()[1].children()[0].selected(!0),t.children()[1].children().forEach((function(e,t){t>0&&e.selected(!1)}));t.show()}else t.hide()}}};t.default=s},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r),a="2.1.0",o=i.a.getTech("Html5"),s=i.a.registerPlugin||i.a.plugin,u=["abort","emptied","loadstart","play"],l=["abort","emptied"],c=["ad-playback","ads-ready?","postroll?","preroll?"],d=function(e,t){return!!e.usingPlugin("ads")&&(function(e){return e.usingPlugin("ads")&&"function"==typeof e.ads.inAdBreak}(e)?e.ads.isInAdMode()&&"loadstart"!==t.type:function(e){return c.indexOf(e)>-1}(e.ads.state))},f=function(){var e,t,n=this,r=[],s=!1,c=!0,f=function(e){return function(t,n){var a=this;if(!this.perSourceBehaviors.disabled()){var o=2===arguments.length,s=this.currentSrc(),u=[t],l=i.a.bind(o?this:t,arguments[arguments.length-1]),c=function(){var t=a.currentSrc()!==s;a.perSourceBehaviors.disabled()||((t||e)&&a.off.apply(a,u),t||l.apply(void 0,arguments))};return c.guid=l.guid,o||u.push(n),u.push(c),r.push(u),this.on.apply(this,u)}}};this.perSourceBehaviors={disable:i.a.bind(this,(function(){return this.clearTimeout(t),t=null,s=!0})),disabled:function(){return s},enable:function(){return s=!1},enabled:function(){return!s},isSrcStable:function(){return c},VERSION:a},this.onPerSrc=f(),this.onePerSrc=f(!0),this.on("dispose",(function(){r.length=0})),this.on(u,(function(i){if(!(n.perSourceBehaviors.disabled()||t||d(n,i))){c&&l.indexOf(i.type)>-1&&(c=!1,n.trigger("sourceunstable"));var a=[],s=function(e){return a.push({time:Date.now(),event:e})};s(i),n.on(o.Events,s),t=n.setTimeout((function(){var i=n.currentSrc();c=!0,t=null,n.off(o.Events,s),i&&i!==e&&(r.forEach((function(e){return n.off.apply(n,e)})),r.length=0,n.trigger("sourcechanged",{interimEvents:a,from:e,to:i}),e=i)}),1)}}))};f.VERSION=a,s("perSourceBehaviors",f),t.default=f},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r),a=n(2),o=n.n(a);function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=function e(t){var n=this;if(i.a.browser.IS_IE8)for(var r in n=o.a.createElement("custom"),e.prototype)"constructor"!==r&&(n[r]=e.prototype[r]);return n.id=t.id,n.label=n.id,n.width=t.width,n.height=t.height,n.bitrate=t.bandwidth,n.enabled_=t.enabled,Object.defineProperty(n,"enabled",{get:function(){return n.enabled_()},set:function(e){n.enabled_(e)}}),n},l=function(e){var t,n;function r(){var t,n=s(s(t=e.call(this)||this));if(i.a.browser.IS_IE8)for(var a in n=o.a.createElement("custom"),r.prototype)"constructor"!==a&&(n[a]=r.prototype[a]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||s(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new u(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},a.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},a.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},a.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(i.a.EventTarget);for(var c in l.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},l.prototype.allowedEvents_)l.prototype["on"+c]=null;var d="2.1.0",f=i.a.registerPlugin||i.a.plugin,h=function(e){return t=this,i.a.mergeOptions({},e),n=t.qualityLevels,r=new l,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION=d,r;var t,n,r};f("qualityLevels",h),h.VERSION=d,t.default=h},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interactionAreaService=void 0;var r,i=(r=n(4))&&r.__esModule?r:{default:r},a=n(91),o=n(414),s=n(63),u=n(53),l=n(146),c=n(14),d=n(49);t.interactionAreaService=function(e,t,n){var r=!1,f=!1,h=null,p=c.noop;function g(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=y();return e||t&&t.enable}function m(){h&&e.videojs.removeRemoteTextTrack(h);var t=g(),n=y();if(!t||f)return null;if(Array.isArray(n.template))E(n.template),S();else{var r=n.vttUrl||a.TEMPLATE_INTERACTION_AREAS_VTT[n.template];r&&function(t){if(!t)return;var n=null;t.addEventListener("cuechange",(function(){var r=t.activeCues&&t.activeCues[0];if(r){var i=Math.max(Math.floor(1e3*(r.endTime-r.startTime)),a.DEFAULT_INTERACTION_ARE_TRANSITION),s=JSON.parse(r.text);E(s,n,i),!n&&S(),n=s}else(0,o.removeInteractionAreasContainer)(e.videojs),n=null}))}(h=(0,d.addMetadataTrack)(e.videojs,r))}}function y(){var t=e.videojs.currentSource().cldSrc;return t&&t.getInteractionAreas()}function v(){(0,o.removeInteractionAreasContainer)(e.videojs),m(),e.play()}function _(){if(g())if((0,o.shouldShowAreaLayoutMessage)(n.interactionAreas)){var t=null,r=(0,l.get)(n,"interactionAreas.layout.showAgain",!1);e.pause(),(0,o.createInteractionAreaLayoutMessage)(e.videojs,(function(){clearTimeout(t),v()}),r),r||(t=setTimeout(v,a.CLOSE_INTERACTION_AREA_LAYOUT_DELAY))}else v()}function T(t,n,r){var u=e.videojs.currentSource(),l=u.cldSrc,c=l.getInitOptions(),d=n||{transformation:c.transformation.toOptions()},h=!t&&(0,o.getZoomTransformation)(e.videoElement,r),g=h?i.default.mergeOptions({transformation:h},d):d,m=l.isRawUrl?u.src:{publicId:l.publicId()};e.source(h?{publicId:l.publicId()}:t,g).play(),f=!0,function(){var t=(0,s.createElement)("div",{class:"go-back-button"});t.addEventListener("click",(function(){p()}),!1);var n=(0,s.createElement)("div",{class:a.INTERACTION_AREAS_CONTAINER_CLASS_NAME},t);(0,o.setInteractionAreasContainer)(e.videojs,n)}(),p=function(){f&&(f=!1,e.source(m,c).play())}}function b(e){var t=e.event,n=e.item,r=e.index,i=y();i.onClick&&i.onClick({item:n,index:r,event:t,zoom:function(e,t){T(e,t,n)}})}function E(r,i){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l={playerOptions:t,videojsOptions:n};if(i)(0,o.updateInteractionAreasItem)(e.videojs,l,r,i,u,b);else{var c=r.map((function(e,t){return(0,o.getInteractionAreaItem)(l,e,t,u,(function(n){b({event:n,item:e,index:t})}))}));(0,o.setInteractionAreasContainer)(e.videojs,(0,s.createElement)("div",{class:a.INTERACTION_AREAS_CONTAINER_CLASS_NAME},c))}}function S(){g()&&(0,o.setInteractionAreasContainerSize)(e.videojs,e.videoElement)}return{init:function(){if(g()){e.videojs.one("play",(function(){r=!0,_()})),e.videojs.on("sourcechanged",(function(){r&&m()}));var t=(0,u.throttle)(S,100);e.videojs.on("fullscreenchange",(function(){setTimeout(t,100)}));var n=(0,s.addEventListener)(window,"resize",S,!1);e.videojs.on("dispose",n)}e.videojs.on("ended",(function(){p()}))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setInteractionAreasContainerSize=t.removeInteractionAreasContainer=t.createInteractionAreaLayoutMessage=t.shouldShowAreaLayoutMessage=t.updateInteractionAreasItem=t.setInteractionAreasContainer=t.getZoomTransformation=t.percentageToFixedValue=t.getInteractionAreaItem=void 0;var r=n(63),i=n(146),a=n(91),o=n(14),s=n(142),u=n(46),l=n(415),c=n(416);var d=function(e,t){return e.id||e.type||"id_".concat(t)},f=function(e,t,n,o,u){var l,c,f,h=e.playerOptions,p=e.videojsOptions,g=(0,s.getDefaultPlayerColor)(p),m=h&&h.colors?h.colors.accent:g.accent,y=(0,i.get)(p,"interactionAreas.theme.template",a.INTERACTION_AREAS_THEME.PULSING);return(0,r.elementsCreator)({tag:"div",attr:{class:"".concat(a.INTERACTION_AREAS_PREFIX,"-item theme-").concat(y),"data-id":d(t,n)},style:{left:"".concat(t.left,"%"),top:"".concat(t.top,"%"),width:"".concat(t.width,"%"),height:"".concat(t.height,"%"),transitionDuration:"".concat(o,"ms")},event:{name:"click",callback:u},children:[{tag:"div",attr:{class:"".concat(a.INTERACTION_AREAS_PREFIX,"-area-marker")},children:[{tag:"div",attr:{class:"".concat(a.INTERACTION_AREAS_PREFIX,"-marker-shadow")},style:(l={},c=y===a.INTERACTION_AREAS_THEME.SHADOWED?"backgroundColor":"borderColor",f=m,c in l?Object.defineProperty(l,c,{value:f,enumerable:!0,configurable:!0,writable:!0}):l[c]=f,l)},{tag:"div",attr:{class:"".concat(a.INTERACTION_AREAS_PREFIX,"-marker-main")},style:{borderColor:m}}]}]})};t.getInteractionAreaItem=f;var h=function(e,t){return e/(100/+t)};t.percentageToFixedValue=h;t.getZoomTransformation=function(e,t){var n=e.videoHeight,r=e.videoWidth,i=h(r,t.left),a=h(n,t.top),o=h(r,t.width),s=h(n,t.height),u=r/n,l=o/s,c=Math.round(l>1||u>1?s*l:o),d=Math.round(c/u),f=Math.round(i-(c-o)/2),p=Math.round(a-(d-s)/2);return{width:c,height:d,x:Math.min(Math.max(f,0),r-c),y:Math.min(Math.max(p,0),n-d),crop:"crop"}};var p=function(e,t){var n=y(e);n?n.replaceWith(t):e.el().appendChild(t)};t.setInteractionAreasContainer=p;var g=function(e,t,n){return e.querySelector("[data-id=".concat(d(t,n),"]"))};t.updateInteractionAreasItem=function(e,t,n,i,a,o){var s=y(e);(0,u.forEach)(n,(function(e,n){var l=g(s,e,n),c=d(e),h=(0,u.some)(i,(function(e){return d(e)===c}));h&&l?(0,r.styleElement)(l,{left:"".concat(e.left,"%"),top:"".concat(e.top,"%"),width:"".concat(e.width,"%"),height:"".concat(e.height,"%"),transitionDuration:"".concat(a,"ms")}):h||l||s.appendChild(f(t,e,n,a,(function(t){o({event:t,item:e,index:n})})))})),(0,u.forEach)(i,(function(e,t){var r=g(s,e,t),i=d(e),a=!(0,u.some)(n,(function(e){return d(e)===i}));r&&a&&r.parentNode.removeChild(r)}))};t.shouldShowAreaLayoutMessage=function(e){return(0,i.get)(e,"layout.enable",!0)&&"true"!==localStorage.getItem(a.INTERACTION_AREA_LAYOUT_LOCAL_STORAGE_NAME)};var m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.noop;localStorage.setItem(a.INTERACTION_AREA_LAYOUT_LOCAL_STORAGE_NAME,JSON.parse(e)),t()};t.createInteractionAreaLayoutMessage=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!1,o="checkbox_".concat(Math.round(1e4*Math.random())),s=(0,r.elementsCreator)({tag:"div",attr:{class:"".concat(a.INTERACTION_AREAS_CONTAINER_CLASS_NAME," ").concat(a.INTERACTION_AREAS_PREFIX,"-layout-message ").concat(n?"":"clickable")},onClick:n?null:function(){return m(i,t)},children:[{tag:"img",attr:{class:"".concat(a.INTERACTION_AREAS_PREFIX,"-layout-icon"),src:a.INTERACTION_AREA_HAND_ICON}},{tag:"h3",attr:{class:"".concat(a.INTERACTION_AREAS_PREFIX,"-layout-message-title")},children:"Tap on dots to zoom for a product."},(0,l.themedButton)({text:"Got it",theme:c.BUTTON_THEME.TRANSPARENT_WHITE,loadingDelay:n?0:a.CLOSE_INTERACTION_AREA_LAYOUT_DELAY,onClick:n?function(){return m(i,t)}:null}),n&&{tag:"div",attr:{class:"".concat(a.INTERACTION_AREAS_PREFIX,"-layout-message-do-not-show")},children:[{tag:"input",attr:{type:"checkbox",class:"".concat(a.INTERACTION_AREAS_PREFIX,"-layout-message-checkbox"),id:o},event:{name:"input",callback:function(e){i=e.target.checked}}},{tag:"label",attr:{class:"".concat(a.INTERACTION_AREAS_PREFIX,"-layout-message-checkbox-title"),for:o},children:"Don׳t show it again"}]}].filter((function(e){return e}))});p(e,s)};var y=function(e){return e.el().querySelector(".".concat(a.INTERACTION_AREAS_CONTAINER_CLASS_NAME))};t.removeInteractionAreasContainer=function(e){var t=y(e);t&&t.parentNode.removeChild(t)};t.setInteractionAreasContainerSize=function(e,t){var n=y(e);if(n){var r=t.videoHeight,i=t.videoWidth/r,a=i*t.clientHeight;n.style.width="".concat(t.clientWidth<a?"100%":a,"px"),n.style.height=t.clientWidth<a?"".concat(t.clientWidth/i,"px"):"100%"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.themedButton=void 0;var r=n(63);t.themedButton=function(e){var t=e.text,n=e.onClick,i=e.theme,a=void 0===i?"":i,o=e.loadingDelay,s=void 0===o?0:o;return(0,r.elementsCreator)({tag:"button",attr:{class:"vp-theme-button theme-".concat(a)},onClick:n,children:[{tag:"div",attr:{class:"vp-loading-bar"},style:{"animation-duration":"".concat(s,"ms")}},{tag:"div",attr:{class:"content"},children:t}]})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BUTTON_THEME=void 0;t.BUTTON_THEME={TRANSPARENT_WHITE:"transparent-white"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sourceValidators=t.playerValidators=void 0;var r=n(37),i=n(91),a=n(418),o={videojsOptions:{loop:a.validator.isBoolean,controls:a.validator.isBoolean,autoplay:a.validator.isBoolean,autoplayMode:a.validator.isString(r.AUTO_PLAY_MODE),bigPlayButton:a.validator.isBoolean,playbackRates:a.validator.isArray,showLogo:a.validator.isBoolean,logoImageUrl:a.validator.isString,logoOnclickUrl:a.validator.isString,videoJS:a.validator.isPlainObject,maxTries:a.validator.isNumber,muted:a.validator.isBoolean,playsinline:a.validator.isBoolean,videoTimeout:a.validator.isNumber,preload:a.validator.isString,sourceTransformation:a.validator.isPlainObject,allowUsageReport:a.validator.isBoolean,interactionAreas:{theme:{template:a.validator.isString(i.INTERACTION_AREAS_THEME)},layout:{enable:a.validator.isBoolean,showAgain:a.validator.isBoolean}}},playerOptions:{publicId:a.validator.isString,fluid:a.validator.isBoolean,analytics:a.validator.isBoolean,hideContextMenu:a.validator.isBoolean,playedEventPercents:a.validator.isArrayOfNumbers,showJumpControls:a.validator.isBoolean,seekThumbnails:a.validator.isBoolean,floatingWhenNotVisible:a.validator.isString(r.FLOATING_TO),playedEventTimes:a.validator.isArray,playlistWidget:{direction:a.validator.isString,total:a.validator.isNumber},colors:{base:a.validator.isString,accent:a.validator.isString,text:a.validator.isString},ads:{adTagUrl:a.validator.isString,showCountdown:a.validator.isBoolean,adLabel:a.validator.isString,locale:a.validator.isString,prerollTimeout:a.validator.isNumber,postrollTimeout:a.validator.isNumber,adsInPlaylist:a.validator.isString(r.ADS_IN_PLAYLIST)},cloudinary:{autoShowRecommendations:a.validator.isBoolean,sourceTypes:a.validator.isArrayOfStrings,transformation:a.validator.isObject,fontFace:a.validator.isString,posterOptions:{publicId:a.validator.isString,transformation:a.validator.isObject}}}};t.playerValidators=o;var s={raw_transformation:a.validator.isString,shoppable:a.validator.isPlainObject,withCredentials:a.validator.isBoolean,interactionAreas:{enable:a.validator.isBoolean,template:a.validator.or(a.validator.isString(i.INTERACTION_AREAS_TEMPLATE),a.validator.isArray),vttUrl:a.validator.isString,onClick:a.validator.isFunction},textTracks:{captions:{label:a.validator.isString,language:a.validator.isString,default:a.validator.isBoolean,url:a.validator.isString},subtitles:a.validator.isArrayOfObjects({label:a.validator.isString,language:a.validator.isString,url:a.validator.isString})},info:{title:a.validator.isString,subtitle:a.validator.isString,description:a.validator.isString},cloudinary:{sourceTypes:a.validator.isArrayOfStrings,transformation:a.validator.isObject}};t.sourceValidators=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validator=void 0;var r=n(14),i=n(147),a=n(46);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s=function(e){return(0,r.isPlainObject)(e)?":(".concat(Object.values(e).join("/"),")"):""},u={isString:function(e){return{value:r.isString,message:function(t){return"'".concat(t,"' should be a string").concat(s(e))}}},isNumber:function(e){return{value:r.isNumber,message:function(t){return"'".concat(t,"' should be a number").concat(s(e))}}},isBoolean:function(){return{value:r.isBoolean,message:function(e){return"'".concat(e,"' should be a boolean")}}},isFunction:function(){return{value:r.isFunction,message:function(e){return"'".concat(e,"' should be a function")}}},isPlainObject:function(){return{value:r.isPlainObject,message:function(e){return"'".concat(e,"' should be an object")}}},isObject:function(){return{value:function(e){return e&&"object"===o(e)},message:function(e){return"'".concat(e,"' should be an object")}}},isArray:function(){return{value:Array.isArray,message:function(e){return"'".concat(e,"' should be an array")}}},isArrayOfNumbers:function(){return{value:function(e){return Array.isArray(e)&&e.every(r.isNumber)},message:function(e){return"'".concat(e,"' should be an array of numbers")}}},isArrayOfStrings:function(){return{value:function(e){return Array.isArray(e)&&e.every(r.isString)},message:function(e){return"'".concat(e,"' should be an array of strings")}}},isArrayOfObjects:function(e){return{value:function(t){return t.every((function(t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n],a=e[n];if(!(a&&(0,i.isValueValid)(a(r),r,n)))return!1}return!0}))},message:function(){return"invalid array"}}},or:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return{value:function(e){return(0,a.some)(t,(function(t){return(0,i.getValidatorItem)(t).value(e)}))},message:function(e){return(0,a.map)(t,(function(t){return(0,i.getValidatorItem)(t).message(e)})).join(" or ")}}}}};t.validator=u},function(e,t,n){"use strict";n.r(t);var r,i=n(0),a=n.n(i),o=n(2),s=n.n(o),u=n(22),l=n.n(u),c=n(5),d=n.n(c),f=n(3),h=n.n(f),p=n(148),g=n.n(p),m=n(7),y=n.n(m),v=n(92),_=n.n(v),T=n(93),b=n.n(T),E=n(149),S=n.n(E),A=n(150),C=n.n(A),w=n(94),I=n.n(w),R="http://example.com",O=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var n="function"==typeof a.a.URL,r=/^\/\//.test(e),i=!a.a.location&&!/\/\//i.test(e);if(n?e=new a.a.URL(e,a.a.location||R):/\/\//i.test(e)||(e=I.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),n){var o=new URL(t,e);return i?o.href.slice(R.length):r?o.href.slice(o.protocol.length):o.href}return I.a.buildAbsoluteURL(e,t)},P=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,o=0;o<a;++o)t[o].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),D=n(151),M=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return h()(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(P),N=String.fromCharCode(9),L=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},k=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},x=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}h()(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void r.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void r.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return n=l()(L(t[1]),{type:"tag",tagType:"byterange"}),void r.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var a=k(t[1]);a.URI&&(n.uri=a.URI),a.BYTERANGE&&(n.byterange=L(a.BYTERANGE))}r.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=k(t[1]),n.attributes.RESOLUTION){var o=n.attributes.RESOLUTION.split("x"),s={};o[0]&&(s.width=parseInt(o[0],10)),o[1]&&(s.height=parseInt(o[1],10)),n.attributes.RESOLUTION=s}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}r.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=k(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))r.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=k(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void r.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=k(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"skip"}).attributes=k(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(N)),void r.trigger("data",n);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part"}).attributes=k(t[1]),["DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=L(n.attributes.BYTERANGE)),void r.trigger("data",n);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"server-control"}).attributes=k(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part-inf"}).attributes=k(t[1]),["PART-TARGET"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"preload-hint"}).attributes=k(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}})),void r.trigger("data",n);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"rendition-report"}).attributes=k(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))})),void r.trigger("data",n);r.trigger("data",{type:"tag",data:e.slice(4)})}}}else r.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,i=e.dataParser,a=e.segment;"function"!=typeof i&&(i=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:i(e),customType:r,segment:a}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(P),F=function(e){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()})))]=e[n]})),t},U=function(e){var t=e.serverControl,n=e.targetDuration,r=e.partTargetDuration;if(t){var i="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",s=n&&3*n,u=r&&2*r;n&&!t.hasOwnProperty(a)&&(t[a]=s,this.trigger("info",{message:i+" defaulting HOLD-BACK to targetDuration * 3 ("+s+")."})),s&&t[a]<s&&(this.trigger("warn",{message:i+" clamping HOLD-BACK ("+t[a]+") to targetDuration * 3 ("+s+")"}),t[a]=s),r&&!t.hasOwnProperty(o)&&(t[o]=3*r,this.trigger("info",{message:i+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[o]+")."})),r&&t[o]<u&&(this.trigger("warn",{message:i+" clamping PART-HOLD-BACK ("+t[o]+") to partTargetDuration * 2 ("+u+")."}),t[o]=u)}},B=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new M,t.parseStream=new x,t.lineStream.pipe(t.parseStream);var n,r,i=d()(t),a=[],o={},s=!1,u=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},f=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var h=0,p=0;return t.on("end",(function(){o.uri||!o.parts&&!o.preloadHints||(!o.map&&n&&(o.map=n),!o.key&&r&&(o.key=r),o.timeline||"number"!=typeof f||(o.timeline=f),t.manifest.preloadSegment=o)})),t.parseStream.on("data",(function(e){var t,d;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(o.byterange=t,t.length=e.length,"offset"in e||(e.offset=h)),"offset"in e&&(o.byterange=t,t.offset=e.offset),h=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(o.duration=e.duration),0===e.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Object(D.a)(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,f=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),r&&(n.key=r)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes?(o.attributes||(o.attributes={}),l()(o.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(d={default:/yes/i.test(e.attributes.DEFAULT)}).default?d.autoselect=!0:d.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(d.language=e.attributes.LANGUAGE),e.attributes.URI&&(d.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(d.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(d.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(d.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=d}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){f+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),o.dateTimeString=e.dateTimeString,o.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,U.call(this,this.manifest))},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){o.cueOut=e.data},"cue-out-cont":function(){o.cueOutCont=e.data},"cue-in":function(){o.cueIn=e.data},skip:function(){this.manifest.skip=F(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;s=!0;var n=this.manifest.segments.length,r=F(e.attributes);o.parts=o.parts||[],o.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=p),p=r.byterange.offset+r.byterange.length);var i=o.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+i+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=F(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),U.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,n=F(e.attributes),r=n.type&&"PART"===n.type;o.preloadHints=o.preloadHints||[],o.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=r?p:0,r&&(p=n.byterange.offset+n.byterange.length)));var i=o.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var a=0;a<o.preloadHints.length-1;a++){var s=o.preloadHints[a];s.type&&(s.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+a}))}},"rendition-report":function(){var t=F(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];s&&r.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,r)},"part-inf":function(){this.manifest.partInf=F(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),U.call(this,this.manifest)}}[e.tagType]||u).call(i)},uri:function(){o.uri=e.uri,a.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),r&&(o.key=r),o.timeline=f,n&&(o.map=n),p=0,o={}},comment:function(){},custom:function(){e.segment?(o.custom=o.custom||{},o.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}h()(t,e);var n=t.prototype;return n.warnOnMissingAttributes_=function(e,t,n){var r=[];n.forEach((function(e){t.hasOwnProperty(e)||r.push(e)})),r.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+r.join(", ")})},n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n"),this.trigger("end")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(P),j={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},H=["video","audio","text"],G=["Video","Audio","Text"],q=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},V=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),H.forEach((function(r){var i=j[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var a=e.substring(0,i[1].length),o=e.replace(a,"");n.push({type:a,details:o,mediaType:r})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},Y=function(e){return void 0===e&&(e=""),j.audio.test(e.trim().toLowerCase())},K=function(e){if(e&&"string"==typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return q(e.trim())})),r="video";1===n.length&&Y(n[0])?r="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),j.text.test(t.trim().toLowerCase()))&&(r="application");var i="mp4";return n.every((function(e){return j.mp4.test(e)}))?i="mp4":n.every((function(e){return j.webm.test(e)}))?i="webm":n.every((function(e){return j.ogg.test(e)}))&&(i="ogg"),r+"/"+i+';codecs="'+e+'"'}},W=function(e){return void 0===e&&(e=""),a.a.MediaSource&&a.a.MediaSource.isTypeSupported&&a.a.MediaSource.isTypeSupported(K(e))||!1},z=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<G.length;t++){if(j["muxer"+G[t]].test(e))return!0}return!1}))},X="mp4a.40.2",Q=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,$=/^application\/dash\+xml/i,J=function(e){return Q.test(e)?"hls":$.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},Z=n(152),ee=n(153),te=function(e){return!!e&&"object"==typeof e},ne=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return"object"!=typeof n||Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):te(t[r])&&te(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},re=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},ie=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},ae="INVALID_NUMBER_OF_PERIOD",oe="DASH_EMPTY_MANIFEST",se="DASH_INVALID_XML",ue="NO_BASE_URL",le="SEGMENT_TIME_UNSPECIFIED",ce="UNSUPPORTED_UTC_TIMING_SCHEME",de=function(e){var t=e.baseUrl,n=void 0===t?"":t,r=e.source,i=void 0===r?"":r,a=e.range,o=void 0===a?"":a,s=e.indexRange,u=void 0===s?"":s,l={uri:i,resolvedUri:O(n||"",i)};if(o||u){var c=(o||u).split("-"),d=parseInt(c[0],10),f=parseInt(c[1],10);l.byterange={length:f-d+1,offset:d}}return l},fe=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},he={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration,a=fe(e.endNumber);return{start:0,end:"number"==typeof a?a:Math.ceil(i/(t/r))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,a=void 0===i?1:i,o=e.duration,s=e.start,u=void 0===s?0:s,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,f=void 0===d?1/0:d,h=fe(e.endNumber),p=(t+n)/1e3,g=r+u,m=p+c-g,y=Math.ceil(m*a/o),v=Math.floor((p-g-f)*a/o),_=Math.floor((p-g)*a/o);return{start:Math.max(0,v),end:"number"==typeof h?h:Math.min(y,_)}}},pe=function(e){var t=e.type,n=void 0===t?"static":t,r=e.duration,i=e.timescale,a=void 0===i?1:i,o=e.sourceDuration,s=he[n](e),u=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}(s.start,s.end).map(function(e){return function(t,n){var r=e.duration,i=e.timescale,a=void 0===i?1:i,o=e.periodIndex,s=e.startNumber;return{number:(void 0===s?1:s)+t,duration:r/a,timeline:o,time:n*r}}}(e));if("static"===n){var l=u.length-1;u[l].duration=o-r/a*l}return u},ge=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,a=e.indexRange,o=void 0===a?"":a,s=e.duration;if(!t)throw new Error(ue);var u=de({baseUrl:t,source:r.sourceURL,range:r.range}),l=de({baseUrl:t,source:t,indexRange:o});if(l.map=u,s){var c=pe(e);c.length&&(l.duration=c[0].duration,l.timeline=c[0].timeline)}else i&&(l.duration=i,l.timeline=0);return l.number=0,[l]},me=function(e,t,n){for(var r=e.sidx.map?e.sidx.map:null,i=e.sidx.duration,a=e.timeline||0,o=e.sidx.byterange,s=o.offset+o.length,u=t.timescale,l=t.references.filter((function(e){return 1!==e.referenceType})),c=[],d=s+t.firstOffset,f=0;f<l.length;f++){var h=t.references[f],p=h.referencedSize,g=h.subsegmentDuration,m=ge({baseUrl:n,timescale:u,timeline:a,periodIndex:a,duration:g,sourceDuration:i,indexRange:d+"-"+(d+p-1)})[0];r&&(m.map=r),c.push(m),d+=p}return e.segments=c,e},ye=function(e){return e&&e.uri+"-"+(t=e.byterange,n=t.offset+t.length-1,t.offset+"-"+n);var t,n},ve=function(e){var t;return(t=e.reduce((function(e,t){var n,r=t.attributes.id+(t.attributes.lang||"");return e[r]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(n=e[r].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[r].attributes.contentProtection=t.attributes.contentProtection)):e[r]=t,e}),{}),Object.keys(t).map((function(e){return t[e]}))).map((function(e){var t,n;return e.discontinuityStarts=(t=e.segments,n="discontinuity",t.reduce((function(e,t,r){return t[n]&&e.push(r),e}),[])),e}))},_e=function(e,t){var n=ye(e.sidx),r=n&&t[n]&&t[n].sidx;return r&&me(e,r,e.sidx.resolvedUri),e},Te=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=_e(e[n],t);return e},be=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,a={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(a.contentProtection=n.contentProtection),i&&(a.sidx=i),a},Ee=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},Se=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},Ae=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},Ce=function(e,t,n){var r;if(void 0===n&&(n={}),!e.length)return{};var i=e[0].attributes,a=i.sourceDuration,o=i.type,s=void 0===o?"static":o,u=i.suggestedPresentationDelay,l=i.minimumUpdatePeriod,c=ve(e.filter(Ee)).map(be),d=ve(e.filter(Se)),f=e.filter(Ae),h=e.map((function(e){return e.attributes.captionServices})).filter(Boolean),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:a,playlists:Te(c,n)};l>=0&&(p.minimumUpdatePeriod=1e3*l),t&&(p.locations=t),"dynamic"===s&&(p.suggestedPresentationDelay=u);var g=0===p.playlists.length;return d.length&&(p.mediaGroups.AUDIO.audio=function(e,t,n){var r;void 0===t&&(t={}),void 0===n&&(n=!1);var i=e.reduce((function(e,i){var a=i.attributes.role&&i.attributes.role.value||"",o=i.attributes.lang||"",s=i.attributes.label||"main";if(o&&!i.attributes.label){var u=a?" ("+a+")":"";s=""+i.attributes.lang+u}e[s]||(e[s]={language:o,autoselect:!0,default:"main"===a,playlists:[],uri:""});var l=_e(function(e,t){var n,r=e.attributes,i=e.segments,a=e.sidx,o={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:i,mediaSequence:i.length?i[0].number:1};return r.contentProtection&&(o.contentProtection=r.contentProtection),a&&(o.sidx=a),t&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o}(i,n),t);return e[s].playlists.push(l),void 0===r&&"main"===a&&((r=i).default=!0),e}),{});return r||(i[Object.keys(i)[0]].default=!0),i}(d,n,g)),f.length&&(p.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(_e(function(e){var t,n=e.attributes,r=e.segments;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var i=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(i.CODECS=n.codecs),{attributes:i,uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1}}(n),t)),e}),{})}(f,n)),h.length&&(p.mediaGroups["CLOSED-CAPTIONS"].cc=h.reduce((function(e,t){return t?(t.forEach((function(t){var n=t.channel,r=t.language;e[r]={autoselect:!1,default:!1,instreamId:n,language:r},t.hasOwnProperty("aspectRatio")&&(e[r].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[r].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[r]["3D"]=t["3D"])})),e):e}),{})),p},we=function(e,t,n){var r=e.NOW,i=e.clientOffset,a=e.availabilityStartTime,o=e.timescale,s=void 0===o?1:o,u=e.start,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(r+i)/1e3+(void 0===c?0:c)-(a+l);return Math.ceil((d*s-t)/n)},Ie=function(e,t){for(var n=e.type,r=void 0===n?"static":n,i=e.minimumUpdatePeriod,a=void 0===i?0:i,o=e.media,s=void 0===o?"":o,u=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,d=e.startNumber,f=void 0===d?1:d,h=e.periodIndex,p=[],g=-1,m=0;m<t.length;m++){var y=t[m],v=y.d,_=y.r||0,T=y.t||0;g<0&&(g=T),T&&T>g&&(g=T);var b=void 0;if(_<0){var E=m+1;b=E===t.length?"dynamic"===r&&a>0&&s.indexOf("$Number$")>0?we(e,g,v):(u*c-g)/v:(t[E].t-g)/v}else b=_+1;for(var S=f+p.length+b,A=f+p.length;A<S;)p.push({number:A,duration:v/c,time:g,timeline:h}),g+=v,A++}return p},Re=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Oe=function(e,t){return e.replace(Re,function(e){return function(t,n,r,i){if("$$"===t)return"$";if(void 0===e[n])return t;var a=""+e[n];return"RepresentationID"===n?a:(i=r?parseInt(i,10):1,a.length>=i?a:""+new Array(i-a.length+1).join("0")+a)}}(t))},Pe=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,i=void 0===r?{sourceURL:"",range:""}:r,a=de({baseUrl:e.baseUrl,source:Oe(i.sourceURL,n),range:i.range});return function(e,t){return e.duration||t?e.duration?pe(e):Ie(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t).map((function(t){n.Number=t.number,n.Time=t.time;var r=Oe(e.media||"",n),i={uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:O(e.baseUrl||"",r),map:a,number:t.number};return e.presentationTimeOffset&&(i.presentationTimeOffset=e.presentationTimeOffset),i}))},De=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r;if(!n&&!t||n&&t)throw new Error(le);var a,o=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,a=de({baseUrl:n,source:i.sourceURL,range:i.range}),o=de({baseUrl:n,source:t.media,range:t.mediaRange});return o.map=a,o}(e,t)}));return n&&(a=pe(e)),t&&(a=Ie(e,t)),a.map((function(e,t){if(o[t]){var n=o[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}})).filter((function(e){return e}))},Me=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=Pe,t=ne(r,i.template),i.template.presentationTimeOffset&&(t.presentationTimeOffset=i.template.presentationTimeOffset/i.template.timescale)):i.base?(n=ge,t=ne(r,i.base)):i.list&&(n=De,t=ne(r,i.list));var a={attributes:r};if(!n)return a;var o=n(t,i.timeline);if(t.duration){var s=t,u=s.duration,l=s.timescale,c=void 0===l?1:l;t.duration=u/c}else o.length?t.duration=o.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return a.attributes=t,a.segments=o,i.base&&t.indexRange&&(a.sidx=o[0],a.segments=[]),a},Ne=function(e,t){return ie(e.childNodes).filter((function(e){return e.tagName===t}))},Le=function(e){return e.textContent.trim()},ke=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(o||0)+60*parseFloat(s||0)+parseFloat(u||0)},xe={mediaPresentationDuration:function(e){return ke(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return ke(e)},suggestedPresentationDelay:function(e){return ke(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return ke(e)},start:function(e){return ke(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?ke(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},Fe=function(e){return e&&e.attributes?ie(e.attributes).reduce((function(e,t){var n=xe[t.name]||xe.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},Ue={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},Be=function(e,t){return t.length?re(e.map((function(e){return t.map((function(t){return O(e,Le(t))}))}))):e},je=function(e){var t=Ne(e,"SegmentTemplate")[0],n=Ne(e,"SegmentList")[0],r=n&&Ne(n,"SegmentURL").map((function(e){return ne({tag:"SegmentURL"},Fe(e))})),i=Ne(e,"SegmentBase")[0],a=n||t,o=a&&Ne(a,"SegmentTimeline")[0],s=n||i||t,u=s&&Ne(s,"Initialization")[0],l=t&&Fe(t);l&&u?l.initialization=u&&Fe(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:o&&Ne(o,"S").map((function(e){return Fe(e)})),list:n&&ne(Fe(n),{segmentUrls:r,initialization:Fe(u)}),base:i&&ne(Fe(i),{initialization:Fe(u)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},He=function(e,t,n){return function(r){var i,a=Fe(r),o=Be(t,Ne(r,"BaseURL")),s=Ne(r,"Role")[0],u={role:Fe(s)},l=ne(e,a,u),c=Ne(r,"Accessibility")[0],d="urn:scte:dash:cc:cea-608:2015"===(i=Fe(c)).schemeIdUri?i.value.split(";").map((function(e){var t,n;if(n=e,/^CC\d=/.test(e)){var r=e.split("=");t=r[0],n=r[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:n}})):"urn:scte:dash:cc:cea-708:2015"===i.schemeIdUri?i.value.split(";").map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var n=e.split("="),r=n[0],i=n[1],a=void 0===i?"":i;t.channel=r,t.language=e,a.split(",").forEach((function(e){var n=e.split(":"),r=n[0],i=n[1];"lang"===r?t.language=i:"er"===r?t.easyReader=Number(i):"war"===r?t.aspectRatio=Number(i):"3D"===r&&(t["3D"]=Number(i))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;d&&(l=ne(l,{captionServices:d}));var f=Ne(r,"Label")[0];if(f&&f.childNodes.length){var h=f.childNodes[0].nodeValue.trim();l=ne(l,{label:h})}var p=Ne(r,"ContentProtection").reduce((function(e,t){var n=Fe(t),r=Ue[n.schemeIdUri];if(r){e[r]={attributes:n};var i=Ne(t,"cenc:pssh")[0];if(i){var a=Le(i),o=a&&Object(Z.a)(a);e[r].pssh=o}}return e}),{});Object.keys(p).length&&(l=ne(l,{contentProtection:p}));var g=je(r),m=Ne(r,"Representation"),y=ne(n,g);return re(m.map(function(e,t,n){return function(r){var i=Ne(r,"BaseURL"),a=Be(t,i),o=ne(e,Fe(r)),s=je(r);return a.map((function(e){return{segmentInfo:ne(n,s),attributes:ne(o,{baseUrl:e})}}))}}(l,o,y)))}},Ge=function(e,t){return function(n,r){var i=Be(t,Ne(n,"BaseURL")),o=Fe(n),s=parseInt(o.id,10),u=a.a.isNaN(s)?r:s,l=ne(e,{periodIndex:u}),c=Ne(n,"AdaptationSet"),d=je(n);return re(c.map(He(l,i,d)))}},qe=function(e){if(""===e)throw new Error(oe);var t,n,r=new ee.DOMParser;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(se);return n},Ve=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,a=n.NOW,o=void 0===a?Date.now():a,s=n.clientOffset,u=void 0===s?0:s,l=Ne(e,"Period");if(!l.length)throw new Error(ae);var c=Ne(e,"Location"),d=Fe(e),f=Be([i],Ne(e,"BaseURL"));return d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=o,d.clientOffset=u,c.length&&(d.locations=c.map(Le)),{locations:d.locations,representationInfo:re(l.map(Ge(d,f)))}}(qe(e),t),r=n.representationInfo.map(Me);return Ce(r,n.locations,t.sidxMapping)},Ye=function(e){return function(e){var t=Ne(e,"UTCTiming")[0];if(!t)return null;var n=Fe(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ce)}return n}(qe(e))},Ke=n(154),We=n.n(Ke),ze=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||(t=e,ArrayBuffer.isView(t))||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0));var t},Xe=a.a.BigInt||Number,Qe=[Xe("0x1"),Xe("0x100"),Xe("0x10000"),Xe("0x1000000"),Xe("0x100000000"),Xe("0x10000000000"),Xe("0x1000000000000"),Xe("0x100000000000000"),Xe("0x10000000000000000")],$e=(function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}(),function(e,t){var n=void 0===t?{}:t,r=n.signed,i=void 0!==r&&r,a=n.le,o=void 0!==a&&a;e=ze(e);var s=o?"reduce":"reduceRight",u=(e[s]?e[s]:Array.prototype[s]).call(e,(function(t,n,r){var i=o?r:Math.abs(r+1-e.length);return t+Xe(n)*Qe[i]}),Xe(0));if(i){var l=Qe[e.length]/Xe(2)-Xe(1);(u=Xe(u))>l&&(u-=l,u-=l,u-=Xe(2))}return Number(u)}),Je=function(e,t){var n=(void 0===t?{}:t).le,r=void 0!==n&&n;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=Xe(e);for(var i,a=(i=e,Math.ceil(function(e){return e.toString(2).length}(i)/8)),o=new Uint8Array(new ArrayBuffer(a)),s=0;s<a;s++){var u=r?s:Math.abs(s+1-o.length);o[u]=Number(e/Qe[s]&Xe(255)),e<0&&(o[u]=Math.abs(~o[u]),o[u]-=0===s?1:2)}return o},Ze=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,ze(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},et=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n},tt=function(e,t,n){var r=void 0===n?{}:n,i=r.offset,a=void 0===i?0:i,o=r.mask,s=void 0===o?[]:o;e=ze(e);var u=(t=ze(t)).every?t.every:Array.prototype.every;return t.length&&e.length-a>=t.length&&u.call(t,(function(t,n){return t===(s[n]?s[n]&e[a+n]:e[a+n])}))},nt=ze([73,68,51]),rt=function e(t,n){return void 0===n&&(n=0),(t=ze(t)).length-n<10||!tt(t,nt,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=ze(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?r+20:r+10}(t,n),e(t,n))},it=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?et(e):e}),at=function(e){e=ze(e);for(var t=[],n=0;e.length>n;){var i=e[n],a=0,o=0,s=e[++o];for(o++;128&s;)a=(127&s)<<7,s=e[o],o++;a+=127&s;for(var u=0;u<r.length;u++){var l=r[u],c=l.id,d=l.parser;if(i===c){t.push(d(e.subarray(o,o+a)));break}}n+=a+o}return t};r=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var n=e[t.size];t.url=Ze(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=at(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:at(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var ot=function e(t,n,r){void 0===r&&(r=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return it(e)})):[it(e)]}(n),t=ze(t);var i=[];if(!n.length)return i;for(var a=0;a<t.length;){var o=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0,s=t.subarray(a+4,a+8);if(0===o)break;var u=a+o;if(u>t.length){if(r)break;u=t.length}var l=t.subarray(a+8,u);tt(s,n[0])&&(1===n.length?i.push(l):i.push.apply(i,e(l,n.slice(1),r))),a=u}return i},st={EBML:ze([26,69,223,163]),DocType:ze([66,130]),Segment:ze([24,83,128,103]),SegmentInfo:ze([21,73,169,102]),Tracks:ze([22,84,174,107]),Track:ze([174]),TrackNumber:ze([215]),DefaultDuration:ze([35,227,131]),TrackEntry:ze([174]),TrackType:ze([131]),FlagDefault:ze([136]),CodecID:ze([134]),CodecPrivate:ze([99,162]),VideoTrack:ze([224]),AudioTrack:ze([225]),Cluster:ze([31,67,182,117]),Timestamp:ze([231]),TimestampScale:ze([42,215,177]),BlockGroup:ze([160]),BlockDuration:ze([155]),Block:ze([161]),SimpleBlock:ze([163])},ut=[128,64,32,16,8,4,2,1],lt=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var i=function(e){for(var t=1,n=0;n<ut.length&&!(e&ut[n]);n++)t++;return t}(e[t]),a=e.subarray(t,t+i);return n&&((a=Array.prototype.slice.call(e,t,t+i))[0]^=ut[i-1]),{length:i,value:$e(a,{signed:r}),bytes:a}},ct=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?Je(t):t},dt=function e(t,n,r){if(r>=n.length)return n.length;var i=lt(n,r,!1);if(tt(t.bytes,i.bytes))return r;var a=lt(n,r+i.length);return e(t,n,r+a.length+a.value+i.length)},ft=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return ct(e)})):[ct(e)]}(n),t=ze(t);var r=[];if(!n.length)return r;for(var i=0;i<t.length;){var a=lt(t,i,!1),o=lt(t,i+a.length),s=i+a.length+o.length;127===o.value&&(o.value=dt(a,t,s),o.value!==t.length&&(o.value-=s));var u=s+o.value>t.length?t.length:s+o.value,l=t.subarray(s,u);tt(n[0],a.bytes)&&(1===n.length?r.push(l):r=r.concat(e(l,n.slice(1)))),i+=a.length+o.length+l.length}return r},ht=ze([0,0,0,1]),pt=ze([0,0,1]),gt=ze([0,0,3]),mt=function(e){for(var t=[],n=1;n<e.length-2;)tt(e.subarray(n,n+3),gt)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var r=e.length-t.length,i=new Uint8Array(r),a=0;for(n=0;n<r;a++,n++)a===t[0]&&(a++,t.shift()),i[n]=e[a];return i},yt=function(e,t,n,r){void 0===r&&(r=1/0),e=ze(e),n=[].concat(n);for(var i,a=0,o=0;a<e.length&&(o<r||i);){var s=void 0;if(tt(e.subarray(a),ht)?s=4:tt(e.subarray(a),pt)&&(s=3),s){if(o++,i)return mt(e.subarray(i,a));var u=void 0;"h264"===t?u=31&e[a+s]:"h265"===t&&(u=e[a+s]>>1&63),-1!==n.indexOf(u)&&(i=a+s),a+=s+("h264"===t?1:2)}else a++}return e.subarray(0,0)},vt={webm:ze([119,101,98,109]),matroska:ze([109,97,116,114,111,115,107,97]),flac:ze([102,76,97,67]),ogg:ze([79,103,103,83]),ac3:ze([11,119]),riff:ze([82,73,70,70]),avi:ze([65,86,73]),wav:ze([87,65,86,69]),"3gp":ze([102,116,121,112,51,103]),mp4:ze([102,116,121,112]),fmp4:ze([115,116,121,112]),mov:ze([102,116,121,112,113,116])},_t={aac:function(e){var t=rt(e);return tt(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=rt(e);return tt(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=ft(e,[st.EBML,st.DocType])[0];return tt(t,vt.webm)},mkv:function(e){var t=ft(e,[st.EBML,st.DocType])[0];return tt(t,vt.matroska)},mp4:function(e){return!_t["3gp"](e)&&!_t.mov(e)&&(tt(e,vt.mp4,{offset:4})||tt(e,vt.fmp4,{offset:4}))},mov:function(e){return tt(e,vt.mov,{offset:4})},"3gp":function(e){return tt(e,vt["3gp"],{offset:4})},ac3:function(e){var t=rt(e);return tt(e,vt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=rt(e);return tt(e,vt.flac,{offset:t})},ogg:function(e){return tt(e,vt.ogg)},avi:function(e){return tt(e,vt.riff)&&tt(e,vt.avi,{offset:8})},wav:function(e){return tt(e,vt.riff)&&tt(e,vt.wav,{offset:8})},h264:function(e){return function(e,t,n){return yt(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return yt(e,"h265",t,n)}(e,[32,33],3).length}},Tt=Object.keys(_t).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);Tt.forEach((function(e){var t=_t[e];_t[e]=function(e){return t(ze(e))}}));for(var bt,Et=_t,St=function(e){e=ze(e);for(var t=0;t<Tt.length;t++){var n=Tt[t];if(Et[n](e))return n}return""},At=n(47),Ct="7.13.3",wt={prefixed:!0},It=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Rt=It[0],Ot=0;Ot<It.length;Ot++)if(It[Ot][1]in s.a){bt=It[Ot];break}if(bt){for(var Pt=0;Pt<bt.length;Pt++)wt[Rt[Pt]]=bt[Pt];wt.prefixed=bt[0]!==Rt[0]}var Dt=[];var Mt=function e(t){var n,r="info",i=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",r,t)};return n=function(e,t){return function(n,r,i){var o=t.levels[r],s=new RegExp("^("+o+")$");if("log"!==n&&i.unshift(n.toUpperCase()+":"),i.unshift(e+":"),Dt){Dt.push([].concat(i));var u=Dt.length-1e3;Dt.splice(0,u>0?u:0)}if(a.a.console){var l=a.a.console[n];l||"debug"!==n||(l=a.a.console.info||a.a.console.log),l&&o&&s.test(n)&&l[Array.isArray(i)?"apply":"call"](a.a.console,i)}}}(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(i.history=function(){return Dt?[].concat(Dt):[]}).filter=function(e){return(Dt||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){Dt&&(Dt.length=0)},i.history.disable=function(){null!==Dt&&(Dt.length=0,Dt=null)},i.history.enable=function(){null===Dt&&(Dt=[])},i.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",r,t)},i.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",r,t)},i.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",r,t)},i}("VIDEOJS"),Nt=Mt.createLogger,Lt=Object.prototype.toString,kt=function(e){return Ut(e)?Object.keys(e):[]};function xt(e,t){kt(e).forEach((function(n){return t(e[n],n)}))}function Ft(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?l.a.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&xt(t,(function(t,n){e[n]=t}))})),e)}function Ut(e){return!!e&&"object"==typeof e}function Bt(e){return Ut(e)&&"[object Object]"===Lt.call(e)&&e.constructor===Object}function jt(e,t){if(!e||!t)return"";if("function"==typeof a.a.getComputedStyle){var n;try{n=a.a.getComputedStyle(e)}catch(e){return""}return n?n.getPropertyValue(t)||n[t]:""}return""}var Ht,Gt,qt,Vt=a.a.navigator&&a.a.navigator.userAgent||"",Yt=/AppleWebKit\/([\d.]+)/i.exec(Vt),Kt=Yt?parseFloat(Yt.pop()):null,Wt=/iPod/i.test(Vt),zt=(Ht=Vt.match(/OS (\d+)_/i))&&Ht[1]?Ht[1]:null,Xt=/Android/i.test(Vt),Qt=function(){var e=Vt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),$t=Xt&&Qt<5&&Kt<537,Jt=/Firefox/i.test(Vt),Zt=/Edg/i.test(Vt),en=!Zt&&(/Chrome/i.test(Vt)||/CriOS/i.test(Vt)),tn=function(){var e=Vt.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),nn=(Gt=/MSIE\s(\d+)\.\d/.exec(Vt),!(qt=Gt&&parseFloat(Gt[1]))&&/Trident\/7.0/i.test(Vt)&&/rv:11.0/.test(Vt)&&(qt=11),qt),rn=/Safari/i.test(Vt)&&!en&&!Xt&&!Zt,an=/Windows/i.test(Vt),on=Boolean(pn()&&("ontouchstart"in a.a||a.a.navigator.maxTouchPoints||a.a.DocumentTouch&&a.a.document instanceof a.a.DocumentTouch)),sn=/iPad/i.test(Vt)||rn&&on&&!/iPhone/i.test(Vt),un=/iPhone/i.test(Vt)&&!sn,ln=un||sn||Wt,cn=(rn||ln)&&!en,dn=Object.freeze({__proto__:null,IS_IPOD:Wt,IOS_VERSION:zt,IS_ANDROID:Xt,ANDROID_VERSION:Qt,IS_NATIVE_ANDROID:$t,IS_FIREFOX:Jt,IS_EDGE:Zt,IS_CHROME:en,CHROME_VERSION:tn,IE_VERSION:nn,IS_SAFARI:rn,IS_WINDOWS:an,TOUCH_ENABLED:on,IS_IPAD:sn,IS_IPHONE:un,IS_IOS:ln,IS_ANY_SAFARI:cn});function fn(e){return"string"==typeof e&&Boolean(e.trim())}function hn(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function pn(){return s.a===a.a.document}function gn(e){return Ut(e)&&1===e.nodeType}function mn(){try{return a.a.parent!==a.a.self}catch(e){return!0}}function yn(e){return function(t,n){if(!fn(t))return s.a[e](null);fn(n)&&(n=s.a.querySelector(n));var r=gn(n)?n:s.a;return r[e]&&r[e](t)}}function vn(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=s.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Mt.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),i.setAttribute(e,n)):"textContent"===e?_n(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&Un(i,r),i}function _n(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Tn(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function bn(e,t){return hn(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function En(e,t){return e.classList?e.classList.add(t):bn(e,t)||(e.className=(e.className+" "+t).trim()),e}function Sn(e,t){return e.classList?e.classList.remove(t):(hn(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function An(e,t,n){var r=bn(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?En(e,t):Sn(e,t),e}function Cn(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function wn(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var a=r[i].name,o=r[i].value;"boolean"!=typeof e[a]&&-1===n.indexOf(","+a+",")||(o=null!==o),t[a]=o}return t}function In(e,t){return e.getAttribute(t)}function Rn(e,t,n){e.setAttribute(t,n)}function On(e,t){e.removeAttribute(t)}function Pn(){s.a.body.focus(),s.a.onselectstart=function(){return!1}}function Dn(){s.a.onselectstart=function(){return!0}}function Mn(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(jt(e,"height"))),n.width||(n.width=parseFloat(jt(e,"width"))),n}}function Nn(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,r=0,i=0;e.offsetParent&&e!==s.a[wt.fullscreenElement];)r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{left:r,top:i,width:t,height:n}}function Ln(e,t){var n={x:0,y:0};if(ln)for(var r=e;r&&"html"!==r.nodeName.toLowerCase();){var i=jt(r,"transform");if(/^matrix/.test(i)){var a=i.slice(7,-1).split(/,\s/).map(Number);n.x+=a[4],n.y+=a[5]}else if(/^matrix3d/.test(i)){var o=i.slice(9,-1).split(/,\s/).map(Number);n.x+=o[12],n.y+=o[13]}r=r.parentNode}var s={},u=Nn(t.target),l=Nn(e),c=l.width,d=l.height,f=t.offsetY-(l.top-u.top),h=t.offsetX-(l.left-u.left);return t.changedTouches&&(h=t.changedTouches[0].pageX-l.left,f=t.changedTouches[0].pageY+l.top,ln&&(h-=n.x,f-=n.y)),s.y=1-Math.max(0,Math.min(1,f/d)),s.x=Math.max(0,Math.min(1,h/c)),s}function kn(e){return Ut(e)&&3===e.nodeType}function xn(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Fn(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),gn(e)||kn(e)?e:"string"==typeof e&&/\S/.test(e)?s.a.createTextNode(e):void 0})).filter((function(e){return e}))}function Un(e,t){return Fn(t).forEach((function(t){return e.appendChild(t)})),e}function Bn(e,t){return Un(xn(e),t)}function jn(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var Hn,Gn=yn("querySelector"),qn=yn("querySelectorAll"),Vn=Object.freeze({__proto__:null,isReal:pn,isEl:gn,isInFrame:mn,createEl:vn,textContent:_n,prependTo:Tn,hasClass:bn,addClass:En,removeClass:Sn,toggleClass:An,setAttributes:Cn,getAttributes:wn,getAttribute:In,setAttribute:Rn,removeAttribute:On,blockTextSelection:Pn,unblockTextSelection:Dn,getBoundingClientRect:Mn,findPosition:Nn,getPointerPosition:Ln,isTextNode:kn,emptyEl:xn,normalizeContent:Fn,appendContent:Un,insertContent:Bn,isSingleLeftClick:jn,$:Gn,$$:qn}),Yn=!1,Kn=function(){if(!1!==Hn.options.autoSetup){var e=Array.prototype.slice.call(s.a.getElementsByTagName("video")),t=Array.prototype.slice.call(s.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(s.a.getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,a=r.length;i<a;i++){var o=r[i];if(!o||!o.getAttribute){Wn(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&Hn(o)}else Yn||Wn(1)}};function Wn(e,t){pn()&&(t&&(Hn=t),a.a.setTimeout(Kn,e))}function zn(){Yn=!0,a.a.removeEventListener("load",zn)}pn()&&("complete"===s.a.readyState?zn():a.a.addEventListener("load",zn));var Xn,Qn=function(e){var t=s.a.createElement("style");return t.className=e,t},$n=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Jn=3;function Zn(){return Jn++}a.a.WeakMap||(Xn=function(){function e(){this.vdata="vdata"+Math.floor(a.a.performance&&a.a.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||Zn();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];Mt("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var er,tr=a.a.WeakMap?new WeakMap:new Xn;function nr(e,t){if(tr.has(e)){var n=tr.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&tr.delete(e)}}function rr(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function ir(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||a.a.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||s.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=s.a.documentElement,u=s.a.body;e.pageX=e.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var ar=["touchstart","touchmove"];function or(e,t,n){if(Array.isArray(t))return rr(or,e,t,n);tr.has(e)||tr.set(e,{});var r=tr.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=Zn()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=ir(t);var i=r.handlers[t.type];if(i)for(var a=i.slice(0),o=0,s=a.length;o<s&&!t.isImmediatePropagationStopped();o++)try{a[o].call(e,t,n)}catch(e){Mt.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;(function(){if("boolean"!=typeof er){er=!1;try{var e=Object.defineProperty({},"passive",{get:function(){er=!0}});a.a.addEventListener("test",null,e),a.a.removeEventListener("test",null,e)}catch(e){}}return er})()&&ar.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function sr(e,t,n){if(tr.has(e)){var r=tr.get(e);if(r.handlers){if(Array.isArray(t))return rr(sr,e,t,n);var i=function(e,t){r.handlers[t]=[],nr(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(n){if(n.guid)for(var o=0;o<a.length;o++)a[o].guid===n.guid&&a.splice(o--,1);nr(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function ur(e,t,n){var r=tr.has(e)?tr.get(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=ir(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)ur.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){tr.has(t.target)||tr.set(t.target,{});var a=tr.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function lr(e,t,n){if(Array.isArray(t))return rr(lr,e,t,n);var r=function r(){sr(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Zn(),or(e,t,r)}function cr(e,t,n){var r=function r(){sr(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Zn(),or(e,t,r)}var dr,fr=Object.freeze({__proto__:null,fixEvent:ir,on:or,off:sr,trigger:ur,one:lr,any:cr}),hr=30,pr=function(e,t,n){t.guid||(t.guid=Zn());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},gr=function(e,t){var n=a.a.performance.now();return function(){var r=a.a.performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},mr=function(){};mr.prototype.allowedEvents_={},mr.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},or(this,e,t),this.addEventListener=n},mr.prototype.addEventListener=mr.prototype.on,mr.prototype.off=function(e,t){sr(this,e,t)},mr.prototype.removeEventListener=mr.prototype.off,mr.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},lr(this,e,t),this.addEventListener=n},mr.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},cr(this,e,t),this.addEventListener=n},mr.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=ir(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ur(this,e)},mr.prototype.dispatchEvent=mr.prototype.trigger,mr.prototype.queueTrigger=function(e){var t=this;dr||(dr=new Map);var n=e.type||e,r=dr.get(this);r||(r=new Map,dr.set(this,r));var i=r.get(n);r.delete(n),a.a.clearTimeout(i);var o=a.a.setTimeout((function(){0===r.size&&(r=null,dr.delete(t)),t.trigger(e)}),0);r.set(n,o)};var yr=function(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},vr=function(e){return e instanceof mr||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},_r=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Tr=function(e,t,n){if(!e||!e.nodeName&&!vr(e))throw new Error("Invalid target for "+yr(t)+"#"+n+"; must be a DOM node or evented object.")},br=function(e,t,n){if(!_r(e))throw new Error("Invalid event type for "+yr(t)+"#"+n+"; must be a non-empty string or array.")},Er=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+yr(t)+"#"+n+"; must be a function.")},Sr=function(e,t,n){var r,i,a,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return o?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],a=t[1]):(r=t[0],i=t[1],a=t[2]),Tr(r,e,n),br(i,e,n),Er(a,e,n),{isTargetingSelf:o,target:r,type:i,listener:a=pr(e,a)}},Ar=function(e,t,n,r){Tr(e,e,t),e.nodeName?fr[t](e,n,r):e[t](n,r)},Cr={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Sr(this,n,"on"),a=i.isTargetingSelf,o=i.target,s=i.type,u=i.listener;if(Ar(o,"on",s,u),!a){var l=function(){return e.off(o,s,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,Ar(this,"on","dispose",l),Ar(o,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Sr(this,n,"one"),a=i.isTargetingSelf,o=i.target,s=i.type,u=i.listener;if(a)Ar(o,"one",s,u);else{var l=function t(){e.off(o,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,Ar(o,"one",s,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Sr(this,n,"any"),a=i.isTargetingSelf,o=i.target,s=i.type,u=i.listener;if(a)Ar(o,"any",s,u);else{var l=function t(){e.off(o,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,Ar(o,"any",s,l)}},off:function(e,t,n){if(!e||_r(e))sr(this.eventBusEl_,e,t);else{var r=e,i=t;Tr(r,this,"off"),br(i,this,"off"),Er(n,this,"off"),n=pr(this,n),this.off("dispose",n),r.nodeName?(sr(r,i,n),sr(r,"dispose",n)):vr(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){Tr(this.eventBusEl_,this,"trigger");var n=e&&"string"!=typeof e?e.type:e;if(!_r(n)){var r="Invalid event type for "+yr(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(r);(this.log||Mt).error(r)}return ur(this.eventBusEl_,e,t)}};function wr(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=vn("span",{className:"vjs-event-bus"});return Ft(e,Cr),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),a.a.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var Ir={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),xt(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&vr(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Rr(e,t){return Ft(e,Ir),e.state=Ft({},e.state,t),"function"==typeof e.handleStateChanged&&vr(e)&&e.on("statechanged",e.handleStateChanged),e}var Or=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},Pr=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function Dr(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&xt(t,(function(t,n){Bt(t)?(Bt(e[n])||(e[n]={}),e[n]=Dr(e[n],t)):e[n]=t}))})),e}var Mr=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},e}(),Nr=a.a.Map?a.a.Map:Mr,Lr=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var n in this.set_)e.call(t,n,n,this)},e}(),kr=a.a.Set?a.a.Set:Lr,xr=function(){function e(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Dr({},this.options_),t=this.options_=Dr(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+Zn()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(wr(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Rr(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new kr,this.setIntervalIds_=new kr,this.rafIds_=new kr,this.namedRafs_=new Nr,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),tr.has(this.el_)&&tr.delete(this.el_),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=Dr(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return vn(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),a=i&&i[r],o=r&&r.split("-")[0],s=i&&i[o],u=n;return a&&a[e]?u=a[e]:s&&s[e]&&(u=s[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),u},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var i,a;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof t){a=Pr(t);var o=n.componentClass||a;n.name=a;var s=e.getComponent(o);if(!s)throw new Error("Component "+o+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=t;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(a=a||i.name&&Pr(i.name()))&&(this.childNameIndex_[a]=i,this.childNameIndex_[Or(a)]=i),"function"==typeof i.el&&i.el()){var u=null;this.children_[r+1]&&(this.children_[r+1].el_?u=this.children_[r+1].el_:gn(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Pr(e.name())]=null,this.childNameIndex_[Or(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,a=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r,i;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||Pr(t.name));return n&&!a.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var a=t.addChild(n,r);a&&(t[n]=a)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return Gn(e,t||this.contentEl())},t.$$=function(e,t){return qn(e,t||this.contentEl())},t.hasClass=function(e){return bn(this.el_,e)},t.addClass=function(e){En(this.el_,e)},t.removeClass=function(e){Sn(this.el_,e)},t.toggleClass=function(e,t){An(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return In(this.el_,e)},t.setAttribute=function(e,t){Rn(this.el_,e,t)},t.removeAttribute=function(e){On(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+Pr(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=jt(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+Pr(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=a.a.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,i=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===e)&&(a.a.performance.now()-t<200&&(r.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=pr(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,r=this;return e=pr(this,e),this.clearTimersOnDispose_(),n=a.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),a.a.clearTimeout(e)),e},t.setInterval=function(e,t){e=pr(this,e),this.clearTimersOnDispose_();var n=a.a.setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),a.a.clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=pr(this,e),t=a.a.requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=pr(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),a.a.cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r,i=e.getComponent("Tech"),a=i&&i.isTech(n),o=e===n||e.prototype.isPrototypeOf(n.prototype);if(a||!o)throw r=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+r+".");t=Pr(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var u=s.players,l=Object.keys(u);if(u&&l.length>0&&l.map((function(e){return u[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[Or(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Fr(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function Ur(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Fr.bind(null,"start",0,e),end:Fr.bind(null,"end",1,e)}}function Br(e,t){return Array.isArray(e)?Ur(e):void 0===e||void 0===t?Ur():Ur([[e,t]])}function jr(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=Br(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(r=e.end(a))>t&&(r=t),i+=r-n;return i/t}function Hr(e){if(e instanceof Hr)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:Ut(e)&&("number"==typeof e.code&&(this.code=e.code),Ft(this,e)),this.message||(this.message=Hr.defaultMessages[this.code]||"")}xr.prototype.supportsRaf_="function"==typeof a.a.requestAnimationFrame&&"function"==typeof a.a.cancelAnimationFrame,xr.registerComponent("Component",xr),Hr.prototype.code=0,Hr.prototype.message="",Hr.prototype.status=null,Hr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Hr.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Gr=0;Gr<Hr.errorTypes.length;Gr++)Hr[Hr.errorTypes[Gr]]=Gr,Hr.prototype[Hr.errorTypes[Gr]]=Gr;function qr(e){return null!=e&&"function"==typeof e.then}function Vr(e){qr(e)&&e.then(null,(function(e){}))}var Yr=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},Kr=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=Yr(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(Yr))},Wr=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},zr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleKeyDown_=function(e){return r.handleKeyDown(e)},r.close_=function(e){return r.close(e)},r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=vn("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=vn("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),_n(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}h()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),Bn(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),xn(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=s.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),y.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(y.a.isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}s.a.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof a.a.HTMLAnchorElement||e instanceof a.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof a.a.HTMLInputElement||e instanceof a.a.HTMLSelectElement||e instanceof a.a.HTMLTextAreaElement||e instanceof a.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof a.a.HTMLIFrameElement||e instanceof a.a.HTMLObjectElement||e instanceof a.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(xr);zr.prototype.options_={pauseOnOpen:!0,temporary:!0},xr.registerComponent("ModalDialog",zr);var Xr=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(d()(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}h()(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},vr(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(mr);for(var Qr in Xr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},Xr.prototype.allowedEvents_)Xr.prototype["on"+Qr]=null;var $r=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},Jr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){$r(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}h()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&$r(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,$r(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(Xr),Zr=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},ei=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){Zr(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(d()(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}h()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&Zr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,Zr(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(Xr),ti=function(e){function t(){return e.apply(this,arguments)||this}h()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(Xr),ni=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),ri=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),ii={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ai={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},oi={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},si={disabled:"disabled",hidden:"hidden",showing:"showing"},ui=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+Zn(),kind:t.kind||"",language:t.language||""},i=t.label||"",a=function(e){Object.defineProperty(d()(n),e,{get:function(){return r[e]},set:function(){}})};for(var o in r)a(o);return Object.defineProperty(d()(n),"label",{get:function(){return i},set:function(e){e!==i&&(i=e,this.trigger("labelchange"))}}),n}return h()(t,e),t}(mr),li=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=s.a.createElement("a");n.href=e;var r,i=""===n.host&&"file:"!==n.protocol;i&&((r=s.a.createElement("div")).innerHTML='<a href="'+e+'"></a>',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),s.a.body.appendChild(r));for(var o={},u=0;u<t.length;u++)o[t[u]]=n[t[u]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=a.a.location.protocol),i&&s.a.body.removeChild(r),o},ci=function(e){if(!e.match(/^https?:\/\//)){var t=s.a.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},di=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},fi=function(e,t){void 0===t&&(t=a.a.location);var n=li(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},hi=Object.freeze({__proto__:null,parseUrl:li,getAbsoluteURL:ci,getFileExtension:di,isCrossOrigin:fi}),pi=function(e,t){var n=new a.a.WebVTT.Parser(a.a,a.a.vttjs,a.a.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(a.a.console&&a.a.console.groupCollapsed&&a.a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return Mt.error(e)})),a.a.console&&a.a.console.groupEnd&&a.a.console.groupEnd()),n.flush()},gi=function(e,t){var n={uri:e},r=fi(e);r&&(n.cors=r);var i="use-credentials"===t.tech_.crossOrigin();i&&(n.withCredentials=i),_()(n,pr(this,(function(e,n,r){if(e)return Mt.error(e,n);t.loaded_=!0,"function"!=typeof a.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return pi(r,t);Mt.error("vttjs failed to load, stopping trying to process "+t.src)})):pi(r,t)})))},mi=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=Dr(t,{kind:oi[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=si[r.mode]||"disabled",a=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var o=new ri(n.cues_),s=new ri(n.activeCues_),u=!1,l=pr(d()(n),(function(){this.tech_.isReady_&&!this.tech_.isDisposed()&&(this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1))}));return n.tech_.one("dispose",(function(){n.tech_.off("timeupdate",l)})),"disabled"!==i&&n.tech_.on("timeupdate",l),Object.defineProperties(d()(n),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return i},set:function(e){si[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||gi(this.src,this),this.tech_.off("timeupdate",l),"disabled"!==i&&this.tech_.on("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?o:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=e&&i.endTime>=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(u=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==r.kind&&"captions"!==r.kind)&&gi(n.src,d()(n))):n.loaded_=!0,n}h()(t,e);var n=t.prototype;return n.addCue=function(e){var t=e;if(a.a.vttjs&&!(e instanceof a.a.vttjs.VTTCue)){for(var n in t=new a.a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(ui);mi.prototype.allowedEvents_={cuechange:"cuechange"};var yi=function(e){function t(t){var n;void 0===t&&(t={});var r=Dr(t,{kind:ai[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(d()(n),"enabled",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return h()(t,e),t}(ui),vi=function(e){function t(t){var n;void 0===t&&(t={});var r=Dr(t,{kind:ii[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(d()(n),"selected",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return h()(t,e),t}(ui),_i=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new mi(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(d()(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:d()(n)})})),n}return h()(t,e),t}(mr);_i.prototype.allowedEvents_={load:"load"},_i.NONE=0,_i.LOADING=1,_i.LOADED=2,_i.ERROR=3;var Ti={audio:{ListClass:Jr,TrackClass:yi,capitalName:"Audio"},video:{ListClass:ei,TrackClass:vi,capitalName:"Video"},text:{ListClass:ti,TrackClass:mi,capitalName:"Text"}};Object.keys(Ti).forEach((function(e){Ti[e].getterName=e+"Tracks",Ti[e].privateName=e+"Tracks_"}));var bi={remoteText:{ListClass:ti,TrackClass:mi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:ni,TrackClass:_i,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ei=l()({},Ti,bi);bi.names=Object.keys(bi),Ti.names=Object.keys(Ti),Ei.names=[].concat(bi.names).concat(Ti.names);var Si=function(e){function t(t,n){var r;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(r=e.call(this,null,t,n)||this).onDurationChange_=function(e){return r.onDurationChange(e)},r.trackProgress_=function(e){return r.trackProgress(e)},r.trackCurrentTime_=function(e){return r.trackCurrentTime(e)},r.stopTrackingCurrentTime_=function(e){return r.stopTrackingCurrentTime(e)},r.disposeSourceHandler_=function(e){return r.disposeSourceHandler(e)},r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Ei.names.forEach((function(e){var n=Ei[e];t&&t[n.getterName]&&(r[n.privateName]=t[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==t.preloadTextTracks,r.autoRemoteTextTracks_=new Ei.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}h()(t,e);var n=t.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(pr(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return Br(0,0)},n.bufferedPercent=function(){return jr(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(Ti.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new Hr(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?Br(0,0):Br()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Ti.names.forEach((function(t){var n=Ti[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var e=this;if(!a.a.WebVTT)if(s.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&Bt(b.a)&&Object.keys(b.a).length>0)return void this.trigger("vttjsloaded");var t=s.a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),a.a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},o=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};o(),t.addEventListener("change",o),t.addEventListener("addtrack",o),t.addEventListener("removetrack",o),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",o),t.removeEventListener("addtrack",o),t.removeEventListener("removetrack",o);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",a)}}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var a=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var o=new Ei.text.TrackClass(i);return a.addTrack(o),o}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=Dr(e,{tech:this});return new bi.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(Mt.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||a.a.Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Pr(e),t.techs_[e]=n,t.techs_[Or(e)]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=Pr(e),a.a&&a.a.videojs&&a.a.videojs[e]?(Mt.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),a.a.videojs[e]):void 0)},t}(xr);Ei.names.forEach((function(e){var t=Ei[e];Si.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Si.prototype.featuresVolumeControl=!0,Si.prototype.featuresMuteControl=!0,Si.prototype.featuresFullscreenResize=!1,Si.prototype.featuresPlaybackRate=!1,Si.prototype.featuresProgressEvents=!1,Si.prototype.featuresSourceset=!1,Si.prototype.featuresTimeupdateEvents=!1,Si.prototype.featuresNativeTextTracks=!1,Si.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:Mt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},xr.registerComponent("Tech",Si),Si.registerTech("Tech",Si),Si.defaultTechOrder_=[];var Ai={},Ci={},wi={};function Ii(e,t,n){e.setTimeout((function(){return Ni(t,Ai[t.type],n,e)}),1)}function Ri(e,t,n,r){void 0===r&&(r=null);var i="call"+Pr(n),a=e.reduce(Mi(i),r),o=a===wi,s=o?null:t[n](a);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var a=e[i];a[t]&&a[t](r,n)}}(e,n,s,o),s}var Oi={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},Pi={setCurrentTime:1,setMuted:1,setVolume:1},Di={play:1,pause:1};function Mi(e){return function(t,n){return t===wi?wi:n[e]?n[e](t):t}}function Ni(e,t,n,r,i,a){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===i&&(i=[]),void 0===a&&(a=!1);var o=t,s=o[0],u=o.slice(1);if("string"==typeof s)Ni(e,Ai[s],n,r,i,a);else if(s){var l=function(e,t){var n=Ci[e.id()],r=null;if(null==n)return r=t(e),Ci[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var a=n[i],o=a[0],s=a[1];o===t&&(r=s)}return null===r&&(r=t(e),n.push([t,r])),r}(r,s);if(!l.setSource)return i.push(l),Ni(e,u,n,r,i,a);l.setSource(Ft({},e),(function(t,o){if(t)return Ni(e,u,n,r,i,a);i.push(l),Ni(o,e.type===o.type?u:Ai[o.type],n,r,i,a)}))}else u.length?Ni(e,u,n,r,i,a):a?n(e,i):Ni(e,Ai["*"],n,r,i,!0)}var Li={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},ki=function(e){void 0===e&&(e="");var t=di(e);return Li[t.toLowerCase()]||""},xi=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):Ut(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[Fi({src:t})]:Ut(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Fi(t)]:[];return t};function Fi(e){if(!e.type){var t=ki(e.src);t&&(e.type=t)}return e}var Ui=function(e){function t(t,n,r){var i,a=Dr({createEl:!1},n);if(i=e.call(this,t,a,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var o=0,s=n.playerOptions.techOrder;o<s.length;o++){var u=Pr(s[o]),l=Si.getTech(u);if(u||(l=xr.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return i}return h()(t,e),t}(xr);xr.registerComponent("MediaLoader",Ui);var Bi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseOver_=function(e){return r.handleMouseOver(e)},r.handleMouseOut_=function(e){return r.handleMouseOut(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.emitTapEvents(),r.enable(),r}h()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n=Ft({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&Mt.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=Ft({role:"button"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=vn("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,_n(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){y.a.isEventKey(t,"Space")||y.a.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(xr);xr.registerComponent("ClickableComponent",Bi);var ji=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),r.update_=function(e){return r.update(e)},t.on("posterchange",r.update_),r}h()(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},n.createEl=function(){return vn("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(nn||Zt)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Vr(this.player_.play()):this.player_.pause()}},t}(Bi);xr.registerComponent("PosterImage",ji);var Hi={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Gi(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function qi(e,t,n){try{e.style[t]=n}catch(e){return}}var Vi=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=function(e){return i.updateDisplay(e)};return t.on("loadstart",(function(e){return i.toggleDisplay(e)})),t.on("texttrackchange",o),t.on("loadedmetadata",(function(e){return i.preselectTrack(e)})),t.ready(pr(d()(i),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",o),t.on("playerresize",o),a.a.addEventListener("orientationchange",o),t.on("dispose",(function(){return a.a.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),i}h()(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,o=0;o<i.length;o++){var s=i[o];a&&a.enabled&&a.language&&a.language===s.language&&s.kind in r?s.kind===a.kind?n=s:n||(n=s):a&&!a.enabled?(n=null,e=null,t=null):s.default&&("descriptions"!==s.kind||e?s.kind in r&&!t&&(t=s):e=s)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof a.a.WebVTT&&a.a.WebVTT.processCues(a.a,[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var a=null,o=null,s=e.length;s--;){var u=e[s];"showing"===u.mode&&("descriptions"===u.kind?a=u:o=u)}o?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(o)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.color&&(o.firstChild.style.color=t.color),t.textOpacity&&qi(o.firstChild,"color",Gi(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(o.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&qi(o.firstChild,"backgroundColor",Gi(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?qi(o,"backgroundColor",Gi(t.windowColor,t.windowOpacity)):o.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){var s=a.a.parseFloat(o.style.fontSize);o.style.fontSize=s*t.fontPercent+"px",o.style.height="auto",o.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Hi[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof a.a.WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],i=0;i<r.activeCues.length;++i)t.push(r.activeCues[i]);a.a.WebVTT.processCues(a.a,t,this.el_);for(var o=0;o<e.length;++o){for(var s=e[o],u=0;u<s.activeCues.length;++u){var l=s.activeCues[u].displayState;En(l,"vjs-text-track-cue"),En(l,"vjs-text-track-cue-"+(s.language?s.language:o))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},t}(xr);xr.registerComponent("TextTrackDisplay",Vi);var Yi=function(e){function t(){return e.apply(this,arguments)||this}return h()(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=vn("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(xr);xr.registerComponent("LoadingSpinner",Yi);var Ki=function(e){function t(){return e.apply(this,arguments)||this}h()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=Ft({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=Ft({type:"button"},n);var r=xr.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return Mt.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),xr.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){y.a.isEventKey(t,"Space")||y.a.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Bi);xr.registerComponent("Button",Ki);var Wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return Vr(t),void(!this.player_.tech(!0)||(nn||Zt)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var a=function(){return i.focus()};qr(t)?t.then(a,(function(){})):this.setTimeout(a,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(Ki);Wi.prototype.controlText_="Play Video",xr.registerComponent("BigPlayButton",Wi);var zi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){y.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Ki);xr.registerComponent("CloseButton",zi);var Xi=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",(function(e){return r.handlePlay(e)})),r.on(t,"pause",(function(e){return r.handlePause(e)})),n.replay&&r.on(t,"ended",(function(e){return r.handleEnded(e)})),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?Vr(this.player_.play()):this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(Ki);Xi.prototype.controlText_="Play",xr.registerComponent("PlayToggle",Xi);var Qi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||o>0?i+":":"")+(r=((i||a>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},$i=Qi;function Ji(e,t){return void 0===t&&(t=e),$i(e,t)}var Zi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return r.updateContent(e)})),r.updateTextNode_(),r}h()(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=vn("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=Ji(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,Mt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=s.a.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(xr);Zi.prototype.labelText_="Time",Zi.prototype.controlText_="Time",xr.registerComponent("TimeDisplay",Zi);var ea=function(e){function t(){return e.apply(this,arguments)||this}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(Zi);ea.prototype.labelText_="Current Time",ea.prototype.controlText_="Current Time",xr.registerComponent("CurrentTimeDisplay",ea);var ta=function(e){function t(t,n){var r,i=function(e){return r.updateContent(e)};return(r=e.call(this,t,n)||this).on(t,"durationchange",i),r.on(t,"loadstart",i),r.on(t,"loadedmetadata",i),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(Zi);ta.prototype.labelText_="Duration",ta.prototype.controlText_="Duration",xr.registerComponent("DurationDisplay",ta);var na=function(e){function t(){return e.apply(this,arguments)||this}return h()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(xr);xr.registerComponent("TimeDivider",na);var ra=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return r.updateContent(e)})),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return t.insertBefore(vn("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(Zi);ra.prototype.labelText_="Remaining Time",ra.prototype.controlText_="Remaining Time",xr.registerComponent("RemainingTimeDisplay",ra);var ia=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",(function(e){return r.updateShowing(e)})),r}h()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=vn("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(xr);xr.registerComponent("LiveDisplay",ia);var aa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(e){return r.updateLiveEdgeStatus(e)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}h()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=vn("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(Ki);aa.prototype.controlText_="Seek to live, currently playing live",xr.registerComponent("SeekToLive",aa);var oa=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},sa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseDown_=function(e){return r.handleMouseDown(e)},r.handleMouseUp_=function(e){return r.handleMouseUp(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleMouseMove_=function(e){return r.handleMouseMove(e)},r.update_=function(e){return r.update(e)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}h()(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=Ft({tabIndex:0},n),r=Ft({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||en||e.preventDefault(),Pn(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;Dn(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(oa(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=Ln(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){y.a.isEventKey(t,"Left")||y.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):y.a.isEventKey(t,"Right")||y.a.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(xr);xr.registerComponent("Slider",sa);var ua=function(e,t){return oa(e/t*100,0,100).toFixed(2)+"%"},la=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",(function(e){return r.update(e)})),r}h()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=vn("span",{className:"vjs-control-text"}),r=vn("span",{textContent:this.localize("Loaded")}),i=s.a.createTextNode(": ");return this.percentageEl_=vn("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),a=t.partEls_,o=ua(i,r);t.percent_!==o&&(t.el_.style.width=o,_n(t.percentageEl_,o),t.percent_=o);for(var s=0;s<n.length;s++){var u=n.start(s),l=n.end(s),c=a[s];c||(c=t.el_.appendChild(vn()),a[s]=c),c.dataset.start===u&&c.dataset.end===l||(c.dataset.start=u,c.dataset.end=l,c.style.left=ua(u,i),c.style.width=ua(l-u,i))}for(var d=a.length;d>n.length;d--)t.el_.removeChild(a[d-1]);a.length=n.length}))},t}(xr);xr.registerComponent("LoadProgressBar",la);var ca=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=gr(pr(d()(r),r.update),hr),r}h()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=Nn(this.el_),i=Mn(this.player_.el()),a=e.width*t;if(i&&r){var o=e.left-i.left+a,s=e.width-a+(i.right-e.right),u=r.width/2;o<u?u+=u-o:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){_n(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var a,o=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-t*s;a=(u<1?"":"-")+Ji(u,s)}else a=Ji(n,o);i.update(e,t,a),r&&r()}))},t}(xr);xr.registerComponent("TimeTooltip",ca);var da=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=gr(pr(d()(r),r.update),hr),r}h()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(xr);da.prototype.options_={children:[]},ln||Xt||da.prototype.options_.children.push("timeTooltip"),xr.registerComponent("PlayProgressBar",da);var fa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=gr(pr(d()(r),r.update),hr),r}h()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(xr);fa.prototype.options_={children:["timeTooltip"]},xr.registerComponent("MouseTimeDisplay",fa);var ha=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}h()(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=pr(this,this.update),this.update=gr(this.update_,hr),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s.a&&"visibilityState"in s.a&&this.on(s.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===s.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,hr))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this;if("hidden"!==s.a.visibilityState){var r=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[Ji(e,i),Ji(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(Mn(n.el()),n.getProgress())})),r}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){jn(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e){if(jn(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var i=r.seekableStart(),a=r.liveCurrentTime();if((t=i+n*r.liveWindow())>=a&&(t=a),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.userSeek_(t)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Vr(this.player_.play()):this.update_()},n.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},n.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){var n=this.player_.liveTracker;if(y.a.isEventKey(t,"Space")||y.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(y.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(y.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(y()(t))){t.preventDefault(),t.stopPropagation();var r=10*(y.a.codes[y()(t)]-y.a.codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else y.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):y.a.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s.a&&"visibilityState"in s.a&&this.off(s.a,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(sa);ha.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},ln||Xt||ha.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),xr.registerComponent("SeekBar",ha);var pa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=gr(pr(d()(r),r.handleMouseMove),hr),r.throttledHandleMouseSeek=gr(pr(d()(r),r.handleMouseSeek),hr),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.handleMouseDownHandler_=function(e){return r.handleMouseDown(e)},r.enable(),r}h()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(n||r){var i=t.el(),a=Nn(i),o=Ln(i,e).x;o=oa(o,0,1),r&&r.update(a,o),n&&n.update(a,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){if(this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Vr(this.player_.play())}},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(xr);pa.prototype.options_={children:["seekBar"]},xr.registerComponent("ProgressControl",pa);var ga=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return r.handlePictureInPictureChange(e)})),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return r.handlePictureInPictureEnabledChange(e)})),r.disable(),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){s.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(Ki);ga.prototype.controlText_="Picture-in-Picture",xr.registerComponent("PictureInPictureToggle",ga);var ma=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return r.handleFullscreenChange(e)})),!1===s.a[t.fsApi_.fullscreenEnabled]&&r.disable(),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Ki);ma.prototype.controlText_="Fullscreen",xr.registerComponent("FullscreenToggle",ma);var ya=function(e){function t(){return e.apply(this,arguments)||this}return h()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(xr);xr.registerComponent("VolumeLevel",ya);var va=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=gr(pr(d()(r),r.update),hr),r}h()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,r){if(!n){var i=Mn(this.el_),a=Mn(this.player_.el()),o=e.width*t;if(!a||!i)return;var s=e.left-a.left+o,u=e.width-o+(a.right-e.right),l=i.width/2;s<l?l+=l-s:u<l&&(l=u),l<0?l=0:l>i.width&&(l=i.width),this.el_.style.right="-"+l+"px"}this.write(r+"%")},n.write=function(e){_n(this.el_,e)},n.updateVolume=function(e,t,n,r,i){var a=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){a.update(e,t,n,r.toFixed(0)),i&&i()}))},t}(xr);xr.registerComponent("VolumeLevelTooltip",va);var _a=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=gr(pr(d()(r),r.update),hr),r}h()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t,n){var r=this,i=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,i,(function(){n?r.el_.style.bottom=e.height*t+"px":r.el_.style.left=e.width*t+"px"}))},t}(xr);_a.prototype.options_={children:["volumeLevelTooltip"]},xr.registerComponent("MouseVolumeLevelDisplay",_a);var Ta=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",(function(e){return r.updateLastVolume_(e)})),r.on(t,"volumechange",(function(e){return r.updateARIAAttributes(e)})),t.ready((function(){return r.updateARIAAttributes()})),r}h()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){jn(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),r=Mn(n),i=this.vertical(),a=Ln(n,e);a=i?a.y:a.x,a=oa(a,0,1),t.update(r,a,i)}jn(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(sa);Ta.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},ln||Xt||Ta.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Ta.prototype.playerEvent="volumechange",xr.registerComponent("VolumeBar",Ta);var ba=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||Bt(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(d()(r),t),r.throttledHandleMouseMove=gr(pr(d()(r),r.handleMouseMove),hr),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r.on("touchstart",(function(e){return r.handleMouseDown(e)})),r.on("mousemove",(function(e){return r.handleMouseMove(e)})),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}h()(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(xr);ba.prototype.options_={children:["volumeBar"]},xr.registerComponent("VolumeControl",ba);var Ea=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(d()(r),t),r.on(t,["loadstart","volumechange"],(function(e){return r.update(e)})),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;ln&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)Sn(this.el_,"vjs-vol-"+n);En(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(Ki);Ea.prototype.controlText_="Mute",xr.registerComponent("MuteToggle",Ea);var Sa=function(e){function t(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||Bt(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return r.handleKeyPress(e)},r.on(t,["loadstart"],(function(e){return r.volumePanelState_(e)})),r.on(r.muteToggle,"keyup",(function(e){return r.handleKeyPress(e)})),r.on(r.volumeControl,"keyup",(function(e){return r.handleVolumeControlKeyUp(e)})),r.on("keydown",(function(e){return r.handleKeyPress(e)})),r.on("mouseover",(function(e){return r.handleMouseOver(e)})),r.on("mouseout",(function(e){return r.handleMouseOut(e)})),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}h()(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){y.a.isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),or(s.a,"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),sr(s.a,"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){y.a.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(xr);Sa.prototype.options_={children:["muteToggle","volumeControl"]},xr.registerComponent("VolumePanel",Sa);var Aa=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",(function(e){return r.handleKeyDown(e)})),r.boundHandleBlur_=function(e){return r.handleBlur(e)},r.boundHandleTapClick_=function(e){return r.handleTapClick(e)},r}h()(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof xr&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof xr&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=vn(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),or(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||s.a.activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){y.a.isEventKey(e,"Left")||y.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(y.a.isEventKey(e,"Right")||y.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(xr);xr.registerComponent("Menu",Aa);var Ca=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new Ki(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=Ki.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0;var a=function(e){return r.handleClick(e)};return r.handleMenuKeyUp_=function(e){return r.handleMenuKeyUp(e)},r.on(r.menuButton_,"tap",a),r.on(r.menuButton_,"click",a),r.on(r.menuButton_,"keydown",(function(e){return r.handleKeyDown(e)})),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),or(s.a,"keyup",r.handleMenuKeyUp_)})),r.on("mouseleave",(function(e){return r.handleMouseLeave(e)})),r.on("keydown",(function(e){return r.handleSubmenuKeyDown(e)})),r}h()(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},n.createMenu=function(){var e=new Aa(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=vn("li",{className:"vjs-menu-title",innerHTML:Pr(this.options_.title),tabIndex:-1}),n=new xr(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Ki.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},n.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},n.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(e){this.removeClass("vjs-hover"),sr(s.a,"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){y.a.isEventKey(e,"Esc")||y.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),y.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(y.a.isEventKey(e,"Up")||y.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(y.a.isEventKey(e,"Esc")||y.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(y.a.isEventKey(e,"Esc")||y.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),y.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),ln&&mn())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(xr);xr.registerComponent("MenuButton",Ca);var wa=function(e){function t(t,n){var r,i=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!i)return d()(r);var a=pr(d()(r),r.update);return i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),i.addEventListener("labelchange",a),r.player_.on("ready",a),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a),i.removeEventListener("labelchange",a)})),r}return h()(t,e),t}(Ca);xr.registerComponent("TrackButton",wa);var Ia=["Tab","Esc","Up","Down","Right","Left"],Ra=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}h()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",Ft({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},n.handleKeyDown=function(t){Ia.some((function(e){return y.a.isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Bi);xr.registerComponent("MenuItem",Ra);var Oa=function(e){function t(t,n){var r,i=n.track,o=t.textTracks();n.label=i.label||i.language||"Unknown",n.selected="showing"===i.mode,(r=e.call(this,t,n)||this).track=i,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var u,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(d()(r),t)},c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply(d()(r),t)};(t.on(["loadstart","texttrackchange"],l),o.addEventListener("change",l),o.addEventListener("selectedlanguagechange",c),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],l),o.removeEventListener("change",l),o.removeEventListener("selectedlanguagechange",c)})),void 0===o.onchange)&&r.on(["tap","click"],(function(){if("object"!=typeof a.a.Event)try{u=new a.a.Event("change")}catch(e){}u||(u=s.a.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(u)}));return r.handleTracksChange(),r}h()(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,r=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var a=r[i];-1!==this.kinds.indexOf(a.kind)&&(a===n?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Ra);xr.registerComponent("TextTrackMenuItem",Oa);var Pa=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}h()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Oa);xr.registerComponent("OffTextTrackMenuItem",Pa);var Da=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return h()(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Oa),this.label_&&(n=this.label_+" off"),e.push(new Pa(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var a=r[i];if(this.kinds_.indexOf(a.kind)>-1){var o=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});o.addClass("vjs-"+a.kind+"-menu-item"),e.push(o)}}return e},t}(wa);xr.registerComponent("TextTrackButton",Da);var Ma=function(e){function t(t,n){var r,i=n.track,a=n.cue,o=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=o&&o<a.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=a,i.addEventListener("cuechange",pr(d()(r),r.update)),r}h()(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(Ra);xr.registerComponent("ChaptersTrackMenuItem",Ma);var Na=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Pr(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],a=new Ma(this.player_,{track:this.track_,cue:i});e.push(a)}return e},t}(Da);Na.prototype.kind_="chapters",Na.prototype.controlText_="Chapters",xr.registerComponent("ChaptersButton",Na);var La=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var a=t.textTracks(),o=pr(d()(i),i.handleTracksChange);return a.addEventListener("change",o),i.on("dispose",(function(){a.removeEventListener("change",o)})),i}h()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var a=t[r];if(a.kind!==this.kind_&&"showing"===a.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Da);La.prototype.kind_="descriptions",La.prototype.controlText_="Descriptions",xr.registerComponent("DescriptionsButton",La);var ka=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Da);ka.prototype.kind_="subtitles",ka.prototype.controlText_="Subtitles",xr.registerComponent("SubtitlesButton",ka);var xa=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return h()(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Oa);xr.registerComponent("CaptionSettingsMenuItem",xa);var Fa=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new xa(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Da);Fa.prototype.kind_="captions",Fa.prototype.controlText_="Captions",xr.registerComponent("CaptionsButton",Fa);var Ua=function(e){function t(){return e.apply(this,arguments)||this}return h()(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Ft({innerHTML:i},n),r)},t}(Oa);xr.registerComponent("SubsCapsMenuItem",Ua);var Ba=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(Pr(r.label_)),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new xa(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Ua)},t}(Da);Ba.prototype.kinds_=["captions","subtitles"],Ba.prototype.controlText_="Subtitles",xr.registerComponent("SubsCapsButton",Ba);var ja=function(e){function t(t,n){var r,i=n.track,a=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(d()(r),t)};return a.addEventListener("change",o),r.on("dispose",(function(){a.removeEventListener("change",o)})),r}h()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Ft({innerHTML:i},n),r)},n.handleClick=function(t){e.prototype.handleClick.call(this,t),this.track.enabled=!0},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Ra);xr.registerComponent("AudioTrackMenuItem",ja);var Ha=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new ja(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(wa);Ha.prototype.controlText_="Audio Track",xr.registerComponent("AudioTrackButton",Ha);var Ga=function(e){function t(t,n){var r,i=n.rate,a=parseFloat(i,10);return n.label=i,n.selected=a===t.playbackRate(),n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=a,r.on(t,"ratechange",(function(e){return r.update(e)})),r}h()(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Ra);Ga.prototype.contentElType="button",xr.registerComponent("PlaybackRateMenuItem",Ga);var qa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).menuButton_.el_.setAttribute("aria-describedby",r.labelElId_),r.updateVisibility(),r.updateLabel(),r.on(t,"loadstart",(function(e){return r.updateVisibility(e)})),r.on(t,"ratechange",(function(e){return r.updateLabel(e)})),r.on(t,"playbackrateschange",(function(e){return r.handlePlaybackRateschange(e)})),r}h()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=vn("div",{className:"vjs-playback-rate-value",id:this.labelElId_,innerHTML:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){for(var e=this.playbackRates(),t=[],n=e.length-1;n>=0;n--)t.push(new Ga(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},n.handlePlaybackRateschange=function(e){this.update()},n.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(Ca);qa.prototype.controlText_="Playback Rate",xr.registerComponent("PlaybackRateMenuButton",qa);var Va=function(e){function t(){return e.apply(this,arguments)||this}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(xr);xr.registerComponent("Spacer",Va);var Ya=function(e){function t(){return e.apply(this,arguments)||this}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Va);xr.registerComponent("CustomControlSpacer",Ya);var Ka=function(e){function t(){return e.apply(this,arguments)||this}return h()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(xr);Ka.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in s.a&&Ka.prototype.options_.children.splice(Ka.prototype.options_.children.length-1,0,"pictureInPictureToggle"),xr.registerComponent("ControlBar",Ka);var Wa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",(function(e){return r.open(e)})),r}h()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(zr);Wa.prototype.options_=l()({},zr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),xr.registerComponent("ErrorDisplay",Wa);var za="vjs-text-track-settings",Xa=["#000","Black"],Qa=["#00F","Blue"],$a=["#0FF","Cyan"],Ja=["#0F0","Green"],Za=["#F0F","Magenta"],eo=["#F00","Red"],to=["#FFF","White"],no=["#FF0","Yellow"],ro=["1","Opaque"],io=["0.5","Semi-Transparent"],ao=["0","Transparent"],oo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Xa,to,eo,Ja,Qa,no,Za,$a]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ro,io,ao]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[to,Xa,eo,Ja,Qa,no,Za,$a]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ro,io]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[ao,io,ro]}};function so(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}oo.windowColor.options=oo.backgroundColor.options;var uo=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=r.updateDisplay.bind(d()(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=vn("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),xt(oo,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}h()(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=oo[e],a=i.id.replace("%s",this.id_),o=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+o+'">'].concat(i.options.map((function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+o+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return vn("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return vn("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return vn("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,a,o=(i=r.$(t.selector),a=t.parser,so(i.options[i.options.selectedIndex].value,a));return void 0!==o&&(e[n]=o),e},void 0===(n={})&&(n=0),kt(e=oo).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;xt(oo,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(so(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},n.setDefaults=function(){var e=this;xt(oo,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(a.a.localStorage.getItem(za))}catch(e){Mt.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?a.a.localStorage.setItem(za,JSON.stringify(e)):a.a.localStorage.removeItem(za)}catch(e){Mt.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(zr);xr.registerComponent("TextTrackSettings",uo);var lo=function(e){function t(t,n){var r,i=n.ResizeObserver||a.a.ResizeObserver;null===n.ResizeObserver&&(i=!1);var o=Dr({createEl:!i,reportTouchActivity:!1},n);return(r=e.call(this,t,o)||this).ResizeObserver=n.ResizeObserver||a.a.ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var i;void 0===r&&(r=a.a);var o=function(){var a=this,o=arguments,s=function(){i=null,s=null,n||e.apply(a,o)};!i&&n&&e.apply(a,o),r.clearTimeout(i),i=r.setTimeout(s,t)};return o.cancel=function(){r.clearTimeout(i),i=null},o}((function(){r.resizeHandler()}),100,!1,d()(r)),i?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(t.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){sr(this,"resize",e),sr(this,"unload",t),t=null};or(r.el_.contentWindow,"unload",t),or(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}h()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(xr);xr.registerComponent("ResizeManager",lo);var co={trackingThreshold:30,liveTolerance:15},fo=function(e){function t(t,n){var r,i=Dr(co,n,{createEl:!1});return(r=e.call(this,t,i)||this).handleVisibilityChange_=function(e){return r.handleVisibilityChange(e)},r.trackLiveHandler_=function(){return r.trackLive_()},r.handlePlay_=function(e){return r.handlePlay(e)},r.handleFirstTimeupdate_=function(e){return r.handleFirstTimeupdate(e)},r.handleSeeked_=function(e){return r.handleSeeked(e)},r.seekToLiveEdge_=function(e){return r.seekToLiveEdge(e)},r.reset_(),r.on(r.player_,"durationchange",(function(e){return r.handleDurationchange(e)})),r.one(r.player_,"canplay",(function(){return r.toggleTracking()})),nn&&"hidden"in s.a&&"visibilityState"in s.a&&r.on(s.a,"visibilitychange",r.handleVisibilityChange_),r}h()(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(s.a.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(a.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),i=this.player_.currentTime(),o=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-i)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,hr),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},n.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(s.a,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(xr);xr.registerComponent("LiveTracker",fo);var ho,po=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var o=n[a].src;o&&-1===r.indexOf(o)&&r.push(o)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},go=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=s.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=s.a.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",a.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),mo=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},yo=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return mo([e.el(),a.a.HTMLMediaElement.prototype,a.a.Element.prototype,go],"innerHTML")}(e),i=function(n){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=n.apply(t,i);return po(e),o}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=i(n[e]))})),Object.defineProperty(t,"innerHTML",Dr(r,{set:i(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},vo=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?ci(a.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return a.a.Element.prototype.setAttribute.call(this,"src",e),e}}),_o=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return mo([e.el(),a.a.HTMLMediaElement.prototype,vo],"src")}(e),r=t.setAttribute,i=t.load;Object.defineProperty(t,"src",Dr(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var a=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=i.call(t);return po(e)||(e.triggerSourceset(""),yo(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):po(e)||yo(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=i,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},To=function(e,t,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},a={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(a.set=i),Object.defineProperty(e,t,a)},bo=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,a=!1;if(i&&(r.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var o=r.el_.childNodes,s=o.length,u=[];s--;){var l=o[s];"track"===l.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(l),r.remoteTextTracks().addTrack(l.track),r.textTracks().addTrack(l.track),a||r.el_.hasAttribute("crossorigin")||!fi(l.src)||(a=!0)):u.push(l))}for(var c=0;c<u.length;c++)r.el_.removeChild(u[c])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&a&&Mt.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(on||un||$t)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}h()(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){_o(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=Ti[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var a={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[bi.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},o=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,a=0;a<r.length;a++)if(r[a]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=a,Object.keys(a).forEach((function(e){var n=a[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",o),this.on("dispose",(function(e){return t.off("loadstart",o)}))}},n.proxyNativeTracks_=function(){var e=this;Ti.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=s.a.createElement("video");var r=Dr({},this.options_.tag&&wn(this.options_.tag));on&&!0===this.options_.nativeControlsForTouch||delete r.controls,Cn(e,Ft(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&Rn(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],a=0;a<i.length;a++){var o=i[a],u=this.options_[o];void 0!==u&&(u?Rn(e,o,o):On(e,o),e[o]=u)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&cn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){Mt(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&Xt&&en&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=a.a.navigator&&a.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Vr(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=s.a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),a.a.performance&&"function"==typeof a.a.performance.now?e.creationTime=a.a.performance.now():a.a.performance&&a.a.performance.timing&&"number"==typeof a.a.performance.timing.navigationStart&&(e.creationTime=a.a.Date.now()-a.a.performance.timing.navigationStart),e},t}(Si);To(bo,"TEST_VID",(function(){if(pn()){var e=s.a.createElement("video"),t=s.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),bo.isSupported=function(){try{bo.TEST_VID.volume=.5}catch(e){return!1}return!(!bo.TEST_VID||!bo.TEST_VID.canPlayType)},bo.canPlayType=function(e){return bo.TEST_VID.canPlayType(e)},bo.canPlaySource=function(e,t){return bo.canPlayType(e.type)},bo.canControlVolume=function(){try{var e=bo.TEST_VID.volume;return bo.TEST_VID.volume=e/2+.1,e!==bo.TEST_VID.volume}catch(e){return!1}},bo.canMuteVolume=function(){try{var e=bo.TEST_VID.muted;return bo.TEST_VID.muted=!e,bo.TEST_VID.muted?Rn(bo.TEST_VID,"muted","muted"):On(bo.TEST_VID,"muted"),e!==bo.TEST_VID.muted}catch(e){return!1}},bo.canControlPlaybackRate=function(){if(Xt&&en&&tn<58)return!1;try{var e=bo.TEST_VID.playbackRate;return bo.TEST_VID.playbackRate=e/2+.1,e!==bo.TEST_VID.playbackRate}catch(e){return!1}},bo.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(s.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(s.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(s.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},bo.supportsNativeTextTracks=function(){return cn||ln&&en},bo.supportsNativeVideoTracks=function(){return!(!bo.TEST_VID||!bo.TEST_VID.videoTracks)},bo.supportsNativeAudioTracks=function(){return!(!bo.TEST_VID||!bo.TEST_VID.audioTracks)},bo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],n=e[1];To(bo.prototype,t,(function(){return bo[n]()}),!0)})),bo.prototype.movingMediaElementInDOM=!ln,bo.prototype.featuresFullscreenResize=!0,bo.prototype.featuresProgressEvents=!0,bo.prototype.featuresTimeupdateEvents=!0,bo.patchCanPlayType=function(){Qt>=4&&!Jt&&!en&&(ho=bo.TEST_VID&&bo.TEST_VID.constructor.prototype.canPlayType,bo.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":ho.call(this,e)})},bo.unpatchCanPlayType=function(){var e=bo.TEST_VID.constructor.prototype.canPlayType;return ho&&(bo.TEST_VID.constructor.prototype.canPlayType=ho),e},bo.patchCanPlayType(),bo.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},bo.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){bo.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){bo.prototype["set"+Pr(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){bo.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){bo.prototype["set"+Pr(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){bo.prototype[e]=function(){return this.el_[e]()}})),Si.withSourceHandlers(bo),bo.nativeSourceHandler={},bo.nativeSourceHandler.canPlayType=function(e){try{return bo.TEST_VID.canPlayType(e)}catch(e){return""}},bo.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return bo.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=di(e.src);return bo.nativeSourceHandler.canPlayType("video/"+n)}return""},bo.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},bo.nativeSourceHandler.dispose=function(){},bo.registerSourceHandler(bo.nativeSourceHandler),Si.registerTech("Html5",bo);var Eo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],So={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Ao=["tiny","xsmall","small","medium","large","xlarge","huge"],Co={};Ao.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Co[e]="vjs-layout-"+t}));var wo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Io=function(e){function t(n,r,i){var a;if(n.id=n.id||r.id||"vjs_video_"+Zn(),(r=Ft(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else for(var u=n;u&&1===u.nodeType;){if(wn(u).hasOwnProperty("lang")){r.language=u.getAttribute("lang");break}u=u.parentNode}if((a=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=function(e){return a.documentFullscreenChange_(e)},a.boundFullWindowOnEscKey_=function(e){return a.fullWindowOnEscKey(e)},a.boundUpdateStyleEl_=function(e){return a.updateStyleEl_(e)},a.boundApplyInitTime_=function(e){return a.applyInitTime_(e)},a.boundUpdateCurrentBreakpoint_=function(e){return a.updateCurrentBreakpoint_(e)},a.boundHandleTechClick_=function(e){return a.handleTechClick_(e)},a.boundHandleTechDoubleClick_=function(e){return a.handleTechDoubleClick_(e)},a.boundHandleTechTouchStart_=function(e){return a.handleTechTouchStart_(e)},a.boundHandleTechTouchMove_=function(e){return a.handleTechTouchMove_(e)},a.boundHandleTechTouchEnd_=function(e){return a.handleTechTouchEnd_(e)},a.boundHandleTechTap_=function(e){return a.handleTechTap_(e)},a.isFullscreen_=!1,a.log=Nt(a.id_),a.fsApi_=wt,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=n,a.tagAttributes=n&&wn(n),a.language(a.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(e){l[e.toLowerCase()]=r.languages[e]})),a.languages_=l}else a.languages_=t.prototype.options_.languages;a.resetCache_(),a.poster_=r.poster||"",a.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!=typeof a[e])throw new Error('plugin "'+e+'" does not exist')})),a.scrubbing_=!1,a.el_=a.createEl(),wr(d()(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(or(s.a,a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var c=Dr(a.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){a[e](r.plugins[e])})),r.debug&&a.debug(!0),a.options_.playerOptions=c,a.middleware_=[],a.playbackRates(r.playbackRates),a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),on&&a.addClass("vjs-touch-enabled"),ln||a.addClass("vjs-workinghover"),t.players[a.id_]=d()(a);var f=Ct.split(".")[0];return a.addClass("vjs-v"+f),a.userActive(!0),a.reportUserActivity(),a.one("play",(function(e){return a.listenForUserActivity_(e)})),a.on("stageclick",(function(e){return a.handleStageClick_(e)})),a.on("keydown",(function(e){return a.handleKeyDown(e)})),a.on("languagechange",(function(e){return a.handleLanguagechange(e)})),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}h()(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),sr(s.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),sr(s.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Ci[this.id()]=null,Ei.names.forEach((function(e){var t=Ei[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this)},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:i||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=wn(n);if(i){for(t=this.el_=n,n=this.tag=s.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);bn(t,"video-js")||En(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),o.tabindex="-1",(nn||en&&an)&&(n.setAttribute("role","application"),o.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){i&&"class"===e||t.setAttribute(e,o[e]),i&&n.setAttribute(e,o[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Qn("vjs-styles-dimensions");var u=Gn(".vjs-styles-defaults"),l=Gn("head");l.insertBefore(this.styleEl_,u?u.nextSibling:l.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var c=n.getElementsByTagName("a"),d=0;d<c.length;d++){var f=c.item(d);En(f,"vjs-hidden"),f.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),Tn(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):Mt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?Mt.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){var t,n,r=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,vr(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.boundUpdateStyleEl_)},vr(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),$n(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")}else{var o="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(o>=0&&(u.width=o),s>=0&&(u.height=s))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=Pr(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Si.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(a=!1);var o={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Ei.names.forEach((function(e){var t=Ei[e];o[t.getterName]=n[t.privateName]})),Ft(o,this.options_[r]),Ft(o,this.options_[i]),Ft(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var s=Si.getTech(e);if(!s)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new s(o),this.tech_.ready(pr(this,this.handleTechReady_),!0),Wr(this.textTracksJson_||[],this.tech_),Eo.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+Pr(e)+"_"](t)}))})),Object.keys(So).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+So[e]+"_"].bind(n),event:t}):n["handleTech"+So[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return n.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return n.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return n.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return n.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return n.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return n.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return n.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return n.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return n.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return n.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return n.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return n.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return n.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return n.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return n.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return n.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return n.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||Tn(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Ei.names.forEach((function(t){var n=Ei[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=Kr(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&Mt.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"mouseup",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(qr(r))return r.catch(n)};if("any"===e&&!0!==this.muted()?qr(n=this.play())&&(n=n.catch(r)):n="muted"===e&&!0!==this.muted()?r():this.play(),qr(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var a=r[i];if(a.type&&a.src&&a.src===t)return a.type}return ki(t)}(this,t)),this.cache_.source=Dr({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],a=this.$$("source"),o=[],s=0;s<a.length;s++){var u=wn(a[s]);i.push(u),u.src&&u.src===t&&o.push(u.src)}o.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(Mt.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){jn(e)&&this.controls_&&(this.paused()?Vr(this.play()):this.pause())},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=s.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in Pi)return function(e,t,n,r){return t[n](e.reduce(Mi(n),r))}(this.middleware_,this.tech_,e,t);if(e in Di)return Ri(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw Mt(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Oi)return function(e,t,n){return e.reduceRight(Mi(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Di)return Ri(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Mt("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Mt("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Mt(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||a.a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=Vr),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!cn&&!ln||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||Br(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=Br(0,0)),e},n.bufferedPercent=function(){return jr(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(e){var t=this.options_.Promise||a.a.Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",o),n.off("fullscreenchange",a)}function a(){i(),t()}function o(e,t){i(),r(t)}n.one("fullscreenchange",a),n.one("fullscreenerror",o);var s=n.requestFullscreenHelper_(e);if(s)return s.then(i,i),s}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||a.a.Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",i)}function i(){r(),e()}function a(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",a);var o=t.exitFullscreenHelper_();if(o)return o.then(r,r),o}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=s.a[this.fsApi_.exitFullscreen]();return t&&t.then((function(){return e.isFullscreen(!1)})),t}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=s.a.documentElement.style.overflow,or(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow="hidden",En(s.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){y.a.isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,sr(s.a,"keydown",this.boundFullWindowOnEscKey_),s.a.documentElement.style.overflow=this.docOrigOverflow,Sn(s.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in s.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in s.a)return s.a.exitPictureInPicture()},n.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return y.a.isEventKey(e,"f")}:n,i=t.muteKey,a=void 0===i?function(e){return y.a.isEventKey(e,"m")}:i,o=t.playPauseKey,u=void 0===o?function(e){return y.a.isEventKey(e,"k")||y.a.isEventKey(e,"Space")}:o;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var l=xr.getComponent("FullscreenToggle");!1!==s.a[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else if(a.call(this,e)){e.preventDefault(),e.stopPropagation(),xr.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(u.call(this,e)){e.preventDefault(),e.stopPropagation(),xr.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],a=Si.getTech(i);if(a||(a=xr.getComponent(i)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else Mt.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n=this,r=this.options_.techOrder.map((function(e){return[e,Si.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(Mt.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},a=function(e,t){var r=e[0];if(e[1].canPlaySource(t,n.options_[r.toLowerCase()]))return{source:t,tech:r}};return(this.options_.sourceOrder?i(e,r,(t=a,function(e,n){return t(n,e)})):i(r,e,a))||!1},n.handleSrc_=function(e,t){var n=this;if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var r=xi(e);if(r.length){if(this.changingSrc_=!0,t||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),Ii(this,r[0],(function(e,i){var a,o;if(n.middleware_=i,t||(n.cache_.sources=r),n.updateSourceCaches_(e),n.src_(e))return r.length>1?n.handleSrc_(r.slice(1)):(n.changingSrc_=!1,n.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void n.triggerReady());a=i,o=n.tech_,a.forEach((function(e){return e.setTech&&e.setTech(o)}))})),this.options_.retryOnError&&r.length>1){var i=function(){n.error(null),n.handleSrc_(r.slice(1),!0)},a=function(){n.off("error",i)};this.one("error",i),this.one("playing",a),this.resetRetryOnError_=function(){n.off("error",i),n.off("playing",a)}}}else this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src=function(e){return this.handleSrc_(e,!1)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,Pr(t)!==Pr(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||a.a.Promise;this.paused()||!t?this.doReset_():Vr(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),vr(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Hr(e),this.addClass("vjs-error"),Mt.error("(CODE:"+this.error_.code+" "+Hr.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,r=pr(this,this.reportUserActivity),i=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var a,o=this.getChild("controlBar");!o||ln||Xt||(o.on("mouseenter",(function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),o.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),vr(this)&&this.trigger("languagechange"))},n.languages=function(){return Dr(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=Dr(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=Dr(r)).player=void 0,e.tracks[n]=r}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new zr(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<Ao.length;n++){var r=Ao[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(Co[e]),this.addClass(Co[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Ft({},wo,e),this.updateCurrentBreakpoint_()),Ft(this.breakpoints_)},n.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Co[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=Dr(e);var r=this.cache_.media,i=r.artwork,a=r.poster,o=r.src,s=r.textTracks;!i&&a&&(this.cache_.media.artwork=[{src:a,type:ki(a)}]),o&&this.src(o),a&&this.poster(a),Array.isArray(s)&&s.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:ki(t.poster)}]),t}return Dr(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=wn(e),r=n["data-setup"];if(bn(e,"vjs-fill")&&(n.fill=!0),bn(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=g()(r||"{}"),a=i[0],o=i[1];a&&Mt.error(a),Ft(n,o)}if(Ft(t,n),e.hasChildNodes())for(var s=e.childNodes,u=0,l=s.length;u<l;u++){var c=s[u],d=c.nodeName.toLowerCase();"source"===d?t.sources.push(wn(c)):"track"===d&&t.tracks.push(wn(c))}return t},n.flexNotSupported_=function(){var e=s.a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},n.playbackRates=function(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((function(e){return"number"==typeof e}))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))},t}(xr);Ei.names.forEach((function(e){var t=Ei[e];Io.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Io.prototype.crossorigin=Io.prototype.crossOrigin,Io.players={};var Ro=a.a.navigator;Io.prototype.options_={techOrder:Si.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ro&&(Ro.languages&&Ro.languages[0]||Ro.userLanguage||Ro.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Io.prototype[e]=function(){return this.techGet_(e)}})),Eo.forEach((function(e){Io.prototype["handleTech"+Pr(e)+"_"]=function(){return this.trigger(e)}})),xr.registerComponent("Player",Io);var Oo="plugin",Po={},Do=function(e){return Po.hasOwnProperty(e)},Mo=function(e){return Do(e)?Po[e]:void 0},No=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},Lo=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},ko=function(e,t){return t.prototype.name=e,function(){Lo(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=S()(t,[this].concat(r));return this[e]=function(){return a},Lo(this,a.getEventHash()),a}},xo=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),wr(this),delete this.trigger,Rr(this,this.constructor.defaultState),No(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),ur(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=ko(e,Po[e])},e.isBasic=function(t){var n="string"==typeof t?Mo(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Do(t))Mt.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Io.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return Po[t]=n,t!==Oo&&(e.isBasic(n)?Io.prototype[t]=function(e,t){var n=function(){Lo(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return No(this,e),Lo(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):Io.prototype[t]=ko(t,n)),n},e.deregisterPlugin=function(e){if(e===Oo)throw new Error("Cannot de-register base plugin.");Do(e)&&(delete Po[e],delete Io.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(Po)),e.forEach((function(e){var n=Mo(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=Mo(e);return t&&t.VERSION||""},e}();xo.getPlugin=Mo,xo.BASE_PLUGIN_NAME=Oo,xo.registerPlugin(Oo,xo),Io.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Io.prototype.hasPlugin=function(e){return!!Do(e)};var Fo=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Uo(e,t,n){var r=Uo.getPlayer(e);if(r)return t&&Mt.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?Gn("#"+Fo(e)):e;if(!gn(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||Mt.warn("The element supplied is not included in the DOM"),t=t||{},Uo.hooks("beforesetup").forEach((function(e){var n=e(i,Dr(t));Ut(n)&&!Array.isArray(n)?t=Dr(t,n):Mt.error("please return an object in beforesetup hooks")}));var a=xr.getComponent("Player");return r=new a(i,t,n),Uo.hooks("setup").forEach((function(e){return e(r)})),r}if(Uo.hooks_={},Uo.hooks=function(e,t){return Uo.hooks_[e]=Uo.hooks_[e]||[],t&&(Uo.hooks_[e]=Uo.hooks_[e].concat(t)),Uo.hooks_[e]},Uo.hook=function(e,t){Uo.hooks(e,t)},Uo.hookOnce=function(e,t){Uo.hooks(e,[].concat(t).map((function(t){return function n(){return Uo.removeHook(e,n),t.apply(void 0,arguments)}})))},Uo.removeHook=function(e,t){var n=Uo.hooks(e).indexOf(t);return!(n<=-1)&&(Uo.hooks_[e]=Uo.hooks_[e].slice(),Uo.hooks_[e].splice(n,1),!0)},!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE&&pn()){var Bo=Gn(".vjs-styles-defaults");if(!Bo){Bo=Qn("vjs-styles-defaults");var jo=Gn("head");jo&&jo.insertBefore(Bo,jo.firstChild),$n(Bo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Wn(1,Uo),Uo.VERSION=Ct,Uo.options=Io.prototype.options_,Uo.getPlayers=function(){return Io.players},Uo.getPlayer=function(e){var t,n=Io.players;if("string"==typeof e){var r=Fo(e),i=n[r];if(i)return i;t=Gn("#"+r)}else t=e;if(gn(t)){var a=t,o=a.player,s=a.playerId;if(o||n[s])return o||n[s]}},Uo.getAllPlayers=function(){return Object.keys(Io.players).map((function(e){return Io.players[e]})).filter(Boolean)},Uo.players=Io.players,Uo.getComponent=xr.getComponent,Uo.registerComponent=function(e,t){Si.isTech(t)&&Mt.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),xr.registerComponent.call(xr,e,t)},Uo.getTech=Si.getTech,Uo.registerTech=Si.registerTech,Uo.use=function(e,t){Ai[e]=Ai[e]||[],Ai[e].push(t)},Object.defineProperty(Uo,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Uo.middleware,"TERMINATOR",{value:wi,writeable:!1,enumerable:!0}),Uo.browser=dn,Uo.TOUCH_ENABLED=on,Uo.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},r={};for(var i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),C()(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Uo.mergeOptions=Dr,Uo.bind=pr,Uo.registerPlugin=xo.registerPlugin,Uo.deregisterPlugin=xo.deregisterPlugin,Uo.plugin=function(e,t){return Mt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),xo.registerPlugin(e,t)},Uo.getPlugins=xo.getPlugins,Uo.getPlugin=xo.getPlugin,Uo.getPluginVersion=xo.getPluginVersion,Uo.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Uo.options.languages=Dr(Uo.options.languages,((n={})[e]=t,n)),Uo.options.languages[e]},Uo.log=Mt,Uo.createLogger=Nt,Uo.createTimeRange=Uo.createTimeRanges=Br,Uo.formatTime=Ji,Uo.setFormatTime=function(e){$i=e},Uo.resetFormatTime=function(){$i=Qi},Uo.parseUrl=li,Uo.isCrossOrigin=fi,Uo.EventTarget=mr,Uo.on=or,Uo.one=lr,Uo.off=sr,Uo.trigger=ur,Uo.xhr=_.a,Uo.TextTrack=mi,Uo.AudioTrack=yi,Uo.VideoTrack=vi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Uo[e]=function(){return Mt.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Vn[e].apply(null,arguments)}})),Uo.computedStyle=jt,Uo.dom=Vn,Uo.url=hi,Uo.defineLazyProperty=To,Uo.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Ho=O,Go=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},qo=function(e){return Uo.log.debug?Uo.log.debug.bind(Uo,"VHS:",e+" >"):function(){}},Vo=1/30,Yo=.1,Ko=function(e,t){var n,r=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&r.push([e.start(n),e.end(n)]);return Uo.createTimeRanges(r)},Wo=function(e,t){return Ko(e,(function(e,n){return e-Yo<=t&&n+Yo>=t}))},zo=function(e,t){return Ko(e,(function(e){return e-Vo>=t}))},Xo=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},Qo=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},$o=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Jo=Uo.createTimeRange,Zo=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(r,i){e.push({duration:r.duration,segmentIndex:n,partIndex:i,part:r,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e}),[])},es=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},ts=function(e){var t=e.preloadSegment;if(t){var n=t.parts,r=(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0);return r+=n&&n.length?n.length:0}},ns=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=es(t).length>0;return n&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:n&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},rs=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(r.precise)return r.result;var i=function(e,t){for(var n,r=0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(n=e.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=n.duration,void 0!==n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return i.precise?i.result:r.result+n},is=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return a.a.Infinity}return rs(e,t,n)},as=function(e){var t=e.defaultDuration,n=e.durationList,r=e.startIndex,i=e.endIndex,a=0;if(r>i){var o=[i,r];r=o[0],i=o[1]}if(r<0){for(var s=r;s<Math.min(0,i);s++)a+=t;r=0}for(var u=r;u<i;u++)a+=n[u].duration;return a},os=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return is(e);if(null===t)return null;t=t||0;var i=rs(e,e.mediaSequence+e.segments.length,t);return n&&(i-=r="number"==typeof r?r:ns(null,e)),Math.max(0,i)},ss=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},us=function(e){return e.excludeUntil&&e.excludeUntil===1/0},ls=function(e){var t=ss(e);return!e.disabled&&!t},cs=function(e,t){return t.attributes&&t.attributes[e]},ds=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!ls(e)&&(e.attributes.BANDWIDTH||0)<n})).length},fs=function(e,t){return!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri))))},hs=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},r=!1;for(var i in n){for(var a in n[i])if(r=t(n[i][a]))break;if(r)break}return!!r},ps=function(e){if(!e||!e.playlists||!e.playlists.length)return hs(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(t){var n=e.playlists[t],r=n.attributes&&n.attributes.CODECS;return r&&r.split(",").every((function(e){return Y(e)}))||hs(e,(function(e){return fs(n,e)}))?"continue":{v:!1}},n=0;n<e.playlists.length;n++){var r=t(n);if("continue"!==r&&"object"==typeof r)return r.v}return!0},gs={liveEdgeDelay:ns,duration:is,seekable:function(e,t,n){var r=t||0,i=os(e,t,!0,n);return null===i?Jo():Jo(r,i)},getMediaInfoForTime:function(e){for(var t=e.playlist,n=e.currentTime,r=e.startingSegmentIndex,i=e.startingPartIndex,a=e.startTime,o=n-a,s=Zo(t),u=0,l=0;l<s.length;l++){var c=s[l];if(r===c.segmentIndex&&("number"!=typeof i||"number"!=typeof c.partIndex||i===c.partIndex)){u=l;break}}if(o<0){if(u>0)for(var d=u-1;d>=0;d--){var f=s[d];if((o+=f.duration)+Vo>0)return{partIndex:f.partIndex,segmentIndex:f.segmentIndex,startTime:a-as({defaultDuration:t.targetDuration,durationList:s,startIndex:u,endIndex:d})}}return{partIndex:s[0]&&s[0].partIndex||null,segmentIndex:s[0]&&s[0].segmentIndex||0,startTime:n}}if(u<0){for(var h=u;h<0;h++)if((o-=t.targetDuration)<0)return{partIndex:s[0]&&s[0].partIndex||null,segmentIndex:s[0]&&s[0].segmentIndex||0,startTime:n};u=0}for(var p=u;p<s.length;p++){var g=s[p];if((o-=g.duration)-Vo<0)return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:a+as({defaultDuration:t.targetDuration,durationList:s,startIndex:u,endIndex:p})}}return{segmentIndex:s[s.length-1].segmentIndex,partIndex:s[s.length-1].partIndex,startTime:n}},isEnabled:ls,isDisabled:function(e){return e.disabled},isBlacklisted:ss,isIncompatible:us,playlistEnd:os,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:cs,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),cs("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:ds,isAudioOnly:ps,playlistMatch:fs},ms=Uo.log,ys=function(e,t){return e+"-"+t},vs=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(n){if(e.mediaGroups[n])for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var a=e.mediaGroups[n][r][i];t(a,n,r,i)}}))},_s=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,t.playlistErrors_=0,n&&(t.uri=n),t.attributes=t.attributes||{}},Ts=function(e,t){e.uri=t;for(var n=0;n<e.playlists.length;n++)if(!e.playlists[n].uri){var r="placeholder-uri-"+n;e.playlists[n].uri=r}vs(e,(function(t,n,r,i){var a="placeholder-uri-"+n+"-"+r+"-"+i;t.playlists&&t.playlists.length||(t.playlists=[l()({},t)]),t.playlists.forEach((function(t,n){var r=ys(n,a);t.uri?t.resolvedUri=t.resolvedUri||Ho(e.uri,t.uri):(t.uri=0===n?a:r,t.resolvedUri=t.uri),t.id=t.id||r,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];_s({playlist:n,id:ys(t,n.uri)}),n.resolvedUri=Ho(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||ms.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){vs(e,(function(t){t.uri&&(t.resolvedUri=Ho(e.uri,t.uri))}))}(e)},bs=Uo.mergeOptions,Es=Uo.EventTarget,Ss=function(e,t){if(!e)return t;var n=bs(e,t);if(e.preloadHints&&!t.preloadHints&&delete n.preloadHints,e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(var r=0;r<t.parts.length;r++)e.parts&&e.parts[r]&&(n.parts[r]=bs(e.parts[r],t.parts[r]));return!e.skipped&&t.skipped&&(n.skipped=!1),e.preload&&!t.preload&&(n.preload=!1),n},As=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=Ho(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Ho(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Ho(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Ho(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=Ho(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=Ho(t,e.uri))}))},Cs=function(e){var t=e.segments||[],n=e.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints)for(var r=0;r<n.preloadHints.length;r++)if("MAP"===n.preloadHints[r].type)return t;n.duration=e.targetDuration,n.preload=!0,t.push(n)}return t},ws=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence},Is=function(e,t,n){void 0===n&&(n=ws);var r=bs(e,{}),i=r.playlists[t.id];if(!i)return null;if(n(i,t))return null;t.segments=Cs(t);var a=bs(i,t);if(a.preloadSegment&&!t.preloadSegment&&delete a.preloadSegment,i.segments){if(t.skip){t.segments=t.segments||[];for(var o=0;o<t.skip.skippedSegments;o++)t.segments.unshift({skipped:!0})}a.segments=function(e,t,n){var r=e.slice(),i=t.slice();n=n||0;for(var a,o=[],s=0;s<i.length;s++){var u=r[s+n],l=i[s];u?(a=u.map||a,o.push(Ss(u,l))):(a&&!l.map&&(l.map=a),o.push(l))}return o}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)}a.segments.forEach((function(e){As(e,a.resolvedUri)}));for(var s=0;s<r.playlists.length;s++)r.playlists[s].id===t.id&&(r.playlists[s]=a);return r.playlists[t.id]=a,r.playlists[t.uri]=a,vs(e,(function(e,n,r,i){if(e.playlists)for(var a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=t)})),r},Rs=function(e,t){var n=e.segments[e.segments.length-1],r=n&&n.parts&&n.parts[n.parts.length-1],i=r&&r.duration||n&&n.duration;return t&&i?1e3*i:500*(e.partTargetDuration||e.targetDuration||10)},Os=function(e){function t(t,n,r){var i;if(void 0===r&&(r={}),i=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");i.logger_=qo("PlaylistLoader");var a=r,o=a.withCredentials,s=void 0!==o&&o,u=a.handleManifestRedirects,l=void 0!==u&&u;i.src=t,i.vhs_=n,i.withCredentials=s,i.handleManifestRedirects=l;var c=n.options_;return i.customTagParsers=c&&c.customTagParsers||[],i.customTagMappers=c&&c.customTagMappers||[],i.experimentalLLHLS=c&&c.experimentalLLHLS||!1,i.state="HAVE_NOTHING",i.handleMediaupdatetimeout_=i.handleMediaupdatetimeout_.bind(d()(i)),i.on("mediaupdatetimeout",i.handleMediaupdatetimeout_),i}h()(t,e);var n=t.prototype;return n.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var t=this.media(),n=Ho(this.master.uri,t.uri);this.experimentalLLHLS&&(n=function(e,t){if(t.endList)return e;var n=[];if(t.serverControl&&t.serverControl.canBlockReload){var r=t.preloadSegment,i=t.mediaSequence+t.segments.length;if(r){var a=r.parts||[],o=ts(t)-1;o>-1&&o!==a.length-1&&n.push("_HLS_part="+o),(o>-1||a.length)&&i--}n.unshift("_HLS_msn="+i)}return t.serverControl&&t.serverControl.canSkipUntil&&n.unshift("_HLS_skip="+(t.serverControl.canSkipDateranges?"v2":"YES")),n.forEach((function(t,n){e+=(0===n?"?":"&")+t})),e}(n,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:n,withCredentials:this.withCredentials},(function(t,n){if(e.request)return t?e.playlistRequestError(e.request,e.media(),"HAVE_METADATA"):void e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}))}},n.playlistRequestError=function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.parseManifest_=function(e){var t=this,n=e.url;return function(e){var t=e.onwarn,n=e.oninfo,r=e.manifestString,i=e.customTagParsers,a=void 0===i?[]:i,o=e.customTagMappers,s=void 0===o?[]:o,u=e.experimentalLLHLS,l=new B;t&&l.on("warn",t),n&&l.on("info",n),a.forEach((function(e){return l.addParser(e)})),s.forEach((function(e){return l.addTagMapper(e)})),l.push(r),l.end();var c=l.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){c.hasOwnProperty(e)&&delete c[e]})),c.segments&&c.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!c.targetDuration){var d=10;c.segments&&c.segments.length&&(d=c.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+d),c.targetDuration=d}var f=es(c);if(f.length&&!c.partTargetDuration){var h=f.reduce((function(e,t){return Math.max(e,t.duration)}),0);t&&(t("manifest has no partTargetDuration defaulting to "+h),ms.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),c.partTargetDuration=h}return c}({onwarn:function(e){var r=e.message;return t.logger_("m3u8-parser warn for "+n+": "+r)},oninfo:function(e){var r=e.message;return t.logger_("m3u8-parser info for "+n+": "+r)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},n.haveMetadata=function(e){var t=this,n=e.playlistString,r=e.playlistObject,i=e.url,o=e.id;this.request=null,this.state="HAVE_METADATA";var s=r||this.parseManifest_({url:i,manifestString:n});s.lastRequest=Date.now(),_s({playlist:s,uri:i,id:o});var u=Is(this.master,s);this.targetDuration=s.partTargetDuration||s.targetDuration,u?(this.master=u,this.media_=this.master.playlists[o]):this.trigger("playlistunchanged"),this.media().endList||(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=a.a.setTimeout((function(){t.trigger("mediaupdatetimeout")}),Rs(this.media(),!!u))),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(a.a.clearTimeout(this.finalRenditionTimeout),t){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=a.a.setTimeout(this.media.bind(this,e,!1),r)}else{var i=this.state,o=!this.media_||e.id!==this.media_.id,s=this.master.playlists[e.id];if(s&&s.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),"HAVE_MASTER"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(o){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Go(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,i);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===i?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;a.a.clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var r=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=a.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Go(e.handleManifestRedirects,e.src,n);var r=e.parseManifest_({manifestString:n.responseText,url:e.src});e.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Ts(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Cs(e),e.segments.forEach((function(t){As(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||a.a.location.href;this.master=function(e,t){var n=ys(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:a.a.location.href,resolvedUri:a.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Es),Ps=Uo.xhr,Ds=Uo.mergeOptions,Ms=function(e,t,n,r){var i="arraybuffer"===e.responseType?e.response:e.responseText;!t&&i&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=i.byteLength||i.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(i||e.responseText)))),r(t,e)},Ns=function(){var e=function e(t,n){t=Ds({timeout:45e3},t);var r=e.beforeRequest||Uo.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var a=(!0===Uo.Vhs.xhr.original?Ps:Uo.Vhs.xhr)(t,(function(e,t){return Ms(a,e,t,n)})),o=a.abort;return a.abort=function(){return a.aborted=!0,o.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a};return e.original=!0,e},Ls=function(e){var t,n,r={};return e.byterange&&(r.Range=(t=e.byterange,n=t.offset+t.length-1,"bytes="+t.offset+"-"+n)),r},ks=function(e,t){return e.start(t)+"-"+e.end(t)},xs=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Fs=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Us=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];ArrayBuffer.isView(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},Bs=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},js=function(e){return e.resolvedUri},Hs=function(e){for(var t=Array.prototype.slice.call(e),n=16,r="",i=0;i<t.length/n;i++)r+=t.slice(i*n,i*n+n).map(xs).join("")+" "+t.slice(i*n,i*n+n).map(Fs).join("")+"\n";return r},Gs=Object.freeze({__proto__:null,createTransferableMessage:Us,initSegmentId:Bs,segmentKeyId:js,hexDump:Hs,tagDump:function(e){var t=e.bytes;return Hs(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=ks(e,t)+" ";return n}}),qs=function(e){var t=e.playlist,n=e.time,r=void 0===n?void 0:n,i=e.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,r=0,i=0;i<t.segments.length&&!(e<=(r=(n=t.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration));i++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!a)return i({message:"valid programTime was not found"});if("estimate"===a.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var o={mediaSeconds:r},s=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,a.segment);return s&&(o.programDateTime=s.toISOString()),i(null,o)},Vs=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,a=void 0===i?2:i,o=t.seekTo,s=t.pauseAfterSeek,u=void 0===s||s,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!o)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(r))return c({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var d=function(e,t){var n;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1&&(r=t.segments[i],!(n<t.segments[i+1].dateTimeObject));i++);var a,o=t.segments[t.segments.length-1],s=o.dateTimeObject,u=o.videoTimingInfo?(a=o.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:o.duration+.25*o.duration;return n>new Date(s.getTime()+1e3*u)?null:(n>s&&(r=o),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:gs.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!d)return c({message:n+" was not found in the stream"});var f=d.segment,h=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(e){}var i=n.getTime();return(r.getTime()-i)/1e3}(f.dateTimeObject,n);if("estimate"===d.type)return 0===a?c({message:n+" is not buffered yet. Try again"}):(o(d.estimatedStart+h),void l.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:a-1,seekTo:o,pauseAfterSeek:u,tech:l,callback:c})})));var p=f.start+h;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),o(p)},Ys=function(e,t){if(4===e.readyState)return t()},Ks=function(e,t,n){var r,i=[],a=!1,o=function(e,t,r,i){return t.abort(),a=!0,n(e,t,r,i)},s=function(e,t){if(!a){if(e)return o(e,t,"",i);var n=t.responseText.substring(i&&i.byteLength||0,t.responseText.length);if(i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if((t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e}))).length<=1)return ze(t[0]);var r=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),i=new Uint8Array(r),a=0;return t.forEach((function(e){e=ze(e),i.set(e,a),a+=e.byteLength})),i}(i,et(n,!0)),r=r||rt(i),i.length<10||r&&i.length<r+2)return Ys(t,(function(){return o(e,t,"",i)}));var s=St(i);return"ts"===s&&i.length<188||!s&&i.length<376?Ys(t,(function(){return o(e,t,"",i)})):o(null,t,s,i)}},u=t({uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,Ms(e,null,{statusCode:e.status},s)}))}},(function(e,t){return Ms(u,e,t,s)}));return u},Ws=Uo.EventTarget,zs=Uo.mergeOptions,Xs=function(e,t){if(!ws(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var n=0;n<e.segments.length;n++){var r=e.segments[n],i=t.segments[n];if(r.uri!==i.uri)return!1;if(r.byterange||i.byterange){var a=r.byterange,o=i.byterange;if(a&&!o||!a&&o)return!1;if(a.offset!==o.offset||a.length!==o.length)return!1}}return!0},Qs=function(e,t){return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},$s=function(e,t){var n={};for(var r in e){var i=e[r].sidx;if(i){var a=ye(i);if(!t[a])break;var o=t[a].sidxInfo;Qs(o,i)&&(n[a]=t[a])}}return n},Js=function(e){function t(t,n,r,i){var a;void 0===r&&(r={}),(a=e.call(this)||this).masterPlaylistLoader_=i||d()(a),i||(a.isMaster_=!0);var o=r,s=o.withCredentials,u=void 0!==s&&s,l=o.handleManifestRedirects,c=void 0!==l&&l;if(a.vhs_=n,a.withCredentials=u,a.handleManifestRedirects=c,!t)throw new Error("A non-empty playlist URL or object is required");return a.on("minimumUpdatePeriod",(function(){a.refreshXml_()})),a.on("mediaupdatetimeout",(function(){a.refreshMedia_(a.media().id)})),a.state="HAVE_NOTHING",a.loadedPlaylists_={},a.logger_=qo("DashPlaylistLoader"),a.isMaster_?(a.masterPlaylistLoader_.srcUrl=t,a.masterPlaylistLoader_.sidxMapping_={}):a.childPlaylist_=t,a}h()(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var r=this,i=e.sidx&&ye(e.sidx);if(e.sidx&&i&&!this.masterPlaylistLoader_.sidxMapping_[i]){var o=Go(this.handleManifestRedirects,e.sidx.resolvedUri),s=function(a,o){if(!r.requestErrored_(a,o,t)){var s,u=r.masterPlaylistLoader_.sidxMapping_;try{s=We()(ze(o.response).subarray(8))}catch(e){return void r.requestErrored_(e,o,t)}return u[i]={sidxInfo:e.sidx,sidx:s},me(e,s,e.sidx.resolvedUri),n(!0)}};this.request=Ks(o,this.vhs_.xhr,(function(t,n,i,a){if(t)return s(t,n);if(!i||"mp4"!==i)return s({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+o,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var u=e.sidx.byterange,l=u.offset,c=u.length;if(a.length>=c+l)return s(t,{response:a.subarray(l,l+c),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:o,responseType:"arraybuffer",headers:Ls({byterange:e.sidx.byterange})},s)}))}else this.mediaRequest_=a.a.setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},a.a.clearTimeout(this.minimumUpdatePeriodTimeout_),a.a.clearTimeout(this.mediaRequest_),a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(a.a.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=a.a.setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!t.requestErrored_(n,r)){var i=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Go(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),i?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,i)}))):e(r,i)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=Ye(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Ho(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(r)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var a;a="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):t.masterLoaded_:Date.parse(i.responseText),t.masterPlaylistLoader_.clientOffset_=a-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,r,i,a,o=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},t=e.masterXml,n=e.srcUrl,r=e.clientOffset,i=e.sidxMapping,a=Ve(t,{manifestUri:n,clientOffset:r,sidxMapping:i}),Ts(a,n),a),s=this.masterPlaylistLoader_.master;s&&(o=function(e,t,n){for(var r=!0,i=zs(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),a=0;a<t.playlists.length;a++){var o=t.playlists[a];if(o.sidx){var s=ye(o.sidx);n&&n[s]&&n[s].sidx&&me(o,n[s].sidx,o.sidx.resolvedUri)}var u=Is(i,o,Xs);u&&(i=u,r=!1)}return vs(t,(function(e,t,n,a){if(e.playlists&&e.playlists.length){var o=e.playlists[0].id,s=Is(i,e.playlists[0],Xs);s&&((i=s).mediaGroups[t][n][a].playlists[0]=i.playlists[o],r=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:i}(s,o,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=o||s;var u=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return u&&u!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=u),(!s||o&&o.minimumUpdatePeriod!==s.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(o)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(a.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=a.a.setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var r,i,a;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,i=e.masterPlaylistLoader_.sidxMapping_,a=$s(r.playlists,i),vs(r,(function(e,t,n,r){if(e.playlists&&e.playlists.length){var o=e.playlists;a=zs(a,$s(o,i))}})),a),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[e];if(r?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=a.a.setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),Rs(t.media(),Boolean(r))))}()}this.trigger("loadedplaylist")},t}(Ws),Zs={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},eu=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},tu=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=eu(new Worker(t));n.objURL=t;var r=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},n}},nu=function(e){return"var browserWorkerPolyFill = "+eu.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},ru=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},iu=tu(nu(ru((function(){var e=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,a;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(a=[],r=arguments.length,r=1;r<arguments.length;++r)a.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,a)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,n,r,i,a,o,s,u,l,c,d,f,h,p,g,m,y,v,_,T,b,E,S,A,C,w,I,R,O,P,D,M,N,L,k,x,F,U,B,j,H=e,G=Math.pow(2,32)-1;!function(){var e;if(E={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in E)E.hasOwnProperty(e)&&(E[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);S=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),A=new Uint8Array([0,0,0,1]),w=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),I=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),R={video:w,audio:I},D=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),M=new Uint8Array([0,0,0,0,0,0,0,0]),N=M,L=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),k=M,O=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},n=function(){return t(E.dinf,t(E.dref,D))},r=function(e){return t(E.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},g=function(e){return t(E.hdlr,R[e])},p=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(n[12]=e.samplerate>>>24&255,n[13]=e.samplerate>>>16&255,n[14]=e.samplerate>>>8&255,n[15]=255&e.samplerate),t(E.mdhd,n)},h=function(e){return t(E.mdia,p(e),g(e.type),o(e))},a=function(e){return t(E.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return t(E.minf,"video"===e.type?t(E.vmhd,O):t(E.smhd,P),n(),y(e))},s=function(e,n){for(var r=[],i=n.length;i--;)r[i]=_(n[i]);return t.apply(null,[E.moof,a(e)].concat(r))},u=function(e){for(var n=e.length,r=[];n--;)r[n]=d(e[n]);return t.apply(null,[E.moov,c(4294967295)].concat(r).concat(l(e)))},l=function(e){for(var n=e.length,r=[];n--;)r[n]=T(e[n]);return t.apply(null,[E.mvex].concat(r))},c=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(E.mvhd,n)},m=function(e){var n,r,i=e.samples||[],a=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,a[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(E.sdtp,a)},y=function(e){return t(E.stbl,v(e),t(E.stts,k),t(E.stsc,N),t(E.stsz,L),t(E.stco,M))},v=function(e){return t(E.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?x(e):F(e))},x=function(e){var n,r,i=e.sps||[],a=e.pps||[],o=[],s=[];for(n=0;n<i.length;n++)o.push((65280&i[n].byteLength)>>>8),o.push(255&i[n].byteLength),o=o.concat(Array.prototype.slice.call(i[n]));for(n=0;n<a.length;n++)s.push((65280&a[n].byteLength)>>>8),s.push(255&a[n].byteLength),s=s.concat(Array.prototype.slice.call(a[n]));if(r=[E.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(E.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],o,[a.length],s))),t(E.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],l=e.sarRatio[1];r.push(t(E.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return t.apply(null,r)},F=function(e){return t(E.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},f=function(e){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(E.tkhd,n)},_=function(e){var n,r,i,a,o,s;return n=t(E.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),o=Math.floor(e.baseMediaDecodeTime/(G+1)),s=Math.floor(e.baseMediaDecodeTime%(G+1)),r=t(E.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===e.type?(i=b(e,92),t(E.traf,n,r,i)):(a=m(e),i=b(e,a.length+92),t(E.traf,n,r,i,a))},d=function(e){return e.duration=e.duration||4294967295,t(E.trak,f(e),h(e))},T=function(e){var n=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(n[n.length-1]=0),t(E.trex,n)},j=function(e,t){var n=0,r=0,i=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|r|i|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},B=function(e,n){var r,i,a,o,s,u;for(n+=20+16*(o=e.samples||[]).length,a=j(o,n),(i=new Uint8Array(a.length+16*o.length)).set(a),r=a.length,u=0;u<o.length;u++)s=o[u],i[r++]=(4278190080&s.duration)>>>24,i[r++]=(16711680&s.duration)>>>16,i[r++]=(65280&s.duration)>>>8,i[r++]=255&s.duration,i[r++]=(4278190080&s.size)>>>24,i[r++]=(16711680&s.size)>>>16,i[r++]=(65280&s.size)>>>8,i[r++]=255&s.size,i[r++]=s.flags.isLeading<<2|s.flags.dependsOn,i[r++]=s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,i[r++]=61440&s.flags.degradationPriority,i[r++]=15&s.flags.degradationPriority,i[r++]=(4278190080&s.compositionTimeOffset)>>>24,i[r++]=(16711680&s.compositionTimeOffset)>>>16,i[r++]=(65280&s.compositionTimeOffset)>>>8,i[r++]=255&s.compositionTimeOffset;return t(E.trun,i)},U=function(e,n){var r,i,a,o,s,u;for(n+=20+8*(o=e.samples||[]).length,a=j(o,n),(r=new Uint8Array(a.length+8*o.length)).set(a),i=a.length,u=0;u<o.length;u++)s=o[u],r[i++]=(4278190080&s.duration)>>>24,r[i++]=(16711680&s.duration)>>>16,r[i++]=(65280&s.duration)>>>8,r[i++]=255&s.duration,r[i++]=(4278190080&s.size)>>>24,r[i++]=(16711680&s.size)>>>16,r[i++]=(65280&s.size)>>>8,r[i++]=255&s.size;return t(E.trun,r)},b=function(e,t){return"audio"===e.type?U(e,t):B(e,t)};i=function(){return t(E.ftyp,S,A,S,C)};var q,V,Y,K,W,z,X,Q,$=function(e){return t(E.mdat,e)},J=s,Z=function(e){var t,n=i(),r=u(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t},ee=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},te=function(e){var t,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r),i},ne=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},re=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},ie=function(e,t){var n,r,i,a,o,s=t||0,u=[];for(n=0;n<e.length;n++)for(a=e[n],r=0;r<a.length;r++)o=a[r],s+=(i=ee(o,s)).size,u.push(i);return u},ae=function(e){var t,n,r,i,a,o,s=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(a=i[n],r=0;r<a.length;r++)o=a[r],d.setUint32(s,o.data.byteLength),s+=4,c.set(o.data,s),s+=o.data.byteLength;return c},oe=[33,16,5,32,164,27],se=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ue=function(e){for(var t=[];e--;)t.push(0);return t},le=function(){if(!q){var e={96e3:[oe,[227,64],ue(154),[56]],88200:[oe,[231],ue(170),[56]],64e3:[oe,[248,192],ue(240),[56]],48e3:[oe,[255,192],ue(268),[55,148,128],ue(54),[112]],44100:[oe,[255,192],ue(268),[55,163,128],ue(84),[112]],32e3:[oe,[255,192],ue(268),[55,234],ue(226),[112]],24e3:[oe,[255,192],ue(268),[55,255,128],ue(268),[111,112],ue(126),[224]],16e3:[oe,[255,192],ue(268),[55,255,128],ue(268),[111,255],ue(269),[223,108],ue(195),[1,192]],12e3:[se,ue(268),[3,127,248],ue(268),[6,255,240],ue(268),[13,255,224],ue(268),[27,253,128],ue(259),[56]],11025:[se,ue(268),[3,127,248],ue(268),[6,255,240],ue(268),[13,255,224],ue(268),[27,255,192],ue(268),[55,175,128],ue(108),[112]],8e3:[se,ue(268),[3,121,16],ue(47),[7]]};t=e,q=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return q},ce=9e4;z=function(e,t){return V(W(e,t))},X=function(e,t){return Y(K(e),t)},Q=function(e,t,n){return K(n?e:e-t)};var de=ce,fe=V=function(e){return e*ce},he=(Y=function(e,t){return e*t},K=function(e){return e/ce}),pe=(W=function(e,t){return e/t},z),ge=X,me=Q,ye=function(e,t,n,r){var i,a,o,s,u,l=0,c=0,d=0;if(t.length&&(i=pe(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(de/(e.samplerate/1024)),n&&r&&(l=i-Math.max(n,r),d=(c=Math.floor(l/a))*a),!(c<1||d>de/2))){for((o=le()[e.samplerate])||(o=t[0].data),s=0;s<c;s++)u=t[0],t.splice(0,0,{data:o,dts:u.dts-a,pts:u.pts-a});return e.baseMediaDecodeTime-=Math.floor(ge(d,e.samplerate)),d}},ve=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},_e=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r},Te=function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i},be=de,Ee=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Se=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/be,n=Math.floor(n)),n},Ae=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Ce=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}n.payload=void 0}t+=i,r=0,i=0}return n},we=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Ie=function(e,t){var n,r,i,a,o=[];if(!(64&t[0]))return o;for(r=31&t[0],n=0;n<r;n++)a={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(a.ccData=t[i+3]<<8|t[i+4],o.push(a));return o},Re=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},Oe=4,Pe=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new je(0,0),new je(0,1),new je(1,0),new je(1,1)],this.parse708captions_&&(this.cc708Stream_=new ke),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(Pe.prototype=new H).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=Ce(e.escapedRBSP)).payload&&t.payloadType===Oe&&(n=we(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=Ie(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Pe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Pe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Pe.prototype.flush=function(){return this.flushStream("flush")},Pe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Pe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Pe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Pe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Pe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},Pe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},Pe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var De={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Me=function(e){return 32<=e&&e<=127||160<=e&&e<=255},Ne=function(e){this.windowNum=e,this.reset()};Ne.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Ne.prototype.getText=function(){return this.rows.join("\n")},Ne.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ne.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ne.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ne.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Ne.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Le=function(e){this.serviceNum=e,this.text="",this.currentWindow=new Ne(-1),this.windows=[]};Le.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new Ne(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},Le.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};var ke=function e(){e.prototype.init.call(this);var t=this;this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(t.new708Packet(),t.add708Bytes(e)):(null===t.current708Packet&&t.new708Packet(),t.add708Bytes(e))}};ke.prototype=new H,ke.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ke.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},ke.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,a=t[i++];for(e.seq=a>>6,e.sizeCode=63&a;i<t.length;i++)r=31&(a=t[i++]),7===(n=a>>5)&&r>0&&(n=a=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},ke.prototype.pushServiceBlock=function(e,t,n){var r,i=t,a=this.current708Packet.data,o=this.services[e];for(o||(o=this.initService(e,i));i<t+n&&i<a.length;i++)r=a[i],Me(r)?i=this.handleText(i,o):16===r?i=this.extendedCommands(i,o):128<=r&&r<=135?i=this.setCurrentWindow(i,o):152<=r&&r<=159?i=this.defineWindow(i,o):136===r?i=this.clearWindows(i,o):140===r?i=this.deleteWindows(i,o):137===r?i=this.displayWindows(i,o):138===r?i=this.hideWindows(i,o):139===r?i=this.toggleWindows(i,o):151===r?i=this.setWindowAttributes(i,o):144===r?i=this.setPenAttributes(i,o):145===r?i=this.setPenColor(i,o):146===r?i=this.setPenLocation(i,o):143===r?o=this.reset(i,o):8===r?o.currentWindow.backspace():12===r?o.currentWindow.clearText():13===r?o.currentWindow.pendingNewLine=!0:14===r?o.currentWindow.clearText():141===r&&i++},ke.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return Me(n)&&(e=this.handleText(e,t,!0)),e},ke.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},ke.prototype.initService=function(e,t){var n=this;return this.services[e]=new Le(e),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},ke.prototype.handleText=function(e,t,n){var r,i,a=this.current708Packet.data[e],o=(i=De[r=(n?4096:0)|a]||r,4096&r&&r===i?"":String.fromCharCode(i)),s=t.currentWindow;return s.pendingNewLine&&!s.isEmpty()&&s.newLine(this.getPts(e)),s.pendingNewLine=!1,s.addText(o),e},ke.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},ke.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,r=n[e],i=7&r;t.setCurrentWindow(i);var a=t.currentWindow;return r=n[++e],a.visible=(32&r)>>5,a.rowLock=(16&r)>>4,a.columnLock=(8&r)>>3,a.priority=7&r,r=n[++e],a.relativePositioning=(128&r)>>7,a.anchorVertical=127&r,r=n[++e],a.anchorHorizontal=r,r=n[++e],a.anchorPoint=(240&r)>>4,a.rowCount=15&r,r=n[++e],a.columnCount=63&r,r=n[++e],a.windowStyle=(56&r)>>3,a.penStyle=7&r,a.virtualRowCount=a.rowCount+1,e},ke.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.winAttr;return r=n[++e],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++e],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++e],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++e],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,e},ke.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},ke.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},ke.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=1);return e},ke.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=0);return e},ke.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible^=1);return e},ke.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].clearText();return e},ke.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].reset();return e},ke.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penAttr;return r=n[++e],i.textTag=(240&r)>>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++e],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,e},ke.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penColor;return r=n[++e],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++e],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++e],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,e},ke.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=n[++e],i.row=15&r,r=n[++e],i.column=63&r,e},ke.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var xe={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Fe=function(e){return null===e?"":(e=xe[e]||e,String.fromCharCode(e))},Ue=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Be=function(){for(var e=[],t=15;t--;)e.push("");return e},je=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Be();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Be();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Be()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))a=Fe((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=Fe((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var o=Ue.indexOf(7968&t);"rollUp"===this.mode_&&(o-this.rollUpRows_+1<0&&(o=this.rollUpRows_-1),this.setRollUp(e.pts,o)),o!==this.row_&&(this.clearFormatting(e.pts),this.row_=o),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),a=Fe(r),a+=Fe(i),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};je.prototype=new H,je.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}})).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},je.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Be(),this.nonDisplayed_=Be(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},je.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},je.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},je.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},je.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},je.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},je.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},je.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},je.prototype.isNormalChar=function(e){return e>=32&&e<=127},je.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Be(),this.displayed_=Be()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},je.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},je.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},je.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},je.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},je.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},je.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var He={CaptionStream:Pe,Cea608Stream:je,Cea708Stream:ke},Ge={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},qe="shared",Ve=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ye=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||qe,this.push=function(e){this.type_!==qe&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=Ve(e.dts,r),e.pts=Ve(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ye.prototype=new H;var Ke,We=Ye,ze=Ve,Xe=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},Qe=function(e,t,n){return decodeURIComponent(Xe(e,t,n))},$e=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Je={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Qe(e.data,1,t),e.value=Qe(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Qe(e.data,1,t),e.url=Qe(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(Xe(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Ke=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,i=[],a=0;if(Ke.prototype.init.call(this),this.dispatchType=Ge.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,o,s,u,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=0,i.length=0),0===i.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))n.debug;else if(i.push(e),a+=e.data.byteLength,1===i.length&&(r=$e(e.data.subarray(6,10)),r+=10),!(a<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)t.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,a-=i[0].data.byteLength,i.shift();o=10,64&t.data[5]&&(o+=4,o+=$e(t.data.subarray(10,14)),r-=$e(t.data.subarray(16,20)));do{if((s=$e(t.data.subarray(o+4,o+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[o],t.data[o+1],t.data[o+2],t.data[o+3]),data:t.data.subarray(o+10,o+s+10)}).key=u.id,Je[u.id]&&(Je[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var c=u.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],u.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),o+=10,o+=s}while(o<r);this.trigger("data",t)}}}).prototype=new H;var Ze,et,tt,nt=Ke,rt=We,it=188;(Ze=function(){var e=new Uint8Array(it),t=0;Ze.prototype.init.call(this),this.push=function(n){var r,i=0,a=it;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;a<r.byteLength;)71!==r[i]||71!==r[a]?(i++,a++):(this.trigger("data",r.subarray(i,a)),i+=it,a+=it);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){t===it&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new H,(et=function(){var e,t,n,r;et.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var a=e[i],o=(31&e[i+1])<<8|e[i+2];a===Ge.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=o:a===Ge.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=o:a===Ge.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][o]=a),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Ge.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Ge.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new H,et.STREAM_TYPES={h264:27,adts:15},(tt=function(){var e,t=this,n={data:[],size:0},r={data:[],size:0},i={data:[],size:0},a=function(e,n,r){var i,a,o=new Uint8Array(e.size),s={type:n},u=0,l=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,u=0;u<e.data.length;u++)a=e.data[u],o.set(a.data,l),l+=a.data.byteLength;var c,d,f,h;d=s,h=(c=o)[0]<<16|c[1]<<8|c[2],d.data=new Uint8Array,1===h&&(d.packetLength=6+(c[4]<<8|c[5]),d.dataAlignmentIndicator=0!=(4&c[6]),192&(f=c[7])&&(d.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&f&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8])),i="video"===n||s.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",s)}};tt.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Ge.H264_STREAM_TYPE:e=n,t="video";break;case Ge.ADTS_STREAM_TYPE:e=r,t="audio";break;case Ge.METADATA_STREAM_TYPE:e=i,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}})[o.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(n,"video"),a(r,"audio"),a(i,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new H;var at={PAT_PID:0,MP2T_PACKET_LENGTH:it,TransportPacketStream:Ze,TransportParseStream:et,ElementaryStream:tt,TimestampRolloverStream:rt,CaptionStream:He.CaptionStream,Cea608Stream:He.Cea608Stream,Cea708Stream:He.Cea708Stream,MetadataStream:nt};for(var ot in Ge)Ge.hasOwnProperty(ot)&&(at[ot]=Ge[ot]);var st,ut=at,lt=de,ct=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(st=function(e){var t,n=0;st.prototype.init.call(this),this.push=function(r){var i,a,o,s,u,l,c=0;if(e||(n=0),"audio"===r.type)for(t?(s=t,(t=new Uint8Array(s.byteLength+r.data.byteLength)).set(s),t.set(r.data,s.byteLength)):t=r.data;c+5<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(a=2*(1&~t[c+1]),i=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(u=1024*(1+(3&t[c+6])))*lt/ct[(60&t[c+2])>>>2],o=c+i,t.byteLength<o)return;if(this.trigger("data",{pts:r.pts+n*l,dts:r.dts+n*l,sampleCount:u,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:ct[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+a,o)}),n++,t.byteLength===o)return void(t=void 0);t=t.subarray(o)}else c++},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new H;var dt,ft,ht,pt=st,gt=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,a=new Uint8Array(4),o=Math.min(4,t);if(0===o)throw new Error("no bytes available");a.set(e.subarray(i,i+o)),n=new DataView(a.buffer).getUint32(0),r=8*o,t-=o},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),a=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?a<<i|this.readBits(i):a},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(ft=function(){var e,t,n=0;ft.prototype.init.call(this),this.push=function(r){var i;t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;for(var a=t.byteLength;n<a-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<a;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<a);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new H,ht={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(dt=function(){var e,t,n,r,i,a,o,s=new ft;dt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,s.push(e))},s.on("data",(function(o){var s={trackId:t,pts:n,dts:r,data:o};switch(31&o[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(o.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(o.subarray(1)),s.config=a(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",s)})),s.on("done",(function(){e.trigger("done")})),s.on("partialdone",(function(){e.trigger("partialdone")})),s.on("reset",(function(){e.trigger("reset")})),s.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){s.flush()},this.partialFlush=function(){s.partialFlush()},this.reset=function(){s.reset()},this.endTimeline=function(){s.endTimeline()},o=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},a=function(e){var t,n,r,i,a,s,u,l,c,d,f,h,p,g=0,m=0,y=0,v=0,_=1;if(n=(t=new gt(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ht[n]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(f=3!==a?8:12,p=0;p<f;p++)t.readBoolean()&&o(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(g=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:h=[1,1];break;case 2:h=[12,11];break;case 3:h=[10,11];break;case 4:h=[16,11];break;case 5:h=[40,33];break;case 6:h=[24,11];break;case 7:h=[20,11];break;case 8:h=[32,11];break;case 9:h=[80,33];break;case 10:h=[18,11];break;case 11:h=[15,11];break;case 12:h=[64,33];break;case 13:h=[160,99];break;case 14:h=[4,3];break;case 15:h=[3,2];break;case 16:h=[2,1];break;case 255:h=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}h&&(_=h[0]/h[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(l+1)-2*g-2*m)*_),height:(2-d)*(c+1)*16-2*y-2*v,sarRatio:h}}}).prototype=new H;var mt,yt={H264Stream:dt,NalByteStream:ft},vt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],_t=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},Tt=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=_t(t,n))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Et={isLikelyAacData:function(e){var t=Tt(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:_t,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return vt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((n=bt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i))){var a=r.subarray(i+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,a,o,s=0,u=0;for(e.length?(o=e.length,(e=new Uint8Array(n.byteLength+o)).set(e.subarray(0,o)),e.set(n,o)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(s=Et.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",a),u+=s}else{if(e.length-u<10)break;if(u+(s=Et.parseId3TagSize(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+s)},this.trigger("data",i),u+=s}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new H;var St,At,Ct,wt,It=mt,Rt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Ot=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Pt=yt.H264Stream,Dt=Et.isLikelyAacData,Mt=de,Nt=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Lt=function(e,t,n,r,i,a){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:a,baseMediaDecodeTime:e}};(At=function(e,t){var n=[],r=0,i=0,a=0,o=1/0;t=t||{},At.prototype.init.call(this),this.push=function(t){Ae(e,t),e&&Rt.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(e){i=e},this.setVideoBaseMediaDecodeTime=function(e){o=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var s,u,l,c,d,f,h;0!==n.length?(s=ve(n,e,i),e.baseMediaDecodeTime=Se(e,t.keepOriginalTimestamps),h=ye(e,s,a,o),e.samples=_e(s),l=$(Te(s)),n=[],u=J(r,[e]),c=new Uint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),Ee(e),d=Math.ceil(1024*Mt/e.samplerate),s.length&&(f=s.length*d,this.trigger("segmentTimingInfo",Lt(pe(e.baseMediaDecodeTime,e.samplerate),s[0].dts,s[0].pts,s[0].dts+f,s[0].pts+f,h||0)),this.trigger("timingInfo",{start:s[0].pts,end:s[0].pts+f})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Ee(e),n=[],this.trigger("reset")}}).prototype=new H,(St=function(e,t){var n,r,i=0,a=[],o=[];t=t||{},St.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Ae(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],Ot.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var n,r,s,u,l,c,d,f,h=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=te(a),(s=ne(n))[0][0].keyFrame||((r=this.getGopForFusion_(a[0],e))?(h=r.duration,s.unshift(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.pts=r.pts,s.dts=r.dts,s.duration+=r.duration):s=re(s)),o.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Ee(e),s=p}Ae(e,s),e.samples=ie(s),l=$(ae(s)),e.baseMediaDecodeTime=Se(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=s[0],f=s[s.length-1],this.trigger("segmentTimingInfo",Lt(e.baseMediaDecodeTime,d.dts,d.pts,f.dts+f.duration,f.pts+f.duration,h)),this.trigger("timingInfo",{start:s[0].pts,end:s[s.length-1].pts+s[s.length-1].duration}),this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=J(i,[e]),c=new Uint8Array(u.byteLength+l.byteLength),i++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,o.length=0,this.trigger("reset")},this.resetStream_=function(){Ee(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,r,i,a,o,s=1/0;for(o=0;o<this.gopCache_.length;o++)i=(a=this.gopCache_[o]).gop,e.pps&&Nt(e.pps[0],a.pps[0])&&e.sps&&Nt(e.sps[0],a.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=a,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,a,s,u,l;for(a=e.byteLength,s=e.nalCount,u=e.duration,t=n=0;t<o.length&&n<e.length&&(r=o[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,a-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=a,l.duration=u,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,r,i,a,s,u;for(t=o.length-1,n=e.length-1,a=null,s=!1;t>=0&&n>=0;){if(r=o[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===o.length-1&&(a=n),n--)}if(!s&&null===a)return null;if(0===(u=s?n:a))return e;var l=e.slice(u),c=l.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){o=e}}).prototype=new H,(wt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,wt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new H,wt.prototype.flush=function(e){var t,n,r,i,a=0,o={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,Ot.forEach((function(e){o.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,Rt.forEach((function(e){o.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,r=Z(this.pendingTracks),o.initSegment=new Uint8Array(r.byteLength),o.initSegment.set(r),o.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)o.data.set(this.pendingBoxes[i],a),a+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(t=this.pendingCaptions[i]).startTime=me(t.startPts,s,this.keepOriginalTimestamps),t.endTime=me(t.endPts,s,this.keepOriginalTimestamps),o.captionStreams[t.stream]=!0,o.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=me(n.pts,s,this.keepOriginalTimestamps),o.metadata.push(n);for(o.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",o),i=0;i<o.captions.length;i++)t=o.captions[i],this.trigger("caption",t);for(i=0;i<o.metadata.length;i++)n=o.metadata[i],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},wt.prototype.setRemux=function(e){this.remuxTracks=e},(Ct=function(e){var t,n,r=this,i=!0;Ct.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new ut.MetadataStream,i.aacStream=new It,i.audioTimestampRolloverStream=new ut.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new ut.TimestampRolloverStream("timed-metadata"),i.adtsStream=new pt,i.coalesceStream=new wt(e,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(e){i.aacStream.setTimestamp(e.timeStamp)})),i.aacStream.on("data",(function(a){"timed-metadata"!==a.type&&"audio"!==a.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new At(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new ut.MetadataStream,i.packetStream=new ut.TransportPacketStream,i.parseStream=new ut.TransportParseStream,i.elementaryStream=new ut.ElementaryStream,i.timestampRolloverStream=new ut.TimestampRolloverStream,i.adtsStream=new pt,i.h264Stream=new Pt,i.captionStream=new ut.CaptionStream(e),i.coalesceStream=new wt(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(a){var o;if("metadata"===a.type){for(o=a.tracks.length;o--;)t||"video"!==a.tracks[o].type?n||"audio"!==a.tracks[o].type||((n=a.tracks[o]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=a.tracks[o]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new St(t,e),i.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new At(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Ee(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Ee(t),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=Dt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new H;var kt,xt,Ft,Ut={Transmuxer:Ct,VideoSegmentStream:St,AudioSegmentStream:At,AUDIO_PROPERTIES:Rt,VIDEO_PROPERTIES:Ot,generateSegmentTimingInfo:Lt},Bt=function(e){return e>>>0},jt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Ht=Bt,Gt=function e(t,n){var r,i,a,o,s,u=[];if(!n.length)return null;for(r=0;r<t.byteLength;)i=Ht(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),a=jt(t.subarray(r+4,r+8)),o=i>1?r+i:t.byteLength,a===n[0]&&(1===n.length?u.push(t.subarray(r+8,o)):(s=e(t.subarray(r+8,o),n.slice(1))).length&&(u=u.concat(s))),r=o;return u},qt=Bt,Vt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:qt(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=qt(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},Yt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Kt=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],a=4&n.flags[2],o=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),a&&c&&(t={flags:Yt(e.subarray(d,d+4))},d+=4,o&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},o&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),u&&(t.flags=Yt(e.subarray(d,d+4)),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n},Wt=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],a=2&r.flags[2],o=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),a&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),o&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r},zt=Re,Xt=He.CaptionStream,Qt=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},$t=function(e,t){var n=Gt(e,["moof","traf"]),r=Gt(e,["mdat"]),i={},a=[];return r.forEach((function(e,t){var r=n[t];a.push({mdat:e,traf:r})})),a.forEach((function(e){var n,r=e.mdat,a=e.traf,o=Gt(a,["tfhd"]),s=Wt(o[0]),u=s.trackId,l=Gt(a,["tfdt"]),c=l.length>0?Vt(l[0]).baseMediaDecodeTime:0,d=Gt(a,["trun"]);t===u&&d.length>0&&(n=function(e,t,n){var r,i,a,o,s=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(i=0;i+4<e.length;i+=a)if(a=s.getUint32(i),i+=4,!(a<=0))switch(31&e[i]){case 6:var l=e.subarray(i+1,i+1+a),c=Qt(i,t);if(r={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:zt(l),trackId:n},c)r.pts=c.pts,r.dts=c.dts,o=c;else{if(!o)break;r.pts=o.pts,r.dts=o.dts}u.push(r)}return u}(r,function(e,t,n){var r=t,i=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,o=n.trackId,s=[];return e.forEach((function(e){var t=Kt(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=a),e.trackId=o,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration})),s=s.concat(t)})),s}(d,c,s),u),i[u]||(i[u]=[]),i[u]=i[u].concat(n))})),i},Jt=function(){var e,t,n,r,i,a,o=!1;this.isInitialized=function(){return o},this.init=function(t){e=new Xt,o=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(n!==e[0]||r!==t[n])},this.parse=function(e,a,o){var s;if(!this.isInitialized())return null;if(!a||!o)return null;if(this.isNewInit(a,o))n=a[0],r=o[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,a,o)}return null!==(s=function(e,t,n){return null===t?null:{seiNals:$t(e,t)[t],timescale:n}}(e,n,r))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},Zt=Bt,en=function(e){return("00"+e.toString(16)).slice(-2)};kt=function(e,t){var n,r,i;return n=Gt(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return Gt(t,["tfhd"]).map((function(n){var r,i,a;return r=Zt(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,(a="number"!=typeof(a=Gt(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=Zt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=Zt(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0])||isNaN(a)?1/0:a)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},xt=function(e){var t=Gt(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},a=Gt(e,["tkhd"])[0];a&&(r=(t=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var o=Gt(e,["mdia","hdlr"])[0];if(o){var s=jt(o.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var u=Gt(e,["mdia","minf","stbl","stsd"])[0];if(u){var l=u.subarray(8);i.codec=jt(l.subarray(4,8));var c,d=Gt(l,[i.codec])[0];d&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(c=d.subarray(78),"avcC"===jt(c.subarray(4,8))&&c.length>11?(i.codec+=".",i.codec+=en(c[9]),i.codec+=en(c[10]),i.codec+=en(c[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(c=d.subarray(28),"esds"===jt(c.subarray(4,8))&&c.length>20&&0!==c[19]?(i.codec+="."+en(c[19]),i.codec+="."+en(c[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var f=Gt(e,["mdia","mdhd"])[0];f&&(i.timescale=Ft(f)),n.push(i)})),n};var tn=kt,nn=xt,rn=(Ft=function(e){var t=0===e[0]?12:20;return Zt(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},function(e){var t=31&e[1];return t<<=8,t|=e[2]}),an=function(e){return!!(64&e[1])},on=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},sn=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},un={parseType:function(e,t){var n=rn(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=an(e),n=4+on(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=an(e),r=4+on(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var a=12+((15&e[r+10])<<8|e[r+11]);a<i;){var o=r+a;t[(31&e[o+1])<<8|e[o+2]]=e[o],a+=5+((15&e[o+3])<<8|e[o+4])}return t}},parsePayloadUnitStartIndicator:an,parsePesType:function(e,t){switch(t[rn(e)]){case Ge.H264_STREAM_TYPE:return"video";case Ge.ADTS_STREAM_TYPE:return"audio";case Ge.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!an(e))return null;var t=4+on(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+on(e),n=e.subarray(t),r=0,i=0,a=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===sn(31&n[i+3])&&(a=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===sn(31&n[i+3])&&(a=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===sn(31&n[i+3])&&(a=!0),a}},ln=ze,cn={};cn.ts=un,cn.aac=Et;var dn=de,fn=188,hn=71,pn=function(e,t,n){for(var r,i,a,o,s=0,u=fn,l=!1;u<=e.byteLength;)if(e[s]!==hn||e[u]!==hn&&u!==e.byteLength)s++,u++;else{switch(r=e.subarray(s,u),cn.ts.parseType(r,t.pid)){case"pes":i=cn.ts.parsePesType(r,t.table),a=cn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(o=cn.ts.parsePesTime(r))&&(o.type="audio",n.audio.push(o),l=!0)}if(l)break;s+=fn,u+=fn}for(s=(u=e.byteLength)-fn,l=!1;s>=0;)if(e[s]!==hn||e[u]!==hn&&u!==e.byteLength)s--,u--;else{switch(r=e.subarray(s,u),cn.ts.parseType(r,t.pid)){case"pes":i=cn.ts.parsePesType(r,t.table),a=cn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(o=cn.ts.parsePesTime(r))&&(o.type="audio",n.audio.push(o),l=!0)}if(l)break;s-=fn,u-=fn}},gn=function(e,t,n){for(var r,i,a,o,s,u,l,c=0,d=fn,f=!1,h={data:[],size:0};d<e.byteLength;)if(e[c]!==hn||e[d]!==hn)c++,d++;else{switch(r=e.subarray(c,d),cn.ts.parseType(r,t.pid)){case"pes":if(i=cn.ts.parsePesType(r,t.table),a=cn.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!f&&(o=cn.ts.parsePesTime(r))&&(o.type="video",n.video.push(o),f=!0),!n.firstKeyFrame)){if(a&&0!==h.size){for(s=new Uint8Array(h.size),u=0;h.data.length;)l=h.data.shift(),s.set(l,u),u+=l.byteLength;if(cn.ts.videoPacketContainsKeyFrame(s)){var p=cn.ts.parsePesTime(s);p&&(n.firstKeyFrame=p,n.firstKeyFrame.type="video")}h.size=0}h.data.push(r),h.size+=r.byteLength}}if(f&&n.firstKeyFrame)break;c+=fn,d+=fn}for(c=(d=e.byteLength)-fn,f=!1;c>=0;)if(e[c]!==hn||e[d]!==hn)c--,d--;else{switch(r=e.subarray(c,d),cn.ts.parseType(r,t.pid)){case"pes":i=cn.ts.parsePesType(r,t.table),a=cn.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(o=cn.ts.parsePesTime(r))&&(o.type="video",n.video.push(o),f=!0)}if(f)break;c-=fn,d-=fn}},mn=function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,i=fn;i<e.byteLength;)if(e[r]!==hn||e[i]!==hn)r++,i++;else{switch(n=e.subarray(r,i),cn.ts.parseType(n,t.pid)){case"pat":t.pid=cn.ts.parsePat(n);break;case"pmt":var a=cn.ts.parsePmt(n);t.table=t.table||{},Object.keys(a).forEach((function(e){t.table[e]=a[e]}))}r+=fn,i+=fn}}(e,t),t.table){if(t.table.hasOwnProperty(r))switch(t.table[r]){case Ge.H264_STREAM_TYPE:n.video=[],gn(e,t,n),0===n.video.length&&delete n.video;break;case Ge.ADTS_STREAM_TYPE:n.audio=[],pn(e,t,n),0===n.audio.length&&delete n.audio}}return n},yn=function(e,t){var n;return(n=cn.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,a=null,o=0,s=0;e.length-s>=3;){switch(cn.aac.parseType(e,s)){case"timed-metadata":if(e.length-s<10){n=!0;break}if((o=cn.aac.parseId3TagSize(e,s))>e.length){n=!0;break}null===a&&(t=e.subarray(s,s+o),a=cn.aac.parseAacTimestamp(t)),s+=o;break;case"audio":if(e.length-s<7){n=!0;break}if((o=cn.aac.parseAdtsSize(e,s))>e.length){n=!0;break}null===i&&(t=e.subarray(s,s+o),i=cn.aac.parseSampleRate(t)),r++,s+=o;break;default:s++}if(n)return null}if(null===i||null===a)return null;var u=dn/i;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*u,pts:a+1024*r*u}]}}(e):mn(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;(void 0===n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=ln(e.dts,n),e.pts=ln(e.pts,n),e.dtsTime=e.dts/dn,e.ptsTime=e.pts/dn}))}if(e.video&&e.video.length){var r=t;if((void 0===r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=ln(e.dts,r),e.pts=ln(e.pts,r),e.dtsTime=e.dts/dn,e.ptsTime=e.pts/dn})),e.firstKeyFrame){var i=e.firstKeyFrame;i.dts=ln(i.dts,r),i.pts=ln(i.pts,r),i.dtsTime=i.dts/dn,i.ptsTime=i.pts/dn}}}(n,t),n):null},vn=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Ut.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:he(t.start.dts),presentation:he(t.start.pts)},end:{decode:he(t.end.dts),presentation:he(t.end.pts)},baseMediaDecodeTime:he(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=he(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:he(t.start.dts),presentation:he(t.start.pts)},end:{decode:he(t.end.dts),presentation:he(t.end.pts)},baseMediaDecodeTime:he(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=he(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:he(t.start),end:he(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:he(t.start),end:he(t.end)}})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new Jt,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,r=tn(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:r,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=nn(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,r="number"!=typeof n||isNaN(n)?void 0:n*de,i=yn(t,r),a=null;i&&((a={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1}).hasVideo&&(a.videoStart=i.video[0].ptsTime),a.hasAudio&&(a.audioStart=i.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:a,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(fe(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(fe(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new vn(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new vn(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})))),au=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,a=e.remux,o=e.onData,s=e.onTrackInfo,u=e.onAudioTimingInfo,l=e.onVideoTimingInfo,c=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,f=e.onId3,h=e.onCaptions,p=e.onDone,g=e.onEndedTimeline,m=e.isEndOfTimeline,y={buffer:[]},v=m;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,a=r.initSegment,o=r.captions,s=r.captionStreams,u=r.metadata,l=r.videoFrameDtsTime,c=r.videoFramePtsTime;t.buffer.push({captions:o,captionStreams:s,metadata:u});var d=e.data.segment.boxes||{data:e.data.segment.data},f={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};void 0!==l&&(f.videoFrameDtsTime=l),void 0!==c&&(f.videoFramePtsTime=c),n(f)}(n,y,o),"trackinfo"===n.data.action&&s(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,y),"audioTimingInfo"===n.data.action&&u(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&l(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&c(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&d(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&f([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&h(n.data.caption),"endedtimeline"===n.data.action&&(v=!1,g()),"transmuxed"===n.data.type&&(v||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:y,callback:p}),ou(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),void 0!==a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var _=n instanceof ArrayBuffer?n:n.buffer,T=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:_,byteOffset:T,byteLength:n.byteLength},[_])}m&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},ou=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():au(e.currentTransmux))},su=function(e,t){e.postMessage({action:t}),ou(e)},uu=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void su(t,e);t.transmuxQueue.push(su.bind(null,t,e))},lu=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void au(e);e.transmuxer.transmuxQueue.push(e)},cu=function(e){uu("reset",e)},du=function(e){var t=new iu;t.currentTransmux=null,t.transmuxQueue=[];var n=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t},fu=function(e){var t=e.transmuxer,n=e.endAction||e.action,r=e.callback,i=l()({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function i(a){a.data.action===n&&(t.removeEventListener("message",i),a.data.data&&(a.data.data=new Uint8Array(a.data.data,e.byteOffset||0,e.byteLength||a.data.data.byteLength),e.data&&(e.data=a.data.data)),r(a.data))})),e.data){var a=e.data instanceof ArrayBuffer;i.byteOffset=a?0:e.data.byteOffset,i.byteLength=e.data.byteLength;var o=[a?e.data:e.data.buffer];t.postMessage(i,o)}else t.postMessage(i)},hu=2,pu=-101,gu=-102,mu=function(e){e.forEach((function(e){e.abort()}))},yu=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:pu,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:gu,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:hu,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:hu,xhr:t}:null},vu=function(e,t,n){return function(r,i){var a=i.response,o=yu(r,i);if(o)return n(o,e);if(16!==a.byteLength)return n({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:hu,xhr:i},e);for(var s=new DataView(a),u=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),l=0;l<t.length;l++)t[l].bytes=u;return n(null,e)}},_u=function(e,t){var n=St(e.map.bytes);if("mp4"!==n){var r=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+r,code:hu})}fu({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(n){var r=n.tracks,i=n.data;return e.map.bytes=i,r.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null)}})},Tu=function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,i){var a=yu(e,i);if(a)return n(a,t);var o="arraybuffer"!==r&&i.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(i.responseText.substring(t.lastReachedChar||0)):i.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),n(null,t)}},bu=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,f=e.doneFn,h=t.map&&t.map.tracks||{},p=Boolean(h.audio&&h.video),g=i.bind(null,t,"audio","start"),m=i.bind(null,t,"audio","end"),y=i.bind(null,t,"video","start"),v=i.bind(null,t,"video","end");fu({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=n=e.data;var i=e.result;i&&(r(t,{hasAudio:i.hasAudio,hasVideo:i.hasVideo,isMuxed:p}),r=null,i.hasAudio&&!p&&g(i.audioStart),i.hasVideo&&y(i.videoStart),g=null,y=null),lu({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:p,onData:function(e){e.type="combined"===e.type?"video":e.type,d(t,e)},onTrackInfo:function(e){r&&(p&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){g&&void 0!==e.start&&(g(e.start),g=null),m&&void 0!==e.end&&m(e.end)},onVideoTimingInfo:function(e){y&&void 0!==e.start&&(y(e.start),y=null),v&&void 0!==e.end&&v(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){o(e)},onId3:function(e,n){s(t,e,n)},onCaptions:function(e){u(t,[e])},isEndOfTimeline:l,onEndedTimeline:function(){c()},onDone:function(e){f&&(e.type="combined"===e.type?"video":e.type,f(null,t,e))}})}})},Eu=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,f=e.doneFn,h=new Uint8Array(n);if(function(e){return ot(e,["moof"]).length>0}(h)){t.isFmp4=!0;var p=t.map.tracks,g={isFmp4:!0,hasVideo:!!p.video,hasAudio:!!p.audio};p.audio&&p.audio.codec&&"enca"!==p.audio.codec&&(g.audioCodec=p.audio.codec),p.video&&p.video.codec&&"encv"!==p.video.codec&&(g.videoCodec=p.video.codec),p.video&&p.audio&&(g.isMuxed=!0),r(t,g);var m=function(e){d(t,{data:h,type:g.hasAudio&&!g.isMuxed?"audio":"video"}),e&&e.length&&u(t,e),f(null,t,{})};fu({action:"probeMp4StartTime",timescales:t.map.timescales,data:h,transmuxer:t.transmuxer,callback:function(e){var r=e.data,a=e.startTime;n=r.buffer,t.bytes=h=r,g.hasAudio&&!g.isMuxed&&i(t,"audio","start",a),g.hasVideo&&i(t,"video","start",a),p.video&&r.byteLength&&t.transmuxer?fu({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:h,timescales:t.map.timescales,trackIds:[p.video.id],callback:function(e){n=e.data.buffer,t.bytes=h=e.data,m(e.captions)}}):m()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=St(h)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void f(null,t,{});bu({segment:t,bytes:n,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:f})}else f(null,t,{})},Su=function(e,t){var n,r=e.id,i=e.key,a=e.encryptedBytes,o=e.decryptionWorker;o.addEventListener("message",(function e(n){if(n.data.source===r){o.removeEventListener("message",e);var i=n.data.decrypted;t(new Uint8Array(i.bytes,i.byteOffset,i.byteLength))}})),n=i.bytes.slice?i.bytes.slice():new Uint32Array(Array.prototype.slice.call(i.bytes)),o.postMessage(Us({source:r,encrypted:a,key:n,iv:i.iv}),[a.buffer,n.buffer])},Au=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,f=e.doneFn,h=0,p=!1;return function(e,g){if(!p){if(e)return p=!0,mu(t),f(e,g);if((h+=1)===t.length){var m=function(){if(g.encryptedBytes)return function(e){var t=e.decryptionWorker,n=e.segment,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,f=e.doneFn;Su({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:t},(function(e){n.bytes=e,Eu({segment:n,bytes:n.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:f})}))}({decryptionWorker:n,segment:g,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:f});Eu({segment:g,bytes:g.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:f})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return Su({decryptionWorker:n,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},(function(e){g.map.bytes=e,_u(g,(function(e){if(e)return mu(t),f(e,g);m()}))}));m()}}}},Cu=function(e){var t=e.segment,n=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=Uo.mergeOptions(t.stats,function(e){var t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}},wu=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,i=e.segment,a=e.abortFn,o=e.progressFn,s=e.trackInfoFn,u=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,f=e.captionsFn,h=e.isEndOfTimeline,p=e.endedTimelineFn,g=e.dataFn,m=e.doneFn,y=[],v=Au({activeXhrs:y,decryptionWorker:r,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:f,isEndOfTimeline:h,endedTimelineFn:p,dataFn:g,doneFn:m});if(i.key&&!i.key.bytes){var _=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&_.push(i.map.key);var T=t(Uo.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),vu(i,_,v));y.push(T)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){var b=t(Uo.mergeOptions(n,{uri:i.map.key.resolvedUri,responseType:"arraybuffer"}),vu(i,[i.map.key],v));y.push(b)}var E=t(Uo.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Ls(i.map)}),function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var i=yu(e,r);if(i)return n(i,t);var a=new Uint8Array(r.response);if(t.map.key)return t.map.encryptedBytes=a,n(null,t);t.map.bytes=a,_u(t,(function(e){if(e)return e.xhr=r,e.status=r.status,n(e,t);n(null,t)}))}}({segment:i,finishProcessingFn:v}));y.push(E)}var S=Uo.mergeOptions(n,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:Ls(i)}),A=t(S,Tu({segment:i,finishProcessingFn:v,responseType:S.responseType}));A.addEventListener("progress",Cu({segment:i,progressFn:o,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:f,isEndOfTimeline:h,endedTimelineFn:p,dataFn:g})),y.push(A);var C={};return y.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:C,abortFn:a}))})),function(){return mu(y)}},Iu=qo("CodecUtils"),Ru=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Ou=function(e){var t={};return e.forEach((function(e){var n=e.mediaType,r=e.type,i=e.details;t[n]=t[n]||[],t[n].push(q(""+r+i))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return Iu("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},Pu=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},Du=function(e,t){var n=t.attributes||{},r=Ou(function(e){var t=e.attributes||{};if(t.CODECS)return V(t.CODECS)}(t)||[]);if(Ru(e,t)&&!r.audio&&!function(e,t){if(!Ru(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(e,t)){var i=Ou(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return V(i.playlists[0].attributes.CODECS)}return null}(e,n.AUDIO)||[]);i.audio&&(r.audio=i.audio)}return r},Mu=qo("PlaylistSelector"),Nu=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Lu=function(e,t){if(!e)return"";var n=a.a.getComputedStyle(e);return n?n[t]:""},ku=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},xu=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||a.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||a.a.Number.MAX_VALUE)},Fu=function(e,t,n,r,i,o){if(e){var s={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:i},u=e.playlists;gs.isAudioOnly(e)&&(u=o.getAudioTrackPlaylists_(),s.audioOnly=!0);var l=u.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||a.a.Number.MAX_VALUE,width:t,height:n,playlist:e}}));ku(l,(function(e,t){return e.bandwidth-t.bandwidth}));var c=(l=l.filter((function(e){return!gs.isIncompatible(e.playlist)}))).filter((function(e){return gs.isEnabled(e.playlist)}));c.length||(c=l.filter((function(e){return!gs.isDisabled(e.playlist)})));var d=c.filter((function(e){return e.bandwidth*Zs.BANDWIDTH_VARIANCE<t})),f=d[d.length-1],h=d.filter((function(e){return e.bandwidth===f.bandwidth}))[0];if(!1===i){var p=h||c[0]||l[0];if(p&&p.playlist){var g="sortedPlaylistReps";return h&&(g="bandwidthBestRep"),c[0]&&(g="enabledPlaylistReps"),Mu("choosing "+Nu(p)+" using "+g+" with options",s),p.playlist}return Mu("could not choose a playlist with options",s),null}var m=d.filter((function(e){return e.width&&e.height}));ku(m,(function(e,t){return e.width-t.width}));var y=m.filter((function(e){return e.width===n&&e.height===r}));f=y[y.length-1];var v,_,T,b=y.filter((function(e){return e.bandwidth===f.bandwidth}))[0];b||(_=(v=m.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===v[0].width&&e.height===v[0].height})),f=_[_.length-1],T=_.filter((function(e){return e.bandwidth===f.bandwidth}))[0]);var E=T||b||h||c[0]||l[0];if(E&&E.playlist){var S="sortedPlaylistReps";return T?S="resolutionPlusOneRep":b?S="resolutionBestRep":h?S="bandwidthBestRep":c[0]&&(S="enabledPlaylistReps"),Mu("choosing "+Nu(E)+" using "+S+" with options",s),E.playlist}return Mu("could not choose a playlist with options",s),null}},Uu=function(){var e=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return Fu(this.playlists.master,this.systemBandwidth,parseInt(Lu(this.tech_.el(),"width"),10)*e,parseInt(Lu(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Bu=function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,i=e.videoDuration;if(n){var o=a.a.WebKitDataCue||a.a.VTTCue,s=t.metadataTrack_;if(s&&(n.forEach((function(e){var t=e.cueTime+r;!("number"!=typeof t||a.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new o(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Uo.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Uo.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Uo.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),s.addCue(n)}))})),s.cues&&s.cues.length)){for(var u=s.cues,l=[],c=0;c<u.length;c++)u[c]&&l.push(u[c]);var d=l.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),f=Object.keys(d).sort((function(e,t){return Number(e)-Number(t)}));f.forEach((function(e,t){var n=d[e],r=Number(f[t+1])||i;n.forEach((function(e){e.endTime=r}))}))}}},ju=function(e,t,n){var r,i;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime>=e&&i.endTime<=t&&n.removeCue(i)},Hu=function(e){return"number"==typeof e&&isFinite(e)},Gu=1/60,qu=function(e){var t=e.startOfSegment,n=e.duration,r=e.segment,i=e.part,a=e.playlist,o=a.mediaSequence,s=a.id,u=a.segments,l=void 0===u?[]:u,c=e.mediaIndex,d=e.partIndex,f=e.timeline,h=l.length-1,p="mediaIndex/partIndex increment";e.getMediaInfoForTime?p="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(p="getSyncSegmentCandidate (isSyncRequest)");var g="number"==typeof d,m=e.segment.uri?"segment":"pre-segment",y=g?ts({preloadSegment:r})-1:0;return m+" ["+(o+c)+"/"+(o+h)+"]"+(g?" part ["+d+"/"+y+"]":"")+" segment start/end ["+r.start+" => "+r.end+"]"+(g?" part start/end ["+i.start+" => "+i.end+"]":"")+" startOfSegment ["+t+"] duration ["+n+"] timeline ["+f+"] selected by ["+p+"] playlist ["+s+"]"},Vu=function(e){return e+"TimingInfo"},Yu=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,a=e.audioDisabled;if(n===r)return!1;if("audio"===i){var o=t.lastTimelineChange({type:"main"});return!o||o.to!==r}if("main"===i&&a){var s=t.pendingTimelineChange({type:"audio"});return!s||s.to!==r}return!1},Ku=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+Vo},Wu=function(e,t){if("hls"!==t)return null;var n,r,i,a,o=(n=e.audioTimingInfo,r=e.videoTimingInfo,i=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,a=r&&"number"==typeof r.start&&"number"==typeof r.end?r.end-r.start:0,Math.max(i,a));if(!o)return null;var s=e.playlist.targetDuration,u=Ku({segmentDuration:o,maxDuration:2*s}),l=Ku({segmentDuration:o,maxDuration:s}),c="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+o+" when the reported duration is "+e.duration+" and the target duration is "+s+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return u||l?{severity:u?"warn":"info",message:c}:null},zu=function(e){function t(t,n){var r;if(r=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=t.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.partIndex=null,r.hasPlayed_=t.hasPlayed,r.currentTime_=t.currentTime,r.seekable_=t.seekable,r.seeking_=t.seeking,r.duration_=t.duration,r.mediaSource_=t.mediaSource,r.vhs_=t.vhs,r.loaderType_=t.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=t.segmentMetadataTrack,r.goalBufferLength_=t.goalBufferLength,r.sourceType_=t.sourceType,r.sourceUpdater_=t.sourceUpdater,r.inbandTextTracks_=t.inbandTextTracks,r.state_="INIT",r.timelineChangeController_=t.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.parse708captions_=t.parse708captions,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=Uo.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=qo("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(d()(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}h()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return du({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,a.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&cu(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return Uo.createTimeRanges();if("main"===this.loaderType_){var e=this.startingMediaInfo_,t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Bs(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=js(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null!==this.mediaIndex&&this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var a=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var o=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!o.parts||!o.parts.length||!o.parts[this.partIndex])){var s=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=s}}r&&(r.mediaIndex-=a,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&cu(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n,r){if(void 0===n&&(n=function(){}),void 0===r&&(r=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.startingMediaInfo_){var i=1,a=function(){0===--i&&n()};for(var o in!r&&this.audioDisabled_||(i++,this.sourceUpdater_.removeAudio(e,t,a)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*At.ONE_SECOND_IN_TS),a=Math.ceil((n-r)*At.ONE_SECOND_IN_TS),o=e.slice(),s=e.length;s--&&!(e[s].pts<=a););if(-1===s)return o;for(var u=s+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),o.splice(u,s-u+1),o}(this.gopBuffer_,e,t,this.timeMapping_),i++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)ju(e,t,this.inbandTextTracks_[o]);ju(e,t,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var r="number"==typeof e&&t.segments[e],i=e+1===t.segments.length,a=!r||!r.parts||n+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&i&&a},n.chooseNextRequest_=function(){var e=$o(this.buffered_())||0,t=Math.max(0,e-this.currentTime_()),n=!this.hasPlayed_()&&t>=1,r=t>=this.goalBufferLength_(),i=this.playlist_.segments;if(!i.length||n||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,n){t=t||[];for(var r=[],i=0,a=0;a<t.length;a++){var o=t[a];if(e===o.timeline&&(r.push(a),(i+=o.duration)>n))return a}return 0===r.length?0:r[r.length-1]}(this.currentTimeline_,i,e);else if(null!==this.mediaIndex){var o=i[this.mediaIndex],s="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=o.end?o.end:e,o.parts&&o.parts[s+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=s+1):a.mediaIndex=this.mediaIndex+1}else{var u=gs.getMediaInfoForTime({playlist:this.playlist_,currentTime:this.fetchAtBuffer_?e:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),l=u.segmentIndex,c=u.startTime,d=u.partIndex;a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd":"currentTime",a.mediaIndex=l,a.startOfSegment=c,a.partIndex=d}var f=i[a.mediaIndex],h=f&&"number"==typeof a.partIndex&&f.parts&&f.parts[a.partIndex];if(!f||"number"==typeof a.partIndex&&!h)return null;"number"!=typeof a.partIndex&&f.parts&&(a.partIndex=0);var p=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=i.length-1&&p&&!this.seeking_()?null:this.generateSegmentInfo_(a)},n.generateSegmentInfo_=function(e){var t=e.playlist,n=e.mediaIndex,r=e.startOfSegment,i=e.isSyncRequest,a=e.partIndex,o=e.forceTimestampOffset,s=e.getMediaInfoForTime,u=t.segments[n],l="number"==typeof a&&u.parts[a],c={requestId:"segment-loader-"+Math.random(),uri:l&&l.resolvedUri||u.resolvedUri,mediaIndex:n,partIndex:l?a:null,isSyncRequest:i,startOfSegment:r,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:l&&l.duration||u.duration,segment:u,part:l,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:s},d=void 0!==o?o:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:d});var f=$o(this.sourceUpdater_.audioBuffered());return"number"==typeof f&&(c.audioAppendStart=f-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=function(e,t,n){if(null==t||!e.length)return[];var r,i=Math.ceil((t-n+3)*At.ONE_SECOND_IN_TS);for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c},n.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,r=t.currentTimeline,i=t.startOfSegment,a=t.buffered,t.overrideCheck||n!==r?n<r?i:a.length?a.end(a.length-1):i:null;var t,n,r,i,a},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=gs.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),a=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(i<=a)){var o=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,i=e.duration,a=e.segmentDuration,o=e.timeUntilRebuffer,s=e.currentTimeline,u=e.syncController,l=t.playlists.filter((function(e){return!gs.isIncompatible(e)})),c=l.filter(gs.isEnabled);c.length||(c=l.filter((function(e){return!gs.isDisabled(e)})));var d=c.filter(gs.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=u.getSyncPoint(e,i,s,n)?1:2;return{playlist:e,rebufferingImpact:gs.estimateSegmentRequestTime(a,r,e)*t-o}})),f=d.filter((function(e){return e.rebufferingImpact<=0}));return ku(f,(function(e,t){return xu(t.playlist,e.playlist)})),f.length?f[0]:(ku(d,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),d[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(o){var s=i-a-o.rebufferingImpact,u=.5;a<=Vo&&(u=1),!o.playlist||o.playlist.uri===this.playlist_.uri||s<u||(this.bandwidth=o.playlist.attributes.BANDWIDTH*Zs.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(e){this.logger_("Aborting "+qu(e)),this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var a=n[i];if(a!==r[i])return!1;if(e[a]!==t[a])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var i=this.pendingSegment_,a=Vu(t);i[a]=i[a]||{},i[a][n]=r,this.logger_("timinginfo: "+t+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),i={};t.forEach((function(e){i[e.stream]=i[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=i[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)})),Object.keys(i).forEach((function(e){var t=i[e],o=t.startTime,s=t.endTime,u=t.captions,l=n.inbandTextTracks_;n.logger_("adding cues from "+o+" -> "+s+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=n;/^cc708_/.test(n)&&(r="SERVICE"+n.split("_")[1]);var i=t.textTracks().getTrackById(r);if(i)e[n]=i;else{var a=n,o=n,s=!1,u=(t.options_.vhs&&t.options_.vhs.captionServices||{})[r];u&&(a=u.label,o=u.language,s=u.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:r,default:s,label:a,language:o},!1).track}}}(l,n.vhs_.tech_,e),ju(o,s,l[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var i=a.a.WebKitDataCue||a.a.VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new i(e.startTime+r,e.endTime+r,e.text))}))}}({captionArray:u,inbandTextTracks:l,timestampOffset:r})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),Bu({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.currentMediaInfo_||!Yu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_;if(!e||!e.trackInfo)return!1;var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed;return!(r&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!i&&!e.audioTimingInfo)&&!Yu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[Vu(t.type)].start;else{var r,i="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo;i&&(r=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:i,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});var a=this.chooseNextRequest_();if(a.mediaIndex!==n.mediaIndex||a.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var a=Bs(r);if(this.activeInitSegmentId_===a)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=a}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},n.handleQuotaExceededError_=function(e,t){var n=this,r=e.segmentInfo,i=e.type,o=e.bytes,s=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Qo(s).join(", ")),u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Qo(u).join(", "));var l=s.length?s.start(0):0,c=s.length?s.end(s.length-1):0,d=u.length?u.start(0):0,f=u.length?u.end(u.length-1):0;if(c-l<=1&&f-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+o.byteLength+", audio buffer: "+Qo(s).join(", ")+", video buffer: "+Qo(u).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:r,type:i,bytes:o}));var h=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+h),this.remove(0,h,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=a.a.setTimeout((function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()}),1e3)}),!0)},n.handleAppendError_=function(e,t){var n=e.segmentInfo,r=e.type,i=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(r+" append of "+i.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:r,bytes:i}))},n.appendToSourceBuffer_=function(e){var t,n,r,i=e.segmentInfo,a=e.type,o=e.initSegment,s=e.data,u=e.bytes;if(!u){var l=[s],c=s.byteLength;o&&(l.unshift(o),c+=o.byteLength),r=0,(t={bytes:c,segments:l}).bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach((function(e){n.set(e,r),r+=e.byteLength}))),u=n}this.sourceUpdater_.appendBuffer({segmentInfo:i,type:a,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:i,type:a,bytes:u}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=e+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=l()({},e,{forceTimestampOffset:!0});l()(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var n=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&e.timeline>0,o=r||i&&a;this.logger_("Requesting "+qu(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=wu({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:o,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-Zs.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,r={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},i=e.playlist.segments[e.mediaIndex-1];if(i&&i.timeline===t.timeline&&(i.videoTimingInfo?r.baseStartTime=i.videoTimingInfo.transmuxedDecodeEnd:i.audioTimingInfo&&(r.baseStartTime=i.audioTimingInfo.transmuxedDecodeEnd)),t.key){var a=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=a}return t.map&&(r.map=this.initSegmentForMap(t.map)),r},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<Gu?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record 0.016666666666666666"):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===gu)return;return this.pause(),e.code===pu?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,o=e.useVideoTimingInfo,s=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!o)return u.start;var l=n.segments[r-1];return 0!==r&&l&&void 0!==l.start&&l.end===i+a?s.start:i},n.waitForAppendsToComplete_=function(e){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed,a="main"===this.loaderType_&&r,o=!this.audioDisabled_&&n&&!i;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,o&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),o&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.currentMediaInfo_,e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=Wu(e,this.sourceType_);if(t&&("warn"===t.severity?Uo.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",!e.isSyncRequest||(this.trigger("syncinfoupdate"),e.hasAppendedData_)){this.logger_("Appended "+qu(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment;if(n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration)this.resetEverything();else null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+qu(e))},n.recordThroughput_=function(e){if(e.duration<Gu)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record 0.016666666666666666");else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(Hu(n)&&Hu(r)){ju(n,r,this.segmentMetadataTrack_);var i=a.a.WebKitDataCue||a.a.VTTCue,o={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:r},s=new i(n,r,JSON.stringify(o));s.value=o,this.segmentMetadataTrack_.addCue(s)}}},t}(Uo.EventTarget);function Xu(){}var Qu,$u=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Ju=["video","audio"],Zu=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},el=function e(t,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!Zu(t,n)){if(i.type!==t){if(null===(r=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("mediaSource"===r.type)return null;if(r.type===e)return n}return null}(t,n.queue)))return;i=n.queue[r]}return n.queue.splice(r,1),n.queuePending[t]=i,i.action(t,n),i.doneFn?void 0:(n.queuePending[t]=null,void e(t,n))}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),i.action(n),i.doneFn&&i.doneFn(),e("audio",n),e("video",n))}},tl=function(e,t){var n=t[e+"Buffer"],r=$u(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},nl=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},rl=function(e,t,n){return function(r,i){var a=i[r+"Buffer"];if(nl(i.mediaSource,a)){i.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+r+"Buffer");try{a.appendBuffer(e)}catch(e){i.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+r+"Buffer"),i.queuePending[r]=null,n(e)}}}},il=function(e,t){return function(n,r){var i=r[n+"Buffer"];if(nl(r.mediaSource,i)){r.logger_("Removing "+e+" to "+t+" from "+n+"Buffer");try{i.remove(e,t)}catch(i){r.logger_("Remove "+e+" to "+t+" from "+n+"Buffer failed")}}}},al=function(e){return function(t,n){var r=n[t+"Buffer"];nl(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},ol=function(e){return function(t,n){e()}},sl=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){Uo.log.warn("Failed to call media source endOfStream",e)}}}},ul=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(e){Uo.log.warn("Failed to set media source duration",e)}}},ll=function(){return function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(nl(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){Uo.log.warn("Failed to abort on "+e+"Buffer",t)}}}}},cl=function(e,t){return function(n){var r=$u(e),i=K(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var a=n.mediaSource.addSourceBuffer(i);a.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),a.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=a}},dl=function(e){return function(t){var n=t[e+"Buffer"];if(tl(e,t),nl(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){Uo.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},fl=function(e){return function(t,n){var r=n[t+"Buffer"],i=K(e);nl(n.mediaSource,r)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),r.changeType(i),n.codecs[t]=e)}},hl=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,i=e.doneFn,a=e.name;n.queue.push({type:t,action:r,doneFn:i,name:a}),el(t,n)},pl=function(e,t){return function(n){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}el(e,t)}},gl=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return el("mediaSource",d()(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=qo("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=pl("video",d()(n)),n.onAudioUpdateEnd_=pl("audio",d()(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}h()(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){hl({type:"mediaSource",sourceUpdater:this,action:cl(e,t),name:"addSourceBuffer"})},n.abort=function(e){hl({type:e,sourceUpdater:this,action:ll(e),name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?hl({type:"mediaSource",sourceUpdater:this,action:dl(e),name:"removeSourceBuffer"}):Uo.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!Uo.browser.IE_VERSION&&!Uo.browser.IS_FIREFOX&&a.a.MediaSource&&a.a.MediaSource.prototype&&"function"==typeof a.a.MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return a.a.SourceBuffer&&a.a.SourceBuffer.prototype&&"function"==typeof a.a.SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?hl({type:e,sourceUpdater:this,action:fl(t),name:"changeType"}):Uo.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(n){var r=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,r);t.canChangeType()&&t.changeType(n,r)}))},n.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,i=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");if(hl({type:i,sourceUpdater:this,action:rl(a,r||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var o=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+o.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,o.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return nl(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Uo.createTimeRange()},n.videoBuffered=function(){return nl(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Uo.createTimeRange()},n.buffered=function(){var e=nl(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=nl(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,r=null,i=0,a=[],o=[];if(!(e&&e.length&&t&&t.length))return Uo.createTimeRange();for(var s=e.length;s--;)a.push({time:e.start(s),type:"start"}),a.push({time:e.end(s),type:"end"});for(s=t.length;s--;)a.push({time:t.start(s),type:"start"}),a.push({time:t.end(s),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),s=0;s<a.length;s++)"start"===a[s].type?2==++i&&(n=a[s].time):"end"===a[s].type&&1==--i&&(r=a[s].time),null!==n&&null!==r&&(o.push([n,r]),n=null,r=null);return Uo.createTimeRanges(o)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=Xu),hl({type:"mediaSource",sourceUpdater:this,action:ul(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=Xu),"string"!=typeof e&&(e=void 0),hl({type:"mediaSource",sourceUpdater:this,action:sl(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=Xu),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?hl({type:"audio",sourceUpdater:this,action:il(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=Xu),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?hl({type:"video",sourceUpdater:this,action:il(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!Zu("audio",this)&&!Zu("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(hl({type:"audio",sourceUpdater:this,action:al(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(hl({type:"video",sourceUpdater:this,action:al(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&hl({type:"audio",sourceUpdater:this,action:ol(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&hl({type:"video",sourceUpdater:this,action:ol(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),Ju.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return tl(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Uo.EventTarget),ml=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},yl=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),vl=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.shouldSaveSegmentTimingInfo_=!1,r}h()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Uo.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Uo.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Bs(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=yl.byteLength+e.bytes.byteLength,a=new Uint8Array(i);a.set(e.bytes),a.set(yl,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){ju(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}},n.timestampOffsetForSegment_=function(){return null},n.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===pu&&this.handleTimeout_(),e.code===gu?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),this.state="APPENDING",this.trigger("appending");var o=i.segment;if(o.map&&(o.map.bytes=t.map.bytes),i.bytes=t.bytes,"function"!=typeof a.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var s,u=function(){r.subtitlesTrack_.tech_.off("vttjsloaded",s),r.stopForError({message:"Error loading vtt.js"})};return s=function(){r.subtitlesTrack_.tech_.off("vttjserror",u),r.segmentRequestFinished_(e,t,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",s),void this.subtitlesTrack_.tech_.one("vttjserror",u)}o.requested=!0;try{this.parseVTTCues_(i)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,i.cues.forEach((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new a.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var r=[],i=0,a=0;a<t.length;a++)t[n].startTime===t[a].startTime&&t[n].endTime===t[a].endTime&&t[n].text===t[a].text&&++i>1&&r.push(t[a]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;"function"==typeof a.a.TextDecoder?t=new a.a.TextDecoder("utf8"):(t=a.a.WebVTT.StringDecoder(),n=!0);var r=new a.a.WebVTT.Parser(a.a,a.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){Uo.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var i=e.segment.map.bytes;n&&(i=ml(i)),r.parse(i)}var o=e.bytes;n&&(o=ml(o)),r.parse(o),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,a=i.MPEGTS/At.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!n.syncInfo){var o=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(o,s-r.duration)}}}else r.empty=!0},t}(zu),_l=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},Tl=[{name:"VOD",run:function(e,t,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=null,o=null,s=Zo(t);i=i||0;for(var u=0;u<s.length;u++){var l=s[t.endList||0===i?u:s.length-(u+1)],c=l.segment,d=e.timelineToDatetimeMappings[c.timeline];if(d&&c.dateTimeObject){var f=c.dateTimeObject.getTime()/1e3+d;if(c.parts&&"number"==typeof l.partIndex)for(var h=0;h<l.partIndex;h++)f+=c.parts[h].duration;var p=Math.abs(i-f);if(null!==o&&(0===p||o<p))break;o=p,a={time:f,segmentIndex:l.segmentIndex,partIndex:l.partIndex}}}return a}},{name:"Segment",run:function(e,t,n,r,i){var a=null,o=null;i=i||0;for(var s=Zo(t),u=0;u<s.length;u++){var l=s[t.endList||0===i?u:s.length-(u+1)],c=l.segment,d=l.part&&l.part.start||c&&c.start;if(c.timeline===r&&void 0!==d){var f=Math.abs(i-d);if(null!==o&&o<f)break;(!a||null===o||o>=f)&&(o=f,a={time:d,segmentIndex:l.segmentIndex,partIndex:l.partIndex})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=null,s=0;s<t.discontinuityStarts.length;s++){var u=t.discontinuityStarts[s],l=t.discontinuitySequence+s+1,c=e.discontinuities[l];if(c){var d=Math.abs(i-c.time);if(null!==o&&o<d)break;(!a||null===o||o>=d)&&(o=d,a={time:c.time,segmentIndex:u,partIndex:null})}}return a}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],bl=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=qo("SyncController"),n}h()(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+as({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))},n.runStrategies_=function(e,t,n,r){for(var i=[],a=0;a<Tl.length;a++){var o=Tl[a],s=o.run(this,e,t,n,r);s&&(s.strategy=o.name,i.push({strategy:o.name,syncPoint:s}))}return i},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,a=1;a<e.length;a++){var o=Math.abs(e[a].syncPoint[t.key]-t.value);o<r&&(r=o,n=e[a].syncPoint,i=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+("number"==typeof n.partIndex?",partIndex:"+n.partIndex:"")+"]"),n},n.saveExpiredSegmentInfo=function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,r=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),i=t.segment;r&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));var a=i.dateTimeObject;i.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[i.timeline]=-a.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var r,i,a=e.segment,o=e.part,s=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)s={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=s,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+s.time+"] [mapping: "+s.mapping+"]")),r=e.startOfSegment,i=t.end+s.mapping;else{if(!s)return!1;r=t.start+s.mapping,i=t.end+s.mapping}return o&&(o.start=r,o.end=i),(!a.start||r<a.start)&&(a.start=r),a.end=i,!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],a=t.discontinuitySequence+r+1,o=i-e.mediaIndex,s=Math.abs(o);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>s){var u=void 0;u=o<0?n.start-as({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:i}):n.end+as({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:i}),this.discontinuities[a]={time:u,accuracy:s}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Uo.EventTarget),El=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}h()(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Uo.EventTarget),Sl=tu(nu(ru((function(){function e(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var t=e((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0})),n=e((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),r=e((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),i=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,o=0;o<a;++o)t[o].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();var a=null,o=function(){function e(e){var t,n,r;a||(a=function(){var e,t,n,r,i,a,o,s,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],c=u[1],d=l[4],f=c[4],h=[],p=[];for(e=0;e<256;e++)p[(h[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=r||1,n=p[n]||1)for(a=(a=n^n<<1^n<<2^n<<3^n<<4)>>8^255&a^99,d[t]=a,f[a]=t,s=16843009*h[i=h[r=h[t]]]^65537*i^257*r^16843008*t,o=257*h[a]^16843008*a,e=0;e<4;e++)l[e][t]=o=o<<24^o>>>8,c[e][a]=s=s<<24^s>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}()),this._tables=[[a[0][0].slice(),a[0][1].slice(),a[0][2].slice(),a[0][3].slice(),a[0][4].slice()],[a[1][0].slice(),a[1][1].slice(),a[1][2].slice(),a[1][3].slice(),a[1][4].slice()]];var i=this._tables[0][4],o=this._tables[1],s=e.length,u=1;if(4!==s&&6!==s&&8!==s)throw new Error("Invalid aes key size");var l=e.slice(0),c=[];for(this._key=[l,c],t=s;t<4*s+28;t++)r=l[t-1],(t%s==0||8===s&&t%s==4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],t%s==0&&(r=r<<8^r>>>24^u<<24,u=u<<1^283*(u>>7))),l[t]=l[t-s]^r;for(n=0;t;n++,t--)r=l[3&n?t:t-4],c[n]=t<=4||n<4?r:o[0][i[r>>>24]]^o[1][i[r>>16&255]]^o[2][i[r>>8&255]]^o[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,a){var o,s,u,l,c=this._key[1],d=e^c[0],f=r^c[1],h=n^c[2],p=t^c[3],g=c.length/4-2,m=4,y=this._tables[1],v=y[0],_=y[1],T=y[2],b=y[3],E=y[4];for(l=0;l<g;l++)o=v[d>>>24]^_[f>>16&255]^T[h>>8&255]^b[255&p]^c[m],s=v[f>>>24]^_[h>>16&255]^T[p>>8&255]^b[255&d]^c[m+1],u=v[h>>>24]^_[p>>16&255]^T[d>>8&255]^b[255&f]^c[m+2],p=v[p>>>24]^_[d>>16&255]^T[f>>8&255]^b[255&h]^c[m+3],m+=4,d=o,f=s,h=u;for(l=0;l<4;l++)i[(3&-l)+a]=E[d>>>24]<<24^E[f>>16&255]<<16^E[h>>8&255]<<8^E[255&p]^c[m++],o=d,d=f,f=h,h=p,p=o},e}(),s=function(e){function t(){var t;return(t=e.call(this,i)||this).jobs=[],t.delay=1,t.timeout_=null,t}r(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(i),u=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},l=function(){function e(t,n,r,i){var a=e.STEP,o=new Int32Array(t.buffer),l=new Uint8Array(t.byteLength),c=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(o.subarray(c,c+a),n,r,l)),c=a;c<o.length;c+=a)r=new Uint32Array([u(o[c-4]),u(o[c-3]),u(o[c-2]),u(o[c-1])]),this.asyncStream_.push(this.decryptChunk_(o.subarray(c,c+a),n,r,l));this.asyncStream_.push((function(){var e;i(null,(e=l).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=function(e,t,n){var r,i,a,s,l,c,d,f,h,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),g=new o(Array.prototype.slice.call(t)),m=new Uint8Array(e.byteLength),y=new Int32Array(m.buffer);for(r=n[0],i=n[1],a=n[2],s=n[3],h=0;h<p.length;h+=4)l=u(p[h]),c=u(p[h+1]),d=u(p[h+2]),f=u(p[h+3]),g.decrypt(l,c,d,f,y,h),y[h]=u(y[h]^r),y[h+1]=u(y[h+1]^i),y[h+2]=u(y[h+2]^a),y[h+3]=u(y[h+3]^s),r=l,i=c,a=d,s=f;return m}(e,t,n);r.set(i,e.byteOffset)}},t(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();self.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),i=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new l(n,r,i,(function(e,n){var r,i;self.postMessage((r={source:t.source,decrypted:n},i={},Object.keys(r).forEach((function(e){var t=r[e];ArrayBuffer.isView(t)?i[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:i[e]=t})),i),[n.buffer])}))}})))),Al=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Cl=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},wl=function(e,t){t.activePlaylistLoader=e,e.load()},Il={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;Cl(n,r);var a=r.activeTrack(),o=r.activeGroup(),s=(o.filter((function(e){return e.default}))[0]||o[0]).id,u=r.tracks[s];if(a!==u){for(var l in Uo.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];Uo.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Cl(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Rl={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",Il[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e],o=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),a.track(o.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",Il[e](e,n))}},Ol={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],a=t.requestOptions,o=t.master.mediaGroups,s=t.mediaTypes[e],u=s.groups,l=s.tracks,c=s.logger_,d=t.masterPlaylistLoader,f=ps(d.master);for(var h in o[e]&&0!==Object.keys(o[e]).length||(o[e]={main:{default:{default:!0}}}),o[e])for(var p in u[h]||(u[h]=[]),o[e][h]){var g=o[e][h][p],m=void 0;if(f?(c("AUDIO group '"+h+"' label '"+p+"' is a master playlist"),g.isMasterPlaylist=!0,m=null):m="vhs-json"===r&&g.playlists?new Os(g.playlists[0],n,a):g.resolvedUri?new Os(g.resolvedUri,n,a):g.playlists&&"dash"===r?new Js(g.playlists[0],n,a,d):null,g=Uo.mergeOptions({id:p,playlistLoader:m},g),Rl[e](e,g.playlistLoader,t),u[h].push(g),void 0===l[p]){var y=new Uo.AudioTrack({id:p,kind:Al(g),enabled:!1,language:g.language,default:g.default,label:p});l[p]=y}}i.on("error",Il[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,a=t.segmentLoaders[e],o=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(var f in s[e])for(var h in l[f]||(l[f]=[]),s[e][f])if(!s[e][f][h].forced){var p=s[e][f][h],g=void 0;if("hls"===i)g=new Os(p.resolvedUri,r,o);else if("dash"===i){if(!p.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;g=new Js(p.playlists[0],r,o,d)}else"vhs-json"===i&&(g=new Os(p.playlists?p.playlists[0]:p.resolvedUri,r,o));if(p=Uo.mergeOptions({id:h,playlistLoader:g},p),Rl[e](e,p.playlistLoader,t),l[f].push(p),void 0===c[h]){var m=n.addRemoteTextTrack({id:h,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:h},!1).track;c[h]=m}}a.on("error",Il[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],a=i.groups,o=i.tracks;for(var s in r[e])for(var u in a[s]||(a[s]=[]),r[e][s]){var l=r[e][s][u];if(/^(?:CC|SERVICE)/.test(l.instreamId)){var c=n.options_.vhs&&n.options_.vhs.captionServices||{},d={label:u,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};if(c[d.instreamId]&&(d=Uo.mergeOptions(d,c[d.instreamId])),void 0===d.default&&delete d.default,a[s].push(Uo.mergeOptions({id:u},l)),void 0===o[u]){var f=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;o[u]=f}}}}},Pl=function e(t,n){for(var r=0;r<t.length;r++){if(fs(n,t[r]))return!0;if(t[r].playlists&&e(t[r].playlists,n))return!0}return!1},Dl={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},Ml=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Ol[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs,a=e.segmentLoaders,o=a.AUDIO,s=a.main;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,a=r.media();if(!a)return null;var o=null;a.attributes[e]&&(o=i[a.attributes[e]]);var s=Object.keys(i);if(!o)if("AUDIO"===e&&s.length>1&&ps(t.master))for(var u=0;u<s.length;u++){var l=i[s[u]];if(Pl(l,a)){o=l;break}}else i.main?o=i.main:1===s.length&&(o=i[s[0]]);return void 0===n?o:null!==n&&o&&o.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=Dl[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,a=t.mediaTypes[e],o=a.activeTrack(),s=a.getActiveGroup(),u=a.activePlaylistLoader,l=a.lastGroup_;s&&l&&s.id===l.id||(a.lastGroup_=s,a.lastTrack_=o,Cl(r,a),s&&!s.isMasterPlaylist&&(s.playlistLoader?(r.resyncLoader(),wl(s.playlistLoader,a)):u&&i.resetEverything()))}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.masterPlaylistLoader,r=t.segmentLoaders,i=r[e],a=r.main,o=t.mediaTypes[e],s=o.activeTrack(),u=o.getActiveGroup(),l=o.activePlaylistLoader,c=o.lastTrack_;if((!c||!s||c.id!==s.id)&&(o.lastGroup_=u,o.lastTrack_=s,Cl(i,o),u)){if(u.isMasterPlaylist){if(!s||!c||s.id===c.id)return;var d=t.vhs.masterPlaylistController_,f=d.selectPlaylist();if(d.media()===f)return;return o.logger_("track change. Switching master audio from "+c.id+" to "+s.id),n.pause(),a.resetEverything(),void d.fastQualityChange_(f)}if("AUDIO"===e){if(!u.playlistLoader)return a.setAudio(!0),void a.resetEverything();i.setAudio(!0),a.setAudio(!1)}l!==u.playlistLoader?(i.track&&i.track(s),i.resetEverything(),wl(u.playlistLoader,o)):wl(u.playlistLoader,o)}}}(n,e),t[n].getActiveGroup=function(e,t){var n=t.mediaTypes;return function(){var t=n[e].activeTrack();return t?n[e].activeGroup(t):null}}(n,e)}));var u=t.AUDIO.activeGroup();if(u){var l=(u.filter((function(e){return e.default}))[0]||u[0]).id;t.AUDIO.tracks[l].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(s.setAudio(!1),o.setAudio(!0)):s.setAudio(!0)}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var c=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var d in r.audioTracks().addEventListener("change",c),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",c),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[d])},Nl=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Ll=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},kl=function(e){function t(t){var n;n=e.call(this)||this;var r=t.src,i=t.handleManifestRedirects,o=t.withCredentials,s=t.tech,u=t.bandwidth,l=t.externVhs,c=t.useCueTags,f=t.blacklistDuration,h=t.enableLowInitialPlaylist,p=t.sourceType,g=t.cacheEncryptionKeys,m=t.experimentalBufferBasedABR;if(!r)throw new Error("A non-empty playlist URL or JSON manifest string is required");var y=t.maxPlaylistRetries;null==y&&(y=1/0),Qu=l,n.experimentalBufferBasedABR=Boolean(m),n.withCredentials=o,n.tech_=s,n.vhs_=s.vhs,n.sourceType_=p,n.useCueTags_=c,n.blacklistDuration=f,n.maxPlaylistRetries=y,n.enableLowInitialPlaylist=h,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:o,handleManifestRedirects:i,maxPlaylistRetries:y,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Xu,activeTrack:Xu,getActiveGroup:Xu,onGroupChanged:Xu,onTrackChanged:Xu,lastTrack_:null,logger_:qo("MediaGroups["+t+"]")}})),e}(),n.mediaSource=new a.a.MediaSource,n.handleDurationChange_=n.handleDurationChange_.bind(d()(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(d()(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(d()(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=Uo.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new bl(t),n.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new Sl,n.sourceUpdater_=new gl(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new El;var v={vhs:n.vhs_,parse708captions:t.parse708captions,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:u,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:g,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_};n.masterPlaylistLoader_="dash"===n.sourceType_?new Js(r,n.vhs_,n.requestOptions_):new Os(r,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new zu(Uo.mergeOptions(v,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new zu(Uo.mergeOptions(v,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new vl(Uo.mergeOptions(v,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),Nl.forEach((function(e){n[e+"_"]=Ll.bind(d()(n),e)})),n.logger_=qo("MPC"),n.triggeredFmp4Usage=!1,"none"===n.tech_.preload()?(n.loadOnPlay_=function(){n.loadOnPlay_=null,n.masterPlaylistLoader_.load()},n.tech_.one("play",n.loadOnPlay_)):n.masterPlaylistLoader_.load(),n.timeToLoadedData__=-1,n.mainAppendsToLoadedData__=-1,n.audioAppendsToLoadedData__=-1;var _="none"===n.tech_.preload()?"play":"loadstart";return n.tech_.one(_,(function(){var e=Date.now();n.tech_.one("loadeddata",(function(){n.timeToLoadedData__=Date.now()-e,n.mainAppendsToLoadedData__=n.mainSegmentLoader_.mediaAppends,n.audioAppendsToLoadedData__=n.audioSegmentLoader_.mediaAppends}))})),n}h()(t,e);var n=t.prototype;return n.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},n.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},n.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t},n.timeToLoadedData_=function(){return this.timeToLoadedData__},n.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},n.switchMedia_=function(e,t,n){var r=this.media(),i=r&&(r.id||r.uri),a=e.id||e.uri;i&&i!==a&&(this.logger_("switch media "+i+" -> "+a+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=a.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(a.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master();if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return e&&e.playlists||[];var t,n=e.mediaGroups.AUDIO,r=Object.keys(n);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)t=this.mediaTypes_.AUDIO.activeTrack();else{var i=n.main||r.length&&n[r[0]];for(var a in i)if(i[a].default){t={label:a};break}}if(!t)return[];var o=[];for(var s in n)if(n[s][t.label]){var u=n[s][t.label];u.playlists?o.push.apply(o,u.playlists):o.push(u)}return o},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;ds(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),Ml({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.switchMedia_(e.initialMedia_,"initial"),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;ds(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();"playlist-unchanged"!==t.lastExcludeReason_&&(e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck")))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var o in n.AUDIO[a]){n.AUDIO[a][o].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Qu.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media(),n=this.tech_.buffered();return function(e){var t=e.currentPlaylist,n=e.nextPlaylist,r=e.forwardBuffer,i=e.bufferLowWaterLine,a=e.bufferHighWaterLine,o=e.duration,s=e.experimentalBufferBasedABR,u=e.log;if(!n)return Uo.log.warn("We received no playlist to switch to. Please check your stream."),!1;var l="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t||!t.endList)return u(l+" as current playlist "+(t?"is live":"is not set")),!0;if(n.id===t.id)return!1;var c=s?Zs.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Zs.MAX_BUFFER_LOW_WATER_LINE;if(o<c)return u(l+" as duration < max low water line ("+o+" < "+c+")"),!0;var d=n.attributes.BANDWIDTH,f=t.attributes.BANDWIDTH;if(d<f&&(!s||r<a)){var h=l+" as next bandwidth < current bandwidth ("+d+" < "+f+")";return s&&(h+=" and forwardBuffer < bufferHighWaterLine ("+r+" < "+a+")"),u(h),!0}if((!s||d>f)&&r>=i){var p=l+" as forwardBuffer >= bufferLowWaterLine ("+r+" >= "+i+")";return s&&(p+=" and next bandwidth > current bandwidth ("+d+" > "+f+")"),u(p),!0}return u("not "+l+" as no switching criteria met"),!1}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:n.length?n.end(n.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.switchMedia_(t,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){Uo.browser.IE_VERSION||Uo.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(Uo.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=Qu.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=Yo;var a=i.end(i.length-1);return a-r<=Yo&&n-a<=Yo},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));n.playlistErrors_++;var r,i=this.masterPlaylistLoader_.master.playlists,a=i.filter(ls),o=1===a.length&&a[0]===n;if(1===i.length&&t!==1/0)return Uo.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(o);if(o){var s=!1;i.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(s=!0,delete e.excludeUntil)}})),s&&(Uo.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}r=n.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,n.excludeUntil=r,e.reason&&(n.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var u=this.selectPlaylist();if(!u)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var l=e.internal?this.logger_:Uo.log.warn,c=e.message?" "+e.message:"";l((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+c+" Switching to playlist "+u.id+"."),u.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),u.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var d=u.targetDuration/2*1e3||5e3,f="number"==typeof u.lastRequest&&Date.now()-u.lastRequest<=d;return this.switchMedia_(u,"exclude",o||f)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var a=[];(i||"audio"===e)&&a.push("AUDIO"),(i||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=Wo(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Qu.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master,i=Qu.Playlist.seekable(t,n,Qu.Playlist.liveEdgeDelay(r,t));if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=Qu.Playlist.seekable(t,n,Qu.Playlist.liveEdgeDelay(r,t))).length)return}var a,o;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),o=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=Uo.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===o||(this.logger_("seekable updated ["+Xo(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=Qu.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};t.video=t.main;var n=Du(this.master(),this.media()),r={},i=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=n.video||t.main.videoCodec||"avc1.4d400d"),t.main.isMuxed&&(r.video+=","+(n.audio||t.main.audioCodec||X)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||i)&&(r.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||X,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var a,o={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,s=r[e],!(i?W(s):z(s)))){var n=t[e].isFmp4?"browser":"muxer";o[n]=o[n]||[],o[n].push(r[e]),"audio"===e&&(a=n)}var i,s})),i&&a&&this.media().attributes.AUDIO){var s=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===s&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+s+" as "+a+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(o).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=(V(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,i=(V(r[t]||"")[0]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&u.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')})),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var l=Object.keys(o).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+o[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:l,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var a=Du(e.master,i),o=[];!a.audio||z(a.audio)||W(a.audio)||o.push("audio codec "+a.audio),!a.video||z(a.video)||W(a.video)||o.push("video codec "+a.video),a.text&&"stpp.ttml.im1t"===a.text&&o.push("text codec "+a.text),o.length&&(i.excludeUntil=1/0,e.logger_("excluding "+i.id+" for unsupported: "+o.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],r=this.master().playlists,i=Ou(V(e)),a=Pu(i),o=i.video&&V(i.video)[0]||null,s=i.audio&&V(i.audio)[0]||null;Object.keys(r).forEach((function(e){var i=r[e];if(-1===n.indexOf(i.id)&&i.excludeUntil!==1/0){n.push(i.id);var u=[],l=Du(t.masterPlaylistLoader_.master,i),c=Pu(l);if(l.audio||l.video){if(c!==a&&u.push('codec count "'+c+'" !== "'+a+'"'),!t.sourceUpdater_.canChangeType()){var d=l.video&&V(l.video)[0]||null,f=l.audio&&V(l.audio)[0]||null;d&&o&&d.type.toLowerCase()!==o.type.toLowerCase()&&u.push('video codec "'+d.type+'" !== "'+o.type+'"'),f&&s&&f.type.toLowerCase()!==s.type.toLowerCase()&&u.push('audio codec "'+f.type+'" !== "'+s.type+'"')}u.length&&(i.excludeUntil=1/0,t.logger_("blacklisting "+i.id+": "+u.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,i=n,o=0;o<e.segments.length;o++){var s=e.segments[o];if(r||(r=_l(t,i+s.duration/2)),r){if("cueIn"in s){r.endTime=i,r.adEndTime=i,i+=s.duration,r=null;continue}if(i<r.endTime){i+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new a.a.VTTCue(i,i+s.duration,s.cueOut)).adStartTime=i,r.adEndTime=i+parseFloat(s.cueOut),t.addCue(r)),"cueOutCont"in s){var u=s.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(r=new a.a.VTTCue(i,i+s.duration,"")).adStartTime=i-l,r.adEndTime=r.adStartTime+c,t.addCue(r)}i+=s.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Zs.GOAL_BUFFER_LENGTH,n=Zs.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Zs.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Zs.BUFFER_LOW_WATER_LINE,n=Zs.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Zs.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,Zs.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return Zs.BUFFER_HIGH_WATER_LINE},t}(Uo.EventTarget),xl=function(e,t,n){var r,i,a,o=e.masterPlaylistController_,s=o[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(o);if(t.attributes){var u=t.attributes.RESOLUTION;this.width=u&&u.width,this.height=u&&u.height,this.bandwidth=t.attributes.BANDWIDTH}this.codecs=Du(o.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,a=s,function(e){var t=r.master.playlists[i],n=us(t),o=ls(t);return void 0===e?o:(e?delete t.disabled:t.disabled=!0,e===o||n||(a(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},Fl=["seeking","seeked","pause","playing","error"],Ul=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=qo("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.monitorCurrentTime_()},i=function(){return t.techWaiting_()},o=function(){return t.cancelTimer_()},s=function(){return t.fixesBadSeeks_()},u=this.masterPlaylistController_,l=["main","subtitle","audio"],c={};l.forEach((function(e){c[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},u[e+"SegmentLoader_"].on("appendsdone",c[e].updateend),u[e+"SegmentLoader_"].on("playlistupdate",c[e].reset),t.tech_.on(["seeked","seeking"],c[e].reset)})),this.tech_.on("seekablechanged",s),this.tech_.on("waiting",i),this.tech_.on(Fl,o),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",s),t.tech_.off("waiting",i),t.tech_.off(Fl,o),t.tech_.off("canplay",r),t.tech_.off("play",n),l.forEach((function(e){u[e+"SegmentLoader_"].off("appendsdone",c[e].updateend),u[e+"SegmentLoader_"].off("playlistupdate",c[e].reset),t.tech_.off(["seeked","seeking"],c[e].reset)})),t.checkCurrentTimeTimeout_&&a.a.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&a.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=a.a.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:Qo(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Yo>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:Yo)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+Xo(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;var i=this.tech_.buffered();return!!function(e){var t=e.buffered,n=e.targetDuration,r=e.currentTime;return!(!t.length||t.end(0)-t.start(0)<2*n||r>t.start(0)||!(t.start(0)-r<n))}({buffered:i,targetDuration:this.media().targetDuration,currentTime:n})&&(e=i.start(0)+Yo,this.logger_("Buffered region starts ("+i.start(0)+") just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=Wo(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var a=zo(i,t);if(a.length>0){var o=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+o+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*o,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+Yo;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var a=Wo(t,r-3),o=Wo(t,r),s=Wo(n,r);s.length&&!o.length&&a.length&&(i={start:a.end(0),end:s.end(0)})}else{zo(t,r).length||(i=this.gapFromVideoUnderflow_(t,r))}return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=zo(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+Vo),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return Uo.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return Uo.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),a=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:a}}return null},e}(),Bl={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},jl=function e(t,n){var r=0,i=0,a=Uo.mergeOptions(Bl,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var o=function(){i&&t.currentTime(i)},s=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",o),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"==typeof a.getSource?(r=Date.now(),a.getSource.call(t,s)):void Uo.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",o),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}},Hl=function(e){jl(this,e)},Gl="2.9.1",ql={PlaylistLoader:Os,Playlist:gs,utils:Gs,STANDARD_PLAYLIST_SELECTOR:Uu,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(gs.isEnabled);return ku(t,(function(e,t){return xu(e,t)})),t.filter((function(t){return!!Du(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:Uu,movingAverageBandwidthSelector:function(e){var t=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var r=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(t=e*this.systemBandwidth+(1-e)*t,n=this.systemBandwidth),Fu(this.playlists.master,t,parseInt(Lu(this.tech_.el(),"width"),10)*r,parseInt(Lu(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:xu,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||a.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||a.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:Ns()};Object.keys(Zs).forEach((function(e){Object.defineProperty(ql,e,{get:function(){return Uo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Zs[e]},set:function(t){Uo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Uo.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Zs[e]=t}})}));var Vl="videojs-vhs",Yl=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};ql.canPlaySource=function(){return Uo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Kl=function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var a=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var r=t.reduce((function(e,t){var r=n.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e}),{});return Object.keys(r).length&&e.push(r),e}),[])}(r?i.concat([r]):i,Object.keys(n)),o=[],s=[];return a.forEach((function(e){s.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),o.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(o),Promise.race(s)])},Wl=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var r={};t&&t.attributes&&t.attributes.CODECS&&(r=Ou(V(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);var i=K(r.video),a=K(r.audio),o={};for(var s in e)o[s]={},a&&(o[s].audioContentType=a),i&&(o[s].videoContentType=i),t.contentProtection&&t.contentProtection[s]&&t.contentProtection[s].pssh&&(o[s].pssh=t.contentProtection[s].pssh),"string"==typeof e[s]&&(o[s].url=e[s]);return Uo.mergeOptions(e,o)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(Uo.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},zl=function(){if(!a.a.localStorage)return null;var e=a.a.localStorage.getItem(Vl);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};ql.supportsNativeHls=function(){if(!s.a||!s.a.createElement)return!1;var e=s.a.createElement("video");if(!Uo.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),ql.supportsNativeDash=!!(s.a&&s.a.createElement&&Uo.getTech("Html5").isSupported())&&/maybe|probably/i.test(s.a.createElement("video").canPlayType("application/dash+xml")),ql.supportsTypeNatively=function(e){return"hls"===e?ql.supportsNativeHls:"dash"===e&&ql.supportsNativeDash},ql.isSupported=function(){return Uo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Xl=function(e){function t(t,n,r){var i;if(i=e.call(this,n,Uo.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&Uo.log.warn("Using hls options is deprecated. Use vhs instead."),"number"==typeof r.initialBandwidth&&(i.options_.bandwidth=r.initialBandwidth),i.logger_=qo("VhsHandler"),n.options_&&n.options_.playerId){var a=Uo(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return Uo.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),d()(i)},configurable:!0}),a.hasOwnProperty("vhs")||Object.defineProperty(a,"vhs",{get:function(){return Uo.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),d()(i)},configurable:!0}),a.hasOwnProperty("dash")||Object.defineProperty(a,"dash",{get:function(){return Uo.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),d()(i)},configurable:!0}),i.player_=a}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(s.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=s.a.fullscreenElement||s.a.webkitFullscreenElement||s.a.mozFullScreenElement||s.a.msFullscreenElement;t&&t.contains(i.tech_.el())?i.masterPlaylistController_.fastQualityChange_():i.masterPlaylistController_.checkABR_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}h()(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=zl();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Zs.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Zs.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=ql,this.options_.sourceType=J(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.options_.smoothQualityChange&&Uo.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new kl(this.options_);var i=Uo.mergeOptions({liveRangeSafeTimeDelta:Yo},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new Ul(i),this.masterPlaylistController_.on("error",(function(){var e=Uo.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var o=this.options_.experimentalBufferBasedABR?ql.movingAverageBandwidthSelector(.55):ql.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.masterPlaylistController_.selectInitialPlaylist=ql.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){Uo.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return n.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return n.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return n.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return Qo(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Qo(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!a.a.localStorage)return!1;var t=zl();t=t?Uo.mergeOptions(t,e):e;try{a.a.localStorage.setItem(Vl,JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=n).representations=function(){var t=e.masterPlaylistController_.master(),n=ps(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!us(e)})).map((function(t,n){return new xl(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=a.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=Wl({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});11!==Uo.browser.IE_VERSION&&n?(this.logger_("waiting for EME key session creation"),Kl({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Uo.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),Yl(t,n.playlists)})),this.playlists.on("mediachange",(function(){Yl(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":Gl,"mux.js":"5.11.1","mpd-parser":"0.17.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return gl.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&a.a.URL.revokeObjectURL&&(a.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return qs({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),Vs({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Uo.getComponent("Component")),Ql={name:"videojs-http-streaming",VERSION:Gl,canHandleSource:function(e,t){void 0===t&&(t={});var n=Uo.mergeOptions(Uo.options,t);return Ql.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=Uo.mergeOptions(Uo.options,n);return t.vhs=new Xl(e,t,r),Uo.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Uo.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=Ns(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=Uo.mergeOptions(Uo.options,t).vhs.overrideNative,r=void 0===n?!Uo.browser.IS_ANY_SAFARI:n,i=J(e);return i&&(!ql.supportsTypeNatively(i)||r)?"maybe":""}};W("avc1.4d400d,mp4a.40.2")&&Uo.getTech("Html5").registerSourceHandler(Ql,0),Uo.VhsHandler=Xl,Object.defineProperty(Uo,"HlsHandler",{get:function(){return Uo.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Xl},configurable:!0}),Uo.VhsSourceHandler=Ql,Object.defineProperty(Uo,"HlsSourceHandler",{get:function(){return Uo.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Ql},configurable:!0}),Uo.Vhs=ql,Object.defineProperty(Uo,"Hls",{get:function(){return Uo.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),ql},configurable:!0}),Uo.use||(Uo.registerComponent("Hls",ql),Uo.registerComponent("Vhs",ql)),Uo.options.vhs=Uo.options.vhs||{},Uo.options.hls=Uo.options.hls||{},Uo.registerPlugin?Uo.registerPlugin("reloadSourceOnError",Hl):Uo.plugin("reloadSourceOnError",Hl);t.default=Uo}])}));
|