@clickview/player 1.25.0 → 1.26.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/player.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see player.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@clickview/player"]=t():e["@clickview/player"]=t()}(self,(()=>(()=>{var e={68942:(e,t,n)=>{"use strict";var r=n(51562),i=n(448),o=n(63848);function a(e,t,n){var r=e;return o(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=a(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=c.response?c.response:c.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}(c),v)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(l),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,m)}function o(){if(!u){var t;clearTimeout(l),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=m,o=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:f,rawRequest:c},c.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}(c.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),n(o,i,i.body)}}var a,u,c=e.xhr||null;c||(c=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var l,f=c.url=e.uri||e.url,h=c.method=e.method||"GET",p=e.body||e.data,d=c.headers=e.headers||{},y=!!e.sync,v=!1,m={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:c};if("json"in e&&!1!==e.json&&(v=!0,d.accept||d.Accept||(d.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(d["content-type"]||d["Content-Type"]||(d["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(o,0)},c.onload=o,c.onerror=i,c.onprogress=function(){},c.onabort=function(){u=!0},c.ontimeout=i,c.open(h,f,!y,e.username,e.password),y||(c.withCredentials=!!e.withCredentials),!y&&e.timeout>0&&(l=setTimeout((function(){if(!u){u=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),c.setRequestHeader)for(a in d)d.hasOwnProperty(a)&&c.setRequestHeader(a,d[a]);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&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(p||null),c}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=a(t,n,r)).method=e.toUpperCase(),u(n)}}))},96617:function(e,t,n){!function(e,t,n,r){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n,r=r&&r.hasOwnProperty("default")?r.default:r;var i="4.1.3",o=function(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e.apply(t,r)}},a=t.Model.extend,s=function(e){var t=this;if(e)return n.reduce(e,(function(e,r,i){return n.isFunction(r)||(r=t[r]),r&&(e[i]=r),e}),{})},u=["description","fileName","lineNumber","name","message","number","url"],c=a.call(Error,{urlRoot:"http://marionettejs.com/docs/v".concat(i,"/"),url:"",constructor:function(e){var t=Error.call(this,e.message);n.extend(this,n.pick(t,u),n.pick(e,u)),Error.captureStackTrace&&this.captureStackTrace(),this.url=this.urlRoot+this.url},captureStackTrace:function(){Error.captureStackTrace(this,c)},toString:function(){return"".concat(this.name,": ").concat(this.message," See: ").concat(this.url)}});function l(e,t){if(!n.isObject(t))throw new c({message:"Bindings must be an object.",url:"common.html#bindevents"});return s.call(e,t)}function f(e,t){return e&&t?(this.listenTo(e,l(this,t)),this):this}function h(e,t){return e?t?(this.stopListening(e,l(this,t)),this):(this.stopListening(e),this):this}function p(e,t){if(!n.isObject(t))throw new c({message:"Bindings must be an object.",url:"common.html#bindrequests"});return s.call(e,t)}function d(e,t){return e&&t?(e.reply(p(this,t),this),this):this}function y(e,t){return e?t?(e.stopReplying(p(this,t),this),this):(e.stopReplying(null,null,this),this):this}var v=function(e){if(e)return this.options&&void 0!==this.options[e]?this.options[e]:this[e]},m=function(e,t){var r=this;e&&n.each(t,(function(t){var n=e[t];void 0!==n&&(r[t]=n)}))};function g(e,t,r){e._getImmediateChildren&&n.each(e._getImmediateChildren(),(function(e){r(e)&&e.triggerMethod(t,e)}))}function b(e){return!e._isAttached}function _(e){return!!b(e)&&(e._isAttached=!0,!0)}function w(e){return e._isAttached}function T(e){return e._isAttached=!1,!0}function S(e){e._isAttached&&e._isRendered&&e.triggerMethod("dom:refresh",e)}function E(e){e._isAttached&&e._isRendered&&e.triggerMethod("dom:remove",e)}function k(){g(this,"before:attach",b)}function O(){g(this,"attach",_),S(this)}function C(){g(this,"before:detach",w),E(this)}function P(){g(this,"detach",T)}function x(){E(this)}function j(){S(this)}function L(e){e._areViewEventsMonitored||!1===e.monitorViewEvents||(e._areViewEventsMonitored=!0,e.on({"before:attach":k,attach:O,"before:detach":C,detach:P,"before:render":x,render:j}))}var A=/(^|:)(\w)/gi,I={};function R(e,t,n){return n.toUpperCase()}function D(e){var t,r=function(e){return I[e]||(I[e]="on"+e.replace(A,R)),I[e]}(e),i=v.call(this,r);return n.isFunction(i)&&(t=i.apply(this,n.drop(arguments))),this.trigger.apply(this,arguments),t}var M={triggerMethod:D},N={normalizeMethods:s,_setOptions:function(e,t){this.options=n.extend({},n.result(this,"options"),e),this.mergeOptions(e,t)},mergeOptions:m,getOption:v,bindEvents:f,unbindEvents:h,bindRequests:d,unbindRequests:y,triggerMethod:D};n.extend(N,t.Events);var B={_isDestroyed:!1,isDestroyed:function(){return this._isDestroyed},destroy:function(e){return this._isDestroyed||(this.triggerMethod("before:destroy",this,e),this._isDestroyed=!0,this.triggerMethod("destroy",this,e),this.stopListening()),this}},U={_initRadio:function(){var e=n.result(this,"channelName");if(e){if(!r)throw new c({message:'The dependency "backbone.radio" is missing.',url:"backbone.radio.html#marionette-integration"});var t=this._channel=r.channel(e),i=n.result(this,"radioEvents");this.bindEvents(t,i);var o=n.result(this,"radioRequests");this.bindRequests(t,o),this.on("destroy",this._destroyRadio)}},_destroyRadio:function(){this._channel.stopReplying(null,null,this)},getChannel:function(){return this._channel}},F=["channelName","radioEvents","radioRequests"],V=function(e){this._setOptions(e,F),this.cid=n.uniqueId(this.cidPrefix),this._initRadio(),this.initialize.apply(this,arguments)};V.extend=a,n.extend(V.prototype,N,B,U,{cidPrefix:"mno",initialize:function(){}});var H=n.invokeMap||n.invoke;function q(e,t,r){return n.reduce(t,(function(t,r){var i=function(e){if(e.behaviorClass)return{BehaviorClass:e.behaviorClass,options:e};if(n.isFunction(e))return{BehaviorClass:e,options:{}};throw new c({message:"Unable to get behavior class. A Behavior constructor should be passed directly or as behaviorClass property of options",url:"marionette.behavior.html#defining-and-attaching-behaviors"})}(r),o=new(0,i.BehaviorClass)(i.options,e);return t.push(o),q(e,n.result(o,"behaviors"),t)}),r)}var z={_initBehaviors:function(){this._behaviors=q(this,n.result(this,"behaviors"),[])},_getBehaviorTriggers:function(){var e=H(this._behaviors,"_getTriggers");return n.reduce(e,(function(e,t){return n.extend(e,t)}),{})},_getBehaviorEvents:function(){var e=H(this._behaviors,"_getEvents");return n.reduce(e,(function(e,t){return n.extend(e,t)}),{})},_proxyBehaviorViewProperties:function(){H(this._behaviors,"proxyViewProperties")},_delegateBehaviorEntityEvents:function(){H(this._behaviors,"delegateEntityEvents")},_undelegateBehaviorEntityEvents:function(){H(this._behaviors,"undelegateEntityEvents")},_destroyBehaviors:function(e){H(this._behaviors,"destroy",e)},_removeBehavior:function(e){this._isDestroyed||(this.undelegate(".trig".concat(e.cid," .").concat(e.cid)),this._behaviors=n.without(this._behaviors,e))},_bindBehaviorUIElements:function(){H(this._behaviors,"bindUIElements")},_unbindBehaviorUIElements:function(){H(this._behaviors,"unbindUIElements")},_triggerEventOnBehaviors:function(e,t,n){H(this._behaviors,"triggerMethod",e,t,n)}},W={_delegateEntityEvents:function(e,t){e&&(this._modelEvents=n.result(this,"modelEvents"),this.bindEvents(e,this._modelEvents)),t&&(this._collectionEvents=n.result(this,"collectionEvents"),this.bindEvents(t,this._collectionEvents))},_undelegateEntityEvents:function(e,t){this._modelEvents&&(this.unbindEvents(e,this._modelEvents),delete this._modelEvents),this._collectionEvents&&(this.unbindEvents(t,this._collectionEvents),delete this._collectionEvents)},_deleteEntityEventHandlers:function(){delete this._modelEvents,delete this._collectionEvents}},G={_renderTemplate:function(e){var t=this.mixinTemplateContext(this.serializeData())||{},n=this._renderHtml(e,t);void 0!==n&&this.attachElContent(n)},getTemplate:function(){return this.template},mixinTemplateContext:function(e){var t=n.result(this,"templateContext");return t?e?n.extend({},e,t):t:e},serializeData:function(){return this.model?this.serializeModel():this.collection?{items:this.serializeCollection()}:void 0},serializeModel:function(){return this.model.attributes},serializeCollection:function(){return n.map(this.collection.models,(function(e){return e.attributes}))},_renderHtml:function(e,t){return e(t)},attachElContent:function(e){this.Dom.setContents(this.el,e,this.$el)}},$=/^(\S+)\s*(.*)$/,X=function(e,t){var n=e.match($);return"".concat(n[1],".").concat(t," ").concat(n[2])},K={childViewEventPrefix:!1,triggersStopPropagation:!0,triggersPreventDefault:!0,DEV_MODE:!1};function Y(e){return!!K[e]}function Q(e,t){return K[e]=t}var J={_getViewTriggers:function(e,t){var r=this;return n.reduce(t,(function(t,i,o){return t[o=X(o,"trig".concat(r.cid))]=function(e,t){n.isString(t)&&(t={event:t});var r=t.event,i=!!t.preventDefault;Y("triggersPreventDefault")&&(i=!1!==t.preventDefault);var o=!!t.stopPropagation;return Y("triggersStopPropagation")&&(o=!1!==t.stopPropagation),function(t){i&&t.preventDefault(),o&&t.stopPropagation();for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];e.triggerMethod.apply(e,[r,e,t].concat(a))}}(e,i),t}),{})}},Z=/@ui\.[a-zA-Z-_$0-9]*/g,ee=function(e,t){return e.replace(Z,(function(e){return t[e.slice(4)]}))},te={normalizeUIKeys:function(e){return function(e,t){return n.reduce(e,(function(e,n,r){return e[ee(r,t)]=n,e}),{})}(e,this._getUIBindings())},normalizeUIString:function(e){var t=this._getUIBindings();return ee(e,t)},normalizeUIValues:function(e,t){return function(e,t,r){return n.each(e,(function(i,o){if(n.isString(i))e[o]=ee(i,t);else if(i){var a=i[r];n.isString(a)&&(i[r]=ee(a,t))}})),e}(e,this._getUIBindings(),t)},_getUIBindings:function(){return n.result(this,"_uiBindings")||n.result(this,"ui")},_bindUIElements:function(){var e=this;if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var t=n.result(this,"_uiBindings");this._ui={},n.each(t,(function(t,n){e._ui[n]=e.$(t)})),this.ui=this._ui}},_unbindUIElements:function(){var e=this;this.ui&&this._uiBindings&&(n.each(this.ui,(function(t,n){delete e.ui[n]})),this.ui=this._uiBindings,delete this._uiBindings,delete this._ui)},_getUI:function(e){return this._ui[e]}};function ne(e){return e instanceof t.$?e:t.$(e)}function re(e){return this.prototype.Dom=n.extend({},this.prototype.Dom,e),this}var ie={createBuffer:function(){return document.createDocumentFragment()},getDocumentEl:function(e){return e.ownerDocument.documentElement},getEl:function(e){return ne(e)},findEl:function(e,t){return ne(e).find(t)},hasEl:function(e,t){return e.contains(t&&t.parentNode)},detachEl:function(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:ne(e)).detach()},replaceEl:function(e,t){if(e!==t){var n=t.parentNode;n&&n.replaceChild(e,t)}},swapEl:function(e,t){if(e!==t){var n=e.parentNode,r=t.parentNode;if(n&&r){var i=e.nextSibling,o=t.nextSibling;n.insertBefore(t,i),r.insertBefore(e,o)}}},setContents:function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:ne(e)).html(t)},appendContents:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n._$el,i=void 0===r?ne(e):r,o=n._$contents,a=void 0===o?ne(t):o;i.append(a)},hasContents:function(e){return!!e&&e.hasChildNodes()},detachContents:function(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:ne(e)).contents().detach()}},oe={Dom:ie,_isElAttached:function(){return!!this.el&&this.Dom.hasEl(this.Dom.getDocumentEl(this.el),this.el)},supportsRenderLifecycle:!0,supportsDestroyLifecycle:!0,_isDestroyed:!1,isDestroyed:function(){return!!this._isDestroyed},_isRendered:!1,isRendered:function(){return!!this._isRendered},_isAttached:!1,isAttached:function(){return!!this._isAttached},delegateEvents:function(e){this._proxyBehaviorViewProperties(),this._buildEventProxies();var r=n.extend({},this._getBehaviorEvents(),this._getEvents(e),this._getBehaviorTriggers(),this._getTriggers());return t.View.prototype.delegateEvents.call(this,r),this},_getEvents:function(e){return e?this.normalizeUIKeys(e):this.events?this.normalizeUIKeys(n.result(this,"events")):void 0},_getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(n.result(this,"triggers"));return this._getViewTriggers(this,e)}},delegateEntityEvents:function(){return this._delegateEntityEvents(this.model,this.collection),this._delegateBehaviorEntityEvents(),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.model,this.collection),this._undelegateBehaviorEntityEvents(),this},destroy:function(e){if(this._isDestroyed||this._isDestroying)return this;this._isDestroying=!0;var t=this._isAttached&&!this._disableDetachEvents;return this.triggerMethod("before:destroy",this,e),t&&this.triggerMethod("before:detach",this),this.unbindUIElements(),this._removeElement(),t&&(this._isAttached=!1,this.triggerMethod("detach",this)),this._removeChildren(),this._isDestroyed=!0,this._isRendered=!1,this._destroyBehaviors(e),this._deleteEntityEventHandlers(),this.triggerMethod("destroy",this,e),this._triggerEventOnBehaviors("destroy",this,e),this.stopListening(),this},_removeElement:function(){this.$el.off().removeData(),this.Dom.detachEl(this.el,this.$el)},bindUIElements:function(){return this._bindUIElements(),this._bindBehaviorUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this._unbindBehaviorUIElements(),this},getUI:function(e){return this._getUI(e)},_buildEventProxies:function(){this._childViewEvents=this.normalizeMethods(n.result(this,"childViewEvents")),this._childViewTriggers=n.result(this,"childViewTriggers"),this._eventPrefix=this._getEventPrefix()},_getEventPrefix:function(){var e=!!Y("childViewEventPrefix")&&"childview",t=n.result(this,"childViewEventPrefix",e);return!1===t?t:t+":"},_proxyChildViewEvents:function(e){(this._childViewEvents||this._childViewTriggers||this._eventPrefix)&&this.listenTo(e,"all",this._childViewEventHandler)},_childViewEventHandler:function(e){for(var t=this._childViewEvents,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t&&t[e]&&t[e].apply(this,r);var o=this._childViewTriggers;o&&o[e]&&this.triggerMethod.apply(this,[o[e]].concat(r)),this._eventPrefix&&this.triggerMethod.apply(this,[this._eventPrefix+e].concat(r))}};function ae(e){e._isRendered||(e.supportsRenderLifecycle||e.triggerMethod("before:render",e),e.render(),e._isRendered=!0,e.supportsRenderLifecycle||e.triggerMethod("render",e))}function se(e,t){if(e.destroy)return e._disableDetachEvents=t,void e.destroy();e.supportsDestroyLifecycle||e.triggerMethod("before:destroy",e);var n=e._isAttached&&!t;n&&e.triggerMethod("before:detach",e),e.remove(),n&&(e._isAttached=!1,e.triggerMethod("detach",e)),e._isDestroyed=!0,e.supportsDestroyLifecycle||e.triggerMethod("destroy",e)}n.extend(oe,z,N,W,G,J,te);var ue="RegionError",ce=["allowMissingEl","parentEl","replaceElement"],le=function(e){this._setOptions(e,ce),this.cid=n.uniqueId(this.cidPrefix),this._initEl=this.el=this.getOption("el"),this.el=this.el instanceof t.$?this.el[0]:this.el,this.$el=this._getEl(this.el),this.initialize.apply(this,arguments)};function fe(e,t){if(e instanceof le)return e;if(n.isString(e))return he(t,{el:e});if(n.isFunction(e))return he(t,{regionClass:e});if(n.isObject(e))return he(t,e);throw new c({message:"Improper region configuration type.",url:"marionette.region.html#defining-regions"})}function he(e,t){var r=n.extend({},e,t),i=r.regionClass;return delete r.regionClass,new i(r)}le.extend=a,le.setDomApi=re,n.extend(le.prototype,N,{Dom:ie,cidPrefix:"mnr",replaceElement:!1,_isReplaced:!1,_isSwappingView:!1,initialize:function(){},show:function(e,t){if(this._ensureElement(t)){if((e=this._getView(e,t))===this.currentView)return this;if(e._isShown)throw new c({name:ue,message:"View is already shown in a Region or CollectionView",url:"marionette.region.html#showing-a-view"});return this._isSwappingView=!!this.currentView,this.triggerMethod("before:show",this,e,t),!this.currentView&&e._isAttached||this.empty(t),this._setupChildView(e),this.currentView=e,ae(e),this._attachView(e,t),this.triggerMethod("show",this,e,t),this._isSwappingView=!1,this}},_getEl:function(e){if(!e)throw new c({name:ue,message:'An "el" must be specified for a region.',url:"marionette.region.html#additional-options"});return this.getEl(e)},_setEl:function(){this.$el=this._getEl(this.el),this.$el.length&&(this.el=this.$el[0]),this.$el.length>1&&(this.$el=this.Dom.getEl(this.el))},_setElement:function(e){if(e===this.el)return this;var t=this._isReplaced;if(this._restoreEl(),this.el=e,this._setEl(),this.currentView){var n=this.currentView;t?this._replaceEl(n):this.attachHtml(n)}return this},_setupChildView:function(e){L(e),this._proxyChildViewEvents(e),e.on("destroy",this._empty,this)},_proxyChildViewEvents:function(e){var t=this._parentView;t&&t._proxyChildViewEvents(e)},_shouldDisableMonitoring:function(){return this._parentView&&!1===this._parentView.monitorViewEvents},_isElAttached:function(){return this.Dom.hasEl(this.Dom.getDocumentEl(this.el),this.el)},_attachView:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).replaceElement,r=!e._isAttached&&this._isElAttached()&&!this._shouldDisableMonitoring(),i=void 0===t?!!n.result(this,"replaceElement"):!!t;r&&e.triggerMethod("before:attach",e),i?this._replaceEl(e):this.attachHtml(e),r&&(e._isAttached=!0,e.triggerMethod("attach",e)),e._isShown=!0},_ensureElement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.isObject(this.el)||this._setEl(),!this.$el||0===this.$el.length){if(void 0===e.allowMissingEl?n.result(this,"allowMissingEl"):e.allowMissingEl)return!1;throw new c({name:ue,message:'An "el" must exist in DOM for this region '.concat(this.cid),url:"marionette.region.html#additional-options"})}return!0},_getView:function(e){if(!e)throw new c({name:ue,message:"The view passed is undefined and therefore invalid. You must pass a view instance to show.",url:"marionette.region.html#showing-a-view"});if(e._isDestroyed)throw new c({name:ue,message:'View (cid: "'.concat(e.cid,'") has already been destroyed and cannot be used.'),url:"marionette.region.html#showing-a-view"});if(e instanceof t.View)return e;var n=this._getViewOptions(e);return new me(n)},_getViewOptions:function(e){return n.isFunction(e)?{template:e}:n.isObject(e)?e:{template:function(){return e}}},getEl:function(e){var t=n.result(this,"parentEl");return t&&n.isString(e)?this.Dom.findEl(t,e):this.Dom.getEl(e)},_replaceEl:function(e){this._restoreEl(),e.on("before:destroy",this._restoreEl,this),this.Dom.replaceEl(e.el,this.el),this._isReplaced=!0},_restoreEl:function(){if(this._isReplaced){var e=this.currentView;e&&(this._detachView(e),this._isReplaced=!1)}},isReplaced:function(){return!!this._isReplaced},isSwappingView:function(){return!!this._isSwappingView},attachHtml:function(e){this.Dom.appendContents(this.el,e.el,{_$el:this.$el,_$contents:e.$el})},empty:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{allowMissingEl:!0},t=this.currentView;return t?(this._empty(t,!0),this):(this._ensureElement(e)&&this.detachHtml(),this)},_empty:function(e,t){e.off("destroy",this._empty,this),this.triggerMethod("before:empty",this,e),this._restoreEl(),delete this.currentView,e._isDestroyed||(t?this.removeView(e):this._detachView(e),e._isShown=!1,this._stopChildViewEvents(e)),this.triggerMethod("empty",this,e)},_stopChildViewEvents:function(e){this._parentView&&this._parentView.stopListening(e)},destroyView:function(e){return e._isDestroyed||se(e,this._shouldDisableMonitoring()),e},removeView:function(e){this.destroyView(e)},detachView:function(){var e=this.currentView;if(e)return this._empty(e),e},_detachView:function(e){var t=e._isAttached&&!this._shouldDisableMonitoring(),n=this._isReplaced;t&&e.triggerMethod("before:detach",e),n?this.Dom.replaceEl(this.el,e.el):this.detachHtml(),t&&(e._isAttached=!1,e.triggerMethod("detach",e))},detachHtml:function(){this.Dom.detachContents(this.el,this.$el)},hasView:function(){return!!this.currentView},reset:function(e){return this.empty(e),this.el=this._initEl,delete this.$el,this},_isDestroyed:!1,isDestroyed:function(){return this._isDestroyed},destroy:function(e){return this._isDestroyed||(this.triggerMethod("before:destroy",this,e),this._isDestroyed=!0,this.reset(e),this._name&&this._parentView._removeReferences(this._name),delete this._parentView,delete this._name,this.triggerMethod("destroy",this,e),this.stopListening()),this}});var pe={regionClass:le,_initRegions:function(){this.regions=this.regions||{},this._regions={},this.addRegions(n.result(this,"regions"))},_reInitRegions:function(){H(this._regions,"reset")},addRegion:function(e,t){var n={};return n[e]=t,this.addRegions(n)[e]},addRegions:function(e){if(!n.isEmpty(e))return e=this.normalizeUIValues(e,"el"),this.regions=n.extend({},this.regions,e),this._addRegions(e)},_addRegions:function(e){var t=this,r={regionClass:this.regionClass,parentEl:n.partial(n.result,this,"el")};return n.reduce(e,(function(e,n,i){return e[i]=fe(n,r),t._addRegion(e[i],i),e}),{})},_addRegion:function(e,t){this.triggerMethod("before:add:region",this,t,e),e._parentView=this,e._name=t,this._regions[t]=e,this.triggerMethod("add:region",this,t,e)},removeRegion:function(e){var t=this._regions[e];return this._removeRegion(t,e),t},removeRegions:function(){var e=this._getRegions();return n.each(this._regions,this._removeRegion.bind(this)),e},_removeRegion:function(e,t){this.triggerMethod("before:remove:region",this,t,e),e.destroy(),this.triggerMethod("remove:region",this,t,e)},_removeReferences:function(e){delete this.regions[e],delete this._regions[e]},emptyRegions:function(){var e=this.getRegions();return H(e,"empty"),e},hasRegion:function(e){return!!this.getRegion(e)},getRegion:function(e){return this._isRendered||this.render(),this._regions[e]},_getRegions:function(){return n.clone(this._regions)},getRegions:function(){return this._isRendered||this.render(),this._getRegions()},showChildView:function(e,t,n){return this.getRegion(e).show(t,n),t},detachChildView:function(e){return this.getRegion(e).detachView()},getChildView:function(e){return this.getRegion(e).currentView}};function de(e){return this.prototype._renderHtml=e,this}var ye=["behaviors","childViewEventPrefix","childViewEvents","childViewTriggers","collectionEvents","events","modelEvents","regionClass","regions","template","templateContext","triggers","ui"];function ve(e,t){return t.currentView&&e.push(t.currentView),e}var me=t.View.extend({constructor:function(e){this._setOptions(e,ye),L(this),this._initBehaviors(),this._initRegions(),t.View.prototype.constructor.apply(this,arguments),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this,e)},setElement:function(){return t.View.prototype.setElement.apply(this,arguments),this._isRendered=this.Dom.hasContents(this.el),this._isAttached=this._isElAttached(),this._isRendered&&this.bindUIElements(),this},render:function(){var e=this.getTemplate();return!1===e||this._isDestroyed||(this.triggerMethod("before:render",this),this._isRendered&&this._reInitRegions(),this._renderTemplate(e),this.bindUIElements(),this._isRendered=!0,this.triggerMethod("render",this)),this},_removeChildren:function(){this.removeRegions()},_getImmediateChildren:function(){return n.reduce(this._regions,ve,[])}},{setRenderer:de,setDomApi:re});n.extend(me.prototype,oe,pe);var ge=function(){this._init()};function be(e,t){return t.model&&t.model.get(e)}n.each(["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce","partition"],(function(e){ge.prototype[e]=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return n[e].apply(n,[this._views].concat(r))}})),n.extend(ge.prototype,{_init:function(){this._views=[],this._viewsByCid={},this._indexByModel={},this._updateLength()},_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._views.length;this._addViewIndexes(e),this._views.splice(t,0,e),this._updateLength()},_addViewIndexes:function(e){this._viewsByCid[e.cid]=e,e.model&&(this._indexByModel[e.model.cid]=e)},_sort:function(e,t){return"string"==typeof e?(e=n.partial(be,e),this._sortBy(e)):1===e.length?this._sortBy(e.bind(t)):this._views.sort(e.bind(t))},_sortBy:function(e){var t=n.sortBy(this._views,e);return this._set(t),t},_set:function(e,t){this._views.length=0,this._views.push.apply(this._views,e.slice(0)),t&&(this._viewsByCid={},this._indexByModel={},n.each(e,this._addViewIndexes.bind(this)),this._updateLength())},_swap:function(e,t){var n=this.findIndexByView(e),r=this.findIndexByView(t);if(-1!==n&&-1!==r){var i=this._views[n];this._views[n]=this._views[r],this._views[r]=i}},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){return this._indexByModel[e]},findByIndex:function(e){return this._views[e]},findIndexByView:function(e){return this._views.indexOf(e)},findByCid:function(e){return this._viewsByCid[e]},hasView:function(e){return!!this.findByCid(e.cid)},_remove:function(e){if(this._viewsByCid[e.cid]){e.model&&delete this._indexByModel[e.model.cid],delete this._viewsByCid[e.cid];var t=this.findIndexByView(e);this._views.splice(t,1),this._updateLength()}},_updateLength:function(){this.length=this._views.length}});var _e="CollectionViewError",we=["behaviors","childView","childViewContainer","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","emptyView","emptyViewOptions","events","modelEvents","sortWithCollection","template","templateContext","triggers","ui","viewComparator","viewFilter"],Te=t.View.extend({sortWithCollection:!0,constructor:function(e){this._setOptions(e,we),L(this),this._initChildViewStorage(),this._initBehaviors(),t.View.prototype.constructor.apply(this,arguments),this.getEmptyRegion(),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this,e)},_initChildViewStorage:function(){this._children=new ge,this.children=new ge},getEmptyRegion:function(){var e=this.$container||this.$el;return this._emptyRegion&&!this._emptyRegion.isDestroyed()?(this._emptyRegion._setElement(e[0]),this._emptyRegion):(this._emptyRegion=new le({el:e[0],replaceElement:!1}),this._emptyRegion._parentView=this,this._emptyRegion)},_initialEvents:function(){this._isRendered||this.listenTo(this.collection,{sort:this._onCollectionSort,reset:this._onCollectionReset,update:this._onCollectionUpdate})},_onCollectionSort:function(e,t){var n=t.add,r=t.merge,i=t.remove;this.sortWithCollection&&!1!==this.viewComparator&&(n||i||r||this.sort())},_onCollectionReset:function(){this._destroyChildren(),this._addChildModels(this.collection.models),this.sort()},_onCollectionUpdate:function(e,t){var n=t.changes,r=n.removed.length&&this._removeChildModels(n.removed);this._addedViews=n.added.length&&this._addChildModels(n.added),this._detachChildren(r),this.sort(),this._removeChildViews(r)},_removeChildModels:function(e){var t=this;return n.reduce(e,(function(e,n){var r=t._removeChildModel(n);return r&&e.push(r),e}),[])},_removeChildModel:function(e){var t=this._children.findByModel(e);return t&&this._removeChild(t),t},_removeChild:function(e){this.triggerMethod("before:remove:child",this,e),this.children._remove(e),this._children._remove(e),this.triggerMethod("remove:child",this,e)},_addChildModels:function(e){return n.map(e,this._addChildModel.bind(this))},_addChildModel:function(e){var t=this._createChildView(e);return this._addChild(t),t},_createChildView:function(e){var t=this._getChildView(e),n=this._getChildViewOptions(e);return this.buildChildView(e,t,n)},_addChild:function(e,t){this.triggerMethod("before:add:child",this,e),this._setupChildView(e),this._children._add(e,t),this.children._add(e,t),this.triggerMethod("add:child",this,e)},_getChildView:function(e){var t=this.childView;if(!t)throw new c({name:_e,message:'A "childView" must be specified',url:"marionette.collectionview.html#collectionviews-childview"});if(!(t=this._getView(t,e)))throw new c({name:_e,message:'"childView" must be a view class or a function that returns a view class',url:"marionette.collectionview.html#collectionviews-childview"});return t},_getView:function(e,r){return e.prototype instanceof t.View||e===t.View?e:n.isFunction(e)?e.call(this,r):void 0},_getChildViewOptions:function(e){return n.isFunction(this.childViewOptions)?this.childViewOptions(e):this.childViewOptions},buildChildView:function(e,t,r){return new t(n.extend({model:e},r))},_setupChildView:function(e){L(e),e.on("destroy",this.removeChildView,this),this._proxyChildViewEvents(e)},_getImmediateChildren:function(){return this.children._views},setElement:function(){return t.View.prototype.setElement.apply(this,arguments),this._isAttached=this._isElAttached(),this},render:function(){if(this._isDestroyed)return this;this.triggerMethod("before:render",this),this._destroyChildren(),this.collection&&(this._addChildModels(this.collection.models),this._initialEvents());var e=this.getTemplate();return e&&(this._renderTemplate(e),this.bindUIElements()),this._getChildViewContainer(),this.sort(),this._isRendered=!0,this.triggerMethod("render",this),this},_getChildViewContainer:function(){var e=n.result(this,"childViewContainer");if(this.$container=e?this.$(e):this.$el,!this.$container.length)throw new c({name:_e,message:'The specified "childViewContainer" was not found: '.concat(e),url:"marionette.collectionview.html#defining-the-childviewcontainer"})},sort:function(){return this._sortChildren(),this.filter(),this},_sortChildren:function(){if(this._children.length){var e=this.getComparator();e&&(delete this._addedViews,this.triggerMethod("before:sort",this),this._children._sort(e,this),this.triggerMethod("sort",this))}},setComparator:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).preventRender,n=this.viewComparator!==e&&!t;return this.viewComparator=e,n&&this.sort(),this},removeComparator:function(e){return this.setComparator(null,e)},getComparator:function(){return this.viewComparator?this.viewComparator:!(!this.sortWithCollection||!1===this.viewComparator||!this.collection)&&this._viewComparator},_viewComparator:function(e){return this.collection.indexOf(e.model)},filter:function(){return this._isDestroyed||(this._filterChildren(),this._renderChildren()),this},_filterChildren:function(){var e=this;if(this._children.length){var t=this._getFilter();if(t){delete this._addedViews,this.triggerMethod("before:filter",this);var r=[],i=[];n.each(this._children._views,(function(n,o,a){(t.call(e,n,o,a)?r:i).push(n)})),this._detachChildren(i),this.children._set(r,!0),this.triggerMethod("filter",this,r,i)}else{var o=this.children.length!==this._children.length;this.children._set(this._children._views,o)}}},_getFilter:function(){var e=this.getFilter();if(!e)return!1;if(n.isFunction(e))return e;if(n.isObject(e)){var t=n.matches(e);return function(e){return t(e.model&&e.model.attributes)}}if(n.isString(e))return function(t){return t.model&&t.model.get(e)};throw new c({name:_e,message:'"viewFilter" must be a function, predicate object literal, a string indicating a model attribute, or falsy',url:"marionette.collectionview.html#defining-the-viewfilter"})},getFilter:function(){return this.viewFilter},setFilter:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).preventRender,n=this.viewFilter!==e&&!t;return this.viewFilter=e,n&&this.filter(),this},removeFilter:function(e){return this.setFilter(null,e)},_detachChildren:function(e){n.each(e,this._detachChildView.bind(this))},_detachChildView:function(e){var t=e._isAttached&&!1!==this.monitorViewEvents;t&&e.triggerMethod("before:detach",e),this.detachHtml(e),t&&(e._isAttached=!1,e.triggerMethod("detach",e)),e._isShown=!1},detachHtml:function(e){this.Dom.detachEl(e.el,e.$el)},_renderChildren:function(){this._hasUnrenderedViews&&(delete this._addedViews,delete this._hasUnrenderedViews);var e=this._addedViews||this.children._views;if(this.triggerMethod("before:render:children",this,e),this.isEmpty())this._showEmptyView();else{this._destroyEmptyView();var t=this._getBuffer(e);this._attachChildren(t,e)}delete this._addedViews,this.triggerMethod("render:children",this,e)},_getBuffer:function(e){var t=this,r=this.Dom.createBuffer();return n.each(e,(function(e){ae(e),e._isShown=!0,t.Dom.appendContents(r,e.el,{_$contents:e.$el})})),r},_attachChildren:function(e,t){t=this._isAttached&&!1!==this.monitorViewEvents?t:[],n.each(t,(function(e){e._isAttached||e.triggerMethod("before:attach",e)})),this.attachHtml(e,this.$container),n.each(t,(function(e){e._isAttached||(e._isAttached=!0,e.triggerMethod("attach",e))}))},attachHtml:function(e,t){this.Dom.appendContents(t[0],e,{_$el:t})},isEmpty:function(){return!this.children.length},_showEmptyView:function(){var e=this._getEmptyView();if(e){var t=this._getEmptyViewOptions();this.getEmptyRegion().show(new e(t))}},_getEmptyView:function(){var e=this.emptyView;if(e)return this._getView(e)},_destroyEmptyView:function(){var e=this.getEmptyRegion();e.hasView()&&e.empty()},_getEmptyViewOptions:function(){var e=this.emptyViewOptions||this.childViewOptions;return n.isFunction(e)?e.call(this):e},swapChildViews:function(e,t){if(!this._children.hasView(e)||!this._children.hasView(t))throw new c({name:_e,message:"Both views must be children of the collection view to swap.",url:"marionette.collectionview.html#swapping-child-views"});return this._children._swap(e,t),this.Dom.swapEl(e.el,t.el),this.children.hasView(e)!==this.children.hasView(t)?this.filter():this.children._swap(e,t),this},addChildView:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e._isDestroyed)return e;if(e._isShown)throw new c({name:_e,message:"View is already shown in a Region or CollectionView",url:"marionette.region.html#showing-a-view"});if(n.isObject(t)&&(r=t),null!=r.index&&(t=r.index),this._isRendered||this.render(),this._addChild(e,t),r.preventRender)return this._hasUnrenderedViews=!0,e;var i=void 0!==t;return(!i||t>=this._children.length)&&!this._hasUnrenderedViews&&(this._addedViews=[e]),i?this._renderChildren():this.sort(),e},detachChildView:function(e){return this.removeChildView(e,{shouldDetach:!0}),e},removeChildView:function(e,t){return e?(this._removeChildView(e,t),this._removeChild(e),this.isEmpty()&&this._showEmptyView(),e):e},_removeChildViews:function(e){n.each(e,this._removeChildView.bind(this))},_removeChildView:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shouldDetach;e.off("destroy",this.removeChildView,this),t?this._detachChildView(e):this._destroyChildView(e),this.stopListening(e)},_destroyChildView:function(e){e._isDestroyed||se(e,!1===this.monitorViewEvents)},_removeChildren:function(){this._destroyChildren(),this.getEmptyRegion().destroy(),delete this._addedViews},_destroyChildren:function(){this._children.length&&(this.triggerMethod("before:destroy:children",this),!1===this.monitorViewEvents&&this.Dom.detachContents(this.el,this.$el),this._removeChildViews(this._children._views),this._children._init(),this.children._init(),this.triggerMethod("destroy:children",this))}},{setDomApi:re,setRenderer:de});n.extend(Te.prototype,oe);var Se=["collectionEvents","events","modelEvents","triggers","ui"],Ee=function(e,t){this.view=t,this._setOptions(e,Se),this.cid=n.uniqueId(this.cidPrefix),this.ui=n.extend({},n.result(this,"ui"),n.result(t,"ui")),this.listenTo(t,"all",this.triggerMethod),this.initialize.apply(this,arguments)};Ee.extend=a,n.extend(Ee.prototype,N,W,J,te,{cidPrefix:"mnb",initialize:function(){},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this.stopListening(),this.view._removeBehavior(this),this._deleteEntityEventHandlers(),this},proxyViewProperties:function(){return this.$el=this.view.$el,this.el=this.view.el,this},bindUIElements:function(){return this._bindUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this},getUI:function(e){return this._getUI(e)},delegateEntityEvents:function(){return this._delegateEntityEvents(this.view.model,this.view.collection),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.view.model,this.view.collection),this},_getEvents:function(){var e=this;if(this.events){var t=this.normalizeUIKeys(n.result(this,"events"));return n.reduce(t,(function(t,r,i){return n.isFunction(r)||(r=e[r]),r?(t[i=X(i,e.cid)]=r.bind(e),t):t}),{})}},_getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(n.result(this,"triggers"));return this._getViewTriggers(this.view,e)}}});var ke=["channelName","radioEvents","radioRequests","region","regionClass"],Oe=function(e){this._setOptions(e,ke),this.cid=n.uniqueId(this.cidPrefix),this._initRegion(),this._initRadio(),this.initialize.apply(this,arguments)};Oe.extend=a,n.extend(Oe.prototype,N,B,U,{cidPrefix:"mna",initialize:function(){},start:function(e){return this.triggerMethod("before:start",this,e),this.triggerMethod("start",this,e),this},regionClass:le,_initRegion:function(){var e=this.region;if(e){var t={regionClass:this.regionClass};this._region=fe(e,t)}},getRegion:function(){return this._region},showView:function(e){for(var t=this.getRegion(),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.show.apply(t,[e].concat(r)),e},getView:function(){return this.getRegion().currentView}});var Ce=o(f),Pe=o(h),xe=o(d),je=o(y),Le=o(m),Ae=o(v),Ie=o(s),Re=o(D),De={View:me,CollectionView:Te,MnObject:V,Object:V,Region:le,Behavior:Ee,Application:Oe,isEnabled:Y,setEnabled:Q,monitorViewEvents:L,Events:M,extend:a,DomApi:ie,VERSION:i};e.Application=Oe,e.Behavior=Ee,e.CollectionView=Te,e.DomApi=ie,e.Events=M,e.MnObject=V,e.Region=le,e.VERSION=i,e.View=me,e.bindEvents=Ce,e.bindRequests=xe,e.default=De,e.extend=a,e.getOption=Ae,e.isEnabled=Y,e.mergeOptions=Le,e.monitorViewEvents=L,e.normalizeMethods=Ie,e.setDomApi=function(e){Te.setDomApi(e),le.setDomApi(e),me.setDomApi(e)},e.setEnabled=Q,e.setRenderer=function(e){Te.setRenderer(e),me.setRenderer(e)},e.triggerMethod=Re,e.unbindEvents=Pe,e.unbindRequests=je,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(43823),n(21161),n(81336)),this&&this.Marionette&&(this.Mn=this.Marionette)},81336:function(e,t,n){e.exports=function(e,t){"use strict";e="default"in e?e.default:e,t="default"in t?t.default:t;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r=t.Radio,i=t.Radio={};i.VERSION="2.0.0",i.noConflict=function(){return t.Radio=r,this},i.DEBUG=!1,i._debugText=function(e,t,n){return e+(n?" on the "+n+" channel":"")+': "'+t+'"'},i.debugLog=function(e,t,n){i.DEBUG&&console&&console.warn&&console.warn(i._debugText(e,t,n))};var o=/\s+/;function a(e,t,n,r){var i=e[t];if(!(n&&n!==i.callback&&n!==i.callback._callback||r&&r!==i.context))return delete e[t],!0}i._eventsApi=function(t,r,i,a){if(!i)return!1;var s={};if("object"===(void 0===i?"undefined":n(i))){for(var u in i){var c=t[r].apply(t,[u,i[u]].concat(a));o.test(u)?e.extend(s,c):s[u]=c}return s}if(o.test(i)){for(var l=i.split(o),f=0,h=l.length;f<h;f++)s[l[f]]=t[r].apply(t,[l[f]].concat(a));return s}return!1},i._callHandler=function(e,t,n){var r=n[0],i=n[1],o=n[2];switch(n.length){case 0:return e.call(t);case 1:return e.call(t,r);case 2:return e.call(t,r,i);case 3:return e.call(t,r,i,o);default:return e.apply(t,n)}};var s,u,c={};function l(t){return c[t]||(c[t]=e.bind(i.log,i,t))}function f(t){return e.isFunction(t)?t:function(){return t}}e.extend(i,{log:function(t,n){if("undefined"!=typeof console){var r=e.toArray(arguments).slice(2);console.log("["+t+'] "'+n+'"',r)}},tuneIn:function(e){var t=i.channel(e);return t._tunedIn=!0,t.on("all",l(e)),this},tuneOut:function(e){var t=i.channel(e);return t._tunedIn=!1,t.off("all",l(e)),delete c[e],this}}),i.Requests={request:function(t){var n=e.toArray(arguments).slice(1),r=i._eventsApi(this,"request",t,n);if(r)return r;var o=this.channelName,a=this._requests;if(o&&this._tunedIn&&i.log.apply(this,[o,t].concat(n)),a&&(a[t]||a.default)){var s=a[t]||a.default;return n=a[t]?n:arguments,i._callHandler(s.callback,s.context,n)}i.debugLog("An unhandled request was fired",t,o)},reply:function(e,t,n){return i._eventsApi(this,"reply",e,[t,n])||(this._requests||(this._requests={}),this._requests[e]&&i.debugLog("A request was overwritten",e,this.channelName),this._requests[e]={callback:f(t),context:n||this}),this},replyOnce:function(t,n,r){if(i._eventsApi(this,"replyOnce",t,[n,r]))return this;var o=this,a=e.once((function(){return o.stopReplying(t),f(n).apply(this,arguments)}));return this.reply(t,a,r)},stopReplying:function(t,n,r){return i._eventsApi(this,"stopReplying",t)||(t||n||r?function(t,n,r,i){t||(t={});for(var o=n?[n]:e.keys(t),s=!1,u=0,c=o.length;u<c;u++)t[n=o[u]]&&a(t,n,r,i)&&(s=!0);return s}(this._requests,t,n,r)||i.debugLog("Attempted to remove the unregistered request",t,this.channelName):delete this._requests),this}},i._channels={},i.channel=function(e){if(!e)throw new Error("You must provide a name for the channel.");return i._channels[e]?i._channels[e]:i._channels[e]=new i.Channel(e)},i.Channel=function(e){this.channelName=e},e.extend(i.Channel.prototype,t.Events,i.Requests,{reset:function(){return this.off(),this.stopListening(),this.stopReplying(),this}});var h=[t.Events,i.Requests];return e.each(h,(function(t){e.each(t,(function(t,n){i[n]=function(t){return u=e.toArray(arguments).slice(1),(s=this.channel(t))[n].apply(s,u)}}))})),i.reset=function(t){var n=t?[this._channels[t]]:this._channels;e.each(n,(function(e){e.reset()}))},i}(n(21161),n(43823))},43823:(e,t,n)=>{var r,i,o;o="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g,r=[n(21161),n(6723),t],i=function(e,t,n){o.Backbone=function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.3.3",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var a=function(e,t,r){n.each(t,(function(t,i){n[i]&&(e.prototype[i]=function(e,t,r){switch(e){case 1:return function(){return n[t](this[r])};case 2:return function(e){return n[t](this[r],e)};case 3:return function(e,i){return n[t](this[r],s(e,this),i)};case 4:return function(e,i,o){return n[t](this[r],s(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),n[t].apply(n,e)}}}(t,i,r))}))},s=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?u(e):n.isString(e)?function(t){return t.get(e)}:e},u=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}},c=t.Events={},l=/\s+/,f=function(e,t,r,i,o){var a,s=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)t=f(e,t,a[s],r[a[s]],o)}else if(r&&l.test(r))for(a=r.split(l);s<a.length;s++)t=e(t,a[s],i,o);else t=e(t,r,i,o);return t};c.on=function(e,t,n){return h(this,e,t,n)};var h=function(e,t,n,r,i){return e._events=f(p,e._events||{},t,n,{context:r,ctx:e,listening:i}),i&&((e._listeners||(e._listeners={}))[i.id]=i),e};c.listenTo=function(e,t,r){if(!e)return this;var i=e._listenId||(e._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=o[i];if(!a){var s=this._listenId||(this._listenId=n.uniqueId("l"));a=o[i]={obj:e,objId:i,id:s,listeningTo:o,count:0}}return h(e,t,r,this,a),this};var p=function(e,t,n,r){if(n){var i=e[t]||(e[t]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return e};c.off=function(e,t,n){return this._events?(this._events=f(d,this._events,e,t,{context:n,listeners:this._listeners}),this):this},c.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(t,r,this)}return this};var d=function(e,t,r,i){if(e){var o,a=0,s=i.context,u=i.listeners;if(t||r||s){for(var c=t?[t]:n.keys(e);a<c.length;a++){var l=e[t=c[a]];if(!l)break;for(var f=[],h=0;h<l.length;h++){var p=l[h];r&&r!==p.callback&&r!==p.callback._callback||s&&s!==p.context?f.push(p):(o=p.listening)&&0==--o.count&&(delete u[o.id],delete o.listeningTo[o.objId])}f.length?e[t]=f:delete e[t]}return e}for(var d=n.keys(u);a<d.length;a++)delete u[(o=u[d[a]]).id],delete o.listeningTo[o.objId]}};c.once=function(e,t,r){var i=f(y,{},e,t,n.bind(this.off,this));return"string"==typeof e&&null==r&&(t=void 0),this.on(i,t,r)},c.listenToOnce=function(e,t,r){var i=f(y,{},t,r,n.bind(this.stopListening,this,e));return this.listenTo(e,i)};var y=function(e,t,r,i){if(r){var o=e[t]=n.once((function(){i(t,o),r.apply(this,arguments)}));o._callback=r}return e};c.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return f(v,this._events,e,void 0,n),this};var v=function(e,t,n,r){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice()),i&&m(i,r),o&&m(o,[t].concat(r))}return e},m=function(e,t){var n,r=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}};c.bind=c.on,c.unbind=c.off,n.extend(t,c);var g=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(g.prototype,c,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var i;if("object"==typeof e?(i=e,r=t):(i={})[e]=t,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var c=this.attributes,l=this.changed,f=this._previousAttributes;for(var h in i)t=i[h],n.isEqual(c[h],t)||s.push(h),n.isEqual(f[h],t)?delete l[h]:l[h]=t,o?delete c[h]:c[h]=t;if(this.idAttribute in i&&(this.id=this.get(this.idAttribute)),!a){s.length&&(this._pending=r);for(var p=0;p<s.length;p++)this.trigger("change:"+s[p],this,c[s[p]],r)}if(u)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,r={};for(var i in e){var o=e[i];n.isEqual(t[i],o)||(r[i]=o)}return!!n.size(r)&&r},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var i=e.parse?t.parse(n,e):n;if(!t.set(i,e))return!1;r&&r.call(e.context,t,n,e),t.trigger("sync",t,n,e)},N(this,e),this.sync("read",this,e)},save:function(e,t,r){var i;null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var a=this,s=r.success,u=this.attributes;r.success=function(e){a.attributes=u;var t=r.parse?a.parse(e,r):e;if(o&&(t=n.extend({},i,t)),t&&!a.set(t,r))return!1;s&&s.call(r.context,a,e,r),a.trigger("sync",a,e,r)},N(this,r),i&&o&&(this.attributes=n.extend({},u,i));var c=this.isNew()?"create":r.patch?"patch":"update";"patch"!==c||r.attrs||(r.attrs=i);var l=this.sync(c,this,r);return this.attributes=u,l},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=e.wait,o=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){i&&o(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var a=!1;return this.isNew()?n.defer(e.success):(N(this,e),a=this.sync("delete",this,e)),i||o(),a},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||M();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}}),a(g,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var b=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},_={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},T=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,i=Array(e.length-n),o=t.length;for(r=0;r<i.length;r++)i[r]=e[r+n];for(r=0;r<o;r++)e[r+n]=t[r];for(r=0;r<i.length;r++)e[r+o+n]=i[r]};n.extend(b.prototype,c,{model:g,initialize:function(){},toJSON:function(e){return this.map((function(t){return t.toJSON(e)}))},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,w))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var i=this._removeModels(e,t);return!t.silent&&i.length&&(t.changes={added:[],merged:[],removed:i},this.trigger("update",this,t)),r?i[0]:i},set:function(e,t){if(null!=e){(t=n.extend({},_,t)).parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var i=t.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],u=[],c=[],l=[],f={},h=t.add,p=t.merge,d=t.remove,y=!1,v=this.comparator&&null==i&&!1!==t.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a<e.length;a++){o=e[a];var g=this.get(o);if(g){if(p&&o!==g){var b=this._isModel(o)?o.attributes:o;t.parse&&(b=g.parse(b,t)),g.set(b,t),c.push(g),v&&!y&&(y=g.hasChanged(m))}f[g.cid]||(f[g.cid]=!0,s.push(g)),e[a]=g}else h&&(o=e[a]=this._prepareModel(o,t))&&(u.push(o),this._addReference(o,t),f[o.cid]=!0,s.push(o))}if(d){for(a=0;a<this.length;a++)f[(o=this.models[a]).cid]||l.push(o);l.length&&this._removeModels(l,t)}var w=!1,S=!v&&h&&d;if(s.length&&S?(w=this.length!==s.length||n.some(this.models,(function(e,t){return e!==s[t]})),this.models.length=0,T(this.models,s,0),this.length=this.models.length):u.length&&(v&&(y=!0),T(this.models,u,null==i?this.length:i),this.length=this.models.length),y&&this.sort({silent:!0}),!t.silent){for(a=0;a<u.length;a++)null!=i&&(t.index=i+a),(o=u[a]).trigger("add",o,this,t);(y||w)&&this.trigger("sort",this,t),(u.length||l.length||c.length)&&(t.changes={added:u,removed:l,merged:c},this.trigger("update",this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(e.attributes||e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=n.bind(t,this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){var t=(e=n.extend({parse:!0},e)).success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},N(this,e),this.sync("read",this,e)},create:function(e,t){var r=(t=t?n.clone(t):{}).wait;if(!(e=this._prepareModel(e,t)))return!1;r||this.add(e,t);var i=this,o=t.success;return t.success=function(e,t,n){r&&i.add(e,n),o&&o.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;(t=t?n.clone(t):{}).collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=this.get(e[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes);null!=a&&delete this._byId[a],t.silent||(t.index=o,i.trigger("remove",i,this,t)),n.push(i),this._removeReference(i,t)}}return n},_isModel:function(e){return e instanceof g},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"change"===e){var i=this.modelId(t.previousAttributes()),o=this.modelId(t.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=t))}}this.trigger.apply(this,arguments)}}),a(b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var S=t.View=function(e){this.cid=n.uniqueId("view"),n.extend(this,n.pick(e,k)),this._ensureElement(),this.initialize.apply(this,arguments)},E=/^(\S+)\s*(.*)$/,k=["model","collection","el","id","attributes","className","tagName","events"];n.extend(S.prototype,c,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var i=t.match(E);this.delegate(i[1],i[2],n.bind(r,this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}}),t.sync=function(e,r,i){var o=O[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||M()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",o),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var u=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,u&&u.call(i.context,e,t,n)};var c=i.xhr=t.ajax(n.extend(a,i));return r.trigger("request",r,c,i),c};var O={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var C=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},P=/\((.*?)\)/g,x=/(\(\?)?:\w+/g,j=/\*\w+/g,L=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(C.prototype,c,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,(function(n){var a=o._extractParameters(e,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),t.history.trigger("route",o,r,a))})),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(L,"\\$&").replace(P,"(?:$1)?").replace(x,(function(e,t){return t?e:"([^/?]+)"})).replace(j,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,(function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null}))}});var A=t.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},I=/^[#\/]|\s+$/g,R=/^\/+|\/+$/g,D=/#.*$/;A.started=!1,n.extend(A.prototype,c,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(I,"")},start:function(e){if(A.started)throw new Error("Backbone.history has already been started");if(A.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(R,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),A.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,(function(t){if(t.route.test(e))return t.callback(e),!0})))},navigate:function(e,t){if(!A.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;if(e=this.decodeFragment(e.replace(D,"")),this.fragment!==e){if(this.fragment=e,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new A;g.extend=b.extend=C.extend=S.extend=A.extend=function(e,t){var r,i=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,t),r.prototype=n.create(i.prototype,e),r.prototype.constructor=r,r.__super__=i.prototype,r};var M=function(){throw new Error('A "url" property or function must be specified')},N=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t}(o,n,e,t)}.apply(t,r),void 0===i||(e.exports=i)},15206:e=>{var t=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=t},94605:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},29076:(e,t,n)=>{var r=n(62366);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},5822:(e,t,n)=>{var r=n(46802),i=n(22275),o=n(50430),a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,i(null)),e.exports=function(e){s[a][e]=!0}},25528:(e,t,n)=>{"use strict";var r=n(50189).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},72814:e=>{e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},4905:(e,t,n)=>{var r=n(62366);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},16607:(e,t,n)=>{"use strict";var r=n(72758).forEach,i=n(31853);e.exports=i("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},5029:(e,t,n)=>{var r=n(40678),i=n(74479),o=n(6971),a=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},72758:(e,t,n)=>{var r=n(17755),i=n(62901),o=n(87615),a=n(74479),s=n(17021),u=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,l=4==e,f=6==e,h=5==e||f;return function(p,d,y,v){for(var m,g,b=o(p),_=i(b),w=r(d,y,3),T=a(_.length),S=0,E=v||s,k=t?E(p,T):n?E(p,0):void 0;T>S;S++)if((h||S in _)&&(g=w(m=_[S],S,b),e))if(t)k[S]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return S;case 2:u.call(k,m)}else if(l)return!1;return f?-1:c||l?l:k}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},95611:(e,t,n)=>{var r=n(25061),i=n(46802),o=n(24101),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},62040:(e,t,n)=>{var r=n(94605),i=n(87615),o=n(62901),a=n(74479),s=function(e){return function(t,n,s,u){r(n);var c=i(t),l=o(c),f=a(c.length),h=e?f-1:0,p=e?-1:1;if(s<2)for(;;){if(h in l){u=l[h],h+=p;break}if(h+=p,e?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:f>h;h+=p)h in l&&(u=n(u,l[h],h,c));return u}};e.exports={left:s(!1),right:s(!0)}},17021:(e,t,n)=>{var r=n(62366),i=n(20119),o=n(46802)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},17755:(e,t,n)=>{var r=n(94605);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},35304:(e,t,n)=>{var r=n(4905);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},13165:(e,t,n)=>{var r=n(46802)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},75489:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},20486:(e,t,n)=>{var r=n(75489),i=n(46802)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},53769:(e,t,n)=>{"use strict";var r=n(86846),i=n(81738).getWeakData,o=n(4905),a=n(62366),s=n(72814),u=n(98971),c=n(72758),l=n(51900),f=n(50684),h=f.set,p=f.getterFor,d=c.find,y=c.findIndex,v=0,m=function(e){return e.frozen||(e.frozen=new g)},g=function(){this.entries=[]},b=function(e,t){return d(e.entries,(function(e){return e[0]===t}))};g.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=y(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,c){var f=e((function(e,r){s(e,f,t),h(e,{type:t,id:v++,frozen:void 0}),null!=r&&u(r,e[c],e,n)})),d=p(t),y=function(e,t,n){var r=d(e),a=i(o(t),!0);return!0===a?m(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=d(this);if(!a(e))return!1;var n=i(e);return!0===n?m(t).delete(e):n&&l(n,t.id)&&delete n[t.id]},has:function(e){var t=d(this);if(!a(e))return!1;var n=i(e);return!0===n?m(t).has(e):n&&l(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=d(this);if(a(e)){var n=i(e);return!0===n?m(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),f}}},66606:(e,t,n)=>{"use strict";var r=n(29638),i=n(45001),o=n(91092),a=n(96313),s=n(81738),u=n(98971),c=n(72814),l=n(62366),f=n(25061),h=n(13165),p=n(40606),d=n(3419);e.exports=function(e,t,n,y,v){var m=i[e],g=m&&m.prototype,b=m,_=y?"set":"add",w={},T=function(e){var t=g[e];a(g,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!l(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof m||!(v||g.forEach&&!f((function(){(new m).entries().next()})))))b=n.getConstructor(t,e,y,_),s.REQUIRED=!0;else if(o(e,!0)){var S=new b,E=S[_](v?{}:-0,1)!=S,k=f((function(){S.has(1)})),O=h((function(e){new m(e)})),C=!v&&f((function(){for(var e=new m,t=5;t--;)e[_](t,t);return!e.has(-0)}));O||((b=t((function(t,n){c(t,b,e);var r=d(new m,t,b);return null!=n&&u(n,r[_],r,y),r}))).prototype=g,g.constructor=b),(k||C)&&(T("delete"),T("has"),y&&T("get")),(C||E)&&T(_),v&&g.clear&&delete g.clear}return w[e]=b,r({global:!0,forced:b!=m},w),p(b,e),v||n.setStrong(b,e,y),b}},46810:(e,t,n)=>{var r=n(51900),i=n(62466),o=n(8117),a=n(56462);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(e,l)||s(e,l,u(t,l))}}},10149:(e,t,n)=>{var r=n(25061);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},62141:(e,t,n)=>{"use strict";var r=n(61151).IteratorPrototype,i=n(22275),o=n(86034),a=n(40606),s=n(80501),u=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,c,!1,!0),s[c]=u,e}},50430:(e,t,n)=>{var r=n(11502),i=n(56462),o=n(86034);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},86034:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},30645:(e,t,n)=>{"use strict";var r=n(29638),i=n(62141),o=n(64320),a=n(22848),s=n(40606),u=n(50430),c=n(96313),l=n(46802),f=n(20013),h=n(80501),p=n(61151),d=p.IteratorPrototype,y=p.BUGGY_SAFARI_ITERATORS,v=l("iterator"),m="keys",g="values",b="entries",_=function(){return this};e.exports=function(e,t,n,l,p,w,T){i(n,t,l);var S,E,k,O=function(e){if(e===p&&L)return L;if(!y&&e in x)return x[e];switch(e){case m:case g:case b:return function(){return new n(this,e)}}return function(){return new n(this)}},C=t+" Iterator",P=!1,x=e.prototype,j=x[v]||x["@@iterator"]||p&&x[p],L=!y&&j||O(p),A="Array"==t&&x.entries||j;if(A&&(S=o(A.call(new e)),d!==Object.prototype&&S.next&&(f||o(S)===d||(a?a(S,d):"function"!=typeof S[v]&&u(S,v,_)),s(S,C,!0,!0),f&&(h[C]=_))),p==g&&j&&j.name!==g&&(P=!0,L=function(){return j.call(this)}),f&&!T||x[v]===L||u(x,v,L),h[t]=L,p)if(E={values:O(g),keys:w?L:O(m),entries:O(b)},T)for(k in E)(y||P||!(k in x))&&c(x,k,E[k]);else r({target:t,proto:!0,forced:y||P},E);return E}},11502:(e,t,n)=>{var r=n(25061);e.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},36009:(e,t,n)=>{var r=n(45001),i=n(62366),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},58514:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},72089:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},29638:(e,t,n)=>{var r=n(45001),i=n(8117).f,o=n(50430),a=n(96313),s=n(88506),u=n(46810),c=n(91092);e.exports=function(e,t){var n,l,f,h,p,d=e.target,y=e.global,v=e.stat;if(n=y?r:v?r[d]||s(d,{}):(r[d]||{}).prototype)for(l in t){if(h=t[l],f=e.noTargetGet?(p=i(n,l))&&p.value:n[l],!c(y?l:d+(v?".":"#")+l,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(n,l,h,e)}}},25061:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},95453:(e,t,n)=>{"use strict";var r=n(50430),i=n(96313),o=n(25061),a=n(46802),s=n(44847),u=a("species"),c=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=a(e),p=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),d=p&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!p||!d||"replace"===e&&!c||"split"===e&&!l){var y=/./[h],v=n(h,""[e],(function(e,t,n,r,i){return t.exec===s?p&&!i?{done:!0,value:y.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),m=v[0],g=v[1];i(String.prototype,e,m),i(RegExp.prototype,h,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)}),f&&r(RegExp.prototype[h],"sham",!0)}}},98218:(e,t,n)=>{var r=n(25061);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},21501:(e,t,n)=>{var r=n(6809);e.exports=r("native-function-to-string",Function.toString)},3425:(e,t,n)=>{var r=n(53757),i=n(45001),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},26354:(e,t,n)=>{var r=n(20486),i=n(80501),o=n(46802)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},45001:(e,t,n)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||Function("return this")()},51900:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},92499:e=>{e.exports={}},12118:(e,t,n)=>{var r=n(3425);e.exports=r("document","documentElement")},17788:(e,t,n)=>{var r=n(11502),i=n(25061),o=n(36009);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},62901:(e,t,n)=>{var r=n(25061),i=n(75489),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},3419:(e,t,n)=>{var r=n(62366),i=n(22848);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},81738:(e,t,n)=>{var r=n(92499),i=n(62366),o=n(51900),a=n(56462).f,s=n(41050),u=n(98218),c=s("meta"),l=0,f=Object.isExtensible||function(){return!0},h=function(e){a(e,c,{value:{objectID:"O"+ ++l,weakData:{}}})},p=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,c)){if(!f(e))return"F";if(!t)return"E";h(e)}return e[c].objectID},getWeakData:function(e,t){if(!o(e,c)){if(!f(e))return!0;if(!t)return!1;h(e)}return e[c].weakData},onFreeze:function(e){return u&&p.REQUIRED&&f(e)&&!o(e,c)&&h(e),e}};r[c]=!0},50684:(e,t,n)=>{var r,i,o,a=n(77650),s=n(45001),u=n(62366),c=n(50430),l=n(51900),f=n(61695),h=n(92499),p=s.WeakMap;if(a){var d=new p,y=d.get,v=d.has,m=d.set;r=function(e,t){return m.call(d,e,t),t},i=function(e){return y.call(d,e)||{}},o=function(e){return v.call(d,e)}}else{var g=f("state");h[g]=!0,r=function(e,t){return c(e,g,t),t},i=function(e){return l(e,g)?e[g]:{}},o=function(e){return l(e,g)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},55557:(e,t,n)=>{var r=n(46802),i=n(80501),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},20119:(e,t,n)=>{var r=n(75489);e.exports=Array.isArray||function(e){return"Array"==r(e)}},91092:(e,t,n)=>{var r=n(25061),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==c||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},62366:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},20013:e=>{e.exports=!1},98971:(e,t,n)=>{var r=n(4905),i=n(55557),o=n(74479),a=n(17755),s=n(26354),u=n(35304),c=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,l,f){var h,p,d,y,v,m,g,b=a(t,n,l?2:1);if(f)h=e;else{if("function"!=typeof(p=s(e)))throw TypeError("Target is not iterable");if(i(p)){for(d=0,y=o(e.length);y>d;d++)if((v=l?b(r(g=e[d])[0],g[1]):b(e[d]))&&v instanceof c)return v;return new c(!1)}h=p.call(e)}for(m=h.next;!(g=m.call(h)).done;)if("object"==typeof(v=u(h,b,g.value,l))&&v&&v instanceof c)return v;return new c(!1)}).stop=function(e){return new c(!0,e)}},61151:(e,t,n)=>{"use strict";var r,i,o,a=n(64320),s=n(50430),u=n(51900),c=n(46802),l=n(20013),f=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),l||u(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},80501:e=>{e.exports={}},99262:(e,t,n)=>{var r=n(25061);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},77650:(e,t,n)=>{var r=n(45001),i=n(21501),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i.call(o))},71640:(e,t,n)=>{"use strict";var r=n(11502),i=n(25061),o=n(89749),a=n(72822),s=n(49265),u=n(87615),c=n(62901),l=Object.assign;e.exports=!l||i((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||o(l({},t)).join("")!=r}))?function(e,t){for(var n=u(e),i=arguments.length,l=1,f=a.f,h=s.f;i>l;)for(var p,d=c(arguments[l++]),y=f?o(d).concat(f(d)):o(d),v=y.length,m=0;v>m;)p=y[m++],r&&!h.call(d,p)||(n[p]=d[p]);return n}:l},22275:(e,t,n)=>{var r=n(4905),i=n(56191),o=n(72089),a=n(92499),s=n(12118),u=n(36009),c=n(61695)("IE_PROTO"),l="prototype",f=function(){},h=function(){var e,t=u("iframe"),n=o.length,r="script",i="java"+r+":";for(t.style.display="none",s.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write("<"+r+">document.F=Object</"+r+">"),e.close(),h=e.F;n--;)delete h[l][o[n]];return h()};e.exports=Object.create||function(e,t){var n;return null!==e?(f[l]=r(e),n=new f,f[l]=null,n[c]=e):n=h(),void 0===t?n:i(n,t)},a[c]=!0},56191:(e,t,n)=>{var r=n(11502),i=n(56462),o=n(4905),a=n(89749);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},56462:(e,t,n)=>{var r=n(11502),i=n(17788),o=n(4905),a=n(76973),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},8117:(e,t,n)=>{var r=n(11502),i=n(49265),o=n(86034),a=n(40678),s=n(76973),u=n(51900),c=n(17788),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},59219:(e,t,n)=>{var r=n(23855),i=n(72089).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},72822:(e,t)=>{t.f=Object.getOwnPropertySymbols},64320:(e,t,n)=>{var r=n(51900),i=n(87615),o=n(61695),a=n(10149),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},23855:(e,t,n)=>{var r=n(51900),i=n(40678),o=n(5029).indexOf,a=n(92499);e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},89749:(e,t,n)=>{var r=n(23855),i=n(72089);e.exports=Object.keys||function(e){return r(e,i)}},49265:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},22848:(e,t,n)=>{var r=n(4905),i=n(29076);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},45085:(e,t,n)=>{"use strict";var r=n(20486),i={};i[n(46802)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},62466:(e,t,n)=>{var r=n(3425),i=n(59219),o=n(72822),a=n(4905);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},7206:(e,t,n)=>{var r=n(45001),i=n(9522).trim,o=n(49309),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");e.exports=u?function(e,t){var n=i(String(e));return a(n,t>>>0||(s.test(n)?16:10))}:a},53757:(e,t,n)=>{e.exports=n(45001)},86846:(e,t,n)=>{var r=n(96313);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},96313:(e,t,n)=>{var r=n(45001),i=n(6809),o=n(50430),a=n(51900),s=n(88506),u=n(21501),c=n(50684),l=c.get,f=c.enforce,h=String(u).split("toString");i("inspectSource",(function(e){return u.call(e)})),(e.exports=function(e,t,n,i){var u=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,l=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||o(n,"name",t),f(n).source=h.join("string"==typeof t?t:"")),e!==r?(u?!l&&e[t]&&(c=!0):delete e[t],c?e[t]=n:o(e,t,n)):c?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||u.call(this)}))},41847:(e,t,n)=>{var r=n(75489),i=n(44847);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},44847:(e,t,n)=>{"use strict";var r,i,o=n(5268),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(c||l)&&(u=function(e){var t,n,r,i,u=this;return l&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),c&&(t=u.lastIndex),r=a.call(u,e),c&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),l&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},5268:(e,t,n)=>{"use strict";var r=n(4905);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},64475:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},88506:(e,t,n)=>{var r=n(45001),i=n(50430);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},40606:(e,t,n)=>{var r=n(56462).f,i=n(51900),o=n(46802)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},61695:(e,t,n)=>{var r=n(6809),i=n(41050),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},19982:(e,t,n)=>{var r=n(45001),i=n(88506),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},6809:(e,t,n)=>{var r=n(20013),i=n(19982);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.4.0",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},31853:(e,t,n)=>{"use strict";var r=n(25061);e.exports=function(e,t){var n=[][e];return!n||!r((function(){n.call(null,t||function(){throw 1},1)}))}},50189:(e,t,n)=>{var r=n(90321),i=n(64475),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},9522:(e,t,n)=>{var r=n(64475),i="["+n(49309)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},6971:(e,t,n)=>{var r=n(90321),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},40678:(e,t,n)=>{var r=n(62901),i=n(64475);e.exports=function(e){return r(i(e))}},90321:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},74479:(e,t,n)=>{var r=n(90321),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},87615:(e,t,n)=>{var r=n(64475);e.exports=function(e){return Object(r(e))}},76973:(e,t,n)=>{var r=n(62366);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},41050:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},84583:(e,t,n)=>{var r=n(3425);e.exports=r("navigator","userAgent")||""},24101:(e,t,n)=>{var r,i,o=n(45001),a=n(84583),s=o.process,u=s&&s.versions,c=u&&u.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},46802:(e,t,n)=>{var r=n(45001),i=n(6809),o=n(41050),a=n(99262),s=r.Symbol,u=i("wks");e.exports=function(e){return u[e]||(u[e]=a&&s[e]||(a?s:o)("Symbol."+e))}},49309:e=>{e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},15296:(e,t,n)=>{"use strict";var r=n(29638),i=n(72758).filter;r({target:"Array",proto:!0,forced:!n(95611)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},94386:(e,t,n)=>{"use strict";var r=n(29638),i=n(16607);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},48868:(e,t,n)=>{"use strict";var r=n(40678),i=n(5822),o=n(80501),a=n(50684),s=n(30645),u="Array Iterator",c=a.set,l=a.getterFor(u);e.exports=s(Array,"Array",(function(e,t){c(this,{type:u,target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},82937:(e,t,n)=>{"use strict";var r=n(29638),i=n(62040).left;r({target:"Array",proto:!0,forced:n(31853)("reduce")},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},66403:(e,t,n)=>{var r=n(11502),i=n(56462).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/,u="name";r&&!(u in o)&&i(o,u,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},96609:(e,t,n)=>{var r=n(29638),i=n(71640);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},92274:(e,t,n)=>{var r=n(96313),i=n(45085),o=Object.prototype;i!==o.toString&&r(o,"toString",i,{unsafe:!0})},68268:(e,t,n)=>{var r=n(29638),i=n(7206);r({global:!0,forced:parseInt!=i},{parseInt:i})},42295:(e,t,n)=>{"use strict";var r=n(29638),i=n(44847);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},81874:(e,t,n)=>{"use strict";var r=n(50189).charAt,i=n(50684),o=n(30645),a="String Iterator",s=i.set,u=i.getterFor(a);o(String,"String",(function(e){s(this,{type:a,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},52963:(e,t,n)=>{"use strict";var r=n(95453),i=n(4905),o=n(74479),a=n(64475),s=n(25528),u=n(41847);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),c=String(this);if(!a.global)return u(a,c);var l=a.unicode;a.lastIndex=0;for(var f,h=[],p=0;null!==(f=u(a,c));){var d=String(f[0]);h[p]=d,""===d&&(a.lastIndex=s(c,o(a.lastIndex),l)),p++}return 0===p?null:h}]}))},34994:(e,t,n)=>{"use strict";var r=n(95453),i=n(4905),o=n(87615),a=n(74479),s=n(90321),u=n(64475),c=n(25528),l=n(41847),f=Math.max,h=Math.min,p=Math.floor,d=/\$([$&'`]|\d\d?|<[^>]*>)/g,y=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n){return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,o){var u=n(t,e,this,o);if(u.done)return u.value;var p=i(e),d=String(this),y="function"==typeof o;y||(o=String(o));var v=p.global;if(v){var m=p.unicode;p.lastIndex=0}for(var g=[];;){var b=l(p,d);if(null===b)break;if(g.push(b),!v)break;""===String(b[0])&&(p.lastIndex=c(d,a(p.lastIndex),m))}for(var _,w="",T=0,S=0;S<g.length;S++){b=g[S];for(var E=String(b[0]),k=f(h(s(b.index),d.length),0),O=[],C=1;C<b.length;C++)O.push(void 0===(_=b[C])?_:String(_));var P=b.groups;if(y){var x=[E].concat(O,k,d);void 0!==P&&x.push(P);var j=String(o.apply(void 0,x))}else j=r(E,d,k,O,P,o);k>=T&&(w+=d.slice(T,k)+j,T=k+E.length)}return w+d.slice(T)}];function r(e,n,r,i,a,s){var u=r+e.length,c=i.length,l=y;return void 0!==a&&(a=o(a),l=d),t.call(s,l,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return t;if(l>c){var f=p(l/10);return 0===f?t:f<=c?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):t}s=i[l-1]}return void 0===s?"":s}))}}))},31341:(e,t,n)=>{"use strict";var r,i=n(45001),o=n(86846),a=n(81738),s=n(66606),u=n(53769),c=n(62366),l=n(50684).enforce,f=n(77650),h=!i.ActiveXObject&&"ActiveXObject"in i,p=Object.isExtensible,d=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},y=e.exports=s("WeakMap",d,u,!0,!0);if(f&&h){r=u.getConstructor(d,"WeakMap",!0),a.REQUIRED=!0;var v=y.prototype,m=v.delete,g=v.has,b=v.get,_=v.set;o(v,{delete:function(e){if(c(e)&&!p(e)){var t=l(this);return t.frozen||(t.frozen=new r),m.call(this,e)||t.frozen.delete(e)}return m.call(this,e)},has:function(e){if(c(e)&&!p(e)){var t=l(this);return t.frozen||(t.frozen=new r),g.call(this,e)||t.frozen.has(e)}return g.call(this,e)},get:function(e){if(c(e)&&!p(e)){var t=l(this);return t.frozen||(t.frozen=new r),g.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(c(e)&&!p(e)){var n=l(this);n.frozen||(n.frozen=new r),g.call(this,e)?_.call(this,e,t):n.frozen.set(e,t)}else _.call(this,e,t);return this}})}},98457:(e,t,n)=>{var r=n(45001),i=n(58514),o=n(16607),a=n(50430);for(var s in i){var u=r[s],c=u&&u.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(e){c.forEach=o}}},54861:(e,t,n)=>{var r=n(45001),i=n(58514),o=n(48868),a=n(50430),s=n(46802),u=s("iterator"),c=s("toStringTag"),l=o.values;for(var f in i){var h=r[f],p=h&&h.prototype;if(p){if(p[u]!==l)try{a(p,u,l)}catch(e){p[u]=l}if(p[c]||a(p,c,f),i[f])for(var d in o)if(p[d]!==o[d])try{a(p,d,o[d])}catch(e){p[d]=o[d]}}}},16951:function(e){e.exports=function(){"use strict";var e=Object.freeze||function(e){return e},t=e(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),n=e(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),r=e(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),i=e(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),o=e(["#text"]),a=Object.freeze||function(e){return e},s=a(["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","minlength","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"]),u=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),c=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),l=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),f=Object.hasOwnProperty,h=Object.setPrototypeOf,p=("undefined"!=typeof Reflect&&Reflect).apply;function d(e,t){h&&h(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var i=r.toLowerCase();i!==r&&(Object.isFrozen(t)||(t[n]=i),r=i)}e[r]=!0}return e}function y(e){var t={},n=void 0;for(n in e)p(f,e,[n])&&(t[n]=e[n]);return t}p||(p=function(e,t,n){return e.apply(t,n)});var v=Object.seal||function(e){return e},m=v(/\{\{[\s\S]*|[\s\S]*\}\}/gm),g=v(/<%[\s\S]*|[\s\S]*%>/gm),b=v(/^data-[\-\w.\u00B7-\uFFFF]/),_=v(/^aria-[\-\w]+$/),w=v(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),T=v(/^(?:\w+script|data):/i),S=v(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g),E="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};function k(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)}var O=("undefined"!=typeof Reflect&&Reflect).apply,C=Array.prototype.slice,P=Object.freeze,x=function(){return"undefined"==typeof window?null:window};O||(O=function(e,t,n){return e.apply(t,n)});return function e(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x(),f=function(t){return e(t)};if(f.version="2.0.7",f.removed=[],!a||!a.document||9!==a.document.nodeType)return f.isSupported=!1,f;var h=a.document,p=!1,v=!1,j=a.document,L=a.DocumentFragment,A=a.HTMLTemplateElement,I=a.Node,R=a.NodeFilter,D=a.NamedNodeMap,M=void 0===D?a.NamedNodeMap||a.MozNamedAttrMap:D,N=a.Text,B=a.Comment,U=a.DOMParser,F=a.TrustedTypes;if("function"==typeof A){var V=j.createElement("template");V.content&&V.content.ownerDocument&&(j=V.content.ownerDocument)}var H=function(e,t){if("object"!==(void 0===e?"undefined":E(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(F,h),q=H?H.createHTML(""):"",z=j,W=z.implementation,G=z.createNodeIterator,$=z.getElementsByTagName,X=z.createDocumentFragment,K=h.importNode,Y={};f.isSupported=W&&void 0!==W.createHTMLDocument&&9!==j.documentMode;var Q=m,J=g,Z=b,ee=_,te=T,ne=S,re=w,ie=null,oe=d({},[].concat(k(t),k(n),k(r),k(i),k(o))),ae=null,se=d({},[].concat(k(s),k(u),k(c),k(l))),ue=null,ce=null,le=!0,fe=!0,he=!1,pe=!1,de=!1,ye=!1,ve=!1,me=!1,ge=!1,be=!1,_e=!1,we=!1,Te=!0,Se=!0,Ee=!1,ke={},Oe=d({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ce=d({},["audio","video","img","source","image"]),Pe=null,xe=d({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),je=null,Le=j.createElement("form"),Ae=function(e){je&&je===e||(e&&"object"===(void 0===e?"undefined":E(e))||(e={}),ie="ALLOWED_TAGS"in e?d({},e.ALLOWED_TAGS):oe,ae="ALLOWED_ATTR"in e?d({},e.ALLOWED_ATTR):se,Pe="ADD_URI_SAFE_ATTR"in e?d(y(xe),e.ADD_URI_SAFE_ATTR):xe,ue="FORBID_TAGS"in e?d({},e.FORBID_TAGS):{},ce="FORBID_ATTR"in e?d({},e.FORBID_ATTR):{},ke="USE_PROFILES"in e&&e.USE_PROFILES,le=!1!==e.ALLOW_ARIA_ATTR,fe=!1!==e.ALLOW_DATA_ATTR,he=e.ALLOW_UNKNOWN_PROTOCOLS||!1,pe=e.SAFE_FOR_JQUERY||!1,de=e.SAFE_FOR_TEMPLATES||!1,ye=e.WHOLE_DOCUMENT||!1,ge=e.RETURN_DOM||!1,be=e.RETURN_DOM_FRAGMENT||!1,_e=e.RETURN_DOM_IMPORT||!1,we=e.RETURN_TRUSTED_TYPE||!1,me=e.FORCE_BODY||!1,Te=!1!==e.SANITIZE_DOM,Se=!1!==e.KEEP_CONTENT,Ee=e.IN_PLACE||!1,re=e.ALLOWED_URI_REGEXP||re,de&&(fe=!1),be&&(ge=!0),ke&&(ie=d({},[].concat(k(o))),ae=[],!0===ke.html&&(d(ie,t),d(ae,s)),!0===ke.svg&&(d(ie,n),d(ae,u),d(ae,l)),!0===ke.svgFilters&&(d(ie,r),d(ae,u),d(ae,l)),!0===ke.mathMl&&(d(ie,i),d(ae,c),d(ae,l))),e.ADD_TAGS&&(ie===oe&&(ie=y(ie)),d(ie,e.ADD_TAGS)),e.ADD_ATTR&&(ae===se&&(ae=y(ae)),d(ae,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&d(Pe,e.ADD_URI_SAFE_ATTR),Se&&(ie["#text"]=!0),ye&&d(ie,["html","head","body"]),ie.table&&(d(ie,["tbody"]),delete ue.tbody),P&&P(e),je=e)},Ie=function(e){f.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=q}},Re=function(e,t){try{f.removed.push({attribute:t.getAttributeNode(e),from:t})}catch(e){f.removed.push({attribute:null,from:t})}t.removeAttribute(e)},De=function(e){var t=void 0,n=void 0;if(me)e="<remove></remove>"+e;else{var r=e.match(/^[\s]+/);(n=r&&r[0])&&(e=e.slice(n.length))}if(p)try{t=(new U).parseFromString(e,"text/html")}catch(e){}if(v&&d(ue,["title"]),!t||!t.documentElement){var i=(t=W.createHTMLDocument("")).body;i.parentNode.removeChild(i.parentNode.firstElementChild),i.outerHTML=H?H.createHTML(e):e}return e&&n&&t.body.insertBefore(j.createTextNode(n),t.body.childNodes[0]||null),$.call(t,ye?"html":"body")[0]};f.isSupported&&(function(){try{De('<svg><p><textarea><img src="</textarea><img src=x abc=1//">').querySelector("svg img")&&(p=!0)}catch(e){}}(),function(){try{var e=De("<x/><title>&lt;/title&gt;&lt;img&gt;");/<\/title/.test(e.querySelector("title").innerHTML)&&(v=!0)}catch(e){}}());var Me=function(e){return G.call(e.ownerDocument||e,e,R.SHOW_ELEMENT|R.SHOW_COMMENT|R.SHOW_TEXT,(function(){return R.FILTER_ACCEPT}),!1)},Ne=function(e){return"object"===(void 0===I?"undefined":E(I))?e instanceof I:e&&"object"===(void 0===e?"undefined":E(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Be=function(e,t,n){Y[e]&&Y[e].forEach((function(e){e.call(f,t,n,je)}))},Ue=function(e){var t,n=void 0;if(Be("beforeSanitizeElements",e,null),!((t=e)instanceof N||t instanceof B||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof M&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI))return Ie(e),!0;var r=e.nodeName.toLowerCase();if(Be("uponSanitizeElement",e,{tagName:r,allowedTags:ie}),("svg"===r||"math"===r)&&0!==e.querySelectorAll("p, br").length)return Ie(e),!0;if(!ie[r]||ue[r]){if(Se&&!Oe[r]&&"function"==typeof e.insertAdjacentHTML)try{var i=e.innerHTML;e.insertAdjacentHTML("AfterEnd",H?H.createHTML(i):i)}catch(e){}return Ie(e),!0}return"noscript"===r&&/<\/noscript/i.test(e.innerHTML)||"noembed"===r&&/<\/noembed/i.test(e.innerHTML)?(Ie(e),!0):(!pe||e.firstElementChild||e.content&&e.content.firstElementChild||!/</g.test(e.textContent)||(f.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"&lt;"):e.innerHTML=e.textContent.replace(/</g,"&lt;")),de&&3===e.nodeType&&(n=(n=(n=e.textContent).replace(Q," ")).replace(J," "),e.textContent!==n&&(f.removed.push({element:e.cloneNode()}),e.textContent=n)),Be("afterSanitizeElements",e,null),!1)},Fe=function(e,t,n){if(Te&&("id"===t||"name"===t)&&(n in j||n in Le))return!1;if(fe&&Z.test(t));else if(le&&ee.test(t));else{if(!ae[t]||ce[t])return!1;if(Pe[t]);else if(re.test(n.replace(ne,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==n.indexOf("data:")||!Ce[e])if(he&&!te.test(n.replace(ne,"")));else if(n)return!1}return!0},Ve=function(e){var t=void 0,n=void 0,r=void 0,i=void 0,o=void 0;Be("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ae};for(o=a.length;o--;){var u=t=a[o],c=u.name,l=u.namespaceURI;if(n=t.value.trim(),r=c.toLowerCase(),s.attrName=r,s.attrValue=n,s.keepAttr=!0,Be("uponSanitizeAttribute",e,s),n=s.attrValue,"name"===r&&"IMG"===e.nodeName&&a.id)i=a.id,a=O(C,a,[]),Re("id",e),Re(c,e),a.indexOf(i)>o&&e.setAttribute("id",i.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&s.keepAttr&&(ae[r]||!ce[r]))continue;"id"===c&&e.setAttribute(c,""),Re(c,e)}if(s.keepAttr)if(/svg|math/i.test(e.namespaceURI)&&new RegExp("</("+Object.keys(Oe).join("|")+")","i").test(n))Re(c,e);else{de&&(n=(n=n.replace(Q," ")).replace(J," "));var h=e.nodeName.toLowerCase();if(Fe(h,r,n))try{l?e.setAttributeNS(l,c,n):e.setAttribute(c,n),f.removed.pop()}catch(e){}}}Be("afterSanitizeAttributes",e,null)}},He=function e(t){var n=void 0,r=Me(t);for(Be("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Be("uponSanitizeShadowNode",n,null),Ue(n)||(n.content instanceof L&&e(n.content),Ve(n));Be("afterSanitizeShadowDOM",t,null)};return f.sanitize=function(e,t){var n=void 0,r=void 0,i=void 0,o=void 0,s=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!Ne(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");if("string"!=typeof(e=e.toString()))throw new TypeError("dirty is not a string, aborting")}if(!f.isSupported){if("object"===E(a.toStaticHTML)||"function"==typeof a.toStaticHTML){if("string"==typeof e)return a.toStaticHTML(e);if(Ne(e))return a.toStaticHTML(e.outerHTML)}return e}if(ve||Ae(t),f.removed=[],Ee);else if(e instanceof I)1===(r=(n=De("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ge&&!de&&!ye&&we&&-1===e.indexOf("<"))return H?H.createHTML(e):e;if(!(n=De(e)))return ge?null:q}n&&me&&Ie(n.firstChild);for(var u=Me(Ee?e:n);i=u.nextNode();)3===i.nodeType&&i===o||Ue(i)||(i.content instanceof L&&He(i.content),Ve(i),o=i);if(o=null,Ee)return e;if(ge){if(be)for(s=X.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return _e&&(s=K.call(h,s,!0)),s}var c=ye?n.outerHTML:n.innerHTML;return de&&(c=(c=c.replace(Q," ")).replace(J," ")),H&&we?H.createHTML(c):c},f.setConfig=function(e){Ae(e),ve=!0},f.clearConfig=function(){je=null,ve=!1},f.isValidAttribute=function(e,t,n){je||Ae({});var r=e.toLowerCase(),i=t.toLowerCase();return Fe(r,i,n)},f.addHook=function(e,t){"function"==typeof t&&(Y[e]=Y[e]||[],Y[e].push(t))},f.removeHook=function(e){Y[e]&&Y[e].pop()},f.removeHooks=function(e){Y[e]&&(Y[e]=[])},f.removeAllHooks=function(){Y={}},f}()}()},3384:(e,t,n)=>{var r,i=void 0!==n.g?n.g:"undefined"!=typeof window?window:{},o=n(58421);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=r},51562:(e,t,n)=>{var r;r="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e.exports=r},63848:e=>{e.exports=function(e){if(!e)return!1;var n=t.call(e);return"[object Function]"===n||"function"==typeof e&&"[object RegExp]"!==n||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},6723:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},c=o.push,l=o.indexOf,f={},h=f.toString,p=f.hasOwnProperty,d=p.toString,y=d.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},g=function(e){return null!=e&&e===e.window},b=r.document,_={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in _)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[h.call(e)]||"object":typeof e}var S="3.7.1",E=/HTML$/i,k=function(e,t){return new k.fn.init(e,t)};function O(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!m(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function C(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}k.fn=k.prototype={jquery:S,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(k.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(c&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(c,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e)||(t=a(e))&&("function"!=typeof(n=p.call(t,"constructor")&&t.constructor)||d.call(n)!==y))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){w(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(O(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)for(;t=e[r++];)n+=k.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(O(Object(e))?k.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:l.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!E.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(O(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return u(a)},guid:1,support:v}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=o[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){f["[object "+t+"]"]=t.toLowerCase()}));var P=o.pop,x=o.sort,j=o.splice,L="[\\x20\\t\\r\\n\\f]",A=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g");k.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var I=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function R(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}k.escapeSelector=function(e){return(e+"").replace(I,R)};var D=b,M=c;!function(){var e,t,n,i,a,u,c,f,h,d,y=M,m=k.expando,g=0,b=0,_=ee(),w=ee(),T=ee(),S=ee(),E=function(e,t){return e===t&&(a=!0),0},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="(?:\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",R="\\["+L+"*("+I+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+L+"*\\]",N=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",B=new RegExp(L+"+","g"),U=new RegExp("^"+L+"*,"+L+"*"),F=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),V=new RegExp(L+"|>"),H=new RegExp(N),q=new RegExp("^"+I+"$"),z={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),Y=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Q=function(){ue()},J=he((function(e){return!0===e.disabled&&C(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{y.apply(o=s.call(D.childNodes),D.childNodes),o[D.childNodes.length].nodeType}catch(e){y={apply:function(e,t){M.apply(e,s.call(t))},call:function(e){M.apply(e,s.call(arguments,1))}}}function Z(e,t,n,r){var i,o,a,s,c,l,p,d=t&&t.ownerDocument,g=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==g&&9!==g&&11!==g)return n;if(!r&&(ue(t),t=t||u,f)){if(11!==g&&(c=$.exec(e)))if(i=c[1]){if(9===g){if(!(a=t.getElementById(i)))return n;if(a.id===i)return y.call(n,a),n}else if(d&&(a=d.getElementById(i))&&Z.contains(t,a)&&a.id===i)return y.call(n,a),n}else{if(c[2])return y.apply(n,t.getElementsByTagName(e)),n;if((i=c[3])&&t.getElementsByClassName)return y.apply(n,t.getElementsByClassName(i)),n}if(!(S[e+" "]||h&&h.test(e))){if(p=e,d=t,1===g&&(V.test(e)||F.test(e))){for((d=X.test(e)&&se(t.parentNode)||t)==t&&v.scope||((s=t.getAttribute("id"))?s=k.escapeSelector(s):t.setAttribute("id",s=m)),o=(l=le(e)).length;o--;)l[o]=(s?"#"+s:":scope")+" "+fe(l[o]);p=l.join(",")}try{return y.apply(n,d.querySelectorAll(p)),n}catch(t){S(e,!0)}finally{s===m&&t.removeAttribute("id")}}}return ge(e.replace(A,"$1"),t,n,r)}function ee(){var e=[];return function n(r,i){return e.push(r+" ")>t.cacheLength&&delete n[e.shift()],n[r+" "]=i}}function te(e){return e[m]=!0,e}function ne(e){var t=u.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return C(t,"input")&&t.type===e}}function ie(e){return function(t){return(C(t,"input")||C(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&J(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te((function(t){return t=+t,te((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function se(e){return e&&void 0!==e.getElementsByTagName&&e}function ue(e){var n,r=e?e.ownerDocument||e:D;return r!=u&&9===r.nodeType&&r.documentElement?(c=(u=r).documentElement,f=!k.isXMLDoc(u),d=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&D!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",Q),v.getById=ne((function(e){return c.appendChild(e).id=k.expando,!u.getElementsByName||!u.getElementsByName(k.expando).length})),v.disconnectedMatch=ne((function(e){return d.call(e,"*")})),v.scope=ne((function(){return u.querySelectorAll(":scope")})),v.cssHas=ne((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),v.getById?(t.filter.ID=function(e){var t=e.replace(K,Y);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(K,Y);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},h=[],ne((function(e){var t;c.appendChild(e).innerHTML="<a id='"+m+"' href='' disabled='disabled'></a><select id='"+m+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+L+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+m+"-]").length||h.push("~="),e.querySelectorAll("a#"+m+"+*").length||h.push(".#.+[+~]"),e.querySelectorAll(":checked").length||h.push(":checked"),(t=u.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(t=u.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||h.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")")})),v.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),E=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!v.sortDetached&&t.compareDocumentPosition(e)===n?e===u||e.ownerDocument==D&&Z.contains(D,e)?-1:t===u||t.ownerDocument==D&&Z.contains(D,t)?1:i?l.call(i,e)-l.call(i,t):0:4&n?-1:1)},u):u}for(e in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(ue(e),f&&!S[t+" "]&&(!h||!h.test(t)))try{var n=d.call(e,t);if(n||v.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){S(t,!0)}return Z(t,u,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=u&&ue(e),k.contains(e,t)},Z.attr=function(e,n){(e.ownerDocument||e)!=u&&ue(e);var r=t.attrHandle[n.toLowerCase()],i=r&&p.call(t.attrHandle,n.toLowerCase())?r(e,n,!f):void 0;return void 0!==i?i:e.getAttribute(n)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},k.uniqueSort=function(e){var t,n=[],r=0,o=0;if(a=!v.sortStable,i=!v.sortStable&&s.call(e,0),x.call(e,E),a){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)j.call(e,n[r],1)}return i=null,e},k.fn.uniqueSort=function(){return this.pushStack(k.uniqueSort(s.apply(this)))},t=k.expr={cacheLength:50,createPseudo:te,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(K,Y),e[3]=(e[3]||e[4]||e[5]||"").replace(K,Y),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Z.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Z.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&H.test(n)&&(t=le(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(K,Y).toLowerCase();return"*"===e?function(){return!0}:function(e){return C(e,t)}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+L+")"+e+"("+L+"|$)"))&&_(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=Z.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,h,p,d=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!u&&!s,_=!1;if(y){if(o){for(;d;){for(f=t;f=f[d];)if(s?C(f,v):1===f.nodeType)return!1;p=d="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?y.firstChild:y.lastChild],a&&b){for(_=(h=(c=(l=y[m]||(y[m]={}))[e]||[])[0]===g&&c[1])&&c[2],f=h&&y.childNodes[h];f=++h&&f&&f[d]||(_=h=0)||p.pop();)if(1===f.nodeType&&++_&&f===t){l[e]=[g,h,_];break}}else if(b&&(_=h=(c=(l=t[m]||(t[m]={}))[e]||[])[0]===g&&c[1]),!1===_)for(;(f=++h&&f&&f[d]||(_=h=0)||p.pop())&&(!(s?C(f,v):1===f.nodeType)||!++_||(b&&((l=f[m]||(f[m]={}))[e]=[g,_]),f!==t)););return(_-=i)===r||_%r==0&&_/r>=0}}},PSEUDO:function(e,n){var r,i=t.pseudos[e]||t.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return i[m]?i(n):i.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var r,o=i(e,n),a=o.length;a--;)e[r=l.call(e,o[a])]=!(t[r]=o[a])})):function(e){return i(e,0,r)}):i}},pseudos:{not:te((function(e){var t=[],n=[],r=me(e.replace(A,"$1"));return r[m]?te((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return Z(e,t).length>0}})),contains:te((function(e){return e=e.replace(K,Y),function(t){return(t.textContent||k.text(t)).indexOf(e)>-1}})),lang:te((function(e){return q.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(K,Y).toLowerCase(),function(t){var n;do{if(n=f?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=r.location&&r.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return u.activeElement}catch(e){}}()&&u.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return C(e,"input")&&!!e.checked||C(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return W.test(e.nodeName)},button:function(e){return C(e,"input")&&"button"===e.type||C(e,"button")},text:function(e){var t;return C(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,n){return[n<0?n+t:n]})),even:ae((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ae((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ae((function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ae((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},t.pseudos.nth=t.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[e]=re(e);for(e in{submit:!0,reset:!0})t.pseudos[e]=ie(e);function ce(){}function le(e,n){var r,i,o,a,s,u,c,l=w[e+" "];if(l)return n?0:l.slice(0);for(s=e,u=[],c=t.preFilter;s;){for(a in r&&!(i=U.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=F.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(A," ")}),s=s.slice(r.length)),t.filter)!(i=z[a].exec(s))||c[a]&&!(i=c[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?Z.error(e):w(e,u).slice(0)}function fe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function he(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=b++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var c,l,f=[g,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(l=t[m]||(t[m]={}),i&&C(t,i))t=t[r]||t;else{if((c=l[o])&&c[0]===g&&c[1]===s)return f[2]=c[2];if(l[o]=f,f[2]=e(t,n,u))return!0}return!1}}function pe(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function de(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,c=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function ye(e,t,n,r,i,o){return r&&!r[m]&&(r=ye(r)),i&&!i[m]&&(i=ye(i,o)),te((function(o,a,s,u){var c,f,h,p,d=[],v=[],m=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)Z(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),b=!e||!o&&t?g:de(g,d,e,s,u);if(n?n(b,p=i||(o?e:m||r)?[]:a,s,u):p=b,r)for(c=de(p,v),r(c,[],s,u),f=c.length;f--;)(h=c[f])&&(p[v[f]]=!(b[v[f]]=h));if(o){if(i||e){if(i){for(c=[],f=p.length;f--;)(h=p[f])&&c.push(b[f]=h);i(null,p=[],c,u)}for(f=p.length;f--;)(h=p[f])&&(c=i?l.call(o,h):d[f])>-1&&(o[c]=!(a[c]=h))}}else p=de(p===a?p.splice(m,p.length):p),i?i(null,a,p,u):y.apply(a,p)}))}function ve(e){for(var r,i,o,a=e.length,s=t.relative[e[0].type],u=s||t.relative[" "],c=s?1:0,f=he((function(e){return e===r}),u,!0),h=he((function(e){return l.call(r,e)>-1}),u,!0),p=[function(e,t,i){var o=!s&&(i||t!=n)||((r=t).nodeType?f(e,t,i):h(e,t,i));return r=null,o}];c<a;c++)if(i=t.relative[e[c].type])p=[he(pe(p),i)];else{if((i=t.filter[e[c].type].apply(null,e[c].matches))[m]){for(o=++c;o<a&&!t.relative[e[o].type];o++);return ye(c>1&&pe(p),c>1&&fe(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(A,"$1"),i,c<o&&ve(e.slice(c,o)),o<a&&ve(e=e.slice(o)),o<a&&fe(e))}p.push(i)}return pe(p)}function me(e,r){var i,o=[],a=[],s=T[e+" "];if(!s){for(r||(r=le(e)),i=r.length;i--;)(s=ve(r[i]))[m]?o.push(s):a.push(s);s=T(e,function(e,r){var i=r.length>0,o=e.length>0,a=function(a,s,c,l,h){var p,d,v,m=0,b="0",_=a&&[],w=[],T=n,S=a||o&&t.find.TAG("*",h),E=g+=null==T?1:Math.random()||.1,O=S.length;for(h&&(n=s==u||s||h);b!==O&&null!=(p=S[b]);b++){if(o&&p){for(d=0,s||p.ownerDocument==u||(ue(p),c=!f);v=e[d++];)if(v(p,s||u,c)){y.call(l,p);break}h&&(g=E)}i&&((p=!v&&p)&&m--,a&&_.push(p))}if(m+=b,i&&b!==m){for(d=0;v=r[d++];)v(_,w,s,c);if(a){if(m>0)for(;b--;)_[b]||w[b]||(w[b]=P.call(l));w=de(w)}y.apply(l,w),h&&!a&&w.length>0&&m+r.length>1&&k.uniqueSort(l)}return h&&(g=E,n=T),_};return i?te(a):a}(a,o)),s.selector=e}return s}function ge(e,n,r,i){var o,a,s,u,c,l="function"==typeof e&&e,h=!i&&le(e=l.selector||e);if(r=r||[],1===h.length){if((a=h[0]=h[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===n.nodeType&&f&&t.relative[a[1].type]){if(!(n=(t.find.ID(s.matches[0].replace(K,Y),n)||[])[0]))return r;l&&(n=n.parentNode),e=e.slice(a.shift().value.length)}for(o=z.needsContext.test(e)?0:a.length;o--&&(s=a[o],!t.relative[u=s.type]);)if((c=t.find[u])&&(i=c(s.matches[0].replace(K,Y),X.test(a[0].type)&&se(n.parentNode)||n))){if(a.splice(o,1),!(e=i.length&&fe(a)))return y.apply(r,i),r;break}}return(l||me(e,h))(i,n,!f,r,!n||X.test(e)&&se(n.parentNode)||n),r}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,v.sortStable=m.split("").sort(E).join("")===m,ue(),v.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(u.createElement("fieldset"))})),k.find=Z,k.expr[":"]=k.expr.pseudos,k.unique=k.uniqueSort,Z.compile=me,Z.select=ge,Z.setDocument=ue,Z.tokenize=le,Z.escape=k.escapeSelector,Z.getText=k.text,Z.isXML=k.isXMLDoc,Z.selectors=k.expr,Z.support=k.support,Z.uniqueSort=k.uniqueSort}();var N=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},B=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},U=k.expr.match.needsContext,F=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function V(e,t,n){return m(t)?k.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?k.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?k.grep(e,(function(e){return l.call(t,e)>-1!==n})):k.filter(t,e,n)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return r>1?k.uniqueSort(n):n},filter:function(e){return this.pushStack(V(this,e||[],!1))},not:function(e){return this.pushStack(V(this,e||[],!0))},is:function(e){return!!V(this,"string"==typeof e&&U.test(e)?k(e):e||[],!1).length}});var H,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||H,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),F.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,H=k(b);var z=/^(?:parents|prev(?:Until|All))/,W={children:!0,contents:!0,next:!0,prev:!0};function G(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!U.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?l.call(k(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return G(e,"nextSibling")},prev:function(e){return G(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return B((e.parentNode||{}).firstChild,e)},children:function(e){return B(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(C(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(n,r){var i=k.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=k.filter(r,i)),this.length>1&&(W[e]||k.uniqueSort(i),z.test(e)&&i.reverse()),this.pushStack(i)}}));var $=/[^\x20\t\r\n\f]+/g;function X(e){return e}function K(e){throw e}function Y(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match($)||[],(function(e,n){t[n]=!0})),t}(e):k.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){k.each(n,(function(n,r){m(r)?e.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==T(r)&&t(r)}))}(arguments),n&&!t&&u()),this},remove:function(){return k.each(arguments,(function(e,t){for(var n;(n=k.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?k.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(n){k.each(t,(function(t,r){var i=m(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var o=0;function a(e,t,n,i){return function(){var s=this,u=arguments,c=function(){var r,c;if(!(e<o)){if((r=n.apply(s,u))===t.promise())throw new TypeError("Thenable self-resolution");c=r&&("object"==typeof r||"function"==typeof r)&&r.then,m(c)?i?c.call(r,a(o,t,X,i),a(o,t,K,i)):(o++,c.call(r,a(o,t,X,i),a(o,t,K,i),a(o,t,X,t.notifyWith))):(n!==X&&(s=void 0,u=[r]),(i||t.resolveWith)(s,u))}},l=i?c:function(){try{c()}catch(r){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(r,l.error),e+1>=o&&(n!==K&&(s=void 0,u=[r]),t.rejectWith(s,u))}};e?l():(k.Deferred.getErrorHook?l.error=k.Deferred.getErrorHook():k.Deferred.getStackHook&&(l.error=k.Deferred.getStackHook()),r.setTimeout(l))}}return k.Deferred((function(r){t[0][3].add(a(0,r,m(i)?i:X,r.notifyWith)),t[1][3].add(a(0,r,m(e)?e:X)),t[2][3].add(a(0,r,m(n)?n:K))})).promise()},promise:function(e){return null!=e?k.extend(e,i):i}},o={};return k.each(t,(function(e,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=k.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(Y(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||m(i[n]&&i[n].then)))return o.then();for(;n--;)Y(i[n],a(n),o.reject);return o.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&Q.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){r.setTimeout((function(){throw e}))};var J=k.Deferred();function Z(){b.removeEventListener("DOMContentLoaded",Z),r.removeEventListener("load",Z),k.ready()}k.fn.ready=function(e){return J.then(e).catch((function(e){k.readyException(e)})),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||J.resolveWith(b,[k]))}}),k.ready.then=J.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(k.ready):(b.addEventListener("DOMContentLoaded",Z),r.addEventListener("load",Z));var ee=function(e,t,n,r,i,o,a){var s=0,u=e.length,c=null==n;if("object"===T(n))for(s in i=!0,n)ee(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:c?t.call(e):u?t(e[0],n):o},te=/^-ms-/,ne=/-([a-z])/g;function re(e,t){return t.toUpperCase()}function ie(e){return e.replace(te,"ms-").replace(ne,re)}var oe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function ae(){this.expando=k.expando+ae.uid++}ae.uid=1,ae.prototype={cache:function(e){var t=e[this.expando];return t||(t={},oe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[ie(t)]=n;else for(r in t)i[ie(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][ie(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(ie):(t=ie(t))in r?[t]:t.match($)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||k.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var se=new ae,ue=new ae,ce=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,le=/[A-Z]/g;function fe(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(le,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ce.test(e)?JSON.parse(e):e)}(n)}catch(e){}ue.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return ue.hasData(e)||se.hasData(e)},data:function(e,t,n){return ue.access(e,t,n)},removeData:function(e,t){ue.remove(e,t)},_data:function(e,t,n){return se.access(e,t,n)},_removeData:function(e,t){se.remove(e,t)}}),k.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=ue.get(o),1===o.nodeType&&!se.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=ie(r.slice(5)),fe(o,r,i[r]));se.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){ue.set(this,e)})):ee(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=ue.get(o,e))||void 0!==(n=fe(o,e))?n:void 0;this.each((function(){ue.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){ue.remove(this,e)}))}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=se.get(e,t),n&&(!r||Array.isArray(n)?r=se.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){k.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return se.get(e,n)||se.access(e,n,{empty:k.Callbacks("once memory").add((function(){se.remove(e,[t+"queue",n])}))})}}),k.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?k.queue(this[0],e):void 0===t?this:this.each((function(){var n=k.queue(this,e,t);k._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&k.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){k.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=k.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=se.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var he=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,pe=new RegExp("^(?:([+-])=|)("+he+")([a-z%]*)$","i"),de=["Top","Right","Bottom","Left"],ye=b.documentElement,ve=function(e){return k.contains(e.ownerDocument,e)},me={composed:!0};ye.getRootNode&&(ve=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(me)===e.ownerDocument});var ge=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ve(e)&&"none"===k.css(e,"display")};function be(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),c=n&&n[3]||(k.cssNumber[t]?"":"px"),l=e.nodeType&&(k.cssNumber[t]||"px"!==c&&+u)&&pe.exec(k.css(e,t));if(l&&l[3]!==c){for(u/=2,c=c||l[3],l=+u||1;a--;)k.style(e,t,l+c),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),l/=o;l*=2,k.style(e,t,l+c),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}var _e={};function we(e){var t,n=e.ownerDocument,r=e.nodeName,i=_e[r];return i||(t=n.body.appendChild(n.createElement(r)),i=k.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),_e[r]=i,i)}function Te(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=se.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ge(r)&&(i[o]=we(r))):"none"!==n&&(i[o]="none",se.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}k.fn.extend({show:function(){return Te(this,!0)},hide:function(){return Te(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ge(this)?k(this).show():k(this).hide()}))}});var Se,Ee,ke=/^(?:checkbox|radio)$/i,Oe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;Se=b.createDocumentFragment().appendChild(b.createElement("div")),(Ee=b.createElement("input")).setAttribute("type","radio"),Ee.setAttribute("checked","checked"),Ee.setAttribute("name","t"),Se.appendChild(Ee),v.checkClone=Se.cloneNode(!0).cloneNode(!0).lastChild.checked,Se.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!Se.cloneNode(!0).lastChild.defaultValue,Se.innerHTML="<option></option>",v.option=!!Se.lastChild;var Pe={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function xe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&C(e,t)?k.merge([e],n):n}function je(e,t){for(var n=0,r=e.length;n<r;n++)se.set(e[n],"globalEval",!t||se.get(t[n],"globalEval"))}Pe.tbody=Pe.tfoot=Pe.colgroup=Pe.caption=Pe.thead,Pe.th=Pe.td,v.option||(Pe.optgroup=Pe.option=[1,"<select multiple='multiple'>","</select>"]);var Le=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,c,l,f=t.createDocumentFragment(),h=[],p=0,d=e.length;p<d;p++)if((o=e[p])||0===o)if("object"===T(o))k.merge(h,o.nodeType?[o]:o);else if(Le.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Oe.exec(o)||["",""])[1].toLowerCase(),u=Pe[s]||Pe._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],l=u[0];l--;)a=a.lastChild;k.merge(h,a.childNodes),(a=f.firstChild).textContent=""}else h.push(t.createTextNode(o));for(f.textContent="",p=0;o=h[p++];)if(r&&k.inArray(o,r)>-1)i&&i.push(o);else if(c=ve(o),a=xe(f.appendChild(o),"script"),c&&je(a),n)for(l=0;o=a[l++];)Ce.test(o.type||"")&&n.push(o);return f}var Ie=/^([^.]*)(?:\.(.+)|)/;function Re(){return!0}function De(){return!1}function Me(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Me(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=De;else if(!i)return e;return 1===o&&(a=i,i=function(e){return k().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=k.guid++)),e.each((function(){k.event.add(this,t,i,r,n)}))}function Ne(e,t,n){n?(se.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var n,r=se.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),se.set(this,t,r),this[t](),n=se.get(this,t),se.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(se.set(this,t,k.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Re)}})):void 0===se.get(e,t)&&k.event.add(e,t,Re)}k.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,c,l,f,h,p,d,y,v=se.get(e);if(oe(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ye,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match($)||[""]).length;c--;)p=y=(s=Ie.exec(t[c])||[])[1],d=(s[2]||"").split(".").sort(),p&&(f=k.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=k.event.special[p]||{},l=k.extend({type:p,origType:y,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:d.join(".")},o),(h=u[p])||((h=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,d,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),k.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,c,l,f,h,p,d,y,v=se.hasData(e)&&se.get(e);if(v&&(u=v.events)){for(c=(t=(t||"").match($)||[""]).length;c--;)if(p=y=(s=Ie.exec(t[c])||[])[1],d=(s[2]||"").split(".").sort(),p){for(f=k.event.special[p]||{},h=u[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)l=h[o],!i&&y!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,f.remove&&f.remove.call(e,l));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(e,d,v.handle)||k.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)k.event.remove(e,p+t[c],n,r,!0);k.isEmptyObject(u)&&se.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=k.event.fix(e),c=(se.get(this,"events")||Object.create(null))[u.type]||[],l=k.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(a=k.event.handlers.call(this,u,c),t=0;(i=a[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,c=e.target;if(u&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?k(i,this).index(c)>-1:k.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u<t.length&&s.push({elem:c,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ke.test(t.type)&&t.click&&C(t,"input")&&Ne(t,"click",!0),!1},trigger:function(e){var t=this||e;return ke.test(t.type)&&t.click&&C(t,"input")&&Ne(t,"click"),!0},_default:function(e){var t=e.target;return ke.test(t.type)&&t.click&&C(t,"input")&&se.get(t,"click")||C(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Re:De,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:De,isPropagationStopped:De,isImmediatePropagationStopped:De,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Re,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Re,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Re,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){if(b.documentMode){var n=se.get(this,"handle"),r=k.event.fix(e);r.type="focusin"===e.type?"focus":"blur",r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else k.event.simulate(t,e.target,k.event.fix(e))}k.event.special[e]={setup:function(){var r;if(Ne(this,e,!0),!b.documentMode)return!1;(r=se.get(this,t))||this.addEventListener(t,n),se.set(this,t,(r||0)+1)},trigger:function(){return Ne(this,e),!0},teardown:function(){var e;if(!b.documentMode)return!1;(e=se.get(this,t)-1)?se.set(this,t,e):(this.removeEventListener(t,n),se.remove(this,t))},_default:function(t){return se.get(t.target,e)},delegateType:t},k.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=b.documentMode?this:r,o=se.get(i,t);o||(b.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),se.set(i,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=b.documentMode?this:r,o=se.get(i,t)-1;o?se.set(i,t,o):(b.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),se.remove(i,t))}}})),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){k.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||k.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),k.fn.extend({on:function(e,t,n,r){return Me(this,e,t,n,r)},one:function(e,t,n,r){return Me(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=De),this.each((function(){k.event.remove(this,e,n,t)}))}});var Be=/<script|<style|<link/i,Ue=/checked\s*(?:[^=]|=\s*.checked.)/i,Fe=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ve(e,t){return C(e,"table")&&C(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function ze(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(se.hasData(e)&&(s=se.get(e).events))for(i in se.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)k.event.add(t,i,s[i][n]);ue.hasData(e)&&(o=ue.access(e),a=k.extend({},o),ue.set(t,a))}}function We(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ke.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Ge(e,t,n,r){t=u(t);var i,o,a,s,c,l,f=0,h=e.length,p=h-1,d=t[0],y=m(d);if(y||h>1&&"string"==typeof d&&!v.checkClone&&Ue.test(d))return e.each((function(i){var o=e.eq(i);y&&(t[0]=d.call(this,i,o.html())),Ge(o,t,n,r)}));if(h&&(o=(i=Ae(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=k.map(xe(i,"script"),He)).length;f<h;f++)c=i,f!==p&&(c=k.clone(c,!0,!0),s&&k.merge(a,xe(c,"script"))),n.call(e[f],c,f);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,qe),f=0;f<s;f++)c=a[f],Ce.test(c.type||"")&&!se.access(c,"globalEval")&&k.contains(l,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?k._evalUrl&&!c.noModule&&k._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},l):w(c.textContent.replace(Fe,""),c,l))}return e}function $e(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(xe(r)),r.parentNode&&(n&&ve(r)&&je(xe(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=ve(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=xe(s),r=0,i=(o=xe(e)).length;r<i;r++)We(o[r],a[r]);if(t)if(n)for(o=o||xe(e),a=a||xe(s),r=0,i=o.length;r<i;r++)ze(o[r],a[r]);else ze(e,s);return(a=xe(s,"script")).length>0&&je(a,!u&&xe(e,"script")),s},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(oe(n)){if(t=n[se.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[se.expando]=void 0}n[ue.expando]&&(n[ue.expando]=void 0)}}}),k.fn.extend({detach:function(e){return $e(this,e,!0)},remove:function(e){return $e(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?k.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ge(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ve(this,e).appendChild(e)}))},prepend:function(){return Ge(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ve(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ge(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ge(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(xe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return k.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Be.test(e)&&!Pe[(Oe.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(xe(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ge(this,arguments,(function(t){var n=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(xe(this)),n&&n.replaceChild(t,this))}),e)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){k.fn[e]=function(e){for(var n,r=[],i=k(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),k(i[a])[t](n),c.apply(r,n.get());return this.pushStack(r)}}));var Xe=new RegExp("^("+he+")(?!px)[a-z%]+$","i"),Ke=/^--/,Ye=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},Qe=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Je=new RegExp(de.join("|"),"i");function Ze(e,t,n){var r,i,o,a,s=Ke.test(t),u=e.style;return(n=n||Ye(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(A,"$1")||void 0),""!==a||ve(e)||(a=k.style(e,t)),!v.pixelBoxStyles()&&Xe.test(a)&&Je.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function et(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ye.appendChild(c).appendChild(l);var e=r.getComputedStyle(l);n="1%"!==e.top,u=12===t(e.marginLeft),l.style.right="60%",a=36===t(e.right),i=36===t(e.width),l.style.position="absolute",o=12===t(l.offsetWidth/3),ye.removeChild(c),l=null}}function t(e){return Math.round(parseFloat(e))}var n,i,o,a,s,u,c=b.createElement("div"),l=b.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,k.extend(v,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,n,i;return null==s&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",ye.appendChild(e).appendChild(t).appendChild(n),i=r.getComputedStyle(t),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===t.offsetHeight,ye.removeChild(e)),s}}))}();var tt=["Webkit","Moz","ms"],nt=b.createElement("div").style,rt={};function it(e){return k.cssProps[e]||rt[e]||(e in nt?e:rt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}(e)||e)}var ot=/^(none|table(?!-c[ea]).+)/,at={position:"absolute",visibility:"hidden",display:"block"},st={letterSpacing:"0",fontWeight:"400"};function ut(e,t,n){var r=pe.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function ct(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,c=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(c+=k.css(e,n+de[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+de[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+de[a]+"Width",!0,i))):(u+=k.css(e,"padding"+de[a],!0,i),"padding"!==n?u+=k.css(e,"border"+de[a]+"Width",!0,i):s+=k.css(e,"border"+de[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+c}function lt(e,t,n){var r=Ye(e),i=(!v.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,a=Ze(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Xe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&C(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+ct(e,t,n||(i?"border":"content"),o,r,a)+"px"}function ft(e,t,n,r,i){return new ft.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=ie(t),u=Ke.test(t),c=e.style;if(u||(t=it(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:c[t];"string"==(o=typeof n)&&(i=pe.exec(n))&&i[1]&&(n=be(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=ie(t);return Ke.test(t)||(t=it(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ze(e,t,r)),"normal"===i&&t in st&&(i=st[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,n,r){if(n)return!ot.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?lt(e,t,r):Qe(e,at,(function(){return lt(e,t,r)}))},set:function(e,n,r){var i,o=Ye(e),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===k.css(e,"boxSizing",!1,o),u=r?ct(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-ct(e,t,"border",!1,o)-.5)),u&&(i=pe.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),ut(0,n,u)}}})),k.cssHooks.marginLeft=et(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ze(e,"marginLeft"))||e.getBoundingClientRect().left-Qe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),k.each({margin:"",padding:"",border:"Width"},(function(e,t){k.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+de[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(k.cssHooks[e+t].set=ut)})),k.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ye(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)}),e,t,arguments.length>1)}}),k.Tween=ft,ft.prototype={constructor:ft,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=ft.propHooks[this.prop];return e&&e.get?e.get(this):ft.propHooks._default.get(this)},run:function(e){var t,n=ft.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ft.propHooks._default.set(this),this}},ft.prototype.init.prototype=ft.prototype,ft.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[it(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},ft.propHooks.scrollTop=ft.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=ft.prototype.init,k.fx.step={};var ht,pt,dt=/^(?:toggle|show|hide)$/,yt=/queueHooks$/;function vt(){pt&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(vt):r.setTimeout(vt,k.fx.interval),k.fx.tick())}function mt(){return r.setTimeout((function(){ht=void 0})),ht=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=de[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function bt(e,t,n){for(var r,i=(_t.tweeners[t]||[]).concat(_t.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function _t(e,t,n){var r,i,o=0,a=_t.prefilters.length,s=k.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=ht||mt(),n=Math.max(0,c.startTime+c.duration-t),r=1-(n/c.duration||0),o=0,a=c.tweens.length;o<a;o++)c.tweens[o].run(r);return s.notifyWith(e,[c,r,n]),r<1&&a?n:(a||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},n),originalProperties:t,originalOptions:n,startTime:ht||mt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=k.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),l=c.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=ie(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(l,c.opts.specialEasing);o<a;o++)if(r=_t.prefilters[o].call(c,e,l,c.opts))return m(r.stop)&&(k._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return k.map(l,bt,c),m(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),k.fx.timer(k.extend(u,{elem:e,anim:c,queue:c.opts.queue})),c}k.Animation=k.extend(_t,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return be(n.elem,e,pe.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match($);for(var n,r=0,i=e.length;r<i;r++)n=e[r],_t.tweeners[n]=_t.tweeners[n]||[],_t.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,c,l,f="width"in t||"height"in t,h=this,p={},d=e.style,y=e.nodeType&&ge(e),v=se.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],dt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(y?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;y=!0}p[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(p))for(r in f&&1===e.nodeType&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],null==(c=v&&v.display)&&(c=se.get(e,"display")),"none"===(l=k.css(e,"display"))&&(c?l=c:(Te([e],!0),c=e.style.display||c,l=k.css(e,"display"),Te([e]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===k.css(e,"float")&&(u||(h.done((function(){d.display=c})),null==c&&(l=d.display,c="none"===l?"":l)),d.display="inline-block")),n.overflow&&(d.overflow="hidden",h.always((function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}))),u=!1,p)u||(v?"hidden"in v&&(y=v.hidden):v=se.access(e,"fxshow",{display:c}),o&&(v.hidden=!y),y&&Te([e],!0),h.done((function(){for(r in y||Te([e]),se.remove(e,"fxshow"),p)k.style(e,r,p[r])}))),u=bt(y?v[r]:0,r,h),r in v||(v[r]=u.start,y&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?_t.prefilters.unshift(e):_t.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ge).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=k.isEmptyObject(e),o=k.speed(t,n,r),a=function(){var t=_t(this,k.extend({},e),o);(i||se.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=k.timers,a=se.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&yt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||k.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=se.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=k.timers,a=r?r.length:0;for(n.finish=!0,k.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),k.each(["toggle","show","hide"],(function(e,t){var n=k.fn[t];k.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(gt(t,!0),e,r,i)}})),k.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){k.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(ht=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),ht=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){pt||(pt=!0,vt())},k.fx.stop=function(){pt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(e,t){return e=k.fx&&k.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var i=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(i)}}))},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",v.checkOn=""!==e.value,v.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",v.radioValue="t"===e.value}();var wt,Tt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return ee(this,k.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){k.removeAttr(this,e)}))}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?wt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&C(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match($);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),wt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Tt[t]||k.find.attr;Tt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Tt[a],Tt[a]=i,i=null!=n(e,t,r)?a:null,Tt[a]=o),i}}));var St=/^(?:input|select|textarea|button)$/i,Et=/^(?:a|area)$/i;function kt(e){return(e.match($)||[]).join(" ")}function Ot(e){return e.getAttribute&&e.getAttribute("class")||""}function Ct(e){return Array.isArray(e)?e:"string"==typeof e&&e.match($)||[]}k.fn.extend({prop:function(e,t){return ee(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[k.propFix[e]||e]}))}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):St.test(e.nodeName)||Et.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){k.propFix[this.toLowerCase()]=this})),k.fn.extend({addClass:function(e){var t,n,r,i,o,a;return m(e)?this.each((function(t){k(this).addClass(e.call(this,t,Ot(this)))})):(t=Ct(e)).length?this.each((function(){if(r=Ot(this),n=1===this.nodeType&&" "+kt(r)+" "){for(o=0;o<t.length;o++)i=t[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=kt(n),r!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,n,r,i,o,a;return m(e)?this.each((function(t){k(this).removeClass(e.call(this,t,Ot(this)))})):arguments.length?(t=Ct(e)).length?this.each((function(){if(r=Ot(this),n=1===this.nodeType&&" "+kt(r)+" "){for(o=0;o<t.length;o++)for(i=t[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=kt(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return m(e)?this.each((function(n){k(this).toggleClass(e.call(this,n,Ot(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Ct(e),this.each((function(){if(s)for(o=k(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==e&&"boolean"!==a||((r=Ot(this))&&se.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":se.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+kt(Ot(n))+" ").indexOf(t)>-1)return!0;return!1}});var Pt=/\r/g;k.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,k(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=k.map(i,(function(e){return null==e?"":e+""}))),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=k.valHooks[i.type]||k.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Pt,""):null==n?"":n:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:kt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!C(n.parentNode,"optgroup"))){if(t=k(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),a=i.length;a--;)((r=i[a]).selected=k.inArray(k.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],(function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},v.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var xt=r.location,jt={guid:Date.now()},Lt=/\?/;k.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||k.error("Invalid XML: "+(n?k.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var At=/^(?:focusinfocus|focusoutblur)$/,It=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,n,i){var o,a,s,u,c,l,f,h,d=[n||b],y=p.call(e,"type")?e.type:e,v=p.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!At.test(y+k.event.triggered)&&(y.indexOf(".")>-1&&(v=y.split("."),y=v.shift(),v.sort()),c=y.indexOf(":")<0&&"on"+y,(e=e[k.expando]?e:new k.Event(y,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),f=k.event.special[y]||{},i||!f.trigger||!1!==f.trigger.apply(n,t))){if(!i&&!f.noBubble&&!g(n)){for(u=f.delegateType||y,At.test(u+y)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(n.ownerDocument||b)&&d.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=d[o++])&&!e.isPropagationStopped();)h=a,e.type=o>1?u:f.bindType||y,(l=(se.get(a,"events")||Object.create(null))[e.type]&&se.get(a,"handle"))&&l.apply(a,t),(l=c&&a[c])&&l.apply&&oe(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=y,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),t)||!oe(n)||c&&m(n[y])&&!g(n)&&((s=n[c])&&(n[c]=null),k.event.triggered=y,e.isPropagationStopped()&&h.addEventListener(y,It),n[y](),e.isPropagationStopped()&&h.removeEventListener(y,It),k.event.triggered=void 0,s&&(n[c]=s)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each((function(){k.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}});var Rt=/\[\]$/,Dt=/\r?\n/g,Mt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Bt(e,t,n,r){var i;if(Array.isArray(t))k.each(t,(function(t,i){n||Rt.test(e)?r(e,i):Bt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==T(t))r(e,t);else for(i in t)Bt(e+"["+i+"]",t[i],n,r)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){i(this.name,this.value)}));else for(n in e)Bt(n,e[n],t,i);return r.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Nt.test(this.nodeName)&&!Mt.test(e)&&(this.checked||!ke.test(e))})).map((function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,(function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}})):{name:t.name,value:n.replace(Dt,"\r\n")}})).get()}});var Ut=/%20/g,Ft=/#.*$/,Vt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,qt=/^(?:GET|HEAD)$/,zt=/^\/\//,Wt={},Gt={},$t="*/".concat("*"),Xt=b.createElement("a");function Kt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match($)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Yt(e,t,n,r){var i={},o=e===Gt;function a(s){var u;return i[s]=!0,k.each(e[s]||[],(function(e,s){var c=s(t,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(t.dataTypes.unshift(c),a(c),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Qt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Xt.href=xt.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Qt(Qt(e,k.ajaxSettings),t):Qt(k.ajaxSettings,e)},ajaxPrefilter:Kt(Wt),ajaxTransport:Kt(Gt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,o,a,s,u,c,l,f,h,p=k.ajaxSetup({},t),d=p.context||p,y=p.context&&(d.nodeType||d.jquery)?k(d):k.event,v=k.Deferred(),m=k.Callbacks("once memory"),g=p.statusCode||{},_={},w={},T="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Ht.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)S.always(e[S.status]);else for(t in e)g[t]=[g[t],e[t]];return this},abort:function(e){var t=e||T;return n&&n.abort(t),E(0,t),this}};if(v.promise(S),p.url=((e||p.url||xt.href)+"").replace(zt,xt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match($)||[""],null==p.crossDomain){u=b.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Xt.protocol+"//"+Xt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=k.param(p.data,p.traditional)),Yt(Wt,p,t,S),c)return S;for(f in(l=k.event&&p.global)&&0==k.active++&&k.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!qt.test(p.type),i=p.url.replace(Ft,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ut,"+")):(h=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Lt.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Vt,"$1"),h=(Lt.test(i)?"&":"?")+"_="+jt.guid+++h),p.url=i+h),p.ifModified&&(k.lastModified[i]&&S.setRequestHeader("If-Modified-Since",k.lastModified[i]),k.etag[i]&&S.setRequestHeader("If-None-Match",k.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+$t+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(d,S,p)||c))return S.abort();if(T="abort",m.add(p.complete),S.done(p.success),S.fail(p.error),n=Yt(Gt,p,t,S)){if(S.readyState=1,l&&y.trigger("ajaxSend",[S,p]),c)return S;p.async&&p.timeout>0&&(s=r.setTimeout((function(){S.abort("timeout")}),p.timeout));try{c=!1,n.send(_,E)}catch(e){if(c)throw e;E(-1,e)}}else E(-1,"No Transport");function E(e,t,a,u){var f,h,b,_,w,T=t;c||(c=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",S.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(_=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,S,a)),!f&&k.inArray("script",p.dataTypes)>-1&&k.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),_=function(e,t,n,r){var i,o,a,s,u,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(p,_,S,f),f?(p.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(k.lastModified[i]=w),(w=S.getResponseHeader("etag"))&&(k.etag[i]=w)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=_.state,h=_.data,f=!(b=_.error))):(b=T,!e&&T||(T="error",e<0&&(e=0))),S.status=e,S.statusText=(t||T)+"",f?v.resolveWith(d,[h,T,S]):v.rejectWith(d,[S,T,b]),S.statusCode(g),g=void 0,l&&y.trigger(f?"ajaxSuccess":"ajaxError",[S,p,f?h:b]),m.fireWith(d,[S,T]),l&&(y.trigger("ajaxComplete",[S,p]),--k.active||k.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],(function(e,t){k[t]=function(e,n,r,i){return m(n)&&(i=i||r,r=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:i,data:n,success:r},k.isPlainObject(e)&&e))}})),k.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),k._evalUrl=function(e,t,n){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t,n)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return m(e)?this.each((function(t){k(this).wrapInner(e.call(this,t))})):this.each((function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=m(e);return this.each((function(n){k(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){k(this).replaceWith(this.childNodes)})),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Jt={0:200,1223:204},Zt=k.ajaxSettings.xhr();v.cors=!!Zt&&"withCredentials"in Zt,v.ajax=Zt=!!Zt,k.ajaxTransport((function(e){var t,n;if(v.cors||Zt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Jt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),k.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),k.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=k("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var en,tn=[],nn=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||k.expando+"_"+jt.guid++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",(function(e,t,n){var i,o,a,s=!1!==e.jsonp&&(nn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(nn,"$1"+i):!1!==e.jsonp&&(e.url+=(Lt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||k.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always((function(){void 0===o?k(r).removeProp(i):r[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,tn.push(i)),a&&m(o)&&o(a[0]),a=o=void 0})),"script"})),v.createHTMLDocument=((en=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===en.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),o=!n&&[],(i=F.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=kt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},k.expr.pseudos.animated=function(e){return k.grep(k.timers,(function(t){return e===t.elem})).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,c=k.css(e,"position"),l=k(e),f={};"static"===c&&(e.style.position="relative"),s=l.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1?(a=(r=l.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):l.css(f)}},k.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){k.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||ye}))}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;k.fn[e]=function(r){return ee(this,(function(e,r,i){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),k.each(["top","left"],(function(e,t){k.cssHooks[t]=et(v.pixelPosition,(function(e,n){if(n)return n=Ze(e,t),Xe.test(n)?k(e).position()[t]+"px":n}))})),k.each({Height:"height",Width:"width"},(function(e,t){k.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){k.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return ee(this,(function(t,n,i){var o;return g(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?k.css(t,n,s):k.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){k.fn[t]=function(e){return this.on(t,e)}})),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){k.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var rn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),i=function(){return e.apply(t||this,r.concat(s.call(arguments)))},i.guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=C,k.isFunction=m,k.isWindow=g,k.camelCase=ie,k.type=T,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},k.trim=function(e){return null==e?"":(e+"").replace(rn,"$1")},void 0===(n=function(){return k}.apply(t,[]))||(e.exports=n);var on=r.jQuery,an=r.$;return k.noConflict=function(e){return r.$===k&&(r.$=an),e&&r.jQuery===k&&(r.jQuery=on),k},void 0===i&&(r.jQuery=r.$=k),k}))},19389:(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 a[e];var n,o=String(e);return(n=r[o.toLowerCase()])?n:(n=i[o.toLowerCase()])||(1===o.length?o.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 o;if(o=r[t.toLowerCase()])return o===n;if(o=i[t.toLowerCase()])return o===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(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=o;for(o=1;o<13;o++)r["f"+o]=o+111;for(o=0;o<10;o++)r["numpad "+o]=o+96;var a=t.names=t.title={};for(o in r)a[r[o]]=o;for(var s in i)r[s]=i[s]},71975:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",u="[object Function]",c="[object GeneratorFunction]",l="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",d="[object RegExp]",y="[object Set]",v="[object String]",m="[object Symbol]",g="[object WeakMap]",b="[object ArrayBuffer]",_="[object DataView]",w="[object Float32Array]",T="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",k="[object Int32Array]",O="[object Uint8Array]",C="[object Uint8ClampedArray]",P="[object Uint16Array]",x="[object Uint32Array]",j=/\w*$/,L=/^\[object .+?Constructor\]$/,A=/^(?:0|[1-9]\d*)$/,I={};I[o]=I["[object Array]"]=I[b]=I[_]=I[a]=I[s]=I[w]=I[T]=I[S]=I[E]=I[k]=I[l]=I[f]=I[h]=I[d]=I[y]=I[v]=I[m]=I[O]=I[C]=I[P]=I[x]=!0,I["[object Error]"]=I[u]=I[g]=!1;var R="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,D="object"==typeof self&&self&&self.Object===Object&&self,M=R||D||Function("return this")(),N=t&&!t.nodeType&&t,B=N&&e&&!e.nodeType&&e,U=B&&B.exports===N;function F(e,t){return e.set(t[0],t[1]),e}function V(e,t){return e.add(t),e}function H(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function q(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var $,X=Array.prototype,K=Function.prototype,Y=Object.prototype,Q=M["__core-js_shared__"],J=($=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",Z=K.toString,ee=Y.hasOwnProperty,te=Y.toString,ne=RegExp("^"+Z.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=U?M.Buffer:void 0,ie=M.Symbol,oe=M.Uint8Array,ae=W(Object.getPrototypeOf,Object),se=Object.create,ue=Y.propertyIsEnumerable,ce=X.splice,le=Object.getOwnPropertySymbols,fe=re?re.isBuffer:void 0,he=W(Object.keys,Object),pe=Me(M,"DataView"),de=Me(M,"Map"),ye=Me(M,"Promise"),ve=Me(M,"Set"),me=Me(M,"WeakMap"),ge=Me(Object,"create"),be=Ve(pe),_e=Ve(de),we=Ve(ye),Te=Ve(ve),Se=Ve(me),Ee=ie?ie.prototype:void 0,ke=Ee?Ee.valueOf:void 0;function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){this.__data__=new Ce(e)}function je(e,t,n){var r=e[t];ee.call(e,t)&&He(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Le(e,t){for(var n=e.length;n--;)if(He(e[n][0],t))return n;return-1}function Ae(e,t,n,r,i,p,g){var L;if(r&&(L=p?r(e,i,p,g):r(e)),void 0!==L)return L;if(!$e(e))return e;var A=qe(e);if(A){if(L=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,L)}else{var R=Be(e),D=R==u||R==c;if(We(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(R==h||R==o||D&&!p){if(q(e))return p?e:{};if(L=function(e){return"function"!=typeof e.constructor||Fe(e)?{}:$e(t=ae(e))?se(t):{};var t}(D?{}:e),!t)return function(e,t){return Re(e,Ne(e),t)}(e,function(e,t){return e&&Re(t,Xe(t),e)}(L,e))}else{if(!I[R])return p?e:{};L=function(e,t,n,r){var i,o=e.constructor;switch(t){case b:return Ie(e);case a:case s:return new o(+e);case _:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case T:case S:case E:case k:case O:case C:case P:case x:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case l:return function(e,t,n){return H(t?n(z(e),!0):z(e),F,new e.constructor)}(e,r,n);case f:case v:return new o(e);case d:return function(e){var t=new e.constructor(e.source,j.exec(e));return t.lastIndex=e.lastIndex,t}(e);case y:return function(e,t,n){return H(t?n(G(e),!0):G(e),V,new e.constructor)}(e,r,n);case m:return i=e,ke?Object(ke.call(i)):{}}}(e,R,Ae,t)}}g||(g=new xe);var M=g.get(e);if(M)return M;if(g.set(e,L),!A)var N=n?function(e){return function(e,t,n){var r=t(e);return qe(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Xe,Ne)}(e):Xe(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n););}(N||e,(function(i,o){N&&(i=e[o=i]),je(L,o,Ae(i,t,n,r,o,e,g))})),L}function Ie(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Re(e,t,n,r){n||(n={});for(var i=-1,o=t.length;++i<o;){var a=t[i],s=r?r(n[a],e[a],a,n,e):void 0;je(n,a,void 0===s?e[a]:s)}return n}function De(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!$e(e)||(t=e,J&&J in t))&&(Ge(e)||q(e)?ne:L).test(Ve(e));var t}(n)?n:void 0}Oe.prototype.clear=function(){this.__data__=ge?ge(null):{}},Oe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Oe.prototype.get=function(e){var t=this.__data__;if(ge){var n=t[e];return n===r?void 0:n}return ee.call(t,e)?t[e]:void 0},Oe.prototype.has=function(e){var t=this.__data__;return ge?void 0!==t[e]:ee.call(t,e)},Oe.prototype.set=function(e,t){return this.__data__[e]=ge&&void 0===t?r:t,this},Ce.prototype.clear=function(){this.__data__=[]},Ce.prototype.delete=function(e){var t=this.__data__,n=Le(t,e);return!(n<0||(n==t.length-1?t.pop():ce.call(t,n,1),0))},Ce.prototype.get=function(e){var t=this.__data__,n=Le(t,e);return n<0?void 0:t[n][1]},Ce.prototype.has=function(e){return Le(this.__data__,e)>-1},Ce.prototype.set=function(e,t){var n=this.__data__,r=Le(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Oe,map:new(de||Ce),string:new Oe}},Pe.prototype.delete=function(e){return De(this,e).delete(e)},Pe.prototype.get=function(e){return De(this,e).get(e)},Pe.prototype.has=function(e){return De(this,e).has(e)},Pe.prototype.set=function(e,t){return De(this,e).set(e,t),this},xe.prototype.clear=function(){this.__data__=new Ce},xe.prototype.delete=function(e){return this.__data__.delete(e)},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ce){var r=n.__data__;if(!de||r.length<199)return r.push([e,t]),this;n=this.__data__=new Pe(r)}return n.set(e,t),this};var Ne=le?W(le,Object):function(){return[]},Be=function(e){return te.call(e)};function Ue(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||A.test(e))&&e>-1&&e%1==0&&e<t}function Fe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function Ve(e){if(null!=e){try{return Z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function He(e,t){return e===t||e!=e&&t!=t}(pe&&Be(new pe(new ArrayBuffer(1)))!=_||de&&Be(new de)!=l||ye&&Be(ye.resolve())!=p||ve&&Be(new ve)!=y||me&&Be(new me)!=g)&&(Be=function(e){var t=te.call(e),n=t==h?e.constructor:void 0,r=n?Ve(n):void 0;if(r)switch(r){case be:return _;case _e:return l;case we:return p;case Te:return y;case Se:return g}return t});var qe=Array.isArray;function ze(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!Ge(e)}var We=fe||function(){return!1};function Ge(e){var t=$e(e)?te.call(e):"";return t==u||t==c}function $e(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Xe(e){return ze(e)?function(e,t){var n=qe(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&ze(e)}(e)&&ee.call(e,"callee")&&(!ue.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||Ue(a,r))||n.push(a);return n}(e):function(e){if(!Fe(e))return he(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Ae(e,!0,!0)}},40001:(e,t,n)=>{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,l=u||c||Function("return this")(),f=Object.prototype.toString,h=Math.max,p=Math.min,d=function(){return l.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,u,c=0,l=!1,f=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||f&&e-c>=o}function _(){var e=d();if(b(e))return w(e);s=setTimeout(_,function(e){var n=t-(e-u);return f?p(n,o-(e-c)):n}(e))}function w(e){return s=void 0,m&&r?g(e):(r=i=void 0,a)}function T(){var e=d(),n=b(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(_,t),l?g(e):a}(u);if(f)return s=setTimeout(_,t),g(u)}return void 0===s&&(s=setTimeout(_,t)),a}return t=v(t)||0,y(n)&&(l=!!n.leading,o=(f="maxWait"in n)?h(v(n.maxWait)||0,t):o,m="trailing"in n?!!n.trailing:m),T.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},T.flush=function(){return void 0===s?a:w(d())},T}},98511:(e,t,n)=>{var r,i="__lodash_hash_undefined__",o=/^\[object .+?Constructor\]$/,a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,u=a||s||Function("return this")(),c=Array.prototype,l=Function.prototype,f=Object.prototype,h=u["__core-js_shared__"],p=(r=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",d=l.toString,y=f.hasOwnProperty,v=f.toString,m=RegExp("^"+d.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),g=c.splice,b=O(u,"Map"),_=O(Object,"create");function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function E(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function k(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function O(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!P(e)||p&&p in e)return!1;var t=function(e){var t=P(e)?v.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?m:o;return t.test(function(e){if(null!=e){try{return d.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function C(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(C.Cache||S),n}function P(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}w.prototype.clear=function(){this.__data__=_?_(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(_){var n=t[e];return n===i?void 0:n}return y.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return _?void 0!==t[e]:y.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=_&&void 0===t?i:t,this},T.prototype.clear=function(){this.__data__=[]},T.prototype.delete=function(e){var t=this.__data__,n=E(t,e);return!(n<0||(n==t.length-1?t.pop():g.call(t,n,1),0))},T.prototype.get=function(e){var t=this.__data__,n=E(t,e);return n<0?void 0:t[n][1]},T.prototype.has=function(e){return E(this.__data__,e)>-1},T.prototype.set=function(e,t){var n=this.__data__,r=E(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},S.prototype.clear=function(){this.__data__={hash:new w,map:new(b||T),string:new w}},S.prototype.delete=function(e){return k(this,e).delete(e)},S.prototype.get=function(e){return k(this,e).get(e)},S.prototype.has=function(e){return k(this,e).has(e)},S.prototype.set=function(e,t){return k(this,e).set(e,t),this},C.Cache=S,e.exports=C},50200:(e,t,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,f=c||l||Function("return this")(),h=Object.prototype.toString,p=Math.max,d=Math.min,y=function(){return f.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return v(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(e,t,n){var i,o,a,s,u,c,l=0,f=!1,h=!1,g=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=i,r=o;return i=o=void 0,l=t,s=e.apply(r,n)}function _(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-l>=a}function w(){var e=y();if(_(e))return T(e);u=setTimeout(w,function(e){var n=t-(e-c);return h?d(n,a-(e-l)):n}(e))}function T(e){return u=void 0,g&&i?b(e):(i=o=void 0,s)}function S(){var e=y(),n=_(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return function(e){return l=e,u=setTimeout(w,t),f?b(e):s}(c);if(h)return u=setTimeout(w,t),b(c)}return void 0===u&&(u=setTimeout(w,t)),s}return t=m(t)||0,v(n)&&(f=!!n.leading,a=(h="maxWait"in n)?p(m(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==u&&clearTimeout(u),l=0,i=c=o=u=void 0},S.flush=function(){return void 0===u?s:T(y())},S}(e,t,{leading:i,maxWait:t,trailing:o})}},57258:e=>{var t=Math.pow(2,32);e.exports=function(e){var n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=n.getUint32(i),r.firstOffset=n.getUint32(i+4),i+=8):(r.earliestPresentationTime=n.getUint32(i)*t+n.getUint32(i+4),r.firstOffset=n.getUint32(i+8)*t+n.getUint32(i+12),i+=16),i+=2;var o=n.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&n.getUint32(i),subsegmentDuration:n.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&n.getUint32(i+8)});return r}},28195:e=>{var t,n,r,i,o,a,s,u=9e4;t=function(e){return e*u},n=function(e,t){return e*t},r=function(e){return e/u},i=function(e,t){return e/t},o=function(e,n){return t(i(e,n))},a=function(e,t){return n(r(e),t)},s=function(e,t,n){return r(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:u,secondsToVideoTs:t,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:i,audioTsToVideoTs:o,videoTsToAudioTs:a,metadataTsToSeconds:s}},11602:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(e,n,r){var i=h;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(e){if(null!=e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=L,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(x),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},8004:e=>{e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},31336:function(e){var t,n,r,i,o;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,i=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return r.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=n.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var c={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(c.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var l=s.path,f=l.substring(0,l.lastIndexOf("/")+1)+a.path;c.path=o.normalizePath(f)}else c.path=s.path,a.params||(c.params=s.params,a.query||(c.query=s.query));return null===c.path&&(c.path=r.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(c)},parseURL:function(e){var n=t.exec(e);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(i,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o},83983:(e,t,n)=>{var r=n(51562),i=e.exports={WebVTT:n(77735),VTTCue:n(65997),VTTRegion:n(17193)};r.vttjs=i,r.WebVTT=i.WebVTT;var o=i.VTTCue,a=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=o,r.VTTRegion=a},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},77735:(e,t,n)=>{var r=n(3384),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 o(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(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 o in i)if("string"==typeof i[o]){var a=i[o].split(n);2===a.length&&t(a[0].trim(),a[1].trim())}}function c(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new o(o.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=i(),c(),"--\x3e"!==e.substr(0,3))throw new o(o.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),c(),t.endTime=i(),c(),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 o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[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)}o.prototype=i(Error.prototype),o.prototype.constructor=o,o.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 l=r.createElement&&r.createElement("textarea"),f={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={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)"},p={v:"title",lang:"lang"},d={rt:"ruby"};function y(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,t){return!d[t.localName]||d[t.localName]===e.localName}function i(t,n){var r=f[t];if(!r)return null;var i=e.document.createElement(r),o=p[t];return o&&n&&(i[o]=n.trim()),i}for(var o,s,u=e.document.createElement("div"),c=u,y=[];null!==(o=n());)if("<"!==o[0])c.appendChild(e.document.createTextNode((s=o,l.innerHTML=s,s=l.textContent,l.textContent="",s)));else{if("/"===o[1]){y.length&&y[y.length-1]===o.substr(2).replace(">","")&&(y.pop(),c=c.parentNode);continue}var v,m=a(o.substr(1,o.length-2));if(m){v=e.document.createProcessingInstruction("timestamp",m),c.appendChild(v);continue}var g=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!g)continue;if(!(v=i(g[1],g[3])))continue;if(!r(c,v))continue;if(g[2]){var b=g[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var r=t?"background-color":"color",i=h[n];v.style[r]=i}})),v.className=b.join(" ")}y.push(g[1]),c.appendChild(v),c=v}return u}var v=[[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 m(e){for(var t=0;t<v.length;t++){var n=v[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function g(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 o=n.match(/^.*(\n|\r)/);return o?(e.length=0,o[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 o=0;o<n.length;o++)if(m(n.charCodeAt(o)))return"rtl";return"ltr"}function b(){}function _(e,t,n){b.call(this),this.cue=t,this.cueDiv=y(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:g(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":case"line-left":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":case"line-right":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 w(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.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 T(e,t,n,r){var i=new w(t),o=t.cue,a=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}(o),s=[];if(o.snapToLines){var u;switch(o.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var c=i.lineHeight,l=c*Math.round(a),f=n[u]+c,h=s[0];Math.abs(l)>f&&(l=l<0?-1:1,l*=Math.ceil(f/c)*c),a<0&&(l+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(h,l)}else{var p=i.lineHeight/n.height*100;switch(o.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new w(t)}var d=function(e,t){for(var i,o=new w(e),a=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);a>u&&(i=new w(e),a=u),e=new w(o)}return i||o}(i,s);t.move(d.toCSSCompatValues(n))}function S(){}b.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=i(b.prototype),_.prototype.constructor=_,w.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}},w.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},w.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},w.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},w.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}},w.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)},w.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}},w.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?y(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=[],o=w.getSimpleBoxPosition(r),a={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var n,s,u=0;u<t.length;u++)s=t[u],n=new _(e,s,a),r.appendChild(n.div),T(0,n,o,i),s.displayState=n.div,i.push(w.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 o))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,n=this;function r(){for(var e=n.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var r=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,n.buffer=e.substr(t),r}e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;var l=(i=r()).match(/^WEBVTT([ \t].*)?$/);if(!l||!l[0])throw new o(o.Errors.BadSignature);n.state="HEADER"}for(var f=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(f?f=!1:i=r(),n.state){case"HEADER":/:/.test(i)?(t=i).match(/X-TIMESTAMP-MAP/)?u(t,(function(e,t){"X-TIMESTAMP-MAP"===e&&function(e){var t=new s;u(e,(function(e,n){switch(e){case"MPEGT":t.integer(e+"S",n);break;case"LOCA":t.set(e+"L",a(n))}}),/[^\d]:/,/,/),n.ontimestampmap&&n.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}(t)}),/=/):u(t,(function(e,t){"Region"===e&&function(e){var t=new s;if(u(e,(function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var r=n.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;t.set(e+"X",i.get("x")),t.set(e+"Y",i.get("y"));break;case"scroll":t.alt(e,n,["up"])}}),/=/,/\s/),t.has("id")){var r=new(n.vttjs.VTTRegion||n.window.VTTRegion);r.width=t.get("width",100),r.lines=t.get("lines",3),r.regionAnchorX=t.get("regionanchorX",0),r.regionAnchorY=t.get("regionanchorY",100),r.viewportAnchorX=t.get("viewportanchorX",0),r.viewportAnchorY=t.get("viewportanchorY",100),r.scroll=t.get("scroll",""),n.onregion&&n.onregion(r),n.regionList.push({id:t.get("id"),region:r})}}(t)}),/:/):i||(n.state="ID");continue;case"NOTE":i||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){n.state="NOTE";break}if(!i)continue;n.cue=new(n.vttjs.VTTCue||n.window.VTTCue)(0,0,"");try{n.cue.align="center"}catch(e){n.cue.align="middle"}if(n.state="CUE",-1===i.indexOf("--\x3e")){n.cue.id=i;continue}case"CUE":try{c(i,n.cue,n.regionList)}catch(e){n.reportOrThrowError(e),n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||h&&(f=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(n.state="ID");continue}}}catch(e){n.reportOrThrowError(e),"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.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 o(o.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=S},65997:e=>{var t={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(e){return"string"==typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}function i(e,n,i){this.hasBeenReset=!1;var o="",a=!1,s=e,u=n,c=i,l=null,f="",h=!0,p="auto",d="start",y="auto",v="auto",m=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return o},set:function(e){o=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!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 c},set:function(e){c=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return f},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");f=n,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(e){var t=r(e);t?(d=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return v},set:function(e){var t=r(e);t?(v=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");m=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=r(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}i.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=i},17193:e=>{var t={"":!0,up:!0};function n(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,r=3,i=0,o=100,a=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return r},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");r=e}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");o=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===n?console.warn("Scroll: an invalid or illegal string was specified."):u=n}}})}},73668:(e,t,n)=>{function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(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 f,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,l=n.xmlns||{},h=/\/x?html?$/.test(t),p=h?c.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,h&&(l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?r.parse(e,l,p):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new p).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var c=0;c<s;c++){e=r.getURI(c);var l=r.getValue(c),f=(n=r.getQName(c),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(c),f),f.value=f.nodeValue=l,a.setAttributeNode(f)}},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&&o(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&&o(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&&o(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&&o(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw new h(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 c=n(70624),l=n(91186),f=l.XMLReader,h=l.ParseError,p=n(51676).DOMImplementation;n(51676),t.a=r},51676:(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={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,c=i.ENTITY_REFERENCE_NODE=5,l=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,p=i.DOCUMENT_NODE=9,d=i.DOCUMENT_TYPE_NODE=10,y=i.DOCUMENT_FRAGMENT_NODE=11,v=i.NOTATION_NODE=12,m={},g={},b=(m.INDEX_SIZE_ERR=(g[1]="Index size error",1),m.DOMSTRING_SIZE_ERR=(g[2]="DOMString size error",2),m.HIERARCHY_REQUEST_ERR=(g[3]="Hierarchy request error",3)),_=(m.WRONG_DOCUMENT_ERR=(g[4]="Wrong document",4),m.INVALID_CHARACTER_ERR=(g[5]="Invalid character",5),m.NO_DATA_ALLOWED_ERR=(g[6]="No data allowed",6),m.NO_MODIFICATION_ALLOWED_ERR=(g[7]="No modification allowed",7),m.NOT_FOUND_ERR=(g[8]="Not found",8)),w=(m.NOT_SUPPORTED_ERR=(g[9]="Not supported",9),m.INUSE_ATTRIBUTE_ERR=(g[10]="Attribute in use",10));function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,g[e]),this.message=g[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function S(){}function E(e,t){this._node=e,this._refresh=t,k(this)}function k(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);ne(e,"length",r.length),n(r,e),e._inc=t}}function O(){}function C(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function P(e,t,n,r){if(r?t[C(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&D(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 x(e,t,n){var r=C(t,n);if(!(r>=0))throw T(_,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(D(o,e,n),n.ownerElement=null)}}function j(e){if(this._features={},e)for(var t in e)this._features=e[t]}function L(){}function A(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function I(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(I(e,t))return!0}while(e=e.nextSibling)}function R(){}function D(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function M(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,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function N(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,M(e.ownerDocument,e),t}function B(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===y){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return M(e.ownerDocument||e,e),t.nodeType==y&&(t.firstChild=t.lastChild=null),t}function U(){this._nsMap={}}function F(){}function V(){}function H(){}function q(){}function z(){}function W(){}function G(){}function $(){}function X(){}function K(){}function Y(){}function Q(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return Z(this,n,e,t,a),n.join("")}function J(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 o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function Z(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 o:i||(i=[]),i.length;var l=e.attributes,v=l.length,m=e.firstChild,g=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",g);for(var b=0;b<v;b++)"xmlns"==(_=l.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value});for(b=0;b<v;b++){var _;if(J(_=l.item(b),0,i)){var w=_.prefix||"",T=_.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}Z(_,t,n,r,i)}if(J(e,0,i)&&(w=e.prefix||"",T=e.namespaceURI,S=w?" xmlns:"+w:" xmlns",t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})),m||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(g)){if(t.push(">"),n&&/^script$/i.test(g))for(;m;)m.data?t.push(m.data):Z(m,t,n,r,i),m=m.nextSibling;else for(;m;)Z(m,t,n,r,i),m=m.nextSibling;t.push("</",g,">")}else t.push("/>");return;case p:case y:for(m=e.firstChild;m;)Z(m,t,n,r,i),m=m.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[&"]/g,A),'"');case s:return t.push(e.data.replace(/[<&]/g,A).replace(/]]>/g,"]]&gt;"));case u:return t.push("<![CDATA[",e.data,"]]>");case h:return t.push("\x3c!--",e.data,"--\x3e");case d:var E=e.publicId,k=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(" PUBLIC ",E),k&&"."!=k&&t.push(" ",k),t.push(">");else if(k&&"."!=k)t.push(" SYSTEM ",k,">");else{var O=e.internalSubset;O&&t.push(" [",O,"]"),t.push(">")}return;case f:return t.push("<?",e.target," ",e.data,"?>");case c:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ee(e,t,n){var r;switch(t.nodeType){case o:(r=t.cloneNode(!1)).ownerDocument=e;case y:break;case a:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(ee(e,i,n)),i=i.nextSibling;return r}function te(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 o:var u=t.attributes,c=r.attributes=new O,l=u.length;c._ownerElement=r;for(var f=0;f<l;f++)r.setAttributeNode(te(e,u.item(f),!0));break;case a:n=!0}if(n)for(var h=t.firstChild;h;)r.appendChild(te(e,h,n)),h=h.nextSibling;return r}function ne(e,t,n){e[t]=n}m.INVALID_STATE_ERR=(g[11]="Invalid state",11),m.SYNTAX_ERR=(g[12]="Syntax error",12),m.INVALID_MODIFICATION_ERR=(g[13]="Invalid modification",13),m.NAMESPACE_ERR=(g[14]="Invalid namespace",14),m.INVALID_ACCESS_ERR=(g[15]="Invalid access",15),T.prototype=Error.prototype,n(m,T),S.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)Z(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return k(this),this[e]},r(E,S),O.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 T(w);var n=this.getNamedItem(e.nodeName);return P(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new T(w);return t=this.getNamedItemNS(e.namespaceURI,e.localName),P(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return x(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return x(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}},j.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 R;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 W;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},L.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 B(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return N(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return te(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==a?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==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,L),n(i,L.prototype),R.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==y){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),B(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),N(this,e)},importNode:function(e,t){return ee(this,e,t)},getElementById:function(e){var t=null;return I(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new E(this,(function(e){var n=[];return I(e.documentElement,(function(r){r!==e&&r.nodeType==o&&t.test(r.getAttribute("class"))&&n.push(r)})),n}))},createElement:function(e){var t=new U;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new S,(t.attributes=new O)._ownerElement=t,t},createDocumentFragment:function(){var e=new K;return e.ownerDocument=this,e.childNodes=new S,e},createTextNode:function(e){var t=new H;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 z;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new Y;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new F;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new X;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new U,r=t.split(":"),i=n.attributes=new O;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 F,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(R,L),U.prototype={nodeType:o,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===y?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,M(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 E(this,(function(t){var n=[];return I(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return I(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},R.prototype.getElementsByTagName=U.prototype.getElementsByTagName,R.prototype.getElementsByTagNameNS=U.prototype.getElementsByTagNameNS,r(U,L),F.prototype.nodeType=a,r(F,L),V.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(g[b])},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(V,L),H.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(H,V),q.prototype={nodeName:"#comment",nodeType:h},r(q,V),z.prototype={nodeName:"#cdata-section",nodeType:u},r(z,V),W.prototype.nodeType=d,r(W,L),G.prototype.nodeType=v,r(G,L),$.prototype.nodeType=l,r($,L),X.prototype.nodeType=c,r(X,L),K.prototype.nodeName="#document-fragment",K.prototype.nodeType=y,r(K,L),Y.prototype.nodeType=f,r(Y,L),L.prototype.toString=Q;try{if(Object.defineProperty){function re(e){switch(e.nodeType){case o:case y:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(re(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(E.prototype,"length",{get:function(){return k(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){return re(this)},set:function(e){switch(this.nodeType){case o:case y: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}}}),ne=function(e,t,n){e["$$"+t]=n}}}catch(ie){}t.DOMImplementation=j},70624:(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:"♦"}},91186:(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 o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function a(){}function s(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function u(e,t,n,r,i,o){function a(e,t,r){e in n.attributeNames&&o.fatalError("Attribute "+e+" redefined"),n.addValue(e,t,r)}for(var s,u=++t,c=0;;){var l=e.charAt(u);switch(l){case"=":if(1===c)s=e.slice(t,u),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(o.warning('attribute value must after "="'),s=e.slice(t,u)),t=u+1,!((u=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");a(s,f=e.slice(t,u).replace(/&#?\w+;/g,i),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');a(s,f=e.slice(t,u).replace(/&#?\w+;/g,i),t),o.warning('attribute "'+s+'" missed start quot('+l+")!!"),t=u+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,u)),u;case">":switch(c){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(f=e.slice(t,u)).slice(-1)&&(n.closed=!0,f=f.slice(0,-1));case 2:2===c&&(f=s),4==c?(o.warning('attribute "'+f+'" missed quot(")!'),a(s,f.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&f.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),a(f,f,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"€":l=" ";default:if(l<=" ")switch(c){case 0:n.setTagName(e.slice(t,u)),c=6;break;case 1:s=e.slice(t,u),c=2;break;case 4:var f=e.slice(t,u).replace(/&#?\w+;/g,i);o.warning('attribute "'+f+'" missed quot(")!!'),a(s,f,t);case 5:c=6}else switch(c){case 2:n.tagName,"http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),a(s,s,t),t=u,c=1;break;case 5:o.warning('attribute space is required"'+s+'"!!');case 6:c=1,t=u;break;case 3:c=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function c(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var a=e[o],s=a.qName,u=a.value;if((p=s.indexOf(":"))>0)var c=a.prefix=s.slice(0,p),l=s.slice(p+1),f="xmlns"===c&&l;else l=s,c=null,f="xmlns"===s&&"";a.localName=l,!1!==f&&(null==i&&(i={},h(n,n={})),n[f]=i[f]=u,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(f,u))}for(o=e.length;o--;)(c=(a=e[o]).prefix)&&("xml"===c&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(a.uri=n[c||""]));var p;(p=r.indexOf(":"))>0?(c=e.prefix=r.slice(0,p),l=e.localName=r.slice(p+1)):(c=null,l=e.localName=r);var d=e.uri=n[c||""];if(t.startElement(d,l,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(d,l,r),i)for(c in i)t.endPrefixMapping(c)}function l(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function f(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 h(e,t){for(var n in e)t[n]=e[n]}function p(e,t,n,r){if("-"===e.charAt(t+2))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;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 o=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=!1,c=!1;a>3&&(/^public$/i.test(o[2][0])?(u=o[3][0],c=a>4&&o[4][0]):/^system$/i.test(o[2][0])&&(c=o[3][0]));var l=o[a-1];return n.startDTD(s,u,c),n.endDTD(),l.index+l[0].length}return-1}function d(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(i[0].length,n.processingInstruction(i[1],i[2]),r+2):-1}return-1}function y(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,a.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),h(t,t={}),function(e,t,n,r,i){function a(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function h(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,a);_&&v(S),r.characters(n,0,t-S),S=t}}function v(t,n){for(;t>=g&&(n=b.exec(e));)m=n.index,g=m+n[0].length,_.lineNumber++;_.columnNumber=t-m+1}for(var m=0,g=0,b=/.*(?:\r\n?|\n)|.*$/g,_=r.locator,w=[{currentNSMap:t}],T={},S=0;;){try{var E=e.indexOf("<",S);if(E<0){if(!e.substr(S).match(/^\s*$/)){var k=r.doc,O=k.createTextNode(e.substr(S));k.appendChild(O),r.currentElement=O}return}switch(E>S&&h(E),e.charAt(E+1)){case"/":var C=e.indexOf(">",E+3),P=e.substring(E+2,C),x=w.pop();C<0?(P=e.substring(E+2).replace(/[\s<].*/,""),i.error("end tag name: "+P+" is not complete:"+x.tagName),C=E+1+P.length):P.match(/\s</)&&(P=P.replace(/[\s<].*/,""),i.error("end tag name: "+P+" maybe not complete"),C=E+1+P.length);var j=x.localNSMap,L=x.tagName==P;if(L||x.tagName&&x.tagName.toLowerCase()==P.toLowerCase()){if(r.endElement(x.uri,x.localName,P),j)for(var A in j)r.endPrefixMapping(A);L||i.fatalError("end tag name: "+P+" is not match the current start tagName:"+x.tagName)}else w.push(x);C++;break;case"?":_&&v(E),C=d(e,E,r);break;case"!":_&&v(E),C=p(e,E,r,i);break;default:_&&v(E);var I=new y,R=w[w.length-1].currentNSMap,D=(C=u(e,E,I,R,a,i),I.length);if(!I.closed&&f(e,C,I.tagName,T)&&(I.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),_&&D){for(var M=s(_,{}),N=0;N<D;N++){var B=I[N];v(B.offset),B.locator=s(_,{})}r.locator=M,c(I,r,R)&&w.push(I),r.locator=_}else c(I,r,R)&&w.push(I);"http://www.w3.org/1999/xhtml"!==I.uri||I.closed?C++:C=l(e,C,I.tagName,a,r)}}catch(e){if(e instanceof o)throw e;i.error("element parse error: "+e),C=-1}C>S?S=C:h(Math.max(E,S)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},y.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=a,t.ParseError=o},58421:()=>{},448:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},21161:(e,t,n)=>{"use strict";n.r(t),n.d(t,{VERSION:()=>i,after:()=>Rt,all:()=>en,allKeys:()=>ve,any:()=>tn,assign:()=>Re,before:()=>Dt,bind:()=>Tt,bindAll:()=>kt,chain:()=>gt,chunk:()=>Bn,clone:()=>Be,collect:()=>Xt,compact:()=>Cn,compose:()=>It,constant:()=>J,contains:()=>nn,countBy:()=>mn,create:()=>Ne,debounce:()=>jt,default:()=>qn,defaults:()=>De,defer:()=>Pt,delay:()=>Ct,detect:()=>Wt,difference:()=>xn,drop:()=>kn,each:()=>$t,escape:()=>at,every:()=>en,extend:()=>Ie,extendOwn:()=>Re,filter:()=>Jt,find:()=>Wt,findIndex:()=>Ut,findKey:()=>Nt,findLastIndex:()=>Ft,findWhere:()=>Gt,first:()=>En,flatten:()=>Pn,foldl:()=>Yt,foldr:()=>Qt,forEach:()=>$t,functions:()=>Le,get:()=>qe,groupBy:()=>yn,has:()=>ze,head:()=>En,identity:()=>We,include:()=>nn,includes:()=>nn,indexBy:()=>vn,indexOf:()=>qt,initial:()=>Sn,inject:()=>Yt,intersection:()=>In,invert:()=>je,invoke:()=>rn,isArguments:()=>K,isArray:()=>G,isArrayBuffer:()=>N,isBoolean:()=>P,isDataView:()=>W,isDate:()=>I,isElement:()=>x,isEmpty:()=>ue,isEqual:()=>ye,isError:()=>D,isFinite:()=>Y,isFunction:()=>F,isMap:()=>Ee,isMatch:()=>ce,isNaN:()=>Q,isNull:()=>O,isNumber:()=>A,isObject:()=>k,isRegExp:()=>R,isSet:()=>Oe,isString:()=>L,isSymbol:()=>M,isTypedArray:()=>ie,isUndefined:()=>C,isWeakMap:()=>ke,isWeakSet:()=>Ce,iteratee:()=>Ye,keys:()=>se,last:()=>On,lastIndexOf:()=>zt,map:()=>Xt,mapObject:()=>Je,matcher:()=>Ge,matches:()=>Ge,max:()=>sn,memoize:()=>Ot,methods:()=>Le,min:()=>un,mixin:()=>Fn,negate:()=>At,noop:()=>Ze,now:()=>rt,object:()=>Mn,omit:()=>Tn,once:()=>Mt,pairs:()=>xe,partial:()=>wt,partition:()=>gn,pick:()=>wn,pluck:()=>on,property:()=>$e,propertyOf:()=>et,random:()=>nt,range:()=>Nn,reduce:()=>Yt,reduceRight:()=>Qt,reject:()=>Zt,rest:()=>kn,restArguments:()=>E,result:()=>yt,sample:()=>fn,select:()=>Jt,shuffle:()=>hn,size:()=>bn,some:()=>tn,sortBy:()=>pn,sortedIndex:()=>Vt,tail:()=>kn,take:()=>En,tap:()=>Ue,template:()=>dt,templateSettings:()=>ut,throttle:()=>xt,times:()=>tt,toArray:()=>ln,toPath:()=>Fe,transpose:()=>Rn,unescape:()=>st,union:()=>An,uniq:()=>Ln,unique:()=>Ln,uniqueId:()=>mt,unzip:()=>Rn,values:()=>Pe,where:()=>an,without:()=>jn,wrap:()=>Lt,zip:()=>Dn});var r={};n.r(r),n.d(r,{VERSION:()=>i,after:()=>Rt,all:()=>en,allKeys:()=>ve,any:()=>tn,assign:()=>Re,before:()=>Dt,bind:()=>Tt,bindAll:()=>kt,chain:()=>gt,chunk:()=>Bn,clone:()=>Be,collect:()=>Xt,compact:()=>Cn,compose:()=>It,constant:()=>J,contains:()=>nn,countBy:()=>mn,create:()=>Ne,debounce:()=>jt,default:()=>Vn,defaults:()=>De,defer:()=>Pt,delay:()=>Ct,detect:()=>Wt,difference:()=>xn,drop:()=>kn,each:()=>$t,escape:()=>at,every:()=>en,extend:()=>Ie,extendOwn:()=>Re,filter:()=>Jt,find:()=>Wt,findIndex:()=>Ut,findKey:()=>Nt,findLastIndex:()=>Ft,findWhere:()=>Gt,first:()=>En,flatten:()=>Pn,foldl:()=>Yt,foldr:()=>Qt,forEach:()=>$t,functions:()=>Le,get:()=>qe,groupBy:()=>yn,has:()=>ze,head:()=>En,identity:()=>We,include:()=>nn,includes:()=>nn,indexBy:()=>vn,indexOf:()=>qt,initial:()=>Sn,inject:()=>Yt,intersection:()=>In,invert:()=>je,invoke:()=>rn,isArguments:()=>K,isArray:()=>G,isArrayBuffer:()=>N,isBoolean:()=>P,isDataView:()=>W,isDate:()=>I,isElement:()=>x,isEmpty:()=>ue,isEqual:()=>ye,isError:()=>D,isFinite:()=>Y,isFunction:()=>F,isMap:()=>Ee,isMatch:()=>ce,isNaN:()=>Q,isNull:()=>O,isNumber:()=>A,isObject:()=>k,isRegExp:()=>R,isSet:()=>Oe,isString:()=>L,isSymbol:()=>M,isTypedArray:()=>ie,isUndefined:()=>C,isWeakMap:()=>ke,isWeakSet:()=>Ce,iteratee:()=>Ye,keys:()=>se,last:()=>On,lastIndexOf:()=>zt,map:()=>Xt,mapObject:()=>Je,matcher:()=>Ge,matches:()=>Ge,max:()=>sn,memoize:()=>Ot,methods:()=>Le,min:()=>un,mixin:()=>Fn,negate:()=>At,noop:()=>Ze,now:()=>rt,object:()=>Mn,omit:()=>Tn,once:()=>Mt,pairs:()=>xe,partial:()=>wt,partition:()=>gn,pick:()=>wn,pluck:()=>on,property:()=>$e,propertyOf:()=>et,random:()=>nt,range:()=>Nn,reduce:()=>Yt,reduceRight:()=>Qt,reject:()=>Zt,rest:()=>kn,restArguments:()=>E,result:()=>yt,sample:()=>fn,select:()=>Jt,shuffle:()=>hn,size:()=>bn,some:()=>tn,sortBy:()=>pn,sortedIndex:()=>Vt,tail:()=>kn,take:()=>En,tap:()=>Ue,template:()=>dt,templateSettings:()=>ut,throttle:()=>xt,times:()=>tt,toArray:()=>ln,toPath:()=>Fe,transpose:()=>Rn,unescape:()=>st,union:()=>An,uniq:()=>Ln,unique:()=>Ln,uniqueId:()=>mt,unzip:()=>Rn,values:()=>Pe,where:()=>an,without:()=>jn,wrap:()=>Lt,zip:()=>Dn});var i="1.13.6",o="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},a=Array.prototype,s=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,c=a.push,l=a.slice,f=s.toString,h=s.hasOwnProperty,p="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,y=Array.isArray,v=Object.keys,m=Object.create,g=p&&ArrayBuffer.isView,b=isNaN,_=isFinite,w=!{toString:null}.propertyIsEnumerable("toString"),T=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],S=Math.pow(2,53)-1;function E(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}}function k(e){var t=typeof e;return"function"===t||"object"===t&&!!e}function O(e){return null===e}function C(e){return void 0===e}function P(e){return!0===e||!1===e||"[object Boolean]"===f.call(e)}function x(e){return!(!e||1!==e.nodeType)}function j(e){var t="[object "+e+"]";return function(e){return f.call(e)===t}}const L=j("String"),A=j("Number"),I=j("Date"),R=j("RegExp"),D=j("Error"),M=j("Symbol"),N=j("ArrayBuffer");var B=j("Function"),U=o.document&&o.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof U&&(B=function(e){return"function"==typeof e||!1});const F=B,V=j("Object");var H=d&&V(new DataView(new ArrayBuffer(8))),q="undefined"!=typeof Map&&V(new Map),z=j("DataView");const W=H?function(e){return null!=e&&F(e.getInt8)&&N(e.buffer)}:z,G=y||j("Array");function $(e,t){return null!=e&&h.call(e,t)}var X=j("Arguments");!function(){X(arguments)||(X=function(e){return $(e,"callee")})}();const K=X;function Y(e){return!M(e)&&_(e)&&!isNaN(parseFloat(e))}function Q(e){return A(e)&&b(e)}function J(e){return function(){return e}}function Z(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=S}}function ee(e){return function(t){return null==t?void 0:t[e]}}const te=ee("byteLength"),ne=Z(te);var re=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const ie=p?function(e){return g?g(e)&&!W(e):ne(e)&&re.test(f.call(e))}:J(!1),oe=ee("length");function ae(e,t){t=function(e){for(var t={},n=e.length,r=0;r<n;++r)t[e[r]]=!0;return{contains:function(e){return!0===t[e]},push:function(n){return t[n]=!0,e.push(n)}}}(t);var n=T.length,r=e.constructor,i=F(r)&&r.prototype||s,o="constructor";for($(e,o)&&!t.contains(o)&&t.push(o);n--;)(o=T[n])in e&&e[o]!==i[o]&&!t.contains(o)&&t.push(o)}function se(e){if(!k(e))return[];if(v)return v(e);var t=[];for(var n in e)$(e,n)&&t.push(n);return w&&ae(e,t),t}function ue(e){if(null==e)return!0;var t=oe(e);return"number"==typeof t&&(G(e)||L(e)||K(e))?0===t:0===oe(se(e))}function ce(e,t){var n=se(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0}function le(e){return e instanceof le?e:this instanceof le?void(this._wrapped=e):new le(e)}function fe(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,te(e))}le.VERSION=i,le.prototype.value=function(){return this._wrapped},le.prototype.valueOf=le.prototype.toJSON=le.prototype.value,le.prototype.toString=function(){return String(this._wrapped)};var he="[object DataView]";function pe(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&de(e,t,n,r)}function de(e,t,n,r){e instanceof le&&(e=e._wrapped),t instanceof le&&(t=t._wrapped);var i=f.call(e);if(i!==f.call(t))return!1;if(H&&"[object Object]"==i&&W(e)){if(!W(t))return!1;i=he}switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return u.valueOf.call(e)===u.valueOf.call(t);case"[object ArrayBuffer]":case he:return de(fe(e),fe(t),n,r)}var o="[object Array]"===i;if(!o&&ie(e)){if(te(e)!==te(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;o=!0}if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(F(a)&&a instanceof a&&F(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var c=(n=n||[]).length;c--;)if(n[c]===e)return r[c]===t;if(n.push(e),r.push(t),o){if((c=e.length)!==t.length)return!1;for(;c--;)if(!pe(e[c],t[c],n,r))return!1}else{var l,h=se(e);if(c=h.length,se(t).length!==c)return!1;for(;c--;)if(!$(t,l=h[c])||!pe(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0}function ye(e,t){return pe(e,t)}function ve(e){if(!k(e))return[];var t=[];for(var n in e)t.push(n);return w&&ae(e,t),t}function me(e){var t=oe(e);return function(n){if(null==n)return!1;var r=ve(n);if(oe(r))return!1;for(var i=0;i<t;i++)if(!F(n[e[i]]))return!1;return e!==Te||!F(n[ge])}}var ge="forEach",be=["clear","delete"],_e=["get","has","set"],we=be.concat(ge,_e),Te=be.concat(_e),Se=["add"].concat(be,ge,"has");const Ee=q?me(we):j("Map"),ke=q?me(Te):j("WeakMap"),Oe=q?me(Se):j("Set"),Ce=j("WeakSet");function Pe(e){for(var t=se(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r}function xe(e){for(var t=se(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r}function je(e){for(var t={},n=se(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t}function Le(e){var t=[];for(var n in e)F(e[n])&&t.push(n);return t.sort()}function Ae(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,u=0;u<s;u++){var c=a[u];t&&void 0!==n[c]||(n[c]=o[c])}return n}}const Ie=Ae(ve),Re=Ae(se),De=Ae(ve,!0);function Me(e){if(!k(e))return{};if(m)return m(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}function Ne(e,t){var n=Me(e);return t&&Re(n,t),n}function Be(e){return k(e)?G(e)?e.slice():Ie({},e):e}function Ue(e,t){return t(e),e}function Fe(e){return G(e)?e:[e]}function Ve(e){return le.toPath(e)}function He(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0}function qe(e,t,n){var r=He(e,Ve(t));return C(r)?n:r}function ze(e,t){for(var n=(t=Ve(t)).length,r=0;r<n;r++){var i=t[r];if(!$(e,i))return!1;e=e[i]}return!!n}function We(e){return e}function Ge(e){return e=Re({},e),function(t){return ce(t,e)}}function $e(e){return e=Ve(e),function(t){return He(t,e)}}function Xe(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}function Ke(e,t,n){return null==e?We:F(e)?Xe(e,t,n):k(e)&&!G(e)?Ge(e):$e(e)}function Ye(e,t){return Ke(e,t,1/0)}function Qe(e,t,n){return le.iteratee!==Ye?le.iteratee(e,t):Ke(e,t,n)}function Je(e,t,n){t=Qe(t,n);for(var r=se(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o}function Ze(){}function et(e){return null==e?Ze:function(t){return qe(e,t)}}function tt(e,t,n){var r=Array(Math.max(0,e));t=Xe(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r}function nt(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}le.toPath=Fe,le.iteratee=Ye;const rt=Date.now||function(){return(new Date).getTime()};function it(e){var t=function(t){return e[t]},n="(?:"+se(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}}const ot={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},at=it(ot),st=it(je(ot)),ut=le.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var ct=/(.)^/,lt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ft=/\\|'|\r|\n|\u2028|\u2029/g;function ht(e){return"\\"+lt[e]}var pt=/^\s*(\w|\$)+\s*$/;function dt(e,t,n){!t&&n&&(t=n),t=De({},t,le.templateSettings);var r=RegExp([(t.escape||ct).source,(t.interpolate||ct).source,(t.evaluate||ct).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,(function(t,n,r,a,s){return o+=e.slice(i,s).replace(ft,ht),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t})),o+="';\n";var a,s=t.variable;if(s){if(!pt.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(e){throw e.source=o,e}var u=function(e){return a.call(this,e,le)};return u.source="function("+s+"){\n"+o+"}",u}function yt(e,t,n){var r=(t=Ve(t)).length;if(!r)return F(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=F(o)?o.call(e):o}return e}var vt=0;function mt(e){var t=++vt+"";return e?e+t:t}function gt(e){var t=le(e);return t._chain=!0,t}function bt(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=Me(e.prototype),a=e.apply(o,i);return k(a)?a:o}var _t=E((function(e,t){var n=_t.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return bt(e,r,this,this,a)};return r}));_t.placeholder=le;const wt=_t,Tt=E((function(e,t,n){if(!F(e))throw new TypeError("Bind must be called on a function");var r=E((function(i){return bt(e,r,t,this,n.concat(i))}));return r})),St=Z(oe);function Et(e,t,n,r){if(r=r||[],t||0===t){if(t<=0)return r.concat(e)}else t=1/0;for(var i=r.length,o=0,a=oe(e);o<a;o++){var s=e[o];if(St(s)&&(G(s)||K(s)))if(t>1)Et(s,t-1,n,r),i=r.length;else for(var u=0,c=s.length;u<c;)r[i++]=s[u++];else n||(r[i++]=s)}return r}const kt=E((function(e,t){var n=(t=Et(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=Tt(e[r],e)}return e}));function Ot(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return $(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n}const Ct=E((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})),Pt=wt(Ct,le,1);function xt(e,t,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!1===n.leading?0:rt(),r=null,a=e.apply(i,o),r||(i=o=null)},c=function(){var c=rt();s||!1!==n.leading||(s=c);var l=t-(c-s);return i=this,o=arguments,l<=0||l>t?(r&&(clearTimeout(r),r=null),s=c,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,l)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c}function jt(e,t,n){var r,i,o,a,s,u=function(){var c=rt()-i;t>c?r=setTimeout(u,t-c):(r=null,n||(a=e.apply(s,o)),r||(o=s=null))},c=E((function(c){return s=this,o=c,i=rt(),r||(r=setTimeout(u,t),n&&(a=e.apply(s,o))),a}));return c.cancel=function(){clearTimeout(r),r=o=s=null},c}function Lt(e,t){return wt(t,e)}function At(e){return function(){return!e.apply(this,arguments)}}function It(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function Rt(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function Dt(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}const Mt=wt(Dt,2);function Nt(e,t,n){t=Qe(t,n);for(var r,i=se(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r}function Bt(e){return function(t,n,r){n=Qe(n,r);for(var i=oe(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}}const Ut=Bt(1),Ft=Bt(-1);function Vt(e,t,n,r){for(var i=(n=Qe(n,r,1))(t),o=0,a=oe(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o}function Ht(e,t,n){return function(r,i,o){var a=0,s=oe(r);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(l.call(r,a,s),Q))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(r[o]===i)return o;return-1}}const qt=Ht(1,Ut,Vt),zt=Ht(-1,Ft);function Wt(e,t,n){var r=(St(e)?Ut:Nt)(e,t,n);if(void 0!==r&&-1!==r)return e[r]}function Gt(e,t){return Wt(e,Ge(t))}function $t(e,t,n){var r,i;if(t=Xe(t,n),St(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=se(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e}function Xt(e,t,n){t=Qe(t,n);for(var r=!St(e)&&se(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o}function Kt(e){return function(t,n,r,i){var o=arguments.length>=3;return function(t,n,r,i){var o=!St(t)&&se(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var u=o?o[s]:s;r=n(r,t[u],u,t)}return r}(t,Xe(n,i,4),r,o)}}const Yt=Kt(1),Qt=Kt(-1);function Jt(e,t,n){var r=[];return t=Qe(t,n),$t(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function Zt(e,t,n){return Jt(e,At(Qe(t)),n)}function en(e,t,n){t=Qe(t,n);for(var r=!St(e)&&se(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0}function tn(e,t,n){t=Qe(t,n);for(var r=!St(e)&&se(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1}function nn(e,t,n,r){return St(e)||(e=Pe(e)),("number"!=typeof n||r)&&(n=0),qt(e,t,n)>=0}const rn=E((function(e,t,n){var r,i;return F(t)?i=t:(t=Ve(t),r=t.slice(0,-1),t=t[t.length-1]),Xt(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=He(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))}));function on(e,t){return Xt(e,$e(t))}function an(e,t){return Jt(e,Ge(t))}function sn(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=St(e)?e:Pe(e)).length;s<u;s++)null!=(r=e[s])&&r>o&&(o=r);else t=Qe(t,n),$t(e,(function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o}function un(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=St(e)?e:Pe(e)).length;s<u;s++)null!=(r=e[s])&&r<o&&(o=r);else t=Qe(t,n),$t(e,(function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)}));return o}var cn=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function ln(e){return e?G(e)?l.call(e):L(e)?e.match(cn):St(e)?Xt(e,We):Pe(e):[]}function fn(e,t,n){if(null==t||n)return St(e)||(e=Pe(e)),e[nt(e.length-1)];var r=ln(e),i=oe(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=nt(a,o),u=r[a];r[a]=r[s],r[s]=u}return r.slice(0,t)}function hn(e){return fn(e,1/0)}function pn(e,t,n){var r=0;return t=Qe(t,n),on(Xt(e,(function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),"value")}function dn(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=Qe(r,i),$t(n,(function(t,i){var a=r(t,i,n);e(o,t,a)})),o}}const yn=dn((function(e,t,n){$(e,n)?e[n].push(t):e[n]=[t]})),vn=dn((function(e,t,n){e[n]=t})),mn=dn((function(e,t,n){$(e,n)?e[n]++:e[n]=1})),gn=dn((function(e,t,n){e[n?0:1].push(t)}),!0);function bn(e){return null==e?0:St(e)?e.length:se(e).length}function _n(e,t,n){return t in n}const wn=E((function(e,t){var n={},r=t[0];if(null==e)return n;F(r)?(t.length>1&&(r=Xe(r,t[1])),t=ve(e)):(r=_n,t=Et(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n})),Tn=E((function(e,t){var n,r=t[0];return F(r)?(r=At(r),t.length>1&&(n=t[1])):(t=Xt(Et(t,!1,!1),String),r=function(e,n){return!nn(t,n)}),wn(e,r,n)}));function Sn(e,t,n){return l.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function En(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:Sn(e,e.length-t)}function kn(e,t,n){return l.call(e,null==t||n?1:t)}function On(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:kn(e,Math.max(0,e.length-t))}function Cn(e){return Jt(e,Boolean)}function Pn(e,t){return Et(e,t,!1)}const xn=E((function(e,t){return t=Et(t,!0,!0),Jt(e,(function(e){return!nn(t,e)}))})),jn=E((function(e,t){return xn(e,t)}));function Ln(e,t,n,r){P(t)||(r=n,n=t,t=!1),null!=n&&(n=Qe(n,r));for(var i=[],o=[],a=0,s=oe(e);a<s;a++){var u=e[a],c=n?n(u,a,e):u;t&&!n?(a&&o===c||i.push(u),o=c):n?nn(o,c)||(o.push(c),i.push(u)):nn(i,u)||i.push(u)}return i}const An=E((function(e){return Ln(Et(e,!0,!0))}));function In(e){for(var t=[],n=arguments.length,r=0,i=oe(e);r<i;r++){var o=e[r];if(!nn(t,o)){var a;for(a=1;a<n&&nn(arguments[a],o);a++);a===n&&t.push(o)}}return t}function Rn(e){for(var t=e&&sn(e,oe).length||0,n=Array(t),r=0;r<t;r++)n[r]=on(e,r);return n}const Dn=E(Rn);function Mn(e,t){for(var n={},r=0,i=oe(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n}function Nn(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i}function Bn(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(l.call(e,r,r+=t));return n}function Un(e,t){return e._chain?le(t).chain():t}function Fn(e){return $t(Le(e),(function(t){var n=le[t]=e[t];le.prototype[t]=function(){var e=[this._wrapped];return c.apply(e,arguments),Un(this,n.apply(le,e))}})),le}$t(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=a[e];le.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),Un(this,n)}})),$t(["concat","join","slice"],(function(e){var t=a[e];le.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),Un(this,e)}}));const Vn=le;var Hn=Fn(r);Hn._=Hn;const qn=Hn}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";n.r(r),n.d(r,{Player:()=>Ij}),n(11602);var e=n(51562),t=n.n(e),i=n(3384),o=n.n(i);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}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,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}var l=n(8004),f=n.n(l),h=n(19389),p=n.n(h),d=n(68942),y=n.n(d),v=n(83983),m=n.n(v);function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}var b=n(31336),_=n.n(b);const w=function(e,n){if(/^[a-z]+:/i.test(n))return n;/^data:/.test(e)&&(e=t().location&&t().location.href||"");var r="function"==typeof t().URL,i=/^\/\//.test(e),o=!t().location&&!/\/\//i.test(e);if(r?e=new(t().URL)(e,t().location||"http://example.com"):/\/\//i.test(e)||(e=_().buildAbsoluteURL(t().location&&t().location.href||"",e)),r){var a=new URL(n,e);return o?a.href.slice(18):i?a.href.slice(a.protocol.length):a.href}return _().buildAbsoluteURL(e,n)};var T=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),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();function S(e){for(var n=function(e){return t().atob?t().atob(e):Buffer.from(e,"base64").toString("binary")}(e),r=new Uint8Array(n.length),i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}var E,k=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return c(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}(T),O=String.fromCharCode(9),C=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},P=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}c(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=a(C(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 o=P(t[1]);o.URI&&(n.uri=o.URI),o.BYTERANGE&&(n.byterange=C(o.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=P(t[1]),n.attributes.RESOLUTION){var s=n.attributes.RESOLUTION.split("x"),u={};s[0]&&(u.width=parseInt(s[0],10)),s[1]&&(u.height=parseInt(s[1],10)),n.attributes.RESOLUTION=u}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=P(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=P(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=P(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=P(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(O)),void r.trigger("data",n);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part"}).attributes=P(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=C(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=P(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=P(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=P(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=P(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,o=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:o}),!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}(T),j=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},L=function(e){var t=e.serverControl,n=e.targetDuration,r=e.partTargetDuration;if(t){var i="#EXT-X-SERVER-CONTROL",o="holdBack",a="partHoldBack",s=n&&3*n,u=r&&2*r;n&&!t.hasOwnProperty(o)&&(t[o]=s,this.trigger("info",{message:i+" defaulting HOLD-BACK to targetDuration * 3 ("+s+")."})),s&&t[o]<s&&(this.trigger("warn",{message:i+" clamping HOLD-BACK ("+t[o]+") to targetDuration * 3 ("+s+")"}),t[o]=s),r&&!t.hasOwnProperty(a)&&(t[a]=3*r,this.trigger("info",{message:i+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[a]+")."})),r&&t[a]<u&&(this.trigger("warn",{message:i+" clamping PART-HOLD-BACK ("+t[a]+") to partTargetDuration * 2 ("+u+")."}),t[a]=u)}},A=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new k,t.parseStream=new x,t.lineStream.pipe(t.parseStream);var n,r,i=s(t),o=[],u={},c=!1,l=function(){},f={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},h=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var p=0,d=0;return t.on("end",(function(){u.uri||!u.parts&&!u.preloadHints||(!u.map&&n&&(u.map=n),!u.key&&r&&(u.key=r),u.timeline||"number"!=typeof h||(u.timeline=h),t.manifest.preloadSegment=u)})),t.parseStream.on("data",(function(e){var t,s;({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&&(u.byterange=t,t.length=e.length,"offset"in e||(e.offset=p)),"offset"in e&&(u.byterange=t,t.offset=e.offset),p=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&&(u.duration=e.duration),0===e.duration&&(u.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},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:S(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,h=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=o,this.manifest.mediaGroups=this.manifest.mediaGroups||f,e.attributes?(u.attributes||(u.attributes={}),a(u.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||f,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"]],(s={default:/yes/i.test(e.attributes.DEFAULT)}).default?s.autoselect=!0:s.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(s.language=e.attributes.LANGUAGE),e.attributes.URI&&(s.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(s.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(s.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(s.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=s}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){h+=1,u.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),u.dateTimeString=e.dateTimeString,u.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,L.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(){u.cueOut=e.data},"cue-out-cont":function(){u.cueOutCont=e.data},"cue-in":function(){u.cueIn=e.data},skip:function(){this.manifest.skip=j(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;c=!0;var n=this.manifest.segments.length,r=j(e.attributes);u.parts=u.parts||[],u.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=d),d=r.byterange.offset+r.byterange.length);var i=u.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=j(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),L.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=j(e.attributes),r=n.type&&"PART"===n.type;u.preloadHints=u.preloadHints||[],u.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=r?d:0,r&&(d=n.byterange.offset+n.byterange.length)));var i=u.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var o=0;o<u.preloadHints.length-1;o++){var a=u.preloadHints[o];a.type&&a.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+o})}},"rendition-report":function(){var t=j(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];c&&r.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,r)},"part-inf":function(){this.manifest.partInf=j(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),L.call(this,this.manifest)}}[e.tagType]||l).call(i)},uri:function(){u.uri=e.uri,o.push(u),this.manifest.targetDuration&&!("duration"in u)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),u.duration=this.manifest.targetDuration),r&&(u.key=r),u.timeline=h,n&&(u.map=n),d=0,u={}},comment:function(){},custom:function(){e.segment?(u.custom=u.custom||{},u.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}c(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}(T),I={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^/},R=["video","audio","text"],D=["Video","Audio","Text"],M=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},N=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),R.forEach((function(r){var i=I[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var o=e.substring(0,i[1].length),a=e.replace(o,"");n.push({type:o,details:a,mediaType:r})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},B=function(e){return void 0===e&&(e=""),I.audio.test(e.trim().toLowerCase())},U=function(e){if(e&&"string"==typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return M(e.trim())})),r="video";1===n.length&&B(n[0])?r="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),I.text.test(t.trim().toLowerCase()))&&(r="application");var i="mp4";return n.every((function(e){return I.mp4.test(e)}))?i="mp4":n.every((function(e){return I.webm.test(e)}))?i="webm":n.every((function(e){return I.ogg.test(e)}))&&(i="ogg"),r+"/"+i+';codecs="'+e+'"'}},F=function(e){return void 0===e&&(e=""),t().MediaSource&&t().MediaSource.isTypeSupported&&t().MediaSource.isTypeSupported(U(e))||!1},V=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<D.length;t++)if(I["muxer"+D[t]].test(e))return!0;return!1}))},H="mp4a.40.2",q=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,z=/^application\/dash\+xml/i,W=function(e){return q.test(e)?"hls":z.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},G=n(73668),X=function(e){return!!e&&"object"==typeof e},K=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]):X(t[r])&&X(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},Y=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},Q=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},J=function(e){var t=e.baseUrl,n=void 0===t?"":t,r=e.source,i=void 0===r?"":r,o=e.range,a=void 0===o?"":o,s=e.indexRange,u=void 0===s?"":s,c={uri:i,resolvedUri:w(n||"",i)};if(a||u){var l=(a||u).split("-"),f=parseInt(l[0],10),h=parseInt(l[1],10);c.byterange={length:h-f+1,offset:f}}return c},Z=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},ee={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration,o=Z(e.endNumber);return{start:0,end:"number"==typeof o?o:Math.ceil(i/(t/r))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,o=void 0===i?1:i,a=e.duration,s=e.start,u=void 0===s?0:s,c=e.minimumUpdatePeriod,l=void 0===c?0:c,f=e.timeShiftBufferDepth,h=void 0===f?1/0:f,p=Z(e.endNumber),d=(t+n)/1e3,y=r+u,v=d+l-y,m=Math.ceil(v*o/a),g=Math.floor((d-y-h)*o/a),b=Math.floor((d-y)*o/a);return{start:Math.max(0,g),end:"number"==typeof p?p:Math.min(m,b)}}},te=function(e){var t=e.type,n=void 0===t?"static":t,r=e.duration,i=e.timescale,o=void 0===i?1:i,a=e.sourceDuration,s=ee[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,o=void 0===i?1:i,a=e.periodIndex,s=e.startNumber;return{number:(void 0===s?1:s)+t,duration:r/o,timeline:a,time:n*r}}}(e));if("static"===n){var c=u.length-1;u[c].duration=a-r/o*c}return u},ne=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,o=e.indexRange,a=void 0===o?"":o,s=e.duration;if(!t)throw new Error("NO_BASE_URL");var u=J({baseUrl:t,source:r.sourceURL,range:r.range}),c=J({baseUrl:t,source:t,indexRange:a});if(c.map=u,s){var l=te(e);l.length&&(c.duration=l[0].duration,c.timeline=l[0].timeline)}else i&&(c.duration=i,c.timeline=0);return c.number=0,[c]},re=function(e,t,n){for(var r=e.sidx.map?e.sidx.map:null,i=e.sidx.duration,o=e.timeline||0,a=e.sidx.byterange,s=a.offset+a.length,u=t.timescale,c=t.references.filter((function(e){return 1!==e.referenceType})),l=[],f=s+t.firstOffset,h=0;h<c.length;h++){var p=t.references[h],d=p.referencedSize,y=p.subsegmentDuration,v=ne({baseUrl:n,timescale:u,timeline:o,periodIndex:o,duration:y,sourceDuration:i,indexRange:f+"-"+(f+d-1)})[0];r&&(v.map=r),l.push(v),f+=d}return e.segments=l,e},ie=function(e){return e&&e.uri+"-"+(n=(t=e.byterange).offset+t.length-1,t.offset+"-"+n);var t,n},oe=function(e){var t=function(e){return Object.keys(e).map((function(t){return e[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}),{}));return t.map((function(e){var t;return e.discontinuityStarts=(t=e.segments,t.reduce((function(e,t,n){return t.discontinuity&&e.push(n),e}),[])),e}))},ae=function(e,t){var n=ie(e.sidx),r=n&&t[n]&&t[n].sidx;return r&&re(e,r,e.sidx.resolvedUri),e},se=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=ae(e[n],t);return e},ue=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,o={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&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},ce=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},le=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},fe=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},he=function(e,t,n){var r=e.NOW,i=e.clientOffset,o=e.availabilityStartTime,a=e.timescale,s=void 0===a?1:a,u=e.start,c=void 0===u?0:u,l=e.minimumUpdatePeriod,f=(r+i)/1e3+(void 0===l?0:l)-(o+c);return Math.ceil((f*s-t)/n)},pe=function(e,t){for(var n=e.type,r=void 0===n?"static":n,i=e.minimumUpdatePeriod,o=void 0===i?0:i,a=e.media,s=void 0===a?"":a,u=e.sourceDuration,c=e.timescale,l=void 0===c?1:c,f=e.startNumber,h=void 0===f?1:f,p=e.periodIndex,d=[],y=-1,v=0;v<t.length;v++){var m=t[v],g=m.d,b=m.r||0,_=m.t||0;y<0&&(y=_),_&&_>y&&(y=_);var w=void 0;if(b<0){var T=v+1;w=T===t.length?"dynamic"===r&&o>0&&s.indexOf("$Number$")>0?he(e,y,g):(u*l-y)/g:(t[T].t-y)/g}else w=b+1;for(var S=h+d.length+w,E=h+d.length;E<S;)d.push({number:E,duration:g/l,time:y,timeline:p}),y+=g,E++}return d},de=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ye=function(e,t){return e.replace(de,function(e){return function(t,n,r,i){if("$$"===t)return"$";if(void 0===e[n])return t;var o=""+e[n];return"RepresentationID"===n?o:(i=r?parseInt(i,10):1,o.length>=i?o:""+new Array(i-o.length+1).join("0")+o)}}(t))},ve=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,i=void 0===r?{sourceURL:"",range:""}:r,o=J({baseUrl:e.baseUrl,source:ye(i.sourceURL,n),range:i.range}),a=function(e,t){return e.duration||t?e.duration?te(e):pe(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t);return a.map((function(t){n.Number=t.number,n.Time=t.time;var r=ye(e.media||"",n),i={uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:w(e.baseUrl||"",r),map:o,number:t.number};return e.presentationTimeOffset&&(i.presentationTimeOffset=e.presentationTimeOffset),i}))},me=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r;if(!n&&!t||n&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");var o,a=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,o=J({baseUrl:n,source:i.sourceURL,range:i.range}),a=J({baseUrl:n,source:t.media,range:t.mediaRange});return a.map=o,a}(e,t)}));return n&&(o=te(e)),t&&(o=pe(e,t)),o.map((function(e,t){if(a[t]){var n=a[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}})).filter((function(e){return e}))},ge=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=ve,t=K(r,i.template),i.template.presentationTimeOffset&&(t.presentationTimeOffset=i.template.presentationTimeOffset/i.template.timescale)):i.base?(n=ne,t=K(r,i.base)):i.list&&(n=me,t=K(r,i.list));var o={attributes:r};if(!n)return o;var a=n(t,i.timeline);if(t.duration){var s=t,u=s.duration,c=s.timescale,l=void 0===c?1:c;t.duration=u/l}else a.length?t.duration=a.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return o.attributes=t,o.segments=a,i.base&&t.indexRange&&(o.sidx=a[0],o.segments=[]),o},be=function(e,t){return Q(e.childNodes).filter((function(e){return e.tagName===t}))},_e=function(e){return e.textContent.trim()},we=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],o=n[2],a=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(o||0)+3600*parseFloat(a||0)+60*parseFloat(s||0)+parseFloat(u||0)},Te={mediaPresentationDuration:function(e){return we(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 we(e)},suggestedPresentationDelay:function(e){return we(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return we(e)},start:function(e){return we(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)?we(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}},Se=function(e){return e&&e.attributes?Q(e.attributes).reduce((function(e,t){var n=Te[t.name]||Te.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},Ee={"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"},ke=function(e,t){return t.length?Y(e.map((function(e){return t.map((function(t){return w(e,_e(t))}))}))):e},Oe=function(e){var t=be(e,"SegmentTemplate")[0],n=be(e,"SegmentList")[0],r=n&&be(n,"SegmentURL").map((function(e){return K({tag:"SegmentURL"},Se(e))})),i=be(e,"SegmentBase")[0],o=n||t,a=o&&be(o,"SegmentTimeline")[0],s=n||i||t,u=s&&be(s,"Initialization")[0],c=t&&Se(t);c&&u?c.initialization=u&&Se(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var l={template:c,timeline:a&&be(a,"S").map((function(e){return Se(e)})),list:n&&K(Se(n),{segmentUrls:r,initialization:Se(u)}),base:i&&K(Se(i),{initialization:Se(u)})};return Object.keys(l).forEach((function(e){l[e]||delete l[e]})),l},Ce=function(e,n){return function(r,i){var o=ke(n,be(r,"BaseURL")),a=Se(r),s=parseInt(a.id,10),u=t().isNaN(s)?i:s,c=K(e,{periodIndex:u}),l=be(r,"AdaptationSet"),f=Oe(r);return Y(l.map(function(e,t,n){return function(r){var i=Se(r),o=ke(t,be(r,"BaseURL")),a=be(r,"Role")[0],s={role:Se(a)},u=K(e,i,s),c=be(r,"Label")[0];if(c&&c.childNodes.length){var l=c.childNodes[0].nodeValue.trim();u=K(u,{label:l})}var f=be(r,"ContentProtection").reduce((function(e,t){var n=Se(t),r=Ee[n.schemeIdUri];if(r){e[r]={attributes:n};var i=be(t,"cenc:pssh")[0];if(i){var o=_e(i),a=o&&S(o);e[r].pssh=a}}return e}),{});Object.keys(f).length&&(u=K(u,{contentProtection:f}));var h=Oe(r),p=be(r,"Representation"),d=K(n,h);return Y(p.map(function(e,t,n){return function(r){var i=be(r,"BaseURL"),o=ke(t,i),a=K(e,Se(r)),s=Oe(r);return o.map((function(e){return{segmentInfo:K(n,s),attributes:K(a,{baseUrl:e})}}))}}(u,o,d)))}}(c,o,f)))}},Pe=function(e){if(""===e)throw new Error("DASH_EMPTY_MANIFEST");var t,n,r=new G.a;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("DASH_INVALID_XML");return n},xe=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,o=n.NOW,a=void 0===o?Date.now():o,s=n.clientOffset,u=void 0===s?0:s,c=be(e,"Period");if(!c.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var l=be(e,"Location"),f=Se(e),h=ke([i],be(e,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=a,f.clientOffset=u,l.length&&(f.locations=l.map(_e)),{locations:f.locations,representationInfo:Y(c.map(Ce(f,h)))}}(Pe(e),t);return function(e,t,n){var r;if(void 0===n&&(n={}),!e.length)return{};var i=e[0].attributes,o=i.sourceDuration,a=i.type,s=void 0===a?"static":a,u=i.suggestedPresentationDelay,c=i.minimumUpdatePeriod,l=oe(e.filter(ce)).map(ue),f=oe(e.filter(le)),h=e.filter(fe),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:o,playlists:se(l,n)};c>=0&&(p.minimumUpdatePeriod=1e3*c),t&&(p.locations=t),"dynamic"===s&&(p.suggestedPresentationDelay=u);var d=0===p.playlists.length;return f.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 o=i.attributes.role&&i.attributes.role.value||"",a=i.attributes.lang||"",s=i.attributes.label||"main";if(a&&!i.attributes.label){var u=o?" ("+o+")":"";s=""+i.attributes.lang+u}e[s]||(e[s]={language:a,autoselect:!0,default:"main"===o,playlists:[],uri:""});var c=ae(function(e,t){var n,r=e.attributes,i=e.segments,o=e.sidx,a={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&&(a.contentProtection=r.contentProtection),o&&(a.sidx=o),t&&(a.attributes.AUDIO="audio",a.attributes.SUBTITLES="subs"),a}(i,n),t);return e[s].playlists.push(c),void 0===r&&"main"===o&&((r=i).default=!0),e}),{});return r||(i[Object.keys(i)[0]].default=!0),i}(f,n,d)),h.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(ae(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}),{})}(h,n)),p}(n.representationInfo.map(ge),n.locations,t.sidxMapping)},je=n(57258),Le=n.n(je),Ae=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer}(e)||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))},Ie=t().BigInt||Number,Re=[Ie("0x1"),Ie("0x100"),Ie("0x10000"),Ie("0x1000000"),Ie("0x100000000"),Ie("0x10000000000"),Ie("0x1000000000000"),Ie("0x100000000000000"),Ie("0x10000000000000000")],De=(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,o=n.le,a=void 0!==o&&o;e=Ae(e);var s=a?"reduce":"reduceRight",u=(e[s]?e[s]:Array.prototype[s]).call(e,(function(t,n,r){var i=a?r:Math.abs(r+1-e.length);return t+Ie(n)*Re[i]}),Ie(0));if(i){var c=Re[e.length]/Ie(2)-Ie(1);(u=Ie(u))>c&&(u-=c,u-=c,u-=Ie(2))}return Number(u)}),Me=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},Ne=function(e,t,n){var r=void 0===n?{}:n,i=r.offset,o=void 0===i?0:i,a=r.mask,s=void 0===a?[]:a;e=Ae(e);var u=(t=Ae(t)).every?t.every:Array.prototype.every;return t.length&&e.length-o>=t.length&&u.call(t,(function(t,n){return t===(s[n]?s[n]&e[o+n]:e[o+n])}))},Be=Ae([73,68,51]),Ue=function e(t,n){return void 0===n&&(n=0),(t=Ae(t)).length-n<10||!Ne(t,Be,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Ae(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))},Fe=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?Me(e):e}),Ve=function(e){e=Ae(e);for(var t=[],n=0;e.length>n;){var r=e[n],i=0,o=0,a=e[++o];for(o++;128&a;)i=(127&a)<<7,a=e[o],o++;i+=127&a;for(var s=0;s<E.length;s++){var u=E[s],c=u.id,l=u.parser;if(r===c){t.push(l(e.subarray(o,o+i)));break}}n+=i+o}return t};E=[{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=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,Ae(e));try{return decodeURIComponent(escape(t))}catch(e){}return t}(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=Ve(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:Ve(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var He=function e(t,n,r){void 0===r&&(r=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return Fe(e)})):[Fe(e)]}(n),t=Ae(t);var i=[];if(!n.length)return i;for(var o=0;o<t.length;){var a=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])>>>0,s=t.subarray(o+4,o+8);if(0===a)break;var u=o+a;if(u>t.length){if(r)break;u=t.length}var c=t.subarray(o+8,u);Ne(s,n[0])&&(1===n.length?i.push(c):i.push.apply(i,e(c,n.slice(1),r))),o=u}return i},qe={EBML:Ae([26,69,223,163]),DocType:Ae([66,130]),Segment:Ae([24,83,128,103]),SegmentInfo:Ae([21,73,169,102]),Tracks:Ae([22,84,174,107]),Track:Ae([174]),TrackNumber:Ae([215]),DefaultDuration:Ae([35,227,131]),TrackEntry:Ae([174]),TrackType:Ae([131]),FlagDefault:Ae([136]),CodecID:Ae([134]),CodecPrivate:Ae([99,162]),VideoTrack:Ae([224]),AudioTrack:Ae([225]),Cluster:Ae([31,67,182,117]),Timestamp:Ae([231]),TimestampScale:Ae([42,215,177]),BlockGroup:Ae([160]),BlockDuration:Ae([155]),Block:Ae([161]),SimpleBlock:Ae([163])},ze=[128,64,32,16,8,4,2,1],We=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<ze.length&&!(e&ze[n]);n++)t++;return t}(e[t]),o=e.subarray(t,t+i);return n&&((o=Array.prototype.slice.call(e,t,t+i))[0]^=ze[i-1]),{length:i,value:De(o,{signed:r}),bytes:o}},Ge=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?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);for(var i,o=(i=e=Ie(e),Math.ceil(function(e){return e.toString(2).length}(i)/8)),a=new Uint8Array(new ArrayBuffer(o)),s=0;s<o;s++){var u=r?s:Math.abs(s+1-a.length);a[u]=Number(e/Re[s]&Ie(255)),e<0&&(a[u]=Math.abs(~a[u]),a[u]-=0===s?1:2)}return a}(t):t},$e=function e(t,n,r){if(r>=n.length)return n.length;var i=We(n,r,!1);if(Ne(t.bytes,i.bytes))return r;var o=We(n,r+i.length);return e(t,n,r+o.length+o.value+i.length)},Xe=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return Ge(e)})):[Ge(e)]}(n),t=Ae(t);var r=[];if(!n.length)return r;for(var i=0;i<t.length;){var o=We(t,i,!1),a=We(t,i+o.length),s=i+o.length+a.length;127===a.value&&(a.value=$e(o,t,s),a.value!==t.length&&(a.value-=s));var u=s+a.value>t.length?t.length:s+a.value,c=t.subarray(s,u);Ne(n[0],o.bytes)&&(1===n.length?r.push(c):r=r.concat(e(c,n.slice(1)))),i+=o.length+a.length+c.length}return r},Ke=Ae([0,0,0,1]),Ye=Ae([0,0,1]),Qe=Ae([0,0,3]),Je=function(e){for(var t=[],n=1;n<e.length-2;)Ne(e.subarray(n,n+3),Qe)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var r=e.length-t.length,i=new Uint8Array(r),o=0;for(n=0;n<r;o++,n++)o===t[0]&&(o++,t.shift()),i[n]=e[o];return i},Ze=function(e,t,n,r){void 0===r&&(r=1/0),e=Ae(e),n=[].concat(n);for(var i,o=0,a=0;o<e.length&&(a<r||i);){var s=void 0;if(Ne(e.subarray(o),Ke)?s=4:Ne(e.subarray(o),Ye)&&(s=3),s){if(a++,i)return Je(e.subarray(i,o));var u=void 0;"h264"===t?u=31&e[o+s]:"h265"===t&&(u=e[o+s]>>1&63),-1!==n.indexOf(u)&&(i=o+s),o+=s+("h264"===t?1:2)}else o++}return e.subarray(0,0)},et={webm:Ae([119,101,98,109]),matroska:Ae([109,97,116,114,111,115,107,97]),flac:Ae([102,76,97,67]),ogg:Ae([79,103,103,83]),ac3:Ae([11,119]),riff:Ae([82,73,70,70]),avi:Ae([65,86,73]),wav:Ae([87,65,86,69]),"3gp":Ae([102,116,121,112,51,103]),mp4:Ae([102,116,121,112]),fmp4:Ae([115,116,121,112]),mov:Ae([102,116,121,112,113,116]),moov:Ae([109,111,111,118]),moof:Ae([109,111,111,102])},tt={aac:function(e){var t=Ue(e);return Ne(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Ue(e);return Ne(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Xe(e,[qe.EBML,qe.DocType])[0];return Ne(t,et.webm)},mkv:function(e){var t=Xe(e,[qe.EBML,qe.DocType])[0];return Ne(t,et.matroska)},mp4:function(e){return!tt["3gp"](e)&&!tt.mov(e)&&(!(!Ne(e,et.mp4,{offset:4})&&!Ne(e,et.fmp4,{offset:4}))||!(!Ne(e,et.moof,{offset:4})&&!Ne(e,et.moov,{offset:4}))||void 0)},mov:function(e){return Ne(e,et.mov,{offset:4})},"3gp":function(e){return Ne(e,et["3gp"],{offset:4})},ac3:function(e){var t=Ue(e);return Ne(e,et.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=Ue(e);return Ne(e,et.flac,{offset:t})},ogg:function(e){return Ne(e,et.ogg)},avi:function(e){return Ne(e,et.riff)&&Ne(e,et.avi,{offset:8})},wav:function(e){return Ne(e,et.riff)&&Ne(e,et.wav,{offset:8})},h264:function(e){return function(e){return Ze(e,"h264",7,3)}(e).length},h265:function(e){return function(e){return Ze(e,"h265",[32,33],3)}(e).length}},nt=Object.keys(tt).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);nt.forEach((function(e){var t=tt[e];tt[e]=function(e){return t(Ae(e))}}));for(var rt,it=tt,ot=function(e){e=Ae(e);for(var t=0;t<nt.length;t++){var n=nt[t];if(it[n](e))return n}return""},at=n(28195),st="7.12.4",ut={prefixed:!0},ct=[["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"]],lt=ct[0],ft=0;ft<ct.length;ft++)if(ct[ft][1]in o()){rt=ct[ft];break}if(rt){for(var ht=0;ht<rt.length;ht++)ut[lt[ht]]=rt[ht];ut.prefixed=rt[0]!==lt[0]}var pt=[],dt=function e(n){var r,i="info",o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r("log",i,t)};return r=function(e,n){return function(r,i,o){var a=n.levels[i],s=new RegExp("^("+a+")$");if("log"!==r&&o.unshift(r.toUpperCase()+":"),o.unshift(e+":"),pt){pt.push([].concat(o));var u=pt.length-1e3;pt.splice(0,u>0?u:0)}if(t().console){var c=t().console[r];c||"debug"!==r||(c=t().console.info||t().console.log),c&&a&&s.test(r)&&c[Array.isArray(o)?"apply":"call"](t().console,o)}}}(n,o),o.createLogger=function(t){return e(n+": "+t)},o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},o.level=function(e){if("string"==typeof e){if(!o.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');i=e}return i},(o.history=function(){return pt?[].concat(pt):[]}).filter=function(e){return(pt||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},o.history.clear=function(){pt&&(pt.length=0)},o.history.disable=function(){null!==pt&&(pt.length=0,pt=null)},o.history.enable=function(){null===pt&&(pt=[])},o.error=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r("error",i,t)},o.warn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r("warn",i,t)},o.debug=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r("debug",i,t)},o}("VIDEOJS"),yt=dt.createLogger,vt=Object.prototype.toString,mt=function(e){return _t(e)?Object.keys(e):[]};function gt(e,t){mt(e).forEach((function(n){return t(e[n],n)}))}function bt(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?a.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&gt(t,(function(t,n){e[n]=t}))})),e)}function _t(e){return!!e&&"object"==typeof e}function wt(e){return _t(e)&&"[object Object]"===vt.call(e)&&e.constructor===Object}function Tt(e,n){if(!e||!n)return"";if("function"==typeof t().getComputedStyle){var r;try{r=t().getComputedStyle(e)}catch(e){return""}return r?r.getPropertyValue(n)||r[n]:""}return""}var St,Et,kt,Ot=t().navigator&&t().navigator.userAgent||"",Ct=/AppleWebKit\/([\d.]+)/i.exec(Ot),Pt=Ct?parseFloat(Ct.pop()):null,xt=/iPod/i.test(Ot),jt=(St=Ot.match(/OS (\d+)_/i))&&St[1]?St[1]:null,Lt=/Android/i.test(Ot),At=function(){var e=Ot.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}(),It=Lt&&At<5&&Pt<537,Rt=/Firefox/i.test(Ot),Dt=/Edg/i.test(Ot),Mt=!Dt&&(/Chrome/i.test(Ot)||/CriOS/i.test(Ot)),Nt=function(){var e=Ot.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Bt=(Et=/MSIE\s(\d+)\.\d/.exec(Ot),!(kt=Et&&parseFloat(Et[1]))&&/Trident\/7.0/i.test(Ot)&&/rv:11.0/.test(Ot)&&(kt=11),kt),Ut=/Safari/i.test(Ot)&&!Mt&&!Lt&&!Dt,Ft=/Windows/i.test(Ot),Vt=Boolean(Kt()&&("ontouchstart"in t()||t().navigator.maxTouchPoints||t().DocumentTouch&&t().document instanceof t().DocumentTouch)),Ht=/iPad/i.test(Ot)||Ut&&Vt&&!/iPhone/i.test(Ot),qt=/iPhone/i.test(Ot)&&!Ht,zt=qt||Ht||xt,Wt=(Ut||zt)&&!Mt,Gt=Object.freeze({__proto__:null,IS_IPOD:xt,IOS_VERSION:jt,IS_ANDROID:Lt,ANDROID_VERSION:At,IS_NATIVE_ANDROID:It,IS_FIREFOX:Rt,IS_EDGE:Dt,IS_CHROME:Mt,CHROME_VERSION:Nt,IE_VERSION:Bt,IS_SAFARI:Ut,IS_WINDOWS:Ft,TOUCH_ENABLED:Vt,IS_IPAD:Ht,IS_IPHONE:qt,IS_IOS:zt,IS_ANY_SAFARI:Wt});function $t(e){return"string"==typeof e&&Boolean(e.trim())}function Xt(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Kt(){return o()===t().document}function Yt(e){return _t(e)&&1===e.nodeType}function Qt(){try{return t().parent!==t().self}catch(e){return!0}}function Jt(e){return function(t,n){if(!$t(t))return o()[e](null);$t(n)&&(n=o().querySelector(n));var r=Yt(n)?n:o();return r[e]&&r[e](t)}}function Zt(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=o().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(dt.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?en(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&_n(i,r),i}function en(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 nn(e,t){return Xt(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function rn(e,t){return e.classList?e.classList.add(t):nn(e,t)||(e.className=(e.className+" "+t).trim()),e}function on(e,t){return e.classList?e.classList.remove(t):(Xt(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function an(e,t,n){var r=nn(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?rn(e,t):on(e,t),e}function sn(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 un(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof e[i]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),t[i]=o}return t}function cn(e,t){return e.getAttribute(t)}function ln(e,t,n){e.setAttribute(t,n)}function fn(e,t){e.removeAttribute(t)}function hn(){o().body.focus(),o().onselectstart=function(){return!1}}function pn(){o().onselectstart=function(){return!0}}function dn(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(Tt(e,"height"))),n.width||(n.width=parseFloat(Tt(e,"width"))),n}}function yn(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!==o()[ut.fullscreenElement];)r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{left:r,top:i,width:t,height:n}}function vn(e,t){var n={x:0,y:0};if(zt)for(var r=e;r&&"html"!==r.nodeName.toLowerCase();){var i=Tt(r,"transform");if(/^matrix/.test(i)){var o=i.slice(7,-1).split(/,\s/).map(Number);n.x+=o[4],n.y+=o[5]}else if(/^matrix3d/.test(i)){var a=i.slice(9,-1).split(/,\s/).map(Number);n.x+=a[12],n.y+=a[13]}r=r.parentNode}var s={},u=yn(t.target),c=yn(e),l=c.width,f=c.height,h=t.offsetY-(c.top-u.top),p=t.offsetX-(c.left-u.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-c.left,h=t.changedTouches[0].pageY+c.top,zt&&(p-=n.x,h-=n.y)),s.y=1-Math.max(0,Math.min(1,h/f)),s.x=Math.max(0,Math.min(1,p/l)),s}function mn(e){return _t(e)&&3===e.nodeType}function gn(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function bn(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),Yt(e)||mn(e)?e:"string"==typeof e&&/\S/.test(e)?o().createTextNode(e):void 0})).filter((function(e){return e}))}function _n(e,t){return bn(t).forEach((function(t){return e.appendChild(t)})),e}function wn(e,t){return _n(gn(e),t)}function Tn(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 Sn,En=Jt("querySelector"),kn=Jt("querySelectorAll"),On=Object.freeze({__proto__:null,isReal:Kt,isEl:Yt,isInFrame:Qt,createEl:Zt,textContent:en,prependTo:tn,hasClass:nn,addClass:rn,removeClass:on,toggleClass:an,setAttributes:sn,getAttributes:un,getAttribute:cn,setAttribute:ln,removeAttribute:fn,blockTextSelection:hn,unblockTextSelection:pn,getBoundingClientRect:dn,findPosition:yn,getPointerPosition:vn,isTextNode:mn,emptyEl:gn,normalizeContent:bn,appendContent:_n,insertContent:wn,isSingleLeftClick:Tn,$:En,$$:kn}),Cn=!1,Pn=function(){if(!1!==Sn.options.autoSetup){var e=Array.prototype.slice.call(o().getElementsByTagName("video")),t=Array.prototype.slice.call(o().getElementsByTagName("audio")),n=Array.prototype.slice.call(o().getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,a=r.length;i<a;i++){var s=r[i];if(!s||!s.getAttribute){xn(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&Sn(s)}else Cn||xn(1)}};function xn(e,n){Kt()&&(n&&(Sn=n),t().setTimeout(Pn,e))}function jn(){Cn=!0,t().removeEventListener("load",jn)}Kt()&&("complete"===o().readyState?jn():t().addEventListener("load",jn));var Ln,An=function(e){var t=o().createElement("style");return t.className=e,t},In=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Rn=3;function Dn(){return Rn++}t().WeakMap||(Ln=function(){function e(){this.vdata="vdata"+Math.floor(t().performance&&t().performance.now()||Date.now()),this.data={}}var n=e.prototype;return n.set=function(e,t){var n=e[this.vdata]||Dn();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},n.get=function(e){var t=e[this.vdata];if(t)return this.data[t];dt("We have no data for this element",e)},n.has=function(e){return e[this.vdata]in this.data},n.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var Mn,Nn=t().WeakMap?new WeakMap:new Ln;function Bn(e,t){if(Nn.has(e)){var n=Nn.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&&Nn.delete(e)}}function Un(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function Fn(e){if(e.fixed_)return e;function n(){return!0}function r(){return!1}if(!e||!e.isPropagationStopped){var i=e||t().event;for(var a in e={},i)"layerX"!==a&&"layerY"!==a&&"keyLocation"!==a&&"webkitMovementX"!==a&&"webkitMovementY"!==a&&("returnValue"===a&&i.preventDefault||(e[a]=i[a]));if(e.target||(e.target=e.srcElement||o()),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){i.preventDefault&&i.preventDefault(),e.returnValue=!1,i.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),e.cancelBubble=!0,i.cancelBubble=!0,e.isPropagationStopped=n},e.isPropagationStopped=r,e.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),e.isImmediatePropagationStopped=n,e.stopPropagation()},e.isImmediatePropagationStopped=r,null!==e.clientX&&void 0!==e.clientX){var s=o().documentElement,u=o().body;e.pageX=e.clientX+(s&&s.scrollLeft||u&&u.scrollLeft||0)-(s&&s.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(s&&s.scrollTop||u&&u.scrollTop||0)-(s&&s.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 Vn=["touchstart","touchmove"];function Hn(e,n,r){if(Array.isArray(n))return Un(Hn,e,n,r);Nn.has(e)||Nn.set(e,{});var i=Nn.get(e);if(i.handlers||(i.handlers={}),i.handlers[n]||(i.handlers[n]=[]),r.guid||(r.guid=Dn()),i.handlers[n].push(r),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t,n){if(!i.disabled){t=Fn(t);var r=i.handlers[t.type];if(r)for(var o=r.slice(0),a=0,s=o.length;a<s&&!t.isImmediatePropagationStopped();a++)try{o[a].call(e,t,n)}catch(e){dt.error(e)}}}),1===i.handlers[n].length)if(e.addEventListener){var o=!1;(function(){if("boolean"!=typeof Mn){Mn=!1;try{var e=Object.defineProperty({},"passive",{get:function(){Mn=!0}});t().addEventListener("test",null,e),t().removeEventListener("test",null,e)}catch(e){}}return Mn})()&&Vn.indexOf(n)>-1&&(o={passive:!0}),e.addEventListener(n,i.dispatcher,o)}else e.attachEvent&&e.attachEvent("on"+n,i.dispatcher)}function qn(e,t,n){if(Nn.has(e)){var r=Nn.get(e);if(r.handlers){if(Array.isArray(t))return Un(qn,e,t,n);var i=function(e,t){r.handlers[t]=[],Bn(e,t)};if(void 0!==t){var o=r.handlers[t];if(o)if(n){if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);Bn(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function zn(e,t,n){var r=Nn.has(e)?Nn.get(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Fn(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)zn.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){Nn.has(t.target)||Nn.set(t.target,{});var o=Nn.get(t.target);t.target[t.type]&&(o.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),o.disabled=!1)}return!t.defaultPrevented}function Wn(e,t,n){if(Array.isArray(t))return Un(Wn,e,t,n);var r=function r(){qn(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Dn(),Hn(e,t,r)}function Gn(e,t,n){var r=function r(){qn(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Dn(),Hn(e,t,r)}var $n,Xn=Object.freeze({__proto__:null,fixEvent:Fn,on:Hn,off:qn,trigger:zn,one:Wn,any:Gn}),Kn=30,Yn=function(e,t,n){t.guid||(t.guid=Dn());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},Qn=function(e,n){var r=t().performance.now();return function(){var i=t().performance.now();i-r>=n&&(e.apply(void 0,arguments),r=i)}},Jn=function(){};Jn.prototype.allowedEvents_={},Jn.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Hn(this,e,t),this.addEventListener=n},Jn.prototype.addEventListener=Jn.prototype.on,Jn.prototype.off=function(e,t){qn(this,e,t)},Jn.prototype.removeEventListener=Jn.prototype.off,Jn.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Wn(this,e,t),this.addEventListener=n},Jn.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Gn(this,e,t),this.addEventListener=n},Jn.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Fn(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),zn(this,e)},Jn.prototype.dispatchEvent=Jn.prototype.trigger,Jn.prototype.queueTrigger=function(e){var n=this;$n||($n=new Map);var r=e.type||e,i=$n.get(this);i||(i=new Map,$n.set(this,i));var o=i.get(r);i.delete(r),t().clearTimeout(o);var a=t().setTimeout((function(){0===i.size&&(i=null,$n.delete(n)),n.trigger(e)}),0);i.set(r,a)};var Zn=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},er=function(e){return e instanceof Jn||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},tr=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},nr=function(e,t,n){if(!e||!e.nodeName&&!er(e))throw new Error("Invalid target for "+Zn(t)+"#"+n+"; must be a DOM node or evented object.")},rr=function(e,t,n){if(!tr(e))throw new Error("Invalid event type for "+Zn(t)+"#"+n+"; must be a non-empty string or array.")},ir=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+Zn(t)+"#"+n+"; must be a function.")},or=function(e,t,n){var r,i,o,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],o=t[1]):(r=t[0],i=t[1],o=t[2]),nr(r,e,n),rr(i,e,n),ir(o,e,n),{isTargetingSelf:a,target:r,type:i,listener:o=Yn(e,o)}},ar=function(e,t,n,r){nr(e,e,t),e.nodeName?Xn[t](e,n,r):e[t](n,r)},sr={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=or(this,n,"on"),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(ar(a,"on",s,u),!o){var c=function(){return e.off(a,s,u)};c.guid=u.guid;var l=function(){return e.off("dispose",c)};l.guid=u.guid,ar(this,"on","dispose",c),ar(a,"on","dispose",l)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=or(this,n,"one"),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)ar(a,"one",s,u);else{var c=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};c.guid=u.guid,ar(a,"one",s,c)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=or(this,n,"any"),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)ar(a,"any",s,u);else{var c=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};c.guid=u.guid,ar(a,"any",s,c)}},off:function(e,t,n){if(!e||tr(e))qn(this.eventBusEl_,e,t);else{var r=e,i=t;nr(r,this,"off"),rr(i,this,"off"),ir(n,this,"off"),n=Yn(this,n),this.off("dispose",n),r.nodeName?(qn(r,i,n),qn(r,"dispose",n)):er(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){nr(this.eventBusEl_,this,"trigger");var n=e&&"string"!=typeof e?e.type:e;if(!tr(n)){var r="Invalid event type for "+Zn(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||dt).error(r)}return zn(this.eventBusEl_,e,t)}};function ur(e,n){void 0===n&&(n={});var r=n.eventBusKey;if(r){if(!e[r].nodeName)throw new Error('The eventBusKey "'+r+'" does not refer to an element.');e.eventBusEl_=e[r]}else e.eventBusEl_=Zt("span",{className:"vjs-event-bus"});return bt(e,sr),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),t().setTimeout((function(){e.eventBusEl_=null}),0)})),e}var cr={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),gt(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&er(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function lr(e,t){return bt(e,cr),e.state=bt({},e.state,t),"function"==typeof e.handleStateChanged&&er(e)&&e.on("statechanged",e.handleStateChanged),e}var fr=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},hr=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function pr(){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&&gt(t,(function(t,n){wt(t)?(wt(e[n])||(e[n]={}),e[n]=pr(e[n],t)):e[n]=t}))})),e}var dr=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}(),yr=t().Map?t().Map:dr,vr=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}(),mr=t().Set?t().Set:vr,gr=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_=pr({},this.options_),t=this.options_=pr(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_"+Dn()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(ur(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),lr(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new mr,this.setIntervalIds_=new mr,this.rafIds_=new mr,this.namedRafs_=new yr,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var n=e.prototype;return n.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_),Nn.has(this.el_)&&Nn.delete(this.el_),this.el_=null),this.player_=null}},n.isDisposed=function(){return Boolean(this.isDisposed_)},n.player=function(){return this.player_},n.options=function(e){return e?(this.options_=pr(this.options_,e),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(e,t,n){return Zt(e,t,n)},n.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(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[e]?u=o[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},n.handleLanguagechange=function(){},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(e){return this.childIndex_[e]},n.getChild=function(e){if(e)return this.childNameIndex_[e]},n.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},n.addChild=function(t,n,r){var i,o;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof t){o=hr(t);var a=n.componentClass||o;n.name=o;var s=e.getComponent(a);if(!s)throw new Error("Component "+a+" 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),(o=o||i.name&&hr(i.name()))&&(this.childNameIndex_[o]=i,this.childNameIndex_[fr(o)]=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_:Yt(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},n.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_[hr(e.name())]=null,this.childNameIndex_[fr(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},n.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,o=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||hr(t.name));return n&&!o.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 o=t.addChild(n,r);o&&(t[n]=o)}}))}},n.buildCSSClass=function(){return""},n.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))},n.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)},n.$=function(e,t){return En(e,t||this.contentEl())},n.$$=function(e,t){return kn(e,t||this.contentEl())},n.hasClass=function(e){return nn(this.el_,e)},n.addClass=function(e){rn(this.el_,e)},n.removeClass=function(e){on(this.el_,e)},n.toggleClass=function(e,t){an(this.el_,e,t)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(e){return cn(this.el_,e)},n.setAttribute=function(e,t){ln(this.el_,e,t)},n.removeAttribute=function(e){fn(this.el_,e)},n.width=function(e,t){return this.dimension("width",e,t)},n.height=function(e,t){return this.dimension("height",e,t)},n.dimensions=function(e,t){this.width(e,!0),this.height(t)},n.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"+hr(e)],10)},n.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=Tt(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+hr(e);t=this.el_[n]}return t},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},n.handleKeyPress=function(e){this.handleKeyDown(e)},n.emitTapEvents=function(){var e,n=0,r=null;this.on("touchstart",(function(i){1===i.touches.length&&(r={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},n=t().performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(r){var n=t.touches[0].pageX-r.pageX,i=t.touches[0].pageY-r.pageY;Math.sqrt(n*n+i*i)>10&&(e=!1)}}));var i=function(){e=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",(function(i){r=null,!0===e&&t().performance.now()-n<200&&(i.preventDefault(),this.trigger("tap"))}))},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Yn(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)}},n.setTimeout=function(e,n){var r,i=this;return e=Yn(this,e),this.clearTimersOnDispose_(),r=t().setTimeout((function(){i.setTimeoutIds_.has(r)&&i.setTimeoutIds_.delete(r),e()}),n),this.setTimeoutIds_.add(r),r},n.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),t().clearTimeout(e)),e},n.setInterval=function(e,n){e=Yn(this,e),this.clearTimersOnDispose_();var r=t().setInterval(e,n);return this.setIntervalIds_.add(r),r},n.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),t().clearInterval(e)),e},n.requestAnimationFrame=function(e){var n,r=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Yn(this,e),n=t().requestAnimationFrame((function(){r.rafIds_.has(n)&&r.rafIds_.delete(n),e()})),this.rafIds_.add(n),n):this.setTimeout(e,1e3/60)},n.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Yn(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),e}},n.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},n.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),t().cancelAnimationFrame(e)),e):this.clearTimeout(e)},n.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=e.getComponent("Tech"),i=r&&r.isTech(n),o=e===n||e.prototype.isPrototypeOf(n.prototype);if(i||!o)throw new Error('Illegal component, "'+t+'"; '+(i?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");t=hr(t),e.components_||(e.components_={});var a=e.getComponent("Player");if("Player"===t&&a&&a.players){var s=a.players,u=Object.keys(s);if(s&&u.length>0&&u.map((function(e){return s[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[fr(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function br(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 _r(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:br.bind(null,"start",0,e),end:br.bind(null,"end",1,e)}}function wr(e,t){return Array.isArray(e)?_r(e):void 0===e||void 0===t?_r():_r([[e,t]])}function Tr(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=wr(0,0));for(var o=0;o<e.length;o++)n=e.start(o),(r=e.end(o))>t&&(r=t),i+=r-n;return i/t}function Sr(e){if(e instanceof Sr)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:_t(e)&&("number"==typeof e.code&&(this.code=e.code),bt(this,e)),this.message||(this.message=Sr.defaultMessages[this.code]||"")}gr.prototype.supportsRaf_="function"==typeof t().requestAnimationFrame&&"function"==typeof t().cancelAnimationFrame,gr.registerComponent("Component",gr),Sr.prototype.code=0,Sr.prototype.message="",Sr.prototype.status=null,Sr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Sr.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 Er=0;Er<Sr.errorTypes.length;Er++)Sr[Sr.errorTypes[Er]]=Er,Sr.prototype[Sr.errorTypes[Er]]=Er;function kr(e){return null!=e&&"function"==typeof e.then}function Or(e){kr(e)&&e.then(null,(function(e){}))}var Cr=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}}))})},Pr="vjs-modal-dialog",xr=function(e){function n(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_=Zt("div",{className:Pr+"-content"},{role:"document"}),r.descEl_=Zt("p",{className:Pr+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),en(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}c(n,e);var r=n.prototype;return r.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"})},r.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},r.buildCSSClass=function(){return Pr+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},r.label=function(){return this.localize(this.options_.label||"Modal Window")},r.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},r.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}},r.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},r.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()}},r.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_},r.fill=function(){this.fillWith(this.content())},r.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),wn(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},r.empty=function(){this.trigger("beforemodalempty"),gn(this.contentEl()),this.trigger("modalempty")},r.content=function(e){return void 0!==e&&(this.content_=e),this.content_},r.conditionalFocus_=function(){var e=o().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},r.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},r.handleKeyDown=function(e){if(e.stopPropagation(),p().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(p().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}o().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())}},r.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof t().HTMLAnchorElement||e instanceof t().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof t().HTMLInputElement||e instanceof t().HTMLSelectElement||e instanceof t().HTMLTextAreaElement||e instanceof t().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof t().HTMLIFrameElement||e instanceof t().HTMLObjectElement||e instanceof t().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},n}(gr);xr.prototype.options_={pauseOnOpen:!0,temporary:!0},gr.registerComponent("ModalDialog",xr);var jr=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(s(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}c(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})},er(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}(Jn);for(var Lr in jr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},jr.prototype.allowedEvents_)jr.prototype["on"+Lr]=null;var Ar=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)},Ir=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){Ar(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}c(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&Ar(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,Ar(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}(jr),Rr=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)},Dr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){Rr(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(s(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}c(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&Rr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,Rr(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}(jr),Mr=function(e){function t(){return e.apply(this,arguments)||this}c(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}(jr),Nr=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}(),Br=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}(),Ur={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Fr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Vr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Hr={disabled:"disabled",hidden:"hidden",showing:"showing"},qr=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+Dn(),kind:t.kind||"",language:t.language||""},i=t.label||"",o=function(e){Object.defineProperty(s(n),e,{get:function(){return r[e]},set:function(){}})};for(var a in r)o(a);return Object.defineProperty(s(n),"label",{get:function(){return i},set:function(e){e!==i&&(i=e,this.trigger("labelchange"))}}),n}return c(t,e),t}(Jn),zr=function(e){var n=["protocol","hostname","port","pathname","search","hash","host"],r=o().createElement("a");r.href=e;var i,a=""===r.host&&"file:"!==r.protocol;a&&((i=o().createElement("div")).innerHTML='<a href="'+e+'"></a>',r=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),o().body.appendChild(i));for(var s={},u=0;u<n.length;u++)s[n[u]]=r[n[u]];return"http:"===s.protocol&&(s.host=s.host.replace(/:80$/,"")),"https:"===s.protocol&&(s.host=s.host.replace(/:443$/,"")),s.protocol||(s.protocol=t().location.protocol),a&&o().body.removeChild(i),s},Wr=function(e){if(!e.match(/^https?:\/\//)){var t=o().createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},Gr=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},$r=function(e,n){void 0===n&&(n=t().location);var r=zr(e);return(":"===r.protocol?n.protocol:r.protocol)+r.host!==n.protocol+n.host},Xr=Object.freeze({__proto__:null,parseUrl:zr,getAbsoluteURL:Wr,getFileExtension:Gr,isCrossOrigin:$r}),Kr=function(e,n){var r=new(t().WebVTT.Parser)(t(),t().vttjs,t().WebVTT.StringDecoder()),i=[];r.oncue=function(e){n.addCue(e)},r.onparsingerror=function(e){i.push(e)},r.onflush=function(){n.trigger({type:"loadeddata",target:n})},r.parse(e),i.length>0&&(t().console&&t().console.groupCollapsed&&t().console.groupCollapsed("Text Track parsing errors for "+n.src),i.forEach((function(e){return dt.error(e)})),t().console&&t().console.groupEnd&&t().console.groupEnd()),r.flush()},Yr=function(e,n){var r={uri:e},i=$r(e);i&&(r.cors=i);var o="use-credentials"===n.tech_.crossOrigin();o&&(r.withCredentials=o),y()(r,Yn(this,(function(e,r,i){if(e)return dt.error(e,r);n.loaded_=!0,"function"!=typeof t().WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return Kr(i,n);dt.error("vttjs failed to load, stopping trying to process "+n.src)})):Kr(i,n)})))},Qr=function(e){function n(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=pr(t,{kind:Vr[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=Hr[r.mode]||"disabled",o=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 a=new Br(n.cues_),u=new Br(n.activeCues_),c=!1,l=Yn(s(n),(function(){this.tech_.isReady_&&!this.tech_.isDisposed()&&(this.activeCues=this.activeCues,c&&(this.trigger("cuechange"),c=!1))}));return n.tech_.one("dispose",(function(){n.tech_.off("timeupdate",l)})),"disabled"!==i&&n.tech_.on("timeupdate",l),Object.defineProperties(s(n),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return i},set:function(e){Hr[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||Yr(this.src,this),this.tech_.off("timeupdate",l),"disabled"!==i&&this.tech_.on("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return u;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(c=!1,t.length!==this.activeCues_.length)c=!0;else for(var o=0;o<t.length;o++)-1===this.activeCues_.indexOf(t[o])&&(c=!0);return this.activeCues_=t,u.setCues_(this.activeCues_),u},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==r.kind&&"captions"!==r.kind)&&Yr(n.src,s(n))):n.loaded_=!0,n}c(n,e);var r=n.prototype;return r.addCue=function(e){var n=e;if(t().vttjs&&!(e instanceof t().vttjs.VTTCue)){for(var r in n=new(t().vttjs.VTTCue)(e.startTime,e.endTime,e.text),e)r in n||(n[r]=e[r]);n.id=e.id,n.originalCue_=e}for(var i=this.tech_.textTracks(),o=0;o<i.length;o++)i[o]!==this&&i[o].removeCue(n);this.cues_.push(n),this.cues.setCues_(this.cues_)},r.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}}},n}(qr);Qr.prototype.allowedEvents_={cuechange:"cuechange"};var Jr=function(e){function t(t){var n;void 0===t&&(t={});var r=pr(t,{kind:Fr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(s(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 c(t,e),t}(qr),Zr=function(e){function t(t){var n;void 0===t&&(t={});var r=pr(t,{kind:Ur[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(s(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 c(t,e),t}(qr),ei=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new Qr(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(s(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:s(n)})})),n}return c(t,e),t}(Jn);ei.prototype.allowedEvents_={load:"load"},ei.NONE=0,ei.LOADING=1,ei.LOADED=2,ei.ERROR=3;var ti={audio:{ListClass:Ir,TrackClass:Jr,capitalName:"Audio"},video:{ListClass:Dr,TrackClass:Zr,capitalName:"Video"},text:{ListClass:Mr,TrackClass:Qr,capitalName:"Text"}};Object.keys(ti).forEach((function(e){ti[e].getterName=e+"Tracks",ti[e].privateName=e+"Tracks_"}));var ni={remoteText:{ListClass:Mr,TrackClass:Qr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Nr,TrackClass:ei,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},ri=a({},ti,ni);ni.names=Object.keys(ni),ti.names=Object.keys(ti),ri.names=[].concat(ni.names).concat(ti.names);var ii=function(e){function n(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})),ri.names.forEach((function(e){var n=ri[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 ri.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}c(n,e);var r=n.prototype;return r.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"})},r.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},r.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},r.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Yn(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},r.onDurationChange=function(e){this.duration_=this.duration()},r.buffered=function(){return wr(0,0)},r.bufferedPercent=function(){return Tr(this.buffered(),this.duration_)},r.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},r.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},r.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},r.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},r.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.dispose=function(){this.clearTracks(ti.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},r.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)}}))},r.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},r.reset=function(){},r.crossOrigin=function(){},r.setCrossOrigin=function(){},r.error=function(e){return void 0!==e&&(this.error_=new Sr(e),this.trigger("error")),this.error_},r.played=function(){return this.hasStarted_?wr(0,0):wr()},r.play=function(){},r.setScrubbing=function(){},r.scrubbing=function(){},r.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.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)}))}))},r.addWebVttScript_=function(){var e=this;if(!t().WebVTT)if(o().body.contains(this.el())){if(!this.options_["vtt.js"]&&wt(m())&&Object.keys(m()).length>0)return void this.trigger("vttjsloaded");var n=o().createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",n.onload=function(){e.trigger("vttjsloaded")},n.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){n.onload=null,n.onerror=null})),t().WebVTT=!0,this.el().parentNode.appendChild(n)}else this.ready(this.addWebVttScript_)},r.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 o=function(){return e.trigger("texttrackchange")},a=function(){o();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++)t[e].removeEventListener("cuechange",o)}))},r.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 o=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var a=new ri.text.TrackClass(i);return o.addTrack(a),a}(this,e,t,n)},r.createRemoteTextTrack=function(e){var t=pr(e,{tech:this});return new ni.remoteTextEl.TrackClass(t)},r.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(dt.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},r.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},r.getVideoPlaybackQuality=function(){return{}},r.requestPictureInPicture=function(){var e=this.options_.Promise||t().Promise;if(e)return e.reject()},r.disablePictureInPicture=function(){return!0},r.setDisablePictureInPicture=function(){},r.setPoster=function(){},r.playsinline=function(){},r.setPlaysinline=function(){},r.overrideNativeAudioTracks=function(){},r.overrideNativeVideoTracks=function(){},r.canPlayType=function(){return""},n.canPlayType=function(){return""},n.canPlaySource=function(e,t){return n.canPlayType(e.type)},n.isTech=function(e){return e.prototype instanceof n||e instanceof n||e===n},n.registerTech=function(e,t){if(n.techs_||(n.techs_={}),!n.isTech(t))throw new Error("Tech "+e+" must be a Tech");if(!n.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!n.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=hr(e),n.techs_[e]=t,n.techs_[fr(e)]=t,"Tech"!==e&&n.defaultTechOrder_.push(e),t},n.getTech=function(e){if(e)return n.techs_&&n.techs_[e]?n.techs_[e]:(e=hr(e),t()&&t().videojs&&t().videojs[e]?(dt.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),t().videojs[e]):void 0)},n}(gr);ri.names.forEach((function(e){var t=ri[e];ii.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),ii.prototype.featuresVolumeControl=!0,ii.prototype.featuresMuteControl=!0,ii.prototype.featuresFullscreenResize=!1,ii.prototype.featuresPlaybackRate=!1,ii.prototype.featuresProgressEvents=!1,ii.prototype.featuresSourceset=!1,ii.prototype.featuresTimeupdateEvents=!1,ii.prototype.featuresNativeTextTracks=!1,ii.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:dt.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)}},gr.registerComponent("Tech",ii),ii.registerTech("Tech",ii),ii.defaultTechOrder_=[];var oi={},ai={},si={};function ui(e,t,n){e.setTimeout((function(){return di(t,oi[t.type],n,e)}),1)}function ci(e,t,n,r){void 0===r&&(r=null);var i="call"+hr(n),o=e.reduce(pi(i),r),a=o===si,s=a?null:t[n](o);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var o=e[i];o[t]&&o[t](r,n)}}(e,n,s,a),s}var li={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},fi={setCurrentTime:1,setMuted:1,setVolume:1},hi={play:1,pause:1};function pi(e){return function(t,n){return t===si?si:n[e]?n[e](t):t}}function di(e,t,n,r,i,o){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===i&&(i=[]),void 0===o&&(o=!1);var a=t,s=a[0],u=a.slice(1);if("string"==typeof s)di(e,oi[s],n,r,i,o);else if(s){var c=function(e,t){var n=ai[e.id()],r=null;if(null==n)return r=t(e),ai[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1];a===t&&(r=s)}return null===r&&(r=t(e),n.push([t,r])),r}(r,s);if(!c.setSource)return i.push(c),di(e,u,n,r,i,o);c.setSource(bt({},e),(function(t,a){if(t)return di(e,u,n,r,i,o);i.push(c),di(a,e.type===a.type?u:oi[a.type],n,r,i,o)}))}else u.length?di(e,u,n,r,i,o):o?n(e,i):di(e,oi["*"],n,r,i,!0)}var yi={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"},vi=function(e){void 0===e&&(e="");var t=Gr(e);return yi[t.toLowerCase()]||""},mi=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):_t(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[gi({src:t})]:_t(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[gi(t)]:[];return t};function gi(e){if(!e.type){var t=vi(e.src);t&&(e.type=t)}return e}var bi=function(e){function t(t,n,r){var i,o=pr({createEl:!1},n);if(i=e.call(this,t,o,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var a=0,s=n.playerOptions.techOrder;a<s.length;a++){var u=hr(s[a]),c=ii.getTech(u);if(u||(c=gr.getComponent(u)),c&&c.isSupported()){t.loadTech_(u);break}}return i}return c(t,e),t}(gr);gr.registerComponent("MediaLoader",bi);var _i=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}c(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=bt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&dt.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=bt({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_=Zt("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,en(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){p().isEventKey(t,"Space")||p().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(gr);gr.registerComponent("ClickableComponent",_i);var wi=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}c(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 Zt("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)||(Bt||Dt)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Or(this.player_.play()):this.player_.pause()}},t}(_i);gr.registerComponent("PosterImage",wi);var Ti="#222",Si={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 Ei(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 ki(e,t,n){try{e.style[t]=n}catch(e){return}}var Oi=function(e){function n(n,r,i){var o;o=e.call(this,n,r,i)||this;var a=function(e){return o.updateDisplay(e)};return n.on("loadstart",(function(e){return o.toggleDisplay(e)})),n.on("texttrackchange",a),n.on("loadedmetadata",(function(e){return o.preselectTrack(e)})),n.ready(Yn(s(o),(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",a),n.on("playerresize",a),t().addEventListener("orientationchange",a),n.on("dispose",(function(){return t().removeEventListener("orientationchange",a)}));for(var e=this.options_.playerOptions.tracks||[],r=0;r<e.length;r++)this.player_.addRemoteTextTrack(e[r],!0);this.preselectTrack()}}))),o}c(n,e);var r=n.prototype;return r.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),o=this.player_.cache_.selectedLanguage,a=0;a<i.length;a++){var s=i[a];o&&o.enabled&&o.language&&o.language===s.language&&s.kind in r?s.kind===o.kind?n=s:n||(n=s):o&&!o.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")},r.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},r.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},r.clearDisplay=function(){"function"==typeof t().WebVTT&&t().WebVTT.processCues(t(),[],this.el_)},r.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 o=null,a=null,s=e.length;s--;){var u=e[s];"showing"===u.mode&&("descriptions"===u.kind?o=u:a=u)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):o&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(o))}},r.updateDisplayState=function(e){for(var n=this.player_.textTrackSettings.getValues(),r=e.activeCues,i=r.length;i--;){var o=r[i];if(o){var a=o.displayState;if(n.color&&(a.firstChild.style.color=n.color),n.textOpacity&&ki(a.firstChild,"color",Ei(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(a.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&ki(a.firstChild,"backgroundColor",Ei(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?ki(a,"backgroundColor",Ei(n.windowColor,n.windowOpacity)):a.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Ti:"raised"===n.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Ti:"depressed"===n.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Ti:"uniform"===n.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Ti)),n.fontPercent&&1!==n.fontPercent){var s=t().parseFloat(a.style.fontSize);a.style.fontSize=s*n.fontPercent+"px",a.style.height="auto",a.style.top="auto"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=Si[n.fontFamily])}}},r.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof t().WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var n=[],r=0;r<e.length;++r)for(var i=e[r],o=0;o<i.activeCues.length;++o)n.push(i.activeCues[o]);t().WebVTT.processCues(t(),n,this.el_);for(var a=0;a<e.length;++a){for(var s=e[a],u=0;u<s.activeCues.length;++u){var c=s.activeCues[u].displayState;rn(c,"vjs-text-track-cue"),rn(c,"vjs-text-track-cue-"+(s.language?s.language:a))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},n}(gr);gr.registerComponent("TextTrackDisplay",Oi);var Ci=function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=Zt("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}(gr);gr.registerComponent("LoadingSpinner",Ci);var Pi=function(e){function t(){return e.apply(this,arguments)||this}c(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=bt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=bt({type:"button"},n);var r=gr.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 dt.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),gr.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){p().isEventKey(t,"Space")||p().isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(_i);gr.registerComponent("Button",Pi);var xi=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}c(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 Or(t),void(!this.player_.tech(!0)||(Bt||Dt)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var o=function(){return i.focus()};kr(t)?t.then(o,(function(){})):this.setTimeout(o,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}(Pi);xi.prototype.controlText_="Play Video",gr.registerComponent("BigPlayButton",xi);var ji=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}c(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){p().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Pi);gr.registerComponent("CloseButton",ji);var Li=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}c(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()?Or(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}(Pi);Li.prototype.controlText_="Play",gr.registerComponent("PlayToggle",Li);var Ai=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),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)},Ii=Ai;function Ri(e,t){return void 0===t&&(t=e),Ii(e,t)}var Di=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}c(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_=Zt("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=Ri(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,dt.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_=o().createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(gr);Di.prototype.labelText_="Time",Di.prototype.controlText_="Time",gr.registerComponent("TimeDisplay",Di);var Mi=function(e){function t(){return e.apply(this,arguments)||this}c(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}(Di);Mi.prototype.labelText_="Current Time",Mi.prototype.controlText_="Current Time",gr.registerComponent("CurrentTimeDisplay",Mi);var Ni=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}c(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}(Di);Ni.prototype.labelText_="Duration",Ni.prototype.controlText_="Duration",gr.registerComponent("DurationDisplay",Ni);var Bi=function(e){function t(){return e.apply(this,arguments)||this}return c(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}(gr);gr.registerComponent("TimeDivider",Bi);var Ui=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}c(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(Zt("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}(Di);Ui.prototype.labelText_="Remaining Time",Ui.prototype.controlText_="Remaining Time",gr.registerComponent("RemainingTimeDisplay",Ui);var Fi=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}c(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_=Zt("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}(gr);gr.registerComponent("LiveDisplay",Fi);var Vi=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}c(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_=Zt("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}(Pi);Vi.prototype.controlText_="Seek to live, currently playing live",gr.registerComponent("SeekToLive",Vi);var Hi=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},qi=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}c(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=bt({tabIndex:0},n),r=bt({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||Mt||e.preventDefault(),hn(),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;pn(),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(Hi(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=vn(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){p().isEventKey(t,"Left")||p().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):p().isEventKey(t,"Right")||p().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}(gr);gr.registerComponent("Slider",qi);var zi=function(e,t){return Hi(e/t*100,0,100).toFixed(2)+"%"},Wi=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}c(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Zt("span",{className:"vjs-control-text"}),r=Zt("span",{textContent:this.localize("Loaded")}),i=o().createTextNode(": ");return this.percentageEl_=Zt("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(),o=t.partEls_,a=zi(i,r);t.percent_!==a&&(t.el_.style.width=a,en(t.percentageEl_,a),t.percent_=a);for(var s=0;s<n.length;s++){var u=n.start(s),c=n.end(s),l=o[s];l||(l=t.el_.appendChild(Zt()),o[s]=l),l.dataset.start===u&&l.dataset.end===c||(l.dataset.start=u,l.dataset.end=c,l.style.left=zi(u,i),l.style.width=zi(c-u,i))}for(var f=o.length;f>n.length;f--)t.el_.removeChild(o[f-1]);o.length=n.length}))},t}(gr);gr.registerComponent("LoadProgressBar",Wi);var Gi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Qn(Yn(s(r),r.update),Kn),r}c(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=yn(this.el_),i=dn(this.player_.el()),o=e.width*t;if(i&&r){var a=e.left-i.left+o,s=e.width-o+(i.right-e.right),u=r.width/2;a<u?u+=u-a: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){en(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var o,a=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-t*s;o=(u<1?"":"-")+Ri(u,s)}else o=Ri(n,a);i.update(e,t,o),r&&r()}))},t}(gr);gr.registerComponent("TimeTooltip",Gi);var $i=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Qn(Yn(s(r),r.update),Kn),r}c(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}(gr);$i.prototype.options_={children:[]},zt||Lt||$i.prototype.options_.children.push("timeTooltip"),gr.registerComponent("PlayProgressBar",$i);var Xi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Qn(Yn(s(r),r.update),Kn),r}c(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}(gr);Xi.prototype.options_={children:["timeTooltip"]},gr.registerComponent("MouseTimeDisplay",Xi);var Ki=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}c(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=Yn(this,this.update),this.update=Qn(this.update_,Kn),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 o()&&"visibilityState"in o()&&this.on(o(),"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===o().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,Kn))},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"!==o().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}",[Ri(e,i),Ri(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(dn(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){Tn(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(Tn(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(),o=r.liveCurrentTime();if((t=i+n*r.liveWindow())>=o&&(t=o),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?Or(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(p().isEventKey(t,"Space")||p().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(p().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(p().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(p()(t))){t.preventDefault(),t.stopPropagation();var r=10*(p().codes[p()(t)]-p().codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else p().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):p().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 o()&&"visibilityState"in o()&&this.off(o(),"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(qi);Ki.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},zt||Lt||Ki.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),gr.registerComponent("SeekBar",Ki);var Yi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=Qn(Yn(s(r),r.handleMouseMove),Kn),r.throttledHandleMouseSeek=Qn(Yn(s(r),r.handleMouseSeek),Kn),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.handleMouseDownHandler_=function(e){return r.handleMouseDown(e)},r.enable(),r}c(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(),o=yn(i),a=vn(i,e).x;a=Hi(a,0,1),r&&r.update(o,a),n&&n.update(o,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&&Or(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}(gr);Yi.prototype.options_={children:["seekBar"]},gr.registerComponent("ProgressControl",Yi);var Qi=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}c(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){o().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}(Pi);Qi.prototype.controlText_="Picture-in-Picture",gr.registerComponent("PictureInPictureToggle",Qi);var Ji=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===o()[t.fsApi_.fullscreenEnabled]&&r.disable(),r}c(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}(Pi);Ji.prototype.controlText_="Fullscreen",gr.registerComponent("FullscreenToggle",Ji);var Zi=function(e){function t(){return e.apply(this,arguments)||this}return c(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}(gr);gr.registerComponent("VolumeLevel",Zi);var eo=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Qn(Yn(s(r),r.update),Kn),r}c(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=dn(this.el_),o=dn(this.player_.el()),a=e.width*t;if(!o||!i)return;var s=e.left-o.left+a,u=e.width-a+(o.right-e.right),c=i.width/2;s<c?c+=c-s:u<c&&(c=u),c<0?c=0:c>i.width&&(c=i.width),this.el_.style.right="-"+c+"px"}this.write(r+"%")},n.write=function(e){en(this.el_,e)},n.updateVolume=function(e,t,n,r,i){var o=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){o.update(e,t,n,r.toFixed(0)),i&&i()}))},t}(gr);gr.registerComponent("VolumeLevelTooltip",eo);var to=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Qn(Yn(s(r),r.update),Kn),r}c(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}(gr);to.prototype.options_={children:["volumeLevelTooltip"]},gr.registerComponent("MouseVolumeLevelDisplay",to);var no=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}c(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){Tn(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),r=dn(n),i=this.vertical(),o=vn(n,e);o=i?o.y:o.x,o=Hi(o,0,1),t.update(r,o,i)}Tn(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}(qi);no.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},zt||Lt||no.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),no.prototype.playerEvent="volumechange",gr.registerComponent("VolumeBar",no);var ro=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||wt(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),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")}))}(s(r=e.call(this,t,n)||this),t),r.throttledHandleMouseMove=Qn(Yn(s(r),r.handleMouseMove),Kn),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}c(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}(gr);ro.prototype.options_={children:["volumeBar"]},gr.registerComponent("VolumeControl",ro);var io=function(e){function t(t,n){var r;return 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")}))}(s(r=e.call(this,t,n)||this),t),r.on(t,["loadstart","volumechange"],(function(e){return r.update(e)})),r}c(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;zt&&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++)on(this.el_,"vjs-vol-"+n);rn(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}(Pi);io.prototype.controlText_="Mute",gr.registerComponent("MuteToggle",io);var oo=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||wt(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}c(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){p().isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),Hn(o(),"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),qn(o(),"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){p().isEventKey(e,"Esc")&&this.handleMouseOut()},t}(gr);oo.prototype.options_={children:["muteToggle","volumeControl"]},gr.registerComponent("VolumePanel",oo);var ao=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}c(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof gr&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof gr&&(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_=Zt(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_),Hn(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||o().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){p().isEventKey(e,"Left")||p().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(p().isEventKey(e,"Right")||p().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}(gr);gr.registerComponent("Menu",ao);var so=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new Pi(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=Pi.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(),Hn(o(),"keyup",r.handleMenuKeyUp_)})),r.on("mouseleave",(function(e){return r.handleMouseLeave(e)})),r.on("keydown",(function(e){return r.handleSubmenuKeyDown(e)})),r}c(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 ao(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=Zt("li",{className:"vjs-menu-title",innerHTML:hr(this.options_.title),tabIndex:-1}),n=new gr(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+" "+Pi.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"),qn(o(),"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){p().isEventKey(e,"Esc")||p().isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),p().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(p().isEventKey(e,"Up")||p().isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(p().isEventKey(e,"Esc")||p().isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(p().isEventKey(e,"Esc")||p().isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),p().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"),zt&&Qt())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}(gr);gr.registerComponent("MenuButton",so);var uo=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 s(r);var o=Yn(s(r),r.update);return i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),i.addEventListener("labelchange",o),r.player_.on("ready",o),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o),i.removeEventListener("labelchange",o)})),r}return c(t,e),t}(so);gr.registerComponent("TrackButton",uo);var co=["Tab","Esc","Up","Down","Right","Left"],lo=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}c(t,e);var n=t.prototype;return n.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",bt({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){co.some((function(e){return p().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}(_i);gr.registerComponent("MenuItem",lo);var fo=function(e){function n(n,r){var i,a=r.track,u=n.textTracks();r.label=a.label||a.language||"Unknown",r.selected="showing"===a.mode,(i=e.call(this,n,r)||this).track=a,i.kinds=(r.kinds||[r.kind||i.track.kind]).filter(Boolean);var c,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleTracksChange.apply(s(i),t)},f=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleSelectedLanguageChange.apply(s(i),t)};return n.on(["loadstart","texttrackchange"],l),u.addEventListener("change",l),u.addEventListener("selectedlanguagechange",f),i.on("dispose",(function(){n.off(["loadstart","texttrackchange"],l),u.removeEventListener("change",l),u.removeEventListener("selectedlanguagechange",f)})),void 0===u.onchange&&i.on(["tap","click"],(function(){if("object"!=typeof t().Event)try{c=new(t().Event)("change")}catch(e){}c||(c=o().createEvent("Event")).initEvent("change",!0,!0),u.dispatchEvent(c)})),i.handleTracksChange(),i}c(n,e);var r=n.prototype;return r.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 o=r[i];-1!==this.kinds.indexOf(o.kind)&&(o===n?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled"))}},r.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},r.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}}},r.dispose=function(){this.track=null,e.prototype.dispose.call(this)},n}(lo);gr.registerComponent("TextTrackMenuItem",fo);var ho=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}c(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 o=t[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.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 o=t[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(fo);gr.registerComponent("OffTextTrackMenuItem",ho);var po=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return c(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=fo),this.label_&&(n=this.label_+" off"),e.push(new ho(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 o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new t(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+o.kind+"-menu-item"),e.push(a)}}return e},t}(uo);gr.registerComponent("TextTrackButton",po);var yo=function(e){function t(t,n){var r,i=n.track,o=n.cue,a=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=a&&a<o.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=o,i.addEventListener("cuechange",Yn(s(r),r.update)),r}c(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}(lo);gr.registerComponent("ChaptersTrackMenuItem",yo);var vo=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}c(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(hr(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],o=new yo(this.player_,{track:this.track_,cue:i});e.push(o)}return e},t}(po);vo.prototype.kind_="chapters",vo.prototype.controlText_="Chapters",gr.registerComponent("ChaptersButton",vo);var mo=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=t.textTracks(),a=Yn(s(i),i.handleTracksChange);return o.addEventListener("change",a),i.on("dispose",(function(){o.removeEventListener("change",a)})),i}c(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 o=t[r];if(o.kind!==this.kind_&&"showing"===o.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}(po);mo.prototype.kind_="descriptions",mo.prototype.controlText_="Descriptions",gr.registerComponent("DescriptionsButton",mo);var go=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}c(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}(po);go.prototype.kind_="subtitles",go.prototype.controlText_="Subtitles",gr.registerComponent("SubtitlesButton",go);var bo=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 c(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(fo);gr.registerComponent("CaptionSettingsMenuItem",bo);var _o=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}c(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 bo(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(po);_o.prototype.kind_="captions",_o.prototype.controlText_="Captions",gr.registerComponent("CaptionsButton",_o);var wo=function(e){function t(){return e.apply(this,arguments)||this}return c(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,bt({innerHTML:i},n),r)},t}(fo);gr.registerComponent("SubsCapsMenuItem",wo);var To=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(hr(r.label_)),r}c(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 bo(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t,wo)},t}(po);To.prototype.kinds_=["captions","subtitles"],To.prototype.controlText_="Subtitles",gr.registerComponent("SubsCapsButton",To);var So=function(e){function t(t,n){var r,i=n.track,o=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 a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(s(r),t)};return o.addEventListener("change",a),r.on("dispose",(function(){o.removeEventListener("change",a)})),r}c(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,bt({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}(lo);gr.registerComponent("AudioTrackMenuItem",So);var Eo=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}c(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 So(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(uo);Eo.prototype.controlText_="Audio Track",gr.registerComponent("AudioTrackButton",Eo);var ko=function(e){function t(t,n){var r,i=n.rate,o=parseFloat(i,10);return n.label=i,n.selected=1===o,n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=o,r.on(t,"ratechange",(function(e){return r.update(e)})),r}c(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}(lo);ko.prototype.contentElType="button",gr.registerComponent("PlaybackRateMenuItem",ko);var Oo=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}c(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_=Zt("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.createMenu=function(){var e=new ao(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new ko(this.player(),{rate:t[n]+"x"}));return e},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.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.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}(so);Oo.prototype.controlText_="Playback Rate",gr.registerComponent("PlaybackRateMenuButton",Oo);var Co=function(e){function t(){return e.apply(this,arguments)||this}c(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}(gr);gr.registerComponent("Spacer",Co);var Po=function(e){function t(){return e.apply(this,arguments)||this}c(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}(Co);gr.registerComponent("CustomControlSpacer",Po);var xo=function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(gr);xo.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in o()&&xo.prototype.options_.children.splice(xo.prototype.options_.children.length-1,0,"pictureInPictureToggle"),gr.registerComponent("ControlBar",xo);var jo=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}c(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}(xr);jo.prototype.options_=a({},xr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),gr.registerComponent("ErrorDisplay",jo);var Lo="vjs-text-track-settings",Ao=["#000","Black"],Io=["#00F","Blue"],Ro=["#0FF","Cyan"],Do=["#0F0","Green"],Mo=["#F0F","Magenta"],No=["#F00","Red"],Bo=["#FFF","White"],Uo=["#FF0","Yellow"],Fo=["1","Opaque"],Vo=["0.5","Semi-Transparent"],Ho=["0","Transparent"],qo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ao,Bo,No,Do,Io,Uo,Mo,Ro]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Fo,Vo,Ho]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Bo,Ao,No,Do,Io,Uo,Mo,Ro]},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:[Fo,Vo]},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:[Ho,Vo,Fo]}};function zo(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}qo.windowColor.options=qo.backgroundColor.options;var Wo=function(e){function n(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=r.updateDisplay.bind(s(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=Zt("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()})),gt(qo,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}c(n,e);var r=n.prototype;return r.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},r.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=qo[e],o=i.id.replace("%s",this.id_),a=[t,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(i.options.map((function(e){var t=o+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},r.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("")},r.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("")},r.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("")},r.createElColors_=function(){return Zt("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},r.createElFont_=function(){return Zt("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("")})},r.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Zt("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("")})},r.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},r.label=function(){return this.localize("Caption Settings Dialog")},r.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},r.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},r.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,o,a=(i=r.$(t.selector),o=t.parser,zo(i.options[i.options.selectedIndex].value,o));return void 0!==a&&(e[n]=a),e},void 0===(n={})&&(n=0),mt(e=qo).reduce((function(n,r){return t(n,e[r],r)}),n)},r.setValues=function(e){var t=this;gt(qo,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(zo(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},r.setDefaults=function(){var e=this;gt(qo,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},r.restoreSettings=function(){var e;try{e=JSON.parse(t().localStorage.getItem(Lo))}catch(e){dt.warn(e)}e&&this.setValues(e)},r.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?t().localStorage.setItem(Lo,JSON.stringify(e)):t().localStorage.removeItem(Lo)}catch(e){dt.warn(e)}}},r.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},r.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},n}(xr);gr.registerComponent("TextTrackSettings",Wo);var Go=function(e){function n(n,r){var i,o=r.ResizeObserver||t().ResizeObserver;null===r.ResizeObserver&&(o=!1);var a=pr({createEl:!o,reportTouchActivity:!1},r);return(i=e.call(this,n,a)||this).ResizeObserver=r.ResizeObserver||t().ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=function(e,n,r,i){var o;void 0===i&&(i=t());var a=function(){var t=this,n=arguments,r=function(){o=null,r=null,e.apply(t,n)};i.clearTimeout(o),o=i.setTimeout(r,100)};return a.cancel=function(){i.clearTimeout(o),o=null},a}((function(){i.resizeHandler()}),0,0,s(i)),o?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(n.el())):(i.loadListener_=function(){if(i.el_&&i.el_.contentWindow){var e=i.debouncedHandler_,t=i.unloadListener_=function(){qn(this,"resize",e),qn(this,"unload",t),t=null};Hn(i.el_.contentWindow,"unload",t),Hn(i.el_.contentWindow,"resize",e)}},i.one("load",i.loadListener_)),i}c(n,e);var r=n.prototype;return r.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},r.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},r.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)},n}(gr);gr.registerComponent("ResizeManager",Go);var $o={trackingThreshold:30,liveTolerance:15},Xo=function(e){function n(t,n){var r,i=pr($o,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()})),Bt&&"hidden"in o()&&"visibilityState"in o()&&r.on(o(),"visibilitychange",r.handleVisibilityChange_),r}c(n,e);var r=n.prototype;return r.handleVisibilityChange=function(){this.player_.duration()===1/0&&(o().hidden?this.stopTracking():this.startTracking())},r.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var n=Number(t().performance.now().toFixed(4)),r=-1===this.lastTime_?0:(n-this.lastTime_)/1e3;this.lastTime_=n,this.pastSeekEnd_=this.pastSeekEnd()+r;var i=this.liveCurrentTime(),o=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(i-o)>this.options_.liveTolerance;this.timeupdateSeen_&&i!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}},r.handleDurationchange=function(){this.toggleTracking()},r.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())},r.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Kn),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_)))},r.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},r.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},r.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},r.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_)},r.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},r.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},r.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},r.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},r.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},r.isLive=function(){return this.isTracking()},r.atLiveEdge=function(){return!this.behindLiveEdge()},r.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},r.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},r.behindLiveEdge=function(){return this.behindLiveEdge_},r.isTracking=function(){return"number"==typeof this.trackingInterval_},r.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},r.dispose=function(){this.off(o(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},n}(gr);gr.registerComponent("LiveTracker",Xo);var Ko,Yo=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 o=0;o<n.length;o++){var a=n[o].src;a&&-1===r.indexOf(a)&&r.push(a)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},Qo=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var n=o().createElement(this.nodeName.toLowerCase());n.innerHTML=e;for(var r=o().createDocumentFragment();n.childNodes.length;)r.appendChild(n.childNodes[0]);return this.innerText="",t().Element.prototype.appendChild.call(this,r),this.innerHTML}}),Jo=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},Zo=function(e){var n=e.el();if(!n.resetSourceWatch_){var r={},i=function(e){return Jo([e.el(),t().HTMLMediaElement.prototype,t().Element.prototype,Qo],"innerHTML")}(e),o=function(t){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=t.apply(n,i);return Yo(e),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){n[e]&&(r[e]=n[e],n[e]=o(r[e]))})),Object.defineProperty(n,"innerHTML",pr(i,{set:o(i.set)})),n.resetSourceWatch_=function(){n.resetSourceWatch_=null,Object.keys(r).forEach((function(e){n[e]=r[e]})),Object.defineProperty(n,"innerHTML",i)},e.one("sourceset",n.resetSourceWatch_)}},ea=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Wr(t().Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return t().Element.prototype.setAttribute.call(this,"src",e),e}}),ta=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})},o={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(o.set=i),Object.defineProperty(e,t,o)},na=function(e){function n(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,o=!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 a=r.el_.childNodes,s=a.length,u=[];s--;){var c=a[s];"track"===c.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(c),r.remoteTextTracks().addTrack(c.track),r.textTracks().addTrack(c.track),o||r.el_.hasAttribute("crossorigin")||!$r(c.src)||(o=!0)):u.push(c))}for(var l=0;l<u.length;l++)r.el_.removeChild(u[l])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&dt.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_(),(Vt||qt||It)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}c(n,e);var r=n.prototype;return r.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),n.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},r.setupSourcesetHandling_=function(){!function(e){if(e.featuresSourceset){var n=e.el();if(!n.resetSourceset_){var r=function(e){return Jo([e.el(),t().HTMLMediaElement.prototype,ea],"src")}(e),i=n.setAttribute,o=n.load;Object.defineProperty(n,"src",pr(r,{set:function(t){var i=r.set.call(n,t);return e.triggerSourceset(n.src),i}})),n.setAttribute=function(t,r){var o=i.call(n,t,r);return/src/i.test(t)&&e.triggerSourceset(n.src),o},n.load=function(){var t=o.call(n);return Yo(e)||(e.triggerSourceset(""),Zo(e)),t},n.currentSrc?e.triggerSourceset(n.currentSrc):Yo(e)||Zo(e),n.resetSourceset_=function(){n.resetSourceset_=null,n.load=o,n.setAttribute=i,Object.defineProperty(n,"src",r),n.resetSourceWatch_&&n.resetSourceWatch_()}}}}(this)},r.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)}))},r.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)}},r.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},r.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},r.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 o={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[ni.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=o,Object.keys(o).forEach((function(e){var n=o[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",a),this.on("dispose",(function(e){return t.off("loadstart",a)}))}},r.proxyNativeTracks_=function(){var e=this;ti.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},r.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),n.disposeMediaElement(e),e=t}else{e=o().createElement("video");var r=pr({},this.options_.tag&&un(this.options_.tag));Vt&&!0===this.options_.nativeControlsForTouch||delete r.controls,sn(e,bt(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&ln(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 s=i[a],u=this.options_[s];void 0!==u&&(u?ln(e,s,s):fn(e,s),e[s]=u)}return e},r.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)}))}},r.setScrubbing=function(e){this.isScrubbing_=e},r.scrubbing=function(){return this.isScrubbing_},r.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Wt?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){dt(e,"Video is not ready. (Video.js)")}},r.duration=function(){var e=this;return this.el_.duration===1/0&&Lt&&Mt&&0===this.el_.currentTime?(this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN):this.el_.duration||NaN},r.width=function(){return this.el_.offsetWidth},r.height=function(){return this.el_.offsetHeight},r.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)}))}},r.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=t().navigator&&t().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},r.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Or(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)}},r.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},r.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},r.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},r.reset=function(){n.resetMediaElement(this.el_)},r.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},r.setControls=function(e){this.el_.controls=!!e},r.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},r.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=o().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},r.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},r.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])},r.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),t().performance&&"function"==typeof t().performance.now?e.creationTime=t().performance.now():t().performance&&t().performance.timing&&"number"==typeof t().performance.timing.navigationStart&&(e.creationTime=t().Date.now()-t().performance.timing.navigationStart),e},n}(ii);ta(na,"TEST_VID",(function(){if(Kt()){var e=o().createElement("video"),t=o().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),na.isSupported=function(){try{na.TEST_VID.volume=.5}catch(e){return!1}return!(!na.TEST_VID||!na.TEST_VID.canPlayType)},na.canPlayType=function(e){return na.TEST_VID.canPlayType(e)},na.canPlaySource=function(e,t){return na.canPlayType(e.type)},na.canControlVolume=function(){try{var e=na.TEST_VID.volume;return na.TEST_VID.volume=e/2+.1,e!==na.TEST_VID.volume}catch(e){return!1}},na.canMuteVolume=function(){try{var e=na.TEST_VID.muted;return na.TEST_VID.muted=!e,na.TEST_VID.muted?ln(na.TEST_VID,"muted","muted"):fn(na.TEST_VID,"muted"),e!==na.TEST_VID.muted}catch(e){return!1}},na.canControlPlaybackRate=function(){if(Lt&&Mt&&Nt<58)return!1;try{var e=na.TEST_VID.playbackRate;return na.TEST_VID.playbackRate=e/2+.1,e!==na.TEST_VID.playbackRate}catch(e){return!1}},na.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(o().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(o().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(o().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(o().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},na.supportsNativeTextTracks=function(){return Wt||zt&&Mt},na.supportsNativeVideoTracks=function(){return!(!na.TEST_VID||!na.TEST_VID.videoTracks)},na.supportsNativeAudioTracks=function(){return!(!na.TEST_VID||!na.TEST_VID.audioTracks)},na.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];ta(na.prototype,t,(function(){return na[n]()}),!0)})),na.prototype.movingMediaElementInDOM=!zt,na.prototype.featuresFullscreenResize=!0,na.prototype.featuresProgressEvents=!0,na.prototype.featuresTimeupdateEvents=!0,na.patchCanPlayType=function(){At>=4&&!Rt&&!Mt&&(Ko=na.TEST_VID&&na.TEST_VID.constructor.prototype.canPlayType,na.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":Ko.call(this,e)})},na.unpatchCanPlayType=function(){var e=na.TEST_VID.constructor.prototype.canPlayType;return Ko&&(na.TEST_VID.constructor.prototype.canPlayType=Ko),e},na.patchCanPlayType(),na.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){}}()}},na.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){na.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){na.prototype["set"+hr(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){na.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){na.prototype["set"+hr(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){na.prototype[e]=function(){return this.el_[e]()}})),ii.withSourceHandlers(na),na.nativeSourceHandler={},na.nativeSourceHandler.canPlayType=function(e){try{return na.TEST_VID.canPlayType(e)}catch(e){return""}},na.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return na.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Gr(e.src);return na.nativeSourceHandler.canPlayType("video/"+n)}return""},na.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},na.nativeSourceHandler.dispose=function(){},na.registerSourceHandler(na.nativeSourceHandler),ii.registerTech("Html5",na);var ra=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ia={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},oa=["tiny","xsmall","small","medium","large","xlarge","huge"],aa={};oa.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;aa[e]="vjs-layout-"+t}));var sa={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},ua=function(e){function n(t,r,i){var a;if(t.id=t.id||r.id||"vjs_video_"+Dn(),(r=bt(n.getTagSettings(t),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof t.closest){var u=t.closest("[lang]");u&&u.getAttribute&&(r.language=u.getAttribute("lang"))}else for(var c=t;c&&1===c.nodeType;){if(un(c).hasOwnProperty("lang")){r.language=c.getAttribute("lang");break}c=c.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=yt(a.id_),a.fsApi_=ut,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=t,a.tagAttributes=t&&un(t),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_=n.prototype.options_.languages;a.resetCache_(),a.poster_=r.poster||"",a.controls_=!!r.controls,t.controls=!1,t.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],t.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(),ur(s(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(Hn(o(),a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var f=pr(a.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){a[e](r.plugins[e])})),r.debug&&a.debug(!0),a.options_.playerOptions=f,a.middleware_=[],a.initChildren(),a.isAudio("audio"===t.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"),Vt&&a.addClass("vjs-touch-enabled"),zt||a.addClass("vjs-workinghover"),n.players[a.id_]=s(a);var h=st.split(".")[0];return a.addClass("vjs-v"+h),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}c(n,e);var r=n.prototype;return r.dispose=function(){var t=this;this.trigger("dispose"),this.off("dispose"),qn(o(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),qn(o(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),n.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),ai[this.id()]=null,ri.names.forEach((function(e){var n=ri[e],r=t[n.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this)},r.createEl=function(){var n,r=this.tag,i=this.playerElIngest_=r.parentNode&&r.parentNode.hasAttribute&&r.parentNode.hasAttribute("data-vjs-player"),a="video-js"===this.tag.tagName.toLowerCase();i?n=this.el_=r.parentNode:a||(n=this.el_=e.prototype.createEl.call(this,"div"));var s=un(r);if(a){for(n=this.el_=r,r=this.tag=o().createElement("video");n.children.length;)r.appendChild(n.firstChild);nn(n,"video-js")||rn(n,"video-js"),n.appendChild(r),i=this.playerElIngest_=n,Object.keys(n).forEach((function(e){try{r[e]=n[e]}catch(e){}}))}if(r.setAttribute("tabindex","-1"),s.tabindex="-1",(Bt||Mt&&Ft)&&(r.setAttribute("role","application"),s.role="application"),r.removeAttribute("width"),r.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(e){a&&"class"===e||n.setAttribute(e,s[e]),a&&r.setAttribute(e,s[e])})),r.playerId=r.id,r.id+="_html5_api",r.className="vjs-tech",r.player=n.player=this,this.addClass("vjs-paused"),!0!==t().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=An("vjs-styles-dimensions");var u=En(".vjs-styles-defaults"),c=En("head");c.insertBefore(this.styleEl_,u?u.nextSibling:c.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 l=r.getElementsByTagName("a"),f=0;f<l.length;f++){var h=l.item(f);rn(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return r.initNetworkState_=r.networkState,r.parentNode&&!i&&r.parentNode.insertBefore(n,r),tn(r,n),this.children_.unshift(r),this.el_.setAttribute("lang",this.language_),this.el_=n,n},r.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):dt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},r.width=function(e){return this.dimension("width",e)},r.height=function(e){return this.dimension("height",e)},r.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)?dt.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},r.fluid=function(e){var t,n,r=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,er(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.boundUpdateStyleEl_)},er(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},r.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")},r.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_()},r.updateStyleEl_=function(){if(!0!==t().VIDEOJS_NO_DYNAMIC_STYLE){var e,n,r,i=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),o=i[1]/i[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/o:this.videoWidth()||300,n=void 0!==this.height_?this.height_:e*o,r=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(r),In(this.styleEl_,"\n ."+r+" {\n width: "+e+"px;\n height: "+n+"px;\n }\n\n ."+r+".vjs-fluid {\n padding-top: "+100*o+"%;\n }\n ")}else{var a="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&&(a>=0&&(u.width=a),s>=0&&(u.height=s))}},r.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=hr(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(ii.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),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};ri.names.forEach((function(e){var t=ri[e];o[t.getterName]=n[t.privateName]})),bt(o,this.options_[r]),bt(o,this.options_[i]),bt(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 a,s,u=ii.getTech(e);if(!u)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new u(o),this.tech_.ready(Yn(this,this.handleTechReady_),!0),a=this.textTracksJson_||[],s=this.tech_,a.forEach((function(e){var t=s.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return t.addCue(e)}))})),s.textTracks(),ra.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+hr(e)+"_"](t)}))})),Object.keys(ia).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+ia[e]+"_"].bind(n),event:t}):n["handleTech"+ia[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)},r.unloadTech_=function(){var e,t,n,r=this;ri.names.forEach((function(e){var t=ri[e];r[t.privateName]=r[t.getterName]()})),this.textTracksJson_=(e=this.tech_,t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track})),Array.prototype.map.call(t,(function(e){var t=Cr(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(Cr))),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},r.tech=function(e){return void 0===e&&dt.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_},r.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_)},r.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_)},r.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},r.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_(this.autoplay())},r.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(kr(r))return r.catch(n)};if("any"===e&&!0!==this.muted()?kr(n=this.play())&&(n=n.catch(r)):n="muted"===e&&!0!==this.muted()?r():this.play(),kr(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},r.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 o=r[i];if(o.type&&o.src&&o.src===t)return o.type}return vi(t)}(this,t)),this.cache_.source=pr({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],o=this.$$("source"),a=[],s=0;s<o.length;s++){var u=un(o[s]);i.push(u),u.src&&u.src===t&&a.push(u.src)}a.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},r.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"})},r.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"))},r.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},r.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")},r.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))}))},r.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},r.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},r.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},r.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},r.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},r.handleTechFirstPlay_=function(){this.options_.starttime&&(dt.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")},r.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},r.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},r.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},r.handleTechClick_=function(e){Tn(e)&&this.controls_&&(this.paused()?Or(this.play()):this.pause())},r.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()))},r.handleTechTap_=function(){this.userActive(!this.userActive())},r.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},r.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},r.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},r.handleStageClick_=function(){this.reportUserActivity()},r.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},r.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=o()[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)}},r.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},r.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},r.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},r.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},r.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},r.handleTechError_=function(){var e=this.tech_.error();this.error(e)},r.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},r.getCache=function(){return this.cache_},r.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},r.techCall_=function(e,t){this.ready((function(){if(e in fi)return function(e,t,n,r){return t[n](e.reduce(pi(n),r))}(this.middleware_,this.tech_,e,t);if(e in hi)return ci(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw dt(e),e}}),!0)},r.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in li)return function(e,t,n){return e.reduceRight(pi(n),t[n]())}(this.middleware_,this.tech_,e);if(e in hi)return ci(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw dt("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw dt("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw dt(t),t}}},r.play=function(){var e=this,n=this.options_.Promise||t().Promise;return n?new n((function(t){e.play_(t)})):this.play_()},r.play_=function(e){var t=this;void 0===e&&(e=Or),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||!Wt&&!zt||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},r.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},r.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},r.pause=function(){this.techCall_("pause")},r.paused=function(){return!1!==this.techGet_("paused")},r.played=function(){return this.techGet_("played")||wr(0,0)},r.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")},r.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)},r.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},r.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"))},r.remainingTime=function(){return this.duration()-this.currentTime()},r.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},r.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=wr(0,0)),e},r.bufferedPercent=function(){return Tr(this.buffered(),this.duration())},r.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},r.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)},r.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},r.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},r.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},r.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},r.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_},r.requestFullscreen=function(e){var n=this.options_.Promise||t().Promise;if(n){var r=this;return new n((function(t,n){function i(){r.off("fullscreenerror",a),r.off("fullscreenchange",o)}function o(){i(),t()}function a(e,t){i(),n(t)}r.one("fullscreenchange",o),r.one("fullscreenerror",a);var s=r.requestFullscreenHelper_(e);if(s)return s.then(i,i),s}))}return this.requestFullscreenHelper_()},r.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()?this.techCall_("enterFullScreen"):this.enterFullWindow()},r.exitFullscreen=function(){var e=this.options_.Promise||t().Promise;if(e){var n=this;return new e((function(e,t){function r(){n.off("fullscreenerror",o),n.off("fullscreenchange",i)}function i(){r(),e()}function o(e,n){r(),t(n)}n.one("fullscreenchange",i),n.one("fullscreenerror",o);var a=n.exitFullscreenHelper_();if(a)return a.then(r,r),a}))}return this.exitFullscreenHelper_()},r.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=o()[this.fsApi_.exitFullscreen]();return t&&t.then((function(){return e.isFullscreen(!1)})),t}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},r.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=o().documentElement.style.overflow,Hn(o(),"keydown",this.boundFullWindowOnEscKey_),o().documentElement.style.overflow="hidden",rn(o().body,"vjs-full-window"),this.trigger("enterFullWindow")},r.fullWindowOnEscKey=function(e){p().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},r.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,qn(o(),"keydown",this.boundFullWindowOnEscKey_),o().documentElement.style.overflow=this.docOrigOverflow,on(o().body,"vjs-full-window"),this.trigger("exitFullWindow")},r.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},r.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},r.requestPictureInPicture=function(){if("pictureInPictureEnabled"in o()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},r.exitPictureInPicture=function(){if("pictureInPictureEnabled"in o())return o().exitPictureInPicture()},r.handleKeyDown=function(e){var t,n,r=this.options_.userActions;r&&r.hotkeys&&(t=this.el_.ownerDocument.activeElement,n=t.tagName.toLowerCase(),t.isContentEditable||("input"===n?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type):-1!==["textarea"].indexOf(n))||("function"==typeof r.hotkeys?r.hotkeys.call(this,e):this.handleHotkeys(e)))},r.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return p().isEventKey(e,"f")}:n,i=t.muteKey,a=void 0===i?function(e){return p().isEventKey(e,"m")}:i,s=t.playPauseKey,u=void 0===s?function(e){return p().isEventKey(e,"k")||p().isEventKey(e,"Space")}:s;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var c=gr.getComponent("FullscreenToggle");!1!==o()[this.fsApi_.fullscreenEnabled]&&c.prototype.handleClick.call(this,e)}else a.call(this,e)?(e.preventDefault(),e.stopPropagation(),gr.getComponent("MuteToggle").prototype.handleClick.call(this,e)):u.call(this,e)&&(e.preventDefault(),e.stopPropagation(),gr.getComponent("PlayToggle").prototype.handleClick.call(this,e))},r.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=ii.getTech(i);if(o||(o=gr.getComponent(i)),o){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else dt.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},r.selectSource=function(e){var t,n,r=this,i=this.options_.techOrder.map((function(e){return[e,ii.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(dt.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),o=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 n=e[0];if(e[1].canPlaySource(t,r.options_[n.toLowerCase()]))return{source:t,tech:n}};return t=this.options_.sourceOrder?o(e,i,(n=a,function(e,t){return n(t,e)})):o(i,e,a),t||!1},r.handleSrc_=function(e,t){var n=this;if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var r=mi(e);if(r.length){if(this.changingSrc_=!0,t||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),ui(this,r[0],(function(e,i){var o,a;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());o=i,a=n.tech_,o.forEach((function(e){return e.setTech&&e.setTech(a)}))})),this.options_.retryOnError&&r.length>1){var i=function(){n.error(null),n.handleSrc_(r.slice(1),!0)},o=function(){n.off("error",i)};this.one("error",i),this.one("playing",o),this.resetRetryOnError_=function(){n.off("error",i),n.off("playing",o)}}}else this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},r.src=function(e){return this.handleSrc_(e,!1)},r.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,hr(t)!==hr(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))},r.load=function(){this.techCall_("load")},r.reset=function(){var e=this,n=this.options_.Promise||t().Promise;this.paused()||!n?this.doReset_():Or(this.play().then((function(){return e.doReset_()})))},r.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),er(this)&&this.trigger("playerreset")},r.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},r.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},r.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},r.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},r.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},r.currentSource=function(){return this.cache_.source||{}},r.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},r.currentType=function(){return this.currentSource()&&this.currentSource().type||""},r.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},r.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},r.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},r.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},r.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"))},r.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"))}},r.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_()))},r.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")))},r.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 Sr(e),this.addClass("vjs-error"),dt.error("(CODE:"+this.error_.code+" "+Sr.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},r.reportUserActivity=function(e){this.userActivity_=!0},r.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")}},r.listenForUserActivity_=function(){var e,t,n,r=Yn(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 o,a=this.getChild("controlBar");!a||zt||Lt||(a.on("mouseenter",(function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),a.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(o);var e=this.options_.inactivityTimeout;e<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},r.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},r.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},r.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},r.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},r.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},r.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},r.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},r.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},r.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},r.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),er(this)&&this.trigger("languagechange"))},r.languages=function(){return pr(n.prototype.options_.languages,this.languages_)},r.toJSON=function(){var e=pr(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=pr(r)).player=void 0,e.tracks[n]=r}return e},r.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new xr(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},r.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<oa.length;n++){var r=oa[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(aa[e]),this.addClass(aa[r]),this.breakpoint_=r;break}}},r.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},r.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=bt({},sa,e),this.updateCurrentBreakpoint_()),bt(this.breakpoints_)},r.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},r.currentBreakpoint=function(){return this.breakpoint_},r.currentBreakpointClass=function(){return aa[this.breakpoint_]||""},r.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=pr(e);var r=this.cache_.media,i=r.artwork,o=r.poster,a=r.src,s=r.textTracks;!i&&o&&(this.cache_.media.artwork=[{src:o,type:vi(o)}]),a&&this.src(a),o&&this.poster(o),Array.isArray(s)&&s.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},r.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:vi(t.poster)}]),t}return pr(this.cache_.media)},n.getTagSettings=function(e){var t={sources:[],tracks:[]},n=un(e),r=n["data-setup"];if(nn(e,"vjs-fill")&&(n.fill=!0),nn(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=f()(r||"{}"),o=i[0],a=i[1];o&&dt.error(o),bt(n,a)}if(bt(t,n),e.hasChildNodes())for(var s=e.childNodes,u=0,c=s.length;u<c;u++){var l=s[u],h=l.nodeName.toLowerCase();"source"===h?t.sources.push(un(l)):"track"===h&&t.tracks.push(un(l))}return t},r.flexNotSupported_=function(){var e=o().createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},r.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}(gr);ri.names.forEach((function(e){var t=ri[e];ua.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),ua.prototype.crossorigin=ua.prototype.crossOrigin,ua.players={};var ca=t().navigator;ua.prototype.options_={techOrder:ii.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:ca&&(ca.languages&&ca.languages[0]||ca.userLanguage||ca.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){ua.prototype[e]=function(){return this.techGet_(e)}})),ra.forEach((function(e){ua.prototype["handleTech"+hr(e)+"_"]=function(){return this.trigger(e)}})),gr.registerComponent("Player",ua);var la="plugin",fa="activePlugins_",ha={},pa=function(e){return ha.hasOwnProperty(e)},da=function(e){return pa(e)?ha[e]:void 0},ya=function(e,t){e[fa]=e[fa]||{},e[fa][t]=!0},va=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},ma=function(e,t){return t.prototype.name=e,function(){va(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 o=function(e,t,n){if(g())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&u(i,n.prototype),i}(t,[this].concat(r));return this[e]=function(){return o},va(this,o.getEventHash()),o}},ga=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)),ur(this),delete this.trigger,lr(this,this.constructor.defaultState),ya(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={}),zn(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[fa][e]=!1,this.player=this.state=null,t[e]=ma(e,ha[e])},e.isBasic=function(t){var n="string"==typeof t?da(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(pa(t))dt.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(ua.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 ha[t]=n,t!==la&&(e.isBasic(n)?ua.prototype[t]=function(e,t){var n=function(){va(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return ya(this,e),va(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):ua.prototype[t]=ma(t,n)),n},e.deregisterPlugin=function(e){if(e===la)throw new Error("Cannot de-register base plugin.");pa(e)&&(delete ha[e],delete ua.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(ha)),e.forEach((function(e){var n=da(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=da(e);return t&&t.VERSION||""},e}();ga.getPlugin=da,ga.BASE_PLUGIN_NAME=la,ga.registerPlugin(la,ga),ua.prototype.usingPlugin=function(e){return!!this[fa]&&!0===this[fa][e]},ua.prototype.hasPlugin=function(e){return!!pa(e)};var ba=function(e){return 0===e.indexOf("#")?e.slice(1):e};function _a(e,t,n){var r=_a.getPlayer(e);if(r)return t&&dt.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?En("#"+ba(e)):e;if(!Yt(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||dt.warn("The element supplied is not included in the DOM"),t=t||{},_a.hooks("beforesetup").forEach((function(e){var n=e(i,pr(t));_t(n)&&!Array.isArray(n)?t=pr(t,n):dt.error("please return an object in beforesetup hooks")}));var o=gr.getComponent("Player");return r=new o(i,t,n),_a.hooks("setup").forEach((function(e){return e(r)})),r}if(_a.hooks_={},_a.hooks=function(e,t){return _a.hooks_[e]=_a.hooks_[e]||[],t&&(_a.hooks_[e]=_a.hooks_[e].concat(t)),_a.hooks_[e]},_a.hook=function(e,t){_a.hooks(e,t)},_a.hookOnce=function(e,t){_a.hooks(e,[].concat(t).map((function(t){return function n(){return _a.removeHook(e,n),t.apply(void 0,arguments)}})))},_a.removeHook=function(e,t){var n=_a.hooks(e).indexOf(t);return!(n<=-1||(_a.hooks_[e]=_a.hooks_[e].slice(),_a.hooks_[e].splice(n,1),0))},!0!==t().VIDEOJS_NO_DYNAMIC_STYLE&&Kt()){var wa=En(".vjs-styles-defaults");if(!wa){wa=An("vjs-styles-defaults");var Ta=En("head");Ta&&Ta.insertBefore(wa,Ta.firstChild),In(wa,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}xn(1,_a),_a.VERSION=st,_a.options=ua.prototype.options_,_a.getPlayers=function(){return ua.players},_a.getPlayer=function(e){var t,n=ua.players;if("string"==typeof e){var r=ba(e),i=n[r];if(i)return i;t=En("#"+r)}else t=e;if(Yt(t)){var o=t,a=o.player,s=o.playerId;if(a||n[s])return a||n[s]}},_a.getAllPlayers=function(){return Object.keys(ua.players).map((function(e){return ua.players[e]})).filter(Boolean)},_a.players=ua.players,_a.getComponent=gr.getComponent,_a.registerComponent=function(e,t){ii.isTech(t)&&dt.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),gr.registerComponent.call(gr,e,t)},_a.getTech=ii.getTech,_a.registerTech=ii.registerTech,_a.use=function(e,t){oi[e]=oi[e]||[],oi[e].push(t)},Object.defineProperty(_a,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(_a.middleware,"TERMINATOR",{value:si,writeable:!1,enumerable:!0}),_a.browser=Gt,_a.TOUCH_ENABLED=Vt,_a.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),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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},_a.mergeOptions=pr,_a.bind=Yn,_a.registerPlugin=ga.registerPlugin,_a.deregisterPlugin=ga.deregisterPlugin,_a.plugin=function(e,t){return dt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),ga.registerPlugin(e,t)},_a.getPlugins=ga.getPlugins,_a.getPlugin=ga.getPlugin,_a.getPluginVersion=ga.getPluginVersion,_a.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),_a.options.languages=pr(_a.options.languages,((n={})[e]=t,n)),_a.options.languages[e]},_a.log=dt,_a.createLogger=yt,_a.createTimeRange=_a.createTimeRanges=wr,_a.formatTime=Ri,_a.setFormatTime=function(e){Ii=e},_a.resetFormatTime=function(){Ii=Ai},_a.parseUrl=zr,_a.isCrossOrigin=$r,_a.EventTarget=Jn,_a.on=Hn,_a.one=Wn,_a.off=qn,_a.trigger=zn,_a.xhr=y(),_a.TextTrack=Qr,_a.AudioTrack=Jr,_a.VideoTrack=Zr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){_a[e]=function(){return dt.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),On[e].apply(null,arguments)}})),_a.computedStyle=Tt,_a.dom=On,_a.url=Xr,_a.defineLazyProperty=ta,_a.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Sa=w,Ea=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},ka=function(e){return _a.log.debug?_a.log.debug.bind(_a,"VHS:",e+" >"):function(){}},Oa=_a.log,Ca=function(e,t){return e+"-"+t},Pa=function(e){var t=e.onwarn,n=e.oninfo,r=e.manifestString,i=e.customTagParsers,o=void 0===i?[]:i,a=e.customTagMappers,s=void 0===a?[]:a,u=e.experimentalLLHLS,c=new A;t&&c.on("warn",t),n&&c.on("info",n),o.forEach((function(e){return c.addParser(e)})),s.forEach((function(e){return c.addTagMapper(e)})),c.push(r),c.end();var l=c.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){l.hasOwnProperty(e)&&delete l[e]})),l.segments&&l.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!l.targetDuration){var f=10;l.segments&&l.segments.length&&(f=l.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+f),l.targetDuration=f}return l},xa=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 o=e.mediaGroups[n][r][i];t(o,n,r,i)}}))},ja=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,n&&(t.uri=n),t.attributes=t.attributes||{}},La=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}xa(e,(function(t,n,r,i){var o="placeholder-uri-"+n+"-"+r+"-"+i;t.playlists&&t.playlists.length||(t.playlists=[a({},t)]),t.playlists.forEach((function(t,n){var r=Ca(n,o);t.uri?t.resolvedUri=t.resolvedUri||Sa(e.uri,t.uri):(t.uri=0===n?o: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];ja({playlist:n,id:Ca(t,n.uri)}),n.resolvedUri=Sa(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||Oa.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){xa(e,(function(t){t.uri&&(t.resolvedUri=Sa(e.uri,t.uri))}))}(e)},Aa=_a.mergeOptions,Ia=_a.EventTarget,Ra=function(e,t){if(!e)return t;var n=Aa(e,t);if(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]=Aa(e.parts[r],t.parts[r]));return n},Da=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=Sa(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Sa(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Sa(t,e.map.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=Sa(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=Sa(t,e.uri))}))},Ma=function(e){var t=e.segments||[];return e.preloadSegment&&e.preloadSegment.parts&&t.push(e.preloadSegment),t},Na=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence},Ba=function(e,t,n){void 0===n&&(n=Na);var r=Aa(e,{}),i=r.playlists[t.id];if(!i)return null;if(n(i,t))return null;var o=Aa(i,t);t.segments=Ma(t),i.segments&&(o.segments=function(e,t,n){var r=e.slice(),i=t.slice();n=n||0;for(var o=Math.min(e.length,t.length+n),a=n;a<o;a++){var s=a-n;i[s]=Ra(r[a],i[s])}return i}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),o.segments.forEach((function(e){Da(e,o.resolvedUri)}));for(var a=0;a<r.playlists.length;a++)r.playlists[a].id===t.id&&(r.playlists[a]=o);return r.playlists[t.id]=o,r.playlists[t.uri]=o,xa(e,(function(e,n,r,i){if(e.playlists)for(var o=0;o<e.playlists.length;o++)t.id===e.playlists[o].id&&(e.playlists[o]=t)})),r},Ua=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)},Fa=function(e){function n(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_=ka("PlaylistLoader");var o=r,a=o.withCredentials,s=void 0!==a&&a,u=o.handleManifestRedirects,c=void 0!==u&&u;i.src=t,i.vhs_=n,i.withCredentials=s,i.handleManifestRedirects=c;var l=n.options_;return i.customTagParsers=l&&l.customTagParsers||[],i.customTagMappers=l&&l.customTagMappers||[],i.experimentalLLHLS=l&&l.experimentalLLHLS||!1,i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.vhs_.xhr({uri:Sa(i.master.uri,i.media().uri),withCredentials:i.withCredentials},(function(e,t){if(i.request)return e?i.playlistRequestError(i.request,i.media(),"HAVE_METADATA"):void i.haveMetadata({playlistString:i.request.responseText,url:i.media().uri,id:i.media().id})})))})),i}c(n,e);var r=n.prototype;return r.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")},r.haveMetadata=function(e){var n=this,r=e.playlistString,i=e.playlistObject,o=e.url,a=e.id;this.request=null,this.state="HAVE_METADATA";var s=i||Pa({onwarn:function(e){var t=e.message;return n.logger_("m3u8-parser warn for "+a+": "+t)},oninfo:function(e){var t=e.message;return n.logger_("m3u8-parser info for "+a+": "+t)},manifestString:r,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS});s.lastRequest=Date.now(),ja({playlist:s,uri:o,id:a});var u=Ba(this.master,s);this.targetDuration=s.partTargetDuration||s.targetDuration,u?(this.master=u,this.media_=this.master.playlists[a]):this.trigger("playlistunchanged"),this.media().endList||(t().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=t().setTimeout((function(){n.trigger("mediaupdatetimeout")}),Ua(this.media(),!!u))),this.trigger("loadedplaylist")},r.dispose=function(){this.trigger("dispose"),this.stopRequest(),t().clearTimeout(this.mediaUpdateTimeout),t().clearTimeout(this.finalRenditionTimeout),this.off()},r.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},r.media=function(e,n){var r=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(t().clearTimeout(this.finalRenditionTimeout),n){var i=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=t().setTimeout(this.media.bind(this,e,!1),i)}else{var o=this.state,a=!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(a&&(this.trigger("mediachanging"),"HAVE_MASTER"===o?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(a){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,n){if(r.request){if(e.lastRequest=Date.now(),e.resolvedUri=Ea(r.handleManifestRedirects,e.resolvedUri,n),t)return r.playlistRequestError(r.request,e,o);r.haveMetadata({playlistString:n.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===o?r.trigger("loadedmetadata"):r.trigger("mediachange")}}))}}},r.pause=function(){this.stopRequest(),t().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")},r.load=function(e){var n=this;t().clearTimeout(this.mediaUpdateTimeout);var r=this.media();if(e){var i=r?(r.partTargetDuration||r.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=t().setTimeout((function(){return n.load()}),i)}else this.started?r&&!r.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},r.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=t().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=Ea(e.handleManifestRedirects,e.src,n);var r=Pa({manifestString:n.responseText,customTagParsers:e.customTagParsers,customTagMappers:e.customTagMappers,experimentalLLHLS:e.experimentalLLHLS});e.setupInitialPlaylist(r)}}))},r.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},r.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,La(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Ma(e),e.segments.forEach((function(t){Da(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var n=this.srcUri()||t().location.href;this.master=function(e,n){var r=Ca(0,n),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:t().location.href,resolvedUri:t().location.href,playlists:[{uri:n,id:r,resolvedUri:n,attributes:{}}]};return i.playlists[r]=i.playlists[0],i.playlists[n]=i.playlists[0],i}(0,n),this.haveMetadata({playlistObject:e,url:n,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},n}(Ia),Va=1/30,Ha=.1,qa=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 _a.createTimeRanges(r)},za=function(e,t){return qa(e,(function(e,n){return e-Ha<=t&&n+Ha>=t}))},Wa=function(e,t){return qa(e,(function(e){return e-Va>=t}))},Ga=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(", ")},$a=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},Xa=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ka=_a.createTimeRange,Ya=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=t.segments&&t.segments.length&&t.segments[t.segments.length-1],r=n&&n.parts&&n.parts.length;return r&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:r&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},Qa=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},Ja=function(e,n,r){if(!e)return 0;if("number"!=typeof r&&(r=0),void 0===n){if(e.totalDuration)return e.totalDuration;if(!e.endList)return t()[1/0]}return Qa(e,n,r)},Za=function(e,t,n){var r=0;if(t>n){var i=[n,t];t=i[0],n=i[1]}if(t<0){for(var o=t;o<Math.min(0,n);o++)r+=e.targetDuration;t=0}for(var a=t;a<n;a++)r+=e.segments[a].duration;return r},es=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return Ja(e);if(null===t)return null;t=t||0;var i=Qa(e,e.mediaSequence+e.segments.length,t);return n&&(i-=r="number"==typeof r?r:Ya(null,e)),Math.max(0,i)},ts=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},ns=function(e){return e.excludeUntil&&e.excludeUntil===1/0},rs=function(e){var t=ts(e);return!e.disabled&&!t},is=function(e,t){return t.attributes&&t.attributes[e]},os=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!!rs(e)&&(e.attributes.BANDWIDTH||0)<n})).length},as=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))},ss=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},r=!1;for(var i in n){for(var o in n[i])if(r=t(n[i][o]))break;if(r)break}return!!r},us=function(e){if(!e||!e.playlists||!e.playlists.length)return ss(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 B(e)}))||ss(e,(function(e){return as(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},cs={liveEdgeDelay:Ya,duration:Ja,seekable:function(e,t,n){var r=t||0,i=es(e,t,!0,n);return null===i?Ka():Ka(r,i)},getMediaInfoForTime:function(e,t,n,r){var i=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(t,r){e.push({duration:t.duration,segmentIndex:n,partIndex:r})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null}),e}),[])}(e),o=t-r;if(o<0){if(n>0)for(var a=n-1;a>=0;a--){var s=i[a];if((o+=s.duration+Va)>0)return{mediaIndex:s.segmentIndex,startTime:r-Za(e,n,s.segmentIndex),partIndex:s.partIndex}}return{mediaIndex:i[0]&&i[0].segmentIndex||0,partIndex:i[0]&&i[0].partIndex||null,startTime:t}}if(n<0){for(var u=n;u<0;u++)if((o-=e.targetDuration)<0)return{mediaIndex:i[0].segmentIndex,startTime:t};n=0}for(var c=n;c<i.length;c++){var l=i[c];if((o-=l.duration+Va)<0)return{mediaIndex:l.segmentIndex,startTime:r+Za(e,n,l.segmentIndex),partIndex:l.partIndex}}return{mediaIndex:i[i.length-1].segmentIndex,partIndex:i[i.length-1].partIndex,startTime:t}},isEnabled:rs,isDisabled:function(e){return e.disabled},isBlacklisted:ts,isIncompatible:ns,playlistEnd:es,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:is,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),is("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:os,isAudioOnly:us,playlistMatch:as},ls=_a.xhr,fs=_a.mergeOptions,hs=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)},ps=function(){var e=function e(t,n){t=fs({timeout:45e3},t);var r=e.beforeRequest||_a.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var o=(!0===_a.Vhs.xhr.original?ls:_a.Vhs.xhr)(t,(function(e,t){return hs(o,e,t,n)})),a=o.abort;return o.abort=function(){return o.aborted=!0,a.apply(o,arguments)},o.uri=t.uri,o.requestTime=Date.now(),o};return e.original=!0,e},ds=function(e){var t,n,r={};return e.byterange&&(r.Range=(n=(t=e.byterange).offset+t.length-1,"bytes="+t.offset+"-"+n)),r},ys=function(e,t){return e.start(t)+"-"+e.end(t)},vs=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},ms=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},gs=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(",")},_s=function(e){return e.resolvedUri},ws=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(vs).join("")+" "+t.slice(i*n,i*n+n).map(ms).join("")+"\n";return r},Ts=Object.freeze({__proto__:null,createTransferableMessage:gs,initSegmentId:bs,segmentKeyId:_s,hexDump:ws,tagDump:function(e){var t=e.bytes;return ws(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=ys(e,t)+" ";return n}}),Ss=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,o=void 0===i?2:i,a=t.seekTo,s=t.pauseAfterSeek,u=void 0===s||s,c=t.tech,l=t.callback;if(!l)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!a)return l({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!c.hasStarted_)return l({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 l({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var f=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 o,a=t.segments[t.segments.length-1],s=a.dateTimeObject,u=a.videoTimingInfo?(o=a.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:a.duration+.25*a.duration;return n>new Date(s.getTime()+1e3*u)?null:(n>s&&(r=a),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:cs.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!f)return l({message:n+" was not found in the stream"});var h=f.segment,p=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}(h.dateTimeObject,n);if("estimate"===f.type)return 0===o?l({message:n+" is not buffered yet. Try again"}):(a(f.estimatedStart+p),void c.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:o-1,seekTo:a,pauseAfterSeek:u,tech:c,callback:l})})));var d=h.start+p;c.one("seeked",(function(){return l(null,c.currentTime())})),u&&c.pause(),a(d)},Es=function(e,t){if(4===e.readyState)return t()},ks=_a.EventTarget,Os=_a.mergeOptions,Cs=function(e,t){if(!Na(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 o=r.byterange,a=i.byterange;if(o&&!a||!o&&a)return!1;if(o.offset!==a.offset||o.length!==a.length)return!1}}return!0},Ps=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},xs=function(e,t){var n={};for(var r in e){var i=e[r].sidx;if(i){var o=ie(i);if(!t[o])break;var a=t[o].sidxInfo;Ps(a,i)&&(n[o]=t[o])}}return n},js=function(e){function n(t,n,r,i){var o;void 0===r&&(r={}),(o=e.call(this)||this).masterPlaylistLoader_=i||s(o),i||(o.isMaster_=!0);var a=r,u=a.withCredentials,c=void 0!==u&&u,l=a.handleManifestRedirects,f=void 0!==l&&l;if(o.vhs_=n,o.withCredentials=c,o.handleManifestRedirects=f,!t)throw new Error("A non-empty playlist URL or object is required");return o.on("minimumUpdatePeriod",(function(){o.refreshXml_()})),o.on("mediaupdatetimeout",(function(){o.refreshMedia_(o.media().id)})),o.state="HAVE_NOTHING",o.loadedPlaylists_={},o.logger_=ka("DashPlaylistLoader"),o.isMaster_?(o.masterPlaylistLoader_.srcUrl=t,o.masterPlaylistLoader_.sidxMapping_={}):o.childPlaylist_=t,o}c(n,e);var r=n.prototype;return r.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)},r.addSidxSegments_=function(e,n,r){var i=this,o=e.sidx&&ie(e.sidx);if(e.sidx&&o&&!this.masterPlaylistLoader_.sidxMapping_[o]){var a=Ea(this.handleManifestRedirects,e.sidx.resolvedUri),s=function(t,a){if(!i.requestErrored_(t,a,n)){var s,u=i.masterPlaylistLoader_.sidxMapping_;try{s=Le()(Ae(a.response).subarray(8))}catch(e){return void i.requestErrored_(e,a,n)}return u[o]={sidxInfo:e.sidx,sidx:s},re(e,s,e.sidx.resolvedUri),r(!0)}};this.request=function(e,t,n){var r,i=[],o=!1,a=function(e,t,r,i){return t.abort(),o=!0,n(e,t,r,i)},s=function(e,t){if(!o){if(e)return a(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 Ae(t[0]);var r=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),i=new Uint8Array(r),o=0;return t.forEach((function(e){e=Ae(e),i.set(e,o),o+=e.byteLength})),i}(i,Me(n,!0)),r=r||Ue(i),i.length<10||r&&i.length<r+2)return Es(t,(function(){return a(e,t,"",i)}));var s=ot(i);return"ts"===s&&i.length<188||!s&&i.length<376?Es(t,(function(){return a(e,t,"",i)})):a(null,t,s,i)}},u={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,hs(e,null,{statusCode:e.status},s)}))}},c=t(u,(function(e,t){return hs(c,e,t,s)}));return c}(a,this.vhs_.xhr,(function(t,n,r,o){if(t)return s(t,n);if(!r||"mp4"!==r)return s({status:n.status,message:"Unsupported "+(r||"unknown")+" container type for sidx segment at URL: "+a,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var u=e.sidx.byterange,c=u.offset,l=u.length;if(o.length>=l+c)return s(t,{response:o.subarray(c,c+l),status:n.status,uri:n.uri});i.request=i.vhs_.xhr({uri:a,responseType:"arraybuffer",headers:ds({byterange:e.sidx.byterange})},s)}))}else this.mediaRequest_=t().setTimeout((function(){return r(!1)}),0)},r.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},t().clearTimeout(this.minimumUpdatePeriodTimeout_),t().clearTimeout(this.mediaRequest_),t().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()},r.hasPendingRequest=function(){return this.request||this.mediaRequest_},r.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},r.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})})))},r.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")},r.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),t().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(t().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},r.load=function(e){var n=this;t().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var r=this.media();if(e){var i=r?r.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=t().setTimeout((function(){return n.load()}),i)}else this.started?r&&!r.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},r.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_=t().setTimeout((function(){return e.haveMaster_()}),0)},r.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=Ea(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)}))},r.syncClientServerClock_=function(e){var t,n=this,r=(t=this.masterPlaylistLoader_.masterXml_,function(e){var t=be(e,"UTCTiming")[0];if(!t)return null;var n=Se(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;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return n}(Pe(t)));return null===r?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===r.method?(this.masterPlaylistLoader_.clientOffset_=r.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Sa(this.masterPlaylistLoader_.srcUrl,r.value),method:r.method,withCredentials:this.withCredentials},(function(t,i){if(n.request){if(t)return n.masterPlaylistLoader_.clientOffset_=n.masterLoaded_-Date.now(),e();var o;o="HEAD"===r.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):n.masterLoaded_:Date.parse(i.responseText),n.masterPlaylistLoader_.clientOffset_=o-Date.now(),e()}})))},r.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},r.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,r=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},n=xe(e.masterXml,{manifestUri:t=e.srcUrl,clientOffset:e.clientOffset,sidxMapping:e.sidxMapping}),La(n,t),n),i=this.masterPlaylistLoader_.master;i&&(r=function(e,t,n){for(var r=!0,i=Os(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),o=0;o<t.playlists.length;o++){var a=t.playlists[o];if(a.sidx){var s=ie(a.sidx);n&&n[s]&&n[s].sidx&&re(a,n[s].sidx,a.sidx.resolvedUri)}var u=Ba(i,a,Cs);u&&(i=u,r=!1)}return xa(t,(function(e,t,n,o){if(e.playlists&&e.playlists.length){var a=e.playlists[0].id,s=Ba(i,e.playlists[0],Cs);s&&((i=s).mediaGroups[t][n][o].playlists[0]=i.playlists[a],r=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:i}(i,r,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=r||i;var o=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return o&&o!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=o),(!i||r&&r.minimumUpdatePeriod!==i.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(r)},r.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(t().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var n=e.master&&e.master.minimumUpdatePeriod;0===n&&(e.media()?n=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof n||n<=0?n<0&&this.logger_("found invalid minimumUpdatePeriod of "+n+", not setting a timeout"):this.createMUPTimeout_(n)},r.createMUPTimeout_=function(e){var n=this.masterPlaylistLoader_;n.minimumUpdatePeriodTimeout_=t().setTimeout((function(){n.minimumUpdatePeriodTimeout_=null,n.trigger("minimumUpdatePeriod"),n.createMUPTimeout_(e)}),e)},r.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var r,i,o;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,i=e.masterPlaylistLoader_.sidxMapping_,o=xs(r.playlists,i),xa(r,(function(e,t,n,r){if(e.playlists&&e.playlists.length){var a=e.playlists;o=Os(o,xs(a,i))}})),o),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},r.refreshMedia_=function(e){var n=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var r=this.masterPlaylistLoader_.master.playlists,i=!this.media_||this.media_!==r[e];i?this.media_=r[e]:this.trigger("playlistunchanged"),this.mediaUpdateTimeout||function e(){n.media().endList||(n.mediaUpdateTimeout=t().setTimeout((function(){n.trigger("mediaupdatetimeout"),e()}),Ua(n.media(),Boolean(i))))}(),this.trigger("loadedplaylist")},n}(ks),Ls={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},As=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Is=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=As(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}},Rs=function(e){return"var browserWorkerPolyFill = "+As.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},Ds=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Ms=Rs(Ds((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,o;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(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},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,o,a,s,u,c,l,f,h,p,d,y,v,m,g,b,_,w,T,S,E,k,O,C,P,x,j,L,A,I,R,D,M,N,B,U,F,V=e,H=Math.pow(2,32)-1;!function(){var e;if(T={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 T)T.hasOwnProperty(e)&&(T[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)]),k=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),E=new Uint8Array([0,0,0,1]),O=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]),C=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]),P={video:O,audio:C},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),j=new Uint8Array([0,0,0,0,0,0,0,0]),A=new Uint8Array([0,0,0,0,0,0,0,0]),I=A,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),D=A,x=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(T.dinf,t(T.dref,L))},r=function(e){return t(T.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]))},y=function(e){return t(T.hdlr,P[e])},d=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(T.mdhd,n)},p=function(e){return t(T.mdia,d(e),y(e.type),a(e))},o=function(e){return t(T.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},a=function(e){return t(T.minf,"video"===e.type?t(T.vmhd,x):t(T.smhd,j),n(),m(e))},s=function(e,n){for(var r=[],i=n.length;i--;)r[i]=b(n[i]);return t.apply(null,[T.moof,o(e)].concat(r))},u=function(e){for(var n=e.length,r=[];n--;)r[n]=f(e[n]);return t.apply(null,[T.moov,l(4294967295)].concat(r).concat(c(e)))},c=function(e){for(var n=e.length,r=[];n--;)r[n]=_(e[n]);return t.apply(null,[T.mvex].concat(r))},l=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(T.mvhd,n)},v=function(e){var n,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(T.sdtp,o)},m=function(e){return t(T.stbl,g(e),t(T.stts,D),t(T.stsc,I),t(T.stsz,R),t(T.stco,A))},g=function(e){return t(T.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?M(e):N(e))},M=function(e){var n,r,i=e.sps||[],o=e.pps||[],a=[],s=[];for(n=0;n<i.length;n++)a.push((65280&i[n].byteLength)>>>8),a.push(255&i[n].byteLength),a=a.concat(Array.prototype.slice.call(i[n]));for(n=0;n<o.length;n++)s.push((65280&o[n].byteLength)>>>8),s.push(255&o[n].byteLength),s=s.concat(Array.prototype.slice.call(o[n]));if(r=[T.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(T.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],a,[o.length],s))),t(T.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],c=e.sarRatio[1];r.push(t(T.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return t.apply(null,r)},N=function(e){return t(T.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))},h=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(T.tkhd,n)},b=function(e){var n,r,i,o,a,s;return n=t(T.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])),a=Math.floor(e.baseMediaDecodeTime/(H+1)),s=Math.floor(e.baseMediaDecodeTime%(H+1)),r=t(T.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),"audio"===e.type?(i=w(e,92),t(T.traf,n,r,i)):(o=v(e),i=w(e,o.length+92),t(T.traf,n,r,i,o))},f=function(e){return e.duration=e.duration||4294967295,t(T.trak,h(e),p(e))},_=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(T.trex,n)},F=function(e,t){var n=0,r=0,i=0,o=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&&(o=8)),[0,0,n|r|i|o,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]},U=function(e,n){var r,i,o,a,s,u;for(n+=20+16*(a=e.samples||[]).length,o=F(a,n),(i=new Uint8Array(o.length+16*a.length)).set(o),r=o.length,u=0;u<a.length;u++)s=a[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(T.trun,i)},B=function(e,n){var r,i,o,a,s,u;for(n+=20+8*(a=e.samples||[]).length,o=F(a,n),(r=new Uint8Array(o.length+8*a.length)).set(o),i=o.length,u=0;u<a.length;u++)s=a[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(T.trun,r)},w=function(e,t){return"audio"===e.type?B(e,t):U(e,t)},i=function(){return t(T.ftyp,S,E,S,k)};var q,z,W,G,$,X,K,Y,Q=function(e){return t(T.mdat,e)},J=s,Z=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},ee=[33,16,5,32,164,27],te=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ne=function(e){for(var t=[];e--;)t.push(0);return t},re=9e4;X=function(e,t){return z($(e,t))},K=function(e,t){return W(G(e),t)},Y=function(e,t,n){return G(n?e:e-t)};var ie=re,oe=z=function(e){return e*re},ae=(W=function(e,t){return e*t},G=function(e){return e/re}),se=($=function(e,t){return e/t},X),ue=K,ce=Y,le=function(e,t,n,r){var i,o,a,s,u,c=0,l=0,f=0;if(t.length&&(i=se(e.baseMediaDecodeTime,e.samplerate),o=Math.ceil(ie/(e.samplerate/1024)),n&&r&&(c=i-Math.max(n,r),f=(l=Math.floor(c/o))*o),!(l<1||f>45e3))){for((a=function(){if(!q){var e={96e3:[ee,[227,64],ne(154),[56]],88200:[ee,[231],ne(170),[56]],64e3:[ee,[248,192],ne(240),[56]],48e3:[ee,[255,192],ne(268),[55,148,128],ne(54),[112]],44100:[ee,[255,192],ne(268),[55,163,128],ne(84),[112]],32e3:[ee,[255,192],ne(268),[55,234],ne(226),[112]],24e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,112],ne(126),[224]],16e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,255],ne(269),[223,108],ne(195),[1,192]],12e3:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,253,128],ne(259),[56]],11025:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,255,192],ne(268),[55,175,128],ne(108),[112]],8e3:[te,ne(268),[3,121,16],ne(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}()[e.samplerate])||(a=t[0].data),s=0;s<l;s++)u=t[0],t.splice(0,0,{data:a,dts:u.dts-o,pts:u.pts-o});return e.baseMediaDecodeTime-=Math.floor(ue(f,e.samplerate)),f}},fe=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},he=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/9e4,n=Math.floor(n)),n},pe=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))},de=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new be),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")))};(de.prototype=new V).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=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}(e.escapedRBSP)).payload&&4===t.payloadType&&(n=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)}(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=function(e,t){var n,r,i,o,a=[];if(!(64&t[0]))return a;for(r=31&t[0],n=0;n<r;n++)o={type:3&t[2+(i=3*n)],pts:e},4&t[i+2]&&(o.ccData=t[i+3]<<8|t[i+4],a.push(o));return a}(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},de.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},de.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)},de.prototype.flush=function(){return this.flushStream("flush")},de.prototype.partialFlush=function(){return this.flushStream("partialFlush")},de.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},de.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)},de.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},de.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},de.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},de.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var ye={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},ve=function(e){return 32<=e&&e<=127||160<=e&&e<=255},me=function(e){this.windowNum=e,this.reset()};me.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},me.prototype.getText=function(){return this.rows.join("\n")},me.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},me.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--},me.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},me.prototype.addText=function(e){this.rows[this.rowIdx]+=e},me.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var ge=function(e){this.serviceNum=e,this.text="",this.currentWindow=new me(-1),this.windows=[]};ge.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new me(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},ge.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};var be=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))}};be.prototype=new V,be.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},be.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)},be.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,o=t[i++];for(e.seq=o>>6,e.sizeCode=63&o;i<t.length;i++)r=31&(o=t[i++]),7==(n=o>>5)&&r>0&&(n=o=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},be.prototype.pushServiceBlock=function(e,t,n){var r,i=t,o=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,i));i<t+n&&i<o.length;i++)r=o[i],ve(r)?i=this.handleText(i,a):16===r?i=this.extendedCommands(i,a):128<=r&&r<=135?i=this.setCurrentWindow(i,a):152<=r&&r<=159?i=this.defineWindow(i,a):136===r?i=this.clearWindows(i,a):140===r?i=this.deleteWindows(i,a):137===r?i=this.displayWindows(i,a):138===r?i=this.hideWindows(i,a):139===r?i=this.toggleWindows(i,a):151===r?i=this.setWindowAttributes(i,a):144===r?i=this.setPenAttributes(i,a):145===r?i=this.setPenColor(i,a):146===r?i=this.setPenLocation(i,a):143===r?a=this.reset(i,a):8===r?a.currentWindow.backspace():12===r?a.currentWindow.clearText():13===r?a.currentWindow.pendingNewLine=!0:14===r?a.currentWindow.clearText():141===r&&i++},be.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return ve(n)&&(e=this.handleText(e,t,!0)),e},be.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},be.prototype.initService=function(e,t){var n=this;return this.services[e]=new ge(e),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},be.prototype.handleText=function(e,t,n){var r,i,o=this.current708Packet.data[e],a=(i=ye[r=(n?4096:0)|o]||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(a),e},be.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},be.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,r=n[e],i=7&r;t.setCurrentWindow(i);var o=t.currentWindow;return r=n[++e],o.visible=(32&r)>>5,o.rowLock=(16&r)>>4,o.columnLock=(8&r)>>3,o.priority=7&r,r=n[++e],o.relativePositioning=(128&r)>>7,o.anchorVertical=127&r,r=n[++e],o.anchorHorizontal=r,r=n[++e],o.anchorPoint=(240&r)>>4,o.rowCount=15&r,r=n[++e],o.columnCount=63&r,r=n[++e],o.windowStyle=(56&r)>>3,o.penStyle=7&r,o.virtualRowCount=o.rowCount+1,e},be.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},be.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},be.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)},be.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},be.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},be.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},be.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},be.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},be.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},be.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},be.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},be.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var _e={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},we=function(e){return null===e?"":(e=_e[e]||e,String.fromCharCode(e))},Te=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Se=function(){for(var e=[],t=15;t--;)e.push("");return e},Ee=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,o;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_=Se();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Se();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Se()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))o=we((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),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),o=we((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14&~i||this.addFormatting(e.pts,["i"]),1&~i||this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=Te.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16&~t||(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&(14&~i||this.addFormatting(e.pts,["i"]))}else this.isNormalChar(r)&&(0===i&&(i=null),o=we(r),o+=we(i),this[this.mode_](e.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};Ee.prototype=new V,Ee.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_})},Ee.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Se(),this.nonDisplayed_=Se(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.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_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Se(),this.displayed_=Se()),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},Ee.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)},Ee.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)}},Ee.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},Ee.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},Ee.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_]=""},Ee.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var ke={CaptionStream:de,Cea608Stream:Ee,Cea708Stream:be},Oe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ce="shared",Pe=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},xe=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||Ce,this.push=function(e){this.type_!==Ce&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=Pe(e.dts,r),e.pts=Pe(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")}};xe.prototype=new V;var je,Le=xe,Ae=Pe,Ie=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},Re=function(e,t,n){return decodeURIComponent(Ie(e,t,n))},De=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Me={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=Re(e.data,1,t),e.value=Re(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=Re(e.data,1,t),e.url=Re(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(Ie(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};je=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,i=[],o=0;if(je.prototype.init.call(this),this.dispatchType=Oe.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,a,s,u,c;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(o=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&&console.log("Skipping unrecognized metadata packet");else if(i.push(e),o+=e.data.byteLength,1===i.length&&(r=De(e.data.subarray(6,10)),r+=10),!(o<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},c=0;c<r;)t.data.set(i[0].data.subarray(0,r-c),c),c+=i[0].data.byteLength,o-=i[0].data.byteLength,i.shift();a=10,64&t.data[5]&&(a+=4,a+=De(t.data.subarray(10,14)),r-=De(t.data.subarray(16,20)));do{if((s=De(t.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[a],t.data[a+1],t.data[a+2],t.data[a+3]),data:t.data.subarray(a+10,a+s+10)}).key=u.id,Me[u.id]&&(Me[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var l=u.data,f=(1&l[3])<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;f*=4,f+=3&l[7],u.timeStamp=f,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),a+=10,a+=s}while(a<r);this.trigger("data",t)}}},je.prototype=new V;var Ne,Be,Ue,Fe=je,Ve=Le,He=188;(Ne=function(){var e=new Uint8Array(He),t=0;Ne.prototype.init.call(this),this.push=function(n){var r,i=0,o=He;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;o<r.byteLength;)71!==r[i]||71!==r[o]?(i++,o++):(this.trigger("data",r.subarray(i,o)),i+=He,o+=He);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){t===He&&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 V,Be=function(){var e,t,n,r;Be.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 o=e[i],a=(31&e[i+1])<<8|e[i+2];o===Oe.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=a:o===Oe.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=a:o===Oe.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][a]=o),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=Oe.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Oe.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},Be.prototype=new V,Be.STREAM_TYPES={h264:27,adts:15},Ue=function(){var e,t=this,n={data:[],size:0},r={data:[],size:0},i={data:[],size:0},o=function(e,n,r){var i,o,a=new Uint8Array(e.size),s={type:n},u=0,c=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,u=0;u<e.data.length;u++)o=e.data[u],a.set(o.data,c),c+=o.data.byteLength;var l,f,h,p;f=s,p=(l=a)[0]<<16|l[1]<<8|l[2],f.data=new Uint8Array,1===p&&(f.packetLength=6+(l[4]<<8|l[5]),f.dataAlignmentIndicator=!!(4&l[6]),192&(h=l[7])&&(f.pts=(14&l[9])<<27|(255&l[10])<<20|(254&l[11])<<12|(255&l[12])<<5|(254&l[13])>>>3,f.pts*=4,f.pts+=(6&l[13])>>>1,f.dts=f.pts,64&h&&(f.dts=(14&l[14])<<27|(255&l[15])<<20|(254&l[16])<<12|(255&l[17])<<5|(254&l[18])>>>3,f.dts*=4,f.dts+=(6&l[18])>>>1)),f.data=l.subarray(9+l[8])),i="video"===n||s.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",s)}};Ue.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,t;switch(a.streamType){case Oe.H264_STREAM_TYPE:e=n,t="video";break;case Oe.ADTS_STREAM_TYPE:e=r,t="audio";break;case Oe.METADATA_STREAM_TYPE:e=i,t="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=a.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)}})[a.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(n,"video"),o(r,"audio"),o(i,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}},Ue.prototype=new V;var qe={PAT_PID:0,MP2T_PACKET_LENGTH:He,TransportPacketStream:Ne,TransportParseStream:Be,ElementaryStream:Ue,TimestampRolloverStream:Ve,CaptionStream:ke.CaptionStream,Cea608Stream:ke.Cea608Stream,Cea708Stream:ke.Cea708Stream,MetadataStream:Fe};for(var ze in Oe)Oe.hasOwnProperty(ze)&&(qe[ze]=Oe[ze]);var We,Ge=qe,$e=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];We=function(e){var t,n=0;We.prototype.init.call(this),this.push=function(r){var i,o,a,s,u,c,l=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;l+5<t.length;)if(255===t[l]&&240==(246&t[l+1])){if(o=2*(1&~t[l+1]),i=(3&t[l+3])<<11|t[l+4]<<3|(224&t[l+5])>>5,c=9e4*(u=1024*(1+(3&t[l+6])))/$e[(60&t[l+2])>>>2],a=l+i,t.byteLength<a)return;if(this.trigger("data",{pts:r.pts+n*c,dts:r.dts+n*c,sampleCount:u,audioobjecttype:1+(t[l+2]>>>6&3),channelcount:(1&t[l+2])<<2|(192&t[l+3])>>>6,samplerate:$e[(60&t[l+2])>>>2],samplingfrequencyindex:(60&t[l+2])>>>2,samplesize:16,data:t.subarray(l+7+o,a)}),n++,t.byteLength===a)return void(t=void 0);t=t.subarray(a)}else l++},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")}},We.prototype=new V;var Xe,Ke,Ye,Qe=We,Je=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,o=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");o.set(e.subarray(i,i+a)),n=new DataView(o.buffer).getUint32(0),r=8*a,t-=a},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),o=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?o<<i|this.readBits(i):o},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(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()};Ke=function(){var e,t,n=0;Ke.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 o=t.byteLength;n<o-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<o;)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<o);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")}},Ke.prototype=new V,Ye={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Xe=function(){var e,t,n,r,i,o,a,s=new Ke;Xe.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(a){var s={trackId:t,pts:n,dts:r,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(a.subarray(1)),s.config=o(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()},a=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=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},o=function(e){var t,n,r,i,o,s,u,c,l,f,h,p,d,y=0,v=0,m=0,g=0,b=1;if(n=(t=new Je(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),Ye[n]&&(3===(o=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==o?8:12,d=0;d<h;d++)t.readBoolean()&&a(d<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(),d=0;d<u;d++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),l=t.readUnsignedExpGolomb(),0===(f=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(y=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:p=[1,1];break;case 2:p=[12,11];break;case 3:p=[10,11];break;case 4:p=[16,11];break;case 5:p=[40,33];break;case 6:p=[24,11];break;case 7:p=[20,11];break;case 8:p=[32,11];break;case 9:p=[80,33];break;case 10:p=[18,11];break;case 11:p=[15,11];break;case 12:p=[64,33];break;case 13:p=[160,99];break;case 14:p=[4,3];break;case 15:p=[3,2];break;case 16:p=[2,1];break;case 255:p=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}p&&(b=p[0]/p[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(c+1)-2*y-2*v)*b),height:(2-f)*(l+1)*16-2*m-2*g,sarRatio:p}}},Xe.prototype=new V;var Ze,et={H264Stream:Xe,NalByteStream:Ke},tt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],nt=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},rt=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+=nt(t,n))},it=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},ot={isLikelyAacData:function(e){var t=rt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:nt,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&~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 tt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=it(e.subarray(10,14)));do{if((n=it(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]){var o=unescape(function(e,t,n){var r,i="";for(r=0;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i));if("com.apple.streaming.transportStreamTimestamp"===o){var a=r.subarray(i+1),s=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return(s*=4)+(3&a[7])}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(Ze=function(){var e=new Uint8Array,t=0;Ze.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,o,a,s=0,u=0;for(e.length?(a=e.length,(e=new Uint8Array(n.byteLength+a)).set(e.subarray(0,a)),e.set(n,a)):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&~e[u]||240&~e[u+1])u++;else{if(e.length-u<7)break;if(u+(s=ot.parseAdtsSize(e,u))>e.length)break;o={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",o),u+=s}else{if(e.length-u<10)break;if(u+(s=ot.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 V;var at,st,ut,ct,lt=Ze,ft=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],ht=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],pt=et.H264Stream,dt=ot.isLikelyAacData,yt=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},vt=function(e,t,n,r,i,o){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:o,baseMediaDecodeTime:e}};st=function(e,t){var n=[],r=0,i=0,o=0,a=1/0;t=t||{},st.prototype.init.call(this),this.push=function(t){pe(e,t),e&&ft.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(e){i=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){o=e},this.flush=function(){var s,u,c,l,f,h,p;0!==n.length?(s=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)})))}(n,e,i),e.baseMediaDecodeTime=he(e,t.keepOriginalTimestamps),p=le(e,s,o,a),e.samples=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}(s),c=Q(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}(s)),n=[],u=J(r,[e]),l=new Uint8Array(u.byteLength+c.byteLength),r++,l.set(u),l.set(c,u.byteLength),fe(e),f=Math.ceil(9216e4/e.samplerate),s.length&&(h=s.length*f,this.trigger("segmentTimingInfo",vt(se(e.baseMediaDecodeTime,e.samplerate),s[0].dts,s[0].pts,s[0].dts+h,s[0].pts+h,p||0)),this.trigger("timingInfo",{start:s[0].pts,end:s[0].pts+h})),this.trigger("data",{track:e,boxes:l}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){fe(e),n=[],this.trigger("reset")}},st.prototype=new V,at=function(e,t){var n,r,i=0,o=[],a=[];t=t||{},at.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){pe(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],ht.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),o.push(t)},this.flush=function(){for(var n,r,s,u,c,l,f,h,p=0;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=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}(o),(s=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}(n))[0][0].keyFrame||((r=this.getGopForFusion_(o[0],e))?(p=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=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}(s)),a.length){var d;if(!(d=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),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");fe(e),s=d}pe(e,s),e.samples=function(e,t){var n,r,i,o,a,s=t||0,u=[];for(n=0;n<e.length;n++)for(o=e[n],r=0;r<o.length;r++)a=o[r],s+=(i=Z(a,s)).size,u.push(i);return u}(s),c=Q(function(e){var t,n,r,i,o,a,s=0,u=e.byteLength,c=e.nalCount,l=new Uint8Array(u+4*c),f=new DataView(l.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(o=i[n],r=0;r<o.length;r++)a=o[r],f.setUint32(s,a.data.byteLength),s+=4,l.set(a.data,s),s+=a.data.byteLength;return l}(s)),e.baseMediaDecodeTime=he(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),f=s[0],h=s[s.length-1],this.trigger("segmentTimingInfo",vt(e.baseMediaDecodeTime,f.dts,f.pts,h.dts+h.duration,h.pts+h.duration,p)),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),o=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=J(i,[e]),l=new Uint8Array(u.byteLength+c.byteLength),i++,l.set(u),l.set(c,u.byteLength),this.trigger("data",{track:e,boxes:l}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),o=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){fe(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,r,i,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)i=(o=this.gopCache_[a]).gop,e.pps&&yt(e.pps[0],o.pps[0])&&e.sps&&yt(e.sps[0],o.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=o,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,o,s,u,c;for(o=e.byteLength,s=e.nalCount,u=e.duration,t=n=0;t<a.length&&n<e.length&&(r=a[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,o-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((c=e.slice(n)).byteLength=o,c.duration=u,c.nalCount=s,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,n,r,i,o,s,u;for(t=a.length-1,n=e.length-1,o=null,s=!1;t>=0&&n>=0;){if(r=a[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===a.length-1&&(o=n),n--)}if(!s&&null===o)return null;if(0===(u=s?n:o))return e;var c=e.slice(u),l=c.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 c.byteLength=l.byteLength,c.duration=l.duration,c.nalCount=l.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}},at.prototype=new V,ct=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,ct.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))))}},ct.prototype=new V,ct.prototype.flush=function(e){var t,n,r,o,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},c=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?(c=this.videoTrack.timelineStartInfo.pts,ht.forEach((function(e){s.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(c=this.audioTrack.timelineStartInfo.pts,ft.forEach((function(e){s.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,r=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}(this.pendingTracks),s.initSegment=new Uint8Array(r.byteLength),s.initSegment.set(r),s.data=new Uint8Array(this.pendingBytes),o=0;o<this.pendingBoxes.length;o++)s.data.set(this.pendingBoxes[o],a),a+=this.pendingBoxes[o].byteLength;for(o=0;o<this.pendingCaptions.length;o++)(t=this.pendingCaptions[o]).startTime=ce(t.startPts,c,this.keepOriginalTimestamps),t.endTime=ce(t.endPts,c,this.keepOriginalTimestamps),s.captionStreams[t.stream]=!0,s.captions.push(t);for(o=0;o<this.pendingMetadata.length;o++)(n=this.pendingMetadata[o]).cueTime=ce(n.pts,c,this.keepOriginalTimestamps),s.metadata.push(n);for(s.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",s),o=0;o<s.captions.length;o++)t=s.captions[o],this.trigger("caption",t);for(o=0;o<s.metadata.length;o++)n=s.metadata[o],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},ct.prototype.setRemux=function(e){this.remuxTracks=e},ut=function(e){var t,n,r=this,i=!0;ut.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 Ge.MetadataStream,i.aacStream=new lt,i.audioTimestampRolloverStream=new Ge.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Ge.TimestampRolloverStream("timed-metadata"),i.adtsStream=new Qe,i.coalesceStream=new ct(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(o){"timed-metadata"!==o.type&&"audio"!==o.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new st(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 Ge.MetadataStream,i.packetStream=new Ge.TransportPacketStream,i.parseStream=new Ge.TransportParseStream,i.elementaryStream=new Ge.ElementaryStream,i.timestampRolloverStream=new Ge.TimestampRolloverStream,i.adtsStream=new Qe,i.h264Stream=new pt,i.captionStream=new Ge.CaptionStream(e),i.coalesceStream=new ct(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(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)t||"video"!==o.tracks[a].type?n||"audio"!==o.tracks[a].type||((n=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new at(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 st(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,fe(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,fe(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()}},ut.prototype=new V;var mt,gt,bt,_t={Transmuxer:ut,VideoSegmentStream:at,AudioSegmentStream:st,AUDIO_PROPERTIES:ft,VIDEO_PROPERTIES:ht,generateSegmentTimingInfo:vt},wt=function(e){return e>>>0},Tt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},St=wt,Et=function e(t,n){var r,i,o,a,s,u=[];if(!n.length)return null;for(r=0;r<t.byteLength;)i=St(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),o=Tt(t.subarray(r+4,r+8)),a=i>1?r+i:t.byteLength,o===n[0]&&(1===n.length?u.push(t.subarray(r+8,a)):(s=e(t.subarray(r+8,a),n.slice(1))).length&&(u=u.concat(s))),r=a;return u},kt=wt,Ot=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]}},Ct=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},Pt=ke.CaptionStream,xt=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},jt=function(e,t){var n=Et(e,["moof","traf"]),r=Et(e,["mdat"]),i={},o=[];return r.forEach((function(e,t){var r=n[t];o.push({mdat:e,traf:r})})),o.forEach((function(e){var n,r,o=e.mdat,a=e.traf,s=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],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],c=65536&r.flags[0],l=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),c&&(r.durationIsEmpty=!0),!i&&l&&(r.baseDataOffsetIsMoof=!0),r}(Et(a,["tfhd"])[0]),u=s.trackId,c=Et(a,["tfdt"]),l=c.length>0?function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:kt(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=kt(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}(c[0]).baseMediaDecodeTime:0,f=Et(a,["trun"]);t===u&&f.length>0&&(n=function(e,t,n){var r=t,i=n.defaultSampleDuration||0,o=n.defaultSampleSize||0,a=n.trackId,s=[];return e.forEach((function(e){var t=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],o=4&n.flags[2],a=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],c=8&n.flags[1],l=r.getUint32(4),f=8;for(i&&(n.dataOffset=r.getInt32(f),f+=4),o&&l&&(t={flags:Ot(e.subarray(f,f+4))},f+=4,a&&(t.duration=r.getUint32(f),f+=4),s&&(t.size=r.getUint32(f),f+=4),c&&(1===n.version?t.compositionTimeOffset=r.getInt32(f):t.compositionTimeOffset=r.getUint32(f),f+=4),n.samples.push(t),l--);l--;)t={},a&&(t.duration=r.getUint32(f),f+=4),s&&(t.size=r.getUint32(f),f+=4),u&&(t.flags=Ot(e.subarray(f,f+4)),f+=4),c&&(1===n.version?t.compositionTimeOffset=r.getInt32(f):t.compositionTimeOffset=r.getUint32(f),f+=4),n.samples.push(t);return n}(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=o),e.trackId=a,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration})),s=s.concat(t)})),s}(f,l,s),r=function(e,t,n){var r,i,o,a,s=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(i=0;i+4<e.length;i+=o)if(o=s.getUint32(i),i+=4,!(o<=0))switch(31&e[i]){case 6:var c=e.subarray(i+1,i+1+o),l=xt(i,t);if(r={nalUnitType:"sei_rbsp",size:o,data:c,escapedRBSP:Ct(c),trackId:n},l)r.pts=l.pts,r.dts=l.dts,a=l;else{if(!a){console.log("We've encountered a nal unit without data. See mux.js#233.");break}r.pts=a.pts,r.dts=a.dts}u.push(r)}return u}(o,n,u),i[u]||(i[u]=[]),i[u]=i[u].concat(r))})),i},Lt=function(){var e,t,n,r,i,o,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Pt,a=!0,o=!!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,o,a){var s;if(!this.isInitialized())return null;if(!o||!a)return null;if(this.isNewInit(o,a))n=o[0],r=a[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,o,a)}return s=function(e,t,n){return null===t?null:{seiNals:jt(e,t)[t],timescale:n}}(e,n,r),null!==s&&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;o?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()},At=wt,It=function(e){return("00"+e.toString(16)).slice(-2)};mt=function(e,t){var n,r,i;return n=Et(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return Et(t,["tfhd"]).map((function(n){var r,i,o;return r=At(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,o=Et(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=At(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=At(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0],(o="number"!=typeof o||isNaN(o)?1/0:o)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},bt=function(e){var t=0===e[0]?12:20;return At(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},gt=function(e){var t=Et(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},o=Et(e,["tkhd"])[0];o&&(r=(t=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var a=Et(e,["mdia","hdlr"])[0];if(a){var s=Tt(a.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var u=Et(e,["mdia","minf","stbl","stsd"])[0];if(u){var c=u.subarray(8);i.codec=Tt(c.subarray(4,8));var l,f=Et(c,[i.codec])[0];f&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(l=f.subarray(78),"avcC"===Tt(l.subarray(4,8))&&l.length>11?(i.codec+=".",i.codec+=It(l[9]),i.codec+=It(l[10]),i.codec+=It(l[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(l=f.subarray(28),"esds"===Tt(l.subarray(4,8))&&l.length>20&&0!==l[19]?(i.codec+="."+It(l[19]),i.codec+="."+It(l[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var h=Et(e,["mdia","mdhd"])[0];h&&(i.timescale=bt(h)),n.push(i)})),n};var Rt=mt,Dt=gt,Mt=function(e){var t=31&e[1];return(t<<=8)|e[2]},Nt=function(e){return!!(64&e[1])},Bt=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},Ut=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}},Ft={parseType:function(e,t){var n=Mt(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=Nt(e),n=4+Bt(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=Nt(e),r=4+Bt(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 o=12+((15&e[r+10])<<8|e[r+11]);o<i;){var a=r+o;t[(31&e[a+1])<<8|e[a+2]]=e[a],o+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Nt,parsePesType:function(e,t){switch(t[Mt(e)]){case Oe.H264_STREAM_TYPE:return"video";case Oe.ADTS_STREAM_TYPE:return"audio";case Oe.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!Nt(e))return null;var t=4+Bt(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+Bt(e),n=e.subarray(t),r=0,i=0,o=!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"===Ut(31&n[i+3])&&(o=!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"===Ut(31&n[i+3])&&(o=!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"===Ut(31&n[i+3])&&(o=!0),o}},Vt=Ae,Ht={};Ht.ts=Ft,Ht.aac=ot;var qt=ie,zt=188,Wt=71,Gt=function(e,t,n){for(var r,i,o,a,s=0,u=zt,c=!1;u<=e.byteLength;)if(e[s]!==Wt||e[u]!==Wt&&u!==e.byteLength)s++,u++;else{if(r=e.subarray(s,u),"pes"===Ht.ts.parseType(r,t.pid)&&(i=Ht.ts.parsePesType(r,t.table),o=Ht.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&o&&(a=Ht.ts.parsePesTime(r))&&(a.type="audio",n.audio.push(a),c=!0)),c)break;s+=zt,u+=zt}for(s=(u=e.byteLength)-zt,c=!1;s>=0;)if(e[s]!==Wt||e[u]!==Wt&&u!==e.byteLength)s--,u--;else{if(r=e.subarray(s,u),"pes"===Ht.ts.parseType(r,t.pid)&&(i=Ht.ts.parsePesType(r,t.table),o=Ht.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&o&&(a=Ht.ts.parsePesTime(r))&&(a.type="audio",n.audio.push(a),c=!0)),c)break;s-=zt,u-=zt}},$t=function(e,t,n){for(var r,i,o,a,s,u,c,l=0,f=zt,h=!1,p={data:[],size:0};f<e.byteLength;)if(e[l]!==Wt||e[f]!==Wt)l++,f++;else{if(r=e.subarray(l,f),"pes"===Ht.ts.parseType(r,t.pid)&&(i=Ht.ts.parsePesType(r,t.table),o=Ht.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(o&&!h&&(a=Ht.ts.parsePesTime(r))&&(a.type="video",n.video.push(a),h=!0),!n.firstKeyFrame))){if(o&&0!==p.size){for(s=new Uint8Array(p.size),u=0;p.data.length;)c=p.data.shift(),s.set(c,u),u+=c.byteLength;if(Ht.ts.videoPacketContainsKeyFrame(s)){var d=Ht.ts.parsePesTime(s);d?(n.firstKeyFrame=d,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(r),p.size+=r.byteLength}if(h&&n.firstKeyFrame)break;l+=zt,f+=zt}for(l=(f=e.byteLength)-zt,h=!1;l>=0;)if(e[l]!==Wt||e[f]!==Wt)l--,f--;else{if(r=e.subarray(l,f),"pes"===Ht.ts.parseType(r,t.pid)&&(i=Ht.ts.parsePesType(r,t.table),o=Ht.ts.parsePayloadUnitStartIndicator(r),"video"===i&&o&&(a=Ht.ts.parsePesTime(r))&&(a.type="video",n.video.push(a),h=!0)),h)break;l-=zt,f-=zt}},Xt=function(e,t){var n;return n=Ht.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,o=null,a=0,s=0;e.length-s>=3;){switch(Ht.aac.parseType(e,s)){case"timed-metadata":if(e.length-s<10){n=!0;break}if((a=Ht.aac.parseId3TagSize(e,s))>e.length){n=!0;break}null===o&&(t=e.subarray(s,s+a),o=Ht.aac.parseAacTimestamp(t)),s+=a;break;case"audio":if(e.length-s<7){n=!0;break}if((a=Ht.aac.parseAdtsSize(e,s))>e.length){n=!0;break}null===i&&(t=e.subarray(s,s+a),i=Ht.aac.parseSampleRate(t)),r++,s+=a;break;default:s++}if(n)return null}if(null===i||null===o)return null;var u=qt/i;return{audio:[{type:"audio",dts:o,pts:o},{type:"audio",dts:o+1024*r*u,pts:o+1024*r*u}]}}(e):function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,i=zt;i<e.byteLength;)if(e[r]!==Wt||e[i]!==Wt)r++,i++;else{switch(n=e.subarray(r,i),Ht.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=Ht.ts.parsePat(n));break;case"pmt":t.table||(t.table=Ht.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=zt,i+=zt}}(e,t),t.table)if(t.table.hasOwnProperty(r))switch(t.table[r]){case Oe.H264_STREAM_TYPE:n.video=[],$t(e,t,n),0===n.video.length&&delete n.video;break;case Oe.ADTS_STREAM_TYPE:n.audio=[],Gt(e,t,n),0===n.audio.length&&delete n.audio}return n}(e),n&&(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=Vt(e.dts,n),e.pts=Vt(e.pts,n),e.dtsTime=e.dts/qt,e.ptsTime=e.pts/qt}))}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=Vt(e.dts,r),e.pts=Vt(e.pts,r),e.dtsTime=e.dts/qt,e.ptsTime=e.pts/qt})),e.firstKeyFrame){var i=e.firstKeyFrame;i.dts=Vt(i.dts,r),i.pts=Vt(i.pts,r),i.dtsTime=i.dts/qt,i.ptsTime=i.pts/qt}}}(n,t),n):null},Kt=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 _t.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:ae(t.start.dts),presentation:ae(t.start.pts)},end:{decode:ae(t.end.dts),presentation:ae(t.end.pts)},baseMediaDecodeTime:ae(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ae(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:ae(t.start.dts),presentation:ae(t.start.pts)},end:{decode:ae(t.end.dts),presentation:ae(t.end.pts)},baseMediaDecodeTime:ae(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ae(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:ae(t.start),end:ae(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ae(t.start),end:ae(t.end)}})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new Lt,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=Rt(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:r,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=Dt(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*ie,i=Xt(t,r),o=null;i&&((o={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1}).hasVideo&&(o.videoStart=i.video[0].ptsTime),o.hasAudio&&(o.audioStart=i.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:o,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(oe(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe(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 Kt(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Kt(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),Ns=Is(Ms),Bs=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,o=e.remux,a=e.onData,s=e.onTrackInfo,u=e.onAudioTimingInfo,c=e.onVideoTimingInfo,l=e.onVideoSegmentTimingInfo,f=e.onAudioSegmentTimingInfo,h=e.onId3,p=e.onCaptions,d=e.onDone,y=e.onEndedTimeline,v=e.isEndOfTimeline,m={buffer:[]},g=v;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,o=r.initSegment,a=r.captions,s=r.captionStreams,u=r.metadata,c=r.videoFrameDtsTime,l=r.videoFramePtsTime;t.buffer.push({captions:a,captionStreams:s,metadata:u});var f=e.data.segment.boxes||{data:e.data.segment.data},h={type:i,data:new Uint8Array(f.data,f.data.byteOffset,f.data.byteLength),initSegment:new Uint8Array(o.data,o.byteOffset,o.byteLength)};void 0!==c&&(h.videoFrameDtsTime=c),void 0!==l&&(h.videoFramePtsTime=l),n(h)}(n,m,a),"trackinfo"===n.data.action&&s(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,m),"audioTimingInfo"===n.data.action&&u(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&c(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&l(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&f(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&p(n.data.caption),"endedtimeline"===n.data.action&&(g=!1,y()),"transmuxed"===n.data.type&&(g||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:m,callback:d}),Us(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),void 0!==o&&t.postMessage({action:"setRemux",remux:o}),n.byteLength){var b=n instanceof ArrayBuffer?n:n.buffer,_=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:b,byteOffset:_,byteLength:n.byteLength},[b])}v&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Us=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():Bs(e.currentTransmux))},Fs=function(e,t){e.postMessage({action:t}),Us(e)},Vs=function(e){!function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void Fs(t,e);t.transmuxQueue.push(Fs.bind(null,t,e))}("reset",e)},Hs=function(e){var t=e.transmuxer,n=e.endAction||e.action,r=e.callback,i=a({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function i(o){o.data.action===n&&(t.removeEventListener("message",i),o.data.data&&(o.data.data=new Uint8Array(o.data.data,e.byteOffset||0,e.byteLength||o.data.data.byteLength),e.data&&(e.data=o.data.data)),r(o.data))})),e.data){var o=e.data instanceof ArrayBuffer;i.byteOffset=o?0:e.data.byteOffset,i.byteLength=e.data.byteLength;var s=[o?e.data:e.data.buffer];t.postMessage(i,s)}else t.postMessage(i)},qs=-101,zs=-102,Ws=function(e){e.forEach((function(e){e.abort()}))},Gs=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:qs,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:zs,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t}:null},$s=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,c=e.isEndOfTimeline,l=e.endedTimelineFn,f=e.dataFn,h=e.doneFn,p=t.map&&t.map.tracks||{},d=Boolean(p.audio&&p.video),y=i.bind(null,t,"audio","start"),v=i.bind(null,t,"audio","end"),m=i.bind(null,t,"video","start"),g=i.bind(null,t,"video","end");Hs({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:d}),r=null,i.hasAudio&&!d&&y(i.audioStart),i.hasVideo&&m(i.videoStart),y=null,m=null),function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void Bs(e);e.transmuxer.transmuxQueue.push(e)}({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:d,onData:function(e){e.type="combined"===e.type?"video":e.type,f(t,e)},onTrackInfo:function(e){r&&(d&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){y&&void 0!==e.start&&(y(e.start),y=null),v&&void 0!==e.end&&v(e.end)},onVideoTimingInfo:function(e){m&&void 0!==e.start&&(m(e.start),m=null),g&&void 0!==e.end&&g(e.end)},onVideoSegmentTimingInfo:function(e){o(e)},onAudioSegmentTimingInfo:function(e){a(e)},onId3:function(e,n){s(t,e,n)},onCaptions:function(e){u(t,[e])},isEndOfTimeline:c,onEndedTimeline:function(){l()},onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},Xs=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,c=e.isEndOfTimeline,l=e.endedTimelineFn,f=e.dataFn,h=e.doneFn,p=new Uint8Array(n);if(function(e){return He(e,["moof"]).length>0}(p)){t.isFmp4=!0;var d=t.map.tracks,y={isFmp4:!0,hasVideo:!!d.video,hasAudio:!!d.audio};d.audio&&d.audio.codec&&"enca"!==d.audio.codec&&(y.audioCodec=d.audio.codec),d.video&&d.video.codec&&"encv"!==d.video.codec&&(y.videoCodec=d.video.codec),d.video&&d.audio&&(y.isMuxed=!0),r(t,y);var v=function(e){f(t,{data:p,type:y.hasAudio&&!y.isMuxed?"audio":"video"}),e&&e.length&&u(t,e),h(null,t,{})};Hs({action:"probeMp4StartTime",timescales:t.map.timescales,data:p,transmuxer:t.transmuxer,callback:function(e){var r=e.data,o=e.startTime;n=r.buffer,t.bytes=p=r,y.hasAudio&&!y.isMuxed&&i(t,"audio","start",o),y.hasVideo&&i(t,"video","start",o),d.video&&r.byteLength&&t.transmuxer?Hs({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:p,timescales:t.map.timescales,trackIds:[d.video.id],callback:function(e){n=e.data.buffer,t.bytes=p=e.data,v(e.captions)}}):v()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=ot(p)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});$s({segment:t,bytes:n,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:l,dataFn:f,doneFn:h})}else h(null,t,{})},Ks=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,i=e.segment,o=e.abortFn,a=e.progressFn,s=e.trackInfoFn,u=e.timingInfoFn,c=e.videoSegmentTimingInfoFn,l=e.audioSegmentTimingInfoFn,f=e.id3Fn,h=e.captionsFn,p=e.isEndOfTimeline,d=e.endedTimelineFn,y=e.dataFn,v=e.doneFn,m=[],g=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,i=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,c=e.isEndOfTimeline,l=e.endedTimelineFn,f=e.dataFn,h=e.doneFn,p=0,d=!1;return function(e,y){if(!d){if(e)return d=!0,Ws(t),h(e,y);if((p+=1)===t.length){if(y.endOfAllRequests=Date.now(),y.encryptedBytes)return function(e){var t,n=e.decryptionWorker,r=e.segment,i=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,u=e.id3Fn,c=e.captionsFn,l=e.isEndOfTimeline,f=e.endedTimelineFn,h=e.dataFn,p=e.doneFn;n.addEventListener("message",(function e(t){if(t.data.source===r.requestId){n.removeEventListener("message",e);var d=t.data.decrypted;r.bytes=new Uint8Array(d.bytes,d.byteOffset,d.byteLength),Xs({segment:r,bytes:r.bytes,trackInfoFn:i,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:u,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:f,dataFn:h,doneFn:p})}})),t=r.key.bytes.slice?r.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.key.bytes)),n.postMessage(gs({source:r.requestId,encrypted:r.encryptedBytes,key:t,iv:r.key.iv}),[r.encryptedBytes.buffer,t.buffer])}({decryptionWorker:n,segment:y,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:l,dataFn:f,doneFn:h});Xs({segment:y,bytes:y.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:l,dataFn:f,doneFn:h})}}}}({activeXhrs:m,decryptionWorker:r,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:l,id3Fn:f,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:d,dataFn:y,doneFn:v});if(i.key&&!i.key.bytes){var b=_a.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),_=function(e,t){return function(n,r){var i=r.response,o=Gs(n,r);if(o)return t(o,e);if(16!==i.byteLength)return t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:2,xhr:r},e);var a=new DataView(i);return e.key.bytes=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),t(null,e)}}(i,g),w=t(b,_);m.push(w)}if(i.map&&!i.map.bytes){var T=_a.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:ds(i.map)}),S=function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var i=r.response,o=Gs(e,r);if(o)return n(o,t);if(0===i.byteLength)return n({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:2,xhr:r},t);t.map.bytes=new Uint8Array(r.response);var a=ot(t.map.bytes);if("mp4"!==a)return n({status:r.status,message:"Found unsupported "+(a||"unknown")+" container for initialization segment at URL: "+r.uri,code:2,internal:!0,xhr:r},t);Hs({action:"probeMp4Tracks",data:t.map.bytes,transmuxer:t.transmuxer,callback:function(e){var r=e.tracks,i=e.data;return t.map.bytes=i,r.forEach((function(e){t.map.tracks=t.map.tracks||{},t.map.tracks[e.type]||(t.map.tracks[e.type]=e,"number"==typeof e.id&&e.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[e.id]=e.timescale))})),n(null,t)}})}}({segment:i,finishProcessingFn:g}),E=t(T,S);m.push(E)}var k=_a.mergeOptions(n,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:ds(i)}),O=t(k,function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,i){var o=i.response,a=Gs(e,i);if(a)return n(a,t);var s="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 0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:2,xhr:i},t):(t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),t.key?t.encryptedBytes=new Uint8Array(s):t.bytes=new Uint8Array(s),n(null,t))}}({segment:i,finishProcessingFn:g,responseType:k.responseType}));O.addEventListener("progress",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=_a.mergeOptions(t.stats,(i=(r=e).target,(o={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0}).bytesReceived=r.loaded,o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3),o)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t);var r,i,o}}({segment:i,progressFn:a,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:l,id3Fn:f,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:d,dataFn:y})),m.push(O);var C={};return m.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:o}))})),function(){return Ws(m)}},Ys=ka("CodecUtils"),Qs=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Js=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(M(""+r+i))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return Ys("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},Zs=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},eu=function(e,t){var n=t.attributes||{},r=Js(function(e){var t=e.attributes||{};if(t.CODECS)return N(t.CODECS)}(t)||[]);if(Qs(e,t)&&!r.audio&&!function(e,t){if(!Qs(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=Js(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 N(i.playlists[0].attributes.CODECS)}return null}(e,n.AUDIO)||[]);i.audio&&(r.audio=i.audio)}return r},tu=ka("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||""})}},ru=function(e,n){if(!e)return"";var r=t().getComputedStyle(e);return r?r[n]:""},iu=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}))},ou=function(e,n){var r,i;return e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),r=r||t().Number.MAX_VALUE,n.attributes.BANDWIDTH&&(i=n.attributes.BANDWIDTH),r-(i||t().Number.MAX_VALUE)},au=function(e,n,r,i,o,a){if(e){var s={bandwidth:n,width:r,height:i,limitRenditionByPlayerDimensions:o},u=e.playlists;cs.isAudioOnly(e)&&(u=a.getAudioTrackPlaylists_(),s.audioOnly=!0);var c=u.map((function(e){var n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,r=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||t().Number.MAX_VALUE,width:n,height:r,playlist:e}}));iu(c,(function(e,t){return e.bandwidth-t.bandwidth}));var l=(c=c.filter((function(e){return!cs.isIncompatible(e.playlist)}))).filter((function(e){return cs.isEnabled(e.playlist)}));l.length||(l=c.filter((function(e){return!cs.isDisabled(e.playlist)})));var f=l.filter((function(e){return e.bandwidth*Ls.BANDWIDTH_VARIANCE<n})),h=f[f.length-1],p=f.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(!1===o){var d=p||l[0]||c[0];if(d&&d.playlist){var y="sortedPlaylistReps";return p&&(y="bandwidthBestRep"),l[0]&&(y="enabledPlaylistReps"),tu("choosing "+nu(d)+" using "+y+" with options",s),d.playlist}return tu("could not choose a playlist with options",s),null}var v=f.filter((function(e){return e.width&&e.height}));iu(v,(function(e,t){return e.width-t.width}));var m=v.filter((function(e){return e.width===r&&e.height===i}));h=m[m.length-1];var g,b,_,w=m.filter((function(e){return e.bandwidth===h.bandwidth}))[0];w||(b=(g=v.filter((function(e){return e.width>r||e.height>i}))).filter((function(e){return e.width===g[0].width&&e.height===g[0].height})),h=b[b.length-1],_=b.filter((function(e){return e.bandwidth===h.bandwidth}))[0]);var T=_||w||p||l[0]||c[0];if(T&&T.playlist){var S="sortedPlaylistReps";return _?S="resolutionPlusOneRep":w?S="resolutionBestRep":p?S="bandwidthBestRep":l[0]&&(S="enabledPlaylistReps"),tu("choosing "+nu(T)+" using "+S+" with options",s),T.playlist}return tu("could not choose a playlist with options",s),null}},su=function(){var e=this.useDevicePixelRatio&&t().devicePixelRatio||1;return au(this.playlists.master,this.systemBandwidth,parseInt(ru(this.tech_.el(),"width"),10)*e,parseInt(ru(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},uu=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)},cu=function(e){return"number"==typeof e&&isFinite(e)},lu=1/60,fu=function(e){var t=e.startOfSegment,n=e.duration,r=e.segment,i=r.start,o=r.end,a=r.parts,s=e.playlist,u=s.mediaSequence,c=s.id,l=s.segments,f=void 0===l?[]:l,h=e.mediaIndex,p=e.partIndex,d=e.timeline,y=f.length-1,v="mediaIndex/partIndex increment";return e.getMediaInfoForTime?v="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(v="getSyncSegmentCandidate (isSyncRequest)"),(e.segment.uri?"segment":"pre-segment")+" ["+h+"/"+y+"]"+(p?" part ["+p+"/"+(a.length-1)+"]":"")+" mediaSequenceNumber ["+u+"/"+(u+y)+"] start/end ["+i+" => "+o+"] startOfSegment ["+t+"] duration ["+n+"] timeline ["+d+"] selected by ["+v+"] playlist ["+c+"]"},hu=function(e){return e+"TimingInfo"},pu=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,o=e.audioDisabled;if(n===r)return!1;if("audio"===i){var a=t.lastTimelineChange({type:"main"});return!a||a.to!==r}if("main"===i&&o){var s=t.pendingTimelineChange({type:"audio"});return!s||s.to!==r}return!1},du=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+Va},yu=function(e){function n(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_=_a.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_=ka("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(s(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}c(n,e);var r=n.prototype;return r.createTransmuxer_=function(){return function(e){var t=new Ns;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}({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_})},r.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},r.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&t().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},r.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},r.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},r.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,t().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},r.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},r.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},r.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Vs(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},r.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return _a.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()},r.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},r.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=_s(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},r.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},r.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"))},r.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},r.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 o=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+o+"]"),null!==this.mediaIndex)if(this.mediaIndex-=o,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var a=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!a.parts||!a.parts.length||!a.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-=o,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)}},r.pause=function(){this.checkBufferTimeout_&&(t().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},r.paused=function(){return null===this.checkBufferTimeout_},r.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"})},r.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},r.resyncLoader=function(){this.transmuxer_&&Vs(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"})},r.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,o=function(){0==--i&&n()};for(var a in!r&&this.audioDisabled_||(i++,this.sourceUpdater_.removeAudio(e,t,o)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*at.ONE_SECOND_IN_TS),o=Math.ceil((n-r)*at.ONE_SECOND_IN_TS),a=e.slice(),s=e.length;s--&&!(e[s].pts<=o););if(-1===s)return a;for(var u=s+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),a.splice(u,s-u+1),a}(this.gopBuffer_,e,t,this.timeMapping_),i++,this.sourceUpdater_.removeVideo(e,t,o)),this.inbandTextTracks_)uu(e,t,this.inbandTextTracks_[a]);uu(e,t,this.segmentMetadataTrack_),o()}else this.logger_("skipping remove because no source updater or starting media info")},r.monitorBuffer_=function(){this.checkBufferTimeout_&&t().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=t().setTimeout(this.monitorBufferTick_.bind(this),1)},r.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&t().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=t().setTimeout(this.monitorBufferTick_.bind(this),500)},r.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))}},r.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,o=!r||!r.parts||n+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&i&&o},r.chooseNextRequest_=function(){var e=Xa(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 o={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(o.isSyncRequest)o.mediaIndex=function(e,t){var n=(void 0===t?{}:t).segments,r=void 0===n?[]:n;if(-1===e)return 0;var i=r.reduce((function(t,n,r){return n.timeline===e&&t.push(r),t}),[]);return i.length?i[Math.min(i.length-1,1)]:Math.max(r.length-1,0)}(this.currentTimeline_,this.playlist_);else if(null!==this.mediaIndex){var a=i[this.mediaIndex],s="number"==typeof this.partIndex?this.partIndex:-1;o.startOfSegment=a.end?a.end:e,a.parts&&a.parts[s+1]?(o.mediaIndex=this.mediaIndex,o.partIndex=s+1):o.mediaIndex=this.mediaIndex+1}else{var u=cs.getMediaInfoForTime(this.playlist_,this.fetchAtBuffer_?e:this.currentTime_(),this.syncPoint_.segmentIndex,this.syncPoint_.time);o.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd":"currentTime",o.mediaIndex=u.mediaIndex,o.startOfSegment=u.startTime,o.partIndex=u.partIndex}var c=i[o.mediaIndex],l=c&&"number"==typeof o.partIndex&&c.parts&&c.parts[o.partIndex];if(!c||"number"==typeof o.partIndex&&!l)return null;"number"!=typeof o.partIndex&&c.parts&&(o.partIndex=0);var f=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return o.mediaIndex>=i.length-1&&f&&!this.seeking_()?null:this.generateSegmentInfo_(o)},r.generateSegmentInfo_=function(e){var t=e.playlist,n=e.mediaIndex,r=e.startOfSegment,i=e.isSyncRequest,o=e.partIndex,a=e.forceTimestampOffset,s=e.getMediaInfoForTime,u=t.segments[n],c="number"==typeof o&&u.parts[o],l={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||u.resolvedUri,mediaIndex:n,partIndex:c?o:null,isSyncRequest:i,startOfSegment:r,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:u.duration,segment:u,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:s},f=void 0!==a?a:this.isPendingTimestampOffset_;l.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:f});var h=Xa(this.sourceUpdater_.audioBuffered());return"number"==typeof h&&(l.audioAppendStart=h-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(l.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_)),l},r.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,r=t.currentTimeline,i=t.startOfSegment,o=t.buffered,t.overrideCheck||n!==r?n<r?i:o.length?o.end(o.length-1):i:null;var t,n,r,i,o},r.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=cs.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),o=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<=o)){var a=function(e){var t=e.currentTime,n=e.bandwidth,r=e.duration,i=e.segmentDuration,o=e.timeUntilRebuffer,a=e.currentTimeline,s=e.syncController,u=e.master.playlists.filter((function(e){return!cs.isIncompatible(e)})),c=u.filter(cs.isEnabled);c.length||(c=u.filter((function(e){return!cs.isDisabled(e)})));var l=c.filter(cs.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var u=s.getSyncPoint(e,r,a,t)?1:2;return{playlist:e,rebufferingImpact:cs.estimateSegmentRequestTime(i,n,e)*u-o}})),f=l.filter((function(e){return e.rebufferingImpact<=0}));return iu(f,(function(e,t){return ou(t.playlist,e.playlist)})),f.length?f[0]:(iu(l,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),l[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var s=i-o-a.rebufferingImpact,u=.5;o<=Va&&(u=1),!a.playlist||a.playlist.uri===this.playlist_.uri||s<u||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Ls.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},r.handleAbort_=function(e){this.logger_("Aborting "+fu(e)),this.mediaRequestsAborted+=1},r.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},r.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 o=n[i];if(o!==r[i])return!1;if(e[o]!==t[o])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_()))},r.handleTimingInfo_=function(e,t,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var i=this.pendingSegment_,o=hu(t);i[o]=i[o]||{},i[o][n]=r,this.logger_("timinginfo: "+t+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},r.handleCaptions_=function(e,n){var r=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==n.length)if(this.pendingSegment_.hasAppendedData_){var i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),o={};n.forEach((function(e){o[e.stream]=o[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=o[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(o).forEach((function(e){var n=o[e],a=n.startTime,s=n.endTime,u=n.captions,c=r.inbandTextTracks_;r.logger_("adding cues from "+a+" -> "+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=t.textTracks().getTrackById(n);e[n]=r||t.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(c,r.vhs_.tech_,e),uu(a,s,c[e]),function(e){var n=e.inbandTextTracks,r=e.captionArray,i=e.timestampOffset;if(r){var o=t().WebKitDataCue||t().VTTCue;r.forEach((function(e){var t=e.stream;n[t].addCue(new o(e.startTime+i,e.endTime+i,e.text))}))}}({captionArray:u,inbandTextTracks:c,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,n));else this.logger_("SegmentLoader received no captions from a caption event")},r.handleId3_=function(e,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var i=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_,r,this.vhs_.tech_),function(e){var n=e.inbandTextTracks,r=e.metadataArray,i=e.timestampOffset,o=e.videoDuration;if(r){var a=t().WebKitDataCue||t().VTTCue,s=n.metadataTrack_;if(s&&(r.forEach((function(e){var n=e.cueTime+i;!("number"!=typeof n||t().isNaN(n)||n<0)&&n<1/0&&e.frames.forEach((function(e){var t=new a(n,n,e.value||e.url||e.data||"");t.frame=e,t.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return _a.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return _a.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return _a.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(t),s.addCue(t)}))})),s.cues&&s.cues.length)){for(var u=s.cues,c=[],l=0;l<u.length;l++)u[l]&&c.push(u[l]);var f=c.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),h=Object.keys(f).sort((function(e,t){return Number(e)-Number(t)}));h.forEach((function(e,t){var n=f[e],r=Number(h[t+1])||o;n.forEach((function(e){e.endTime=r}))}))}}}({inbandTextTracks:this.inbandTextTracks_,metadataArray:n,timestampOffset:i,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,n,r))},r.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},r.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},r.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},r.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!(!e||this.currentMediaInfo_&&pu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},r.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||pu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},r.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[hu(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})}this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},r.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)},r.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var o=bs(r);if(this.activeInitSegmentId_===o)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=o}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},r.handleQuotaExceededError_=function(e,n){var r=this,i=e.segmentInfo,o=e.type,a=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: "+$a(s).join(", ")),u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+$a(u).join(", "));var c=s.length?s.start(0):0,l=s.length?s.end(s.length-1):0,f=u.length?u.start(0):0,h=u.length?u.end(u.length-1):0;if(l-c<=1&&h-f<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+a.byteLength+", audio buffer: "+$a(s).join(", ")+", video buffer: "+$a(u).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",blacklistDuration:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:i,type:o,bytes:a}));var p=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+p),this.remove(0,p,(function(){r.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=t().setTimeout((function(){r.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),r.quotaExceededErrorRetryTimeout_=null,r.processCallQueue_()}),1e3)}),!0)},r.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}))},r.appendToSourceBuffer_=function(e){var t,n,r,i=e.segmentInfo,o=e.type,a=e.initSegment,s=e.data,u=e.bytes;if(!u){var c=[s],l=s.byteLength;a&&(c.unshift(a),l+=a.byteLength),r=0,(t={bytes:l,segments:c}).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:o,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:i,type:o,bytes:u}))},r.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}},r.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})}},r.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=a({},e,{forceTimestampOffset:!0});a(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},r.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,o=e.timeline!==this.currentTimeline_&&e.timeline>0,a=r||i&&o;this.logger_("Requesting "+fu(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Ks({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:a,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},r.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-Ls.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)},r.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 o=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=o}return t.map&&(r.map=this.initSegmentForMap(t.map)),r},r.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},r.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<lu?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+lu):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},r.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},r.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===zs)return;return this.pause(),e.code===qs?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)}},r.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},r.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},r.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},r.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,o=e.currentVideoTimestampOffset,a=e.useVideoTimingInfo,s=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!a)return u.start;var c=n.segments[r-1];return 0!==r&&c&&void 0!==c.start&&c.end===i+o?s.start:i},r.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,o="main"===this.loaderType_&&r,a=!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);o&&e.waitingOnAppends++,a&&e.waitingOnAppends++,o&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},r.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},r.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)},r.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")}},r.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)},r.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_}),this.logger_("Appended "+fu(e));var t=function(e,t){if("hls"!==t)return null;var n,r,i,o,a=(n=e.audioTimingInfo,r=e.videoTimingInfo,i=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,o=r&&"number"==typeof r.start&&"number"==typeof r.end?r.end-r.start:0,Math.max(i,o));if(!a)return null;var s=e.playlist.targetDuration,u=du({segmentDuration:a,maxDuration:2*s}),c=du({segmentDuration:a,maxDuration:s}),l="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+a+" 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||c?{severity:u?"warn":"info",message:l}:null}(e,this.sourceType_);if(t&&("warn"===t.severity?_a.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest)this.trigger("syncinfoupdate");else{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;n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration?this.resetEverything():(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"),this.paused()||this.monitorBuffer_())}},r.recordThroughput_=function(e){if(e.duration<lu)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+lu);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}},r.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var n=e.segment,r=n.start,i=n.end;if(cu(r)&&cu(i)){uu(r,i,this.segmentMetadataTrack_);var o=t().WebKitDataCue||t().VTTCue,a={custom:n.custom,dateTimeObject:n.dateTimeObject,dateTimeString:n.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:r,end:i},s=new o(r,i,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}},n}(_a.EventTarget);function vu(){}var mu,gu=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},bu=["video","audio"],_u=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},wu=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&&!_u(t,n)){if(i.type!==t){if(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),null===r)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))}},Tu=function(e,t){var n=t[e+"Buffer"],r=gu(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},Su=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},Eu=function(e,t,n){return function(r,i){var o=i[r+"Buffer"];if(Su(i.mediaSource,o)){i.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+r+"Buffer");try{o.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)}}}},ku=function(e,t){return function(n,r){var i=r[n+"Buffer"];if(Su(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")}}}},Ou=function(e){return function(t,n){var r=n[t+"Buffer"];Su(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},Cu=function(e){return function(t,n){e()}},Pu=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){_a.log.warn("Failed to call media source endOfStream",e)}}}},xu=function(e,t){return function(n){var r=gu(e),i=U(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var o=n.mediaSource.addSourceBuffer(i);o.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),o.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=o}},ju=function(e){return function(t){var n=t[e+"Buffer"];if(Tu(e,t),Su(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){_a.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},Lu=function(e){return function(t,n){var r=n[t+"Buffer"],i=U(e);Su(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)}},Au=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,i=e.doneFn,o=e.name;n.queue.push({type:t,action:r,doneFn:i,name:o}),wu(t,n)},Iu=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_"])}wu(e,t)}},Ru=function(e){function n(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return wu("mediaSource",s(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=ka("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=Iu("video",s(n)),n.onAudioUpdateEnd_=Iu("audio",s(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}c(n,e);var r=n.prototype;return r.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},r.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},r.hasInitializedAnyEme=function(){return this.initializedEme_},r.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},r.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},r.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},r.addSourceBuffer=function(e,t){Au({type:"mediaSource",sourceUpdater:this,action:xu(e,t),name:"addSourceBuffer"})},r.abort=function(e){Au({type:e,sourceUpdater:this,action:function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(Su(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){_a.log.warn("Failed to abort on "+e+"Buffer",t)}}}},name:"abort"})},r.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Au({type:"mediaSource",sourceUpdater:this,action:ju(e),name:"removeSourceBuffer"}):_a.log.error("removeSourceBuffer is not supported!")},r.canRemoveSourceBuffer=function(){return!_a.browser.IE_VERSION&&!_a.browser.IS_FIREFOX&&t().MediaSource&&t().MediaSource.prototype&&"function"==typeof t().MediaSource.prototype.removeSourceBuffer},n.canChangeType=function(){return t().SourceBuffer&&t().SourceBuffer.prototype&&"function"==typeof t().SourceBuffer.prototype.changeType},r.canChangeType=function(){return this.constructor.canChangeType()},r.changeType=function(e,t){this.canChangeType()?Au({type:e,sourceUpdater:this,action:Lu(t),name:"changeType"}):_a.log.error("changeType is not supported!")},r.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)}))},r.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,i=e.type,o=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 "+o.length+" until video append");if(Au({type:i,sourceUpdater:this,action:Eu(o,r||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var a=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+a.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,a.forEach((function(e){n.appendBuffer.apply(n,e)}))}},r.audioBuffered=function(){return Su(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:_a.createTimeRange()},r.videoBuffered=function(){return Su(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:_a.createTimeRange()},r.buffered=function(){var e=Su(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Su(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,o=[],a=[];if(!(e&&e.length&&t&&t.length))return _a.createTimeRange();for(var s=e.length;s--;)o.push({time:e.start(s),type:"start"}),o.push({time:e.end(s),type:"end"});for(s=t.length;s--;)o.push({time:t.start(s),type:"start"}),o.push({time:t.end(s),type:"end"});for(o.sort((function(e,t){return e.time-t.time})),s=0;s<o.length;s++)"start"===o[s].type?2==++i&&(n=o[s].time):"end"===o[s].type&&1==--i&&(r=o[s].time),null!==n&&null!==r&&(a.push([n,r]),n=null,r=null);return _a.createTimeRanges(a)}(this.audioBuffered(),this.videoBuffered())},r.setDuration=function(e,t){var n;void 0===t&&(t=vu),Au({type:"mediaSource",sourceUpdater:this,action:(n=e,function(e){e.logger_("Setting mediaSource duration to "+n);try{e.mediaSource.duration=n}catch(e){_a.log.warn("Failed to set media source duration",e)}}),name:"duration",doneFn:t})},r.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=vu),"string"!=typeof e&&(e=void 0),Au({type:"mediaSource",sourceUpdater:this,action:Pu(e),name:"endOfStream",doneFn:t})},r.removeAudio=function(e,t,n){void 0===n&&(n=vu),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Au({type:"audio",sourceUpdater:this,action:ku(e,t),doneFn:n,name:"remove"}):n()},r.removeVideo=function(e,t,n){void 0===n&&(n=vu),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Au({type:"video",sourceUpdater:this,action:ku(e,t),doneFn:n,name:"remove"}):n()},r.updating=function(){return!(!_u("audio",this)&&!_u("video",this))},r.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Au({type:"audio",sourceUpdater:this,action:Ou(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},r.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Au({type:"video",sourceUpdater:this,action:Ou(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},r.audioQueueCallback=function(e){this.audioBuffer&&Au({type:"audio",sourceUpdater:this,action:Cu(e),name:"callback"})},r.videoQueueCallback=function(e){this.videoBuffer&&Au({type:"video",sourceUpdater:this,action:Cu(e),name:"callback"})},r.dispose=function(){var e=this;this.trigger("dispose"),bu.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return Tu(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},n}(_a.EventTarget),Du=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Mu=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),Nu=function(e){function n(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}c(n,e);var r=n.prototype;return r.createTransmuxer_=function(){return null},r.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return _a.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return _a.createTimeRanges([[t,n]])},r.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=Mu.byteLength+e.bytes.byteLength,o=new Uint8Array(i);o.set(e.bytes),o.set(Mu,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return r||e},r.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},r.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},r.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},r.remove=function(e,t){uu(e,t,this.subtitlesTrack_)},r.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)}},r.timestampOffsetForSegment_=function(){return null},r.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},r.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},r.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},r.segmentRequestFinished_=function(e,n,r){var i=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(n.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===qs&&this.handleTimeout_(),e.code===zs?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var o=this.pendingSegment_;this.saveBandwidthRelatedStats_(o.duration,n.stats),this.state="APPENDING",this.trigger("appending");var a=o.segment;if(a.map&&(a.map.bytes=n.map.bytes),o.bytes=n.bytes,"function"!=typeof t().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var s,u=function(){i.subtitlesTrack_.tech_.off("vttjsloaded",s),i.stopForError({message:"Error loading vtt.js"})};return s=function(){i.subtitlesTrack_.tech_.off("vttjserror",u),i.segmentRequestFinished_(e,n,r)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",s),void this.subtitlesTrack_.tech_.one("vttjserror",u)}a.requested=!0;try{this.parseVTTCues_(o)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(o,this.syncController_.timelines[o.timeline],this.playlist_),o.cues.length?o.timingInfo={start:o.cues[0].startTime,end:o.cues[o.cues.length-1].endTime}:o.timingInfo={start:o.startOfSegment,end:o.startOfSegment+o.duration},o.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");o.byteLength=o.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,o.cues.forEach((function(e){i.subtitlesTrack_.addCue(i.featuresNativeTextTracks_?new(t().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,o=0;o<t.length;o++)t[n].startTime===t[o].startTime&&t[n].endTime===t[o].endTime&&t[n].text===t[o].text&&++i>1&&r.push(t[o]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},r.handleData_=function(){},r.updateTimingInfoEnd_=function(){},r.parseVTTCues_=function(e){var n,r=!1;"function"==typeof t().TextDecoder?n=new(t().TextDecoder)("utf8"):(n=t().WebVTT.StringDecoder(),r=!0);var i=new(t().WebVTT.Parser)(t(),t().vttjs,n);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},i.oncue=e.cues.push.bind(e.cues),i.ontimestampmap=function(t){e.timestampmap=t},i.onparsingerror=function(e){_a.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var o=e.segment.map.bytes;r&&(o=Du(o)),i.parse(o)}var a=e.bytes;r&&(a=Du(a)),i.parse(a),i.flush()},r.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,o=i.MPEGTS/at.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=o,e.endTime+=o})),!n.syncInfo){var a=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(a,s-r.duration)}}}else r.empty=!0},n}(yu),Bu=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},Uu=function(e,t,n){void 0===n&&(n=0);var r=t.segments;return t.endList||0===n?e:r.length-(e+1)},Fu=[{name:"VOD",run:function(e,t,n,r,i){return n!==1/0?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var c=Uu(u,t,i),l=o[c],f=e.timelineToDatetimeMappings[l.timeline];if(f&&l.dateTimeObject){var h=l.dateTimeObject.getTime()/1e3+f,p=Math.abs(i-h);if(null!==s&&(0===p||s<p))break;s=p,a={time:h,segmentIndex:c}}}return a}},{name:"Segment",run:function(e,t,n,r,i){var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var c=Uu(u,t,i),l=o[c];if(l.timeline===r&&void 0!==l.start){var f=Math.abs(i-l.start);if(null!==s&&s<f)break;(!a||null===s||s>=f)&&(s=f,a={time:l.start,segmentIndex:c})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var o=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var a=null,s=0;s<t.discontinuityStarts.length;s++){var u=t.discontinuityStarts[s],c=t.discontinuitySequence+s+1,l=e.discontinuities[c];if(l){var f=Math.abs(i-l.time);if(null!==a&&a<f)break;(!o||null===a||a>=f)&&(a=f,o={time:l.time,segmentIndex:u})}}return o}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],Vu=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=ka("SyncController"),n}c(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+Za(e,r.segmentIndex,0))},n.runStrategies_=function(e,t,n,r){for(var i=[],o=0;o<Fu.length;o++){var a=Fu[o],s=a.run(this,e,t,n,r);s&&(s.strategy=a.name,i.push({strategy:a.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,o=1;o<e.length;o++){var a=Math.abs(e[o].syncPoint[t.key]-t.value);a<r&&(r=a,n=e[o].syncPoint,i=e[o].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),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 o=i.dateTimeObject;i.discontinuity&&n&&o&&(this.timelineToDatetimeMappings[i.timeline]=-o.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=e.segment,i=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)i={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=i,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+i.time+"] [mapping: "+i.mapping+"]")),r.start=e.startOfSegment,r.end=t.end+i.mapping;else{if(!i)return!1;r.start=t.start+i.mapping,r.end=t.end+i.mapping}return!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],o=t.discontinuitySequence+r+1,a=i-e.mediaIndex,s=Math.abs(a);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>s){var u;u=a<0?n.start-Za(t,e.mediaIndex,i):n.end+Za(t,e.mediaIndex+1,i),this.discontinuities[o]={time:u,accuracy:s}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(_a.EventTarget),Hu=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}c(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}(_a.EventTarget),qu=Rs(Ds((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),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),o=null,a=function(){function e(e){var t,n,r;o||(o=function(){var e,t,n,r,i,o,a,s,u=[[[],[],[],[],[]],[[],[],[],[],[]]],c=u[0],l=u[1],f=c[4],h=l[4],p=[],d=[];for(e=0;e<256;e++)d[(p[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!f[t];t^=r||1,n=d[n]||1)for(o=(o=n^n<<1^n<<2^n<<3^n<<4)>>8^255&o^99,f[t]=o,h[o]=t,s=16843009*p[i=p[r=p[t]]]^65537*i^257*r^16843008*t,a=257*p[o]^16843008*o,e=0;e<4;e++)c[e][t]=a=a<<24^a>>>8,l[e][o]=s=s<<24^s>>>8;for(e=0;e<5;e++)c[e]=c[e].slice(0),l[e]=l[e].slice(0);return u}()),this._tables=[[o[0][0].slice(),o[0][1].slice(),o[0][2].slice(),o[0][3].slice(),o[0][4].slice()],[o[1][0].slice(),o[1][1].slice(),o[1][2].slice(),o[1][3].slice(),o[1][4].slice()]];var i=this._tables[0][4],a=this._tables[1],s=e.length,u=1;if(4!==s&&6!==s&&8!==s)throw new Error("Invalid aes key size");var c=e.slice(0),l=[];for(this._key=[c,l],t=s;t<4*s+28;t++)r=c[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))),c[t]=c[t-s]^r;for(n=0;t;n++,t--)r=c[3&n?t:t-4],l[n]=t<=4||n<4?r:a[0][i[r>>>24]]^a[1][i[r>>16&255]]^a[2][i[r>>8&255]]^a[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,o){var a,s,u,c,l=this._key[1],f=e^l[0],h=r^l[1],p=n^l[2],d=t^l[3],y=l.length/4-2,v=4,m=this._tables[1],g=m[0],b=m[1],_=m[2],w=m[3],T=m[4];for(c=0;c<y;c++)a=g[f>>>24]^b[h>>16&255]^_[p>>8&255]^w[255&d]^l[v],s=g[h>>>24]^b[p>>16&255]^_[d>>8&255]^w[255&f]^l[v+1],u=g[p>>>24]^b[d>>16&255]^_[f>>8&255]^w[255&h]^l[v+2],d=g[d>>>24]^b[f>>16&255]^_[h>>8&255]^w[255&p]^l[v+3],v+=4,f=a,h=s,p=u;for(c=0;c<4;c++)i[(3&-c)+o]=T[f>>>24]<<24^T[h>>16&255]<<16^T[p>>8&255]<<8^T[255&d]^l[v++],a=f,f=h,h=p,p=d,d=a},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},c=function(){function e(t,n,r,i){var o=e.STEP,a=new Int32Array(t.buffer),c=new Uint8Array(t.byteLength),l=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(a.subarray(l,l+o),n,r,c)),l=o;l<a.length;l+=o)r=new Uint32Array([u(a[l-4]),u(a[l-3]),u(a[l-2]),u(a[l-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(l,l+o),n,r,c));this.asyncStream_.push((function(){var e;i(null,(e=c).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,o,s,c,l,f,h,p,d=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),y=new a(Array.prototype.slice.call(t)),v=new Uint8Array(e.byteLength),m=new Int32Array(v.buffer);for(r=n[0],i=n[1],o=n[2],s=n[3],p=0;p<d.length;p+=4)c=u(d[p]),l=u(d[p+1]),f=u(d[p+2]),h=u(d[p+3]),y.decrypt(c,l,f,h,m,p),m[p]=u(m[p]^r),m[p+1]=u(m[p+1]^i),m[p+2]=u(m[p+2]^o),m[p+3]=u(m[p+3]^s),r=c,i=l,o=f,s=h;return v}(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 c(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])}))}}))),zu=Is(qu),Wu=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Gu=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},$u=function(e,t){t.activePlaylistLoader=e,e.load()},Xu={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;Gu(n,r);var o=r.activeTrack(),a=r.activeGroup(),s=(a.filter((function(e){return e.default}))[0]||a[0]).id,u=r.tracks[s];if(o!==u){for(var c in _a.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[c].enabled=r.tracks[c]===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];_a.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Gu(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Ku={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",Xu[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),o.track(a.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",Xu[e](e,n))}},Yu={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],o=t.requestOptions,a=t.master.mediaGroups,s=t.mediaTypes[e],u=s.groups,c=s.tracks,l=s.logger_,f=t.masterPlaylistLoader,h=us(f.master);for(var p in a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}}),a[e])for(var d in u[p]||(u[p]=[]),a[e][p]){var y=a[e][p][d],v=void 0;if(h?(l("AUDIO group '"+p+"' label '"+d+"' is a master playlist"),y.isMasterPlaylist=!0,v=null):v="vhs-json"===r&&y.playlists?new Fa(y.playlists[0],n,o):y.resolvedUri?new Fa(y.resolvedUri,n,o):y.playlists&&"dash"===r?new js(y.playlists[0],n,o,f):null,y=_a.mergeOptions({id:d,playlistLoader:v},y),Ku[e](e,y.playlistLoader,t),u[p].push(y),void 0===c[d]){var m=new _a.AudioTrack({id:d,kind:Wu(y),enabled:!1,language:y.language,default:y.default,label:d});c[d]=m}}i.on("error",Xu[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,o=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],c=u.groups,l=u.tracks,f=t.masterPlaylistLoader;for(var h in s[e])for(var p in c[h]||(c[h]=[]),s[e][h])if(!s[e][h][p].forced){var d=s[e][h][p],y=void 0;if("hls"===i)y=new Fa(d.resolvedUri,r,a);else if("dash"===i){if(!d.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;y=new js(d.playlists[0],r,a,f)}else"vhs-json"===i&&(y=new Fa(d.playlists?d.playlists[0]:d.resolvedUri,r,a));if(d=_a.mergeOptions({id:p,playlistLoader:y},d),Ku[e](e,d.playlistLoader,t),c[h].push(d),void 0===l[p]){var v=n.addRemoteTextTrack({id:p,kind:"subtitles",default:d.default&&d.autoselect,language:d.language,label:p},!1).track;l[p]=v}}o.on("error",Xu[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],o=i.groups,a=i.tracks;for(var s in r[e])for(var u in o[s]||(o[s]=[]),r[e][s]){var c=r[e][s][u];if(c.instreamId.match(/CC\d/)&&(o[s].push(_a.mergeOptions({id:u},c)),void 0===a[u])){var l=n.addRemoteTextTrack({id:c.instreamId,kind:"captions",default:c.default&&c.autoselect,language:c.language,label:u},!1).track;a[u]=l}}}},Qu=function e(t,n){for(var r=0;r<t.length;r++){if(as(n,t[r]))return!0;if(t[r].playlists&&e(t[r].playlists,n))return!0}return!1},Ju={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}}},Zu=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],ec=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},tc=function(e){function n(n){var r;r=e.call(this)||this;var i=n.src,o=n.handleManifestRedirects,a=n.withCredentials,u=n.tech,c=n.bandwidth,l=n.externVhs,f=n.useCueTags,h=n.blacklistDuration,p=n.enableLowInitialPlaylist,d=n.sourceType,y=n.cacheEncryptionKeys,v=n.experimentalBufferBasedABR;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");mu=l,r.experimentalBufferBasedABR=Boolean(v),r.withCredentials=a,r.tech_=u,r.vhs_=u.vhs,r.sourceType_=d,r.useCueTags_=f,r.blacklistDuration=h,r.enableLowInitialPlaylist=p,r.useCueTags_&&(r.cueTagsTrack_=r.tech_.addTextTrack("metadata","ad-cues"),r.cueTagsTrack_.inBandMetadataTrackDispatchType=""),r.requestOptions_={withCredentials:a,handleManifestRedirects:o,timeout:null},r.on("error",r.pauseLoading),r.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:vu,activeTrack:vu,getActiveGroup:vu,onGroupChanged:vu,onTrackChanged:vu,lastTrack_:null,logger_:ka("MediaGroups["+t+"]")}})),e}(),r.mediaSource=new(t().MediaSource),r.handleDurationChange_=r.handleDurationChange_.bind(s(r)),r.handleSourceOpen_=r.handleSourceOpen_.bind(s(r)),r.handleSourceEnded_=r.handleSourceEnded_.bind(s(r)),r.mediaSource.addEventListener("durationchange",r.handleDurationChange_),r.mediaSource.addEventListener("sourceopen",r.handleSourceOpen_),r.mediaSource.addEventListener("sourceended",r.handleSourceEnded_),r.seekable_=_a.createTimeRanges(),r.hasPlayed_=!1,r.syncController_=new Vu(n),r.segmentMetadataTrack_=u.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,r.decrypter_=new zu,r.sourceUpdater_=new Ru(r.mediaSource),r.inbandTextTracks_={},r.timelineChangeController_=new Hu;var m={vhs:r.vhs_,parse708captions:n.parse708captions,mediaSource:r.mediaSource,currentTime:r.tech_.currentTime.bind(r.tech_),seekable:function(){return r.seekable()},seeking:function(){return r.tech_.seeking()},duration:function(){return r.duration()},hasPlayed:function(){return r.hasPlayed_},goalBufferLength:function(){return r.goalBufferLength()},bandwidth:c,syncController:r.syncController_,decrypter:r.decrypter_,sourceType:r.sourceType_,inbandTextTracks:r.inbandTextTracks_,cacheEncryptionKeys:y,sourceUpdater:r.sourceUpdater_,timelineChangeController:r.timelineChangeController_};return r.masterPlaylistLoader_="dash"===r.sourceType_?new js(i,r.vhs_,r.requestOptions_):new Fa(i,r.vhs_,r.requestOptions_),r.setupMasterPlaylistLoaderListeners_(),r.mainSegmentLoader_=new yu(_a.mergeOptions(m,{segmentMetadataTrack:r.segmentMetadataTrack_,loaderType:"main"}),n),r.audioSegmentLoader_=new yu(_a.mergeOptions(m,{loaderType:"audio"}),n),r.subtitleSegmentLoader_=new Nu(_a.mergeOptions(m,{loaderType:"vtt",featuresNativeTextTracks:r.tech_.featuresNativeTextTracks}),n),r.setupSegmentLoaderListeners_(),r.experimentalBufferBasedABR&&(r.masterPlaylistLoader_.one("loadedplaylist",(function(){return r.startABRTimer_()})),r.tech_.on("pause",(function(){return r.stopABRTimer_()})),r.tech_.on("play",(function(){return r.startABRTimer_()}))),Zu.forEach((function(e){r[e+"_"]=ec.bind(s(r),e)})),r.logger_=ka("MPC"),r.triggeredFmp4Usage=!1,"none"===r.tech_.preload()?(r.loadOnPlay_=function(){r.loadOnPlay_=null,r.masterPlaylistLoader_.load()},r.tech_.one("play",r.loadOnPlay_)):r.masterPlaylistLoader_.load(),r}c(n,e);var r=n.prototype;return r.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},r.switchMedia_=function(e,t,n){var r=this.media(),i=r&&(r.id||r.uri),o=e.id||e.uri;i&&i!==o&&(this.logger_("switch media "+i+" -> "+o+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},r.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=t().setInterval((function(){return e.checkABR_()}),250)},r.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(t().clearInterval(this.abrTimer_),this.abrTimer_=null)},r.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 o in i)if(i[o].default){t={label:o};break}}if(!t)return[];var a=[];for(var s in n)if(n[s][t.label]){var u=n[s][t.label];u.playlists?a.push.apply(a,u.playlists):a.push(u)}return a},r.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;os(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()),function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Yu[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs,o=e.segmentLoaders,a=o.AUDIO,s=o.main;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,o=r.media();if(!o)return null;var a=null;o.attributes[e]&&(a=i[o.attributes[e]]);var s=Object.keys(i);if(!a)if("AUDIO"===e&&s.length>1&&us(t.master))for(var u=0;u<s.length;u++){var c=i[s[u]];if(Qu(c,o)){a=c;break}}else i.main?a=i.main:1===s.length&&(a=i[s[0]]);return void 0===n?a:null!==n&&a&&a.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=Ju[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.getActiveGroup(),u=o.activePlaylistLoader,c=o.lastGroup_;s&&c&&s.id===c.id||(o.lastGroup_=s,o.lastTrack_=a,Gu(r,o),s&&!s.isMasterPlaylist&&(s.playlistLoader?(r.resyncLoader(),$u(s.playlistLoader,o)):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],o=r.main,a=t.mediaTypes[e],s=a.activeTrack(),u=a.getActiveGroup(),c=a.activePlaylistLoader,l=a.lastTrack_;if((!l||!s||l.id!==s.id)&&(a.lastGroup_=u,a.lastTrack_=s,Gu(i,a),u)){if(u.isMasterPlaylist){if(!s||!l||s.id===l.id)return;var f=t.vhs.masterPlaylistController_,h=f.selectPlaylist();if(f.media()===h)return;return a.logger_("track change. Switching master audio from "+l.id+" to "+s.id),n.pause(),o.resetEverything(),void f.fastQualityChange_(h)}if("AUDIO"===e){if(!u.playlistLoader)return o.setAudio(!0),void o.resetEverything();i.setAudio(!0),o.setAudio(!1)}c!==u.playlistLoader?(i.track&&i.track(s),i.resetEverything(),$u(u.playlistLoader,a)):$u(u.playlistLoader,a)}}}(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 c=(u.filter((function(e){return e.default}))[0]||u[0]).id;t.AUDIO.tracks[c].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(s.setAudio(!1),a.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 l=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var f in r.audioTracks().addEventListener("change",l),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",l),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[f])}({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;os(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"})}))},r.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())},r.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var o in n.AUDIO)for(var a in n.AUDIO[o])n.AUDIO[o][a].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"})),mu.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"}))},r.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,o=e.bufferHighWaterLine,a=e.duration,s=e.experimentalBufferBasedABR,u=e.log;if(!n)return _a.log.warn("We received no playlist to switch to. Please check your stream."),!1;var c="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t||!t.endList)return u(c+" as current playlist "+(t?"is live":"is not set")),!0;if(n.id===t.id)return!1;var l=s?Ls.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Ls.MAX_BUFFER_LOW_WATER_LINE;if(a<l)return u(c+" as duration < max low water line ("+a+" < "+l+")"),!0;var f=n.attributes.BANDWIDTH,h=t.attributes.BANDWIDTH;if(f<h&&(!s||r<o)){var p=c+" as next bandwidth < current bandwidth ("+f+" < "+h+")";return s&&(p+=" and forwardBuffer < bufferHighWaterLine ("+r+" < "+o+")"),u(p),!0}if((!s||f>h)&&r>=i){var d=c+" as forwardBuffer >= bufferLowWaterLine ("+r+" >= "+i+")";return s&&(d+=" and next bandwidth > current bandwidth ("+f+" > "+h+")"),u(d),!0}return u("not "+c+" 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_})},r.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()}))},r.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},r.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},r.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.switchMedia_(e,"smooth-quality"),this.mainSegmentLoader_.resetLoader())},r.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(){_a.browser.IE_VERSION||_a.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")},r.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}},r.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(_a.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},r.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")},r.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}}},r.handleDurationChange_=function(){this.tech_.trigger("durationchange")},r.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())},r.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=mu.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=Ha;var o=i.end(i.length-1);return o-r<=Ha&&n-o<=Ha},r.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"));var r=this.masterPlaylistLoader_.master.playlists,i=r.filter(rs),o=1===i.length&&i[0]===n;if(1===r.length&&t!==1/0)return _a.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 a=!1;r.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(a=!0,delete e.excludeUntil)}})),a&&(_a.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}n.excludeUntil=Date.now()+1e3*t,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 s=this.selectPlaylist();if(!s)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:_a.log.warn,c=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+c+" Switching to playlist "+s.id+"."),s.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),s.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var l=s.targetDuration/2*1e3||5e3,f="number"==typeof s.lastRequest&&Date.now()-s.lastRequest<=l;return this.switchMedia_(s,"exclude",o||f)},r.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},r.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var o=[];(i||"audio"===e)&&o.push("AUDIO"),(i||"subtitle"===e)&&(o.push("CLOSED-CAPTIONS"),o.push("SUBTITLES")),o.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]()}))}))},r.setCurrentTime=function(e){var t=za(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},r.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:mu.Playlist.duration(e):1/0:0},r.seekable=function(){return this.seekable_},r.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=mu.Playlist.seekable(t,n,mu.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=mu.Playlist.seekable(t,n,mu.Playlist.liveEdgeDelay(r,t))).length)return}var o,a;this.seekable_&&this.seekable_.length&&(o=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=_a.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)===o&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+Ga(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},r.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=mu.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)}},r.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()},r.master=function(){return this.masterPlaylistLoader_.master},r.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},r.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},r.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};t.video=t.main;var n=eu(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||H)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||i)&&(r.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||H,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var o,a={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,s=r[e],!(i?F(s):V(s)))){var n=t[e].isFmp4?"browser":"muxer";a[n]=a[n]||[],a[n].push(r[e]),"audio"===e&&(o=n)}var i,s})),i&&o&&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 "+o+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=(N(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,i=(N(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 c=Object.keys(a).reduce((function(e,t){return e&&(e+=", "),e+(t+' does not support codec(s): "')+a[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:c,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},r.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)}}},r.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 o=eu(e.master,i),a=[];!o.audio||V(o.audio)||F(o.audio)||a.push("audio codec "+o.audio),!o.video||V(o.video)||F(o.video)||a.push("video codec "+o.video),o.text&&"stpp.ttml.im1t"===o.text&&a.push("text codec "+o.text),a.length&&(i.excludeUntil=1/0,e.logger_("excluding "+i.id+" for unsupported: "+a.join(", ")))}}))},r.excludeIncompatibleVariants_=function(e){var t=this,n=[],r=this.master().playlists,i=Js(N(e)),o=Zs(i),a=i.video&&N(i.video)[0]||null,s=i.audio&&N(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=[],c=eu(t.masterPlaylistLoader_.master,i),l=Zs(c);if(c.audio||c.video){if(l!==o&&u.push('codec count "'+l+'" !== "'+o+'"'),!t.sourceUpdater_.canChangeType()){var f=c.video&&N(c.video)[0]||null,h=c.audio&&N(c.audio)[0]||null;f&&a&&f.type.toLowerCase()!==a.type.toLowerCase()&&u.push('video codec "'+f.type+'" !== "'+a.type+'"'),h&&s&&h.type.toLowerCase()!==s.type.toLowerCase()&&u.push('audio codec "'+h.type+'" !== "'+s.type+'"')}u.length&&(i.excludeUntil=1/0,t.logger_("blacklisting "+i.id+": "+u.join(" && ")))}}}))},r.updateAdCues_=function(e){var n=0,r=this.seekable();r.length&&(n=r.start(0)),function(e,n,r){if(void 0===r&&(r=0),e.segments)for(var i,o=r,a=0;a<e.segments.length;a++){var s=e.segments[a];if(i||(i=Bu(n,o+s.duration/2)),i){if("cueIn"in s){i.endTime=o,i.adEndTime=o,o+=s.duration,i=null;continue}if(o<i.endTime){o+=s.duration;continue}i.endTime+=s.duration}else if("cueOut"in s&&((i=new(t().VTTCue)(o,o+s.duration,s.cueOut)).adStartTime=o,i.adEndTime=o+parseFloat(s.cueOut),n.addCue(i)),"cueOutCont"in s){var u=s.cueOutCont.split("/").map(parseFloat),c=u[0],l=u[1];(i=new(t().VTTCue)(o,o+s.duration,"")).adStartTime=o-c,i.adEndTime=i.adStartTime+l,n.addCue(i)}o+=s.duration}}(e,this.cueTagsTrack_,n)},r.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Ls.GOAL_BUFFER_LENGTH,n=Ls.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Ls.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},r.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Ls.BUFFER_LOW_WATER_LINE,n=Ls.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Ls.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,Ls.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},r.bufferHighWaterLine=function(){return Ls.BUFFER_HIGH_WATER_LINE},n}(_a.EventTarget),nc=function(e,t,n){var r,i,o,a=e.masterPlaylistController_,s=a[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(a);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=eu(a.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,o=s,function(e){var t=r.master.playlists[i],n=ns(t),a=rs(t);return void 0===e?a:(e?delete t.disabled:t.disabled=!0,e===a||n||(o(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},rc=["seeking","seeked","pause","playing","error"],ic=function(){function e(e){var n=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_=ka("PlaybackWatcher"),this.logger_("initialize");var r=function(){return n.monitorCurrentTime_()},i=function(){return n.monitorCurrentTime_()},o=function(){return n.techWaiting_()},a=function(){return n.cancelTimer_()},s=function(){return n.fixesBadSeeks_()},u=this.masterPlaylistController_,c=["main","subtitle","audio"],l={};c.forEach((function(e){l[e]={reset:function(){return n.resetSegmentDownloads_(e)},updateend:function(){return n.checkSegmentDownloads_(e)}},u[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),u[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),n.tech_.on(["seeked","seeking"],l[e].reset)})),this.tech_.on("seekablechanged",s),this.tech_.on("waiting",o),this.tech_.on(rc,a),this.tech_.on("canplay",i),this.tech_.one("play",r),this.dispose=function(){n.logger_("dispose"),n.tech_.off("seekablechanged",s),n.tech_.off("waiting",o),n.tech_.off(rc,a),n.tech_.off("canplay",i),n.tech_.off("play",r),c.forEach((function(e){u[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),u[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),n.tech_.off(["seeked","seeking"],l[e].reset)})),n.checkCurrentTimeTimeout_&&t().clearTimeout(n.checkCurrentTimeTimeout_),n.cancelTimer_()}}var n=e.prototype;return n.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&t().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=t().setTimeout(this.monitorCurrentTime_.bind(this),250)},n.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_()},n.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:$a(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)))},n.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+Ha>=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)}},n.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},n.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();if(this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1)),this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:Ha)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+Ga(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)+Ha,this.logger_("Buffered region starts ("+i.start(0)+") just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},n.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=za(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}},n.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 o=Wa(i,t);if(o.length>0){var a=o.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+o.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1},n.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+Ha;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},n.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},n.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var o=za(t,r-3),a=za(t,r),s=za(n,r);s.length&&!a.length&&o.length&&(i={start:o.end(0),end:s.end(0)})}else Wa(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)}},n.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=Wa(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)+Va),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},n.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return _a.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 _a.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),o=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:o}}return null},e}(),oc={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},ac=function e(t,n){var r=0,i=0,o=_a.mergeOptions(oc,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){i&&t.currentTime(i)},s=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),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*o.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):o.getSource&&"function"==typeof o.getSource?(r=Date.now(),o.getSource.call(t,s)):void _a.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},c=function e(){t.off("loadedmetadata",a),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",c),t.reloadSourceOnError=function(n){c(),e(t,n)}},sc=function(e){ac(this,e)},uc="2.8.2",cc={PlaylistLoader:Fa,Playlist:cs,utils:Ts,STANDARD_PLAYLIST_SELECTOR:su,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(cs.isEnabled);return iu(t,(function(e,t){return ou(e,t)})),t.filter((function(t){return!!eu(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:su,movingAverageBandwidthSelector:function(e){var 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&&t().devicePixelRatio||1;return n<0&&(n=this.systemBandwidth),n=e*this.systemBandwidth+(1-e)*n,au(this.playlists.master,n,parseInt(ru(this.tech_.el(),"width"),10)*r,parseInt(ru(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:ou,comparePlaylistResolution:function(e,n){var r,i;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),r=r||t().Number.MAX_VALUE,n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&(i=n.attributes.RESOLUTION.width),r===(i=i||t().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&n.attributes.BANDWIDTH?e.attributes.BANDWIDTH-n.attributes.BANDWIDTH:r-i},xhr:ps()};Object.keys(Ls).forEach((function(e){Object.defineProperty(cc,e,{get:function(){return _a.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Ls[e]},set:function(t){_a.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?_a.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Ls[e]=t}})}));var lc="videojs-vhs",fc=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"})};cc.canPlaySource=function(){return _a.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var hc=function(){if(!t().localStorage)return null;var e=t().localStorage.getItem(lc);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};cc.supportsNativeHls=function(){if(!o()||!o().createElement)return!1;var e=o().createElement("video");return!!_a.getTech("Html5").isSupported()&&["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))}))}(),cc.supportsNativeDash=!!(o()&&o().createElement&&_a.getTech("Html5").isSupported())&&/maybe|probably/i.test(o().createElement("video").canPlayType("application/dash+xml")),cc.supportsTypeNatively=function(e){return"hls"===e?cc.supportsNativeHls:"dash"===e&&cc.supportsNativeDash},cc.isSupported=function(){return _a.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var pc=function(e){function n(t,n,r){var i;if(i=e.call(this,n,_a.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&_a.log.warn("Using hls options is deprecated. Use vhs instead."),"number"==typeof r.initialBandwidth&&(i.options_.bandwidth=r.initialBandwidth),i.logger_=ka("VhsHandler"),n.options_&&n.options_.playerId){var a=_a(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return _a.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),s(i)},configurable:!0}),a.hasOwnProperty("vhs")||Object.defineProperty(a,"vhs",{get:function(){return _a.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),s(i)},configurable:!0}),a.hasOwnProperty("dash")||Object.defineProperty(a,"dash",{get:function(){return _a.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),s(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(o(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=o().fullscreenElement||o().webkitFullscreenElement||o().mozFullScreenElement||o().msFullscreenElement;t&&t.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()})),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}c(n,e);var r=n.prototype;return r.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=hc();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=Ls.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ls.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},r.src=function(e,n){var r=this;if(e){var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(i.substring(i.indexOf(",")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=cc,this.options_.sourceType=W(n),this.options_.seekTo=function(e){r.tech_.setCurrentTime(e)},this.masterPlaylistController_=new tc(this.options_);var o=_a.mergeOptions({liveRangeSafeTimeDelta:Ha},this.options_,{seekable:function(){return r.seekable()},media:function(){return r.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new ic(o),this.masterPlaylistController_.on("error",(function(){var e=_a.players[r.tech_.options_.playerId],t=r.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var a=this.options_.experimentalBufferBasedABR?cc.movingAverageBandwidthSelector(.55):cc.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):a.bind(this),this.masterPlaylistController_.selectInitialPlaylist=cc.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(){_a.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 r.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return r.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return r.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return r.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return r.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return r.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return r.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return r.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return $a(r.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return r.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return r.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return r.tech_.name_},enumerable:!0},duration:{get:function(){return r.tech_.duration()},enumerable:!0},master:{get:function(){return r.playlists.master},enumerable:!0},playerDimensions:{get:function(){return r.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return $a(r.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return r.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){r.options_.useBandwidthFromLocalStorage&&function(e){if(!t().localStorage)return!1;var n=hc();n=n?_a.mergeOptions(n,e):e;try{t().localStorage.setItem(lc,JSON.stringify(n))}catch(e){return!1}}({bandwidth:r.bandwidth,throughput:Math.round(r.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=r).representations=function(){var t=e.masterPlaylistController_.master(),n=us(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!ns(e)})).map((function(t,n){return new nc(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){r.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_=t().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},r.setupEme_=function(){var e,t,n,r=this,i=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,o=(e={player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:i&&i.media()},t=e.player,!(!(n=function(e,t,n){if(!e)return e;var r={};t&&t.attributes&&t.attributes.CODECS&&(r=Js(N(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);var i=U(r.video),o=U(r.audio),a={};for(var s in e)a[s]={},o&&(a[s].audioContentType=o),i&&(a[s].videoContentType=i),t.contentProtection&&t.contentProtection[s]&&t.contentProtection[s].pssh&&(a[s].pssh=t.contentProtection[s].pssh),"string"==typeof e[s]&&(a[s].url=e[s]);return _a.mergeOptions(e,a)}(e.sourceKeySystems,e.media,e.audioMedia))||(t.currentSource().keySystems=n,n&&!t.eme&&(_a.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1))));11!==_a.browser.IE_VERSION&&o?(this.logger_("waiting for EME key session creation"),function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o,a,s=(o=r?i.concat([r]):i,a=Object.keys(n),o.reduce((function(e,t){if(!t.contentProtection)return e;var n=a.reduce((function(e,n){var r=t.contentProtection[n];return r&&r.pssh&&(e[n]={pssh:r.pssh}),e}),{});return Object.keys(n).length&&e.push(n),e}),[])),u=[],c=[];return s.forEach((function(e){c.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),u.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(u),Promise.race(c)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:i&&i.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){r.logger_("created EME key session"),r.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(e){r.logger_("error while creating EME key session",e),r.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},r.setupQualityLevels_=function(){var e=this,t=_a.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){!function(e,t){t.representations().forEach((function(t){e.addQualityLevel(t)})),fc(e,t.playlists)}(e.qualityLevels_,e)})),this.playlists.on("mediachange",(function(){fc(e.qualityLevels_,e.playlists)})))},n.version=function(){return{"@videojs/http-streaming":uc,"mux.js":"5.11.0","mpd-parser":"0.16.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},r.version=function(){return this.constructor.version()},r.canChangeType=function(){return Ru.canChangeType()},r.play=function(){this.masterPlaylistController_.play()},r.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},r.duration=function(){return this.masterPlaylistController_.duration()},r.seekable=function(){return this.masterPlaylistController_.seekable()},r.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_&&t().URL.revokeObjectURL&&(t().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),e.prototype.dispose.call(this)},r.convertToProgramTime=function(e,t){return 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 o=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 o=t.segments[t.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*o.duration)return null;n=o}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!o)return i({message:"valid programTime was not found"});if("estimate"===o.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:o.estimatedStart});var a={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,o.segment);return s&&(a.programDateTime=s.toISOString()),i(null,a)}({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},r.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),Ss({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},n}(_a.getComponent("Component")),dc={name:"videojs-http-streaming",VERSION:uc,canHandleSource:function(e,t){void 0===t&&(t={});var n=_a.mergeOptions(_a.options,t);return dc.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=_a.mergeOptions(_a.options,n);return t.vhs=new pc(e,t,r),_a.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return _a.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=ps(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=_a.mergeOptions(_a.options,t).vhs.overrideNative,r=void 0===n?!_a.browser.IS_ANY_SAFARI:n,i=W(e);return!i||cc.supportsTypeNatively(i)&&!r?"":"maybe"}};F("avc1.4d400d,mp4a.40.2")&&_a.getTech("Html5").registerSourceHandler(dc,0),_a.VhsHandler=pc,Object.defineProperty(_a,"HlsHandler",{get:function(){return _a.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),pc},configurable:!0}),_a.VhsSourceHandler=dc,Object.defineProperty(_a,"HlsSourceHandler",{get:function(){return _a.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),dc},configurable:!0}),_a.Vhs=cc,Object.defineProperty(_a,"Hls",{get:function(){return _a.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),cc},configurable:!0}),_a.use||(_a.registerComponent("Hls",cc),_a.registerComponent("Vhs",cc)),_a.options.vhs=_a.options.vhs||{},_a.options.hls=_a.options.hls||{},_a.registerPlugin?_a.registerPlugin("reloadSourceOnError",sc):_a.plugin("reloadSourceOnError",sc);const yc=_a;function vc(e){return vc="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},vc(e)}function mc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gc(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,_c(r.key),r)}}function bc(e,t,n){return t&&gc(e.prototype,t),n&&gc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _c(e){var t=function(e){if("object"!=vc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vc(t)?t:t+""}function wc(e,t,n){return t=kc(t),function(e,t){if(t&&("object"==vc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Tc()?Reflect.construct(t,n||[],kc(e).constructor):t.apply(e,n))}function Tc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Tc=function(){return!!e})()}function Sc(e,t,n,r){var i=Ec(kc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ec(){return Ec="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=kc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ec.apply(null,arguments)}function kc(e){return kc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kc(e)}function Oc(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cc(e,t)}function Cc(e,t){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cc(e,t)}var Pc=function(e){function t(e,n){return mc(this,t),wc(this,t,[e,n])}return Oc(t,e),bc(t,[{key:"handleClick",value:function(e){var n=this;Sc(t,"handleClick",this,3)([e]),this.requestAnimationFrame((function(){n.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,n,r){if(!this.options_.item)return Sc(t,"createEl",this,3)([e,n,r]);var i=this.options_.item.getCollabsibleName(),o=this.options_.item.getCollabsibleValue(),a=this.options_.item.className,s='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=yc.dom.createEl("span",{innerHTML:o});var u=Sc(t,"createEl",this,3)([e,{className:"vjs-menu-item cv-cog-menu-item ".concat(o?"cv-has-cog-value":""," ").concat(a||"").trim(),innerHTML:s},r]);return u.appendChild(this.valueHolder_),u}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(yc.getComponent("MenuItem")),xc=function(e){function t(e,n){var r;return mc(this,t),(r=wc(this,t,[e,n])).controlText("Settings"),r}return Oc(t,e),bc(t,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(Sc(t,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Sc(t,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach((function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()})),Sc(t,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var e,t=this,n=[],r=0;r<this.options_.items.length;r++){var i=this.options_.items[r];i.isCollabsible&&i.showInCollabsibleMenu()&&i.isCollapsed&&n.push(new Pc(this.player_,{item:i}))}return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&this.additionalItems.forEach((function(e){var r,i=new e.ctor(t.player_,Object.assign(Object.assign({},t.options_),null!==(r=e.options)&&void 0!==r?r:{}));n.splice(e.index,0,i)})),n}},{key:"update",value:function(){Sc(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(t){return t.name===e.name}))||(this.additionalItems.push(e),this.update())}}])}(yc.getComponent("MenuButton"));function jc(e){return jc="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},jc(e)}function Lc(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,Ac(r.key),r)}}function Ac(e){var t=function(e){if("object"!=jc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jc(t)?t:t+""}function Ic(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ic=function(){return!!e})()}function Rc(){return Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Dc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Rc.apply(null,arguments)}function Dc(e){return Dc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Dc(e)}function Mc(e,t){return Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mc(e,t)}yc.registerComponent("cogButton",xc);var Nc=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Dc(t),function(e,t){if(t&&("object"==jc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ic()?Reflect.construct(t,n||[],Dc(e).constructor):t.apply(e,n))}(this,t,[e,n])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mc(e,t)}(t,e),function(e,t){return t&&Lc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){return yc.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(e){var n=this;!function(e,t,n){var r=Rc(Dc(e.prototype),"handleClick",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([e]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){n.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])}(yc.getComponent("MenuItem"));function Bc(e){return Bc="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},Bc(e)}function Uc(){return Uc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Gc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Uc.apply(null,arguments)}function Fc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vc(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,qc(r.key),r)}}function Hc(e,t,n){return t&&Vc(e.prototype,t),n&&Vc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qc(e){var t=function(e){if("object"!=Bc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bc(t)?t:t+""}function zc(e,t,n){return t=Gc(t),function(e,t){if(t&&("object"==Bc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wc()?Reflect.construct(t,n||[],Gc(e).constructor):t.apply(e,n))}function Wc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wc=function(){return!!e})()}function Gc(e){return Gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gc(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xc(e,t)}function Xc(e,t){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xc(e,t)}var Kc=yc.getComponent("MenuItem"),Yc=yc.getComponent("MenuButton"),Qc=["large","medium","small"],Jc=function(e){function t(e,n){return Fc(this,t),zc(this,t,[e,n])}return $c(t,e),Hc(t,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(Kc),Zc=function(e){function t(e,n){var r;return Fc(this,t),(r=zc(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.player_.ready((function(){r.update()})),r}return $c(t,e),Hc(t,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new Nc(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return Qc.map((function(t){r.push(new Jc(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(function(e,t,n){var r=Uc(Gc(e.prototype),"buildWrapperCSSClass",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([]))}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Yc.prototype.handleClick.apply(this)}}])}(Yc);yc.registerComponent("SubtitleSizeButton",Zc);var el=n(16951);function tl(e,t,n){if(e.length)for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.kind===t){if(n&&i.label!==n)continue;return i}}}function nl(e,t,n,r){e.kind===t&&(n&&e.label!==n||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}function rl(e){if(null==e?void 0:e.cues.length)for(var t=0;t<e.cues.length;t++){var n=e.cues[t];(null==n?void 0:n.text)&&(n.text=0===(r=n.text)?"0":r?el.sanitize(r.toString(),{ADD_ATTR:["target"]}).replace("&amp;","&"):"")}var r}var il={getTrack:function(e,t,n){return tl(e.textTracks(),t,n)},useTrack:function(e,t,n,r){var i=e.textTracks(),o=tl(i,t,n);if(o)nl(o,t,n,r);else{var a=function(e){nl(e.track,t,n,r)};i.addEventListener("addtrack",a),e.one("dispose",(function(){i.removeEventListener("addtrack",a)}))}},getCurrentTextTrack:function(e){return this.findTrackByPredicate(e,(function(e){return"showing"===e.mode}))},findTrackByPredicate:function(e,t){if(!e)return null;for(var n=e.textTracks(),r=0;r<n.length;r++){var i=n[r];if(t(i))return i}return null},forEachTrack:function(e,t){if(e)for(var n=e.textTracks(),r=0;r<n.length;r++)t(n[r])},sanitizeTrack:function(e,t){if(e&&t)if(e.loaded)rl(e);else{var n=function(){return rl(e)};e.addEventListener("loadeddata",n),t.one("dispose",(function(){e.removeEventListener("loadeddata",n)}))}}},ol=function(e,t,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=!1,l=function(){r=null,l=null,e.apply(this,s)};return!r&&n&&(e.apply(i,s),c=!0),o.clearTimeout(r),r=o.setTimeout(l,t),c};return a.cancel=function(){o.clearTimeout(r),r=null},a};function al(e){return al="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},al(e)}function sl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ul(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,ll(r.key),r)}}function cl(e,t,n){return t&&ul(e.prototype,t),n&&ul(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ll(e){var t=function(e){if("object"!=al(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=al(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==al(t)?t:t+""}function fl(e,t,n){return t=yl(t),function(e,t){if(t&&("object"==al(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hl()?Reflect.construct(t,n||[],yl(e).constructor):t.apply(e,n))}function hl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(hl=function(){return!!e})()}function pl(e,t,n,r){var i=dl(yl(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function dl(){return dl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=yl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dl.apply(null,arguments)}function yl(e){return yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yl(e)}function vl(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ml(e,t)}function ml(e,t){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ml(e,t)}var gl=yc.getComponent("MenuItem"),bl=function(e){function t(e,n){var r;return sl(this,t),(r=fl(this,t,[e,n])).onChange=ol(r.onChange,100,!1,r),r.bindEventListeners(),r}return vl(t,e),cl(t,[{key:"createEl",value:function(){var e=this.localize("Search");return pl(t,"createEl",this,3)(["li",{className:"vjs-menu-item ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(e,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(e,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",(function(t){e.options_.menuButton.menu.handleBlur(t)}))}},{key:"onChange",value:function(e){var t=e.target;this.options_.search(t.value)}}])}(gl);yc.registerComponent("SearchInputMenuItem",bl);var _l=function(e){function t(){return sl(this,t),fl(this,t,arguments)}return vl(t,e),cl(t,[{key:"createEl",value:function(e,n,r){return pl(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:"vjs-menu-item cv-no-results"}),r])}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}}])}(gl);function wl(e){return wl="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},wl(e)}function Tl(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,Sl(r.key),r)}}function Sl(e){var t=function(e){if("object"!=wl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wl(t)?t:t+""}function El(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(El=function(){return!!e})()}function kl(e){return kl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kl(e)}function Ol(e,t){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ol(e,t)}yc.registerComponent("NoMatchingResultsMenuItem",_l);var Cl=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=kl(t),function(e,t){if(t&&("object"==wl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,El()?Reflect.construct(t,n||[],kl(e).constructor):t.apply(e,n))}(this,t,[e,n])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ol(e,t)}(t,e),function(e,t){return t&&Tl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach((function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])}(yc.getComponent("MenuItem"));function Pl(e){return Pl="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},Pl(e)}function xl(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,jl(r.key),r)}}function jl(e){var t=function(e){if("object"!=Pl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pl(t)?t:t+""}function Ll(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ll=function(){return!!e})()}function Al(e,t,n,r){var i=Il(Rl(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Il(){return Il="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Il.apply(null,arguments)}function Rl(e){return Rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rl(e)}function Dl(e,t){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dl(e,t)}var Ml=yc.getComponent("MenuButton"),Nl=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Rl(t),function(e,t){if(t&&("object"==Pl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ll()?Reflect.construct(t,n||[],Rl(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(r),r.search=r.search.bind(r),r.player_.textTracks().addEventListener("selectedlanguagechange",r.update),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dl(e,t)}(t,e),function(e,t){return t&&xl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.update)}))}},{key:"createItems",value:function(){var e,t=il.getCurrentTextTrack(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new bl(this.player_,{menuButton:this,search:this.search})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new Cl(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new _l(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=il.getCurrentTextTrack(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],s=void 0;s=r.exec(o);)a.push(s.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)}))}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Al(t,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){Al(t,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Al(t,"pressButton",this,3)([]);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Ml.prototype.handleClick.apply(this)}}])}(Ml);function Bl(e){return Bl="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},Bl(e)}function Ul(){return Ul="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Gl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ul.apply(null,arguments)}function Fl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vl(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,ql(r.key),r)}}function Hl(e,t,n){return t&&Vl(e.prototype,t),n&&Vl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ql(e){var t=function(e){if("object"!=Bl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bl(t)?t:t+""}function zl(e,t,n){return t=Gl(t),function(e,t){if(t&&("object"==Bl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wl()?Reflect.construct(t,n||[],Gl(e).constructor):t.apply(e,n))}function Wl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wl=function(){return!!e})()}function Gl(e){return Gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gl(e)}function $l(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xl(e,t)}function Xl(e,t){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xl(e,t)}yc.registerComponent("subtitleSearchButton",Nl);var Kl=yc.getComponent("MenuItem"),Yl=yc.getComponent("MenuButton"),Ql=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"}],Jl=function(e){function t(e,n){return Fl(this,t),zl(this,t,[e,n])}return $l(t,e),Hl(t,[{key:"createEl",value:function(){return yc.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(e){switch(e){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}])}(Kl),Zl=function(e){function t(){var e;return Fl(this,t),(e=zl(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return $l(t,e),Hl(t,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new Nc(this.player_,{label:"Keyboard Shortcuts"})),Ql.forEach((function(n){t.push(new Jl(e.player_,n))})),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat(function(e,t,n){var r=Ul(Gl(e.prototype),"buildWrapperCSSClass",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([]))}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){Yl.prototype.handleClick.apply(this)}}])}(Yl);function ef(e){return ef="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},ef(e)}function tf(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,nf(r.key),r)}}function nf(e){var t=function(e){if("object"!=ef(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ef(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ef(t)?t:t+""}function rf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(rf=function(){return!!e})()}function of(e,t,n,r){var i=af(sf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function af(){return af="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=sf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},af.apply(null,arguments)}function sf(e){return sf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sf(e)}function uf(e,t){return uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uf(e,t)}yc.registerComponent("KeyboardShortcutsButton",Zl);var cf="cv-collapsed",lf=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=sf(t),function(e,t){if(t&&("object"==ef(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rf()?Reflect.construct(t,n||[],sf(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild("cogButton",{items:r.children_},r.children_.length-1),r.update=r.update.bind(r),r.player_.on("cv-updatecog",r.update),r.player_.on("playerresize",r.update),r.player_.one("play",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-updatecog",r.update),r.player_.off("playerresize",r.update),r.player_.off("play",r.update)})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uf(e,t)}(t,e),function(e,t){return t&&tf(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"toggleHidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass(cf)):(n.isCollapsed=!1,n.removeClass(cf)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.isFullscreen(),t=this.player_.whiteboardModePlugin().side,n=this.player_.el().getBoundingClientRect(),r=!e||"left"!==t&&"right"!==t?n.width:n.height;if(r){this.addClass("cv-collapsorator-ready");var i=r<(!e||"left"!==t&&"right"!==t&&"top"!==t?600:1200);this.player_.options_.deferMenus&&(i=!0),this.toggleHidden(i)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(of(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return of(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])}(yc.getComponent("Component"));yc.registerComponent("collapserator",lf);var ff,hf=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"];function pf(e,t,n){return t=yf(t),function(e,t){if(t&&("object"==gf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,df()?Reflect.construct(t,n||[],yf(e).constructor):t.apply(e,n))}function df(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(df=function(){return!!e})()}function yf(e){return yf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yf(e)}function vf(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mf(e,t)}function mf(e,t){return mf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mf(e,t)}function gf(e){return gf="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},gf(e)}function bf(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,Tf(r.key),r)}}function wf(e,t,n){return t&&_f(e.prototype,t),n&&_f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tf(e){var t=function(e){if("object"!=gf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gf(t)?t:t+""}!function(e){e.LocalStorage="localStorage",e.SessionStorage="sessionStorage"}(ff||(ff={}));var Sf=function(){return wf((function e(t){if(bf(this,e),this.cachePrefix="_cv:",this.expireTime=3600,this.type=t.type,this.hasSupport=this.hasBrowserSupport(),this.hasSupport)try{this.storage=window[this.type]}catch(e){}}),[{key:"isAvailable",value:function(){return this.hasSupport}},{key:"get",value:function(e){if(this.hasSupport){var t=this.storage.getItem(e);try{return JSON.parse(t)}catch(e){return t}}}},{key:"set",value:function(e,t){if(this.hasSupport)try{return this.storage.removeItem(e),"string"!=typeof t?(this.storage.setItem(e,JSON.stringify(t)),!0):(this.storage.setItem(e,t),!0)}catch(e){return!1}}},{key:"remove",value:function(e){if(this.hasSupport)return this.storage.removeItem(e)}},{key:"length",value:function(){if(this.hasSupport)return this.storage.length}},{key:"clear",value:function(){if(this.hasSupport)return this.storage.clear()}},{key:"cacheSet",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.expireTime;this.cacheClean();var r={time:this.getCurrentTime()+1e3*n,data:null!=t&&t};return this.set("".concat(this.cachePrefix).concat(e),r)}},{key:"cacheGet",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return n?this.isExpired(n)?(this.remove(t),null):n.data:null}},{key:"cacheExists",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return!(!n||this.isExpired(n)&&(this.remove(t),1))}},{key:"cacheRemove",value:function(e){return this.remove("".concat(this.cachePrefix).concat(e))}},{key:"cacheFlush",value:function(){this.cacheClean()}},{key:"cacheClean",value:function(){if(this.hasSupport)for(var e=0;e<this.storage.length;e++){var t=this.storage.key(e);if(0===t.indexOf(this.cachePrefix)){var n=this.get(t);n&&n.time&&this.isExpired(n)&&this.remove(t)}}}},{key:"isExpired",value:function(e){return e.time<this.getCurrentTime()}},{key:"getCurrentTime",value:function(){return(new Date).getTime()}},{key:"hasBrowserSupport",value:function(){try{return this.type in window&&null!==window[this.type]}catch(e){return!1}}}])}(),Ef=function(e){function t(){return bf(this,t),pf(this,t,arguments)}return vf(t,e),wf(t,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:ff.LocalStorage}))}}])}(Sf),kf=function(e){function t(){return bf(this,t),pf(this,t,arguments)}return vf(t,e),wf(t,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:ff.SessionStorage}))}}])}(Sf),Of=Ef.Instance,Cf=kf.Instance;const Pf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function xf(e,t,n,r){let i,o,a;const s=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=1)a=i+u,o=a>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(c+r*(a%4));return{value:s,binLen:8*e.length+n}}function jf(e,t,n){switch(t){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,r){return function(e,t,n,r){let i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");const u=t||[0],c=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(s=(i>>>1)+c,a=s>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(l+r*(s%4))}return{value:u,binLen:4*e.length+n}}(e,t,r,n)};case"TEXT":return function(e,r,i){return function(e,t,n,r,i){let o,a,s,u,c,l,f,h,p=0;const d=n||[0],y=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(o=e.charCodeAt(s),a=[],128>o?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(l=p+y,c=l>>>2;d.length<=c;)d.push(0);d[c]|=a[u]<<8*(f+i*(l%4)),p+=1}else for(f=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===h&&(u=255&o,o=u<<8|o>>>8),l=p+y,c=l>>>2;d.length<=c;)d.push(0);d[c]|=o<<8*(f+i*(l%4)),p+=2}return{value:d,binLen:8*p+r}}(e,t,r,i,n)};case"B64":return function(e,t,r){return function(e,t,n,r){let i,o,a,s,u,c,l,f=0;const h=t||[0],p=(n=n||0)>>>3,d=-1===r?3:0,y=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==y&&y<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(u=e.substr(o,4),s=0,a=0;a<u.length;a+=1)i=Pf.indexOf(u.charAt(a)),s|=i<<18-6*a;for(a=0;a<u.length-1;a+=1){for(l=f+p,c=l>>>2;h.length<=c;)h.push(0);h[c]|=(s>>>16-8*a&255)<<8*(d+r*(l%4)),f+=1}}return{value:h,binLen:8*f+n}}(e,t,r,n)};case"BYTES":return function(e,t,r){return function(e,t,n,r){let i,o,a,s;const u=t||[0],c=(n=n||0)>>>3,l=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),s=o+c,a=s>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(l+r*(s%4));return{value:u,binLen:8*e.length+n}}(e,t,r,n)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,n,r){return xf(new Uint8Array(e),t,n,r)}(e,t,r,n)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return xf(e,t,r,n)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function Lf(e,t,n,r){switch(e){case"HEX":return function(e){return function(e,t,n,r){let i,o,a="";const s=t/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,t,n,r)};case"B64":return function(e){return function(e,t,n,r){let i,o,a,s,u,c="";const l=t/8,f=-1===n?3:0;for(i=0;i<l;i+=3)for(s=i+1<l?e[i+1>>>2]:0,u=i+2<l?e[i+2>>>2]:0,a=(e[i>>>2]>>>8*(f+n*(i%4))&255)<<16|(s>>>8*(f+n*((i+1)%4))&255)<<8|u>>>8*(f+n*((i+2)%4))&255,o=0;o<4;o+=1)c+=8*i+6*o<=t?Pf.charAt(a>>>6*(3-o)&63):r.b64Pad;return c}(e,t,n,r)};case"BYTES":return function(e){return function(e,t,n){let r,i,o="";const a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,t,n)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){let r;const i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,t,n)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){let r;const i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,t,n)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function Af(e){const t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function If(e,t){return e<<t|e>>>32-t}function Rf(e,t,n){return e^t^n}function Df(e,t,n){return e&t^e&n^t&n}function Mf(e,t){const n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function Nf(e,t,n,r,i){const o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function Bf(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function Uf(e,t){let n,r,i,o,a,s,u;const c=[];for(n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=0;u<80;u+=1)c[u]=u<16?e[u]:If(c[u-3]^c[u-8]^c[u-14]^c[u-16],1),s=u<20?Nf(If(n,5),(l=r)&i^~l&o,a,1518500249,c[u]):u<40?Nf(If(n,5),Rf(r,i,o),a,1859775393,c[u]):u<60?Nf(If(n,5),Df(r,i,o),a,2400959708,c[u]):Nf(If(n,5),Rf(r,i,o),a,3395469782,c[u]),a=o,o=i,i=If(r,30),r=n,n=s;var l;return t[0]=Mf(n,t[0]),t[1]=Mf(r,t[1]),t[2]=Mf(i,t[2]),t[3]=Mf(o,t[3]),t[4]=Mf(a,t[4]),t}function Ff(e,t,n,r){let i;const o=15+(t+65>>>9<<4),a=t+n;for(;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=Uf(e.slice(i,i+16),r);return r}const Vf=class extends class{constructor(e,t,n){const r=n||{};if(this.t=t,this.i=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.s=e,this.o=[],this.h=0,this.u=!1,this.l=0,this.A=!1,this.p=[],this.R=[]}update(e){let t,n=0;const r=this.U>>>5,i=this.T(e,this.o,this.h),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.U<=o&&(this.F=this.m(a.slice(t,t+r),this.F),n+=this.U);this.l+=n,this.o=a.slice(n>>>5),this.h=o%this.U,this.u=!0}getHash(e,t){let n,r,i=this.g;const o=Af(t);if(this.B){if(-1===o.outputLen)throw new Error("Output length must be specified in options");i=o.outputLen}const a=Lf(e,i,this.v,o);if(this.A&&this.Y)return a(this.Y(o));for(r=this.H(this.o.slice(),this.h,this.l,this.C(this.F),i),n=1;n<this.numRounds;n+=1)this.B&&i%32!=0&&(r[r.length-1]&=16777215>>>24-i%32),r=this.H(r,i,0,this.I(this.s),i);return a(r)}setHMACKey(e,t,n){if(!this.L)throw new Error("Variant does not support HMAC");if(this.u)throw new Error("Cannot set MAC key after calling update");const r=jf(t,(n||{}).encoding||"UTF8",this.v);this.M(r(e))}M(e){const t=this.U>>>3,n=t/4-1;let r;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(this.A)throw new Error("MAC key already set");for(t<e.binLen/8&&(e.value=this.H(e.value,e.binLen,0,this.I(this.s),this.g));e.value.length<=n;)e.value.push(0);for(r=0;r<=n;r+=1)this.p[r]=909522486^e.value[r],this.R[r]=1549556828^e.value[r];this.F=this.m(this.p,this.F),this.l=this.U,this.A=!0}getHMAC(e,t){const n=Af(t);return Lf(e,this.g,this.v,n)(this.N())}N(){let e;if(!this.A)throw new Error("Cannot call getHMAC without first setting MAC key");const t=this.H(this.o.slice(),this.h,this.l,this.C(this.F),this.g);return e=this.m(this.R,this.I(this.s)),e=this.H(t,this.g,this.U,e,this.g),e}}{constructor(e,t,n){if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");super(e,t,n);const r=n||{};this.L=!0,this.Y=this.N,this.v=-1,this.T=jf(this.t,this.i,this.v),this.m=Uf,this.C=function(e){return e.slice()},this.I=Bf,this.H=Ff,this.F=[1732584193,4023233417,2562383102,271733878,3285377520],this.U=512,this.g=160,this.B=!1,r.hmacKey&&this.M(function(e,t,n){const r="hmacKey must include a value and format";if(!t)throw new Error(r);if(void 0===t.value||!t.format)throw new Error(r);return jf(t.format,t.encoding||"UTF8",n)(t.value)}(0,r.hmacKey,this.v))}};var Hf;!function(e){e.CvApSoutheast1="cv-ap-southeast-1",e.CvApSoutheast2="cv-ap-southeast-2",e.CvEuWest1="cv-eu-west-1",e.CvNaWest1="cv-na-west-1"}(Hf||(Hf={}));var qf,zf={CvApSoutheast1:{systemName:Hf.CvApSoutheast1},CvApSoutheast2:{systemName:Hf.CvApSoutheast2},CvEuWest1:{systemName:Hf.CvEuWest1},CvNaWest1:{systemName:Hf.CvNaWest1}};function Wf(e){return Wf="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},Wf(e)}!function(e){e.Staff="staff",e.Learner="learner",e.Unknown="unknown"}(qf||(qf={}));var Gf,$f="r",Xf="cv:r",Kf="cv:r:e",Yf="referrer",Qf="cv:originalReferrer",Jf=28800,Zf=["internalReferrer"],eh=function(){var e=Of.cacheGet(Xf);if(e&&Object.keys(e).length>0)return e;var t=function(){var e=Of.cacheGet(Xf),t=Of.cacheGet(Kf);return th(e)?{encoded:t,decoded:e}:function(){Of.cacheRemove(Xf),Of.cacheRemove(Kf);var e=function(){if(window.URLSearchParams){var e=new URLSearchParams(window.location.search);if(e.has($f))return e.get($f)}}(),t=function(e){if(e)try{var t=atob(e),n=JSON.parse(t);if(!th(n))throw Error("Decoded R value is invalid: ".concat(JSON.stringify(n)));return n}catch(e){var r=e instanceof Error?e.message:null==e?void 0:e.toString();console.error(r)}}(e);if(t)return rh(e,t),{decoded:t,encoded:e};var n={internalReferrer:window.location.origin+window.location.pathname,originalReferrer:nh()},r=function(e){if(th(e))try{return btoa(JSON.stringify(e))}catch(t){console.error("R value could not be encoded: ".concat(JSON.stringify(e)))}}(n);return rh(r,n),{decoded:n,encoded:r}}()}();return null==t?void 0:t.decoded};function th(e){return!!e&&"object"===Wf(e)&&!(Object.keys(e).length<Zf.length)&&Zf.every((function(t){return"string"==typeof e[t]}))}function nh(){var e,t=Of.cacheGet(Qf);if(t&&"string"==typeof t)return t;var n=null!==(e=document.referrer)&&void 0!==e?e:"";if(window.URLSearchParams){var r=new URLSearchParams(window.location.search),i=r.has(Yf)&&r.get(Yf);r.has(Yf)&&r.get(Yf)&&(n=i)}return n&&Of.cacheSet(Qf,n,Jf),n}function rh(e,t){try{Of.cacheSet(Xf,t,Jf),Of.cacheSet(Kf,e,Jf)}catch(e){console.error("Could not store attribution data in session storage")}}var ih=new Uint8Array(16);function oh(){if(!Gf&&!(Gf="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gf(ih)}const ah=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,sh=function(e){return"string"==typeof e&&ah.test(e)};for(var uh=[],ch=0;ch<256;++ch)uh.push((ch+256).toString(16).substr(1));const lh=function(e,t,n){var r=(e=e||{}).random||(e.rng||oh)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(uh[e[t+0]]+uh[e[t+1]]+uh[e[t+2]]+uh[e[t+3]]+"-"+uh[e[t+4]]+uh[e[t+5]]+"-"+uh[e[t+6]]+uh[e[t+7]]+"-"+uh[e[t+8]]+uh[e[t+9]]+"-"+uh[e[t+10]]+uh[e[t+11]]+uh[e[t+12]]+uh[e[t+13]]+uh[e[t+14]]+uh[e[t+15]]).toLowerCase();if(!sh(n))throw TypeError("Stringified UUID is invalid");return n}(r)};function fh(e){return fh="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},fh(e)}var hh=18e5;function ph(e){return(new Date).getTime()+e}function dh(e,t,n){var r,i=(r=t)===ff.LocalStorage?Of:r===ff.SessionStorage?Cf:void 0;if(!(null==i?void 0:i.isAvailable()))return null;var o,a=i.get(e);if(!function(e){return"object"===fh(e)&&"string"==typeof(null==e?void 0:e.id)&&!(!sh(e.id)||4!==function(e){if(!sh(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}(e.id))&&"number"==typeof(null==e?void 0:e.ttl)&&!((null==e?void 0:e.ttl)<=0||isNaN(null==e?void 0:e.ttl))}(a)||(o=null==a?void 0:a.ttl)&&(new Date).getTime()>o){var s={id:lh(),ttl:ph(n)};return i.set(e,s),s.id}var u={id:a.id,ttl:ph(n)};return i.set(e,u),a.id}function yh(e){return yh="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},yh(e)}var vh=function(e){var t=yh(e);return"function"===t||"object"===t&&!!e},mh=function(e){return"function"==typeof e},gh=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}};function bh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _h={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i},wh="Unknown";function Th(e,t,n){var r=function(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){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return bh(e,t);var n={}.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)?bh(e,t):void 0}}(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.")}()}(t.exec(n)||[],1)[0];return r||(r=wh),{name:e,version:r}}function Sh(e,t,n){if(!t)return{name:e,version:wh};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():wh}}var Eh=function(){var e=window.navigator.userAgent;return _h.android.test(e)?Sh("Android",_h.androidVersion,e):_h.iphone.test(e)||_h.ipad.test(e)?Sh("iOS",_h.iosVersion,e):_h.linux.test(e)?Sh("Linux",null,e):_h.unix.test(e)?Sh("Unix",null,e):_h.mac.test(e)?Sh("Macintosh",_h.osxVersion,e):_h.windows.test(e)?function(e,t){var n={name:"Windows",version:null};return _h.win2000.test(t)&&(n.version="2000"),_h.winXP.test(t)&&(n.version="XP"),_h.winVista.test(t)&&(n.version="Vista"),_h.win7.test(t)&&(n.version="7"),_h.win8.test(t)&&(n.version="8"),_h.win81.test(t)&&(n.version="8.1"),_h.win10.test(t)&&(n.version="10"),n.version||(n.version=wh),n}(0,e):_h.blackberry.test(e)?Sh("BlackBerry",_h.blackberryVersion,e):_h.windowsPhone.test(e)?Sh("Windows Phone",_h.windowsPhoneVersion,e):{name:wh,version:wh}};function kh(e){return kh="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},kh(e)}function Oh(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){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ch(e,t);var n={}.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)?Ch(e,t):void 0}}(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 Ch(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ph="cv:utmparams",xh=[["source","utm_source"],["medium","utm_medium"],["campaign","utm_campaign"],["term","utm_term"],["content","utm_content"]],jh=xh.reduce((function(e,t){var n=Oh(t,1)[0];return Object.assign(Object.assign({},e),function(e,t,n){return(t=function(e){var t=function(e){if("object"!=kh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},n,n))}),{}),Lh={getUtmParameters:function(){if(!window.URLSearchParams)return null;var e=new URLSearchParams(window.location.search),t={};return xh.forEach((function(n){var r=Oh(n,2),i=r[0],o=r[1];e.has(o)&&(t[i]=e.get(o))})),Ah(t)},setUtmParameters:function(e){if(!e)return null;var t={};return Object.keys(e).forEach((function(n){jh[n]&&(t[n]=e[n])})),Ah(t)},getURLSearchParams:function(){if(!window.URLSearchParams)return null;var e=new URLSearchParams,t=Lh.getUtmParameters();return t?(xh.forEach((function(n){var r=Oh(n,2),i=r[0],o=r[1];t[i]&&e.set(o,t[i])})),e):null}};function Ah(e){if(Object.keys(e).length)return Of.cacheSet(Ph,e,28800),e;var t=Of.cacheGet(Ph);return t&&"object"===kh(t)&&Object.keys(t).length?t:null}function Ih(e){return Ih="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},Ih(e)}function Rh(){Rh=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Ih(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ih(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Dh(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,Mh(r.key),r)}}function Mh(e){var t=function(e){if("object"!=Ih(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ih(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ih(t)?t:t+""}var Nh,Bh,Uh,Fh,Vh,Hh,qh,zh,Wh,Gh,$h,Xh,Kh,Yh,Qh,Jh,Zh,ep,tp,np,rp,ip,op,ap,sp,up,cp,lp,fp,hp,pp,dp,yp,vp,mp,gp,bp,_p,wp,Tp,Sp=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ep="unknown",kp=function(){return function(e,t){return t&&Dh(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}),[{key:"initialize",value:function(){this.validateOptions(),this.options.logUtmParameters&&(this.utmParameters=Lh.getUtmParameters()),this.options.logAttributionData&&(this.attributionData=eh())}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(e){return Sp(this,void 0,void 0,Rh().mark((function t(){return Rh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Array.isArray(e)){t.next=2;break}return t.abrupt("return",this.logBulk(e));case 2:if(this.shouldLog(e)){t.next=4;break}return t.abrupt("return");case 4:return this.validateEvent(e),t.t0=this,t.next=8,this.formatData(e);case 8:return t.t1=t.sent,t.next=11,t.t0.postData.call(t.t0,t.t1);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"logBulk",value:function(e){return Sp(this,void 0,void 0,Rh().mark((function t(){var n,r,i=this;return Rh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.filter((function(e){return i.shouldLog(e)})),n.length){t.next=3;break}return t.abrupt("return");case 3:return n.forEach((function(e){return i.validateEvent(e)})),t.next=6,Promise.all(n.map((function(e){return i.formatData(e)})));case 6:return r=t.sent,t.next=9,this.postData(r);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"validateOptions",value:function(){if(!mh(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(e){return!mh(this.options.shouldLog)||this.options.shouldLog(e)}},{key:"postData",value:function(e){return Sp(this,void 0,void 0,Rh().mark((function t(){var n,r,i,o,a;return Rh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=t.sent,r=JSON.stringify(e),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=gh(n,"/v1/ingest"),Array.isArray(e)&&(o=gh(o,"/bulk")),t.prev=7,t.next=10,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 10:(a=t.sent).ok||this.logError(new Error("CollectionApiClient failed to log event. Status: ".concat(a.status," ").concat(a.statusText))),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(7),this.logError(t.t0);case 17:case"end":return t.stop()}}),t,this,[[7,14]])})))}},{key:"getSignatureHeader",value:function(e){var t=new Vf("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(t.getHash("B64"))}}},{key:"getRegionalUrl",value:function(e){return Sp(this,void 0,void 0,Rh().mark((function t(){var n;return Rh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegion();case 2:n=t.sent,t.t0=n.systemName,t.next=t.t0===Hf.CvEuWest1?6:t.t0===Hf.CvApSoutheast2?7:t.t0===Hf.CvNaWest1?8:(t.t0,Hf.CvApSoutheast1,9);break;case 6:return t.abrupt("return",e.cvEuWest1);case 7:return t.abrupt("return",e.cvApSoutheast2);case 8:return t.abrupt("return",e.cvNaWest1);case 9:return t.abrupt("return",e.cvApSoutheast1);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"validateEvent",value:function(e){"string"!=typeof e.type&&this.logError(new Error("Event type is required."),!0),vh(e.actionContext)||this.logError(new Error("Event actionContext is required."),!0),e.actionContext.entity||this.logError(new Error("Event actionContext entity is required."),!0)}},{key:"formatData",value:function(e){return Sp(this,void 0,void 0,Rh().mark((function t(){return Rh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.type,t.next=3,this.getEventData(e);case 3:return t.t1=t.sent,t.t2=this.getEventMetadata(e),t.abrupt("return",{type:t.t0,data:t.t1,metadata:t.t2});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getEventData",value:function(e){return Sp(this,void 0,void 0,Rh().mark((function t(){var n,r,i,o,a,s,u,c=this;return Rh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.actionContext,r=this.getPlatformMetadata(),t.next=4,this.getUserData();case 4:return i=t.sent,o={user:i,action:n,platform:r,product:{name:this.options.productName,version:this.options.productVersion},session:this.getSessionData()},this.utmParameters&&(o.utm=this.utmParameters),a=this.extractData(e),s=Object.keys(o).map((function(e){return e.toLowerCase()})),u=Object.keys(a).map((function(e){return e.toLowerCase()})),s.forEach((function(e){u.includes(e)&&c.logError(new Error("".concat(e," is a reserved key.")),!0)})),t.abrupt("return",Object.assign(Object.assign({},o),a));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"extractData",value:function(e){return mh(this.options.formatData)?this.options.formatData(e):function(e,t,n){return(t=Mh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e.actionContext.entity,e.data)}},{key:"getUserData",value:function(){var e,t;return Sp(this,void 0,void 0,Rh().mark((function n(){var r;return Rh().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.options.getUser();case 3:if(null==(r=n.sent)?void 0:r.id){n.next=6;break}return n.abrupt("return");case 6:return n.t0=r.id,n.t1=(null===(e=r.role)||void 0===e?void 0:e.toLowerCase())||Ep,n.t2=(null===(t=r.userGroup)||void 0===t?void 0:t.toLowerCase())||qf.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=17,this.getRegion();case 17:return n.t9=n.sent,n.t10=r.accessPolicy,n.t11={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:!1,accessPolicy:n.t10},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t11});case 23:n.prev=23,n.t12=n.catch(0),this.logError(n.t12);case 26:case"end":return n.stop()}}),n,this,[[0,23]])})))}},{key:"getRegion",value:function(){return Sp(this,void 0,void 0,Rh().mark((function e(){var t,n;return Rh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.regionName,e.prev=1,e.next=4,this.options.getUser();case 4:(null==(n=e.sent)?void 0:n.instanceRegion)&&(t=n.instanceRegion),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.logError(e.t0);case 11:return t||this.logError(new Error("RegionName is not set."),!0),e.abrupt("return",this.getRegionByName(t.toLowerCase()));case 13:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"getSessionData",value:function(){return e=dh("cv:session",ff.LocalStorage,hh),t=dh("cv:window",ff.SessionStorage,hh),e||t?{id:e,windowId:t}:null;var e,t}},{key:"getPlatformMetadata",value:function(){var e,t,n,r={url:window.location.href,referrer:document.referrer};return(null===(e=this.attributionData)||void 0===e?void 0:e.internalReferrer)&&(r.internalReferrer=this.attributionData.internalReferrer),(null===(t=this.attributionData)||void 0===t?void 0:t.originalReferrer)&&(r.originalReferrer=this.attributionData.originalReferrer),{browser:(n=window.navigator.userAgent,_h.chrome.test(n)?Th("Chrome",_h.generalVersion,n):_h.firefox.test(n)?Th("Firefox",_h.generalVersion,n):_h.safari.test(n)?Th("Safari",_h.generalVersion,n):_h.ie.test(n)?Th("Internet Explorer",_h.ieVersion,n):_h.edge.test(n)?Th("Edge",_h.edgeVersion,n):_h.opera.test(n)?Th("Opera",_h.operaVersion,n):{name:wh,version:wh}),os:Eh(),request:r,screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height),viewportResolution:"".concat(window.innerWidth,"x").concat(window.innerHeight)}}},{key:"getEventMetadata",value:function(e){return{client:{name:"".concat(this.name,".ts"),version:"2.2.0",region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:e.eventVersion}}},{key:"getRegionByName",value:function(e){var t;return Object.values(zf).forEach((function(n){n.systemName===e&&(t=n)})),t}},{key:"normalizeYearGroup",value:function(e){return e?e.toLowerCase().split(" ").join("_"):Ep}},{key:"logError",value:function(e,t){if(this.options.logError&&this.options.logError(e),t)throw e}}])}();!function(e){e.Stream="cv_product_stream",e.WebPlayerStream="cv_product_webplayer_stream",e.StreamProgress="cv_product_stream_progress",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_instant_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.Unshare="cv_product_unshare",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.Print="cv_product_print",e.Copy="cv_product_copy",e.Activate="cv_product_activate",e.VerifyEmail="cv_product_verify_email",e.ChangePassword="cv_product_change_password",e.ManageGroup="cv_product_manage_group",e.Export="cv_product_export",e.SendEmail="cv_product_send_email",e.Publish="cv_product_publish",e.Submit="cv_product_submit",e.Complete="cv_product_complete",e.Archive="cv_product_archive",e.Promote="cv_product_promote",e.Demote="cv_product_demote",e.BulkAction="cv_product_bulk_action",e.Remove="cv_product_remove",e.Dismiss="cv_product_dismiss",e.Open="cv_product_open",e.Hide="cv_product_hide",e.PageView="cv_product_page_view",e.Select="cv_product_select",e.SwitchCustomer="cv_product_switch_customer",e.Focus="cv_product_focus",e.Blur="cv_product_blur",e.Hover="cv_product_hover",e.Unhover="cv_product_unhover",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(Nh||(Nh={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Resolution="resolution",e.PlaybackSpeed="playback_speed",e.Device="device",e.Restriction="restriction",e.Interactive="interactive",e.Interaction="interaction",e.PDF="pdf",e.CustomerSetting="customer_setting",e.UserSetting="user_setting",e.LibraryRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Playlists="playlists",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.DirectShare="direct_share",e.Upload="upload",e.SearchResults="search_results",e.SearchSuggestion="search_suggestion",e.Audience="audience",e.User="user",e.Clip="clip",e.UserChannel="user_channel",e.Widget="widget",e.Url="url",e.SocialShare="social_share",e.Presentation="presentation",e.BatchJob="batch_job",e.DeepLink="deep_link",e.Feedback="feedback",e.AppLink="app_link",e.SignUp="sign_up",e.FileGeneratorJob="file_generator_job",e.Product="product",e.Customer="customer",e.SpecialEvent="special_event",e.Region="region",e.ProductTip="product_tip",e.Livestream="livestream",e.DevicesCta="devices_cta",e.Integration="integration",e.Faq="faq",e.MixedMedia="mixed_media",e.TableOfContents="table_of_contents",e.Author="author",e.Glance="glance"}(Bh||(Bh={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Footer="footer",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.ExpandableVideoThumbnail="expandable_video_thumbnail",e.VideoItemPreview="video_item_preview",e.InteractiveItemPreview="interactive_item_preview",e.ClipItemPreview="clip_item_preview",e.VideoDetails="video_details",e.InteractiveDetails="interactive_details",e.ClipDetails="clip_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditInteractiveVideoDetails="edit_interactive_video_details",e.EditClipDetails="edit_clip_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.LibraryRequestDetails="staff_request_details",e.Libraries="libraries",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.SeriesListItem="series_list_item",e.SeriesWithVideos="series_with_videos",e.PlaylistWithVideos="playlist_with_videos",e.Dropdown="dropdown",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.FeaturedSeriesSearchResult="featured_series_search_result",e.ExchangeSearchGroupItem="exchange_search_group_item",e.StaffManager="staff_manager",e.StaffManagerListItem="staff_manager_list_item",e.StudentManager="student_manager",e.ViewStudentVideos="view_student_videos",e.StudentManagerListItem="student_manager_list_item",e.EditUser="edit_user",e.UserAuditLog="user_audit_log",e.BulkUserActionsWizard="bulk_user_actions_wizard",e.BulkUserUploadWizard="bulk_user_upload_wizard",e.Classroom="classroom",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.ManageClassroomTeachers="manage_classroom_teachers",e.ManageClassroomTeacherListItem="manage_classroom_teachers_list_item",e.ArchivedClassrooms="archived_classrooms",e.PreviewInteractive="preview_interactive",e.PreviewSharedInteractive="preview_shared_interactive",e.PreviewInteractiveQuestions="preview_interactive_questions",e.EditInteractive="edit_interactive",e.EditInteractiveDetails="edit_interactive_details",e.PlaySharedInteractive="play_shared_interactive",e.PlayInteractive="play_interactive",e.InteractiveListItem="interactive_list_item",e.DeleteInteractive="delete_interactive",e.NewInteractive="new_interactive",e.CopyInteractive="copy_interactive",e.UnpublishInteractive="unpublish_interactive",e.ShareInteractive="share_interactive",e.PlayPage="play_page",e.Player="player",e.FloatingPlayer="floating_player",e.InteractivePlayer="interactive_player",e.EmbeddedPlayer="embedded_player",e.CreateClipPlayer="create_clip_player",e.PlayClip="play_clip",e.PlaySharedClip="play_shared_clip",e.ClipListItem="clip_list_item",e.ContentUpdatesBanner="content_updates_banner",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.TopicsOnboarding="topics_onboarding",e.MyUploads="my_uploads",e.MyVideos="my_videos",e.SlidingList="sliding_list",e.HeroBannerItem="hero_banner_item",e.SlidingListItem="sliding_list_item",e.ClassificationListItem="classification_list_item",e.ClassificationComingSoon="classification_coming_soon",e.ClassificationHero="classification_hero",e.ClassificationFooter="classification_footer",e.Classification="classification",e.PresentationClassifications="presentation_classifications",e.Dashboard="dashboard",e.DiscoverFooter="discover_footer",e.ProductBanner="product_banner",e.UserOptions="user_options",e.MagicTabs="magic_tabs",e.Settings="settings",e.StudentFeed="student_feed",e.SharedByMe="shared_by_me",e.SharedWithMe="shared_with_me",e.Insights="insights",e.ClassroomGuide="classroom_guide",e.TeachingResources="teaching_resources",e.ResourcesGuidancePopup="resources_guidance_popup",e.InteractivesGuidancePopup="interactives_guidance_popup",e.ClassroomGuidancePopup="classroom_guidance_popup",e.TopVideos="top_videos",e.VideoViewsList="video_views_list",e.VideoOverview="video_overview",e.LiteUpgradeFeedbackPopup="lite_upgrade_feedback_popup",e.LiteUpgradeBanner="lite_upgrade_banner",e.LiteUpgradeOnboarding="lite_upgrade_onboarding",e.GiveFeedbackPopup="give_feedback_popup",e.LibraryRequestSettings="library_request_settings",e.OpenInAppPrompt="open_in_app_prompt",e.UseAppButton="use_app_button",e.Launchpad="launchpad",e.EditableSubjectPreferencesWidget="editable_subject_preferences_widget",e.ThumbnailHeroMediaWidget="thumbnail_hero_media_widget",e.ThumbnailFixedListMediaLargeWidget="thumbnail_fixed_list_media_large",e.FilterSlidingPillListSmallWidget="filter_sliding_pill_list_small",e.CircleLogoSlidingListWidget="circle_logo_sliding_list_widget",e.HeroBannerSmallWidget="hero_banner_small",e.EventIconSlidingListWidget="event_icon_sliding_list_widget",e.OnboardingStepsWidget="onboarding_steps_widget",e.FaqQuestionWidget="faq_question_widget",e.FaqQuestionAccordionWidget="faq_question_accordion_widget",e.SubjectStatsWidgetItem="subject_stats_widget_item",e.AuthorReviewerWidget="author_reviewer_widget",e.ExchangeLinksWidget="exchange_links_widget",e.TableOfContents="table_of_contents",e.SignUpPopup="sign_up_popup",e.SignUpPage="sign_up_page",e.TrialBanner="trial_banner",e.InviteColleaguePopup="invite_colleague_popup",e.AuthProspectSelect="auth_prospect_select",e.WelcomePopup="welcome_popup",e.WatchHistoryLanding="watch_history_landing",e.MyFavouritesLanding="my_favourites_landing",e.MyVideoLanding="my_videos_landing",e.PlaylistsLanding="playlists_landing",e.NotificationsDropdown="notifications_dropdown",e.CalendarNav="calendar_nav",e.CalendarDay="calendar_day",e.CalendarPopup="calendar_popup",e.RegionMap="region_map",e.OnboardingWelcomeVideoScreen="onboarding_welcome_video_screen",e.OnboardingSelectRoleScreen="onboarding_select_role_screen",e.OnboardingUsageIntentionScreen="onboarding_usage_intention_screen",e.OnboardingSchoolLevelScreen="onboarding_school_level_screen",e.OnboardingSelectCurriculumScreen="onboarding_select_curriculum_screen",e.OnboardingSubjectsScreen="onboarding_subjects_screen",e.OnboardingSelectVideosScreen="onboarding_select_videos_screen",e.OnboardingCreatePlaylistScreen="onboarding_create_playlist_screen",e.OnboardingSubjectsSummaryScreen="onboarding_subjects_summary_screen",e.ProductTips="product_tips",e.LivestreamBookingForm="booking_form",e.Global="global"}(Uh||(Uh={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard",e.Next="next",e.Back="back"}(Fh||(Fh={})),function(e){e.PageLoad="page_load"}(Vh||(Vh={})),function(e){e.Subject="Subject",e.Curriculum="Curriculum"}(Hh||(Hh={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(qh||(qh={})),function(e){e.Publish="publish",e.Unpublish="unpublish"}(zh||(zh={})),function(e){e.ActivateUser="activate_user",e.VerifyEmail="verify_email",e.ResetPasswordEmail="reset_password"}(Wh||(Wh={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}(Gh||(Gh={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}($h||($h={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(Xh||(Xh={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit",e.ChangeResolution="change_resolution",e.ChangeSpeed="change_speed",e.ChangeDevice="change_device"}(Kh||(Kh={})),function(e){e.Embedded="embedded"}(Yh||(Yh={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open",e.Button="button",e.Link="link",e.Tile="tile",e.Thumbnail="thumbnail",e.Cover="cover",e.TallPoster="tall_poster",e.Banner="banner",e.Slide="slide",e.ExternalLink="external_link",e.ViewStudentWorkspace="view_student_workspace",e.Card="card",e.SelectAllUsers="select_all_users",e.ClickViewLogo="clickview_logo",e.Clear="clear",e.SeeMore="see_more",e.Settings="settings",e.Expand="expand",e.Collapse="collapse"}(Qh||(Qh={})),function(e){e.FeatureUserChannelVideo="feature_user_channel_video",e.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",e.ShareClip="share_clip",e.ViewOriginalVideo="view_original_video",e.ShareInteractive="share_interactive",e.DeleteInteractiveVideo="delete_interactive_video",e.CopyInteractiveVideo="copy_interactive_video",e.EditInteractiveVideo="edit_interactive_video",e.PrintAsWorksheet="print_as_worksheet",e.PreviewInteractiveVideo="preview_interactive_video",e.ViewResults="view_results",e.ViewInsights="view_insights",e.ViewUsage="view_usage",e.MoveToAnotherFolder="move_to_another_folder",e.CreateInteractiveVideo="create_interactive_video",e.ShareVideo="share_video",e.EditVideo="edit_video",e.DownloadVideo="download_video",e.AddToExchange="add_to_exchange",e.AddToUserChannel="add_to_user_channel",e.CreateClip="create_clip",e.FlagVideo="flag_video",e.AddToLibrary="add_to_library",e.AddToWorkspace="add_to_workspace",e.AddToPlaylist="add_to_playlist",e.RemoveFromPlaylist="remove_from_playlist",e.AddCurriculumLink="add_curriculum_link",e.ViewCurriculumLinks="view_curriculum_links",e.OpenInCurator="open_in_curator",e.ManageVideoAccess="manage_video_access",e.Approve="approve",e.AddToLocalCache="add_to_local_cache",e.OpenInLibraryEditor="open_in_library_editor",e.OpenInClickView="open_in_clickview",e.PlayClip="play_clip",e.EditClip="edit_clip",e.DeleteClip="delete_clip",e.EditVideoDetails="edit_video_details",e.DeleteVideo="delete_video",e.ManageAccess="manage_access",e.SuggestEdit="suggest_edit"}(Jh||(Jh={})),function(e){e.Remove="remove"}(Zh||(Zh={})),function(e){e.LibraryReview="library_review"}(ep||(ep={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(tp||(tp={})),function(e){e.Edit="edit"}(np||(np={})),function(e){e.Image="image",e.User="user",e.Playlist="playlist",e.Link="link",e.Avatar="avatar",e.Clip="clip",e.Interactive="interactive",e.Classroom="classroom",e.Customer="customer"}(rp||(rp={})),function(e){e.ViewVideo="view_video",e.Close="close"}(ip||(ip={})),function(e){e.On="on",e.Off="off"}(op||(op={})),function(e){e.ContinueSession="continue_session",e.NewSession="new_session"}(ap||(ap={})),function(e){e.DirectShare="direct_share",e.CopyLink="copy_link",e.CopyEmbedHtml="copy_embed_html",e.PluginEmbed="plugin_embed"}(sp||(sp={})),function(e){e.GoToOnline="go_to_online",e.Feedback="feedback",e.BookACall="book_a_call",e.RequestUpgrade="request_upgrade"}(up||(up={})),function(e){e.SignIn="sign_in",e.SignUp="sign_up",e.SignOut="sign_out",e.TopNavButton="top_nav_button",e.Educator="educator",e.Student="student",e.TermsAndConditions="terms_and_conditions",e.PrivacyPolicy="privacy_policy",e.EnterEmail="enter_email",e.ClosePopup="close_popup",e.Back="back",e.UseMyLocation="use_my_location",e.TrialCreated="trial_created",e.TrialRequested="trial_requested",e.DeadEnd="dead_end",e.CantFindSchool="cant_find_school",e.ResendEmail="resend_email",e.ContactUs="contact_us",e.InviteColleague="invite_colleague",e.Upgrade="upgrade",e.FindSchool="find_school",e.AddToBraze="add_to_braze",e.RequestAccess="request_access",e.AutoJoin="auto_join",e.WrongEmail="wrong_email"}(cp||(cp={})),function(e){e.RequestProgram="tv_request_program",e.AdFreeRequest="tv_ad_free_request",e.AddAdFreeVideo="tv_add_ad_free_video",e.AddFullVideo="tv_add_full_video",e.RegionSelect="tv_region_select"}(lp||(lp={})),function(e){e.AddToExchange="add_to_exchange"}(fp||(fp={})),function(e){e.ComeBackLater="come_back_later",e.Back="back",e.Next="next",e.Complete="complete",e.ReplayVideo="replay_video",e.SkipVideo="skip_video",e.PlayVideo="play_video",e.PauseVideo="pause_video",e.FinishVideo="finish_video",e.SelectPresentation="select_presentation",e.SelectCurriculum="select_curriculum",e.SelectSubject="select_subject",e.SelectAllSubjects="select_all_subjects",e.SelectVideo="select_video",e.SelectAllVideos="select_all_videos",e.DeselectAllVideos="deselect_all_videos",e.SelectOption="select_option",e.SelectJobTitle="select_job_title",e.PhoneNumber="phone_number",e.OtherInformation="other_information",e.PlaylistName="playlist_name",e.DismissWidget="dismiss_widget",e.ContactSales="contact_sales",e.FinishPersonalising="finish_personalising",e.UpdateSchoolLevel="update_school_level",e.UpdateCurriculum="update_curriculum",e.UpdateSubjects="update_subjects"}(hp||(hp={})),function(e){e.OnboardingFirstPlaylistProductTip="onboarding_first_playlist_product_tip",e.OnboardingSchoolLevelsProductTip="onboarding_school_levels_product_tip",e.TopicsDirectoryTabProductTip="topics_directory_tab_product_tip",e.GiveFeedbackFormProductTip="give_feedback_form_product_tip",e.WhatsNewLinkProductTip="whats_new_link_product_tip"}(pp||(pp={})),function(e){e.MyVideos="search_source_my_videos",e.School="search_source_school",e.ExchangeArchive="search_source_exchange_archive",e.ClickView="search_source_clickview"}(dp||(dp={})),function(e){e.InstallIntegration="devices_cta_install_integration",e.LearnMore="devices_cta_learn_more",e.ContactSupport="devices_cta_contact_support",e.Dismiss="devices_cta_dismiss"}(yp||(yp={})),function(e){e.Troubleshoot="troubleshoot_integration"}(vp||(vp={})),function(e){e.Popup="popup",e.FullPage="full_page"}(mp||(mp={})),function(e){e.Calendar="calendar",e.List="list"}(gp||(gp={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(bp||(bp={})),function(e){e.FileSelect="file-select",e.DragDrop="drag-drop"}(_p||(_p={})),function(e){e.Video="videos",e.Clip="clips",e.Interactive="interactives",e.Folder="categories",e.Series="series",e.Tags="tags",e.Subjects="subjects"}(wp||(wp={})),function(e){e[e.V1=1]="V1",e[e.V2=2]="V2",e[e.V3=3]="V3",e[e.V4=4]="V4"}(Tp||(Tp={}));var Op,Cp,Pp=function(e){return e},xp=function(){return!0},jp=function(){return!1},Lp={getUploadData:function(e,t){var n=t.actionContext.entity;if(n===Bh.Video)return Lp.formatVideoUpload(e,t);if(n===Bh.Resource||n===Bh.Subtitle)return Lp.formatResourceUpload(e);if(n===Bh.Banner||n===Bh.Thumbnail||n===Bh.MixedMedia)return e;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(e,t){var n=t.actionContext.workflowPhase;return n===Fh.Start?Lp.getStartVideoUploadData(e):n===Fh.Discard?Lp.getDiscardVideoUploadData(e):n===Fh.Complete?Lp.getCompleteUploadData(e):void 0},getStartVideoUploadData:function(e){return e&&e.length?(e instanceof FileList&&(e=Array.from(e)),e.map((function(t){return{fileName:t.name,size:t.size,type:t.type,count:e.length}}))):[]},getDiscardVideoUploadData:function(e){var t=function(t){var n=t.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(e)?e.length:1,type:r,status:o};return t.progress&&(s.progress=t.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(e)?e.map((function(e){return t(e)})):[t(e)]},getCompleteUploadData:function(e){return e&&e.length?e.map((function(t){return{fileName:t.fileName,libraryId:t.libraryId,folderId:t.folderId,autoCaption:t.autoCaption,count:e.length}})):[]},formatResourceUpload:function(e){var t={id:e.id,name:e.name};return vh(e.metadata)&&(t.type=e.metadata.type),t}};function Ap(e){return Ap="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},Ap(e)}function Ip(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ap(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ap(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ap(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rp=(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Op={},Nh.Navigate,jp),Nh.Click,xp),Nh.Search,xp),Nh.InstantSearch,xp),Nh.Play,xp),Nh.Stream,xp),Nh.WebPlayerStream,xp),Nh.StreamProgress,xp),Nh.Rename,xp),Nh.Move,xp),Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Op,Nh.Create,xp),Nh.Delete,xp),Nh.Associate,xp),Nh.Dissociate,xp),Nh.Filter,xp),Nh.Sort,xp),Nh.Approve,xp),Nh.Reject,xp),Nh.Disable,xp),Nh.Upload,xp),Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Op,Nh.Download,xp),Nh.SetAccess,xp),Nh.AddToLocalCache,jp),Nh.Share,xp),Nh.Unshare,xp),Nh.Edit,xp),Nh.Suggest,xp),Nh.Favourite,xp),Nh.WorkspaceAdd,xp),Nh.ResolveWarning,xp),Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Op,Nh.DismissWarning,xp),Nh.EditAssoc,xp),Nh.Follow,xp),Nh.Print,xp),Nh.Copy,xp),Nh.Activate,xp),Nh.VerifyEmail,xp),Nh.ChangePassword,xp),Nh.Export,xp),Nh.SendEmail,xp),Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Op,Nh.Publish,xp),Nh.Submit,xp),Nh.Complete,xp),Nh.Archive,xp),Nh.Promote,xp),Nh.Demote,xp),Nh.BulkAction,xp),Nh.Remove,xp),Nh.Dismiss,xp),Nh.Open,xp),Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Op,Nh.Hide,xp),Nh.PageView,xp),Nh.Select,xp),Nh.SwitchCustomer,xp),Nh.Focus,xp),Nh.Blur,xp),Nh.Hover,xp),Nh.Unhover,xp)),Dp=(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Cp={},Nh.Search,Pp),Nh.InstantSearch,Pp),Nh.Play,Pp),Nh.Stream,Pp),Nh.StreamProgress,Pp),Nh.Click,Pp),Nh.Filter,Pp),Nh.Sort,Pp),Nh.SetAccess,Pp),Nh.Approve,Pp),Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Ip(Cp,Nh.Reject,Pp),Nh.Create,Pp),Nh.Delete,Pp),Nh.Rename,Pp),Nh.Move,Pp),Nh.Edit,Pp),Nh.Share,(function(e){var t,n,r,i,o={id:e.id,search:e.search,pagePositionIndex:e.pagePositionIndex};return(null===(t=e.video)||void 0===t?void 0:t.id)&&(o.video={id:e.video.id}),(null===(n=e.clip)||void 0===n?void 0:n.id)&&(o.clip={id:e.clip.id},(null===(r=e.clip.video)||void 0===r?void 0:r.id)&&(o.video={id:null===(i=e.clip.video)||void 0===i?void 0:i.id})),void 0!==e.shareCount&&(o.shareCount=e.shareCount),e.embedDetails&&(o.embedDetails=o.embedDetails),o})),Nh.Disable,Pp),Nh.Suggest,Pp),Nh.Upload,Lp.getUploadData),Ip(Ip(Ip(Ip(Ip(Cp,Nh.ResolveWarning,Pp),Nh.DismissWarning,Pp),Nh.Follow,Pp),Nh.Print,Pp),Nh.Copy,Pp)),Mp=Ip(Ip(Ip(Ip({},Nh.Search,(function(){return"search"})),Nh.InstantSearch,(function(){return"search"})),Nh.Filter,(function(){return"filter"})),Nh.Stream,(function(){return Bh.Video})),Np={user:"target_user",product:"target_product"},Bp=Ip(Ip({},Nh.StreamProgress,!0),Nh.WebPlayerStream,!0),Up={shouldLog:function(e){return!!Rp[e.type](e)},formatData:function(e){var t=Dp[e.type],n=mh(t)?t(e.data,e):e.data;if(Bp[e.type])return n;var r=e.actionContext.entity;return mh(Mp[e.type])&&(r=Mp[e.type](e)),Np[r]&&(r=Np[r]),Ip({},r,n)}};function Fp(e){return Fp="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},Fp(e)}function Vp(){Vp=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Fp(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Fp(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Hp(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,qp(r.key),r)}}function qp(e){var t=function(e){if("object"!=Fp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fp(t)?t:t+""}var zp=function(){return function(e,t){return t&&Hp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}),[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);Of.cacheExists(e)||(this.collectionApiClient.log({type:Nh.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Tp.V3}),Of&&Of.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map((function(e){return{type:Nh.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:Tp.V2}})))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e),r=Object.assign(Object.assign({},this.getActionContext()),t);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:r,eventVersion:t.eventVersion||Tp.V2})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===Bh.Interactive?e.interactive={id:+this.options.mediaId}:t===Bh.Clip&&(e.clip={id:+this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new kp({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:Up.shouldLog,formatData:Up.formatData})}},{key:"getCurrentUser",value:function(){return e=this,t=void 0,n=void 0,r=Vp().mark((function e(){return Vp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return e.stop()}}),e,this)})),new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Yh.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Bh.Video;case"MasterInteractive":return Bh.Interactive;case"MasterClip":return Bh.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Uh.Player;case"interactive-player":return Uh.InteractivePlayer;case"create-clip-player":return Uh.CreateClipPlayer}}}])}();function Wp(e){return Wp="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},Wp(e)}function Gp(e){var t="function"==typeof Map?new Map:void 0;return Gp=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if($p())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Xp(i,n.prototype),i}(e,arguments,Kp(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Xp(n,e)},Gp(e)}function $p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($p=function(){return!!e})()}function Xp(e,t){return Xp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xp(e,t)}function Kp(e){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kp(e)}var Yp=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Kp(t),function(e,t){if(t&&("object"==Wp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$p()?Reflect.construct(t,n||[],Kp(e).constructor):t.apply(e,n))}(this,t,[(null==n?void 0:n.title)||"Ajax error"])).url=e,r.response=n,r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xp(e,t)}(t,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(Gp(Error));function Qp(e){return Qp="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},Qp(e)}function Jp(){Jp=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Qp(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Qp(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Zp(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,ed(r.key),r)}}function ed(e){var t=function(e){if("object"!=Qp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qp(t)?t:t+""}var td=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},nd=function(){return function(e,t){return t&&Zp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}}),[{key:"get",value:function(e,t){return td(this,void 0,void 0,Jp().mark((function n(){return Jp().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 3:return n.t1=n.sent,n.next=6,n.t0.parseResponse.call(n.t0,n.t1);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"delete",value:function(e,t){return td(this,void 0,void 0,Jp().mark((function n(){return Jp().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return td(this,void 0,void 0,Jp().mark((function i(){var o;return Jp().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});case 2:if(o=i.sent,!r){i.next=7;break}return i.next=6,this.parseResponse(o);case 6:return i.abrupt("return",i.sent);case 7:case"end":return i.stop()}}),i,this)})))}},{key:"put",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return td(this,void 0,void 0,Jp().mark((function i(){var o;return Jp().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});case 2:if(o=i.sent,!r){i.next=7;break}return i.next=6,this.parseResponse(o);case 6:return i.abrupt("return",i.sent);case 7:case"end":return i.stop()}}),i,this)})))}},{key:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return td(this,void 0,void 0,Jp().mark((function t(){var n,r;return Jp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=15;break}return t.prev=3,t.next=6,e.json();case 6:n=t.sent,t.next=12;break;case 9:throw t.prev=9,t.t0=t.catch(3),new Yp(e.url);case 12:throw t.prev=12,new Yp(e.url,n);case 15:return t.next=17,e.json();case 17:return r=t.sent,t.abrupt("return",r);case 19:case"end":return t.stop()}}),t,null,[[3,9,12,15]])})))}}])}(),rd=new nd;function id(e){return id="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},id(e)}function od(e,t,n){return(t=function(e){var t=function(e){if("object"!=id(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=id(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==id(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ad(e){e.paused()?e.play():e.pause()}function sd(e,t){e.currentTime(e.currentTime()+t)}function ud(e,t){e.volume(e.volume()+t)}var cd,ld=od(od(od(od(od(od(od(od(od(od({},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),"k",ad),"space",ad),"left",(function(e){return sd(e,-5)})),"right",(function(e){return sd(e,5)})),"j",(function(e){return sd(e,-10)})),"l",(function(e){return sd(e,10)})),"up",(function(e){return ud(e,.05)})),"down",(function(e){return ud(e,-.05)}));!function(e){e.PhysicallyChapteredVideo="physically-chaptered-video"}(cd||(cd={}));function fd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hd=function e(t){var n=this;if(yc.browser.IS_IE8)for(var r in n=o().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},pd=function(e){var t,n;function r(){var t,n=fd(fd(t=e.call(this)||this));if(yc.browser.IS_IE8)for(var i in n=o().createElement("custom"),r.prototype)"constructor"!==i&&(n[i]=r.prototype[i]);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||fd(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new hd(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},i.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},i.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},i.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(yc.EventTarget);for(var dd in pd.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},pd.prototype.allowedEvents_)pd.prototype["on"+dd]=null;var yd="2.0.9",vd=function(e){return t=this,yc.mergeOptions({},e),n=t.qualityLevels,r=new pd,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION=yd,r;var t,n,r};function md(e){return md="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},md(e)}function gd(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,bd(r.key),r)}}function bd(e){var t=function(e){if("object"!=md(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=md(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==md(t)?t:t+""}function _d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_d=function(){return!!e})()}function wd(){return wd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Td(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},wd.apply(null,arguments)}function Td(e){return Td=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Td(e)}function Sd(e,t){return Sd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sd(e,t)}(yc.registerPlugin||yc.plugin)("qualityLevels",vd),vd.VERSION=yd;var Ed=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Td(t),function(e,t){if(t&&("object"==md(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_d()?Reflect.construct(t,n||[],Td(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.configureMenuDimensions=r.configureMenuDimensions.bind(r),r.initialize(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sd(e,t)}(t,e),function(e,t){return t&&gd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),function(e,t,n){var r=wd(Td(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([])}},{key:"configureMenuDimensions",value:function(){var e=this,t=function(t){if(!e.options.mobile){var n=e.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:t},i),e.player.trigger("volumechange")}},n=this.player.isFullscreen();if(n&&!this.options.mobile){var r=this.player.whiteboardModePlugin().side;if(t("top"!==r),"left"===r||"right"===r||"top"===r){var i=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(i,"px - 4em)")}))}}n||t(!0);var o=this.player.currentWidth(),a=this.player.currentHeight()/o*100,s=this.player.el().querySelector(".cv-collapsorator"),u=this.player.el().querySelectorAll(".vjs-menu"),c=s&&s.offsetHeight;c?("CreateClipSeekBar"===this.options.seekBarName&&(c+=22),u&&u.length&&u.forEach((function(t){!n&&e.options.overflowControls?t.style.paddingTop="80%":t.style.paddingTop="calc(".concat(a,"% - ").concat(c,"px)"),t.style.marginBottom="".concat(c,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(o<=450?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))}))):this.player.one("play",this.configureMenuDimensions)}}])}(yc.getPlugin("plugin"));yc.registerPlugin("configureMenuDimensionsPlugin",Ed);var kd="cv-persisttest",Od=function(){try{return window.localStorage.setItem(kd,"cv-player-storage-test"),window.localStorage.removeItem(kd),!0}catch(e){return!1}},Cd=function(e){return window.localStorage.getItem(e)},Pd=function(e,t){window.localStorage.setItem(e,t)};function xd(e){return xd="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},xd(e)}function jd(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,Ld(r.key),r)}}function Ld(e){var t=function(e){if("object"!=xd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xd(t)?t:t+""}function Ad(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ad=function(){return!!e})()}function Id(){return Id="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Id.apply(null,arguments)}function Rd(e){return Rd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rd(e)}function Dd(e,t){return Dd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dd(e,t)}var Md=yc.getPlugin("plugin"),Nd="cvplayer-volume",Bd="cvplayer-mute",Ud=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Rd(t),function(e,t){if(t&&("object"==xd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ad()?Reflect.construct(t,n||[],Rd(e).constructor):t.apply(e,n))}(this,t,[e])).enabled=!0,n.player.ready((function(){return n.initialize()})),n}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dd(e,t)}(t,e),function(e,t){return t&&jd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():Od()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var e=Cd(Nd),t=Cd(Bd);e&&this.player.volume(+e),t&&this.player.muted("true"===t)}},{key:"saveVolumeState",value:function(){this.enabled&&(Pd(Nd,this.player.volume().toString()),Pd(Bd,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var e=this.player.getChild("collapserator"),t=e.getChild("volumePanel");e.removeChild(t)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){this.player.off("volumechange",this.saveVolumeState),function(e,t,n){var r=Id(Rd(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([])}}])}(Md);function Fd(e){return Fd="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},Fd(e)}function Vd(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,Hd(r.key),r)}}function Hd(e){var t=function(e){if("object"!=Fd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fd(t)?t:t+""}function qd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(qd=function(){return!!e})()}function zd(e){return zd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zd(e)}function Wd(e,t){return Wd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wd(e,t)}yc.registerPlugin("persistVolumePlugin",Ud);var Gd=yc.getPlugin("plugin"),$d="cvplayer-playback-rate",Xd=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=zd(t),function(e,t){if(t&&("object"==Fd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qd()?Reflect.construct(t,n||[],zd(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.dataLoaded((function(){return r.initialize()})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wd(e,t)}(t,e),function(e,t){return t&&Vd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){var e,t=this;if(Od()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",(function(){t.player.off("ratechange",t.savePlaybackRate)}));var n=+Cd($d);(null===(e=this.player.options_.playbackRates)||void 0===e?void 0:e.some((function(e){return e===n})))&&this.player.playbackRate(n)}}},{key:"savePlaybackRate",value:function(){var e,t=this.player.playbackRate().toString();Pd($d,t),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({rate:t},{actionType:Nh.Select,workflowPhase:Fh.Complete,descriptor:Kh.ChangeSpeed,entity:Bh.PlaybackSpeed,eventVersion:Tp.V3})}}])}(Gd);function Kd(e){return Kd="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},Kd(e)}function Yd(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,Qd(r.key),r)}}function Qd(e){var t=function(e){if("object"!=Kd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kd(t)?t:t+""}function Jd(e,t){if(t&&("object"==Kd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Zd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Zd=function(){return!!e})()}function ey(e){return ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ey(e)}function ty(e,t){return ty=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ty(e,t)}yc.registerPlugin("persistPlaybackRatePlugin",Xd);var ny=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t,n){return t=ey(t),Jd(e,Zd()?Reflect.construct(t,n||[],ey(e).constructor):t.apply(e,n))}(this,t,[e]),n.fullscreenBecauseOfRotate=!1,n.player.supportsFullScreen()?(n.onRotate=n.onRotate.bind(n),n.onFullscreenChange=n.onFullscreenChange.bind(n),n.player.ready((function(){return n.initialize()})),n):Jd(n)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ty(e,t)}(t,e),function(e,t){return t&&Yd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])}(yc.getPlugin("plugin"));yc.registerPlugin("fullscreenOnRotatePlugin",ny);var ry="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n";function iy(e){return iy="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},iy(e)}function oy(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,ay(r.key),r)}}function ay(e){var t=function(e){if("object"!=iy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=iy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==iy(t)?t:t+""}function sy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(sy=function(){return!!e})()}function uy(e){return uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uy(e)}function cy(e,t){return cy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cy(e,t)}var ly=function(e){function t(e,n){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=uy(t),function(e,t){if(t&&("object"==iy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sy()?Reflect.construct(t,n||[],uy(e).constructor):t.apply(e,n))}(this,t,[e,n])).update=(i=r.update.bind(r),o=window.performance.now(),function(){var e=window.performance.now();e-o>=1e3&&(i.apply(void 0,arguments),o=e)}),e.on("timeupdate",r.update),e.one("dispose",(function(){e.off("timeupdate",r.update),r.el_.removeEventListener("click",r.pause)})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cy(e,t)}(t,e),function(e,t){return t&&oy(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:ry,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=yc.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])}(yc.getComponent("Button"));function fy(e){return fy="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},fy(e)}function hy(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,py(r.key),r)}}function py(e){var t=function(e){if("object"!=fy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fy(t)?t:t+""}function dy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dy=function(){return!!e})()}function yy(e){return yy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yy(e)}function vy(e,t){return vy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vy(e,t)}ly.prototype.controlText_="Open in ClickView",yc.registerComponent("OpenExternallyButton",ly);var my=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=yy(t),function(e,t){if(t&&("object"==fy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dy()?Reflect.construct(t,n||[],yy(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vy(e,t)}(t,e),function(e,t){return t&&hy(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])}(yc.getPlugin("plugin"));function gy(e){return gy="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},gy(e)}function by(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,_y(r.key),r)}}function _y(e){var t=function(e){if("object"!=gy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gy(t)?t:t+""}function wy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wy=function(){return!!e})()}function Ty(e,t,n,r){var i=Sy(Ey(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Sy(){return Sy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ey(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Sy.apply(null,arguments)}function Ey(e){return Ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ey(e)}function ky(e,t){return ky=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ky(e,t)}yc.registerPlugin("openExternallyPlugin",my);var Oy=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ey(t),function(e,t){if(t&&("object"==gy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wy()?Reflect.construct(t,n||[],Ey(e).constructor):t.apply(e,n))}(this,t,[e,n])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ky(e,t)}(t,e),function(e,t){return t&&by(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Ty(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ty(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])}(yc.getComponent("component"));function Cy(e){return Cy="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},Cy(e)}function Py(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,xy(r.key),r)}}function xy(e){var t=function(e){if("object"!=Cy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cy(t)?t:t+""}function jy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jy=function(){return!!e})()}function Ly(){return Ly="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ay(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ly.apply(null,arguments)}function Ay(e){return Ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ay(e)}function Iy(e,t){return Iy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Iy(e,t)}yc.registerComponent("TouchControls",Oy);var Ry=yc.getPlugin("plugin"),Dy=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Ay(t),function(e,t){if(t&&("object"==Cy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jy()?Reflect.construct(t,n||[],Ay(e).constructor):t.apply(e,n))}(this,t,[e])).doubleTouchCount=0,n.seekStartTime=0,n.directionModifier=0,n.bindFunctions(),n.player.ready((function(){return n.initialize()})),n}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Iy(e,t)}(t,e),function(e,t){return t&&Py(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){e.player.off("ready",e.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){!function(e,t,n){var r=Ly(Ay(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.userActive&&t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])}(Ry);function My(e){return My="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},My(e)}function Ny(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,By(r.key),r)}}function By(e){var t=function(e){if("object"!=My(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=My(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==My(t)?t:t+""}yc.registerPlugin("touchControls",Dy);var Uy=function(){return function(e,t){return t&&Ny(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)}),[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])}();function Fy(e){return Fy="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},Fy(e)}function Vy(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,Hy(r.key),r)}}function Hy(e){var t=function(e){if("object"!=Fy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fy(t)?t:t+""}function qy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(qy=function(){return!!e})()}function zy(e){return zy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zy(e)}function Wy(e,t){return Wy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wy(e,t)}var Gy=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=zy(t),function(e,t){if(t&&("object"==Fy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qy()?Reflect.construct(t,n||[],zy(e).constructor):t.apply(e,n))}(this,t,[e])).options_=n,r.player.ready((function(){return r.initialize()})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wy(e,t)}(t,e),function(e,t){return t&&Vy(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){var e=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",(function(){e.qualityLevels.off("change",e.onQualityChange)}))}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var e=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",e.id)}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();this._currentSource=n;var o=this.player.playbackRate();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.playbackRate(o),t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"repopulateSources",value:function(e){for(var t=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(t=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(e,t)}},{key:"sortSources",value:function(e){return e.sort((function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1}))}},{key:"populateSources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=null;(e=this.sortSources(e)).forEach((function(e){t.qualityLevels.addQualityLevel(new Uy(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),null===n?e.default&&(r=e):e.id===n&&(r=e)})),null===r&&(r=this.sources[0]),null!==r&&this.setSource(r.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}])}(yc.getPlugin("plugin"));function $y(e){return $y="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},$y(e)}function Xy(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,Ky(r.key),r)}}function Ky(e){var t=function(e){if("object"!=$y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$y(t)?t:t+""}yc.registerPlugin("progressiveFiles",Gy);var Yy=function(){return function(e,t,n){return n&&Xy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}),0,[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var s=r-1;s>0;s--){var u=n[s],c=e.getQualityLevelById(u);if(c)return c}}return null}}])}();function Qy(e){return Qy="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},Qy(e)}function Jy(){Jy=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Qy(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Qy(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Zy(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,ev(r.key),r)}}function ev(e){var t=function(e){if("object"!=Qy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qy(t)?t:t+""}var tv=function(){return function(e,t){return t&&Zy(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)}),[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return e=this,t=void 0,n=void 0,r=Jy().mark((function e(){var t,n,r,i;return Jy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new AbortController,n=setTimeout((function(){return t.abort()}),1e3),e.prev=3,e.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,clearTimeout(n),e.abrupt("return","PONG"===i);case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})),new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}));var e,t,n,r}}])}();function nv(e){return nv="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},nv(e)}function rv(){rv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==nv(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(nv(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function iv(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,ov(r.key),r)}}function ov(e){var t=function(e){if("object"!=nv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nv(t)?t:t+""}var av=function(){return function(e,t){return t&&iv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=yc.log.createLogger("localcache")}),[{key:"setSource",value:function(e,t){return n=this,r=void 0,i=void 0,o=rv().mark((function n(){var r;return rv().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.next=5;break}return n.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 5:t(null,e);case 6:case"end":return n.stop()}}),n,this)})),new(i||(i=Promise))((function(e,t){function a(e){try{u(o.next(e))}catch(e){t(e)}}function s(e){try{u(o.throw(e))}catch(e){t(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,s)}u((o=o.apply(n,r||[])).next())}));var n,r,i,o}}])}();function sv(e){return sv="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},sv(e)}function uv(){uv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==sv(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(sv(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function cv(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,lv(r.key),r)}}function lv(e){var t=function(e){if("object"!=sv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sv(t)?t:t+""}function fv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fv=function(){return!!e})()}function hv(){return hv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},hv.apply(null,arguments)}function pv(e){return pv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pv(e)}function dv(e,t){return dv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dv(e,t)}yc.use("*",(function(e){return new av(e)}));var yv='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',vv=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=pv(t),function(e,t){if(t&&("object"==sv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fv()?Reflect.construct(t,n||[],pv(e).constructor):t.apply(e,n))}(this,t,[e,n])).hide(),r.onLocalCacheChange=r.onLocalCacheChange.bind(r),e.ready((function(){r.initialize()})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dv(e,t)}(t,e),function(e,t){return t&&cv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){return function(e,t,n){var r=hv(pv(e.prototype),"createEl",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(yv,"</div>"),title:"Streaming from ClickView Local Cache"}])}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=uv().mark((function e(){return uv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.localCachePlugin.getActiveLocalCache();case 2:e.sent?this.show():this.hide();case 4:case"end":return e.stop()}}),e,this)})),new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}));var e,t,n,r}}])}(yc.getComponent("Component"));function mv(e){return mv="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},mv(e)}function gv(){gv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==mv(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(mv(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function bv(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,_v(r.key),r)}}function _v(e){var t=function(e){if("object"!=mv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mv(t)?t:t+""}function wv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wv=function(){return!!e})()}function Tv(){return Tv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Sv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Tv.apply(null,arguments)}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sv(e)}function Ev(e,t){return Ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ev(e,t)}yc.registerComponent("localCacheIndicator",vv);var kv=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ov=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Sv(t),function(e,t){if(t&&("object"==mv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wv()?Reflect.construct(t,n||[],Sv(e).constructor):t.apply(e,n))}(this,t,[e])).logger_=yc.log.createLogger("localcache"),void 0===n)throw Error("no options defined");return r.localCaches_=n.localCacheAddresses.map((function(e){return new tv(e)})),r.player.ready((function(){r.initialize(),n.enabled&&r.enable()})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ev(e,t)}(t,e),function(e,t){return t&&bv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(e){this.localCaches_=this.localCaches_.filter((function(t){return t!==e}))}},{key:"dispose",value:function(){!function(e,t,n){var r=Tv(Sv(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return kv(this,void 0,void 0,gv().mark((function e(){var t;return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveLocalCache();case 2:if(!(t=e.sent)){e.next=8;break}return e.next=6,t.ping();case 6:e.sent&&this.removeLocalCache(t);case 8:return this.resetActiveLocalCache(),e.next=11,this.getActiveLocalCache();case 11:return this.resetSource(),e.abrupt("return",!0);case 13:case"end":return e.stop()}}),e,this)})))}},{key:"resetSource",value:function(){for(var e=this.player.qualityLevels(),t=0;t<e.length;t++)e[t].enabled&&(e[t].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return kv(this,void 0,void 0,gv().mark((function e(){var t,n,r,i=this;return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n=function(e){return kv(i,void 0,void 0,gv().mark((function n(){return gv().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.ping();case 2:if(!n.sent){n.next=4;break}t.push(e);case 4:case"end":return n.stop()}}),n)})))},e.next=4,Promise.all(this.localCaches_.map((function(e){return n(e)})));case 4:if(!(t.length>0)){e.next=8;break}return r=t[0],this.onLocalCacheChange(r),e.abrupt("return",r);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),Yy.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}])}(yc.getPlugin("plugin"));function Cv(e){return Cv="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},Cv(e)}function Pv(){Pv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Cv(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Cv(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function xv(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,jv(r.key),r)}}function jv(e){var t=function(e){if("object"!=Cv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cv(t)?t:t+""}function Lv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Lv=function(){return!!e})()}function Av(){return Av="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Iv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Av.apply(null,arguments)}function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Iv(e)}function Rv(e,t){return Rv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rv(e,t)}yc.registerPlugin("localCache",Ov);var Dv=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Mv=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Iv(t),function(e,t){if(t&&("object"==Cv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Lv()?Reflect.construct(t,n||[],Iv(e).constructor):t.apply(e,n))}(this,t,[e])).playerApi=n.playerApi,r.fileToken=n.fileToken,r.logger=yc.log.createLogger("video-signature-expiry-plugin"),r.bindErrorHandlers(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rv(e,t)}(t,e),function(e,t){return t&&xv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){this.player.off("error",this.onError),function(e,t,n){var r=Av(Iv(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([])}},{key:"onError",value:function(){return Dv(this,void 0,void 0,Pv().mark((function e(){var t,n=this;return Pv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||t===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this.player.localCache().getActiveLocalCache();case 5:if(!e.sent){e.next=8;break}return this.callErrorHandler((function(){return n.player.localCache().handleNetworkError()})),e.abrupt("return");case 8:this.callErrorHandler((function(){return n.handleVideoSignatureExpiry()}));case 9:case"end":return e.stop()}}),e,this)})))}},{key:"handleVideoSignatureExpiry",value:function(){return Dv(this,void 0,void 0,Pv().mark((function e(){var t,n;return Pv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.playerApi&&this.fileToken){e.next=2;break}return e.abrupt("return",!1);case 2:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){e.next=4;break}return e.abrupt("return",!1);case 4:return this.refetchedSourcesTimestamp=Date.now(),t=null,e.prev=6,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),n="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),e.next=11,rd.get(n);case 11:t=e.sent,e.next=18;break;case 14:return e.prev=14,e.t0=e.catch(6),this.logger.error("Failed to refetch expired mp4 urls"),e.abrupt("return",!1);case 18:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(t.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))),this.fileToken=t.fileToken,e.abrupt("return",!0);case 22:case"end":return e.stop()}}),e,this,[[6,14]])})))}},{key:"callErrorHandler",value:function(e){return Dv(this,void 0,void 0,Pv().mark((function t(){var n,r,i,o,a=this;return Pv().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.player.currentTime(),r=!this.player.paused(),i=this.player.playbackRate(),o=function(){a.player.playbackRate(i),a.player.currentTime(n),r&&a.player.play(),a.player.error(null)},this.player.one("loadedmetadata",o),t.next=7,e();case 7:if(!t.sent){t.next=9;break}return t.abrupt("return");case 9:this.player.off("loadedmetadata",o);case 10:case"end":return t.stop()}}),t,this)})))}}])}(yc.getPlugin("plugin"));function Nv(e){return Nv="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},Nv(e)}function Bv(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,Uv(r.key),r)}}function Uv(e){var t=function(e){if("object"!=Nv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Nv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nv(t)?t:t+""}function Fv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fv=function(){return!!e})()}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vv(e)}function Hv(e,t){return Hv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hv(e,t)}yc.registerPlugin("handleNetworkErrors",Mv);var qv=yc.getPlugin("plugin"),zv="cvplayer-show-subtitles",Wv="cvplayer-selected-language",Gv="cvplayer-subtitle-size",$v=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Vv(t),function(e,t){if(t&&("object"==Nv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fv()?Reflect.construct(t,n||[],Vv(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.initialize(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hv(e,t)}(t,e),function(e,t){return t&&Bv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.bindEventListeners(),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var e=!!this.options.showSubtitles,t=this.safeGet(zv);if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing")}else this.disableSubtitles();var r=this.safeGet(Gv);r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}},{key:"safeGet",value:function(e){if(Od())return Cd(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e,t,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r];if("showing"===i.mode)return Pd(zv,"true"),Pd(Wv,i.language),void(null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:i.language},{actionType:Nh.Select,entity:Bh.Subtitle,workflowPhase:Fh.Complete,descriptor:op.On}))}var o;Pd(zv,"false"),o=Wv,window.localStorage.removeItem(o),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:""},{actionType:Nh.Select,entity:Bh.Subtitle,workflowPhase:Fh.Complete,descriptor:op.Off,eventVersion:Tp.V3})}},{key:"bindEventListeners",value:function(){var e=this;Od()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();Pd(Gv,e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet(Wv)||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),s=0;s<a.length;s++){var u=a[s],c=this.getLanguageParts(u.language),l=c.language,f=c.country;if(l===i&&(e=u,f||(t=u),f===o))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}},{key:"disableSubtitles",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++)e[t].mode="disabled"}},{key:"previewModeSubtitles",value:function(){var e=this.guessWhichTrack();e&&(e.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])}(qv);function Xv(e){return Xv="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},Xv(e)}function Kv(){Kv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Xv(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Xv(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Yv(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,Qv(r.key),r)}}function Qv(e){var t=function(e){if("object"!=Xv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xv(t)?t:t+""}function Jv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Jv=function(){return!!e})()}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zv(e)}function em(e,t){return em=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},em(e,t)}yc.registerPlugin("persistSubtitleSettingsPlugin",$v);var tm=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},nm=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Zv(t),function(e,t){if(t&&("object"==Xv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jv()?Reflect.construct(t,n||[],Zv(e).constructor):t.apply(e,n))}(this,t,[e])).options=n,r.player.ready((function(){return r.initialize()})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&em(e,t)}(t,e),function(e,t){return t&&Yv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){return tm(this,void 0,void 0,Kv().mark((function e(){var t,n,r,i,o=this;return Kv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveLocalCache();case 2:if(t=e.sent,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),Od()&&(r=Cd(this.getStorageKey(!!t)))&&(n=r),i=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||Yy.enableProfileOrNextBest(i,n),Od()){e.next=10;break}return e.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 13:case"end":return e.stop()}}),e,this)})))}},{key:"onQualityLevelsChange",value:function(){var e;return tm(this,void 0,void 0,Kv().mark((function t(){var n,r,i;return Kv().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isLocalCacheActive();case 2:n=t.sent,r=this.player.qualityLevels(),i=r[r.selectedIndex],Pd(this.getStorageKey(n),i.id),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({quality:i.id},{actionType:Nh.Select,workflowPhase:Fh.Complete,descriptor:Kh.ChangeResolution,entity:Bh.Resolution,eventVersion:Tp.V3});case 7:case"end":return t.stop()}}),t,this)})))}},{key:"isLocalCacheActive",value:function(){return tm(this,void 0,void 0,Kv().mark((function e(){return Kv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.player.localCache().getActiveLocalCache();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])}(yc.getPlugin("plugin"));function rm(e){return rm="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},rm(e)}function im(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function om(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function am(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,um(r.key),r)}}function sm(e,t,n){return t&&am(e.prototype,t),n&&am(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function um(e){var t=function(e){if("object"!=rm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rm(t)?t:t+""}function cm(e,t,n){return t=fm(t),function(e,t){if(t&&("object"==rm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,lm()?Reflect.construct(t,n||[],fm(e).constructor):t.apply(e,n))}function lm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lm=function(){return!!e})()}function fm(e){return fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fm(e)}function hm(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pm(e,t)}function pm(e,t){return pm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pm(e,t)}yc.registerPlugin("persistQualitySettingsPlugin",nm);var dm=yc.getComponent("Component"),ym=function(e){function t(e,n){return om(this,t),cm(this,t,[e,n])}return hm(t,e),sm(t,[{key:"createEl",value:function(){return yc.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var e=this.options_.event,t=this.player_.duration(),n=(e.end.time-e.start.time)/t;this.el_.style.width=100*n+"%";var r=e.start.time/t;this.el_.style.left=100*r+"%"}}])}(dm),vm=function(e){function t(){var e;return om(this,t),(e=cm(this,t,arguments)).events_=[],e}return hm(t,e),sm(t,[{key:"update",value:function(){for(var e=this,t=this.children(),n=t.length;n>0;n--)this.removeChild(t[n]);this.events_.forEach((function(t){var n=new ym(e.player(),{event:t});e.addChild(n),n.update()}))}},{key:"addEvents",value:function(e){var t;(t=this.events_).push.apply(t,function(e){return function(e){if(Array.isArray(e))return im(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){if("string"==typeof e)return im(e,t);var n={}.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)?im(e,t):void 0}}(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.")}()}(e)),this.update()}},{key:"createEl",value:function(){return yc.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(dm);function mm(e){return mm="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},mm(e)}function gm(e,t,n){return(t=_m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bm(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,_m(r.key),r)}}function _m(e){var t=function(e){if("object"!=mm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mm(t)?t:t+""}function wm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wm=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tm(e)}function Sm(e,t){return Sm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sm(e,t)}var Em=yc.getPlugin("plugin"),km="play",Om="playing",Cm="pause",Pm="seekstart",xm="ended",jm="pausedseek",Lm=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Tm(t),function(e,t){if(t&&("object"==mm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wm()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}(this,t,[e,n])).eventBuffer=[],r.latestTime=0,r.lastPlayingTime=0,r.isPlaying=!1,r.isSeeking=!1,r.hasEnded=!1,r.shouldLogPlayOnTimeUpdate=!1,r.options=n,r.player.ready((function(){return r.initialize()})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sm(e,t)}(t,e),function(e,t){return t&&bm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var e=this,t=gm(gm(gm(gm(gm(gm({},km,(function(){return e.onPlay()})),Cm,(function(){return e.onPause()})),"timeupdate",(function(){return e.onTimeUpdate()})),"seeking",(function(){return e.onSeeking()})),xm,(function(){return e.onEnded()})),Om,(function(){return e.onPlaying()})),n=Object.keys(t);n.forEach((function(n){return e.player.on(n,t[n])})),this.one("dispose",(function(){n.forEach((function(n){return e.player.off(n,t[n])}))}))}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;this.interval=window.setInterval((function(){return e.flushBuffer()}),t),this.player.one("dispose",(function(){return window.clearInterval(e.interval)}))}},{key:"addEasterEgg",value:function(){var e,t,n=this,r="",i=function(t){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=t.key)&&n.addDisplay(),window.clearTimeout(e),e=window.setTimeout((function(){r=""}),500)},o=!1,a=function(){o=!0,t=window.setTimeout((function(){o&&n.addDisplay()}),1e4)};function s(){o=!1,window.clearTimeout(t)}this.player.el().addEventListener("keyup",i);var u=this.player.getChild("Collapserator").getChild("PlayToggle");u.on("touchstart",a),u.on("touchend",s),this.player.one("dispose",(function(){var e,t;null===(t=null===(e=n.player)||void 0===e?void 0:e.el())||void 0===t||t.removeEventListener("keyup",i),u.off("touchstart",a),u.off("touchend",s)}))}},{key:"addDisplay",value:function(){var e=this;this.progressReporterDisplay||(this.progressReporterDisplay=new vm(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){e.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(km)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(Cm),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(km)),this.isPlaying&&!this.isSeeking&&this.logEvent(Om)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(jm),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Pm))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(xm)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===Pm&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===Om||e===km)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===Om||e===Cm}},{key:"shouldClearCarriedOverTime",value:function(e){return e===xm||e===jm}},{key:"flushBuffer",value:function(){for(var e,t,n=[],r={};this.eventBuffer.length;){var i=this.eventBuffer.shift();this.shouldClearCarriedOverTime(i.type)?delete this.lastPlayingTime:r.start?i.type===Om&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(i.type)&&(this.lastPlayingTime=i.time),r.end=i,n.push(r),r={}):(this.shouldUseCarriedOverTime(i.type)&&(i.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=i)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(e=this.player)||void 0===e||e.trigger("progressflush"),null===(t=this.progressReporterDisplay)||void 0===t||t.addEvents(n))}},{key:"validateEvents",value:function(e){var t=0;e.forEach((function(e){t+=e.end.time-e.start.time}));var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),t<n}}])}(Em);function Am(e){return Am="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},Am(e)}function Im(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,Rm(r.key),r)}}function Rm(e){var t=function(e){if("object"!=Am(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Am(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Am(t)?t:t+""}function Dm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Dm=function(){return!!e})()}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mm(e)}function Nm(e,t){return Nm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nm(e,t)}yc.registerPlugin("progressReporterPlugin",Lm);var Bm=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,n){return t=Mm(t),function(e,t){if(t&&("object"==Am(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dm()?Reflect.construct(t,n||[],Mm(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nm(e,t)}(t,e),function(e,t){return t&&Im(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){return yc.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])}(yc.getComponent("Component")),Um=["top","left","right","bottom"],Fm={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function Vm(e){return Vm="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},Vm(e)}function Hm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qm(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,Wm(r.key),r)}}function zm(e,t,n){return t&&qm(e.prototype,t),n&&qm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wm(e){var t=function(e){if("object"!=Vm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vm(t)?t:t+""}function Gm(e,t,n){return t=Km(t),function(e,t){if(t&&("object"==Vm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$m()?Reflect.construct(t,n||[],Km(e).constructor):t.apply(e,n))}function $m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($m=function(){return!!e})()}function Xm(){return Xm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Km(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Xm.apply(null,arguments)}function Km(e){return Km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Km(e)}function Ym(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qm(e,t)}function Qm(e,t){return Qm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qm(e,t)}var Jm=yc.getComponent("Component"),Zm=function(e){function t(e,n){var r;return Hm(this,t),(r=Gm(this,t,[e,n])).bindEventListeners(),r}return Ym(t,e),zm(t,[{key:"createEl",value:function(){return function(e,t,n){var r=Xm(Km(e.prototype),"createEl",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}])}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",(function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)}))}}])}(Jm),eg=function(e){function t(e,n){var r;return Hm(this,t),(r=Gm(this,t,[e,n])).addChildren(),r}return Ym(t,e),zm(t,[{key:"addChildren",value:function(){var e=this;Um.forEach((function(t){e.addChild(new Zm(e.player_,{side:t}))}))}}])}(Jm);function tg(e){return tg="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},tg(e)}function ng(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,rg(r.key),r)}}function rg(e){var t=function(e){if("object"!=tg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tg(t)?t:t+""}function ig(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ig=function(){return!!e})()}function og(e){return og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},og(e)}function ag(e,t){return ag=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ag(e,t)}var sg=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=og(t),function(e,t){if(t&&("object"==tg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ig()?Reflect.construct(t,n||[],og(e).constructor):t.apply(e,n))}(this,t,[e,n])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ag(e,t)}(t,e),function(e,t){return t&&ng(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])}(yc.getComponent("MenuItem"));function ug(e){return ug="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},ug(e)}function cg(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,lg(r.key),r)}}function lg(e){var t=function(e){if("object"!=ug(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ug(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ug(t)?t:t+""}function fg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fg=function(){return!!e})()}function hg(){return hg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},hg.apply(null,arguments)}function pg(e){return pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pg(e)}function dg(e,t){return dg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dg(e,t)}var yg=yc.getComponent("MenuButton"),vg=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=pg(t),function(e,t){if(t&&("object"==ug(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fg()?Reflect.construct(t,n||[],pg(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dg(e,t)}(t,e),function(e,t){return t&&cg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new Nc(this.player_,{label:"Video Controls"})];return Um.forEach((function(r){n.push(new sg(e.player_,{side:r,label:Fm[r],selectable:!0,multiSelectable:!1,selected:r===t}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(function(e,t,n){var r=hg(pg(e.prototype),"buildWrapperCSSClass",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([]))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return Fm[e]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){yg.prototype.handleClick.apply(this)}}])}(yg);function mg(e){return mg="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},mg(e)}function gg(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,bg(r.key),r)}}function bg(e){var t=function(e){if("object"!=mg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mg(t)?t:t+""}function _g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_g=function(){return!!e})()}function wg(e){return wg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wg(e)}function Tg(e,t){return Tg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tg(e,t)}var Sg="cv-whiteboard-side",Eg=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=wg(t),function(e,t){if(t&&("object"==mg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_g()?Reflect.construct(t,n||[],wg(e).constructor):t.apply(e,n))}(this,t,[e])).side="bottom",n.player.ready((function(){n.initialize()})),n}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tg(e,t)}(t,e),function(e,t){return t&&gg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(Od()){var e=Cd(Sg);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var e=this,t=this.player.getChild("collapserator"),n=new Bm(this.player);this.button=new vg(this.player),t.addChild(n),t.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){e.player.isFullscreen()&&t.el().setAttribute("draggable","true")},i=function(){e.player.isFullscreen()&&t.el().setAttribute("draggable","false")},o=function(t){e.player.isFullscreen()&&(e.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle"))},a=function(){e.player.isFullscreen()&&(e.player.removeClass("cv-dragging"),t.el().setAttribute("draggable","false"))};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",i),t.el().addEventListener("dragstart",o),t.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",i),t.el().removeEventListener("dragstart",o),t.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new eg(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){e.player.off("fullscreenchange",e.update)}))}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),Od()&&Pd(Sg,e),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),yc.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),yc.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}])}(yc.getPlugin("plugin"));function kg(e){return kg="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},kg(e)}function Og(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,Cg(r.key),r)}}function Cg(e){var t=function(e){if("object"!=kg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kg(t)?t:t+""}function Pg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pg=function(){return!!e})()}function xg(e){return xg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xg(e)}function jg(e,t){return jg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jg(e,t)}yc.registerPlugin("whiteboardModePlugin",Eg);var Lg=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=xg(t),function(e,t){if(t&&("object"==kg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pg()?Reflect.construct(t,n||[],xg(e).constructor):t.apply(e,n))}(this,t,[e])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jg(e,t)}(t,e),function(e,t){return t&&Og(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"deferMenu",value:function(){var e={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",e)}},{key:"buildSubtitles",value:function(){for(var e=[],t=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r],o="showing"===i.mode;e.unshift({id:i.label,name:i.label,selected:o}),o&&(t=!0)}return e.push({id:null,name:"Off",selected:!t}),e}},{key:"buildQualities",value:function(){for(var e=[],t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];e.push({id:r.id,name:r.id+"p",selected:r.enabled})}return e}},{key:"buildPlaybackSpeeds",value:function(){var e=this.player.playbackRate();return this.player.options_.playbackRates.map((function(t){return{id:t,name:t+"x"+(1===t?" (Normal)":""),selected:e===t}}))}}])}(yc.getPlugin("plugin"));yc.registerPlugin("deferMenusPlugin",Lg);var Ag="PreventScrubbingTooltip";function Ig(e){return Ig="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},Ig(e)}function Rg(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,Dg(r.key),r)}}function Dg(e){var t=function(e){if("object"!=Ig(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ig(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ig(t)?t:t+""}function Mg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Mg=function(){return!!e})()}function Ng(e,t,n,r){var i=Bg(Ug(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Bg(){return Bg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ug(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Bg.apply(null,arguments)}function Ug(e){return Ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ug(e)}function Fg(e,t){return Fg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fg(e,t)}var Vg=yc.getComponent("Component"),Hg="cv-prevent-scrubbing-tooltip-show",qg="cv-prevent-scrubbing-tooltip-remove-transition",zg=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Ug(t),function(e,t){if(t&&("object"==Ig(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mg()?Reflect.construct(t,n||[],Ug(e).constructor):t.apply(e,n))}(this,t,arguments)).isShowing=!1,e}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fg(e,t)}(t,e),function(e,t){return t&&Rg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(Ng(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Ng(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerText:"No skipping ahead!"}),r])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(Hg),this.isShowing=!0)}},{key:"hide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(t&&(this.addClass(qg),window.requestAnimationFrame((function(){e.removeClass(qg)}))),this.player_.userActive(!1),this.removeClass(Hg),this.isShowing=!1)}}])}(Vg);function Wg(e){return Wg="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},Wg(e)}function Gg(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,$g(r.key),r)}}function $g(e){var t=function(e){if("object"!=Wg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wg(t)?t:t+""}function Xg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Xg=function(){return!!e})()}function Kg(){return Kg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Yg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kg.apply(null,arguments)}function Yg(e){return Yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yg(e)}function Qg(e,t){return Qg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qg(e,t)}yc.registerComponent(Ag,zg);var Jg=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Yg(t),function(e,t){if(t&&("object"==Wg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Xg()?Reflect.construct(t,n||[],Yg(e).constructor):t.apply(e,n))}(this,t,[e])).isEnabled=!1,r.isPreviewing=!1;var i=null!=n?n:{},o=i.furthestVisitedTime,a=void 0===o?0:o,s=i.isEnabled,u=void 0!==s&&s;return r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.player.currentTime=r.currentTime.bind(r),r.onTimeUpdate=r.onTimeUpdate.bind(r),r.furthestVisitedTime=a,r.isEnabled=u,u&&r.enable(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qg(e,t)}(t,e),function(e,t){return t&&Gg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"dispose",value:function(){this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),function(e,t,n){var r=Kg(Yg(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([]))}},{key:"togglePreview",value:function(e){if(e){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild(Ag),this.isEnabled=!0}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var e=this.playerCurrentTimeFn();e>this.furthestVisitedTime&&(this.furthestVisitedTime=e)}},{key:"currentTime",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];if("number"!=typeof e)return this.playerCurrentTimeFn.apply(this,[e].concat(r));if(this.isEnabled){var o=this.getPreventScrubbingTooltip(),a=null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay");if(e>this.furthestVisitedTime)return o.show(),ol(o.hide,1e3,!1,o)(),null==a||a.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,r);null==a||a.show(),o.hide(!0),this.playerCurrentTimeFn(e,r)}else this.playerCurrentTimeFn.apply(this,[e].concat(r))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild(Ag)}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}}])}(yc.getPlugin("plugin"));function Zg(e){return Zg="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},Zg(e)}function eb(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,tb(r.key),r)}}function tb(e){var t=function(e){if("object"!=Zg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Zg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zg(t)?t:t+""}function nb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nb=function(){return!!e})()}function rb(e){return rb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rb(e)}function ib(e,t){return ib=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ib(e,t)}yc.registerPlugin("preventScrubbingPlugin",Jg);var ob=yc.getComponent("Button"),ab="cv-muted",sb=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=rb(t),function(e,t){if(t&&("object"==Zg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,nb()?Reflect.construct(t,n||[],rb(e).constructor):t.apply(e,n))}(this,t,[e])).update(),n.update=n.update.bind(n),e.on("volumechange",n.update),e.on("dispose",(function(){return e.off("volumechange",n.update)})),n}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ib(e,t)}(t,e),function(e,t){return t&&eb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(ab):this.removeClass(ab)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])}(ob);function ub(e){return ub="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},ub(e)}function cb(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,lb(r.key),r)}}function lb(e){var t=function(e){if("object"!=ub(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ub(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ub(t)?t:t+""}function fb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fb=function(){return!!e})()}function hb(){return hb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pb(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},hb.apply(null,arguments)}function pb(e){return pb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pb(e)}function db(e,t){return db=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},db(e,t)}yc.registerComponent("muteButton",sb),sb.prototype.controlText_="Mute";var yb,vb=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=pb(t),function(e,t){if(t&&("object"==ub(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fb()?Reflect.construct(t,n||[],pb(e).constructor):t.apply(e,n))}(this,t,[e,n]))._onClickHandler=n.onClickHandler,r.bindEventListeners(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&db(e,t)}(t,e),function(e,t){return t&&cb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){return yc.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(e){"function"==typeof this._onClickHandler&&(e.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){this.off("click",this.handleClick),function(e,t,n){var r=hb(pb(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}])}(yc.getComponent("Component"));function mb(e){return mb="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},mb(e)}function gb(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,bb(r.key),r)}}function bb(e){var t=function(e){if("object"!=mb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mb(t)?t:t+""}function _b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_b=function(){return!!e})()}function wb(e){return wb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wb(e)}function Tb(e,t){return Tb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tb(e,t)}yc.registerComponent("playerOverlay",vb),function(e){e.Default="play",e.Hover="hover"}(yb||(yb={}));var Sb=yc.getPlugin("plugin"),Eb="cv-preview-mode",kb=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=wb(t),function(e,t){if(t&&("object"==mb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_b()?Reflect.construct(t,n||[],wb(e).constructor):t.apply(e,n))}(this,t,[e])).buttonAdded=!1,n.mode=null,n}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tb(e,t)}(t,e),function(e,t){return t&&gb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(e,t){var n=this.mode;if(this.mode=e,e===yb.Hover)return this.buttonAdded||this.addButtons(t),this.player.addClass(Eb),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");n===yb.Hover&&(this.player.removeClass(Eb),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(e){var t=new sb(this.player),n=new vb(this.player,{onClickHandler:e});this.player.addChild(t),this.player.addChild(n),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var e=this;this.player.dataLoaded((function(){return e.player.persistSubtitleSettingsPlugin().previewModeSubtitles()}))}},{key:"disableSubtitles",value:function(){var e=this;this.player.dataLoaded((function(){return e.player.persistSubtitleSettingsPlugin().applyUserPreferences()}))}},{key:"mute",value:function(){var e=this;this.player.ready((function(){e.player.persistVolumePlugin().disable(),e.player.muted(!0)}))}},{key:"unmute",value:function(){var e=this;this.player.ready((function(){e.player.persistVolumePlugin().applyUserPreferences(),e.player.persistVolumePlugin().enable()}))}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])}(Sb);function Ob(e){return Ob="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},Ob(e)}function Cb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pb(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,jb(r.key),r)}}function xb(e,t,n){return t&&Pb(e.prototype,t),n&&Pb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jb(e){var t=function(e){if("object"!=Ob(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ob(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ob(t)?t:t+""}function Lb(e,t,n){return t=Ib(t),function(e,t){if(t&&("object"==Ob(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ab()?Reflect.construct(t,n||[],Ib(e).constructor):t.apply(e,n))}function Ab(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ab=function(){return!!e})()}function Ib(e){return Ib=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ib(e)}function Rb(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Db(e,t)}function Db(e,t){return Db=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Db(e,t)}yc.registerPlugin("playerModePlugin",kb);var Mb=yc.getComponent("Component"),Nb=yc.getComponent("ClickableComponent"),Bb=function(e){function t(){return Cb(this,t),Lb(this,t,arguments)}return Rb(t,e),xb(t,[{key:"createEl",value:function(){return Mb.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(Mb),Ub=function(e){function t(e,n){var r;return Cb(this,t),(r=Lb(this,t,[e,n])).isFavourited=n.isFavourited,r.renderIcon(),r.update(),r}return Rb(t,e),xb(t,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new Bb(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(e,t,n){t=Object.assign({innerHTML:"",className:"cv-favourite-button"},t),n=Object.assign({type:"button"},n);var r=Mb.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.clickHandler&&this.options_.clickHandler(this.isFavourited)}}])}(Nb);function Fb(e){return Fb="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},Fb(e)}function Vb(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,Hb(r.key),r)}}function Hb(e){var t=function(e){if("object"!=Fb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fb(t)?t:t+""}function qb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(qb=function(){return!!e})()}function zb(e){return zb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zb(e)}function Wb(e,t){return Wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wb(e,t)}Ub.prototype.controlText_="Favourite";var Gb=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,n){return t=zb(t),function(e,t){if(t&&("object"==Fb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qb()?Reflect.construct(t,n||[],zb(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wb(e,t)}(t,e),function(e,t){return t&&Vb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"setFavourite",value:function(e,t){if(!this.initialized){var n=new Ub(this.player,{isFavourited:e,clickHandler:t});this.player.addChild(n),this.initialized=!0}}}])}(yc.getPlugin("plugin"));yc.registerPlugin("favouritePlugin",Gb),n(94386),n(98457);var $b=n(15206),Xb=n.n($b),Kb=(n(15296),n(48868),n(96609),n(92274),n(68268),n(81874),n(31341),n(54861),n(50200)),Yb=n.n(Kb),Qb=n(40001),Jb=n.n(Qb),Zb=n(98511),e_=n.n(Zb),t_=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),n_="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,r_=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),i_="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r_):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},o_=["top","right","bottom","left","width","height","size","weight"],a_="undefined"!=typeof MutationObserver,s_=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,r=0;function i(){t&&(t=!1,e()),n&&a()}function o(){i_(i)}function a(){var e=Date.now();if(t){if(e-r<2)return;n=!0}else t=!0,n=!1,setTimeout(o,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){n_&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a_?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){n_&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;o_.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u_=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c_=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||r_},l_=y_(0,0,0,0);function f_(e){return parseFloat(e)||0}function h_(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+f_(e["border-"+n+"-width"])}),0)}var p_="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c_(e).SVGGraphicsElement}:function(e){return e instanceof c_(e).SVGElement&&"function"==typeof e.getBBox};function d_(e){return n_?p_(e)?function(e){var t=e.getBBox();return y_(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return l_;var r=c_(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=f_(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=f_(r.width),u=f_(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=h_(r,"left","right")+o),Math.round(u+a)!==n&&(u-=h_(r,"top","bottom")+a)),!function(e){return e===c_(e).document.documentElement}(e)){var c=Math.round(s+o)-t,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return y_(i.left,i.top,s,u)}(e):l_}function y_(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v_=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y_(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=d_(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),m_=function(e,t){var n,r,i,o,a,s,u,c=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),u_(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);u_(this,{target:e,contentRect:c})},g_=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new t_,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c_(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v_(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c_(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new m_(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),b_="undefined"!=typeof WeakMap?new WeakMap:new t_,__=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=s_.getInstance(),r=new g_(t,n,this);b_.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){__.prototype[e]=function(){var t;return(t=b_.get(this))[e].apply(t,arguments)}}));const w_=void 0!==r_.ResizeObserver?r_.ResizeObserver:__;n(82937),n(66403),n(42295),n(52963),n(34994);var T_=null,S_=null;function E_(){if(null===T_){if("undefined"==typeof document)return T_=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),T_=n}return T_}Xb()&&window.addEventListener("resize",(function(){S_!==window.devicePixelRatio&&(S_=window.devicePixelRatio,T_=null)}));var k_=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function O_(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function C_(e){return e&&e.ownerDocument?e.ownerDocument:document}var P_=function(){function e(t,n){var r=this;this.onScroll=function(){var e=O_(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=C_(r.el),n=O_(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=Yb()(this.recalculate.bind(this),64),this.onMouseMove=Yb()(this.onMouseMove.bind(this),64),this.hideScrollbars=Jb()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Jb()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=e_()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=999;var a=e.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=C_(e),r=O_(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),Xb()&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=O_(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||w_;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=O_(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>c,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var l=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>c-l,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.axis[t].scrollbar,a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=C_(this.el),r=O_(this.el),i=this.axis[t].scrollbar,o="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=o-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=O_(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function e(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=a,i)),r.requestAnimationFrame(e)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[t].offsetAttr]=a,o)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:E_()}catch(e){return E_()}},t.removeListeners=function(){var e=this,t=O_(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();P_.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},P_.instances=new WeakMap,P_.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||P_.instances.has(e)||new P_(e,k_(e.attributes))}))},P_.removeObserver=function(){this.globalObserver.disconnect()},P_.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(P_.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},P_.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!P_.instances.has(e)&&new P_(e,k_(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||P_.instances.has(e)||new P_(e,k_(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?P_.instances.has(e)&&P_.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){P_.instances.has(e)&&P_.instances.get(e).unMount()})))}))}))},P_.getOptions=k_,Xb()&&P_.initHtmlApi();const x_=P_;function j_(e){return j_="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},j_(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,A_(r.key),r)}}function A_(e){var t=function(e){if("object"!=j_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=j_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j_(t)?t:t+""}function I_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I_=function(){return!!e})()}function R_(e,t,n,r){var i=D_(M_(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function D_(){return D_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.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(arguments.length<3?e:n):i.value}},D_.apply(null,arguments)}function M_(e){return M_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M_(e)}function N_(e,t){return N_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N_(e,t)}var B_=yc.getComponent("Menu"),U_=B_.prototype,F_=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,n){return t=M_(t),function(e,t){if(t&&("object"==j_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I_()?Reflect.construct(t,n||[],M_(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N_(e,t)}(t,e),function(e,t){return t&&L_(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){var e=R_(t,"createEl",this,3)([]);return this.simpleBar=new x_(this.contentEl(),{autoHide:!1}),e}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():R_(t,"contentEl",this,3)([])}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),R_(t,"dispose",this,3)([])}},{key:"addItem",value:function(e){R_(t,"addItem",this,3)([e]),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){R_(t,"lockShowing",this,3)([]),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||U_.handleBlur.call(this,e)}}])}(B_);function V_(e){return V_="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},V_(e)}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,q_(r.key),r)}}function q_(e){var t=function(e){if("object"!=V_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=V_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==V_(t)?t:t+""}function z_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(z_=function(){return!!e})()}function W_(e){return W_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W_(e)}function G_(e,t){return G_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},G_(e,t)}F_.originalProto=U_,B_.prototype=F_.prototype,yc.registerComponent("Menu",F_);var $_=yc.getComponent("Component"),X_=yc.getComponent("MenuButton"),K_=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,n){return t=W_(t),function(e,t){if(t&&("object"==V_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,z_()?Reflect.construct(t,n||[],W_(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G_(e,t)}(t,e),function(e,t){return t&&H_(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createMenu",value:function(){var e,t=new F_(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=yc.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new $_(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t}}])}(X_),Y_=X_.prototype.pressButton;X_.prototype.pressButton=function(){Y_.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var Q_=X_.prototype.unpressButton;function J_(e){return J_="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},J_(e)}function Z_(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,ew(r.key),r)}}function ew(e){var t=function(e){if("object"!=J_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=J_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==J_(t)?t:t+""}function tw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tw=function(){return!!e})()}function nw(e,t,n,r){var i=rw(iw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function rw(){return rw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=iw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},rw.apply(null,arguments)}function iw(e){return iw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},iw(e)}function ow(e,t){return ow=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ow(e,t)}X_.prototype.unpressButton=function(){Q_.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},yc.registerComponent("MenuButton",K_);var aw=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,n){return t=iw(t),function(e,t){if(t&&("object"==J_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tw()?Reflect.construct(t,n||[],iw(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ow(e,t)}(t,e),function(e,t){return t&&Z_(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(nw(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return nw(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}}])}(yc.getComponent("Component"));function sw(e){return sw="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},sw(e)}function uw(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,cw(r.key),r)}}function cw(e){var t=function(e){if("object"!=sw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sw(t)?t:t+""}function lw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lw=function(){return!!e})()}function fw(e){return fw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fw(e)}function hw(e,t){return hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hw(e,t)}aw.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},yc.registerComponent("TimeWrapper",aw);var pw=yc.getComponent("SeekBar"),dw=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,n){return t=fw(t),function(e,t){if(t&&("object"==sw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,lw()?Reflect.construct(t,n||[],fw(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hw(e,t)}(t,e),function(e,t){return t&&uw(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleMouseDown",value:function(e){var t=this.player_.preventScrubbingPlugin();t.isEnabled&&this.getMouseTime(e)>t.furthestVisitedTime||(pw.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(e){pw.prototype.handleMouseMove.call(this,e),this.update()}},{key:"getPercent",value:function(){var e=this.player_.currentTime()/this.player_.duration();return e>=1?1:e}},{key:"handleMouseUp",value:function(e){var t=this;pw.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"clamp",value:function(e,t,n){return Math.min(Math.max(e,t),n)}},{key:"getMouseTime",value:function(e){return this.clamp(pw.prototype.calculateDistance.call(this,e).x,0,1)*this.player_.duration()}}])}(pw);function yw(e){return yw="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},yw(e)}function vw(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,mw(r.key),r)}}function mw(e){var t=function(e){if("object"!=yw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yw(t)?t:t+""}function gw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(gw=function(){return!!e})()}function bw(e,t,n,r){var i=_w(ww(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function _w(){return _w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ww(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},_w.apply(null,arguments)}function ww(e){return ww=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ww(e)}function Tw(e,t){return Tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tw(e,t)}yc.registerComponent("SeekBar",dw);var Sw=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,n){return t=ww(t),function(e,t){if(t&&("object"==yw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gw()?Reflect.construct(t,n||[],ww(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tw(e,t)}(t,e),function(e,t){return t&&vw(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(bw(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return bw(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])}(yc.getComponent("Component"));function Ew(e){return Ew="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},Ew(e)}function kw(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,Ow(r.key),r)}}function Ow(e){var t=function(e){if("object"!=Ew(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ew(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ew(t)?t:t+""}function Cw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Cw=function(){return!!e})()}function Pw(e,t,n,r){var i=xw(jw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function xw(){return xw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=jw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},xw.apply(null,arguments)}function jw(e){return jw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jw(e)}function Lw(e,t){return Lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lw(e,t)}var Aw=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,n){return t=jw(t),function(e,t){if(t&&("object"==Ew(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cw()?Reflect.construct(t,n||[],jw(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lw(e,t)}(t,e),function(e,t){return t&&kw(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Pw(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Pw(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])}(yc.getComponent("Component"));function Iw(e){return Iw="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},Iw(e)}function Rw(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,Dw(r.key),r)}}function Dw(e){var t=function(e){if("object"!=Iw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Iw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Iw(t)?t:t+""}function Mw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Mw=function(){return!!e})()}function Nw(e,t,n,r){var i=Bw(Uw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Bw(){return Bw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Uw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Bw.apply(null,arguments)}function Uw(e){return Uw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Uw(e)}function Fw(e,t){return Fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fw(e,t)}var Vw=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Uw(t),function(e,t){if(t&&("object"==Iw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mw()?Reflect.construct(t,n||[],Uw(e).constructor):t.apply(e,n))}(this,t,[e,n])).playProgress=new Aw(r.player_),r.addChild(r.playProgress),r.loadProgress=new Sw(r.player_),r.addChild(r.loadProgress),r.update(),r.updateBuffered(0),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fw(e,t)}(t,e),function(e,t){return t&&Rw(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Nw(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Nw(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])}(yc.getComponent("Component"));function Hw(e){for(var t=e.buffered(),n=e.currentTime(),r=0,i=0;i<t.length;i++){var o=t.start(i),a=t.end(i);if(o<=n&&a>=n){r=a;break}}return r}function qw(e){return qw="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},qw(e)}function zw(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,Ww(r.key),r)}}function Ww(e){var t=function(e){if("object"!=qw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qw(t)?t:t+""}function Gw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gw=function(){return!!e})()}function $w(e,t,n,r){var i=Xw(Kw(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Xw(){return Xw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Kw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Xw.apply(null,arguments)}function Kw(e){return Kw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kw(e)}function Yw(e,t){return Yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yw(e,t)}var Qw=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,n){return t=Kw(t),function(e,t){if(t&&("object"==qw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gw()?Reflect.construct(t,n||[],Kw(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yw(e,t)}(t,e),function(e,t){return t&&zw(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat($w(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return $w(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach((function(t){t.updateBuffered(Hw(e.player_))}))}}])}(yc.getComponent("Component"));function Jw(e){return Jw="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},Jw(e)}function Zw(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,eT(r.key),r)}}function eT(e){var t=function(e){if("object"!=Jw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jw(t)?t:t+""}function tT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tT=function(){return!!e})()}function nT(e,t,n,r){var i=rT(iT(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function rT(){return rT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=iT(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},rT.apply(null,arguments)}function iT(e){return iT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},iT(e)}function oT(e,t){return oT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oT(e,t)}var aT=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=iT(t),function(e,t){if(t&&("object"==Jw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tT()?Reflect.construct(t,n||[],iT(e).constructor):t.apply(e,n))}(this,t,[e,n])).onDurationChange=r.onDurationChange.bind(r),r.createChapterItems=r.createChapterItems.bind(r),r.updateBuffered=r.updateBuffered.bind(r),il.useTrack(r.player_,"chapters",null,r.createChapterItems),r.player_.on("durationchange",r.onDurationChange),r.player_.on("progress",r.updateBuffered),r.createChapterItems(),r.update(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oT(e,t)}(t,e),function(e,t){return t&&Zw(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),nT(t,"dispose",this,3)([])}},{key:"createEl",value:function(){return yc.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=nT(t,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(e){var t=this,n=function(){t.createChapterItems(),t.updateBuffered()};e.addEventListener("cv:cuechange",n),this.player_.one("dispose",(function(){return e.removeEventListener("cv:cuechange",n)}))}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_||this.bindUpdateListener(e),this.track_=e);var r=new Qw(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,s=o.endTime,u=this.player_.duration();u&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(s=this.player_.duration()),s>u&&(s=u));var c=new Vw(this.player_,{startTime:a,endTime:s});if(r.addChild(c),u&&s===u)break}else r.addChild(new Vw(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])}(yc.getComponent("SeekBar"));function sT(e){return sT="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},sT(e)}function uT(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,cT(r.key),r)}}function cT(e){var t=function(e){if("object"!=sT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sT(t)?t:t+""}function lT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lT=function(){return!!e})()}function fT(){return fT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hT(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},fT.apply(null,arguments)}function hT(e){return hT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hT(e)}function pT(e,t){return pT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pT(e,t)}aT.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},yc.browser.IS_IOS||yc.browser.IS_ANDROID||aT.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),yc.registerComponent("ChapterSeekBar",aT);var dT=yc.getComponent("ProgressControl"),yT="seekBar",vT=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=hT(t),function(e,t){if(t&&("object"==sT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,lT()?Reflect.construct(t,n||[],hT(e).constructor):t.apply(e,n))}(this,t,arguments)).seekBarName_=yT,e}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pT(e,t)}(t,e),function(e,t){return t&&uT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())===yT.toLowerCase()&&(e=this.seekBarName_),function(e,t,n){var r=fT(hT(e.prototype),"getChild",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([e])}}])}(dT);function mT(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)}function gT(e){return gT="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},gT(e)}function bT(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,_T(r.key),r)}}function _T(e){var t=function(e){if("object"!=gT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gT(t)?t:t+""}function wT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wT=function(){return!!e})()}function TT(){return TT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ST(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},TT.apply(null,arguments)}function ST(e){return ST=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ST(e)}function ET(e,t){return ET=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ET(e,t)}vT.prototype.options_={children:[]},yc.registerComponent("ProgressControl",vT);var kT=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ST(t),function(e,t){if(t&&("object"==gT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wT()?Reflect.construct(t,n||[],ST(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasCustomChapterText=!1,il.useTrack(r.player_,"chapters",!1,(function(e){r.track_=e})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ET(e,t)}(t,e),function(e,t){return t&&bT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){var e=function(e,t,n){var r=TT(ST(e.prototype),"createEl",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([]);return this.chapter_=yc.dom.createEl("div"),e.appendChild(this.chapter_),this.time_=yc.dom.createEl("div"),e.appendChild(this.time_),e}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(yc.dom.textContent(this.time_,mT(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=r.endTime||t;if(r.startTime<=e&&i>=e)return void yc.dom.textContent(this.chapter_,r.text)}yc.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){yc.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(e){yc.dom.textContent(this.time_,e)}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,yc.dom.textContent(this.chapter_,null!=e?e:"")}}])}(yc.getComponent("TimeTooltip"));function OT(e){return OT="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},OT(e)}function CT(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,PT(r.key),r)}}function PT(e){var t=function(e){if("object"!=OT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=OT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==OT(t)?t:t+""}function xT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xT=function(){return!!e})()}function jT(){return jT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=LT(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},jT.apply(null,arguments)}function LT(e){return LT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},LT(e)}function AT(e,t){return AT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},AT(e,t)}yc.registerComponent("TimeTooltip",kT);var IT=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=LT(t),function(e,t){if(t&&("object"==OT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xT()?Reflect.construct(t,n||[],LT(e).constructor):t.apply(e,n))}(this,t,[e,n])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AT(e,t)}(t,e),function(e,t){return t&&CT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e=function(e,t,n){var r=jT(LT(e.prototype),"createEl",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)(["div",{className:"cv-thumbnail-display"}]);return this.img_=yc.dom.createEl("img"),e.appendChild(this.img_),e}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var s=r,u=s.src,c=s.w,l=s.h,f=s.x,h=s.y,p=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-h+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(p,")"),this.el_.style.width=c+"px",this.el_.style.height=l+"px"}else this.disable()}}}])}(yc.getComponent("Component"));function RT(e){return RT="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},RT(e)}function DT(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,MT(r.key),r)}}function MT(e){var t=function(e){if("object"!=RT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=RT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==RT(t)?t:t+""}function NT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(NT=function(){return!!e})()}function BT(e){return BT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BT(e)}function UT(e,t){return UT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},UT(e,t)}IT.prototype.options_={scaleFactor:1},yc.registerComponent("ThumbnailDisplay",IT);var FT=yc.getComponent("MouseTimeDisplay"),VT="cv-mouse-time-display-force-show",HT=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=BT(t),function(e,t){if(t&&("object"==RT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,NT()?Reflect.construct(t,n||[],BT(e).constructor):t.apply(e,n))}(this,t,[e,n]),il.useTrack(r.player_,"metadata","thumbnails",(function(e){r.getChild("ThumbnailDisplay").setTrack(e)})),r.update=r.update.bind(r),r.player_.on("durationchange",r.update),r.player_.one("dispose",(function(){r.player_.off("durationchange",r.update)})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&UT(e,t)}(t,e),function(e,t){return t&&DT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=n.getChild("TimeTooltip"),i=n.getChild("ThumbnailDisplay"),o=t*n.player_.duration(),a=n.player_.preventScrubbingPlugin(),s=n.player_.controlBar.getChild("progressControl").getChild(Ag),u=!1;a.isEnabled&&(u=o>a.furthestVisitedTime),u?(n.hide(),s.show(),ol(s.hide,1e3,!1,s)()):(n.show(),s&&s.hide(!0),i.update(o),r.updateTime(o));var c=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-c.width/2+"px";var l=e.width*t;l<c.width/2?n.el_.style.left=c.width/2+"px":l>e.width-c.width/2?n.el_.style.left=e.width-c.width/2+"px":n.el_.style.left=e.width*t+"px"}))}},{key:"forceShow",value:function(){this.addClass(VT)}},{key:"removeForceShow",value:function(){this.removeClass(VT)}}])}(FT);function qT(e){return qT="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},qT(e)}function zT(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,WT(r.key),r)}}function WT(e){var t=function(e){if("object"!=qT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qT(t)?t:t+""}function GT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(GT=function(){return!!e})()}function $T(){return $T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=XT(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},$T.apply(null,arguments)}function XT(e){return XT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},XT(e)}function KT(e,t){return KT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},KT(e,t)}HT.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},yc.registerComponent("MouseTimeDisplay",HT);var YT=yc.getComponent("ChaptersTrackMenuItem"),QT=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=XT(t),function(e,t){if(t&&("object"==qT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,GT()?Reflect.construct(t,n||[],XT(e).constructor):t.apply(e,n))}(this,t,[e,n])).nonIconControl=!1,r.thumbnailDisplay=new IT(r.player_,{scaleFactor:.5}),r.el().insertBefore(r.thumbnailDisplay.el(),r.el().firstChild),il.useTrack(r.player_,"metadata","thumbnails",(function(e){r.addClass("cv-has-thumbnails"),r.thumbnailDisplay.setTrack(e),r.thumbnailDisplay.update(r.options_.cue.startTime)})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&KT(e,t)}(t,e),function(e,t){return t&&zT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"update",value:function(){this.player_&&YT.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,n,r){return this.nonIconControl=!0,function(e,t,n){var r=$T(XT(e.prototype),"createEl",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},n),r])}},{key:"getInnerHTML",value:function(){var e=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(mT(this.options_.cue.startTime,e),")</p>")+"</span>"}}])}(YT);function JT(e){return JT="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},JT(e)}function ZT(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,eS(r.key),r)}}function eS(e){var t=function(e){if("object"!=JT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=JT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==JT(t)?t:t+""}function tS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tS=function(){return!!e})()}function nS(e,t,n,r){var i=rS(iS(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function rS(){return rS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=iS(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},rS.apply(null,arguments)}function iS(e){return iS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},iS(e)}function oS(e,t){return oS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oS(e,t)}var aS=function(e){function t(e,n,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=function(e,t,n){return t=iS(t),function(e,t){if(t&&("object"==JT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tS()?Reflect.construct(t,n||[],iS(e).constructor):t.apply(e,n))}(this,t,[e,n,r])).alwaysCollapsed=!1,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(i),i.player_.on("cv-whiteboard-change",i.update),i.player_.on("fullscreenchange",i.update),i.player_.on("dispose",(function(){i.player_.off("cv-whiteboard-change",i.update),i.player_.off("fullscreenchange",i.update)})),i}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oS(e,t)}(t,e),function(e,t){return t&&ZT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(nS(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(nS(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value: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],o=new QT(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var n=this;if(nS(t,"setTrack",this,3)([e]),this.track_&&"chapters"===this.track_.kind){e.one("loadeddata",this.update);var r=function(){n.update(),n.player_.trigger("resizemenus")};e.on("cv:cuechange",r),this.player_.one("dispose",(function(){return e.off("cv:cueupdate",r)}))}}},{key:"update",value:function(e){nS(t,"update",this,3)([e])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])}(yc.getComponent("ChaptersButton"));function sS(e){return sS="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},sS(e)}function uS(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,cS(r.key),r)}}function cS(e){var t=function(e){if("object"!=sS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sS(t)?t:t+""}function lS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lS=function(){return!!e})()}function fS(){return fS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hS(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},fS.apply(null,arguments)}function hS(e){return hS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hS(e)}function pS(e,t){return pS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pS(e,t)}yc.registerComponent("ChaptersButton",aS);var dS=yc.getComponent("OffTextTrackMenuItem"),yS=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,n){return t=hS(t),function(e,t){if(t&&("object"==sS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,lS()?Reflect.construct(t,n||[],hS(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pS(e,t)}(t,e),function(e,t){return t&&uS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleClick",value:function(e){dS.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(e,n,r){return function(e,t,n){var r=fS(hS(e.prototype),"createEl",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},n),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),r])}}])}(dS);function vS(e){return vS="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},vS(e)}function mS(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,gS(r.key),r)}}function gS(e){var t=function(e){if("object"!=vS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vS(t)?t:t+""}function bS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(bS=function(){return!!e})()}function _S(e){return _S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_S(e)}function wS(e,t){return wS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wS(e,t)}yc.registerComponent("OffTextTrackMenuItem",yS);var TS=yc.getComponent("TextTrackButton"),SS=yc.getComponent("TextTrackMenuItem"),ES=yc.getComponent("OffTextTrackMenuItem"),kS=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,n){return t=_S(t),function(e,t){if(t&&("object"==vS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,bS()?Reflect.construct(t,n||[],_S(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wS(e,t)}(t,e),function(e,t){return t&&mS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:SS;this.label_&&(e="".concat(this.label_," off")),t.push(new ES(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),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 o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),t.push(a)}}return t}}])}(TS);function OS(e){return OS="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},OS(e)}function CS(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,PS(r.key),r)}}function PS(e){var t=function(e){if("object"!=OS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=OS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==OS(t)?t:t+""}function xS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xS=function(){return!!e})()}function jS(e){return jS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jS(e)}function LS(e,t){return LS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},LS(e,t)}yc.registerComponent("TextTrackButton",kS);var AS=yc.getComponent("SubsCapsMenuItem"),IS=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,n){return t=jS(t),function(e,t){if(t&&("object"==OS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xS()?Reflect.construct(t,n||[],jS(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LS(e,t)}(t,e),function(e,t){return t&&CS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleClick",value:function(e){AS.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])}(AS);function RS(e){return RS="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},RS(e)}function DS(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,MS(r.key),r)}}function MS(e){var t=function(e){if("object"!=RS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=RS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==RS(t)?t:t+""}function NS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(NS=function(){return!!e})()}function BS(e){return BS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BS(e)}function US(e,t){return US=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},US(e,t)}var FS=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};r.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSearchMenuItem",(n=function(e,t,n){return t=BS(t),function(e,t){if(t&&("object"==RS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,NS()?Reflect.construct(t,n||[],BS(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-subtitle-search-menu-item"),n.controlText(", opens subtitle search"),n.toggleEnabled=n.toggleEnabled.bind(n);var i=n.player_.textTracks();return i.addEventListener("selectedlanguagechange",n.toggleEnabled),n.player_.one("dispose",(function(){i.removeEventListener("selectedlanguagechange",n.toggleEnabled)})),n.toggleEnabled(),n}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&US(e,t)}(t,e),function(e,t){return t&&DS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=il.getCurrentTextTrack(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.toggleEnabled)}))}},{key:"handleClick",value:function(){var e,t=this,n=il.getCurrentTextTrack(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])}(yc.getComponent("TextTrackMenuItem"));function VS(e){return VS="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},VS(e)}function HS(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,qS(r.key),r)}}function qS(e){var t=function(e){if("object"!=VS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=VS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==VS(t)?t:t+""}function zS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(zS=function(){return!!e})()}function WS(e){return WS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},WS(e)}function GS(e,t){return GS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},GS(e,t)}var $S=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r={};return r.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="SubtitleSizeMenuItem",(n=function(e,t,n){return t=WS(t),function(e,t){if(t&&("object"==VS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zS()?Reflect.construct(t,n||[],WS(e).constructor):t.apply(e,n))}(this,t,[e,r])).addClass("vjs-texttrack-settings"),n.addClass("cv-divider-after-menu-item"),n.addClass("cv-subtitle-size-menu-item"),n.controlText(", opens subtitle size settings"),n}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GS(e,t)}(t,e),function(e,t){return t&&HS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])}(yc.getComponent("TextTrackMenuItem"));function XS(e){return XS="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},XS(e)}function KS(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,YS(r.key),r)}}function YS(e){var t=function(e){if("object"!=XS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=XS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==XS(t)?t:t+""}function QS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(QS=function(){return!!e})()}function JS(){return JS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ZS(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},JS.apply(null,arguments)}function ZS(e){return ZS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ZS(e)}function eE(e,t){return eE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eE(e,t)}var tE=yc.getComponent("TextTrackButton"),nE=yc.getComponent("SubsCapsButton"),rE=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=ZS(t),function(e,t){if(t&&("object"==XS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,QS()?Reflect.construct(t,n||[],ZS(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e.className="cv-subs-caps-menu-button",e}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eE(e,t)}(t,e),function(e,t){return t&&KS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(function(e,t,n){var r=JS(ZS(e.prototype),"buildWrapperCSSClass",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([]))}},{key:"createItems",value:function(){var e=[];return this.player_.options_.mobile||(e.push(new FS(this.player_)),e.push(new $S(this.player_)),this.hideThreshold_=this.hideThreshold_+2),tE.prototype.createItems.call(this,e,IS)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){nE.prototype.handleClick.apply(this)}}])}(nE);function iE(e){return iE="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},iE(e)}function oE(){oE=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==iE(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(iE(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function aE(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,sE(r.key),r)}}function sE(e){var t=function(e){if("object"!=iE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=iE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==iE(t)?t:t+""}function uE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(uE=function(){return!!e})()}function cE(e){return cE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cE(e)}function lE(e,t){return lE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lE(e,t)}yc.registerComponent("SubsCapsButton",rE);var fE="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(yv,"</span>"),hE=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=cE(t),function(e,t){if(t&&("object"==iE(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,uE()?Reflect.construct(t,n||[],cE(e).constructor):t.apply(e,n))}(this,t,[e,n])).qualityId=n.qualityId;var i=e.qualityLevels(),o=r.handleQualityChange.bind(r);return i.on("change",o),e.one("dispose",(function(){i.off("change",o)})),r.handleLocalCacheChange=r.handleLocalCacheChange.bind(r),r.player_.ready((function(){r.player_&&(r.player_.on("localcachechanged",r.handleLocalCacheChange),r.player_.one("dispose",(function(){var e;null===(e=r.player_)||void 0===e||e.off("localcachechanged",r.handleLocalCacheChange)})),r.handleLocalCacheChange())})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lE(e,t)}(t,e),function(e,t){return t&&aE(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleLocalCacheChange",value:function(){return e=this,t=void 0,n=void 0,r=oE().mark((function e(){var t,n;return oE().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player_.localCache(),e.next=3,t.getActiveLocalCache();case 3:if(null==(n=e.sent)?void 0:n.playbackProfile){e.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+fE);case 10:case"end":return e.stop()}}),e,this)})),new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])}(yc.getComponent("MenuItem"));function pE(e){return pE="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},pE(e)}function dE(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,yE(r.key),r)}}function yE(e){var t=function(e){if("object"!=pE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pE(t)?t:t+""}function vE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(vE=function(){return!!e})()}function mE(e,t,n,r){var i=gE(bE(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function gE(){return gE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=bE(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},gE.apply(null,arguments)}function bE(e){return bE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bE(e)}function _E(e,t){return _E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_E(e,t)}var wE={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},TE=yc.getComponent("MenuButton"),SE=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=bE(t),function(e,t){if(t&&("object"==pE(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vE()?Reflect.construct(t,n||[],bE(e).constructor):t.apply(e,n))}(this,t,[e,n])).alwaysCollapsed=!0,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-quality-menu-button";var i=r.player_.qualityLevels(),o=r.update.bind(r);return i.on("addqualitylevel",o),i.on("removequalitylevel",o),e.one("dispose",(function(){i.removeEventListener("addqualitylevel",o),i.removeEventListener("removequalitylevel",o)})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_E(e,t)}(t,e),function(e,t){return t&&dE(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(mE(t,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(mE(t,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new Nc(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var i=wE[r.id];i&&e.push(new hE(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?wE[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){TE.prototype.handleClick.apply(this)}}])}(TE);function EE(e){return EE="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},EE(e)}function kE(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,OE(r.key),r)}}function OE(e){var t=function(e){if("object"!=EE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=EE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==EE(t)?t:t+""}function CE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(CE=function(){return!!e})()}function PE(){return PE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xE(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},PE.apply(null,arguments)}function xE(e){return xE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xE(e)}function jE(e,t){return jE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jE(e,t)}yc.registerComponent("QualityButton",SE);var LE=yc.getComponent("Menu"),AE=yc.getComponent("MenuButton"),IE=yc.getComponent("PlaybackRateMenuItem"),RE=yc.getComponent("PlaybackRateMenuButton"),DE=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=xE(t),function(e,t){if(t&&("object"==EE(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,CE()?Reflect.construct(t,n||[],xE(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e.className="cv-playback-rate-menu-button",e}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jE(e,t)}(t,e),function(e,t){return t&&kE(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=AE.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(function(e,t,n){var r=PE(xE(e.prototype),"buildWrapperCSSClass",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([]))}},{key:"createMenu",value:function(){var e=new LE(this.player(),{menuButton:this});e.addItem(new Nc(this.player_,{label:"Playback Speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new IE(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=AE.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=RE.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=yc.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])}(RE);function ME(e){return ME="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},ME(e)}function NE(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,BE(r.key),r)}}function BE(e){var t=function(e){if("object"!=ME(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ME(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ME(t)?t:t+""}function UE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(UE=function(){return!!e})()}function FE(e){return FE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FE(e)}function VE(e,t){return VE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},VE(e,t)}yc.registerComponent("PlaybackRateMenuButton",DE);var HE=yc.getComponent("TextTrackSettings"),qE={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},zE={small:qE,medium:Object.assign(Object.assign({},qE),{fontPercent:1.5}),large:Object.assign(Object.assign({},qE),{fontPercent:2})},WE=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,n){return t=FE(t),function(e,t){if(t&&("object"==ME(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,UE()?Reflect.construct(t,n||[],FE(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&VE(e,t)}(t,e),function(e,t){return t&&NE(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"setSizeSetting",value:function(e){var t=this;this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame((function(){n.update(),t.player_.trigger("resizemenus")}))}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return zE[this.size_]?zE[this.size_]:qE}}])}(HE);function GE(e){return GE="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},GE(e)}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,XE(r.key),r)}}function XE(e){var t=function(e){if("object"!=GE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=GE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==GE(t)?t:t+""}function KE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(KE=function(){return!!e})()}function YE(e,t,n,r){var i=QE(JE(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function QE(){return QE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=JE(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},QE.apply(null,arguments)}function JE(e){return JE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},JE(e)}function ZE(e,t){return ZE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ZE(e,t)}yc.registerComponent("TextTrackSettings",WE);var ek=window.navigator&&window.navigator.userAgent||"",tk=(/iPod/i.test(ek),/Android/i.test(ek),yc.getComponent("Player")),nk=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=JE(t),function(e,t){if(t&&("object"==GE(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,KE()?Reflect.construct(t,n||[],JE(e).constructor):t.apply(e,n))}(this,t,[e,n]))._dataLoaded=!1,n.mobile&&r.addClass("cv-mobile-player");var i=function(){return r._dataLoaded=!0};return r.on("cv-playback-data-loaded",i),r.on("dispose",(function(){return r.off("cv-playback-data-loaded",i)})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ZE(e,t)}(t,e),function(e,t){return t&&$E(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"dataLoaded",value:function(e){var t=this;this._dataLoaded?e():(this.one("cv-playback-data-loaded",e),this.one("dispose",(function(){t.off("cv-playback-data-loaded",e)})))}},{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,n){var r=this;if("number"!=typeof e||!this.callback_||n)return YE(t,"currentTime",this,3)([e]);this.callback_((function(){r.unlock(),r.currentTime(e)}))}},{key:"play",value:function(){var e=this;if(!this.callback_)return YE(t,"play",this,3)([]);this.callback_((function(){e.unlock(),e.play()}))}},{key:"updateStyleEl_",value:function(){if(tk.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();if(void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===yb.Hover)return e.style.removeProperty("maxWidth"),void e.style.removeProperty("margin");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;tk.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",(function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0})),t.on("mouseleave",(function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout}))}}])}(tk);function rk(e){return rk="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},rk(e)}function ik(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,ok(r.key),r)}}function ok(e){var t=function(e){if("object"!=rk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rk(t)?t:t+""}function ak(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ak=function(){return!!e})()}function sk(e){return sk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sk(e)}function uk(e,t){return uk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uk(e,t)}nk.prototype.options_=Object.assign(Object.assign({},tk.prototype.options_),{setMaxHeight:!0}),yc.registerComponent("player",nk);var ck=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=sk(t),function(e,t){if(t&&("object"==rk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ak()?Reflect.construct(t,n||[],sk(e).constructor):t.apply(e,n))}(this,t,[e,n])).player_.addClass("cv-disable-play-pause-feedback"),r.onFirstPlay=r.onFirstPlay.bind(r),r.player_.one("firstplay",r.onFirstPlay),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uk(e,t)}(t,e),function(e,t){return t&&ik(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout((function(){e.player_.isDisposed()||e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return yc.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])}(yc.getComponent("Component"));function lk(e){return lk="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},lk(e)}function fk(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,hk(r.key),r)}}function hk(e){var t=function(e){if("object"!=lk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lk(t)?t:t+""}function pk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(pk=function(){return!!e})()}function dk(e){return dk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dk(e)}function yk(e,t){return yk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yk(e,t)}yc.registerComponent("PlayPauseFeedback",ck);var vk=yc.getComponent("PlayToggle"),mk=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,n){return t=dk(t),function(e,t){if(t&&("object"==lk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pk()?Reflect.construct(t,n||[],dk(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yk(e,t)}(t,e),function(e,t){return t&&fk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleClick",value:function(e){var t=this;vk.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])}(vk);function gk(e){return gk="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},gk(e)}function bk(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,_k(r.key),r)}}function _k(e){var t=function(e){if("object"!=gk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gk(t)?t:t+""}function wk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wk=function(){return!!e})()}function Tk(e){return Tk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tk(e)}function Sk(e,t){return Sk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sk(e,t)}yc.registerComponent("PlayToggle",mk);var Ek=yc.getComponent("TextTrackDisplay"),kk=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,n){return t=Tk(t),function(e,t){if(t&&("object"==gk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wk()?Reflect.construct(t,n||[],Tk(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sk(e,t)}(t,e),function(e,t){return t&&bk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"updateDisplayState",value:function(e){Ek.prototype.updateDisplayState.call(this,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.fontPercent&&1!==t.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;o.style.fontSize=a*t.fontPercent+"px"}}}}}])}(Ek);function Ok(e){return Ok="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},Ok(e)}function Ck(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,Pk(r.key),r)}}function Pk(e){var t=function(e){if("object"!=Ok(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ok(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ok(t)?t:t+""}function xk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xk=function(){return!!e})()}function jk(e){return jk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jk(e)}function Lk(e,t){return Lk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lk(e,t)}yc.registerComponent("TextTrackDisplay",kk);var Ak=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,n){return t=jk(t),function(e,t){if(t&&("object"==Ok(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xk()?Reflect.construct(t,n||[],jk(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lk(e,t)}(t,e),function(e,t){return t&&Ck(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){return yc.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])}(yc.getComponent("Component"));function Ik(e){return Ik="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},Ik(e)}function Rk(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,Dk(r.key),r)}}function Dk(e){var t=function(e){if("object"!=Ik(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ik(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ik(t)?t:t+""}function Mk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Mk=function(){return!!e})()}function Nk(e,t,n,r){var i=Bk(Uk(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Bk(){return Bk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Uk(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Bk.apply(null,arguments)}function Uk(e){return Uk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Uk(e)}function Fk(e,t){return Fk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fk(e,t)}yc.registerComponent("ControlBarGradient",Ak);var Vk=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Uk(t),function(e,t){if(t&&("object"==Ik(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mk()?Reflect.construct(t,n||[],Uk(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fk(e,t)}(t,e),function(e,t){return t&&Rk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){var e=this.options_.title;if(!this.options_.seriesName)return Nk(t,"createEl",this,3)(["h1",{innerHTML:e}]);var n=this.buildSeasonEpisodeString();return n?(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(n,"</div>")+e,Nk(t,"createEl",this,3)(["h1",{innerHTML:e}])):(e="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+e,Nk(t,"createEl",this,3)(["h1",{innerHTML:e}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])}(yc.getComponent("Component"));function Hk(e){return Hk="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},Hk(e)}function qk(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,zk(r.key),r)}}function zk(e){var t=function(e){if("object"!=Hk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hk(t)?t:t+""}function Wk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wk=function(){return!!e})()}function Gk(){return Gk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=$k(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Gk.apply(null,arguments)}function $k(e){return $k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$k(e)}function Xk(e,t){return Xk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xk(e,t)}var Kk=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=$k(t),function(e,t){if(t&&("object"==Hk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wk()?Reflect.construct(t,n||[],$k(e).constructor):t.apply(e,n))}(this,t,[e,n])).options_=n,r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xk(e,t)}(t,e),function(e,t){return t&&qk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((e=this.options_.ratingValue)?function(e){switch(!0){case e<32:return"cv-rating-purple";case e<48:return"cv-rating-green";case e<80:return"cv-rating-blue";case e<96:return"cv-rating-red";case e<128:return"cv-rating-pink";case e>=128:return"cv-rating-yellow";default:return""}}(e):"");var e}},{key:"createEl",value:function(e,n,r){return this.options_.ratingCode?function(e,t,n){var r=Gk($k(e.prototype),"createEl",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),r]):null}}])}(yc.getComponent("Component"));function Yk(e){return Yk="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},Yk(e)}function Qk(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,Jk(r.key),r)}}function Jk(e){var t=function(e){if("object"!=Yk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yk(t)?t:t+""}function Zk(e,t){if(t&&("object"==Yk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function eO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(eO=function(){return!!e})()}function tO(e){return tO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tO(e)}function nO(e,t){return nO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nO(e,t)}var rO=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=tO(t),Zk(e,eO()?Reflect.construct(t,n||[],tO(e).constructor):t.apply(e,n))}(this,t,[e,n]),n.embed?(r.addChild(new Vk(e,n)),r.addChild(new Kk(e,n)),r):Zk(r,r)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nO(e,t)}(t,e),function(e,t){return t&&Qk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){return yc.dom.createEl("div",{className:"cv-splash-metadata"})}}])}(yc.getComponent("Component"));function iO(e){return iO="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},iO(e)}function oO(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,aO(r.key),r)}}function aO(e){var t=function(e){if("object"!=iO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=iO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==iO(t)?t:t+""}function sO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(sO=function(){return!!e})()}function uO(e){return uO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uO(e)}function cO(e,t){return cO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cO(e,t)}var lO=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=uO(t),function(e,t){if(t&&("object"==iO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sO()?Reflect.construct(t,n||[],uO(e).constructor):t.apply(e,n))}(this,t,[e,n])).addChild(new rO(e,n)),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cO(e,t)}(t,e),function(e,t){return t&&oO(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createEl",value:function(){var e="<div class='cv-splash-mask'></div>";return this.options_.embed&&(e+="<div class='cv-splash-logo'>".concat(ry,"</div>")),yc.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:e})}}])}(yc.getComponent("posterImage"));function fO(e){return fO="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},fO(e)}function hO(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,pO(r.key),r)}}function pO(e){var t=function(e){if("object"!=fO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fO(t)?t:t+""}function dO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dO=function(){return!!e})()}function yO(e){return yO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yO(e)}function vO(e,t){return vO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vO(e,t)}yc.registerComponent("posterImage",lO);var mO=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=yO(t),function(e,t){if(t&&("object"==fO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dO()?Reflect.construct(t,n||[],yO(e).constructor):t.apply(e,n))}(this,t,[e,n])).el().prepend(r.getErrorImage()),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vO(e,t)}(t,e),function(e,t){return t&&hO(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"getErrorImage",value:function(){return yc.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])}(yc.getComponent("ErrorDisplay"));yc.registerComponent("ErrorDisplay",mO);var gO,bO,_O=n(43823),wO=n.n(_O),TO="global:shell";!function(e){e[e.Ok=200]="Ok",e[e.NoContent=204]="NoContent",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.Conflict=409]="Conflict",e[e.InternalServer=500]="InternalServer"}(gO||(gO={})),function(e){e[e.Information=1]="Information",e[e.Success=2]="Success",e[e.Redirect=3]="Redirect",e[e.ClientError=4]="ClientError",e[e.ServerError=5]="ServerError"}(bO||(bO={}));function SO(e){return SO="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},SO(e)}function EO(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,OO(r.key),r)}}function kO(e,t,n){return t&&EO(e.prototype,t),n&&EO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function OO(e){var t=function(e){if("object"!=SO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=SO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==SO(t)?t:t+""}function CO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PO(e,t,n){return t=IO(t),function(e,t){if(t&&("object"==SO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,LO()?Reflect.construct(t,n||[],IO(e).constructor):t.apply(e,n))}function xO(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AO(e,t)}function jO(e){var t="function"==typeof Map?new Map:void 0;return jO=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(LO())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&AO(i,n.prototype),i}(e,arguments,IO(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),AO(n,e)},jO(e)}function LO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(LO=function(){return!!e})()}function AO(e,t){return AO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},AO(e,t)}function IO(e){return IO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},IO(e)}var RO=function(e){function t(e){return CO(this,t),PO(this,t,[e])}return xO(t,e),kO(t)}(jO(Error)),DO=function(e){function t(){return CO(this,t),PO(this,t,arguments)}return xO(t,e),kO(t,[{key:"name",get:function(){return"SilentError"}}])}(RO),MO=function(e){function t(){return CO(this,t),PO(this,t,arguments)}return xO(t,e),kO(t,[{key:"name",get:function(){return"CoreError"}}])}(jO(Error)),NO=function(e){if(_O.Radio.channel(TO).trigger("error",e),!(e instanceof DO))throw e};function BO(e){return BO="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},BO(e)}function UO(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,FO(r.key),r)}}function FO(e){var t=function(e){if("object"!=BO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=BO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==BO(t)?t:t+""}function VO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(VO=function(){return!!e})()}function HO(e){return HO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},HO(e)}function qO(e,t){return qO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qO(e,t)}var zO=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,n){return t=HO(t),function(e,t){if(t&&("object"==BO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,VO()?Reflect.construct(t,n||[],HO(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qO(e,t)}(t,e),function(e,t){return t&&UO(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"name",get:function(){return"DevError"}}])}(RO);function WO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var GO=function(e,t){var n=Object.entries(t).map((function(e){var t=function(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){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return WO(e,t);var n={}.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)?WO(e,t):void 0}}(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.")}()}(e,2),n=t[0],r=t[1];return n&&Array.isArray(r)?r.map((function(e){return"".concat(n,"=").concat(encodeURIComponent(e))})).join("&"):n&&null!=r?"".concat(n,"=").concat(encodeURIComponent(r)):""})).reduce((function(e,t){return t?e?"".concat(e,"&").concat(t):t:e}),"");return n?"".concat(e,"?").concat(n):e},$O=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},XO=n(21161),KO=/\/+$/g,YO=_O.history.getFragment.bind(_O.history);XO.extend(_O.history,{getFragment:function(e){return YO(e).replace(KO,"")}});var QO={GetQuery:function(){return QO.DeserializeQueryParams(window.location.search.substring(1))},UpdateQuery:function(e){if(e){var t=QO.GetQuery(),n=QO.SerializeQueryParams(XO.extend(t,e));n&&(n="?".concat(n)),QO.UpdateUrl("".concat(QO.GetCurrentPath()).concat(n),null,{replace:!0,trigger:!1})}},UpdateUrl:function(e,t,n){var r=oC.buildRoute(e,t);_O.history.navigate(r,n),_O.Radio.channel(TO).trigger("url:change",t,n)},SerializeQueryParams:function(e){if(!e)return"";if("string"==typeof e)return e;var t=[],n=function(e,t){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t))};return Object.keys(e).sort().forEach((function(r){var i=e[r];null!=i&&(Array.isArray(i)?i.forEach((function(e){t.push(n(r,e))})):t.push(n(r,i)))})),t.join("&")},DeserializeQueryParams:function(e){return e?XO.reduce(e.split("&"),(function(e,t){var n=t.split("="),r=n[0],i=n.length>0?decodeURIComponent(n[1]):"";return e[r]?e[r]instanceof Array?(e[r].push(i),e):(e[r]=[e[r],i],e):(e[r]=i,e)}),{}):{}},StartHistory:function(){_O.History.started&&_O.history.stop(),_O.history.start({pushState:!0})},PageLoad:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?window.open(e,"_blank"):window.location.href=e},Redirect:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function(){return t?window.location.replace(e):window.location.href=e};rC.hasActiveRoute()?_O.Radio.channel(TO).once("routing:end",n):n()},Reload:function(){window.location.reload()},GetCurrentPath:function(){return window.location.pathname},GetCurrentQueryString:function(){return window.location.search},GetCurrentPathAndQuery:function(){return window.location.pathname+window.location.search},GetCurrentUrl:function(){return window.location.href},GetCurrentReferrer:function(){return document.referrer},GetCurrentOrigin:function(){return window.location.origin},SetPageTitle:function(e){document.title=e}},JO=/((\(\?)?:\w+)|(\*\w+)/,ZO=/[\(\)]/g,eC=/\(\/\)/g,tC=/\/$/,nC=/\([^)]*\)/g,rC={routingStarted:function(){_O.Radio.channel(TO).trigger("routing:start")},routingEnded:function(){rC.hasActiveRoute()&&_O.Radio.channel(TO).trigger("routing:end")},hasActiveRoute:function(){return _O.Radio.channel(TO).request("has:active:route")}},iC=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.usedHelper=!0;var n=e.application,r=e.action;_O.Radio.channel(n).trigger(r,e,t)},oC={getHref:function(e,t){if(!e)return"";var n=e.application,r=e.action,i=e.args,o=e.params,a=_O.Radio.channel(TO),s=Object.assign(Object.assign({},t),{middlewareOptions:Object.assign({buildHref:!0},null==t?void 0:t.middlewareOptions)}),u=a.request("route:look:up","".concat(n,":").concat(r),i,o,s);return!1===u?"":"/".concat(u)},buildRoute:function(e,t,n){if(!t)return e;var r=t.args,i=t.params;if(XO.each(r,(function(t){e=e.replace(JO,t||"")})),(null==n?void 0:n.excludeOptionalRoute)&&(e=e.replace(nC,"")),e=(e=(e=e.replace(eC,"")).replace(ZO,"")).replace(tC,""),!i)return e;var o=QO.SerializeQueryParams(i);return o.length?"".concat(e,"?").concat(o):e},trigger:function(e,t){e&&(rC.hasActiveRoute()?_O.Radio.channel(TO).once("routing:end",(function(){iC(e,t)})):iC(e,t))},getCurrentAppLink:function(){return _O.Radio.channel(TO).request("route:current")},getAppLinkString:function(e){return e?e.application+e.action:""},isEqual:function(e,t){var n,r,i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{args:!0,params:!0};if((null==e?void 0:e.application)!==(null==t?void 0:t.application))return!1;if((null==e?void 0:e.action)!==(null==t?void 0:t.action))return!1;var s=(null!==(n=null==e?void 0:e.args)&&void 0!==n?n:[]).join(","),u=(null!==(r=t.args)&&void 0!==r?r:[]).join(",");if(a.args&&s!==u)return!1;var c=QO.SerializeQueryParams(null!==(i=null==e?void 0:e.params)&&void 0!==i?i:{}),l=QO.SerializeQueryParams(null!==(o=null==t?void 0:t.params)&&void 0!==o?o:{});return!a.params||c===l}};function aC(e,t,n,r){var i=e;return"string"==typeof e&&(i=_O.Radio.channel(e)),r.call(this,i,t,n)}var sC=n(96617),uC=n.n(sC),cC=["appRoutes","controller"],lC=wO().Router.extend({constructor:function(e){this._setOptions(e),this.mergeOptions(e,cC),wO().Router.apply(this,arguments);var t=this.appRoutes,n=this._getController();this.processAppRoutes(n,t),this.on("route",this._processOnRoute,this)},appRoute:function(e,t){var n=this._getController();return this._addAppRoute(n,e,t),this},_processOnRoute:function(e,t){if(XO.default.isFunction(this.onRoute)){var n=XO.default.invert(this.appRoutes)[e];this.onRoute(e,n,t)}},processAppRoutes:function(e,t){var n=this;if(!t)return this;var r=XO.default.keys(t).reverse();return XO.default.each(r,(function(r){n._addAppRoute(e,r,t[r])})),this},_getController:function(){return this.controller},_addAppRoute:function(e,t,n){var r=e[n];if(!r)throw new Error('Method "'+n+'" was not found on the controller');this.route(t,n,XO.default.bind(r,e))}});function fC(e){return fC="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},fC(e)}function hC(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,pC(r.key),r)}}function pC(e){var t=function(e){if("object"!=fC(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fC(t)?t:t+""}XO.default.extend(lC.prototype,XO.default.pick(sC.MnObject.prototype,["triggerMethod","normalizeMethods","_setOptions","mergeOptions","getOption","bindEvents","unbindEvents"])),uC().AppRouter=lC,_O.Collection;var dC=function(){return function(e,t,n){return t&&hC(e.prototype,t),n&&hC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.variables={}}),[{key:"name",get:function(){return"EnvironmentVariables"}},{key:"isDevelopment",get:function(){return this.variables.isDevelopment}},{key:"get",value:function(e){return this.variables[e]}},{key:"setUpVariables",value:function(e){this.variables=e}}],[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}])}(),yC=dC.Instance;function vC(e){return vC="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},vC(e)}function mC(e){return function(e){if(Array.isArray(e))return gC(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){if("string"==typeof e)return gC(e,t);var n={}.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)?gC(e,t):void 0}}(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 gC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bC(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,_C(r.key),r)}}function _C(e){var t=function(e){if("object"!=vC(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vC(t)?t:t+""}function wC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wC=function(){return!!e})()}function TC(e,t,n,r){var i=SC(EC(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function SC(){return SC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=EC(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},SC.apply(null,arguments)}function EC(e){return EC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},EC(e)}function kC(e,t){return kC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kC(e,t)}var OC=function(e){function t(e){var n;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),n=function(e,t,n){return t=EC(t),function(e,t){if(t&&("object"==vC(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wC()?Reflect.construct(t,n||[],EC(e).constructor):t.apply(e,n))}(this,t,[e]);var r=[].concat(mC(n.defaultProps),mC(n.props||[]));return n.mergeOptions(e,r),XO.default.result(n,"name")||NO(new MO("Error: View with cid:".concat(n.cid," requires a name."))),n}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kC(e,t)}(t,e),function(e,t,n){return t&&bC(e.prototype,t),n&&bC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"defaultProps",get:function(){return["shell","layoutService"]}},{key:"_setOptions",value:function(e){this.options=XO.default.extend({},XO.default.result(this,"defaults"),e)}},{key:"_setAttributes",value:function(e){yC.isDevelopment&&XO.default.extend(e,function(e,t,n){return(t=_C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},"cv-classname",this.name)),this.$el.attr(e)}},{key:"elements",get:function(){return null}},{key:"ui",get:function(){return this.uiStorage||(this.uiStorage=this.elements),this.uiStorage},set:function(e){this.uiStorage=e}},{key:"serializeModel",value:function(){return this.model?this.model.toJSON():{}}},{key:"serializeCollection",value:function(){return this.collection?this.collection.toJSON():[]}},{key:"resetClassName",value:function(){this.$el.attr("class",XO.default.result(this,"className"))}},{key:"serializeData",value:function(){var e=this,n=TC(t,"serializeData",this,3)([]),r=XO.default.result(this,"viewOptions"),i=XO.default.extend({},n,{options:r});return t.ViewDataExtensions.length?XO.default.extend.apply(XO.default,[i].concat(mC(XO.default.map(t.ViewDataExtensions,(function(t){return t instanceof Function?t(e):t}))))):i}},{key:"viewOptions",value:function(){return this.options}},{key:"undelegateAppLinks",value:function(){this.$el&&this.$el.off(".appLinks".concat(this.cid))}},{key:"renderAppLinks",value:function(){var e=this,t=this.appLinks;t&&(t=this.normalizeUIKeys(t),this.undelegateAppLinks(),XO.default.each(XO.default.keys(t),(function(n){var r=n,i=t[n],o=oC.getHref(i);"[this]"===r&&(r=null);var a=r?e.$el.find(n):e.$el;(a.is("a")||a.is("button"))&&(o&&"/"!==o&&a.attr("href",o),e.delegate("click.appLinks".concat(e.cid),r,(function(e){e.preventDefault(),oC.trigger(i)})))})))}},{key:"hasPartialLoadingRegions",value:function(){var e=this;return void 0!==e._hasPartialLoadingRegions||(e._hasPartialLoadingRegions=XO.default.some(e.regions,(function(e){return XO.default.has(e,"partialLoading")}))),e._hasPartialLoadingRegions}},{key:"renderPartialLoading",value:function(e){_O.Radio.channel(TO).trigger("render:partial:loading",this,e)}},{key:"getTemplate",value:function(){var e;return this.template||(null===(e=this.options)||void 0===e?void 0:e.template)}},{key:"listenTo",value:function(){return aC.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],TC(t,"listenTo",this,1))}},{key:"render",value:function(){var e=this;if(e._isDestroyed)return this;var t=this.getTemplate();if(!t)return this;var n=this.processRequriedResources(!0);return n&&(n=e.triggerMethod("before:render",this)),!1!==n&&(n=!0),!1===(n=n&&this.processRequriedResources(!1))?(e._partialLoadingRendered||!e.hasPartialLoadingRegions()||(e._partialLoadingRendered=!0,e._reInitRegions(),e._renderTemplate(t),e.renderPartialLoading()),this):((e._isRendered||e._partialLoadingRendered)&&e._reInitRegions(),this.setTitle(),e._renderTemplate(t),e.bindUIElements(),this.renderAppLinks(),e._partialLoadingRendered=!1,e._isRendered=!0,e.triggerMethod("render",this),this)}},{key:"processRequriedResources",value:function(e){return!0}},{key:"setTitle",value:function(){}}],[{key:"AddViewDataExtension",value:function(e){t.ViewDataExtensions.push(e)}}])}(sC.View);function CC(e){return CC="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},CC(e)}function PC(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,xC(r.key),r)}}function xC(e){var t=function(e){if("object"!=CC(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=CC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==CC(t)?t:t+""}function jC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jC=function(){return!!e})()}function LC(e,t,n,r){var i=AC(IC(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function AC(){return AC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=IC(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},AC.apply(null,arguments)}function IC(e){return IC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},IC(e)}function RC(e,t){return RC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},RC(e,t)}OC.ViewDataExtensions=[];var DC=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,n){return t=IC(t),function(e,t){if(t&&("object"==CC(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jC()?Reflect.construct(t,n||[],IC(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RC(e,t)}(t,e),function(e,t){return t&&PC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"mixin",value:function(e){var t=this;for(var n in e){if(t.hasOwnProperty(n)){var r=t[n];return void(t[n]=XO.extend({},r,e[n]))}t[n]=e[n]}}},{key:"addValidation",value:function(e){this.mixin({validation:e})}},{key:"validate",value:function(e,n){LC(t,"validate",this,1).call(this,e,n)}},{key:"listenTo",value:function(){return aC.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],LC(t,"listenTo",this,1))}}])}(_O.Model),MC=n(71975),NC=n.n(MC);function BC(e){return BC="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},BC(e)}function UC(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){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return FC(e,t);var n={}.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)?FC(e,t):void 0}}(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 FC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var VC,HC,qC,zC,WC,GC={isEmpty:function(e){return XO.isEmpty(e)},values:function(e){return XO.values(e)},keys:function(e){return XO.keys(e)},deepClone:function(e){return NC()(e)},getEnumKeys:function(e){return Object.keys(e).filter((function(e){return!(parseInt(e)>=0)}))},isObject:function(e){return XO.isObject(e)},isEqual:function(e,t){return XO.isEqual(e,t)},omit:function(e,t){return XO.omit(e,t)},pick:function(e,t){return XO.pick(e,t)},removeEmptyKeys:function(e){return Object.entries(e).filter((function(e){return null!==UC(e,2)[1]})).reduce((function(e,t){var n=UC(t,2),r=n[0],i=n[1];return Object.assign(Object.assign({},e),function(e,t,n){return(t=function(e){var t=function(e){if("object"!=BC(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=BC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==BC(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,i))}),{})},flattenObjectToString:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:",";return Object.keys(e).sort().map((function(n){var r=t?"".concat(t,".").concat(n):n;return"object"!==BC(e[n])||Array.isArray(e[n])?"".concat(r,":").concat(e[n]):GC.flattenObjectToString(e[n],r)})).join(n)}};function $C(e){return $C="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},$C(e)}function XC(e,t,n){return(t=function(e){var t=function(e){if("object"!=$C(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$C(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(VC||(VC={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners",e[e.Pdf=8]="Pdf",e[e.Link=9]="Link",e[e.None=99999]="None"}(HC||(HC={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(qC||(qC={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(zC||(zC={})),function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(WC||(WC={}));var KC,YC=XC(XC({},HC.Banners,WC.Banner),HC.Thumbnails,WC.Thumbnail);!function(e){e.Banners="banners",e.Thumbnails="thumbnails",e.TallPosters="tallPosters",e.Covers="covers",e.Avatars="avatars"}(KC||(KC={}));var QC=XC(XC(XC(XC(XC({},HC.Banners,KC.Banners),HC.Thumbnails,KC.Thumbnails),HC.TallPosters,KC.TallPosters),HC.Covers,KC.Covers),HC.Avatars,KC.Avatars),JC={createUrl:function(e,t){return JC._createUrl(e,t)},createBannerUrl:function(e,t,n){return e&&e.url?JC._createUrl(e.url,n):JC._createCategoryMappedUrl(t,n)},createResourceImage:function(e,t,n){return JC._createUrl(e,Object.assign({url:t},n))},Rfc3986EncodeURIComponent:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)},_createCategoryMappedUrl:function(e,t){var n=e.fallbackBaseUrl,r=e.fallbackCategoryName,i=e.type,o=$O(n,"".concat(function(e){return"/v1/category-map/".concat(e)}(YC[i]))),a=Object.assign({name:JC.Rfc3986EncodeURIComponent(r)},t);return JC._createUrl(o,a)},_createUrl:function(e,t){if(e){if(GC.isEmpty(t))return e;var n=$.param(t),r=-1===e.indexOf("?")?"?":"&",i=e;return i.endsWith("/")&&(i=i.slice(0,-1)),i+"".concat(r).concat(n)}},legacyCreateThumbnailUrl:function(e,t){if(!e)return"";var n;if(e&&(n=e instanceof DC?e.get("url"):"string"==typeof e?e:e.url)){var r=Object.assign({size:VC.Small,bgColor:"000"},t);return JC._createUrl(n,r)}},getDisplayImageFromObject:function(e){var t,n,r,i,o;return"tallPoster"in e&&(null===(t=e.tallPoster)||void 0===t?void 0:t.url)?e.tallPoster:"cover"in e&&(null===(n=e.cover)||void 0===n?void 0:n.url)?e.cover:"thumbnail"in e&&(null===(r=e.thumbnail)||void 0===r?void 0:r.url)?e.thumbnail:"_parentVideo"in e&&(null===(o=null===(i=e._parentVideo)||void 0===i?void 0:i.thumbnail)||void 0===o?void 0:o.url)?e._parentVideo.thumbnail:null},getUrlById:function(e,t,n,r){QC[t]||NO(new zO("ImageType:".concat(t," not supported, please add it to 'ImageApiImageTypes'")));var i=$O(e,"v2/".concat(QC[t],"/").concat(n));return GO(i,{size:r})}};function ZC(e){return ZC="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},ZC(e)}function eP(){eP=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==ZC(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(ZC(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function tP(e){return function(e){if(Array.isArray(e))return nP(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){if("string"==typeof e)return nP(e,t);var n={}.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)?nP(e,t):void 0}}(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 nP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rP(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,iP(r.key),r)}}function iP(e){var t=function(e){if("object"!=ZC(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ZC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ZC(t)?t:t+""}var oP,aP=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},sP=yc.getComponent("Player"),uP=function(){return function(e,t){return t&&rP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=yc.mergeOptions({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){r._configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.fetch().catch((function(e){return r.handleFetchError(e)}))}))}),[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=yc(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var e=500;return(this.options.mobile||yc.browser.IS_IOS||yc.browser.IS_ANDROID)&&(e=3e3),e}},{key:"getPlayerOptions",value:function(){var e=this,t=sP.prototype.options_.children;return t=t.filter((function(e){return"bigPlayButton"!==e&&"posterImage"!==e})),{controls:this.options.controls,fluid:!this.options.embed&&!this.options.mobile,fill:this.options.embed||this.options.mobile,inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(tP(t),[{name:"collapserator",children:hf.filter((function(t){return!("fullscreenToggle"===t&&!e.options.allowFullscreen)}))},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(t){return function(e,t,n){var r=p()(e);("f"!==r||n.allowFullscreen)&&ld[r]&&(["space"].includes(r)&&(e.preventDefault(),e.stopPropagation()),ld[r](t,e))}(t,e.player,e.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return aP(this,void 0,void 0,eP().mark((function e(){var t,n,r=this;return eP().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.offlinePlaybackObject){e.next=2;break}return e.abrupt("return",this.options.offlinePlaybackObject);case 2:if(t=this.options.fetch,void 0===this.options.fetch&&(t=function(e){var t="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return rd.get(t)}),this.options.viewKey){e.next=6;break}throw new Error("Please specify a viewKey or a fetch function");case 6:return e.next=8,t(this.options.viewKey);case 8:if(n=e.sent){e.next=11;break}throw new Error("Error fetching playback object");case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this)})))}},{key:"setChaptersInternal",value:function(e,t){var n=il.getTrack(this.player,"chapters",null);n||(n=this.player.addTextTrack("chapters")),tP(n.cues.cues_).forEach((function(e){return n.removeCue(e)})),e.forEach((function(e){n.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),t&&n.trigger({type:"cv:cuechange",target:n}),n.trigger({type:"loadeddata",target:n})}},{key:"setChapters",value:function(e){this.setChaptersInternal(e,!0)}},{key:"setPlayerMode",value:function(e,t){this.player.playerModePlugin().setPlayerMode(e,t)}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"fetch",value:function(){var e,t,n,r,i;return aP(this,void 0,void 0,eP().mark((function o(){var a,s,u,c=this;return eP().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.getPlaybackObject();case 2:if(a=o.sent,!this.isDisposed()){o.next=5;break}return o.abrupt("return");case 5:s="MasterClip"===a.mediaType,u=null===(e=a.additionalData)||void 0===e?void 0:e.clipData,(null===(n=null===(t=a.chapters)||void 0===t?void 0:t.list)||void 0===n?void 0:n.length)>0&&!s&&!u&&this.setChaptersInternal(a.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(r=a.localCacheAddresses)&&void 0!==r?r:[],enabled:null===(i=this.options.enableLocalCache)||void 0===i||i}),this.player.progressiveFiles({sources:a.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:a.files.fileToken}),a.subtitles.list.length>0&&a.subtitles.list.forEach((function(e){if("text/vtt"===e.mimeType){var t=c.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0);il.sanitizeTrack(t.track,c.player)}})),a.posterUrl&&this.player.poster(JC.createUrl(a.posterUrl,{size:VC.Large})),this.setupSplash({title:a.title,posterUrl:a.posterUrl,episodeNumber:a.episodeNumber,ratingCode:a.ratingCode,seasonNumber:a.seasonNumber,seriesName:a.seriesName}),this.additionalSetup(a),this.handleAutoplay(a),this.options.startTime&&this.player.ready((function(){c.player.currentTime(c.options.startTime)})),this.player.trigger("cv-playback-data-loaded",a);case 18:case"end":return o.stop()}}),o,this)})))}},{key:"handleFetchError",value:function(e){var t,n=e.message;e instanceof Yp&&(null===(t=e.response)||void 0===t?void 0:t.type)===cd.PhysicallyChapteredVideo&&(n="Video cannot be played because it is either corrupt or damaged."),this.player.error(n),this.options.onError&&this.options.onError(e)}},{key:"fetchConfig",value:function(){return aP(this,void 0,void 0,eP().mark((function e(){var t;return eP().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(oP||this.options.fetch||this.options.offlinePlaybackObject)){e.next=2;break}return e.abrupt("return");case 2:return t="".concat(this.options.playerApi.origin,"/api/config"),e.next=5,rd.get(t);case 5:if(oP=e.sent,!this.isDisposed()){e.next=8;break}return e.abrupt("return");case 8:this.trigger("config:loaded");case 9:case"end":return e.stop()}}),e,this)})))}},{key:"additionalSetup",value:function(e){var t,n=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var r=this.options.enableLocalCache&&!!(null===(t=e.localCacheAddresses)||void 0===t?void 0:t.length);oP?this.setupAnalyticsService(e,r):this.one("config:loaded",(function(){return n.setupAnalyticsService(e,r)})),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(e):this.one("analytics:loaded",(function(){return n.setupAnalyticsDependentPlugins(e)}))}},{key:"setupAnalyticsService",value:function(e,t){this.options.eventLogging&&(this.analyticsService=new zp({collectionApiUrls:oP.collectionApi.urls,collectionApiClientId:oP.collectionApi.clientId,productVersion:"1.25.0",videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e),regionName:e.instanceRegion||this.options.sharerInstanceRegion||Hf.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(e){var t,n,r,i;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=e.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=e.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(r=e.settings)||void 0===r?void 0:r.playbackProfile,playbackProfileLocalCache:null===(i=e.settings)||void 0===i?void 0:i.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(e){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(e){var t=this;this.options.autoplay&&this.player.ready((function(){t.player.play().catch((function(){t.isDisposed()||t.showSplash()}))}))}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=yc.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=yc.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"muted",value:function(e){return this.player.muted(e)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(e){return this.player.playbackRate(e)}},{key:"quality",value:function(e){for(var t=this.player.qualityLevels(),n=0;n<t.length;n++){var r=t[n];if(e)r.enabled=r.id===e.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(e){for(var t=this.player.textTracks(),n=0;n<t.length;n++){var r=t[n];if(void 0===e){if("showing"===r.mode)return r.label}else r.label===e?r.mode="showing":r.mode="disabled"}}},{key:"bindEventListeners",value:function(){var e=this,t=function(e){return e.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",t),this.player.one("dispose",(function(){e.off("ended",e.showSplash),e.off("play",e.hideSplash),e.player.tech(!0).off("contextmenu",t)})),this.options.hotkeyElQuerySelector){var n=yc.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},e)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])}();function cP(e){return cP="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},cP(e)}function lP(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,fP(r.key),r)}}function fP(e){var t=function(e){if("object"!=cP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cP(t)?t:t+""}function hP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(hP=function(){return!!e})()}function pP(){return pP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=dP(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},pP.apply(null,arguments)}function dP(e){return dP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dP(e)}function yP(e,t){return yP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yP(e,t)}uP.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0};var vP=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t,n){return t=dP(t),function(e,t){if(t&&("object"==cP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hP()?Reflect.construct(t,n||[],dP(e).constructor):t.apply(e,n))}(this,t,[e]),void 0===n.startTime)throw Error("Invalid clip start");if(void 0===n.endTime)throw Error("Invalid clip end");if(n.startTime>n.endTime)throw Error("Clip start cannot be greater than clip end");return r._clipStart=parseFloat(n.startTime.toPrecision(4)),r._clipEnd=parseFloat(n.endTime.toPrecision(4)),r.playerEndedFn=r.player.ended.bind(e),r.playerDurationFn=r.player.duration.bind(e),r.playerCurrentTimeFn=r.player.currentTime.bind(e),r.playerbufferedFn=r.player.buffered.bind(e),r.player.ended=r.ended.bind(r),r.player.duration=r.duration.bind(r),r.player.currentTime=r.currentTime.bind(r),r.player.buffered=r.buffered.bind(r),r.initialize(),r.player.ready((function(){r.player.trigger("durationchange")})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yP(e,t)}(t,e),function(e,t){return t&&lP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return e<=0?this._clipEnd:this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),function(e,t,n){var r=pP(dP(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([])}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return e&&e>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(e)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if("number"!=typeof e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn(t,r)}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return yc.createTimeRanges(t)}}])}(yc.getPlugin("plugin"));function mP(e){return mP="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},mP(e)}function gP(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,bP(r.key),r)}}function bP(e){var t=function(e){if("object"!=mP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mP(t)?t:t+""}function _P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_P=function(){return!!e})()}function wP(){return wP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=TP(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},wP.apply(null,arguments)}function TP(e){return TP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},TP(e)}function SP(e,t){return SP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},SP(e,t)}yc.registerPlugin("clipPlugin",vP);var EP=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=TP(t),function(e,t){if(t&&("object"==mP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_P()?Reflect.construct(t,n||[],TP(e).constructor):t.apply(e,n))}(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SP(e,t)}(t,e),function(e,t){return t&&gP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){!function(e,t,n){var r=wP(TP(e.prototype),"handleClick",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([null])}}])}(yc.getComponent("Button"));function kP(e){return kP="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},kP(e)}function OP(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,CP(r.key),r)}}function CP(e){var t=function(e){if("object"!=kP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kP(t)?t:t+""}function PP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(PP=function(){return!!e})()}function xP(e){return xP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xP(e)}function jP(e,t){return jP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jP(e,t)}EP.prototype.controlText_="Create Clip",yc.registerComponent("CreateClipButton",EP);var LP=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=xP(t),function(e,t){if(t&&("object"==kP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,PP()?Reflect.construct(t,n||[],xP(e).constructor):t.apply(e,n))}(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jP(e,t)}(t,e),function(e,t){return t&&OP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])}(yc.getPlugin("plugin"));function AP(e){return AP="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},AP(e)}function IP(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,RP(r.key),r)}}function RP(e){var t=function(e){if("object"!=AP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=AP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==AP(t)?t:t+""}function DP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(DP=function(){return!!e})()}function MP(e){return MP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},MP(e)}function NP(e,t){return NP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},NP(e,t)}yc.registerPlugin("createClipButtonPlugin",LP);var BP=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,n){return t=MP(t),function(e,t){if(t&&("object"==AP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,DP()?Reflect.construct(t,n||[],MP(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&NP(e,t)}(t,e),function(e,t){return t&&IP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])}(yc.getComponent("PictureInPictureToggle"));function UP(e){return UP="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},UP(e)}function FP(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,VP(r.key),r)}}function VP(e){var t=function(e){if("object"!=UP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=UP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==UP(t)?t:t+""}function HP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(HP=function(){return!!e})()}function qP(){return qP="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=zP(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},qP.apply(null,arguments)}function zP(e){return zP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zP(e)}function WP(e,t){return WP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},WP(e,t)}yc.registerComponent("PictureInPictureToggle",BP);var GP=yc.getComponent("PlayToggle"),$P=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=zP(t),function(e,t){if(t&&("object"==UP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,HP()?Reflect.construct(t,n||[],zP(e).constructor):t.apply(e,n))}(this,t,[e,n])).pictureInPictureEnabled=!1,r.options=n,r.bindFunctions(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WP(e,t)}(t,e),function(e,t){return t&&FP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){var e=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var t=this.getToggleParentComponent();if(t){this.pictureInPictureEnabled=!0;var n=t.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===n&&(n=t.children().length-1),t.addChild("pictureInPictureToggle",{},n);var r=t.getChild("pictureInPictureToggle");null==r||r.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t),this.player.off("playerresize",this.onPlayerResize)}}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new GP(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var e;this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,function(e,t,n){var r=qP(zP(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([])}}])}(yc.getPlugin("plugin"));function XP(e){return XP="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},XP(e)}function KP(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,YP(r.key),r)}}function YP(e){var t=function(e){if("object"!=XP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=XP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==XP(t)?t:t+""}yc.registerPlugin("pictureInPicture",$P);var QP=function(){return function(e,t){return t&&KP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}),[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value: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];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}])}(),JP=new QP;function ZP(e){return ZP="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},ZP(e)}function ex(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,tx(r.key),r)}}function tx(e){var t=function(e){if("object"!=ZP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ZP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ZP(t)?t:t+""}function nx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nx=function(){return!!e})()}function rx(e,t,n,r){var i=ix(ox(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ix(){return ix="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ox(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ix.apply(null,arguments)}function ox(e){return ox=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ox(e)}function ax(e,t){return ax=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ax(e,t)}var sx=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=ox(t),function(e,t){if(t&&("object"==ZP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,nx()?Reflect.construct(t,n||[],ox(e).constructor):t.apply(e,n))}(this,t,[e,n])).hasBuffered=!1,r.hasPlayed=!1,r.eventsService=JP,r.pointOfInterest=n.pointOfInterest,r.onMouseOver=r.onMouseOver.bind(r),r.onMouseLeave=r.onMouseLeave.bind(r),r.onGlancePointOfInterestMouseEnter=r.onGlancePointOfInterestMouseEnter.bind(r),r.onGlancePointOfInterestMouseLeave=r.onGlancePointOfInterestMouseLeave.bind(r),r.initialize(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ax(e,t)}(t,e),function(e,t){return t&&ex(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(rx(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return rx(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=yc.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])}(yc.getComponent("Component"));function ux(e){return ux="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},ux(e)}function cx(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,lx(r.key),r)}}function lx(e){var t=function(e){if("object"!=ux(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ux(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ux(t)?t:t+""}function fx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fx=function(){return!!e})()}function hx(){return hx="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=px(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},hx.apply(null,arguments)}function px(e){return px=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},px(e)}function dx(e,t){return dx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dx(e,t)}var yx=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=px(t),function(e,t){if(t&&("object"==ux(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fx()?Reflect.construct(t,n||[],px(e).constructor):t.apply(e,n))}(this,t,[e,n])).pointsOfInterestVisible=n.pointsOfInterestVisible,r.toggle(r.pointsOfInterestVisible),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dx(e,t)}(t,e),function(e,t){return t&&cx(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){yc.dom.addClass(this.toggleEl,"on"),yc.dom.setAttribute(this.toggleEl,"aria-checked","true"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){yc.dom.removeClass(this.toggleEl,"on"),yc.dom.setAttribute(this.toggleEl,"aria-checked","false"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=yc.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),yc.dom.setAttribute(this.toggleEl,"id","poi-toggle"),yc.dom.setAttribute(this.toggleEl,"role","switch"),this.toggleEl.addEventListener("click",this.handleToggle);var i=function(e,t,n){var r=hx(px(e.prototype),"createEl",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([e,{className:"vjs-menu-item cv-cog-menu-item cv-poi-toggle",innerHTML:'\n <label for="poi-toggle" class="vjs-menu-item-text">Points of Interest</label>\n <span class="cv-toggle-container"></span>'},r]);return i.children[1].appendChild(this.toggleEl),i}}])}(yc.getComponent("MenuItem"));function vx(e){return vx="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},vx(e)}function mx(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,gx(r.key),r)}}function gx(e){var t=function(e){if("object"!=vx(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vx(t)?t:t+""}function bx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(bx=function(){return!!e})()}function _x(e){return _x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_x(e)}function wx(e,t){return wx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wx(e,t)}yc.registerComponent("PointsOfInterestMenuItem",yx);var Tx,Sx=yc.getPlugin("plugin"),Ex="cvplayer-points-of-interest",kx=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=_x(t),function(e,t){if(t&&("object"==vx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,bx()?Reflect.construct(t,n||[],_x(e).constructor):t.apply(e,n))}(this,t,[e])).pointOfInterestIndicators=[],r.enabled=!0,r.pointsOfInterest=null==n?void 0:n.pointsOfInterest,r.initialize=r.initialize.bind(r),r.updateBuffered=r.updateBuffered.bind(r),r.updatePlaybackProgress=r.updatePlaybackProgress.bind(r),r.player.one("loadedmetadata",(function(){return r.player.ready(r.initialize)})),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wx(e,t)}(t,e),function(e,t){return t&&mx(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){this.pointsOfInterest&&(Od()&&"false"===Cd(Ex)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(e){Pd(Ex,e.toString()),this.pointOfInterestIndicators.forEach((function(t){return t.toggleVisibility(e)}))}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})})),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach((function(e){var r=new sx(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:yx,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered(Hw(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])}(Sx);function Ox(e){return Ox="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},Ox(e)}function Cx(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,Px(r.key),r)}}function Px(e){var t=function(e){if("object"!=Ox(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ox(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ox(t)?t:t+""}function xx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xx=function(){return!!e})()}function jx(e){return jx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jx(e)}function Lx(e,t){return Lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lx(e,t)}yc.registerPlugin("pointsOfInterestPlugin",kx),function(e){e.None="None",e.Complete="Complete",e.Incomplete="Incomplete"}(Tx||(Tx={}));var Ax=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=jx(t),function(e,t){if(t&&("object"==Ox(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xx()?Reflect.construct(t,n||[],jx(e).constructor):t.apply(e,n))}(this,t,[e,n])).update(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lx(e,t)}(t,e),function(e,t){return t&&Cx(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"update",value:function(){this.options_.activityStatus===Tx.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.getToggledActivityStatus(),this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}},{key:"getToggledActivityStatus",value:function(){return this.options_.activityStatus===Tx.None||this.options_.activityStatus===Tx.Incomplete?Tx.Complete:this.options_.activityStatus===Tx.Complete?Tx.Incomplete:void 0}}])}(yc.getComponent("Button"));function Ix(e){return Ix="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},Ix(e)}function Rx(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,Dx(r.key),r)}}function Dx(e){var t=function(e){if("object"!=Ix(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ix(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ix(t)?t:t+""}function Mx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Mx=function(){return!!e})()}function Nx(e){return Nx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nx(e)}function Bx(e,t){return Bx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bx(e,t)}Ax.prototype.controlText_="Complete";var Ux=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,n){return t=Nx(t),function(e,t){if(t&&("object"==Ix(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Mx()?Reflect.construct(t,n||[],Nx(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bx(e,t)}(t,e),function(e,t){return t&&Rx(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"setActivityStatus",value:function(e,t){var n=this;e!==this.activityStatus&&(this.activityStatus=e,this.onToggleStatus=t,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.button&&this.player.removeChild(this.button),this.button=new Ax(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])}(yc.getPlugin("plugin"));function Fx(e){return Fx="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},Fx(e)}function Vx(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,Hx(r.key),r)}}function Hx(e){var t=function(e){if("object"!=Fx(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fx(t)?t:t+""}function qx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(qx=function(){return!!e})()}function zx(e,t,n,r){var i=Wx(Gx(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Wx(){return Wx="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Gx(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Wx.apply(null,arguments)}function Gx(e){return Gx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gx(e)}function $x(e,t){return $x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$x(e,t)}yc.registerPlugin("activityStatusPlugin",Ux);var Xx=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=Gx(t),function(e,t){if(t&&("object"==Fx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qx()?Reflect.construct(t,n||[],Gx(e).constructor):t.apply(e,n))}(this,t,[e,n])).initialize(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$x(e,t)}(t,e),function(e,t){return t&&Vx(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(zx(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return zx(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r])}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.options_.time/e*100+"%"}}])}(yc.getComponent("Component"));function Kx(e){return Kx="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},Kx(e)}function Yx(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,Qx(r.key),r)}}function Qx(e){var t=function(e){if("object"!=Kx(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kx(t)?t:t+""}function Jx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Jx=function(){return!!e})()}function Zx(e,t,n,r){var i=ej(tj(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ej(){return ej="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=tj(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ej.apply(null,arguments)}function tj(e){return tj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tj(e)}function nj(e,t){return nj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nj(e,t)}var rj=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=tj(t),function(e,t){if(t&&("object"==Kx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jx()?Reflect.construct(t,n||[],tj(e).constructor):t.apply(e,n))}(this,t,[e,n])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nj(e,t)}(t,e),function(e,t){return t&&Yx(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(Zx(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){return Zx(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{innerHTML:'<span class="'.concat(this.options_.iconClassName,'"></span><span>').concat(this.options_.label,"</span>"),className:this.buildCSSClass()}),r])}},{key:"handleClick",value:function(){this.options_.onPress()}}])}(yc.getComponent("ClickableComponent"));function ij(e){return ij="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},ij(e)}function oj(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,aj(r.key),r)}}function aj(e){var t=function(e){if("object"!=ij(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ij(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ij(t)?t:t+""}function sj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(sj=function(){return!!e})()}function uj(e,t,n,r){var i=cj(lj(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function cj(){return cj="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=lj(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},cj.apply(null,arguments)}function lj(e){return lj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lj(e)}function fj(e,t){return fj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fj(e,t)}var hj=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=lj(t),function(e,t){if(t&&("object"==ij(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sj()?Reflect.construct(t,n||[],lj(e).constructor):t.apply(e,n))}(this,t,[e,n])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fj(e,t)}(t,e),function(e,t){return t&&oj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(uj(t,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(e,n,r){var i=uj(t,"createEl",this,3)([e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r]),o=yc.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),a=yc.dom.createEl("div",{className:"cv-button-container"}),s=new rj(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),u=new rj(this.player_,{label:this.localize("Continue watching"),iconClassName:"cv-continue-icon",onPress:this.options_.onContinuePress});return i.appendChild(o),i.appendChild(a),a.appendChild(s.el()),a.appendChild(u.el()),i}}])}(yc.getComponent("Component"));function pj(e){return pj="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},pj(e)}function dj(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,yj(r.key),r)}}function yj(e){var t=function(e){if("object"!=pj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pj(t)?t:t+""}function vj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(vj=function(){return!!e})()}function mj(){return mj="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=gj(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},mj.apply(null,arguments)}function gj(e){return gj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gj(e)}function bj(e,t){return bj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bj(e,t)}var _j=function(e){function t(e,n){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,n){return t=gj(t),function(e,t){if(t&&("object"==pj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vj()?Reflect.construct(t,n||[],gj(e).constructor):t.apply(e,n))}(this,t,[e,n])).startTime=parseFloat(n.startTime.toPrecision(4)),r.endTime=parseFloat(n.endTime.toPrecision(4)),r.dismissed=!1,r.startTime>r.endTime)throw Error("Range start cannot be greater than range end");return r.bindFunctions(),r.initialize(),r}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bj(e,t)}(t,e),function(e,t){return t&&dj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"bindFunctions",value:function(){this.onReady=this.onReady.bind(this),this.onTimeUpdateOrSeeked=this.onTimeUpdateOrSeeked.bind(this),this.onReplayPress=this.onReplayPress.bind(this),this.onContinuePress=this.onContinuePress.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.one("loadedmetadata",(function(){return e.player.ready(e.onReady)})),this.player.on("timeupdate",this.onTimeUpdateOrSeeked),this.player.on("seeked",this.onTimeUpdateOrSeeked)}},{key:"onReady",value:function(){this.addCssClasses(),this.showRangeIndicators(),this.addMaskToProgressBar()}},{key:"onTimeUpdateOrSeeked",value:function(){if(!this.dismissed){var e=this.player.currentTime();if(!(e<this.startTime))return e>this.endTime?(this.showReplayView(),this.disablePlayToggle(),this.player.pause(),void this.player.currentTime(this.endTime)):void 0;this.player.currentTime(this.startTime)}}},{key:"onReplayPress",value:function(){this.player.currentTime(this.startTime),this.player.play(),this.hideReplayView(),this.enablePlayToggle()}},{key:"onContinuePress",value:function(){this.dismissed=!0,this.player.play(),this.hideRangeIndicators(),this.removeMaskFromProgressBar(),this.hideReplayView(),this.enablePlayToggle(),this.removeCssClasses()}},{key:"showRangeIndicators",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.startTimeIndicator||(this.startTimeIndicator=new Xx(this.player,{time:this.startTime}),null==t||t.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new Xx(this.player,{time:this.endTime}),null==t||t.addChild(this.endTimeIndicator))}},{key:"hideRangeIndicators",value:function(){var e,t;null===(e=this.startTimeIndicator)||void 0===e||e.hide(),null===(t=this.endTimeIndicator)||void 0===t||t.hide()}},{key:"addMaskToProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");if(n&&n.length){var r=n[0],i=this.player.duration(),o=this.startTime/i*100,a=100-this.endTime/i*100;r.style.clipPath="inset(".concat(-5,"em ").concat(a,"% ").concat(-5,"em ").concat(o,"%)")}}},{key:"removeMaskFromProgressBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar"),n=null==t?void 0:t.el().getElementsByClassName("cv-chapter-bar-items");n&&n.length&&(n[0].style.clipPath="")}},{key:"showReplayView",value:function(){this.replayView||(this.replayView=new hj(this.player,{onContinuePress:this.onContinuePress,onReplayPress:this.onReplayPress}),this.player.addChild(this.replayView)),this.replayView.show()}},{key:"hideReplayView",value:function(){var e;null===(e=this.replayView)||void 0===e||e.hide()}},{key:"getPlayToggle",value:function(){var e=this.player.getChild("collapserator");return null==e?void 0:e.getChild("PlayToggle")}},{key:"enablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.enable()}},{key:"disablePlayToggle",value:function(){var e=this.getPlayToggle();e&&e.disable()}},{key:"addCssClasses",value:function(){this.player.addClass("cv-range-indicator-plugin")}},{key:"removeCssClasses",value:function(){this.player.removeClass("cv-range-indicator-plugin")}},{key:"dispose",value:function(){var e,n,r;this.removeCssClasses(),this.player.off("timeupdate",this.onTimeUpdateOrSeeked),this.player.off("seeked",this.onTimeUpdateOrSeeked),null===(e=this.startTimeIndicator)||void 0===e||e.dispose(),null===(n=this.endTimeIndicator)||void 0===n||n.dispose(),null===(r=this.replayView)||void 0===r||r.dispose(),function(e,t,n){var r=mj(gj(e.prototype),"dispose",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([])}}])}(yc.getPlugin("plugin"));yc.registerPlugin("rangeIndicatorPlugin",_j);var wj=function(){var e,t,n;return null!==(n=null===(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)||void 0===t?void 0:t.call(e))&&void 0!==n?n:Math.random().toString()};function Tj(e){return Tj="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},Tj(e)}function Sj(){Sj=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(L([])));T&&T!==n&&r.call(T,a)&&(_=T);var S=b.prototype=m.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Tj(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=h;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Tj(t)+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(k.prototype),c(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ej(e){return function(e){if(Array.isArray(e))return kj(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){if("string"==typeof e)return kj(e,t);var n={}.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)?kj(e,t):void 0}}(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 kj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Oj(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,Cj(r.key),r)}}function Cj(e){var t=function(e){if("object"!=Tj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Tj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Tj(t)?t:t+""}function Pj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pj=function(){return!!e})()}function xj(e,t,n,r){var i=jj(Lj(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function jj(){return jj="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lj(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},jj.apply(null,arguments)}function Lj(e){return Lj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lj(e)}function Aj(e,t){return Aj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Aj(e,t)}var Ij=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Lj(t),function(e,t){if(t&&("object"==Tj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pj()?Reflect.construct(t,n||[],Lj(e).constructor):t.apply(e,n))}(this,t,[e,n])}return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Aj(e,t)}(t,e),function(e,t){return t&&Oj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"getPlayerOptions",value:function(){var e,n=xj(t,"getPlayerOptions",this,3)([]);return(null===(e=n.devicesConfig)||void 0===e?void 0:e.canUserCastToDevices)?Object.assign(Object.assign({},n),{techOrder:["devices"].concat(Ej(n.techOrder)),devices:{instanceId:wj()}}):n}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var n,r,i,o,a,s=this,u=Object.create(null,{additionalSetup:{get:function(){return xj(t,"additionalSetup",s,1)}}});return r=this,i=void 0,o=void 0,a=Sj().mark((function t(){var r;return Sj().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.next=7;break}if(null!==(r=e.additionalData)){t.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 7:if(!(null===(n=this.options.devicesConfig)||void 0===n?void 0:n.canUserCastToDevices)){t.next=11;break}if(this.player.devicesPlugin){t.next=10;break}return t.abrupt("return");case 10:this.player.devicesPlugin(Object.assign(Object.assign({},this.options.devicesConfig),{userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService}));case 11:"MasterVideo"===e.mediaType&&this.options.startTime&&this.options.endTime&&this.player.rangeIndicatorPlugin({startTime:this.options.startTime,endTime:this.options.endTime});case 12:case"end":return t.stop()}}),t,this)})),new(o||(o=Promise))((function(e,t){function n(e){try{u(a.next(e))}catch(e){t(e)}}function s(e){try{u(a.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}u((a=a.apply(r,i||[])).next())}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])}(uP)})(),r})()));