tcplayer.js 4.8.0-beta.4 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.TCPlayer=t()}(this,function(){function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}function each(e,t){keys(e).forEach(function(n){return t(e[n],n)})}function reduce(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;return keys(e).reduce(function(n,r){return t(n,e[r],r)},n)}function assign(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[e].concat(n)):(n.forEach(function(t){t&&each(t,function(t,n){e[n]=t})}),e)}function isObject$1(e){return!!e&&"object"===(void 0===e?"undefined":_typeof(e))}function isPlain(e){return isObject$1(e)&&"[object Object]"===toString.call(e)&&e.constructor===Object}function isFunction(e){return"function"==typeof e&&"number"!=typeof e.nodeType}function clean(e){return e.replace(/\n\r?\s*/g,"")}function computedStyle(e,t){if(!e||!t)return"";if("function"==typeof window_1.getComputedStyle){var n=window_1.getComputedStyle(e);return n?n[t]:""}return e.currentStyle[t]||""}function isNonBlankString(e){return"string"==typeof e&&/\S/.test(e)}function throwIfWhitespace(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function classRegExp(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function isReal(){return document_1===window_1.document&&"undefined"!=typeof document_1.createElement}function isEl(e){return isObject$1(e)&&1===e.nodeType}function isInFrame(){try{return window_1.parent!==window_1.self}catch(e){return!0}}function createQuerier(e){return function(t,n){if(!isNonBlankString(t))return document_1[e](null);isNonBlankString(n)&&(n=document_1.querySelector(n));var r=isEl(n)?n:document_1;return r[e]&&r[e](t)}}function createEl(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"div",t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},r=arguments[3],i=document_1.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(log$2.warn(tsml(_templateObject,e,n)),i.setAttribute(e,n)):"textContent"===e?textContent(i,n):i[e]=n}),Object.getOwnPropertyNames(n).forEach(function(e){i.setAttribute(e,n[e])}),r&&appendContent(i,r),i}function textContent(e,t){return"undefined"==typeof e.textContent?e.innerText=t:e.textContent=t,e}function prependTo(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function hasClass(e,t){return throwIfWhitespace(t),e.classList?e.classList.contains(t):classRegExp(t).test(e.className)}function addClass(e,t){return e.classList?e.classList.add(t):hasClass(e,t)||(e.className=(e.className+" "+t).trim()),e}function removeClass(e,t){return e.classList?e.classList.remove(t):(throwIfWhitespace(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function toggleClass(e,t,n){var r=hasClass(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?addClass(e,t):removeClass(e,t),e}function setAttributes(e,t){Object.getOwnPropertyNames(t).forEach(function(n){var r=t[n];null===r||void 0===r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)})}function getAttributes(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof e[i]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),t[i]=o}return t}function getAttribute(e,t){return e.getAttribute(t)}function setAttribute(e,t,n){e.setAttribute(t,n)}function removeAttribute(e,t){e.removeAttribute(t)}function blockTextSelection(){document_1.body.focus(),document_1.onselectstart=function(){return!1}}function unblockTextSelection(){document_1.onselectstart=function(){return!0}}function getBoundingClientRect(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(e){t[e]!==undefined&&(n[e]=t[e])}),n.height||(n.height=parseFloat(computedStyle(e,"height"))),n.width||(n.width=parseFloat(computedStyle(e,"width"))),n}}function findPosition(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var n=document_1.documentElement,r=document_1.body,i=n.clientLeft||r.clientLeft||0,o=window_1.pageXOffset||r.scrollLeft,a=t.left+o-i,s=n.clientTop||r.clientTop||0,c=window_1.pageYOffset||r.scrollTop,l=t.top+c-s;return{left:Math.round(a),top:Math.round(l)}}function getPointerPosition(e,t){var n={},r=findPosition(e),i=e.offsetWidth,o=e.offsetHeight,a=r.top,s=r.left,c=t.pageY,l=t.pageX;return t.changedTouches&&(l=t.changedTouches[0].pageX,c=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(a-c+o)/o)),n.x=Math.max(0,Math.min(1,(l-s)/i)),n}function isTextNode(e){return isObject$1(e)&&3===e.nodeType}function emptyEl(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function normalizeContent(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),isEl(e)||isTextNode(e)?e:"string"==typeof e&&/\S/.test(e)?document_1.createTextNode(e):void 0}).filter(function(e){return e})}function appendContent(e,t){return normalizeContent(t).forEach(function(t){return e.appendChild(t)}),e}function insertContent(e,t){return appendContent(emptyEl(e),t)}function isSingleLeftClick(e){return e.button===undefined&&e.buttons===undefined||(0===e.button&&e.buttons===undefined||(9===IE_VERSION||0===e.button&&1===e.buttons))}function newGUID(){return _guid++}function getData(e){var t=e[elIdAttr];return t||(t=e[elIdAttr]=newGUID()),elData[t]||(elData[t]={}),elData[t]}function hasData(e){var t=e[elIdAttr];return!!t&&!!Object.getOwnPropertyNames(elData[t]).length}function removeData(e){var t=e[elIdAttr];if(t){delete elData[t];try{delete e[elIdAttr]}catch(n){e.removeAttribute?e.removeAttribute(elIdAttr):e[elIdAttr]=null}}}function _cleanUpEvents(e,t){var n=getData(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&removeData(e)}function _handleMultipleEvents(e,t,n,r){n.forEach(function(n){e(t,n,r)})}function fixEvent(e){function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||window_1.event;e={};for(var i in r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||document_1),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&e.clientX!==undefined){var o=document_1.documentElement,a=document_1.body;e.pageX=e.clientX+(o&&o.scrollLeft||a&&a.scrollLeft||0)-(o&&o.clientLeft||a&&a.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||a&&a.scrollTop||0)-(o&&o.clientTop||a&&a.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&e.button!==undefined&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}function on(e,t,n){if(Array.isArray(t))return _handleMultipleEvents(on,e,t,n);var r=getData(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=newGUID()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=fixEvent(t);var i=r.handlers[t.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a<s&&(!t.isImmediatePropagationStopped||!t.isImmediatePropagationStopped());a++)try{o[a].call(e,t,n)}catch(c){log$2.error(c)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;_supportsPassive&&passiveEvents.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function off(e,t,n){if(hasData(e)){var r=getData(e);if(r.handlers){if(Array.isArray(t))return _handleMultipleEvents(off,e,t,n);var i=function(e,t){r.handlers[t]=[],_cleanUpEvents(e,t)};if(t!==undefined){var o=r.handlers[t];if(o){if(!n)return void i(e,t);if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);_cleanUpEvents(e,t)}}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function trigger(e,t,n){var r=hasData(e)?getData(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t&&(t={type:t,target:e}),t=fixEvent(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)trigger.call(null,i,t,n);else if(!i&&!t.defaultPrevented){var o=getData(t.target);t.target[t.type]&&(o.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),o.disabled=!1)}return!t.defaultPrevented}function one(e,t,n){if(Array.isArray(t))return _handleMultipleEvents(one,e,t,n);var r=function i(){off(e,t,i),n.apply(this,arguments)};r.guid=n.guid=n.guid||newGUID(),on(e,t,r)}function autoSetupTimeout(e,t){t&&(videojs$2=t),window_1.setTimeout(autoSetup,e)}function evented(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=createEl("span",{className:"vjs-event-bus"});return assign(e,EventedMixin),e.on("dispose",function(){e.off(),window_1.setTimeout(function(){e.eventBusEl_=null},0)}),e}function stateful(e,t){return assign(e,StatefulMixin),e.state=assign({},e.state,t),"function"==typeof e.handleStateChanged&&isEvented(e)&&e.on("statechanged",e.handleStateChanged),e}function toTitleCase(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function titleCaseEquals(e,t){return toTitleCase(e)===toTitleCase(t)}function mergeOptions(){for(var e={},t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){t&&each(t,function(t,n){if(!isPlain(t))return void(e[n]=t);isPlain(e[n])||(e[n]={}),e[n]=mergeOptions(e[n],t)})}),e}function extend(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,c=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"===(void 0===a?"undefined":_typeof(a))||isFunction(a)||(a={}),s===c&&(a=this,s--);s<c;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],a!==r&&(l&&r&&(isPlain(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&isPlain(n)?n:{},a[t]=extend(l,o,r)):r!==undefined&&(a[t]=r));return a}function getParams(e,t){var n=t.split("?")[1];if(n){var r=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),i=n.match(r);return null!=i?decodeURIComponent(i[2]):null}}function guid(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function unifyProtocol(e){e=e.replace(/^(http|https):/,"");var t=window.location.protocol;return"http:"!=t&&"https:"!=t&&(t="https:"),e=t+e}function convertProtocol(e){var t=[];if(e.indexOf(".sdp")>-1)e=e.replace(".sdp",".flv"),t.push(e.replace(".sdp",".m3u8"));else{var n=e.replace("webrtc://","https://").replace("?",".flv?");-1===n.indexOf("?")&&-1===n.indexOf(".flv")&&(n+=".flv"),hlsSrc=e.replace("webrtc://","https://").replace("?",".m3u8?"),-1===hlsSrc.indexOf("?")&&-1===hlsSrc.indexOf(".m3u8")&&(hlsSrc+=".m3u8"),t.push(hlsSrc)}return t}function replaceHost(e,t){var n=/^http(s)?:\/\/(.*?)\//,r=e.match(n);return e.replace(r[2],t)}function getViewportSize(){var e=document,t=e.documentElement,n=e.body;return{width:t&&t.clientWidth||n&&n.offsetWidth||window.innerWidth||0,height:t&&t.clientHeight||n&&n.offsetHeight||window.innerHeight||0}}function getTimeStamp(){return(new Date).getTime()}function getTimeStampBySecond(){return Date.parse(new Date)/1e3}function loadScript(e,t,n){var r=arguments.length>3&&arguments[3]!==undefined&&arguments[3],i=document.createElement("script");if(i.onload=i.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||("function"==typeof t&&t(),i.onload=i.onreadystatechange=null,i.parentNode&&!r&&i.parentNode.removeChild(i))},n)for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];null===a?i.removeAttribute(a):i.setAttribute(o,a)}i.src=e,document.getElementsByTagName("head")[0].appendChild(i)}function serializeParams(e){var t=[],n=function(e,n){n="function"==typeof n?n():n,n=null===n?"":n===undefined?"":n,t[t.length]=encodeURIComponent(e)+"="+encodeURIComponent(n)};return function r(e,i){var o=void 0,a=void 0,s=void 0;if(e)if(Array.isArray(i))for(o=0,a=i.length;o<a;o++)r(e+"["+("object"===_typeof(i[o])&&i[o]?o:"")+"]",i[o]);else if("[object Object]"===String(i))for(s in i)r(e+"["+s+"]",i[s]);else n(e,i);else if(Array.isArray(i))for(o=0,a=i.length;o<a;o++)n(i[o].name,i[o].value);else for(s in i)r(s,i[s]);return t}("",e).join("&")}function encodeHTML(e){return e.length?String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/\'/g,"&#39;").replace(/\//g,"&#x2F;"):""}function isWebrtcUrl(e){return/webrtc:\/\//.test(e)||/\.sdp/.test(e)}function getperformance(){return window.performance||window.msPerformance||window.webkitPerformance||{}}function arrangeWebrtcSource(e,t){var n=getParams("tabr_bitrates",e),r=getParams("tabr_start_bitrate",e),i="auto"===getParams("tabr_control",e);e=e.replace("&tabr_control=auto","");var o=[],a=[];if(n&&r){if(a=n.split(",").map(function(n){var i,a=t.webrtcConfig.abrLabels[n]||n;return o.push(a),i={},i[a]=[{src:e.replace("tabr_start_bitrate="+r,"tabr_start_bitrate="+n)}],i}),i){var s;a.push((s={},s[t.webrtcConfig.abrLabels.auto||"AUTO"]=[{src:e+"&tabr_control=auto"}],s)),o.push(t.webrtcConfig.abrLabels.auto||"AUTO")}var c={};a.forEach(function(e){for(var t in e)c[t]=e[t]}),t.showOrder=o,t.defaultRes=i?t.webrtcConfig.abrLabels.auto||"AUTO":t.webrtcConfig.abrLabels[r]||r||o[0];var l={};o.forEach(function(e){l[e]=t.webrtcConfig.abrLabels[e]||e}),t.labels=l,t.label=l,t.sources=[],t.multiResolution={sources:c}}}function rangeCheck(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}function getRange(e,t,n,r){return rangeCheck(e,r,n.length-1),n[r][t]}function createTimeRangesObj(e){return e===undefined||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:getRange.bind(null,"start",0,e),end:getRange.bind(null,"end",1,e)}}function createTimeRanges(e,t){return Array.isArray(e)?createTimeRangesObj(e):e===undefined||t===undefined?createTimeRangesObj():createTimeRangesObj([[e,t]])}function bufferedPercent(e,t){var n=0,r=void 0,i=void 0;if(!t)return 0;e&&e.length||(e=createTimeRanges(0,0));for(var o=0;o<e.length;o++)r=e.start(o),i=e.end(o),i>t&&(i=t),n+=i-r;return n/t}function MediaError(e){if(e instanceof MediaError)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:isObject$1(e)&&("number"==typeof e.code&&(this.code=e.code),assign(this,e)),this.message||(this.message=MediaError.defaultMessages[this.code]||"")}function SafeParseTuple(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(i){r=i}return[r,n]}function isPromise(e){return e!==undefined&&"function"==typeof e.then}function silencePromise(e){isPromise(e)&&e.then(null,function(e){})}function isFunction$1(e){if(!e)return!1;var t=toString$1.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}function extend$1(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}function forEachArray(e,t){for(var n=0;n<e.length;n++)t(e[n])}function isEmpty(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function initParams(e,t,n){var r=e;return isFunction_1(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=immutable(t,{uri:e}),r.callback=n,r}function createXHR(e,t,n){return t=initParams(e,t,n),_createXHR(t)}function _createXHR(e){function t(){4===s.readyState&&setTimeout(i,0)}function n(){var e=undefined;if(e=s.response?s.response:s.responseText||getXml(s),b)try{e=JSON.parse(e)}catch(t){}return e}function r(e){return clearTimeout(u),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,a(e,m)}function i(){if(!l){var t;clearTimeout(u),t=e.useXDR&&s.status===undefined?200:1223===s.status?204:s.status;var r=m,i=null;return 0!==t?(r={body:n(),statusCode:t,method:p,headers:{},url:d,rawRequest:s},s.getAllResponseHeaders&&(r.headers=parseHeaders(s.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),a(i,r,r.body)}}if("undefined"==typeof e.callback)throw new Error("callback argument missing");var o=!1,a=function(t,n,r){o||(o=!0,e.callback(t,n,r))},s=e.xhr||null;s||(s=e.cors||e.useXDR?new createXHR.XDomainRequest:new createXHR.XMLHttpRequest);var c,l,u,d=s.url=e.uri||e.url,p=s.method=e.method||"GET",h=e.body||e.data,f=s.headers=e.headers||{},g=!!e.sync,b=!1,m={body:undefined,headers:{},statusCode:0,method:p,url:d,rawRequest:s};if("json"in e&&!1!==e.json&&(b=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),h=JSON.stringify(!0===e.json?h:e.json))),s.onreadystatechange=t,s.onload=i,s.onerror=r,s.onprogress=function(){},s.onabort=function(){l=!0},s.ontimeout=r,s.open(p,d,!g,e.username,e.password),g||(s.withCredentials=!!e.withCredentials),!g&&e.timeout>0&&(u=setTimeout(function(){if(!l){l=!0,s.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}},e.timeout)),s.setRequestHeader)for(c in f)f.hasOwnProperty(c)&&s.setRequestHeader(c,f[c]);else if(e.headers&&!isEmpty(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(s.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(s),s.send(h||null),s}function getXml(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;return""!==e.responseType||t?null:e.responseXML}function noop(){}function ParsingError(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function parseTimeStamp(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function Settings(){this.values=_objCreate(null)}function parseOptions(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length){var s=a[0],c=a[1];t(s,c)}}}function parseCue(e,t,n){function r(){var t=parseTimeStamp(e);if(null===t)throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function i(){e=e.replace(/^\s+/,"")}var o=e;if(i(),t.startTime=r(),i(),"--\x3e"!==e.substr(0,3))throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);e=e.substr(3),i(),t.endTime=r(),i(),function(e,t){var r=new Settings;parseOptions(e,function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"])}},/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line","auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align","middle"),t.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}function parseContent(e,t){function n(e){return ESCAPE[e]}for(var r,i=e.document.createElement("div"),o=i,a=[];null!==(r=function(){if(!t)return null;var e=t.match(/^([^<]*)(<[^>]+>?)?/);return function(e){return t=t.substr(e.length),e}(e[1]?e[1]:e[2])}());)if("<"!==r[0])o.appendChild(e.document.createTextNode(function(e){for(;l=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(l[0],n);return e}(r)));else{if("/"===r[1]){a.length&&a[a.length-1]===r.substr(2).replace(">","")&&(a.pop(),o=o.parentNode);continue}var s,c=parseTimeStamp(r.substr(1,r.length-2));if(c){s=e.document.createProcessingInstruction("timestamp",c),o.appendChild(s);continue}var l=r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!l)continue;if(!(s=function(t,n){var r=TAG_NAME[t];if(!r)return null;var i=e.document.createElement(r);i.localName=r;var o=TAG_ANNOTATION[t];return o&&n&&(i[o]=n.trim()),i}(l[1],l[3])))continue;if(!function(e,t){return!NEEDS_PARENT[t.localName]||NEEDS_PARENT[t.localName]===e.localName}(o,s))continue;l[2]&&(s.className=l[2].substr(1).replace("."," ")),a.push(l[1]),o.appendChild(s),o=s}return i}function isStrongRTLChar(e){for(var t=0;t<strongRTLRanges.length;t++){var n=strongRTLRanges[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function determineBidi(e){function t(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function n(e){if(!e||!e.length)return null;var r=e.pop(),i=r.textContent||r.innerText;if(i){var o=i.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):i}return"ruby"===r.tagName?n(e):r.childNodes?(t(e,r),n(e)):void 0}var r,i=[],o="";if(!e||!e.childNodes)return"ltr";for(t(i,e);o=n(i);)for(var a=0;a<o.length;a++)if(r=o.charCodeAt(a),isStrongRTLChar(r))return"rtl";return"ltr"}function computeLinePos(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}function StyleBox(){}function CueStyleBox(e,t,n){var r=/MSIE\s8\.0/.test(navigator.userAgent),i="rgba(255, 255, 255, 1)",o="rgba(0, 0, 0, 0.8)";r&&(i="rgb(255, 255, 255)",o="rgb(0, 0, 0)"),StyleBox.call(this),this.cue=t,this.cueDiv=parseContent(e,t.text);var a={color:i,backgroundColor:o,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};r||(a.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",a.unicodeBidi="plaintext"),this.applyStyles(a,this.cueDiv),this.div=e.document.createElement("div"),a={textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},r||(a.direction=determineBidi(this.cueDiv),a.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(a),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":s=t.position;break;case"middle":s=t.position-t.size/2;break;case"end":s=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function BoxPosition(e){var t,n,r,i,o=/MSIE\s8\.0/.test(navigator.userAgent);if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=t!==undefined?t:e.lineHeight,o&&!this.lineHeight&&(this.lineHeight=13)}function moveBoxToLinePosition(e,t,n,r){var i=new BoxPosition(t),o=t.cue,a=computeLinePos(o),s=[];if(o.snapToLines){var c;switch(o.vertical){case"":s=["+y","-y"],c="height";break;case"rl":s=["+x","-x"],c="width";break;case"lr":s=["-x","+x"],c="width"}var l=i.lineHeight,u=l*Math.round(a),d=n[c]+l,p=s[0];Math.abs(u)>d&&(u=u<0?-1:1,u*=Math.ceil(d/l)*l),a<0&&(u+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(p,u)}else{var h=i.lineHeight/n.height*100;switch(o.lineAlign){case"middle":a-=h/2;break;case"end":a-=h}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new BoxPosition(t)}var f=function(e,t){for(var i,o=new BoxPosition(e),a=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var c=e.intersectPercentage(n);a>c&&(i=new BoxPosition(e),a=c),e=new BoxPosition(o)}return i||o}(i,s);t.move(f.toCSSCompatValues(n))}function WebVTT$1(){}function findDirectionSetting(e){return"string"==typeof e&&(!!directionSetting[e.toLowerCase()]&&e.toLowerCase())}function findAlignSetting(e){return"string"==typeof e&&(!!alignSetting[e.toLowerCase()]&&e.toLowerCase())}function extend$2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function VTTCue(e,t,n){var r=this,i=/MSIE\s8\.0/.test(navigator.userAgent),o={};i?r=document.createElement("custom"):o.enumerable=!0,r.hasBeenReset=!1;var a="",s=!1,c=e,l=t,u=n,d=null,p="",h=!0,f="auto",g="start",b=50,m="middle",y=50,x="middle";if(Object.defineProperty(r,"id",extend$2({},o,{get:function(){return a},set:function(e){a=""+e}})),Object.defineProperty(r,"pauseOnExit",extend$2({},o,{get:function(){return s},set:function(e){s=!!e}})),Object.defineProperty(r,"startTime",extend$2({},o,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"endTime",extend$2({},o,{get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"text",extend$2({},o,{get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}})),Object.defineProperty(r,"region",extend$2({},o,{get:function(){return d},set:function(e){d=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"vertical",extend$2({},o,{get:function(){return p},set:function(e){var t=findDirectionSetting(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");p=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"snapToLines",extend$2({},o,{get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}})),Object.defineProperty(r,"line",extend$2({},o,{get:function(){return f},set:function(e){if("number"!=typeof e&&e!==autoKeyword)throw new SyntaxError("An invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"lineAlign",extend$2({},o,{get:function(){return g},set:function(e){var t=findAlignSetting(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");g=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"position",extend$2({},o,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",extend$2({},o,{get:function(){return m},set:function(e){var t=findAlignSetting(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",extend$2({},o,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",extend$2({},o,{get:function(){return x},set:function(e){var t=findAlignSetting(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");x=t,this.hasBeenReset=!0}})),r.displayState=undefined,i)return r}function findScrollSetting(e){return"string"==typeof e&&(!!scrollSetting[e.toLowerCase()]&&e.toLowerCase())}function isValidPercentValue(e){return"number"==typeof e&&e>=0&&e<=100}function VTTRegion(){var e=100,t=3,n=0,r=100,i=0,o=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!isValidPercentValue(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!isValidPercentValue(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!isValidPercentValue(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!isValidPercentValue(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!isValidPercentValue(e))throw new Error("ViewportAnchorX must be between 0 and 100.");i=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=findScrollSetting(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");a=t}}})}function createTrackHelper(e,t,n,r){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{},o=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var a=new ALL.text.TrackClass(i);return o.addTrack(a),a}function use(e,t){middlewares[e]=middlewares[e]||[],middlewares[e].push(t)}function setSource(e,t,n){e.setTimeout(function(){return setSourceHelper(t,middlewares[t.type],n,e)},1)}function setTech(e,t){e.forEach(function(e){return e.setTech&&e.setTech(t)})}function get$1(e,t,n){return e.reduceRight(middlewareIterator(n),t[n]())}function set$1(e,t,n,r){return t[n](e.reduce(middlewareIterator(n),r))}function middlewareIterator(e){return function(t,n){return n[e]?n[e](t):t}}function setSourceHelper(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],r=arguments[3],i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:[],o=arguments.length>5&&arguments[5]!==undefined&&arguments[5],a=t[0],s=t.slice(1);if("string"==typeof a)setSourceHelper(e,middlewares[a],n,r,i,o);else if(a){var c=a(r);c.setSource(assign({},e),function(t,a){if(t)return setSourceHelper(e,s,n,r,i,o);i.push(c),
2
+ setSourceHelper(a,e.type===a.type?s:middlewares[a.type],n,r,i,o)})}else s.length?setSourceHelper(e,s,n,r,i,o):o?n(e,i):setSourceHelper(e,middlewares["*"],n,r,i,!0)}function constructColor(e,t){return"rgba("+parseInt(e[1]+e[1],16)+","+parseInt(e[2]+e[2],16)+","+parseInt(e[3]+e[3],16)+","+t+")"}function tryUpdateStyle(e,t,n){try{e.style[t]=n}catch(r){return}}function formatTime(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===Infinity)&&(i=r=n="-"),i=i>0||a>0?i+":":"",r=((i||o>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n}function parseOptionValue(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}function getSelectedOptionValue(e,t){return parseOptionValue(e.options[e.options.selectedIndex].value,t)}function setSelectedOption(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(parseOptionValue(e.options[r].value,n)===t){e.selectedIndex=r;break}}function videojs(e,t,n){var r=void 0;if("string"==typeof e){var i=videojs.getPlayers();if(0===e.indexOf("#")&&(e=e.slice(1)),i[e])return t&&log$2.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&i[e].ready(n),i[e];r=$("#"+e)}else r=e;if(!r||!r.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");if(r.player||Player.players[r.playerId])return r.player||Player.players[r.playerId];isEl(r)&&!document_1.body.contains(r)&&log$2.warn("The element supplied is not included in the DOM"),t=t||{},videojs.hooks("beforesetup").forEach(function(e){var n=e(r,mergeOptions(t));if(!isObject$1(n)||Array.isArray(n))return void log$2.error("please return an object in beforesetup hooks");t=mergeOptions(t,n)});var o=Component.getComponent("Player"),a=new o(r,t,n);return videojs.hooks("setup").forEach(function(e){return e(a)}),a}function toObject(e){if(null===e||e===undefined)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}function decodeComponents(e,t){try{return decodeURIComponent(e.join(""))}catch(i){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],decodeComponents(n),decodeComponents(r))}function decode(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(singleMatcher),n=1;n<t.length;n++)e=decodeComponents(t,n).join(""),t=e.match(singleMatcher);return e}}function customDecodeURIComponent(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=multiMatcher.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(s){var r=decode(n[0]);r!==n[0]&&(t[n[0]]=r)}n=multiMatcher.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),o=0;o<i.length;o++){var a=i[o];e=e.replace(new RegExp(a,"g"),t[a])}return e}function encoderForArrayFormat(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[encode(t,e),"[",r,"]"].join(""):[encode(t,e),"[",encode(r,e),"]=",encode(n,e)].join("")};case"bracket":return function(t,n){return null===n?encode(t,e):[encode(t,e),"[]=",encode(n,e)].join("")};default:return function(t,n){return null===n?encode(t,e):[encode(t,e),"=",encode(n,e)].join("")}}}function parserForArrayFormat(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t)return void(r[e]=n);r[e]===undefined&&(r[e]={}),r[e][t[1]]=n};case"bracket":return function(e,n,r){return t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?r[e]===undefined?void(r[e]=[n]):void(r[e]=[].concat(r[e],n)):void(r[e]=n)};default:return function(e,t,n){if(n[e]===undefined)return void(n[e]=t);n[e]=[].concat(n[e],t)}}}function encode(e,t){return t.encode?t.strict?strictUriEncode(e):encodeURIComponent(e):e}function keysSorter(e){return Array.isArray(e)?e.sort():"object"==typeof e?keysSorter(Object.keys(e)).sort(function(e,t){return Number(e)-Number(t)}).map(function(t){return e[t]}):e}function extract(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function parse(e,t){t=objectAssign({arrayFormat:"none"},t);var n=parserForArrayFormat(t),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach(function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),o=t.length>0?t.join("="):undefined;o=o===undefined?null:decodeUriComponent(o),n(decodeUriComponent(i),o,r)}),Object.keys(r).sort().reduce(function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=keysSorter(n):e[t]=n,e},Object.create(null))):r}function jsonp(e,t,n){function r(){l.parentNode&&l.parentNode.removeChild(l),window[s]="",u&&clearTimeout(u)}function i(){window[s]&&r()}"function"==typeof t&&(n=t,t={}),t||(t={});var o,a=t.prefix||"__jp",s=t.name||a+count++,c=t.funcKey||"callback";o="object"==_typeof(t.param)?queryString.stringify(t.param):t.param;var l,u,d=null!=t.timeout?t.timeout:6e3,p=encodeURIComponent,h=document.getElementsByTagName("script")[0]||document.head;return d&&(u=setTimeout(function(){r(),n&&n(new Error("Timeout"))},d)),window[s]=function(e){r(),n&&n(null,e)},e+=(~e.indexOf("?")?"&":"?")+o+"&"+c+"="+p(s),e=e.replace("?&","?"),l=document.createElement("script"),l.setAttribute("src",e),l.setAttribute("async",!0),l.onload=function(e){},l.onreadystatechange=function(){"loaded"===this.readyState&&window[s]&&(r(),n&&n(new Error("ServerError")))},l.onerror=function(e){r(),n&&n(new Error("ServerError"))},h.parentNode.insertBefore(l,h),i}function getRawTag(e){var t=hasOwnProperty$2.call(e,symToStringTag$1),n=e[symToStringTag$1];try{e[symToStringTag$1]=undefined;var r=!0}catch(o){}var i=nativeObjectToString.call(e);return r&&(t?e[symToStringTag$1]=n:delete e[symToStringTag$1]),i}function objectToString(e){return nativeObjectToString$1.call(e)}function baseGetTag(e){return null==e?e===undefined?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?_getRawTag(e):_objectToString(e)}function isObjectLike(e){return null!=e&&"object"==typeof e}function isSymbol(e){return"symbol"==typeof e||isObjectLike_1(e)&&_baseGetTag(e)==symbolTag}function isKey(e,t){if(isArray_1(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!isSymbol_1(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}function isObject$2(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function isFunction$3(e){if(!isObject_1(e))return!1;var t=_baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}function toSource(e){if(null!=e){try{return funcToString$1.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function baseIsNative(e){return!(!isObject_1(e)||_isMasked(e))&&(isFunction_1$2(e)?reIsNative:reIsHostCtor).test(_toSource(e))}function getValue(e,t){return null==e?undefined:e[t]}function getNative(e,t){var n=_getValue(e,t);return _baseIsNative(n)?n:undefined}function hashClear(){this.__data__=_nativeCreate?_nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function hashGet(e){var t=this.__data__;if(_nativeCreate){var n=t[e];return n===HASH_UNDEFINED?undefined:n}return hasOwnProperty$4.call(t,e)?t[e]:undefined}function hashHas(e){var t=this.__data__;return _nativeCreate?t[e]!==undefined:hasOwnProperty$5.call(t,e)}function hashSet(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_nativeCreate&&t===undefined?HASH_UNDEFINED$1:t,this}function Hash(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!==e&&t!==t}function assocIndexOf(e,t){for(var n=e.length;n--;)if(eq_1(e[n][0],t))return n;return-1}function listCacheDelete(e){var t=this.__data__,n=_assocIndexOf(t,e);return!(n<0)&&(n==t.length-1?t.pop():splice.call(t,n,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,n=_assocIndexOf(t,e);return n<0?undefined:t[n][1]}function listCacheHas(e){return _assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var n=this.__data__,r=_assocIndexOf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ListCache(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function mapCacheClear(){this.size=0,this.__data__={hash:new _Hash,map:new(_Map||_ListCache),string:new _Hash}}function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var n=e.__data__;return _isKeyable(t)?n["string"==typeof t?"string":"hash"]:n.map}function mapCacheDelete(e){var t=_getMapData(this,e)["delete"](e);return this.size-=t?1:0,t}function mapCacheGet(e){return _getMapData(this,e).get(e)}function mapCacheHas(e){return _getMapData(this,e).has(e)}function mapCacheSet(e,t){var n=_getMapData(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function MapCache(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(memoize.Cache||_MapCache),n}function memoizeCapped(e){var t=memoize_1(e,function(e){return n.size===MAX_MEMOIZE_SIZE&&n.clear(),e}),n=t.cache;return t}function arrayMap(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function baseToString(e){if("string"==typeof e)return e;if(isArray_1(e))return _arrayMap(e,baseToString)+"";if(isSymbol_1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}function toString$2(e){return null==e?"":_baseToString(e)}function castPath(e,t){return isArray_1(e)?e:_isKey(e,t)?[e]:_stringToPath(toString_1(e))}function toKey(e){if("string"==typeof e||isSymbol_1(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}function baseGet(e,t){t=_castPath(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[_toKey(t[n++])];return n&&n==r?e:undefined}function get$2(e,t,n){var r=null==e?undefined:_baseGet(e,t);return r===undefined?n:r}function mountHlsProvider(e){if(videojs.browser.IS_IOS&&videojs.browser.IS_MQQ||videojs.browser.IS_UC)return!1;if(videojs.browser.IS_ENABLED_MSE||videojs.browser.IS_SIMULATOR||e)try{var t=videojs.getTech&&videojs.getTech("Html5");t&&t.registerSourceHandler(HlsSourceHandler,0)}catch(n){}}function handlePlaybackMetadataLoaded(e,t){function n(e){return"dash-audio-"+e}function r(e,t){return e.find(function(e){return n(e.index)===t.id})}var i=e.dash.mediaPlayer,o=i.getTracksFor("audio"),a=e.audioTracks();a.length&&t.clearTracks(["audio"]);var s=i.getCurrentTrackFor("audio");o.forEach(function(e){var t=e.lang;e.roles&&e.roles.length&&(t+=" ("+e.roles.join(", ")+")"),a.addTrack(new videojs.AudioTrack({enabled:e===s,id:n(e.index),kind:e.kind||"main",label:t,language:e.lang}))});var c=function(){for(var e=0;e<a.length;e++){var t=a[e];if(t.enabled){var n=r(o,t);i.setCurrentTrack(n)}else;}};a.addEventListener("change",c),e.dash.mediaPlayer.on(window.dashjs.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,function(){a.removeEventListener("change",c)})}function setupAudioTracks(e,t){e.dash.mediaPlayer.on(window.dashjs.MediaPlayer.events.PLAYBACK_METADATA_LOADED,handlePlaybackMetadataLoaded.bind(null,e,t))}function find(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function attachDashTextTracksToVideojs(e,t,n){function r(){for(var t=e.dash.mediaPlayer,r=e.textTracks(),o=-1,a=0;a<r.length;a+=1)!function(e){var t=r[e];if("showing"===t.mode){var a=find(i,function(e){return e.textTrack===t}),s=a?a.dashTrack:null;s&&(o=n.indexOf(s))}}(a);o!==t.getCurrentTextTrackIndex()&&t.setTextTrack(o)}var i=[],o=n.map(function(e){return{dashTrack:e,trackConfig:{label:e.lang,language:e.lang,srclang:e.lang,kind:e.kind}}}).map(function(t){var n=t.trackConfig,r=t.dashTrack,o=e.addRemoteTextTrack(n,!1);return i.push({textTrack:o.track,dashTrack:r}),o});return e.textTracks().on("change",r),e.dash.mediaPlayer.on(window_1.dashjs.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,function(){e.textTracks().off("change",r)}),r(),o}function setupTextTracks(e,t,n){function r(){o.forEach(e.removeRemoteTextTrack.bind(e)),o=[]}function i(s){var c=(s.index,s.tracks);a.off(window_1.dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,i),r(),c.length&&(o=attachDashTextTracksToVideojs(e,t,c,n))}window_1.VTTCue&&!/\[native code\]/.test(window_1.VTTCue.toString())&&(window_1.VTTCue=!1);var o=[];if(t.featuresNativeTextTracks)return void videojs.log.error("You must pass {html: {nativeCaptions: false}} in the videojs constructor to use text tracks in videojs-contrib-dash");var a=e.dash.mediaPlayer;a.on(window_1.dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,i),a.on(window_1.dashjs.MediaPlayer.events.CAN_PLAY,function(){a.off(window_1.dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,i)})}function mountDashProvider(e){(window_1.MediaSource||e)&&videojs.getTech("Html5").registerSourceHandler(videojs.DashSourceHandler(),0)}function getTemplate(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"fill",n=e,r="draw-"+t;return['<svg height="100%" width="100%" viewBox="0 0 484 348">\n <path class="'+r+'" transform="translate(4 4)" d="M383,124C350-42,122.3-40.5,90.6,123.5c-110.4,18.5-131,185,.6,216.5H381.6C519.7,310.7,494.1,137.8,383,124Z"/>\n <path transform="translate(4 4)" d="M200.4,110.2c-9.4-5.8-19.6,2.7-19.4,11.7V256.2c0,8,10.4,16.7,19.4,10.8,2.2-1.4,111.8-65.9,114-67.3,7.4-4,10.1-15.8,0-22.2Z" style="fill:#fff ;"/>\n </svg>','<svg height="100%" width="100%" viewBox="0 0 476 340">\n <path class="'+r+'" d="M383,124C350-42,122.3-40.5,90.6,123.5c-110.4,18.5-131,185,.6,216.5H381.6C519.7,310.7,494.1,137.8,383,124Z"/>\n <path d="M200.4,110.2c-9.4-5.8-19.6,2.7-19.4,11.7V256.2c0,8,10.4,16.7,19.4,10.8,2.2-1.4,111.8-65.9,114-67.3,7.4-4,10.1-15.8,0-22.2Z" style="fill:#fff ;"/>\n </svg>','<svg height="100%" width="100%" viewBox="0 14 96 68">\n <path class="'+r+'" d="M96,44.3v7.3c-0.1,7.7-1,15.5-1,15.5s-0.9,6.6-3.8,9.5c-3.6,3.8-7.7,3.8-9.6,4c-13.4,1-33.5,0.9-33.5,0.9 c-0.8,0-25-0.2-32.5-0.9c-2.1-0.4-6.9-0.3-10.6-4.1c-2.9-2.9-3.8-9.5-3.8-9.5s-1-7.7-1.1-15.5v-7.3c0.2-7.8,1.1-15.5,1.1-15.5 s0.9-6.6,3.8-9.5c3.6-3.8,7.7-3.8,9.6-4.1c13.4-1,33.5-0.9,33.5-0.9s20.1-0.1,33.5,0.9c1.9,0.2,5.9,0.2,9.6,4.1 c2.9,2.9,3.8,9.5,3.8,9.5S95.9,36.6,96,44.3z M38.3,61.4L64,47.9L38.3,34.4V61.4z"/>\n <polygon points="64,47.9 38.3,61.4 38.3,34.4" fill="#fff"/>\n </svg>'][n]}function trimmedEndIndex(e){for(var t=e.length;t--&&reWhitespace.test(e.charAt(t)););return t}function baseTrim(e){return e?e.slice(0,_trimmedEndIndex(e)+1).replace(reTrimStart,""):e}function toNumber(e){if("number"==typeof e)return e;if(isSymbol_1(e))return NAN;if(isObject_1(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject_1(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=_baseTrim(e);var n=reIsBinary.test(e);return n||reIsOctal.test(e)?freeParseInt(e.slice(2),n?2:8):reIsBadHex.test(e)?NAN:+e}function debounce(e,t,n){function r(t){var n=p,r=h;return p=h=undefined,y=t,g=e.apply(r,n)}function i(e){return y=e,b=setTimeout(s,t),x?r(e):g}function o(e){var n=e-m,r=e-y,i=t-n;return _?nativeMin(i,f-r):i}function a(e){var n=e-m,r=e-y;return m===undefined||n>=t||n<0||_&&r>=f}function s(){var e=now_1();if(a(e))return c(e);b=setTimeout(s,o(e))}function c(e){return b=undefined,v&&p?r(e):(p=h=undefined,g)}function l(){b!==undefined&&clearTimeout(b),y=0,p=m=h=b=undefined}function u(){return b===undefined?g:c(now_1())}function d(){var e=now_1(),n=a(e);if(p=arguments,h=this,m=e,n){if(b===undefined)return i(m);if(_)return clearTimeout(b),b=setTimeout(s,t),r(m)}return b===undefined&&(b=setTimeout(s,t)),g}var p,h,f,g,b,m,y=0,x=!1,_=!1,v=!0;if("function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT$2);return t=toNumber_1(t)||0,isObject_1(n)&&(x=!!n.leading,_="maxWait"in n,f=_?nativeMax(toNumber_1(n.maxWait)||0,t):f,v="trailing"in n?!!n.trailing:v),d.cancel=l,d.flush=u,d}function throttle$1(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT$1);return isObject_1(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),debounce_1(e,t,{leading:r,maxWait:t,trailing:i})}function mountFlvProvider(e){if(videojs.browser.IS_IOS&&videojs.browser.IS_MQQ)return!1;if(!videojs.browser.IS_TBS&&!videojs.browser.IS_MQQB&&(!IS_IOS||!videojs.browser.IS_SAFARI)&&!videojs.browser.IE_VERSION||e)try{var t=videojs.getTech&&videojs.getTech("Html5");t&&t.registerSourceHandler(FlvSourceHandler,0)}catch(n){}}function mountWebRTCProvider(e){if(!videojs.browser.isWebRTCSupported())return!1;try{var t=videojs.getTech&&videojs.getTech("Html5");t&&t.registerSourceHandler(sourceHandler,0)}catch(n){}}function FlashRtmpDecorator(e){return e.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},e.streamFromParts=function(e,t){return e+"&"+t},e.streamToParts=function(e){var t={connection:"",stream:""};if(!e)return t;var n=e.search(/&(?!\w+=)/),r=void 0;return-1!==n?r=n+1:0===(n=r=e.lastIndexOf("/")+1)&&(n=r=e.length),t.connection=e.substring(0,n),t.stream=e.substring(r,e.length),t},e.isStreamingType=function(t){return t in e.streamingFormats},e.RTMP_RE=/^rtmp[set]?:\/\//i,e.isStreamingSrc=function(t){return e.RTMP_RE.test(t)},e.rtmpSourceHandler={},e.rtmpSourceHandler.canPlayType=function(t){return e.isStreamingType(t)?"maybe":""},e.rtmpSourceHandler.canHandleSource=function(t,n){var r=e.rtmpSourceHandler.canPlayType(t.type);return r||(e.isStreamingSrc(t.src)?"maybe":"")},e.rtmpSourceHandler.handleSource=function(t,n,r){var i=e.streamToParts(t.src);n.setRtmpConnection(i.connection),n.setRtmpStream(i.stream)},e.registerSourceHandler(e.rtmpSourceHandler),e}function _createSetter(e){var t=e.charAt(0).toUpperCase()+e.slice(1);_api["set"+t]=function(t){return this.el_.vjs_setProperty(e,t)}}function _createGetter(e){_api[e]=function(){return this.el_.vjs_getProperty(e)}}function TCPlayer(e,t,n){var r=void 0,i=(new Date).getTime(),o=videojs.dom;if("string"==typeof e)r=document.querySelector("#"+e);else{if(!e||!e.nodeName)throw new TypeError("The ID or element supplied is not valid.");r=e}if("video"!=r.nodeName.toLowerCase()&&"audio"!=r.nodeName.toLowerCase())throw new TypeError("The element type must be <video>.");o.hasClass(r,"tcplayer")||o.addClass(r,"tcplayer"),o.hasClass(r,"video-js")||o.addClass(r,"video-js"),videojs.browser.IE_VERSION&&(r.style.width||r.offsetWidth&&300!==r.offsetWidth)&&(window_1.VIDEOJS_NO_DYNAMIC_STYLE=!0);var a={controls:!0,language:"zh-CN",playbackRates:[.5,1,1.25,1.5,2],controlBar:{volumePanel:{inline:"video"!=r.nodeName.toLowerCase()},fullscreenToggle:"video"==r.nodeName.toLowerCase(),QualitySwitcherMenuButton:!0},plugins:{Skin:"",VID:"",QualitySwitcher:{},MultiResolution:{},Errors:{},Reporter:{},ContextMenu:{},LevelSwitch:{},VttThumbnail:{},PlayerMetrics:{}},webrtcConfig:{enableAbr:!0,abrLabels:{}}};t=videojs.mergeOptions(a,t),t.webrtcConfig.enableAbr&&(isWebrtcUrl(t.sources)&&t.sources&&"string"==typeof t.sources&&arrangeWebrtcSource(t.sources,t),t.sources&&Array.isArray(t.sources)&&t.sources[0]&&t.sources[0].src&&isWebrtcUrl(t.sources[0].src)&&arrangeWebrtcSource(t.sources[0].src,t)),videojs.browser.IE_VERSION&&videojs.browser.IE_VERSION<11&&window_1.top,log("player initializing",t),videojs.getComponent("player").prototype.options_.children.splice(1,0,"logoImage");var s=videojs(e,t,n);return s.PlayerMetrics(t).setTimingData({initStart:i}),log("player initialized",t),s}var version="5.0.0",commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},win;win="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};var window_1=win,empty={},empty$1=(Object.freeze||Object)({"default":empty}),minDoc=empty$1&&empty||empty$1,topLevel=void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:{},doccy;"undefined"!=typeof document?doccy=document:(doccy=topLevel["__GLOBAL_DOCUMENT_CACHE@4"])||(doccy=topLevel["__GLOBAL_DOCUMENT_CACHE@4"]=minDoc);var document_1=doccy,USER_AGENT=window_1.navigator&&window_1.navigator.userAgent||"",VENDOR=window_1.navigator&&window_1.navigator.vendor||"",webkitVersionMap=/AppleWebKit\/([\d.]+)/i.exec(USER_AGENT),appleWebkitVersion=webkitVersionMap?parseFloat(webkitVersionMap.pop()):null,IS_IPAD=/iPad/i.test(USER_AGENT),IS_IPHONE=/iPhone/i.test(USER_AGENT)&&!IS_IPAD,IS_IPOD=/iPod/i.test(USER_AGENT),IS_IOS=IS_IPHONE||IS_IPAD||IS_IPOD,IOS_VERSION=function(){var e=USER_AGENT.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),IOS_VERSION_ARRAY=function(){var e=USER_AGENT.match(/OS (\d+)_(\d+)_?(\d+)?/i);return e&&[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]||[]}(),IS_ANDROID=/Android/i.test(USER_AGENT),ANDROID_VERSION=function(){var e=USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),IS_TBS=/TBS\/\d+/i.test(USER_AGENT),TBS_VERSION=function(){var e=USER_AGENT.match(/TBS\/(\d+)/i);if(e&&e[1])return e[1]}(),IS_MQQB=!IS_TBS&&/MQQBrowser\/\d+/i.test(USER_AGENT),IS_QQB=!IS_TBS&&/ QQBrowser\/\d+/i.test(USER_AGENT),IS_PC_WECHAT=/windowswechat/i.test(USER_AGENT),IS_WECHAT=/(micromessenger|webbrowser)/i.test(USER_AGENT),IS_MQQ=/ QQ\/\d+/i.test(USER_AGENT)||/MQQBrowser\/\d+/i.test(USER_AGENT),IS_OLD_ANDROID=IS_ANDROID&&/webkit/i.test(USER_AGENT)&&ANDROID_VERSION<2.3,IS_NATIVE_ANDROID=IS_ANDROID&&ANDROID_VERSION<5&&appleWebkitVersion<537,IS_FIREFOX=/Firefox/i.test(USER_AGENT),IS_EDGE=/Edge/i.test(USER_AGENT),IS_EDG=/Edg/i.test(USER_AGENT),IS_EDGA=/EdgA/i.test(USER_AGENT),EDG_VERSION=IS_EDG&&function(){var e=USER_AGENT.match(/Edg\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),EDGA_VERSION=IS_EDGA&&function(){var e=USER_AGENT.match(/EdgA\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),IS_CHROME=function(){return!(IS_EDGE||!/Chrome/i.test(USER_AGENT))||!(!/Safari/i.test(USER_AGENT)||!/CriOS/i.test(USER_AGENT))}()&&!IS_WECHAT&&!IS_MQQB&&!IS_QQB,CHROME_VERSION=function(){var e=USER_AGENT.match(/Chrome\/(\d+)/),t=USER_AGENT.match(/CriOS\/(\d+)/);return e&&e[1]?parseFloat(e[1]):t&&t[1]?parseFloat(t[1]):null}(),IS_IE8=/MSIE\s8\.0/.test(USER_AGENT),IE_VERSION=function(){var e=/MSIE\s(\d+)\.\d/.exec(USER_AGENT),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(USER_AGENT)&&/rv:11.0/.test(USER_AGENT)&&(t=11),t}(),IS_SAFARI=/Safari/i.test(USER_AGENT)&&!IS_CHROME&&!IS_ANDROID&&!IS_EDGE&&!IS_MQQB&&!IS_QQB&&!IS_PC_WECHAT,IS_ANY_SAFARI=IS_SAFARI||IS_IOS,IS_SIMULATOR=IS_SAFARI&&"Google Inc."===VENDOR,IS_UC=/UCBrowser\/(\d+)\./i.test(USER_AGENT),IS_QUARK=/Quark\/(\d+)\./i.test(USER_AGENT),TOUCH_ENABLED=isReal()&&("ontouchstart"in window_1||window_1.DocumentTouch&&window_1.document instanceof window_1.DocumentTouch),BACKGROUND_SIZE_SUPPORTED=isReal()&&"backgroundSize"in window_1.document.createElement("video").style,IS_WIN=/Windows/i.test(USER_AGENT),IS_MAC=/MAC OS X/i.test(USER_AGENT),WIN_VER=function(){return/Windows NT ([.\w]+)/.test(USER_AGENT),RegExp.$1}(),MAC_VER=function(){return/Mac OS X (\w+)/.test(USER_AGENT),RegExp.$1}(),QQ_VER=function(){return/QQBrowser\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),EDGE_VER=function(){return/Edge\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),SAFARI_VER=function(){return/Version\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),FIREFOX_VER=function(){return/Firefox\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),CHROME_VER=function(){return/Chrome\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),IS_HUAWEI=/HUAWEI|honor|HMA/i.test(USER_AGENT),IS_XIAOMI=/HM|RedMi|Mi/i.test(USER_AGENT)&&!IS_HUAWEI,IS_OPPO=/OPPO/i.test(USER_AGENT),IS_VIVO=/VIVO/i.test(USER_AGENT),IS_SX=/GT-|SM-|SCH-/i.test(USER_AGENT),IS_ONE=/ONE/i.test(USER_AGENT),IS_CP=/Coolpad/i.test(USER_AGENT),IS_ZX=/ZTE/i.test(USER_AGENT),isWebRTCAPISupported=function(){return["RTCPeerConnection","webkitRTCPeerConnection","RTCIceGatherer"].filter(function(e){return e in window_1}).length>0},isWebRTCSupported=function(){return!IS_UC&&!IS_EDGE&&(!(IS_EDG&&EDG_VERSION<80&&IS_EDGA&&EDGA_VERSION<80)&&(!(IS_FIREFOX&&FIREFOX_VER<56)&&(!(!IS_TBS&&IS_SAFARI&&IS_IOS&&(0===IOS_VERSION_ARRAY.length||IOS_VERSION_ARRAY[0]<11||11===IOS_VERSION_ARRAY[0]&&IOS_VERSION_ARRAY[1]<1||11===IOS_VERSION_ARRAY[0]&&1===IOS_VERSION_ARRAY[1]&&IOS_VERSION_ARRAY[2]<2))&&(!IS_QUARK&&isWebRTCAPISupported()))))},IS_ENABLED_MSE=function(){var e=window_1.MediaSource=window_1.MediaSource||window_1.WebKitMediaSource,t=window_1.SourceBuffer=window_1.SourceBuffer||window_1.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return IS_IOS?undefined:n&&r}(),browser=(Object.freeze||Object)({USER_AGENT:USER_AGENT,IS_IPAD:IS_IPAD,IS_IPHONE:IS_IPHONE,IS_IPOD:IS_IPOD,IS_IOS:IS_IOS,IOS_VERSION:IOS_VERSION,IOS_VERSION_ARRAY:IOS_VERSION_ARRAY,IS_ANDROID:IS_ANDROID,ANDROID_VERSION:ANDROID_VERSION,IS_TBS:IS_TBS,TBS_VERSION:TBS_VERSION,IS_MQQB:IS_MQQB,IS_QQB:IS_QQB,IS_PC_WECHAT:IS_PC_WECHAT,IS_WECHAT:IS_WECHAT,IS_MQQ:IS_MQQ,IS_OLD_ANDROID:IS_OLD_ANDROID,IS_NATIVE_ANDROID:IS_NATIVE_ANDROID,IS_FIREFOX:IS_FIREFOX,IS_EDGE:IS_EDGE,IS_EDG:IS_EDG,IS_EDGA:IS_EDGA,EDG_VERSION:EDG_VERSION,EDGA_VERSION:EDGA_VERSION,IS_CHROME:IS_CHROME,CHROME_VERSION:CHROME_VERSION,IS_IE8:IS_IE8,IE_VERSION:IE_VERSION,IS_SAFARI:IS_SAFARI,IS_ANY_SAFARI:IS_ANY_SAFARI,IS_SIMULATOR:IS_SIMULATOR,IS_UC:IS_UC,IS_QUARK:IS_QUARK,TOUCH_ENABLED:TOUCH_ENABLED,BACKGROUND_SIZE_SUPPORTED:BACKGROUND_SIZE_SUPPORTED,IS_WIN:IS_WIN,IS_MAC:IS_MAC,WIN_VER:WIN_VER,MAC_VER:MAC_VER,QQ_VER:QQ_VER,EDGE_VER:EDGE_VER,SAFARI_VER:SAFARI_VER,FIREFOX_VER:FIREFOX_VER,CHROME_VER:CHROME_VER,IS_HUAWEI:IS_HUAWEI,IS_XIAOMI:IS_XIAOMI,IS_OPPO:IS_OPPO,IS_VIVO:IS_VIVO,IS_SX:IS_SX,IS_ONE:IS_ONE,IS_CP:IS_CP,IS_ZX:IS_ZX,isWebRTCAPISupported:isWebRTCAPISupported,isWebRTCSupported:isWebRTCSupported,IS_ENABLED_MSE:IS_ENABLED_MSE}),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},possibleConstructorReturn=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},taggedTemplateLiteralLoose=function(e,t){return e.raw=t,e},toString=Object.prototype.toString,keys=function(e){return isObject$1(e)?Object.keys(e):[]},log$1=void 0,level="info",history=[],logByType=function(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!!IE_VERSION&&IE_VERSION<11,r=log$1.levels[level],i=new RegExp("^("+r+")$");if("log"!==e&&t.unshift(e.toUpperCase()+":"),history&&history.push([].concat(t)),(log$1.enableLog||"log"!=e)&&(t.unshift("TCPlayer:"),window_1.console)){var o=window_1.console[e];o||"debug"!==e||(o=window_1.console.info||window_1.console.log),o&&r&&i.test(e)&&(n&&(t=t.map(function(e){if(isObject$1(e)||Array.isArray(e))try{return JSON.stringify(e)}catch(t){return String(e)}return String(e)}).join(" ")),o.apply?o[Array.isArray(t)?"apply":"call"](window_1.console,t):o(t))}};log$1=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];logByType("log",t)},log$1.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:level},log$1.level=function(e){if("string"==typeof e){if(!log$1.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');level=e}return level},log$1.history=function(){return history?[].concat(history):[]},log$1.history.clear=function(){history&&(history.length=0)},log$1.history.disable=function(){null!==history&&(history.length=0,history=null)},log$1.history.enable=function(){null===history&&(history=[])},log$1.enableLog=!1,log$1.error=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return logByType("error",t)},log$1.warn=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return logByType("warn",t)},log$1.debug=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return logByType("debug",t)};var log$2=log$1,tsml=function(e){for(var t="",n=0;n<arguments.length;n++)t+=clean(e[n])+(arguments[n+1]||"");return t},_templateObject=taggedTemplateLiteralLoose(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]),$=createQuerier("querySelector"),$$=createQuerier("querySelectorAll"),Dom=(Object.freeze||Object)({isReal:isReal,isEl:isEl,isInFrame:isInFrame,createEl:createEl,textContent:textContent,prependTo:prependTo,hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,setAttributes:setAttributes,getAttributes:getAttributes,getAttribute:getAttribute,setAttribute:setAttribute,removeAttribute:removeAttribute,blockTextSelection:blockTextSelection,unblockTextSelection:unblockTextSelection,getBoundingClientRect:getBoundingClientRect,findPosition:findPosition,getPointerPosition:getPointerPosition,isTextNode:isTextNode,emptyEl:emptyEl,normalizeContent:normalizeContent,appendContent:appendContent,insertContent:insertContent,isSingleLeftClick:isSingleLeftClick,$:$,$$:$$}),_guid=1,elData={},elIdAttr="vdata"+(new Date).getTime(),_supportsPassive=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){_supportsPassive=!0}});window_1.addEventListener("test",null,e),window_1.removeEventListener("test",null,e)}catch(t){}}();var passiveEvents=["touchstart","touchmove"],Events=(Object.freeze||Object)({fixEvent:fixEvent,on:on,off:off,trigger:trigger,one:one}),_windowLoaded=!1,videojs$2=void 0,autoSetup=function(){if(isReal()){var e=document_1.getElementsByTagName("video"),t=document_1.getElementsByTagName("audio"),n=document_1.getElementsByTagName("video-js"),r=[];if(e&&e.length>0)for(var i=0,o=e.length;i<o;i++)r.push(e[i]);if(t&&t.length>0)for(var a=0,s=t.length;a<s;a++)r.push(t[a]);if(n&&n.length>0)for(var c=0,l=n.length;c<l;c++)r.push(n[c]);if(r&&r.length>0)for(var u=0,d=r.length;u<d;u++){var p=r[u];if(!p||!p.getAttribute){autoSetupTimeout(1);break}if(p.player===undefined){var h=p.getAttribute("data-setup");null!==h&&videojs$2(p)}}else _windowLoaded||autoSetupTimeout(1)}};isReal()&&"complete"===document_1.readyState?_windowLoaded=!0:one(window_1,"load",function(){_windowLoaded=!0});var createStyleElement=function(e){
3
+ var t=document_1.createElement("style");return t.className=e,t},setTextContent=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},bind=function(e,t,n){t.guid||(t.guid=newGUID());var r=function(){return t.apply(e,arguments)};return r.guid=n?n+"_"+t.guid:t.guid,r},throttle=function(e,t){var n=Date.now();return function(){var r=Date.now();r-n>=t&&(e.apply(undefined,arguments),n=r)}},EventTarget=function(){};EventTarget.prototype.allowedEvents_={},EventTarget.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},on(this,e,t),this.addEventListener=n},EventTarget.prototype.addEventListener=EventTarget.prototype.on,EventTarget.prototype.off=function(e,t){off(this,e,t)},EventTarget.prototype.removeEventListener=EventTarget.prototype.off,EventTarget.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},one(this,e,t),this.addEventListener=n},EventTarget.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=fixEvent(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),trigger(this,e)},EventTarget.prototype.dispatchEvent=EventTarget.prototype.trigger;var isEvented=function(e){return e instanceof EventTarget||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},isValidEventType=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},validateTarget=function(e){if(!e.nodeName&&!isEvented(e))throw new Error("Invalid target; must be a DOM node or evented object.")},validateEventType=function(e){if(!isValidEventType(e))throw new Error("Invalid event type; must be a non-empty string or array.")},validateListener=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},normalizeListenArgs=function(e,t){var n=t.length<3||t[0]===e||t[0]===e.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],o=t[1]):(r=t[0],i=t[1],o=t[2]),validateTarget(r),validateEventType(i),validateListener(o),o=bind(e,o),{isTargetingSelf:n,target:r,type:i,listener:o}},listen=function(e,t,n,r){validateTarget(e),e.nodeName?Events[t](e,n,r):e[t](n,r)},EventedMixin={on:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=normalizeListenArgs(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,c=i.listener;if(listen(a,"on",s,c),!o){var l=function(){return e.off(a,s,c)};l.guid=c.guid;var u=function(){return e.off("dispose",l)};u.guid=c.guid,listen(this,"on","dispose",l),listen(a,"on","dispose",u)}},one:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=normalizeListenArgs(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,c=i.listener;if(o)listen(a,"one",s,c);else{var l=function u(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.off(a,s,u),c.apply(null,n)};l.guid=c.guid,listen(a,"one",s,l)}},off:function(e,t,n){if(!e||isValidEventType(e))isValidEventType(t)?off(this.eventBusEl_,t,n):off(this.eventBusEl_,e,t);else{var r=e,i=t;validateTarget(r),validateEventType(i),validateListener(n),n=bind(this,n),this.off("dispose",n),r.nodeName?(off(r,i,n),off(r,"dispose",n)):isEvented(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){return trigger(this.eventBusEl_,e,t)}},StatefulMixin={state:{},setState:function(e){var t=this;"function"==typeof e&&(e=e());var n=void 0;return each(e,function(e,r){t.state[r]!==e&&(n=n||{},n[r]={from:t.state[r],to:e}),t.state[r]=e}),n&&isEvented(this)&&this.trigger({changes:n,type:"statechanged"}),n}},Component=function(){function e(t,n,r){if(classCallCheck(this,e),!t&&this.play?this.player_=t=this:this.player_=t,this.options_=extend(!0,{},this.options_),n=this.options_=mergeOptions(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var i=t&&t.id&&t.id()||"no_player";this.id_=i+"_component_"+newGUID()}this.name_=n.name||null,n.el?this.el_=n.el:!1!==n.createEl&&(this.el_=this.createEl()),!1!==n.evented&&evented(this,{eventBusKey:this.el_?"el_":null}),stateful(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==n.initChildren&&this.initChildren(),this.ready(r),!1!==n.reportTouchActivity&&this.enableTouchActivity()}return e.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),removeData(this.el_),this.el_=null),this.player_=null},e.prototype.player=function(){return this.player_},e.prototype.options=function(e){return log$2.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=mergeOptions(this.options_,e),this.options_):this.options_},e.prototype.el=function(){return this.el_},e.prototype.createEl=function(e,t,n){return createEl(e,t,n)},e.prototype.localize=function(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:e,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],c=n;return o&&o[e]?c=o[e]:s&&s[e]&&(c=s[e]),t&&(c=c.replace(/\{(\d+)\}/g,function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i})),c},e.prototype.contentEl=function(){return this.contentEl_||this.el_},e.prototype.id=function(){return this.id_},e.prototype.name=function(){return this.name_},e.prototype.children=function(){return this.children_},e.prototype.getChildById=function(e){return this.childIndex_[e]},e.prototype.getChild=function(e){if(e)return e=toTitleCase(e),this.childNameIndex_[e]},e.prototype.addChild=function(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this.children_.length,i=void 0,o=void 0;if("string"==typeof t){o=toTitleCase(t);var a=n.componentClass||o;n.name=o;var s=e.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=t;if(this.children_.splice(r,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),o=o||i.name&&toTitleCase(i.name()),o&&(this.childNameIndex_[o]=i),"function"==typeof i.el&&i.el()){var c=this.contentEl().children,l=c[r]||null;this.contentEl().insertBefore(i.el(),l)}return i},e.prototype.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.prototype.initChildren=function(){var t=this,n=this.options_.children;if(n){var r=this.options_,i=function(e){var n=e.name,i=e.opts;if(r[n]!==undefined&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=t.options_.playerOptions;var o=t.addChild(n,i);o&&(t[n]=o)}},o=void 0,a=e.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter(function(e){return!o.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(e){var r=void 0,i=void 0;return"string"==typeof e?(r=e,i=n[r]||t.options_[r]||{}):(r=e.name,i=e),{name:r,opts:i}}).filter(function(t){var n=e.getComponent(t.opts.componentClass||toTitleCase(t.name));return n&&!a.isTech(n)}).forEach(i)}},e.prototype.buildCSSClass=function(){return""},e.prototype.ready=function(e){var t=arguments.length>1&&arguments[1]!==undefined&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},e.prototype.$=function(e,t){return $(e,t||this.contentEl())},e.prototype.$$=function(e,t){return $$(e,t||this.contentEl())},e.prototype.hasClass=function(e){return hasClass(this.el_,e)},e.prototype.addClass=function(e){addClass(this.el_,e)},e.prototype.removeClass=function(e){removeClass(this.el_,e)},e.prototype.toggleClass=function(e,t){toggleClass(this.el_,e,t)},e.prototype.show=function(){this.removeClass("vjs-hidden")},e.prototype.hide=function(){this.addClass("vjs-hidden")},e.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},e.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.prototype.getAttribute=function(e){return getAttribute(this.el_,e)},e.prototype.setAttribute=function(e,t){setAttribute(this.el_,e,t)},e.prototype.removeAttribute=function(e){removeAttribute(this.el_,e)},e.prototype.width=function(e,t){return this.dimension("width",e,t)},e.prototype.height=function(e,t){return this.dimension("height",e,t)},e.prototype.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.prototype.dimension=function(e,t,n){if(t!==undefined)return null!==t&&t===t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+toTitleCase(e)],10)},e.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"==typeof window_1.getComputedStyle){var n=window_1.getComputedStyle(this.el_);t=n.getPropertyValue(e)||n[e]}if(0===(t=parseFloat(t))){var r="offset"+toTitleCase(e);t=this.el_[r]}return t},e.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.prototype.currentWidth=function(){return this.currentDimension("width")},e.prototype.currentHeight=function(){return this.currentDimension("height")},e.prototype.focus=function(){this.el_.focus()},e.prototype.blur=function(){this.el_.blur()},e.prototype.emitTapEvents=function(){var e=0,t=null,n=void 0;this.on("touchstart",function(r){1===r.touches.length&&(t={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},e=(new Date).getTime(),n=!0)}),this.on("touchmove",function(e){if(e.touches.length>1)n=!1;else if(t){var r=e.touches[0].pageX-t.pageX,i=e.touches[0].pageY-t.pageY,o=Math.sqrt(r*r+i*i);o>10&&(n=!1)}});var r=function(){n=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){if(t=null,!0===n){(new Date).getTime()-e<200&&(r.preventDefault(),this.trigger("tap"))}})},e.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e=bind(this.player(),this.player().reportUserActivity),t=void 0;this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});var n=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}},e.prototype.setTimeout=function(e,t){var n=this;e=bind(this,e);var r=window_1.setTimeout(e,t),i=function(){return n.clearTimeout(r)};return i.guid="vjs-timeout-"+r,this.on("dispose",i),r},e.prototype.clearTimeout=function(e){window_1.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},e.prototype.setInterval=function(e,t){var n=this;e=bind(this,e);var r=window_1.setInterval(e,t),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},e.prototype.clearInterval=function(e){window_1.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},e.prototype.requestAnimationFrame=function(e){var t=this;if(this.supportsRaf_){e=bind(this,e);var n=window_1.requestAnimationFrame(e),r=function(){return t.cancelAnimationFrame(n)};return r.guid="vjs-raf-"+n,this.on("dispose",r),n}return this.setTimeout(e,1e3/60)},e.prototype.cancelAnimationFrame=function(e){if(this.supportsRaf_){window_1.cancelAnimationFrame(e);var t=function(){};return t.guid="vjs-raf-"+e,this.off("dispose",t),e}return this.clearTimeout(e)},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r=e.getComponent("Tech"),i=r&&r.isTech(n),o=e===n||e.prototype.isPrototypeOf(n.prototype);if(i||!o){var a=void 0;throw a=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+a+".")}t=toTitleCase(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var c=s.players,l=Object.keys(c);if(c&&l.length>0&&l.map(function(e){return c[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,n},e.getComponent=function(t){if(t)return t=toTitleCase(t),e.components_&&e.components_[t]?e.components_[t]:void 0},e}();Component.prototype.supportsRaf_="function"==typeof window_1.requestAnimationFrame&&"function"==typeof window_1.cancelAnimationFrame,Component.registerComponent("Component",Component);for(var EXT_MIME={m3u8:"application/x-mpegURL",flv:"video/flv",mp4:"video/mp4",webm:"video/webm",rtmp:"rtmp/flv",mpd:"application/dash+xml",mp3:"audio/mpeg",m4a:"audio/mp4"},SERVER_PATH="//playvideo.qcloud.com",SERVER_PATH_V3="//playvideo.qcloud.com",SERVER_PATH_V4="//playvideo.qcloud.com",SERVER_PATH_BACKUP="//bkplayvideo.qcloud.com",LICENSE_PATH="https://drm.vod2.myqcloud.com/getlicense/v1",HLS_PATH="https://web.sdk.qcloud.com/player/tcplayer/release/v"+version+"/libs/hls.min.1.1.6.js",FLV_PATH="https://web.sdk.qcloud.com/player/tcplayer/release/v"+version+"/libs/flv.min.1.6.3.js",WEBRTC_PATH="https://web.sdk.qcloud.com/player/tcplayer/release/v"+version+"/libs/TXLivePlayer-1.3.4.min.js",DASH_PATH="https://web.sdk.qcloud.com/player/tcplayer/release/v"+version+"/libs/dash.all.min.v3.1.3.js",XP2P_HLS_PATH="https://web.sdk.qcloud.com/player/tcplayer/release/v"+version+"/libs/hlsp2p.min.1.6.28.js",XP2P_FLV_PATH="https://web.sdk.qcloud.com/player/tcplayer/release/v"+version+"/libs/qvbp2p_common.min.1.8.29.js",parseUrl=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=document_1.createElement("a");n.href=e;var r=""===n.host&&"file:"!==n.protocol,i=void 0;r&&(i=document_1.createElement("div"),i.innerHTML='<a href="'+e+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),document_1.body.appendChild(i));for(var o={},a=0;a<t.length;a++)o[t[a]]=n[t[a]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=window_1.location.protocol),r&&document_1.body.removeChild(i),o},getAbsoluteURL=function(e){if(!e.match(/^https?:\/\//)){var t=document_1.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},getFileExtension=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,n=t.exec(e);if(n)return n.pop().toLowerCase()}return""},isCrossOrigin=function(e){var t=window_1.location,n=parseUrl(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Url=(Object.freeze||Object)({parseUrl:parseUrl,getAbsoluteURL:getAbsoluteURL,getFileExtension:getFileExtension,isCrossOrigin:isCrossOrigin}),FullscreenApi={},apiMap=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],specApi=apiMap[0],browserApi=void 0,prefixedAPI=!1,i$1=0;i$1<apiMap.length;i$1++)if(apiMap[i$1][1]in document_1){browserApi=apiMap[i$1];break}if(browserApi){for(var _i=0;_i<browserApi.length;_i++)FullscreenApi[specApi[_i]]=browserApi[_i];prefixedAPI=browserApi[0]===specApi[0]}MediaError.prototype.code=0,MediaError.prototype.message="",MediaError.prototype.status=null,MediaError.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],MediaError.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var errNum=0;errNum<MediaError.errorTypes.length;errNum++)MediaError[MediaError.errorTypes[errNum]]=errNum,MediaError.prototype[MediaError.errorTypes[errNum]]=errNum;var tuple=SafeParseTuple,trackToJson_=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,n,r){return e[n]&&(t[n]=e[n]),t},{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})},textTracksToJson=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,function(e){return e.track});return Array.prototype.map.call(t,function(e){var t=trackToJson_(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===n.indexOf(e)}).map(trackToJson_))},jsonToTextTracks=function(e,t){return e.forEach(function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return n.addCue(e)})}),t.textTracks()},textTrackConverter={textTracksToJson:textTracksToJson,jsonToTextTracks:jsonToTextTracks,trackToJson_:trackToJson_},MODAL_CLASS_NAME="vjs-modal-dialog",ESC=27,ModalDialog=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=createEl("div",{className:MODAL_CLASS_NAME+"-content"},{role:"document"}),i.descEl_=createEl("p",{className:MODAL_CLASS_NAME+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),textContent(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},t.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return MODAL_CLASS_NAME+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},t.prototype.handleKeyPress=function(e){e.which===ESC&&this.closeable()&&this.close()},t.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},t.prototype.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},t.prototype.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",bind(this,this.handleKeyPress)),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},t.prototype.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},t.prototype.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",bind(this,this.handleKeyPress)),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},t.prototype.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},t.prototype.fill=function(){this.fillWith(this.content())},t.prototype.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),insertContent(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},t.prototype.empty=function(){this.trigger("beforemodalempty"),emptyEl(this.contentEl()),this.trigger("modalempty")},t.prototype.content=function(e){return void 0!==e&&(this.content_=e),this.content_},t.prototype.conditionalFocus_=function(){var e=document_1.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus(),this.on(document_1,"keydown",this.handleKeyDown))},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(document_1,"keydown",this.handleKeyDown)},t.prototype.handleKeyDown=function(e){if(9===e.which){for(var t=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=void 0,i=0;i<t.length;i++)if(n===t[i]){r=i;break}document_1.activeElement===this.el_&&(r=0),e.shiftKey&&0===r?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||r!==t.length-1||(t[0].focus(),e.preventDefault())}},t.prototype.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(e){return(e instanceof window_1.HTMLAnchorElement||e instanceof window_1.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof window_1.HTMLInputElement||e instanceof window_1.HTMLSelectElement||e instanceof window_1.HTMLTextAreaElement||e instanceof window_1.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof window_1.HTMLIFrameElement||e instanceof window_1.HTMLObjectElement||e instanceof window_1.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")})},t}(Component);ModalDialog.prototype.options_={pauseOnOpen:!0,temporary:!0},Component.registerComponent("ModalDialog",ModalDialog);var TrackList=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;classCallCheck(this,t);var o=possibleConstructorReturn(this,e.call(this));if(!i&&(i=o,IS_IE8)){i=document_1.createElement("custom");for(var a in t.prototype)"constructor"!==a&&(i[a]=t.prototype[a])}i.tracks_=[],Object.defineProperty(i,"length",{get:function(){return this.tracks_.length}});for(var s=0;s<r.length;s++)i.addTrack(r[s]);return n=i,possibleConstructorReturn(o,n)}return inherits(t,e),t.prototype.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack"}))},t.prototype.removeTrack=function(e){for(var t=void 0,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this[n],t.off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack"})},t.prototype.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(EventTarget);TrackList.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var event$1 in TrackList.prototype.allowedEvents_)TrackList.prototype["on"+event$1]=null;var disableOthers=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},AudioTrackList=function(e){function t(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,t);for(var o=void 0,a=i.length-1;a>=0;a--)if(i[a].enabled){disableOthers(i,i[a]);break}if(IS_IE8){o=document_1.createElement("custom");for(var s in TrackList.prototype)"constructor"!==s&&(o[s]=TrackList.prototype[s]);for(var c in t.prototype)"constructor"!==c&&(o[c]=t.prototype[c])}return o=n=possibleConstructorReturn(this,e.call(this,i,o)),o.changing_=!1,r=o,possibleConstructorReturn(n,r)}return inherits(t,e),t.prototype.addTrack=function(t){var n=this;t.enabled&&disableOthers(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",function(){n.changing_||(n.changing_=!0,disableOthers(n,t),n.changing_=!1,n.trigger("change"))})},t}(TrackList),disableOthers$1=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},VideoTrackList=function(e){function t(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,t);for(var o=void 0,a=i.length-1;a>=0;a--)if(i[a].selected){disableOthers$1(i,i[a]);break}if(IS_IE8){o=document_1.createElement("custom");for(var s in TrackList.prototype)"constructor"!==s&&(o[s]=TrackList.prototype[s]);for(var c in t.prototype)"constructor"!==c&&(o[c]=t.prototype[c])}return o=n=possibleConstructorReturn(this,e.call(this,i,o)),o.changing_=!1,Object.defineProperty(o,"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),r=o,possibleConstructorReturn(n,r)}return inherits(t,e),t.prototype.addTrack=function(t){var n=this;t.selected&&disableOthers$1(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",function(){n.changing_||(n.changing_=!0,disableOthers$1(n,t),n.changing_=!1,n.trigger("change"))})},t}(TrackList),TextTrackList=function(e){function t(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,t);var o=void 0;if(IS_IE8){o=document_1.createElement("custom");for(var a in TrackList.prototype)"constructor"!==a&&(o[a]=TrackList.prototype[a]);for(var s in t.prototype)"constructor"!==s&&(o[s]=t.prototype[s])}return o=n=possibleConstructorReturn(this,e.call(this,i,o)),r=o,possibleConstructorReturn(n,r)}return inherits(t,e),t.prototype.addTrack=function(t){if("disabled"===t.mode&&!t.label)return!1;e.prototype.addTrack.call(this,t),t.addEventListener("modechange",bind(this,function(){this.trigger("change")})),-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",bind(this,function(){this.trigger("selectedlanguagechange")}))},t}(TrackList),HtmlTrackElementList=function(){function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,e);var n=this;if(IS_IE8){n=document_1.createElement("custom");for(var r in e.prototype)"constructor"!==r&&(n[r]=e.prototype[r])}n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,o=t.length;i<o;i++)n.addTrackElement_(t[i]);if(IS_IE8)return n}return e.prototype.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},e.prototype.getTrackElementByTrack_=function(e){for(var t=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},e.prototype.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_.splice(t,1);break}},e}(),TextTrackCueList=function(){function e(t){classCallCheck(this,e);var n=this;if(IS_IE8){n=document_1.createElement("custom");for(var r in e.prototype)"constructor"!==r&&(n[r]=e.prototype[r])}if(e.prototype.setCues_.call(n,t),Object.defineProperty(n,"length",{get:function(){return this.length_}}),IS_IE8)return n}return e.prototype.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},e.prototype.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),VideoTrackKind={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},AudioTrackKind={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},TextTrackKind={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},TextTrackMode={disabled:"disabled",hidden:"hidden",showing:"showing"},Track=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this)),o=i;if(IS_IE8){o=document_1.createElement("custom");for(var a in t.prototype)"constructor"!==a&&(o[a]=t.prototype[a])}var s={id:r.id||(0===r.id?0:"vjs_track_"+newGUID()),kind:r.kind||"",label:r.label||"",language:r.language||""};for(var c in s)!function(e){Object.defineProperty(o,e,{get:function(){return s[e]},set:function(){}})}(c);return n=o,possibleConstructorReturn(i,n)}return inherits(t,e),t}(EventTarget),isFunction_1=isFunction$1,toString$1=Object.prototype.toString,trim=function(e){return e.replace(/^\s+|\s+$/g,"")},isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},parseHeaders=function(e){if(!e)return{};for(var t={},n=trim(e).split("\n"),r=0;r<n.length;r++){var i=n[r],o=i.indexOf(":"),a=trim(i.slice(0,o)).toLowerCase(),s=trim(i.slice(o+1));"undefined"==typeof t[a]?t[a]=s:isArray(t[a])?t[a].push(s):t[a]=[t[a],s]}return t},immutable=extend$1,hasOwnProperty=Object.prototype.hasOwnProperty,xhr=createXHR;createXHR.XMLHttpRequest=window_1.XMLHttpRequest||noop,createXHR.XDomainRequest="withCredentials"in new createXHR.XMLHttpRequest?createXHR.XMLHttpRequest:window_1.XDomainRequest,forEachArray(["get","put","post","patch","head","delete"],function(e){createXHR["delete"===e?"del":e]=function(t,n,r){return n=initParams(t,n,r),n.method=e.toUpperCase(),_createXHR(n)}});var parseCues=function(e,t){var n=new window_1.WebVTT.Parser(window_1,window_1.vttjs,window_1.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(window_1.console&&window_1.console.groupCollapsed&&window_1.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach(function(e){return log$2.error(e)}),window_1.console&&window_1.console.groupEnd&&window_1.console.groupEnd()),n.flush()},loadTrack=function(e,t){var n={uri:e},r=isCrossOrigin(e);r&&(n.cors=r),xhr(n,bind(this,function(e,n,r){
4
+ if(e)return log$2.error(e,n);if(t.loaded_=!0,"function"!=typeof window_1.WebVTT){if(t.tech_){var i=function(){return parseCues(r,t)};t.tech_.on("vttjsloaded",i),t.tech_.on("vttjserror",function(){log$2.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",i)})}}else parseCues(r,t)}))},TextTrack=function(e){function t(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(classCallCheck(this,t),!i.tech)throw new Error("A tech was not provided.");var o=mergeOptions(i,{kind:TextTrackKind[i.kind]||i.kind||"subtitles",language:i.language||i.srclang||""}),a=TextTrackMode[o.mode]||"disabled",s=o["default"];"metadata"!==o.kind&&"chapters"!==o.kind||(a="hidden");var c=n=possibleConstructorReturn(this,e.call(this,o));if(c.tech_=o.tech,IS_IE8)for(var l in t.prototype)"constructor"!==l&&(c[l]=t.prototype[l]);c.cues_=[],c.activeCues_=[];var u=new TextTrackCueList(c.cues_),d=new TextTrackCueList(c.activeCues_),p=!1,h=bind(c,function(){this.activeCues,p&&(this.trigger("cuechange"),p=!1)});return"disabled"!==a&&c.tech_.ready(function(){c.tech_.on("timeupdate",h)},!0),Object.defineProperty(c,"default",{get:function(){return s},set:function(){}}),Object.defineProperty(c,"mode",{get:function(){return a},set:function(e){var t=this;TextTrackMode[e]&&(a=e,"showing"===a&&this.tech_.ready(function(){t.tech_.on("timeupdate",h)},!0),this.trigger("modechange"))}}),Object.defineProperty(c,"cues",{get:function(){return this.loaded_?u:null},set:function(){}}),Object.defineProperty(c,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return d;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=e&&i.endTime>=e?t.push(i):i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e&&t.push(i)}if(p=!1,t.length!==this.activeCues_.length)p=!0;else for(var o=0;o<t.length;o++)-1===this.activeCues_.indexOf(t[o])&&(p=!0);return this.activeCues_=t,d.setCues_(this.activeCues_),d},set:function(){}}),o.src?(c.src=o.src,loadTrack(o.src,c)):c.loaded_=!0,r=c,possibleConstructorReturn(n,r)}return inherits(t,e),t.prototype.addCue=function(e){var t=e;if(window_1.vttjs&&!(e instanceof window_1.vttjs.VTTCue)){t=new window_1.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(var n in e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.prototype.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(Track);TextTrack.prototype.allowedEvents_={cuechange:"cuechange"};var AudioTrack=function(e){function t(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,t);var o=mergeOptions(i,{kind:AudioTrackKind[i.kind]||""}),a=n=possibleConstructorReturn(this,e.call(this,o)),s=!1;if(IS_IE8)for(var c in t.prototype)"constructor"!==c&&(a[c]=t.prototype[c]);return Object.defineProperty(a,"enabled",{get:function(){return s},set:function(e){"boolean"==typeof e&&e!==s&&(s=e,this.trigger("enabledchange"))}}),o.enabled&&(a.enabled=o.enabled),a.loaded_=!0,r=a,possibleConstructorReturn(n,r)}return inherits(t,e),t}(Track),VideoTrack=function(e){function t(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,t);var o=mergeOptions(i,{kind:VideoTrackKind[i.kind]||""}),a=n=possibleConstructorReturn(this,e.call(this,o)),s=!1;if(IS_IE8)for(var c in t.prototype)"constructor"!==c&&(a[c]=t.prototype[c]);return Object.defineProperty(a,"selected",{get:function(){return s},set:function(e){"boolean"==typeof e&&e!==s&&(s=e,this.trigger("selectedchange"))}}),o.selected&&(a.selected=o.selected),r=a,possibleConstructorReturn(n,r)}return inherits(t,e),t}(Track),NONE=0,LOADING=1,LOADED=2,ERROR=3,HTMLTrackElement=function(e){function t(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,t);var r=possibleConstructorReturn(this,e.call(this)),i=void 0,o=r;if(IS_IE8){o=document_1.createElement("custom");for(var a in t.prototype)"constructor"!==a&&(o[a]=t.prototype[a])}var s=new TextTrack(n);if(o.kind=s.kind,o.src=s.src,o.srclang=s.language,o.label=s.label,o["default"]=s["default"],Object.defineProperty(o,"readyState",{get:function(){return i}}),Object.defineProperty(o,"track",{get:function(){return s}}),i=NONE,s.addEventListener("loadeddata",function(){i=LOADED,o.trigger({type:"load",target:o})}),IS_IE8){var c;return c=o,possibleConstructorReturn(r,c)}return r}return inherits(t,e),t}(EventTarget);HTMLTrackElement.prototype.allowedEvents_={load:"load"},HTMLTrackElement.NONE=NONE,HTMLTrackElement.LOADING=LOADING,HTMLTrackElement.LOADED=LOADED,HTMLTrackElement.ERROR=ERROR;var NORMAL={audio:{ListClass:AudioTrackList,TrackClass:AudioTrack,capitalName:"Audio"},video:{ListClass:VideoTrackList,TrackClass:VideoTrack,capitalName:"Video"},text:{ListClass:TextTrackList,TrackClass:TextTrack,capitalName:"Text"}};Object.keys(NORMAL).forEach(function(e){NORMAL[e].getterName=e+"Tracks",NORMAL[e].privateName=e+"Tracks_"});var REMOTE={remoteText:{ListClass:TextTrackList,TrackClass:TextTrack,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:HtmlTrackElementList,TrackClass:HTMLTrackElement,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},ALL=mergeOptions(NORMAL,REMOTE);REMOTE.names=Object.keys(REMOTE),NORMAL.names=Object.keys(NORMAL),ALL.names=[].concat(REMOTE.names).concat(NORMAL.names);var _objCreate=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();ParsingError.prototype=_objCreate(Error.prototype),ParsingError.prototype.constructor=ParsingError,ParsingError.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Settings.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var 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(e,t){t=t||this.div;for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},StyleBox.prototype.formatStyle=function(e,t){return 0===e?0:e+t},CueStyleBox.prototype=_objCreate(StyleBox.prototype),CueStyleBox.prototype.constructor=CueStyleBox,BoxPosition.prototype.move=function(e,t){switch(t=t!==undefined?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},BoxPosition.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},BoxPosition.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},BoxPosition.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},BoxPosition.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},BoxPosition.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},BoxPosition.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},BoxPosition.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e,{left:e.left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},WebVTT$1.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},WebVTT$1.convertCueToDOMTree=function(e,t){return e&&t?parseContent(e,t):null},WebVTT$1.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],o=BoxPosition.getSimpleBoxPosition(r),a=Math.round(.05*o.height*100)/100,s={font:a+"px sans-serif"};!function(){for(var n,a,c=0;c<t.length;c++)a=t[c],n=new CueStyleBox(e,a,s),r.appendChild(n.div),moveBoxToLinePosition(e,n,o,i),a.displayState=n.div,i.push(BoxPosition.getSimpleBoxPosition(n))}()}else for(var c=0;c<t.length;c++)r.appendChild(t[c].displayState)},WebVTT$1.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},WebVTT$1.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof ParsingError))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){function t(){for(var e=i.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,i.buffer=e.substr(t),n}function n(e){var t=new Settings;if(parseOptions(e,function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new Settings;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;t.set(e+"X",i.get("x")),t.set(e+"Y",i.get("y"));break;case"scroll":t.alt(e,n,["up"])}},/=/,/\s/),t.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=t.get("width",100),n.lines=t.get("lines",3),n.regionAnchorX=t.get("regionanchorX",0),n.regionAnchorY=t.get("regionanchorY",100),n.viewportAnchorX=t.get("viewportanchorX",0),n.viewportAnchorY=t.get("viewportanchorY",100),n.scroll=t.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:t.get("id"),region:n})}}function r(e){var t=new Settings;parseOptions(e,function(e,n){switch(e){case"MPEGT":t.integer(e+"S",n);break;case"LOCA":t.set(e+"L",parseTimeStamp(n))}},/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}var i=this;e&&(i.buffer+=i.decoder.decode(e,{stream:!0}));try{var o;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;o=t();var a=o.match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new ParsingError(ParsingError.Errors.BadSignature);i.state="HEADER"}for(var s=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(s?s=!1:o=t(),i.state){case"HEADER":/:/.test(o)?function(e){e.match(/X-TIMESTAMP-MAP/)?parseOptions(e,function(e,t){switch(e){case"X-TIMESTAMP-MAP":r(t)}},/=/):parseOptions(e,function(e,t){switch(e){case"Region":n(t)}},/:/)}(o):o||(i.state="ID");continue;case"NOTE":o||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){i.state="NOTE";break}if(!o)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===o.indexOf("--\x3e")){i.cue.id=o;continue}case"CUE":try{parseCue(o,i.cue,i.regionList)}catch(l){i.reportOrThrowError(l),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var c=-1!==o.indexOf("--\x3e");if(!o||c&&(s=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=o;continue;case"BADCUE":o||(i.state="ID");continue}}}catch(l){i.reportOrThrowError(l),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new ParsingError(ParsingError.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var vtt$1=WebVTT$1,autoKeyword="auto",directionSetting={"":!0,lr:!0,rl:!0},alignSetting={start:!0,middle:!0,end:!0,left:!0,right:!0};VTTCue.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var vttcue=VTTCue,scrollSetting={"":!0,up:!0},vttregion=VTTRegion,browserIndex=createCommonjsModule(function(e){var t=e.exports={WebVTT:vtt$1,VTTCue:vttcue,VTTRegion:vttregion};window_1.vttjs=t,window_1.WebVTT=t.WebVTT;var n=t.VTTCue,r=t.VTTRegion,i=window_1.VTTCue,o=window_1.VTTRegion;t.shim=function(){window_1.VTTCue=n,window_1.VTTRegion=r},t.restore=function(){window_1.VTTCue=i,window_1.VTTRegion=o},window_1.VTTCue||t.shim()}),Tech=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};classCallCheck(this,t),r.reportTouchActivity=!1;var o=possibleConstructorReturn(this,e.call(this,n,r,i));return o.hasStarted_=!1,o.on("playing",function(){this.hasStarted_=!0}),o.on("loadstart",function(){this.hasStarted_=!1}),ALL.names.forEach(function(e){var t=ALL[e];r&&r[t.getterName]&&(o[t.privateName]=r[t.getterName])}),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===r["native"+e+"Tracks"]&&(o["featuresNative"+e+"Tracks"]=!1)}),!1===r.nativeCaptions||!1===r.nativeTextTracks?o.featuresNativeTextTracks=!1:!0!==r.nativeCaptions&&!0!==r.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new ALL.text.ListClass,o.initTrackListeners(),r.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return inherits(t,e),t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(bind(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return createTimeRanges(0,0)},t.prototype.bufferedPercent=function(){return bufferedPercent(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(NORMAL.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;e=[].concat(e),e.forEach(function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}})},t.prototype.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},t.prototype.reset=function(){},t.prototype.error=function(e){return e!==undefined&&(this.error_=new MediaError(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?createTimeRanges(0,0):createTimeRanges()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;NORMAL.names.forEach(function(t){var n=NORMAL[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)})})},t.prototype.addWebVttScript_=function(){var e=this;if(!window_1.WebVTT)if(document_1.body.contains(this.el())){if(!this.options_["vtt.js"]&&isPlain(browserIndex)&&Object.keys(browserIndex).length>0)return void this.trigger("vttjsloaded");var t=document_1.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){t.onload=null,t.onerror=null}),window_1.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return e.trigger("texttrackchange")},a=function(){o();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",o)}})},t.prototype.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return createTrackHelper(this,e,t,n)},t.prototype.createRemoteTextTrack=function(e){var t=mergeOptions(e,{tech:this});return new REMOTE.remoteTextEl.TrackClass(t)},t.prototype.addRemoteTextTrack=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(t);return!0!==n&&!1!==n&&(log$2.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready(function(){return e.autoRemoteTextTracks_.addTrack(r.track)}),r},t.prototype.addAudioTrack=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=mergeOptions(t,{tech:this}),i=new NORMAL.audio.TrackClass(r);return this.audioTracks_.addTrack(i),!0!==n&&this.ready(function(){return e.audioTracks_.addTrack(i)}),i},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=toTitleCase(e),t.techs_[e]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return e=toTitleCase(e),t.techs_&&t.techs_[e]?t.techs_[e]:window_1&&window_1.videojs&&window_1.videojs[e]?(log$2.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),window_1.videojs[e]):void 0},t}(Component);ALL.names.forEach(function(e){var t=ALL[e];Tech.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),Tech.prototype.featuresVolumeControl=!0,Tech.prototype.featuresMuteControl=!0,Tech.prototype.featuresFullscreenResize=!1,Tech.prototype.featuresPlaybackRate=!1,Tech.prototype.featuresProgressEvents=!1,Tech.prototype.featuresTimeupdateEvents=!1,Tech.prototype.featuresNativeTextTracks=!1,Tech.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),n===undefined&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n=e.sourceHandlers||[],r=void 0,i=0;i<n.length;i++)if(r=n[i].canPlayType(t))return r;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""},["seekable","duration"].forEach(function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:log$2.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Component.registerComponent("Tech",Tech),Tech.registerTech("Tech",Tech),Tech.defaultTechOrder_=[];var middlewares={},allowedGetters={buffered:1,currentTime:1,duration:1,seekable:1,played:1},allowedSetters={setCurrentTime:1},MimetypesKind={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},getMimetype=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"",t=getFileExtension(e);return MimetypesKind[t.toLowerCase()]||""},filterSource=function e(t){if(Array.isArray(t)){var n=[];t.forEach(function(t){t=e(t),Array.isArray(t)?n=n.concat(t):isObject$1(t)&&n.push(t)}),t=n}else t="string"==typeof t&&t.trim()?[fixSource({src:t})]:isObject$1(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[fixSource(t)]:[];return t},fixSource=function(e){if(!e.type){var t=getMimetype(e.src);t&&(e.type=t)}return e},enc=createCommonjsModule(function(module,exports){!function(e,t){module.exports=t()}(self,function(){return function(){function __webpack_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}var __webpack_modules__={"./node_modules/@tencent/js-armor-loader/dist/runtime.js":function node_modulesTencentJsArmorLoaderDistRuntimeJs(module){
5
+ eval("function T(f,l,c,r,g,s,a,v){var h,n=!r,t=(f=+f,l=l||[0],r=r||[[this],[{}]],g=g||{},[]),o=null;function p(){return function(n,t,o){return new(Function.bind.apply(n,t))}.apply(null,arguments)}Function.prototype.bind||(h=[].slice,Function.prototype.bind=function(n){if(\"function\"!=typeof this)throw new TypeError(\"bind101\");var t=h.call(arguments,1),o=t.length,p=this,e=function(){},u=function(){return t.length=o,t.push.apply(t,arguments),p.apply(e.prototype.isPrototypeOf(this)?this:n,t)};return this.prototype&&(e.prototype=this.prototype),u.prototype=new e,u});for(var e=[function(){throw r[r.length-1]},function(){var n=r.pop(),t=r.pop();r.push([t[0][t[1]],n])},function(){var n=r.pop();r.push(delete n[0][n[1]])},function(){r[r.length-2]=r[r.length-2]-r.pop()},function(){r[r.length-2]=r[r.length-2]+r.pop()},function(){r.push([l[f++]])},function(){r[r.length-2]=r[r.length-2]==r.pop()},function(){for(var n=r.pop(),o=l[f++],p=[],t=l[f++],e=l[f++],u=[],h=0;h<t;h++)p[l[f++]]=r[l[f++]];for(h=0;h<e;h++)u[h]=l[f++];var i=function(){var n=p.slice(0);n[0]=[this],n[1]=[arguments],n[2]=[i];for(var t=0;t<u.length&&t<arguments.length;t++)0<u[t]&&(n[u[t]]=[arguments[t]]);return T(o,l,c,n,g,s,a,v)};i.toString=function(){return n},r.push(i)},function(){var n=r[r.length-2],t=Object.getOwnPropertyDescriptor(n[0],n[1])||{configurable:!0,enumerable:!0};t.get=r[r.length-1],Object.defineProperty(n[0],n[1],t)},function(){r.push(undefined)},function(){r.push(null)},function(){r[r.length-1]=l[f++]},function(){var n=r.pop();g[n]||(c[n]=c[n](),g[n]=1),r.push([c,n])},function(){r[r.length-2]=r[r.length-2]%r.pop()},function(){t.push([l[f++],r.length,l[f++]])},function(){r[r.length-2]=r[r.length-2]>>r.pop()},function(){r[r.length-1].length?r.push(r[r.length-1].shift(),!0):r.push(undefined,!1)},function(){r[r.length-2]=r[r.length-2]/r.pop()},function(){r[r.length-2]=r[r.length-2]|r.pop()},function(){var n=l[f++],t=n?r.slice(-n):[],n=(r.length-=n,r.pop());r.push(n[0][n[1]].apply(n[0],t))},function(){r[r.length-2]=r[r.length-2]&r.pop()},function(){r[r[r.length-1][0]]=r[r[r.length-1][0]]===undefined?[]:r[r[r.length-1][0]]},function(){r[r[r.length-2][0]][0]=r[r.length-1]},function(){r[r.length-2]=r[r.length-2]>=r.pop()},function(){r.push(!1)},function(){r.push(~r.pop())},function(){r[r.length-2]=r[r.length-2]instanceof r.pop()},function(){r[r.length-1]+=String.fromCharCode(l[f++])},function(){r[r.length-2]=r[r.length-2]^r.pop()},function(){r.push(!r.pop())},function(){o=null},function(){var n=r[r.length-2];n[0][n[1]]=r[r.length-1]},function(){r.length-=l[f++]},function(){r[r.length-2]=r[r.length-2]*r.pop()},function(){var n=l[f++],t=r[r.length-2-n];r[r.length-2-n]=r.pop(),r.push(t)},function(){r.push(typeof r.pop())},function(){var n=l[f++],t=n?r.slice(-n):[];r.length-=n,t.unshift(null),r.push(p(r.pop(),t))},function(){var n=r.pop();g[n]||(c[n]=c[n](),g[n]=1),r.push(c[n])},function(){r.pop()},function(){r[r.length-2]=r[r.length-2]===r.pop()},function(){var n=l[f++],t=n?r.slice(-n):[];r.length-=n,r.push(r.pop().apply(c,t))},function(){t.pop()},function(){r.push([c,r.pop()])},function(){var n,t=[];for(n in r.pop())t.push(n);r.push(t)},function(){for(var o=l[f++],p=[],n=l[f++],t=l[f++],e=[],u=0;u<n;u++)p[l[f++]]=r[l[f++]];for(u=0;u<t;u++)e[u]=l[f++];r.push(function h(){var n=p.slice(0);n[0]=[this],n[1]=[arguments],n[2]=[h];for(var t=0;t<e.length&&t<arguments.length;t++)0<e[t]&&(n[e[t]]=[arguments[t]]);return T(o,l,c,n,g,s,a,v)})},function(){r.push(\"\")},function(){r[r.length-2]=r[r.length-2]in r.pop()},function(){},function(){r[r.length-2]=r[r.length-2]<r.pop()},function(){f=l[f++]},function(){var n=r[r.length-2],t=Object.getOwnPropertyDescriptor(n[0],n[1])||{configurable:!0,enumerable:!0};t.set=r[r.length-1],Object.defineProperty(n[0],n[1],t)},function(){r[r.length-1]=c[r[r.length-1]]},function(){r[r.length-2]=r[r.length-2]>>>r.pop()},function(){r.push(!0)},function(){r.push([r.pop(),r.pop()].reverse())},function(){var n=l[f++],t=n?r.slice(-n):[],n=(r.length-=n,t.unshift(null),r.pop());r.push(p(n[0][n[1]],t))},function(){r[r.length-2]=r[r.length-2]<=r.pop()},function(){var n=r.pop();r.push(n[0][n[1]])},function(){r[r.length-2]=r[r.length-2]<<r.pop()},function(){r[r.length-2]=r[r.length-2]>r.pop()},function(){r.push(l[f++])},function(){return!!o},function(){r.push(r[r.length-1])},function(){r.push(r[l[f++]][0])},function(){r.length=l[f++]},function(){var n=r.pop();r.push([r[r.pop()][0],n])},function(){r.push(r[r.pop()[0]][0])},function(){var n=l[f++];r[r.length-1]&&(f=n)},function(){return!0},function(){var n=l[f++];r[n]=r[n]===undefined?[]:r[n]}];;)try{for(var u=!1;!u;)u=e[l[f++]]();if(o)throw o;return n?(r.pop(),r.slice(3+T.v)):r.pop()}catch(y){var i=t.pop();if(i===undefined)throw y;o=y,f=i[0],r.length=i[1],i[2]&&(r[i[2]][0]=o)}}T.v=0;\n \"use strict\";\n\n/* eslint-disable */\nfunction arrayIndexOf(arr, searchElement, fromIndex) {\n if (typeof Array.prototype.indexOf === 'function') {\n return Array.prototype.indexOf.call(arr, searchElement, fromIndex);\n }\n\n var k;\n var len = o.length;\n\n if (len === 0) {\n return -1;\n }\n\n var n = fromIndex | 0;\n\n if (n >= len) {\n return -1;\n }\n\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n for (; k < len; k++) {\n if (k in o && o[k] === searchElement) return k;\n }\n\n return -1;\n}\n\nfunction base64Decode(t) {\n var r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split('');\n var o = String(t).replace(/[=]+$/, '');\n\n for (var e, n, a = 0, i = 0, c = ''; n = o.charAt(i++); ~n && (e = a % 4 ? 64 * e + n : n, a++ % 4) ? c += String.fromCharCode(255 & e >> (-2 * a & 6)) : 0) n = arrayIndexOf(r, n);\n\n return c;\n}\n/** releaseSymbols, 识别导入的全局变量 */\n\n\nmodule.exports.r = function (symbols) {\n var result = [];\n\n for (var i = 0; i < symbols.length; i++) {\n try {\n result.push(eval(symbols[i]));\n } catch (_) {\n result.push(undefined);\n }\n }\n\n return result;\n};\n/** decompress, 解压字节码 */\n\n\nmodule.exports.d = function (arr) {\n if (typeof arr[1] !== `object`) {\n return arr;\n }\n\n var compressed = arr[0];\n var bigNumbers = arr[1];\n var restored = [];\n var bytes = base64Decode(compressed);\n var pos = bigNumbers.shift();\n var num = bigNumbers.shift();\n var current = 0;\n\n function insertBigNumber() {\n while (current === pos) {\n restored.push(num);\n current++;\n pos = bigNumbers.shift();\n num = bigNumbers.shift();\n }\n }\n\n for (var i = 0; i < bytes.length; i++) {\n var charCode = bytes.charAt(i).charCodeAt(0);\n insertBigNumber();\n restored.push(charCode);\n current++;\n }\n\n insertBigNumber();\n return restored;\n};\n/** getResult 从 vm 执行结果中获取局部变量 */\n\n\nmodule.exports.g = function (result) {\n return result.shift()[0];\n};\n/** vm */\n\n\nmodule.exports.v = T;\n \n\n//# sourceURL=webpack://enc/./node_modules/@tencent/js-armor-loader/dist/runtime.js?")},"./enc.source.js":function encSourceJs(__unused_webpack_module,exports,__webpack_require__){"use strict"
6
+ ;eval("\n\nvar armor = __webpack_require__(/*! !./node_modules/@tencent/js-armor-loader/dist/runtime.js */ \"./node_modules/@tencent/js-armor-loader/dist/runtime.js\");\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = void 0;\nvar _jsencrypt = _interopRequireDefault(__webpack_require__(/*! jsencrypt */ \"./node_modules/jsencrypt/lib/index.js\"));\nvar _utils = __webpack_require__(/*! ./utils */ \"./utils.js\");\nvar _aes = _interopRequireDefault(__webpack_require__(/*! ./utils/aes */ \"./utils/aes.js\"));\nvar _md = _interopRequireDefault(__webpack_require__(/*! md5 */ \"./node_modules/md5/md5.js\"));\nvar _axios = _interopRequireDefault(__webpack_require__(/*! axios */ \"./node_modules/axios/dist/browser/axios.cjs\"));\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { 'default': obj };\n}\nfunction _typeof(obj) {\n '@babel/helpers - typeof';\n return _typeof = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && 'function' == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n }, _typeof(obj);\n}\nfunction _regeneratorRuntime() {\n 'use strict';\n _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n };\n var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n }, $Symbol = 'function' == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || '@@iterator', asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator', toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag';\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, '');\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []);\n return defineProperty(generator, '_invoke', { value: makeInvokeMethod(innerFn, self, context) }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: 'normal',\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: 'throw',\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {\n }\n function GeneratorFunction() {\n }\n function GeneratorFunctionPrototype() {\n }\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\n 'next',\n 'throw',\n 'return'\n ].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if ('throw' !== record.type) {\n var result = record.arg, value = result.value;\n return value && 'object' == _typeof(value) && hasOwn.call(value, '__await') ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke('next', value, resolve, reject);\n }, function (err) {\n invoke('throw', err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke('throw', error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, '_invoke', {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = 'suspendedStart';\n return function (method, arg) {\n if ('executing' === state)\n throw new Error('Generator is already running');\n if ('completed' === state) {\n if ('throw' === method)\n throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel)\n continue;\n return delegateResult;\n }\n }\n if ('next' === context.method)\n context.sent = context._sent = context.arg;\n else if ('throw' === context.method) {\n if ('suspendedStart' === state)\n throw state = 'completed', context.arg;\n context.dispatchException(context.arg);\n } else\n 'return' === context.method && context.abrupt('return', context.arg);\n state = 'executing';\n var record = tryCatch(innerFn, self, context);\n if ('normal' === record.type) {\n if (state = context.done ? 'completed' : 'suspendedYield', record.arg === ContinueSentinel)\n continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n 'throw' === record.type && (state = 'completed', context.method = 'throw', context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method, method = delegate.iterator[methodName];\n if (undefined === method)\n return context.delegate = null, 'throw' === methodName && delegate.iterator['return'] && (context.method = 'return', context.arg = undefined, maybeInvokeDelegate(delegate, context), 'throw' === context.method) || 'return' !== methodName && (context.method = 'throw', context.arg = new TypeError('The iterator does not provide a \\'' + methodName + '\\' method')), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if ('throw' === record.type)\n return context.method = 'throw', context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, 'return' !== context.method && (context.method = 'next', context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = 'throw', context.arg = new TypeError('iterator result is not an object'), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = 'normal', delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{ tryLoc: 'root' }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod)\n return iteratorMethod.call(iterable);\n if ('function' == typeof iterable.next)\n return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n for (; ++i < iterable.length;)\n if (hasOwn.call(iterable, i))\n return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return { next: doneResult };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, 'constructor', {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, 'constructor', {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, 'GeneratorFunction'), exports.isGeneratorFunction = function (genFun) {\n var ctor = 'function' == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || 'GeneratorFunction' === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, 'GeneratorFunction')), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return { __await: arg };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, 'Generator'), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, 'toString', function () {\n return '[object Generator]';\n }), exports.keys = function (val) {\n var object = Object(val), keys = [];\n for (var key in object)\n keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object)\n return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = 'next', this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset)\n for (var name in this)\n 't' === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if ('throw' === rootRecord.type)\n throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done)\n throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = 'throw', record.arg = exception, context.next = loc, caught && (context.method = 'next', context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i], record = entry.completion;\n if ('root' === entry.tryLoc)\n return handle('end');\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, 'catchLoc'), hasFinally = hasOwn.call(entry, 'finallyLoc');\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc)\n return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc)\n return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc)\n return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally)\n throw new Error('try statement without catch or finally');\n if (this.prev < entry.finallyLoc)\n return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, 'finallyLoc') && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && ('break' === type || 'continue' === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = 'next', this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if ('throw' === record.type)\n throw record.arg;\n return 'break' === record.type || 'continue' === record.type ? this.next = record.arg : 'return' === record.type ? (this.rval = this.arg = record.arg, this.method = 'return', this.next = 'end') : 'normal' === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc)\n return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n 'catch': function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if ('throw' === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error('illegal catch attempt');\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, 'next' === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this, args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err);\n }\n _next(undefined);\n });\n };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps)\n _defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, 'prototype', { writable: false });\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, 'string');\n return _typeof(key) === 'symbol' ? key : String(key);\n}\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== 'object' || input === null)\n return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || 'default');\n if (_typeof(res) !== 'object')\n return res;\n throw new TypeError('@@toPrimitive must return a primitive value.');\n }\n return (hint === 'string' ? String : Number)(input);\n}\nvar pluginMap = {\n VR: 'https://web.sdk.qcloud.com/player/tcplayer/release/v5.0.0/plugins/tcplayer-vr-plugin.1.0.0.js',\n SafeCheck: 'https://web.sdk.qcloud.com/player/tcplayer/release/v5.0.0/plugins/tcplayer-safe-check-plugin.1.0.0.js',\n Crypto: 'https://web.sdk.qcloud.com/player/tcplayer/release/v5.0.0/libs/tcpcrypto.1.0.0.js'\n};\nvar Enc = function () {\n function Enc() {\n _classCallCheck(this, Enc);\n _defineProperty(this, 'handleWatermarkElementAdd', function (ctx) {\n if (!ctx.options.keep) {\n if (!ctx.player.$('.tcp-dynamic-watermark-container')) {\n ctx.player.el() && ctx.player.el().appendChild(ctx.containerElement);\n } else if (!ctx.player.$('.tcp-dynamic-watermark-content')) {\n ctx.containerElement.appendChild(ctx.markContentElement);\n }\n } else {\n if (!ctx.waterMarkWillAdd) {\n ctx.waterMarkWillAdd = true;\n setTimeout(function () {\n ctx.player && ctx.player.el() && ctx.player.el().appendChild(ctx.containerElement);\n ctx.waterMarkWillAdd = false;\n ctx.isFirstShow = false;\n }, (ctx.isFirstShow ? ctx.ghostCycle.firstShow : ctx.ghostCycle.ghostOff) * 1000);\n }\n }\n });\n }\n _createClass(Enc, [\n {\n key: 'initPlugins',\n value: function initPlugins(plugins, videojs, context) {\n return armor.g(armor.v(0,armor.d([\"QARFAkUDMQVABkUCRQNFBEUFBQM/ABYmJgUALRtwG2wbYRt5G2UbckE8ACUfJiYFBDEbQAlFAkUDRQRFBUUGRQdFCAUEBQMtG3UbchtsQTkWJiYFBQUDLRtwG2wbdRtnG2kbbhtOG2EbbRtlQTkWJiY/BB1DezF/CyY/BR1DhSYxtTEmPAEMLRt3G2EbchtuAS0bbhtvGyAbcBtsG3UbZxtpG24bIBtpG24bZhtvEwEmGEQ8AAw/BQE5Q8ImMcUsJhhEBQYxP0AFRQJFAzwCDC0bchtlG2cbaRtzG3QbZRtyG1AbbBt1G2cbaRtuAT8EPAMMLRtUG2MbcBtsG2EbeRtlG3ItG2MbbxtuG2MbYRt0Nj8ELRtQG2wbdRtnG2kbbhMCATkTAiYFAzwADC0bZRtsG18BLRtnG2UbdBtFG2wbZRttG2Ubbht0G3MbQht5G1QbYRtnG04bYRttG2UBLRt2G2kbZBtlG28TATwANjkWJiY/A0MxPyYFAy0bcxt0G3kbbBtlQS0bdhtpG3MbaRtiG2kbbBtpG3QbeQEtG2gbaRtkG2QbZRtuHyIAJiY8AAwtG28bbgEtG2MbYRtuG3AbbBthG3kxRUAERQI8AAw/AwE/AzwADC0bbxtwG3QbaRtvG24bcxtfAS0bcBtsG3UbZxtpG24bcwE/AwE5EwImCUQsAQADBBMCJglELMoBAAQFFiYmBQcxE0AERQI8AgwtG3IbZRtnG2kbcxt0G2UbchtQG2wbdRtnG2kbbgE/AzwDDC0bVBtjG3AbbBthG3kbZRtyLRtjG28bbhtjG2EbdDY/Ay0bUBtsG3UbZxtpG24TAgE5EwILAAw/AwE/AzwADC0bbxtwG3QbaRtvG24bcxtfAS0bcBtsG3UbZxtpG24bcwE/AwE5EwImCUQsAQADBRYmJgUIMT9ABkUCPwMtG1YbUidDJj8EKAAmMQ4mPwUoACYJRCwDAAMFBAcFBhYmCwMMLRtUG2MbcBtsG2EbeRtlG3ItG2MbbxtuG2MbYRt0Nj8FLRtQG2wbdRtnG2kbbhMCATlDJj8EHUMxJCY/BUMmMRMmBQQ8BAw/BQE5FiYmPAALBQwtG2wbbxthG2QbUxtjG3IbaRtwG3QBOT8EMSRABEUCPwMoACYJRCwBAAMIKAImMUMmPwgoACYJRCw1AAEDFiYLBgwtG2sbZRt5G3MBPAclEwEtG2YbbxtyG0UbYRtjG2g2MUBABUUCRQMFAD8DQTkjLRtmG3UbbhtjG3QbaRtvG24nQwsGDC0baxtlG3kbcwE8BCUTAS0baRtuG2MbbBt1G2QbZRtzNj8DEwFDCwgMLRtwG2wbdRtnG2kbbhsgGyItG2MbbxtuG2MbYRt0Nj8DLRsiGyAbZBtvG2UbcxsgG24bbxt0GyAbZRt4G2kbcxt0EwI3AQAxPyY/BDwGJSQAPi0bcBtsG3UbZxtpG24bThthG20bZTY/Ax8mJigBJjELJgUAPwNBPAcMPwMBORMBJglELAEBBAQDPAAlEwImBQU/ABYmCwAMLRtyG2UbYRtkG3kBMTdABUUCPAAMLRt0G2UbYxtoG18BLRtyG2UbYRtkG3kBMQ5ABUUCPAAMLRtvG3AbdBtpG28bbhtzG18BLRtsG2kbYxtlG24bcxtlG1UbchtsATkdQyYxLCYFAy0bdRtuG2wbbxthG2QbVBtlG2MbaBtBG24bZBtUG3IbaRtnG2cbZRtyG0UbchtyG28bckEtGzUbNRMBJhhEPAMMLRt0G2MbcBtjG3IbeRtwG3QbbwE5QwsACwUMLRtsG28bYRtkG1MbYxtyG2kbcBt0ATk8BAwtG0Mbcht5G3AbdBtvATkxG0AERQIFAy0bYxtoG2UbYxtrG0wbaRtjG2UbbhtzG2VBPAAlPAclEwImCUQsAQADBCgCJjFDJgUELRtjG2gbZRtjG2sbTBtpG2MbZRtuG3MbZUE8ACU8ByUTAiYJRCwCAAMDBAQTASYJRCwCAAMDBAUTASYJRAUDLAkAABYmJglE\",[7,1544,51,901,200,532,377,381,379,435,461,521,522,463,544,694,695,546,706,739,721,731,729,737,740,708,805,893,811,815,813,818,819,824,822,837,868,881,882,870,891,899,943,1157,977,1139,1019,1097,1095,1155,1137,1155,1158,945,1192,1531,1226,1518,1278,1283,1281,1348,1373,1478,1421,1466,1467,1423,1476,1516,1519,1228,1532,1194]]),[function() { return typeof context == 'undefined' ? undefined : context },function() { return typeof console == 'undefined' ? undefined : console },function() { return typeof videojs == 'undefined' ? undefined : videojs },function() { return typeof window == 'undefined' ? undefined : window },function() { return typeof pluginMap == 'undefined' ? undefined : pluginMap },function() { return typeof _utils == 'undefined' ? undefined : _utils },function() { return typeof Object == 'undefined' ? undefined : Object },function() { return typeof plugins == 'undefined' ? undefined : plugins },function() { return typeof Error == 'undefined' ? undefined : Error }])).call(this)\n }\n },\n {\n key: 'unloadTechAndTriggerError',\n value: function unloadTechAndTriggerError(code) {\n return armor.g(armor.v(0,armor.d([\"QARFAkUDMY08QARFAkUDBQMFAC0bcBtsG2EbeRtlG3JBORYmJgUDLRtsG2kbYxtlG24bcxtlG0MbaBtlG2MbaxtGG2EbaRtsG2UbZEE1HyYmBQMtG2UbchtyG28bckE8ACUkAD4tG2MbbxtkG2U2PAElHyYmEwEmBQMtG3UbbhtsG28bYRtkQRMAJhhEBQMsCQAAFiYmCUQ=\",[]]),[function() { return typeof Object == 'undefined' ? undefined : Object },function() { return typeof code == 'undefined' ? undefined : code }])).call(this)\n }\n },\n {\n key: 'checkLicense',\n value: function () {\n var _checkLicense = _asyncToGenerator(_regeneratorRuntime().mark(function _callee(player, plugins) {\n return armor.g(armor.v(0,armor.d([\"QARFAkUDMTFAFkUCRQNFBEUFRQZFB0UIRQlFCkULRQxFDUUORQ9FEEURRRJFE0UURRU8AAwTAC0bdxtyG2EbcDYxRUAXRQJFAwUDLRtwG3IbZRt2QQUDLRtuG2UbeBt0QTkfIgAmPjwAJ0NyJjH1ICYmBQQ8AQwtG28bcBt0G2kbbxtuG3MbXwEtG2wbaRtjG2UbbhtzG2UbVRtyG2wBORYmJgUFPAIlJAAWJiYFAy0bcBtyG2UbdkE8Ah8mJgUDLRtuG2UbeBt0QTwFHyIAJgsDDC0bZBtlG2YbYRt1G2wbdAEtG2cbZRt0AT8EEwFEMTE+PAUnQ/8mMUUmJgUGBQMtG3MbZRtuG3RBORYmJgUFPwYKJ0MmPwYJJ0MmBQYtG2QbYRt0G2FBOTE/JgkWJiY/BR1DJjEOJgUALRt1G24bbBtvG2EbZBtUG2UbYxtoG0EbbhtkG1QbchtpG2cbZxtlG3IbRRtyG3IbbxtyQS0bNRs2EwEmBQMtG24bZRt4G3RBPA0fJiYxSwUxID48CidDJjEbJiYFAy0bcBtyG2UbdkE8Ch8mJgUDLRt0GzBBBQMtG2MbYRt0G2MbaEE8AhMBHyYmBQAtG3UbbhtsG28bYRtkG1QbZRtjG2gbQRtuG2QbVBtyG2kbZxtnG2UbchtFG3IbchtvG3JBLRs1GzYTASYxQz48DSdDJjETJiYFBzwEDC0bdBtjG3AbYxtyG3kbcBt0G28BORYmJgUIBQctG0EbZRtzG2QbZRtjG3IbeRtwG3RBORYmJgUJBQctG1MbaRtnG24bRBtlG2Mbcht5G3AbdEE5FiYmBQoFBy0bZxtlG24bSxtlG3lBORYmJgULLRtiGzYbMRtjG2YbMRthGzUbOBs5GzQbMRthG2IbNxtlGzkbMhs0GzcbYxs1G2IbNRs0GzgbMhtmG2QbYRszGzEWJiYFDC0bLRstGy0bLRstG0IbRRtHG0kbThsgG1AbVRtCG0wbSRtDGyAbSxtFG1kbLRstGy0bLRstG00bSRtJG0IbSRtqG0EbThtCG2cbaxtxG2gbaxtpG0cbORt3GzAbQhtBG1EbRRtGG0EbQRtPG0MbQRtRGzgbQRtNG0kbSRtCG0MbZxtLG0MbQRtRG0UbQRtxGzQbdBtlG3EbaxtXGy8bVBtVG3IbdRtVGzgbORtFG2wbThtWG2QbSxtyG3AbUxtMGysbSBtDG0kbVBtyG3UbeRtiGzYbQhtTGzkbbRtXGzYbTRs0G20bcRttG3gbRBtoG2EbehtEG20bURtnG00bSxtOG2YbcxtBGzAbZBsyG2sbeBtGG3UbYxtDG3MbWBtUG3kbZRtzG0YbThthG2obYRtpG3MbaxtyG0EbehtWG0obcBtOG0cbTxs3GzUbYhtRG0YbYRtwGzQbahtZG3obShtZG3MbaxtJG3UbYRtzGzYbZhtnG0kbUxs3G3obUxttG0cbWBtnG1IbYxtwGzYbaRswG1obQhtIGzMbcBtrG1YbQxtYG2MbZxtmG0wbZhtzG1YbQxtPGysbcxtOGzAbMRtqG0YbaBtGG2cbTxtDGzAbTBtZGzIbZhsxG3AbShsrGzMbahtxG2sbdBtBG2wbTRtJG3gbeRs4G1EbORt0GzcbWBt3G3cbTBs1Gy8bbhs4Gy8bUxtsG2UbZBtwGzcbVBt3G3UbUhtkG24bbBsyG08bUBtsGzMbeRtjG0MbVBtSG2sbWBt0G08bSRtvG1IbThtCGzkbdhtnG2QbORtYG28bbxtUG0sbaRtFG2QbQxtYG0MbNxtXGzkbcht5G3YbdBt3G0MbaRtBG0IbOBsyG3YbRRtmG0gbVxtYG1gbZxt6G2gbcxtQG0MbMRszG1UbUht1G0YbeRsxG0obcRtiG1cbSht0G1QbQxtDG2MbZhtzG0MbVht4G3UbQhtwG2wbaBtWG0obQRtRGzcbShtzG0YbNRtTG00bbht0G2QbShtEG2sbcBs3G3IbShtMG2gbcBtyG2cbcxthG2kbbRsyG0MbUhtqG2MbVhtzG2UbThttG3cbORs3G2IbdxtJG0QbQRtRG0EbQhstGy0bLRstGy0bRRtOG0QbIBtQG1UbQhtMG0kbQxsgG0sbRRtZGy0bLRstGy0bLRYmJgUNPwoFBS0bYRtwG3AbSRtkQTk/CygCFiYmBQ48BQwtG3AbYRtyG3MbZQE/CAUFLRtlG24bYxtyG3kbcBt0G2UbZBtMG2kbYxtlG24bcxtlG1cbZRtiQTk/DSgCEwEWJiYFDz8JBQUtG2UbbhtjG3IbeRtwG3QbZRtkG0wbaRtjG2UbbhtzG2UbVxtlG2JBOQUFLRtzG2kbZxtuG2EbdBt1G3IbZRtXG2UbYkE5PwwoAxYmJj8PQyYxMSYFAy0bbhtlG3gbdEE8FR8mJjFLPAUDLRthG2Ibcht1G3AbdEEtG3IbZRt0G3UbchtuBQAtG3UbbhtsG28bYRtkG1QbZRtjG2gbQRtuG2QbVBtyG2kbZxtnG2UbchtFG3IbchtvG3JBLRs1GzATARMCRDFDPjwVJ0MmMT8mJgUQPAAWJiYFETwAFiYmMQU+PBcnQyYxPyYmBRFCBQ4tG3cbZRtiG0QbYRt0G2FBLRtsG2UbbhtnG3QbaAE5Fx0dQyYxCyYFAy0bbhtlG3gbdEE8Mx8mJjFLQAUSBQ4tG3cbZRtiG0QbYRt0G2FBPxEBORYmJgUTPAQMLRtsG28bYxthG3QbaRtvG24BLRtoG28bcxt0ATkWJiYFEy0baRtuG2QbZRt4G08bZkEtG2wbbxtjG2EbbBtoG28bcxt0EwE8ADwBAztDJgUTLRtpG24bZBtlG3gbTxtmQS0bMRsyGzcbLhswGy4bMBsuGzETATwAPAEDOx1DJjFDJgUDLRtuG2UbeBt0QTweHyYmMUsHPAYMLRtsG28bZwEtG2kbbhsgG2QbZRt2G2UbbBtvG3AbbRtlG24bdBsgG2Ubbht2EwEmBQMtG24bZRt4G3RBPCEfJiYxSw4xPD48HidDJjELJiYFEi0bZBtvG20bYRtpG24bTBtpG3MbdEEtG2kbbhtjG2wbdRtkG2UbcwE/ExMBQyYxRSYFAy0bbhtlG3gbdEE8IR8mJjFLBQUQPDQWJiYFAy0bYRtiG3IbdRtwG3RBLRtjG28bbht0G2kbbht1G2U8MBMCRDEgPjwhJ0MmMSQmJgUUPAcMNwAtG2cbZRt0G1QbaRttG2U2EwAWJiYFEi0bcxt0G2Ebcht0G1QbaRttG2VBOTwAAz8UO0MmBRItG2UbbhtkG1QbaRttG2VBOTwAAz8UFx0dQyYxICYFAy0bbhtlG3gbdEE8JR8mJjFLJAUQPDMWJiYFAy0bYRtiG3IbdRtwG3RBLRtjG28bbht0G2kbbht1G2U8MBMCRDEgPjwlJ0MmMSAmJgUVPAgMLRtnG2UbdBtJG3QbZRttAS0bdBtjG3AbbBthG3kbZRtyGy0bdBtpG20bZRtzG3QbYRttG3ATATwAAxYmJj8VQzEHJj8UPxUXHR1DJjFDJgUDLRtuG2UbeBt0QTwpHyYmMUsiBRA8NRYmJgUDLRthG2Ibcht1G3AbdEEtG2MbbxtuG3QbaRtuG3UbZTwwEwJEMRM+PCknQyYxDiYmPAgMLRtzG2UbdBtJG3QbZRttAS0bdBtjG3AbbBthG3kbZRtyGy0bdBtpG20bZRtzG3QbYRttG3A/FBMCJgUWBRItG2YbZRthG3QbdRtyG2VBORYiACYLAgwtG2sbZRt5G3MBPAklEwEtG2kbbhtjG2wbdRtkG2UbczYtG1YbUhMBQwsCDC0baxtlG3kbcwE8CSUTAS0baRtuG2MbbBt1G2QbZRtzNi0bUxthG2YbZRtDG2gbZRtjG2sTAUMxCyY/FjwnHR1DJjFDJgUDLRtuG2UbeBt0QTwuHyYmMUsxBRA8NhYmJgUDLRthG2Ibcht1G3AbdEEtG2MbbxtuG3QbaRtuG3UbZTwwEwJEMRM+PC4nQyYxQyYmBRA8ABYmJgUDLRthG2Ibcht1G3AbdEEtG2IbchtlG2EbazwzEwJEMUM+PDAnQyYxPyYmBRE+Qj4iASIAPAEEFiYLACIAEiYFAy0bbhtlG3gbdEE8Fx8mJjFLMTExPjwzJ0MmMSwmJgUQQjwAJx1DJjEgJgUALRt1G24bbBtvG2EbZBtUG2UbYxtoG0EbbhtkG1QbchtpG2cbZxtlG3IbRRtyG3IbbxtyQT8QEwEmPAEMLRt0G3IbaRtnG2cbZRtyATwCJSQAPi0bdBt5G3AbZTYtG2wbaRtjG2UbbhtzG2UbQxtoG2UbYxtrG1MbdRtjG2MbZRtzG3MbZRtkHyYmEwEmMTE+PDUnQyYxDiYmMQs+LRtlG24bZCdDJjFLBSYmBQMtG3MbdBtvG3BBEwBEMUsFMUsiCUQsRRMBBAMFBAYFBwYIBwkICgkLCgwLDQwODQ8OEA8REBIRExIUExUUFhUDPAolPwA8CyUkAD48ADY8CyUkAD48ADY8Ah8mJj48ATY8Ch8mJh8mJhMERAUDLAkAABYmJglE\",[7,3471,67,3385,243,257,253,407,282,288,289,307,305,309,316,321,319,384,405,419,412,417,415,530,528,542,535,540,538,1920,1798,1803,1801,1824,1918,1932,1925,1930,1928,1949,1947,1961,1954,1959,1957,2286,2001,2006,2004,2027,2137,2184,2186,2191,2189,2212,2284,2298,2291,2296,2294,2419,2345,2350,2348,2371,2417,2431,2424,2429,2427,2593,2489,2517,2519,2524,2522,2545,2591,2605,2598,2603,2601,2761,2674,2678,2676,2685,2687,2692,2690,2713,2759,2773,2766,2771,2769,3049,2903,2961,2962,2966,2964,2973,2970,10000001,2975,2980,2978,3001,3047,3061,3054,3059,3057,3103,3101,3115,3108,3113,3111,3158,3156,3170,3163,3168,3166,3330,3178,3183,3181,3243,3328,3362,3335,3340,3338,3345,3343,3362,3355,3360]]),[function() { return typeof _regeneratorRuntime == 'undefined' ? undefined : _regeneratorRuntime },function() { return typeof player == 'undefined' ? undefined : player },function() { return typeof Object == 'undefined' ? undefined : Object },function() { return typeof _axios == 'undefined' ? undefined : _axios },function() { return typeof window == 'undefined' ? undefined : window },function() { return typeof JSON == 'undefined' ? undefined : JSON },function() { return typeof console == 'undefined' ? undefined : console },function() { return typeof Date == 'undefined' ? undefined : Date },function() { return typeof localStorage == 'undefined' ? undefined : localStorage },function() { return typeof plugins == 'undefined' ? undefined : plugins },function() { return typeof _callee == 'undefined' ? undefined : _callee },function() { return typeof Array == 'undefined' ? undefined : Array }])).call(this)\n }));\n function checkLicense(_x, _x2) {\n return _checkLicense.apply(this, arguments);\n }\n return checkLicense;\n }()\n },\n {\n key: 'base64ToHex',\n value: function base64ToHex(str) {\n var raw = atob(str);\n var result = '';\n for (var i = 0; i < raw.length; i++) {\n var hex = raw.charCodeAt(i).toString(16);\n result += hex.length === 2 ? hex : '0' + hex;\n }\n return result;\n }\n },\n {\n key: 'checkEnvironment',\n value: function checkEnvironment() {\n if (!Hls || !Hls.isSupported()) {\n console.error('未检测到 Hls 全局变量或当前环境不支持 hls.js\\uFF0C请选择其他播放方式');\n return false;\n }\n return true;\n }\n },\n {\n key: 'generatePlayCgiUrl',\n value: function generatePlayCgiUrl(url, browser, skip) {\n return armor.g(armor.v(0,armor.d([\"QARFAkUDMSJACUUCRQNFBEUFRQZFB0UIBQM8AAsADC0bZxtlG24bTxt2G2UbchtsG2EbeQE5KAAWJiYFBDwACwAMLRtnG2UbbhtPG3YbZRtyG2wbYRt5ATkoABYmJgUFPAEMLRtkG2UbZhthG3UbbBt0ATcAFiYmBQYtG00bSRtHG2YbTRtBGzAbRxtDG1MbcRtHG1MbSRtiGzMbRBtRG0UbQhtBG1EbVRtBG0EbNBtHG04bQRtEG0MbQhtpG1EbSxtCG2cbURtDGzMbcBtEG0EbNxtHG1QbeBtPG3YbThtiG1gbUhtHG00baRs5G1EbUxtJG3obURtFG0kbKxtFG00bRBsxG0gbYxtVG1AbShtTG1EbUxtGG3UbUhtrG1obaxtXG28bNBtWG1EbRRtDG3UbUBtSG2cbLxt4G1YbahtxG3cbWBsxG3kbVRtyG0gbVRt2G0cbURtKG3MbQht3G1QbUxsvGzYbTBtJG2MbURtpG1MbdxtZG3MbTxtxG2YbKxs4G1QbVxt4G0cbURtPG0obeRtXGzQbNhtnG1AbUBtRG1YbehtUG2obThtUG2kbVRtvG3EbNBszGzUbURtCGzAbdhsxGzEbbBtOG3gbdhtLG1cbQhtRG0kbWhtMG20bYRtjG1UbWhsyG3IbMRtBG1AbdBthGzcbaRsvG00bWRs0G0wbeBs5G1gbbBtaG1YbTRtaG04bVRtkG1UbeRt3G0kbRBtBG1EbQRtCFiYmBQUtG3MbZRt0G1AbdRtiG2wbaRtjG0sbZRt5QT8GEwEmBQcFAC0bYhthG3MbZRs2GzQbVBtvG0gbZRt4QQUFLRtlG24bYxtyG3kbcBt0QT8DEwETARYmJgUIBQAtG2IbYRtzG2UbNhs0G1QbbxtIG2UbeEEFBS0bZRtuG2Mbcht5G3AbdEE/BBMBEwEWJgsCDD45LRsmG2MbaRtwG2gbZRtyG2UbZBtPG3YbZRtyG2wbYRt5G0sbZRt5Gz0tG2MbbxtuG2MbYRt0Nj8HLRsmG2MbaRtwG2gbZRtyG2UbZBtPG3YbZRtyG2wbYRt5G0kbdhs9EwItG2MbbxtuG2MbYRt0Nj8ILRsmG2sbZRt5G0kbZBs9GzETAgQfIgAmCwMMLRtJG1MbXxtFG04bQRtCG0wbRRtEG18bTRtTG0UBOUMxByY8AwwtG0kbUxtfG1QbQhtTATkdQzFDJjwDDC0bSRtTG18bTRtRG1EbQgE5HUMxGyY8AwwtG0kbRRtfG1YbRRtSG1MbSRtPG04BOUMxByY8AwwtG0kbRRtfG1YbRRtSG1MbSRtPG04BOTwLFx0dHUMLBCVDJjEsJjwCDD45LRsmG20bcxtlGz0bbxtmG2YEHyIAJgsCDD45LRsmG3EbcxtpG2cbbhs9PAALBQwtG2QbZRtmG2EbdRtsG3QBOS0bbxt2G2UbchtsG2EbeRtLG2UbeRs9LRtjG28bbhtjG2EbdDY/Ay0bJhtvG3YbZRtyG2wbYRt5G0kbdhs9EwItG2MbbxtuG2MbYRt0Nj8ELRsmG20bcxtlGz0bbxtmG2YTAigBBAQfJiYFAC0bbxt2G2UbchtsG2EbeRtLG2UbeUE8AAsADC0bZRtuG2Mbcht5G3AbdBtvATk/AygBHyYmBQAtG28bdhtlG3IbbBthG3kbSRt2QTwACwAMLRtlG24bYxtyG3kbcBt0G28BOT8EKAEfIgAmCwIlRAUDLAkAABYmJglE\",[7,1300,879,883,881,903,904,908,906,930,931,935,933,999,963,967,965,998,1001,1005,1006,1011,1009,1187]]),[function() { return typeof _utils == 'undefined' ? undefined : _utils },function() { return typeof _jsencrypt == 'undefined' ? undefined : _jsencrypt },function() { return typeof url == 'undefined' ? undefined : url },function() { return typeof browser == 'undefined' ? undefined : browser },function() { return typeof skip == 'undefined' ? undefined : skip },function() { return typeof _md == 'undefined' ? undefined : _md }])).call(this)\n }\n },\n {\n key: 'generateKey',\n value: function generateKey(key) {\n var responseKey = new Uint8Array(key);\n var decryptedKey;\n if (this.overlayKey && this.overlayIv) {\n var keyArray = [];\n var ivArray = [];\n for (var i = 0; i < 16; i++) {\n var _key = this.overlayKey.substring(i * 2, i * 2 + 2);\n var _iv = this.overlayIv.substring(i * 2, i * 2 + 2);\n keyArray.push(parseInt(_key, 16));\n ivArray.push(parseInt(_iv, 16));\n }\n var aesCbc = new _aes['default'].modeOfOperation.cbc(keyArray, ivArray);\n decryptedKey = aesCbc.decrypt(responseKey);\n }\n return decryptedKey || responseKey;\n }\n },\n {\n key: 'calculateGhost',\n value: function calculateGhost(duration) {\n var period = duration / 4;\n var ghostCycle;\n if (period <= 15) {\n ghostCycle = duration / 2;\n } else if (period <= 30 * 60 / 4) {\n ghostCycle = duration / 4;\n } else {\n ghostCycle = 30 * 60 / 4;\n }\n var ghostOn = ghostCycle / 4;\n var ghostOff = ghostCycle - ghostOn;\n return {\n firstShow: localStorage.getItem('ghostWatermarkFirstShow') || Math.random() * ghostOff + 0.01,\n ghostOn: ghostOn,\n ghostOff: ghostOff\n };\n }\n }\n ]);\n return Enc;\n}();\nvar _default = Enc;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://enc/./enc.source.js?")
7
+ },"./utils.js":function utilsJs(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("\n\nvar armor = __webpack_require__(/*! !./node_modules/@tencent/js-armor-loader/dist/runtime.js */ \"./node_modules/@tencent/js-armor-loader/dist/runtime.js\");\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.decrypto = decrypto;\nexports.encrypto = encrypto;\nexports.genOverlay = genOverlay;\nexports.getRandomInt = getRandomInt;\nexports.loadScript = loadScript;\nfunction loadScript(src, callback, attrs) {\n var remove = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var tag = document.createElement('script');\n tag.onload = tag.onreadystatechange = function () {\n if (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete') {\n if (typeof callback == 'function') {\n callback();\n }\n tag.onload = tag.onreadystatechange = null;\n if (tag.parentNode && !remove) {\n tag.parentNode.removeChild(tag);\n }\n }\n };\n if (attrs) {\n for (var k in attrs) {\n if (!attrs.hasOwnProperty(k))\n continue;\n var attr = attrs[k];\n if (attr === null)\n tag.removeAttribute(attr);\n else\n tag.setAttribute(k, attr);\n }\n }\n tag.src = src;\n document.getElementsByTagName('head')[0].appendChild(tag);\n}\nfunction genOverlay() {\n var key = '';\n var array = [\n '0',\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f'\n ];\n for (var i = 0; i < 32; i++) {\n var randomInt = getRandomInt(0, 15);\n key += array[randomInt];\n }\n return key;\n}\nfunction getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction encrypto(str) {\n return armor.g(armor.v(0,armor.d([\"QARFAkUDMTxACkUCRQNFBEUFRQZFB0UIRQk8ACUjLRtzG3QbchtpG24bZycdQzQmMTcOJglEBQM8ASUkABYmJgUEPBkWJiYFBTx7FiYmBQY8ABYmJgUGQjwADC0bbBtlG24bZxt0G2gBORcdQ3MmMehAJgUHPAAMLRtjG2gbYRtyG0MbbxtkG2UbQRt0AT8GEwEWJiYFBz8HPAEhPwUcFiYmBQcFBy0bdBtvG1MbdBtyG2kbbhtnQT8EEwEWJiYFAy0bcBt1G3MbaEE/BxMBJgUGPkI+IgEiADwBBBYmCwAiABImMVYbBQg8AgwtG2YbchtvG20bQxtoG2EbchtDG28bZBtlAT8EPGEEEwEWJiYFCQUDLRtqG28baRtuQT8IEwEWJiY/CUQFAywJAAAWJiYJRA==\",[7,297]]),[function() { return typeof str == 'undefined' ? undefined : str },function() { return typeof Array == 'undefined' ? undefined : Array },function() { return typeof String == 'undefined' ? undefined : String }])).call(this)\n}\nfunction decrypto(str) {\n return armor.g(armor.v(0,armor.d([\"QARFAkUDMSRADEUCRQNFBEUFRQZFB0UIRQlFCkULPAAlIy0bcxt0G3IbaRtuG2cnHUM4JjE7QyYJRAUDPAElJAAWJiYFBDwBJSQAFiYmBQU8GRYmJgUGPHsWJiYFBzwCDC0bZhtyG28bbRtDG2gbYRtyG0MbbxtkG2UBPwU8YQQTARYmJgUDPAAMLRtzG3AbbBtpG3QBPwcTARYmJgUIPAAWJiYFCEIFAy0bbBtlG24bZxt0G2hBORcdQ8EmMSgmBQk8AwwFAz8IQTk/BRMCFiYmBQk/CTwBIT8GHBYmJgUKPAIMLRtmG3IbbxttG0MbaBthG3IbQxtvG2QbZQE/CRMBFiYmBQQtG3AbdRtzG2hBPwoTASYFCD5CPiIBIgA8AQQWJgsAIgASJjGlMQULBQQtG2obbxtpG25BLRMBFiYmPwtEBQMsCQAAFiYmCUQ=\",[7,326,191,303]]),[function() { return typeof str == 'undefined' ? undefined : str },function() { return typeof Array == 'undefined' ? undefined : Array },function() { return typeof String == 'undefined' ? undefined : String },function() { return typeof parseInt == 'undefined' ? undefined : parseInt }])).call(this)\n}\n\n//# sourceURL=webpack://enc/./utils.js?")},"./utils/aes.js":function utilsAesJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict"
8
+ ;eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */\n// (function (root) {\n\n\nfunction checkInt(value) {\n return parseInt(value) === value;\n}\nfunction checkInts(arrayish) {\n if (!checkInt(arrayish.length)) {\n return false;\n }\n for (var i = 0; i < arrayish.length; i++) {\n if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {\n return false;\n }\n }\n return true;\n}\nfunction coerceArray(arg, copy) {\n // ArrayBuffer view\n if (arg.buffer && arg.name === 'Uint8Array') {\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n return arg;\n }\n\n // It's an array; check it is a valid representation of a byte\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error('Array contains invalid value: ' + arg);\n }\n return new Uint8Array(arg);\n }\n\n // Something else, but behaves like an array (maybe a Buffer? Arguments?)\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n throw new Error('unsupported array-like object');\n}\nfunction createArray(length) {\n return new Uint8Array(length);\n}\nfunction copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n}\nvar convertUtf8 = function () {\n function toBytes(text) {\n var result = [];\n var i = 0;\n text = encodeURI(text);\n while (i < text.length) {\n var c = text.charCodeAt(i++);\n\n // if it is a % sign, encode the following 2 bytes as a hex value\n if (c === 37) {\n result.push(parseInt(text.substr(i, 2), 16));\n i += 2;\n\n // otherwise, just the actual byte\n } else {\n result.push(c);\n }\n }\n return coerceArray(result);\n }\n function fromBytes(bytes) {\n var result = [];\n var i = 0;\n while (i < bytes.length) {\n var c = bytes[i];\n if (c < 128) {\n result.push(String.fromCharCode(c));\n i++;\n } else if (c > 191 && c < 224) {\n result.push(String.fromCharCode((c & 0x1f) << 6 | bytes[i + 1] & 0x3f));\n i += 2;\n } else {\n result.push(String.fromCharCode((c & 0x0f) << 12 | (bytes[i + 1] & 0x3f) << 6 | bytes[i + 2] & 0x3f));\n i += 3;\n }\n }\n return result.join('');\n }\n return {\n toBytes: toBytes,\n fromBytes: fromBytes\n };\n}();\nvar convertHex = function () {\n function toBytes(text) {\n var result = [];\n for (var i = 0; i < text.length; i += 2) {\n result.push(parseInt(text.substr(i, 2), 16));\n }\n return result;\n }\n\n // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html\n var Hex = '0123456789abcdef';\n function fromBytes(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i++) {\n var v = bytes[i];\n result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);\n }\n return result.join('');\n }\n return {\n toBytes: toBytes,\n fromBytes: fromBytes\n };\n}();\n\n// Number of rounds by keysize\nvar numberOfRounds = {\n 16: 10,\n 24: 12,\n 32: 14\n};\n\n// Round constant words\nvar rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n\n// S-box and Inverse S-box (S is for Substitution)\nvar S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16];\nvar Si = [0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];\n\n// Transformations for encryption\nvar T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];\nvar T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];\nvar T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];\nvar T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];\n\n// Transformations for decryption\nvar T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];\nvar T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];\nvar T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];\nvar T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];\n\n// Transformations for decryption key expansion\nvar U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];\nvar U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];\nvar U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];\nvar U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];\nfunction convertToInt32(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i += 4) {\n result.push(bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]);\n }\n return result;\n}\nvar AES = function AES(key) {\n if (!(this instanceof AES)) {\n throw Error('AES must be instanitated with `new`');\n }\n Object.defineProperty(this, 'key', {\n value: coerceArray(key, true)\n });\n this._prepare();\n};\nAES.prototype._prepare = function () {\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error('invalid key size (must be 16, 24 or 32 bytes)');\n }\n\n // encryption round keys\n this._Ke = [];\n\n // decryption round keys\n this._Kd = [];\n for (var i = 0; i <= rounds; i++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n\n // convert the key into ints\n var tk = convertToInt32(this.key);\n\n // copy values into round key arrays\n var index;\n for (var i = 0; i < KC; i++) {\n index = i >> 2;\n this._Ke[index][i % 4] = tk[i];\n this._Kd[rounds - index][i % 4] = tk[i];\n }\n\n // key expansion (fips-197 section 5.2)\n var rconpointer = 0;\n var t = KC;\n var tt;\n while (t < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S[tt >> 16 & 0xFF] << 24 ^ S[tt >> 8 & 0xFF] << 16 ^ S[tt & 0xFF] << 8 ^ S[tt >> 24 & 0xFF] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n\n // key expansion (for non-256 bit)\n if (KC != 8) {\n for (var i = 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n\n // key expansion for 256-bit keys is \"slightly different\" (fips-197)\n } else {\n for (var i = 1; i < KC / 2; i++) {\n tk[i] ^= tk[i - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S[tt & 0xFF] ^ S[tt >> 8 & 0xFF] << 8 ^ S[tt >> 16 & 0xFF] << 16 ^ S[tt >> 24 & 0xFF] << 24;\n for (var i = KC / 2 + 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n }\n\n // copy values into round key arrays\n var i = 0;\n var r;\n var c;\n while (i < KC && t < roundKeyCount) {\n r = t >> 2;\n c = t % 4;\n this._Ke[r][c] = tk[i];\n this._Kd[rounds - r][c] = tk[i++];\n t++;\n }\n }\n\n // inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for (var r = 1; r < rounds; r++) {\n for (var c = 0; c < 4; c++) {\n tt = this._Kd[r][c];\n this._Kd[r][c] = U1[tt >> 24 & 0xFF] ^ U2[tt >> 16 & 0xFF] ^ U3[tt >> 8 & 0xFF] ^ U4[tt & 0xFF];\n }\n }\n};\nAES.prototype.encrypt = function (plaintext) {\n if (plaintext.length != 16) {\n throw new Error('invalid plaintext size (must be 16 bytes)');\n }\n var rounds = this._Ke.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(plaintext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Ke[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = T1[t[i] >> 24 & 0xff] ^ T2[t[(i + 1) % 4] >> 16 & 0xff] ^ T3[t[(i + 2) % 4] >> 8 & 0xff] ^ T4[t[(i + 3) % 4] & 0xff] ^ this._Ke[r][i];\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16);\n var tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Ke[rounds][i];\n result[4 * i] = (S[t[i] >> 24 & 0xff] ^ tt >> 24) & 0xff;\n result[4 * i + 1] = (S[t[(i + 1) % 4] >> 16 & 0xff] ^ tt >> 16) & 0xff;\n result[4 * i + 2] = (S[t[(i + 2) % 4] >> 8 & 0xff] ^ tt >> 8) & 0xff;\n result[4 * i + 3] = (S[t[(i + 3) % 4] & 0xff] ^ tt) & 0xff;\n }\n return result;\n};\nAES.prototype.decrypt = function (ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error('invalid ciphertext size (must be 16 bytes)');\n }\n var rounds = this._Kd.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(ciphertext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Kd[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = T5[t[i] >> 24 & 0xff] ^ T6[t[(i + 3) % 4] >> 16 & 0xff] ^ T7[t[(i + 2) % 4] >> 8 & 0xff] ^ T8[t[(i + 1) % 4] & 0xff] ^ this._Kd[r][i];\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16);\n var tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Kd[rounds][i];\n result[4 * i] = (Si[t[i] >> 24 & 0xff] ^ tt >> 24) & 0xff;\n result[4 * i + 1] = (Si[t[(i + 3) % 4] >> 16 & 0xff] ^ tt >> 16) & 0xff;\n result[4 * i + 2] = (Si[t[(i + 2) % 4] >> 8 & 0xff] ^ tt >> 8) & 0xff;\n result[4 * i + 3] = (Si[t[(i + 1) % 4] & 0xff] ^ tt) & 0xff;\n }\n return result;\n};\n\n/**\n * Mode Of Operation - Cipher Block Chaining (CBC)\n */\nvar ModeOfOperationCBC = function ModeOfOperationCBC(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error('AES must be instanitated with `new`');\n }\n this.description = 'Cipher Block Chaining';\n this.name = 'cbc';\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n this._lastCipherblock = coerceArray(iv, true);\n this._aes = new AES(key);\n};\nModeOfOperationCBC.prototype.encrypt = function (plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n for (var j = 0; j < 16; j++) {\n block[j] ^= this._lastCipherblock[j];\n }\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i);\n }\n return ciphertext;\n};\nModeOfOperationCBC.prototype.decrypt = function (ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n for (var j = 0; j < 16; j++) {\n plaintext[i + j] = block[j] ^ this._lastCipherblock[j];\n }\n copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);\n }\n return plaintext;\n};\n\n/**\n * Counter object for CTR common mode of operation\n */\nvar Counter = function Counter(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error('Counter must be instanitated with `new`');\n }\n\n // We allow 0, but anything false-ish uses the default 1\n if (initialValue !== 0 && !initialValue) {\n initialValue = 1;\n }\n if (typeof initialValue === 'number') {\n this._counter = createArray(16);\n this.setValue(initialValue);\n } else {\n this.setBytes(initialValue);\n }\n};\nCounter.prototype.setValue = function (value) {\n if (typeof value !== 'number' || parseInt(value) != value) {\n throw new Error('invalid counter value (must be an integer)');\n }\n\n // We cannot safely handle numbers beyond the safe range for integers\n if (value > Number.MAX_SAFE_INTEGER) {\n throw new Error('integer value out of safe range');\n }\n for (var index = 15; index >= 0; --index) {\n this._counter[index] = value % 256;\n value = parseInt(value / 256);\n }\n};\nCounter.prototype.setBytes = function (bytes) {\n bytes = coerceArray(bytes, true);\n if (bytes.length != 16) {\n throw new Error('invalid counter bytes size (must be 16 bytes)');\n }\n this._counter = bytes;\n};\nCounter.prototype.increment = function () {\n for (var i = 15; i >= 0; i--) {\n if (this._counter[i] === 255) {\n this._counter[i] = 0;\n } else {\n this._counter[i]++;\n break;\n }\n }\n};\n\n/// ////////////////////\n// Padding\n\n// See:https://tools.ietf.org/html/rfc2315\nfunction pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - data.length % 16;\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i = data.length; i < result.length; i++) {\n result[i] = padder;\n }\n return result;\n}\nfunction pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) {\n throw new Error('PKCS#7 invalid length');\n }\n var padder = data[data.length - 1];\n if (padder > 16) {\n throw new Error('PKCS#7 padding byte out of range');\n }\n var length = data.length - padder;\n for (var i = 0; i < padder; i++) {\n if (data[length + i] !== padder) {\n throw new Error('PKCS#7 invalid padding byte');\n }\n }\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\n return result;\n}\n\n/// ////////////////////\n// Exporting\n\n// The block cipher\nvar aesjs = {\n AES: AES,\n Counter: Counter,\n modeOfOperation: {\n cbc: ModeOfOperationCBC\n },\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n _arrayTest: {\n coerceArray: coerceArray,\n createArray: createArray,\n copyArray: copyArray\n }\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (aesjs);\n\n// node.js\n// if (typeof exports !== 'undefined') {\n// module.exports = aesjs;\n\n// // RequireJS/AMD\n// // http://www.requirejs.org/docs/api.html\n// // https://github.com/amdjs/amdjs-api/wiki/AMD\n// // eslint-disable-next-line no-undef\n// } else if (typeof (define) === 'function' && define.amd) {\n// // eslint-disable-next-line no-undef\n// define([], function () {\n// return aesjs;\n// });\n\n// // Web Browsers\n// } else {\n// // If there was an existing library at \"aesjs\" make sure it's still available\n// if (root.aesjs) {\n// aesjs._aesjs = root.aesjs;\n// }\n\n// root.aesjs = aesjs;\n// }\n// })(this);\n\n//# sourceURL=webpack://enc/./utils/aes.js?")
9
+ },"./node_modules/charenc/charenc.js":function node_modulesCharencCharencJs(module){eval("var charenc = {\n // UTF-8 encoding\n utf8: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n }\n },\n\n // Binary encoding\n bin: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n for (var bytes = [], i = 0; i < str.length; i++)\n bytes.push(str.charCodeAt(i) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n for (var str = [], i = 0; i < bytes.length; i++)\n str.push(String.fromCharCode(bytes[i]));\n return str.join('');\n }\n }\n};\n\nmodule.exports = charenc;\n\n\n//# sourceURL=webpack://enc/./node_modules/charenc/charenc.js?")},"./node_modules/crypt/crypt.js":function node_modulesCryptCryptJs(module){eval("(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n crypt = {\n // Bit-wise rotation left\n rotl: function(n, b) {\n return (n << b) | (n >>> (32 - b));\n },\n\n // Bit-wise rotation right\n rotr: function(n, b) {\n return (n << (32 - b)) | (n >>> b);\n },\n\n // Swap big-endian to little-endian and vice versa\n endian: function(n) {\n // If number given, swap endian\n if (n.constructor == Number) {\n return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n }\n\n // Else, assume array and swap all items\n for (var i = 0; i < n.length; i++)\n n[i] = crypt.endian(n[i]);\n return n;\n },\n\n // Generate an array of any length of random bytes\n randomBytes: function(n) {\n for (var bytes = []; n > 0; n--)\n bytes.push(Math.floor(Math.random() * 256));\n return bytes;\n },\n\n // Convert a byte array to big-endian 32-bit words\n bytesToWords: function(bytes) {\n for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n words[b >>> 5] |= bytes[i] << (24 - b % 32);\n return words;\n },\n\n // Convert big-endian 32-bit words to a byte array\n wordsToBytes: function(words) {\n for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a hex string\n bytesToHex: function(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n hex.push((bytes[i] >>> 4).toString(16));\n hex.push((bytes[i] & 0xF).toString(16));\n }\n return hex.join('');\n },\n\n // Convert a hex string to a byte array\n hexToBytes: function(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n return bytes;\n },\n\n // Convert a byte array to a base-64 string\n bytesToBase64: function(bytes) {\n for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n for (var j = 0; j < 4; j++)\n if (i * 8 + j * 6 <= bytes.length * 8)\n base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n else\n base64.push('=');\n }\n return base64.join('');\n },\n\n // Convert a base-64 string to a byte array\n base64ToBytes: function(base64) {\n // Remove non-base-64 characters\n base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n imod4 = ++i % 4) {\n if (imod4 == 0) continue;\n bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n }\n return bytes;\n }\n };\n\n module.exports = crypt;\n})();\n\n\n//# sourceURL=webpack://enc/./node_modules/crypt/crypt.js?")},"./node_modules/is-buffer/index.js":function node_modulesIsBufferIndexJs(module){eval("/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n\n//# sourceURL=webpack://enc/./node_modules/is-buffer/index.js?")},"./node_modules/jsencrypt/lib/JSEncrypt.js":function node_modulesJsencryptLibJSEncryptJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JSEncrypt: () => (/* binding */ JSEncrypt)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ \"./node_modules/jsencrypt/lib/lib/jsbn/base64.js\");\n/* harmony import */ var _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./JSEncryptRSAKey */ \"./node_modules/jsencrypt/lib/JSEncryptRSAKey.js\");\nvar _a;\n\n\nvar version = typeof process !== 'undefined'\n ? (_a = process.env) === null || _a === void 0 ? void 0 : _a.npm_package_version\n : undefined;\n/**\n *\n * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour\n * possible parameters are:\n * - default_key_size {number} default: 1024 the key size in bit\n * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent\n * - log {boolean} default: false whether log warn/error or not\n * @constructor\n */\nvar JSEncrypt = /** @class */ (function () {\n function JSEncrypt(options) {\n if (options === void 0) { options = {}; }\n options = options || {};\n this.default_key_size = options.default_key_size\n ? parseInt(options.default_key_size, 10)\n : 1024;\n this.default_public_exponent = options.default_public_exponent || \"010001\"; // 65537 default openssl public exponent for rsa key type\n this.log = options.log || false;\n // The private and public key.\n this.key = null;\n }\n /**\n * Method to set the rsa key parameter (one method is enough to set both the public\n * and the private key, since the private key contains the public key paramenters)\n * Log a warning if logs are enabled\n * @param {Object|string} key the pem encoded string or an object (with or without header/footer)\n * @public\n */\n JSEncrypt.prototype.setKey = function (key) {\n if (this.log && this.key) {\n console.warn(\"A key was already set, overriding existing.\");\n }\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey(key);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPrivateKey = function (privkey) {\n // Create the key.\n this.setKey(privkey);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPublicKey = function (pubkey) {\n // Sets the public key.\n this.setKey(pubkey);\n };\n /**\n * Proxy method for RSAKey object's decrypt, decrypt the string using the private\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str base64 encoded crypted string to decrypt\n * @return {string} the decrypted string\n * @public\n */\n JSEncrypt.prototype.decrypt = function (str) {\n // Return the decrypted string.\n try {\n return this.getKey().decrypt((0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's encrypt, encrypt the string using the public\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str the string to encrypt\n * @return {string} the encrypted string encoded in base64\n * @public\n */\n JSEncrypt.prototype.encrypt = function (str) {\n // Return the encrypted string.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().encrypt(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's sign.\n * @param {string} str the string to sign\n * @param {function} digestMethod hash method\n * @param {string} digestName the name of the hash algorithm\n * @return {string} the signature encoded in base64\n * @public\n */\n JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {\n // return the RSA signature of 'str' in 'hex' format.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().sign(str, digestMethod, digestName));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's verify.\n * @param {string} str the string to verify\n * @param {string} signature the signature encoded in base64 to compare the string to\n * @param {function} digestMethod hash method\n * @return {boolean} whether the data and signature match\n * @public\n */\n JSEncrypt.prototype.verify = function (str, signature, digestMethod) {\n // Return the decrypted 'digest' of the signature.\n try {\n return this.getKey().verify(str, (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(signature), digestMethod);\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object\n * will be created and returned\n * @param {callback} [cb] the callback to be called if we want the key to be generated\n * in an async fashion\n * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object\n * @public\n */\n JSEncrypt.prototype.getKey = function (cb) {\n // Only create new if it does not exist.\n if (!this.key) {\n // Get a new private key.\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey();\n if (cb && {}.toString.call(cb) === \"[object Function]\") {\n this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);\n return;\n }\n // Generate the key.\n this.key.generate(this.default_key_size, this.default_public_exponent);\n }\n return this.key;\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateKey();\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateBaseKeyB64();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicKey();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicBaseKeyB64();\n };\n JSEncrypt.version = version;\n return JSEncrypt;\n}());\n\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/JSEncrypt.js?")},"./node_modules/jsencrypt/lib/JSEncryptRSAKey.js":function node_modulesJsencryptLibJSEncryptRSAKeyJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JSEncryptRSAKey: () => (/* binding */ JSEncryptRSAKey)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ "./node_modules/jsencrypt/lib/lib/jsbn/base64.js");\n/* harmony import */ var _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/asn1js/hex */ "./node_modules/jsencrypt/lib/lib/asn1js/hex.js");\n/* harmony import */ var _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/asn1js/base64 */ "./node_modules/jsencrypt/lib/lib/asn1js/base64.js");\n/* harmony import */ var _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/asn1js/asn1 */ "./node_modules/jsencrypt/lib/lib/asn1js/asn1.js");\n/* harmony import */ var _lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/jsbn/rsa */ "./node_modules/jsencrypt/lib/lib/jsbn/rsa.js");\n/* harmony import */ var _lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/jsbn/jsbn */ "./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js");\n/* harmony import */ var _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/jsrsasign/asn1-1.0 */ "./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\n\n/**\n * Create a new JSEncryptRSAKey that extends Tom Wu\'s RSA key object.\n * This object is just a decorator for parsing the key parameter\n * @param {string|Object} key - The key in string format, or an object containing\n * the parameters needed to build a RSAKey object.\n * @constructor\n */\nvar JSEncryptRSAKey = /** @class */ (function (_super) {\n __extends(JSEncryptRSAKey, _super);\n function JSEncryptRSAKey(key) {\n var _this = _super.call(this) || this;\n // Call the super constructor.\n // RSAKey.call(this);\n // If a key key was provided.\n if (key) {\n // If this is a string...\n if (typeof key === "string") {\n _this.parseKey(key);\n }\n else if (JSEncryptRSAKey.hasPrivateKeyProperty(key) ||\n JSEncryptRSAKey.hasPublicKeyProperty(key)) {\n // Set the values for the key.\n _this.parsePropertiesFrom(key);\n }\n }\n return _this;\n }\n /**\n * Method to parse a pem encoded string containing both a public or private key.\n * The method will translate the pem encoded string in a der encoded string and\n * will parse private key and public key parameters. This method accepts public key\n * in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).\n *\n * @todo Check how many rsa formats use the same format of pkcs #1.\n *\n * The format is defined as:\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * it\'s possible to examine the structure of the keys obtained from openssl using\n * an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/\n * @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer\n * @private\n */\n JSEncryptRSAKey.prototype.parseKey = function (pem) {\n try {\n var modulus = 0;\n var public_exponent = 0;\n var reHex = /^\\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\\s*)+$/;\n var der = reHex.test(pem) ? _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__.Hex.decode(pem) : _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__.Base64.unarmor(pem);\n var asn1 = _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__.ASN1.decode(der);\n // Fixes a bug with OpenSSL 1.0+ private keys\n if (asn1.sub.length === 3) {\n asn1 = asn1.sub[2].sub[0];\n }\n if (asn1.sub.length === 9) {\n // Parse the private key.\n modulus = asn1.sub[1].getHexStringValue(); // bigint\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = asn1.sub[2].getHexStringValue(); // int\n this.e = parseInt(public_exponent, 16);\n var private_exponent = asn1.sub[3].getHexStringValue(); // bigint\n this.d = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(private_exponent, 16);\n var prime1 = asn1.sub[4].getHexStringValue(); // bigint\n this.p = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime1, 16);\n var prime2 = asn1.sub[5].getHexStringValue(); // bigint\n this.q = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime2, 16);\n var exponent1 = asn1.sub[6].getHexStringValue(); // bigint\n this.dmp1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent1, 16);\n var exponent2 = asn1.sub[7].getHexStringValue(); // bigint\n this.dmq1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent2, 16);\n var coefficient = asn1.sub[8].getHexStringValue(); // bigint\n this.coeff = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(coefficient, 16);\n }\n else if (asn1.sub.length === 2) {\n if (asn1.sub[0].sub) {\n // Parse ASN.1 SubjectPublicKeyInfo type as defined by X.509\n var bit_string = asn1.sub[1];\n var sequence = bit_string.sub[0];\n modulus = sequence.sub[0].getHexStringValue();\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = sequence.sub[1].getHexStringValue();\n this.e = parseInt(public_exponent, 16);\n }\n else {\n // Parse ASN.1 RSAPublicKey type as defined by PKCS #1\n modulus = asn1.sub[0].getHexStringValue();\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = asn1.sub[1].getHexStringValue();\n this.e = parseInt(public_exponent, 16);\n }\n }\n else {\n return false;\n }\n return true;\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa key.\n *\n * The translation follow the ASN.1 notation :\n * RSAPrivateKey ::= SEQUENCE {\n * version Version,\n * modulus INTEGER, -- n\n * publicExponent INTEGER, -- e\n * privateExponent INTEGER, -- d\n * prime1 INTEGER, -- p\n * prime2 INTEGER, -- q\n * exponent1 INTEGER, -- d mod (p1)\n * exponent2 INTEGER, -- d mod (q-1)\n * coefficient INTEGER, -- (inverse of q) mod p\n * }\n * @returns {string} DER Encoded String representing the rsa private key\n * @private\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {\n var options = {\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: 0 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.d }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.p }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.q }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmp1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmq1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.coeff }),\n ],\n };\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence(options);\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPrivateBaseKey());\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa public key.\n * The representation follow the ASN.1 notation :\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * @returns {string} DER Encoded String representing the rsa public key\n * @private\n */\n JSEncryptRSAKey.prototype.getPublicBaseKey = function () {\n var first_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERNull(),\n ],\n });\n var second_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e }),\n ],\n });\n var bit_string = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERBitString({\n hex: "00" + second_sequence.getEncodedHex(),\n });\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [first_sequence, bit_string],\n });\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPublicBaseKey());\n };\n /**\n * wrap the string in block of width chars. The default value for rsa keys is 64\n * characters.\n * @param {string} str the pem encoded string without header and footer\n * @param {Number} [width=64] - the length the string has to be wrapped at\n * @returns {string}\n * @private\n */\n JSEncryptRSAKey.wordwrap = function (str, width) {\n width = width || 64;\n if (!str) {\n return str;\n }\n var regex = "(.{1," + width + "})( +|$\\n?)|(.{1," + width + "})";\n return str.match(RegExp(regex, "g")).join("\\n");\n };\n /**\n * Retrieve the pem encoded private key\n * @returns {string} the pem encoded private key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateKey = function () {\n var key = "-----BEGIN RSA PRIVATE KEY-----\\n";\n key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + "\\n";\n key += "-----END RSA PRIVATE KEY-----";\n return key;\n };\n /**\n * Retrieve the pem encoded public key\n * @returns {string} the pem encoded public key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicKey = function () {\n var key = "-----BEGIN PUBLIC KEY-----\\n";\n key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + "\\n";\n key += "-----END PUBLIC KEY-----";\n return key;\n };\n /**\n * Check if the object contains the necessary parameters to populate the rsa modulus\n * and public exponent parameters.\n * @param {Object} [obj={}] - An object that may contain the two public key\n * parameters\n * @returns {boolean} true if the object contains both the modulus and the public exponent\n * properties (n and e)\n * @todo check for types of n and e. N should be a parseable bigInt object, E should\n * be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {\n obj = obj || {};\n return obj.hasOwnProperty("n") && obj.hasOwnProperty("e");\n };\n /**\n * Check if the object contains ALL the parameters of an RSA key.\n * @param {Object} [obj={}] - An object that may contain nine rsa key\n * parameters\n * @returns {boolean} true if the object contains all the parameters needed\n * @todo check for types of the parameters all the parameters but the public exponent\n * should be parseable bigint objects, the public exponent should be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {\n obj = obj || {};\n return (obj.hasOwnProperty("n") &&\n obj.hasOwnProperty("e") &&\n obj.hasOwnProperty("d") &&\n obj.hasOwnProperty("p") &&\n obj.hasOwnProperty("q") &&\n obj.hasOwnProperty("dmp1") &&\n obj.hasOwnProperty("dmq1") &&\n obj.hasOwnProperty("coeff"));\n };\n /**\n * Parse the properties of obj in the current rsa object. Obj should AT LEAST\n * include the modulus and public exponent (n, e) parameters.\n * @param {Object} obj - the object containing rsa parameters\n * @private\n */\n JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {\n this.n = obj.n;\n this.e = obj.e;\n if (obj.hasOwnProperty("d")) {\n this.d = obj.d;\n this.p = obj.p;\n this.q = obj.q;\n this.dmp1 = obj.dmp1;\n this.dmq1 = obj.dmq1;\n this.coeff = obj.coeff;\n }\n };\n return JSEncryptRSAKey;\n}(_lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__.RSAKey));\n\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/JSEncryptRSAKey.js?')},"./node_modules/jsencrypt/lib/index.js":function node_modulesJsencryptLibIndexJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JSEncrypt: () => (/* reexport safe */ _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt),\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./JSEncrypt */ "./node_modules/jsencrypt/lib/JSEncrypt.js");\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt);\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/index.js?')},"./node_modules/jsencrypt/lib/lib/asn1js/asn1.js":function node_modulesJsencryptLibLibAsn1jsAsn1Js(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict"
10
+ ;eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ASN1: () => (/* binding */ ASN1),\n/* harmony export */ ASN1Tag: () => (/* binding */ ASN1Tag),\n/* harmony export */ Stream: () => (/* binding */ Stream)\n/* harmony export */ });\n/* harmony import */ var _int10__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./int10 */ "./node_modules/jsencrypt/lib/lib/asn1js/int10.js");\n// ASN.1 JavaScript decoder\n// Copyright (c) 2008-2014 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\n/*global oids */\n\nvar ellipsis = "\\u2026";\nvar reTimeS = /^(\\d\\d)(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])([01]\\d|2[0-3])(?:([0-5]\\d)(?:([0-5]\\d)(?:[.,](\\d{1,3}))?)?)?(Z|[-+](?:[0]\\d|1[0-2])([0-5]\\d)?)?$/;\nvar reTimeL = /^(\\d\\d\\d\\d)(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])([01]\\d|2[0-3])(?:([0-5]\\d)(?:([0-5]\\d)(?:[.,](\\d{1,3}))?)?)?(Z|[-+](?:[0]\\d|1[0-2])([0-5]\\d)?)?$/;\nfunction stringCut(str, len) {\n if (str.length > len) {\n str = str.substring(0, len) + ellipsis;\n }\n return str;\n}\nvar Stream = /** @class */ (function () {\n function Stream(enc, pos) {\n this.hexDigits = "0123456789ABCDEF";\n if (enc instanceof Stream) {\n this.enc = enc.enc;\n this.pos = enc.pos;\n }\n else {\n // enc should be an array or a binary string\n this.enc = enc;\n this.pos = pos;\n }\n }\n Stream.prototype.get = function (pos) {\n if (pos === undefined) {\n pos = this.pos++;\n }\n if (pos >= this.enc.length) {\n throw new Error("Requesting byte offset ".concat(pos, " on a stream of length ").concat(this.enc.length));\n }\n return ("string" === typeof this.enc) ? this.enc.charCodeAt(pos) : this.enc[pos];\n };\n Stream.prototype.hexByte = function (b) {\n return this.hexDigits.charAt((b >> 4) & 0xF) + this.hexDigits.charAt(b & 0xF);\n };\n Stream.prototype.hexDump = function (start, end, raw) {\n var s = "";\n for (var i = start; i < end; ++i) {\n s += this.hexByte(this.get(i));\n if (raw !== true) {\n switch (i & 0xF) {\n case 0x7:\n s += " ";\n break;\n case 0xF:\n s += "\\n";\n break;\n default:\n s += " ";\n }\n }\n }\n return s;\n };\n Stream.prototype.isASCII = function (start, end) {\n for (var i = start; i < end; ++i) {\n var c = this.get(i);\n if (c < 32 || c > 176) {\n return false;\n }\n }\n return true;\n };\n Stream.prototype.parseStringISO = function (start, end) {\n var s = "";\n for (var i = start; i < end; ++i) {\n s += String.fromCharCode(this.get(i));\n }\n return s;\n };\n Stream.prototype.parseStringUTF = function (start, end) {\n var s = "";\n for (var i = start; i < end;) {\n var c = this.get(i++);\n if (c < 128) {\n s += String.fromCharCode(c);\n }\n else if ((c > 191) && (c < 224)) {\n s += String.fromCharCode(((c & 0x1F) << 6) | (this.get(i++) & 0x3F));\n }\n else {\n s += String.fromCharCode(((c & 0x0F) << 12) | ((this.get(i++) & 0x3F) << 6) | (this.get(i++) & 0x3F));\n }\n }\n return s;\n };\n Stream.prototype.parseStringBMP = function (start, end) {\n var str = "";\n var hi;\n var lo;\n for (var i = start; i < end;) {\n hi = this.get(i++);\n lo = this.get(i++);\n str += String.fromCharCode((hi << 8) | lo);\n }\n return str;\n };\n Stream.prototype.parseTime = function (start, end, shortYear) {\n var s = this.parseStringISO(start, end);\n var m = (shortYear ? reTimeS : reTimeL).exec(s);\n if (!m) {\n return "Unrecognized time: " + s;\n }\n if (shortYear) {\n // to avoid querying the timer, use the fixed range [1970, 2069]\n // it will conform with ITU X.400 [-10, +40] sliding window until 2030\n m[1] = +m[1];\n m[1] += (+m[1] < 70) ? 2000 : 1900;\n }\n s = m[1] + "-" + m[2] + "-" + m[3] + " " + m[4];\n if (m[5]) {\n s += ":" + m[5];\n if (m[6]) {\n s += ":" + m[6];\n if (m[7]) {\n s += "." + m[7];\n }\n }\n }\n if (m[8]) {\n s += " UTC";\n if (m[8] != "Z") {\n s += m[8];\n if (m[9]) {\n s += ":" + m[9];\n }\n }\n }\n return s;\n };\n Stream.prototype.parseInteger = function (start, end) {\n var v = this.get(start);\n var neg = (v > 127);\n var pad = neg ? 255 : 0;\n var len;\n var s = "";\n // skip unuseful bits (not allowed in DER)\n while (v == pad && ++start < end) {\n v = this.get(start);\n }\n len = end - start;\n if (len === 0) {\n return neg ? -1 : 0;\n }\n // show bit length of huge integers\n if (len > 4) {\n s = v;\n len <<= 3;\n while (((+s ^ pad) & 0x80) == 0) {\n s = +s << 1;\n --len;\n }\n s = "(" + len + " bit)\\n";\n }\n // decode the integer\n if (neg) {\n v = v - 256;\n }\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10(v);\n for (var i = start + 1; i < end; ++i) {\n n.mulAdd(256, this.get(i));\n }\n return s + n.toString();\n };\n Stream.prototype.parseBitString = function (start, end, maxLength) {\n var unusedBit = this.get(start);\n var lenBit = ((end - start - 1) << 3) - unusedBit;\n var intro = "(" + lenBit + " bit)\\n";\n var s = "";\n for (var i = start + 1; i < end; ++i) {\n var b = this.get(i);\n var skip = (i == end - 1) ? unusedBit : 0;\n for (var j = 7; j >= skip; --j) {\n s += (b >> j) & 1 ? "1" : "0";\n }\n if (s.length > maxLength) {\n return intro + stringCut(s, maxLength);\n }\n }\n return intro + s;\n };\n Stream.prototype.parseOctetString = function (start, end, maxLength) {\n if (this.isASCII(start, end)) {\n return stringCut(this.parseStringISO(start, end), maxLength);\n }\n var len = end - start;\n var s = "(" + len + " byte)\\n";\n maxLength /= 2; // we work in bytes\n if (len > maxLength) {\n end = start + maxLength;\n }\n for (var i = start; i < end; ++i) {\n s += this.hexByte(this.get(i));\n }\n if (len > maxLength) {\n s += ellipsis;\n }\n return s;\n };\n Stream.prototype.parseOID = function (start, end, maxLength) {\n var s = "";\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n var bits = 0;\n for (var i = start; i < end; ++i) {\n var v = this.get(i);\n n.mulAdd(128, v & 0x7F);\n bits += 7;\n if (!(v & 0x80)) { // finished\n if (s === "") {\n n = n.simplify();\n if (n instanceof _int10__WEBPACK_IMPORTED_MODULE_0__.Int10) {\n n.sub(80);\n s = "2." + n.toString();\n }\n else {\n var m = n < 80 ? n < 40 ? 0 : 1 : 2;\n s = m + "." + (n - m * 40);\n }\n }\n else {\n s += "." + n.toString();\n }\n if (s.length > maxLength) {\n return stringCut(s, maxLength);\n }\n n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n bits = 0;\n }\n }\n if (bits > 0) {\n s += ".incomplete";\n }\n return s;\n };\n return Stream;\n}());\n\nvar ASN1 = /** @class */ (function () {\n function ASN1(stream, header, length, tag, sub) {\n if (!(tag instanceof ASN1Tag)) {\n throw new Error("Invalid tag value.");\n }\n this.stream = stream;\n this.header = header;\n this.length = length;\n this.tag = tag;\n this.sub = sub;\n }\n ASN1.prototype.typeName = function () {\n switch (this.tag.tagClass) {\n case 0: // universal\n switch (this.tag.tagNumber) {\n case 0x00:\n return "EOC";\n case 0x01:\n return "BOOLEAN";\n case 0x02:\n return "INTEGER";\n case 0x03:\n return "BIT_STRING";\n case 0x04:\n return "OCTET_STRING";\n case 0x05:\n return "NULL";\n case 0x06:\n return "OBJECT_IDENTIFIER";\n case 0x07:\n return "ObjectDescriptor";\n case 0x08:\n return "EXTERNAL";\n case 0x09:\n return "REAL";\n case 0x0A:\n return "ENUMERATED";\n case 0x0B:\n return "EMBEDDED_PDV";\n case 0x0C:\n return "UTF8String";\n case 0x10:\n return "SEQUENCE";\n case 0x11:\n return "SET";\n case 0x12:\n return "NumericString";\n case 0x13:\n return "PrintableString"; // ASCII subset\n case 0x14:\n return "TeletexString"; // aka T61String\n case 0x15:\n return "VideotexString";\n case 0x16:\n return "IA5String"; // ASCII\n case 0x17:\n return "UTCTime";\n case 0x18:\n return "GeneralizedTime";\n case 0x19:\n return "GraphicString";\n case 0x1A:\n return "VisibleString"; // ASCII subset\n case 0x1B:\n return "GeneralString";\n case 0x1C:\n return "UniversalString";\n case 0x1E:\n return "BMPString";\n }\n return "Universal_" + this.tag.tagNumber.toString();\n case 1:\n return "Application_" + this.tag.tagNumber.toString();\n case 2:\n return "[" + this.tag.tagNumber.toString() + "]"; // Context\n case 3:\n return "Private_" + this.tag.tagNumber.toString();\n }\n };\n ASN1.prototype.content = function (maxLength) {\n if (this.tag === undefined) {\n return null;\n }\n if (maxLength === undefined) {\n maxLength = Infinity;\n }\n var content = this.posContent();\n var len = Math.abs(this.length);\n if (!this.tag.isUniversal()) {\n if (this.sub !== null) {\n return "(" + this.sub.length + " elem)";\n }\n return this.stream.parseOctetString(content, content + len, maxLength);\n }\n switch (this.tag.tagNumber) {\n case 0x01: // BOOLEAN\n return (this.stream.get(content) === 0) ? "false" : "true";\n case 0x02: // INTEGER\n return this.stream.parseInteger(content, content + len);\n case 0x03: // BIT_STRING\n return this.sub ? "(" + this.sub.length + " elem)" :\n this.stream.parseBitString(content, content + len, maxLength);\n case 0x04: // OCTET_STRING\n return this.sub ? "(" + this.sub.length + " elem)" :\n this.stream.parseOctetString(content, content + len, maxLength);\n // case 0x05: // NULL\n case 0x06: // OBJECT_IDENTIFIER\n return this.stream.parseOID(content, content + len, maxLength);\n // case 0x07: // ObjectDescriptor\n // case 0x08: // EXTERNAL\n // case 0x09: // REAL\n // case 0x0A: // ENUMERATED\n // case 0x0B: // EMBEDDED_PDV\n case 0x10: // SEQUENCE\n case 0x11: // SET\n if (this.sub !== null) {\n return "(" + this.sub.length + " elem)";\n }\n else {\n return "(no elem)";\n }\n case 0x0C: // UTF8String\n return stringCut(this.stream.parseStringUTF(content, content + len), maxLength);\n case 0x12: // NumericString\n case 0x13: // PrintableString\n case 0x14: // TeletexString\n case 0x15: // VideotexString\n case 0x16: // IA5String\n // case 0x19: // GraphicString\n case 0x1A: // VisibleString\n // case 0x1B: // GeneralString\n // case 0x1C: // UniversalString\n return stringCut(this.stream.parseStringISO(content, content + len), maxLength);\n case 0x1E: // BMPString\n return stringCut(this.stream.parseStringBMP(content, content + len), maxLength);\n case 0x17: // UTCTime\n case 0x18: // GeneralizedTime\n return this.stream.parseTime(content, content + len, (this.tag.tagNumber == 0x17));\n }\n return null;\n };\n ASN1.prototype.toString = function () {\n return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + ((this.sub === null) ? "null" : this.sub.length) + "]";\n };\n ASN1.prototype.toPrettyString = function (indent) {\n if (indent === undefined) {\n indent = "";\n }\n var s = indent + this.typeName() + " @" + this.stream.pos;\n if (this.length >= 0) {\n s += "+";\n }\n s += this.length;\n if (this.tag.tagConstructed) {\n s += " (constructed)";\n }\n else if ((this.tag.isUniversal() && ((this.tag.tagNumber == 0x03) || (this.tag.tagNumber == 0x04))) && (this.sub !== null)) {\n s += " (encapsulates)";\n }\n s += "\\n";\n if (this.sub !== null) {\n indent += " ";\n for (var i = 0, max = this.sub.length; i < max; ++i) {\n s += this.sub[i].toPrettyString(indent);\n }\n }\n return s;\n };\n ASN1.prototype.posStart = function () {\n return this.stream.pos;\n };\n ASN1.prototype.posContent = function () {\n return this.stream.pos + this.header;\n };\n ASN1.prototype.posEnd = function () {\n return this.stream.pos + this.header + Math.abs(this.length);\n };\n ASN1.prototype.toHexString = function () {\n return this.stream.hexDump(this.posStart(), this.posEnd(), true);\n };\n ASN1.decodeLength = function (stream) {\n var buf = stream.get();\n var len = buf & 0x7F;\n if (len == buf) {\n return len;\n }\n // no reason to use Int10, as it would be a huge buffer anyways\n if (len > 6) {\n throw new Error("Length over 48 bits not supported at position " + (stream.pos - 1));\n }\n if (len === 0) {\n return null;\n } // undefined\n buf = 0;\n for (var i = 0; i < len; ++i) {\n buf = (buf * 256) + stream.get();\n }\n return buf;\n };\n /**\n * Retrieve the hexadecimal value (as a string) of the current ASN.1 element\n * @returns {string}\n * @public\n */\n ASN1.prototype.getHexStringValue = function () {\n var hexString = this.toHexString();\n var offset = this.header * 2;\n var length = this.length * 2;\n return hexString.substr(offset, length);\n };\n ASN1.decode = function (str) {\n var stream;\n if (!(str instanceof Stream)) {\n stream = new Stream(str, 0);\n }\n else {\n stream = str;\n }\n var streamStart = new Stream(stream);\n var tag = new ASN1Tag(stream);\n var len = ASN1.decodeLength(stream);\n var start = stream.pos;\n var header = start - streamStart.pos;\n var sub = null;\n var getSub = function () {\n var ret = [];\n if (len !== null) {\n // definite length\n var end = start + len;\n while (stream.pos < end) {\n ret[ret.length] = ASN1.decode(stream);\n }\n if (stream.pos != end) {\n throw new Error("Content size is not correct for container starting at offset " + start);\n }\n }\n else {\n // undefined length\n try {\n for (;;) {\n var s = ASN1.decode(stream);\n if (s.tag.isEOC()) {\n break;\n }\n ret[ret.length] = s;\n }\n len = start - stream.pos; // undefined lengths are represented as negative values\n }\n catch (e) {\n throw new Error("Exception while decoding undefined length content: " + e);\n }\n }\n return ret;\n };\n if (tag.tagConstructed) {\n // must have valid content\n sub = getSub();\n }\n else if (tag.isUniversal() && ((tag.tagNumber == 0x03) || (tag.tagNumber == 0x04))) {\n // sometimes BitString and OctetString are used to encapsulate ASN.1\n try {\n if (tag.tagNumber == 0x03) {\n if (stream.get() != 0) {\n throw new Error("BIT STRINGs with unused bits cannot encapsulate.");\n }\n }\n sub = getSub();\n for (var i = 0; i < sub.length; ++i) {\n if (sub[i].tag.isEOC()) {\n throw new Error("EOC is not supposed to be actual content.");\n }\n }\n }\n catch (e) {\n // but silently ignore when they don\'t\n sub = null;\n }\n }\n if (sub === null) {\n if (len === null) {\n throw new Error("We can\'t skip over an invalid tag with undefined length at offset " + start);\n }\n stream.pos = start + Math.abs(len);\n }\n return new ASN1(streamStart, header, len, tag, sub);\n };\n return ASN1;\n}());\n\nvar ASN1Tag = /** @class */ (function () {\n function ASN1Tag(stream) {\n var buf = stream.get();\n this.tagClass = buf >> 6;\n this.tagConstructed = ((buf & 0x20) !== 0);\n this.tagNumber = buf & 0x1F;\n if (this.tagNumber == 0x1F) { // long tag\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n do {\n buf = stream.get();\n n.mulAdd(128, buf & 0x7F);\n } while (buf & 0x80);\n this.tagNumber = n.simplify();\n }\n }\n ASN1Tag.prototype.isUniversal = function () {\n return this.tagClass === 0x00;\n };\n ASN1Tag.prototype.isEOC = function () {\n return this.tagClass === 0x00 && this.tagNumber === 0x00;\n };\n return ASN1Tag;\n}());\n\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/asn1js/asn1.js?')},"./node_modules/jsencrypt/lib/lib/asn1js/base64.js":function node_modulesJsencryptLibLibAsn1jsBase64Js(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Base64: () => (/* binding */ Base64)\n/* harmony export */ });\n// Base64 JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar decoder;\nvar Base64 = {\n decode: function (a) {\n var i;\n if (decoder === undefined) {\n var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var ignore = "= \\f\\n\\r\\t\\u00A0\\u2028\\u2029";\n decoder = Object.create(null);\n for (i = 0; i < 64; ++i) {\n decoder[b64.charAt(i)] = i;\n }\n decoder[\'-\'] = 62; //+\n decoder[\'_\'] = 63; //-\n for (i = 0; i < ignore.length; ++i) {\n decoder[ignore.charAt(i)] = -1;\n }\n }\n var out = [];\n var bits = 0;\n var char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == "=") {\n break;\n }\n c = decoder[c];\n if (c == -1) {\n continue;\n }\n if (c === undefined) {\n throw new Error("Illegal character at offset " + i);\n }\n bits |= c;\n if (++char_count >= 4) {\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n out[out.length] = bits & 0xFF;\n bits = 0;\n char_count = 0;\n }\n else {\n bits <<= 6;\n }\n }\n switch (char_count) {\n case 1:\n throw new Error("Base64 encoding incomplete: at least 2 bits missing");\n case 2:\n out[out.length] = (bits >> 10);\n break;\n case 3:\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n break;\n }\n return out;\n },\n re: /-----BEGIN [^-]+-----([A-Za-z0-9+\\/=\\s]+)-----END [^-]+-----|begin-base64[^\\n]+\\n([A-Za-z0-9+\\/=\\s]+)====/,\n unarmor: function (a) {\n var m = Base64.re.exec(a);\n if (m) {\n if (m[1]) {\n a = m[1];\n }\n else if (m[2]) {\n a = m[2];\n }\n else {\n throw new Error("RegExp out of sync");\n }\n }\n return Base64.decode(a);\n }\n};\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/asn1js/base64.js?')},"./node_modules/jsencrypt/lib/lib/asn1js/hex.js":function node_modulesJsencryptLibLibAsn1jsHexJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Hex: () => (/* binding */ Hex)\n/* harmony export */ });\n// Hex JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar decoder;\nvar Hex = {\n decode: function (a) {\n var i;\n if (decoder === undefined) {\n var hex = "0123456789ABCDEF";\n var ignore = " \\f\\n\\r\\t\\u00A0\\u2028\\u2029";\n decoder = {};\n for (i = 0; i < 16; ++i) {\n decoder[hex.charAt(i)] = i;\n }\n hex = hex.toLowerCase();\n for (i = 10; i < 16; ++i) {\n decoder[hex.charAt(i)] = i;\n }\n for (i = 0; i < ignore.length; ++i) {\n decoder[ignore.charAt(i)] = -1;\n }\n }\n var out = [];\n var bits = 0;\n var char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == "=") {\n break;\n }\n c = decoder[c];\n if (c == -1) {\n continue;\n }\n if (c === undefined) {\n throw new Error("Illegal character at offset " + i);\n }\n bits |= c;\n if (++char_count >= 2) {\n out[out.length] = bits;\n bits = 0;\n char_count = 0;\n }\n else {\n bits <<= 4;\n }\n }\n if (char_count) {\n throw new Error("Hex encoding incomplete: 4 bits missing");\n }\n return out;\n }\n};\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/asn1js/hex.js?')},"./node_modules/jsencrypt/lib/lib/asn1js/int10.js":function node_modulesJsencryptLibLibAsn1jsInt10Js(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Int10: () => (/* binding */ Int10)\n/* harmony export */ });\n// Big integer base-10 printing library\n// Copyright (c) 2014 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar max = 10000000000000; // biggest integer that can still fit 2^53 when multiplied by 256\nvar Int10 = /** @class */ (function () {\n function Int10(value) {\n this.buf = [+value || 0];\n }\n Int10.prototype.mulAdd = function (m, c) {\n // assert(m <= 256)\n var b = this.buf;\n var l = b.length;\n var i;\n var t;\n for (i = 0; i < l; ++i) {\n t = b[i] * m + c;\n if (t < max) {\n c = 0;\n }\n else {\n c = 0 | (t / max);\n t -= c * max;\n }\n b[i] = t;\n }\n if (c > 0) {\n b[i] = c;\n }\n };\n Int10.prototype.sub = function (c) {\n // assert(m <= 256)\n var b = this.buf;\n var l = b.length;\n var i;\n var t;\n for (i = 0; i < l; ++i) {\n t = b[i] - c;\n if (t < 0) {\n t += max;\n c = 1;\n }\n else {\n c = 0;\n }\n b[i] = t;\n }\n while (b[b.length - 1] === 0) {\n b.pop();\n }\n };\n Int10.prototype.toString = function (base) {\n if ((base || 10) != 10) {\n throw new Error("only base 10 is supported");\n }\n var b = this.buf;\n var s = b[b.length - 1].toString();\n for (var i = b.length - 2; i >= 0; --i) {\n s += (max + b[i]).toString().substring(1);\n }\n return s;\n };\n Int10.prototype.valueOf = function () {\n var b = this.buf;\n var v = 0;\n for (var i = b.length - 1; i >= 0; --i) {\n v = v * max + b[i];\n }\n return v;\n };\n Int10.prototype.simplify = function () {\n var b = this.buf;\n return (b.length == 1) ? b[0] : this;\n };\n return Int10;\n}());\n\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/asn1js/int10.js?')},"./node_modules/jsencrypt/lib/lib/jsbn/base64.js":function node_modulesJsencryptLibLibJsbnBase64Js(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict"
11
+ ;eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ b64toBA: () => (/* binding */ b64toBA),\n/* harmony export */ b64tohex: () => (/* binding */ b64tohex),\n/* harmony export */ hex2b64: () => (/* binding */ hex2b64)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/jsencrypt/lib/lib/jsbn/util.js");\n\nvar b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\nvar b64pad = "=";\nfunction hex2b64(h) {\n var i;\n var c;\n var ret = "";\n for (i = 0; i + 3 <= h.length; i += 3) {\n c = parseInt(h.substring(i, i + 3), 16);\n ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);\n }\n if (i + 1 == h.length) {\n c = parseInt(h.substring(i, i + 1), 16);\n ret += b64map.charAt(c << 2);\n }\n else if (i + 2 == h.length) {\n c = parseInt(h.substring(i, i + 2), 16);\n ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);\n }\n while ((ret.length & 3) > 0) {\n ret += b64pad;\n }\n return ret;\n}\n// convert a base64 string to hex\nfunction b64tohex(s) {\n var ret = "";\n var i;\n var k = 0; // b64 state, 0-3\n var slop = 0;\n for (i = 0; i < s.length; ++i) {\n if (s.charAt(i) == b64pad) {\n break;\n }\n var v = b64map.indexOf(s.charAt(i));\n if (v < 0) {\n continue;\n }\n if (k == 0) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v >> 2);\n slop = v & 3;\n k = 1;\n }\n else if (k == 1) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)((slop << 2) | (v >> 4));\n slop = v & 0xf;\n k = 2;\n }\n else if (k == 2) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(slop);\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v >> 2);\n slop = v & 3;\n k = 3;\n }\n else {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)((slop << 2) | (v >> 4));\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v & 0xf);\n k = 0;\n }\n }\n if (k == 1) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(slop << 2);\n }\n return ret;\n}\n// convert a base64 string to a byte/number array\nfunction b64toBA(s) {\n // piggyback on b64tohex for now, optimize later\n var h = b64tohex(s);\n var i;\n var a = [];\n for (i = 0; 2 * i < h.length; ++i) {\n a[i] = parseInt(h.substring(2 * i, 2 * i + 2), 16);\n }\n return a;\n}\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/jsbn/base64.js?')},"./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js":function node_modulesJsencryptLibLibJsbnJsbnJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict"
12
+ ;eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BigInteger: () => (/* binding */ BigInteger),\n/* harmony export */ intAt: () => (/* binding */ intAt),\n/* harmony export */ nbi: () => (/* binding */ nbi),\n/* harmony export */ nbits: () => (/* binding */ nbits),\n/* harmony export */ nbv: () => (/* binding */ nbv),\n/* harmony export */ parseBigInt: () => (/* binding */ parseBigInt)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/jsencrypt/lib/lib/jsbn/util.js");\n// Copyright (c) 2005 Tom Wu\n// All Rights Reserved.\n// See "LICENSE" for details.\n// Basic JavaScript BN library - subset useful for RSA encryption.\n\n// Bits per digit\nvar dbits;\n// JavaScript engine analysis\nvar canary = 0xdeadbeefcafe;\nvar j_lm = ((canary & 0xffffff) == 0xefcafe);\n//#region\nvar lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];\nvar lplim = (1 << 26) / lowprimes[lowprimes.length - 1];\n//#endregion\n// (public) Constructor\nvar BigInteger = /** @class */ (function () {\n function BigInteger(a, b, c) {\n if (a != null) {\n if ("number" == typeof a) {\n this.fromNumber(a, b, c);\n }\n else if (b == null && "string" != typeof a) {\n this.fromString(a, 256);\n }\n else {\n this.fromString(a, b);\n }\n }\n }\n //#region PUBLIC\n // BigInteger.prototype.toString = bnToString;\n // (public) return string representation in given radix\n BigInteger.prototype.toString = function (b) {\n if (this.s < 0) {\n return "-" + this.negate().toString(b);\n }\n var k;\n if (b == 16) {\n k = 4;\n }\n else if (b == 8) {\n k = 3;\n }\n else if (b == 2) {\n k = 1;\n }\n else if (b == 32) {\n k = 5;\n }\n else if (b == 4) {\n k = 2;\n }\n else {\n return this.toRadix(b);\n }\n var km = (1 << k) - 1;\n var d;\n var m = false;\n var r = "";\n var i = this.t;\n var p = this.DB - (i * this.DB) % k;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(d);\n }\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & ((1 << p) - 1)) << (k - p);\n d |= this[--i] >> (p += this.DB - k);\n }\n else {\n d = (this[i] >> (p -= k)) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0) {\n m = true;\n }\n if (m) {\n r += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(d);\n }\n }\n }\n return m ? r : "0";\n };\n // BigInteger.prototype.negate = bnNegate;\n // (public) -this\n BigInteger.prototype.negate = function () {\n var r = nbi();\n BigInteger.ZERO.subTo(this, r);\n return r;\n };\n // BigInteger.prototype.abs = bnAbs;\n // (public) |this|\n BigInteger.prototype.abs = function () {\n return (this.s < 0) ? this.negate() : this;\n };\n // BigInteger.prototype.compareTo = bnCompareTo;\n // (public) return + if this > a, - if this < a, 0 if equal\n BigInteger.prototype.compareTo = function (a) {\n var r = this.s - a.s;\n if (r != 0) {\n return r;\n }\n var i = this.t;\n r = i - a.t;\n if (r != 0) {\n return (this.s < 0) ? -r : r;\n }\n while (--i >= 0) {\n if ((r = this[i] - a[i]) != 0) {\n return r;\n }\n }\n return 0;\n };\n // BigInteger.prototype.bitLength = bnBitLength;\n // (public) return the number of bits in "this"\n BigInteger.prototype.bitLength = function () {\n if (this.t <= 0) {\n return 0;\n }\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\n };\n // BigInteger.prototype.mod = bnMod;\n // (public) this mod a\n BigInteger.prototype.mod = function (a) {\n var r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\n a.subTo(r, r);\n }\n return r;\n };\n // BigInteger.prototype.modPowInt = bnModPowInt;\n // (public) this^e % m, 0 <= e < 2^32\n BigInteger.prototype.modPowInt = function (e, m) {\n var z;\n if (e < 256 || m.isEven()) {\n z = new Classic(m);\n }\n else {\n z = new Montgomery(m);\n }\n return this.exp(e, z);\n };\n // BigInteger.prototype.clone = bnClone;\n // (public)\n BigInteger.prototype.clone = function () {\n var r = nbi();\n this.copyTo(r);\n return r;\n };\n // BigInteger.prototype.intValue = bnIntValue;\n // (public) return value as integer\n BigInteger.prototype.intValue = function () {\n if (this.s < 0) {\n if (this.t == 1) {\n return this[0] - this.DV;\n }\n else if (this.t == 0) {\n return -1;\n }\n }\n else if (this.t == 1) {\n return this[0];\n }\n else if (this.t == 0) {\n return 0;\n }\n // assumes 16 < DB < 32\n return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];\n };\n // BigInteger.prototype.byteValue = bnByteValue;\n // (public) return value as byte\n BigInteger.prototype.byteValue = function () {\n return (this.t == 0) ? this.s : (this[0] << 24) >> 24;\n };\n // BigInteger.prototype.shortValue = bnShortValue;\n // (public) return value as short (assumes DB>=16)\n BigInteger.prototype.shortValue = function () {\n return (this.t == 0) ? this.s : (this[0] << 16) >> 16;\n };\n // BigInteger.prototype.signum = bnSigNum;\n // (public) 0 if this == 0, 1 if this > 0\n BigInteger.prototype.signum = function () {\n if (this.s < 0) {\n return -1;\n }\n else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) {\n return 0;\n }\n else {\n return 1;\n }\n };\n // BigInteger.prototype.toByteArray = bnToByteArray;\n // (public) convert to bigendian byte array\n BigInteger.prototype.toByteArray = function () {\n var i = this.t;\n var r = [];\n r[0] = this.s;\n var p = this.DB - (i * this.DB) % 8;\n var d;\n var k = 0;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p) {\n r[k++] = d | (this.s << (this.DB - p));\n }\n while (i >= 0) {\n if (p < 8) {\n d = (this[i] & ((1 << p) - 1)) << (8 - p);\n d |= this[--i] >> (p += this.DB - 8);\n }\n else {\n d = (this[i] >> (p -= 8)) & 0xff;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if ((d & 0x80) != 0) {\n d |= -256;\n }\n if (k == 0 && (this.s & 0x80) != (d & 0x80)) {\n ++k;\n }\n if (k > 0 || d != this.s) {\n r[k++] = d;\n }\n }\n }\n return r;\n };\n // BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.equals = function (a) {\n return (this.compareTo(a) == 0);\n };\n // BigInteger.prototype.min = bnMin;\n BigInteger.prototype.min = function (a) {\n return (this.compareTo(a) < 0) ? this : a;\n };\n // BigInteger.prototype.max = bnMax;\n BigInteger.prototype.max = function (a) {\n return (this.compareTo(a) > 0) ? this : a;\n };\n // BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.and = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_and, r);\n return r;\n };\n // BigInteger.prototype.or = bnOr;\n BigInteger.prototype.or = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_or, r);\n return r;\n };\n // BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.xor = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_xor, r);\n return r;\n };\n // BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.andNot = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_andnot, r);\n return r;\n };\n // BigInteger.prototype.not = bnNot;\n // (public) ~this\n BigInteger.prototype.not = function () {\n var r = nbi();\n for (var i = 0; i < this.t; ++i) {\n r[i] = this.DM & ~this[i];\n }\n r.t = this.t;\n r.s = ~this.s;\n return r;\n };\n // BigInteger.prototype.shiftLeft = bnShiftLeft;\n // (public) this << n\n BigInteger.prototype.shiftLeft = function (n) {\n var r = nbi();\n if (n < 0) {\n this.rShiftTo(-n, r);\n }\n else {\n this.lShiftTo(n, r);\n }\n return r;\n };\n // BigInteger.prototype.shiftRight = bnShiftRight;\n // (public) this >> n\n BigInteger.prototype.shiftRight = function (n) {\n var r = nbi();\n if (n < 0) {\n this.lShiftTo(-n, r);\n }\n else {\n this.rShiftTo(n, r);\n }\n return r;\n };\n // BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n // (public) returns index of lowest 1-bit (or -1 if none)\n BigInteger.prototype.getLowestSetBit = function () {\n for (var i = 0; i < this.t; ++i) {\n if (this[i] != 0) {\n return i * this.DB + (0,_util__WEBPACK_IMPORTED_MODULE_0__.lbit)(this[i]);\n }\n }\n if (this.s < 0) {\n return this.t * this.DB;\n }\n return -1;\n };\n // BigInteger.prototype.bitCount = bnBitCount;\n // (public) return number of set bits\n BigInteger.prototype.bitCount = function () {\n var r = 0;\n var x = this.s & this.DM;\n for (var i = 0; i < this.t; ++i) {\n r += (0,_util__WEBPACK_IMPORTED_MODULE_0__.cbit)(this[i] ^ x);\n }\n return r;\n };\n // BigInteger.prototype.testBit = bnTestBit;\n // (public) true iff nth bit is set\n BigInteger.prototype.testBit = function (n) {\n var j = Math.floor(n / this.DB);\n if (j >= this.t) {\n return (this.s != 0);\n }\n return ((this[j] & (1 << (n % this.DB))) != 0);\n };\n // BigInteger.prototype.setBit = bnSetBit;\n // (public) this | (1<<n)\n BigInteger.prototype.setBit = function (n) {\n return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__.op_or);\n };\n // BigInteger.prototype.clearBit = bnClearBit;\n // (public) this & ~(1<<n)\n BigInteger.prototype.clearBit = function (n) {\n return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__.op_andnot);\n };\n // BigInteger.prototype.flipBit = bnFlipBit;\n // (public) this ^ (1<<n)\n BigInteger.prototype.flipBit = function (n) {\n return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__.op_xor);\n };\n // BigInteger.prototype.add = bnAdd;\n // (public) this + a\n BigInteger.prototype.add = function (a) {\n var r = nbi();\n this.addTo(a, r);\n return r;\n };\n // BigInteger.prototype.subtract = bnSubtract;\n // (public) this - a\n BigInteger.prototype.subtract = function (a) {\n var r = nbi();\n this.subTo(a, r);\n return r;\n };\n // BigInteger.prototype.multiply = bnMultiply;\n // (public) this * a\n BigInteger.prototype.multiply = function (a) {\n var r = nbi();\n this.multiplyTo(a, r);\n return r;\n };\n // BigInteger.prototype.divide = bnDivide;\n // (public) this / a\n BigInteger.prototype.divide = function (a) {\n var r = nbi();\n this.divRemTo(a, r, null);\n return r;\n };\n // BigInteger.prototype.remainder = bnRemainder;\n // (public) this % a\n BigInteger.prototype.remainder = function (a) {\n var r = nbi();\n this.divRemTo(a, null, r);\n return r;\n };\n // BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n // (public) [this/a,this%a]\n BigInteger.prototype.divideAndRemainder = function (a) {\n var q = nbi();\n var r = nbi();\n this.divRemTo(a, q, r);\n return [q, r];\n };\n // BigInteger.prototype.modPow = bnModPow;\n // (public) this^e % m (HAC 14.85)\n BigInteger.prototype.modPow = function (e, m) {\n var i = e.bitLength();\n var k;\n var r = nbv(1);\n var z;\n if (i <= 0) {\n return r;\n }\n else if (i < 18) {\n k = 1;\n }\n else if (i < 48) {\n k = 3;\n }\n else if (i < 144) {\n k = 4;\n }\n else if (i < 768) {\n k = 5;\n }\n else {\n k = 6;\n }\n if (i < 8) {\n z = new Classic(m);\n }\n else if (m.isEven()) {\n z = new Barrett(m);\n }\n else {\n z = new Montgomery(m);\n }\n // precomputation\n var g = [];\n var n = 3;\n var k1 = k - 1;\n var km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n var g2 = nbi();\n z.sqrTo(g[1], g2);\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n var j = e.t - 1;\n var w;\n var is1 = true;\n var r2 = nbi();\n var t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1) {\n w = (e[j] >> (i - k1)) & km;\n }\n else {\n w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);\n if (j > 0) {\n w |= e[j - 1] >> (this.DB + i - k1);\n }\n }\n n = k;\n while ((w & 1) == 0) {\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) { // ret == 1, don\'t bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0) {\n z.sqrTo(r, r2);\n }\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n while (j >= 0 && (e[j] & (1 << i)) == 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n return z.revert(r);\n };\n // BigInteger.prototype.modInverse = bnModInverse;\n // (public) 1/this % m (HAC 14.61)\n BigInteger.prototype.modInverse = function (m) {\n var ac = m.isEven();\n if ((this.isEven() && ac) || m.signum() == 0) {\n return BigInteger.ZERO;\n }\n var u = m.clone();\n var v = this.clone();\n var a = nbv(1);\n var b = nbv(0);\n var c = nbv(0);\n var d = nbv(1);\n while (u.signum() != 0) {\n while (u.isEven()) {\n u.rShiftTo(1, u);\n if (ac) {\n if (!a.isEven() || !b.isEven()) {\n a.addTo(this, a);\n b.subTo(m, b);\n }\n a.rShiftTo(1, a);\n }\n else if (!b.isEven()) {\n b.subTo(m, b);\n }\n b.rShiftTo(1, b);\n }\n while (v.isEven()) {\n v.rShiftTo(1, v);\n if (ac) {\n if (!c.isEven() || !d.isEven()) {\n c.addTo(this, c);\n d.subTo(m, d);\n }\n c.rShiftTo(1, c);\n }\n else if (!d.isEven()) {\n d.subTo(m, d);\n }\n d.rShiftTo(1, d);\n }\n if (u.compareTo(v) >= 0) {\n u.subTo(v, u);\n if (ac) {\n a.subTo(c, a);\n }\n b.subTo(d, b);\n }\n else {\n v.subTo(u, v);\n if (ac) {\n c.subTo(a, c);\n }\n d.subTo(b, d);\n }\n }\n if (v.compareTo(BigInteger.ONE) != 0) {\n return BigInteger.ZERO;\n }\n if (d.compareTo(m) >= 0) {\n return d.subtract(m);\n }\n if (d.signum() < 0) {\n d.addTo(m, d);\n }\n else {\n return d;\n }\n if (d.signum() < 0) {\n return d.add(m);\n }\n else {\n return d;\n }\n };\n // BigInteger.prototype.pow = bnPow;\n // (public) this^e\n BigInteger.prototype.pow = function (e) {\n return this.exp(e, new NullExp());\n };\n // BigInteger.prototype.gcd = bnGCD;\n // (public) gcd(this,a) (HAC 14.54)\n BigInteger.prototype.gcd = function (a) {\n var x = (this.s < 0) ? this.negate() : this.clone();\n var y = (a.s < 0) ? a.negate() : a.clone();\n if (x.compareTo(y) < 0) {\n var t = x;\n x = y;\n y = t;\n }\n var i = x.getLowestSetBit();\n var g = y.getLowestSetBit();\n if (g < 0) {\n return x;\n }\n if (i < g) {\n g = i;\n }\n if (g > 0) {\n x.rShiftTo(g, x);\n y.rShiftTo(g, y);\n }\n while (x.signum() > 0) {\n if ((i = x.getLowestSetBit()) > 0) {\n x.rShiftTo(i, x);\n }\n if ((i = y.getLowestSetBit()) > 0) {\n y.rShiftTo(i, y);\n }\n if (x.compareTo(y) >= 0) {\n x.subTo(y, x);\n x.rShiftTo(1, x);\n }\n else {\n y.subTo(x, y);\n y.rShiftTo(1, y);\n }\n }\n if (g > 0) {\n y.lShiftTo(g, y);\n }\n return y;\n };\n // BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n // (public) test primality with certainty >= 1-.5^t\n BigInteger.prototype.isProbablePrime = function (t) {\n var i;\n var x = this.abs();\n if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) {\n for (i = 0; i < lowprimes.length; ++i) {\n if (x[0] == lowprimes[i]) {\n return true;\n }\n }\n return false;\n }\n if (x.isEven()) {\n return false;\n }\n i = 1;\n while (i < lowprimes.length) {\n var m = lowprimes[i];\n var j = i + 1;\n while (j < lowprimes.length && m < lplim) {\n m *= lowprimes[j++];\n }\n m = x.modInt(m);\n while (i < j) {\n if (m % lowprimes[i++] == 0) {\n return false;\n }\n }\n }\n return x.millerRabin(t);\n };\n //#endregion PUBLIC\n //#region PROTECTED\n // BigInteger.prototype.copyTo = bnpCopyTo;\n // (protected) copy this to r\n BigInteger.prototype.copyTo = function (r) {\n for (var i = this.t - 1; i >= 0; --i) {\n r[i] = this[i];\n }\n r.t = this.t;\n r.s = this.s;\n };\n // BigInteger.prototype.fromInt = bnpFromInt;\n // (protected) set from integer value x, -DV <= x < DV\n BigInteger.prototype.fromInt = function (x) {\n this.t = 1;\n this.s = (x < 0) ? -1 : 0;\n if (x > 0) {\n this[0] = x;\n }\n else if (x < -1) {\n this[0] = x + this.DV;\n }\n else {\n this.t = 0;\n }\n };\n // BigInteger.prototype.fromString = bnpFromString;\n // (protected) set from string and radix\n BigInteger.prototype.fromString = function (s, b) {\n var k;\n if (b == 16) {\n k = 4;\n }\n else if (b == 8) {\n k = 3;\n }\n else if (b == 256) {\n k = 8;\n /* byte array */\n }\n else if (b == 2) {\n k = 1;\n }\n else if (b == 32) {\n k = 5;\n }\n else if (b == 4) {\n k = 2;\n }\n else {\n this.fromRadix(s, b);\n return;\n }\n this.t = 0;\n this.s = 0;\n var i = s.length;\n var mi = false;\n var sh = 0;\n while (--i >= 0) {\n var x = (k == 8) ? (+s[i]) & 0xff : intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == "-") {\n mi = true;\n }\n continue;\n }\n mi = false;\n if (sh == 0) {\n this[this.t++] = x;\n }\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\n this[this.t++] = (x >> (this.DB - sh));\n }\n else {\n this[this.t - 1] |= x << sh;\n }\n sh += k;\n if (sh >= this.DB) {\n sh -= this.DB;\n }\n }\n if (k == 8 && ((+s[0]) & 0x80) != 0) {\n this.s = -1;\n if (sh > 0) {\n this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;\n }\n }\n this.clamp();\n if (mi) {\n BigInteger.ZERO.subTo(this, this);\n }\n };\n // BigInteger.prototype.clamp = bnpClamp;\n // (protected) clamp off excess high words\n BigInteger.prototype.clamp = function () {\n var c = this.s & this.DM;\n while (this.t > 0 && this[this.t - 1] == c) {\n --this.t;\n }\n };\n // BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n // (protected) r = this << n*DB\n BigInteger.prototype.dlShiftTo = function (n, r) {\n var i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + n] = this[i];\n }\n for (i = n - 1; i >= 0; --i) {\n r[i] = 0;\n }\n r.t = this.t + n;\n r.s = this.s;\n };\n // BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n // (protected) r = this >> n*DB\n BigInteger.prototype.drShiftTo = function (n, r) {\n for (var i = n; i < this.t; ++i) {\n r[i - n] = this[i];\n }\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n };\n // BigInteger.prototype.lShiftTo = bnpLShiftTo;\n // (protected) r = this << n\n BigInteger.prototype.lShiftTo = function (n, r) {\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << cbs) - 1;\n var ds = Math.floor(n / this.DB);\n var c = (this.s << bs) & this.DM;\n for (var i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = (this[i] >> cbs) | c;\n c = (this[i] & bm) << bs;\n }\n for (var i = ds - 1; i >= 0; --i) {\n r[i] = 0;\n }\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n };\n // BigInteger.prototype.rShiftTo = bnpRShiftTo;\n // (protected) r = this >> n\n BigInteger.prototype.rShiftTo = function (n, r) {\n r.s = this.s;\n var ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (var i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0) {\n r[this.t - ds - 1] |= (this.s & bm) << cbs;\n }\n r.t = this.t - ds;\n r.clamp();\n };\n // BigInteger.prototype.subTo = bnpSubTo;\n // (protected) r = this - a\n BigInteger.prototype.subTo = function (a, r) {\n var i = 0;\n var c = 0;\n var m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c < 0) ? -1 : 0;\n if (c < -1) {\n r[i++] = this.DV + c;\n }\n else if (c > 0) {\n r[i++] = c;\n }\n r.t = i;\n r.clamp();\n };\n // BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // "this" should be the larger one if appropriate.\n BigInteger.prototype.multiplyTo = function (a, r) {\n var x = this.abs();\n var y = a.abs();\n var i = x.t;\n r.t = i + y.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < y.t; ++i) {\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n }\n r.s = 0;\n r.clamp();\n if (this.s != a.s) {\n BigInteger.ZERO.subTo(r, r);\n }\n };\n // BigInteger.prototype.squareTo = bnpSquareTo;\n // (protected) r = this^2, r != this (HAC 14.16)\n BigInteger.prototype.squareTo = function (r) {\n var x = this.abs();\n var i = r.t = 2 * x.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < x.t - 1; ++i) {\n var c = x.am(i, x[i], r, 2 * i, 0, 1);\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0) {\n r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n }\n r.s = 0;\n r.clamp();\n };\n // BigInteger.prototype.divRemTo = bnpDivRemTo;\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n BigInteger.prototype.divRemTo = function (m, q, r) {\n var pm = m.abs();\n if (pm.t <= 0) {\n return;\n }\n var pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null) {\n q.fromInt(0);\n }\n if (r != null) {\n this.copyTo(r);\n }\n return;\n }\n if (r == null) {\n r = nbi();\n }\n var y = nbi();\n var ts = this.s;\n var ms = m.s;\n var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n }\n else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n var ys = y.t;\n var y0 = y[ys - 1];\n if (y0 == 0) {\n return;\n }\n var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0);\n var d1 = this.FV / yt;\n var d2 = (1 << this.F1) / yt;\n var e = 1 << this.F2;\n var i = r.t;\n var j = i - ys;\n var t = (q == null) ? nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y); // "negative" y so we can replace sub with am later\n while (y.t < ys) {\n y[y.t++] = 0;\n }\n while (--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) { // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while (r[i] < --qd) {\n r.subTo(t, r);\n }\n }\n }\n if (q != null) {\n r.drShiftTo(ys, q);\n if (ts != ms) {\n BigInteger.ZERO.subTo(q, q);\n }\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0) {\n r.rShiftTo(nsh, r);\n } // Denormalize remainder\n if (ts < 0) {\n BigInteger.ZERO.subTo(r, r);\n }\n };\n // BigInteger.prototype.invDigit = bnpInvDigit;\n // (protected) return "-1/this % 2^DB"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply "overflows" differently from C/C++, so care is needed here.\n BigInteger.prototype.invDigit = function () {\n if (this.t < 1) {\n return 0;\n }\n var x = this[0];\n if ((x & 1) == 0) {\n return 0;\n }\n var y = x & 3; // y == 1/x mod 2^2\n y = (y * (2 - (x & 0xf) * y)) & 0xf; // y == 1/x mod 2^4\n y = (y * (2 - (x & 0xff) * y)) & 0xff; // y == 1/x mod 2^8\n y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y * (2 - x * y % this.DV)) % this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y > 0) ? this.DV - y : -y;\n };\n // BigInteger.prototype.isEven = bnpIsEven;\n // (protected) true iff this is even\n BigInteger.prototype.isEven = function () {\n return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;\n };\n // BigInteger.prototype.exp = bnpExp;\n // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)\n BigInteger.prototype.exp = function (e, z) {\n if (e > 0xffffffff || e < 1) {\n return BigInteger.ONE;\n }\n var r = nbi();\n var r2 = nbi();\n var g = z.convert(this);\n var i = nbits(e) - 1;\n g.copyTo(r);\n while (--i >= 0) {\n z.sqrTo(r, r2);\n if ((e & (1 << i)) > 0) {\n z.mulTo(r2, g, r);\n }\n else {\n var t = r;\n r = r2;\n r2 = t;\n }\n }\n return z.revert(r);\n };\n // BigInteger.prototype.chunkSize = bnpChunkSize;\n // (protected) return x s.t. r^x < DV\n BigInteger.prototype.chunkSize = function (r) {\n return Math.floor(Math.LN2 * this.DB / Math.log(r));\n };\n // BigInteger.prototype.toRadix = bnpToRadix;\n // (protected) convert to radix string\n BigInteger.prototype.toRadix = function (b) {\n if (b == null) {\n b = 10;\n }\n if (this.signum() == 0 || b < 2 || b > 36) {\n return "0";\n }\n var cs = this.chunkSize(b);\n var a = Math.pow(b, cs);\n var d = nbv(a);\n var y = nbi();\n var z = nbi();\n var r = "";\n this.divRemTo(d, y, z);\n while (y.signum() > 0) {\n r = (a + z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d, y, z);\n }\n return z.intValue().toString(b) + r;\n };\n // BigInteger.prototype.fromRadix = bnpFromRadix;\n // (protected) convert from radix string\n BigInteger.prototype.fromRadix = function (s, b) {\n this.fromInt(0);\n if (b == null) {\n b = 10;\n }\n var cs = this.chunkSize(b);\n var d = Math.pow(b, cs);\n var mi = false;\n var j = 0;\n var w = 0;\n for (var i = 0; i < s.length; ++i) {\n var x = intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == "-" && this.signum() == 0) {\n mi = true;\n }\n continue;\n }\n w = b * w + x;\n if (++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w, 0);\n j = 0;\n w = 0;\n }\n }\n if (j > 0) {\n this.dMultiply(Math.pow(b, j));\n this.dAddOffset(w, 0);\n }\n if (mi) {\n BigInteger.ZERO.subTo(this, this);\n }\n };\n // BigInteger.prototype.fromNumber = bnpFromNumber;\n // (protected) alternate constructor\n BigInteger.prototype.fromNumber = function (a, b, c) {\n if ("number" == typeof b) {\n // new BigInteger(int,int,RNG)\n if (a < 2) {\n this.fromInt(1);\n }\n else {\n this.fromNumber(a, c);\n if (!this.testBit(a - 1)) {\n // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__.op_or, this);\n }\n if (this.isEven()) {\n this.dAddOffset(1, 0);\n } // force odd\n while (!this.isProbablePrime(b)) {\n this.dAddOffset(2, 0);\n if (this.bitLength() > a) {\n this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);\n }\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = [];\n var t = a & 7;\n x.length = (a >> 3) + 1;\n b.nextBytes(x);\n if (t > 0) {\n x[0] &= ((1 << t) - 1);\n }\n else {\n x[0] = 0;\n }\n this.fromString(x, 256);\n }\n };\n // BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n // (protected) r = this op a (bitwise)\n BigInteger.prototype.bitwiseTo = function (a, op, r) {\n var i;\n var f;\n var m = Math.min(a.t, this.t);\n for (i = 0; i < m; ++i) {\n r[i] = op(this[i], a[i]);\n }\n if (a.t < this.t) {\n f = a.s & this.DM;\n for (i = m; i < this.t; ++i) {\n r[i] = op(this[i], f);\n }\n r.t = this.t;\n }\n else {\n f = this.s & this.DM;\n for (i = m; i < a.t; ++i) {\n r[i] = op(f, a[i]);\n }\n r.t = a.t;\n }\n r.s = op(this.s, a.s);\n r.clamp();\n };\n // BigInteger.prototype.changeBit = bnpChangeBit;\n // (protected) this op (1<<n)\n BigInteger.prototype.changeBit = function (n, op) {\n var r = BigInteger.ONE.shiftLeft(n);\n this.bitwiseTo(r, op, r);\n return r;\n };\n // BigInteger.prototype.addTo = bnpAddTo;\n // (protected) r = this + a\n BigInteger.prototype.addTo = function (a, r) {\n var i = 0;\n var c = 0;\n var m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c < 0) ? -1 : 0;\n if (c > 0) {\n r[i++] = c;\n }\n else if (c < -1) {\n r[i++] = this.DV + c;\n }\n r.t = i;\n r.clamp();\n };\n // BigInteger.prototype.dMultiply = bnpDMultiply;\n // (protected) this *= n, this >= 0, 1 < n < DV\n BigInteger.prototype.dMultiply = function (n) {\n this[this.t] = this.am(0, n - 1, this, 0, 0, this.t);\n ++this.t;\n this.clamp();\n };\n // BigInteger.prototype.dAddOffset = bnpDAddOffset;\n // (protected) this += n << w words, this >= 0\n BigInteger.prototype.dAddOffset = function (n, w) {\n if (n == 0) {\n return;\n }\n while (this.t <= w) {\n this[this.t++] = 0;\n }\n this[w] += n;\n while (this[w] >= this.DV) {\n this[w] -= this.DV;\n if (++w >= this.t) {\n this[this.t++] = 0;\n }\n ++this[w];\n }\n };\n // BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n // (protected) r = lower n words of "this * a", a.t <= n\n // "this" should be the larger one if appropriate.\n BigInteger.prototype.multiplyLowerTo = function (a, n, r) {\n var i = Math.min(this.t + a.t, n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while (i > 0) {\n r[--i] = 0;\n }\n for (var j = r.t - this.t; i < j; ++i) {\n r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);\n }\n for (var j = Math.min(a.t, n); i < j; ++i) {\n this.am(0, a[i], r, i, 0, n - i);\n }\n r.clamp();\n };\n // BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n // (protected) r = "this * a" without lower n words, n > 0\n // "this" should be the larger one if appropriate.\n BigInteger.prototype.multiplyUpperTo = function (a, n, r) {\n --n;\n var i = r.t = this.t + a.t - n;\n r.s = 0; // assumes a,this >= 0\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = Math.max(n - this.t, 0); i < a.t; ++i) {\n r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);\n }\n r.clamp();\n r.drShiftTo(1, r);\n };\n // BigInteger.prototype.modInt = bnpModInt;\n // (protected) this % n, n < 2^26\n BigInteger.prototype.modInt = function (n) {\n if (n <= 0) {\n return 0;\n }\n var d = this.DV % n;\n var r = (this.s < 0) ? n - 1 : 0;\n if (this.t > 0) {\n if (d == 0) {\n r = this[0] % n;\n }\n else {\n for (var i = this.t - 1; i >= 0; --i) {\n r = (d * r + this[i]) % n;\n }\n }\n }\n return r;\n };\n // BigInteger.prototype.millerRabin = bnpMillerRabin;\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n BigInteger.prototype.millerRabin = function (t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if (k <= 0) {\n return false;\n }\n var r = n1.shiftRight(k);\n t = (t + 1) >> 1;\n if (t > lowprimes.length) {\n t = lowprimes.length;\n }\n var a = nbi();\n for (var i = 0; i < t; ++i) {\n // Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);\n var y = a.modPow(r, this);\n if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while (j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2, this);\n if (y.compareTo(BigInteger.ONE) == 0) {\n return false;\n }\n }\n if (y.compareTo(n1) != 0) {\n return false;\n }\n }\n }\n return true;\n };\n // BigInteger.prototype.square = bnSquare;\n // (public) this^2\n BigInteger.prototype.square = function () {\n var r = nbi();\n this.squareTo(r);\n return r;\n };\n //#region ASYNC\n // Public API method\n BigInteger.prototype.gcda = function (a, callback) {\n var x = (this.s < 0) ? this.negate() : this.clone();\n var y = (a.s < 0) ? a.negate() : a.clone();\n if (x.compareTo(y) < 0) {\n var t = x;\n x = y;\n y = t;\n }\n var i = x.getLowestSetBit();\n var g = y.getLowestSetBit();\n if (g < 0) {\n callback(x);\n return;\n }\n if (i < g) {\n g = i;\n }\n if (g > 0) {\n x.rShiftTo(g, x);\n y.rShiftTo(g, y);\n }\n // Workhorse of the algorithm, gets called 200 - 800 times per 512 bit keygen.\n var gcda1 = function () {\n if ((i = x.getLowestSetBit()) > 0) {\n x.rShiftTo(i, x);\n }\n if ((i = y.getLowestSetBit()) > 0) {\n y.rShiftTo(i, y);\n }\n if (x.compareTo(y) >= 0) {\n x.subTo(y, x);\n x.rShiftTo(1, x);\n }\n else {\n y.subTo(x, y);\n y.rShiftTo(1, y);\n }\n if (!(x.signum() > 0)) {\n if (g > 0) {\n y.lShiftTo(g, y);\n }\n setTimeout(function () { callback(y); }, 0); // escape\n }\n else {\n setTimeout(gcda1, 0);\n }\n };\n setTimeout(gcda1, 10);\n };\n // (protected) alternate constructor\n BigInteger.prototype.fromNumberAsync = function (a, b, c, callback) {\n if ("number" == typeof b) {\n if (a < 2) {\n this.fromInt(1);\n }\n else {\n this.fromNumber(a, c);\n if (!this.testBit(a - 1)) {\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__.op_or, this);\n }\n if (this.isEven()) {\n this.dAddOffset(1, 0);\n }\n var bnp_1 = this;\n var bnpfn1_1 = function () {\n bnp_1.dAddOffset(2, 0);\n if (bnp_1.bitLength() > a) {\n bnp_1.subTo(BigInteger.ONE.shiftLeft(a - 1), bnp_1);\n }\n if (bnp_1.isProbablePrime(b)) {\n setTimeout(function () { callback(); }, 0); // escape\n }\n else {\n setTimeout(bnpfn1_1, 0);\n }\n };\n setTimeout(bnpfn1_1, 0);\n }\n }\n else {\n var x = [];\n var t = a & 7;\n x.length = (a >> 3) + 1;\n b.nextBytes(x);\n if (t > 0) {\n x[0] &= ((1 << t) - 1);\n }\n else {\n x[0] = 0;\n }\n this.fromString(x, 256);\n }\n };\n return BigInteger;\n}());\n\n//#region REDUCERS\n//#region NullExp\nvar NullExp = /** @class */ (function () {\n function NullExp() {\n }\n // NullExp.prototype.convert = nNop;\n NullExp.prototype.convert = function (x) {\n return x;\n };\n // NullExp.prototype.revert = nNop;\n NullExp.prototype.revert = function (x) {\n return x;\n };\n // NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n };\n // NullExp.prototype.sqrTo = nSqrTo;\n NullExp.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n };\n return NullExp;\n}());\n// Modular reduction using "classic" algorithm\nvar Classic = /** @class */ (function () {\n function Classic(m) {\n this.m = m;\n }\n // Classic.prototype.convert = cConvert;\n Classic.prototype.convert = function (x) {\n if (x.s < 0 || x.compareTo(this.m) >= 0) {\n return x.mod(this.m);\n }\n else {\n return x;\n }\n };\n // Classic.prototype.revert = cRevert;\n Classic.prototype.revert = function (x) {\n return x;\n };\n // Classic.prototype.reduce = cReduce;\n Classic.prototype.reduce = function (x) {\n x.divRemTo(this.m, null, x);\n };\n // Classic.prototype.mulTo = cMulTo;\n Classic.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Classic.prototype.sqrTo = cSqrTo;\n Classic.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Classic;\n}());\n//#endregion\n//#region Montgomery\n// Montgomery reduction\nvar Montgomery = /** @class */ (function () {\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << (m.DB - 15)) - 1;\n this.mt2 = 2 * m.t;\n }\n // Montgomery.prototype.convert = montConvert;\n // xR mod m\n Montgomery.prototype.convert = function (x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\n this.m.subTo(r, r);\n }\n return r;\n };\n // Montgomery.prototype.revert = montRevert;\n // x/R mod m\n Montgomery.prototype.revert = function (x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n };\n // Montgomery.prototype.reduce = montReduce;\n // x = x/R mod m (HAC 14.32)\n Montgomery.prototype.reduce = function (x) {\n while (x.t <= this.mt2) {\n // pad x so am has enough room later\n x[x.t++] = 0;\n }\n for (var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i] & 0x7fff;\n var u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0) {\n x.subTo(this.m, x);\n }\n };\n // Montgomery.prototype.mulTo = montMulTo;\n // r = "xy/R mod m"; x,y != r\n Montgomery.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Montgomery.prototype.sqrTo = montSqrTo;\n // r = "x^2/R mod m"; x != r\n Montgomery.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Montgomery;\n}());\n//#endregion Montgomery\n//#region Barrett\n// Barrett modular reduction\nvar Barrett = /** @class */ (function () {\n function Barrett(m) {\n this.m = m;\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2 * m.t, this.r2);\n this.mu = this.r2.divide(m);\n }\n // Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.convert = function (x) {\n if (x.s < 0 || x.t > 2 * this.m.t) {\n return x.mod(this.m);\n }\n else if (x.compareTo(this.m) < 0) {\n return x;\n }\n else {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n };\n // Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.revert = function (x) {\n return x;\n };\n // Barrett.prototype.reduce = barrettReduce;\n // x = x mod m (HAC 14.42)\n Barrett.prototype.reduce = function (x) {\n x.drShiftTo(this.m.t - 1, this.r2);\n if (x.t > this.m.t + 1) {\n x.t = this.m.t + 1;\n x.clamp();\n }\n this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);\n this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);\n while (x.compareTo(this.r2) < 0) {\n x.dAddOffset(1, this.m.t + 1);\n }\n x.subTo(this.r2, x);\n while (x.compareTo(this.m) >= 0) {\n x.subTo(this.m, x);\n }\n };\n // Barrett.prototype.mulTo = barrettMulTo;\n // r = x*y mod m; x,y != r\n Barrett.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Barrett.prototype.sqrTo = barrettSqrTo;\n // r = x^2 mod m; x != r\n Barrett.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Barrett;\n}());\n//#endregion\n//#endregion REDUCERS\n// return new, unset BigInteger\nfunction nbi() { return new BigInteger(null); }\nfunction parseBigInt(str, r) {\n return new BigInteger(str, r);\n}\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\nvar inBrowser = typeof navigator !== "undefined";\nif (inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) {\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n BigInteger.prototype.am = function am2(i, x, w, j, c, n) {\n var xl = x & 0x7fff;\n var xh = x >> 15;\n while (--n >= 0) {\n var l = this[i] & 0x7fff;\n var h = this[i++] >> 15;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n w[j++] = l & 0x3fffffff;\n }\n return c;\n };\n dbits = 30;\n}\nelse if (inBrowser && j_lm && (navigator.appName != "Netscape")) {\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n BigInteger.prototype.am = function am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n var v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n return c;\n };\n dbits = 26;\n}\nelse { // Mozilla/Netscape seems to prefer am3\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n BigInteger.prototype.am = function am3(i, x, w, j, c, n) {\n var xl = x & 0x3fff;\n var xh = x >> 14;\n while (--n >= 0) {\n var l = this[i] & 0x3fff;\n var h = this[i++] >> 14;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n c = (l >> 28) + (m >> 14) + xh * h;\n w[j++] = l & 0xfffffff;\n }\n return c;\n };\n dbits = 28;\n}\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = ((1 << dbits) - 1);\nBigInteger.prototype.DV = (1 << dbits);\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n// Digit conversions\nvar BI_RC = [];\nvar rr;\nvar vv;\nrr = "0".charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = "a".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = "A".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nfunction intAt(s, i) {\n var c = BI_RC[s.charCodeAt(i)];\n return (c == null) ? -1 : c;\n}\n// return bigint initialized to value\nfunction nbv(i) {\n var r = nbi();\n r.fromInt(i);\n return r;\n}\n// returns bit length of the integer x\nfunction nbits(x) {\n var r = 1;\n var t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n// "constants"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js?')
13
+ },"./node_modules/jsencrypt/lib/lib/jsbn/prng4.js":function node_modulesJsencryptLibLibJsbnPrng4Js(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Arcfour: () => (/* binding */ Arcfour),\n/* harmony export */ prng_newstate: () => (/* binding */ prng_newstate),\n/* harmony export */ rng_psize: () => (/* binding */ rng_psize)\n/* harmony export */ });\n// prng4.js - uses Arcfour as a PRNG\nvar Arcfour = /** @class */ (function () {\n function Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = [];\n }\n // Arcfour.prototype.init = ARC4init;\n // Initialize arcfour context from key, an array of ints, each from [0..255]\n Arcfour.prototype.init = function (key) {\n var i;\n var j;\n var t;\n for (i = 0; i < 256; ++i) {\n this.S[i] = i;\n }\n j = 0;\n for (i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n };\n // Arcfour.prototype.next = ARC4next;\n Arcfour.prototype.next = function () {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n };\n return Arcfour;\n}());\n\n// Plug in your RNG constructor here\nfunction prng_newstate() {\n return new Arcfour();\n}\n// Pool size must be a multiple of 4 and greater than 32.\n// An array of bytes the size of the pool will be passed to init()\nvar rng_psize = 256;\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/jsbn/prng4.js?")},"./node_modules/jsencrypt/lib/lib/jsbn/rng.js":function node_modulesJsencryptLibLibJsbnRngJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SecureRandom: () => (/* binding */ SecureRandom)\n/* harmony export */ });\n/* harmony import */ var _prng4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prng4 */ "./node_modules/jsencrypt/lib/lib/jsbn/prng4.js");\n// Random number generator - requires a PRNG backend, e.g. prng4.js\n\nvar rng_state;\nvar rng_pool = null;\nvar rng_pptr;\n// Initialize the pool with junk if needed.\nif (rng_pool == null) {\n rng_pool = [];\n rng_pptr = 0;\n var t = void 0;\n if (typeof window !== \'undefined\' && window.crypto && window.crypto.getRandomValues) {\n // Extract entropy (2048 bits) from RNG if available\n var z = new Uint32Array(256);\n window.crypto.getRandomValues(z);\n for (t = 0; t < z.length; ++t) {\n rng_pool[rng_pptr++] = z[t] & 255;\n }\n }\n // Use mouse events for entropy, if we do not have enough entropy by the time\n // we need it, entropy will be generated by Math.random.\n var count = 0;\n var onMouseMoveListener_1 = function (ev) {\n count = count || 0;\n if (count >= 256 || rng_pptr >= _prng4__WEBPACK_IMPORTED_MODULE_0__.rng_psize) {\n if (window.removeEventListener) {\n window.removeEventListener("mousemove", onMouseMoveListener_1, false);\n }\n else if (window.detachEvent) {\n window.detachEvent("onmousemove", onMouseMoveListener_1);\n }\n return;\n }\n try {\n var mouseCoordinates = ev.x + ev.y;\n rng_pool[rng_pptr++] = mouseCoordinates & 255;\n count += 1;\n }\n catch (e) {\n // Sometimes Firefox will deny permission to access event properties for some reason. Ignore.\n }\n };\n if (typeof window !== \'undefined\') {\n if (window.addEventListener) {\n window.addEventListener("mousemove", onMouseMoveListener_1, false);\n }\n else if (window.attachEvent) {\n window.attachEvent("onmousemove", onMouseMoveListener_1);\n }\n }\n}\nfunction rng_get_byte() {\n if (rng_state == null) {\n rng_state = (0,_prng4__WEBPACK_IMPORTED_MODULE_0__.prng_newstate)();\n // At this point, we may not have collected enough entropy. If not, fall back to Math.random\n while (rng_pptr < _prng4__WEBPACK_IMPORTED_MODULE_0__.rng_psize) {\n var random = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = random & 255;\n }\n rng_state.init(rng_pool);\n for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {\n rng_pool[rng_pptr] = 0;\n }\n rng_pptr = 0;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n}\nvar SecureRandom = /** @class */ (function () {\n function SecureRandom() {\n }\n SecureRandom.prototype.nextBytes = function (ba) {\n for (var i = 0; i < ba.length; ++i) {\n ba[i] = rng_get_byte();\n }\n };\n return SecureRandom;\n}());\n\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/jsbn/rng.js?')},"./node_modules/jsencrypt/lib/lib/jsbn/rsa.js":function node_modulesJsencryptLibLibJsbnRsaJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RSAKey: () => (/* binding */ RSAKey)\n/* harmony export */ });\n/* harmony import */ var _jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsbn */ "./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js");\n/* harmony import */ var _rng__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rng */ "./node_modules/jsencrypt/lib/lib/jsbn/rng.js");\n// Depends on jsbn.js and rng.js\n// Version 1.1: support utf-8 encoding in pkcs1pad2\n// convert a (hex) string to a bignum object\n\n\n// function linebrk(s,n) {\n// var ret = "";\n// var i = 0;\n// while(i + n < s.length) {\n// ret += s.substring(i,i+n) + "\\n";\n// i += n;\n// }\n// return ret + s.substring(i,s.length);\n// }\n// function byte2Hex(b) {\n// if(b < 0x10)\n// return "0" + b.toString(16);\n// else\n// return b.toString(16);\n// }\nfunction pkcs1pad1(s, n) {\n if (n < s.length + 22) {\n console.error("Message too long for RSA");\n return null;\n }\n var len = n - s.length - 6;\n var filler = "";\n for (var f = 0; f < len; f += 2) {\n filler += "ff";\n }\n var m = "0001" + filler + "00" + s;\n return (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(m, 16);\n}\n// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint\nfunction pkcs1pad2(s, n) {\n if (n < s.length + 11) { // TODO: fix for utf-8\n console.error("Message too long for RSA");\n return null;\n }\n var ba = [];\n var i = s.length - 1;\n while (i >= 0 && n > 0) {\n var c = s.charCodeAt(i--);\n if (c < 128) { // encode using utf-8\n ba[--n] = c;\n }\n else if ((c > 127) && (c < 2048)) {\n ba[--n] = (c & 63) | 128;\n ba[--n] = (c >> 6) | 192;\n }\n else {\n ba[--n] = (c & 63) | 128;\n ba[--n] = ((c >> 6) & 63) | 128;\n ba[--n] = (c >> 12) | 224;\n }\n }\n ba[--n] = 0;\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var x = [];\n while (n > 2) { // random non-zero pad\n x[0] = 0;\n while (x[0] == 0) {\n rng.nextBytes(x);\n }\n ba[--n] = x[0];\n }\n ba[--n] = 2;\n ba[--n] = 0;\n return new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(ba);\n}\n// "empty" RSA key constructor\nvar RSAKey = /** @class */ (function () {\n function RSAKey() {\n this.n = null;\n this.e = 0;\n this.d = null;\n this.p = null;\n this.q = null;\n this.dmp1 = null;\n this.dmq1 = null;\n this.coeff = null;\n }\n //#region PROTECTED\n // protected\n // RSAKey.prototype.doPublic = RSADoPublic;\n // Perform raw public operation on "x": return x^e (mod n)\n RSAKey.prototype.doPublic = function (x) {\n return x.modPowInt(this.e, this.n);\n };\n // RSAKey.prototype.doPrivate = RSADoPrivate;\n // Perform raw private operation on "x": return x^d (mod n)\n RSAKey.prototype.doPrivate = function (x) {\n if (this.p == null || this.q == null) {\n return x.modPow(this.d, this.n);\n }\n // TODO: re-calculate any missing CRT params\n var xp = x.mod(this.p).modPow(this.dmp1, this.p);\n var xq = x.mod(this.q).modPow(this.dmq1, this.q);\n while (xp.compareTo(xq) < 0) {\n xp = xp.add(this.p);\n }\n return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);\n };\n //#endregion PROTECTED\n //#region PUBLIC\n // RSAKey.prototype.setPublic = RSASetPublic;\n // Set the public key fields N and e from hex strings\n RSAKey.prototype.setPublic = function (N, E) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n }\n else {\n console.error("Invalid RSA public key");\n }\n };\n // RSAKey.prototype.encrypt = RSAEncrypt;\n // Return the PKCS#1 RSA encryption of "text" as an even-length hex string\n RSAKey.prototype.encrypt = function (text) {\n var maxLength = (this.n.bitLength() + 7) >> 3;\n var m = pkcs1pad2(text, maxLength);\n if (m == null) {\n return null;\n }\n var c = this.doPublic(m);\n if (c == null) {\n return null;\n }\n var h = c.toString(16);\n var length = h.length;\n // fix zero before result\n for (var i = 0; i < maxLength * 2 - length; i++) {\n h = "0" + h;\n }\n return h;\n };\n // RSAKey.prototype.setPrivate = RSASetPrivate;\n // Set the private key fields N, e, and d from hex strings\n RSAKey.prototype.setPrivate = function (N, E, D) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n this.d = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(D, 16);\n }\n else {\n console.error("Invalid RSA private key");\n }\n };\n // RSAKey.prototype.setPrivateEx = RSASetPrivateEx;\n // Set the private key fields N, e, d and CRT params from hex strings\n RSAKey.prototype.setPrivateEx = function (N, E, D, P, Q, DP, DQ, C) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n this.d = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(D, 16);\n this.p = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(P, 16);\n this.q = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(Q, 16);\n this.dmp1 = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(DP, 16);\n this.dmq1 = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(DQ, 16);\n this.coeff = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(C, 16);\n }\n else {\n console.error("Invalid RSA private key");\n }\n };\n // RSAKey.prototype.generate = RSAGenerate;\n // Generate a new random private key B bits long, using public expt E\n RSAKey.prototype.generate = function (B, E) {\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var qs = B >> 1;\n this.e = parseInt(E, 16);\n var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(E, 16);\n for (;;) {\n for (;;) {\n this.p = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(B - qs, 1, rng);\n if (this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) {\n break;\n }\n }\n for (;;) {\n this.q = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(qs, 1, rng);\n if (this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) {\n break;\n }\n }\n if (this.p.compareTo(this.q) <= 0) {\n var t = this.p;\n this.p = this.q;\n this.q = t;\n }\n var p1 = this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var q1 = this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var phi = p1.multiply(q1);\n if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0) {\n this.n = this.p.multiply(this.q);\n this.d = ee.modInverse(phi);\n this.dmp1 = this.d.mod(p1);\n this.dmq1 = this.d.mod(q1);\n this.coeff = this.q.modInverse(this.p);\n break;\n }\n }\n };\n // RSAKey.prototype.decrypt = RSADecrypt;\n // Return the PKCS#1 RSA decryption of "ctext".\n // "ctext" is an even-length hex string and the output is a plain string.\n RSAKey.prototype.decrypt = function (ctext) {\n var c = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(ctext, 16);\n var m = this.doPrivate(c);\n if (m == null) {\n return null;\n }\n return pkcs1unpad2(m, (this.n.bitLength() + 7) >> 3);\n };\n // Generate a new random private key B bits long, using public expt E\n RSAKey.prototype.generateAsync = function (B, E, callback) {\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var qs = B >> 1;\n this.e = parseInt(E, 16);\n var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(E, 16);\n var rsa = this;\n // These functions have non-descript names because they were originally for(;;) loops.\n // I don\'t know about cryptography to give them better names than loop1-4.\n var loop1 = function () {\n var loop4 = function () {\n if (rsa.p.compareTo(rsa.q) <= 0) {\n var t = rsa.p;\n rsa.p = rsa.q;\n rsa.q = t;\n }\n var p1 = rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var q1 = rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var phi = p1.multiply(q1);\n if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0) {\n rsa.n = rsa.p.multiply(rsa.q);\n rsa.d = ee.modInverse(phi);\n rsa.dmp1 = rsa.d.mod(p1);\n rsa.dmq1 = rsa.d.mod(q1);\n rsa.coeff = rsa.q.modInverse(rsa.p);\n setTimeout(function () { callback(); }, 0); // escape\n }\n else {\n setTimeout(loop1, 0);\n }\n };\n var loop3 = function () {\n rsa.q = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.nbi)();\n rsa.q.fromNumberAsync(qs, 1, rng, function () {\n rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcda(ee, function (r) {\n if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && rsa.q.isProbablePrime(10)) {\n setTimeout(loop4, 0);\n }\n else {\n setTimeout(loop3, 0);\n }\n });\n });\n };\n var loop2 = function () {\n rsa.p = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.nbi)();\n rsa.p.fromNumberAsync(B - qs, 1, rng, function () {\n rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcda(ee, function (r) {\n if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && rsa.p.isProbablePrime(10)) {\n setTimeout(loop3, 0);\n }\n else {\n setTimeout(loop2, 0);\n }\n });\n });\n };\n setTimeout(loop2, 0);\n };\n setTimeout(loop1, 0);\n };\n RSAKey.prototype.sign = function (text, digestMethod, digestName) {\n var header = getDigestHeader(digestName);\n var digest = header + digestMethod(text).toString();\n var m = pkcs1pad1(digest, this.n.bitLength() / 4);\n if (m == null) {\n return null;\n }\n var c = this.doPrivate(m);\n if (c == null) {\n return null;\n }\n var h = c.toString(16);\n if ((h.length & 1) == 0) {\n return h;\n }\n else {\n return "0" + h;\n }\n };\n RSAKey.prototype.verify = function (text, signature, digestMethod) {\n var c = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(signature, 16);\n var m = this.doPublic(c);\n if (m == null) {\n return null;\n }\n var unpadded = m.toString(16).replace(/^1f+00/, "");\n var digest = removeDigestHeader(unpadded);\n return digest == digestMethod(text).toString();\n };\n return RSAKey;\n}());\n\n// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext\nfunction pkcs1unpad2(d, n) {\n var b = d.toByteArray();\n var i = 0;\n while (i < b.length && b[i] == 0) {\n ++i;\n }\n if (b.length - i != n - 1 || b[i] != 2) {\n return null;\n }\n ++i;\n while (b[i] != 0) {\n if (++i >= b.length) {\n return null;\n }\n }\n var ret = "";\n while (++i < b.length) {\n var c = b[i] & 255;\n if (c < 128) { // utf-8 decode\n ret += String.fromCharCode(c);\n }\n else if ((c > 191) && (c < 224)) {\n ret += String.fromCharCode(((c & 31) << 6) | (b[i + 1] & 63));\n ++i;\n }\n else {\n ret += String.fromCharCode(((c & 15) << 12) | ((b[i + 1] & 63) << 6) | (b[i + 2] & 63));\n i += 2;\n }\n }\n return ret;\n}\n// https://tools.ietf.org/html/rfc3447#page-43\nvar DIGEST_HEADERS = {\n md2: "3020300c06082a864886f70d020205000410",\n md5: "3020300c06082a864886f70d020505000410",\n sha1: "3021300906052b0e03021a05000414",\n sha224: "302d300d06096086480165030402040500041c",\n sha256: "3031300d060960864801650304020105000420",\n sha384: "3041300d060960864801650304020205000430",\n sha512: "3051300d060960864801650304020305000440",\n ripemd160: "3021300906052b2403020105000414"\n};\nfunction getDigestHeader(name) {\n return DIGEST_HEADERS[name] || "";\n}\nfunction removeDigestHeader(str) {\n for (var name_1 in DIGEST_HEADERS) {\n if (DIGEST_HEADERS.hasOwnProperty(name_1)) {\n var header = DIGEST_HEADERS[name_1];\n var len = header.length;\n if (str.substr(0, len) == header) {\n return str.substr(len);\n }\n }\n }\n return str;\n}\n// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string\n// function RSAEncryptB64(text) {\n// var h = this.encrypt(text);\n// if(h) return hex2b64(h); else return null;\n// }\n// public\n// RSAKey.prototype.encrypt_b64 = RSAEncryptB64;\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/jsbn/rsa.js?')},"./node_modules/jsencrypt/lib/lib/jsbn/util.js":function node_modulesJsencryptLibLibJsbnUtilJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ cbit: () => (/* binding */ cbit),\n/* harmony export */ int2char: () => (/* binding */ int2char),\n/* harmony export */ lbit: () => (/* binding */ lbit),\n/* harmony export */ op_and: () => (/* binding */ op_and),\n/* harmony export */ op_andnot: () => (/* binding */ op_andnot),\n/* harmony export */ op_or: () => (/* binding */ op_or),\n/* harmony export */ op_xor: () => (/* binding */ op_xor)\n/* harmony export */ });\nvar BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\n//#region BIT_OPERATIONS\n// (public) this & a\nfunction op_and(x, y) {\n return x & y;\n}\n// (public) this | a\nfunction op_or(x, y) {\n return x | y;\n}\n// (public) this ^ a\nfunction op_xor(x, y) {\n return x ^ y;\n}\n// (public) this & ~a\nfunction op_andnot(x, y) {\n return x & ~y;\n}\n// return index of lowest 1-bit in x, x < 2^31\nfunction lbit(x) {\n if (x == 0) {\n return -1;\n }\n var r = 0;\n if ((x & 0xffff) == 0) {\n x >>= 16;\n r += 16;\n }\n if ((x & 0xff) == 0) {\n x >>= 8;\n r += 8;\n }\n if ((x & 0xf) == 0) {\n x >>= 4;\n r += 4;\n }\n if ((x & 3) == 0) {\n x >>= 2;\n r += 2;\n }\n if ((x & 1) == 0) {\n ++r;\n }\n return r;\n}\n// return number of 1 bits in x\nfunction cbit(x) {\n var r = 0;\n while (x != 0) {\n x &= x - 1;\n ++r;\n }\n return r;\n}\n//#endregion BIT_OPERATIONS\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/jsbn/util.js?')},"./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js":function node_modulesJsencryptLibLibJsrsasignAsn110Js(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict"
14
+ ;eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ KJUR: () => (/* binding */ KJUR)\n/* harmony export */ });\n/* harmony import */ var _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jsbn/jsbn */ \"./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js\");\n/* harmony import */ var _yahoo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./yahoo */ \"./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js\");\n/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license\n */\n/*\n * asn1.js - ASN.1 DER encoder classes\n *\n * Copyright (c) 2013-2017 Kenji Urushima (kenji.urushima@gmail.com)\n *\n * This software is licensed under the terms of the MIT License.\n * https://kjur.github.io/jsrsasign/license\n *\n * The above copyright and license notice shall be\n * included in all copies or substantial portions of the Software.\n */\n\n\n/**\n * @fileOverview\n * @name asn1-1.0.js\n * @author Kenji Urushima kenji.urushima@gmail.com\n * @version asn1 1.0.13 (2017-Jun-02)\n * @since jsrsasign 2.1\n * @license <a href=\"https://kjur.github.io/jsrsasign/license/\">MIT License</a>\n */\n/**\n * kjur's class library name space\n * <p>\n * This name space provides following name spaces:\n * <ul>\n * <li>{@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder</li>\n * <li>{@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL</li>\n * <li>{@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature\n * class and utilities</li>\n * </ul>\n * </p>\n * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.\n * @name KJUR\n * @namespace kjur's class library name space\n */\nvar KJUR = {};\n/**\n * kjur's ASN.1 class library name space\n * <p>\n * This is ITU-T X.690 ASN.1 DER encoder class library and\n * class structure and methods is very similar to\n * org.bouncycastle.asn1 package of\n * well known BouncyCaslte Cryptography Library.\n * <h4>PROVIDING ASN.1 PRIMITIVES</h4>\n * Here are ASN.1 DER primitive classes.\n * <ul>\n * <li>0x01 {@link KJUR.asn1.DERBoolean}</li>\n * <li>0x02 {@link KJUR.asn1.DERInteger}</li>\n * <li>0x03 {@link KJUR.asn1.DERBitString}</li>\n * <li>0x04 {@link KJUR.asn1.DEROctetString}</li>\n * <li>0x05 {@link KJUR.asn1.DERNull}</li>\n * <li>0x06 {@link KJUR.asn1.DERObjectIdentifier}</li>\n * <li>0x0a {@link KJUR.asn1.DEREnumerated}</li>\n * <li>0x0c {@link KJUR.asn1.DERUTF8String}</li>\n * <li>0x12 {@link KJUR.asn1.DERNumericString}</li>\n * <li>0x13 {@link KJUR.asn1.DERPrintableString}</li>\n * <li>0x14 {@link KJUR.asn1.DERTeletexString}</li>\n * <li>0x16 {@link KJUR.asn1.DERIA5String}</li>\n * <li>0x17 {@link KJUR.asn1.DERUTCTime}</li>\n * <li>0x18 {@link KJUR.asn1.DERGeneralizedTime}</li>\n * <li>0x30 {@link KJUR.asn1.DERSequence}</li>\n * <li>0x31 {@link KJUR.asn1.DERSet}</li>\n * </ul>\n * <h4>OTHER ASN.1 CLASSES</h4>\n * <ul>\n * <li>{@link KJUR.asn1.ASN1Object}</li>\n * <li>{@link KJUR.asn1.DERAbstractString}</li>\n * <li>{@link KJUR.asn1.DERAbstractTime}</li>\n * <li>{@link KJUR.asn1.DERAbstractStructured}</li>\n * <li>{@link KJUR.asn1.DERTaggedObject}</li>\n * </ul>\n * <h4>SUB NAME SPACES</h4>\n * <ul>\n * <li>{@link KJUR.asn1.cades} - CAdES long term signature format</li>\n * <li>{@link KJUR.asn1.cms} - Cryptographic Message Syntax</li>\n * <li>{@link KJUR.asn1.csr} - Certificate Signing Request (CSR/PKCS#10)</li>\n * <li>{@link KJUR.asn1.tsp} - RFC 3161 Timestamping Protocol Format</li>\n * <li>{@link KJUR.asn1.x509} - RFC 5280 X.509 certificate and CRL</li>\n * </ul>\n * </p>\n * NOTE: Please ignore method summary and document of this namespace.\n * This caused by a bug of jsdoc2.\n * @name KJUR.asn1\n * @namespace\n */\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1)\n KJUR.asn1 = {};\n/**\n * ASN1 utilities class\n * @name KJUR.asn1.ASN1Util\n * @class ASN1 utilities class\n * @since asn1 1.0.2\n */\nKJUR.asn1.ASN1Util = new function () {\n this.integerToByteHex = function (i) {\n var h = i.toString(16);\n if ((h.length % 2) == 1)\n h = '0' + h;\n return h;\n };\n this.bigIntToMinTwosComplementsHex = function (bigIntegerValue) {\n var h = bigIntegerValue.toString(16);\n if (h.substr(0, 1) != '-') {\n if (h.length % 2 == 1) {\n h = '0' + h;\n }\n else {\n if (!h.match(/^[0-7]/)) {\n h = '00' + h;\n }\n }\n }\n else {\n var hPos = h.substr(1);\n var xorLen = hPos.length;\n if (xorLen % 2 == 1) {\n xorLen += 1;\n }\n else {\n if (!h.match(/^[0-7]/)) {\n xorLen += 2;\n }\n }\n var hMask = '';\n for (var i = 0; i < xorLen; i++) {\n hMask += 'f';\n }\n var biMask = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(hMask, 16);\n var biNeg = biMask.xor(bigIntegerValue).add(_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n h = biNeg.toString(16).replace(/^-/, '');\n }\n return h;\n };\n /**\n * get PEM string from hexadecimal data and header string\n * @name getPEMStringFromHex\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} dataHex hexadecimal string of PEM body\n * @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')\n * @return {String} PEM formatted string of input data\n * @description\n * This method converts a hexadecimal string to a PEM string with\n * a specified header. Its line break will be CRLF(\"\\r\\n\").\n * @example\n * var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');\n * // value of pem will be:\n * -----BEGIN PRIVATE KEY-----\n * YWFh\n * -----END PRIVATE KEY-----\n */\n this.getPEMStringFromHex = function (dataHex, pemHeader) {\n return hextopem(dataHex, pemHeader);\n };\n /**\n * generate ASN1Object specifed by JSON parameters\n * @name newObject\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {Array} param JSON parameter to generate ASN1Object\n * @return {KJUR.asn1.ASN1Object} generated object\n * @since asn1 1.0.3\n * @description\n * generate any ASN1Object specified by JSON param\n * including ASN.1 primitive or structured.\n * Generally 'param' can be described as follows:\n * <blockquote>\n * {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}\n * </blockquote>\n * 'TYPE-OF-ASN1OBJ' can be one of following symbols:\n * <ul>\n * <li>'bool' - DERBoolean</li>\n * <li>'int' - DERInteger</li>\n * <li>'bitstr' - DERBitString</li>\n * <li>'octstr' - DEROctetString</li>\n * <li>'null' - DERNull</li>\n * <li>'oid' - DERObjectIdentifier</li>\n * <li>'enum' - DEREnumerated</li>\n * <li>'utf8str' - DERUTF8String</li>\n * <li>'numstr' - DERNumericString</li>\n * <li>'prnstr' - DERPrintableString</li>\n * <li>'telstr' - DERTeletexString</li>\n * <li>'ia5str' - DERIA5String</li>\n * <li>'utctime' - DERUTCTime</li>\n * <li>'gentime' - DERGeneralizedTime</li>\n * <li>'seq' - DERSequence</li>\n * <li>'set' - DERSet</li>\n * <li>'tag' - DERTaggedObject</li>\n * </ul>\n * @example\n * newObject({'prnstr': 'aaa'});\n * newObject({'seq': [{'int': 3}, {'prnstr': 'aaa'}]})\n * // ASN.1 Tagged Object\n * newObject({'tag': {'tag': 'a1',\n * 'explicit': true,\n * 'obj': {'seq': [{'int': 3}, {'prnstr': 'aaa'}]}}});\n * // more simple representation of ASN.1 Tagged Object\n * newObject({'tag': ['a1',\n * true,\n * {'seq': [\n * {'int': 3},\n * {'prnstr': 'aaa'}]}\n * ]});\n */\n this.newObject = function (param) {\n var _KJUR = KJUR, _KJUR_asn1 = _KJUR.asn1, _DERBoolean = _KJUR_asn1.DERBoolean, _DERInteger = _KJUR_asn1.DERInteger, _DERBitString = _KJUR_asn1.DERBitString, _DEROctetString = _KJUR_asn1.DEROctetString, _DERNull = _KJUR_asn1.DERNull, _DERObjectIdentifier = _KJUR_asn1.DERObjectIdentifier, _DEREnumerated = _KJUR_asn1.DEREnumerated, _DERUTF8String = _KJUR_asn1.DERUTF8String, _DERNumericString = _KJUR_asn1.DERNumericString, _DERPrintableString = _KJUR_asn1.DERPrintableString, _DERTeletexString = _KJUR_asn1.DERTeletexString, _DERIA5String = _KJUR_asn1.DERIA5String, _DERUTCTime = _KJUR_asn1.DERUTCTime, _DERGeneralizedTime = _KJUR_asn1.DERGeneralizedTime, _DERSequence = _KJUR_asn1.DERSequence, _DERSet = _KJUR_asn1.DERSet, _DERTaggedObject = _KJUR_asn1.DERTaggedObject, _newObject = _KJUR_asn1.ASN1Util.newObject;\n var keys = Object.keys(param);\n if (keys.length != 1)\n throw \"key of param shall be only one.\";\n var key = keys[0];\n if (\":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:\".indexOf(\":\" + key + \":\") == -1)\n throw \"undefined key: \" + key;\n if (key == \"bool\")\n return new _DERBoolean(param[key]);\n if (key == \"int\")\n return new _DERInteger(param[key]);\n if (key == \"bitstr\")\n return new _DERBitString(param[key]);\n if (key == \"octstr\")\n return new _DEROctetString(param[key]);\n if (key == \"null\")\n return new _DERNull(param[key]);\n if (key == \"oid\")\n return new _DERObjectIdentifier(param[key]);\n if (key == \"enum\")\n return new _DEREnumerated(param[key]);\n if (key == \"utf8str\")\n return new _DERUTF8String(param[key]);\n if (key == \"numstr\")\n return new _DERNumericString(param[key]);\n if (key == \"prnstr\")\n return new _DERPrintableString(param[key]);\n if (key == \"telstr\")\n return new _DERTeletexString(param[key]);\n if (key == \"ia5str\")\n return new _DERIA5String(param[key]);\n if (key == \"utctime\")\n return new _DERUTCTime(param[key]);\n if (key == \"gentime\")\n return new _DERGeneralizedTime(param[key]);\n if (key == \"seq\") {\n var paramList = param[key];\n var a = [];\n for (var i = 0; i < paramList.length; i++) {\n var asn1Obj = _newObject(paramList[i]);\n a.push(asn1Obj);\n }\n return new _DERSequence({ 'array': a });\n }\n if (key == \"set\") {\n var paramList = param[key];\n var a = [];\n for (var i = 0; i < paramList.length; i++) {\n var asn1Obj = _newObject(paramList[i]);\n a.push(asn1Obj);\n }\n return new _DERSet({ 'array': a });\n }\n if (key == \"tag\") {\n var tagParam = param[key];\n if (Object.prototype.toString.call(tagParam) === '[object Array]' &&\n tagParam.length == 3) {\n var obj = _newObject(tagParam[2]);\n return new _DERTaggedObject({ tag: tagParam[0],\n explicit: tagParam[1],\n obj: obj });\n }\n else {\n var newParam = {};\n if (tagParam.explicit !== undefined)\n newParam.explicit = tagParam.explicit;\n if (tagParam.tag !== undefined)\n newParam.tag = tagParam.tag;\n if (tagParam.obj === undefined)\n throw \"obj shall be specified for 'tag'.\";\n newParam.obj = _newObject(tagParam.obj);\n return new _DERTaggedObject(newParam);\n }\n }\n };\n /**\n * get encoded hexadecimal string of ASN1Object specifed by JSON parameters\n * @name jsonToASN1HEX\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {Array} param JSON parameter to generate ASN1Object\n * @return hexadecimal string of ASN1Object\n * @since asn1 1.0.4\n * @description\n * As for ASN.1 object representation of JSON object,\n * please see {@link newObject}.\n * @example\n * jsonToASN1HEX({'prnstr': 'aaa'});\n */\n this.jsonToASN1HEX = function (param) {\n var asn1Obj = this.newObject(param);\n return asn1Obj.getEncodedHex();\n };\n};\n/**\n * get dot noted oid number string from hexadecimal value of OID\n * @name oidHexToInt\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} hex hexadecimal value of object identifier\n * @return {String} dot noted string of object identifier\n * @since jsrsasign 4.8.3 asn1 1.0.7\n * @description\n * This static method converts from hexadecimal string representation of\n * ASN.1 value of object identifier to oid number string.\n * @example\n * KJUR.asn1.ASN1Util.oidHexToInt('550406') &rarr; \"2.5.4.6\"\n */\nKJUR.asn1.ASN1Util.oidHexToInt = function (hex) {\n var s = \"\";\n var i01 = parseInt(hex.substr(0, 2), 16);\n var i0 = Math.floor(i01 / 40);\n var i1 = i01 % 40;\n var s = i0 + \".\" + i1;\n var binbuf = \"\";\n for (var i = 2; i < hex.length; i += 2) {\n var value = parseInt(hex.substr(i, 2), 16);\n var bin = (\"00000000\" + value.toString(2)).slice(-8);\n binbuf = binbuf + bin.substr(1, 7);\n if (bin.substr(0, 1) == \"0\") {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(binbuf, 2);\n s = s + \".\" + bi.toString(10);\n binbuf = \"\";\n }\n }\n ;\n return s;\n};\n/**\n * get hexadecimal value of object identifier from dot noted oid value\n * @name oidIntToHex\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} oidString dot noted string of object identifier\n * @return {String} hexadecimal value of object identifier\n * @since jsrsasign 4.8.3 asn1 1.0.7\n * @description\n * This static method converts from object identifier value string.\n * to hexadecimal string representation of it.\n * @example\n * KJUR.asn1.ASN1Util.oidIntToHex(\"2.5.4.6\") &rarr; \"550406\"\n */\nKJUR.asn1.ASN1Util.oidIntToHex = function (oidString) {\n var itox = function (i) {\n var h = i.toString(16);\n if (h.length == 1)\n h = '0' + h;\n return h;\n };\n var roidtox = function (roid) {\n var h = '';\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(roid, 10);\n var b = bi.toString(2);\n var padLen = 7 - b.length % 7;\n if (padLen == 7)\n padLen = 0;\n var bPad = '';\n for (var i = 0; i < padLen; i++)\n bPad += '0';\n b = bPad + b;\n for (var i = 0; i < b.length - 1; i += 7) {\n var b8 = b.substr(i, 7);\n if (i != b.length - 7)\n b8 = '1' + b8;\n h += itox(parseInt(b8, 2));\n }\n return h;\n };\n if (!oidString.match(/^[0-9.]+$/)) {\n throw \"malformed oid string: \" + oidString;\n }\n var h = '';\n var a = oidString.split('.');\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\n h += itox(i0);\n a.splice(0, 2);\n for (var i = 0; i < a.length; i++) {\n h += roidtox(a[i]);\n }\n return h;\n};\n// ********************************************************************\n// Abstract ASN.1 Classes\n// ********************************************************************\n// ********************************************************************\n/**\n * base class for ASN.1 DER encoder object\n * @name KJUR.asn1.ASN1Object\n * @class base class for ASN.1 DER encoder object\n * @property {Boolean} isModified flag whether internal data was changed\n * @property {String} hTLV hexadecimal string of ASN.1 TLV\n * @property {String} hT hexadecimal string of ASN.1 TLV tag(T)\n * @property {String} hL hexadecimal string of ASN.1 TLV length(L)\n * @property {String} hV hexadecimal string of ASN.1 TLV value(V)\n * @description\n */\nKJUR.asn1.ASN1Object = function () {\n var isModified = true;\n var hTLV = null;\n var hT = '00';\n var hL = '00';\n var hV = '';\n /**\n * get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)\n * @name getLengthHexFromValue\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV length(L)\n */\n this.getLengthHexFromValue = function () {\n if (typeof this.hV == \"undefined\" || this.hV == null) {\n throw \"this.hV is null or undefined.\";\n }\n if (this.hV.length % 2 == 1) {\n throw \"value hex must be even length: n=\" + hV.length + \",v=\" + this.hV;\n }\n var n = this.hV.length / 2;\n var hN = n.toString(16);\n if (hN.length % 2 == 1) {\n hN = \"0\" + hN;\n }\n if (n < 128) {\n return hN;\n }\n else {\n var hNlen = hN.length / 2;\n if (hNlen > 15) {\n throw \"ASN.1 length too long to represent by 8x: n = \" + n.toString(16);\n }\n var head = 128 + hNlen;\n return head.toString(16) + hN;\n }\n };\n /**\n * get hexadecimal string of ASN.1 TLV bytes\n * @name getEncodedHex\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV\n */\n this.getEncodedHex = function () {\n if (this.hTLV == null || this.isModified) {\n this.hV = this.getFreshValueHex();\n this.hL = this.getLengthHexFromValue();\n this.hTLV = this.hT + this.hL + this.hV;\n this.isModified = false;\n //alert(\"first time: \" + this.hTLV);\n }\n return this.hTLV;\n };\n /**\n * get hexadecimal string of ASN.1 TLV value(V) bytes\n * @name getValueHex\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV value(V) bytes\n */\n this.getValueHex = function () {\n this.getEncodedHex();\n return this.hV;\n };\n this.getFreshValueHex = function () {\n return '';\n };\n};\n// == BEGIN DERAbstractString ================================================\n/**\n * base class for ASN.1 DER string classes\n * @name KJUR.asn1.DERAbstractString\n * @class base class for ASN.1 DER string classes\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @property {String} s internal string of value\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERAbstractString = function (params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var s = null;\n var hV = null;\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @return {String} string value of this string object\n */\n this.getString = function () {\n return this.s;\n };\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @param {String} newS value by a string to set\n */\n this.setString = function (newS) {\n this.hTLV = null;\n this.isModified = true;\n this.s = newS;\n this.hV = stohex(this.s);\n };\n /**\n * set value by a hexadecimal string\n * @name setStringHex\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @param {String} newHexString value by a hexadecimal string to set\n */\n this.setStringHex = function (newHexString) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params == \"string\") {\n this.setString(params);\n }\n else if (typeof params['str'] != \"undefined\") {\n this.setString(params['str']);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setStringHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);\n// == END DERAbstractString ================================================\n// == BEGIN DERAbstractTime ==================================================\n/**\n * base class for ASN.1 DER Generalized/UTCTime class\n * @name KJUR.asn1.DERAbstractTime\n * @class base class for ASN.1 DER Generalized/UTCTime class\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractTime = function (params) {\n KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);\n var s = null;\n var date = null;\n // --- PRIVATE METHODS --------------------\n this.localDateToUTC = function (d) {\n utc = d.getTime() + (d.getTimezoneOffset() * 60000);\n var utcDate = new Date(utc);\n return utcDate;\n };\n /*\n * format date string by Data object\n * @name formatDate\n * @memberOf KJUR.asn1.AbstractTime;\n * @param {Date} dateObject\n * @param {string} type 'utc' or 'gen'\n * @param {boolean} withMillis flag for with millisections or not\n * @description\n * 'withMillis' flag is supported from asn1 1.0.6.\n */\n this.formatDate = function (dateObject, type, withMillis) {\n var pad = this.zeroPadding;\n var d = this.localDateToUTC(dateObject);\n var year = String(d.getFullYear());\n if (type == 'utc')\n year = year.substr(2, 2);\n var month = pad(String(d.getMonth() + 1), 2);\n var day = pad(String(d.getDate()), 2);\n var hour = pad(String(d.getHours()), 2);\n var min = pad(String(d.getMinutes()), 2);\n var sec = pad(String(d.getSeconds()), 2);\n var s = year + month + day + hour + min + sec;\n if (withMillis === true) {\n var millis = d.getMilliseconds();\n if (millis != 0) {\n var sMillis = pad(String(millis), 3);\n sMillis = sMillis.replace(/[0]+$/, \"\");\n s = s + \".\" + sMillis;\n }\n }\n return s + \"Z\";\n };\n this.zeroPadding = function (s, len) {\n if (s.length >= len)\n return s;\n return new Array(len - s.length + 1).join('0') + s;\n };\n // --- PUBLIC METHODS --------------------\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @return {String} string value of this time object\n */\n this.getString = function () {\n return this.s;\n };\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @param {String} newS value by a string to set such like \"130430235959Z\"\n */\n this.setString = function (newS) {\n this.hTLV = null;\n this.isModified = true;\n this.s = newS;\n this.hV = stohex(newS);\n };\n /**\n * set value by a Date object\n * @name setByDateValue\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @param {Integer} year year of date (ex. 2013)\n * @param {Integer} month month of date between 1 and 12 (ex. 12)\n * @param {Integer} day day of month\n * @param {Integer} hour hours of date\n * @param {Integer} min minutes of date\n * @param {Integer} sec seconds of date\n */\n this.setByDateValue = function (year, month, day, hour, min, sec) {\n var dateObject = new Date(Date.UTC(year, month - 1, day, hour, min, sec, 0));\n this.setByDate(dateObject);\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);\n// == END DERAbstractTime ==================================================\n// == BEGIN DERAbstractStructured ============================================\n/**\n * base class for ASN.1 DER structured class\n * @name KJUR.asn1.DERAbstractStructured\n * @class base class for ASN.1 DER structured class\n * @property {Array} asn1Array internal array of ASN1Object\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractStructured = function (params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var asn1Array = null;\n /**\n * set value by array of ASN1Object\n * @name setByASN1ObjectArray\n * @memberOf KJUR.asn1.DERAbstractStructured#\n * @function\n * @param {array} asn1ObjectArray array of ASN1Object to set\n */\n this.setByASN1ObjectArray = function (asn1ObjectArray) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array = asn1ObjectArray;\n };\n /**\n * append an ASN1Object to internal array\n * @name appendASN1Object\n * @memberOf KJUR.asn1.DERAbstractStructured#\n * @function\n * @param {ASN1Object} asn1Object to add\n */\n this.appendASN1Object = function (asn1Object) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array.push(asn1Object);\n };\n this.asn1Array = new Array();\n if (typeof params != \"undefined\") {\n if (typeof params['array'] != \"undefined\") {\n this.asn1Array = params['array'];\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);\n// ********************************************************************\n// ASN.1 Object Classes\n// ********************************************************************\n// ********************************************************************\n/**\n * class for ASN.1 DER Boolean\n * @name KJUR.asn1.DERBoolean\n * @class class for ASN.1 DER Boolean\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERBoolean = function () {\n KJUR.asn1.DERBoolean.superclass.constructor.call(this);\n this.hT = \"01\";\n this.hTLV = \"0101ff\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER Integer\n * @name KJUR.asn1.DERInteger\n * @class class for ASN.1 DER Integer\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>int - specify initial ASN.1 value(V) by integer value</li>\n * <li>bigint - specify initial ASN.1 value(V) by BigInteger object</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERInteger = function (params) {\n KJUR.asn1.DERInteger.superclass.constructor.call(this);\n this.hT = \"02\";\n /**\n * set value by Tom Wu's BigInteger object\n * @name setByBigInteger\n * @memberOf KJUR.asn1.DERInteger#\n * @function\n * @param {BigInteger} bigIntegerValue to set\n */\n this.setByBigInteger = function (bigIntegerValue) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\n };\n /**\n * set value by integer value\n * @name setByInteger\n * @memberOf KJUR.asn1.DERInteger\n * @function\n * @param {Integer} integer value to set\n */\n this.setByInteger = function (intValue) {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(String(intValue), 10);\n this.setByBigInteger(bi);\n };\n /**\n * set value by integer value\n * @name setValueHex\n * @memberOf KJUR.asn1.DERInteger#\n * @function\n * @param {String} hexadecimal string of integer value\n * @description\n * <br/>\n * NOTE: Value shall be represented by minimum octet length of\n * two's complement representation.\n * @example\n * new KJUR.asn1.DERInteger(123);\n * new KJUR.asn1.DERInteger({'int': 123});\n * new KJUR.asn1.DERInteger({'hex': '1fad'});\n */\n this.setValueHex = function (newHexString) {\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['bigint'] != \"undefined\") {\n this.setByBigInteger(params['bigint']);\n }\n else if (typeof params['int'] != \"undefined\") {\n this.setByInteger(params['int']);\n }\n else if (typeof params == \"number\") {\n this.setByInteger(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setValueHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER encoded BitString primitive\n * @name KJUR.asn1.DERBitString\n * @class class for ASN.1 DER encoded BitString primitive\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>bin - specify binary string (ex. '10111')</li>\n * <li>array - specify array of boolean (ex. [true,false,true,true])</li>\n * <li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>\n * <li>obj - specify {@link KJUR.asn1.ASN1Util.newObject}\n * argument for \"BitString encapsulates\" structure.</li>\n * </ul>\n * NOTE1: 'params' can be omitted.<br/>\n * NOTE2: 'obj' parameter have been supported since\n * asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).<br/>\n * @example\n * // default constructor\n * o = new KJUR.asn1.DERBitString();\n * // initialize with binary string\n * o = new KJUR.asn1.DERBitString({bin: \"1011\"});\n * // initialize with boolean array\n * o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});\n * // initialize with hexadecimal string (04 is unused bits)\n * o = new KJUR.asn1.DEROctetString({hex: \"04bac0\"});\n * // initialize with ASN1Util.newObject argument for encapsulated\n * o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\n * // above generates a ASN.1 data like this:\n * // BIT STRING, encapsulates {\n * // SEQUENCE {\n * // INTEGER 3\n * // PrintableString 'aaa'\n * // }\n * // }\n */\nKJUR.asn1.DERBitString = function (params) {\n if (params !== undefined && typeof params.obj !== \"undefined\") {\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\n params.hex = \"00\" + o.getEncodedHex();\n }\n KJUR.asn1.DERBitString.superclass.constructor.call(this);\n this.hT = \"03\";\n /**\n * set ASN.1 value(V) by a hexadecimal string including unused bits\n * @name setHexValueIncludingUnusedBits\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {String} newHexStringIncludingUnusedBits\n */\n this.setHexValueIncludingUnusedBits = function (newHexStringIncludingUnusedBits) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = newHexStringIncludingUnusedBits;\n };\n /**\n * set ASN.1 value(V) by unused bit and hexadecimal string of value\n * @name setUnusedBitsAndHexValue\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {Integer} unusedBits\n * @param {String} hValue\n */\n this.setUnusedBitsAndHexValue = function (unusedBits, hValue) {\n if (unusedBits < 0 || 7 < unusedBits) {\n throw \"unused bits shall be from 0 to 7: u = \" + unusedBits;\n }\n var hUnusedBits = \"0\" + unusedBits;\n this.hTLV = null;\n this.isModified = true;\n this.hV = hUnusedBits + hValue;\n };\n /**\n * set ASN.1 DER BitString by binary string<br/>\n * @name setByBinaryString\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {String} binaryString binary value string (i.e. '10111')\n * @description\n * Its unused bits will be calculated automatically by length of\n * 'binaryValue'. <br/>\n * NOTE: Trailing zeros '0' will be ignored.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.setByBooleanArray(\"01011\");\n */\n this.setByBinaryString = function (binaryString) {\n binaryString = binaryString.replace(/0+$/, '');\n var unusedBits = 8 - binaryString.length % 8;\n if (unusedBits == 8)\n unusedBits = 0;\n for (var i = 0; i <= unusedBits; i++) {\n binaryString += '0';\n }\n var h = '';\n for (var i = 0; i < binaryString.length - 1; i += 8) {\n var b = binaryString.substr(i, 8);\n var x = parseInt(b, 2).toString(16);\n if (x.length == 1)\n x = '0' + x;\n h += x;\n }\n this.hTLV = null;\n this.isModified = true;\n this.hV = '0' + unusedBits + h;\n };\n /**\n * set ASN.1 TLV value(V) by an array of boolean<br/>\n * @name setByBooleanArray\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {array} booleanArray array of boolean (ex. [true, false, true])\n * @description\n * NOTE: Trailing falses will be ignored in the ASN.1 DER Object.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.setByBooleanArray([false, true, false, true, true]);\n */\n this.setByBooleanArray = function (booleanArray) {\n var s = '';\n for (var i = 0; i < booleanArray.length; i++) {\n if (booleanArray[i] == true) {\n s += '1';\n }\n else {\n s += '0';\n }\n }\n this.setByBinaryString(s);\n };\n /**\n * generate an array of falses with specified length<br/>\n * @name newFalseArray\n * @memberOf KJUR.asn1.DERBitString\n * @function\n * @param {Integer} nLength length of array to generate\n * @return {array} array of boolean falses\n * @description\n * This static method may be useful to initialize boolean array.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.newFalseArray(3) &rarr; [false, false, false]\n */\n this.newFalseArray = function (nLength) {\n var a = new Array(nLength);\n for (var i = 0; i < nLength; i++) {\n a[i] = false;\n }\n return a;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params == \"string\" && params.toLowerCase().match(/^[0-9a-f]+$/)) {\n this.setHexValueIncludingUnusedBits(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setHexValueIncludingUnusedBits(params['hex']);\n }\n else if (typeof params['bin'] != \"undefined\") {\n this.setByBinaryString(params['bin']);\n }\n else if (typeof params['array'] != \"undefined\") {\n this.setByBooleanArray(params['array']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER OctetString<br/>\n * @name KJUR.asn1.DEROctetString\n * @class class for ASN.1 DER OctetString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * This class provides ASN.1 OctetString simple type.<br/>\n * Supported \"params\" attributes are:\n * <ul>\n * <li>str - to set a string as a value</li>\n * <li>hex - to set a hexadecimal string as a value</li>\n * <li>obj - to set a encapsulated ASN.1 value by JSON object\n * which is defined in {@link KJUR.asn1.ASN1Util.newObject}</li>\n * </ul>\n * NOTE: A parameter 'obj' have been supported\n * for \"OCTET STRING, encapsulates\" structure.\n * since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).\n * @see KJUR.asn1.DERAbstractString - superclass\n * @example\n * // default constructor\n * o = new KJUR.asn1.DEROctetString();\n * // initialize with string\n * o = new KJUR.asn1.DEROctetString({str: \"aaa\"});\n * // initialize with hexadecimal string\n * o = new KJUR.asn1.DEROctetString({hex: \"616161\"});\n * // initialize with ASN1Util.newObject argument\n * o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\n * // above generates a ASN.1 data like this:\n * // OCTET STRING, encapsulates {\n * // SEQUENCE {\n * // INTEGER 3\n * // PrintableString 'aaa'\n * // }\n * // }\n */\nKJUR.asn1.DEROctetString = function (params) {\n if (params !== undefined && typeof params.obj !== \"undefined\") {\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\n params.hex = o.getEncodedHex();\n }\n KJUR.asn1.DEROctetString.superclass.constructor.call(this, params);\n this.hT = \"04\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER Null\n * @name KJUR.asn1.DERNull\n * @class class for ASN.1 DER Null\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERNull = function () {\n KJUR.asn1.DERNull.superclass.constructor.call(this);\n this.hT = \"05\";\n this.hTLV = \"0500\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER ObjectIdentifier\n * @name KJUR.asn1.DERObjectIdentifier\n * @class class for ASN.1 DER ObjectIdentifier\n * @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERObjectIdentifier = function (params) {\n var itox = function (i) {\n var h = i.toString(16);\n if (h.length == 1)\n h = '0' + h;\n return h;\n };\n var roidtox = function (roid) {\n var h = '';\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(roid, 10);\n var b = bi.toString(2);\n var padLen = 7 - b.length % 7;\n if (padLen == 7)\n padLen = 0;\n var bPad = '';\n for (var i = 0; i < padLen; i++)\n bPad += '0';\n b = bPad + b;\n for (var i = 0; i < b.length - 1; i += 7) {\n var b8 = b.substr(i, 7);\n if (i != b.length - 7)\n b8 = '1' + b8;\n h += itox(parseInt(b8, 2));\n }\n return h;\n };\n KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);\n this.hT = \"06\";\n /**\n * set value by a hexadecimal string\n * @name setValueHex\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} newHexString hexadecimal value of OID bytes\n */\n this.setValueHex = function (newHexString) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = newHexString;\n };\n /**\n * set value by a OID string<br/>\n * @name setValueOidString\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} oidString OID string (ex. 2.5.4.13)\n * @example\n * o = new KJUR.asn1.DERObjectIdentifier();\n * o.setValueOidString(\"2.5.4.13\");\n */\n this.setValueOidString = function (oidString) {\n if (!oidString.match(/^[0-9.]+$/)) {\n throw \"malformed oid string: \" + oidString;\n }\n var h = '';\n var a = oidString.split('.');\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\n h += itox(i0);\n a.splice(0, 2);\n for (var i = 0; i < a.length; i++) {\n h += roidtox(a[i]);\n }\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = h;\n };\n /**\n * set value by a OID name\n * @name setValueName\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} oidName OID name (ex. 'serverAuth')\n * @since 1.0.1\n * @description\n * OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.\n * Otherwise raise error.\n * @example\n * o = new KJUR.asn1.DERObjectIdentifier();\n * o.setValueName(\"serverAuth\");\n */\n this.setValueName = function (oidName) {\n var oid = KJUR.asn1.x509.OID.name2oid(oidName);\n if (oid !== '') {\n this.setValueOidString(oid);\n }\n else {\n throw \"DERObjectIdentifier oidName undefined: \" + oidName;\n }\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (params !== undefined) {\n if (typeof params === \"string\") {\n if (params.match(/^[0-2].[0-9.]+$/)) {\n this.setValueOidString(params);\n }\n else {\n this.setValueName(params);\n }\n }\n else if (params.oid !== undefined) {\n this.setValueOidString(params.oid);\n }\n else if (params.hex !== undefined) {\n this.setValueHex(params.hex);\n }\n else if (params.name !== undefined) {\n this.setValueName(params.name);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER Enumerated\n * @name KJUR.asn1.DEREnumerated\n * @class class for ASN.1 DER Enumerated\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>int - specify initial ASN.1 value(V) by integer value</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n * @example\n * new KJUR.asn1.DEREnumerated(123);\n * new KJUR.asn1.DEREnumerated({int: 123});\n * new KJUR.asn1.DEREnumerated({hex: '1fad'});\n */\nKJUR.asn1.DEREnumerated = function (params) {\n KJUR.asn1.DEREnumerated.superclass.constructor.call(this);\n this.hT = \"0a\";\n /**\n * set value by Tom Wu's BigInteger object\n * @name setByBigInteger\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {BigInteger} bigIntegerValue to set\n */\n this.setByBigInteger = function (bigIntegerValue) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\n };\n /**\n * set value by integer value\n * @name setByInteger\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {Integer} integer value to set\n */\n this.setByInteger = function (intValue) {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(String(intValue), 10);\n this.setByBigInteger(bi);\n };\n /**\n * set value by integer value\n * @name setValueHex\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {String} hexadecimal string of integer value\n * @description\n * <br/>\n * NOTE: Value shall be represented by minimum octet length of\n * two's complement representation.\n */\n this.setValueHex = function (newHexString) {\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['int'] != \"undefined\") {\n this.setByInteger(params['int']);\n }\n else if (typeof params == \"number\") {\n this.setByInteger(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setValueHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER UTF8String\n * @name KJUR.asn1.DERUTF8String\n * @class class for ASN.1 DER UTF8String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERUTF8String = function (params) {\n KJUR.asn1.DERUTF8String.superclass.constructor.call(this, params);\n this.hT = \"0c\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER NumericString\n * @name KJUR.asn1.DERNumericString\n * @class class for ASN.1 DER NumericString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERNumericString = function (params) {\n KJUR.asn1.DERNumericString.superclass.constructor.call(this, params);\n this.hT = \"12\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER PrintableString\n * @name KJUR.asn1.DERPrintableString\n * @class class for ASN.1 DER PrintableString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERPrintableString = function (params) {\n KJUR.asn1.DERPrintableString.superclass.constructor.call(this, params);\n this.hT = \"13\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER TeletexString\n * @name KJUR.asn1.DERTeletexString\n * @class class for ASN.1 DER TeletexString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERTeletexString = function (params) {\n KJUR.asn1.DERTeletexString.superclass.constructor.call(this, params);\n this.hT = \"14\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER IA5String\n * @name KJUR.asn1.DERIA5String\n * @class class for ASN.1 DER IA5String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERIA5String = function (params) {\n KJUR.asn1.DERIA5String.superclass.constructor.call(this, params);\n this.hT = \"16\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER UTCTime\n * @name KJUR.asn1.DERUTCTime\n * @class class for ASN.1 DER UTCTime\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * <li>date - specify Date object.</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n * <h4>EXAMPLES</h4>\n * @example\n * d1 = new KJUR.asn1.DERUTCTime();\n * d1.setString('130430125959Z');\n *\n * d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});\n * d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});\n * d4 = new KJUR.asn1.DERUTCTime('130430125959Z');\n */\nKJUR.asn1.DERUTCTime = function (params) {\n KJUR.asn1.DERUTCTime.superclass.constructor.call(this, params);\n this.hT = \"17\";\n /**\n * set value by a Date object<br/>\n * @name setByDate\n * @memberOf KJUR.asn1.DERUTCTime#\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n * @example\n * o = new KJUR.asn1.DERUTCTime();\n * o.setByDate(new Date(\"2016/12/31\"));\n */\n this.setByDate = function (dateObject) {\n this.hTLV = null;\n this.isModified = true;\n this.date = dateObject;\n this.s = this.formatDate(this.date, 'utc');\n this.hV = stohex(this.s);\n };\n this.getFreshValueHex = function () {\n if (typeof this.date == \"undefined\" && typeof this.s == \"undefined\") {\n this.date = new Date();\n this.s = this.formatDate(this.date, 'utc');\n this.hV = stohex(this.s);\n }\n return this.hV;\n };\n if (params !== undefined) {\n if (params.str !== undefined) {\n this.setString(params.str);\n }\n else if (typeof params == \"string\" && params.match(/^[0-9]{12}Z$/)) {\n this.setString(params);\n }\n else if (params.hex !== undefined) {\n this.setStringHex(params.hex);\n }\n else if (params.date !== undefined) {\n this.setByDate(params.date);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);\n// ********************************************************************\n/**\n * class for ASN.1 DER GeneralizedTime\n * @name KJUR.asn1.DERGeneralizedTime\n * @class class for ASN.1 DER GeneralizedTime\n * @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})\n * @property {Boolean} withMillis flag to show milliseconds or not\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * <li>date - specify Date object.</li>\n * <li>millis - specify flag to show milliseconds (from 1.0.6)</li>\n * </ul>\n * NOTE1: 'params' can be omitted.\n * NOTE2: 'withMillis' property is supported from asn1 1.0.6.\n */\nKJUR.asn1.DERGeneralizedTime = function (params) {\n KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, params);\n this.hT = \"18\";\n this.withMillis = false;\n /**\n * set value by a Date object\n * @name setByDate\n * @memberOf KJUR.asn1.DERGeneralizedTime#\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n * @example\n * When you specify UTC time, use 'Date.UTC' method like this:<br/>\n * o1 = new DERUTCTime();\n * o1.setByDate(date);\n *\n * date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59\n */\n this.setByDate = function (dateObject) {\n this.hTLV = null;\n this.isModified = true;\n this.date = dateObject;\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\n this.hV = stohex(this.s);\n };\n this.getFreshValueHex = function () {\n if (this.date === undefined && this.s === undefined) {\n this.date = new Date();\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\n this.hV = stohex(this.s);\n }\n return this.hV;\n };\n if (params !== undefined) {\n if (params.str !== undefined) {\n this.setString(params.str);\n }\n else if (typeof params == \"string\" && params.match(/^[0-9]{14}Z$/)) {\n this.setString(params);\n }\n else if (params.hex !== undefined) {\n this.setStringHex(params.hex);\n }\n else if (params.date !== undefined) {\n this.setByDate(params.date);\n }\n if (params.millis === true) {\n this.withMillis = true;\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);\n// ********************************************************************\n/**\n * class for ASN.1 DER Sequence\n * @name KJUR.asn1.DERSequence\n * @class class for ASN.1 DER Sequence\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>array - specify array of ASN1Object to set elements of content</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERSequence = function (params) {\n KJUR.asn1.DERSequence.superclass.constructor.call(this, params);\n this.hT = \"30\";\n this.getFreshValueHex = function () {\n var h = '';\n for (var i = 0; i < this.asn1Array.length; i++) {\n var asn1Obj = this.asn1Array[i];\n h += asn1Obj.getEncodedHex();\n }\n this.hV = h;\n return this.hV;\n };\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);\n// ********************************************************************\n/**\n * class for ASN.1 DER Set\n * @name KJUR.asn1.DERSet\n * @class class for ASN.1 DER Set\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>array - specify array of ASN1Object to set elements of content</li>\n * <li>sortflag - flag for sort (default: true). ASN.1 BER is not sorted in 'SET OF'.</li>\n * </ul>\n * NOTE1: 'params' can be omitted.<br/>\n * NOTE2: sortflag is supported since 1.0.5.\n */\nKJUR.asn1.DERSet = function (params) {\n KJUR.asn1.DERSet.superclass.constructor.call(this, params);\n this.hT = \"31\";\n this.sortFlag = true; // item shall be sorted only in ASN.1 DER\n this.getFreshValueHex = function () {\n var a = new Array();\n for (var i = 0; i < this.asn1Array.length; i++) {\n var asn1Obj = this.asn1Array[i];\n a.push(asn1Obj.getEncodedHex());\n }\n if (this.sortFlag == true)\n a.sort();\n this.hV = a.join('');\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params.sortflag != \"undefined\" &&\n params.sortflag == false)\n this.sortFlag = false;\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);\n// ********************************************************************\n/**\n * class for ASN.1 DER TaggedObject\n * @name KJUR.asn1.DERTaggedObject\n * @class class for ASN.1 DER TaggedObject\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.\n * For example, if you find '[1]' tag in a ASN.1 dump,\n * 'tagNoHex' will be 'a1'.\n * <br/>\n * As for optional argument 'params' for constructor, you can specify *ANY* of\n * following properties:\n * <ul>\n * <li>explicit - specify true if this is explicit tag otherwise false\n * (default is 'true').</li>\n * <li>tag - specify tag (default is 'a0' which means [0])</li>\n * <li>obj - specify ASN1Object which is tagged</li>\n * </ul>\n * @example\n * d1 = new KJUR.asn1.DERUTF8String({'str':'a'});\n * d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});\n * hex = d2.getEncodedHex();\n */\nKJUR.asn1.DERTaggedObject = function (params) {\n KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);\n this.hT = \"a0\";\n this.hV = '';\n this.isExplicit = true;\n this.asn1Object = null;\n /**\n * set value by an ASN1Object\n * @name setString\n * @memberOf KJUR.asn1.DERTaggedObject#\n * @function\n * @param {Boolean} isExplicitFlag flag for explicit/implicit tag\n * @param {Integer} tagNoHex hexadecimal string of ASN.1 tag\n * @param {ASN1Object} asn1Object ASN.1 to encapsulate\n */\n this.setASN1Object = function (isExplicitFlag, tagNoHex, asn1Object) {\n this.hT = tagNoHex;\n this.isExplicit = isExplicitFlag;\n this.asn1Object = asn1Object;\n if (this.isExplicit) {\n this.hV = this.asn1Object.getEncodedHex();\n this.hTLV = null;\n this.isModified = true;\n }\n else {\n this.hV = null;\n this.hTLV = asn1Object.getEncodedHex();\n this.hTLV = this.hTLV.replace(/^../, tagNoHex);\n this.isModified = false;\n }\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['tag'] != \"undefined\") {\n this.hT = params['tag'];\n }\n if (typeof params['explicit'] != \"undefined\") {\n this.isExplicit = params['explicit'];\n }\n if (typeof params['obj'] != \"undefined\") {\n this.asn1Object = params['obj'];\n this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js?")
15
+ },"./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js":function node_modulesJsencryptLibLibJsrsasignYahooJs(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ YAHOO: () => (/* binding */ YAHOO)\n/* harmony export */ });\n/*!\nCopyright (c) 2011, Yahoo! Inc. All rights reserved.\nCode licensed under the BSD License:\nhttp://developer.yahoo.com/yui/license.html\nversion: 2.9.0\n*/\nvar YAHOO = {};\nYAHOO.lang = {\n /**\n * Utility to set up the prototype, constructor and superclass properties to\n * support an inheritance strategy that can chain constructors and methods.\n * Static members will not be inherited.\n *\n * @method extend\n * @static\n * @param {Function} subc the object to modify\n * @param {Function} superc the object to inherit\n * @param {Object} overrides additional properties/methods to add to the\n * subclass prototype. These will override the\n * matching items obtained from the superclass\n * if present.\n */\n extend: function (subc, superc, overrides) {\n if (!superc || !subc) {\n throw new Error("YAHOO.lang.extend failed, please check that " +\n "all dependencies are included.");\n }\n var F = function () { };\n F.prototype = superc.prototype;\n subc.prototype = new F();\n subc.prototype.constructor = subc;\n subc.superclass = superc.prototype;\n if (superc.prototype.constructor == Object.prototype.constructor) {\n superc.prototype.constructor = superc;\n }\n if (overrides) {\n var i;\n for (i in overrides) {\n subc.prototype[i] = overrides[i];\n }\n /*\n * IE will not enumerate native functions in a derived object even if the\n * function was overridden. This is a workaround for specific functions\n * we care about on the Object prototype.\n * @property _IEEnumFix\n * @param {Function} r the object to receive the augmentation\n * @param {Function} s the object that supplies the properties to augment\n * @static\n * @private\n */\n var _IEEnumFix = function () { }, ADD = ["toString", "valueOf"];\n try {\n if (/MSIE/.test(navigator.userAgent)) {\n _IEEnumFix = function (r, s) {\n for (i = 0; i < ADD.length; i = i + 1) {\n var fname = ADD[i], f = s[fname];\n if (typeof f === \'function\' && f != Object.prototype[fname]) {\n r[fname] = f;\n }\n }\n };\n }\n }\n catch (ex) { }\n ;\n _IEEnumFix(subc.prototype, overrides);\n }\n }\n};\n\n\n//# sourceURL=webpack://enc/./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js?')},"./node_modules/md5/md5.js":function node_modulesMd5Md5Js(module,__unused_webpack_exports,__webpack_require__){eval('(function(){\r\n var crypt = __webpack_require__(/*! crypt */ "./node_modules/crypt/crypt.js"),\r\n utf8 = (__webpack_require__(/*! charenc */ "./node_modules/charenc/charenc.js").utf8),\r\n isBuffer = __webpack_require__(/*! is-buffer */ "./node_modules/is-buffer/index.js"),\r\n bin = (__webpack_require__(/*! charenc */ "./node_modules/charenc/charenc.js").bin),\r\n\r\n // The core\r\n md5 = function (message, options) {\r\n // Convert to byte array\r\n if (message.constructor == String)\r\n if (options && options.encoding === \'binary\')\r\n message = bin.stringToBytes(message);\r\n else\r\n message = utf8.stringToBytes(message);\r\n else if (isBuffer(message))\r\n message = Array.prototype.slice.call(message, 0);\r\n else if (!Array.isArray(message) && message.constructor !== Uint8Array)\r\n message = message.toString();\r\n // else, assume byte array already\r\n\r\n var m = crypt.bytesToWords(message),\r\n l = message.length * 8,\r\n a = 1732584193,\r\n b = -271733879,\r\n c = -1732584194,\r\n d = 271733878;\r\n\r\n // Swap endian\r\n for (var i = 0; i < m.length; i++) {\r\n m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |\r\n ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;\r\n }\r\n\r\n // Padding\r\n m[l >>> 5] |= 0x80 << (l % 32);\r\n m[(((l + 64) >>> 9) << 4) + 14] = l;\r\n\r\n // Method shortcuts\r\n var FF = md5._ff,\r\n GG = md5._gg,\r\n HH = md5._hh,\r\n II = md5._ii;\r\n\r\n for (var i = 0; i < m.length; i += 16) {\r\n\r\n var aa = a,\r\n bb = b,\r\n cc = c,\r\n dd = d;\r\n\r\n a = FF(a, b, c, d, m[i+ 0], 7, -680876936);\r\n d = FF(d, a, b, c, m[i+ 1], 12, -389564586);\r\n c = FF(c, d, a, b, m[i+ 2], 17, 606105819);\r\n b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);\r\n a = FF(a, b, c, d, m[i+ 4], 7, -176418897);\r\n d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);\r\n c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);\r\n b = FF(b, c, d, a, m[i+ 7], 22, -45705983);\r\n a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);\r\n d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);\r\n c = FF(c, d, a, b, m[i+10], 17, -42063);\r\n b = FF(b, c, d, a, m[i+11], 22, -1990404162);\r\n a = FF(a, b, c, d, m[i+12], 7, 1804603682);\r\n d = FF(d, a, b, c, m[i+13], 12, -40341101);\r\n c = FF(c, d, a, b, m[i+14], 17, -1502002290);\r\n b = FF(b, c, d, a, m[i+15], 22, 1236535329);\r\n\r\n a = GG(a, b, c, d, m[i+ 1], 5, -165796510);\r\n d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);\r\n c = GG(c, d, a, b, m[i+11], 14, 643717713);\r\n b = GG(b, c, d, a, m[i+ 0], 20, -373897302);\r\n a = GG(a, b, c, d, m[i+ 5], 5, -701558691);\r\n d = GG(d, a, b, c, m[i+10], 9, 38016083);\r\n c = GG(c, d, a, b, m[i+15], 14, -660478335);\r\n b = GG(b, c, d, a, m[i+ 4], 20, -405537848);\r\n a = GG(a, b, c, d, m[i+ 9], 5, 568446438);\r\n d = GG(d, a, b, c, m[i+14], 9, -1019803690);\r\n c = GG(c, d, a, b, m[i+ 3], 14, -187363961);\r\n b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);\r\n a = GG(a, b, c, d, m[i+13], 5, -1444681467);\r\n d = GG(d, a, b, c, m[i+ 2], 9, -51403784);\r\n c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);\r\n b = GG(b, c, d, a, m[i+12], 20, -1926607734);\r\n\r\n a = HH(a, b, c, d, m[i+ 5], 4, -378558);\r\n d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);\r\n c = HH(c, d, a, b, m[i+11], 16, 1839030562);\r\n b = HH(b, c, d, a, m[i+14], 23, -35309556);\r\n a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);\r\n d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);\r\n c = HH(c, d, a, b, m[i+ 7], 16, -155497632);\r\n b = HH(b, c, d, a, m[i+10], 23, -1094730640);\r\n a = HH(a, b, c, d, m[i+13], 4, 681279174);\r\n d = HH(d, a, b, c, m[i+ 0], 11, -358537222);\r\n c = HH(c, d, a, b, m[i+ 3], 16, -722521979);\r\n b = HH(b, c, d, a, m[i+ 6], 23, 76029189);\r\n a = HH(a, b, c, d, m[i+ 9], 4, -640364487);\r\n d = HH(d, a, b, c, m[i+12], 11, -421815835);\r\n c = HH(c, d, a, b, m[i+15], 16, 530742520);\r\n b = HH(b, c, d, a, m[i+ 2], 23, -995338651);\r\n\r\n a = II(a, b, c, d, m[i+ 0], 6, -198630844);\r\n d = II(d, a, b, c, m[i+ 7], 10, 1126891415);\r\n c = II(c, d, a, b, m[i+14], 15, -1416354905);\r\n b = II(b, c, d, a, m[i+ 5], 21, -57434055);\r\n a = II(a, b, c, d, m[i+12], 6, 1700485571);\r\n d = II(d, a, b, c, m[i+ 3], 10, -1894986606);\r\n c = II(c, d, a, b, m[i+10], 15, -1051523);\r\n b = II(b, c, d, a, m[i+ 1], 21, -2054922799);\r\n a = II(a, b, c, d, m[i+ 8], 6, 1873313359);\r\n d = II(d, a, b, c, m[i+15], 10, -30611744);\r\n c = II(c, d, a, b, m[i+ 6], 15, -1560198380);\r\n b = II(b, c, d, a, m[i+13], 21, 1309151649);\r\n a = II(a, b, c, d, m[i+ 4], 6, -145523070);\r\n d = II(d, a, b, c, m[i+11], 10, -1120210379);\r\n c = II(c, d, a, b, m[i+ 2], 15, 718787259);\r\n b = II(b, c, d, a, m[i+ 9], 21, -343485551);\r\n\r\n a = (a + aa) >>> 0;\r\n b = (b + bb) >>> 0;\r\n c = (c + cc) >>> 0;\r\n d = (d + dd) >>> 0;\r\n }\r\n\r\n return crypt.endian([a, b, c, d]);\r\n };\r\n\r\n // Auxiliary functions\r\n md5._ff = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & c | ~b & d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._gg = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & d | c & ~d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._hh = function (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._ii = function (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n\r\n // Package private blocksize\r\n md5._blocksize = 16;\r\n md5._digestsize = 16;\r\n\r\n module.exports = function (message, options) {\r\n if (message === undefined || message === null)\r\n throw new Error(\'Illegal argument \' + message);\r\n\r\n var digestbytes = crypt.wordsToBytes(md5(message, options));\r\n return options && options.asBytes ? digestbytes :\r\n options && options.asString ? bin.bytesToString(digestbytes) :\r\n crypt.bytesToHex(digestbytes);\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack://enc/./node_modules/md5/md5.js?')},"./node_modules/axios/dist/browser/axios.cjs":function node_modulesAxiosDistBrowserAxiosCjs(module,__unused_webpack_exports,__webpack_require__){"use strict"
16
+ ;eval("// Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors\n\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : __webpack_require__.g)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n if (reducer(descriptor, name, obj) !== false) {\n reducedDescriptors[name] = descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst isStandardBrowserEnv = (() => {\n let product;\n if (typeof navigator !== 'undefined' && (\n (product = navigator.product) === 'ReactNative' ||\n product === 'NativeScript' ||\n product === 'NS')\n ) {\n return false;\n }\n\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n})();\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\n const isStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\n\nvar platform = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n isStandardBrowserEnv,\n isStandardBrowserWebWorkerEnv,\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nconst DEFAULT_CONTENT_TYPE = {\n 'Content-Type': undefined\n};\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\nutils.freezeMethods(AxiosHeaders.prototype);\nutils.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.isStandardBrowserEnv ?\n\n// Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n const cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n// Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })();\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.isStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n const responseType = config.responseType;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else {\n requestHeaders.setContentType('multipart/form-data;', false); // mobile/desktop app frameworks\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (platform.isStandardBrowserEnv) {\n // Add xsrf header\n const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))\n && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils.forEach(knownAdapters, (fn, value) => {\n if(fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n if((adapter = utils.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {\n break;\n }\n }\n\n if (!adapter) {\n if (adapter === false) {\n throw new AxiosError(\n `Adapter ${nameOrAdapter} is not supported by the environment`,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n throw new Error(\n utils.hasOwnProp(knownAdapters, nameOrAdapter) ?\n `Adapter '${nameOrAdapter}' is not available in the build` :\n `Unknown adapter '${nameOrAdapter}'`\n );\n }\n\n if (!utils.isFunction(adapter)) {\n throw new TypeError('adapter is not a function');\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.4.0\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n let contextHeaders;\n\n // Flatten headers\n contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n contextHeaders && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n\n\n//# sourceURL=webpack://enc/./node_modules/axios/dist/browser/axios.cjs?")
17
+ }},__webpack_module_cache__={};!function(){__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){__webpack_require__.g=function(){if("object"===("undefined"==typeof globalThis?"undefined":_typeof(globalThis)))return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===("undefined"==typeof window?"undefined":_typeof(window)))return window}}()}(),function(){__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}();var __webpack_exports__=__webpack_require__("./enc.source.js");return __webpack_exports__=__webpack_exports__["default"]}()})}),Enc=unwrapExports(enc),MediaLoader=function(e){function t(n,r,i){classCallCheck(this,t);var o=mergeOptions({createEl:!1},r),a=possibleConstructorReturn(this,e.call(this,n,o,i));if(r.playerOptions.sources&&0!==r.playerOptions.sources.length)n.src(r.playerOptions.sources);else for(var s=0,c=r.playerOptions.techOrder;s<c.length;s++){var l=toTitleCase(c[s]),u=Tech.getTech(l);if(l||(u=Component.getComponent(l)),u&&u.isSupported()){n.loadTech_(l);break}}return a}return inherits(t,e),t}(Component);Component.registerComponent("MediaLoader",MediaLoader);var ClickableComponent=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.emitTapEvents(),i.enable(),i}return inherits(t,e),t.prototype.createEl=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"div",n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};n=assign({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&log$2.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=assign({role:"button","aria-live":"polite"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=createEl("span",{className:"vjs-control-text"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.el();if(e===undefined)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,textContent(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){on(document_1,"keydown",bind(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){off(document_1,"keydown",bind(this,this.handleKeyPress))},t}(Component);Component.registerComponent("ClickableComponent",ClickableComponent);var PosterImage=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.update(),n.on("posterchange",bind(i,i.update)),i}return inherits(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=createEl("div",{className:"vjs-poster",tabIndex:-1});if(!BACKGROUND_SIZE_SUPPORTED){this.fallbackImg_=createEl("img");var t=this.player().height()||parseInt(this.player().el().style.height);this.player().width()||parseInt(this.player().el().style.width);this.fallbackImg_.onload=function(){this.width;this.height>t&&(this.style.maxHeight=t+"px",this.style.width="auto")};var n=createEl("div"),r=createEl("span");r.appendChild(this.fallbackImg_),n.appendChild(r),e.appendChild(n)}return e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?this.player_.play():this.player_.pause())},t}(ClickableComponent);Component.registerComponent("PosterImage",PosterImage);var darkGray="#222",lightGray="#ccc",fontMap={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},TextTrackDisplay=function(e){function t(n,r,i){classCallCheck(this,t);var o=possibleConstructorReturn(this,e.call(this,n,r,i));return n.on("loadstart",bind(o,o.toggleDisplay)),n.on("texttrackchange",bind(o,o.updateDisplay)),n.on("loadstart",bind(o,o.preselectTrack)),n.ready(bind(o,function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)return void this.hide();n.on("fullscreenchange",bind(this,this.updateDisplay));for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()})),o}return inherits(t,e),t.prototype.preselectTrack=function(){for(var e={captions:1,subtitles:1},t=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage,r=void 0,i=void 0,o=void 0,a=0;a<t.length;a++){var s=t[a];n&&n.enabled&&n.language===s.language?s.kind===n.kind?o=s:o||(o=s):n&&!n.enabled?(o=null,r=null,i=null):s["default"]&&("descriptions"!==s.kind||r?s.kind in e&&!i&&(i=s):r=s)}o?o.mode="showing":i?i.mode="showing":r&&(r.mode="showing")},t.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.prototype.clearDisplay=function(){"function"==typeof window_1.WebVTT&&window_1.WebVTT.processCues(window_1,[],this.el_)},t.prototype.updateDisplay=function(){var e=this.player_.textTracks();this.clearDisplay();for(var t=null,n=null,r=e.length;r--;){var i=e[r];"showing"===i.mode&&("descriptions"===i.kind?t=i:n=i)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):t&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(t))},t.prototype.updateForTrack=function(e){if("function"==typeof window_1.WebVTT&&e.activeCues){for(var t=this.player_.textTrackSettings.getValues(),n=[],r=0;r<e.activeCues.length;r++)n.push(e.activeCues[r]);window_1.WebVTT.processCues(window_1,n,this.el_);for(var i=n.length;i--;){var o=n[i];if(o){var a=o.displayState;if(t.color&&(a.firstChild.style.color=t.color),t.textOpacity&&tryUpdateStyle(a.firstChild,"color",constructColor(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(a.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&tryUpdateStyle(a.firstChild,"backgroundColor",constructColor(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?tryUpdateStyle(a,"backgroundColor",constructColor(t.windowColor,t.windowOpacity)):a.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px "+darkGray+", 2px 2px 4px "+darkGray+", 2px 2px 5px "+darkGray:"raised"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px "+darkGray+", 2px 2px "+darkGray+", 3px 3px "+darkGray:"depressed"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px "+lightGray+", 0 1px "+lightGray+", -1px -1px "+darkGray+", 0 -1px "+darkGray:"uniform"===t.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px "+darkGray+", 0 0 4px "+darkGray+", 0 0 4px "+darkGray+", 0 0 4px "+darkGray)),t.fontPercent&&1!==t.fontPercent){var s=window_1.parseFloat(a.style.fontSize);a.style.fontSize=s*t.fontPercent+"px",a.style.height="auto",a.style.top="auto",a.style.bottom="2px"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=fontMap[t.fontFamily])}}}},t}(Component);Component.registerComponent("TextTrackDisplay",TextTrackDisplay);var LoadingSpinner=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},t}(Component);Component.registerComponent("LoadingSpinner",LoadingSpinner);var Button=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};e="button",t=assign({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=assign({type:"button","aria-live":"polite"},n);var r=Component.prototype.createEl.call(this,e,t,n);return this.createControlTextEl(r),r},t.prototype.addChild=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=this.constructor.name;return log$2.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Component.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(ClickableComponent);Component.registerComponent("Button",Button);var BigPlayButton=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(!(this.mouseused_&&e.clientX&&e.clientY)){var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(!r)return void this.player_.focus();var i=function(){return r.focus()};isPromise(t)?t.then(i,function(){}):this.setTimeout(i,1)}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(Button);BigPlayButton.prototype.controlText_="Play Video",Component.registerComponent("BigPlayButton",BigPlayButton);var CloseButton=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.controlText(r&&r.controlText||i.localize("Close")),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(Button);Component.registerComponent("CloseButton",CloseButton);var PlayToggle=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"play",i.handlePlay),i.on(n,"pause",i.handlePause),i.on(n,"ended",i.handleEnded),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(Button);PlayToggle.prototype.controlText_="Play",Component.registerComponent("PlayToggle",PlayToggle);var TimeDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.throttledUpdateContent=throttle(bind(i,i.updateContent),25),i.on(n,"timeupdate",i.throttledUpdateContent),i}return inherits(t,e),t.prototype.createEl=function(t){var n=this.buildCSSClass(),r=e.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_(),r.appendChild(this.contentEl_),r},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.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_)}},t.prototype.formatTime_=function(e){return formatTime(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(Component);TimeDisplay.prototype.controlText_="Time",Component.registerComponent("TimeDisplay",TimeDisplay);var CurrentTimeDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"ended",i.handleEnded),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(TimeDisplay);CurrentTimeDisplay.prototype.controlText_="Current Time",Component.registerComponent("CurrentTimeDisplay",CurrentTimeDisplay);var DurationDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"durationchange",i.updateContent),i.on(n,"loadedmetadata",i.throttledUpdateContent),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(TimeDisplay);DurationDisplay.prototype.controlText_="Duration Time",Component.registerComponent("DurationDisplay",DurationDisplay);var TimeDivider=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},t}(Component);Component.registerComponent("TimeDivider",TimeDivider);var RemainingTimeDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"durationchange",i.throttledUpdateContent),i.on(n,"ended",i.handleEnded),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(TimeDisplay);RemainingTimeDisplay.prototype.controlText_="Remaining Time",Component.registerComponent("RemainingTimeDisplay",RemainingTimeDisplay);var LiveDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.isLoadedMetaData=!1,i.hide(),i.on(i.player(),"durationchange",i.onDurationChange),i.on(i.player(),"loadedmetadata",i.onLoadMetadata),n.on("loadnewvideo",videojs.bind(i,i.resetStatus)),i}return inherits(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=createEl("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"</span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.resetStatus=function(){this.setStatus(!1)},t.prototype.onDurationChange=function(){this.isLoadedMetaData&&this.update()},t.prototype.onLoadMetadata=function(){this.setStatus(!0),this.update()},t.prototype.setStatus=function(e){this.isLoadedMetaData=e},t.prototype.update=function(){this.player().duration()===Infinity?this.show():this.hide()},t}(Component);Component.registerComponent("LiveDisplay",LiveDisplay);var Slider=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return inherits(t,e),t.prototype.enabled=function(){return this.enabled_},t.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return n.className=n.className+" vjs-slider",n=assign({tabIndex:0},n),r=assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;e.preventDefault(),blockTextSelection(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;unblockTextSelection(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!==e||e<0||e===Infinity)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=n:r.width=n,e}}},t.prototype.calculateDistance=function(e){var t=getPointerPosition(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(e===undefined)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Component);Component.registerComponent("Slider",Slider);var LoadProgressBar=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.partEls_=[],i.on(n,"progress",i.update),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,o=function(e,t){var n=e/t||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=o(r,n);for(var a=0;a<t.length;a++){var s=t.start(a),c=t.end(a),l=i[a];l||(l=this.el_.appendChild(createEl()),i[a]=l),l.style.left=o(s,r),l.style.width=o(c-s,r)}for(var u=i.length;u>t.length;u--)this.el_.removeChild(i[u-1]);i.length=t.length},t}(Component);Component.registerComponent("LoadProgressBar",LoadProgressBar);var TimeTooltip=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,n){var r=getBoundingClientRect(this.el_),i=getBoundingClientRect(this.player_.el()),o=e.width*t;if(i&&r){var a=e.left-i.left+o,s=e.width-o+(i.right-e.right),c=r.width/2;a<c?c+=c-a:s<c&&(c=s),c<0?c=0:c>r.width&&(c=r.width),this.el_.style.right="-"+c+"px",textContent(this.el_,n)}},t}(Component);Component.registerComponent("TimeTooltip",TimeTooltip);var PlayProgressBar=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),i=formatTime(r,n.player_.duration()),o=n.getChild("timeTooltip");o&&o.update(e,t,i)})},t}(Component);PlayProgressBar.prototype.options_={children:[]},IE_VERSION&&!(IE_VERSION>8)||IS_IOS||IS_ANDROID||PlayProgressBar.prototype.options_.children.push("timeTooltip"),Component.registerComponent("PlayProgressBar",PlayProgressBar);var MouseTimeDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.update=throttle(bind(i,i.update),25),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=n.player_.duration(),i=formatTime(t*r,r);n.el_.style.left=e.width*t+"px",n.getChild("timeTooltip").update(e,t,i)})},t}(Component);MouseTimeDisplay.prototype.options_={children:["timeTooltip"]},Component.registerComponent("MouseTimeDisplay",MouseTimeDisplay);var STEP_SECONDS=5,UPDATE_REFRESH_INTERVAL=30,SeekBar=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.update=throttle(bind(i,i.update),UPDATE_REFRESH_INTERVAL),i.on(n,"timeupdate",i.update),i.on(n,"ended",i.handleEnded),i.updateInterval=null,i.on(n,["playing"],function(){i.clearInterval(i.updateInterval),i.updateInterval=i.setInterval(function(){i.requestAnimationFrame(function(){i.update()})},UPDATE_REFRESH_INTERVAL)}),i.on(n,["ended","pause","waiting"],function(){i.clearInterval(i.updateInterval)}),i.on(n,["timeupdate","ended"],i.update),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[formatTime(e,n),formatTime(n,n)],"{1} of {2}")),this.bar.update(getBoundingClientRect(this.el_),t)},t.prototype.update=function(t){var n=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){isSingleLeftClick(t)&&(this.player_.trigger("beforeseek"),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(isSingleLeftClick(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&silencePromise(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+STEP_SECONDS)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-STEP_SECONDS)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(Slider);SeekBar.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},IE_VERSION&&!(IE_VERSION>8)||IS_IOS||IS_ANDROID||SeekBar.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),SeekBar.prototype.playerEvent="timeupdate",Component.registerComponent("SeekBar",SeekBar);var ProgressControl=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.handleMouseMove=throttle(bind(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=throttle(bind(i,i.handleMouseSeek),25),i.enable(),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar"),n=t.getChild("mouseTimeDisplay"),r=t.el(),i=getBoundingClientRect(r),o=getPointerPosition(r,e).x;o>1?o=1:o<0&&(o=0),n&&n.update(i,o)},t.prototype.handleMouseSeek=function(e){this.getChild("seekBar").handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(Component);ProgressControl.prototype.options_={children:["seekBar"]},Component.registerComponent("ProgressControl",ProgressControl);var FullscreenToggle=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"fullscreenchange",i.handleFullscreenChange),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Button);FullscreenToggle.prototype.controlText_="Fullscreen",Component.registerComponent("FullscreenToggle",FullscreenToggle);var checkVolumeSupport=function(e,t){!t.tech_||t.tech_.featuresVolumeControl||t.tech_.featuresMuteControl?t.tech_&&t.tech_.featuresVolumeControl&&e.addClass("enable-volume-control"):e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresVolumeControl||t.tech_.featuresMuteControl?t.tech_.featuresVolumeControl&&(e.removeClass("vjs-hidden"),e.addClass("enable-volume-control")):e.addClass("vjs-hidden")})},VolumeLevel=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{
18
+ className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(Component);Component.registerComponent("VolumeLevel",VolumeLevel);var VolumeBar=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on("slideractive",i.updateLastVolume_),i.on(n,"volumechange",i.updateARIAAttributes),n.ready(function(){return i.updateARIAAttributes()}),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){isSingleLeftClick(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){isSingleLeftClick(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},t}(Slider);VolumeBar.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},VolumeBar.prototype.playerEvent="volumechange",Component.registerComponent("VolumeBar",VolumeBar);var VolumeControl=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,t),r.vertical=r.vertical||!1,("undefined"==typeof r.volumeBar||isPlain(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var i=possibleConstructorReturn(this,e.call(this,n,r));return checkVolumeSupport(i,n),i.throttledHandleMouseMove=throttle(bind(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}return inherits(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Component);VolumeControl.prototype.options_={children:["volumeBar"]},Component.registerComponent("VolumeControl",VolumeControl);var MuteToggle=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return checkVolumeSupport(i,n),i.on(n,["loadstart","volumechange"],i.update),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)removeClass(this.el_,"vjs-vol-"+n);addClass(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume(),t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},t}(Button);MuteToggle.prototype.controlText_="Mute",Component.registerComponent("MuteToggle",MuteToggle);var VolumePanel=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,t),"undefined"!=typeof r.inline?r.inline=r.inline:r.inline=!0,("undefined"==typeof r.volumeControl||isPlain(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var i=possibleConstructorReturn(this,e.call(this,n,r));return checkVolumeSupport(i,n),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.muteToggle,"focus",i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i.on(i.muteToggle,"blur",i.sliderInactive_),i}return inherits(t,e),t.prototype.sliderActive_=function(){IS_ANDROID||IS_IOS||this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){IS_ANDROID||IS_IOS||this.removeClass("vjs-slider-active")},t.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(Component);VolumePanel.prototype.options_={children:["muteToggle","volumeControl"]},Component.registerComponent("VolumePanel",VolumePanel);var Menu=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return r&&(i.menuButton_=r.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return inherits(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",bind(this,function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())}))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=createEl(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),on(n,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),n},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;this.focusedChild_!==undefined&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;this.focusedChild_!==undefined&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(Component);Component.registerComponent("Menu",Menu);var MenuButton=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));i.menuButton_=new Button(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var o=Button.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+o,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}return inherits(t,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new Menu(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=createEl("li",{className:"vjs-menu-title",innerHTML:toTitleCase(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),prependTo(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e},t.prototype.createItems=function(){},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.prototype.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Button.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},t.prototype.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},t.prototype.controlText=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",bind(this,function(e){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){on(document_1,"keydown",bind(this,this.handleKeyPress))},t.prototype.handleBlur=function(){off(document_1,"keydown",bind(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),IS_IOS&&isInFrame())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(Component);Component.registerComponent("MenuButton",MenuButton);var TrackButton=function(e){function t(n,r){classCallCheck(this,t);var i=r.tracks,o=possibleConstructorReturn(this,e.call(this,n,r));if(o.items.length<=1&&o.hide(),!i)return possibleConstructorReturn(o);var a=bind(o,o.update);return i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),o.player_.on("ready",a),o.player_.on("dispose",function(){i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a)}),o}return inherits(t,e),t}(MenuButton);Component.registerComponent("TrackButton",TrackButton);var MenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.selectable=r.selectable,i.selected(r.selected),i.selectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitem"),i}return inherits(t,e),t.prototype.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",assign({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText("")))},t}(ClickableComponent);Component.registerComponent("MenuItem",MenuItem);var TextTrackMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=r.track,o=n.textTracks();r.label=i.label||i.language||"Unknown",r.selected="showing"===i.mode;var a=possibleConstructorReturn(this,e.call(this,n,r));a.track=i;var s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];a.handleTracksChange.apply(a,t)},c=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];a.handleSelectedLanguageChange.apply(a,t)};if(n.on(["loadstart","texttrackchange"],s),o.addEventListener("change",s),o.addEventListener("selectedlanguagechange",c),a.on("dispose",function(){n.off(["loadstart","texttrackchange"],s),o.removeEventListener("change",s),o.removeEventListener("selectedlanguagechange",c)}),o.onchange===undefined){var l=void 0;a.on(["tap","click"],function(){if("object"!==_typeof(window_1.Event))try{l=new window_1.Event("change")}catch(e){}l||(l=document_1.createEvent("Event"),l.initEvent("change",!0,!0)),o.dispatchEvent(l)})}return a.handleTracksChange(),a}return inherits(t,e),t.prototype.handleClick=function(t){var n=this.track.kind,r=this.track.kinds,i=this.player_.textTracks();if(r||(r=[n]),e.prototype.handleClick.call(this,t),i)for(var o=0;o<i.length;o++){var a=i[o];a===this.track&&r.indexOf(a.kind)>-1?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled")}},t.prototype.handleTracksChange=function(e){this.selected("showing"===this.track.mode)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(MenuItem);Component.registerComponent("TextTrackMenuItem",TextTrackMenuItem);var OffTextTrackMenuItem=function(e){function t(n,r){return classCallCheck(this,t),r.track={player:n,kind:r.kind,kinds:r.kinds,"default":!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}this.selected(n)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(TextTrackMenuItem);Component.registerComponent("OffTextTrackMenuItem",OffTextTrackMenuItem);var TextTrackButton=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return classCallCheck(this,t),r.tracks=n.textTracks(),possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:TextTrackMenuItem,n=void 0;this.label_&&(n=this.label_+" off"),e.push(new OffTextTrackMenuItem(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new t(this.player_,{track:o,selectable:!0});a.addClass("vjs-"+o.kind+"-menu-item"),e.push(a)}}return e},t}(TrackButton);Component.registerComponent("TextTrackButton",TextTrackButton);var ChaptersTrackMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=r.track,o=r.cue,a=n.currentTime();r.selectable=!0,r.label=o.text,r.selected=o.startTime<=a&&a<o.endTime;var s=possibleConstructorReturn(this,e.call(this,n,r));return s.track=i,s.cue=o,i.addEventListener("cuechange",bind(s,s.update)),s}return inherits(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.prototype.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(MenuItem);Component.registerComponent("ChaptersTrackMenuItem",ChaptersTrackMenuItem);var ChaptersButton=function(e){function t(n,r,i){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r,i))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},t.prototype.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},t.prototype.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(toTitleCase(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new ChaptersTrackMenuItem(this.player_,{track:this.track_,cue:i});e.push(o)}return e},t}(TextTrackButton);ChaptersButton.prototype.kind_="chapters",ChaptersButton.prototype.controlText_="Chapters",Component.registerComponent("ChaptersButton",ChaptersButton);var DescriptionsButton=function(e){function t(n,r,i){classCallCheck(this,t);var o=possibleConstructorReturn(this,e.call(this,n,r,i)),a=n.textTracks(),s=bind(o,o.handleTracksChange);return a.addEventListener("change",s),o.on("dispose",function(){a.removeEventListener("change",s)}),o}return inherits(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var o=t[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},t.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(TextTrackButton);DescriptionsButton.prototype.kind_="descriptions",DescriptionsButton.prototype.controlText_="Descriptions",Component.registerComponent("DescriptionsButton",DescriptionsButton);var SubtitlesButton=function(e){function t(n,r,i){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r,i))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(TextTrackButton);SubtitlesButton.prototype.kind_="subtitles",SubtitlesButton.prototype.controlText_="Subtitles",Component.registerComponent("SubtitlesButton",SubtitlesButton);var CaptionSettingsMenuItem=function(e){function t(n,r){classCallCheck(this,t),r.track={player:n,kind:r.kind,label:r.kind+" settings",selectable:!1,"default":!1,mode:"disabled"},r.selectable=!1,r.name="CaptionSettingsMenuItem";var i=possibleConstructorReturn(this,e.call(this,n,r));return i.addClass("vjs-texttrack-settings"),i.controlText(", opens "+r.kind+" settings dialog"),i}return inherits(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(TextTrackMenuItem);Component.registerComponent("CaptionSettingsMenuItem",CaptionSettingsMenuItem);var CaptionsButton=function(e){function t(n,r,i){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r,i))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(t.push(new CaptionSettingsMenuItem(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(TextTrackButton);CaptionsButton.prototype.kind_="captions",CaptionsButton.prototype.controlText_="Captions",Component.registerComponent("CaptionsButton",CaptionsButton);var SubsCapsMenuItem=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,assign({innerHTML:i},n),r)},t}(TextTrackMenuItem);Component.registerComponent("SubsCapsMenuItem",SubsCapsMenuItem);var SubsCapsButton=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(toTitleCase(i.label_)),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(t.push(new CaptionSettingsMenuItem(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,SubsCapsMenuItem)},t}(TextTrackButton);SubsCapsButton.prototype.kinds_=["captions","subtitles"],SubsCapsButton.prototype.controlText_="Subtitles",Component.registerComponent("SubsCapsButton",SubsCapsButton);var AudioTrackMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=r.track,o=n.audioTracks();r.label=i.label||i.language||"Unknown",r.selected=i.enabled;var a=possibleConstructorReturn(this,e.call(this,n,r));a.track=i;var s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];a.handleTracksChange.apply(a,t)};return a.changeHandler=s,o.addEventListener("change",s),o.addEventListener("enabledchange",s),a.on("dispose",function(){o.removeEventListener("change",s),o.removeEventListener("enabledchange",s)}),a}return inherits(t,e),t.prototype.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t),this.player_.tech_.hlsProvider.hls.audioTrack=this.track.id;for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},t.prototype.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(MenuItem);Component.registerComponent("AudioTrackMenuItem",AudioTrackMenuItem);var AudioTrackButton=function(e){function t(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return classCallCheck(this,t),r.tracks=n.audioTracks(),possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new AudioTrackMenuItem(this.player_,{track:r,selectable:!0}))}return e},t}(TrackButton);AudioTrackButton.prototype.controlText_="Audio Track",Component.registerComponent("AudioTrackButton",AudioTrackButton);var PlaybackRateMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=r.rate,o=parseFloat(i,10);r.label=i,r.selected=1===o,r.selectable=!0;var a=possibleConstructorReturn(this,e.call(this,n,r));return a.label=i,a.rate=o,a.on(n,"ratechange",a.update),a}return inherits(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.prototype.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(MenuItem);PlaybackRateMenuItem.prototype.contentElType="button",Component.registerComponent("PlaybackRateMenuItem",PlaybackRateMenuItem);var PlaybackRateMenuButton=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.updateVisibility(),i.updateLabel(),i.on(n,"loadstart",i.updateVisibility),i.on(n,"ratechange",i.updateLabel),i}return inherits(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},t.prototype.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},t.prototype.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},t.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},t.prototype.createMenu=function(){var e=new Menu(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new PlaybackRateMenuItem(this.player(),{rate:t[n]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){var t=this.player().playbackRate();if(1.1===t)return!1;this.playbackRateSupported()&&(this.labelEl_.innerHTML=t+"x")},t}(MenuButton);PlaybackRateMenuButton.prototype.controlText_="Playback Rate",Component.registerComponent("PlaybackRateMenuButton",PlaybackRateMenuButton);var Spacer=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(Component);Component.registerComponent("Spacer",Spacer);var CustomControlSpacer=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Spacer);Component.registerComponent("CustomControlSpacer",CustomControlSpacer);var ControlBar=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},t}(Component);if(ControlBar.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","audioTrackButton","fullscreenToggle"]},IS_ENABLED_MSE&&!IS_SAFARI){var controlChildren=ControlBar.prototype.options_.children;controlChildren.splice(controlChildren.length-2,0,"subsCapsButton")}Component.registerComponent("ControlBar",ControlBar);var ErrorDisplay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on(n,"error",i.open),i}return inherits(t,e),t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(ModalDialog);ErrorDisplay.prototype.options_=mergeOptions(ModalDialog.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Component.registerComponent("ErrorDisplay",ErrorDisplay);var LOCAL_STORAGE_KEY="vjs-text-track-settings",COLOR_BLACK=["#000","Black"],COLOR_BLUE=["#00F","Blue"],COLOR_CYAN=["#0FF","Cyan"],COLOR_GREEN=["#0F0","Green"],COLOR_MAGENTA=["#F0F","Magenta"],COLOR_RED=["#F00","Red"],COLOR_WHITE=["#FFF","White"],COLOR_YELLOW=["#FF0","Yellow"],OPACITY_OPAQUE=["1","Opaque"],OPACITY_SEMI=["0.5","Semi-Transparent"],OPACITY_TRANS=["0","Transparent"],selectConfigs={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[COLOR_BLACK,COLOR_WHITE,COLOR_RED,COLOR_GREEN,COLOR_BLUE,COLOR_YELLOW,COLOR_MAGENTA,COLOR_CYAN]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[OPACITY_OPAQUE,OPACITY_SEMI,OPACITY_TRANS]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[COLOR_WHITE,COLOR_BLACK,COLOR_RED,COLOR_GREEN,COLOR_BLUE,COLOR_YELLOW,COLOR_MAGENTA,COLOR_CYAN]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",
19
+ label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],"default":2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[OPACITY_OPAQUE,OPACITY_SEMI]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[OPACITY_TRANS,OPACITY_SEMI,OPACITY_OPAQUE]}};selectConfigs.windowColor.options=selectConfigs.backgroundColor.options;var TextTrackSettings=function(e){function t(n,r){classCallCheck(this,t),r.temporary=!1;var i=possibleConstructorReturn(this,e.call(this,n,r));return i.updateDisplay=bind(i,i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=createEl("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),r.persistTextTrackSettings===undefined&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),each(selectConfigs,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}return inherits(t,e),t.prototype.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},t.prototype.createElSelect_=function(e){var t=this,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"",r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"label",i=selectConfigs[e],o=i.id.replace("%s",this.id_);return["<"+r+' id="'+o+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),"</"+r+">",'<select aria-labelledby="'+(""!==n?n+" ":"")+o+'">'].concat(i.options.map(function(e){var r=o+"-"+e[1];return['<option id="'+r+'" value="'+e[0]+'" ','aria-labelledby="'+(""!==n?n+" ":"")+o+" "+r+'">',t.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},t.prototype.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},t.prototype.createElColors_=function(){return createEl("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.prototype.createElFont_=function(){return createEl("div",{className:'vjs-track-settings-font">',innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},t.prototype.createElControls_=function(){var e=this.localize("restore all settings to the default values");return createEl("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},t.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.prototype.label=function(){return this.localize("Caption Settings Dialog")},t.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.prototype.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.prototype.getValues=function(){var e=this;return reduce(selectConfigs,function(t,n,r){var i=getSelectedOptionValue(e.$(n.selector),n.parser);return i!==undefined&&(t[r]=i),t},{})},t.prototype.setValues=function(e){var t=this;each(selectConfigs,function(n,r){setSelectedOption(t.$(n.selector),e[r],n.parser)})},t.prototype.setDefaults=function(){var e=this;each(selectConfigs,function(t){var n=t.hasOwnProperty("default")?t["default"]:0;e.$(t.selector).selectedIndex=n})},t.prototype.restoreSettings=function(){var e=void 0;try{e=JSON.parse(window_1.localStorage.getItem(LOCAL_STORAGE_KEY))}catch(t){log$2.warn(t)}e&&this.setValues(e)},t.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?window_1.localStorage.setItem(LOCAL_STORAGE_KEY,JSON.stringify(e)):window_1.localStorage.removeItem(LOCAL_STORAGE_KEY)}catch(t){log$2.warn(t)}}},t.prototype.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(document_1,"keydown",this.handleKeyDown);var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(ModalDialog);Component.registerComponent("TextTrackSettings",TextTrackSettings);var _templateObject$2=taggedTemplateLiteralLoose(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]),Html5=function(e){function t(n,r,i){classCallCheck(this,t);var o=possibleConstructorReturn(this,e.call(this,n,r,i)),a=r.source,s=!1;if(a&&(o.el_.currentSrc!==a.src||r.tag&&3===r.tag.initNetworkState_)?o.setSource(a):o.handleLateInit_(o.el_),o.el_.hasChildNodes()){for(var c=o.el_.childNodes,l=c.length,u=[];l--;){var d=c[l];"track"===d.nodeName.toLowerCase()&&(o.featuresNativeTextTracks?(o.remoteTextTrackEls().addTrackElement_(d),o.remoteTextTracks().addTrack(d.track),o.textTracks().addTrack(d.track),s||o.el_.hasAttribute("crossorigin")||!isCrossOrigin(d.src)||(s=!0)):u.push(d))}for(var p=0;p<u.length;p++)o.el_.removeChild(u[p])}return o.proxyNativeTracks_(),o.featuresNativeTextTracks&&s&&log$2.warn(tsml(_templateObject$2)),o.restoreMetadataTracksInIOSNativePlayer_(),(TOUCH_ENABLED||IS_IPHONE||IS_NATIVE_ANDROID)&&!0===r.nativeControlsForTouch&&o.setControls(!0),o.proxyWebkitFullscreen_(),o.triggerReady(),o}return inherits(t,e),t.prototype.dispose=function(){t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},t.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var e=this.textTracks(),t=void 0,n=function(){t=[];for(var n=0;n<e.length;n++){var r=e[n];"metadata"===r.kind&&t.push({track:r,storedMode:r.mode})}};n(),e.addEventListener("change",n),this.on("dispose",function(){return e.removeEventListener("change",n)});var r=function i(){for(var n=0;n<t.length;n++){var r=t[n];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}e.removeEventListener("change",i)};this.on("webkitbeginfullscreen",function(){e.removeEventListener("change",n),e.removeEventListener("change",r),e.addEventListener("change",r)}),this.on("webkitendfullscreen",function(){e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",r)})},t.prototype.proxyNativeTracks_=function(){var e=this;NORMAL.names.forEach(function(t){var n=NORMAL[t],r=e.el()[n.getterName],i=e[n.getterName]();if(e["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(e){i.trigger({type:"change",target:i,currentTarget:i,srcElement:i})},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};Object.keys(o).forEach(function(t){var n=o[t];r.addEventListener(t,n),e.on("dispose",function(e){return r.removeEventListener(t,n)})}),e.on("loadstart",a),e.on("dispose",function(t){return e.off("loadstart",a)})}})},t.prototype.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=document_1.createElement("video");var r=this.options_.tag&&getAttributes(this.options_.tag),i=mergeOptions({},r);TOUCH_ENABLED&&!0===this.options_.nativeControlsForTouch||delete i.controls,setAttributes(e,assign(i,{id:this.options_.techId,"class":"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!=typeof this.options_.preload&&setAttribute(e,"preload",this.options_.preload);for(var o=["loop","muted","playsinline","autoplay"],a=0;a<o.length;a++){var s=o[a],c=this.options_[s];void 0!==c&&(c?setAttribute(e,s,s):removeAttribute(e,s),e[s]=c)}return e},t.prototype.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")})}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(e){this.trigger(e)},this)})}},t.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(t){log$2(t,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){var e=this;if(this.el_.duration===Infinity&&IS_ANDROID&&IS_CHROME&&0===this.el_.currentTime){var t=function n(){e.el_.currentTime>0&&(e.el_.duration===Infinity&&e.trigger("durationchange"),e.off("timeupdate",n))};return this.on("timeupdate",t),NaN}return this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)})}},t.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=window_1.navigator&&window_1.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){e.pause(),e.webkitEnterFullScreen()},0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(e===undefined)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=document_1.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t["default"]&&(n["default"]=t["default"]),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},t.prototype.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},t.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),window_1.performance&&"function"==typeof window_1.performance.now?e.creationTime=window_1.performance.now():window_1.performance&&window_1.performance.timing&&"number"==typeof window_1.performance.timing.navigationStart&&(e.creationTime=window_1.Date.now()-window_1.performance.timing.navigationStart),e},t}(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(e){return!1}return!(!Html5.TEST_VID||!Html5.TEST_VID.canPlayType)},Html5.canPlayType=function(e){return Html5.TEST_VID.canPlayType(e)},Html5.canPlaySource=function(e,t){return Html5.canPlayType(e.type)},Html5.canControlVolume=function(){try{var e=Html5.TEST_VID.volume;return Html5.TEST_VID.volume=e/2+.1,e!==Html5.TEST_VID.volume}catch(t){return!1}},Html5.canControlMute=function(){try{var e=Html5.TEST_VID.muted;return Html5.TEST_VID.muted=!0,e!==Html5.TEST_VID.muted}catch(t){return!1}},Html5.canControlPlaybackRate=function(){if(IS_ANDROID&&IS_CHROME&&CHROME_VERSION<58)return!1;try{var e=Html5.TEST_VID.playbackRate;return Html5.TEST_VID.playbackRate=e/2+.1,e!==Html5.TEST_VID.playbackRate}catch(t){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(e){return e&&mpegurlRE.test(e)?"maybe":canPlayType.call(this,e)}:IS_OLD_ANDROID&&(Html5.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&mp4RE.test(e)?"maybe":canPlayType.call(this,e)})},Html5.unpatchCanPlayType=function(){var e=Html5.TEST_VID.constructor.prototype.canPlayType;return Html5.TEST_VID.constructor.prototype.canPlayType=canPlayType,e},Html5.patchCanPlayType(),Html5.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(t){}}()}},Html5.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){Html5.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){Html5.prototype["set"+toTitleCase(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(e){Html5.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){Html5.prototype["set"+toTitleCase(e)]=function(t){"src"===e&&this.player_&&this.player_.trigger&&this.player_.trigger({type:"debug",data:{message:"debug === 播放地址直传 video: "+t}}),this.el_[e]=t}}),["pause","load","play"].forEach(function(e){Html5.prototype[e]=function(){return this.el_[e]()}}),Tech.withSourceHandlers(Html5),Html5.nativeSourceHandler={},Html5.nativeSourceHandler.canPlayType=function(e){setTimeout(function(){},2e3);try{return"video/m3u8"===e?"maybe":Html5.TEST_VID.canPlayType(e)}catch(t){return""}},Html5.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Html5.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=getFileExtension(e.src);return Html5.nativeSourceHandler.canPlayType("video/"+n)}return""},Html5.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Html5.nativeSourceHandler.dispose=function(){},Html5.registerSourceHandler(Html5.nativeSourceHandler),Tech.registerTech("Html5",Html5);var _templateObject$1=taggedTemplateLiteralLoose(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),preventScroll=function(e){e.preventDefault()},TECH_EVENTS_RETRIGGER=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","resize","volumechange","texttrackchange"],Player=function(e){function t(n,r,i){if(classCallCheck(this,t),n.id=n.id||"vjs_video_"+newGUID(),r=assign(t.getTagSettings(n),r),r.initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else for(var a=n;a&&1===a.nodeType;){if(getAttributes(a).hasOwnProperty("lang")){r.language=a.getAttribute("lang");break}a=a.parentNode}var s=possibleConstructorReturn(this,e.call(this,null,r,i));if(s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&getAttributes(n),s.language(s.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach(function(e){c[e.toLowerCase()]=r.languages[e]}),s.languages_=c}else s.languages_=t.prototype.options_.languages;s.cache_={},s.poster_=r.poster||"",s.controls_=!!r.controls,s.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),s.scrubbing_=!1,s.el_=s.createEl(),evented(s,{eventBusKey:"el_"});var l=mergeOptions(s.options_);if(r.plugins){var u=r.plugins,d=new Enc;s.enc=d,d.initPlugins(u,videojs,s)}return s.options_.playerOptions=l,s.middleware_=[],s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),IS_IOS||IS_ANDROID||s.addClass("vjs-workinghover"),t.players[s.id_]=s,s.userActive(!0),s.reportUserActivity(),s.listenForUserActivity_(),s.on("fullscreenchange",s.handleFullscreenChange_),s.on("stageclick",s.handleStageClick_),s.changingSrc_=!1,s.playWaitingForReady_=!1,s.playOnLoadstart_=null,s.forceAutoplayInChrome_(),s}return inherits(t,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&this.tech_.dispose(),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,n=void 0,r=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=t.parentNode:i||(n=this.el_=e.prototype.createEl.call(this,"div"));var o=getAttributes(t);if(i){for(n=this.el_=t,t=this.tag=document_1.createElement("video");n.children.length;)t.appendChild(n.firstChild);hasClass(n,"video-js")||addClass(n,"video-js"),n.appendChild(t),r=this.playerElIngest_=n}if(t.setAttribute("tabindex","-1"),t.removeAttribute("width"),t.removeAttribute("height"),Object.getOwnPropertyNames(o).forEach(function(e){"class"===e?(n.className+=" "+o[e],i&&(t.className+=" "+o[e])):(n.setAttribute(e,o[e]),i&&t.setAttribute(e,o[e]))}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=n.player=this,this.addClass("vjs-paused"),!0!==window_1.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=createStyleElement("vjs-styles-dimensions");var a=$(".vjs-styles-defaults"),s=$("head");s.insertBefore(this.styleEl_,a?a.nextSibling:s.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var c=t.getElementsByTagName("a"),l=0;l<c.length;l++){var u=c.item(l);addClass(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!r&&t.parentNode.insertBefore(n,t),prependTo(t,n),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_=n,n},t.prototype.width=function(e,t){return this.dimension("width",e,t)},t.prototype.height=function(e,t){return this.dimension("height",e,t)},t.prototype.dimension=function(e,t,n){var r=e+"_";if(t===undefined)return this[r]||0;if(""===t)return this[r]=undefined,void this.updateStyleEl_();var i=parseFloat(t);if(isNaN(i))return void log$2.error('Improper value "'+t+'" supplied for for '+e);this[r]=i,this.updateStyleEl_(),this.isReady_&&!n&&this.trigger("playerresize")},t.prototype.fluid=function(e){if(e===undefined)return!!this.fluid_;this.fluid_=!!e,e?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.prototype.aspectRatio=function(e){if(e===undefined)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},t.prototype.updateStyleEl_=function(){if(!0===window_1.VIDEOJS_NO_DYNAMIC_STYLE){var e="number"==typeof this.width_?this.width_:this.options_.width,t="number"==typeof this.height_?this.height_:this.options_.height,n=this.tech_&&this.tech_.el();return void(n&&(e>=0&&(n.width=e),t>=0&&(n.height=t)))}var r=void 0,i=void 0,o=void 0,a=void 0;o=this.aspectRatio_!==undefined&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var s=o.split(":"),c=s[1]/s[0];r=this.width_!==undefined?this.width_:this.height_!==undefined?this.height_/c:this.videoWidth()||300,i=this.height_!==undefined?this.height_:r*c,a=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(a),setTextContent(this.styleEl_,"\n ."+a+" {\n width: "+r+"px;\n height: "+i+"px;\n }\n\n ."+a+".vjs-fluid {\n padding-top: "+100*c+"%;\n }\n ")},t.prototype.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=toTitleCase(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Tech.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:t,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],swf:this.options_.swf,hlsConfig:this.options_.hlsConfig,dashConfig:this.options_.dashConfig,flvConfig:this.options_.flvConfig,webrtcConfig:this.options_.webrtcConfig,xp2pConfig:this.options_.xp2pConfig};ALL.names.forEach(function(e){var t=ALL[e];o[t.getterName]=n[t.privateName]}),assign(o,this.options_[r]),assign(o,this.options_[i]),assign(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var a=Tech.getTech(e);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(this,o),this.tech_.ready(bind(this,this.handleTechReady_),!0),textTrackConverter.jsonToTextTracks(this.textTracksJson_||[],this.tech_),TECH_EVENTS_RETRIGGER.forEach(function(e){n.on(n.tech_,e,n["handleTech"+toTitleCase(e)+"_"])}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"x5videoexitfullscreen",this.handleX5ExitFullscreen_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||prependTo(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){var e=this;ALL.names.forEach(function(t){var n=ALL[t];e[n.privateName]=e[n.getterName]()}),this.textTracksJson_=textTrackConverter.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},t.prototype.tech=function(e){return e===undefined&&log$2.warn(tsml(_templateObject$1)),this.tech_},t.prototype.addTechControlsListeners_=function(){this.tech_&&(this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_))},t.prototype.removeTechControlsListeners_=function(){this.tech_&&(this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_))},t.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(e){log$2("deleting tag.poster throws in some browsers",e)}},t.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.licenseCheckFailed||this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},t.prototype.hasStarted=function(e){if(e===undefined)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return e.removeClass("vjs-waiting")})},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(log$2.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){isSingleLeftClick(e)&&this.controls_&&(this.paused()?this.play():this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){
20
+ this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){IS_IOS||(this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen"))},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.toggleFullscreenClass_=function(){IS_IOS||(this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen"))},t.prototype.documentFullscreenChange_=function(e){var t=FullscreenApi;this.isFullscreen(document_1[t.fullscreenElement]),!1===this.isFullscreen()&&off(document_1,t.fullscreenchange,bind(this,this.documentFullscreenChange_)),prefixedAPI||this.trigger("fullscreenchange")},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.handleX5ExitFullscreen_=function(){this.removeClass("vjs-fullscreen"),this.isFullscreen_=!this.isFullscreen_},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){this.ready(function(){if(e in allowedSetters)return set$1(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw log$2(n),n}},!0)},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in allowedGetters)return get$1(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(this.tech_[e]===undefined)throw log$2("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw log$2("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw log$2(t),t}}},t.prototype.play=function(){var e=this;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return this.techGet_("play");this.playOnLoadstart_=function(){e.playOnLoadstart_=null,silencePromise(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){e.playWaitingForReady_=!1,silencePromise(e.play())})}},t.prototype.pause=function(){this.techCall_("pause")},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.played=function(){return this.techGet_("played")||createTimeRanges(0,0)},t.prototype.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.prototype.currentTime=function(e){if(void 0!==e)return e<0&&(e=0),void this.techCall_("setCurrentTime",e);try{return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime}catch(t){return 0}},t.prototype.duration=function(e){if(e===undefined)return this.cache_.duration!==undefined?this.cache_.duration:NaN;e=parseFloat(e),e<=0&&(e=Infinity),e!==this.cache_.duration&&(this.cache_.duration=e,e===Infinity?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=createTimeRanges(0,0)),e},t.prototype.bufferedPercent=function(){return bufferedPercent(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},t.prototype.volume=function(e){var t=void 0;return e!==undefined?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){return e!==undefined?void this.techCall_("setMuted",e):this.techGet_("muted")||!1},t.prototype.defaultMuted=function(e){return e!==undefined?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.prototype.lastVolume_=function(e){return e!==undefined&&0!==e?void(this.cache_.lastVolume=e):this.cache_.lastVolume},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){return e!==undefined?(this.isFullscreen_=!!e,void this.toggleFullscreenClass_()):!!this.isFullscreen_},t.prototype.requestFullscreen=function(){var e=FullscreenApi;if(this.isFullscreen(!0),this.options_.fakeFullscreen){var t=this;return IS_IOS?(t.el_.style.width="100vw",t.el_.style.height="100%",t.el_.style.position="fixed",t.el_.style.zIndex="999",t.el_.style.top="0",document_1.body.style.overflowY="hidden",document_1.addEventListener("touchmove",preventScroll,{passive:!1}),this.trigger("fullscreenchange")):(this.enterFullWindow(),this.trigger("fullscreenchange")),!1}e.requestFullscreen?(on(document_1,e.fullscreenchange,bind(this,this.documentFullscreenChange_)),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.prototype.exitFullscreen=function(){var e=FullscreenApi;if(this.isFullscreen(!1),this.options_.fakeFullscreen)return IS_IOS?(this.el_.removeAttribute("style"),document_1.removeEventListener("touchmove",preventScroll,{passive:!1}),document_1.body.style.overflowY="",this.trigger("fullscreenchange")):(this.exitFullWindow(),this.trigger("fullscreenchange")),!1;e.requestFullscreen?document_1[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=document_1.documentElement.style.overflow,on(document_1,"keydown",bind(this,this.fullWindowOnEscKey)),document_1.documentElement.style.overflow="hidden",addClass(document_1.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,off(document_1,"keydown",this.fullWindowOnEscKey),document_1.documentElement.style.overflow=this.docOrigOverflow,removeClass(document_1.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=Tech.getTech(i);if(o||(o=Component.getComponent(i)),o){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else log$2.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.prototype.selectSource=function(e){var t=this,n=this.options_.techOrder.map(function(e){return[e,Tech.getTech(e)]}).filter(function(e){var t=e[0],n=e[1];return n?n.isSupported():(log$2.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),r=function(e,t,n){var r=void 0;return e.some(function(e){return t.some(function(t){if(r=n(e,t))return!0})}),r},i=function(e,n){var r=e[0];if(e[1].canPlaySource(n,t.options_[r.toLowerCase()]))return{source:n,tech:r}};return(this.options_.sourceOrder?r(e,n,function(e){return function(t,n){return e(n,t)}}(i)):r(n,e,i))||!1},t.prototype.src=function(e){var t=this;if(void 0===e)return this.cache_.src||this.techGet_("src");var n=filterSource(e);if(n.length&&n.forEach(function(e){if(e.src&&isWebrtcUrl(e.src)&&!isWebRTCSupported())if(t.options_.webrtcConfig&&t.options_.webrtcConfig.fallbackUrl)e.src=t.options_.webrtcConfig.fallbackUrl;else{var n=convertProtocol(e.src);e.src=n&&n[0]||e.src}}),!n.length)return void this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);if(this.cache_.source&&isWebrtcUrl(this.cache_.source.src)&&isWebrtcUrl(n[0].src)&&this.cache_.source.src!==n[0].src){var r=this.tech_.webrtcProvider;if(r&&r.webrtcPlayer&&r.webrtcPlayer.switchStream)return this.tech_.webrtcProvider.webrtcPlayer.switchStream(n[0].src),this.cache_.sources=n,this.cache_.source=n[0],!1}this.cache_.sources=n,this.changingSrc_=!0,this.cache_.source=n[0];try{this.cache_.source&&!isWebrtcUrl(this.cache_.source.src)&&this.options_.autoplay&&setTimeout(function(){var e=t.play&&t.play();isPromise(e)&&e.then()["catch"](function(){t.trigger("blocked")})},1e3)}catch(i){}setSource(this,n[0],function(e,r){if(t.middleware_=r,t.src_(e)){if(n.length>1){var i=n.slice(1),o=i[0].qualityLabelList;return o&&t.QualitySwitcher().setOptions({qualityLabelList:{video:o.slice(1)}}),t.src(i)}return t.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void t.triggerReady()}t.changingSrc_=!1,t.cache_.src=e.src,setTech(r,t.tech_)})},t.prototype.src_=function(e){var t=this.selectSource([e]);return!t||(window_1.performance&&"function"==typeof window_1.performance.mark&&window_1.performance.mark("firstFrameStart"),titleCaseEquals(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),"auto"===this.options_.preload&&this.load()},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),!1))},t.prototype.load=function(){this.techCall_("load")},t.prototype.unload=function(){try{this.pause(),this.tech_.hlsProvider&&this.tech_.hlsProvider.hls&&this.tech_.hlsProvider.hls.stopLoad(),this.tech_.flvProvider&&this.tech_.flvProvider.flv&&this.tech_.flvProvider.flv.unload(),this.tech_.webrtcProvider&&this.tech_.webrtcProvider.webrtcPlayer&&this.tech_.webrtcProvider.webrtcPlayer.stopPlay()}catch(e){}},t.prototype.reset=function(){this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){return this.cache_.source||{}},t.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.prototype.preload=function(e){return e!==undefined?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.prototype.autoplay=function(e){return e!==undefined?(this.techCall_("setAutoplay",e),this.options_.autoplay=e,void this.ready(this.forceAutoplayInChrome_)):this.techGet_("autoplay",e)},t.prototype.forceAutoplayInChrome_=function(){this.paused()&&(this.autoplay()||this.options_.autoplay)&&IS_CHROME&&!IS_ANDROID&&this.play()},t.prototype.playsinline=function(e){return e!==undefined?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return e!==undefined?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.prototype.poster=function(e){if(e===undefined)return this.poster_;e||(e=""),this.poster_=e,this.trigger("posterchange")},t.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},t.prototype.controls=function(e){if(e===undefined)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.prototype.usingNativeControls=function(e){if(e===undefined)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.prototype.error=function(e){return e===undefined?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new MediaError(e),this.addClass("vjs-error"),log$2.error("(CODE:"+this.error_.code+" "+MediaError.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger({type:"error",data:this.error_}))},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){if(e===undefined)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,n=void 0,r=bind(this,this.reportUserActivity),i=function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())},o=function(){r(),this.clearInterval(e),e=this.setInterval(r,250)},a=function(t){r(),this.clearInterval(e)};this.on("mousedown",o),this.on("mousemove",i),this.on("mouseup",a),this.on("keydown",r),this.on("keyup",r);var s=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var e=this.options_.inactivityTimeout;e<=0||(s=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},t.prototype.playbackRate=function(e){return e!==undefined?void this.techCall_("setPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},t.prototype.defaultPlaybackRate=function(e){return e!==undefined?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.prototype.isAudio=function(e){return e!==undefined?void(this.isAudio_=!!e):!!this.isAudio_},t.prototype.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=e.track,n=t===undefined?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){if(e===undefined)return this.language_;this.language_=String(e).toLowerCase()},t.prototype.languages=function(){return mergeOptions(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=mergeOptions(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];r=mergeOptions(r),r.player=undefined,e.tracks[n]=r}return e},t.prototype.createModal=function(e,t){var n=this;t=t||{},t.content=e||"";var r=new ModalDialog(this,t);return this.addChild(r),r.on("dispose",function(){n.removeChild(r)}),r.open(),r},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=getAttributes(e),r=n["data-setup"];if(hasClass(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=tuple(r||"{}"),o=i[0],a=i[1];o&&log$2.error(o),assign(n,a)}if(assign(t,n),e.hasChildNodes())for(var s=e.childNodes,c=0,l=s.length;c<l;c++){var u=s[c],d=u.nodeName.toLowerCase();"source"===d?t.sources.push(getAttributes(u)):"track"===d&&t.tracks.push(getAttributes(u))}return t},t.prototype.flexNotSupported_=function(){var e=document_1.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(Component);ALL.names.forEach(function(e){var t=ALL[e];Player.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.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(e){Player.prototype[e]=function(){return this.techGet_(e)}}),TECH_EVENTS_RETRIGGER.forEach(function(e){Player.prototype["handleTech"+toTitleCase(e)+"_"]=function(){return this.trigger(e)}}),Component.registerComponent("Player",Player);var BASE_PLUGIN_NAME="plugin",PLUGIN_CACHE_KEY="activePlugins_",pluginStorage={},pluginExists=function(e){return pluginStorage.hasOwnProperty(e)},getPlugin=function(e){return pluginExists(e)?pluginStorage[e]:undefined},markPluginAsActive=function(e,t){e[PLUGIN_CACHE_KEY]=e[PLUGIN_CACHE_KEY]||{},e[PLUGIN_CACHE_KEY][t]=!0},triggerSetupEvent=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},createBasicPlugin=function(e,t){var n=function(){triggerSetupEvent(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return markPluginAsActive(this,e),triggerSetupEvent(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach(function(e){n[e]=t[e]}),n},createPluginFactory=function(e,t){return t.prototype.name=e,function(){triggerSetupEvent(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=new(Function.prototype.bind.apply(t,[null].concat([this].concat(r))));return this[e]=function(){return o},triggerSetupEvent(this,o.getEventHash()),o}},Plugin=function(){function e(t){if(classCallCheck(this,e),this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,evented(this),delete this.trigger,stateful(this,this.constructor.defaultState),markPluginAsActive(t,this.name),this.dispose=bind(this,this.dispose),t.on("dispose",this.dispose)}return e.prototype.version=function(){return this.constructor.VERSION},e.prototype.getEventHash=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.prototype.trigger=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return trigger(this.eventBusEl_,e,this.getEventHash(t))},e.prototype.handleStateChanged=function(e){},e.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[PLUGIN_CACHE_KEY][e]=!1,this.player=this.state=null,t[e]=createPluginFactory(e,pluginStorage[e])},e.isBasic=function(t){var n="string"==typeof t?getPlugin(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+(void 0===t?"undefined":_typeof(t))+".");if(pluginExists(t))log$2.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Player.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+(void 0===n?"undefined":_typeof(n))+".");return pluginStorage[t]=n,t!==BASE_PLUGIN_NAME&&(e.isBasic(n)?Player.prototype[t]=createBasicPlugin(t,n):Player.prototype[t]=createPluginFactory(t,n)),n},e.deregisterPlugin=function(e){if(e===BASE_PLUGIN_NAME)throw new Error("Cannot de-register base plugin.");pluginExists(e)&&(delete pluginStorage[e],delete Player.prototype[e])},e.getPlugins=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:Object.keys(pluginStorage),t=void 0;return e.forEach(function(e){var n=getPlugin(e);n&&(t=t||{},t[e]=n)}),t},e.getPluginVersion=function(e){var t=getPlugin(e);return t&&t.VERSION||""},e}();Plugin.getPlugin=getPlugin,Plugin.BASE_PLUGIN_NAME=BASE_PLUGIN_NAME,Plugin.registerPlugin(BASE_PLUGIN_NAME,Plugin),Player.prototype.usingPlugin=function(e){return!!this[PLUGIN_CACHE_KEY]&&!0===this[PLUGIN_CACHE_KEY][e]},Player.prototype.hasPlugin=function(e){return!!pluginExists(e)};var _inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)},extendFn=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=function(){e.apply(this,arguments)},r={};"object"===(void 0===t?"undefined":_typeof(t))?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),_inherits(n,e);for(var i in r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n};if("undefined"==typeof HTMLVideoElement&&isReal()&&(document_1.createElement("video"),document_1.createElement("audio"),document_1.createElement("track"),document_1.createElement("video-js")),videojs.hooks_={},videojs.hooks=function(e,t){return videojs.hooks_[e]=videojs.hooks_[e]||[],t&&(videojs.hooks_[e]=videojs.hooks_[e].concat(t)),videojs.hooks_[e]},videojs.hook=function(e,t){videojs.hooks(e,t)},videojs.hookOnce=function(e,t){videojs.hooks(e,[].concat(t).map(function(t){return function n(){return videojs.removeHook(e,n),t.apply(undefined,arguments)}}))},videojs.removeHook=function(e,t){var n=videojs.hooks(e).indexOf(t);return!(n<=-1)&&(videojs.hooks_[e]=videojs.hooks_[e].slice(),videojs.hooks_[e].splice(n,1),!0)},!0!==window_1.VIDEOJS_NO_DYNAMIC_STYLE&&isReal()){var style=$(".vjs-styles-defaults");if(!style){style=createStyleElement("vjs-styles-defaults");var head=$("head");head&&head.insertBefore(style,head.firstChild),setTextContent(style,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}autoSetupTimeout(1,videojs),videojs.VERSION=version,videojs.options=Player.prototype.options_,videojs.getPlayers=function(){return Player.players},videojs.players=Player.players,videojs.getComponent=Component.getComponent,videojs.registerComponent=function(e,t){Tech.isTech(t)&&log$2.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Component.registerComponent.call(Component,e,t)},videojs.getTech=Tech.getTech,videojs.registerTech=Tech.registerTech,videojs.use=use,videojs.browser=browser,videojs.TOUCH_ENABLED=TOUCH_ENABLED,videojs.extend=extendFn,videojs.mergeOptions=mergeOptions,videojs.bind=bind,videojs.registerPlugin=Plugin.registerPlugin,videojs.plugin=function(e,t){return log$2.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Plugin.registerPlugin(e,t)},videojs.getPlugins=Plugin.getPlugins,videojs.getPlugin=Plugin.getPlugin,videojs.getPluginVersion=Plugin.getPluginVersion,videojs.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),videojs.options.languages=mergeOptions(videojs.options.languages,(n={},n[e]=t,n)),videojs.options.languages[e]},videojs.log=log$2,videojs.createTimeRange=videojs.createTimeRanges=createTimeRanges,videojs.formatTime=formatTime,videojs.parseUrl=parseUrl,videojs.isCrossOrigin=isCrossOrigin,videojs.EventTarget=EventTarget,videojs.on=on,videojs.one=one,videojs.off=off,videojs.trigger=trigger,videojs.xhr=xhr,videojs.TextTrack=TextTrack,videojs.AudioTrack=AudioTrack,videojs.VideoTrack=VideoTrack,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){videojs[e]=function(){return log$2.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Dom[e].apply(null,arguments)}}),videojs.computedStyle=computedStyle,videojs.dom=Dom,videojs.url=Url;var strictUriEncode=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty$1=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable,objectAssign=shouldUseNative()?Object.assign:function(e,t){for(var n,r,i=toObject(e),o=1;o<arguments.length;o++){n=Object(arguments[o]);for(var a in n)hasOwnProperty$1.call(n,a)&&(i[a]=n[a]);if(getOwnPropertySymbols){r=getOwnPropertySymbols(n);for(var s=0;s<r.length;s++)propIsEnumerable.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},token="%[a-f0-9]{2}",singleMatcher=new RegExp(token,"gi"),multiMatcher=new RegExp("("+token+")+","gi"),decodeUriComponent=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return customDecodeURIComponent(e)}},extract_1=extract,parse_1=parse,stringify=function(e,t){t=objectAssign({encode:!0,strict:!0,arrayFormat:"none"},t),!1===t.sort&&(t.sort=function(){});var n=encoderForArrayFormat(t);return e?Object.keys(e).sort(t.sort).map(function(r){var i=e[r];if(i===undefined)return"";if(null===i)return encode(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach(function(e){e!==undefined&&o.push(n(r,e,o.length))}),o.join("&")}return encode(r,t)+"="+encode(i,t)}).filter(function(e){return e.length>0}).join("&"):""},parseUrl$1=function(e,t){return{url:e.split("?")[0]||"",query:parse(extract(e),t)}},queryString={extract:extract_1,parse:parse_1,stringify:stringify,parseUrl:parseUrl$1},count=0,MediaAsyncLoader=function(e){function t(n,r,i){classCallCheck(this,t),log$2("MediaAsyncLoader initializing");var o=mergeOptions({createEl:!1},r),a=possibleConstructorReturn(this,e.call(this,n,o,i));a.enModule=new Enc;var s=o.playerOptions||o;return a.getInfo(s),n.loadVideoByID=bind(a,a.loadVideoByID),log$2("MediaAsyncLoader initialized"),a}return inherits(t,e),t.prototype.getInfo=function(e){e&&e.fileID&&e.appID&&(performance&&"function"==typeof performance.mark&&performance.mark("firstFrameStart"),e.playDefinition?this.getInfoV3(e):e.sign||e.ssign?this.getInfoV2(e):this.getInfoV4(e))},t.prototype.getInfoV2=function(e){var t=this.player(),n=this.assemblyPath("getplayinfo",e.appID,e.fileID),r=e.t,i=e.us,o=e.exper,a=e.sign,s={};e.ssign?s.super_sign=e.ssign:a&&(s={t:r,sign:a},(i||0==i)&&(s.us=i),(o||0==o)&&(s.exper=o,t.trigger({type:"feature",data:"exper"})),t.trigger({type:"feature",data:"key"})),e.playerID&&(s.playerid=e.playerID),this.requestTimestamp=+(new Date).getTime(),t.trigger({type:"playcgistart",data:{time:this.requestTimestamp,url:n}}),log$2("playcgi loading");var c=queryString.stringify(s);c&&(n+=(~n.indexOf("?")?"&":"?")+c,n=n.replace("?&","?")),this.getInfoRetryTimes=0,this.getInfoRequest=function(e){e&&(n=n.replace(SERVER_PATH,SERVER_PATH_BACKUP)),IE_VERSION&&IE_VERSION<10?jsonp(n,{param:s,timeout:3e3,prefix:"TcCallBack"},bind(this,this.onResult)):xhr({url:n,timeout:3e3},bind(this,this.onResult))},this.getInfoRequest()},t.prototype.onResult=function(e,t,n){try{n?t=JSON.parse(n):e||t||(e=new Error("ServerError"))}catch(c){e=new Error("ServerError")}var r=this.player();if(e){if(log$2("playcgi loaded failure"),this.getInfoRetryTimes<3)return this.getInfoRetryTimes++,void this.getInfoRequest();if(this.getInfoRetryTimes<6)return this.getInfoRetryTimes++,void this.getInfoRequest({isBackup:!0});r.trigger({type:"playcgiend",data:{time:+(new Date).getTime(),startTime:this.requestTimestamp,error:e,result:t}});var i=12;switch(e.message){case"XMLHttpRequest timeout":case"Timeout":i=10;break;case"ServerError":i=11}this.player().error({code:i})}else{if(r.trigger({type:"playcgiend",data:{time:+(new Date).getTime(),startTime:this.requestTimestamp,error:e,result:t}}),0!=t.code)return log$2("playcgi loaded failure"),void this.player().error({code:t.code});log$2("playcgi loaded success");var o=t.coverInfo,a=t.videoInfo,s=t.playerInfo;this.setPoster(o),this.setLogo(s),this.setSrc(t),this.setPatch(s),this.setVttThumbnail(t),this.setDots(t),this.setOriginDuration(a),this.setPlayList(s)}},t.prototype.getInfoV3=function(e){var t=this.player(),n=this.assemblyPathV3("getplayinfo",e.appID,e.fileID,e.playDefinition),r=e.t,i=e.us,o=e.rlimit,a=e.sign,s={};e.ssign?s.super_sign=e.ssign:a&&(s={t:r,sign:a},(i||0==i)&&(s.us=i),o&&(s.rlimit=o),t.trigger({type:"feature",data:"key"})),e.playerID&&(s.playerid=e.playerID),this.requestTimestamp=+(new Date).getTime(),t.trigger({type:"playcgistart",data:{time:this.requestTimestamp,url:n}}),log$2("playcgi v3 loading");var c=queryString.stringify(s);c&&(n+=(~n.indexOf("?")?"&":"?")+c,n=n.replace("?&","?")),this.getInfoRetryTimes=0,this.getInfoRequest=function(e){e&&(n=n.replace(SERVER_PATH_V3,SERVER_PATH_BACKUP)),IE_VERSION&&IE_VERSION<10?jsonp(n,{param:s,timeout:3e3,prefix:"TcCallBack"},bind(this,this.onResultV3)):xhr({url:n,timeout:3e3},bind(this,this.onResultV3))},this.getInfoRequest()},t.prototype.onResultV3=function(e,t,n){try{n?t=JSON.parse(n):e||t.body||(e=new Error("ServerError"))}catch(s){e=new Error("ServerError")}var r=this.player();if(e){if(log$2("playcgi v3 loaded failure"),this.getInfoRetryTimes<3)return this.getInfoRetryTimes++,void this.getInfoRequest();if(this.getInfoRetryTimes<6)return this.getInfoRetryTimes++,void this.getInfoRequest({isBackup:!0});r.trigger({type:"playcgiend",data:{time:+(new Date).getTime(),startTime:this.requestTimestamp,error:e,result:t}});var i=12;switch(e.message){case"XMLHttpRequest timeout":case"Timeout":i=10;break;case"ServerError":i=11}this.player().error({code:i})}else{if(r.trigger({type:"playcgiend",data:{time:+(new Date).getTime(),startTime:this.requestTimestamp,error:e,result:t}}),0!=t.code)return log$2("playcgi v3 loaded failure"),void this.player().error({code:t.code});log$2("playcgi v3 loaded success");var o=t.mediaInfo,a=t.playerInfo;this.setPoster({coverUrl:o.basicInfo.coverUrl}),this.setLogo(a),this.setSrcV3(o),this.setPatch(a),this.setVttThumbnail(o),this.setDots(o)}},t.prototype.setSrcV3=function(e,t){var n=this,r=this.player(),i=r.options_.plugins,o=r.DRM().options||i.DRM,a=void 0,s=void 0,c=void 0,l=[],u={},d={};if(t=t||(o?o.skipPlan:""),e.previewStreamingInfo&&e.previewStreamingInfo.previewStreamingList.length>0)e.previewStreamingInfo.previewStreamingList.forEach(function(e,t){e.mineType=n.getMIMEType(e.url),u[getFileExtension(e.url)]=e});else{if(!(e.dynamicStreamingInfo.adaptiveStreamingInfoList&&e.dynamicStreamingInfo.adaptiveStreamingInfoList.length>0))return void this.player().error({code:13,message:"no video stream"});if(e.dynamicStreamingInfo.adaptiveStreamingInfoList.forEach(function(e,t){e.mineType=n.getMIMEType(e.url),d[e.drmType.toLowerCase()||getFileExtension(e.url)]=e}),o&&o.token?(a=o.token,c=o.certificateUri,t=IS_SAFARI&&!c?"fairplay":t,s=window_1.encodeURIComponent(a)):t="all",(IS_CHROME||IS_FIREFOX)&&window_1.navigator.requestMediaKeySystemAccess&&d.widevine&&"widevine"!=t&&"all"!=t?(l.push({src:unifyProtocol(d.widevine.url),
21
+ type:this.getMIMEType(d.widevine.url),keySystems:{"com.widevine.alpha":{serverURL:LICENSE_PATH+"?token="+s+"&drmType="+d.widevine.drmType}}}),log$2("DRM source widevine",l)):IS_SAFARI&&!IS_MQQB&&d.fairplay&&"fairplay"!=t&&"all"!=t&&(l.push({src:unifyProtocol(d.fairplay.url),type:this.getMIMEType(d.fairplay.url),keySystems:{"com.apple.fps.1_0":{certificateUri:c,licenseUri:LICENSE_PATH+"?token="+s+"&drmType="+d.fairplay.drmType}}}),log$2("DRM source fairplay",l)),d.simpleaes&&"all"!=t){var p=d.simpleaes.url.split("/");p[p.length-1]="voddrm.token."+s+"."+p[p.length-1],l.push({src:unifyProtocol(p.join("/")),type:this.getMIMEType(d.simpleaes.url)}),log$2("DRM source simpleaes",l)}d.m3u8&&l.push({src:unifyProtocol(d.m3u8.url),type:this.getMIMEType(d.m3u8.url)}),d.mpd&&l.push({src:unifyProtocol(d.mpd.url),type:this.getMIMEType(d.mpd.url)})}if(!(l.length>0))return void this.player().error({code:4});r.src(l);var h=function(t){return log$2("DRM init Error",l),5!==t.data.code&&2!==t.data.code||!l[0].keySystems["com.widevine.alpha"]?3===t.data.code&&l[0].keySystems["com.apple.fps.1_0"]?void n.setSrcV3(e,"fairplay"):14===t.data.code||3===t.data.code?void n.setSrcV3(e,"all"):void 0:void n.setSrcV3(e,"widevine")};"all"!==t&&(window_1.setTimeout(function(){r.one("error",h)},0),r.one("playing",function(e){}))},t.prototype.getInfoV4=function(e){var t=this.player(),n=this.assemblyPathV4("getplayinfo",e.appID,e.fileID),r=e.t,i=e.us,o=e.rlimit,a=e.psign,s=e.exper,c={};e.ssign?c.super_sign=e.ssign:a&&(c={t:r,psign:a},(i||0==i)&&(c.us=i),o&&(c.rlimit=o),s&&(c.exper=s)),e.playerConfig&&(c.pcfg=e.playerConfig),e.playerID&&(c.playerid=e.playerID),this.requestTimestamp=+(new Date).getTime(),t.trigger({type:"playcgistart",data:{time:this.requestTimestamp,url:n}}),log$2("playcgi v4 loading");var l=queryString.stringify(c);l?(n+=(~n.indexOf("?")?"&":"?")+l,n=n.replace("?&","?")):n+=~n.indexOf("?")?"":"?",n=this.enModule.generatePlayCgiUrl(n,browser),this.getInfoRetryTimes=0,this.getInfoRequest=function(e){e&&(n=n.replace(SERVER_PATH_V4,SERVER_PATH_BACKUP)),IE_VERSION&&IE_VERSION<10?jsonp(n,{param:c,timeout:3e3,prefix:"TcCallBack"},bind(this,this.onResultV4)):xhr({url:n,timeout:3e3},bind(this,this.onResultV4))},this.getInfoRequest()},t.prototype.onResultV4=function(e,t,n){var r=t,i=r.rawRequest;try{n?t=JSON.parse(n):e||t.body||(e=new Error("ServerError"))}catch(d){e=new Error("ServerError")}var o=this.player();if(e){if(log$2("playcgi v4 loaded failure"),this.getInfoRetryTimes<3)return this.getInfoRetryTimes++,void this.getInfoRequest();if(this.getInfoRetryTimes<6)return this.getInfoRetryTimes++,void this.getInfoRequest({isBackup:!0});o.trigger({type:"playcgiend",data:{time:+(new Date).getTime(),startTime:this.requestTimestamp,error:e,result:t}});var a=12;switch(e.message){case"XMLHttpRequest timeout":case"Timeout":a=10;break;case"ServerError":a=11}this.player().error({code:a})}else{if(o.trigger({type:"playcgiend",data:{time:+(new Date).getTime(),startTime:this.requestTimestamp,error:e,result:t,rawRequest:i,overlayIv:this.enModule.overlayIv,overlayKey:this.enModule.overlayKey}}),0!=t.code){if(log$2("playcgi v4 loaded failure"),t.code>=2e3&&t.code<3e3){if(this.getInfoRetryTimes<3)return this.getInfoRetryTimes++,void this.getInfoRequest();if(this.getInfoRetryTimes<6)return this.getInfoRetryTimes++,void this.getInfoRequest({isBackup:!0})}return void this.player().error({code:t.code})}if(log$2("playcgi v4 loaded success",t),4===t.version){var s=t.media;this.setPoster({coverUrl:s.basicInfo.coverUrl}),this.setSrcV4(s),this.setVttThumbnailV4(s),this.setDots(s),this.setOriginDurationV4(s),this.setGhostContent(s.ghostWatermarkInfo)}else if(2===t.version){var c=t.coverInfo,l=t.videoInfo,u=t.playerInfo;this.setPoster(c),this.setLogo(u),this.setSrc(t),this.setPatch(u),this.setVttThumbnail(t),this.setDots(t),this.setOriginDuration(l)}}},t.prototype.setSrcV4=function(e,t){var n=this,r=this.player(),i=r.options_,o=void 0,a=r.options_.plugins,s=r.DRM().options||a.DRM,c=[],l="plain";t=t||(s?s.skipPlan:"");var u=[],d=[];if("Original"===e.audioVideoType||"Transcode"===e.audioVideoType)return this.setSrc(e),!1;if(!e.streamingInfo)return void this.player().error({code:13,message:"no stream info"});if(e.streamingInfo){if(e.streamingInfo.drmOutput&&Array.isArray(e.streamingInfo.drmOutput)){for(var p=e.streamingInfo.drmOutput,h=0;h<p.length;h++)d.push(p[h].type);if(IS_ANY_SAFARI&&!IS_MQQB&&-1!==d.indexOf("FairPlay")&&"fairplay"!=t&&"all"!=t){var f=d.indexOf("FairPlay"),g=p[f].subStreams;c.push(g),u.push({src:unifyProtocol(p[f].url),type:this.getMIMEType(p[f].url),qualityLabelList:g,keySystems:{"com.apple.fps.1_0":{certificateUri:e.streamingInfo.fairPlayCertificateUrl||(s||{}).certificateUri,licenseUri:e.streamingInfo.fairplayLicenseUrl}}}),log$2("DRM source fairplay",o)}else if(window_1.navigator.requestMediaKeySystemAccess&&-1!==d.indexOf("Widevine")&&!IS_SAFARI&&"widevine"!==t&&"all"!==t){var b=d.indexOf("Widevine"),m=p[b].subStreams,y=m[m.length-1];("audio"===y.type||0===y.width&&0===y.height)&&m.pop(),c.push(m),u.push({src:unifyProtocol(p[b].url),type:this.getMIMEType(p[b].url),qualityLabelList:m,keySystems:{"com.widevine.alpha":{serverURL:e.streamingInfo.widevineLicenseUrl}}}),log$2("DRM source widevine",o)}if(-1!==d.indexOf("SimpleAES")&&"all"!=t){var x,_=d.indexOf("SimpleAES");l="SimpleAES";var v=p[_].url.split("/");v[v.length-1]="voddrm.token."+e.streamingInfo.drmToken+"."+v[v.length-1],o=v.join("/");var E=p[_].subStreams;c.push(p[_].subStreams),o&&u.push({src:unifyProtocol(o),type:EXT_MIME.m3u8,qualityLabelList:E,keySystems:(x={},x[l]={},x)})}}else if(e.streamingInfo.plainOutput){var T;o=e.streamingInfo.plainOutput.url;var S=e.streamingInfo.plainOutput.subStreams;c.push(e.streamingInfo.plainOutput.subStreams),o&&u.push({src:unifyProtocol(o),type:EXT_MIME.m3u8,qualityLabelList:S,keySystems:(T={},T[l]={},T)})}this.setHlsConfig(i,c[0],!1),u.length>0?r.src(u):0!==d.length?!t&&this.player().error({code:18}):this.player().error({code:13,message:"no stream info"}),this.setQualityLabelList(c[0])}var C=function(t){return log$2("DRM init Error",u),u[0].keySystems["com.widevine.alpha"]?void n.setSrcV4(e,"widevine"):u[0].keySystems["com.apple.fps.1_0"]?void n.setSrcV4(e,"fairplay"):14===t.data.code||3===t.data.code?void n.setSrcV4(e,"all"):void 0};"all"!==t&&window_1.setTimeout(function(){r.one("error",C)},0)},t.prototype.setHlsConfig=function(e,t,n){var r={};!IS_ENABLED_MSE||IS_TBS||IS_MQQB||IE_VERSION&&IE_VERSION<11||(r={overlayKey:this.enModule&&this.enModule.overlayKey,overlayIv:this.enModule&&this.enModule.overlayIv});e.hlsConfig?(e.hlsConfig.qualityLabelList=t,e.hlsConfig.startLevel||(e.hlsConfig.startLevel=t?t.length-1:5)):e.hlsConfig={qualityLabelList:t,startLevel:t?t.length-1:5},Object.assign(e.hlsConfig,r,{forbid:n})},t.prototype.setQualityLabelList=function(e){this.player().QualitySwitcher().setOptions({qualityLabelList:{video:e}})},t.prototype.setLogo=function(e){var t=this.player();e.logoPic?(t.logoImage.update({img:{url:unifyProtocol(e.logoPic),position:e.logoLocation},link:unifyProtocol(e.logoUrl)}),t.trigger({type:"feature",data:"logo"})):t.logoImage.reset()},t.prototype.setPoster=function(e){var t=this.player();e&&e.coverUrl?t.poster(unifyProtocol(e.coverUrl)):t.options_.playerOptions.poster||t.poster("")},t.prototype.setDots=function(e){var t=this.player();if(t.options_.dots=null,e.keyFrameDescInfo&&e.keyFrameDescInfo.keyFrameDescList&&e.keyFrameDescInfo.keyFrameDescList.length>0){var n=e.keyFrameDescInfo.keyFrameDescList;t.options_.dots=n}var r=t.options_.plugins;r&&r.ProgressMarker&&r.ProgressMarker.markers&&r.ProgressMarker.markers.length>0&&(t.options_.dots=t.options_.dots.concat(r.ProgressMarker.markers)),t.ProgressMarker().init()},t.prototype.setSrc=function(e){var t=this.player(),n=e.videoInfo||{};if("Original"===e.audioVideoType&&(n.sourceVideo=e.originalInfo),"Transcode"===e.audioVideoType&&(n.sourceVideo=e.transcodeInfo),(null!=t.options_.definition||t.options_.definition!=undefined)&&n.transcodeList&&n.transcodeList.length>0){t.trigger({type:"feature",data:"definition"});var r=this.getSrcByDefinition(n,t.options_.definition);if(r)return t.src({src:unifyProtocol(r.url),type:this.getMIMEType(r.url)}),!0}if(t.MultiResolution().reset(),n.masterPlayList){t.src(this.getMasterSouces(n));var i=t.options_.hlsConfig;i?i.forbid=!0:Object.assign(t.options_,{hlsConfig:{forbid:!0}}),this.setQualityLabelList([]),t.MultiResolution().store(this.getMultiResolutionData(e))}else if(n.transcodeList&&n.transcodeList.length>0){var o=this.getMultiResolutionData(e);if(o.showOrder.length>0)t.MultiResolution().init(o);else{var a=n.transcodeList[0].url;t.src({src:unifyProtocol(a),type:this.getMIMEType(a)})}}else n.sourceVideo&&this.getMIMEType(n.sourceVideo.url)?t.src({src:unifyProtocol(n.sourceVideo.url),type:this.getMIMEType(n.sourceVideo.url)}):this.player().error({code:13})},t.prototype.setPatch=function(e){var t=this.player();e.patchInfo?t.ImagePatch().init(e.patchInfo):t.ImagePatch().reset()},t.prototype.setVttThumbnail=function(e){var t=this.player();e.imageSpriteInfo&&e.imageSpriteInfo.imageSpriteList?t.ready(bind(this,function(){t.VttThumbnail().init({vttUrl:unifyProtocol(e.imageSpriteInfo.imageSpriteList[0].webVttUrl)})})):t.VttThumbnail().reset()},t.prototype.setVttThumbnailV4=function(e){var t=this.player();e.imageSpriteInfo&&e.imageSpriteInfo.webVttUrl?t.ready(bind(this,function(){t.VttThumbnail().init({vttUrl:unifyProtocol(e.imageSpriteInfo.webVttUrl)})})):t.VttThumbnail().reset()},t.prototype.setOriginDuration=function(e){var t=this.player();if(t.options_.exper>0){var n=e.sourceVideo?e.sourceVideo.floatDuration:e.transcodeList[0].floatDuration;t.one("play",function(){t.duration(n)})}},t.prototype.setOriginDurationV4=function(e){var t=this,n=this.player();n.cache_.originDuration=e.basicInfo.duration,n.off("durationchange",this.keepOriginDuration),n.one("durationchange",function(e){(!n.duration()||n.duration()>0&&Math.floor(n.cache_.originDuration)!==Math.floor(n.duration()))&&(t.keepOriginDuration(e),n.on("durationchange",t.keepOriginDuration))})},t.prototype.setGhostContent=function(e){if(e){var t=this.player(),n=t&&t.DynamicWatermark();n.options.content=e.text,n.options.keep=!0,n.init()}},t.prototype.keepOriginDuration=function(e){var t=this.player(),n=t.cache_.originDuration;Math.floor(n)!==Math.floor(t.duration())&&(log$2("试看视频"),t.duration(Math.round(n)))},t.prototype.getMasterSouces=function(e){var t=e.masterPlayList,n=[];return n.push({src:unifyProtocol(t.url),type:EXT_MIME.m3u8}),n},t.prototype.getMultiResolutionData=function(e){var t={sources:{},labels:{},showOrder:[],defaultRes:""},n=[],r=e.videoInfo.transcodeList,i=this;return e.playerInfo.videoClassification.forEach(function(e,o){r.length>0&&(r=r.filter(function(r){if(!(e.definitionList.indexOf(r.definition)>-1))return!0;n[e.id]||(t.showOrder.push(e.id),t.labels[e.id]=e.name,n[e.id]=[]),n[e.id].push({src:unifyProtocol(r.url),type:i.getMIMEType(r.url)})}))}),t.sources=n,t.defaultRes=e.playerInfo.defaultVideoClassification||Object.keys(n)[0],t},t.prototype.getSrcByDefinition=function(e,t){var n=e.transcodeList,r=e.sourceVideo;if(0==t)return r;for(var i=0;i<n.length;i++)if(n[i].definition==t)return n[i]},t.prototype.getMIMEType=function(e){var t=EXT_MIME[getFileExtension(e)];return t||(log$2.error("MIME type no found! Ext = "+getFileExtension(e)),"")},t.prototype.assemblyPath=function(e,t,n){var r=window_1.location.protocol;return"http:"!=r&&"https:"!=r&&(r="https:"),""+r+SERVER_PATH+"/"+e+"/v2/"+t+"/"+n},t.prototype.assemblyPathV3=function(e,t,n,r){var i=window_1.location.protocol;return"http:"!=i&&"https:"!=i&&(i="https:"),""+i+SERVER_PATH_V3+"/"+e+"/v3/"+t+"/"+n+"/"+r},t.prototype.assemblyPathV4=function(e,t,n){var r=window_1.location.protocol;return"http:"!=r&&"https:"!=r&&(r="https:"),""+r+SERVER_PATH_V4+"/"+e+"/v4/"+t+"/"+n},t.prototype.customHost=function(e){var t=this.player();t.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(t.options_.customHost)&&(e.masterPlayList&&(e.masterPlayList.url=replaceHost(e.masterPlayList.url,t.options_.customHost)),e.sourceVideo&&(e.sourceVideo.url=replaceHost(e.sourceVideo.url,t.options_.customHost)),e.transcodeList.length>0&&e.transcodeList.forEach(function(e,n){e.url=replaceHost(e.url,t.options_.customHost)}),t.trigger({type:"feature",data:"customHost"}))},t.prototype.loadVideoByID=function(e){var t=this.player();t.trigger({type:"loadnewvideo"}),t.hasStarted(!1),this.getInfo(e),t.duration(0),t.playbackRate(1),t.options_.appID=e.appID,t.options_.fileID=e.fileID,t.options_.psign=e.psign,e.definition&&(t.options_.definition=e.definition),t.bigPlayButton&&t.bigPlayButton.show(),t.options_.plugins.ContinuePlay&&t.ContinuePlay().init()},t.prototype.setPlayList=function(e){this.player().options_.plugins.PlayList||e.playlist&&e.playlist.data instanceof Array&&e.playlist.data.length>0&&this.player_.PlayList(e.playlist)},t}(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(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return n.on("logochange",videojs.bind(i,function(e){this.update(e.data)})),r.img&&i.update(r),i}return inherits(t,e),t.prototype.createEl=function(){var e=videojs.dom.createEl("div",{className:"tcp-logo vjs-hidden"}),t=videojs.dom.createEl("a",{className:"tcp-logo-link",target:"_blank"}),n=videojs.dom.createEl("img",{className:"tcp-logo-img"});return this.linkEl_=t,this.imgEl_=n,t.appendChild(n),e.appendChild(t),e},t.prototype.update=function(e){var t=e.img,n=e.link;this.setImg(t),this.setHref(n),this.options_=videojs.mergeOptions(this.options_,e),this.show()},t.prototype.setImg=function(e){if(this.imgEl_){this.imgEl_.src=e.url;var t=positionMap[e.position]||e.position||"left-top";videojs.dom.addClass(this.el_,t)}},t.prototype.setHref=function(e){this.linkEl_&&e&&(this.linkEl_.href=e)},t.prototype.reset=function(){this.hide(),this.imgEl_.removeAttribute("src"),this.linkEl_.removeAttribute("href")},t}(ClickableComponent$2);videojs.registerComponent("LogoImage",LogoImage);var Component$3=videojs.getComponent("Component"),Button$2=videojs.getComponent("Button"),ContinuePlayTips=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.init(r),i}return inherits(t,e),t.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-continue-play-tips"})},t.prototype.close=function(){this.hide()},t.prototype.init=function(e){var t=this.addChild("closeButton",{controlText:"Close"});this.on(t,"close",this.close),this.addChild("ContinuePlayTipsContent",e);var n=this.addChild("ContinuePlayButton",e);this.on(n,["tap","click"],this.close),this.setTimeout(function(){this.close()},3500)},t}(Component$3);videojs.registerComponent("ContinuePlayTips",ContinuePlayTips);var ContinuePlayTipsContent=function(e){function t(n,r){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.createEl=function(){var e=videojs.dom.createEl("span",{className:"tcp-continue-play-tips-content"}),t=videojs.dom.createEl("span",{className:"tcp-text",textContent:this.localize(this.options_.text||"Last time play at ")}),n=videojs.dom.createEl("span",{className:"tcp-time",textContent:videojs.formatTime(this.options_.time)});return this.textEl_=t,this.timeEl_=n,e.appendChild(t),e.appendChild(n),e},t}(Component$3);videojs.registerComponent("ContinuePlayTipsContent",ContinuePlayTipsContent);var ContinuePlayButton=function(e){function t(n,r){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"button",{className:"tcp-continue-play-buttom",textContent:this.localize(this.options_.btnText||"Resume play")})},t.prototype.handleClick=function(){this.options_.resumeCallback.call()},t}(Button$2);videojs.registerComponent("ContinuePlayButton",ContinuePlayButton);var Component$4=videojs.getComponent("Component"),LevelSwitchTips=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.playing=!1,i.timeoutID=undefined,i.levelSwitch=n.options_.plugins.ContextMenu.levelSwitch,i.init(),n.on("playing",videojs.bind(i,function(){i.playing=!0})),n.on("resolutionswitching",videojs.bind(i,function(e){if(i.playing)if(e.data.label)i.switchHandler(i.createSwitching(e.data.label),2e3);else{var t=i.player().QualitySwitcher().options.qualityData;if(t){var n=t.video.filter(function(t){return e.data.newQuality===t.id})[0];i.switchHandler(i.createSwitching(n.label),2e3)}}})),n.on("resolutionswitched",videojs.bind(i,function(){i.playing&&i.switchHandler(i.createSwitched(),2e3)})),n.on("levelSwitchError",videojs.bind(i,function(){i.switchHandler(i.createSwitchError(),2e3)})),i}return inherits(t,e),t.prototype.switchHandler=function(e,t){var n=this;this.timeoutID&&clearTimeout(this.timeoutID),this.textNode.innerText=e,this.show(),this.timeoutID=setTimeout(function(){n.hide()},t)},t.prototype.createEl=function(){var e=videojs.dom.createEl("div",{className:"tcp-switch vjs-hidden"});return this.textNode=videojs.dom.createEl("div",{innerText:""}),e.appendChild(this.textNode),e},t.prototype.init=function(){var e=this.addChild("closeButton",{controlText:"Close"});this.on(e,"close",this.hide)},t.prototype.createSwitching=function(e){return this.levelSwitch.switchingText?this.levelSwitch.switchingText+e:"正在为您切换至"+e},t.prototype.createSwitched=function(){return this.levelSwitch.switchedText?this.levelSwitch.switchedText:"切换成功"},t.prototype.createSwitchError=function(){return this.levelSwitch.switchErrorText?this.levelSwitch.switchErrorText:"切换失败"},t.prototype.show=function(){e.prototype.show.call(this),this.popped=!0},t.prototype.hide=function(){e.prototype.hide.call(this),this.popped=!1},t}(Component$4);videojs.registerComponent("LevelSwitchTips",LevelSwitchTips);var Component$7=videojs.getComponent("Component"),mapKey={fileID:"file ID",requestID:"request ID",mediaType:"media type",mimeType:"mime type",provider:"provider",resolution:"resolution",rate:"rate",frames:"frames",buffer:"buffer",connectionSpeed:"connection speed",info:"info"},VideoTextItem=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.display=!1,i.displayData="loading",i}return inherits(t,e),t.prototype.createEl=function(){var e=videojs.dom.createEl("div",{className:"tcp-statistic-line vjs-hidden"}),t=videojs.dom.createEl("span",{className:"tcp-statistic-title",innerText:mapKey[this.options_.key]+":"}),n=videojs.dom.createEl("span",{className:"tcp-statistic-data",innerText:this.options_.data});return e.appendChild(t),e.appendChild(n),e},t.prototype.updateTextNode_=function(){for(var e=this.el_.lastChild;e.firstChild;)e.removeChild(e.firstChild);this.displayData&&this.show(),this.textNode_=document_1.createTextNode(this.displayData||""),e.appendChild(this.textNode_)},t.prototype.updateContent=function(e){e!==this.displayData&&(this.displayData=e,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.isDisplay=function(){return this.display},t.prototype.show=function(){e.prototype.show.call(this),this.display=!0,this.popped=!0},t.prototype.hide=function(){e.prototype.hide.call(this),this.display=!1,this.popped=!1},t.prototype.reset=function(){e.prototype.hide.call(this),this.display=!1,this.displayData=""},t}(Component$7);videojs.registerComponent("VideoTextItem",VideoTextItem);var isArray$1=Array.isArray,isArray_1=isArray$1,freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=_freeGlobal||freeSelf||Function("return this")(),_root=root,Symbol$1=_root.Symbol,_Symbol=Symbol$1,objectProto=Object.prototype,hasOwnProperty$2=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:undefined,_getRawTag=getRawTag,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString,_objectToString=objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:undefined,_baseGetTag=baseGetTag,isObjectLike_1=isObjectLike,symbolTag="[object Symbol]",isSymbol_1=isSymbol,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,_isKey=isKey,isObject_1=isObject$2,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]",isFunction_1$2=isFunction$3,coreJsData=_root["__core-js_shared__"],_coreJsData=coreJsData,maskSrcKey=function(){var e=/[^.]+$/.exec(_coreJsData&&_coreJsData.keys&&_coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),_isMasked=isMasked,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString,_toSource=toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$3=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$3).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_baseIsNative=baseIsNative,_getValue=getValue,_getNative=getNative,nativeCreate=_getNative(Object,"create"),_nativeCreate=nativeCreate,_hashClear=hashClear,_hashDelete=hashDelete,HASH_UNDEFINED="__lodash_hash_undefined__",objectProto$3=Object.prototype,hasOwnProperty$4=objectProto$3.hasOwnProperty,_hashGet=hashGet,objectProto$4=Object.prototype,hasOwnProperty$5=objectProto$4.hasOwnProperty,_hashHas=hashHas,HASH_UNDEFINED$1="__lodash_hash_undefined__",_hashSet=hashSet;Hash.prototype.clear=_hashClear,Hash.prototype["delete"]=_hashDelete,Hash.prototype.get=_hashGet,Hash.prototype.has=_hashHas,Hash.prototype.set=_hashSet;var _Hash=Hash,_listCacheClear=listCacheClear,eq_1=eq,_assocIndexOf=assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice,_listCacheDelete=listCacheDelete,_listCacheGet=listCacheGet,_listCacheHas=listCacheHas,_listCacheSet=listCacheSet;ListCache.prototype.clear=_listCacheClear,ListCache.prototype["delete"]=_listCacheDelete,ListCache.prototype.get=_listCacheGet,ListCache.prototype.has=_listCacheHas,ListCache.prototype.set=_listCacheSet;var _ListCache=ListCache,Map=_getNative(_root,"Map"),_Map=Map,_mapCacheClear=mapCacheClear,_isKeyable=isKeyable,_getMapData=getMapData,_mapCacheDelete=mapCacheDelete,_mapCacheGet=mapCacheGet,_mapCacheHas=mapCacheHas,_mapCacheSet=mapCacheSet;MapCache.prototype.clear=_mapCacheClear,MapCache.prototype["delete"]=_mapCacheDelete,MapCache.prototype.get=_mapCacheGet,MapCache.prototype.has=_mapCacheHas,MapCache.prototype.set=_mapCacheSet;var _MapCache=MapCache,FUNC_ERROR_TEXT="Expected a function";memoize.Cache=_MapCache;var memoize_1=memoize,MAX_MEMOIZE_SIZE=500,_memoizeCapped=memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=_memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,function(e,n,r,i){t.push(r?i.replace(reEscapeChar,"$1"):n||e)}),t}),_stringToPath=stringToPath,_arrayMap=arrayMap,INFINITY=1/0,symbolProto=_Symbol?_Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined,_baseToString=baseToString,toString_1=toString$2,_castPath=castPath,INFINITY$1=1/0,_toKey=toKey,_baseGet=baseGet,get_1=get$2,defaultConfig={enableRecoverMediaError:!0,recoverMediaErrorMaxRetry:5,fragLoadingMaxRetry:3},Html5HlsJS=function(){function e(t,n,r){var i=this;classCallCheck(this,e);var o={},a=n.player();t.keySystems&&t.keySystems["com.widevine.alpha"]&&t.keySystems["com.widevine.alpha"].serverURL?(r.hlsConfig.widevineLicenseUrl=t.keySystems["com.widevine.alpha"].serverURL,r.hlsConfig.enableWorker=!0,r.hlsConfig.emeEnabled=!0,r.hlsConfig.startLevel=(r.hlsConfig.qualityLabelList||[]).length-1,o=r.hlsConfig):o=n.player_.options_.hlsConfig||r.hlsConfig||{},o.forbid&&(delete o.overlayKey,delete o.overlayIv),this.drmBackup=r.hlsConfig&&r.hlsConfig.drmBackup;var s=function(){var e=window.Hls;a.trigger({type:"debug",data:{message:"debug === 加载hls.js完成,进入初始化 hls 阶段"}});var s=new e(videojs.mergeOptions(defaultConfig,o)),c=n.el();i.Hls=e,i.tech=n,i.hls=s,i.switchStatus="",i.manifests=[],i.subtitlesLoadedCount=0,i.audioTrackLoadedCount=0,i.subtitles=[],i.audioTracks=[],i.hlsjsErrorHandler=i.errorHandlerFactory(),s.on(e.Events.ERROR,i.onError.bind(i)),s.on(e.Events.MANIFEST_PARSED,videojs.bind(i,i.onMetaData)),s.on(e.Events.MANIFEST_LOADED,i.loadSubtiles.bind(i)),s.on(e.Events.MANIFEST_LOADED,i.loadAudioTracks.bind(i)),s.on(e.Events.LEVEL_LOADED,i.onLevelLoaded.bind(i)),a.on("ready",i.addHlsSubtitles.bind(i));for(var l in e.Events)s.on(e.Events[l],videojs.bind(i,i.onEvent));s.attachMedia(c),s.loadSource(t.src),a.trigger({type:"debug",data:{message:"debug === 初始化 hls.js 完成,已传递 hls 地址"}}),window.Hls&&r.xp2pConfig&&r.xp2pConfig.useXP2P&&a.XP2PHlsjsPlugin&&a.XP2PHlsjsPlugin().startHLSP2P(i.hls,window.HLSP2P,function(e){})};a.trigger({type:"debug",data:{message:"debug === 开始加载hls.js"}}),Promise.all([function(){return r.xp2pConfig&&r.xp2pConfig.useXP2P&&"hls"===r.xp2pConfig.format&&!window.HLSP2P?new Promise(function(e){loadScript(XP2P_HLS_PATH,function(){e()})}):Promise.resolve()}(),function(){return window.Hls?Promise.resolve():new Promise(function(e){loadScript(HLS_PATH,function(){e()})})}()]).then(function(){s()})}return e.prototype.switchQuality=function(e){e.id!=this.hls.currentLevel&&(this.switchStatus="switching",this.switchData=e,this.tech.trigger({type:"hlsresolutionswitching",data:this.switchData}),this.hls.nextLevel=e.id)},e.prototype.dispose=function(){this.hls.destroy()},e.prototype.onSubtitleLoaded=function(e,t){var n=this,r=this.tech.player(),i=this.subtitlesLoadedCount,o=this.hls.subtitleTracks;this.subtitles[i].url=t.details.fragments[0].url,++this.subtitlesLoadedCount<o.length?this.hls.trigger(this.Hls.Events.SUBTITLE_TRACK_LOADING,{url:o[this.subtitlesLoadedCount].url,id:o[this.subtitlesLoadedCount].id}):r.ready(function(){n.addHlsSubtitles()})},e.prototype.onAudioTrackLoaded=function(e,t){var n=this,r=this.tech.player(),i=this.audioTrackLoadedCount,o=this.hls.audioTracks;this.audioTracks[i].url=t.details.fragments[0].url,++this.audioTrackLoadedCount<o.length?this.hls.trigger(this.Hls.Events.AUDIO_TRACK_LOADING,{url:o[this.audioTrackLoadedCount].url,id:o[this.audioTrackLoadedCount].id}):r.ready(function(){n.addAudioTracks()})},e.prototype.loadAudioTracks=function(){var e=this,t=this.hls.audioTracks;if(t.length){t.forEach(function(t){e.audioTracks.push({id:t.id,name:t.name,lang:t.lang,loaded:!1,"default":t["default"]})});var n=t[0];this.hls.trigger(this.Hls.Events.AUDIO_TRACK_LOADING,{url:n.url,id:n.id}),this.hls.on(this.Hls.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded.bind(this))}},e.prototype.loadSubtiles=function(){var e=this,t=0!==get_1(this,"hls.subtitleTracks.length")?get_1(this,"hls.subtitleTracks"):get_1(this,"hls.subtitleTrackController.tracks");if(t.length){t.forEach(function(t){e.subtitles.push({name:t.name,lang:t.lang,loaded:!1})});var n=t[0];this.hls.on(this.Hls.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleLoaded.bind(this)),this.hls.trigger(this.Hls.Events.SUBTITLE_TRACK_LOADING,{url:n.url,id:n.id})}},e.prototype.addAudioTracks=function(){var e=this;this.audioTracks.length&&this.audioTracks.some(function(e){return!e.loaded})&&this.audioTracks.forEach(function(t){var n=e.tech.addAudioTrack({id:t.id,src:t.url,kind:"audio",srclang:t.lang,label:t.name,enabled:t["default"]},!0);n.addEventListener("load",function(){t.loaded=!0})})},e.prototype.addHlsSubtitles=function(){var e=this;this.subtitles.length&&this.subtitles.some(function(e){return!e.loaded})&&this.subtitles.forEach(function(t){var n=e.tech.addRemoteTextTrack({src:t.url,kind:"subtitles",srclang:t.lang,label:t.name},!0);n.addEventListener("load",function(){t.loaded=!0})})},e.prototype.onEvent=function(e,t){this.tech.trigger({type:e,data:t});var n=this.tech.player();switch(e){case this.Hls.Events.MANIFEST_LOADED:this.manifests.push(t.networkDetails.response||t.networkDetails.responseText);break;case this.Hls.Events.LEVEL_SWITCHING:break;case this.Hls.Events.LEVEL_SWITCHED:"switching"==this.switchStatus&&(this.switchStatus="switched",this.tech.trigger({type:"hlsresolutionswitched",data:this.switchData}),this.switchData=null);break;case this.Hls.Events.LEVEL_SWITCH_ERROR:n.trigger({type:"levelSwitchError"})}},e.prototype.onMetaData=function(e,t){var n=[],r=this.hls,i=this;if(t.levels.length>1){var o={id:-1,label:"auto",selected:-1===r.manualLevel};n.push(o),t.levels.forEach(function(e,t){var o={};o.id=t,o.selected=t===r.manualLevel,o.label=i.getLevelLabel(e),n.push(o)});var a={qualityData:{video:n},callbacks:{video:videojs.bind(this,this.switchQuality)}};this.tech.setTimeout(function(){this.trigger({type:"masterplaylistchange",data:a})},1)}},e.prototype.getLevelLabel=function(e){return e.height?e.height+"p":e.width?Math.round(9*e.width/16)+"p":e.bitrate?e.bitrate/1e3+"kbps":0},e.prototype.onLevelLoaded=function(e,t){this._duration=t.details.live?Infinity:t.details.totalduration},e.prototype.onError=function(e,t){var n=this.tech.player();if(t.fatal)switch(t.type){case this.Hls.ErrorTypes.NETWORK_ERROR:n.error({code:14,source:t});break;case this.Hls.ErrorTypes.MEDIA_ERROR:this.hls.config.enableRecoverMediaError?this.hlsjsErrorHandler(t):n.error({code:15,source:t});break;case this.Hls.ErrorTypes.MUX_ERROR:n.error({code:16,source:t});break;case this.Hls.ErrorTypes.OTHER_ERROR:default:n.error({code:17,source:t}),this.drmBackup&&"keySystemError"===t.type&&n.error(null)}else switch(t.details){case this.Hls.ErrorDetails.KEY_LOAD_ERROR:}},e.prototype.errorHandlerFactory=function(){var e=this.hls,t=this.tech.player(),n=null,r=null,i=0;return function(o){var a=Date.now();i==e.config.recoverMediaErrorMaxRetry?t.error({code:15,source:o}):(!n||a-n>2e3?(n=a,e.recoverMediaError()):(!r||a-r>2e3)&&(r=a,e.swapAudioCodec(),e.recoverMediaError()),i++)}},e.prototype.duration=function(){return this._duration},e}(),hlsTypeRE=/^application\/(x-mpegURL|vnd\.apple\.mpegURL)$/i,hlsExtRE=/.m3u8(?![^?])/i,HlsSourceHandler={name:"hlsSourceHandler",canHandleSource:function(e){return e.skipHlsJs||e.keySystems&&e.keySystems["com.apple.fps.1_0"]?"":hlsTypeRE.test(e.type)&&hlsExtRE.test(e.src)?"probably":hlsExtRE.test(e.src)?"maybe":""},handleSource:function(e,t,n){return t.hlsProvider?(t.hlsProvider.dispose(),t.hlsProvider=null):n.hlsConfig&&!1===n.hlsConfig.autoStartLoad&&t.on("play",function(){this.player().hasStarted()||this.hlsProvider.hls.startLoad()}),t.hlsProvider=new Html5HlsJS(e,t,n),t.hlsProvider},canPlayType:function(e){return hlsTypeRE.test(e)?"probably":""}};TCPlayer.mountHlsProvider=mountHlsProvider,mountHlsProvider();var Html5DashJS=function(){function e(t,n,r){var i=this;classCallCheck(this,e);var o=function(){var o=window_1.dashjs;if(i.dashjs=o,r=r||n.options_,i.player=videojs(r.playerId),i.player.dash=i.player.dash||{},i.tech_=n,i.el_=n.el(),i.elParent_=i.el_.parentNode,i.hasFiniteDuration_=!1,t.src){n.isReady_=!1,e.updateSourceData&&(videojs.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),t=e.updateSourceData(t)),e.hooks("updatesource").forEach(function(e){t=e(t)});var a=t.src;i.keySystemOptions_=e.buildDashJSProtData(t.keySystemOptions||t.keySystems),i.player.dash.mediaPlayer=o.MediaPlayer().create(),i.mediaPlayer_=i.player.dash.mediaPlayer,
22
+ e.useVideoJSDebug&&(videojs.log.warn('useVideoJSDebug has been deprecated. Please switch to using hook("beforeinitialize", callback).'),e.useVideoJSDebug(i.mediaPlayer_)),e.beforeInitialize&&(videojs.log.warn('beforeInitialize has been deprecated. Please switch to using hook("beforeinitialize", callback).'),e.beforeInitialize(i.player,i.mediaPlayer_)),e.hooks("beforeinitialize").forEach(function(e){e(i.player,i.mediaPlayer_)}),i.mediaPlayer_.initialize(),i.retriggerError_=function(e){if("capability"===e.error&&"mediasource"===e.event)i.player.error({code:4,message:"The media cannot be played because it requires a feature that your browser does not support."});else if("manifestError"!==e.error||"createParser"!==e.event.id&&"codec"!==e.event.id&&"nostreams"!==e.event.id&&"nostreamscomposed"!==e.event.id&&"parse"!==e.event.id&&"multiplexedrep"!==e.event.id)if("mediasource"===e.error)e.event.match("MEDIA_ERR_ABORTED")?i.player.error({code:1,message:e.event}):e.event.match("MEDIA_ERR_NETWORK")?i.player.error({code:2,message:e.event}):e.event.match("MEDIA_ERR_DECODE")?i.player.error({code:3,message:e.event}):e.event.match("MEDIA_ERR_SRC_NOT_SUPPORTED")?i.player.error({code:4,message:e.event}):e.event.match("MEDIA_ERR_ENCRYPTED")?i.player.error({code:5,message:e.event}):(e.event.match("UNKNOWN"),i.player.error({code:4,message:e.event}));else if("capability"===e.error&&"encryptedmedia"===e.event)i.player.error({code:5,message:"The media cannot be played because it requires encryption features that your browser does not support."});else if("key_session"===e.error)i.player.error({code:5,message:e.event});else if("download"===e.error)i.player.error({code:2,message:"The media playback was aborted because too many consecutive download errors occurred."});else{if("mssError"!==e.error)return;i.player.error({code:3,message:e.event})}else i.player.error({code:4,message:e.event.message});setTimeout(function(){i.mediaPlayer_.reset()},10)},i.mediaPlayer_.on(o.MediaPlayer.events.ERROR,i.retriggerError_),i.getDuration_=function(e){var t=e.data.Period_asArray,n=i.hasFiniteDuration_;e.data.mediaPresentationDuration||t[t.length-1].duration?i.hasFiniteDuration_=!0:i.hasFiniteDuration_=!1,i.hasFiniteDuration_!==n&&i.player.trigger("durationchange")},i.mediaPlayer_.on(o.MediaPlayer.events.MANIFEST_LOADED,i.getDuration_),i.mediaPlayer_.on(o.MediaPlayer.events.STREAM_INITIALIZED,videojs.bind(i,i.onMetaData)),i.currentQuality={video:"",audio:""},Object.keys(o.MediaPlayer.events).forEach(function(e){i.mediaPlayer_.on(o.MediaPlayer.events[e],videojs.bind(i,i.onEvent))}),r.dashConfig&&Object.keys(r.dashConfig).forEach(function(e){var t,n="set"+e.charAt(0).toUpperCase()+e.slice(1),o=r.dashConfig[e];if(i.mediaPlayer_.hasOwnProperty(n)&&(videojs.log.warn("Using dash options in videojs-contrib-dash without the set prefix has been deprecated. Change '"+e+"' to '"+n+"'"),e=n),!i.mediaPlayer_.hasOwnProperty(e))return void videojs.log.warn("Warning: dash configuration option unrecognized: "+e);Array.isArray(o)||(o=[o]),(t=i.mediaPlayer_)[e].apply(t,o)}),i.mediaPlayer_.attachView(i.el_),i.mediaPlayer_.setAutoPlay(!1),setupAudioTracks.call(null,i.player,n),setupTextTracks.call(null,i.player,n,r),i.mediaPlayer_.setProtectionData(i.keySystemOptions_),i.mediaPlayer_.attachSource(a),i.tech_.triggerReady()}};window_1.dashjs?o():loadScript(DASH_PATH,function(){o()})}return e.buildDashJSProtData=function(e){var t={};if(!e)return null;if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n],i=videojs.mergeOptions({},r.options);i.licenseUrl&&(i.serverURL=i.licenseUrl,delete i.licenseUrl),t[r.name]=i}else t=e;return t},e.prototype.dispose=function(){var e=this;this.mediaPlayer_&&(this.mediaPlayer_.off(this.dashjs.MediaPlayer.events.ERROR,this.retriggerError_),this.mediaPlayer_.off(this.dashjs.MediaPlayer.events.MANIFEST_LOADED,this.getDuration_),Object.keys(this.dashjs.MediaPlayer.events).forEach(function(t){e.mediaPlayer_.off(e.dashjs.MediaPlayer.events[t],videojs.bind(e,e.onEvent))}),this.mediaPlayer_.reset()),this.player.dash&&delete this.player.dash},e.prototype.duration=function(){return this.mediaPlayer_?this.mediaPlayer_.isDynamic()&&!this.hasFiniteDuration_?Infinity:this.mediaPlayer_.duration():0},e.hooks=function(t,n){return e.hooks_[t]=e.hooks_[t]||[],n&&(e.hooks_[t]=e.hooks_[t].concat(n)),e.hooks_[t]},e.hook=function(t,n){e.hooks(t,n)},e.removeHook=function(t,n){var r=e.hooks(t).indexOf(n);return-1!==r&&(e.hooks_[t]=e.hooks_[t].slice(),e.hooks_[t].splice(r,1),!0)},e.prototype.onMetaData=function(e){var t=this,n=this.mediaPlayer_,r=n.getBitrateInfoListFor("video"),i=n.getSettings(),o=i.streaming.abr.autoSwitchBitrate.video,a=[];if(r.length>0){a.push({id:-1,label:"auto",selected:o}),r.forEach(function(e,n){a.push({id:n,label:t.getLevelLabel(e),selected:!o&&t.currentQuality.video===n})});var s={qualityData:{video:a},callbacks:{video:videojs.bind(this,this.switchQuality)}};this.tech_.setTimeout(function(){this.trigger({type:"masterplaylistchange",data:s})},1)}},e.prototype.switchQuality=function(e){var t=this.mediaPlayer_;-1===e.id?t.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):e.id!=this.currentQuality[e.trackType]&&(t.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),t.setQualityFor(e.trackType,e.id))},e.prototype.getLevelLabel=function(e){return e.height?e.height+"p":e.width?Math.round(9*e.width/16)+"p":e.bitrate?e.bitrate/1e3+"kbps":0},e.prototype.onEvent=function(e){switch(this.tech_.trigger({type:"dash_"+e.type,data:e}),e.type){case this.dashjs.MediaPlayer.events.QUALITY_CHANGE_REQUESTED:this.tech_.trigger({type:"dashqualityswitching",data:e});break;case this.dashjs.MediaPlayer.events.QUALITY_CHANGE_RENDERED:this.tech_.trigger({type:"dashqualityswitched",data:e}),this.currentQuality[e.mediaType]=e.newQuality}},e}();Html5DashJS.hooks_={};var canHandleKeySystems=function(e){e=JSON.parse(JSON.stringify(e)),Html5DashJS.updateSourceData&&(videojs.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),e=Html5DashJS.updateSourceData(e)),Html5DashJS.hooks("updatesource").forEach(function(t){e=t(e)});var t=document_1.createElement("video");return!(e.keySystemOptions&&!window_1.navigator.requestMediaKeySystemAccess&&!t.msSetMediaKeys)};videojs.DashSourceHandler=function(){return{name:"dashSourceHandler",canHandleSource:function(e){var t=/\.mpd/i;return canHandleKeySystems(e)?videojs.DashSourceHandler.canPlayType(e.type)?"probably":t.test(e.src)?"maybe":"":""},handleSource:function(e,t,n){return new Html5DashJS(e,t,n)},canPlayType:function(e){return videojs.DashSourceHandler.canPlayType(e)}}},videojs.DashSourceHandler.canPlayType=function(e){return/^application\/dash\+xml/i.test(e)?"probably":""},TCPlayer.mountDashProvider=mountDashProvider,mountDashProvider(),videojs.Html5DashJS=Html5DashJS;var Component$6=videojs.getComponent("Component"),hlsOption=["fileID","requestID","mediaType","mimeType","provider","resolution","rate","frames","buffer","connectionSpeed"],mp4Option=["fileID","requestID","mediaType","mimeType","resolution","rate","buffer"],dashOption=["fileID","requestID","mediaType","mimeType","resolution","rate","buffer","provider","connectionSpeed"],infoOption=["info"],VideoStatisticWrapper=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.nodelist={},i.status={fileID:"",requestID:"",mediaType:"",mimeType:"",provider:"",resolution:"",rate:"",frames:"",buffer:"",connectionSpeed:"",info:""},n.on("playcgiend",function(){clearTimeout(i.timeoutID),Object.keys(i.status).forEach(function(e){i.nodelist[e].reset()})}),n.on("statistic",videojs.bind(i,function(e){"open"===e.data.action?i.tick():i.clearTimeout(i.timeoutID)})),i.init(),i}return inherits(t,e),t.prototype.tick=function(){var e=this;this.timeoutID=setTimeout(videojs.bind(this,function(){e.tick()}),1e3),this.updatePanel()},t.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-statistic-wrapper"})},t.prototype.init=function(){var e=this;Object.keys(this.status).forEach(function(t){var n=new VideoTextItem(e,{key:t,data:e.status[t]});e.nodelist[t]=n,e.addChild(n)})},t.prototype.updatePanel=function(){var e=this;if("Html5"===this.player().techName_)switch(this.getStatus(),this.status.mediaType){case"m3u8":hlsOption.forEach(function(t){e.nodelist[t].updateContent(e.status[t])});break;case"mp4":mp4Option.forEach(function(t){e.nodelist[t].updateContent(e.status[t])});break;case"mpd":dashOption.forEach(function(t){e.nodelist[t].updateContent(e.status[t])})}else"Flash"===this.player().techName_&&(this.getFlashStatus(),infoOption.forEach(function(t){"info"===t&&e.nodelist[t].updateContent(e.status[t])}))},t.prototype.getStatus=function(){this.getFileID(),this.getRequestID(),this.getMediaType(),this.getMIMEType(),this.getResolution(),this.getRate(),this.getProvider(),this.getBuffer(),"m3u8"===this.status.mediaType&&(this.getFrames(),this.getConnectionSpeed()),"mpd"===this.status.mediaType&&this.getConnectionSpeed()},t.prototype.getFlashStatus=function(){this.status.mediaType="flash",this.getSupport()},t.prototype.getFileID=function(){var e=this.player().options_.fileID||"";return this.status.fileID=e,e},t.prototype.getRequestID=function(){var e=this.player().PlayerMetrics().playStatus;if(e){var t=e.requestID;return this.status.requestID=t,t}},t.prototype.getMediaType=function(){this.player_.src()&&/\/(.+)\.(.+)\?|\/(.+)\.(.+)/.test(this.player_.src());var e=RegExp.$2||RegExp.$4||"";return this.status.mediaType=e,e},t.prototype.getMIMEType=function(){var e=this.player().src(),t=EXT_MIME[getFileExtension(e)]||"";return this.status.mimeType=t,t},t.prototype.getResolution=function(){var e=this.player_.tech_.el_.videoHeight||0,t=this.player_.tech_.el_.videoWidth||0,n=t+" x "+e;return this.status.resolution=n,n},t.prototype.getRate=function(){var e=this.player().playbackRate()||1;return this.status.rate=e+"x",e},t.prototype.getBuffer=function(){var e=this.player_.bufferedEnd().toFixed(1)||0,t=this.player_.duration().toFixed(1)||0,n=(e/t*100).toFixed(1)+"%",r=e+" / "+t+" ("+n+")";return this.status.buffer=r,r},t.prototype.getSupport=function(){var e=void 0;return e="m3u8"!==this.status.mediaType&&"mp4"!==this.status.mediaType&&"dash"!==this.status.mediaType?"视频统计功能不支持当前视频格式":"",this.status.info=e,e},t.prototype.getProvider=function(){var e=this.player_.tech_.sourceHandler_;return e instanceof Html5HlsJS?(this.status.provider="HlsJS","HlsJS"):e instanceof Html5DashJS?(this.status.provider="DashJS","DashJS"):""},t.prototype.getFrames=function(){var e=this.player_.getVideoPlaybackQuality(),t=(e.droppedVideoFrames||0)+" dropped of "+(e.totalVideoFrames||0);return this.status.frames=t,t},t.prototype.getConnectionSpeed=function(){var e=void 0;if("m3u8"===this.status.mediaType){var t=this.player_.tech_.hlsProvider.hls.abrController._bwEstimator;e=t&&t.getEstimate()?(125e-6*t.getEstimate()).toFixed(0)+"KB/s":"0KB/s",this.status.connectionSpeed=e}if("mpd"===this.status.mediaType){var n=this.player_.dash.mediaPlayer,r=n.getDashMetrics(),i=n.getDashAdapter(),o=n.getActiveStream().getStreamInfo(),a=o.index,s=r.getCurrentRepresentationSwitch("video").to,c=i.getBandwidthForRepresentation(s,a);e=c?(125e-6*c).toFixed(0)+"KB/s":"0KB/s",this.status.connectionSpeed=e}return e},t}(Component$6);videojs.registerComponent("VideoStatisticWrapper",VideoStatisticWrapper);var Component$5=videojs.getComponent("Component"),VideoStatisticPanel=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return n.on("statistic",videojs.bind(i,function(e){"open"===e.data.action?i.show():i.hide()})),n.on("playcgistart",function(){n.trigger({type:"statistic",data:{action:"close"}})}),i.init(),i}return inherits(t,e),t.prototype.createEl=function(){var e=this,t=videojs.dom.createEl("div",{className:"tcp-statistic vjs-hidden"}),n=videojs.dom.createEl("div",{className:"tcp-statistic-close",innerText:"[X]"});return n.addEventListener("click",function(){e.hide(),e.player().trigger({type:"statistic",data:{action:"close"}})}),t.appendChild(n),t},t.prototype.init=function(){this.addChild("VideoStatisticWrapper")},t.prototype.show=function(){e.prototype.show.call(this),this.popped=!0},t.prototype.hide=function(){e.prototype.hide.call(this),this.popped=!1},t}(Component$5);videojs.registerComponent("VideoStatisticPanel",VideoStatisticPanel);var MenuItem$3=videojs.getComponent("MenuItem"),MirrorMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.addClass("tc-menu-list"),i.open=!1,i.hasOpen=!1,i.player=n,i.setup(),i}return inherits(t,e),t.prototype.setup=function(){var e=this;this.on(["tap","click"],function(){var t=e.player.tech().el();e.hasOpen||(window.MtaH5&&MtaH5.clickStat("mirror",{appid:e.player.options_.appID,fileid:e.player.options_.fileID}),e.player.trigger({type:"feature",data:"mirror"})),e.open?(videojs.dom.removeClass(t,"tcp-mirror"),videojs.dom.removeClass(e.el_,"tcp-menu-item-select")):(videojs.dom.addClass(t,"tcp-mirror"),videojs.dom.addClass(e.el_,"tcp-menu-item-select"),e.hasOpen=!0),e.open=!e.open})},t}(MenuItem$3);videojs.registerComponent("MirrorMenuItem",MirrorMenuItem);var MenuItem$4=videojs.getComponent("MenuItem"),PoweredByMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.addClass("tc-menu-list"),i}return inherits(t,e),t}(MenuItem$4);videojs.registerComponent("PoweredByMenuItem",PoweredByMenuItem);var MenuItem$5=videojs.getComponent("MenuItem"),StatusMenuItem=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.addClass("tc-menu-list"),i.hasOpen=!1,i.player=n,n.on("statistic",videojs.bind(i,function(e){"close"===e.data.action&&(videojs.dom.removeClass(i.el_,"tcp-menu-item-select"),i.hasOpen=!1)})),i.setup(),i}return inherits(t,e),t.prototype.setup=function(){var e=this;this.on(["tap","click"],function(){e.hasOpen?(videojs.dom.removeClass(e.el_,"tcp-menu-item-select"),e.player.trigger({type:"statistic",data:{action:"close"}}),e.hasOpen=!1):(videojs.dom.addClass(e.el_,"tcp-menu-item-select"),e.player.trigger({type:"statistic",data:{action:"open"}}),e.hasOpen=!0,window.MtaH5&&MtaH5.clickStat("mirror",{appid:e.player.options_.appID,fileid:e.player.options_.fileID}),e.player.trigger({type:"feature",data:"statistic"}))})},t}(MenuItem$5);videojs.registerComponent("StatusMenuItem",StatusMenuItem);var Component$8=videojs.getComponent("Component"),Menu$2=videojs.getComponent("Menu"),MenuItem$2=videojs.getComponent("MenuItem"),RightClickPopupMenu=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));i.hide(),i.addChild("PoweredByMenuItem",{label:"Powered by Tencent Cloud."}),!r.statistic||IS_IOS||IS_ANDROID||i.addChild("StatusMenuItem",{label:"Video statistic"}),r.mirror&&i.addChild("MirrorMenuItem",{label:"Mirror"}),n.on("contextmenu",videojs.bind(i,i.onContextmenu)),n.on(["tap","click"],videojs.bind(i,function(e){if(this.popped)return this.hide(),e.stopPropagation(),e.preventDefault(),!1})),videojs.on(document,["tap","click"],videojs.bind(i,function(e){this.popped&&this.hide()}));var o=i;return i.children().forEach(function(e){e.on(["tap","click"],function(){o.hide()})}),i}return inherits(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return videojs.dom.addClass(t,"tcp-right-click-popup-menu"),t},t.prototype.show=function(){e.prototype.show.call(this),this.popped=!0},t.prototype.hide=function(){e.prototype.hide.call(this),this.popped=!1},t.prototype.onContextmenu=function(e){e.preventDefault(),this.show();var t=this.el(),n=e.clientX,r=e.clientY,i=getViewportSize(),o=i.width,a=i.height,s=n+t.offsetWidth-o+5;s=Math.max(0,s);var c=r+t.offsetHeight-a+5;c=Math.max(0,c);var l=this.player().el().getBoundingClientRect();t.style.left=Math.max(0,n-l.left-s)+"px",t.style.top=Math.max(0,r-l.top-c)+"px"},t}(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(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.duration=0,i.registerListener(),i}return inherits(t,e),t.prototype.registerListener=function(){this.player_.one("canplay",videojs.bind(this,this.resetDotsElement))},t.prototype.resetDotsElement=function(){var e=this.player_;this.duration=e.duration(),dom.emptyEl(this.el_),this.resetEl()},t.prototype.resetEl=function(){this.setUpEl()},t.prototype.dotMouseLeave=function(){var e=event.currentTarget,t=e.getAttribute("container-id");this.getChildById(t).hide()},t.prototype.dotHover=function(){var e=event.currentTarget.parentElement.offsetWidth,t=event.currentTarget.offsetLeft+COMMENT_WIDTH,n=this.getChildById(event.currentTarget.getAttribute("container-id")),r=n.getAttribute("class").search("tcp-without-gif")>=0,i=n.el_.querySelector(".tcp-triangle-both")||n.el_.querySelector(".tcp-triangle");t>e?r?(n.el_.style.left=COMMENT_SHOW_ON_THE_LEFT.POPUP_CONTAINER_OFFSET_WITHOUTGIT+"px",i.style.left=COMMENT_SHOW_ON_THE_LEFT.TRIANGLE_OFFEST_WITHOUTGIF+"%"):(n.el_.style.left=COMMENT_SHOW_ON_THE_LEFT.POPUP_CONTAINER_OFFSET+"px",i.style.left=COMMENT_SHOW_ON_THE_LEFT.TRIANGLE_OFFEST+"%"):event.currentTarget.offsetLeft<=COMMENT_WIDTH&&!r&&(n.el_.style.left=COMMENT_SHOW_ON_THE_RIGHT.POPUP_CONTAINER_OFFSET+"px",i.style.left=COMMENT_SHOW_ON_THE_RIGHT.TRIANGLE_OFFEST+"px");var o=n.getChild("DotImage");if(o){var a=o.el_.getElementsByClassName("tcp-dot-timestamp")[0],s=event.currentTarget.getAttribute("dotinsecond"),c=formatTime$2(s);a.innerHTML=c}n.show()},t.prototype.setChildInTheContainer=function(e,t){var n=e.content&&""!==e.content?decodeURIComponent(e.content.replace(/\+/g," ")):"";if(""!==n){var r=t.addChild("DotComment");r.el_.innerHTML=encodeHTML(n)}if(e.img){t.el_.querySelector(".tcp-triangle").setAttribute("class","tcp-triangle-both");var i=t.addChild("DotImage");if(i.el_.firstChild.setAttribute("src",e.img),""==n)t.addClass("tcp-only-gif"),i.el_.firstChild.className="tcp-image-in-container-only-image";else{this.countContentSize(n)<=20&&(t.addClass("tcp-single-line"),r.el_.style.height=COMMENT_HEIGHT_SINGLE_LINE+"px")}}else if(""!==n){var o=this.countContentSize(n);o<=14?t.addClass("tcp-single-line"):o<=28&&t.addClass("tcp-two-lines"),t.addClass("tcp-without-gif"),r.addClass("tcp-large-comment")}},t.prototype.markSetUp=function(e){var t=e.timeOffset>0?e.timeOffset/1e3:0,n=this.duration?this.duration:0;if(!("number"!=typeof t||t>n)){var r=document.createElement("div");r.className="tcp-dot-basic-style",r.setAttribute("dotinsecond",t.toString()),e["class"]&&(r.className+=" "+e["class"]);var i=this.addChild("PopUpContainer");return r.setAttribute("container-id",i.id_),this.setChildInTheContainer(e,i),r.appendChild(i.el_),r.style.left=t/n*100+"%",r.addEventListener("mouseover",videojs.bind(this,this.dotHover)),r.addEventListener("mouseleave",videojs.bind(this,this.dotMouseLeave)),r}},t.prototype.setUpEl=function(){var t=this,n=this.player_.options_.dots||0,r=this.el_||e.prototype.createEl.call(this);return videojs.dom.addClass(r,"tcp-dot-component"),n&&n instanceof Array&&n.length>0&&n.forEach(function(e){var n=e.content||"";if(n&&""!=n||e.img){var i=t.markSetUp(e);i&&r.appendChild(i)}}),r},t.prototype.countContentSize=function(e){for(var t=0,n=e.length,r=-1,i=0;i<n;i++)r=e.charCodeAt(i),t+=r>=0&&r<=128?1:2;return t},t.prototype.createEl=function(){return this.setUpEl()},t}(clickableComponent);videojs.registerComponent("ProgressMarkerGenerator",ProgressMarkerGenerator);var DotComment=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.addClass("tcp-dot-comment"),i}return inherits(t,e),t}(Component$9);videojs.registerComponent("DotComment",DotComment);var DotImage=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));i.addClass("tcp-dot-image");var o=i.el_||e.prototype.createEl.call(i),a=dom.createEl("img");a.className="tcp-image-in-container",o.appendChild(a);var s=dom.createEl("span");return s.className="tcp-dot-timestamp",s.innerHTML="",o.appendChild(s),i}return inherits(t,e),t}(Component$9);videojs.registerComponent("DotImage",DotImage);var PopUpContainer=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));i.addClass("tcp-popup-container");var o=dom.createEl("div");return o.setAttribute("class","tcp-triangle"),i.el_.appendChild(o),i.hide(),i}return inherits(t,e),t}(TimeTooltip$2);videojs.registerComponent("PopUpContainer",PopUpContainer);var Plugin$2=videojs.getPlugin("plugin"),SpeedUp=function(e){function t(n){classCallCheck(this,t);var r=possibleConstructorReturn(this,e.call(this,n));return r.TARGET_LANTENCY=1,r.MAX_LATENCY=3,r.RATEVALUE=1.1,n.ready(videojs.bind(r,r.init)),r}return inherits(t,e),t.prototype.checkLatency=function(){var e=this.player.bufferedEnd()-this.player.currentTime();e>this.MAX_LATENCY&&this.player.playbackRate(this.RATEVALUE),e<this.TARGET_LANTENCY&&this.player.playbackRate(1)},t.prototype.init=function(){var e=this,t=this.player,n=void 0;t.on("playing",function(){t.duration()===Infinity&&(n=setInterval(e.checkLatency.bind(e),1e3))}),t.on("waiting",function(){e.reset(n)}),t.on("pause",function(){e.reset(n)})},t.prototype.reset=function(e){this.player.playbackRate(1),clearInterval(e)},t}(Plugin$2);videojs.registerPlugin("SpeedUp",SpeedUp);var Button$3=videojs.getComponent("Button"),BigPlayButton$2=videojs.getComponent("BigPlayButton");BigPlayButton$2.prototype.createEl=function(){var e=Button$3.prototype.createEl.call(this),t=getTemplate();return(this.options_.shapeType||this.options_.styleType)&&(t=getTemplate(this.options_.shapeType,this.options_.styleType)),e.appendChild(videojs.dom.createEl("div",{className:"vjs-button-icon",innerHTML:t})),e},BigPlayButton$2.prototype.controlText_="Play";var Component$10=videojs.getComponent("Component"),VideoStatisticWrapper$1=videojs.getComponent("VideoStatisticWrapper"),LoadingSpinner$2=videojs.getComponent("LoadingSpinner");LoadingSpinner$2.prototype.createEl=function(){function e(e,t){var n=new VideoStatisticWrapper$1(e);if(n.getMediaType(),(n.getBuffer()||"").indexOf("100.0%")>-1)return t.innerText="",!1;t.innerText=n.getConnectionSpeed()}var t=this,n=Component$10.prototype.createEl.call(this,"div",{className:"tcp-loading-spinner",dir:"ltr"});if(!this.player_.options_.loadingSpeed)return n;var r=null;return this.player_.on("waiting",function(){r=setInterval(function(){e(t.player_,n)},100)}),this.player_.on("timeupdate",function(){r&&clearInterval(r)}),n};var Plugin$3=videojs.getPlugin("plugin"),log$3=videojs.log,Skin=function(e){function t(n,r){classCallCheck(this,t),log$3("Skin initializing");var i=possibleConstructorReturn(this,e.call(this,n));return i.player.addClass("tcp-skin"),log$3("Skin initialized"),i}return inherits(t,e),t}(Plugin$3);videojs.registerPlugin("Skin",Skin);var Plugin$4=videojs.getPlugin("plugin"),log$4=videojs.log,VID=function(e){function t(n,r){classCallCheck(this,t),log$4("VID initializing");var i=possibleConstructorReturn(this,e.call(this,n));return i.init(i.player.options_),log$4("VID initialized"),i}return inherits(t,e),t.prototype.init=function(e){var t=(this.player,e.sources);e&&e.appID&&e.fileID||e.plugins.DRM&&0==t.length?e.children.splice(0,"mediaLoader"==e.children[0]?1:0,"mediaAsyncLoader"):"mediaLoader"!=e.children[0]&&e.children.unshift("mediaLoader")},t}(Plugin$4);videojs.registerPlugin("VID",VID);var now=function(){return _root.Date.now()},now_1=now,reWhitespace=/\s/,_trimmedEndIndex=trimmedEndIndex,reTrimStart=/^\s+/,_baseTrim=baseTrim,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt,toNumber_1=toNumber,FUNC_ERROR_TEXT$2="Expected a function",nativeMax=Math.max,nativeMin=Math.min,debounce_1=debounce,FUNC_ERROR_TEXT$1="Expected a function",throttle_1=throttle$1,Component$11=videojs.getComponent("Component"),DvrProgressControl=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.on("mousemove",i.handleMouseMove),i.on("mouseup",i.handleMouseUp),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control tcp-dvr-progress-control"})},t.prototype.update=function(e){this.getChild("DvrSeekBar").update(e)},t.prototype.handleMouseMove=function(e){var t=this.getChild("DvrSeekBar"),n=t.calculateDistance(e),r=t.getChild("DvrMouseTimeDisplay");r&&r.update(videojs.dom.getBoundingClientRect(t.el()),n)},t.prototype.handleMouseUp=function(e){this.getChild("DvrSeekBar").handleMouseUp(e)},t}(Component$11);DvrProgressControl.prototype.options_={children:["DvrSeekBar"]},videojs.registerComponent("DvrProgressControl",DvrProgressControl);var Slider$2=videojs.getComponent("Slider"),DvrSeekBar=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.percent_=1,i.update=throttle_1(videojs.bind(i,i.update),50),i.on(n,"seekToLive",videojs.bind(i,function(e){this.update(e.data)})),i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update=function(e){e!=undefined&&(this.percent_=e,this.bar.update(videojs.dom.getBoundingClientRect(this.el_),e),this.updateAriaAttributes(e))},t.prototype.handleMouseDown=function(t){e.prototype.handleMouseDown.call(this,t),this.isMouseDown=!0},t.prototype.handleMouseMove=function(e){var t=this.calculateDistance(e);this.update(t)},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this);var n=this.calculateDistance(t);this.update(n),this.player().Dvr().timeShift(n)},t.prototype.stepBack=function(){},t.prototype.stepForward=function(){},t.prototype.updateAriaAttributes=function(e){this.el().setAttribute("aria-valuenow",(100*e).toFixed(2))},t.prototype.getPercent=function(){return this.percent_},t}(Slider$2);DvrSeekBar.prototype.options_={children:["DvrMouseTimeDisplay","DvrTimeShiftBar"],barName:"DvrTimeShiftBar"},videojs.registerComponent("DvrSeekBar",DvrSeekBar);var DvrTimeShiftBar=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.el_.style.width="100%",i}return inherits(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar tcp-dvr-time-shift",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 100%</span>"})},t.prototype.update=function(e,t){var n=(100*t).toFixed(2)+"%";this.el_.style.width=n},t}(Component$11);videojs.registerComponent("DvrTimeShiftBar",DvrTimeShiftBar);var MouseTimeDisplay$2=videojs.getComponent("MouseTimeDisplay"),DvrMouseTimeDisplay=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.update=function(e,t){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=n.player().Dvr().dvrData.maxTimeShift,i=videojs.formatTime((1-t)*r,r);n.el_.style.left=e.width*t+"px",n.getChild("timeTooltip").update(e,t,i)})},t}(MouseTimeDisplay$2);videojs.registerComponent("DvrMouseTimeDisplay",DvrMouseTimeDisplay);var Button$4=videojs.getComponent("Button"),LiveButton=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){var e=Button$4.prototype.createEl.call(this,"button",{className:"vjs-live-control vjs-control"});return this.contentEl_=videojs.dom.createEl("div",{className:"vjs-live-display",innerHTML:this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},t.prototype.update=function(){},t.prototype.updateControlText=function(e){this.controlText(e?"直播中":"返回直播")},t.prototype.handleClick=function(e){this.player().Dvr().seekToLive()},t}(Button$4);LiveButton.prototype.controlText_="返回直播",videojs.registerComponent("LiveButton",LiveButton);var Plugin$5=videojs.getPlugin("plugin"),Dvr=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));i.isInit=!1,i.options=r;var o=i;return n.ready(function(){var e=n.tech(!0),t=e&&e.hlsProvider;if(t&&t.Hls){var r=t.Hls;e.one(r.Events.MANIFEST_LOADED,function(e){}),e.one(r.Events.LEVEL_LOADED,function(e){}),n.one("loadedmetadata",function(t){e.el_.setAttribute("poster",""),o.init(),o.options.liveURL&&o.seekToLive()})}}),i}return inherits(t,e),t.prototype.init=function(){var e=this.player,t=e.tech(!0).hlsProvider;if(this.parseM3u8(t.manifests[0]),!this.dvrData.startTime&&!this.isInit)return void e.one("loadedmetadata",videojs.bind(this,function(e){this.init()}));this.initControl(),this.delay=getParams("delay",e.tech_.currentSource_.src)||0,this.updateControl(!this.isLive()),e.on("loadedmetadata",videojs.bind(this,function(){this.parseM3u8(t.manifests[0]),this.delay=getParams("delay",e.tech_.currentSource_.src)||0,this.updateControl()})),this.isInit=!0},t.prototype.initControl=function(){var e=this.player;e.addClass("vjs-dvr"),e.controlBar.getChild("ProgressControl").hide(),e.controlBar.getChild("LiveDisplay").hide(),e.controlBar.addChild("DvrProgressControl",{},5),e.controlBar.addChild("liveButton",{},6)},t.prototype.updateControl=function(e){var t=this.player,n=t.controlBar.getChild("ProgressControl"),r=t.controlBar.getChild("LiveDisplay"),i=t.controlBar.getChild("DvrProgressControl"),o=t.controlBar.getChild("LiveButton");t.toggleClass("vjs-dvr-live",this.isLive()),o.updateControlText(this.isLive()),e&&i.update(1-this.delay/this.dvrData.maxTimeShift),this.dvrData.startTime?(i.show(),o.show(),n.hide(),r.hide()):(i.hide(),o.hide(),n.show(),r.show())},t.prototype.seekToLive=function(){this.isLive()||(this.timeShift(1),this.player.trigger({type:"seekToLive",data:1}))},t.prototype.isLive=function(){return!(this.delay>0)},t.prototype.timeShift=function(e){var t=this.player,n=(t.getChild("ControlBar").getChild("LiveButton"),t.tech_.currentSource_),r=Math.floor(this.dvrData.maxTimeShift*(1-e));this.delay=r,0==r&&this.options.liveURL?t.src(this.options.liveURL):(n.src=(this.options.shiftURL||n.src).replace(/delay=*(\d+)/,"delay="+r),t.src(t.tech_.currentSource_.src)),t.bigPlayButton.hide(),t.posterImage.hide(),t.tech_.one("hlsManifestParsed",videojs.bind(this,function(){t.play()}))},t.prototype.parseM3u8=function(e){this.dvrData={};for(var t=new RegExp([/#EXT-TX-TS-START-TIME:*(.+)/.source,/|#EXT-TX-TS-DURATION:*(.+)/.source].join(""),"g"),n=void 0;null!==(n=t.exec(e));)n[1]?this.dvrData.startTime=n[1]:n[2]&&(this.dvrData.duration=n[2]);this.dvrData.startTime&&(this.dvrData.maxTimeShift=Math.min(Math.floor((new Date).getTime()/1e3-this.dvrData.startTime),this.dvrData.duration))},t}(Plugin$5);videojs.registerPlugin("Dvr",Dvr);var Menu$4=videojs.getComponent("Menu"),QualitySwitcherMenu=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.addItem=function(t){e.prototype.addItem.call(this,t)},t
23
+ }(Menu$4),MenuItem$6=videojs.getComponent("MenuItem"),QualitySwitcherMenuItem=function(e){function t(n,r){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.handleClick=function(t){if(e.prototype.handleClick.call(this,t),this.updateItems(),this.options_.callback(this.options_),"video"==this.options_.trackType){var n=this.player().controlBar.getChild(this.options_.trackType+"QualitySwitcherMenuButton");n.updateLabel(this.options_),n.unpressButton()}},t.prototype.updateItems=function(){for(var e=this.player().controlBar.getChild(this.options_.trackType+"QualitySwitcherMenuButton"),t=e.getChild(this.options_.trackType+"QualitySwitcherMenu"),n=t.children(),r=0;r<n.length;r++){var i=n[r];this!==i?(i.selected(!1),i.options_.selected=!1):i.options_.selected=!0}},t}(MenuItem$6),MenuButton$2=videojs.getComponent("MenuButton"),Menu$3=videojs.getComponent("Menu"),QualitySwitcherMenuButton=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=videojs.dom.createEl("div",{className:"tcp-quality-switcher-value",innerHTML:""}),t.appendChild(this.labelEl_),t},t.prototype.createMenu=function(){for(var e=this.options_.qualityList,t=new QualitySwitcherMenu(this.player(),{name:this.options_.trackType+"QualitySwitcherMenu"}),n=void 0,r=e.length-1;r>-1;r--){var i=e[r];n=videojs.mergeOptions(i,{trackType:this.options_.trackType,callback:this.options_.callback,selectable:!0}),t.addItem(new QualitySwitcherMenuItem(this.player(),n)),i.selected&&this.updateLabel(i)}return t},t.prototype.updateLabel=function(e){this.labelEl_.innerHTML="<p>"+this.localize(e.label)+"</p>"},t}(MenuButton$2),Plugin$6=videojs.getPlugin("plugin"),TRACK_TYPES=["video","audio","subtitle"],TRACK_CLASS={video:"tcp-video-quality-switcher",audio:"tcp-audio-quality-switcher",subtitle:"tcp-subtitle-quality-switcher"},log$5=videojs.log,QualitySwitcher=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.options=r,n.on("qualitydataloaded",videojs.bind(i,i.init)),i}return inherits(t,e),t.prototype.init=function(e){log$5("QualitySwitcher initializing",e);var t=this.player,n=e.data.qualityData,r=e.data.callbacks;if(this.setOptions({qualityData:n,callbacks:r}),!t.controlBar)return void log$5("QualitySwitcher can not initialize without control bar");for(var i=0;i<TRACK_TYPES.length;i++){var o=TRACK_TYPES[i],a=o+"QualitySwitcherMenuButton",s=t.controlBar.getChild(a);n[o]&&n[o].length>0&&t.controlBar.options_.QualitySwitcherMenuButton&&(s&&s.el()&&(s.dispose(),t.controlBar.removeChild(s)),this.repleaceLabel(o,n),s=new QualitySwitcherMenuButton(t,{name:a,qualityList:n[o],callback:r[o],trackType:o}),s.addClass(TRACK_CLASS[o]),t.controlBar.addChild(s,{},10))}log$5("QualitySwitcher initialized",e,this)},t.prototype.setOptions=function(e){this.options=videojs.mergeOptions(this.options,e)},t.prototype.setVideoQuality=function(e){if(this.options.qualityData&&this.options.callbacks.video){for(var t=this.options.qualityData.video,n=0;n<t.length;n++)t[n].selected&&(t[n].selected=!1),t[n].id===e.id&&(t[n].selected=!0);this.options.callbacks.video(e)}},t.prototype.getVideoQualityData=function(){return this.options.qualityData?this.options.qualityData.video:undefined},t.prototype.repleaceLabel=function(e,t){if(this.options.qualityLabelList){var n=this.options.qualityLabelList[e],r=t[e];if(r&&r.length>0&&n&&n.length>0)for(var i=0;i<r.length;i++){var o=r[i].label;o=o.slice(0,o.length-1);for(var a=0;a<n.length;a++)if(n[a].height==o){r[i].label=n[a].resolutionName;break}}}},t.prototype.reset=function(){for(var e=this.player,t=0;t<TRACK_TYPES.length;t++){var n=TRACK_TYPES[t],r=e.controlBar&&e.controlBar.getChild(n+"QualitySwitcherMenuButton");r&&r.el()&&(r.dispose(),e.controlBar.removeChild(r))}},t}(Plugin$6);videojs.registerPlugin("QualitySwitcher",QualitySwitcher);var Plugin$7=videojs.getPlugin("plugin"),log$6=videojs.log,defaultOptions={labels:{FLU:"流畅",SD:"标清",HD:"高清",FHD:"超清"},showOrder:["FLU","SD","HD","FHD"],defaultRes:"SD"},MultiResolution=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.options=r,r.useManualOption&&(i.manualOptions=extend({},r)),i.hasInit=!1,n.on("multiresolutionchange",videojs.bind(i,function(e){e.data&&this.update(data)})),n.on(["resolutionswitching","resolutionswitched"],videojs.bind(i,function(e){"resolutionswitching"==e.type?this.player.addClass("tcp-res-switching"):this.player.removeClass("tcp-res-switching")})),n.ready(videojs.bind(i,function(){var e=n.tech(!0);e&&(e.on("masterplaylistchange",videojs.bind(this,this.onMasterPlaylistChange)),e.on("hlsresolutionswitching",videojs.bind(this,this.onHlsLevelChange)),e.on("hlsresolutionswitched",videojs.bind(this,this.onHlsLevelChange)),e.on("dashqualityswitching",videojs.bind(this,this.onDashQualityChange)),e.on("dashqualityswitched",videojs.bind(this,this.onDashQualityChange))),this.hasInit=!0})),i.init(i.player.options_.multiResolution),i}return inherits(t,e),t.prototype.init=function(e){var t={};this.player.options_.label&&(t.label=this.player.options_.label),this.player.options_.labels&&(t.labels=this.player.options_.label),this.player.options_.showOrder&&(t.showOrder=this.player.options_.showOrder),this.player.options_.defaultRes&&(t.defaultRes=this.player.options_.defaultRes);var n=this.player,r=extend({},defaultOptions,e,this.manualOptions,t),i=r&&r.sources;if(this.options=r,i){log$6("MultiResolution initializing",r);var o=void 0;if(this.currentID=r.defaultRes=i[r.defaultRes]?r.defaultRes:Object.keys(i).shift(),o=i[this.currentID],"mediaLoader"!=n.options_.children[0]||this.hasInit)n.src(o);else{var a;(a=n.options_.sources).push.apply(a,o)}this.hasInit||(this.hasInit=!0),n.ready(videojs.bind(this,function(){n.trigger({type:"qualitydataloaded",data:this.initQualityData(r)}),n.one("loadedmetadata",function(){var e=this.tech(!0);"flash"!=e.name_&&e.el_.getAttribute("poster")&&(e.el_.removeAttribute("poster"),delete e.el_.poster)})})),log$6("MultiResolution initialized")}},t.prototype.reset=function(){this.player.QualitySwitcher().reset()},t.prototype.update=function(e){this.init(e)},t.prototype.store=function(e){if(!e)return this.options;this.options=videojs.mergeOptions(defaultOptions,this.options,e)},t.prototype.onMasterPlaylistChange=function(e){this.player.trigger({type:"qualitydataloaded",data:e.data})},t.prototype.onHlsLevelChange=function(e){"hlsresolutionswitching"==e.type?this.player.trigger({type:"resolutionswitching",data:e.data}):"hlsresolutionswitched"==e.type&&this.player.trigger({type:"resolutionswitched",data:e.data})},t.prototype.onDashQualityChange=function(e){"dashqualityswitching"==e.type?this.player.trigger({type:"resolutionswitching",data:e.data}):"dashqualityswitched"==e.type&&this.player.trigger({type:"resolutionswitched",data:e.data})},t.prototype.switchResolution=function(e){if(this.currentID!=e.id){var t=this.player,n=t.currentTime(),r=(t.paused(),Infinity===t.duration());if(t.trigger({type:"resolutionswitching",data:e}),r)t.bigPlayButton&&t.bigPlayButton.hide(),t.posterImage&&t.posterImage.hide(),t.one("loadstart",function(){t.play(),t.trigger({type:"resolutionswitched",data:e})});else{var i=t.ended(),o=t.playbackRate(),a=t.controlBar&&t.controlBar.progressControl&&t.controlBar.progressControl.seekBar.playProgressBar.el().style.width||0,s=videojs.browser.IS_IOS||videojs.browser.IS_ANDROID?"loadeddata":"loadedmetadata";t.one(s,function(){t.controlBar&&t.controlBar.progressControl&&(t.controlBar.progressControl.seekBar.playProgressBar.el().style.width=a),i||t.currentTime(n),"Flash"==t.techName_?(t.play(),t.tech(!0).trigger("seeked")):(t.play(),t.playbackRate()!=o&&t.playbackRate(o)),t.trigger({type:"resolutionswitched",data:e})}),t.bigPlayButton&&t.bigPlayButton.hide(),t.posterImage&&t.posterImage.hide(),"none"==t.options_.preload&&t.one("suspend",function(){t.load()})}t.src(this.options.sources[e.id]),r&&setTimeout(function(){t.play(),setTimeout(function(){t.play()},900)},100),this.currentID=e.id}},t.prototype.initQualityData=function(e){var t=[],n=(e.sources,e.labels),r=e.showOrder;return r.length>0&&r.forEach(function(r,i){var o={};o.id=r,o.selected=e.defaultRes===r,o.label=n[r]||r,t.push(o)}),{qualityData:{video:t},callbacks:{video:videojs.bind(this,this.switchResolution)}}},t.prototype.sortSourceOrder=function(e){return[]},t}(Plugin$7);videojs.registerPlugin("MultiResolution",MultiResolution);var FlashObj=videojs.getComponent("Flash"),defaultDismiss=!videojs.browser.IS_IPHONE,registerPlugin=videojs.registerPlugin||videojs.plugin,defaults$1={header:"",code:"",message:"",timeout:45e3,dismiss:defaultDismiss,progressDisabled:!1,errors:{1:{type:"MEDIA_ERR_ABORTED"},2:{type:"MEDIA_ERR_NETWORK"},3:{type:"MEDIA_ERR_DECODE"},4:{type:"MEDIA_ERR_SRC_NOT_SUPPORTED"},5:{type:"MEDIA_ERR_ENCRYPTED"},unknown:{type:"MEDIA_ERR_UNKNOWN"},"-1":{type:"PLAYER_ERR_NO_SRC",message:"No video has been loaded."},"-2":{type:"PLAYER_ERR_TIMEOUT",message:"Could not download the video."},10:{type:"SERVER_ERR",message:"Request timed out."},11:{type:"SERVER_ERR",message:"Server is not respond."},12:{type:"DATA_ERR",message:"Server respond error data."},13:{type:"DATA_ERR",message:"No video transcoding information found."},14:{type:"HLS_NETWORK_ERR",message:"A network error caused the media download to fail part-way."},15:{type:"HLS_MEDIA_ERR",message:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support."},16:{type:"HLS_MUX_ERR",message:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support."},17:{type:"HLS_OTHER_ERR",message:"Rise an internal exception when playing HLS."},18:{type:"DRM_ERR",message:"Current browser not support DRM."},20:{type:"PERMISSION_ERR",message:"This website needs a permission to access device motion."},21:{type:"PERMISSION_ERR",message:"This website needs a permission to access device motion."},50:{type:"LICENSE_ERR",message:"License verification failed."},51:{type:"LICENSE_ERR",message:"The license has expired."},52:{type:"LICENSE_ERR",message:"Domain verification failed."},53:{type:"LICENSE_ERR",message:"Time verification failed."},54:{type:"LICENSE_ERR",message:"License type error."},55:{type:"LICENSE_ERR",message:"Lack license url."},56:{type:"LICENSE_ERR",message:"Get license data failed."},60:{type:"SAFECHECK_ERR",message:"Elements check failed."},61:{type:"SAFECHECK_ERR",message:"API check failed."},62:{type:"SAFECHECK_ERR",message:"Environment check failed."},403:{type:"SERVER_ERR",message:"Authentication failed."},500:{type:"SERVER_ERR",message:"Server failed."},1001:{type:"SERVER_ERR",message:"The media file does not exist. Please check if the fileID is correct."},1002:{type:"SERVER_ERR",message:"The trial duration is illegal. The trial duration must be within the video duration."},1003:{type:"SERVER_ERR",message:"Param pcfg is not unique."},1004:{type:"SERVER_ERR",message:"The license has expired. Please check whether the expiration time setting is reasonable."},1005:{type:"SERVER_ERR",message:"Did not find an adaptive stream that can be played."},1006:{type:"SERVER_ERR",message:"Invalid request format, please check the request format."},1007:{type:"SERVER_ERR",message:"AppID is not exist, Please check if the AppID is correct."},1008:{type:"SERVER_ERR",message:"Without anti-leech information."},1009:{type:"SERVER_ERR",message:"psign check failed."},1010:{type:"SERVER_ERR",message:"Other errors."},1021:{type:"SERVER_ERR",message:"qsign invalid."},1012:{type:"DATA_ERR",message:"Response data verification failed."},2001:{type:"SERVER_ERR",message:"Internal error."},10008:{type:"SERVER_ERR",message:"The media file does not exist. Please check if the fileID is correct."},"-2001":{type:"SERVER_ERR",message:"Current browser not support play this stream, please select another one."},"-2002":{type:"SERVER_ERR",message:"Server respond error data.(eg. stream not exist)"},"-2003":{type:"SERVER_ERR",message:"Video play failed, please refresh to start play again."},"-2004":{type:"SERVER_ERR",message:"Connection to the server has failed and the number of connection retries has exceeded the set value."},"-2005":{type:"SERVER_ERR",message:"Video decoding failure."},PLAYER_ERR_DOMAIN_RESTRICTED:{message:"This video is restricted from playing on your current domain."},PLAYER_ERR_IP_RESTRICTED:{message:"This video is restricted at your current IP address."},PLAYER_ERR_GEO_RESTRICTED:{message:"This video is restricted from playing in your current geographic region."}}},initPlugin=function t(e,n){var r=void 0,i=void 0,o=void 0,a=[];videojs.getComponent("ErrorDisplay").prototype.options_.fillAlways=!1;var s=function(e){n.errors=videojs.mergeOptions(n.errors,e),Object.keys(n.errors).forEach(function(e){var t=n.errors[e];t.type||(t.type=e)})};s();var c=function(){e.clearTimeout(i),o&&(o=!1,e.removeClass("vjs-waiting")),i=e.setTimeout(function(){e.error()||e.paused()||e.ended()||(o=!0,e.addClass("vjs-waiting"))},1e3),e.clearTimeout(r),r=e.setTimeout(function(){e.error()||e.paused()||e.ended()||e.error({code:-2,type:"PLAYER_ERR_TIMEOUT"})},n.timeout),e.error()&&-2===e.error().code&&e.error(null)},l=function(){for(var t=void 0;a.length;)t=a.shift(),e.off(t[0],t[1]);e.clearTimeout(r),e.clearTimeout(i)},u=function(t,n){var r=function(){if(!e.error()){var t=e.$(".vjs-tech");if(t&&"application/x-shockwave-flash"===t.type&&!t.vjs_getProperty)return void e.error({code:-2,type:"PLAYER_ERR_TIMEOUT"});if(e.paused())return c();if(e.ended())return c()}n.call(this)};e.on(t,r),a.push([t,r])},d=function(){var t=0;l(),c(),u(["timeupdate","adtimeupdate"],function(){var n=e.currentTime();n!==t&&(t=n,c())}),n.progressDisabled||u("progress",c)},p=function(t){var r="",i=e.error(),o=document_1.createElement("div"),a="";if(i){i=videojs.mergeOptions(i,n.errors[i.code||0]),i.message&&(r='<div class="vjs-errors-message">'+e.localize(i.message)+"</div>"),i.code&&(r+='<div class="vjs-errors-code">'+this.localize("Error Code")+" : "+i.code+"</div>"),i.type&&(r+='<div class="vjs-errors-type">'+this.localize("Error Type")+" : "+i.type+"</div>"),"10"==i.code||i.code,i.code,i.code,o.className="vjs-errors-dialog",a='<div class="vjs-errors-content-container">\n '+r+"\n </div>";var s=e.getChild("errorDisplay");s&&s.closeable(!("dismiss"in i)||i.dismiss)?(o.innerHTML=a,s.fillWith(o),s.contentEl().firstChild.appendChild(s.getChild("closeButton").el())):(o.innerHTML=a,s.fillWith(o)),s.one("modalclose",function(){return e.error(null)})}},h=function g(){l(),e.removeClass("vjs-errors"),e.off("dispose",g),e.off(["aderror","error"],p)},f=function(n){h(),t(e,videojs.mergeOptions(defaults$1,n))};f.extend=function(e){return s(e)},f.getAll=function(){return videojs.mergeOptions(n.errors)},f.disableProgress=function(e){n.progressDisabled=e,d()},e.on("dispose",h),e.on(["aderror","error"],p),e.ready(function(){e.addClass("vjs-errors")}),e.errors=f},errors=function(e){initPlugin(this,videojs.mergeOptions(defaults$1,e))};["extend","getAll","disableProgress"].forEach(function(e){errors[e]=function(){videojs.log.warn("The errors."+e+"() 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(e){function t(n,r){classCallCheck(this,t),log$7("Reporter initilaizing");var i=possibleConstructorReturn(this,e.call(this,n));if(!n.options_.plugins.Reporter){var o;return o=!1,possibleConstructorReturn(i,o)}return i.reportContent={status:"idle"},i.mtaReportCache=[],log$7("Reporter initilaized"),i}return inherits(t,e),t.prototype.setStorage=function(e,t){localStorage.setItem(e,t)},t.prototype.getStorage=function(e){localStorage.getItem(e)},t.prototype.sender=function(e){var t=new Image;t.onload=t.onerror=t.onabort=function(){t.onload=t.onerror=t.onabort=null,t=null},t.src=e},t.prototype.initPlayCgiCodeReport=function(){var e=this.player;e.on("playcgistart",videojs.bind(this,this.onPlayCgiStart)),e.on("playcgiend",videojs.bind(this,this.onPlayCgiEnd))},t.prototype.onPlayCgiStart=function(e){cgiSeq[e.data.time]=cgiSeq[e.data.time]||{},cgiSeq[e.data.time].startTime=e.data.time,cgiSeq[e.data.time].url=e.data.url},t.reportPlayMetrics=function(e,t){xhr.post("https://datacenter.live.qcloud.com",{body:JSON.stringify(e)},function(){t&&t()})},t.prototype.onPlayCgiEnd=function(e){if(cgiSeq[e.data.startTime]){var t=e.data,n=void 0,r=void 0,i=void 0;if(t.error)switch(r=2,t.error.message){case"Timeout":n=10;break;case"ServerError":n=11}else 0==t.result.code?(r=1,n=0):(r=3,n=t.result.code),i=t.result.requestId;this.reportPlayCgiToISD("","",r,n,e.data.time-cgiSeq[e.data.startTime].startTime,i,void 0,void 0)}},t.prototype.reportPlayCgiToISD=function(e,t,n,r,i,o,a,s){var c={domain:e||"playvideo.qcloud.com",cgi:t||"/getplayinfo/v2",type:n,code:r,time:i,appid:20370,platform:videojs.browser.IS_IOS?"ios":videojs.browser.IS_ANDROID?"android":"pc",expansion1:o,expansion2:a,expansion3:s};this.sender(unifyProtocol(STATUS_CODE_REPORT_URL)+"?"+serializeParams(c))},t.prototype.reportMTA=function(e,t){window.MtaH5?(this.mtaReportCache.length>0&&(this.mtaReportCache.forEach(function(e){e.call()}),this.mtaReportCache=0),MtaH5.clickStat(e,t)):this.mtaReportCache.push(function(){MtaH5.clickStat(e,t)})},t}(Plugin$8);videojs.registerPlugin("Reporter",Reporter);var store2=createCommonjsModule(function(e){!function(t,n){var r={version:"2.12.0",areas:{},apis:{},inherit:function(e,t){for(var n in e)t.hasOwnProperty(n)||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));return t},stringify:function(e){return e===undefined||"function"==typeof e?e+"":JSON.stringify(e)},parse:function(e,t){try{return JSON.parse(e,t||r.revive)}catch(n){return e}},fn:function(e,t){r.storeAPI[e]=t;for(var n in r.apis)r.apis[n][e]=t},get:function(e,t){return e.getItem(t)},set:function(e,t,n){e.setItem(t,n)},remove:function(e,t){e.removeItem(t)},key:function(e,t){return e.key(t)},length:function(e){return e.length},clear:function(e){e.clear()},Store:function(e,t,n){var i=r.inherit(r.storeAPI,function(e,t,n){return 0===arguments.length?i.getAll():"function"==typeof t?i.transact(e,t,n):t!==undefined?i.set(e,t,n):"string"==typeof e||"number"==typeof e?i.get(e):"function"==typeof e?i.each(e):e?i.setAll(e,t):i.clear()});i._id=e;try{t.setItem("__store2_test","ok"),i._area=t,t.removeItem("__store2_test")}catch(o){i._area=r.storage("fake")}return i._ns=n||"",r.areas[e]||(r.areas[e]=i._area),r.apis[i._ns+i._id]||(r.apis[i._ns+i._id]=i),i},storeAPI:{area:function(e,t){var n=this[e];return n&&n.area||(n=r.Store(e,t,this._ns),this[e]||(this[e]=n)),n},namespace:function(e,t){if(!e)return this._ns?this._ns.substring(0,this._ns.length-1):"";var n=e,i=this[n];if(!(i&&i.namespace||(i=r.Store(this._id,this._area,this._ns+n+"."),this[n]||(this[n]=i),t)))for(var o in r.areas)i.area(o,r.areas[o]);return i},isFake:function(){return"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(e){return this._area.has?this._area.has(this._in(e)):!!(this._in(e)in this._area)},size:function(){return this.keys().length},each:function(e,t){for(var n=0,i=r.length(this._area);n<i;n++){var o=this._out(r.key(this._area,n));if(o!==undefined&&!1===e.call(this,o,this.get(o),t))break;i>r.length(this._area)&&(i--,n--)}return t||this},keys:function(e){return this.each(function(e,t,n){n.push(e)},e||[])},get:function(e,t){var n,i=r.get(this._area,this._in(e));return"function"==typeof t&&(n=t,t=null),null!==i?r.parse(i,n):null!=t?t:i},getAll:function(e){return this.each(function(e,t,n){n[e]=t},e||{})},transact:function(e,t,n){var r=this.get(e,n),i=t(r);return this.set(e,i===undefined?r:i),this},set:function(e,t,n){var i=this.get(e);return null!=i&&!1===n?t:r.set(this._area,this._in(e),r.stringify(t),n)||i},setAll:function(e,t){var n,r;for(var i in e)r=e[i],this.set(i,r,t)!==r&&(n=!0);return n},add:function(e,t){var n=this.get(e);if(n instanceof Array)t=n.concat(t);else if(null!==n){var i=typeof n;if(i===typeof t&&"object"===i){for(var o in t)n[o]=t[o];t=n}else t=n+t}return r.set(this._area,this._in(e),r.stringify(t)),t},remove:function(e,t){var n=this.get(e,t);return r.remove(this._area,this._in(e)),n},clear:function(){return this._ns?this.each(function(e){r.remove(this._area,this._in(e))},1):r.clear(this._area),this},clearAll:function(){var e=this._area;for(var t in r.areas)r.areas.hasOwnProperty(t)&&(this._area=r.areas[t],this.clear());return this._area=e,this},_in:function(e){return"string"!=typeof e&&(e=r.stringify(e)),this._ns?this._ns+e:e},_out:function(e){return this._ns?e&&0===e.indexOf(this._ns)?e.substring(this._ns.length):undefined:e}},storage:function(e){return r.inherit(r.storageAPI,{items:{},name:e})},storageAPI:{length:0,has:function(e){return this.items.hasOwnProperty(e)},key:function(e){var t=0;for(var n in this.items)if(this.has(n)&&e===t++)return n},setItem:function(e,t){this.has(e)||this.length++,this.items[e]=t},removeItem:function(e){this.has(e)&&(delete this.items[e],this.length--)},getItem:function(e){return this.has(e)?this.items[e]:null},clear:function(){for(var e in this.items)this.removeItem(e)}}},i=r.Store("local",function(){try{return localStorage}catch(e){}}());i.local=i,i._=r,i.area("session",function(){try{return sessionStorage}catch(e){}}()),i.area("page",r.storage("page")),"function"==typeof n&&n.amd!==undefined?n("store2",[],function(){return i}):e.exports?e.exports=i:(t.store&&(r.conflict=t.store),t.store=i)}(commonjsGlobal,commonjsGlobal&&commonjsGlobal.define)}),Plugin$9=videojs.getPlugin("plugin"),log$8=videojs.log,ContinuePlay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.options=r,i.init(),i}return inherits(t,e),t.prototype.init=function(){var e=this.player,t=e.options_,n=void 0;e.ready(videojs.bind(this,function(){n=t&&t.appID&&t.fileID?t.fileID:this.options.playID,this.playID=n,e.cache_&&e.cache_.source&&e.cache_.source.src&&(this.source=e.cache_.source.src.split("?")[0]),(n||this.source)&&(log$8("ContinuePlay initializing"),this.lastTime=store2.get(this.getStoreKey()),e.off("timeupdate",videojs.bind(this,this.onTimeUpdate)),e.on("timeupdate",videojs.bind(this,this.onTimeUpdate)),e.one(this.getTriggerEvent(),videojs.bind(this,this.onPlay)),!this.options.auto&&e.getChild("ContinuePlayTips")&&e.getChild("ContinuePlayTips").close(),log$8("ContinuePlay initialized"),e.trigger({type:"feature",data:"continue"}))}))},t.prototype.onTimeUpdate=function(e){store2.set(this.getStoreKey(),this.player.currentTime())},t.prototype.onPlay=function(e){var t=this.player;Math.round(this.lastTime)>1&&this.player.duration()>1&&this.player.duration()!==Infinity&&Math.round(this.lastTime)!=Math.round(this.player.duration())?this.options.auto?this.start():t.addChild("ContinuePlayTips",videojs.mergeOptions(this.options,{time:this.lastTime,resumeCallback:videojs.bind(this,this.start)})):"Flash"==t.techName_&&Math.round(this.lastTime)>1&&Math.round(this.lastTime)!=Math.round(this.player.duration())&&this.player.duration()!==Infinity&&!this.player.duration()&&t.one("loadedmetadata",videojs.bind(this,this.onPlay))},t.prototype.start=function(){var e=this.player;e.currentTime(this.lastTime),"Flash"==e.techName_&&e.tech(!0).trigger("seeked"),e.trigger({type:"continueplay",data:{lastTime:this.lastTime}})},t.prototype.generatePlayID=function(){},t.prototype.getStoreKey=function(){return"tcplayer-lpt-"+(this.playID||this.source)},t.prototype.getTriggerEvent=function(){var e=this.player,t=e.options_;return t.autoplay&&"Flash"==e.techName_?"loadedmetadata":"playing"},t}(Plugin$9);videojs.registerPlugin("ContinuePlay",ContinuePlay);var defaults$2={align:"top-left",className:"",content:"",debug:!1,showBackground:!0,attachToControlBar:!1,overlays:[]},Component$12=videojs.getComponent("Component"),dom$1=videojs.dom||videojs,registerPlugin$1=videojs.registerPlugin||videojs.plugin,isNumber=function(e){return"number"==typeof e&&e===e},hasNoWhitespace=function(e){return"string"==typeof e&&/^\S+$/.test(e)},Overlay=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return["start","end"].forEach(function(e){var t=i.options_[e];if(isNumber(t))i[e+"Event_"]="timeupdate";else if(hasNoWhitespace(t))i[e+"Event_"]=t;else if("start"===e)throw new Error('invalid "start" option; expected number or string')}),["endListener_","rewindListener_","startListener_"].forEach(function(e){i[e]=function(n){return t.prototype[e].call(i,n)}}),"timeupdate"===i.startEvent_&&i.on(n,"timeupdate",i.rewindListener_),i.debug('created, listening to "'+i.startEvent_+'" for "start" and "'+(i.endEvent_||"nothing")+'" for "end"'),i.hide(),i}return inherits(t,e),t.prototype.createEl=function(){var e=this.options_,t=e.content,n=e.showBackground?"tcp-overlay-background":"tcp-overlay-no-background",r=dom$1.createEl("div",{className:"\n tcp-overlay\n tcp-overlay-"+e.align+"\n "+e.className+"\n "+n+"\n vjs-hidden\n "});return"string"==typeof t?r.innerHTML=t:videojs.browser.IS_IE8||t instanceof window_1.DocumentFragment?r.appendChild(t):dom$1.appendContent(r,t),r},t.prototype.debug=function(){if(this.options_.debug){for(var e=videojs.log,t=e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.hasOwnProperty(r[0])&&"function"==typeof e[r[0]]&&(t=e[r.shift()]),t.apply(undefined,["overlay#"+this.id()+": "].concat(r))}},t.prototype.hide=function(){return e.prototype.hide.call(this),this.debug("hidden"),this.debug('bound `startListener_` to "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('unbound `endListener_` from "'+this.endEvent_+'"'),this.off(this.player(),this.endEvent_,this.endListener_)),this.options_.once?(videojs.browser.IS_IOS&&videojs.browser.IS_WECHAT?this.player().hasStarted()||this.player().ready(videojs.bind(this,function(){this.startListener_({type:this.startEvent_})})):this.player().hasStarted()||this.on(this.player(),this.startEvent_,this.startListener_),this):("pause"===this.startEvent_?this.on(this.player(),this.startEvent_,this.startOnPause_):this.on(this.player(),this.startEvent_,this.startListener_),this)},t.prototype.startOnPause_=function(e){var t=this.player();"pause"===e.type?t.seeking()||t.ended()||this.startListener_({type:"pause"}):t.paused()&&this.startListener_({type:"pause"})},t.prototype.shouldHide_=function(e,t){var n=this.options_.end;return isNumber(n)?e>=n:n===t},t.prototype.show=function(){return e.prototype.show.call(this),"pause"===this.startEvent_&&this.off(this.player(),this.startEvent_,this.startOnPause_),this.off(this.player(),this.startEvent_,this.startListener_),this.debug("shown"),this.debug('unbound `startListener_` from "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('bound `endListener_` to "'+this.endEvent_+'"'),this.on(this.player(),this.endEvent_,this.endListener_)),this},t.prototype.shouldShow_=function(e,t){var n=this.options_.start,r=this.options_.end;return isNumber(n)?isNumber(r)?e>=n&&e<r:this.hasShownSinceSeek_?Math.floor(e)===n:(this.hasShownSinceSeek_=!0,e>=n):n===t},t.prototype.startListener_=function(e){var t=this.player().currentTime();this.shouldShow_(t,e.type)&&this.show()},t.prototype.endListener_=function(e){var t=this.player().currentTime();this.shouldHide_(t,e.type)&&this.hide()},t.prototype.rewindListener_=function(e){var t=this.player().currentTime(),n=this.previousTime_,r=this.options_.start,i=this.options_.end;t<n&&(this.debug("rewind detected"),isNumber(i)&&!this.shouldShow_(t)?(this.debug("hiding; "+i+" is an integer and overlay should not show at this time"),this.hasShownSinceSeek_=!1,this.hide()):hasNoWhitespace(i)&&t<r&&(this.debug("hiding; show point ("+r+") is before now ("+t+") and end point ("+i+") is an event"),this.hasShownSinceSeek_=!1,this.hide())),this.previousTime_=t},t}(Component$12);videojs.registerComponent("Overlay",Overlay);var plugin=function(e){var t=this,n=videojs.mergeOptions(defaults$2,e);Array.isArray(this.overlays_)&&this.overlays_.forEach(function(e){t.removeChild(e),t.controlBar&&t.controlBar.removeChild(e),e.dispose()});var r=n.overlays;delete n.overlays,this.overlays_=r.map(function(e){var r=videojs.mergeOptions(n,e);return r.attachToControlBar&&t.controlBar&&-1!==r.align.indexOf("bottom")?t.controlBar.addChild("overlay",r):t.addChild("overlay",r)})};registerPlugin$1("Patch",plugin);var Plugin$10=videojs.getPlugin("plugin"),log$9=videojs.log,locations=["start","pause","ended"],startEvent=["loadstart","pause","ended"],endEvent=["play","play","play"],ImagePatch=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.hasInit=!1,i.init(r),i}return inherits(t,e),t.prototype.init=function(e){var t=this,n=this.player,r={showBackground:!1,overlays:[]};Array.isArray(e)&&e.length>0&&(log$9("ImagePatch initializing"),e.forEach(function(e){var n=void 0,i=void 0,o=void 0,a=void 0,s=document.createDocumentFragment();o=document.createElement("a"),o.className="tcp-overlay-link",o.target="_blank",e.link&&(o.href=e.link),e.url&&(a=t.loadImg(unifyProtocol(e.url),videojs.bind(t,t.onImgLoaded)),a.className="tcp-overlay-img",o.appendChild(a),videojs.browser.IS_IE8?(n=document.createElement("div"),n.className="tcp-overlay-table",i=document.createElement("div"),i.className="tcp-overlay-cell",i.appendChild(o),n.appendChild(i),s.appendChild(n)):s.appendChild(o),r.overlays.push({content:s,className:"tcp-image-patch tcp-image-patch-"+locations[e.location],start:startEvent[e.location],end:endEvent[e.location],once:0==e.location,align:"center"}))}),r.overlays.length>0?(n.Patch(r),n.trigger({type:"feature",data:"patch"}),this.hasInit=!0):this.reset(),log$9("ImagePatch initialized"))},t.prototype.loadImg=function(e,t){var n,r,i,o,a,s=new Image;return s.src=e,s.complete?(t&&t.call(t,s),s):(r=s.width,i=s.height,s.onerror=function(){n.end=!0,s=s.onload=s.onerror=null},n=function(){o=s.width,a=s.height,(o!==r||a!==i||o*a>1024)&&(t&&t.call(t,s),n.end=!0)},n(),s.onload=function(){!n.end&&n(),s=s.onload=s.onerror=null},s)},t.prototype.onImgLoaded=function(e){if(videojs.browser.IE_VERSION){var t=parseInt(this.player.el().currentStyle.width),n=parseInt(this.player.el().currentStyle.height);if(e.width>t||e.height>n){var r=t/(e.width/e.height);e.width/e.height>t/n||(e.style.marginTop=(n-r)/2+"px"),e.style.width="100%",e.style.height="auto"}}},t.prototype.reset=function(){this.hasInit&&(log$9("ImagePatch reset"),this.player.Patch(),this.hasInit=!1)},t}(Plugin$10);videojs.registerPlugin("ImagePatch",ImagePatch);var Plugin$11=videojs.getPlugin("plugin"),log$10=videojs.log,ContextMenu=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.options=r,log$10("ContextMenu initializing"),i.init(),log$10("ContextMenu initialized"),i}return inherits(t,e),t.prototype.init=function(){this.player.addChild("RightClickPopupMenu",this.options)},t}(Plugin$11);videojs.registerPlugin("ContextMenu",ContextMenu);var Plugin$12=videojs.getPlugin("plugin"),LevelSwitch=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.options=r,i.init(),i}return inherits(t,e),t.prototype.init=function(){var e=this.player,t=e.options_.plugins.ContextMenu;t&&t.levelSwitch&&t.levelSwitch.open&&e.addChild("LevelSwitchTips",this.options)},t}(Plugin$12);videojs.registerPlugin("LevelSwitch",LevelSwitch);var Plugin$13=videojs.getPlugin("plugin"),log$12=videojs.log,defaults$3={width:0,height:0,basePath:""},VttThumbnail=function(e){function t(n,r){classCallCheck(this,t)
24
+ ;var i=possibleConstructorReturn(this,e.call(this,n));return i.hasInit=!1,r.vttUrl&&n.ready(videojs.bind(i,function(){this.init(r)})),i}return inherits(t,e),t.prototype.loadTrackFile=function(e){var t=this,n=this.player,r=n.addRemoteTextTrack({src:e.vttUrl,kind:"metadata"},!0);r&&r.addEventListener("load",function(){t.trackInfo=r})},t.prototype.init=function(e){if(!videojs.browser.IS_IOS&&!videojs.browser.IS_ANDROID&&this.player.controlBar&&this.player.controlBar.progressControl){if(log$12("VttThumbnail initializing",e),!this.player.controlBar)return void log$12("VttThumbnail can not initialize without control bar");this.options=e;var t=this.player,n=t.controlBar.progressControl;this.loadTrackFile(e),defaults$3.basePath=parseBasePath(e.vttUrl),this.initUI(),n.on("mouseenter",videojs.bind(this,this.onMouseEnter)),n.on("mousemove",videojs.bind(this,this.onMouseMove)),n.on("mouseleave",videojs.bind(this,this.onMouseOut)),this.hasInit=!0,log$12("VttThumbnail initialized"),t.trigger({type:"feature",data:"thumbnail"})}},t.prototype.initTrackFile=function(e){e.track;this.trackInfo=e},t.prototype.initUI=function(){var e=videojs.dom.createEl("div",{className:"tcp-vtt-thumbnail-container"}),t=videojs.dom.createEl("img",{className:"tcp-vtt-thumbnail-img"});e.appendChild(t),this.containerEl=e,this.imgEl=t,this.player.controlBar.progressControl.el().appendChild(e)},t.prototype.onMouseEnter=function(){this.containerEl.style.display="block"},t.prototype.onMouseMove=function(e){if(!this.trackInfo)return!1;var t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,c=void 0,l=0,u=void 0,d=void 0,p=void 0,h=void 0;for(r=this.player.controlBar.progressControl,i=this.player.controlBar.progressControl.seekBar,o=offsetParent(r.el()).getBoundingClientRect(),a=offsetParent(i.el()).getBoundingClientRect(),t=e.clientX,c=this.player.duration(),s=((t-a.left)/i.width()*c).toFixed(3),u=this.trackInfo.track||this.trackInfo;l<u.cues.length;){if(d=u.cues[l],d.startTime<=s&&d.endTime>=s){p=parseImageLink(d.text);break}l++}if(!p)return this.onMouseOut(),!1;h=t-a.left+p.w/2-i.width(),h=Math.max(0,h),n=t-o.left-p.w/2-h,n=Math.max(i.el().offsetLeft,n),p.left=n,this.setView(p)},t.prototype.onMouseOut=function(){this.containerEl.style.display="none"},t.prototype.setView=function(e){var t=this.containerEl,n=this.imgEl,r=this.options;t.style.width==e.w&&t.style.height==e.h||(t.style.width=e.w+"px",t.style.height=e.h+"px"),t.style.left=e.left+"px",r.imgUrl&&n.src!=r.imgUrl?n.src=r.imgUrl:n.src=e.src,n.style.left=-e.x+"px",n.style.top=-e.y+"px",n.style.clip="rect("+e.y+"px,"+(e.w+e.x)+"px,"+(e.y+e.h)+"px,"+e.x+"px)"},t.prototype.reset=function(){if(this.hasInit){log$12("VttThumbnail reset");var e=this.player,t=e.controlBar.progressControl;t.off("mousemove",videojs.bind(this,this.onMouseMove)),t.off("mouseleave",videojs.bind(this,this.onMouseOut)),this.hasInit=!1}},t}(Plugin$13),getComputedStyle=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},offsetParent=function n(e){return"HTML"!==e.nodeName&&"static"===getComputedStyle(e)("position")?n(e.offsetParent):e},parseImageLink=function(e){var t=void 0,n=void 0,r=void 0;if(-1===(n=e.indexOf("#")))return{src:e,w:0,h:0,x:0,y:0};if(t=e.substring(0,n),/^(http:|https:|\/\/)/.test(t)||(t=defaults$3.basePath+t),r=e.substring(n+1),"xywh="!==r.substring(0,5))return{src:t,w:0,h:0,x:0,y:0};var i=r.substring(5).split(",");return{src:t,w:parseInt(i[2]),h:parseInt(i[3]),x:parseInt(i[0]),y:parseInt(i[1])}},parseBasePath=function(e){/^(\/\/)/.test(e)&&(e="https:"+e);var t=/(\w+):\/\/([^\:|\/]+)(\:\d*)?(.*\/)([^#|\?|\n]+)?(#.*)?(\?.*)?/i,n=e.match(t);if(n&&n[2]&&n[4])return"//"+n[2]+n[4]};videojs.registerPlugin("VttThumbnail",VttThumbnail);var Plugin$14=videojs.getPlugin("plugin"),log$13=videojs.log,PlayerMetrics=function(e){function t(n,r){classCallCheck(this,t),log$13("PlayerMetrics initializing");var i=possibleConstructorReturn(this,e.call(this,n));if(!1===n.options_.reportable){var o;return o=!1,possibleConstructorReturn(i,o)}return i.player=n,i.checkPrevData(),i.initData(),i.registerListener(),log$13("PlayerMetrics initialized"),i}return inherits(t,e),t.prototype.checkPrevData=function(){var e=localStorage.getItem("tcplayer_data");if(e){var t=JSON.parse(e);Reporter.reportPlayMetrics(t,function(){localStorage.removeItem("tcplayer_data")})}},t.prototype.initData=function(){this.bytes_token=guid(),this.vodBaseData={uint32_service:2,uint32_platform:3,bytes_version:String(version),uint64_appid:0,bytes_bizid:this.guid("dev_uuid"),bytes_stream_id:"",uint32_module_id:1011,uint32_data_type:1,uint32_command:40303,uint64_data_time:0,bytes_token:this.bytes_token,token:this.bytes_token,dev_uuid:this.guid("dev_uuid"),str_app_name:"",str_app_version:"",str_stream_url:"",str_brand_type:this.getDevice(),str_device_resolution:screen.width+"_"+screen.height,str_device_type:"",str_package_name:"",str_sdk_name:"TCPlayer",str_user_id:this.guid("dev_uuid"),sys_type:this.getSystem(),sys_version:String(this.getSystemVer()),str_user_agent:USER_AGENT,str_browser_version:String(this.getBrowserVer()),str_browser_model:String(this.getBrowser()),u32_app_id:String(this.player.options_.appID),str_fileid:String(this.player.options_.fileID),u32_network_type:this.getNetworkType()},this.liveBaseData={str_user_id:this.guid("dev_uuid"),dev_uuid:this.guid("dev_uuid"),str_session_id:this.bytes_token,bytes_token:this.bytes_token,str_device_type:"",str_os_info:this.getSystem(),str_package_name:"",u32_network_type:"0xFF"!==this.getNetworkType()?this.getNetworkType():"",u32_server_ip:"",str_stream_url:this.player.cache_.src,u64_timestamp:this.player.startTime,u32_link_type:1,u32_channel_type:1,str_app_version:"",platform:3,uint32_platform:3,str_browser_version:this.getBrowserVer(),str_browser_model:this.getBrowser(),str_user_agent:USER_AGENT,u32_video_drop:"",u32_drop_usage:"",float64_rtt:""},this.features=[],this.afterCanplay=!1,this.videoDuration=0,this.consumeDuration=0,this.playScene=1,this.timing={},this.playStatus={isFirstPlay:!1,pauseDuration:0},this.contentComputTimePoint=[],this.firstFrameDuration=0,this.firstIFrameDuration=0,this.blockInterval=5e3,this.bufferBlock=[],this.u32_drm_type="plain",this.resetLagStatus(),this.resetBlockData()},t.prototype.getComsumeDuration=function(e){var t=getTimeStamp()-this.timing.firstPlaying;this.consumeDuration=t-this.lagStatus.lagDuration-this.playStatus.pauseDuration,e&&this.consumeDuration<0&&(this.consumeDuration=t>0?t:0)},t.prototype.registerListener=function(){var e=this.player;e.on("loadedmetadata",videojs.bind(this,this.onLoadedmetadata)),e.one("canplay",videojs.bind(this,this.oneCanplay)),e.one("play",videojs.bind(this,this.onePlay)),e.on("play",videojs.bind(this,this.onPlay)),e.on("playing",videojs.bind(this,this.onPlaying)),e.on("seeking",videojs.bind(this,this.onSeeking)),e.on("seeked",videojs.bind(this,this.onSeeked)),e.on("error",videojs.bind(this,this.onError)),e.on("resolutionswitching",videojs.bind(this,this.onResolutionSwitching)),e.on("pause",videojs.bind(this,this.onPause)),e.on("playcgiend",videojs.bind(this,this.onPlaycgiend)),e.on("ended",videojs.bind(this,this.onEnded)),e.on("feature",videojs.bind(this,this.onFeature)),e.on("dispose",videojs.bind(this,this.onDispose)),document.addEventListener("visibilitychange",videojs.bind(this,this.onVisibilityChange)),window.addEventListener("pagehide",videojs.bind(this,this.onPageHide))},t.prototype.onPageHide=function(){this.saveData()},t.prototype.onVisibilityChange=function(){"hidden"===document.visibilityState&&this.saveData()},t.prototype.saveData=function(){this.bytes_token&&3!==this.playScene&&this.player&&(this.getComsumeDuration(),this.report(2===this.playScene?40304:40102,{},function(e){localStorage.setItem("tcplayer_data",JSON.stringify(e))}))},t.prototype.onLoadedmetadata=function(){this.player.tech_.webrtcProvider?this.playScene=3:this.playScene=this.player.duration()===Infinity?1:2,this.videoDuration=parseInt(this.player.duration())||0,videojs.bind(this,this.calculateFirstFrameDuration)(),2===this.playScene&&this.report(40303)},t.prototype.oneCanplay=function(){videojs.bind(this,this.calculateFirstFrameDuration)(),1===this.playScene&&this.report(40101)},t.prototype.calculateFirstFrameDuration=function(){var e=getperformance();e.mark&&e.measure&&e.getEntriesByName&&(e.mark("firstIFrameEnd"),e.measure("firstIFrame","firstFrameStart","firstIFrameEnd"),this.firstIFrameDuration=e.getEntriesByName("firstIFrame")[0].duration)},t.prototype.onePlay=function(){var e=this;this.setTimingData({firstPlay:getTimeStamp()});var t=this.player.el_.firstChild;this.bufferStart=t&&t.buffered&&t.buffered.length>0?t.buffered.start(t.buffered.length-1):0,this.bufferBlock=[this.bufferStart];var n=this.player.getVideoPlaybackQuality();this.recvFrames=n.totalVideoFrames,this.renderedFrames=n.totalVideoFrames-n.droppedVideoFrames,this.blockStartTime=getTimeStamp(),this.blockTimer=setInterval(function(){if(2===e.playScene)return!1;if(e.lagStatus.lagging&&e.lagStatus.lagStart){var n=getTimeStamp()-e.lagStatus.lagStart;n>e.blockInterval?e.blockData.lagBlockDuration=e.blockInterval:e.blockData.lagBlockDuration+=n}e.blockStartTime=getTimeStamp();var r=t&&t.buffered&&t.buffered.length>0?t.buffered.end(t.buffered.length-1):0,i=e.player.getVideoPlaybackQuality(),o=i.totalVideoFrames,a=i.totalVideoFrames-i.droppedVideoFrames;Object.assign(e.blockData,{buffer_avg:parseInt(1e3*(r-e.bufferStart)),recv_frames:o-e.recvFrames,render_frames:a-e.renderedFrames}),e.bufferBlock.push(e.blockData.buffer_avg),e.bufferStart=r,e.recvFrames=o,e.renderedFrames=a,e.report(40100)},this.blockInterval)},t.prototype.onDispose=function(){clearInterval(this.blockTimer)},t.prototype.onPlay=function(){this.playStatus.pauseTime&&(this.playStatus.pauseDuration=this.playStatus.pauseDuration+getTimeStamp()-this.playStatus.pauseTime,this.playStatus.pauseTime=0)},t.prototype.onPlaying=function(){var e=this;if(!this.playStatus.isFirstPlay&&(this.playStatus.isFirstPlay=!0,this.setTimingData({firstPlaying:getTimeStamp()}),this.player.on("waiting",function(){e.lagStatus.lagging||e.player.seeking()||e.lagStatus.skip||(e.lagStatus.lagging=!0,e.lagStatus.lagStart=getTimeStamp())}),this.player.currentSource().keySystems)){var t=this.player.currentSource().keySystems;t.plain&&(this.u32_drm_type="plain"),t.SimpleAES&&(this.u32_drm_type="SimpleAES")}this.lagStatus.lagging&&(this.lagStatus.lagEnd=getTimeStamp())-this.lagStatus.lagStart>this.lagStatus.lagInterval&&(this.lagStatus.lagging=!1,this.lagStatus.lagCount++,this.lagStatus.lagAvg.push(this.lagStatus.lagEnd-this.lagStatus.lagStart),this.lagStatus.lagDuration+=this.lagStatus.lagEnd-this.lagStatus.lagStart,this.lagStatus.lagStart<this.blockStartTime&&(this.blockData.lagBlockDuration=this.lagStatus.lagEnd-this.blockStartTime),this.lagStatus.lagStart>=this.blockStartTime&&(this.blockData.lagBlockDuration+=this.lagStatus.lagEnd-this.lagStatus.lagStart),this.lagStatus.lagEnd=this.lagStatus.lagStart=0,this.lagStatus.isFirstLag||(this.lagStatus.isFirstLag=!0,this.setTimingData({firstLag:getTimeStamp()}))),[60,200,500,1e3].forEach(function(t){e.lagStatus.lagging&&(e.lagStatus.lagEnd=getTimeStamp())-e.lagStatus.lagStart>t&&e.blockData["lagCount_"+t]++}),this.lagStatus.skip=!1},t.prototype.onSeeking=function(){this.contentComputTimePoint.push({type:"end",time:this.player.currentTime()})},t.prototype.onSeeked=function(){this.contentComputTimePoint.push({type:"start",time:this.player.currentTime()})},t.prototype.onError=function(e){this.getComsumeDuration(!0);var t={u64_err_code:e.data.code,str_err_info:e.data.message||(defaults$1.errors[e.data.code]||{}).message},n=(this.player.cache_.src||"").indexOf("vod")>-1||this.player.options_.fileID;e&&e.data&&e.data.code&&(2===this.playScene&&n?this.report(40304,t):this.afterCanplay?this.report(40102,t):this.report(40101,t))},t.prototype.onResolutionSwitching=function(){this.lagStatus.skip=!0},t.prototype.onPause=function(){this.playStatus.pauseTime=getTimeStamp(),this.lagStatus.lagging&&(this.lagStatus.skip=!0)},t.prototype.onPlaycgiend=function(e){var t=this,n=e.data;n.result&&0==n.result.code&&(this.playStatus.requestID=n.result.requestId,setTimeout(function(){if(t.player.currentSources().length>0&&t.player.currentSources()[0].keySystems){var e=t.player.currentSources()[0].keySystems;e["com.widevine.alpha"]&&t.reportMTA("drm",{initialized:"Widevine"}),e["com.apple.fps.1_0"]&&t.reportMTA("drm",{initialized:"FairPlay"})}else t.player.options_.plugins.DRM&&t.player.options_.plugins.DRM.token&&t.reportMTA("drm",{initialized:"SimpleAES"})},0)),this.setTimingData({cgiStart:e.data.startTime,cgiEnd:e.data.time})},t.prototype.onEnded=function(){this.getComsumeDuration(),1===this.playScene?this.report(40102):this.report(40304)},t.prototype.onFeature=function(e){-1==this.features.indexOf(e.data)&&this.features.push(e.data)},t.prototype.guid=function(e){var t=localStorage.getItem(e);return t||(t=guid(),localStorage.setItem(e,t)),t},t.prototype.report=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=arguments[2];if(3===this.playScene)return!1;e&&this["report_"+e](t,n)},t.prototype.report_40101=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(!this.player)return!1;var t={uint64_data_time:getTimeStampBySecond(),str_stream_url:this.player.cache_.src,u64_timestamp:this.player.startTime,u32_dns_time:"",u32_connect_server_time:parseInt(this.firstFrameDuration),u32_video_decode_type:0,u32_first_frame_down:parseInt(this.firstFrameDuration),u32_first_video_decode_time:parseInt(this.firstIFrameDuration),u32_first_i_frame:parseInt(this.firstIFrameDuration),u32_first_audio_frame_down:parseInt(this.firstFrameDuration),u32_first_audio_render_time:parseInt(this.firstIFrameDuration),u64_err_code:e.u64_err_code||"",str_err_info:e.str_err_info||""},n={app_id:0,data:[Object.assign({},this.liveBaseData,t,e)],module_id:1005,command:40101};Reporter.reportPlayMetrics(n)},t.prototype.report_40100=function(e){var t=this,n=this.player||{};this.blockData=this.blockData||{};var r={u32_cpu_usage:"",u32_app_cpu_usage:"",u32_avg_memory:"",u32_avg_cpu_usage:"",str_stream_url:n.cache_&&n.cache_.src,uint64_data_time:getTimeStampBySecond(),u32_recv_av_diff_time:0,u32_play_av_diff_time:0,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)},i={app_id:0,data:[Object.assign({},this.liveBaseData,r,e)],module_id:1005,command:40100};Reporter.reportPlayMetrics(i,function(){t.resetBlockData()})},t.prototype.report_40102=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=this.player||{},i=0,o=0,a=0;if("{}"!==JSON.stringify(r)){i=this.lagStatus.lagAvg.length>0?this.lagStatus.lagAvg.reduce(function(e,t){return e+t},0)/this.lagStatus.lagAvg.length:0,o=this.bufferBlock.length>0?this.bufferBlock.reduce(function(e,t){return e+t},0)/this.bufferBlock.length:0;a=(r.getVideoPlaybackQuality&&r.getVideoPlaybackQuality()||{}).totalVideoFrames/t.duration}else this.resetLagStatus();var s={uint64_data_time:getTimeStampBySecond(),str_stream_url:r.cache_&&r.cache_.src,u64_timestamp:getTimeStamp(),u32_avg_cpu_usage:"",u32_avg_memory:"",u64_begin_timestamp:r.startTime,u32_result:this.consumeDuration,u64_err_code:t.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:i,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:r.width_,u32_video_height:r.height_,u32_video_avg_fps:a,u32_avg_block_time:i,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},c={app_id:0,data:[Object.assign({},this.liveBaseData,s,t)],module_id:1005,command:40102};return t.u32_delay_report?(localStorage.setItem("tcplayer_data",JSON.stringify(c)),!1):n?(c.data.u32_delay_report=1,n(c)):void Reporter.reportPlayMetrics(c,function(){e.bytes_token=null,localStorage.removeItem("tcplayer_data")})},t.prototype.report_40303=function(){this.setTimingData({initEnd:getTimeStamp()});var e={msg_client_ip:{uint32_ip:""},uint32_service:this.playScene,uint64_data_time:getTimeStampBySecond(),str_stream_url:this.player.cache_.src,uint32_command:40303},t={app_id:0,data:[Object.assign({},this.vodBaseData,e)],module_id:1011,command:40303};Reporter.reportPlayMetrics(t)},t.prototype.report_40304=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=this.lagStatus.lagAvg.length>0?this.lagStatus.lagAvg.reduce(function(e,t){return e+t},0)/this.lagStatus.lagAvg.length:0,i={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(r),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(t.u64_err_code||""),str_err_info:String(t.str_err_info||""),u32_video_decode_type:String(0),u32_speed:this.player&&String(100*this.player.playbackRate())||"1000"},o={app_id:0,data:[Object.assign({},this.vodBaseData,i)],module_id:1011,command:40304};if(n)return n(o);Reporter.reportPlayMetrics(o,function(){e.bytes_token=null,localStorage.removeItem("tcplayer_data")})},t.prototype.setTimingData=function(e){this.timing=videojs.mergeOptions(this.timing,e)},t.prototype.reset=function(){this.playStatus={isFirstPlay:!1}},t.prototype.resetLagStatus=function(){this.lagStatus={lagCount:0,lagging:!1,lagStart:0,lagEnd:0,lagInterval:500,lagDuration:0,lagAvg:[],isFirstLag:!1,skip:!1}},t.prototype.resetBlockData=function(){this.blockData={lagCount_60:0,lagCount_200:0,lagCount_500:0,lagCount_1000:0,lagBlockDuration:0,buffer_avg:0,recv_frames:0,render_frames:0}},t.prototype.reportMTA=function(e,t){},t.prototype.getSystem=function(){return IS_IOS?"ios":IS_ANDROID?"android":IS_WIN?"win":IS_MAC?"mac":"other"},t.prototype.getSystemVer=function(){var e=this.getSystem();return"ios"==e?IOS_VERSION:"android"==e?ANDROID_VERSION:"win"==e?WIN_VER:"mac"==e?MAC_VER:void 0},t.prototype.getBrowser=function(){return IS_FIREFOX?"firefox":IS_EDGE?"edge":IS_MQQB?"mqq":IS_QQB?"qq":IS_TBS?"tbs":IS_CHROME?"chrome":IE_VERSION?"ie":IS_SAFARI?"safari":"other"},t.prototype.getBrowserVer=function(){var e=this.getBrowser();return"firefox"==e?FIREFOX_VER:"edge"==e?EDGE_VER:"chrome"==e?CHROME_VER:"ie"==e?IE_VERSION:"safari"==e?SAFARI_VER:"qq"==e||"mqq"==e?QQ_VER:"tbs"==e?TBS_VERSION:"other"},t.prototype.getDevice=function(){return IS_IOS?"IPHONE":IS_HUAWEI?"HUAWEI":IS_XIAOMI?"XIAOMI":IS_OPPO?"OPPO":IS_VIVO?"VIVO":IS_SX?"SUMSUNG":IS_CP?"COOLPAD":IS_ONE?"ONEPLUS":IS_ZX?"ZTE":"OTHER"},t.prototype.getMediaType=function(){return this.player.src()&&/\/(.+)\.(.+)\?|\/(.+)\.(.+)/.test(this.player.src()),RegExp.$2||RegExp.$4},t.prototype.getNetworkType=function(){var e=navigator.userAgent,t=e.match(/NetType\/\w+/)?e.match(/NetType\/\w+/)[0]:"NetType/other";t=t.toLowerCase().replace("nettype/","");var n;switch(t){case"wifi":n="1";break;case"4g":n="2";break;case"3g":case"3gnet":n="3";break;case"2g":n="4";break;default:n="0xFF"}return n},t}(Plugin$14);videojs.registerPlugin("PlayerMetrics",PlayerMetrics);var Plugin$15=videojs.getPlugin("plugin"),log$14=videojs.log,ProgressMarker=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return n.ready(videojs.bind(i,i.init)),i}return inherits(t,e),t.prototype.init=function(){var e=this.player;if(e.options_.dots){var t=function r(){Array.isArray(e.options_.dots)&&e.options_.dots.length>0&&(e.options_.dots.forEach(function(t){!t.emitted&&t.timeOffset-1e3*(e.currentTime()||0)<500&&(t.emitted=!0,e.trigger("marker",t.content))}),e.options_.dots[e.options_.dots.length-1].emitted||window.requestAnimationFrame(r))};window.requestAnimationFrame(t)}if(IS_IOS||IS_ANDROID)return!1;if(!e.controlBar||!this.player.controlBar.progressControl)return void log$14("ProgressMarker can not initialize without control bar or progress control");log$14("ProgressMarker initializing");var n=e.controlBar.getChild("ProgressControl").getChild("SeekBar");n.getChild("ProgressMarkerGenerator")&&n.removeChild("ProgressMarkerGenerator"),e.options_.plugins.ProgressMarker&&(n.addChild("ProgressMarkerGenerator"),log$14("ProgressMarker initialized"),e.trigger({type:"feature",data:"marker"}))},t}(Plugin$15);videojs.registerPlugin("ProgressMarker",ProgressMarker);var Component$15=videojs.getComponent("Component"),PlayListItem=function(e){function t(n,r){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.createEl=function(){var e=this.options_,t=videojs.dom.createEl("div",{className:"tcp-playlist-item"}),n=videojs.dom.createEl("div",{className:"tcp-playlist-item-video",innerHTML:e.img?'<img src="'+e.img+'" class="tcp-playlist-item-img">':'<img src="https://imgcache.qq.com/open_proj/proj_qcloud_v2/mc_2014/video/console/v2/css/img/vod/default-cover.png" height="100" class="tcp-playlist-item-img">'}),r=videojs.dom.createEl("div",{className:"tcp-playlist-item-duration",textContent:this.timeFormat(e.duration)});n.appendChild(r);var i=videojs.dom.createEl("div",{className:"tcp-playlist-item-desc",textContent:e.text});return t.appendChild(n),t.appendChild(i),this.bindEvent(t),t},t.prototype.bindEvent=function(e){var t=this;videojs.on(e,["click"],function(){t.player_.trigger({type:"playItem",data:t.options_})})},t.prototype.timeFormat=function(e){var t="",n=Math.floor(e/3600);0!=n&&(e-=3600*n,n<10&&(n="0"+n),t+=n+":");var r=Math.floor(e/60);return r<10&&(r="0"+r),e-=60*r,e<10&&(e="0"+e),t+=r+":"+e},t}(Component$15);videojs.registerComponent("PlayListItem",PlayListItem);var Component$16=videojs.getComponent("Component"),PlayListTitle=function(e){function t(n,r){return classCallCheck(this,t),possibleConstructorReturn(this,e.call(this,n,r))}return inherits(t,e),t.prototype.createEl=function(){var e=this.options_;return videojs.dom.createEl("div",{className:"tcp-playlist-title",textContent:e.title})},t}(Component$16);videojs.registerComponent("PlayListTitle",PlayListTitle);var Component$14=videojs.getComponent("Component"),PlayListBox=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.init(),i.activeIndex=-1,i}return inherits(t,e),t.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-playlist-box"})},t.prototype.init=function(){var e=this,t=this.options_.data;this.addChild("PlayListTitle",{title:this.options_.title}),t.forEach(function(t,n){t.index=n,e.addChild("PlayListItem",t)}),this.player_.on("ready",function(){e.options_.loop&&(e.activeIndex=0,e.player_.on("ended",videojs.bind(e,function(){e.player_.trigger({type:"playItem"})})))}),this.player_.on("playItem",function(n){var r=n.data,i=void 0;e.activeIndex=r?r.index:(e.activeIndex+1)%t.length,i=t[e.activeIndex],e.player_.loadVideoByID({fileID:i.fileID,appID:i.appID,psign:i.psign}),e.player_.one("loadedmetadata",videojs.bind(e,function(){e.player_.play()})),document.querySelectorAll(".tcp-playlist-item").forEach(function(e){videojs.dom.removeClass(e,"tcp-playlist-item-active")});var o=document.querySelectorAll(".tcp-playlist-item")[e.activeIndex];videojs.dom.addClass(o,"tcp-playlist-item-active")})},t}(Component$14);videojs.registerComponent("PlayListBox",PlayListBox);var Component$17=videojs.getComponent("Component"),PlayListToggle=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.status=0,i}return inherits(t,e),t.prototype.createEl=function(){var e=videojs.dom.createEl("div",{className:"tcp-playlist-toggle",textContent:"<"});return this.bindEvent(e),e},t.prototype.bindEvent=function(e){var t=this;videojs.on(e,["click"],function(n){t.status=!t.status;var r=document.querySelector(".tcp-playlist");t.status?(e.textContent=">",videojs.dom.addClass(r,"tcp-playlist-open"),videojs.dom.removeClass(r,"tcp-playlist-close")):(videojs.dom.addClass(r,"tcp-playlist-close"),videojs.dom.removeClass(r,"tcp-playlist-open"),e.textContent="<")})},t}(Component$17);videojs.registerComponent("PlayListToggle",PlayListToggle);var Component$13=videojs.getComponent("Component"),PlayList$1=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.init(),i}return inherits(t,e),t.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-playlist tcp-playlist-close"})},t.prototype.init=function(){this.addChild("PlayListToggle"),this.addChild("PlayListBox",this.options_)},t}(Component$13);videojs.registerComponent("PlayList",PlayList$1);var Button$5=videojs.getComponent("Button"),PlayNextButton=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n,r));return i.addClass(),i}return inherits(t,e),t.prototype.addClass=function(){videojs.dom.addClass(this.el_,"vjs-play-next")},t.prototype.update=function(){},t.prototype.handleClick=function(e){this.player_.trigger({type:"playItem"})},t}(Button$5);PlayNextButton.prototype.controlText_="Play Next",videojs.registerComponent("PlayNextButton",PlayNextButton);var Plugin$16=videojs.getPlugin("plugin"),log$15=videojs.log,PlayList=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return IS_IOS||IS_ANDROID?possibleConstructorReturn(i):(i.options=r,r&&r.data instanceof Array&&r.data.length>0&&n.ready(videojs.bind(i,i.init)),i)}return inherits(t,e),t.prototype.init=function(){log$15("PlayList initializing"),this.player.addChild("PlayList",this.options),this.player.controlBar.addChild("PlayNextButton",{},1),log$15("PlayList initialized"),this.player.trigger({type:"feature",data:"playlist"})},t}(Plugin$16);videojs.registerPlugin("PlayList",PlayList);var Plugin$17=videojs.getPlugin("plugin"),log$16=videojs.log,HLSToken=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return log$16("HLSToken",n,r),i.init(r),i}return inherits(t,e),t.prototype.init=function(e){log$16("HLSToken init",e,this.player);var t=this.player;e.token&&(this.options=e,t.on("playcgiend",videojs.bind(this,function(e){this.modifyData(e.data)})))},t.prototype.modifyData=function(e){var t=this;if(log$16("HLSToken modifyData",e),0===e.result.code){var n=e.result.videoInfo;if(n.masterPlayList){var r=n.masterPlayList.url.split("/");r[r.length-1]="voddrm.token."+this.options.token+"."+r[r.length-1],n.masterPlayList.url=r.join("/")}n.transcodeList&&n.transcodeList.length>0&&(n.transcodeList=n.transcodeList.map(function(e){var n=e.url.split("/");return n[n.length-1]="voddrm.token."+t.options.token+"."+n[n.length-1],e.url=n.join("/"),e}))}},t}(Plugin$17);videojs.registerPlugin("HLSToken",HLSToken);var getMessageContents=function(e){var t=(new window_1.DOMParser).parseFromString(String.fromCharCode.apply(null,new Uint16Array(e)),"application/xml"),n=t.getElementsByTagName("HttpHeaders")[0],r={};if(n)for(var i=n.getElementsByTagName("name"),o=n.getElementsByTagName("value"),a=0;a<i.length;a++)r[i[a].childNodes[0].nodeValue]=o[a].childNodes[0].nodeValue;var s=t.getElementsByTagName("Challenge")[0],c=void 0;return s&&(c=window_1.atob(s.childNodes[0].nodeValue)),{headers:r,message:c}},requestPlayreadyLicense=function(e,t,n){var r=getMessageContents(t),i=r.headers,o=r.message;videojs.xhr({uri:e,method:"post",headers:i,body:o,responseType:"arraybuffer"},n)},getSupportedKeySystem=function(e){var t=void 0;return Object.keys(e).forEach(function(n){var r={},i=e[n].audioContentType,o=e[n].videoContentType;i&&(r.audioCapabilities=[{contentType:i}]),o&&(r.videoCapabilities=[{contentType:o}]),t=t?t["catch"](function(e){return window_1.navigator.requestMediaKeySystemAccess(n,[r])}):window_1.navigator.requestMediaKeySystemAccess(n,[r])}),t},makeNewRequest=function(e){var t=e.mediaKeys,n=e.initDataType,r=e.initData,i=e.options,o=e.getLicense,a=e.removeSession,s=e.eventBus,c=t.createSession();c.addEventListener("message",function(e){o(i,e.message).then(function(e){return c.update(e)})["catch"](videojs.log.error.bind(videojs.log.error,"failed to get and set license"))},!1),c.addEventListener("keystatuseschange",function(e){var t=!1;c.keyStatuses.forEach(function(n,r){switch(s.trigger({keyId:r,status:n,target:c,type:"keystatuschange"}),n){case"expired":t=!0;break;case"internal-error":videojs.log.warn('Key status reported as "internal-error." Leaving the session open since we don\'t have enough details to know if this error is fatal.',e)}}),t&&c.close().then(function(){a(r)})},!1),c.generateRequest(n,r)["catch"](videojs.log.error.bind(videojs.log.error,"Unable to create or initialize key session"))},addSession=function(e){var t=e.video,n=e.initDataType,r=e.initData,i=e.options,o=e.getLicense,a=e.removeSession,s=e.eventBus;t.mediaKeysObject?makeNewRequest({mediaKeys:t.mediaKeysObject,initDataType:n,initData:r,options:i,getLicense:o,removeSession:a,eventBus:s}):t.pendingSessionData.push({initDataType:n,initData:r})},setMediaKeys=function(e){var t=e.video,n=e.certificate,r=e.createdMediaKeys,i=e.options,o=e.getLicense,a=e.removeSession,s=e.eventBus;t.mediaKeysObject=r,n&&r.setServerCertificate(n);for(var c=0;c<t.pendingSessionData.length;c++){var l=t.pendingSessionData[c];makeNewRequest({mediaKeys:t.mediaKeysObject,initDataType:l.initDataType,initData:l.initData,options:i,getLicense:o,removeSession:a,eventBus:s})}return t.pendingSessionData=[],t.setMediaKeys(r)},defaultPlayreadyGetLicense=function(e){return function(t,n,r){requestPlayreadyLicense(e,n,function(e,t,n){if(e)return void r(e);r(null,n)})}},defaultGetLicense=function(e){return function(t,n,r){videojs.xhr({uri:e,method:"POST",responseType:"arraybuffer",body:n,headers:{"Content-type":"application/octet-stream"}},function(e,t,n){if(e)return void r(e);r(null,n)})}},promisifyGetLicense=function(e,t){return function(n,r){return new Promise(function(i,o){e(n,r,function(e,n){t&&t.trigger("licenserequestattempted"),e&&o(e),i(n)})})}},standardizeKeySystemOptions=function(e,t){if("string"==typeof t&&(t={url:t}),!t.url&&!t.getLicense)throw new Error("Neither URL nor getLicense function provided to get license");return t.url&&!t.getLicense&&(t.getLicense="com.microsoft.playready"===e?defaultPlayreadyGetLicense(t.url):defaultGetLicense(t.url)),t},standard5July2016=function(e){
25
+ var t=e.video,n=e.initDataType,r=e.initData,i=e.options,o=e.removeSession,a=e.eventBus,s=Promise.resolve();if("undefined"==typeof t.mediaKeysObject){t.mediaKeysObject=null,t.pendingSessionData=[];var c=void 0,l=void 0;if(!(s=getSupportedKeySystem(i.keySystems)))return videojs.log.error("No supported key system found"),Promise.resolve();s=s.then(function(e){return new Promise(function(n,r){if(t.keySystem=e.keySystem,l=standardizeKeySystemOptions(e.keySystem,i.keySystems[e.keySystem]),!l.getCertificate)return void n(e);l.getCertificate(i,function(t,i){if(t)return void r(t);c=i,n(e)})})}).then(function(e){return e.createMediaKeys()}).then(function(e){return setMediaKeys({video:t,certificate:c,createdMediaKeys:e,options:i,getLicense:promisifyGetLicense(l.getLicense,a),removeSession:o,eventBus:a})})["catch"](videojs.log.error.bind(videojs.log.error,"Failed to create and initialize a MediaKeys object"))}return s.then(function(){addSession({video:t,initDataType:n,initData:r,options:i,getLicense:t.keySystem?promisifyGetLicense(standardizeKeySystemOptions(t.keySystem,i.keySystems[t.keySystem]).getLicense,a):null,removeSession:o,eventBus:a})})},stringToUint16Array=function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n},uint8ArrayToString=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},getHostnameFromUri=function(e){var t=document_1.createElement("a");return e=e.match(/.*(skd\:\/\/.+)/i)[1],t.href=e,t.hostname},arrayBuffersEqual=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e),r=new DataView(t),i=0;i<n.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0},arrayBufferFrom=function(e){return e instanceof Uint8Array||e instanceof Uint16Array?e.buffer:e},FAIRPLAY_KEY_SYSTEM="com.apple.fps.1_0",concatInitDataIdAndCertificate=function(e){var t=e.initData,n=e.id,r=e.cert;"string"==typeof n&&(n=stringToUint16Array(n));var i=0,o=new ArrayBuffer(t.byteLength+4+n.byteLength+4+r.byteLength),a=new DataView(o);new Uint8Array(o,i,t.byteLength).set(t),i+=t.byteLength,a.setUint32(i,n.byteLength,!0),i+=4;var s=new Uint16Array(o,i,n.length);return s.set(n),i+=s.byteLength,a.setUint32(i,r.byteLength,!0),i+=4,new Uint8Array(o,i,r.byteLength).set(r),new Uint8Array(o,0,o.byteLength)},addKey=function(e){var t=e.video,n=e.contentId,r=e.initData,i=e.cert,o=e.options,a=e.getLicense,s=e.eventBus;return new Promise(function(e,c){if(t.webkitKeys||t.webkitSetMediaKeys(new window_1.WebKitMediaKeys(FAIRPLAY_KEY_SYSTEM)),!t.webkitKeys)return void c("Could not create MediaKeys");var l=t.webkitKeys.createSession("video/mp4",concatInitDataIdAndCertificate({id:n,initData:r,cert:i}));if(!l)return void c("Could not create key session");l.contentId=n,l.addEventListener("webkitkeymessage",function(e){a(o,n,e,function(e,t){if(s&&s.trigger("licenserequestattempted"),e)return void c(e);l.update(new Uint8Array(t))})}),l.addEventListener("webkitkeyadded",function(t){e(t)}),l.addEventListener("webkitkeyerror",function(e){c(e)})})},defaultGetCertificate=function(e){return function(t,n){videojs.xhr({uri:e,responseType:"arraybuffer"},function(e,t,r){if(e)return void n(e);n(null,new Uint8Array(r))})}},defaultGetContentId=function(e,t){return getHostnameFromUri(uint8ArrayToString(t))},defaultGetLicense$1=function(e){return function(t,n,r,i){videojs.xhr({uri:e,method:"POST",responseType:"arraybuffer",body:r.message,headers:{"Content-type":"application/x-www-form-urlencoded"}},function(e,t,n){if(e)return void i(e);i(null,n)})}},fairplay=function(e){var t=e.video,n=e.initData,r=e.options,i=e.eventBus,o=r.keySystems[FAIRPLAY_KEY_SYSTEM],a=o.getCertificate||defaultGetCertificate(o.certificateUri),s=o.getContentId||defaultGetContentId,c=o.getLicense||defaultGetLicense$1(o.licenseUri);return new Promise(function(e,t){a(r,function(n,r){if(n)return void t(n);e(r)})}).then(function(e){return addKey({video:t,cert:e,initData:n,getLicense:c,options:r,contentId:s(r,n),eventBus:i})})["catch"](function(e){i.player_.error({code:3,message:e})})},PLAYREADY_KEY_SYSTEM="com.microsoft.playready",addKeyToSession=function(e,t,n,r){var i=e.keySystems[PLAYREADY_KEY_SYSTEM];if("function"==typeof i.getKey)return void i.getKey(e,n.destinationURL,n.message.buffer,function(e,n){if(e)return void videojs.log.error("Unable to get key: "+e);t.update(n)});"string"==typeof i&&(i={url:i});var o=i.url||n.destinationURL;requestPlayreadyLicense(o,n.message.buffer,function(e,n){if(r&&r.trigger("licenserequestattempted"),e)return void videojs.log.error("Unable to request key from url: "+o);t.update(new Uint8Array(n.body))})},createSession=function(e,t,n,r){var i=e.msKeys.createSession("video/mp4",t);if(!i)return void videojs.log.error("Could not create key session.");i.addEventListener("mskeymessage",function(e){addKeyToSession(n,i,e,r)}),i.addEventListener("mskeyerror",function(e){videojs.log.error("Unexpected key error from key session with code: "+i.error.code+" and systemCode: "+i.error.systemCode)})},msPrefixed=function(e){var t=e.video,n=e.initData,r=e.options,i=e.eventBus;t.msKeys&&delete t.msKeys;try{t.msSetMediaKeys(new window_1.MSMediaKeys(PLAYREADY_KEY_SYSTEM))}catch(o){return void videojs.log.error("Unable to create media keys for PlayReady key system. Error: "+o.message)}createSession(t,n,r,i)},Plugin$18=videojs.getPlugin("plugin"),hasSession=function(e,t){for(var n=0;n<e.length;n++)if(e[n].initData){var r=arrayBufferFrom(e[n].initData),i=arrayBufferFrom(t);if(arrayBuffersEqual(r,i))return!0}return!1},removeSession=function(e,t){for(var n=0;n<e.length;n++)if(e[n].initData===t)return void e.splice(n,1)},handleEncryptedEvent=function(e,t,n,r){if(!t||!t.keySystems||t.src&&t.src.indexOf("m3u8")>-1)return Promise.resolve();var i=e.initData;return getSupportedKeySystem(t.keySystems).then(function(o){var a=o.keySystem;if(t.keySystems[a]&&t.keySystems[a].pssh&&(i=t.keySystems[a].pssh),!hasSession(n,i)&&i)return n.push({initData:i}),standard5July2016({video:e.target,initDataType:e.initDataType,initData:i,options:t,removeSession:removeSession.bind(null,n),eventBus:r})})},handleWebKitNeedKeyEvent=function(e,t,n){if(t.keySystems&&t.keySystems[FAIRPLAY_KEY_SYSTEM]&&e.initData)return fairplay({video:e.target,initData:e.initData,options:t,eventBus:n})},handleMsNeedKeyEvent=function(e,t,n,r){if(t.keySystems&&t.keySystems[PLAYREADY_KEY_SYSTEM]&&!n.reduce(function(e,t){return e||t.playready},!1)){var i=e.initData;t.keySystems[PLAYREADY_KEY_SYSTEM]&&t.keySystems[PLAYREADY_KEY_SYSTEM].pssh&&(i=t.keySystems[PLAYREADY_KEY_SYSTEM].pssh),i&&(n.push({playready:!0,initData:i}),msPrefixed({video:e.target,initData:i,options:t,eventBus:r}))}},getOptions=function(e){return videojs.mergeOptions(e.currentSource(),e.eme.options)},setupSessions=function(e){var t=e.src();t!==e.eme.activeSrc&&(e.eme.activeSrc=t,e.eme.sessions=[])},onPlayerReady=function(e){"video"===e.$(".vjs-tech").tagName.toLowerCase()&&e.tech_&&(setupSessions(e),e.tech_.el_.addEventListener("encrypted",function(t){if(e.currentSource().keySystems&&e.currentSource().keySystems["com.widevine.alpha"]&&"application/dash+xml"===e.currentSource().type)return!1;setupSessions(e),handleEncryptedEvent(t,getOptions(e),e.eme.sessions,e.tech_)}),e.tech_.el_.addEventListener("webkitneedkey",function(t){setupSessions(e),handleWebKitNeedKeyEvent(t,getOptions(e),e.tech_)}),videojs.browser.IS_EDGE||e.tech_.el_.addEventListener("msneedkey",function(t){setupSessions(e),handleMsNeedKeyEvent(t,getOptions(e),e.eme.sessions,e.tech_)}))},DRM=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.options=r,n.ready(function(){return onPlayerReady(n)}),n.eme={initializeMediaKeys:function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){},i=videojs.mergeOptions(n.currentSource(),r,e),o={initDataType:"cenc",initData:null,target:n.tech_.el_};setupSessions(n),n.tech_.el_.setMediaKeys?handleEncryptedEvent(o,i,n.eme.sessions,n.tech_).then(function(){return t()})["catch"](function(e){return t(e)}):n.tech_.el_.msSetMediaKeys&&(handleMsNeedKeyEvent(o,i,n.eme.sessions,n.tech_),t())},options:r},i}return inherits(t,e),t.prototype.setOptions=function(e){this.options=e,this.player.options_.plugins.DRM=e},t}(Plugin$18),registerPlugin$2=videojs.registerPlugin||videojs.plugin;registerPlugin$2("DRM",DRM);var Plugin$19=videojs.getPlugin("plugin"),dom$2=videojs.dom;if(!window.requestAnimationFrame){var lastTime=0;window.requestAnimationFrame=function(e){var t=(new Date).getTime(),n=Math.max(0,16.7-(t-lastTime)),r=window.setTimeout(function(){e(t+n)},n);return lastTime=t+n,r}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)});var DynamicWatermark=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.options=r||{},i.options.content&&i.init(),i}return inherits(t,e),t.prototype.dispose=function(){this.stopAnimation(),this.player.$(".tcp-dynamic-watermark-container")&&this.player.el().removeChild(this.containerElement),e.prototype.dispose.call(this)},t.prototype.init=function(){var e=this,t=this.player;this.isFirstShow=!0,this.initUI(),this.initStyle(),this.initSpeed(),t.on("loadedmetadata",function(){e.calculateStyle(),e.setStyle(),dom$2.removeClass(e.containerElement,"vjs-hidden")}),t.one("play",function(){e.encModule=new Enc,e.ghostCycle=e.encModule.calculateGhost(e.player.duration()),e.startAnimation()}),t.on(["fullscreenchange","playerresize"],function(){setTimeout(function(){e.calculateStyle()},200)})},t.prototype.initUI=function(){var e=this.player,t=dom$2.createEl("div",{className:"tcp-dynamic-watermark-container vjs-hidden"}),n=dom$2.createEl("div",{innerHTML:encodeHTML(this.options.content),className:"tcp-dynamic-watermark-content"});if(t.appendChild(n),this.options.keep||e.el().appendChild(t),this.containerElement=t,this.markContentElement=n,"image"===this.options.type){var r=document.createElement("img");this.options.width&&(r.style.width=this.options.width),this.options.height&&(r.style.height=this.options.height),r.setAttribute("src",this.options.content),this.markContentElement.innerHTML="",this.markContentElement.appendChild(r)}},t.prototype.initStyle=function(){this.style={containerWidth:"",containerHeight:"",containerLeft:"",containerTop:"",contentLeft:80*Math.random(),contentTop:80*Math.random(),margin:0,padding:0,display:"block",visibility:"visible",opacity:.5,position:"absolute",color:"rgba(255, 255, 255)"}},t.prototype.initSpeed=function(){this.speed=this.options.keep&&0===this.options.speed?.2:this.options.speed},t.prototype.calculateStyle=function(){var e=this.player,t=this.style,n=e.videoWidth(),r=e.videoHeight(),i=dom$2.getBoundingClientRect(e.el()),o=i.width,a=i.height,s=(o/a).toFixed(2),c=(n/r).toFixed(2),l=void 0,u=void 0;c<s?(u=a,l=u*c):c>s?(l=o,u=l/c):c==s&&(l=o,u=a),t.containerLeft=(o-l)/2/o*100,t.containerTop=(a-u)/2/a*100,t.containerWidth=l/o*100,t.containerHeight=u/a*100},t.prototype.setStyle=function(){var e=this.containerElement,t=this.markContentElement,n=this.style;e.style.left=n.containerLeft+"%",e.style.top=n.containerTop+"%",e.style.width=n.containerWidth+"%",e.style.height=n.containerHeight+"%",e.style.display=t.style.display=n.display,e.style.visibility=t.style.visibility=n.visibility,e.style.opacity=t.style.opacity=n.opacity,e.style.position=t.style.position=n.position,e.style.margin=t.style.margin=n.margin,e.style.padding=t.style.padding=n.padding,t.style.left=this.options.left||n.contentLeft+"%",t.style.top=this.options.top||n.contentTop+"%",this.options.right&&(t.style.right=this.options.right),this.options.bottom&&(t.style.bottom=this.options.bottom),t.style.color=this.options.color||n.color,this.options.keep||(e.style.opacity=t.style.opacity=this.options.opacity||n.opacity),"text"===this.options.type&&(t.style.fontSize=this.options.fontSize||"12px",t.innerHTML=encodeHTML(this.options.content))},t.prototype.setContent=function(e){this.options.content=e},t.prototype.startAnimation=function(){var e=this;if(!this.rafID){var t=this.player,n=this.style,r=this.containerElement,i=this.markContentElement,o=1,a=1,s=Math.random(),c=function l(){try{if(!e.isPauseAnimation){var c=Math.min(1,0===e.speed?0:e.speed?e.speed:.2),u=dom$2.getBoundingClientRect(r),d=dom$2.getBoundingClientRect(i),p=d.left-u.left,h=d.top-u.top;p+=c*o*s,h+=c*a*(1-s),p+d.width>u.width?(o=-1,s=Math.random()):p<0&&(o=1,s=Math.random()),h+d.height>u.height?(a=-1,s=Math.random()):h<0&&(a=1,s=Math.random()),p=Math.min(u.width-d.width,p),h=Math.min(u.height-d.height,h),n.contentLeft=p/u.width*100,n.contentTop=h/u.height*100,e.setStyle(),e.options.keep&&(e.waterMarkWillRemove||(e.waterMarkWillRemove=!0,setTimeout(function(){t.el()&&t.el().removeChild(r),e.waterMarkWillRemove=!1},1e3*e.ghostCycle.ghostOn)))}}catch(f){e.player&&e.encModule.handleWatermarkElementAdd(e)}if(e.isStopAnimation)return e.isStopAnimation=!1,cancelAnimationFrame(e.rafID),void(e.rafID=null);0!==e.speed&&requestAnimationFrame(l)};this.rafID=requestAnimationFrame(c)}},t.prototype.resumeAnimation=function(){this.isPauseAnimation=!1},t.prototype.pauseAnimation=function(){this.isPauseAnimation=!0},t.prototype.stopAnimation=function(){this.isStopAnimation=!0},t}(Plugin$19);videojs.registerPlugin("DynamicWatermark",DynamicWatermark);var Plugin$20=videojs.getPlugin("plugin"),XP2PHlsjsPlugin=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.options=r,i.hlsp2p=null,i}return inherits(t,e),t.prototype.startHLSP2P=function(e,t,n){var r=this,i=this.player.tech_,o=i.options_,a=o.xp2pConfig;if(t.isSupported()&&!window.hlsp2p){for(var s=["videoType","xp2pPackage","xp2pAppId","tencentCloudAppId"],c=s,l=Array.isArray(c),u=0,c=l?c:c[Symbol.iterator]();;){var d;if(l){if(u>=c.length)break;d=c[u++]}else{if(u=c.next(),u.done)break;d=u.value}var p=d;if(a[p]===undefined)return}var h={videoId:o.playerId+"_html5_api",url:o.source.src,videoType:a.videoType,cloudAppId:a.tencentCloudAppId,domain:a.xp2pPackage,xp2pAppId:a.xp2pAppId,p2pStartDelay:1e3},f=HLSP2P.create(e,Object.assign(h,a));f.on(HLSP2P.Events.Rollback,function(e){r.destroy(),n&&n(e)}),this.hlsp2p=f}},t.prototype.destroy=function(){this.hlsp2p&&(this.hlsp2p.destroy(),this.hlsp2p=null,window.hlsp2p=undefined)},t.prototype.dispose=function(){this.destroy()},t}(Plugin$20);videojs.registerPlugin("XP2PHlsjsPlugin",XP2PHlsjsPlugin);var Plugin$21=videojs.getPlugin("plugin"),XP2PFlvjsPlugin=function(e){function t(n,r){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.options=r,i}return inherits(t,e),t.prototype.createLoader=function(e,t,n){var r=this.player.tech();return function(e){function i(t,n){classCallCheck(this,i);var r=possibleConstructorReturn(this,e.call(this));return r._qvbp2p=null,r._receivedLength=0,r._config=n,r}return inherits(i,e),i.isSupported=function(){return t&&t.isSupported()},i.prototype.destroy=function(){this._destroyQVBP2P(),e.prototype.destroy.call(this)},i.prototype.open=function(e){this._createQVBP2P(),this._qvbp2p.on(t.ComEvents.STATE_CHANGE,this._onQVBP2PStateChange.bind(this)),this._qvbp2p.setMediaElement(r.el());var n={src:e.url};this._qvbp2p.loadSource(n)},i.prototype.abort=function(){this._destroyQVBP2P()},i.prototype._onQVBP2PStateChange=function(e,n){var r=t.ComCodes;switch(n.code){case r.RECEIVE_BUFFER:this._receiveBuffer(n.payload);break;case r.ROLLBACK:this._rollback(n)}},i.prototype._receiveBuffer=function(e){var t=this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,t,this._receivedLength)},i.prototype._rollback=function(e){n&&n(e)},i.prototype._createQVBP2P=function(){this._qvbp2p&&this._destroyQVBP2P(),this._qvbp2p=t.create(this._config.xp2pConfig),window.qvbp2p=this._qvbp2p},i.prototype._destroyQVBP2P=function(){this._qvbp2p&&(this._qvbp2p.destroy(),this._qvbp2p=null,window.qvbp2p=null)},i}(e.BaseLoader)},t}(Plugin$21);videojs.registerPlugin("XP2PFlvjsPlugin",XP2PFlvjsPlugin);var defaultConfig$1={enableStashBuffer:!1},Html5FlvJS=function(){function e(t,n,r){var i=this;classCallCheck(this,e);var o=function(){var e=window.flvjs;i.flvjs=e;var o=videojs.mergeOptions(defaultConfig$1,r.flvConfig,{xp2pConfig:r.xp2pConfig}),a=n.player();if(window.QVBP2P&&r.xp2pConfig&&r.xp2pConfig.useXP2P&&a.XP2PFlvjsPlugin){var s=a.XP2PFlvjsPlugin().createLoader(e,window.QVBP2P,function(e){i.dispose(),r.xp2pConfig.useXP2P=!1;var t=i.tech.player(),n=i.tech.currentSource_.src;t.src(n)});i.xp2pFlvLoader=s,o.customLoader=s}var c=new e.createPlayer({isLive:!1,url:t.src,type:"flv"},o);i.tech=n,c.on(e.Events.ERROR,videojs.bind(i,i.onError));for(var l in e.Events)!function(t){c.on(e.Events[t],videojs.bind(i,function(e){this.onEvent(t,e)}))}(l);i.flv=c,i._id=(new Date).getTime(),n.el().srcObject&&(n.el().srcObject=null),c.attachMediaElement(n.el()),c.load()};Promise.all([function(){return r.xp2pConfig&&r.xp2pConfig.useXP2P&&"flv"===r.xp2pConfig.format&&!window.QVBP2P?new Promise(function(e){loadScript(XP2P_FLV_PATH,function(){e()})}):Promise.resolve()}(),function(){return window.flvjs?Promise.resolve():new Promise(function(e){loadScript(FLV_PATH,function(){e()})})}()]).then(function(){o()})}return e.prototype.onError=function(e,t,n){var r=this.tech.player();e===this.flvjs.ErrorTypes.NETWORK_ERROR&&r.error({code:2,source:n}),e===this.flvjs.ErrorTypes.MEDIA_ERROR&&r.error({code:3,source:n})},e.prototype.onEvent=function(e,t){this.tech.player().trigger({type:"FLVJS_EVENT",data:{type:e,data:t}})},e.prototype.dispose=function(){if(this.tech.player().pause(),this.tech.flvProvider)try{this.flv.destroy()}catch(e){}this.tech.flvProvider=null},e}(),flvTypeRE=/^video\/flv$/i,flvExtRE=/.flv(?![^?])/i,flvProtoRE=/^(ws:\/\/)/i,FlvSourceHandler={name:"flvSourceHandler",canHandleSource:function(e){return flvTypeRE.test(e.type)?"probably":flvExtRE.test(e.src)||flvProtoRE.test(e.src)?"maybe":""},handleSource:function(e,t,n){return t.flvProvider&&t.flvProvider.dispose(),t.flvProvider=new Html5FlvJS(e,t,n),t.flvProvider},canPlayType:function(e){if(flvTypeRE.test(e))return"probably"}};TCPlayer.mountFlvProvider=mountFlvProvider,mountFlvProvider();var defaultConfig$2={connectRetryCount:2,connectTimeout:5,receiveVideo:!0,receiveAudio:!0,showLog:!1},WebRTCProvider=function(){function e(t,n,r){var i=this;classCallCheck(this,e);var o=function(){i.tech=n,i.player=i.tech.player(),i.playerMetrics=i.player.PlayerMetrics(),i.report=i.player.options_.reportable;var e=window.TXLivePlayer;i.TXLivePlayer=e;var o=videojs.mergeOptions(defaultConfig$2,r.webrtcConfig);r.xp2pConfig&&"webrtc"===r.xp2pConfig.format&&r.xp2pConfig.useXP2P&&Object.assign(o,{p2pEnable:r.xp2pConfig.useXP2P,p2pConfig:{cloudAppid:r.xp2pConfig.tencentCloudAppId,xp2pAppid:r.xp2pConfig.xp2pAppId,appKey:r.xp2pConfig.xp2pAppKey,xp2pDomain:r.xp2pConfig.xp2pPackage}});var a=new e;i.webrtcConfig=o,a.setPlayerView(n.el()),a.setConfig(o),a.setPlayListener({onPlayEvent:videojs.bind(i,i.onPlayEvent),onPlayStats:videojs.bind(i,i.onPlayStats),onPlayReport:videojs.bind(i,i.onPlayReport),onPlaySEI:videojs.bind(i,i.onPlaySEI)}),a.startPlay(t.src),i.webrtcPlayer=a};window.TXLivePlayer?o():loadScript(WEBRTC_PATH,function(){o()})}return e.prototype.onPlayStats=function(e){this.tech.player().trigger({type:"webrtcstats",data:e})},e.prototype.onPlayEvent=function(e,t){var n=this.tech.player();if(n.trigger({type:"debug",data:{code:e,data:t}}),e<-2e3){if(-2003===e&&t&&t.videoActive&&(n.trigger("blocked"),n.trigger({type:"webrtcevent",data:{code:2005}})),-2003===e)return!1;if(-2005===e||-2001===e||-2004===e){n.trigger({type:"debug",data:{message:"debug === webrtc 状态码 "+e+",进入降级逻辑"}});var r=n.options_.webrtcConfig;if(!r||!1!==r.fallback)return this.switchPlaySource(),!1}return n.error({code:e,source:t}),!1}n.trigger({type:"webrtcevent",data:{code:e,data:t}})},e.prototype.onPlayReport=function(e){if(!1===this.report)return!1;40101===e.uint32_command&&this.playerMetrics.report_40101(e),40100===e.uint32_command&&this.playerMetrics.report_40100(e),40102===e.uint32_command&&this.playerMetrics.report_40102(e)},e.prototype.onPlaySEI=function(e){this.tech.player().trigger({type:"webrtcsei",data:e})},e.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},e.prototype.setSource=function(e){var t=this;this.webrtcPlayer.startPlay(e.src),this.tech.player().one("webrtcevent",function(e){-1002===e.data.code&&t.tech.player().play()})},e.prototype.recovery=function(){var e=this,t=this.tech.player(),n=void 0;t.one("waiting",function(){n=setTimeout(function(){t.one("webrtcevent",function(n){if(1004===n.data.code){e.webrtcPlayer&&e.webrtcPlayer.startPlay(t.src()),t.play();var r=function i(e){1002===e.data.code&&(t.play(),t.off("webrtcevent",i))};t.on("webrtcevent",r)}}),e.webrtcPlayer&&e.webrtcPlayer.stopPlay()},2e3)}),t.one("playing",function(){n&&clearTimeout(n)})},e.prototype.switchPlaySource=function(){var e=this.tech.player(),t=void 0,n=this.tech.currentSource_.src;t=this.webrtcConfig&&this.webrtcConfig.fallbackUrl?[{src:this.webrtcConfig.fallbackUrl}]:this.convertProtocol(n),e.bigPlayButton&&e.bigPlayButton.hide(),e.posterImage&&e.posterImage.hide(),e.src(t);var r=videojs.browser.IS_IOS||videojs.browser.IS_ANDROID?"loadeddata":"loadedmetadata",i=function o(){e.play(),e.one("progress",function(){e.play(),e.off(r,o)})};e.on(r,i)},e.prototype.convertProtocol=function(e){var t=[];if(e.indexOf(".sdp")>-1)e=e.replace(".sdp",".flv"),t.push(e.replace(".sdp",".m3u8"));else{var n=e.replace("webrtc://","https://").replace("?",".flv?");-1===n.indexOf("?")&&-1===n.indexOf(".flv")&&(n+=".flv"),hlsSrc=e.replace("webrtc://","https://").replace("?",".m3u8?"),-1===hlsSrc.indexOf("?")&&-1===hlsSrc.indexOf(".m3u8")&&(hlsSrc+=".m3u8"),t.push(hlsSrc)}return t},e}(),webrtcTypeRE=/^webrtc/i,webrtcExtRE=/\.sdp/i,webrtcProtoRE=/^(webrtc:\/\/)/i,sourceHandler={name:"webrtcSourceHandler",canHandleSource:function(e){return webrtcTypeRE.test(e.type)?"probably":webrtcExtRE.test(e.src)||webrtcProtoRE.test(e.src)?"maybe":""},handleSource:function(e,t,n){return t.webrtcProvider&&t.webrtcProvider.dispose(),t.webrtcProvider=new WebRTCProvider(e,t,n),t.webrtcProvider},canPlayType:function(e){if(webrtcTypeRE.test(e))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(e){function t(n,r,i){classCallCheck(this,t);var o=possibleConstructorReturn(this,e.call(this,n,r,i));return r.source&&o.ready(function(){this.setSource(r.source)},!0),r.startTime&&o.ready(function(){this.load(),this.play(),this.currentTime(r.startTime)},!0),window_1.videojs=window_1.videojs||{},window_1.videojs.Flash=window_1.videojs.Flash||{},window_1.videojs.Flash.onReady=t.onReady,window_1.videojs.Flash.onEvent=t.onEvent,window_1.videojs.Flash.onError=t.onError,o.on("seeked",function(){this.lastSeekTarget_=undefined}),o}return inherits(t,e),t.prototype.createEl=function(){var e=this.options_;e.swf||(e.swf=unifyProtocol("//imgcache.qq.com/open/qcloud/video/tcplayer/player.swf"));var n=e.techId,r=mergeOptions$1({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:e.autoplay,preload:e.preload,loop:e.loop,muted:e.muted},e.flashVars),i=mergeOptions$1({wmode:"opaque",bgcolor:"#000000"},e.params),o=mergeOptions$1({id:n,name:n,"class":"vjs-tech"},e.attributes);return this.el_=t.embed(e.swf,r,i,o),this.el_.tech=this,this.el_},t.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},t.prototype.pause=function(){this.el_.vjs_pause()},t.prototype.src=function(e){return e===undefined?this.currentSrc():this.setSrc(e)},t.prototype.setSrc=function(e){var t=this;e=Url$1.getAbsoluteURL(e),this.el_.vjs_src(e),this.autoplay()&&this.setTimeout(function(){return t.play()},0)},t.prototype.seeking=function(){return this.lastSeekTarget_!==undefined},t.prototype.setCurrentTime=function(t){var n=this.seekable();n.length&&(t=t>n.start(0)?t:n.start(0),t=t<n.end(n.length-1)?t:n.end(n.length-1),this.lastSeekTarget_=t,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",t),e.prototype.setCurrentTime.call(this))},t.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},t.prototype.duration=function(){if(0===this.readyState())return NaN;var e=this.el_.vjs_getProperty("duration");return e>=0?e:Infinity},t.prototype.load=function(){this.el_.vjs_load()},t.prototype.poster=function(){this.el_.vjs_getProperty("poster")},t.prototype.setPoster=function(){},t.prototype.seekable=function(){var e=this.duration();return 0===e?createTimeRange():createTimeRange(0,e)},t.prototype.buffered=function(){var e=this.el_.vjs_getProperty("buffered");return 0===e.length?createTimeRange():createTimeRange(e[0][0],e[0][1])},t.prototype.supportsFullScreen=function(){return!1},t.prototype.enterFullScreen=function(){return!1},t.prototype.getVideoPlaybackQuality=function(){var e=this.el_.vjs_getProperty("getVideoPlaybackQuality");return window_1.performance&&"function"==typeof window_1.performance.now?e.creationTime=window_1.performance.now():window_1.performance&&window_1.performance.timing&&"number"==typeof window_1.performance.timing.navigationStart&&(e.creationTime=window_1.Date.now()-window_1.performance.timing.navigationStart),e},t}(Tech$2),_readWrite=["rtmpConnection","rtmpStream","preload","defaultPlaybackRate","playbackRate","autoplay","loop","controls","volume","muted","defaultMuted"],_readOnly=["networkState","readyState","initialTime","startOffsetTime","paused","ended","videoWidth","videoHeight"],_api=Flash.prototype,i$2=0;i$2<_readWrite.length;i$2++)_createGetter(_readWrite[i$2]),_createSetter(_readWrite[i$2]);for(var _i$1=0;_i$1<_readOnly.length;_i$1++)_createGetter(_readOnly[_i$1]);Flash.isSupported=function(){return Flash.version()[0]>=10},Tech$2.withSourceHandlers(Flash),Flash.nativeSourceHandler={},Flash.nativeSourceHandler.canPlayType=function(e){return e in Flash.formats?"maybe":""},Flash.nativeSourceHandler.canHandleSource=function(e,t){var n=void 0;return n=e.type?e.type.replace(/;.*/,"").toLowerCase():function(e){var t=Url$1.getFileExtension(e);return t?"video/"+t:""}(e.src),Flash.nativeSourceHandler.canPlayType(n)},Flash.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Flash.nativeSourceHandler.dispose=function(){},Flash.registerSourceHandler(Flash.nativeSourceHandler),Flash.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},Flash.onReady=function(e){var t=Dom$1.$("#"+e),n=t&&t.tech;n&&n.el()&&Flash.checkReady(n)},Flash.checkReady=function(e){e.el()&&(e.el().vjs_getProperty?e.triggerReady():this.setTimeout(function(){Flash.checkReady(e)},50))},Flash.onEvent=function(e,t){var n=Dom$1.$("#"+e).tech,r=Array.prototype.slice.call(arguments,2);n.setTimeout(function(){n.trigger(t,r)},1)},Flash.onError=function(e,t){var n=Dom$1.$("#"+e).tech;if("srcnotfound"===t)return n.error(4);n.error("FLASH: "+t)},Flash.version=function(){var e="0,0,0";try{e=new window_1.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{navigator$2.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(e=(navigator$2.plugins["Shockwave Flash 2.0"]||navigator$2.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(t){}}return e.split(",")},Flash.embed=function(e,t,n,r){var i=Flash.getEmbedCode(e,t,n,r);return Dom$1.createEl("div",{innerHTML:i}).childNodes[0]},Flash.getEmbedCode=function(e,t,n,r){var i="",o="",a="";return t&&Object.getOwnPropertyNames(t).forEach(function(e){i+=e+"="+t[e]+"&amp;"}),n=mergeOptions$1({movie:e,flashvars:i,allowScriptAccess:"always",allowNetworking:"all"},n),Object.getOwnPropertyNames(n).forEach(function(e){o+='<param name="'+e+'" value="'+n[e]+'" />'}),r=mergeOptions$1({data:e,width:"100%",height:"100%"},r),Object.getOwnPropertyNames(r).forEach(function(e){a+=e+'="'+r[e]+'" '}),'<object type="application/x-shockwave-flash" '+a+">"+o+"</object>"},FlashRtmpDecorator(Flash),Tech$2.getTech("Flash")?(videojs.log.warn("Not using videojs-flash as it appears to already be registered"),videojs.log.warn("videojs-flash should only be used with video.js@6 and above")):videojs.registerTech("Flash",Flash);var FlashlsSourceHandler={},mpegurlRE$1=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;FlashlsSourceHandler.canPlayType=function(e){return mpegurlRE$1.test(e)?"maybe":""},FlashlsSourceHandler.canHandleSource=function(e,t){return"maybe"===FlashlsSourceHandler.canPlayType(e.type)},FlashlsSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},FlashlsSourceHandler.dispose=function(){},videojs.getTech("Flash").registerSourceHandler(FlashlsSourceHandler,0),FlashlsSourceHandler.VERSION="__VERSION__";var Play="播放",Pause="暂停",LIVE="直播",Loaded="加载完毕",Progress="进度",Fullscreen="全屏",Mute="静音",Unmute="取消静音",Subtitles="字幕",Captions="内嵌字幕",Chapters="节目段落",Descriptions="描述",Close="关闭",Replay="重播",Text="文字",White="白",Black="黑",Red="红",Green="绿",Blue="蓝",Yellow="黄",Magenta="紫红",Cyan="青",Background="背景",Window="视窗",Transparent="透明",Opaque="不透明",None="无",Raised="浮雕",Depressed="压低",Uniform="均匀",Dropshadow="下阴影",Casual="舒适",Script="手写体",Reset="重启",Done="完成",auto="自动",Mirror="镜像",CN={Play:Play,Pause:Pause,LIVE:LIVE,Loaded:Loaded,Progress:Progress,Fullscreen:Fullscreen,Mute:Mute,Unmute:Unmute,Subtitles:Subtitles,Captions:Captions,Chapters:Chapters,Descriptions:Descriptions,Close:Close,Replay:Replay,Text:Text,White:White,Black:Black,Red:Red,Green:Green,Blue:Blue,Yellow:Yellow,Magenta:Magenta,Cyan:Cyan,Background:Background,Window:Window,Transparent:Transparent,Opaque:Opaque,None:None,Raised:Raised,Depressed:Depressed,Uniform:Uniform,Dropshadow:Dropshadow,Casual:Casual,Script:Script,Reset:Reset,Done:Done,auto:auto,Mirror:Mirror,"Current Time":"当前时间","Duration Time":"时长","Remaining Time":"剩余时间","Stream Type":"媒体流类型","Non-Fullscreen":"退出全屏","Playback Rate":"播放速度","subtitles off":"关闭字幕","captions off":"关闭内嵌字幕","Close Modal Dialog":"关闭弹窗","descriptions off":"关闭描述","Audio Track":"音轨","You aborted the media playback":"视频播放被终止","A network error caused the media download to fail part-way.":"网络错误导致视频下载中途失败。","The media could not be loaded, either because the server or network failed or because the format is not supported.":"视频因格式不支持或者服务器或网络的问题无法加载。","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"由于视频文件损坏或是该视频使用了你的浏览器不支持的功能,播放终止。","No compatible source was found for this media.":"无法找到此视频兼容的源或者当前环境无法播放该视频。","The media is encrypted and we do not have the keys to decrypt it.":"视频已加密,无法解密。","Play Video":"播放视频","Modal Window":"弹窗","This is a modal window":"这是一个弹窗","This modal can be closed by pressing the Escape key or activating the close button.":"可以按ESC按键或启用关闭按钮来关闭此弹窗。",", opens captions settings dialog":", 开启标题设置弹窗",", opens subtitles settings dialog":", 开启字幕设置弹窗",", opens descriptions settings dialog":", 开启描述设置弹窗",", selected":", 选择","captions settings":"字幕设定","Audio Player":"音频播放器","Video Player":"视频播放器","Progress Bar":"进度小节","Volume Level":"音量","subtitles settings":"字幕设定","descriptions settings":"描述设定","Semi-Transparent":"半透明","Font Size":"字体尺寸","Text Edge Style":"字体边缘样式","Font Family":"字体库","Proportional Sans-Serif":"比例无细体","Monospace Sans-Serif":"单间隔无细体",
26
+ "Proportional Serif":"比例细体","Monospace Serif":"单间隔细体","Small Caps":"小型大写字体","restore all settings to the default values":"恢复全部设定至预设值","Caption Settings Dialog":"字幕设定视窗","Beginning of dialog window. Escape will cancel and close the window.":"开始对话视窗。离开会取消及关闭视窗","End of dialog window.":"结束对话视窗","Request timed out.":"请求超时,请稍后再试。","Could not download the video.":"无法加载视频,请检查网络。","Server is not respond.":"服务器请求失败,请稍后再试。","Server respond error data.":"服务器返回数据有误,请稍后再试。","Last time play at ":"上次看到 ","Resume play":"恢复播放","Powered by Tencent Cloud.":"腾讯云提供技术支持","Rise an internal exception when playing HLS.":"播放 HLS 时出现内部异常。","Authentication failed.":"防盗链参数鉴权失败。","Server failed.":"媒体服务器错误。","Get file error.":"媒体服务器获取文件错误。","The media file does not exist. Please check if the fileID is correct.":"媒体文件不存在,请检查 fileID 是否正确。","No video transcoding information found.":"没有找到视频转码信息。","Current browser not support DRM.":"浏览器不支持当前 DRM 方案。","The trial duration is illegal. The trial duration must be within the video duration.":"试看时长不合法,试看时长要在视频时长范围内。","Param pcfg is not unique.":"pcfg 不唯一。","The license has expired. Please check whether the expiration time setting is reasonable.":"license 过期,请检查过期时间设置是否合理。","Did not find an adaptive stream that can be played.":"没有找到可以播放的自适应码流,<a href='https://cloud.tencent.com/document/product/266/34071' style='color: white;' target='_blank'>查看文档</a>。","Invalid request format, please check the request format.":"请求格式不合法,请检查请求格式。","AppID is not exist, Please check if the AppID is correct.":"AppID 不存在,请检查 AppID 是否正确。","Without anti-leech information.":"没带防盗链检测。","qsign invalid.":"播放参数 qsign 校验失败","psign check failed.":"播放参数 psign 校验失败,<a href='https://cloud.tencent.com/document/product/266/45554' style='color: white' target='_blank'>查看文档</a>。","Other errors.":"其他错误。","Internal error.":"内部错误。","Response data verification failed.":"响应数据校验失败","Video statistic":"视频统计信息","Play Next":"下一个","Current browser not support play this stream, please select another one.":"无法找到此视频兼容的源或者当前环境无法播放该视频,请选择其他视频播放。","Server respond error data.(eg. stream not exist)":"媒体服务器获取数据异常,可能该视频不存在,请选择其他视频播放。","Video play failed, please refresh to start play again.":"视频播放器失败,请刷新并重新播放。","Connection to the server has failed and the number of connection retries has exceeded the set value.":"媒体服务器连接异常,并达到最大重试次数,请检查网络是否正常并刷新重试","Video decoding failure.":"视频解码失败,请选择其他视频播放。"},log=videojs.log;if(Function.prototype.bind&&"object"==("undefined"==typeof console?"undefined":_typeof(console))&&"object"==_typeof(console.log))for(var logFns=["log","info","warn","error","assert","dir","clear","profile","profileEnd"],i=0;i<logFns.length;i++){var method=logFns[i];console[method]=Function.prototype.call.bind(console[method],console)}return videojs.addLanguage("zh-CN",CN),Object.keys(videojs).forEach(function(e){TCPlayer[e]=videojs[e]}),TCPlayer});