You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Video...

1 line
179 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[83,4,5,6],{"+qE3":function(e,t,i){"use strict";var n,s="object"===typeof Reflect?Reflect:null,r=s&&"function"===typeof s.apply?s.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};function a(e){console&&console.warn&&console.warn(e)}n=s&&"function"===typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!==e};function l(){l.init.call(this)}e.exports=l,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var d=10;function c(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function h(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function u(e,t,i,n){var s,r,o;if(c(i),r=e._events,void 0===r?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),r=e._events),o=r[t]),void 0===o)o=r[t]=i,++e._eventsCount;else if("function"===typeof o?o=r[t]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),s=h(e),s>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,a(l)}return e}function _(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},s=_.bind(n);return s.listener=i,n.wrapFn=s,s}function p(e,t,i){var n=e._events;if(void 0===n)return[];var s=n[t];return void 0===s?[]:"function"===typeof s?i?[s.listener||s]:[s]:i?E(s):g(s,s.length)}function f(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"===typeof i)return 1;if(void 0!==i)return i.length}return 0}function g(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function v(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function E(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return d},set:function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");d=e}}),l.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},l.prototype.getMaxListeners=function(){return h(this)},l.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,s=this._events;if(void 0!==s)n=n&&void 0===s.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=s[e];if(void 0===l)return!1;if("function"===typeof l)r(l,this,t);else{var d=l.length,c=g(l,d);for(i=0;i<d;++i)r(c[i],this,t)}return!0},l.prototype.addListener=function(e,t){return u(this,e,t,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,t){return u(this,e,t,!0)},l.prototype.once=function(e,t){return c(t),this.on(e,m(this,e,t)),this},l.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,m(this,e,t)),this},l.prototype.removeListener=function(e,t){var i,n,s,r,a;if(c(t),n=this._events,void 0===n)return this;if(i=n[e],void 0===i)return this;if(i===t||i.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!==typeof i){for(s=-1,r=i.length-1;r>=0;r--)if(i[r]===t||i[r].listener===t){a=i[r].listener,s=r;break}if(s<0)return this;0===s?i.shift():v(i,s),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(e){var t,i,n;if(i=this._events,void 0===i)return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var s,r=Object.keys(i);for(n=0;n<r.length;++n)s=r[n],"removeListener"!==s&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=i[e],"function"===typeof t)this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},l.prototype.listeners=function(e){return p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},l.prototype.listenerCount=f,l.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},"0r65":function(e,t){var i=arguments[3],n=arguments[4],s=arguments[5],r=JSON.stringify;e.exports=function(e,t){for(var a,o=Object.keys(s),l=0,d=o.length;l<d;l++){var c=o[l],h=s[c].exports;if(h===e||h&&h.default===e){a=c;break}}if(!a){a=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var u={};for(l=0,d=o.length;l<d;l++){c=o[l];u[c]=c}n[a]=["function(require,module,exports){"+e+"(self); }",u]}var _=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[a]=a,n[_]=["function(require,module,exports){var f = require("+r(a)+");(f.default ? f.default : f)(self);}",m];var p={};function f(e){for(var t in p[e]=!0,n[e][1]){var i=n[e][1][t];p[i]||f(i)}}f(_);var g="("+i+")({"+Object.keys(p).map((function(e){return r(e)+":["+n[e][0]+","+r(n[e][1])+"]"})).join(",")+"},{},["+r(_)+"])",v=window.URL||window.webkitURL||window.mozURL||window.msURL,E=new Blob([g],{type:"text/javascript"});if(t&&t.bare)return E;var y=v.createObjectURL(E),b=new Worker(y);return b.objectURL=y,b}},"1vsH":function(e,t,i){"use strict";i.d(t,"i",(function(){return l})),i.d(t,"k",(function(){return d})),i.d(t,"e",(function(){return c})),i.d(t,"h",(function(){return h})),i.d(t,"c",(function(){return u})),i.d(t,"f",(function(){return _})),i.d(t,"g",(function(){return m})),i.d(t,"a",(function(){return p})),i.d(t,"y",(function(){return f})),i.d(t,"x",(function(){return g})),i.d(t,"z",(function(){return v})),i.d(t,"A",(function(){return E})),i.d(t,"r",(function(){return y})),i.d(t,"q",(function(){return b})),i.d(t,"o",(function(){return S})),i.d(t,"n",(function(){return w})),i.d(t,"w",(function(){return A})),i.d(t,"j",(function(){return L})),i.d(t,"v",(function(){return R})),i.d(t,"t",(function(){return k})),i.d(t,"l",(function(){return O})),i.d(t,"u",(function(){return C})),i.d(t,"m",(function(){return D})),i.d(t,"d",(function(){return I})),i.d(t,"b",(function(){return x})),i.d(t,"s",(function(){return B})),i.d(t,"p",(function(){return U}));var n=i("q1tI"),s=i.n(n),r=i("xKgJ"),a=i("aCH8"),o=i.n(a),l=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],d=e=>{var t={[-1]:"\u91cd\u505a\u4e2d",0:"\u672a\u5f00\u542f",1:"\u672a\u901a\u5173",2:"\u6309\u65f6\u901a\u5173"};return t[e]||"\u8fdf\u4ea4\u901a\u5173"},c=e=>{var t,i,n={[-1]:{name:"\u91cd\u505a\u4e2d",class:"c-orange"},0:{name:"\u672a\u5f00\u542f",class:"c-black"},1:{name:"\u672a\u901a\u5173",class:"c-red"},2:{name:"\u6309\u65f6\u901a\u5173",class:"c-green"},3:{name:"\u8fdf\u4ea4\u901a\u5173",class:"c-orange"}};return s.a.createElement("span",{className:null===n||void 0===n||null===(t=n[e.status])||void 0===t?void 0:t["class"]},null===n||void 0===n||null===(i=n[e.status])||void 0===i?void 0:i["name"])},h=e=>{var t=e.status,i={0:{class:"tag-style bg-blue ml10",name:"\u5f85\u9009\u4e2d"},1:{class:"tag-style bg-blue ml10",name:"\u5f85\u786e\u8ba4"},2:{class:"tag-style bg-pink ml10",name:"\u5df2\u786e\u8ba4"}};try{return s.a.createElement("span",{className:i[t]["class"]},i[t]["name"])}catch(n){console.log("utils.StatusGraduationProjectTags",e.status)}},u={1:"\u672a\u53d1\u5e03",2:"\u8003\u8bd5\u4e2d",3:"\u5df2\u622a\u6b62",4:"\u5df2\u7ed3\u675f"},_={1:"\u672a\u53d1\u5e03",2:"\u63d0\u4ea4\u4e2d",3:"\u5df2\u622a\u6b62",4:"\u5df2\u7ed3\u675f"},m=e=>{var t={"\u516c\u5f00":{class:"tag-style bg-blue ml10"},"\u5df2\u5f00\u542f\u8865\u4ea4":{class:"tag-style bg-green ml10"},"\u672a\u5f00\u542f\u8865\u4ea4":{class:"tag-style bg-pink ml10"},"\u672a\u53d1\u5e03":{class:"tag-style bg-light-blue ml10"},"\u533f\u540d\u4f5c\u54c1":{class:"tag-style bg-cyan ml10"},"\u5df2\u9009\u62e9":{class:"tag-style bg-grey-ede ml10"},"\u5df2\u7ed3\u675f":{class:"tag-style bg-grey-ede ml10"},"\u63d0\u4ea4\u4e2d":{class:"tag-style bg-blue ml10"},"\u533f\u8bc4\u4e2d":{class:"tag-style bg-blue ml10"},"\u7533\u8bc9\u4e2d":{class:"tag-style bg-blue ml10"},"\u8003\u8bd5\u4e2d":{class:"tag-style bg-light-blue ml10"},"\u8865\u4ea4\u4e2d":{class:"tag-style bg-blue ml10"},"\u8bc4\u9605\u4e2d":{class:"tag-style bg-blue ml10"},"\u5f85\u9009\u4e2d":{class:"tag-style bg-blue ml10"},"\u4ea4\u53c9\u8bc4\u9605\u4e2d":{class:"tag-style bg-light-orange ml10"},"\u5df2\u5f00\u542f\u4ea4\u53c9\u8bc4\u9605":{class:"tag-style bg-lightblue-purple ml10"},"\u5f85\u786e\u8ba4":{class:"tag-style bg-lightblue-purple ml10"},"\u5f85\u5904\u7406":{class:"tag-style bg-lightblue-purple ml10"},"\u79c1\u6709":{class:"tag-style bg-lightblue-purple ml10"},"\u672a\u63d0\u4ea4":{class:"tag-style bg-lightblue-purple ml10"},"\u5df2\u786e\u8ba4":{class:"tag-style bg-light-pink ml10"},"\u5df2\u53d1\u5e03":{class:"tag-style bg-light-blue ml10"},"\u5df2\u622a\u6b62":{class:"tag-style bg-light-pink ml10"},"\u5f00\u53d1\u8bfe\u7a0b":{class:"tag-style bg-orange ml10"},"\u5df2\u5f00\u64ad":{class:"tag-style-border border-green c-green ml10"},"\u672a\u5f00\u64ad":{class:"tag-style-border border-light-black ml10"},"\u6309\u65f6\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u8fdf\u4ea4\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u672a\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u672a\u5f00\u542f":{class:"tag-style-border border-light-black ml10"}},i=[];e.is_random&&i.push(s.a.createElement("span",{className:"tag-style bg-blue ml10"},"\u968f\u673a"));try{e.status&&e.status.map((e,n)=>{i.push(s.a.createElement("span",{key:n,className:t[e]&&t[e]["class"]},e))})}catch(n){console.log("utils.status.tag:",n,e.status)}return i},p=e=>{var t,i,n={0:{name:"\u672a\u63d0\u4ea4",class:"c-black"},1:{name:"\u6309\u65f6\u63d0\u4ea4",class:"c-green"},2:{name:"\u5ef6\u65f6\u63d0\u4ea4",class:"c-red"}};return s.a.createElement("span",{className:null===(t=n[e.status])||void 0===t?void 0:t["class"]},null===(i=n[e.status])||void 0===i?void 0:i["name"])},f=e=>{e=new Date(e).getTime();var t=6e4,i=60*t,n=24*i,s="",r=(new Date).getTime(),a=r-e;if(a<0)return console.log("\u65f6\u95f4\u4e0d\u5bf9\u52b2,\u670d\u52a1\u5668\u521b\u5efa\u65f6\u95f4\u4e0e\u5f53\u524d\u65f6\u95f4\u4e0d\u540c\u6b65"),"\u521a\u521a";var o=parseInt(a/n,10),l=parseInt(a/i,10),d=parseInt(a/t,10);return s=o>30?""+g(e,"yyyy-MM-dd"):o>1?o+"\u5929\u524d":1==o?"\u6628\u5929":l>=1?l+"\u5c0f\u65f6\u524d":d>=5?d+"\u5206\u949f\u524d":"\u521a\u521a",s},g=(e,t)=>{"string"==typeof e&&(e.indexOf("T")>=0&&(e=e.replace("T"," ")),e=new Date(Date.parse(e.replace(/-/g,"/")))),e=new Date(e);var i={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()},n=[["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"]];for(var s in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/(w+)/.test(t)&&(t=t.replace(RegExp.$1,n[RegExp.$1.length-1][e.getDay()])),i)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[s]:("00"+i[s]).substr((""+i[s]).length)));return t},v=e=>{if(!e)return"0";console.log("time:",e);var t=60,i=60*t,n=24*i,s=e/n,r=e/i,a=e/t;return s>=1?parseInt(s.toString())+"\u5929"+Math.floor(r%24)+"\u65f6"+Math.floor(a%60)+"\u5206"+Math.floor(e%60)+"\u79d2":r>1?parseInt(r.toString())+"\u65f6"+Math.floor(a%60)+"\u5206"+Math.floor(e%60)+"\u79d2":a>=1?parseInt(a.toString())+"\u5206"+Math.floor(e%60)+"\u79d2":e+"\u79d2"},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,i=0;if(e){i=e.length;for(var n=0;n<i;n++){var s=e.charCodeAt(n);s>=55296&&s<=56319&&(i--,n++)}}return i<=t},y=(e,t,i)=>{if(t){var n=/[`~!@#$%^&*()\-+=<>?:"{}|,.\/;'\\[\]\xb7~\uff01@#\uffe5%\u2026\u2026&*\uff08\uff09\u2014\u2014\-+={}|\u300a\u300b\uff1f\uff1a\u201c\u201d\u3010\u3011\u3001\uff1b\u2018\u2019\uff0c\u3002\u3001]/im,s=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,r=s.test(t),a=n.test(t);(!0===r||!0===a||t.length<2||t.length>=21)&&i("2-20\u4f4d\u4e2d\u82f1\u6587\u3001\u6570\u5b57\u53ca\u4e0b\u5212\u7ebf")}i()},b=(e,t,i)=>{if(t){var n=/[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]\xb7~\uff01@#\uffe5%\u2026\u2026&\uff08\uff09\u2014\u2014\-+={}|\u300a\u300b\uff1f\uff1a\u201c\u201d\u3010\u3011\u3001\uff1b\u2018\u2019\uff0c\u3002\u3001]/im,s=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,r=s.test(t),a=n.test(t);(!0===r||!0===a||t.length<2||t.length>=11)&&i("2-10\u4f4d\u4e2d\u82f1\u6587\u3001\u6570\u5b57")}i()},S=e=>{if(!e)return"";for(var t=e.length-1,i="",n=0;n<t;n++)i+="*";var s=e.substr(0,1)+i;return s},w=(e,t)=>{var i=new FileReader;i.addEventListener("load",()=>t(i.result)),i.readAsDataURL(e)};function A(e){var t="79e33abd4b6588941ab7622aed1e67e8";return o()(t+e)}function L(e,t){var i=document.createElement("a");document.body.appendChild(i),i.href=t,i.download=e;var n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),i.dispatchEvent(n),document.body.removeChild(i)}var R=e=>{var t=e.url,i=e.query;return t?(i&&function(){var e=[],n=function(t){i.hasOwnProperty(t)&&!N(i[t])&&("object"===typeof i[t]?i[t].map(n=>{e.push("".concat(t,"[]=").concat(i[t]))}):e.push("".concat(t,"=").concat(i[t])))};for(var s in i)n(s);t=-1!==t.indexOf("?")?"".concat(t,"&").concat(e.join("&")):"".concat(t,"?").concat(e.join("&"))}(),t):""};function k(){for(var e=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],i=!0,n=0;n<t.length;n++)if(e.indexOf(t[n])>0){i=!1;break}return i}var T,O=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return null===t||void 0===t||null===(e=t.toString())||void 0===e?void 0:e.replace(/\B(?=(\d{3})+(?!\d))/g,",")},C=e=>{var t=document.createElement("a");t.target="_blank",document.body.appendChild(t),t.href=e;var i=document.createEvent("MouseEvents");i.initEvent("click",!1,!1),t.dispatchEvent(i),document.body.removeChild(t)},D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.length<=6?e:"".concat(e.substring(0,3),"...").concat(e.substring(e.length-3,e.length))},I=()=>{var e=(new Date).getHours(),t=(new Date).getMinutes();return t>=30?(e++,t="00"):t="30",e+":"+t},x=()=>{var e=(new Date).getHours(),t=(new Date).getMinutes();return t>=30?(e++,t="00"):t="30",(new Date).toLocaleDateString().replace(/\//g,"-")+" "+e+":"+t};(function(e){e["Number"]="Number",e["String"]="String",e["Boolean"]="Boolean",e["Object"]="Object",e["Array"]="Array",e["Function"]="Function"})(T||(T={}));var M=e=>{var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1)},B=e=>M(e)===T.Array?0===e.length:M(e)===T.Object?0===Object.keys(e).length:!e,N=e=>void 0===e||null===e;var U=e=>{switch(e.container_type){case"ApplyUserAuthentication":if("Apply"===e.tiding_type){if(1===e.auth_type)return window.open("/admins/identity_authentications");if(2===e.auth_type)return window.open("/admins/professional_authentications")}return"System"===e.tiding_type?window.open("/account/certification"):void 0;case"CancelUserAuthentication":return window.open("/account/certification");case"CancelUserProCertification":return window.open("/account/certification");case"ApplyAddDepartment":return"Apply"===e.tiding_type?window.open("/admins/department_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAddSchools":return"Apply"===e.tiding_type?window.open("/admins/unit_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAction":switch(e.parent_container_type){case"ApplyShixun":if("Apply"===e.tiding_type)return window.open("/admins/shixun_authorizations");if("System"===e.tiding_type)return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"ApplySubject":if("Apply"===e.tiding_type)return window.open("/admins/subject_authorizations");if("System"===e.tiding_type)return window.open("/paths/".concat(e.parent_container_id));case"TrialAuthorization":if("Apply"===e.tiding_type)return window.open("/managements/trial_authorization");if("System"===e.tiding_type)return window.open("/account/profile")}return;case"JoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));case"StudentJoinCourse":if("Apply"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));if("System"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/students"));case"DealCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"TeacherJoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"Course":if("Delete"===e.tiding_type)return;return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"ArchiveCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.container_id));case"Shixun":return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"Subject":return window.open("/paths/".concat(e.container_id));case"JournalsForMessage":switch(e.parent_container_type){case"Principal":return"";case"HomeworkCommon":return"normal"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=1")):"";case"GraduationTopic":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return"normal"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=1")):""}case"Memo":return window.open("/forums/".concat(e.parent_container_id));case"Message":return window.open("/forums/");case"Watcher":return window.open("/users/".concat(e.trigger_user.login,"/classrooms"));case"PraiseTread":return"";case"Grade":return"";case"JoinProject":return window.open("/projects/".concat(e.container_id));case"ReporterJoinProject":return window.open("/projects/".concat(e.container_id));case"DealProject":return window.open("/projects/".concat(e.container_id));case"ManagerJoinProject":return window.open("/projects/".concat(e.container_id));case"Poll":switch(e.parent_container_type){case"CommitPoll":return window.open("\t/courses/".concat(e.belong_container_id,"/polls/").concat(e.container_id));default:return window.open("\t/courses/".concat(e.belong_container_id,"/polls/").concat(e.container_id))}case"Exercise":switch(e.parent_container_type){case"CommitExercise":return window.open("\t/courses/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"));case"ExerciseScore":return window.open("\t/courses/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"));default:return window.open("/classrooms/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"))}case"StudentGraduationTopic":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"DealStudentTopicSelect":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"GraduationTask":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWork":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWorkScore":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.parent_container_id));case"HomeworkCommon":switch(e.parent_container_type){case"AnonymousCommentFail":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"HomeworkPublish":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"AnonymousAppeal":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));default:if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"))}case"StudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.trigger_user.id,"/review/").concat(e.parent_container_id));case"StudentWorksScoresAppeal":return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.trigger_user.id,"/review/").concat(e.parent_container_id));case"ChallengeWorkScore":return"";case"SendMessage":return window.open("/managements/mirror_repository");case"Journal":return window.open("/issues/".concat(e.parent_container_id));case"Issue":return window.open("/issues/".concat(e.container_id));case"PullRequest":return window.open("/projects/".concat(e.parent_container_id,"/pull_requests"));case"Department":return window.open("/account/profile");case"Library":if("Apply"===e.tiding_type)return window.open("/admins/library_applies");if("System"===e.tiding_type)return window.open("/moop_cases/".concat(e.container_id));case"ProjectPackage":if("Destroyed"===e.tiding_type)return;return"Destroyed_end"===e.tiding_type?void 0:"Apply"===e.tiding_type?window.open("/admins/project_package_applies"):window.open("/crowdsourcing/".concat(e.container_id));case"Discuss":return"Hack"===e.parent_container_type&&e.extra?window.open("/myproblems/".concat(e.extra,"/comment")):window.open("/shixuns/".concat(e.identifier,"/shixun_discuss"));case"Video":return"Apply"===e.tiding_type?window.open("/admins/video_applies"):"System"===e.tiding_type?window.open("/users/".concat(null===(t=Object(r["o"])())||void 0===t?void 0:t.login,"/videos")):"";var t;case"PublicCourseStart":return window.open("/classrooms/".concat(e.container_id,"/informs"));case"SubjectStartCourse":return window.open("/paths/".concat(e.container_id));case"ResubmitStudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));case"AdjustScore":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id));case"LiveLink":return window.open("/classrooms/".concat(e.belong_container_id,"/course_videos?open=live"));case"Hack":if(e.extra&&"HackDelete"!==e.parent_container_type)return window.open("/problems/".concat(e.extra,"/edit"));default:return}}},BdwD:function(e,t,i){"use strict";var n=i("k1fw"),s=i("q1tI"),r=i.n(s),a=e=>{var t=e.styles,s=void 0===t?{}:t,a=e.customText;return r.a.createElement("section",{className:"tc animated fadeIn",style:Object(n["a"])(Object(n["a"])({},{color:"#999",margin:"200px auto"}),s)},r.a.createElement("img",{src:i("FOrL")}),r.a.createElement("p",{className:"mt20"},"\u6682\u65f6\u8fd8\u6ca1\u6709\u76f8\u5173\u6570\u636e\u54e6!"),a&&r.a.createElement("p",{className:"mt20"},a))};t["a"]=a},E2g8:function(e,t,i){(function(t,i){(function(t,i){e.exports=i()})(0,(function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function n(e){return"function"===typeof e}var s=void 0;s=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var r=s,a=0,o=void 0,l=void 0,d=function(e,t){S[a]=e,S[a+1]=t,a+=2,2===a&&(l?l(w):L())};function c(e){l=e}function h(e){d=e}var u="undefined"!==typeof window?window:void 0,_=u||{},m=_.MutationObserver||_.WebKitMutationObserver,p="undefined"===typeof self&&"undefined"!==typeof t&&"[object process]"==={}.toString.call(t),f="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;function g(){return function(){return t.nextTick(w)}}function v(){return"undefined"!==typeof o?function(){o(w)}:b()}function E(){var e=0,t=new m(w),i=document.createTextNode("");return t.observe(i,{characterData:!0}),function(){i.data=e=++e%2}}function y(){var e=new MessageChannel;return e.port1.onmessage=w,function(){return e.port2.postMessage(0)}}function b(){var e=setTimeout;return function(){return e(w,1)}}var S=new Array(1e3);function w(){for(var e=0;e<a;e+=2){var t=S[e],i=S[e+1];t(i),S[e]=void 0,S[e+1]=void 0}a=0}function A(){try{var e=Function("return this")().require("vertx");return o=e.runOnLoop||e.runOnContext,v()}catch(t){return b()}}var L=void 0;function R(e,t){var i=this,n=new this.constructor(O);void 0===n[T]&&Y(n);var s=i._state;if(s){var r=arguments[s-1];d((function(){return H(s,n,r,i._result)}))}else z(i,n,e,t);return n}function k(e){var t=this;if(e&&"object"===typeof e&&e.constructor===t)return e;var i=new t(O);return F(i,e),i}L=p?g():m?E():f?y():void 0===u?A():b();var T=Math.random().toString(36).substring(2);function O(){}var C=void 0,D=1,I=2;function x(){return new TypeError("You cannot resolve a promise with itself")}function M(){return new TypeError("A promises callback cannot return that same promise.")}function B(e,t,i,n){try{e.call(t,i,n)}catch(s){return s}}function N(e,t,i){d((function(e){var n=!1,s=B(i,t,(function(i){n||(n=!0,t!==i?F(e,i):V(e,i))}),(function(t){n||(n=!0,G(e,t))}),"Settle: "+(e._label||" unknown promise"));!n&&s&&(n=!0,G(e,s))}),e)}function U(e,t){t._state===D?V(e,t._result):t._state===I?G(e,t._result):z(t,void 0,(function(t){return F(e,t)}),(function(t){return G(e,t)}))}function P(e,t,i){t.constructor===e.constructor&&i===R&&t.constructor.resolve===k?U(e,t):void 0===i?V(e,t):n(i)?N(e,t,i):V(e,t)}function F(t,i){if(t===i)G(t,x());else if(e(i)){var n=void 0;try{n=i.then}catch(s){return void G(t,s)}P(t,i,n)}else V(t,i)}function j(e){e._onerror&&e._onerror(e._result),W(e)}function V(e,t){e._state===C&&(e._result=t,e._state=D,0!==e._subscribers.length&&d(W,e))}function G(e,t){e._state===C&&(e._state=I,e._result=t,d(j,e))}function z(e,t,i,n){var s=e._subscribers,r=s.length;e._onerror=null,s[r]=t,s[r+D]=i,s[r+I]=n,0===r&&e._state&&d(W,e)}function W(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n=void 0,s=void 0,r=e._result,a=0;a<t.length;a+=3)n=t[a],s=t[a+i],n?H(i,n,s,r):s(r);e._subscribers.length=0}}function H(e,t,i,s){var r=n(i),a=void 0,o=void 0,l=!0;if(r){try{a=i(s)}catch(d){l=!1,o=d}if(t===a)return void G(t,M())}else a=s;t._state!==C||(r&&l?F(t,a):!1===l?G(t,o):e===D?V(t,a):e===I&&G(t,a))}function q(e,t){try{t((function(t){F(e,t)}),(function(t){G(e,t)}))}catch(i){G(e,i)}}var K=0;function X(){return K++}function Y(e){e[T]=K++,e._state=void 0,e._result=void 0,e._subscribers=[]}function Q(){return new Error("Array Methods must be provided an Array")}var Z=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(O),this.promise[T]||Y(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?V(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&V(this.promise,this._result))):G(this.promise,Q())}return e.prototype._enumerate=function(e){for(var t=0;this._state===C&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,n=i.resolve;if(n===k){var s=void 0,r=void 0,a=!1;try{s=e.then}catch(l){a=!0,r=l}if(s===R&&e._state!==C)this._settledAt(e._state,t,e._result);else if("function"!==typeof s)this._remaining--,this._result[t]=e;else if(i===ne){var o=new i(O);a?G(o,r):P(o,e,s),this._willSettleAt(o,t)}else this._willSettleAt(new i((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,i){var n=this.promise;n._state===C&&(this._remaining--,e===I?G(n,i):this._result[t]=i),0===this._remaining&&V(n,this._result)},e.prototype._willSettleAt=function(e,t){var i=this;z(e,void 0,(function(e){return i._settledAt(D,t,e)}),(function(e){return i._settledAt(I,t,e)}))},e}();function J(e){return new Z(this,e).promise}function $(e){var t=this;return r(e)?new t((function(i,n){for(var s=e.length,r=0;r<s;r++)t.resolve(e[r]).then(i,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function ee(e){var t=this,i=new t(O);return G(i,e),i}function te(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ie(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var ne=function(){function e(t){this[T]=X(),this._result=this._state=void 0,this._subscribers=[],O!==t&&("function"!==typeof t&&te(),this instanceof e?q(this,t):ie())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this,i=t.constructor;return n(e)?t.then((function(t){return i.resolve(e()).then((function(){return t}))}),(function(t){return i.resolve(e()).then((function(){throw t}))})):t.then(e,e)},e}();function se(){var e=void 0;if("undefined"!==typeof i)e=i;else if("undefined"!==typeof self)e=self;else try{e=Function("return this")()}catch(s){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(s){}if("[object Promise]"===n&&!t.cast)return}e.Promise=ne}return ne.prototype.then=R,ne.all=J,ne.race=$,ne.resolve=k,ne.reject=ee,ne._setScheduler=c,ne._setAsap=h,ne._asap=d,ne.polyfill=se,ne.Promise=ne,ne}))}).call(this,i("Q2Ig"),i("yLpj"))},FOrL:function(e,t){e.exports="data:image/png;base64,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"},"O+cW":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAxBAMAAACYObKJAAAAJ1BMVEVHcExNrf9Rsf9Mrf9NrP9Nrv9YwP9Orv9Mrf9Mrf9PsP9Nrv9MrP+DjnPJAAAADHRSTlMAfxrg9o0JTZ/CMF1yzN3wAAABGUlEQVQ4y9XUMUsDQRAF4OEgl5A00VaLa21FDIRtRNKlELuAxUm6VAEbC4t0aa4K2F0RCFhZGMgfkDsx0fejnA0pvM3Mbpu89n0HN8vuEFH8fAUxt9OUbJ6gpmP7Gjy5Y/DgA19EdWD9RmJGGTCmIYoxKakbXNMLvkmNLTNMdNDAmgzmOmiioD5SHcQoCSBPuD008HgaAHl57weAK/aAK/aBIwRQFRKoCBGgbAcAfkPgMwQuA+Am8YNe4p/ify+BSi+Aau8C4/YuWLm9C+L0CK69CAwSvY/4+ef40EELGzrnNaRmyHfnnbeMmgw/vIYw0/oL8AKLDMrXEzGDPgqeYOHbtF07Sq73m+0RtIzWF7sTiJbyP5zZ7/8AWuhzsJnNY38AAAAASUVORK5CYII="},Q1r0:function(e,t,i){e.exports={flex_box_center:"flex_box_center___1BCjE",flex_space_between:"flex_space_between___3ZC72",flex_box_vertical_center:"flex_box_vertical_center___2m7eo",flex_box_center_end:"flex_box_center_end___3jEGb",flex_box_column:"flex_box_column___3mjRP",bg:"bg___2o0RB",menu:"menu___1Tbbg",desc:"desc___12Y2T",otherLink:"otherLink___3pVKk",card:"card___15Kgs"}},QOUV:function(e,t,i){"use strict";i.d(t,"a",(function(){return it}));i("2qtc");var n=i("kLXV"),s=(i("+L6B"),i("2/Rp")),r=(i("miYZ"),i("tsqr")),a=(i("5NDa"),i("5rEg")),o=i("q1tI"),l=i.n(o),d=i("WmNS"),c=i.n(d),h=i("9og8");class u{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");let t=Object(e);for(let i=1;i<arguments.length;i++){let e=arguments[i];if(void 0!==e&&null!==e)for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}return t},"function"!==typeof self.Promise&&i("E2g8").polyfill()}}u.install();var _=u,m=i("+qE3"),p=i.n(m);class f{static e(e,t){e&&!f.FORCE_GLOBAL_TAG||(e=f.GLOBAL_TAG);let i=`[${e}] > ${t}`;f.ENABLE_CALLBACK&&f.emitter.emit("log","error",i),f.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}static i(e,t){e&&!f.FORCE_GLOBAL_TAG||(e=f.GLOBAL_TAG);let i=`[${e}] > ${t}`;f.ENABLE_CALLBACK&&f.emitter.emit("log","info",i),f.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}static w(e,t){e&&!f.FORCE_GLOBAL_TAG||(e=f.GLOBAL_TAG);let i=`[${e}] > ${t}`;f.ENABLE_CALLBACK&&f.emitter.emit("log","warn",i),f.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}static d(e,t){e&&!f.FORCE_GLOBAL_TAG||(e=f.GLOBAL_TAG);let i=`[${e}] > ${t}`;f.ENABLE_CALLBACK&&f.emitter.emit("log","debug",i),f.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}static v(e,t){e&&!f.FORCE_GLOBAL_TAG||(e=f.GLOBAL_TAG);let i=`[${e}] > ${t}`;f.ENABLE_CALLBACK&&f.emitter.emit("log","verbose",i),f.ENABLE_VERBOSE&&console.log(i)}}f.GLOBAL_TAG="flv.js",f.FORCE_GLOBAL_TAG=!1,f.ENABLE_ERROR=!0,f.ENABLE_INFO=!0,f.ENABLE_WARN=!0,f.ENABLE_DEBUG=!0,f.ENABLE_VERBOSE=!0,f.ENABLE_CALLBACK=!1,f.emitter=new p.a;var g=f;class v{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}get lastSecondKBps(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}var E=v;class y{constructor(e){this._message=e}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class b extends y{constructor(e){super(e)}get name(){return"IllegalStateException"}}class S extends y{constructor(e){super(e)}get name(){return"InvalidArgumentException"}}class w extends y{constructor(e){super(e)}get name(){return"NotImplementedException"}}const A={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},L={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class R{constructor(e){this._type=e||"undefined",this._status=A.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=A.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===A.kConnecting||this._status===A.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(e){this._onContentLengthKnown=e}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(e){this._onURLRedirect=e}get onDataArrival(){return this._onDataArrival}set onDataArrival(e){this._onDataArrival=e}get onError(){return this._onError}set onError(e){this._onError=e}get onComplete(){return this._onComplete}set onComplete(e){this._onComplete=e}open(e,t){throw new w("Unimplemented abstract function!")}abort(){throw new w("Unimplemented abstract function!")}}let k={};function T(){let e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],i=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],n={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:i[0]||""},s={};if(n.browser){s[n.browser]=!0;let e=n.majorVersion.split(".");s.version={major:parseInt(n.majorVersion,10),string:n.version},e.length>1&&(s.version.minor=parseInt(e[1],10)),e.length>2&&(s.version.build=parseInt(e[2],10))}if(n.platform&&(s[n.platform]=!0),(s.chrome||s.opr||s.safari)&&(s.webkit=!0),s.rv||s.iemobile){s.rv&&delete s.rv;let e="msie";n.browser=e,s[e]=!0}if(s.edge){delete s.edge;let e="msedge";n.browser=e,s[e]=!0}if(s.opr){let e="opera";n.browser=e,s[e]=!0}if(s.safari&&s.android){let e="android";n.browser=e,s[e]=!0}s.name=n.browser,s.platform=n.platform;for(let r in k)k.hasOwnProperty(r)&&delete k[r];Object.assign(k,s)}T();var O=k;class C extends R{static isSupported(){try{let e=O.msedge&&O.version.minor>=15048,t=!O.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}constructor(e,t){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=e,this._config=t,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(e,t){this._dataSource=e,this._range=t;let i=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(i=e.redirectedURL);let n=this._seekHandler.getConfig(i,t),s=new self.Headers;if("object"===typeof n.headers){let e=n.headers;for(let t in e)e.hasOwnProperty(t)&&s.append(t,e[t])}let r={method:"GET",headers:s,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===typeof this._config.headers)for(let a in this._config.headers)s.append(a,this._config.headers[a]);!1===e.cors&&(r.mode="same-origin"),e.withCredentials&&(r.credentials="include"),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),this._status=A.kConnecting,self.fetch(n.url,r).then(e=>{if(this._requestAbort)return this._requestAbort=!1,void(this._status=A.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==n.url&&this._onURLRedirect){let t=this._seekHandler.removeURLParameters(e.url);this._onURLRedirect(t)}let t=e.headers.get("Content-Length");return null!=t&&(this._contentLength=parseInt(t),0!==this._contentLength&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,e.body.getReader())}if(this._status=A.kError,!this._onError)throw new y("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(L.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(e=>{if(this._status=A.kError,!this._onError)throw e;this._onError(L.EXCEPTION,{code:-1,msg:e.message})})}abort(){this._requestAbort=!0}_pump(e){return e.read().then(t=>{if(t.done)if(null!==this._contentLength&&this._receivedLength<this._contentLength){this._status=A.kError;let e=L.EARLY_EOF,t={code:-1,msg:"Fetch stream meet Early-EOF"};if(!this._onError)throw new y(t.msg);this._onError(e,t)}else this._status=A.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1);else{if(!0===this._requestAbort)return this._requestAbort=!1,this._status=A.kComplete,e.cancel();this._status=A.kBuffering;let i=t.value.buffer,n=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength,this._onDataArrival&&this._onDataArrival(i,n,this._receivedLength),this._pump(e)}}).catch(e=>{if(11===e.code&&O.msedge)return;this._status=A.kError;let t=0,i=null;if(19!==e.code&&"network error"!==e.message||!(null===this._contentLength||null!==this._contentLength&&this._receivedLength<this._contentLength)?(t=L.EXCEPTION,i={code:e.code,msg:e.message}):(t=L.EARLY_EOF,i={code:e.code,msg:"Fetch stream meet Early-EOF"}),!this._onError)throw new y(i.msg);this._onError(t,i)})}}var D=C;class I extends R{static isSupported(){try{let e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return g.w("MozChunkedLoader",e.message),!1}}constructor(e,t){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=e,this._config=t,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(e,t){this._dataSource=e,this._range=t;let i=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(i=e.redirectedURL);let n=this._seekHandler.getConfig(i,t);this._requestURL=n.url;let s=this._xhr=new XMLHttpRequest;if(s.open("GET",n.url,!0),s.responseType="moz-chunked-arraybuffer",s.onreadystatechange=this._onReadyStateChange.bind(this),s.onprogress=this._onProgress.bind(this),s.onloadend=this._onLoadEnd.bind(this),s.onerror=this._onXhrError.bind(this),e.withCredentials&&(s.withCredentials=!0),"object"===typeof n.headers){let e=n.headers;for(let t in e)e.hasOwnProperty(t)&&s.setRequestHeader(t,e[t])}if("object"===typeof this._config.headers){let e=this._config.headers;for(let t in e)e.hasOwnProperty(t)&&s.setRequestHeader(t,e[t])}this._status=A.kConnecting,s.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=A.kComplete}_onReadyStateChange(e){let t=e.target;if(2===t.readyState){if(void 0!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){let e=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(e)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=A.kError,!this._onError)throw new y("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(L.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=A.kBuffering}}_onProgress(e){if(this._status===A.kError)return;null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let t=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)}_onLoadEnd(e){!0!==this._requestAbort?this._status!==A.kError&&(this._status=A.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}_onXhrError(e){this._status=A.kError;let t=0,i=null;if(this._contentLength&&e.loaded<this._contentLength?(t=L.EARLY_EOF,i={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=L.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new y(i.msg);this._onError(t,i)}}var x=I;class M extends R{static isSupported(){try{let e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return g.w("RangeLoader",e.message),!1}}constructor(e,t){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=e,this._config=t,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new E,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(e,t){this._dataSource=e,this._range=t,this._status=A.kConnecting;let i=!1;void 0!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(i=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||i?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}_openSubRange(){let e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,i=t+e;null!=this._contentLength&&i-this._range.from>=this._contentLength&&(i=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:i},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(e,t){this._lastTimeLoaded=0;let i=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?i=this._currentRedirectedURL:void 0!=e.redirectedURL&&(i=e.redirectedURL));let n=this._seekHandler.getConfig(i,t);this._currentRequestURL=n.url;let s=this._xhr=new XMLHttpRequest;if(s.open("GET",n.url,!0),s.responseType="arraybuffer",s.onreadystatechange=this._onReadyStateChange.bind(this),s.onprogress=this._onProgress.bind(this),s.onload=this._onLoad.bind(this),s.onerror=this._onXhrError.bind(this),e.withCredentials&&(s.withCredentials=!0),"object"===typeof n.headers){let e=n.headers;for(let t in e)e.hasOwnProperty(t)&&s.setRequestHeader(t,e[t])}if("object"===typeof this._config.headers){let e=this._config.headers;for(let t in e)e.hasOwnProperty(t)&&s.setRequestHeader(t,e[t])}s.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=A.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(e){let t=e.target;if(2===t.readyState){if(void 0!=t.responseURL){let e=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&e!==this._currentRedirectedURL&&(this._currentRedirectedURL=e,this._onURLRedirect&&this._onURLRedirect(e))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=A.kBuffering}else{if(this._status=A.kError,!this._onError)throw new y("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(L.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}_onProgress(e){if(this._status===A.kError)return;if(null===this._contentLength){let t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;let i=e.total;this._internalAbort(),null!=i&0!==i&&(this._totalLength=i)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let t=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(t)}_normalizeSpeed(e){let t=this._chunkSizeKBList,i=t.length-1,n=0,s=0,r=i;if(e<t[0])return t[0];while(s<=r){if(n=s+Math.floor((r-s)/2),n===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?s=n+1:r=n-1}}_onLoad(e){if(this._status===A.kError)return;if(this._waitForTotalLength)return void(this._waitForTotalLength=!1);this._lastTimeLoaded=0;let t=this._speedSampler.lastSecondKBps;if(0===t&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps)),0!==t){let e=this._normalizeSpeed(t);this._currentSpeedNormalized!==e&&(this._currentSpeedNormalized=e,this._currentChunkSizeKB=e)}let i=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;let s=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():s=!0,this._onDataArrival&&this._onDataArrival(i,n,this._receivedLength),s&&(this._status=A.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(e){this._status=A.kError;let t=0,i=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=L.EARLY_EOF,i={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=L.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new y(i.msg);this._onError(t,i)}}var B=M;class N extends R{static isSupported(){try{return"undefined"!==typeof self.WebSocket}catch(e){return!1}}constructor(){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(e){try{let t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=A.kConnecting}catch(t){this._status=A.kError;let e={code:t.code,msg:t.message};if(!this._onError)throw new y(e.msg);this._onError(L.EXCEPTION,e)}}abort(){let e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=A.kComplete}_onWebSocketOpen(e){this._status=A.kBuffering}_onWebSocketClose(e){!0!==this._requestAbort?(this._status=A.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1}_onWebSocketMessage(e){if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){let t=new FileReader;t.onload=()=>{this._dispatchArrayBuffer(t.result)},t.readAsArrayBuffer(e.data)}else{this._status=A.kError;let t={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new y(t.msg);this._onError(L.EXCEPTION,t)}}_dispatchArrayBuffer(e){let t=e,i=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)}_onWebSocketError(e){this._status=A.kError;let t={code:e.code,msg:e.message};if(!this._onError)throw new y(t.msg);this._onError(L.EXCEPTION,t)}}var U=N;class P{constructor(e){this._zeroStart=e||!1}getConfig(e,t){let i={};if(0!==t.from||-1!==t.to){let e;e=-1!==t.to?`bytes=${t.from.toString()}-${t.to.toString()}`:`bytes=${t.from.toString()}-`,i["Range"]=e}else this._zeroStart&&(i["Range"]="bytes=0-");return{url:e,headers:i}}removeURLParameters(e){return e}}var F=P;class j{constructor(e,t){this._startName=e,this._endName=t}getConfig(e,t){let i=e;if(0!==t.from||-1!==t.to){let e=!0;-1===i.indexOf("?")&&(i+="?",e=!1),e&&(i+="&"),i+=`${this._startName}=${t.from.toString()}`,-1!==t.to&&(i+=`&${this._endName}=${t.to.toString()}`)}return{url:i,headers:{}}}removeURLParameters(e){let t=e.split("?")[0],i=void 0,n=e.indexOf("?");-1!==n&&(i=e.substring(n+1));let s="";if(void 0!=i&&i.length>0){let e=i.split("&");for(let t=0;t<e.length;t++){let i=e[t].split("="),n=t>0;i[0]!==this._startName&&i[0]!==this._endName&&(n&&(s+="&"),s+=e[t])}}return 0===s.length?t:t+"?"+s}}var V=j;class G{constructor(e,t,i){this.TAG="IOController",this._config=t,this._extraData=i,this._stashInitialSize=393216,void 0!=t.stashInitialSize&&t.stashInitialSize>0&&(this._stashInitialSize=t.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===t.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(e.url),this._refTotalLength=e.filesize?e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new E,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(e){this._extraData=e}get onDataArrival(){return this._onDataArrival}set onDataArrival(e){this._onDataArrival=e}get onSeeked(){return this._onSeeked}set onSeeked(e){this._onSeeked=e}get onError(){return this._onError}set onError(e){this._onError=e}get onComplete(){return this._onComplete}set onComplete(e){this._onComplete=e}get onRedirect(){return this._onRedirect}set onRedirect(e){this._onRedirect=e}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(e){this._onRecoveredEarlyEof=e}get currentURL(){return this._dataSource.url}get hasRedirect(){return null!=this._redirectedURL||void 0!=this._dataSource.redirectedURL}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===B?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let e=this._config;if("range"===e.seekType)this._seekHandler=new F(this._config.rangeLoadZeroStart);else if("param"===e.seekType){let t=e.seekParamStart||"bstart",i=e.seekParamEnd||"bend";this._seekHandler=new V(t,i)}else{if("custom"!==e.seekType)throw new S("Invalid seekType in config: "+e.seekType);if("function"!==typeof e.customSeekHandler)throw new S("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}_selectLoader(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=U;else if(D.isSupported())this._loaderClass=D;else if(x.isSupported())this._loaderClass=x;else{if(!B.isSupported())throw new y("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=B}}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}seek(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}_internalSeek(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;let i={from:e,to:-1};this._currentRange={from:i.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,i),this._onSeeked&&this._onSeeked()}updateUrl(e){if(!e||"string"!==typeof e||0===e.length)throw new S("Url must be a non-empty string!");this._dataSource.url=e}_expandBuffer(e){let t=this._stashSize;while(t+1048576<e)t*=2;if(t+=1048576,t===this._bufferSize)return;let i=new ArrayBuffer(t);if(this._stashUsed>0){let e=new Uint8Array(this._stashBuffer,0,this._stashUsed),n=new Uint8Array(i,0,t);n.set(e,0)}this._stashBuffer=i,this._bufferSize=t}_normalizeSpeed(e){let t=this._speedNormalizeList,i=t.length-1,n=0,s=0,r=i;if(e<t[0])return t[0];while(s<=r){if(n=s+Math.floor((r-s)/2),n===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?s=n+1:r=n-1}}_adjustStashSize(e){let t=0;t=this._config.isLive||e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e,t>8192&&(t=8192);let i=1024*t+1048576;this._bufferSize<i&&this._expandBuffer(i),this._stashSize=1024*t}_dispatchChunks(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)}_onURLRedirect(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}_onContentLengthKnown(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}_onLoaderChunkArrival(e,t,i){if(!this._onDataArrival)throw new b("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);let n=this._speedSampler.lastSecondKBps;if(0!==n){let e=this._normalizeSpeed(n);this._speedNormalized!==e&&(this._speedNormalized=e,this._adjustStashSize(e))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){let t=new Uint8Array(this._stashBuffer,0,this._stashSize);t.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{let i=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart);if(n<t.byteLength){if(n>0){let e=new Uint8Array(t,n);i.set(e,0),this._stashUsed=e.byteLength,this._stashByteStart+=n}}else this._stashUsed=0,this._stashByteStart+=n;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),i=new Uint8Array(this._stashBuffer,0,this._bufferSize)),i.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{let n=this._dispatchChunks(e,t);if(n<e.byteLength){let s=e.byteLength-n;s>this._bufferSize&&(this._expandBuffer(s),i=new Uint8Array(this._stashBuffer,0,this._bufferSize)),i.set(new Uint8Array(e,n),0),this._stashUsed+=s,this._stashByteStart=t+n}}}else if(0===this._stashUsed){let i=this._dispatchChunks(e,t);if(i<e.byteLength){let n=e.byteLength-i;n>this._bufferSize&&this._expandBuffer(n);let s=new Uint8Array(this._stashBuffer,0,this._bufferSize);s.set(new Uint8Array(e,i),0),this._stashUsed+=n,this._stashByteStart=t+i}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);let t=new Uint8Array(this._stashBuffer,0,this._bufferSize);t.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;let i=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(i<this._stashUsed&&i>0){let e=new Uint8Array(this._stashBuffer,i);t.set(e,0)}this._stashUsed-=i,this._stashByteStart+=i}}_flushStashBuffer(e){if(this._stashUsed>0){let t=this._stashBuffer.slice(0,this._stashUsed),i=this._dispatchChunks(t,this._stashByteStart),n=t.byteLength-i;if(i<t.byteLength){if(!e){if(i>0){let e=new Uint8Array(this._stashBuffer,0,this._bufferSize),n=new Uint8Array(t,i);e.set(n,0),this._stashUsed=n.byteLength,this._stashByteStart+=i}return 0}g.w(this.TAG,n+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,n}return 0}_onLoaderComplete(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(e,t){switch(g.e(this.TAG,`Loader error, code = ${t.code}, msg = ${t.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=L.UNRECOVERABLE_EARLY_EOF),e){case L.EARLY_EOF:if(!this._config.isLive&&this._totalLength){let e=this._currentRange.to+1;return void(e<this._totalLength&&(g.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(e,!1)))}e=L.UNRECOVERABLE_EARLY_EOF;break;case L.UNRECOVERABLE_EARLY_EOF:case L.CONNECTING_TIMEOUT:case L.HTTP_STATUS_CODE_INVALID:case L.EXCEPTION:break}if(!this._onError)throw new y("IOException: "+t.msg);this._onError(e,t)}}var z=G;const W={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function H(){return Object.assign({},W)}class q{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let e=new z({},H()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}static getNetworkLoaderTypeName(){let e=new z({},H()),t=e.loaderType;return e.destroy(),t}static supportNativeMediaPlayback(e){void 0==q.videoElement&&(q.videoElement=window.document.createElement("video"));let t=q.videoElement.canPlayType(e);return"probably"===t||"maybe"==t}static getFeatureList(){let e={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return e.mseFlvPlayback=q.supportMSEH264Playback(),e.networkStreamIO=q.supportNetworkStreamIO(),e.networkLoaderName=q.getNetworkLoaderTypeName(),e.mseLiveFlvPlayback=e.mseFlvPlayback&&e.networkStreamIO,e.nativeMP4H264Playback=q.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),e.nativeWebmVP8Playback=q.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),e.nativeWebmVP9Playback=q.supportNativeMediaPlayback('video/webm; codecs="vp9"'),e}}var K=q;const X={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};var Y=X;class Q{static get forceGlobalTag(){return g.FORCE_GLOBAL_TAG}static set forceGlobalTag(e){g.FORCE_GLOBAL_TAG=e,Q._notifyChange()}static get globalTag(){return g.GLOBAL_TAG}static set globalTag(e){g.GLOBAL_TAG=e,Q._notifyChange()}static get enableAll(){return g.ENABLE_VERBOSE&&g.ENABLE_DEBUG&&g.ENABLE_INFO&&g.ENABLE_WARN&&g.ENABLE_ERROR}static set enableAll(e){g.ENABLE_VERBOSE=e,g.ENABLE_DEBUG=e,g.ENABLE_INFO=e,g.ENABLE_WARN=e,g.ENABLE_ERROR=e,Q._notifyChange()}static get enableDebug(){return g.ENABLE_DEBUG}static set enableDebug(e){g.ENABLE_DEBUG=e,Q._notifyChange()}static get enableVerbose(){return g.ENABLE_VERBOSE}static set enableVerbose(e){g.ENABLE_VERBOSE=e,Q._notifyChange()}static get enableInfo(){return g.ENABLE_INFO}static set enableInfo(e){g.ENABLE_INFO=e,Q._notifyChange()}static get enableWarn(){return g.ENABLE_WARN}static set enableWarn(e){g.ENABLE_WARN=e,Q._notifyChange()}static get enableError(){return g.ENABLE_ERROR}static set enableError(e){g.ENABLE_ERROR=e,Q._notifyChange()}static getConfig(){return{globalTag:g.GLOBAL_TAG,forceGlobalTag:g.FORCE_GLOBAL_TAG,enableVerbose:g.ENABLE_VERBOSE,enableDebug:g.ENABLE_DEBUG,enableInfo:g.ENABLE_INFO,enableWarn:g.ENABLE_WARN,enableError:g.ENABLE_ERROR,enableCallback:g.ENABLE_CALLBACK}}static applyConfig(e){g.GLOBAL_TAG=e.globalTag,g.FORCE_GLOBAL_TAG=e.forceGlobalTag,g.ENABLE_VERBOSE=e.enableVerbose,g.ENABLE_DEBUG=e.enableDebug,g.ENABLE_INFO=e.enableInfo,g.ENABLE_WARN=e.enableWarn,g.ENABLE_ERROR=e.enableError,g.ENABLE_CALLBACK=e.enableCallback}static _notifyChange(){let e=Q.emitter;if(e.listenerCount("change")>0){let t=Q.getConfig();e.emit("change",t)}}static registerListener(e){Q.emitter.addListener("change",e)}static removeListener(e){Q.emitter.removeListener("change",e)}static addLogListener(e){g.emitter.addListener("log",e),g.emitter.listenerCount("log")>0&&(g.ENABLE_CALLBACK=!0,Q._notifyChange())}static removeLogListener(e){g.emitter.removeListener("log",e),0===g.emitter.listenerCount("log")&&(g.ENABLE_CALLBACK=!1,Q._notifyChange())}}Q.emitter=new p.a;var Z=Q;class J{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}isSeekable(){return!0===this.hasKeyframesIndex}getNearestKeyframe(e){if(null==this.keyframesIndex)return null;let t=this.keyframesIndex,i=this._search(t.times,e);return{index:i,milliseconds:t.times[i],fileposition:t.filepositions[i]}}_search(e,t){let i=0,n=e.length-1,s=0,r=0,a=n;t<e[0]&&(i=0,r=a+1);while(r<=a){if(s=r+Math.floor((a-r)/2),s===n||t>=e[s]&&t<e[s+1]){i=s;break}e[s]<t?r=s+1:a=s-1}return i}}var $=J;function ee(e,t,i){let n=e;if(t+i<n.length){while(i--)if(128!==(192&n[++t]))return!1;return!0}return!1}function te(e){let t=[],i=e,n=0,s=e.length;while(n<s)if(i[n]<128)t.push(String.fromCharCode(i[n])),++n;else{if(i[n]<192);else if(i[n]<224){if(ee(i,n,1)){let e=(31&i[n])<<6|63&i[n+1];if(e>=128){t.push(String.fromCharCode(65535&e)),n+=2;continue}}}else if(i[n]<240){if(ee(i,n,2)){let e=(15&i[n])<<12|(63&i[n+1])<<6|63&i[n+2];if(e>=2048&&55296!==(63488&e)){t.push(String.fromCharCode(65535&e)),n+=3;continue}}}else if(i[n]<248&&ee(i,n,3)){let e=(7&i[n])<<18|(63&i[n+1])<<12|(63&i[n+2])<<6|63&i[n+3];if(e>65536&&e<1114112){e-=65536,t.push(String.fromCharCode(e>>>10|55296)),t.push(String.fromCharCode(1023&e|56320)),n+=4;continue}}t.push(String.fromCharCode(65533)),++n}return t.join("")}var ie=te;let ne=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();class se{static parseScriptData(e,t,i){let n={};try{let s=se.parseValue(e,t,i),r=se.parseValue(e,t+s.size,i-s.size);n[s.data]=r.data}catch(s){g.e("AMF",s.toString())}return n}static parseObject(e,t,i){if(i<3)throw new b("Data not enough when parse ScriptDataObject");let n=se.parseString(e,t,i),s=se.parseValue(e,t+n.size,i-n.size),r=s.objectEnd;return{data:{name:n.data,value:s.data},size:n.size+s.size,objectEnd:r}}static parseVariable(e,t,i){return se.parseObject(e,t,i)}static parseString(e,t,i){if(i<2)throw new b("Data not enough when parse String");let n,s=new DataView(e,t,i),r=s.getUint16(0,!ne);return n=r>0?ie(new Uint8Array(e,t+2,r)):"",{data:n,size:2+r}}static parseLongString(e,t,i){if(i<4)throw new b("Data not enough when parse LongString");let n,s=new DataView(e,t,i),r=s.getUint32(0,!ne);return n=r>0?ie(new Uint8Array(e,t+4,r)):"",{data:n,size:4+r}}static parseDate(e,t,i){if(i<10)throw new b("Data size invalid when parse Date");let n=new DataView(e,t,i),s=n.getFloat64(0,!ne),r=n.getInt16(8,!ne);return s+=60*r*1e3,{data:new Date(s),size:10}}static parseValue(e,t,i){if(i<1)throw new b("Data not enough when parse Value");let n,s=new DataView(e,t,i),r=1,a=s.getUint8(0),o=!1;try{switch(a){case 0:n=s.getFloat64(1,!ne),r+=8;break;case 1:{let e=s.getUint8(1);n=!!e,r+=1;break}case 2:{let s=se.parseString(e,t+1,i-1);n=s.data,r+=s.size;break}case 3:{n={};let a=0;9===(16777215&s.getUint32(i-4,!ne))&&(a=3);while(r<i-4){let s=se.parseObject(e,t+r,i-r-a);if(s.objectEnd)break;n[s.data.name]=s.data.value,r+=s.size}if(r<=i-3){let e=16777215&s.getUint32(r-1,!ne);9===e&&(r+=3)}break}case 8:{n={},r+=4;let a=0;9===(16777215&s.getUint32(i-4,!ne))&&(a=3);while(r<i-8){let s=se.parseVariable(e,t+r,i-r-a);if(s.objectEnd)break;n[s.data.name]=s.data.value,r+=s.size}if(r<=i-3){let e=16777215&s.getUint32(r-1,!ne);9===e&&(r+=3)}break}case 9:n=void 0,r=1,o=!0;break;case 10:{n=[];let a=s.getUint32(1,!ne);r+=4;for(let s=0;s<a;s++){let s=se.parseValue(e,t+r,i-r);n.push(s.data),r+=s.size}break}case 11:{let s=se.parseDate(e,t+1,i-1);n=s.data,r+=s.size;break}case 12:{let s=se.parseString(e,t+1,i-1);n=s.data,r+=s.size;break}default:r=i,g.w("AMF","Unsupported AMF value type "+a)}}catch(l){g.e("AMF",l.toString())}return{data:n,size:r,objectEnd:o}}}var re=se;class ae{constructor(e){this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let e=this._total_bytes-this._buffer_index;if(e<=0)throw new b("ExpGolomb: _fillCurrentWord() but no bytes available");let t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}readBits(e){if(e>32)throw new S("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let i=e-this._current_word_bits_left;this._fillCurrentWord();let n=Math.min(i,this._current_word_bits_left),s=this._current_word>>>32-n;return this._current_word<<=n,this._current_word_bits_left-=n,t=t<<n|s,t}readBool(){return 1===this.readBits(1)}readByte(){return this.readBits(8)}_skipLeadingZero(){let e;for(e=0;e<this._current_word_bits_left;e++)if(0!==(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}var oe=ae;class le{static _ebsp2rbsp(e){let t=e,i=t.byteLength,n=new Uint8Array(i),s=0;for(let r=0;r<i;r++)r>=2&&3===t[r]&&0===t[r-1]&&0===t[r-2]||(n[s]=t[r],s++);return new Uint8Array(n.buffer,0,s)}static parseSPS(e){let t=le._ebsp2rbsp(e),i=new oe(t);i.readByte();let n=i.readByte();i.readByte();let s=i.readByte();i.readUEG();let r=le.getProfileString(n),a=le.getLevelString(s),o=1,l=420,d=[0,420,422,444],c=8;if((100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n)&&(o=i.readUEG(),3===o&&i.readBits(1),o<=3&&(l=d[o]),c=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool())){let e=3!==o?8:12;for(let t=0;t<e;t++)i.readBool()&&(t<6?le._skipScalingList(i,16):le._skipScalingList(i,64))}i.readUEG();let h=i.readUEG();if(0===h)i.readUEG();else if(1===h){i.readBits(1),i.readSEG(),i.readSEG();let e=i.readUEG();for(let t=0;t<e;t++)i.readSEG()}let u=i.readUEG();i.readBits(1);let _=i.readUEG(),m=i.readUEG(),p=i.readBits(1);0===p&&i.readBits(1),i.readBits(1);let f=0,g=0,v=0,E=0,y=i.readBool();y&&(f=i.readUEG(),g=i.readUEG(),v=i.readUEG(),E=i.readUEG());let b=1,S=1,w=0,A=!0,L=0,R=0,k=i.readBool();if(k){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],n=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(b=t[e-1],S=n[e-1]):255===e&&(b=i.readByte()<<8|i.readByte(),S=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){let e=i.readBits(32),t=i.readBits(32);A=i.readBool(),L=t,R=2*e,w=L/R}}let T=1;1===b&&1===S||(T=b/S);let O=0,C=0;if(0===o)O=1,C=2-p;else{let e=3===o?1:2,t=1===o?2:1;O=e,C=t*(2-p)}let D=16*(_+1),I=16*(m+1)*(2-p);D-=(f+g)*O,I-=(v+E)*C;let x=Math.ceil(D*T);return i.destroy(),i=null,{profile_string:r,level_string:a,bit_depth:c,ref_frames:u,chroma_format:l,chroma_format_string:le.getChromaFormatString(l),frame_rate:{fixed:A,fps:w,fps_den:R,fps_num:L},sar_ratio:{width:b,height:S},codec_size:{width:D,height:I},present_size:{width:x,height:I}}}static _skipScalingList(e,t){let i=8,n=8,s=0;for(let r=0;r<t;r++)0!==n&&(s=e.readSEG(),n=(i+s+256)%256),i=0===n?i:n}static getProfileString(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(e){return(e/10).toFixed(1)}static getChromaFormatString(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var de=le;const ce={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};var he=ce;function ue(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}class _e{constructor(e,t){this.TAG="FLVDemuxer",this._config=t,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=e.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=e.hasAudioTrack,this._hasVideo=e.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new $,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(e){let t=new Uint8Array(e),i={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return i;let n=(4&t[4])>>>2!==0,s=0!==(1&t[4]),r=ue(t,5);return r<9?i:{match:!0,consumed:r,dataOffset:r,hasAudioTrack:n,hasVideoTrack:s}}bindDataSource(e){return e.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(e){this._onTrackMetadata=e}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(e){this._onMediaInfo=e}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(e){this._onMetaDataArrived=e}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(e){this._onScriptDataArrived=e}get onError(){return this._onError}set onError(e){this._onError=e}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(e){this._onDataAvailable=e}get timestampBase(){return this._timestampBase}set timestampBase(e){this._timestampBase=e}get overridedDuration(){return this._duration}set overridedDuration(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}set overridedHasAudio(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}set overridedHasVideo(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}resetMediaInfo(){this._mediaInfo=new $}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}parseChunks(e,t){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new b("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let i=0,n=this._littleEndian;if(0===t){if(!(e.byteLength>13))return 0;{let t=_e.probe(e);i=t.dataOffset}}if(this._firstParse){this._firstParse=!1,t+i!==this._dataOffset&&g.w(this.TAG,"First time parsing but chunk byteStart invalid!");let s=new DataView(e,i),r=s.getUint32(0,!n);0!==r&&g.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4}while(i<e.byteLength){this._dispatch=!0;let s=new DataView(e,i);if(i+11+4>e.byteLength)break;let r=s.getUint8(0),a=16777215&s.getUint32(0,!n);if(i+11+a+4>e.byteLength)break;if(8!==r&&9!==r&&18!==r){g.w(this.TAG,`Unsupported tag type ${r}, skipped`),i+=11+a+4;continue}let o=s.getUint8(4),l=s.getUint8(5),d=s.getUint8(6),c=s.getUint8(7),h=d|l<<8|o<<16|c<<24,u=16777215&s.getUint32(7,!n);0!==u&&g.w(this.TAG,"Meet tag which has StreamID != 0!");let _=i+11;switch(r){case 8:this._parseAudioData(e,_,a,h);break;case 9:this._parseVideoData(e,_,a,h,t+i);break;case 18:this._parseScriptData(e,_,a);break}let m=s.getUint32(11+a,!n);m!==11+a&&g.w(this.TAG,"Invalid PrevTagSize "+m),i+=11+a+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i}_parseScriptData(e,t,i){let n=re.parseScriptData(e,t,i);if(n.hasOwnProperty("onMetaData")){if(null==n.onMetaData||"object"!==typeof n.onMetaData)return void g.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&g.w(this.TAG,"Found another onMetaData tag!"),this._metadata=n;let e=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},e)),"boolean"===typeof e.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=e.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"===typeof e.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=e.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"===typeof e.audiodatarate&&(this._mediaInfo.audioDataRate=e.audiodatarate),"number"===typeof e.videodatarate&&(this._mediaInfo.videoDataRate=e.videodatarate),"number"===typeof e.width&&(this._mediaInfo.width=e.width),"number"===typeof e.height&&(this._mediaInfo.height=e.height),"number"===typeof e.duration){if(!this._durationOverrided){let t=Math.floor(e.duration*this._timescale);this._duration=t,this._mediaInfo.duration=t}}else this._mediaInfo.duration=0;if("number"===typeof e.framerate){let t=Math.floor(1e3*e.framerate);if(t>0){let e=t/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=e,this._referenceFrameRate.fps_num=t,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=e}}if("object"===typeof e.keyframes){this._mediaInfo.hasKeyframesIndex=!0;let t=e.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(t),e.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=e,g.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(n).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},n))}_parseKeyframesIndex(e){let t=[],i=[];for(let n=1;n<e.times.length;n++){let s=this._timestampBase+Math.floor(1e3*e.times[n]);t.push(s),i.push(e.filepositions[n])}return{times:t,filepositions:i}}_parseAudioData(e,t,i,n){if(i<=1)return void g.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");if(!0===this._hasAudioFlagOverrided&&!1===this._hasAudio)return;this._littleEndian;let s=new DataView(e,t,i),r=s.getUint8(0),a=r>>>4;if(2!==a&&10!==a)return void this._onError(he.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a);let o=0,l=(12&r)>>>2;if(!(l>=0&&l<=4))return void this._onError(he.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+l);o=this._flvSoundRateTable[l];let d=1&r,c=this._audioMetadata,h=this._audioTrack;if(c||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),c=this._audioMetadata={},c.type="audio",c.id=h.id,c.timescale=this._timescale,c.duration=this._duration,c.audioSampleRate=o,c.channelCount=0===d?1:2),10===a){let s=this._parseAACAudioData(e,t+1,i-1);if(void 0==s)return;if(0===s.packetType){c.config&&g.w(this.TAG,"Found another AudioSpecificConfig!");let e=s.data;c.audioSampleRate=e.samplingRate,c.channelCount=e.channelCount,c.codec=e.codec,c.originalCodec=e.originalCodec,c.config=e.config,c.refSampleDuration=1024/c.audioSampleRate*c.timescale,g.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",c);let t=this._mediaInfo;t.audioCodec=c.originalCodec,t.audioSampleRate=c.audioSampleRate,t.audioChannelCount=c.channelCount,t.hasVideo?null!=t.videoCodec&&(t.mimeType='video/x-flv; codecs="'+t.videoCodec+","+t.audioCodec+'"'):t.mimeType='video/x-flv; codecs="'+t.audioCodec+'"',t.isComplete()&&this._onMediaInfo(t)}else if(1===s.packetType){let e=this._timestampBase+n,t={unit:s.data,length:s.data.byteLength,dts:e,pts:e};h.samples.push(t),h.length+=s.data.length}else g.e(this.TAG,"Flv: Unsupported AAC data type "+s.packetType)}else if(2===a){if(!c.codec){let n=this._parseMP3AudioData(e,t+1,i-1,!0);if(void 0==n)return;c.audioSampleRate=n.samplingRate,c.channelCount=n.channelCount,c.codec=n.codec,c.originalCodec=n.originalCodec,c.refSampleDuration=1152/c.audioSampleRate*c.timescale,g.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",c);let s=this._mediaInfo;s.audioCodec=c.codec,s.audioSampleRate=c.audioSampleRate,s.audioChannelCount=c.channelCount,s.audioDataRate=n.bitRate,s.hasVideo?null!=s.videoCodec&&(s.mimeType='video/x-flv; codecs="'+s.videoCodec+","+s.audioCodec+'"'):s.mimeType='video/x-flv; codecs="'+s.audioCodec+'"',s.isComplete()&&this._onMediaInfo(s)}let s=this._parseMP3AudioData(e,t+1,i-1,!1);if(void 0==s)return;let r=this._timestampBase+n,a={unit:s,length:s.byteLength,dts:r,pts:r};h.samples.push(a),h.length+=s.length}}_parseAACAudioData(e,t,i){if(i<=1)return void g.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");let n={},s=new Uint8Array(e,t,i);return n.packetType=s[0],0===s[0]?n.data=this._parseAACAudioSpecificConfig(e,t+1,i-1):n.data=s.subarray(1),n}_parseAACAudioSpecificConfig(e,t,i){let n=new Uint8Array(e,t,i),s=null,r=0,a=0,o=null,l=0,d=null;if(r=a=n[0]>>>3,l=(7&n[0])<<1|n[1]>>>7,l<0||l>=this._mpegSamplingRates.length)return void this._onError(he.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");let c=this._mpegSamplingRates[l],h=(120&n[1])>>>3;if(h<0||h>=8)return void this._onError(he.FORMAT_ERROR,"Flv: AAC invalid channel configuration");5===r&&(d=(7&n[1])<<1|n[2]>>>7,o=(124&n[2])>>>2);let u=self.navigator.userAgent.toLowerCase();return-1!==u.indexOf("firefox")?l>=6?(r=5,s=new Array(4),d=l-3):(r=2,s=new Array(2),d=l):-1!==u.indexOf("android")?(r=2,s=new Array(2),d=l):(r=5,d=l,s=new Array(4),l>=6?d=l-3:1===h&&(r=2,s=new Array(2),d=l)),s[0]=r<<3,s[0]|=(15&l)>>>1,s[1]=(15&l)<<7,s[1]|=(15&h)<<3,5===r&&(s[1]|=(15&d)>>>1,s[2]=(1&d)<<7,s[2]|=8,s[3]=0),{config:s,samplingRate:c,channelCount:h,codec:"mp4a.40."+r,originalCodec:"mp4a.40."+a}}_parseMP3AudioData(e,t,i,n){if(i<4)return void g.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");this._littleEndian;let s=new Uint8Array(e,t,i),r=null;if(n){if(255!==s[0])return;let e=s[1]>>>3&3,t=(6&s[1])>>1,i=(240&s[2])>>>4,n=(12&s[2])>>>2,a=s[3]>>>6&3,o=3!==a?2:1,l=0,d=0,c=34,h="mp3";switch(e){case 0:l=this._mpegAudioV25SampleRateTable[n];break;case 2:l=this._mpegAudioV20SampleRateTable[n];break;case 3:l=this._mpegAudioV10SampleRateTable[n];break}switch(t){case 1:c=34,i<this._mpegAudioL3BitRateTable.length&&(d=this._mpegAudioL3BitRateTable[i]);break;case 2:c=33,i<this._mpegAudioL2BitRateTable.length&&(d=this._mpegAudioL2BitRateTable[i]);break;case 3:c=32,i<this._mpegAudioL1BitRateTable.length&&(d=this._mpegAudioL1BitRateTable[i]);break}r={bitRate:d,samplingRate:l,channelCount:o,codec:h,originalCodec:h}}else r=s;return r}_parseVideoData(e,t,i,n,s){if(i<=1)return void g.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");if(!0===this._hasVideoFlagOverrided&&!1===this._hasVideo)return;let r=new Uint8Array(e,t,i)[0],a=(240&r)>>>4,o=15&r;7===o?this._parseAVCVideoPacket(e,t+1,i-1,n,s,a):this._onError(he.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+o)}_parseAVCVideoPacket(e,t,i,n,s,r){if(i<4)return void g.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");let a=this._littleEndian,o=new DataView(e,t,i),l=o.getUint8(0),d=16777215&o.getUint32(0,!a),c=d<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(e,t+4,i-4);else if(1===l)this._parseAVCVideoData(e,t+4,i-4,n,s,r,c);else if(2!==l)return void this._onError(he.FORMAT_ERROR,"Flv: Invalid video packet type "+l)}_parseAVCDecoderConfigurationRecord(e,t,i){if(i<7)return void g.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");let n=this._videoMetadata,s=this._videoTrack,r=this._littleEndian,a=new DataView(e,t,i);n?"undefined"!==typeof n.avcc&&g.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),n=this._videoMetadata={},n.type="video",n.id=s.id,n.timescale=this._timescale,n.duration=this._duration);let o=a.getUint8(0),l=a.getUint8(1);a.getUint8(2),a.getUint8(3);if(1!==o||0===l)return void this._onError(he.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");if(this._naluLengthSize=1+(3&a.getUint8(4)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void this._onError(he.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));let d=31&a.getUint8(5);if(0===d)return void this._onError(he.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");d>1&&g.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+d);let c=6;for(let u=0;u<d;u++){let i=a.getUint16(c,!r);if(c+=2,0===i)continue;let s=new Uint8Array(e,t+c,i);c+=i;let o=de.parseSPS(s);if(0!==u)continue;n.codecWidth=o.codec_size.width,n.codecHeight=o.codec_size.height,n.presentWidth=o.present_size.width,n.presentHeight=o.present_size.height,n.profile=o.profile_string,n.level=o.level_string,n.bitDepth=o.bit_depth,n.chromaFormat=o.chroma_format,n.sarRatio=o.sar_ratio,n.frameRate=o.frame_rate,!1!==o.frame_rate.fixed&&0!==o.frame_rate.fps_num&&0!==o.frame_rate.fps_den||(n.frameRate=this._referenceFrameRate);let l=n.frameRate.fps_den,d=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(l/d);let h=s.subarray(1,4),_="avc1.";for(let e=0;e<3;e++){let t=h[e].toString(16);t.length<2&&(t="0"+t),_+=t}n.codec=_;let m=this._mediaInfo;m.width=n.codecWidth,m.height=n.codecHeight,m.fps=n.frameRate.fps,m.profile=n.profile,m.level=n.level,m.refFrames=o.ref_frames,m.chromaFormat=o.chroma_format_string,m.sarNum=n.sarRatio.width,m.sarDen=n.sarRatio.height,m.videoCodec=_,m.hasAudio?null!=m.audioCodec&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.videoCodec+'"',m.isComplete()&&this._onMediaInfo(m)}let h=a.getUint8(c);if(0!==h){h>1&&g.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+h),c++;for(let e=0;e<h;e++){let e=a.getUint16(c,!r);c+=2,0!==e&&(c+=e)}n.avcc=new Uint8Array(i),n.avcc.set(new Uint8Array(e,t,i),0),g.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n)}else this._onError(he.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}_parseAVCVideoData(e,t,i,n,s,r,a){let o=this._littleEndian,l=new DataView(e,t,i),d=[],c=0,h=0;const u=this._naluLengthSize;let _=this._timestampBase+n,m=1===r;while(h<i){if(h+4>=i){g.w(this.TAG,`Malformed Nalu near timestamp ${_}, offset = ${h}, dataSize = ${i}`);break}let n=l.getUint32(h,!o);if(3===u&&(n>>>=8),n>i-u)return void g.w(this.TAG,`Malformed Nalus near timestamp ${_}, NaluSize > DataSize!`);let s=31&l.getUint8(h+u);5===s&&(m=!0);let r=new Uint8Array(e,t+h,u+n),a={type:s,data:r};d.push(a),c+=r.byteLength,h+=u+n}if(d.length){let e=this._videoTrack,t={units:d,length:c,isKeyframe:m,dts:_,cts:a,pts:_+a};m&&(t.fileposition=s),e.samples.push(t),e.length+=c}}}var me=_e;class pe{static init(){pe.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let t in pe.types)pe.types.hasOwnProperty(t)&&(pe.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);let e=pe.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,n=Array.prototype.slice.call(arguments,1),s=n.length;for(let a=0;a<s;a++)t+=n[a].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let r=8;for(let a=0;a<s;a++)i.set(n[a],r),r+=n[a].byteLength;return i}static generateInitSegment(e){let t=pe.box(pe.types.ftyp,pe.constants.FTYP),i=pe.moov(e),n=new Uint8Array(t.byteLength+i.byteLength);return n.set(t,0),n.set(i,t.byteLength),n}static moov(e){let t=pe.mvhd(e.timescale,e.duration),i=pe.trak(e),n=pe.mvex(e);return pe.box(pe.types.moov,t,i,n)}static mvhd(e,t){return pe.box(pe.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(e){return pe.box(pe.types.trak,pe.tkhd(e),pe.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,n=e.presentWidth,s=e.presentHeight;return pe.box(pe.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>>8&255,255&n,0,0,s>>>8&255,255&s,0,0]))}static mdia(e){return pe.box(pe.types.mdia,pe.mdhd(e),pe.hdlr(e),pe.minf(e))}static mdhd(e){let t=e.timescale,i=e.duration;return pe.box(pe.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t="audio"===e.type?pe.constants.HDLR_AUDIO:pe.constants.HDLR_VIDEO,pe.box(pe.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?pe.box(pe.types.smhd,pe.constants.SMHD):pe.box(pe.types.vmhd,pe.constants.VMHD),pe.box(pe.types.minf,t,pe.dinf(),pe.stbl(e))}static dinf(){let e=pe.box(pe.types.dinf,pe.box(pe.types.dref,pe.constants.DREF));return e}static stbl(e){let t=pe.box(pe.types.stbl,pe.stsd(e),pe.box(pe.types.stts,pe.constants.STTS),pe.box(pe.types.stsc,pe.constants.STSC),pe.box(pe.types.stsz,pe.constants.STSZ),pe.box(pe.types.stco,pe.constants.STCO));return t}static stsd(e){return"audio"===e.type?"mp3"===e.codec?pe.box(pe.types.stsd,pe.constants.STSD_PREFIX,pe.mp3(e)):pe.box(pe.types.stsd,pe.constants.STSD_PREFIX,pe.mp4a(e)):pe.box(pe.types.stsd,pe.constants.STSD_PREFIX,pe.avc1(e))}static mp3(e){let t=e.channelCount,i=e.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return pe.box(pe.types[".mp3"],n)}static mp4a(e){let t=e.channelCount,i=e.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return pe.box(pe.types.mp4a,n,pe.esds(e))}static esds(e){let t=e.config||[],i=t.length,n=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return pe.box(pe.types.esds,n)}static avc1(e){let t=e.avcc,i=e.codecWidth,n=e.codecHeight,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return pe.box(pe.types.avc1,s,pe.box(pe.types.avcC,t))}static mvex(e){return pe.box(pe.types.mvex,pe.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return pe.box(pe.types.trex,i)}static moof(e,t){return pe.box(pe.types.moof,pe.mfhd(e.sequenceNumber),pe.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return pe.box(pe.types.mfhd,t)}static traf(e,t){let i=e.id,n=pe.box(pe.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),s=pe.box(pe.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),r=pe.sdtp(e),a=pe.trun(e,r.byteLength+16+16+8+16+8+8);return pe.box(pe.types.traf,n,s,a,r)}static sdtp(e){let t=e.samples||[],i=t.length,n=new Uint8Array(4+i);for(let s=0;s<i;s++){let e=t[s].flags;n[s+4]=e.isLeading<<6|e.dependsOn<<4|e.isDependedOn<<2|e.hasRedundancy}return pe.box(pe.types.sdtp,n)}static trun(e,t){let i=e.samples||[],n=i.length,s=12+16*n,r=new Uint8Array(s);t+=8+s,r.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(let a=0;a<n;a++){let e=i[a].duration,t=i[a].size,n=i[a].flags,s=i[a].cts;r.set([e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.isNonSync,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s],12+16*a)}return pe.box(pe.types.trun,r)}static mdat(e){return pe.box(pe.types.mdat,e)}}pe.init();var fe=pe;class ge{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var ve=ge;class Ee{constructor(e,t,i,n,s){this.dts=e,this.pts=t,this.duration=i,this.originalDts=n,this.isSyncPoint=s,this.fileposition=null}}class ye{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}class be{constructor(){this._list=[]}clear(){this._list=[]}appendArray(e){let t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}getLastSyncPointBeforeDts(e){if(0==this._list.length)return null;let t=this._list,i=0,n=t.length-1,s=0,r=0,a=n;e<t[0].dts&&(i=0,r=a+1);while(r<=a){if(s=r+Math.floor((a-r)/2),s===n||e>=t[s].dts&&e<t[s+1].dts){i=s;break}t[s].dts<e?r=s+1:a=s-1}return this._list[i]}}class Se{constructor(e){this._type=e,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return 0===this._list.length}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(e){let t=this._list;if(0===t.length)return-2;let i=t.length-1,n=0,s=0,r=i,a=0;if(e<t[0].originalBeginDts)return a=-1,a;while(s<=r){if(n=s+Math.floor((r-s)/2),n===i||e>t[n].lastSample.originalDts&&e<t[n+1].originalBeginDts){a=n;break}t[n].originalBeginDts<e?s=n+1:r=n-1}return a}_searchNearestSegmentAfter(e){return this._searchNearestSegmentBefore(e)+1}append(e){let t=this._list,i=e,n=this._lastAppendLocation,s=0;-1!==n&&n<t.length&&i.originalBeginDts>=t[n].lastSample.originalDts&&(n===t.length-1||n<t.length-1&&i.originalBeginDts<t[n+1].originalBeginDts)?s=n+1:t.length>0&&(s=this._searchNearestSegmentBefore(i.originalBeginDts)+1),this._lastAppendLocation=s,this._list.splice(s,0,i)}getLastSegmentBefore(e){let t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}getLastSampleBefore(e){let t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}getLastSyncPointBefore(e){let t=this._searchNearestSegmentBefore(e),i=this._list[t].syncPoints;while(0===i.length&&t>0)t--,i=this._list[t].syncPoints;return i.length>0?i[i.length-1]:null}}class we{constructor(e){this.TAG="MP4Remuxer",this._config=e,this._isLive=!0===e.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Se("audio"),this._videoSegmentInfoList=new Se("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!O.chrome||!(O.version.major<50||50===O.version.major&&O.version.build<2661)),this._fillSilentAfterSeek=O.msedge||O.msie,this._mp3UseMpegAudio=!O.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(e){this._onInitSegment=e}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(e){this._onMediaSegment=e}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(e,t){if(!this._onMediaSegment)throw new b("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}_onTrackMetadataReceived(e,t){let i=null,n="mp4",s=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(n="mpeg",s="",i=new Uint8Array):i=fe.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=fe.generateInitSegment(t)}if(!this._onInitSegment)throw new b("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:s,container:`${e}/${n}`,mediaDuration:t.duration})}_calculateDtsBase(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let e=this._videoStashedLastSample,t=this._audioStashedLastSample,i={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(i.samples.push(e),i.length=e.length);let n={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(n.samples.push(t),n.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(i,!0),this._remuxAudio(n,!0)}_remuxAudio(e,t){if(null==this._audioMeta)return;let i=e,n=i.samples,s=void 0,r=-1,a=-1,o=this._audioMeta.refSampleDuration,l="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,d=this._dtsBaseInited&&void 0===this._audioNextDts,c=!1;if(!n||0===n.length)return;if(1===n.length&&!t)return;let h=0,u=null,_=0;l?(h=0,_=i.length):(h=8,_=8+i.length);let m=null;if(n.length>1&&(m=n.pop(),_-=m.length),null!=this._audioStashedLastSample){let e=this._audioStashedLastSample;this._audioStashedLastSample=null,n.unshift(e),_+=e.length}null!=m&&(this._audioStashedLastSample=m);let p=n[0].dts-this._dtsBase;if(this._audioNextDts)s=p-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())s=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(c=!0);else{let e=this._audioSegmentInfoList.getLastSampleBefore(p);if(null!=e){let t=p-(e.originalDts+e.duration);t<=3&&(t=0);let i=e.dts+e.duration+t;s=p-i}else s=0}if(c){let e=p-s,t=this._videoSegmentInfoList.getLastSegmentBefore(p);if(null!=t&&t.beginDts<e){let i=ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(i){let s=t.beginDts,r=e-t.beginDts;g.v(this.TAG,`InsertPrefixSilentAudio: dts: ${s}, duration: ${r}`),n.unshift({unit:i,dts:s,pts:s}),_+=i.byteLength}}else c=!1}let f=[];for(let S=0;S<n.length;S++){let e=n[S],t=e.unit,i=e.dts-this._dtsBase,a=i-s;-1===r&&(r=a);let l=0;if(S!==n.length-1){let e=n[S+1].dts-this._dtsBase-s;l=e-a}else if(null!=m){let e=m.dts-this._dtsBase-s;l=e-a}else l=f.length>=1?f[f.length-1].duration:Math.floor(o);let d=!1,c=null;if(l>1.5*o&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!O.safari){d=!0;let e=Math.abs(l-o),n=Math.ceil(e/o),s=a+o;g.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: ${a+l} ms, expected: ${a+Math.round(o)} ms, delta: ${Math.round(e)} ms, generate: ${n} frames`);let r=ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==r&&(g.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),r=t),c=[];for(let t=0;t<n;t++){let e=Math.round(s);if(c.length>0){let t=c[c.length-1];t.duration=e-t.dts}let t={dts:e,pts:e,cts:0,unit:r,size:r.byteLength,duration:0,originalDts:i,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};c.push(t),_+=t.size,s+=o}let h=c[c.length-1];h.duration=a+l-h.dts,l=Math.round(o)}f.push({dts:a,pts:a,cts:0,unit:e.unit,size:e.unit.byteLength,duration:l,originalDts:i,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),d&&f.push.apply(f,c)}l?u=new Uint8Array(_):(u=new Uint8Array(_),u[0]=_>>>24&255,u[1]=_>>>16&255,u[2]=_>>>8&255,u[3]=255&_,u.set(fe.types.mdat,4));for(let g=0;g<f.length;g++){let e=f[g].unit;u.set(e,h),h+=e.byteLength}let v=f[f.length-1];a=v.dts+v.duration,this._audioNextDts=a;let E=new ye;E.beginDts=r,E.endDts=a,E.beginPts=r,E.endPts=a,E.originalBeginDts=f[0].originalDts,E.originalEndDts=v.originalDts+v.duration,E.firstSample=new Ee(f[0].dts,f[0].pts,f[0].duration,f[0].originalDts,!1),E.lastSample=new Ee(v.dts,v.pts,v.duration,v.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(E),i.samples=f,i.sequenceNumber++;let y=null;y=l?new Uint8Array:fe.moof(i,r),i.samples=[],i.length=0;let b={type:"audio",data:this._mergeBoxes(y,u).buffer,sampleCount:f.length,info:E};l&&d&&(b.timestampOffset=r),this._onMediaSegment("audio",b)}_remuxVideo(e,t){if(null==this._videoMeta)return;let i=e,n=i.samples,s=void 0,r=-1,a=-1,o=-1,l=-1;if(!n||0===n.length)return;if(1===n.length&&!t)return;let d=8,c=null,h=8+e.length,u=null;if(n.length>1&&(u=n.pop(),h-=u.length),null!=this._videoStashedLastSample){let e=this._videoStashedLastSample;this._videoStashedLastSample=null,n.unshift(e),h+=e.length}null!=u&&(this._videoStashedLastSample=u);let _=n[0].dts-this._dtsBase;if(this._videoNextDts)s=_-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())s=0;else{let e=this._videoSegmentInfoList.getLastSampleBefore(_);if(null!=e){let t=_-(e.originalDts+e.duration);t<=3&&(t=0);let i=e.dts+e.duration+t;s=_-i}else s=0}let m=new ye,p=[];for(let v=0;v<n.length;v++){let e=n[v],t=e.dts-this._dtsBase,i=e.isKeyframe,a=t-s,l=e.cts,d=a+l;-1===r&&(r=a,o=d);let c=0;if(v!==n.length-1){let e=n[v+1].dts-this._dtsBase-s;c=e-a}else if(null!=u){let e=u.dts-this._dtsBase-s;c=e-a}else c=p.length>=1?p[p.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(i){let t=new Ee(a,d,c,e.dts,!0);t.fileposition=e.fileposition,m.appendSyncPoint(t)}p.push({dts:a,pts:d,cts:l,units:e.units,size:e.length,isKeyframe:i,duration:c,originalDts:t,flags:{isLeading:0,dependsOn:i?2:1,isDependedOn:i?1:0,hasRedundancy:0,isNonSync:i?0:1}})}c=new Uint8Array(h),c[0]=h>>>24&255,c[1]=h>>>16&255,c[2]=h>>>8&255,c[3]=255&h,c.set(fe.types.mdat,4);for(let v=0;v<p.length;v++){let e=p[v].units;while(e.length){let t=e.shift(),i=t.data;c.set(i,d),d+=i.byteLength}}let f=p[p.length-1];if(a=f.dts+f.duration,l=f.pts+f.duration,this._videoNextDts=a,m.beginDts=r,m.endDts=a,m.beginPts=o,m.endPts=l,m.originalBeginDts=p[0].originalDts,m.originalEndDts=f.originalDts+f.duration,m.firstSample=new Ee(p[0].dts,p[0].pts,p[0].duration,p[0].originalDts,p[0].isKeyframe),m.lastSample=new Ee(f.dts,f.pts,f.duration,f.originalDts,f.isKeyframe),this._isLive||this._videoSegmentInfoList.append(m),i.samples=p,i.sequenceNumber++,this._forceFirstIDR){let e=p[0].flags;e.dependsOn=2,e.isNonSync=0}let g=fe.moof(i,r);i.samples=[],i.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(g,c).buffer,sampleCount:p.length,info:m})}_mergeBoxes(e,t){let i=new Uint8Array(e.byteLength+t.byteLength);return i.set(e,0),i.set(t,e.byteLength),i}}var Ae=we;const Le={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};var Re=Le;class ke{constructor(e,t){this.TAG="TransmuxingController",this._emitter=new p.a,this._config=t,e.segments||(e.segments=[{duration:e.duration,filesize:e.filesize,url:e.url}]),"boolean"!==typeof e.cors&&(e.cors=!0),"boolean"!==typeof e.withCredentials&&(e.withCredentials=!1),this._mediaDataSource=e,this._currentSegmentIndex=0;let i=0;this._mediaDataSource.segments.forEach(n=>{n.timestampBase=i,i+=n.duration,n.cors=e.cors,n.withCredentials=e.withCredentials,t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy)}),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(e,t){this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(e,t){this._currentSegmentIndex=e;let i=this._mediaDataSource.segments[e],n=this._ioctl=new z(i,this._config,e);n.onError=this._onIOException.bind(this),n.onSeeked=this._onIOSeeked.bind(this),n.onComplete=this._onIOComplete.bind(this),n.onRedirect=this._onIORedirect.bind(this),n.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):n.onDataArrival=this._onInitChunkArrival.bind(this),n.open(t)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(e){if(null==this._mediaInfo||!this._mediaInfo.isSeekable())return;let t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){let i=this._mediaInfo.segments[t];if(void 0==i)this._pendingSeekTime=e;else{let t=i.getNearestKeyframe(e);this._remuxer.seek(t.milliseconds),this._ioctl.seek(t.fileposition),this._pendingResolveSeekPoint=t.milliseconds}}else{let i=this._mediaInfo.segments[t];if(void 0==i)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{let n=i.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,n.fileposition),this._pendingResolveSeekPoint=n.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(e){let t=this._mediaDataSource.segments,i=t.length-1;for(let n=0;n<t.length;n++)if(e<t[n].timestampBase){i=n-1;break}return i}_onInitChunkArrival(e,t){let i=null,n=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,n=this._demuxer.parseChunks(e,t);else if((i=me.probe(e)).match){this._demuxer=new me(i,this._config),this._remuxer||(this._remuxer=new Ae(this._config));let s=this._mediaDataSource;void 0==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"===typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"===typeof s.hasVideo&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),n=this._demuxer.parseChunks(e,t)}else i=null,g.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Re.DEMUX_ERROR,he.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),n=0;return n}_onMediaInfo(e){null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,$.prototype));let t=Object.assign({},e);Object.setPrototypeOf(t,$.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=t,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then(()=>{let e=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(e)})}_onMetaDataArrived(e){this._emitter.emit(Re.METADATA_ARRIVED,e)}_onScriptDataArrived(e){this._emitter.emit(Re.SCRIPTDATA_ARRIVED,e)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(e){let t=e,i=t+1;i<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(i)):(this._remuxer.flushStashedSamples(),this._emitter.emit(Re.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(e){let t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}_onIORecoveredEarlyEof(){this._emitter.emit(Re.RECOVERED_EARLY_EOF)}_onIOException(e,t){g.e(this.TAG,`IOException: type = ${e}, code = ${t.code}, msg = ${t.msg}`),this._emitter.emit(Re.IO_ERROR,e,t),this._disableStatisticsReporter()}_onDemuxException(e,t){g.e(this.TAG,`DemuxException: type = ${e}, info = ${t}`),this._emitter.emit(Re.DEMUX_ERROR,e,t)}_onRemuxerInitSegmentArrival(e,t){this._emitter.emit(Re.INIT_SEGMENT,e,t)}_onRemuxerMediaSegmentArrival(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(Re.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){let e=t.info.syncPoints,i=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,O.safari&&e.length>0&&e[0].originalDts===i&&(i=e[0].pts),this._emitter.emit(Re.RECOMMEND_SEEKPOINT,i)}}_enableStatisticsReporter(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(e){let t=this._mediaInfo.segments[e],i=Object.assign({},t);i.duration=this._mediaInfo.duration,i.segmentCount=this._mediaInfo.segmentCount,delete i.segments,delete i.keyframesIndex,this._emitter.emit(Re.MEDIA_INFO,i)}_reportStatisticsInfo(){let e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Re.STATISTICS_INFO,e)}}var Te=ke;let Oe=function(e){let t=null,i=p.bind(this);function n(t,i){let n={msg:Re.INIT_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function s(t,i){let n={msg:Re.MEDIA_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function r(){let t={msg:Re.LOADING_COMPLETE};e.postMessage(t)}function a(){let t={msg:Re.RECOVERED_EARLY_EOF};e.postMessage(t)}function o(t){let i={msg:Re.MEDIA_INFO,data:t};e.postMessage(i)}function l(t){let i={msg:Re.METADATA_ARRIVED,data:t};e.postMessage(i)}function d(t){let i={msg:Re.SCRIPTDATA_ARRIVED,data:t};e.postMessage(i)}function c(t){let i={msg:Re.STATISTICS_INFO,data:t};e.postMessage(i)}function h(t,i){e.postMessage({msg:Re.IO_ERROR,data:{type:t,info:i}})}function u(t,i){e.postMessage({msg:Re.DEMUX_ERROR,data:{type:t,info:i}})}function m(t){e.postMessage({msg:Re.RECOMMEND_SEEKPOINT,data:t})}function p(t,i){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:i}})}_.install(),e.addEventListener("message",(function(_){switch(_.data.cmd){case"init":t=new Te(_.data.param[0],_.data.param[1]),t.on(Re.IO_ERROR,h.bind(this)),t.on(Re.DEMUX_ERROR,u.bind(this)),t.on(Re.INIT_SEGMENT,n.bind(this)),t.on(Re.MEDIA_SEGMENT,s.bind(this)),t.on(Re.LOADING_COMPLETE,r.bind(this)),t.on(Re.RECOVERED_EARLY_EOF,a.bind(this)),t.on(Re.MEDIA_INFO,o.bind(this)),t.on(Re.METADATA_ARRIVED,l.bind(this)),t.on(Re.SCRIPTDATA_ARRIVED,d.bind(this)),t.on(Re.STATISTICS_INFO,c.bind(this)),t.on(Re.RECOMMEND_SEEKPOINT,m.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(_.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":{let e=_.data.param;Z.applyConfig(e),!0===e.enableCallback?Z.addLogListener(i):Z.removeLogListener(i);break}}}))};var Ce=Oe;class De{constructor(e,t){if(this.TAG="Transmuxer",this._emitter=new p.a,t.enableWorker&&"undefined"!==typeof Worker)try{let n=i("0r65");this._worker=n(Ce),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[e,t]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Z.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Z.getConfig()})}catch(n){g.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new Te(e,t)}else this._controller=new Te(e,t);if(this._controller){let e=this._controller;e.on(Re.IO_ERROR,this._onIOError.bind(this)),e.on(Re.DEMUX_ERROR,this._onDemuxError.bind(this)),e.on(Re.INIT_SEGMENT,this._onInitSegment.bind(this)),e.on(Re.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),e.on(Re.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),e.on(Re.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),e.on(Re.MEDIA_INFO,this._onMediaInfo.bind(this)),e.on(Re.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),e.on(Re.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),e.on(Re.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),e.on(Re.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Z.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(e,t){this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}hasWorker(){return null!=this._worker}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(e,t){Promise.resolve().then(()=>{this._emitter.emit(Re.INIT_SEGMENT,e,t)})}_onMediaSegment(e,t){Promise.resolve().then(()=>{this._emitter.emit(Re.MEDIA_SEGMENT,e,t)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Re.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Re.RECOVERED_EARLY_EOF)})}_onMediaInfo(e){Promise.resolve().then(()=>{this._emitter.emit(Re.MEDIA_INFO,e)})}_onMetaDataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(Re.METADATA_ARRIVED,e)})}_onScriptDataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(Re.SCRIPTDATA_ARRIVED,e)})}_onStatisticsInfo(e){Promise.resolve().then(()=>{this._emitter.emit(Re.STATISTICS_INFO,e)})}_onIOError(e,t){Promise.resolve().then(()=>{this._emitter.emit(Re.IO_ERROR,e,t)})}_onDemuxError(e,t){Promise.resolve().then(()=>{this._emitter.emit(Re.DEMUX_ERROR,e,t)})}_onRecommendSeekpoint(e){Promise.resolve().then(()=>{this._emitter.emit(Re.RECOMMEND_SEEKPOINT,e)})}_onLoggingConfigChanged(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}_onWorkerMessage(e){let t=e.data,i=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case Re.INIT_SEGMENT:case Re.MEDIA_SEGMENT:this._emitter.emit(t.msg,i.type,i.data);break;case Re.LOADING_COMPLETE:case Re.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case Re.MEDIA_INFO:Object.setPrototypeOf(i,$.prototype),this._emitter.emit(t.msg,i);break;case Re.METADATA_ARRIVED:case Re.SCRIPTDATA_ARRIVED:case Re.STATISTICS_INFO:this._emitter.emit(t.msg,i);break;case Re.IO_ERROR:case Re.DEMUX_ERROR:this._emitter.emit(t.msg,i.type,i.info);break;case Re.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,i);break;case"logcat_callback":g.emitter.emit("log",i.type,i.logcat);break;default:break}}}var Ie=De;const xe={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};var Me=xe;class Be{constructor(e){this.TAG="MSEController",this._config=e,this._emitter=new p.a,this._config.isLive&&void 0==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new be}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(e,t){this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}attachMediaElement(e){if(this._mediaSource)throw new b("MediaSource has been attached to an HTMLMediaElement!");let t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let t=this._mediaSource;for(let i in this._sourceBuffers){let n=this._pendingSegments[i];n.splice(0,n.length),this._pendingSegments[i]=null,this._pendingRemoveRanges[i]=null,this._lastInitSegments[i]=null;let s=this._sourceBuffers[i];if(s){if("closed"!==t.readyState){try{t.removeSourceBuffer(s)}catch(e){g.e(this.TAG,e.message)}s.removeEventListener("error",this.e.onSourceBufferError),s.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[i]=null,this._sourceBuffers[i]=null}}if("open"===t.readyState)try{t.endOfStream()}catch(e){g.e(this.TAG,e.message)}t.removeEventListener("sourceopen",this.e.onSourceOpen),t.removeEventListener("sourceended",this.e.onSourceEnded),t.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);let i=e,n=""+i.container;i.codec&&i.codec.length>0&&(n+=";codecs="+i.codec);let s=!1;if(g.v(this.TAG,"Received Initialization Segment, mimeType: "+n),this._lastInitSegments[i.type]=i,n!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])g.v(this.TAG,`Notice: ${i.type} mimeType changed, origin: ${this._mimeTypes[i.type]}, target: ${n}`);else{s=!0;try{let e=this._sourceBuffers[i.type]=this._mediaSource.addSourceBuffer(n);e.addEventListener("error",this.e.onSourceBufferError),e.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(r){return g.e(this.TAG,r.message),void this._emitter.emit(Me.ERROR,{code:r.code,msg:r.message})}}this._mimeTypes[i.type]=n}t||this._pendingSegments[i.type].push(i),s||this._sourceBuffers[i.type]&&!this._sourceBuffers[i.type].updating&&this._doAppendSegments(),O.safari&&"audio/mpeg"===i.container&&i.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=i.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(e){let t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let i=this._sourceBuffers[t.type];!i||i.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}seek(e){for(let i in this._sourceBuffers){if(!this._sourceBuffers[i])continue;let e=this._sourceBuffers[i];if("open"===this._mediaSource.readyState)try{e.abort()}catch(t){g.e(this.TAG,t.message)}this._idrList.clear();let n=this._pendingSegments[i];if(n.splice(0,n.length),"closed"!==this._mediaSource.readyState){for(let t=0;t<e.buffered.length;t++){let n=e.buffered.start(t),s=e.buffered.end(t);this._pendingRemoveRanges[i].push({start:n,end:s})}if(e.updating||this._doRemoveRanges(),O.safari){let t=this._lastInitSegments[i];t&&(this._pendingSegments[i].push(t),e.updating||this._doAppendSegments())}}}}endOfStream(){let e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)}getNearestKeyframe(e){return this._idrList.getLastSyncPointBeforeDts(e)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let e=this._mediaElement.currentTime;for(let t in this._sourceBuffers){let i=this._sourceBuffers[t];if(i){let t=i.buffered;if(t.length>=1&&e-t.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let e=this._mediaElement.currentTime;for(let t in this._sourceBuffers){let i=this._sourceBuffers[t];if(i){let n=i.buffered,s=!1;for(let i=0;i<n.length;i++){let r=n.start(i),a=n.end(i);if(r<=e&&e<a+3){if(e-r>=this._config.autoCleanupMaxBackwardDuration){s=!0;let i=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:r,end:i})}}else a<e&&(s=!0,this._pendingRemoveRanges[t].push({start:r,end:a}))}s&&!i.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let e=this._sourceBuffers;if(0===this._mediaElement.readyState||"open"!==this._mediaSource.readyState)return;if(e.video&&e.video.updating||e.audio&&e.audio.updating)return;let t=this._mediaSource.duration,i=this._pendingMediaDuration;i>0&&(isNaN(t)||i>t)&&(g.v(this.TAG,`Update MediaSource duration from ${t} to ${i}`),this._mediaSource.duration=i),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let e in this._pendingRemoveRanges){if(!this._sourceBuffers[e]||this._sourceBuffers[e].updating)continue;let t=this._sourceBuffers[e],i=this._pendingRemoveRanges[e];while(i.length&&!t.updating){let e=i.shift();t.remove(e.start,e.end)}}}_doAppendSegments(){let e=this._pendingSegments;for(let i in e)if(this._sourceBuffers[i]&&!this._sourceBuffers[i].updating&&e[i].length>0){let n=e[i].shift();if(n.timestampOffset){let e=this._sourceBuffers[i].timestampOffset,t=n.timestampOffset/1e3,s=Math.abs(e-t);s>.1&&(g.v(this.TAG,`Update MPEG audio timestampOffset from ${e} to ${t}`),this._sourceBuffers[i].timestampOffset=t),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[i].appendBuffer(n.data),this._isBufferFull=!1,"video"===i&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(t){this._pendingSegments[i].unshift(n),22===t.code?(this._isBufferFull||this._emitter.emit(Me.BUFFER_FULL),this._isBufferFull=!0):(g.e(this.TAG,t.message),this._emitter.emit(Me.ERROR,{code:t.code,msg:t.message}))}}}_onSourceOpen(){if(g.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let e=this._pendingSourceBufferInit;while(e.length){let t=e.shift();this.appendInitSegment(t,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Me.SOURCE_OPEN)}_onSourceEnded(){g.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){g.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let e=this._pendingSegments;return e.video.length>0||e.audio.length>0}_hasPendingRemoveRanges(){let e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Me.UPDATE_END)}_onSourceBufferError(e){g.e(this.TAG,"SourceBuffer Error: "+e)}}var Ne=Be;const Ue={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Pe={NETWORK_EXCEPTION:L.EXCEPTION,NETWORK_STATUS_CODE_INVALID:L.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:L.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:L.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:he.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:he.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:he.CODEC_UNSUPPORTED};class Fe{constructor(e,t){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new p.a,this._config=H(),"object"===typeof t&&Object.assign(this._config,t),"flv"!==e.type.toLowerCase())throw new S("FlvPlayer requires an flv MediaDataSource input!");!0===e.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=e,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let i=O.chrome&&(O.version.major<50||50===O.version.major&&O.version.build<2661);this._alwaysSeekKeyframe=!!(i||O.msedge||O.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(e,t){e===Y.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then(()=>{this._emitter.emit(Y.MEDIA_INFO,this.mediaInfo)}):e===Y.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then(()=>{this._emitter.emit(Y.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}attachMediaElement(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new Ne(this._config),this._msectl.on(Me.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Me.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Me.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(Me.ERROR,e=>{this._emitter.emit(Y.ERROR,Ue.MEDIA_ERROR,Pe.MEDIA_MSE_ERROR,e)}),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(t){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new b("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new b("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Ie(this._mediaDataSource,this._config),this._transmuxer.on(Re.INIT_SEGMENT,(e,t)=>{this._msectl.appendInitSegment(t)}),this._transmuxer.on(Re.MEDIA_SEGMENT,(e,t)=>{if(this._msectl.appendMediaSegment(t),this._config.lazyLoad&&!this._config.isLive){let e=this._mediaElement.currentTime;t.info.endDts>=1e3*(e+this._config.lazyLoadMaxDuration)&&null==this._progressChecker&&(g.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(Re.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(Y.LOADING_COMPLETE)}),this._transmuxer.on(Re.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(Y.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Re.IO_ERROR,(e,t)=>{this._emitter.emit(Y.ERROR,Ue.NETWORK_ERROR,e,t)}),this._transmuxer.on(Re.DEMUX_ERROR,(e,t)=>{this._emitter.emit(Y.ERROR,Ue.MEDIA_ERROR,e,{code:-1,msg:t})}),this._transmuxer.on(Re.MEDIA_INFO,e=>{this._mediaInfo=e,this._emitter.emit(Y.MEDIA_INFO,Object.assign({},e))}),this._transmuxer.on(Re.METADATA_ARRIVED,e=>{this._emitter.emit(Y.METADATA_ARRIVED,e)}),this._transmuxer.on(Re.SCRIPTDATA_ARRIVED,e=>{this._emitter.emit(Y.SCRIPTDATA_ARRIVED,e)}),this._transmuxer.on(Re.STATISTICS_INFO,e=>{this._statisticsInfo=this._fillStatisticsInfo(e),this._emitter.emit(Y.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Re.RECOMMEND_SEEKPOINT,e=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e/1e3)}),this._transmuxer.open()))}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(e){this._mediaElement.volume=e}get muted(){return this._mediaElement.muted}set muted(e){this._mediaElement.muted=e}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;let t=!0,i=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){let e=this._mediaElement.getVideoPlaybackQuality();i=e.totalVideoFrames,n=e.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=n),e}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let e=this._mediaElement.buffered,t=this._mediaElement.currentTime,i=0,n=0;for(let s=0;s<e.length;s++){let r=e.start(s),a=e.end(s);if(r<=t&&t<a){i=r,n=a;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(g.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){g.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let e=this._mediaElement.currentTime,t=this._mediaElement.buffered,i=!1;for(let n=0;n<t.length;n++){let s=t.start(n),r=t.end(n);if(e>=s&&e<r){e>=r-this._config.lazyLoadRecoverDuration&&(i=!0);break}}i&&(window.clearInterval(this._progressChecker),this._progressChecker=null,i&&(g.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(e){let t=this._mediaElement.buffered;for(let i=0;i<t.length;i++){let n=t.start(i),s=t.end(i);if(e>=n&&e<s)return!0}return!1}_internalSeek(e){let t=this._isTimepointBuffered(e),i=!1,n=0;if(e<1&&this._mediaElement.buffered.length>0){let t=this._mediaElement.buffered.start(0);(t<1&&e<t||O.safari)&&(i=!0,n=O.safari?.1:t)}if(i)this._requestSetTime=!0,this._mediaElement.currentTime=n;else if(t){if(this._alwaysSeekKeyframe){let t=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=t?t.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(e){let t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){let e=t.buffered;e.length>0&&t.currentTime<e.start(0)&&(g.w(this.TAG,`Playback seems stuck at ${t.currentTime}, seek to ${e.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=e.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(e){let t=this._mediaElement.currentTime,i=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&i.length>0){let e=i.start(0);if(e<1&&t<e||O.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=O.safari?.1:e)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){let e=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=e&&(this._requestSetTime=!0,this._mediaElement.currentTime=e.dts/1e3)}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}}_onvCanPlay(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(e){this._checkAndResumeStuckPlayback(!0)}_onvProgress(e){this._checkAndResumeStuckPlayback()}}var je=Fe;class Ve{constructor(e,t){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new p.a,this._config=H(),"object"===typeof t&&Object.assign(this._config,t),"flv"===e.type.toLowerCase())throw new S("NativePlayer does't support flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new S(`NativePlayer(${e.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=e,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(e,t){e===Y.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(()=>{this._emitter.emit(Y.MEDIA_INFO,this.mediaInfo)}):e===Y.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(()=>{this._emitter.emit(Y.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}attachMediaElement(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(t){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new b("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(e){this._mediaElement.volume=e}get muted(){return this._mediaElement.muted}set muted(e){this._mediaElement.muted=e}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}get mediaInfo(){let e=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",t={mimeType:e+this._mediaDataSource.type};return this._mediaElement&&(t.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(t.width=this._mediaElement.videoWidth,t.height=this._mediaElement.videoHeight)),t}get statisticsInfo(){let e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;let t=!0,i=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){let e=this._mediaElement.getVideoPlaybackQuality();i=e.totalVideoFrames,n=e.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=n),e}_onvLoadedMetadata(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Y.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(Y.STATISTICS_INFO,this.statisticsInfo)}}var Ge=Ve;function ze(e,t){let i=e;if(null==i||"object"!==typeof i)throw new S("MediaDataSource must be an javascript object!");if(!i.hasOwnProperty("type"))throw new S("MediaDataSource must has type field to indicate video file type!");switch(i.type){case"flv":return new je(i,t);default:return new Ge(i,t)}}function We(){return K.supportMSEH264Playback()}function He(){return K.getFeatureList()}_.install();let qe={};qe.createPlayer=ze,qe.isSupported=We,qe.getFeatureList=He,qe.BaseLoader=R,qe.LoaderStatus=A,qe.LoaderErrors=L,qe.Events=Y,qe.ErrorTypes=Ue,qe.ErrorDetails=Pe,qe.FlvPlayer=je,qe.NativePlayer=Ge,qe.LoggingControl=Z,Object.defineProperty(qe,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Ke=qe;function Xe(e,t){return e-t}function Ye(e){e.sort(Xe);for(var t=0,i=0;i<e.length-1;i++){var n=Math.abs(e[i+1]-e[i]);n<21&&(t+=n)}return t}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return!!(this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2)}});var Qe=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i,Ze=e=>{var t=e.src,i=e.videoId,n=e.logWatchHistory,s=e.courseId,r=void 0===s?null:s,a=t.split(".").pop(),d="flv"===a,u=Object(o["useRef"])(),_=navigator.userAgent.toLowerCase().match(Qe),m=_?_[0]:"pc",p=0,f=0,g=0,v=null,E=!1,y=20,b=1,S=!1,w=!1,A=[],L=Object(o["useCallback"])((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s={point:u.current.currentTime};function a(){return o.apply(this,arguments)}function o(){return o=Object(h["a"])(c.a.mark((function t(){var i;return c.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return S=!0,t.next=3,n(s);case 3:i=t.sent,v=i,S=!1,e&&e();case 7:case"end":return t.stop()}}),t)}))),o.apply(this,arguments)}v?(s["log_id"]=v,s["watch_duration"]=Ye(A),s["total_duration"]=f):(r?(s["video_id"]=parseInt(i,10),s["course_id"]=parseInt(r,10)):s["video_id"]=i,s["duration"]=p,s["device"]=m),t&&(s["ed"]="1"),a()}),[i,r]);return Object(o["useEffect"])(()=>{var e=null;return Ke.isSupported&&d?(e=Ke.createPlayer({type:"flv",volume:.8,cors:!0,url:t,muted:!1}),u.current&&(e.attachMediaElement(u.current),e.load())):u.current.setAttribute("src",t),()=>{e&&(e.unload(),e.pause(),e.destroy(),e=null)}},[u,d,t]),Object(o["useEffect"])(()=>{function e(){A.push(u.current.currentTime),E||(E=!0,L())}function t(){return i.apply(this,arguments)}function i(){return i=Object(h["a"])(c.a.mark((function e(){return c.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:A.push(u.current.currentTime),L(()=>{v=null,g=0,E=!1,S=!1,w=!1,A=[],f=0,b=1},!0);case 2:case"end":return e.stop()}}),e)}))),i.apply(this,arguments)}function n(){if(!w){var e=u.current.currentTime,t=e-g;Math.abs(t)<10?(f+=Math.abs(t),g=e,S||f-b*y>=0&&(b++,A.push(g),L())):g=e}}function s(){w=!0}function r(){u.current.playing&&A.push(u.current.currentTime,g),g=u.current.currentTime,w=!1}function a(){p=u.current.duration,p<=20&&(y=p/3),u.current.addEventListener("play",e)}return u.current.addEventListener("canplay",a),u.current.addEventListener("ended",t),u.current.addEventListener("seeking",s),u.current.addEventListener("seeked",r),u.current.addEventListener("timeupdate",n),()=>{u.current.removeEventListener("canplay",a),u.current.removeEventListener("play",e),u.current.removeEventListener("ended",t),u.current.removeEventListener("seeking",s),u.current.removeEventListener("seeked",r),u.current.removeEventListener("timeupdate",n),u.current.playing&&(A.push(g,u.current.currentTime),L())}},[u,t]),l.a.createElement("video",{ref:u,controls:!0,autoPlay:!1,controlsList:"nodownload",muted:!1})},Je=i("P5Jw"),$e=i("po3F"),et=i.n($e),tt=i("J66h"),it=e=>{var t=e.visible,i=e.width,o=e.videoId,d=e.file_url,c=e.copyUrl,h=e.logWatchHistory,u=void 0===h?()=>{}:h,_=e.onClose,m=void 0===_?()=>{}:_;return console.log(d),l.a.createElement(n["a"],{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:t,title:null,footer:null,width:i,className:et.a.modal},l.a.createElement("i",{className:"".concat(et.a.closeIcon," iconfont icon-htmal5icon19"),onClick:m}),t&&l.a.createElement(Ze,{src:tt["Base64"].decode(d),videoId:o,logWatchHistory:u}),l.a.createElement("div",{className:et.a.wrap},l.a.createElement(a["a"],{className:et.a.input,value:c}),l.a.createElement(Je["CopyToClipboard"],{text:c,onCopy:()=>r["a"].success("\u590d\u5236\u6210\u529f")},l.a.createElement(s["a"],{type:"primary"},"\u590d\u5236\u89c6\u9891\u5730\u5740"))))}},iVQj:function(e,t,i){"use strict";i.r(t);i("DjyN");var n=i("NUBc"),s=i("WmNS"),r=i.n(s),a=i("9og8"),o=(i("2qtc"),i("kLXV")),l=i("k1fw"),d=i("tJVT"),c=i("PpiC"),h=(i("B9cy"),i("Ol7k")),u=(i("lUTK"),i("BvKs")),_=i("q1tI"),m=i.n(_),p=i("WHYC"),f=i("uYtH"),g=i("9kvl"),v=i("xKgJ"),E=i("BdwD"),y=(i("miYZ"),i("tsqr")),b=i("ErOA"),S=e=>{var t=e.classroomList,i=e.dispatch,n=(e.cb,Object(p["m"])());return n["id"]=n["coursesId"],m.a.createElement(o["a"],{centered:!0,title:"\u63d0\u793a",visible:"\u5220\u9664"===t.actionTabs.key,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",onOk:Object(a["a"])(r.a.mark((function e(){var s;return r.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(b["a"])("/api/courses/".concat(n.id,"/delete_course_video.json"),{method:"delete",body:{video_id:t.actionTabs.data.id,is_link:!0}});case 2:s=e.sent,0===s.status&&(y["a"].success("\u5220\u9664\u6210\u529f"),i({type:"classroomList/setActionTabs",payload:{}}),i({type:"classroomList/getVideoList",payload:Object(l["a"])({},t.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:()=>{i({type:"classroomList/setActionTabs",payload:{}})}},m.a.createElement("p",null,"\u662f\u5426\u786e\u8ba4\u5220\u9664\uff1f"))},w=Object(g["a"])(e=>{var t=e.classroomList;return{classroomList:t}})(S),A=(i("5NDa"),i("5rEg")),L=(i("y8nQ"),i("Vl3Y")),R=(i("nRaC"),i("5RzL")),k=(R["a"].TreeNode,e=>{var t=e.classroomList,i=(e.loading,e.dispatch),n=Object(p["m"])();n["id"]=n["coursesId"];t.detailAttendancesDetail,t.actionTabs;var s=L["a"].useForm(),c=Object(d["a"])(s,1),h=c[0];return m.a.createElement(o["a"],{centered:!0,title:"\u589e\u52a0\u5916\u94fe",visible:"\u589e\u52a0\u5916\u94fe"===t.actionTabs.key,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",bodyStyle:{minHeight:200},onOk:Object(a["a"])(r.a.mark((function e(){var t,s;return r.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.t0=l["a"],e.t1={},e.next=4,h.validateFields();case 4:return e.t2=e.sent,t=(0,e.t0)(e.t1,e.t2),e.next=8,Object(b["a"])("/api/courses/".concat(n.id,"/course_videos.json"),{method:"post",body:Object(l["a"])({},t)});case 8:s=e.sent,0===s.status&&(y["a"].success("\u4fee\u6539\u6210\u529f"),i({type:"classroomList/setActionTabs",payload:{}}),i({type:"classroomList/getVideoList",payload:{id:n.id}}));case 10:case"end":return e.stop()}}),e)}))),onCancel:()=>{i({type:"classroomList/setActionTabs",payload:{}})}},m.a.createElement(L["a"],{form:h,initialValues:{["name"]:"",["link"]:""}},m.a.createElement(L["a"].Item,{label:"\u89c6\u9891\u6807\u9898",name:"name",rules:[{required:!0,message:"\u8bf7\u8f93\u5165!"}]},m.a.createElement(A["a"],{maxLength:60})),m.a.createElement(L["a"].Item,{label:"\u89c6\u9891\u94fe\u63a5",name:"link",rules:[{required:!0,message:"\u8bf7\u8f93\u5165!"}]},m.a.createElement(A["a"],null))))}),T=Object(g["a"])(e=>{var t=e.classroomList,i=e.loading;return{classroomList:t,loading:i}})(k),O=(R["a"].TreeNode,e=>{var t=e.classroomList,i=(e.loading,e.dispatch),n=Object(p["m"])();n["id"]=n["coursesId"];t.detailAttendancesDetail;var s=t.actionTabs,c=L["a"].useForm(),h=Object(d["a"])(c,1),u=h[0];return m.a.createElement(o["a"],{centered:!0,title:"\u89c6\u9891\u6807\u9898\u7f16\u8f91",visible:"\u7f16\u8f91"===t.actionTabs.key,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",bodyStyle:{minHeight:200},onOk:Object(a["a"])(r.a.mark((function e(){var t,n;return r.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.t0=l["a"],e.t1={},e.next=4,u.validateFields();case 4:return e.t2=e.sent,t=(0,e.t0)(e.t1,e.t2),e.next=8,Object(b["a"])("/api/course_videos/".concat(s.data.id,".json"),{method:"put",body:Object(l["a"])({},t)});case 8:n=e.sent,0===n.status&&(y["a"].success("\u4fee\u6539\u6210\u529f"),i({type:"classroomList/setActionTabs",payload:{}}));case 10:case"end":return e.stop()}}),e)}))),onCancel:()=>{i({type:"classroomList/setActionTabs",payload:{}})}},s.data&&m.a.createElement(L["a"],{form:u,initialValues:{["name"]:s.data.title,["link"]:s.data.link}},m.a.createElement(L["a"].Item,{label:"\u89c6\u9891\u6807\u9898",name:"name",rules:[{required:!0,message:"\u8bf7\u8f93\u5165!"}]},m.a.createElement(A["a"],{maxLength:60})),m.a.createElement(L["a"].Item,{label:"\u89c6\u9891\u94fe\u63a5",name:"link",rules:[{required:!0,message:"\u8bf7\u8f93\u5165!"}]},m.a.createElement(A["a"],null))))}),C=Object(g["a"])(e=>{var t=e.classroomList,i=e.loading;return{classroomList:t,loading:i}})(O),D=(R["a"].TreeNode,e=>{var t=e.classroomList,i=(e.loading,e.dispatch),n=Object(p["m"])();n["id"]=n["coursesId"];t.detailAttendancesDetail;var s=t.actionTabs,c=L["a"].useForm(),h=Object(d["a"])(c,1),u=h[0];return Object(_["useEffect"])(()=>{"\u7f16\u8f91\u89c6\u9891"===t.actionTabs.key&&u.setFieldsValue({title:s.data.title})},[t.actionTabs.key]),m.a.createElement(o["a"],{centered:!0,title:"\u89c6\u9891\u6807\u9898\u7f16\u8f91",visible:"\u7f16\u8f91\u89c6\u9891"===t.actionTabs.key,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",destroyOnClose:!0,onOk:Object(a["a"])(r.a.mark((function e(){var t,a;return r.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.t0=l["a"],e.t1={},e.next=4,u.validateFields();case 4:return e.t2=e.sent,t=(0,e.t0)(e.t1,e.t2),e.next=8,Object(b["a"])("/api/users/innov/videos/".concat(s.data.id,".json"),{method:"put",body:Object(l["a"])({},t)});case 8:a=e.sent,a&&(y["a"].success("\u4fee\u6539\u6210\u529f"),i({type:"classroomList/setActionTabs",payload:{}}),i({type:"classroomList/getVideoList",payload:Object(l["a"])({},n)}));case 10:case"end":return e.stop()}}),e)}))),onCancel:()=>{i({type:"classroomList/setActionTabs",payload:{}})}},s.data&&m.a.createElement(L["a"],{form:u},m.a.createElement(L["a"].Item,{label:"\u89c6\u9891\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8bf7\u8f93\u5165!"}]},m.a.createElement(A["a"],{maxLength:60}))))}),I=Object(g["a"])(e=>{var t=e.classroomList,i=e.loading;return{classroomList:t,loading:i}})(D),x=(i("7Kak"),i("9yH6")),M=(R["a"].TreeNode,e=>{var t=e.classroomList,i=(e.loading,e.dispatch),n=Object(p["m"])();n["id"]=n["coursesId"];var s=t.detailLeftMenus,c=t.actionTabs,h=L["a"].useForm(),u=Object(d["a"])(h,1),_=u[0];return m.a.createElement(o["a"],{centered:!0,title:"\u79fb\u52a8\u5230",visible:"\u79fb\u52a8\u76ee\u5f55"===t.actionTabs.key,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",width:400,bodyStyle:{minHeight:200},onOk:Object(a["a"])(r.a.mark((function e(){var t,s;return r.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.t0=l["a"],e.t1={},e.next=4,_.validateFields();case 4:return e.t2=e.sent,t=(0,e.t0)(e.t1,e.t2),e.next=8,Object(b["a"])("/api/courses/".concat(n.id,"/move_to_category.json"),{method:"post",body:{new_category_id:t.new_category_id,video_ids:c.data.id}});case 8:s=e.sent,0===s.status&&(y["a"].success("\u64cd\u4f5c\u6210\u529f"),i({type:"classroomList/setActionTabs",payload:{}}));case 10:case"end":return e.stop()}}),e)}))),onCancel:()=>{i({type:"classroomList/setActionTabs",payload:{}})}},s.course_modules&&m.a.createElement(L["a"],{form:_,initialValues:{}},m.a.createElement(L["a"].Item,{label:"",name:"new_category_id",rules:[{required:!0,message:"\u8bf7\u8f93\u5165!"}]},m.a.createElement(x["default"].Group,null,null===s||void 0===s?void 0:s.course_modules.filter(e=>"video"===e.type)[0]["second_category"].map((function(e,t){return m.a.createElement(x["default"],{style:{display:"block"},value:e.category_id},e.category_name)}))))))}),B=Object(g["a"])(e=>{var t=e.classroomList,i=e.loading;return{classroomList:t,loading:i}})(M),N=i("Q1r0"),U=i.n(N),P=(R["a"].TreeNode,e=>{var t=e.classroomList,i=(e.loading,e.dispatch),n=Object(p["m"])();n["id"]=n["coursesId"];var s=t.detailLeftMenus,c=(t.actionTabs,s.course_modules&&s.course_modules.filter(e=>"video"===e.type)),h=L["a"].useForm(),u=Object(d["a"])(h,1),_=u[0];return m.a.createElement(o["a"],{centered:!0,title:"\u65b0\u5efa\u76ee\u5f55",visible:"\u65b0\u5efa\u76ee\u5f55"===t.actionTabs.key,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",bodyStyle:{minHeight:130},onOk:Object(a["a"])(r.a.mark((function e(){var t,s;return r.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.t0=l["a"],e.t1={},e.next=5,_.validateFields();case 5:return e.t2=e.sent,t=(0,e.t0)(e.t1,e.t2),e.next=9,Object(b["a"])("/api/course_modules/".concat(c[0].id,"/add_second_category.json"),{method:"post",body:Object(l["a"])({},t)});case 9:s=e.sent,0===s.status&&(y["a"].success("\u4fee\u6539\u6210\u529f"),i({type:"classroomList/setActionTabs",payload:{}}),i({type:"classroomList/getVideoList",payload:{id:n["coursesId"]}}));case 11:case"end":return e.stop()}}),e)}))),onCancel:()=>{i({type:"classroomList/setActionTabs",payload:{}})}},m.a.createElement(L["a"],{form:_,initialValues:{["name"]:"",["link"]:""}},m.a.createElement(L["a"].Item,{label:"\u76ee\u5f55\u540d\u79f0",name:"name",rules:[{required:!0,message:"\u8bf7\u8f93\u5165!"}]},m.a.createElement(A["a"],{maxLength:60}))))}),F=Object(g["a"])(e=>{var t=e.classroomList,i=e.loading;return{classroomList:t,loading:i}})(P),j=i("0Owb"),V=(i("IzEo"),i("bx4M")),G=(i("5Dmo"),i("3S7+")),z=(i("T2oS"),i("W9HT")),W=i("zpA9"),H=i.n(W),q=i("O+cW"),K=i.n(q),X=i("P5Jw"),Y=i("r7aF"),Q=i.n(Y),Z=i("QOUV"),J=i("1vsH"),$=i("J66h"),ee="90%",te="55%",ie=e=>{var t,i,n,s=e.data,r=e.isReview,a=e.dispatch,o=e.userid,c=e.classroomList,h=(e.onDelete,e.logWatchHistory),u=void 0===h?()=>{}:h,g=Object(_["useState"])(),E=Object(d["a"])(g,2),b=E[0],S=E[1],w=Object(_["useState"])({}),A=Object(d["a"])(w,2),L=A[0],R=A[1],k=Object(_["useState"])(Object(l["a"])({},Object(p["m"])())),T=Object(d["a"])(k,2),O=T[0],C=(T[1],c.detailLeftMenus),D=null===C||void 0===C||null===(t=C.course_modules)||void 0===t||null===(i=t.filter(e=>"video"===e.type)[0].second_category)||void 0===i?void 0:i.length;O["id"]=O["coursesId"],0!=O["categoryId"]&&(O["category_id"]=O["categoryId"]);var I=e=>{e.link||(S(!0),R({videoId:e.id,file_url:e.play_url||e.file_url,copyUrl:x(e.play_url||e.file_url,e.cover_url),logWatchHistory:u}))},x=(e,t)=>{var i=$["Base64"].decode(e);if(e)return'<video src="'.concat(i,'" controls="true" controlslist="nodownload" width="').concat(ee,'" height="').concat(te,'" poster="').concat(t,'">\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301 video \u6807\u7b7e\u3002</video>')};return m.a.createElement(m.a.Fragment,null,null===s||void 0===s||null===(n=s.videos)||void 0===n?void 0:n.map((e,t)=>{var i=(e.transcoded||e.link)&&e.cover_url||H.a;return m.a.createElement("a",{className:Q.a.wrap,key:e.id},m.a.createElement(V["a"],{className:"animated fadeIn ".concat(Q.a.cardWrap)},m.a.createElement(z["a"],{tip:"\u6b63\u5728\u8f6c\u7801\uff0c\u8bf7\u7a0d\u7b49...",spinning:!e.transcoded&&!e.link},m.a.createElement("span",{className:Q.a.imgWrap,onClick:()=>{!r&&I(e)}},m.a.createElement("img",{src:i}),e.link&&m.a.createElement("a",{className:Q.a.linkWrap,href:e.link,target:"_blank",title:e.title},m.a.createElement("span",{className:Q.a.link},"\u5916\u94fe")),!r&&m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{className:Q.a.mask}),m.a.createElement("div",{className:Q.a.playIconWrap},!e.link&&m.a.createElement("img",{className:Q.a.playIcon,src:K.a}))))),m.a.createElement("div",{className:Q.a.cardBottom},m.a.createElement("div",{className:Q.a.bottomTitle},e.title),m.a.createElement("div",{className:Q.a.timeWrap},m.a.createElement("div",{className:Q.a.time},e.total_time&&"\u7d2f\u8ba1\u5b66\u4e60\u65f6\u957f\uff1a".concat(Object(J["z"])(parseInt(e.total_time))))),m.a.createElement("div",{className:Q.a.bottomActionWrap},m.a.createElement("span",{className:Q.a.peopleWrap},!!e.people_num&&m.a.createElement(G["a"],{title:"\u89c2\u770b\u4eba\u6570",placement:"bottom"},m.a.createElement("i",{className:"icon-dianjiliang iconfont font12"},e.people_num))),m.a.createElement("div",null,(o===e.user_id||!r&&D>0&&Object(v["d"])())&&m.a.createElement(G["a"],{title:"\u79fb\u52a8",placement:"bottom"},m.a.createElement("i",{className:"".concat(Q.a.actionIcon," icon-yidong iconfont"),onClick:()=>{a({type:"classroomList/setActionTabs",payload:{key:"\u79fb\u52a8\u76ee\u5f55",params:O,data:s}})},style:{marginTop:"1px",display:"inline-block"}})),!Object(v["d"])()||r||e.link?null:m.a.createElement(G["a"],{title:"\u7edf\u8ba1",placement:"bottom"},Object(v["d"])()?m.a.createElement(f["Link"],{to:"/classrooms/".concat(O.coursesId,"/video/").concat(O.categoryId,"/statistics/").concat(e.course_video_id,"?title=").concat(e.title)}," ",m.a.createElement("i",{className:"icon-tongji1 iconfont ".concat(Q.a.actionIcon),style:{marginTop:"1px",display:"inline-block"}})):null),!Object(v["m"])()||r||e.link?null:m.a.createElement(G["a"],{title:"\u7edf\u8ba1",placement:"bottom"},Object(v["m"])()?m.a.createElement(f["Link"],{className:"font16",to:"/classrooms/".concat(O.coursesId,"/video/").concat(O.categoryId,"/studentstatistics")},m.a.createElement("i",{className:"icon-tongji1 iconfont ".concat(Q.a.actionIcon),style:{marginTop:"1px",display:"inline-block"}})):null),(o===e.user_id||Object(v["d"])())&&m.a.createElement(G["a"],{title:"\u7f16\u8f91",placement:"bottom"},m.a.createElement("i",{className:"".concat(Q.a.actionIcon," icon-bianji1 iconfont"),onClick:()=>{a({type:"classroomList/setActionTabs",payload:{key:"\u7f16\u8f91\u89c6\u9891",params:O,data:e}})},style:{marginTop:"1px",display:"inline-block"}})),!r&&!e.link&&m.a.createElement(X["CopyToClipboard"],{text:x(e.play_url||e.file_url,e.cover_url),onCopy:()=>y["a"].success("\u590d\u5236\u6210\u529f")},m.a.createElement(G["a"],{title:"\u590d\u5236\u94fe\u63a5",placement:"bottom"},m.a.createElement("i",{className:"".concat(Q.a.actionIcon," icon-fuzhi iconfont")}))),(o===e.user_id||Object(v["d"])())&&m.a.createElement(G["a"],{title:"\u5220\u9664",placement:"bottom"},m.a.createElement("i",{className:"".concat(Q.a.actionIcon," icon-shanchu iconfont"),onClick:()=>{a({type:"classroomList/setActionTabs",payload:{key:"\u5220\u9664",params:O,data:s}})},style:{marginTop:"1px",display:"inline-block"}})))))))}),m.a.createElement(Z["a"],Object(j["a"])({},L,{visible:b,width:800,onClose:()=>{S(!1),R({})}})))},ne=Object(g["a"])(e=>{var t=e.classroomList;return{classroomList:t}})(ie),se=(u["a"].SubMenu,h["a"].Content,h["a"].Sider,e=>{var t=e.classroomList,i=(e.globalSetting,e.loading,e.user),s=e.dispatch,h=Object(c["a"])(e,["classroomList","globalSetting","loading","user","dispatch"]),g=Object(p["m"])(),y=t.detailVideoList,b=Object(_["useState"])({}),S=Object(d["a"])(b,2),A=S[0];S[1];g["id"]=g["coursesId"],0!=g["categoryId"]&&(g["category_id"]=g["categoryId"]),Object(_["useEffect"])(()=>{s({type:"classroomList/getVideoList",payload:Object(l["a"])({},g)})},[g["categoryId"]]);var L=(e,t)=>{g.page=e,s({type:"classroomList/getVideoList",payload:Object(l["a"])({},g)})},R=e=>{0===e.key?h.history.push("/classrooms/".concat(g.id,"/video/0")):h.history.push("/classrooms/".concat(g.id,"/live_video/0"))},k=[{name:"\u89c6\u9891",id:""},{name:"\u76f4\u64ad",id:1}],O=["\u65b0\u5efa\u76ee\u5f55","\u589e\u52a0\u5916\u94fe"],D=e=>{o["a"].confirm({title:"\u63d0\u793a",centered:!0,content:m.a.createElement("div",{className:U.a.modal},m.a.createElement("div",null,"\u8be5\u89c6\u9891\u5c06\u88ab\u5220\u9664\uff0c\u4e0d\u53ef\u6062\u590d"),m.a.createElement("div",null,"\u662f\u5426\u786e\u8ba4\u5220\u9664?")),okText:"\u786e\u8ba4",cancelText:"\u53d6\u6d88",onOk:function(){var e=Object(a["a"])(r.a.mark((function e(){return r.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()})},x=e=>s({type:"userDetail/logWatchHistory",payload:e});return m.a.createElement("section",null,m.a.createElement("aside",{className:[U.a.bg,U.a.menu].join(" ")},m.a.createElement(u["a"],{mode:"horizontal",style:{margin:"0 18px"},onSelect:R,defaultSelectedKeys:["0"]},k.map((function(e,t){return m.a.createElement(u["a"].Item,{key:t,className:"font16"},e.name)}))),m.a.createElement("div",null,Object(v["d"])()&&m.a.createElement(f["Link"],{className:"font16 mr20",to:"/classrooms/".concat(g.coursesId,"/video/").concat(g.categoryId,"/statistics")},"\u7edf\u8ba1"),Object(v["m"])()&&m.a.createElement(f["Link"],{className:"font16 mr20",to:"/classrooms/".concat(g.coursesId,"/video/").concat(g.categoryId,"/studentstatistics")},"\u7edf\u8ba1"),Object(v["d"])()&&O.map((function(e,t){return m.a.createElement("span",{key:t,style:{cursor:"pointer"},className:[U.a.add,"font16"].join(" "),onClick:()=>{s({type:"classroomList/setActionTabs",payload:{key:e,params:g}})}},e)})),Object(v["a"])()&&m.a.createElement(f["Link"],{className:"font16 mr20",to:"/classrooms/".concat(g.coursesId,"/video/").concat(i.userInfo.login,"/upload")},"\u4e0a\u4f20\u89c6\u9891"))),m.a.createElement("aside",{className:U.a.desc},"\u5171 ",m.a.createElement("span",{className:"c-orange"},y.count)," \u4e2a\u89c6\u9891"),0===y.count&&m.a.createElement(E["a"],null),m.a.createElement("div",{className:U.a.card},y.videos&&m.a.createElement(ne,{dispatch:s,data:y,userid:i.userInfo.user_id,isReview:"pending"===g.category,onDelete:D,logWatchHistory:x})),m.a.createElement("aside",{className:"tc mb50 mt30"},m.a.createElement(n["a"],{hideOnSinglePage:!0,showSizeChanger:!1,onChange:L,defaultCurrent:1,pageSize:15,current:g.page||1,total:y.count})),m.a.createElement(w,null),m.a.createElement(C,{data:A}),m.a.createElement(I,null),m.a.createElement(B,null),m.a.createElement(T,null),m.a.createElement(F,null))});t["default"]=Object(g["a"])(e=>{var t=e.classroomList,i=e.loading,n=e.user,s=e.globalSetting;return{user:n,classroomList:t,globalSetting:s,loading:i.models.index}})(se)},po3F:function(e,t,i){e.exports={modal:"modal___3Y0Wf",closeIcon:"closeIcon___2U9hd",wrap:"wrap___3bgrF",input:"input___e0HRQ"}},r7aF:function(e,t,i){e.exports={flex_box_center:"flex_box_center___lVi1V",flex_space_between:"flex_space_between___6XBnb",flex_box_vertical_center:"flex_box_vertical_center___3QCrz",flex_box_center_end:"flex_box_center_end___uut2r",flex_box_column:"flex_box_column___1eTl5",wrap:"wrap___w17Lx",mask:"mask___39ABk",playIconWrap:"playIconWrap___2JzBn",playIcon:"playIcon___OjHt8",linkWrap:"linkWrap___1Hwm0",link:"link___20a0t",imgWrap:"imgWrap___2S0mH",cardBottom:"cardBottom___3KAZq",bottomTitle:"bottomTitle___2_5a2",timeWrap:"timeWrap___3DetR",time:"time___21_um",bottomActionWrap:"bottomActionWrap___J_1jq",peopleWrap:"peopleWrap___2mdRU",actionIcon:"actionIcon___yX1di"}},xKgJ:function(e,t,i){"use strict";i.d(t,"k",(function(){return l})),i.d(t,"c",(function(){return d})),i.d(t,"d",(function(){return c})),i.d(t,"e",(function(){return h})),i.d(t,"n",(function(){return u})),i.d(t,"f",(function(){return _})),i.d(t,"h",(function(){return m})),i.d(t,"i",(function(){return p})),i.d(t,"m",(function(){return f})),i.d(t,"g",(function(){return g})),i.d(t,"l",(function(){return v})),i.d(t,"b",(function(){return E})),i.d(t,"a",(function(){return y})),i.d(t,"j",(function(){return b})),i.d(t,"o",(function(){return S}));var n,s,r=i("9kvl");(function(e){e[e["SuperAdmin"]=1]="SuperAdmin",e[e["Operation"]=2]="Operation",e[e["CertifiedTeacher"]=5]="CertifiedTeacher",e[e["TrainingProduction"]=8]="TrainingProduction",e[e["UncertifiedTeacher"]=12]="UncertifiedTeacher",e[e["Student"]=15]="Student"})(n||(n={})),function(e){e[e["SuperAdmin"]=1]="SuperAdmin",e[e["Operation"]=2]="Operation",e[e["Admin"]=5]="Admin",e[e["Teacher"]=8]="Teacher",e[e["Assistant"]=12]="Assistant",e[e["Student"]=15]="Student"}(s||(s={}));var a=e=>{var t=Object(r["b"])()._store.getState(),i=t.user,n=i.userInfo;return e.some(e=>e==(null===n||void 0===n?void 0:n.role))},o=e=>{var t=Object(r["b"])()._store.getState(),i=t.user,n=i.userInfo;return!!(null===n||void 0===n?void 0:n.own)||e.some(e=>{var t;return e==(null===n||void 0===n||null===(t=n.course)||void 0===t?void 0:t.course_role)})},l=()=>{var e=Object(r["b"])()._store.getState(),t=e.user,i=t.userInfo;return i.main_site},d=()=>{var e,t=Object(r["b"])()._store.getState(),i=t.user,n=i.userInfo;return null===n||void 0===n||null===(e=n.course)||void 0===e?void 0:e.course_is_end},c=()=>o([s.SuperAdmin,s.Operation,s.Admin,s.Teacher,s.Assistant]),h=()=>o([s.SuperAdmin,s.Teacher,s.Admin]),u=()=>o([s.SuperAdmin]),_=()=>o([s.SuperAdmin,s.Operation,s.Admin]),m=()=>o([s.SuperAdmin,s.Operation,s.Admin,s.Teacher]),p=()=>o([s.Assistant]),f=()=>o([s.Student]),g=()=>o([s.SuperAdmin,s.Operation,s.Admin,s.Teacher,s.Assistant,s.Student]),v=()=>{var e,t=Object(r["b"])()._store.getState(),i=t.user,n=i.userInfo;return null===(null===n||void 0===n||null===(e=n.course)||void 0===e?void 0:e.course_role)},E=function(){return a([n.SuperAdmin,n.Operation,n.CertifiedTeacher,n.TrainingProduction])},y=function(){return o([s.Teacher,n.CertifiedTeacher])},b=()=>{var e,t=Object(r["b"])()._store.getState(),i=t.user;return!!(null===(e=i.userInfo)||void 0===e?void 0:e.login)},S=()=>{var e=Object(r["b"])()._store.getState(),t=e.user;return t.userInfo}},zpA9:function(e,t,i){e.exports=i.p+"static/default.4759ba28.png"}}]);