UNPKG

@lahzenegar/video-react

Version:

Video-React is a web video player built from the ground up for an HTML5 world using React library.

1 lines 591 kB
(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?t(exports,require('react'),require('stream'),require('string_decoder'),require('events'),require('timers'),require('react-dom')):'function'==typeof define&&define.amd?define(['exports','react','stream','string_decoder','events','timers','react-dom'],t):t(e['video-react']=e['video-react']||{},e.React,e.stream,e.string_decoder,e.events,e.timers,e.ReactDOM)})(this,function(e,t,a,r,n,o,s){'use strict';function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,'default')?e['default']:e}function d(e,t){return t={exports:{}},e(t,t.exports),t.exports}function c(e){if(null===e||e===void 0)throw new TypeError('Object.assign cannot be called with null or undefined');return Object(e)}function p(){try{if(!wo)return!1;var e=new String('abc');if(e[5]='de','5'===cl(e)[0])return!1;for(var t={},a=0;10>a;a++)t['_'+Sn(a)]=a;var r=cl(t).map(function(e){return t[e]});if('0123456789'!==r.join(''))return!1;var n={};return['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t'].forEach(function(e){n[e]=e}),'abcdefghijklmnopqrst'===al(wo({},n)).join('')}catch(e){return!1}}function u(){}function m(){}function y(e){var t=e.Symbol,a;return'function'==typeof t?t.observable?a=t.observable:(a=t('observable'),t.observable=a):a='@@observable',a}function h(e){if('object'!==('undefined'==typeof e?'undefined':Ns(e))||null===e)return!1;for(var t=e;null!==Ho(t);)t=Ho(t);return Ho(e)===t}function _(e,t,a){function r(){p===c&&(p=c.slice())}function n(){if(u)throw new Error('You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.');return d}function o(e){if('function'!=typeof e)throw new Error('Expected the listener to be a function.');if(u)throw new Error('You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');var t=!0;return r(),p.push(e),function(){if(t){if(u)throw new Error('You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');t=!1,r();var a=p.indexOf(e);p.splice(a,1)}}}function i(e){if(!h(e))throw new Error('Actions must be plain objects. Use custom middleware for async actions.');if('undefined'==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw new Error('Reducers may not dispatch actions.');try{u=!0,d=l(d,e)}finally{u=!1}for(var t=c=p,a=0,r;a<t.length;a++)r=t[a],r();return e}var s;if('function'==typeof t&&'function'==typeof a||'function'==typeof a&&'function'==typeof arguments[3])throw new Error('It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function');if('function'==typeof t&&'undefined'==typeof a&&(a=t,t=void 0),'undefined'!=typeof a){if('function'!=typeof a)throw new Error('Expected the enhancer to be a function.');return a(_)(e,t)}if('function'!=typeof e)throw new Error('Expected the reducer to be a function.');var l=e,d=t,c=[],p=c,u=!1;return i({type:xl.INIT}),s={dispatch:i,subscribe:o,getState:n,replaceReducer:function(e){if('function'!=typeof e)throw new Error('Expected the nextReducer to be a function.');l=e,i({type:xl.REPLACE})}},s[Pl]=function(){var e=o,t;return t={subscribe:function(t){function a(){t.next&&t.next(n())}if('object'!==('undefined'==typeof t?'undefined':Ns(t))||null===t)throw new TypeError('Expected the observer to be an object.');a();var r=e(a);return{unsubscribe:r}}},t[Pl]=function(){return this},t},s}function v(e){'undefined'!=typeof console&&'function'==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}function E(){}function T(){return{type:ud}}function b(){return{type:pd}}function S(){return{type:cd}}function A(){return{type:md}}function R(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:!0;return{type:e?fd:yd}}function C(e){return{type:Ol,videoProps:e}}function D(e,t,a){return{type:Nl,videoProps:e,waitingDuration:a,delayToStartPlaying:t}}function L(e){return{type:wl,videoProps:e}}function P(e){return{type:Fl,videoProps:e}}function I(e){return{type:Ml,videoProps:e}}function x(e){return{type:Ul,videoProps:e}}function O(e){return{type:Bl,videoProps:e}}function N(e){return{type:Gl,videoProps:e}}function w(e){return{type:jl,videoProps:e}}function F(e){return{type:Vl,videoProps:e}}function M(e){return{type:Wl,videoProps:e}}function U(e,t,a,r){return{type:Yl,videoProps:e,secondsPlayed:t,percentPlayed:a,waitingTime:r}}function B(e){return{type:ql,videoProps:e}}function G(e){return{type:zl,videoProps:e}}function V(e){return{type:Xl,videoProps:e}}function K(e){return{type:$l,videoProps:e}}function H(e){return{type:Ql,videoProps:e}}function W(e){return{type:Zl,videoProps:e}}function Y(e){return{type:Jl,videoProps:e}}function q(e){return{type:ed,videoProps:e}}function z(e){return{type:td,videoProps:e}}function X(e){return{type:ad,videoProps:e}}function $(e){return{type:rd,videoProps:e}}function Q(e,t,a,r){return{type:nd,hasDVR:e,isLive:t,mediaDuration:a,playOffset:r}}function Z(e,t){return{type:od,liveTime:e,latency:t}}function J(e){return{type:id,tracks:e}}function ee(e){return{type:dd,hls:e}}function te(e,t){return{type:ld,realActiveTrack:e,switchingTrack:t}}function ae(e){return{type:sd,activeTrack:e}}function re(e){return{type:Kl,time:e}}function ne(e){return{type:Hl,time:e}}function oe(e){return{type:Ld,isFullscreen:e}}function ie(e){return{type:xd,audioOnly:e}}function se(e){return{type:Pd,activity:e}}function le(e){return{type:Id,activity:e}}function de(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{action:'play',source:''};return this.video.play(),{type:Dd,operation:e}}function ce(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{action:'pause',source:''};return this.video.pause(),{type:Dd,operation:e}}function pe(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{action:'toggle-play',source:''};return this.video.togglePlay(),{type:Dd,operation:e}}function ue(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{action:'seek',source:''};return this.video.seek(e),{type:Dd,operation:t}}function ge(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{action:'forward-'+e,source:''};return this.video.forward(e),{type:Dd,operation:t}}function me(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{action:'replay-'+e,source:''};return this.video.replay(e),{type:Dd,operation:t}}function fe(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{action:'change-rate',source:''};return this.video.playbackRate=e,{type:Dd,operation:t}}function ye(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{action:'change-volume',source:''},a=e;return 0>e&&(a=0),1<e&&(a=1),this.video.volume=a,{type:Dd,operation:t}}function he(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{action:e?'muted':'unmuted',source:''};return this.video.muted=e,{type:Dd,operation:t}}function _e(e){return kd?void this.video.video.webkitEnterFullscreen():vd.enabled?(vd.isFullscreen?vd.exit():vd.request(this.rootElement),{type:Dd,operation:{action:'toggle-fullscreen',source:''}}):{type:Ld,isFullscreen:!e.isFullscreen}}function ve(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:Nd,t=arguments[1];switch(t.type){case Id:return Mo({},e,{userActivity:t.activity});case Pd:return Mo({},e,{isActive:t.activity});case Ld:return Mo({},e,{isFullscreen:!!t.isFullscreen});case xd:return Mo({},e,{audioOnly:t.audioOnly});case cd:return Mo({},e,{ads:!0});case md:return Mo({},e,{ads:!1});case fd:return Mo({},e,{contentLoading:!0});case yd:return Mo({},e,{contentLoading:!1});case ud:case pd:return Mo({},e);case Kl:return Mo({},e,{seekingTime:t.time});case Hl:return Mo({},e,{seekingTime:0});case Ol:return Mo({},e,t.videoProps,{hasStarted:!1,ended:!1});case Fl:var a=Mo({},e,t.videoProps);return!0===t.videoProps.paused&&(a.waiting=!1),a;case Nl:var r=Mo({},e,t.videoProps,{waitingDuration:t.waitingDuration,delayToStartPlaying:t.delayToStartPlaying});return!0===t.videoProps.paused&&(r.waiting=!1),r;case wl:return Mo({},e,t.videoProps,{waiting:!0});case Ml:return Mo({},e,t.videoProps,{waiting:!1,hasStarted:!0});case Ul:return Mo({},e,t.videoProps,{ended:!1,paused:!1,autoPaused:!1,waiting:!1});case Bl:return Mo({},e,t.videoProps,{paused:!0});case Gl:return Mo({},e,t.videoProps,{ended:!0});case jl:return Mo({},e,t.videoProps,{seeking:!0});case Vl:return Mo({},e,t.videoProps,{seeking:!1});case rd:return Mo({},e,t.videoProps,{error:'UNKNOWN ERROR',ended:!0});case nd:return Mo({},e,{hasDVR:t.hasDVR,isLive:t.isLive,mediaDuration:t.mediaDuration,playOffset:t.playOffset});case od:return Mo({},e,{liveTime:t.liveTime,latency:t.latency});case id:return Mo({},e,{tracks:t.tracks});case dd:return Mo({},e,{hls:t.hls});case sd:return Mo({},e,{activeTrack:t.activeTrack});case ld:return Mo({},e,{realActiveTrack:t.realActiveTrack,switchingTrack:t.switchingTrack});case Yl:return Mo({},e,t.videoProps,{secondsPlayed:t.secondsPlayed,percentPlayed:t.percentPlayed,waitingTime:t.waitingTime,waiting:!1});case Wl:case ql:case zl:case Xl:return Mo({},e,t.videoProps);case $l:case Ql:case Zl:case Jl:case ed:case td:case ad:return Mo({},e,t.videoProps);default:return e;}}function Ee(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:wd,t=arguments[1];switch(t.type){case Dd:return Mo({},e,{count:e.count+1,operation:Mo({},e.operation,t.operation)});default:return e;}}function Te(e){var t=e.player,a=e.className;return Dn.createElement('div',{className:Sl('video-react-loading-spinner',a)},Dn.createElement('div',{className:'spinner-main'},Dn.createElement('div',{className:'spinner-big'}),Dn.createElement('div',{className:'spinner-small'})))}function be(e){var t=e.player,a=e.player,r=a.currentTime,n=a.hasStarted,o=a.waiting,i=a.contentLoading,s=a.videoWidth,l=a.videoHeight,d=e.className;return!n||o||i||!r||0!==s||0!==l?null:Dn.createElement('div',{className:Sl('video-react-audio-visualizer',d)},Dn.createElement('div',{className:'halo'}))}function Se(e){var t=e.poster,a=e.player,r=e.actions,n=e.className;return!t||a.hasStarted?null:Dn.createElement('div',{className:Sl('video-react-poster',n),style:{backgroundImage:'url("'+t+'")'},onClick:function(){a.paused&&r.play()}})}function ke(e){var t,a;this.promise=new e(function(e,r){if(t!=void 0||a!=void 0)throw TypeError('Bad Promise constructor');t=e,a=r}),this.resolve=xn(t),this.reject=xn(a)}function Ae(){try{var e=Up;return Up=null,e.apply(this,arguments)}catch(t){return Pp.e=t,Pp}}function Re(e){return Up=e,Ae}function Ce(e){return null==e||!0===e||!1===e||'string'==typeof e||'number'==typeof e}function De(e){return'function'==typeof e||'object'===('undefined'==typeof e?'undefined':Ns(e))&&null!==e}function Le(e){return Ce(e)?new Error(Ue(e)):e}function Pe(e,t){var a=e.length,r=Array(a+1),n;for(n=0;n<a;++n)r[n]=e[n];return r[n]=t,r}function Ie(e,t,a){if(Dp.isES5){var r=Dl(e,t);if(null!=r)return null==r.get&&null==r.set?r.value:a}else return{}.hasOwnProperty.call(e,t)?e[t]:void 0}function xe(e,t,a){if(Ce(e))return e;return Dp.defineProperty(e,t,{value:a,configurable:!0,enumerable:!1,writable:!0}),e}function Oe(e){throw e}function Ne(e){try{if('function'==typeof e){var t=Dp.names(e.prototype),a=Dp.isES5&&1<t.length,r=0<t.length&&(1!==t.length||'constructor'!==t[0]),n=Np.test(e+'')&&0<Dp.names(e).length;if(a||r||n)return!0}return!1}catch(t){return!1}}function we(e){function t(){}function a(){return Ns(r.foo)}t.prototype=e;var r=new t;return a(),a(),e}function Fe(e){return wp.test(e)}function Me(e,t,a){for(var r=Array(e),n=0;n<e;++n)r[n]=t+n+a;return r}function Ue(e){try{return e+''}catch(t){return'[no string representation]'}}function Be(e){return e instanceof Error||null!==e&&'object'===('undefined'==typeof e?'undefined':Ns(e))&&'string'==typeof e.message&&'string'==typeof e.name}function Ge(t){try{xe(t,'isOperational',!0)}catch(e){}}function je(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function Ve(e){return Be(e)&&Dp.propertyIsWritable(e,'stack')}function Ke(e){return{}.toString.call(e)}function He(e,t,a){for(var r=Dp.names(e),n=0,o;n<r.length;++n)if(o=r[n],a(o))try{Dp.defineProperty(t,o,Dp.getDescriptor(e,o))}catch(e){}}function We(e){return jp?process.env[e]:void 0}function Ye(){if('function'==typeof lp)try{var e=new lp(function(){});if('[object Promise]'==={}.toString.call(e))return lp}catch(t){}}function qe(e,t){return e.bind(t)}function ze(e,t,a,r,n){for(var o=0;o<n;++o)a[o+r]=e[o+t],e[o+t]=void 0}function Xe(e){this._capacity=e,this._length=0,this._front=0}function $e(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new eu(16),this._normalQueue=new eu(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=Jp}function Qe(e,t,a){this._lateQueue.push(e,t,a),this._queueTick()}function Ze(e,t,a){this._normalQueue.push(e,t,a),this._queueTick()}function Je(e){this._normalQueue._pushOne(e),this._queueTick()}function et(e){for(;0<e.length();)tt(e)}function tt(e){var t=e.shift();if('function'!=typeof t)t._settlePromises();else{var a=e.shift(),r=e.shift();t.call(a,r)}}function at(e,t){function a(r){return this instanceof a?void(iu(this,'message','string'==typeof r?r:t),iu(this,'name',e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)):new a(r)}return ou(a,Error),a}function rt(e){return this instanceof rt?void(iu(this,'name','OperationalError'),iu(this,'message',e),this.cause=e,this.isOperational=!0,e instanceof Error?(iu(this,'message',e.message),iu(this,'stack',e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)):new rt(e)}function nt(e){return e instanceof Error&&Dp.getPrototypeOf(e)===Error.prototype}function ot(e){var t;if(nt(e)){t=new qu(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var a=Dp.keys(e),r=0,n;r<a.length;++r)n=a[r],zu.test(n)||(t[n]=e[n]);return t}return Kp.markAsOriginatingFromRejection(e),e}function it(e,t){return function(a,r){if(null!==e){if(a){var n=ot(Yu(a));e._attachExtraTrace(n),e._reject(n)}else if(!t)e._fulfill(r);else{for(var o=arguments.length,i=Array(kn(o-1,0)),s=1;s<o;++s)i[s-1]=arguments[s];e._fulfill(i)}e=null}}}function st(){try{lp===Tg&&(Promise=Eg)}catch(t){}return Tg}function lt(e,t){for(var a=-1,r=null==e?0:e.length;++a<r&&!(!1===t(e[a],a,e)););return e}function dt(e){return function(t,a,r){for(var n=-1,o=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++n];if(!1===a(o[l],l,o))break}return t}}function ct(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}function pt(e){var t=ym.call(e,_m),a=e[_m];try{e[_m]=void 0}catch(t){}var r=hm.call(e);return t?e[_m]=a:delete e[_m],r}function ut(e){return Tm.call(e)}function gt(e){return null==e?void 0===e?km:Sm:Am&&Am in Object(e)?vm(e):bm(e)}function mt(e){return null!=e&&'object'==('undefined'==typeof e?'undefined':Ns(e))}function ft(e){return Cm(e)&&Rm(e)==Dm}function yt(){return!1}function ht(e,t){var a='undefined'==typeof e?'undefined':Ns(e);return t=null==t?Bm:t,!!t&&('number'==a||'symbol'!=a&&Gm.test(e))&&-1<e&&0==e%1&&e<t}function _t(e){return'number'==typeof e&&-1<e&&0==e%1&&e<=Vm}function vt(e){return Cm(e)&&Km(e.length)&&!!ff[Rm(e)]}function Et(e){return function(t){return e(t)}}function Tt(e,t){var a=Fm(e),r=!a&&Nm(e),n=!a&&!r&&Um(e),o=!a&&!r&&!n&&Tf(e),i=a||r||n||o,s=i?sm(e.length,String):[],l=s.length;for(var d in e)(t||Sf.call(e,d))&&!(i&&('length'==d||n&&('offset'==d||'parent'==d)||o&&('buffer'==d||'byteLength'==d||'byteOffset'==d)||jm(d,l)))&&s.push(d);return s}function bt(e){var t=e&&e.constructor,a='function'==typeof t&&t.prototype||Af;return e===a}function St(e,t){return function(a){return e(t(a))}}function kt(e){if(!Rf(e))return Lf(e);var t=[];for(var a in Object(e))If.call(e,a)&&'constructor'!=a&&t.push(a);return t}function At(e){var t='undefined'==typeof e?'undefined':Ns(e);return null!=e&&('object'==t||'function'==t)}function Rt(e){if(!Of(e))return!1;var t=Rm(e);return t==wf||t==Ff||t==Nf||t==Mf}function Ct(e){return null!=e&&Km(e.length)&&!Uf(e)}function Dt(e){return Bf(e)?kf(e):xf(e)}function Lt(e,t){return e&&im(e,t,Gf)}function Pt(e,t){return function(a,r){if(null==a)return a;if(!Bf(a))return e(a,r);for(var n=a.length,o=t?n:-1,i=Object(a);(t?o--:++o<n)&&!(!1===r(i[o],o,i)););return a}}function It(e){return e}function xt(e){return'function'==typeof e?e:Wf}function Ot(e,t){var a=Fm(e)?rm:Hf;return a(e,Yf(t))}function Nt(e){var t=e;return-1<t.indexOf('HTML')?t=t.replace('HTML','html'):-1<t.indexOf('VAST')&&(t=t.replace('VAST','vast')),t}function wt(){try{return this._value}catch(e){return null}}function Ft(e){try{return this._attr[e]}catch(e){return null}}function Mt(e){var t=Array.isArray(e)?[]:{};return zf(e,function(e,a){var r=e,n=n(r),o=Array.isArray(r);n&&(r._value&&(r.getValue=wt.bind(r)),r.getAttr=Ft.bind(r)),t[a]=n||o?ay[a]&&!o?[Mt(r)]:Mt(r):r}),t}function Ut(e){try{return new URL(e),!0}catch(e){return!1}}function Bt(e,t){try{var a=e.vast.ad,r=[];return a.map(function(e){var a=e.inLine,n=e.inLine.creatives.creative;n.map(function(e){var n=e.linear,o=e.linear,i=o.videoClicks.clickThrough,s=o.mediaFiles.mediaFile;r.push({adTitle:a.adTitle.getValue(),adSystem:a.adSystem.getValue(),duration:Gt(n.duration.getValue()),skipOn:Gt(n.getAttr('skipoffset')),adID:e.getAttr('adID'),videoClicks:i.getValue(),mediaFiles:s.map(function(e){var a=e.getValue();return!Ut(a)&&t&&(a=''+t+(a.startsWith('/')?'':'/')+a),{URL:a,type:e.getAttr('type'),width:e.getAttr('width'),height:e.getAttr('height'),delivery:e.getAttr('delivery')}})})})}),r}catch(e){return[]}}function Gt(e){if(!e||3!==e.split(':').length)return 0;for(var t=e&&e.split(':'),a=0,r=1;0<t.length;)a+=r*parseInt(t.pop(),10),r*=60;return a}function jt(e,t,a){return lp.race([fetch(e,t),new lp(function(e,t){return setTimeout(function(){return t('FILE_FETCH_TIMEOUT')},a)})])}function Vt(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,a=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=a?t-e:e,n=Rn(r%60),o=Rn(r/60%60),i=Rn(r/3600),s=Rn(t/60%60),l=Rn(t/3600);return(isNaN(r)||r===Infinity)&&(i=o=n='-'),i=0<i||0<l?i+':':'',o=((i||10<=s)&&10>o?'0'+o:o)+':',n=10>n?'0'+n:n,a?'-'+i+o+n:i+o+n}function Kt(e){return e.props&&e.props.isVideoChild||'source'===e.type||'track'===e.type}function Ht(e){var t=/http.*?\.m3u8/;return!!t.test(e)}function Wt(t,e,a){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:1,n=Dn.Children.toArray(e),o=Mo({},a);return n.filter(function(t){return!t.props.disabled}).concat(t.filter(function(e){return!Dy(n,function(t){return Ly(t,e)})})).map(function(a){var r=Dy(t,function(e){return Ly(e,a)});delete o.order;var n=r?r.props:{},i=Mo({},o,n,a.props),s=Dn.cloneElement(a,i,a.props.children);return s}).sort(function(e,t){return(e.props.order||r)-(t.props.order||r)})}function Yt(e,t){console.warn('WARNING: '+e+' will be deprecated soon! Please use '+t+' instead.')}function qt(e,t){var a=arguments,r=!1;return function(){r||(e.apply(null,a),r=!0,setTimeout(function(){r=!1},t))}}function zt(e){if(e){var t=e.details,a=e.fatal,r=a||$t(e);return r?{type:Qt(e),detail:$t(e)?Xt(e):Zt(t),isFatal:r}:null}}function Xt(e){if(e){var t=e.response,a=e.details,r=Zt(a);return t&&t.code?'HTTP_ERROR_'+t.code:r?'NETWORK_ISSUE_'+Zt(a):'NETWORK_ERROR'}}function $t(e){return e&&e.type===Ry.ErrorTypes.NETWORK_ERROR}function Qt(e){var t=e.type;return t===Ry.ErrorTypes.KEY_SYSTEM_ERROR?'KEY_SYSTEM_ERROR':t===Ry.ErrorTypes.MEDIA_ERROR?'MEDIA_ERROR':t===Ry.ErrorTypes.MUX_ERROR?'MUX_ERROR':t===Ry.ErrorTypes.NETWORK_ERROR?'NETWORK_ERROR':t===Ry.ErrorTypes.OTHER_ERROR?'OTHER_ERROR':'UNHANDLED_ERROR'}function Zt(e){return e?e===Ry.ErrorDetails.AUDIO_TRACK_LOAD_ERROR?'AUDIO_TRACK_LOAD_ERROR':e===Ry.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?'AUDIO_TRACK_LOAD_TIMEOUT':e===Ry.ErrorDetails.BUFFER_ADD_CODEC_ERROR?'BUFFER_ADD_CODEC_ERROR':e===Ry.ErrorDetails.BUFFER_APPENDING_ERROR?'BUFFER_APPENDING_ERROR':e===Ry.ErrorDetails.BUFFER_APPEND_ERROR?'BUFFER_APPEND_ERROR':e===Ry.ErrorDetails.BUFFER_FULL_ERROR?'BUFFER_FULL_ERROR':e===Ry.ErrorDetails.BUFFER_NUDGE_ON_STALL?'BUFFER_NUDGE_ON_STALL':e===Ry.ErrorDetails.BUFFER_SEEK_OVER_HOLE?'BUFFER_SEEK_OVER_HOLE':e===Ry.ErrorDetails.BUFFER_STALLED_ERROR?'BUFFER_STALLED_ERROR':e===Ry.ErrorDetails.FRAG_DECRYPT_ERROR?'FRAG_DECRYPT_ERROR':e===Ry.ErrorDetails.FRAG_LOAD_ERROR?'FRAG_LOAD_ERROR':e===Ry.ErrorDetails.FRAG_LOAD_TIMEOUT?'FRAG_LOAD_TIMEOUT':e===Ry.ErrorDetails.FRAG_PARSING_ERROR?'FRAG_PARSING_ERROR':e===Ry.ErrorDetails.INTERNAL_EXCEPTION?'INTERNAL_EXCEPTION':e===Ry.ErrorDetails.KEY_LOAD_ERROR?'KEY_LOAD_ERROR':e===Ry.ErrorDetails.KEY_LOAD_TIMEOUT?'KEY_LOAD_TIMEOUT':e===Ry.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED?'KEY_SYSTEM_LICENSE_REQUEST_FAILED':e===Ry.ErrorDetails.KEY_SYSTEM_NO_ACCESS?'KEY_SYSTEM_NO_ACCESS':e===Ry.ErrorDetails.KEY_SYSTEM_NO_KEYS?'KEY_SYSTEM_NO_KEYS':e===Ry.ErrorDetails.KEY_SYSTEM_NO_SESSION?'KEY_SYSTEM_NO_SESSION':e===Ry.ErrorDetails.LEVEL_LOAD_ERROR?'LEVEL_LOAD_ERROR':e===Ry.ErrorDetails.LEVEL_LOAD_TIMEOUT?'LEVEL_LOAD_TIMEOUT':e===Ry.ErrorDetails.LEVEL_SWITCH_ERROR?'LEVEL_SWITCH_ERROR':e===Ry.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR?'MANIFEST_INCOMPATIBLE_CODECS_ERROR':e===Ry.ErrorDetails.MANIFEST_LOAD_ERROR?'MANIFEST_LOAD_ERROR':e===Ry.ErrorDetails.MANIFEST_LOAD_TIMEOUT?'MANIFEST_LOAD_TIMEOUT':e===Ry.ErrorDetails.MANIFEST_PARSING_ERROR?'MANIFEST_PARSING_ERROR':e===Ry.ErrorDetails.REMUX_ALLOC_ERROR?'REMUX_ALLOC_ERROR':'string'==typeof e?Jt(e).toUpperCase():'OTHER_ERRORS':'UNHANDLED_ERROR'}function Jt(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:'_';return e&&t?e.trim().replace(/([A-Z])/g,function(e){return t+e.toLowerCase()}).replace(new RegExp('^\\'+t,'g'),'').replace(new RegExp('\\'+t+'$','g'),''):null}function ea(){var e=0,t=setInterval(function(){e+=100},100);return{end:function(){return clearInterval(t),e}}}function ta(e){var t;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var a=document.documentElement,r=document.body,n=a.clientLeft||r.clientLeft||0,o=window.pageXOffset||r.scrollLeft,i=t.left+o-n,s=a.clientTop||r.clientTop||0,l=window.pageYOffset||r.scrollTop,d=t.top+l-s;return{left:Tn(i),top:Tn(d)}}function aa(e,t){var a={},r=ta(e),n=e.offsetWidth,o=e.offsetHeight,i=r.top,s=r.left,l=t.pageY,d=t.pageX;return t.changedTouches&&(d=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),a.y=kn(0,An(1,(i-l+o)/o)),a.x=kn(0,An(1,(d-s)/n)),a}function ra(e,t){for(var a=e.className.split(' '),r=0;r<a.length;r++)if(a[r].toLowerCase()===t.toLowerCase())return!0;return!1}function na(e){var t=e.hasDVR,a=e.latency,r=e.currentTime,n=e.duration,o=e.percentage,i=e.className;return Dn.createElement('div',{"data-current-time":Vt(r,n),className:Sl('video-react-play-progress video-react-slider-bar',i),style:{width:20>=a&&t?'100%':o}},Dn.createElement('span',{className:'video-react-control-text'},Dn.createElement('span',null,'Progress'),': ',o))}function oa(e){function t(e,t){var a=e/t||0;return 1<=a?a=1:0>=a&&(a=0),100*a+'%'}var a=e.hasDVR,r=e.buffered,n=e.duration,o=e.playOffset,s=e.className;if(!r||!r.length)return null;var l=r.end(r.length-1),d={};l>n&&(l=n),d.width=t(l,n);for(var c=[],p=0;p<r.length;p++){var i=void 0,u=void 0;a?(i=r.start(p)-o,u=r.end(p)-o):(i=r.start(p),u=r.end(p));var g=Dn.createElement('div',{style:{left:t(i,l),width:t(u-i,l)},key:'part-'+p});c.push(g)}return 0===c.length&&(c=null),Dn.createElement('div',{style:d,className:Sl('video-react-load-progress',s)},Dn.createElement('span',{className:'video-react-control-text'},Dn.createElement('span',null,'Loaded'),': 0%'),c)}function ia(e){var t=e.duration,a=e.mouseTime,r=e.className,n=e.text,o=e.hasDVR;if(!a.time)return null;var i=n||Vt(a.time,t,o);return Dn.createElement('div',{className:Sl('video-react-mouse-display',r),style:{left:a.position+'px'},"data-current-time":i})}function sa(e){return e?(e.nodeName||'').toLowerCase():null}function la(e){if(null==e)return window;if('[object Window]'!==e.toString()){var t=e.ownerDocument;return t?t.defaultView||window:window}return e}function da(e){var t=la(e).Element;return e instanceof t||e instanceof Element}function ca(e){var t=la(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function pa(e){if('undefined'==typeof ShadowRoot)return!1;var t=la(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ga(e){var t=e.state;al(t.elements).forEach(function(e){var a=t.styles[e]||{},r=t.attributes[e]||{},n=t.elements[e];ca(n)&&sa(n)&&(wo(n.style,a),al(r).forEach(function(e){var t=r[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?'':t)}))})}function ma(e){var t=e.state,a={popper:{position:t.options.strategy,left:'0',top:'0',margin:'0'},arrow:{position:'absolute'},reference:{}};return wo(t.elements.popper.style,a.popper),t.styles=a,t.elements.arrow&&wo(t.elements.arrow.style,a.arrow),function(){al(t.elements).forEach(function(e){var r=t.elements[e],n=t.attributes[e]||{},o=al(t.styles.hasOwnProperty(e)?t.styles[e]:a[e]),i=o.reduce(function(e,t){return e[t]='',e},{});ca(r)&&sa(r)&&(wo(r.style,i),al(n).forEach(function(e){r.removeAttribute(e)}))})}}function fa(e){return e.split('-')[0]}function ya(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function ha(e){var t=ya(e),a=e.offsetWidth,r=e.offsetHeight;return 1>=En(t.width-a)&&(a=t.width),1>=En(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:a,height:r}}function _a(e,t){var a=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(a&&pa(a)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function va(e){return la(e).getComputedStyle(e)}function Ea(e){return 0<=['table','td','th'].indexOf(sa(e))}function Ta(e){return((da(e)?e.ownerDocument:e.document)||window.document).documentElement}function ba(e){return'html'===sa(e)?e:e.assignedSlot||e.parentNode||(pa(e)?e.host:null)||Ta(e)}function Sa(e){return ca(e)&&'fixed'!==va(e).position?e.offsetParent:null}function ka(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf('firefox'),a=-1!==navigator.userAgent.indexOf('Trident');if(a&&ca(e)){var r=va(e);if('fixed'===r.position)return null}for(var n=ba(e);ca(n)&&0>['html','body'].indexOf(sa(n));){var o=va(n);if('none'!==o.transform||'none'!==o.perspective||'paint'===o.contain||-1!==['transform','perspective'].indexOf(o.willChange)||t&&'filter'===o.willChange||t&&o.filter&&'none'!==o.filter)return n;n=n.parentNode}return null}function Aa(e){for(var t=la(e),a=Sa(e);a&&Ea(a)&&'static'===va(a).position;)a=Sa(a);return a&&('html'===sa(a)||'body'===sa(a)&&'static'===va(a).position)?t:a||ka(e)||t}function Ra(e){return 0<=['top','bottom'].indexOf(e)?'x':'y'}function Ca(e,t,a){return Sh(e,kh(t,a))}function Da(){return{top:0,right:0,bottom:0,left:0}}function La(e){return wo({},Da(),e)}function Pa(e,t){return t.reduce(function(t,a){return t[a]=e,t},{})}function Ia(e){var t=e.state,a=e.name,r=e.options,n=t.elements.arrow,o=t.modifiersData.popperOffsets,i=fa(t.placement),s=Ra(i),l=0<=[th,eh].indexOf(i),d=l?'height':'width',c;if(n&&o){var p=Rh(r.padding,t),u=ha(n),g='y'===s?Zy:th,m='y'===s?Jy:eh,f=t.rects.reference[d]+t.rects.reference[s]-o[s]-t.rects.popper[d],y=o[s]-t.rects.reference[s],h=Aa(n),_=h?'y'===s?h.clientHeight||0:h.clientWidth||0:0,v=p[g],E=_-u[d]-p[m],T=_/2-u[d]/2+(f/2-y/2),b=Ca(v,T,E);t.modifiersData[a]=(c={},c[s]=b,c.centerOffset=b-T,c)}}function xa(e){var t=e.state,a=e.options,r=a.element,n=void 0===r?'[data-popper-arrow]':r;null==n||'string'==typeof n&&(n=t.elements.popper.querySelector(n),!n)||!_a(t.elements.popper,n)||(t.elements.arrow=n)}function Oa(e){var t=e.x,a=e.y,r=window,n=r.devicePixelRatio||1;return{x:Ah(Ah(t*n)/n)||0,y:Ah(Ah(a*n)/n)||0}}function Na(e){var t=e.popper,a=e.popperRect,r=e.placement,n=e.offsets,o=e.position,i=e.gpuAcceleration,s=e.adaptive,l=e.roundOffsets,d=!0===l?Oa(n):'function'==typeof l?l(n):n,c=d.x,p=void 0===c?0:c,u=d.y,g=void 0===u?0:u,m=n.hasOwnProperty('x'),f=n.hasOwnProperty('y'),y=th,h=Zy,_=window,v;if(s){var E=Aa(t),T='clientHeight',b='clientWidth';E===la(t)&&(E=Ta(t),'static'!==va(E).position&&(T='scrollHeight',b='scrollWidth')),E=E,r===Zy&&(h=Jy,g-=E[T]-a.height,g*=i?1:-1),r===th&&(y=eh,p-=E[b]-a.width,p*=i?1:-1)}var S=wo({position:o},s&&Dh);if(i){var k;return wo({},S,(k={},k[h]=f?'0':'',k[y]=m?'0':'',k.transform=2>(_.devicePixelRatio||1)?'translate('+p+'px, '+g+'px)':'translate3d('+p+'px, '+g+'px, 0)',k))}return wo({},S,(v={},v[h]=f?g+'px':'',v[y]=m?p+'px':'',v.transform='',v))}function wa(e){var t=e.state,a=e.options,r=a.gpuAcceleration,n=a.adaptive,o=a.roundOffsets,i=!(void 0!==o)||o,s={placement:fa(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:!(void 0!==r)||r};null!=t.modifiersData.popperOffsets&&(t.styles.popper=wo({},t.styles.popper,Na(wo({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:!(void 0!==n)||n,roundOffsets:i})))),null!=t.modifiersData.arrow&&(t.styles.arrow=wo({},t.styles.arrow,Na(wo({},s,{offsets:t.modifiersData.arrow,position:'absolute',adaptive:!1,roundOffsets:i})))),t.attributes.popper=wo({},t.attributes.popper,{"data-popper-placement":t.placement})}function Fa(e){var t=e.state,a=e.instance,r=e.options,n=r.scroll,o=void 0===n||n,i=r.resize,s=void 0===i||i,l=la(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(e){e.addEventListener('scroll',a.update,Ph)}),s&&l.addEventListener('resize',a.update,Ph),function(){o&&d.forEach(function(e){e.removeEventListener('scroll',a.update,Ph)}),s&&l.removeEventListener('resize',a.update,Ph)}}function Ma(e){return e.replace(/left|right|bottom|top/g,function(e){return xh[e]})}function Ua(e){return e.replace(/start|end/g,function(e){return Oh[e]})}function Ba(e){var t=la(e),a=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:a,scrollTop:r}}function Ga(e){return ya(Ta(e)).left+Ba(e).scrollLeft}function ja(e){var t=la(e),a=Ta(e),r=t.visualViewport,n=a.clientWidth,o=a.clientHeight,i=0,s=0;return r&&(n=r.width,o=r.height,!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&(i=r.offsetLeft,s=r.offsetTop)),{width:n,height:o,x:i+Ga(e),y:s}}function Va(e){var t=Ta(e),a=Ba(e),r=null==(l=e.ownerDocument)?void 0:l.body,n=Sh(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Sh(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),i=-a.scrollLeft+Ga(e),s=-a.scrollTop,l;return'rtl'===va(r||t).direction&&(i+=Sh(t.clientWidth,r?r.clientWidth:0)-n),{width:n,height:o,x:i,y:s}}function Ka(e){var t=va(e),a=t.overflow,r=t.overflowX,n=t.overflowY;return /auto|scroll|overlay|hidden/.test(a+n+r)}function Ha(e){return 0<=['html','body','#document'].indexOf(sa(e))?e.ownerDocument.body:ca(e)&&Ka(e)?e:Ha(ba(e))}function Wa(e,t){var a;void 0===t&&(t=[]);var r=Ha(e),n=r===(null==(a=e.ownerDocument)?void 0:a.body),o=la(r),i=n?[o].concat(o.visualViewport||[],Ka(r)?r:[]):r,s=t.concat(i);return n?s:s.concat(Wa(ba(i)))}function Ya(e){return wo({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function qa(e){var t=ya(e);return t.top+=e.clientTop,t.left+=e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function za(e,t){return t===sh?Ya(ja(e)):ca(t)?qa(t):Ya(Va(Ta(e)))}function Xa(e){var t=Wa(ba(e)),a=0<=['absolute','fixed'].indexOf(va(e).position),r=a&&ca(e)?Aa(e):e;return da(r)?t.filter(function(e){return da(e)&&_a(e,r)&&'body'!==sa(e)}):[]}function $a(e,t,a){var r='clippingParents'===t?Xa(e):[].concat(t),n=[].concat(r,[a]),o=n[0],i=n.reduce(function(t,a){var r=za(e,a);return t.top=Sh(r.top,t.top),t.right=kh(r.right,t.right),t.bottom=kh(r.bottom,t.bottom),t.left=Sh(r.left,t.left),t},za(e,o));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function Qa(e){return e.split('-')[1]}function Za(e){var t=e.reference,a=e.element,r=e.placement,n=r?fa(r):null,o=r?Qa(r):null,i=t.x+t.width/2-a.width/2,s=t.y+t.height/2-a.height/2,l;l=n===Zy?{x:i,y:t.y-a.height}:n===Jy?{x:i,y:t.y+t.height}:n===eh?{x:t.x+t.width,y:s}:n===th?{x:t.x-a.width,y:s}:{x:t.x,y:t.y};var d=n?Ra(n):null;if(null!=d){var c='y'===d?'height':'width';switch(o){case nh:l[d]-=t[c]/2-a[c]/2;break;case oh:l[d]+=t[c]/2-a[c]/2;break;default:}}return l}function Ja(e,t){void 0===t&&(t={});var a=t,r=a.placement,n=void 0===r?e.placement:r,o=a.boundary,i=void 0===o?ih:o,s=a.rootBoundary,l=void 0===s?sh:s,d=a.elementContext,c=void 0===d?lh:d,p=a.altBoundary,u=a.padding,g=void 0===u?0:u,m=La('number'==typeof g?Pa(g,rh):g),f=c===lh?dh:lh,y=e.elements.reference,h=e.rects.popper,_=e.elements[void 0!==p&&p?f:c],v=$a(da(_)?_:_.contextElement||Ta(e.elements.popper),i,l),E=ya(y),T=Za({reference:E,element:h,strategy:'absolute',placement:n}),b=Ya(wo({},h,T)),S=c===lh?b:E,k={top:v.top-S.top+m.top,bottom:S.bottom-v.bottom+m.bottom,left:v.left-S.left+m.left,right:S.right-v.right+m.right},A=e.modifiersData.offset;if(c===lh&&A){var R=A[n];al(k).forEach(function(e){var t=0<=[eh,Jy].indexOf(e)?1:-1,a=0<=[Zy,Jy].indexOf(e)?'y':'x';k[e]+=R[a]*t})}return k}function er(e,t){void 0===t&&(t={});var a=t,r=a.placement,n=a.boundary,o=a.rootBoundary,i=a.padding,s=a.flipVariations,l=a.allowedAutoPlacements,d=void 0===l?ph:l,c=Qa(r),p=c?s?ch:ch.filter(function(e){return Qa(e)===c}):rh,u=p.filter(function(e){return 0<=d.indexOf(e)});0===u.length&&(u=p);var g=u.reduce(function(t,a){return t[a]=Ja(e,{placement:a,boundary:n,rootBoundary:o,padding:i})[fa(a)],t},{});return al(g).sort(function(e,t){return g[e]-g[t]})}function tr(e){if(fa(e)===ah)return[];var t=Ma(e);return[Ua(e),t,Ua(t)]}function ar(e){var t=e.state,a=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var n=a.mainAxis,o=a.altAxis,s=a.fallbackPlacements,l=a.padding,d=a.boundary,c=a.rootBoundary,p=a.altBoundary,u=a.flipVariations,g=void 0===u||u,m=a.allowedAutoPlacements,f=t.options.placement,y=fa(f),h=s||(y===f||!g?[Ma(f)]:tr(f)),_=[f].concat(h).reduce(function(e,a){return e.concat(fa(a)===ah?er(t,{placement:a,boundary:d,rootBoundary:c,padding:l,flipVariations:g,allowedAutoPlacements:m}):a)},[]),v=t.rects.reference,E=t.rects.popper,T=new Gu,b=!0,S=_[0],k=0;k<_.length;k++){var i=_[k],A=fa(i),R=Qa(i)===nh,C=0<=[Zy,Jy].indexOf(A),D=C?'width':'height',L=Ja(t,{placement:i,boundary:d,rootBoundary:c,altBoundary:p,padding:l}),P=C?R?eh:th:R?Jy:Zy;v[D]>E[D]&&(P=Ma(P));var I=Ma(P),x=[];if((void 0===n||n)&&x.push(0>=L[A]),(void 0===o||o)&&x.push(0>=L[P],0>=L[I]),x.every(function(e){return e})){S=i,b=!1;break}T.set(i,x)}if(b)for(var O=g?3:1,N=function(e){var t=_.find(function(t){var a=T.get(t);if(a)return a.slice(0,e).every(function(e){return e})});if(t)return S=t,'break'},w=O,F;0<w&&(F=N(w),'break'!==F);w--);t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}}function rr(e,t,a){return void 0===a&&(a={x:0,y:0}),{top:e.top-t.height-a.y,right:e.right-t.width+a.x,bottom:e.bottom-t.height+a.y,left:e.left-t.width-a.x}}function nr(e){return[Zy,eh,Jy,th].some(function(t){return 0<=e[t]})}function or(e){var t=e.state,a=e.name,r=t.rects.reference,n=t.rects.popper,o=t.modifiersData.preventOverflow,i=Ja(t,{elementContext:'reference'}),s=Ja(t,{altBoundary:!0}),l=rr(i,r),d=rr(s,n,o),c=nr(l),p=nr(d);t.modifiersData[a]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:p},t.attributes.popper=wo({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":p})}function ir(e,t,a){var r=fa(e),n=0<=[th,Zy].indexOf(r)?-1:1,o='function'==typeof a?a(wo({},t,{placement:e})):a,i=o[0],s=o[1];return i=i||0,s=(s||0)*n,0<=[th,eh].indexOf(r)?{x:s,y:i}:{x:i,y:s}}function sr(e){var t=e.state,a=e.options,r=e.name,n=a.offset,o=void 0===n?[0,0]:n,i=ph.reduce(function(e,a){return e[a]=ir(a,t.rects,o),e},{}),s=i[t.placement],l=s.x,d=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=i}function lr(e){var t=e.state,a=e.name;t.modifiersData[a]=Za({reference:t.rects.reference,element:t.rects.popper,strategy:'absolute',placement:t.placement})}function dr(e){return'x'===e?'y':'x'}function pr(e){var t=e.state,a=e.options,r=e.name,n=a.mainAxis,o=!(void 0!==n)||n,i=a.altAxis,s=void 0!==i&&i,l=a.boundary,d=a.rootBoundary,c=a.altBoundary,p=a.padding,u=a.tether,g=!(void 0!==u)||u,m=a.tetherOffset,f=void 0===m?0:m,y=Ja(t,{boundary:l,rootBoundary:d,padding:p,altBoundary:c}),h=fa(t.placement),_=Qa(t.placement),v=!_,E=Ra(h),T=dr(E),b=t.modifiersData.popperOffsets,S=t.rects.reference,k=t.rects.popper,A='function'==typeof f?f(wo({},t.rects,{placement:t.placement})):f,R={x:0,y:0};if(b){if(o||s){var C='y'===E?Zy:th,D='y'===E?Jy:eh,L='y'===E?'height':'width',P=b[E],I=b[E]+y[C],x=b[E]-y[D],O=g?-k[L]/2:0,N=_===nh?S[L]:k[L],w=_===nh?-k[L]:-S[L],F=t.elements.arrow,M=g&&F?ha(F):{width:0,height:0},U=t.modifiersData['arrow#persistent']?t.modifiersData['arrow#persistent'].padding:Da(),B=U[C],G=U[D],j=Ca(0,S[L],M[L]),V=v?S[L]/2-O-j-B-A:N-j-B-A,K=v?-S[L]/2+O+j+G+A:w+j+G+A,H=t.elements.arrow&&Aa(t.elements.arrow),W=H?'y'===E?H.clientTop||0:H.clientLeft||0:0,Y=t.modifiersData.offset?t.modifiersData.offset[t.placement][E]:0,q=b[E]+V-Y-W,z=b[E]+K-Y;if(o){var X=Ca(g?kh(I,q):I,P,g?Sh(x,z):x);b[E]=X,R[E]=X-P}if(s){var $='x'===E?Zy:th,Q='x'===E?Jy:eh,Z=b[T],J=Z+y[$],ee=Z-y[Q],te=Ca(g?kh(J,q):J,Z,g?Sh(ee,z):ee);b[T]=te,R[T]=te-Z}}t.modifiersData[r]=R}}function ur(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function gr(e){return e!==la(e)&&ca(e)?ur(e):Ba(e)}function mr(e,t,a){void 0===a&&(a=!1);var r=Ta(t),n=ya(e),o=ca(t),i={scrollLeft:0,scrollTop:0},s={x:0,y:0};return!o&&(o||a)||(('body'!==sa(t)||Ka(r))&&(i=gr(t)),ca(t)?(s=ya(t),s.x+=t.clientLeft,s.y+=t.clientTop):r&&(s.x=Ga(r))),{x:n.left+i.scrollLeft-s.x,y:n.top+i.scrollTop-s.y,width:n.width,height:n.height}}function fr(e){function t(e){r.add(e.name);var o=[].concat(e.requires||[],e.requiresIfExists||[]);o.forEach(function(e){if(!r.has(e)){var n=a.get(e);n&&t(n)}}),n.push(e)}var a=new Gu,r=new Qy,n=[];return e.forEach(function(e){a.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||t(e)}),n}function yr(e){var t=fr(e);return Th.reduce(function(e,a){return e.concat(t.filter(function(e){return e.phase===a}))},[])}function hr(e){var t;return function(){return t||(t=new lp(function(a){lp.resolve().then(function(){t=void 0,a(e())})})),t}}function _r(e){var t=e.reduce(function(e,t){var a=e[t.name];return e[t.name]=a?wo({},a,t,{options:wo({},a.options,t.options),data:wo({},a.data,t.data)}):t,e},{});return al(t).map(function(e){return t[e]})}function vr(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return!t.some(function(e){return!(e&&'function'==typeof e.getBoundingClientRect)})}function Er(e){void 0===e&&(e={});var t=e,a=t.defaultModifiers,r=void 0===a?[]:a,n=t.defaultOptions,o=void 0===n?Bh:n;return function(e,t,a){function n(){s.orderedModifiers.forEach(function(e){var t=e.name,a=e.options,r=void 0===a?{}:a,n=e.effect;if('function'==typeof n){var o=n({state:s,name:t,instance:c,options:r}),i=function(){};l.push(o||i)}})}function i(){l.forEach(function(e){return e()}),l=[]}void 0===a&&(a=o);var s={placement:'bottom',orderedModifiers:[],options:wo({},Bh,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],d=!1,c={state:s,setOptions:function(a){i(),s.options=wo({},o,s.options,a),s.scrollParents={reference:da(e)?Wa(e):e.contextElement?Wa(e.contextElement):[],popper:Wa(t)};var l=yr(_r([].concat(r,s.options.modifiers)));return s.orderedModifiers=l.filter(function(e){return e.enabled}),n(),c.update()},forceUpdate:function(){if(!d){var e=s.elements,t=e.reference,a=e.popper;if(vr(t,a)){s.rects={reference:mr(t,Aa(a),'fixed'===s.options.strategy),popper:ha(a)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=wo({},e.data)});for(var r=0;r<s.orderedModifiers.length;r++){if(!0===s.reset){s.reset=!1,r=-1;continue}var n=s.orderedModifiers[r],o=n.fn,i=n.options,l=void 0===i?{}:i,p=n.name;'function'==typeof o&&(s=o({state:s,options:l,name:p,instance:c})||s)}}}},update:hr(function(){return new lp(function(e){c.forceUpdate(),e(s)})}),destroy:function(){i(),d=!0}};return vr(e,t)?(c.setOptions(a).then(function(e){!d&&a.onFirstUpdate&&a.onFirstUpdate(e)}),c):c}}function Tr(e,t,a){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(a)?a[t]:a:r}return e}function br(e,t){var a={}.toString.call(e);return 0===a.indexOf('[object')&&-1<a.indexOf(t+']')}function Sr(e,t){return'function'==typeof e?e.apply(void 0,t):e}function kr(e,t){if(0===t)return e;var a;return function(r){clearTimeout(a),a=setTimeout(function(){e(r)},t)}}function Ar(e){return e.split(/\s+/).filter(Boolean)}function Rr(e){return[].concat(e)}function Cr(e,t){-1===e.indexOf(t)&&e.push(t)}function Dr(e){return e.filter(function(t,a){return e.indexOf(t)===a})}function Lr(e){return e.split('-')[0]}function Pr(e){return[].slice.call(e)}function Ir(e){return al(e).reduce(function(t,a){return void 0!==e[a]&&(t[a]=e[a]),t},{})}function xr(){return document.createElement('div')}function Or(e){return['Element','Fragment'].some(function(t){return br(e,t)})}function Nr(e){return br(e,'NodeList')}function wr(e){return br(e,'MouseEvent')}function Fr(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Mr(e){return Or(e)?[e]:Nr(e)?Pr(e):Array.isArray(e)?e:Pr(document.querySelectorAll(e))}function Ur(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+'ms')})}function Br(e,t){e.forEach(function(e){e&&e.setAttribute('data-state',t)})}function Gr(e){var t=Rr(e),a=t[0],r;return(null==a||null==(r=a.ownerDocument)?void 0:r.body)?a.ownerDocument:document}function jr(e,t){var a=t.clientX,r=t.clientY;return e.every(function(e){var t=e.popperRect,n=e.popperState,o=e.props,i=o.interactiveBorder,s=Lr(n.placement),l=n.modifiersData.offset;if(!l)return!0;var d='bottom'===s?l.top.y:0,c='top'===s?l.bottom.y:0,p='right'===s?l.left.x:0,u='left'===s?l.right.x:0,g=t.top-r+d>i,m=r-t.bottom-c>i,f=t.left-a+p>i,y=a-t.right-u>i;return g||m||f||y})}function Vr(e,t,a){['transitionend','webkitTransitionEnd'].forEach(function(r){e[t+'EventListener'](r,a)})}function Kr(){Qh.isTouch||(Qh.isTouch=!0,window.performance&&document.addEventListener('mousemove',Hr))}function Hr(){var e=performance.now();20>e-Zh&&(Qh.isTouch=!1,document.removeEventListener('mousemove',Hr)),Zh=e}function Wr(){var e=document.activeElement;if(Fr(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Yr(){document.addEventListener('touchstart',Kr,$h),window.addEventListener('blur',Wr)}function qr(e){var t=e.plugins||[],a=t.reduce(function(t,a){var r=a.name,n=a.defaultValue;return r&&(t[r]=void 0===e[r]?n:e[r]),t},{});return wo({},e,{},a)}function zr(e,t){var a=t?al(qr(wo({},r_,{plugins:t}))):n_,r=a.reduce(function(t,a){var r=(e.getAttribute('data-tippy-'+a)||'').trim();if(!r)return t;if('content'===a)t[a]=r;else try{t[a]=JSON.parse(r)}catch(n){t[a]=r}return t},{});return r}function Xr(e,t){var a=wo({},t,{content:Sr(t.content,[e])},t.ignoreAttributes?{}:zr(e,t.plugins));return a.aria=wo({},r_.aria,{},a.aria),a.aria={expanded:'auto'===a.aria.expanded?t.interactive:a.aria.expanded,content:'auto'===a.aria.content?t.interactive?null:'describedby':a.aria.content},a}function $r(e,t){e[i_()]=t}function Qr(e){var t=xr();return!0===e?t.className=zh:(t.className=Xh,Or(e)?t.appendChild(e):$r(t,e)),t}function Zr(e,t){Or(t.content)?($r(e,''),e.appendChild(t.content)):'function'!=typeof t.content&&(t.allowHTML?$r(e,t.content):e.textContent=t.content)}function Jr(e){var t=e.firstElementChild,a=Pr(t.children);return{box:t,content:a.find(function(e){return e.classList.contains(Yh)}),arrow:a.find(function(e){return e.classList.contains(zh)||e.classList.contains(Xh)}),backdrop:a.find(function(e){return e.classList.contains(qh)})}}function en(e){function t(t,r){var n=Jr(a),o=n.box,i=n.content,s=n.arrow;r.theme?o.setAttribute('data-theme',r.theme):o.removeAttribute('data-theme'),'string'==typeof r.animation?o.setAttribute('data-animation',r.animation):o.removeAttribute('data-animation'),r.inertia?o.setAttribute('data-inertia',''):o.removeAttribute('data-inertia'),o.style.maxWidth='number'==typeof r.maxWidth?r.maxWidth+'px':r.maxWidth,r.role?o.setAttribute('role',r.role):o.removeAttribute('role'),(t.content!==r.content||t.allowHTML!==r.allowHTML)&&Zr(i,e.props),r.arrow?s?t.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(Qr(r.arrow))):o.appendChild(Qr(r.arrow)):s&&o.removeChild(s)}var a=xr(),r=xr();r.className=Wh,r.setAttribute('data-state','hidden'),r.setAttribute('tabindex','-1');var n=xr();return n.className=Yh,n.setAttribute('data-state','hidden'),Zr(n,e.props),a.appendChild(r),r.appendChild(n),t(e.props,e.props),{popper:a,onUpdate:t}}function tn(e,t){function a(){var e=W.props.touch;return Array.isArray(e)?e:[e,0]}function r(){return'hold'===a()[0]}function n(){var e;return null!=(e=W.props.render)&&e.$$tippy}function o(){return Z||e}function i(){var e=o().parentNode;return e?Gr(e):document}function s(){return Jr(ee)}function l(e){return W.state.isMounted&&!W.state.isVisible||Qh.isTouch||X&&'focus'===X.type?0:Tr(W.props.delay,e?0:1,r_.delay)}function d(){ee.style.pointerEvents=W.props.interactive&&W.state.isVisible?'':'none',ee.style.zIndex=''+W.props.zIndex}function c(e,t,a){if(void 0===a&&(a=!0),ae.forEach(function(a){a[e]&&a[e].apply(void 0,t)}),a){var r;(r=W.props)[e].apply(r,t)}}function p(){var t=W.props.aria;if(t.content){var a='aria-'+t.content,r=ee.id,n=Rr(W.props.triggerTarget||e);n.forEach(function(e){var t=e.getAttribute(a);if(W.state.isVisible)e.setAttribute(a,t?t+' '+r:r);else{var n=t&&t.replace(r,'').trim();n?e.setAttribute(a,n):e.removeAttribute(a)}})}}function u(){if(!re&&W.props.aria.expanded){var t=Rr(W.props.triggerTarget||e);t.forEach(function(e){W.props.interactive?e.setAttribute('aria-expanded',W.state.isVisible&&e===o()?'true':'false'):e.removeAttribute('aria-expanded')})}}function g(){i().removeEventListener('mousemove',V),l_=l_.filter(function(e){return e!==V})}function m(e){if(!(Qh.isTouch&&(B||'mousedown'===e.type))&&!(W.props.interactive&&ee.contains(e.target))){if(o().contains(e.target)){if(Qh.isTouch)return;if(W.state.isVisible&&0<=W.props.trigger.indexOf('click'))return}else c('onClickOutside',[W,e]);!0===W.props.hideOnClick&&(W.clearDelayTimeouts(),W.hide(),U=!0,setTimeout(function(){U=!1}),!W.state.isMounted&&_())}}function f(){B=!0}function y(){B=!1}function h(){var e=i();e.addEventListener('mousedown',m,!0),e.addEventListener('touchend',m,$h),e.addEventListener('touchstart',y,$h),e.addEventListener('touchmove',f,$h)}function _(){var e=i();e.removeEventListener('mousedown',m,!0),e.removeEventListener('touchend',m,$h),e.removeEventListener('touchstart',y,$h),e.removeEventListener('touchmove',f,$h)}function v(e,t){T(e,function(){!W.state.isVisible&&ee.parentNode&&ee.parentNode.contains(ee)&&t()})}function E(e,t){T(e,t)}function T(e,t){function a(e){e.target===r&&(Vr(r,'remove',a),t())}var r=s().box;return 0===e?t():void(Vr(r,'remove',$),Vr(r,'add',a),$=a)}function b(t,a,r){void 0===r&&(r=!1);var n=Rr(W.props.triggerTarget||e);n.forEach(function(e){e.addEventListener(t,a,r),j.push({node:e,eventType:t,handler:a,options:r})})}function S(){r()&&(b('touchstart',A,{passive:!0}),b('touchend',C,{passive:!0})),Ar(W.props.trigger).forEach(function(e){'manual'!==e&&(b(e,A),'mouseenter'===e?b('mouseleave',C):'focus'===e?b(ua?'focusout':'blur',D):'focusin'===e?b('focusout',D):void 0)})}function k(){j.forEach(function(e){var t=e.node,a=e.eventType,r=e.handler,n=e.options;t.removeEventListener(a,r,n)}),j=[]}function A(e){var t=!1,a;if(!(!W.state.isEnabled||L(e)||U)){var r='focus'===(null==(a=X)?void 0:a.type);X=e,Z=e.currentTarget,u(),!W.state.isVisible&&wr(e)&&l_.forEach(function(t){return t(e)}),'click'===e.type&&(0>W.props.trigger.indexOf('mouseenter')||M)&&!1!==W.props.hideOnClick&&W.state.isVisible?t=!0:N(e),'click'===e.type&&(M=!t),t&&!r&&w(e)}}function R(e){var t=e.target,a=o().contains(t)||ee.contains(t);if(!('mousemove'===e.type&&a)){var r=O().concat(ee).map(function(e){var t=e._tippy,a=null==(r=t.popperInstance)?void 0:r.state,r;return a?{popperRect:e.getBoundingClientRect(),popperState:a,props:F}:null}).filter(Boolean);jr(r,e)&&(g(),w(e))}}function C(e){var t=L(e)||0<=W.props.trigger.indexOf('click')&&M;return t?void 0:W.props.interactive?void W.hideWithInteractivity(e):void w(e)}function D(e){0>W.props.trigger.indexOf('focusin')&&e.target!==o()||W.props.interactive&&e.relatedTarget&&ee.contains(e.relatedTarget)||w(e)}function L(e){return!!Qh.isTouch&&r()!==0<=e.type.indexOf('touch')}function P(){I();var t=W.props,a=t.popperOptions,r=t.placement,i=t.offset,l=t.getReferenceClientRect,d=t.moveTransition,c=n()?Jr(ee).arrow:null,p=l?{getBoundingClientRect:l,contextElement:l.contextElement||o()}:e,u=[{name:'offset',options:{offset:i}},{name:'preventOverflow',options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:'flip',options:{padding:5}},{name:'computeStyles',options:{adaptive:!d}},{name:'$$tippy',enabled:!0,phase:'beforeWrite',requires:['computeStyles'],fn:function(e){var t=e.state;if(n()){var a=s(),r=a.box;['placement','reference-hidden','escaped'].forEach(function(e){'placement'===e?r.setAttribute('data-placement',t.placement):t.attributes.popper['data-popper-'+e]?r.setAttribute('data-'+e,''):r.removeA