web-backset.cn/apps/web/public/player/tcplayer.v4.7.2.min.js

18 lines
507 KiB
JavaScript
Raw Normal View History

2023-02-27 15:41:19 +08:00
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.TCPlayer=e()}(this,function(){function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t["default"]:t}function createCommonjsModule(t,e){return e={exports:{}},t(e,e.exports),e.exports}function each(t,e){keys(t).forEach(function(n){return e(t[n],n)})}function reduce(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;return keys(t).reduce(function(n,i){return e(n,t[i],i)},n)}function assign(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return Object.assign?Object.assign.apply(Object,[t].concat(n)):(n.forEach(function(e){e&&each(e,function(e,n){t[n]=e})}),t)}function isObject$1(t){return!!t&&"object"===(void 0===t?"undefined":_typeof(t))}function isPlain(t){return isObject$1(t)&&"[object Object]"===toString.call(t)&&t.constructor===Object}function isFunction(t){return"function"==typeof t&&"number"!=typeof t.nodeType}function clean(t){return t.replace(/\n\r?\s*/g,"")}function computedStyle(t,e){if(!t||!e)return"";if("function"==typeof window_1.getComputedStyle){var n=window_1.getComputedStyle(t);return n?n[e]:""}return t.currentStyle[e]||""}function isNonBlankString(t){return"string"==typeof t&&/\S/.test(t)}function throwIfWhitespace(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function classRegExp(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function isReal(){return document_1===window_1.document&&"undefined"!=typeof document_1.createElement}function isEl(t){return isObject$1(t)&&1===t.nodeType}function isInFrame(){try{return window_1.parent!==window_1.self}catch(t){return!0}}function createQuerier(t){return function(e,n){if(!isNonBlankString(e))return document_1[t](null);isNonBlankString(n)&&(n=document_1.querySelector(n));var i=isEl(n)?n:document_1;return i[t]&&i[t](e)}}function createEl(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"div",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},i=arguments[3],r=document_1.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(log$2.warn(tsml(_templateObject,t,n)),r.setAttribute(t,n)):"textContent"===t?textContent(r,n):r[t]=n}),Object.getOwnPropertyNames(n).forEach(function(t){r.setAttribute(t,n[t])}),i&&appendContent(r,i),r}function textContent(t,e){return"undefined"==typeof t.textContent?t.innerText=e:t.textContent=e,t}function prependTo(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function hasClass(t,e){return throwIfWhitespace(e),t.classList?t.classList.contains(e):classRegExp(e).test(t.className)}function addClass(t,e){return t.classList?t.classList.add(e):hasClass(t,e)||(t.className=(t.className+" "+e).trim()),t}function removeClass(t,e){return t.classList?t.classList.remove(e):(throwIfWhitespace(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function toggleClass(t,e,n){var i=hasClass(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!i),n!==i)return n?addClass(t,e):removeClass(t,e),t}function setAttributes(t,e){Object.getOwnPropertyNames(e).forEach(function(n){var i=e[n];null===i||void 0===i||!1===i?t.removeAttribute(n):t.setAttribute(n,!0===i?"":i)})}function getAttributes(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,i=n.length-1;i>=0;i--){var r=n[i].name,o=n[i].value;"boolean"!=typeof t[r]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+r+",")||(o=null!==o),e[r]=o}return e}function getAttribute(t,e){return t.getAttribute(e)}function setAttribute(t,e,n){t.setAttribute(e,n)}function removeAttribute(t,e){t.removeAttribute(e)}function blockTextSelection(){document_1.body.focus(),document_1.onselectstart=function(){return!1}}function unblockTextSelection(){document_1.onselectstart=function(){return!0
;if(i.player||Player.players[i.playerId])return i.player||Player.players[i.playerId];isEl(i)&&!document_1.body.contains(i)&&log$2.warn("The element supplied is not included in the DOM"),e=e||{},videojs.hooks("beforesetup").forEach(function(t){var n=t(i,mergeOptions(e));if(!isObject$1(n)||Array.isArray(n))return void log$2.error("please return an object in beforesetup hooks");e=mergeOptions(e,n)});var o=Component.getComponent("Player"),s=new o(i,e,n);return videojs.hooks("setup").forEach(function(t){return t(s)}),s}function toObject(t){if(null===t||t===undefined)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function shouldUseNative(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(r){return!1}}function decodeComponents(t,e){try{return decodeURIComponent(t.join(""))}catch(r){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),i=t.slice(e);return Array.prototype.concat.call([],decodeComponents(n),decodeComponents(i))}function decode(t){try{return decodeURIComponent(t)}catch(i){for(var e=t.match(singleMatcher),n=1;n<e.length;n++)t=decodeComponents(e,n).join(""),e=t.match(singleMatcher);return t}}function customDecodeURIComponent(t){for(var e={"%FE%FF":"<22><>","%FF%FE":"<22><>"},n=multiMatcher.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(a){var i=decode(n[0]);i!==n[0]&&(e[n[0]]=i)}n=multiMatcher.exec(t)}e["%C2"]="<22>";for(var r=Object.keys(e),o=0;o<r.length;o++){var s=r[o];t=t.replace(new RegExp(s,"g"),e[s])}return t}function encoderForArrayFormat(t){switch(t.arrayFormat){case"index":return function(e,n,i){return null===n?[encode(e,t),"[",i,"]"].join(""):[encode(e,t),"[",encode(i,t),"]=",encode(n,t)].join("")};case"bracket":return function(e,n){return null===n?encode(e,t):[encode(e,t),"[]=",encode(n,t)].join("")};default:return function(e,n){return null===n?encode(e,t):[encode(e,t),"=",encode(n,t)].join("")}}}function parserForArrayFormat(t){var e;switch(t.arrayFormat){case"index":return function(t,n,i){if(e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),!e)return void(i[t]=n);i[t]===undefined&&(i[t]={}),i[t][e[1]]=n};case"bracket":return function(t,n,i){return e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?i[t]===undefined?void(i[t]=[n]):void(i[t]=[].concat(i[t],n)):void(i[t]=n)};default:return function(t,e,n){if(n[t]===undefined)return void(n[t]=e);n[t]=[].concat(n[t],e)}}}function encode(t,e){return e.encode?e.strict?strictUriEncode(t):encodeURIComponent(t):t}function keysSorter(t){return Array.isArray(t)?t.sort():"object"==typeof t?keysSorter(Object.keys(t)).sort(function(t,e){return Number(t)-Number(e)}).map(function(e){return t[e]}):t}function extract(t){var e=t.indexOf("?");return-1===e?"":t.slice(e+1)}function parse(t,e){e=objectAssign({arrayFormat:"none"},e);var n=parserForArrayFormat(e),i=Object.create(null);return"string"!=typeof t?i:(t=t.trim().replace(/^[?#&]/,""))?(t.split("&").forEach(function(t){var e=t.replace(/\+/g," ").split("="),r=e.shift(),o=e.length>0?e.join("="):undefined;o=o===undefined?null:decodeUriComponent(o),n(decodeUriComponent(r),o,i)}),Object.keys(i).sort().reduce(function(t,e){var n=i[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=keysSorter(n):t[e]=n,t},Object.create(null))):i}function jsonp(t,e,n){function i(){u.parentNode&&u.parentNode.removeChild(u),window[a]="",c&&clearTimeout(c)}function r(){window[a]&&i()}"function"==typeof e&&(n=e,e={}),e||(e={});var o,s=e.prefix||"__jp",a=e.name||s+count++,l=e.funcKey||"callback";o="object"==_typeof(e.param)?queryString.stringify(e.param):e.param;var u,c,h=null!=e.timeout?e.timeout:6e3,p=encodeURIComponent,d=document.getElementsByTagName("script")[0]||document.head;return h&&(c=setTimeout(function(){i(),n&&n(n
var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this.children_.length,r=void 0,o=void 0;if("string"==typeof e){o=toTitleCase(e);var s=n.componentClass||o;n.name=o;var a=t.getComponent(s);if(!a)throw new Error("Component "+s+" does not exist");if("function"!=typeof a)return null;r=new a(this.player_||this,n)}else r=e;if(this.children_.splice(i,0,r),"function"==typeof r.id&&(this.childIndex_[r.id()]=r),o=o||r.name&&toTitleCase(r.name()),o&&(this.childNameIndex_[o]=r),"function"==typeof r.el&&r.el()){var l=this.contentEl().children,u=l[i]||null;this.contentEl().insertBefore(r.el(),u)}return r},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var i=t.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,n=this.options_.children;if(n){var i=this.options_,r=function(t){var n=t.name,r=t.opts;if(i[n]!==undefined&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=e.options_.playerOptions;var o=e.addChild(n,r);o&&(e[n]=o)}},o=void 0,s=t.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter(function(t){return!o.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(t){var i=void 0,r=void 0;return"string"==typeof t?(i=t,r=n[i]||e.options_[i]||{}):(i=t.name,r=t),{name:i,opts:r}}).filter(function(e){var n=t.getComponent(e.opts.componentClass||toTitleCase(e.name));return n&&!s.isTech(n)}).forEach(r)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&arguments[1]!==undefined&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},t.prototype.$=function(t,e){return $(t,e||this.contentEl())},t.prototype.$$=function(t,e){return $$(t,e||this.contentEl())},t.prototype.hasClass=function(t){return hasClass(this.el_,t)},t.prototype.addClass=function(t){addClass(this.el_,t)},t.prototype.removeClass=function(t){removeClass(this.el_,t)},t.prototype.toggleClass=function(t,e){toggleClass(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return getAttribute(this.el_,t)},t.prototype.setAttribute=function(t,e){setAttribute(this.el_,t,e)},t.prototype.removeAttribute=function(t){removeAttribute(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,n){if(e!==undefined)return null!==e&&e===e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var i=this.el_.style[t],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+toTitleCase(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof window_1.getComputedStyle){var n=window_1.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(0===(e=parseFloat(e))){var i="offset"+toTitleCase(t);e=this.el_[i]}return e},t.prototype.currentDimensions=function(){return{width:this.curren
},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Settings.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var i=0;i<n.length;++i)if(e===n[i]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var ESCAPE={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"","&rlm;":"","&nbsp;":" "},TAG_NAME={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},TAG_ANNOTATION={v:"title",lang:"lang"},NEEDS_PARENT={rt:"ruby"},strongRTLRanges=[[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]];StyleBox.prototype.applyStyles=function(t,e){e=e||this.div;for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},StyleBox.prototype.formatStyle=function(t,e){return 0===t?0:t+e},CueStyleBox.prototype=_objCreate(StyleBox.prototype),CueStyleBox.prototype.constructor=CueStyleBox,BoxPosition.prototype.move=function(t,e){switch(e=e!==undefined?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},BoxPosition.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},BoxPosition.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},BoxPosition.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},BoxPosition.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},BoxPosition.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},BoxPosition.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},BoxPosition.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,i=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t,{left:t.left,right:t.right,top:
this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(Button);PlayToggle.prototype.controlText_="Play",Component.registerComponent("PlayToggle",PlayToggle);var TimeDisplay=function(t){function e(n,i){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n,i));return r.throttledUpdateContent=throttle(bind(r,r.updateContent),25),r.on(n,"timeupdate",r.throttledUpdateContent),r}return inherits(e,t),e.prototype.createEl=function(e){var n=this.buildCSSClass(),i=t.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control"});return this.contentEl_=createEl("div",{className:n+"-display"},{"aria-live":"off"},createEl("span",{className:"vjs-control-text",textContent:this.localize(this.controlText_)})),this.updateTextNode_(),i.appendChild(this.contentEl_),i},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=document_1.createTextNode(this.formattedTime_||"0:00"),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return formatTime(t)},e.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(Component);TimeDisplay.prototype.controlText_="Time",Component.registerComponent("TimeDisplay",TimeDisplay);var CurrentTimeDisplay=function(t){function e(n,i){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n,i));return r.on(n,"ended",r.handleEnded),r}return inherits(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(TimeDisplay);CurrentTimeDisplay.prototype.controlText_="Current Time",Component.registerComponent("CurrentTimeDisplay",CurrentTimeDisplay);var DurationDisplay=function(t){function e(n,i){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n,i));return r.on(n,"durationchange",r.updateContent),r.on(n,"loadedmetadata",r.throttledUpdateContent),r}return inherits(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(TimeDisplay);DurationDisplay.prototype.controlText_="Duration Time",Component.registerComponent("DurationDisplay",DurationDisplay);var TimeDivider=function(t){function e(){return classCallCheck(this,e),possibleConstructorReturn(this,t.apply(this,arguments))}return inherits(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},e}(Component);Component.registerComponent("TimeDivider",TimeDivider);var RemainingTimeDisplay=function(t){function e(n,i){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n,i));return r.on(n,"durationchange",r.throttledUpdateContent),r.on(n,"ended",r.handleEnded),r}return inherits(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(e){return"-"+t.prototype.formatTime_.call(this,e)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.r
for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];s.handleTracksChange.apply(s,e)},l=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];s.handleSelectedLanguageChange.apply(s,e)};if(n.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),o.addEventListener("selectedlanguagechange",l),s.on("dispose",function(){n.off(["loadstart","texttrackchange"],a),o.removeEventListener("change",a),o.removeEventListener("selectedlanguagechange",l)}),o.onchange===undefined){var u=void 0;s.on(["tap","click"],function(){if("object"!==_typeof(window_1.Event))try{u=new window_1.Event("change")}catch(t){}u||(u=document_1.createEvent("Event"),u.initEvent("change",!0,!0)),o.dispatchEvent(u)})}return s.handleTracksChange(),s}return inherits(e,t),e.prototype.handleClick=function(e){var n=this.track.kind,i=this.track.kinds,r=this.player_.textTracks();if(i||(i=[n]),t.prototype.handleClick.call(this,e),r)for(var o=0;o<r.length;o++){var s=r[o];s===this.track&&i.indexOf(s.kind)>-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},e.prototype.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(MenuItem);Component.registerComponent("TextTrackMenuItem",TextTrackMenuItem);var OffTextTrackMenuItem=function(t){function e(n,i){return classCallCheck(this,e),i.track={player:n,kind:i.kind,kinds:i.kinds,"default":!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,possibleConstructorReturn(this,t.call(this,n,i))}return inherits(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,i=0,r=e.length;i<r;i++){var o=e[i];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}this.selected(n)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),n=!0,i=0,r=e.length;i<r;i++){var o=e[i];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(TextTrackMenuItem);Component.registerComponent("OffTextTrackMenuItem",OffTextTrackMenuItem);var TextTrackButton=function(t){function e(n){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return classCallCheck(this,e),i.tracks=n.textTracks(),possibleConstructorReturn(this,t.call(this,n,i))}return inherits(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:TextTrackMenuItem,n=void 0;this.label_&&(n=this.label_+" off"),t.push(new OffTextTrackMenuItem(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<i.length;r++){var o=i[r];if(this.kinds_.indexOf(o.kind)>-1){var s=new e(this.player_,{track:o,selectable:!0});s.addClass("vjs-"+o.kind+"-menu-item"),t.push(s)}}return t},e}(TrackButton);Component.registerComponent("TextTrackButton",TextTrackButton);var ChaptersTrackMenuItem=function(t){function e(n,i){classCallCheck(this,e);var r=i.track,o=i.cue,s=n.currentTime();i.selectable=!0,i.label=o.text,i.selected=o.startTime<=s&&s<o.endTime;var a=possibleConstructorReturn(this,t.call(this,n,i));return a.track=r,a.cue=o,r.addEventListener("cuechange",bind(a,a.update)),a}return inherits(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},e.prototype.update=function(t){var e=this.cue,n=this.player_.currentTime();this.s
if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var n=this.$$("track"),i=n.length;i--;)e!==n[i]&&e!==n[i].track||this.el().removeChild(n[i])},e.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),window_1.performance&&"function"==typeof window_1.performance.now?t.creationTime=window_1.performance.now():window_1.performance&&window_1.performance.timing&&"number"==typeof window_1.performance.timing.navigationStart&&(t.creationTime=window_1.Date.now()-window_1.performance.timing.navigationStart),t},e}(Tech);if(isReal()){Html5.TEST_VID=document_1.createElement("video");var track=document_1.createElement("track");track.kind="captions",track.srclang="en",track.label="English",Html5.TEST_VID.appendChild(track)}Html5.isSupported=function(){try{Html5.TEST_VID.volume=.5}catch(t){return!1}return!(!Html5.TEST_VID||!Html5.TEST_VID.canPlayType)},Html5.canPlayType=function(t){return Html5.TEST_VID.canPlayType(t)},Html5.canPlaySource=function(t,e){return Html5.canPlayType(t.type)},Html5.canControlVolume=function(){try{var t=Html5.TEST_VID.volume;return Html5.TEST_VID.volume=t/2+.1,t!==Html5.TEST_VID.volume}catch(e){return!1}},Html5.canControlMute=function(){try{var t=Html5.TEST_VID.muted;return Html5.TEST_VID.muted=!0,t!==Html5.TEST_VID.muted}catch(e){return!1}},Html5.canControlPlaybackRate=function(){if(IS_ANDROID&&IS_CHROME&&CHROME_VERSION<58)return!1;try{var t=Html5.TEST_VID.playbackRate;return Html5.TEST_VID.playbackRate=t/2+.1,t!==Html5.TEST_VID.playbackRate}catch(e){return!1}},Html5.supportsNativeTextTracks=function(){return IS_ANY_SAFARI},Html5.supportsNativeVideoTracks=function(){return!(!Html5.TEST_VID||!Html5.TEST_VID.videoTracks)},Html5.supportsNativeAudioTracks=function(){return!(!Html5.TEST_VID||!Html5.TEST_VID.audioTracks)},Html5.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Html5.prototype.featuresVolumeControl=Html5.canControlVolume(),Html5.prototype.featuresMuteControl=Html5.canControlMute(),Html5.prototype.featuresPlaybackRate=Html5.canControlPlaybackRate(),Html5.prototype.movingMediaElementInDOM=!IS_IOS,Html5.prototype.featuresFullscreenResize=!0,Html5.prototype.featuresProgressEvents=!0,Html5.prototype.featuresTimeupdateEvents=!0,Html5.prototype.featuresNativeTextTracks=Html5.supportsNativeTextTracks(),Html5.prototype.featuresNativeVideoTracks=Html5.supportsNativeVideoTracks(),Html5.prototype.featuresNativeAudioTracks=Html5.supportsNativeAudioTracks();var canPlayType=Html5.TEST_VID&&Html5.TEST_VID.constructor.prototype.canPlayType,mpegurlRE=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,mp4RE=/^video\/mp4/i;Html5.patchCanPlayType=function(){ANDROID_VERSION>=4&&!IS_FIREFOX?Html5.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&mpegurlRE.test(t)?"maybe":canPlayType.call(this,t)}:IS_OLD_ANDROID&&(Html5.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&mp4RE.test(t)?"maybe":canPlayType.call(this,t)})},Html5.unpatchCanPlayType=function(){var t=Html5.TEST_VID.constructor.prototype.canPlayType;return Html5.TEST_VID.constructor.prototype.canPlayType=canPlayType,t},Html5.patchCanPlayType(),Html5.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(e){}}()}},Html5.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),n=e.length;n--;)t.removeChild(e[n]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(e){}}()}},["muted"
e.prototype.addTextTrack=function(t,e,n){if(this.tech_)return this.tech_.addTextTrack(t,e,n)},e.prototype.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},e.prototype.removeRemoteTextTrack=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=t.track,n=e===undefined?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},e.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.prototype.language=function(t){if(t===undefined)return this.language_;this.language_=String(t).toLowerCase()},e.prototype.languages=function(){return mergeOptions(e.prototype.options_.languages,this.languages_)},e.prototype.toJSON=function(){var t=mergeOptions(this.options_),e=t.tracks;t.tracks=[];for(var n=0;n<e.length;n++){var i=e[n];i=mergeOptions(i),i.player=undefined,t.tracks[n]=i}return t},e.prototype.createModal=function(t,e){var n=this;e=e||{},e.content=t||"";var i=new ModalDialog(this,e);return this.addChild(i),i.on("dispose",function(){n.removeChild(i)}),i.open(),i},e.getTagSettings=function(t){var e={sources:[],tracks:[]},n=getAttributes(t),i=n["data-setup"];if(hasClass(t,"vjs-fluid")&&(n.fluid=!0),null!==i){var r=tuple(i||"{}"),o=r[0],s=r[1];o&&log$2.error(o),assign(n,s)}if(assign(e,n),t.hasChildNodes())for(var a=t.childNodes,l=0,u=a.length;l<u;l++){var c=a[l],h=c.nodeName.toLowerCase();"source"===h?e.sources.push(getAttributes(c)):"track"===h&&e.tracks.push(getAttributes(c))}return e},e.prototype.flexNotSupported_=function(){var t=document_1.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},e}(Component);ALL.names.forEach(function(t){var e=ALL[t];Player.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),Player.players={};var navigator$1=window_1.navigator;Player.prototype.options_={techOrder:Tech.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings","videoStatisticPanel"],language:navigator$1&&(navigator$1.languages&&navigator$1.languages[0]||navigator$1.userLanguage||navigator$1.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(t){Player.prototype[t]=function(){return this.techGet_(t)}}),TECH_EVENTS_RETRIGGER.forEach(function(t){Player.prototype["handleTech"+toTitleCase(t)+"_"]=function(){return this.trigger(t)}}),Component.registerComponent("Player",Player);var BASE_PLUGIN_NAME="plugin",PLUGIN_CACHE_KEY="activePlugins_",pluginStorage={},pluginExists=function(t){return pluginStorage.hasOwnProperty(t)},getPlugin=function(t){return pluginExists(t)?pluginStorage[t]:undefined},markPluginAsActive=function(t,e){t[PLUGIN_CACHE_KEY]=t[PLUGIN_CACHE_KEY]||{},t[PLUGIN_CACHE_KEY][e]=!0},triggerSetupEvent=function(t,e,n){var i=(n?"before":"")+"pluginsetup";t.trigger(i,e),t.trigger(i+":"+e.name,e)},createBasicPlugin=function(t,e){var n=function(){triggerSetupEvent(this,{name:t,plugin:e,instance:null},!0);var n=e.apply(this,arguments);return markPluginAsActive(this,t),triggerSetupEvent(this,{name:t,plugin:e,instance:n}),n};return Object.keys(e).forEach(function(t){n[t]=e[t]}),n},createPluginFactory=function(t,e){return e.prototype.name=t,function(){triggerSetupEvent(this,{name:t,plugin:e,instance:null},!0);for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=new(Function.prototype.bind.apply(e,[null].concat([this].concat(i))));return this[t]=function(){return o},triggerSetupEvent(this,o.getEventHash()),o}},
},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],g=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],y=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],m=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3
if(!(this instanceof B))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:o(t,!0)}),this._prepare()};R.prototype._prepare=function(){var t=d[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var e=0;e<=t;e++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var n,i=4*(t+1),r=this.key.length/4,o=l(this.key),e=0;e<r;e++)n=e>>2,this._Ke[n][e%4]=o[e],this._Kd[t-n][e%4]=o[e];for(var s,a=0,u=r;u<i;){if(s=o[r-1],o[0]^=g[s>>16&255]<<24^g[s>>8&255]<<16^g[255&s]<<8^g[s>>24&255]^f[a]<<24,a+=1,8!=r)for(var e=1;e<r;e++)o[e]^=o[e-1];else{for(var e=1;e<r/2;e++)o[e]^=o[e-1];s=o[r/2-1],o[r/2]^=g[255&s]^g[s>>8&255]<<8^g[s>>16&255]<<16^g[s>>24&255]<<24;for(var e=r/2+1;e<r;e++)o[e]^=o[e-1]}for(var c,h,e=0;e<r&&u<i;)c=u>>2,h=u%4,this._Ke[c][h]=o[e],this._Kd[t-c][h]=o[e++],u++}for(var c=1;c<t;c++)for(var h=0;h<4;h++)s=this._Kd[c][h],this._Kd[c][h]=C[s>>24&255]^k[s>>16&255]^I[s>>8&255]^M[255&s]},R.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,n=[0,0,0,0],i=l(t),r=0;r<4;r++)i[r]^=this._Ke[0][r];for(var o=1;o<e;o++){for(var r=0;r<4;r++)n[r]=m[i[r]>>24&255]^v[i[(r+1)%4]>>16&255]^_[i[(r+2)%4]>>8&255]^T[255&i[(r+3)%4]]^this._Ke[o][r];i=n.slice()}for(var a,u=s(16),r=0;r<4;r++)a=this._Ke[e][r],u[4*r]=255&(g[i[r]>>24&255]^a>>24),u[4*r+1]=255&(g[i[(r+1)%4]>>16&255]^a>>16),u[4*r+2]=255&(g[i[(r+2)%4]>>8&255]^a>>8),u[4*r+3]=255&(g[255&i[(r+3)%4]]^a);return u},R.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,n=[0,0,0,0],i=l(t),r=0;r<4;r++)i[r]^=this._Kd[0][r];for(var o=1;o<e;o++){for(var r=0;r<4;r++)n[r]=b[i[r]>>24&255]^w[i[(r+3)%4]>>16&255]^E[i[(r+2)%4]>>8&255]^S[255&i[(r+1)%4]]^this._Kd[o][r];i=n.slice()}for(var a,u=s(16),r=0;r<4;r++)a=this._Kd[e][r],u[4*r]=255&(y[i[r]>>24&255]^a>>24),u[4*r+1]=255&(y[i[(r+3)%4]>>16&255]^a>>16),u[4*r+2]=255&(y[i[(r+2)%4]>>8&255]^a>>8),u[4*r+3]=255&(y[255&i[(r+1)%4]]^a);return u};var A=function O(t,e){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",e){if(16!=e.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else e=s(16);this._lastCipherblock=o(e,!0),this._aes=new R(t)};A.prototype.encrypt=function(t){if(t=o(t),t.length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),i=0;i<t.length;i+=16){a(t,n,0,i,i+16);for(var r=0;r<16;r++)n[r]^=this._lastCipherblock[r];this._lastCipherblock=this._aes.encrypt(n),a(this._lastCipherblock,e,i)}return e},A.prototype.decrypt=function(t){if(t=o(t),t.length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),i=0;i<t.length;i+=16){a(t,n,0,i,i+16),n=this._aes.decrypt(n);for(var r=0;r<16;r++)e[i+r]=n[r]^this._lastCipherblock[r];a(t,this._lastCipherblock,0,i,i+16)}return e};var D=function x(t){if(!(this instanceof x))throw Error("Counter must be instanitated with `new`");0===t||t||(t=1),"number"==typeof t?(this._counter=s(16),this.setValue(t)):this.setBytes(t)};D.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");if(t>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var e=15;e>=0;--e)this._counter[e]=t%256,t=parseInt(t/256)},D.prototype.setBytes=function(t){if(t=o(t,!0),16!=t.length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},D.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var P={AES:R,Counter:D,modeOfOperation:{cbc:A},utils:{hex:p,utf8:h},padding:{pkcs7:{pad:u,strip:c}},_arrayTest:{coerceArray:o,createArray:s,copyArray:a}},j=P},"./utils.js":function(t,e,n){"use strict";function i(){for(var t="",e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d",
;for(var i=e.clone(),r=this.clone(),o=s(1),a=s(0),l=s(0),u=s(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),n?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;r.isEven();)r.rShiftTo(1,r),n?(l.isEven()&&u.isEven()||(l.addTo(this,l),u.subTo(e,u)),l.rShiftTo(1,l)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);i.compareTo(r)>=0?(i.subTo(r,i),n&&o.subTo(l,o),a.subTo(u,a)):(r.subTo(i,r),n&&l.subTo(o,l),u.subTo(a,u))}return 0!=r.compareTo(t.ONE)?t.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},t.prototype.pow=function(t){return this.exp(t,new d)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var i=e;e=n,n=i}var r=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(r<o&&(o=r),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(r=e.getLowestSetBit())>0&&e.rShiftTo(r,e),(r=n.getLowestSetBit())>0&&n.rShiftTo(r,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=c[c.length-1]){for(e=0;e<c.length;++e)if(n[0]==c[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<c.length;){for(var i=c[e],r=e+1;r<c.length&&i<h;)i*=c[r++];for(i=n.modInt(i);e<r;)if(i%c[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var i;if(16==n)i=4;else if(8==n)i=3;else if(256==n)i=8;else if(2==n)i=1;else if(32==n)i=5;else{if(4!=n)return void this.fromRadix(e,n);i=2}this.t=0,this.s=0;for(var r=e.length,s=!1,a=0;--r>=0;){var l=8==i?255&+e[r]:o(e,r);l<0?"-"==e.charAt(r)&&(s=!0):(s=!1,0==a?this[this.t++]=l:a+i>this.DB?(this[this.t-1]|=(l&(1<<this.DB-a)-1)<<a,this[this.t++]=l>>this.DB-a):this[this.t-1]|=l<<a,(a+=i)>=this.DB&&(a-=this.DB))}8==i&&0!=(128&+e[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),s&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,i=this.DB-n,r=(1<<i)-1,o=Math.floor(t/this.DB),s=this.s<<n&this.DM,a=this.t-1;a>=0;--a)e[a+o+1]=this[a]>>i|s,s=(this[a]&r)<<n;for(var a=o-1;a>=0;--a)e[a]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)return void(e.t=0);var i=t%this.DB,r=this.DB-i,o=(1<<i)-1;e[0]=this[n]>>i;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<r,e[s-n]=this[s]>>i;i>0&&(e[this.t-n-1]|=(this.s&o)<<r),e.t=this.t-n,e.clamp()},t.prototype.subTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]-t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i-=t[n],e[n++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=this.DV+i:i>0&&(e[n++]=i),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var i=this.abs(),r=e.abs(),o=i.t;for(n.t=o+r.t;--o>=0;)n[o]=0;for(o=0;o<r.t;++o)n[o+i.t]=i.am(0,r[o],n,o,0,i.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var i=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,i,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,n,r){var o=e.abs();if(!(o.t<=0)){var s=this.abs();if(s.t<o.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=i());var l=i(),u=this.s,c=e.
r.YAHOO.lang.extend(o.asn1.DERIA5String,o.asn1.DERAbstractString),o.asn1.DERUTCTime=function(t){o.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return"undefined"==typeof this.date&&"undefined"==typeof this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},t!==undefined&&(t.str!==undefined?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):t.hex!==undefined?this.setStringHex(t.hex):t.date!==undefined&&this.setByDate(t.date))},r.YAHOO.lang.extend(o.asn1.DERUTCTime,o.asn1.DERAbstractTime),o.asn1.DERGeneralizedTime=function(t){o.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===undefined&&this.s===undefined&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},t!==undefined&&(t.str!==undefined?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):t.hex!==undefined?this.setStringHex(t.hex):t.date!==undefined&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},r.YAHOO.lang.extend(o.asn1.DERGeneralizedTime,o.asn1.DERAbstractTime),o.asn1.DERSequence=function(t){o.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},r.YAHOO.lang.extend(o.asn1.DERSequence,o.asn1.DERAbstractStructured),o.asn1.DERSet=function(t){o.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&"undefined"!=typeof t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},r.YAHOO.lang.extend(o.asn1.DERSet,o.asn1.DERAbstractStructured),o.asn1.DERTaggedObject=function(t){o.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("undefined"!=typeof t.tag&&(this.hT=t.tag),"undefined"!=typeof t.explicit&&(this.isExplicit=t.explicit),"undefined"!=typeof t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},r.YAHOO.lang.extend(o.asn1.DERTaggedObject,o.asn1.ASN1Object)},"./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js":function(t,e,n){"use strict";n.r(e),n.d(e,{YAHOO:function(){return i}});var i={};i.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var r;for(r in n)t.prototype[r]=n[r];var o=function(){},s=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(r=0;r<s.length;r+=1){var n=s[r],i=e[n];"function"==typeof i&&i!=Object.prototype[n]&&(t[n]=i)}})}catch(a){}o(t.prototype,n)}}}},"./node_modules/jsencrypt/lib/version.json":function(t){"use strict";t.exports={version:"3.2.0"}},"./node_modules/md5/md5.js":function(t,e,n){!function(){var e=n("./node_modules/crypt/crypt.js"),i=n("./node_modules/charenc/charenc.js").utf8,r=n("./node_modules/is-buffer/index.js
})):e.VttThumbnail().reset()},e.prototype.setOriginDuration=function(t){var e=this.player();if(e.options_.exper>0){var n=t.sourceVideo?t.sourceVideo.floatDuration:t.transcodeList[0].floatDuration;e.one("play",function(){e.duration(n)})}},e.prototype.setOriginDurationV4=function(t){var e=this,n=this.player();n.cache_.originDuration=t.basicInfo.duration,n.off("durationchange",this.keepOriginDuration),n.one("durationchange",function(t){(!n.duration()||n.duration()>0&&Math.floor(n.cache_.originDuration)!==Math.floor(n.duration()))&&(e.keepOriginDuration(t),n.on("durationchange",e.keepOriginDuration))})},e.prototype.setGhostContent=function(t){if(t){var e=this.player(),n=e&&e.DynamicWatermark();n.options.content=t.text,n.options.keep=!0}},e.prototype.keepOriginDuration=function(t){var e=this.player(),n=e.cache_.originDuration;Math.floor(n)!==Math.floor(e.duration())&&(log$2("试看视频"),e.duration(Math.round(n)))},e.prototype.getMasterSouces=function(t){var e=t.masterPlayList,n=[];return n.push({src:unifyProtocol(e.url),type:EXT_MIME.m3u8}),n},e.prototype.getMultiResolutionData=function(t){var e={sources:{},labels:{},showOrder:[],defaultRes:""},n=[],i=t.videoInfo.transcodeList,r=this;return t.playerInfo.videoClassification.forEach(function(t,o){i.length>0&&(i=i.filter(function(i){if(!(t.definitionList.indexOf(i.definition)>-1))return!0;n[t.id]||(e.showOrder.push(t.id),e.labels[t.id]=t.name,n[t.id]=[]),n[t.id].push({src:unifyProtocol(i.url),type:r.getMIMEType(i.url)})}))}),e.sources=n,e.defaultRes=t.playerInfo.defaultVideoClassification||Object.keys(n)[0],e},e.prototype.getSrcByDefinition=function(t,e){var n=t.transcodeList,i=t.sourceVideo;if(0==e)return i;for(var r=0;r<n.length;r++)if(n[r].definition==e)return n[r]},e.prototype.getMIMEType=function(t){var e=EXT_MIME[getFileExtension(t)];return e||(log$2.error("MIME type no found! Ext = "+getFileExtension(t)),"")},e.prototype.assemblyPath=function(t,e,n){var i=window_1.location.protocol;return"http:"!=i&&"https:"!=i&&(i="https:"),""+i+SERVER_PATH+"/"+t+"/v2/"+e+"/"+n},e.prototype.assemblyPathV3=function(t,e,n,i){var r=window_1.location.protocol;return"http:"!=r&&"https:"!=r&&(r="https:"),""+r+SERVER_PATH_V3+"/"+t+"/v3/"+e+"/"+n+"/"+i},e.prototype.assemblyPathV4=function(t,e,n){var i=window_1.location.protocol;return"http:"!=i&&"https:"!=i&&(i="https:"),""+i+SERVER_PATH_V4+"/"+t+"/v4/"+e+"/"+n},e.prototype.customHost=function(t){var e=this.player();e.options_.customHost&&/^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/.test(e.options_.customHost)&&(t.masterPlayList&&(t.masterPlayList.url=replaceHost(t.masterPlayList.url,e.options_.customHost)),t.sourceVideo&&(t.sourceVideo.url=replaceHost(t.sourceVideo.url,e.options_.customHost)),t.transcodeList.length>0&&t.transcodeList.forEach(function(t,n){t.url=replaceHost(t.url,e.options_.customHost)}),e.trigger({type:"feature",data:"customHost"}))},e.prototype.loadVideoByID=function(t){var e=this.player();e.trigger({type:"loadnewvideo"}),e.hasStarted(!1),this.getInfo(t),e.duration(0),e.playbackRate(1),e.options_.appID=t.appID,e.options_.fileID=t.fileID,e.options_.psign=t.psign,t.definition&&(e.options_.definition=t.definition),e.bigPlayButton&&e.bigPlayButton.show(),e.options_.plugins.ContinuePlay&&e.ContinuePlay().init()},e.prototype.setPlayList=function(t){this.player().options_.plugins.PlayList||t.playlist&&t.playlist.data instanceof Array&&t.playlist.data.length>0&&this.player_.PlayList(t.playlist)},e}(Component);Component.registerComponent("MediaAsyncLoader",MediaAsyncLoader);var Component$2=videojs.getComponent("Component"),ClickableComponent$2=videojs.getComponent("ClickableComponent"),positionMap=["left-top","left-bottom","right-top","right-bottom"],LogoImage=function(t){function e(n,i){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n,i));return n.on("logochange",videojs.bind(r,function(t){this.update(t.data)})),i.img&&r.update(i),r}return inherits(e,t),e.prototype.createEl=function(){var t=videojs.dom.createEl("div",{className:"tcp-logo vjs-hidden"}),e=videojs.dom.crea
t.player.trigger({type:"feature",data:"statistic"}))})},e}(MenuItem$5);videojs.registerComponent("StatusMenuItem",StatusMenuItem);var Component$8=videojs.getComponent("Component"),Menu$2=videojs.getComponent("Menu"),MenuItem$2=videojs.getComponent("MenuItem"),RightClickPopupMenu=function(t){function e(n,i){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n,i));r.hide(),r.addChild("PoweredByMenuItem",{label:"Powered by Tencent Cloud."}),!i.statistic||IS_IOS||IS_ANDROID||r.addChild("StatusMenuItem",{label:"Video statistic"}),i.mirror&&r.addChild("MirrorMenuItem",{label:"Mirror"}),n.on("contextmenu",videojs.bind(r,r.onContextmenu)),n.on(["tap","click"],videojs.bind(r,function(t){if(this.popped)return this.hide(),t.stopPropagation(),t.preventDefault(),!1})),videojs.on(document,["tap","click"],videojs.bind(r,function(t){this.popped&&this.hide()}));var o=r;return r.children().forEach(function(t){t.on(["tap","click"],function(){o.hide()})}),r}return inherits(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this);return videojs.dom.addClass(e,"tcp-right-click-popup-menu"),e},e.prototype.show=function(){t.prototype.show.call(this),this.popped=!0},e.prototype.hide=function(){t.prototype.hide.call(this),this.popped=!1},e.prototype.onContextmenu=function(t){t.preventDefault(),this.show();var e=this.el(),n=t.clientX,i=t.clientY,r=getViewportSize(),o=r.width,s=r.height,a=n+e.offsetWidth-o+5;a=Math.max(0,a);var l=i+e.offsetHeight-s+5;l=Math.max(0,l);var u=this.player().el().getBoundingClientRect();e.style.left=Math.max(0,n-u.left-a)+"px",e.style.top=Math.max(0,i-u.top-l)+"px"},e}(Menu$2);videojs.registerComponent("RightClickPopupMenu",RightClickPopupMenu);var clickableComponent=videojs.getComponent("ClickableComponent"),TimeTooltip$2=videojs.getComponent("TimeTooltip"),Component$9=videojs.getComponent("Component"),dom=videojs.dom,formatTime$2=videojs.formatTime,COMMENT_WIDTH=140,COMMENT_HEIGHT_SINGLE_LINE=23,COMMENT_SHOW_ON_THE_LEFT={POPUP_CONTAINER_OFFSET:-130,POPUP_CONTAINER_OFFSET_WITHOUTGIT:-100,TRIANGLE_OFFEST:96,TRIANGLE_OFFEST_WITHOUTGIF:95},COMMENT_SHOW_ON_THE_RIGHT={TRIANGLE_OFFEST:6,POPUP_CONTAINER_OFFSET:0},ProgressMarkerGenerator=function(t){function e(n,i){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n,i));return r.duration=0,r.registerListener(),r}return inherits(e,t),e.prototype.registerListener=function(){this.player_.one("canplay",videojs.bind(this,this.resetDotsElement))},e.prototype.resetDotsElement=function(){var t=this.player_;this.duration=t.duration(),dom.emptyEl(this.el_),this.resetEl()},e.prototype.resetEl=function(){this.setUpEl()},e.prototype.dotMouseLeave=function(){var t=event.currentTarget,e=t.getAttribute("container-id");this.getChildById(e).hide()},e.prototype.dotHover=function(){var t=event.currentTarget.parentElement.offsetWidth,e=event.currentTarget.offsetLeft+COMMENT_WIDTH,n=this.getChildById(event.currentTarget.getAttribute("container-id")),i=n.getAttribute("class").search("tcp-without-gif")>=0,r=n.el_.querySelector(".tcp-triangle-both")||n.el_.querySelector(".tcp-triangle");e>t?i?(n.el_.style.left=COMMENT_SHOW_ON_THE_LEFT.POPUP_CONTAINER_OFFSET_WITHOUTGIT+"px",r.style.left=COMMENT_SHOW_ON_THE_LEFT.TRIANGLE_OFFEST_WITHOUTGIF+"%"):(n.el_.style.left=COMMENT_SHOW_ON_THE_LEFT.POPUP_CONTAINER_OFFSET+"px",r.style.left=COMMENT_SHOW_ON_THE_LEFT.TRIANGLE_OFFEST+"%"):event.currentTarget.offsetLeft<=COMMENT_WIDTH&&!i&&(n.el_.style.left=COMMENT_SHOW_ON_THE_RIGHT.POPUP_CONTAINER_OFFSET+"px",r.style.left=COMMENT_SHOW_ON_THE_RIGHT.TRIANGLE_OFFEST+"px");var o=n.getChild("DotImage");if(o){var s=o.el_.getElementsByClassName("tcp-dot-timestamp")[0],a=event.currentTarget.getAttribute("dotinsecond"),l=formatTime$2(a);s.innerHTML=l}n.show()},e.prototype.setChildInTheContainer=function(t,e){var n=t.content&&""!==t.content?decodeURIComponent(t.content.replace(/\+/g," ")):"";if(""!==n){var i=e.addChild("DotComment");i.el_.innerHTML=encodeHTML(n)}if(t.img){e.el_.querySelector(".tcp-triangle").setAttribute("class","tcp-triangle-both");var r=e.addChild("Dot
o.className="vjs-errors-dialog",s='<div class="vjs-errors-content-container">\n '+i+"\n </div>";var a=t.getChild("errorDisplay");a.closeable(!("dismiss"in r)||r.dismiss)?(o.innerHTML=s,a.fillWith(o),a.contentEl().firstChild.appendChild(a.getChild("closeButton").el())):(o.innerHTML=s,a.fillWith(o)),a.one("modalclose",function(){return t.error(null)})}},d=function g(){u(),t.removeClass("vjs-errors"),t.off("dispose",g),t.off(["aderror","error"],p)},f=function(n){d(),e(t,videojs.mergeOptions(defaults$1,n))};f.extend=function(t){return a(t)},f.getAll=function(){return videojs.mergeOptions(n.errors)},f.disableProgress=function(t){n.progressDisabled=t,h()},t.on("dispose",d),t.on(["aderror","error"],p),t.ready(function(){t.addClass("vjs-errors")}),t.errors=f},errors=function(t){initPlugin(this,videojs.mergeOptions(defaults$1,t))};["extend","getAll","disableProgress"].forEach(function(t){errors[t]=function(){videojs.log.warn("The errors."+t+"() method is not available until the plugin has been initialized!")}}),registerPlugin("Errors",errors);var Plugin$8=videojs.getPlugin("plugin"),cgiSeq={},STATUS_CODE_REPORT_URL="//report.huatuo.qq.com/code.cgi",log$7=videojs.log,Reporter=function(t){function e(n,i){classCallCheck(this,e),log$7("Reporter initilaizing");var r=possibleConstructorReturn(this,t.call(this,n));if(!n.options_.plugins.Reporter){var o;return o=!1,possibleConstructorReturn(r,o)}return r.reportContent={status:"idle"},r.mtaReportCache=[],log$7("Reporter initilaized"),r}return inherits(e,t),e.prototype.setStorage=function(t,e){localStorage.setItem(t,e)},e.prototype.getStorage=function(t){localStorage.getItem(t)},e.prototype.sender=function(t){var e=new Image;e.onload=e.onerror=e.onabort=function(){e.onload=e.onerror=e.onabort=null,e=null},e.src=t},e.prototype.initPlayCgiCodeReport=function(){var t=this.player;t.on("playcgistart",videojs.bind(this,this.onPlayCgiStart)),t.on("playcgiend",videojs.bind(this,this.onPlayCgiEnd))},e.prototype.onPlayCgiStart=function(t){cgiSeq[t.data.time]=cgiSeq[t.data.time]||{},cgiSeq[t.data.time].startTime=t.data.time,cgiSeq[t.data.time].url=t.data.url},e.reportPlayMetrics=function(t,e){xhr.post("https://datacenter.live.qcloud.com",{body:JSON.stringify(t)},function(){e&&e()})},e.prototype.onPlayCgiEnd=function(t){if(cgiSeq[t.data.startTime]){var e=t.data,n=void 0,i=void 0,r=void 0;if(e.error)switch(i=2,e.error.message){case"Timeout":n=10;break;case"ServerError":n=11}else 0==e.result.code?(i=1,n=0):(i=3,n=e.result.code),r=e.result.requestId;this.reportPlayCgiToISD("","",i,n,t.data.time-cgiSeq[t.data.startTime].startTime,r,void 0,void 0)}},e.prototype.reportPlayCgiToISD=function(t,e,n,i,r,o,s,a){var l={domain:t||"playvideo.qcloud.com",cgi:e||"/getplayinfo/v2",type:n,code:i,time:r,appid:20370,platform:videojs.browser.IS_IOS?"ios":videojs.browser.IS_ANDROID?"android":"pc",expansion1:o,expansion2:s,expansion3:a};this.sender(unifyProtocol(STATUS_CODE_REPORT_URL)+"?"+serializeParams(l))},e.prototype.reportMTA=function(t,e){window.MtaH5?(this.mtaReportCache.length>0&&(this.mtaReportCache.forEach(function(t){t.call()}),this.mtaReportCache=0),MtaH5.clickStat(t,e)):this.mtaReportCache.push(function(){MtaH5.clickStat(t,e)})},e}(Plugin$8);videojs.registerPlugin("Reporter",Reporter);var store2=createCommonjsModule(function(t){!function(e,n){var i={version:"2.12.0",areas:{},apis:{},inherit:function(t,e){for(var n in t)e.hasOwnProperty(n)||Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e},stringify:function(t){return t===undefined||"function"==typeof t?t+"":JSON.stringify(t)},parse:function(t,e){try{return JSON.parse(t,e||i.revive)}catch(n){return t}},fn:function(t,e){i.storeAPI[t]=e;for(var n in i.apis)i.apis[n][t]=e},get:function(t,e){return t.getItem(e)},set:function(t,e,n){t.setItem(e,n)},remove:function(t,e){t.removeItem(e)},key:function(t,e){return t.key(e)},length:function(t){return t.length},clear:function(t){t.clear()},Store:function(t,e,n){var r=i.inherit(i.storeAPI,function(t,e,n){return 0===arguments.length?r.getAll():"function"==typeof e?r.transact(t,e,n):e!==u
u64_playtime:getTimeStamp()-this.timing.firstPlaying,u32_audio_decode_type:2,u32_audio_block_count:this.blockData.lagCount_500,u32_audio_cache_time:this.blockData.buffer_avg,u32_audio_drop:"",u32_video_decode_type:0,u32_video_recv_fps:this.blockData.recv_frames,u32_fps:this.blockData.render_frames,u32_video_cache_time:this.blockData.buffer_avg,u32_avg_cache_count:0,u32_video_block_count:this.blockData.lagCount_1000,u32_avg_net_speed:"",u32_video_light_block_count:this.blockData.lagCount_200,u32_video_large_block_count:this.blockData.lagCount_500,u32_audio_jitter_60ms_count:this.blockData.lagCount_60,u32_video_decode_fail:"",u32_audio_decode_fail:"",u32_avg_video_bitrate:0,u32_avg_audio_bitrate:0,u32_block_usage:1e3*parseInt(this.blockData.lagBlockDuration/this.blockInterval)},r={app_id:0,data:[Object.assign({},this.liveBaseData,i,t)],module_id:1005,command:40100};Reporter.reportPlayMetrics(r,function(){e.resetBlockData()})},e.prototype.report_40102=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],i=this.player||{},r=this.lagStatus.lagAvg.length>0?this.lagStatus.lagAvg.reduce(function(t,e){return t+e},0)/this.lagStatus.lagAvg.length:0,o=this.bufferBlock.length>0?this.bufferBlock.reduce(function(t,e){return t+e},0)/this.bufferBlock.length:0,s=i.getVideoPlaybackQuality&&i.getVideoPlaybackQuality()||{},a=s.totalVideoFrames/e.duration,l={uint64_data_time:getTimeStampBySecond(),str_stream_url:i.cache_&&i.cache_.src,u64_timestamp:getTimeStamp(),u32_avg_cpu_usage:"",u32_avg_memory:"",u64_begin_timestamp:i.startTime,u32_result:this.consumeDuration,u64_err_code:e.u64_err_code,u32_speed_cnt:0,u32_avg_cache_time:o,u32_max_load:Math.max.apply(Math,this.lagStatus.lagAvg),u32_audio_block_time:this.lagStatus.lagDuration,u32_avg_load:r,u32_load_cnt:this.lagStatus.lagAvg.length||0,u32_nodata_cnt:this.lagStatus.lagAvg.length||0,u32_first_i_frame:this.firstIFrameDuration,u32_video_width:i.width_,u32_video_height:i.height_,u32_video_avg_fps:a,u32_avg_block_time:r,u64_block_count:this.lagStatus.lagAvg.length||0,u32_video_block_time:this.lagStatus.lagDuration,u64_jitter_cache_max:0,u64_block_duration_max:Math.max.apply(Math,this.lagStatus.lagAvg),u64_jitter_cache_avg:0,u32_ip_count_quic:"",u32_connect_count_quic:"",u32_connect_count_tcp:"",u32_is_real_time:"",u32_first_frame_black:"",u32_delay_report:0},u={app_id:0,data:[Object.assign({},this.liveBaseData,l,e)],module_id:1005,command:40102};return e.u32_delay_report?(localStorage.setItem("tcplayer_data",JSON.stringify(u)),!1):n?(u.data.u32_delay_report=1,n(u)):void Reporter.reportPlayMetrics(u,function(){t.bytes_token=null,localStorage.removeItem("tcplayer_data")})},e.prototype.report_40303=function(){this.setTimingData({initEnd:getTimeStamp()});var t={msg_client_ip:{uint32_ip:""},uint32_service:this.playScene,uint64_data_time:getTimeStampBySecond(),str_stream_url:this.player.cache_.src,uint32_command:40303},e={app_id:0,data:[Object.assign({},this.vodBaseData,t)],module_id:1011,command:40303};Reporter.reportPlayMetrics(e)},e.prototype.report_40304=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],i=this.lagStatus.lagAvg.length>0?this.lagStatus.lagAvg.reduce(function(t,e){return t+e},0)/this.lagStatus.lagAvg.length:0,r={uint64_data_time:getTimeStampBySecond(),uint32_command:40304,str_stream_url:this.player.cache_.src,u32_timeuse:String(parseInt(this.consumeDuration/1e3)||0),u32_videotime:String(this.videoDuration),u32_avg_load:String(i),u32_load_cnt:String(this.lagStatus.lagCount),u32_max_load:this.lagStatus.lagAvg.length>0?String(Math.max.apply(Math,this.lagStatus.lagAvg)):String(0),u32_avg_block_time:String(this.lagStatus.lagDuration),u32_player_type:String(4),u32_dns_time:"",u32_tcp_did_connect:"",u32_first_video_packet:String(parseInt(this.firstFrameDuration)),u32_first_i_frame:String(parseInt(this.firstIFrameDuration)),u32_server_ip:"",u32_drm_type:this.u32_drm_type,u32_playmode:String(1),u64_err_code:String(e.u64_err_code||""),str_err_info:String(e.str_err_info||""),u32_video_decode_type:
return flvTypeRE.test(t.type)?"probably":flvExtRE.test(t.src)||flvProtoRE.test(t.src)?"maybe":""},handleSource:function(t,e,n){return e.flvProvider&&e.flvProvider.dispose(),e.flvProvider=new Html5FlvJS(t,e,n),e.flvProvider},canPlayType:function(t){if(flvTypeRE.test(t))return"probably"}};TCPlayer.mountFlvProvider=mountFlvProvider,mountFlvProvider();var defaultConfig$2={receiveVideo:!0,receiveAudio:!0,showLog:!1},WebRTCProvider=function(){function t(e,n,i){var r=this;classCallCheck(this,t);var o=function(){r.tech=n,r.playerMetrics=r.tech.player().PlayerMetrics();var t=window.TXLivePlayer;r.TXLivePlayer=t;var o=videojs.mergeOptions(defaultConfig$2,i.webrtcConfig),s=new t;s.setPlayerView(n.el()),s.setConfig(o),s.setPlayListener({onPlayEvent:videojs.bind(r,r.onPlayEvent),onPlayStats:videojs.bind(r,r.onPlayStats),onPlayReport:videojs.bind(r,r.onPlayReport)}),s.startPlay(e.src),r.webrtcPlayer=s};window.TXLivePlayer?o():loadScript(WEBRTC_PATH,function(){o()})}return t.prototype.onPlayStats=function(t){this.tech.player().trigger({type:"webrtcstats",data:t})},t.prototype.onPlayEvent=function(t,e){var n=this.tech.player();if(t<-2e3)return-2003===t&&e&&e.videoActive&&(n.trigger("blocked"),n.trigger({type:"webrtcevent",data:{code:2005}})),-2003!==t&&(-2005===t||-2001===t||-2004===t?(this.switchPlaySource(),!1):(n.error({code:t,source:e}),!1));n.trigger({type:"webrtcevent",data:{code:t,data:e}})},t.prototype.onPlayReport=function(t){40101===t.uint32_command&&this.playerMetrics.report_40101(t),40100===t.uint32_command&&this.playerMetrics.report_40100(t),40102===t.uint32_command&&this.playerMetrics.report_40102(t)},t.prototype.dispose=function(){this.webrtcPlayer&&(this.webrtcPlayer.setPlayListener({onPlayEvent:function(){},onPlayStats:function(){}}),this.webrtcPlayer.stopPlay(),this.webrtcPlayer.setPlayerView(videojs.dom.createEl("video"))),this.webrtcPlayer=null},t.prototype.setSource=function(t){var e=this;this.webrtcPlayer.startPlay(t.src),this.tech.player().one("webrtcevent",function(t){-1002===t.data.code&&e.tech.player().play()})},t.prototype.recovery=function(){var t=this,e=this.tech.player(),n=void 0;e.one("waiting",function(){n=setTimeout(function(){e.one("webrtcevent",function(n){if(1004===n.data.code){t.webrtcPlayer&&t.webrtcPlayer.startPlay(e.src()),e.play();var i=function r(t){1002===t.data.code&&(e.play(),e.off("webrtcevent",r))};e.on("webrtcevent",i)}}),t.webrtcPlayer&&t.webrtcPlayer.stopPlay()},2e3)}),e.one("playing",function(){n&&clearTimeout(n)})},t.prototype.switchPlaySource=function(){var t=this.tech.player(),e=this.tech.currentSource_.src,n=this.convertProtocol(e);t.bigPlayButton&&t.bigPlayButton.hide(),t.posterImage&&t.posterImage.hide(),t.src(n);var i=videojs.browser.IS_IOS||videojs.browser.IS_ANDROID?"loadeddata":"loadedmetadata",r=function o(){t.play(),t.one("progress",function(){t.play(),t.off(i,o)})};t.on(i,r)},t.prototype.convertProtocol=function(t){var e=[];if(t.indexOf(".sdp")>-1)t=t.replace(".sdp",".flv"),e.push(t.replace(".sdp",".m3u8"));else{var n=t.replace("webrtc://","https://").replace("?",".flv?");-1===n.indexOf("?")&&-1===n.indexOf(".flv")&&(n+=".flv"),hlsSrc=t.replace("webrtc://","https://").replace("?",".m3u8?"),-1===hlsSrc.indexOf("?")&&-1===hlsSrc.indexOf(".m3u8")&&(hlsSrc+=".m3u8"),e.push(hlsSrc)}return e},t}(),webrtcTypeRE=/^webrtc/i,webrtcExtRE=/\.sdp/i,webrtcProtoRE=/^(webrtc:\/\/)/i,sourceHandler={name:"webrtcSourceHandler",canHandleSource:function(t){return webrtcTypeRE.test(t.type)?"probably":webrtcExtRE.test(t.src)||webrtcProtoRE.test(t.src)?"maybe":""},handleSource:function(t,e,n){return e.webrtcProvider&&e.webrtcProvider.dispose(),e.webrtcProvider=new WebRTCProvider(t,e,n),e.webrtcProvider},canPlayType:function(t){if(webrtcTypeRE.test(t))return"probably"}};mountWebRTCProvider();for(var Tech$2=videojs.getComponent("Tech"),Dom$1=videojs.dom,Url$1=videojs.url,createTimeRange=videojs.createTimeRange,mergeOptions$1=videojs.mergeOptions,navigator$2=window_1&&window_1.navigator||{},Flash=function(t){function e(n,i,r){classCallCheck(this,e);var o=possibleConstructorReturn(this,t.call(this,n,