Commit e2460342b04bad6473aac81bc3680aa5efef293e

Authored by Zhang Zhuo
1 parent 6bd5ee16

更改 -张卓

README.md
... ... @@ -124,3 +124,80 @@ export default class App extends Component {//默认图片样式宽度100%高度
124 124 ></AreaSelete>
125 125 ```
126 126  
  127 +##### 区域多功能封装
  128 +
  129 +介绍:支持多边形和矩形模式
  130 +
  131 +解释:多边形当绘制完成时点击鼠标右键即可完成就不在绘制,可以进行随意拽动,也可以自行扩展成动态添加多个矩形或者多边形
  132 +
  133 +使用:
  134 +
  135 +```react
  136 +import {FunAreaSelect} from "zzreact"
  137 +export default class App extends Component {
  138 + change(val){//点位画好就会返回数组,如果是多边形点击右键的时候会返回数组,当数组变化的时候会返回
  139 + //如果是矩形当拉出框的时候就会发生变化返回数组
  140 + //mode不些默认是多边形
  141 + console.log(val) //注:当添加了disabled=”true“没有此回调函数
  142 + }
  143 + render() {
  144 + return (<div style={{width:"81.2%",height:"80%"}}>
  145 + <FunAreaSelect mode="react" change={(val) => this.change(val)}></FunAreaSelect>
  146 + </div>)
  147 + }
  148 +}
  149 +```
  150 +
  151 +支持传的参数:
  152 +
  153 +```react
  154 +//如果一下参数不添加就是默认参数
  155 +<FunAreaSelect
  156 + mode="polygon" //两种模式1.多边形;2.react是矩形
  157 + circleRadius="10" //点击圆的半径
  158 + circleBorderWidth="4" //圆边框的宽度
  159 + circleBorderColor="#28B1D9" //圆边框的颜色
  160 + circleInColor="#28B1D9" //圆区域的颜色
  161 + circleSelectColor="#FFF" //圆选中的颜色
  162 + lineColor="#28B1D9" //线的颜色
  163 + lineWidth="2" //线的宽度
  164 + areaColor="rgba(40, 177, 217, 0.2)" //选中区域的颜色支持rgba
  165 + disabled="true" //默认是false如果是true就是不可滑动
  166 + title= "" //文字的内容填写就有 \n是换行 添加这个属性的时候注意要 {"sdf\ndsd"}不然没效果
  167 + titleColor="#000" //文字的颜色 默认黑色
  168 + titleFont="14px bold 黑体" //文字的字体
  169 + titleLineHeight="" //文字的行高 默认和文字行字体大小一样
  170 + position={[10,10]} //文字的位置0是x y是一 如果不设置:里面是判断x最大的y最小的值来进行判断
  171 +></FunAreaSelect>
  172 +```
  173 +
  174 +##### 升级版区域选择
  175 +
  176 +介绍:继承选区多功能的基础上进行封装,拥有按钮可以自定义样式
  177 +
  178 +解释:如果觉的不好用也可以自行封装,用里ref可以直接调用里面的方法
  179 +
  180 +(注意:如果你不自己封装就不用看这个)
  181 +
  182 +this.refs[这里是帮定的ref].myRef可以取出canvas中的元素可以打印出来看下
  183 +
  184 +this.refs[这里是帮定的ref].myRef.selectBox(x,y)这个方法是判断点击是否点击到点上
  185 +
  186 +this.refs[这里是帮定的ref].isNull()这个方法是判断你的画布是否为空用于你添加的时候看看是否允许你添加
  187 +
  188 +使用:
  189 +
  190 +```react
  191 +import {FunAreaSelectPlus} from "zzreact"
  192 +export default class App extends Component {
  193 + change(val){
  194 + console.log(val)
  195 + }
  196 + render() {
  197 + return (<div style={{width:"81.2%",height:"80%"}}>
  198 + <FunAreaSelectPlus></FunAreaSelectPlus>
  199 + </div>)
  200 + }
  201 +}
  202 +```
  203 +
... ...
dist/index.js
1   -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=19)}([function(e,t,i){"use strict";e.exports=i(10)},function(e,t,i){"use strict";var n,r="object"==typeof Reflect?Reflect:null,s=r&&"function"==typeof r.apply?r.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(i,n){function r(){void 0!==s&&e.removeListener("error",s),i([].slice.call(arguments))}var s;"error"!==t&&(s=function(i){e.removeListener(t,r),n(i)},e.once("error",s)),e.once(t,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var l=10;function h(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,i,n){var r,s,a,o;if(h(i),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),s=e._events),a=s[t]),void 0===a)a=s[t]=i,++e._eventsCount;else if("function"==typeof a?a=s[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),(r=u(e))>0&&a.length>r&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,o=l,console&&console.warn&&console.warn(o)}return e}function c(){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 f(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=c.bind(n);return r.listener=i,n.wrapFn=r,r}function _(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):p(r,r.length)}function m(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 p(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),o.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},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(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},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.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=r[e];if(void 0===l)return!1;if("function"==typeof l)s(l,this,t);else{var h=l.length,u=p(l,h);for(i=0;i<h;++i)s(u[i],this,t)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){return h(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return h(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var i,n,r,s,a;if(h(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))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(r=-1,s=i.length-1;s>=0;s--)if(i[s]===t||i[s].listener===t){a=i[s].listener,r=s;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))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 r,s=Object.keys(i);for(n=0;n<s.length;++n)"removeListener"!==(r=s[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return _(this,e,!0)},o.prototype.rawListeners=function(e){return _(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,i){"use strict";var n,r=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},s=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),a=[];function o(e){for(var t=-1,i=0;i<a.length;i++)if(a[i].identifier===e){t=i;break}return t}function l(e,t){for(var i={},n=[],r=0;r<e.length;r++){var s=e[r],l=t.base?s[0]+t.base:s[0],h=i[l]||0,u="".concat(l," ").concat(h);i[l]=h+1;var d=o(u),c={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(a[d].references++,a[d].updater(c)):a.push({identifier:u,updater:p(c,t),references:1}),n.push(u)}return n}function h(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var r=i.nc;r&&(n.nonce=r)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=s(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function c(e,t,i,n){var r=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var s=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(s,a[t]):e.appendChild(s)}}function f(e,t,i){var n=i.css,r=i.media,s=i.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var _=null,m=0;function p(e,t){var i,n,r;if(t.singleton){var s=m++;i=_||(_=h(t)),n=c.bind(null,i,s,!1),r=c.bind(null,i,s,!0)}else i=h(t),n=f.bind(null,i,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var i=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var r=o(i[n]);a[r].references--}for(var s=l(e,t),h=0;h<i.length;h++){var u=o(i[h]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}i=s}}}},function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(r[a]=!0)}for(var o=0;o<e.length;o++){var l=[].concat(e[o]);n&&r[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),t.push(l))}},t}},function(e,t,i){"use strict";(function(e){var n,r;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
  1 +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=18)}([function(e,t,i){"use strict";e.exports=i(9)},function(e,t,i){"use strict";var n,r="object"==typeof Reflect?Reflect:null,s=r&&"function"==typeof r.apply?r.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(i,n){function r(){void 0!==s&&e.removeListener("error",s),i([].slice.call(arguments))}var s;"error"!==t&&(s=function(i){e.removeListener(t,r),n(i)},e.once("error",s)),e.once(t,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var l=10;function h(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,i,n){var r,s,a,o;if(h(i),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),s=e._events),a=s[t]),void 0===a)a=s[t]=i,++e._eventsCount;else if("function"==typeof a?a=s[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),(r=u(e))>0&&a.length>r&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,o=l,console&&console.warn&&console.warn(o)}return e}function c(){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 f(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=c.bind(n);return r.listener=i,n.wrapFn=r,r}function _(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):p(r,r.length)}function m(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 p(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),o.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},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(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},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.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=r[e];if(void 0===l)return!1;if("function"==typeof l)s(l,this,t);else{var h=l.length,u=p(l,h);for(i=0;i<h;++i)s(u[i],this,t)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){return h(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return h(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var i,n,r,s,a;if(h(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))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(r=-1,s=i.length-1;s>=0;s--)if(i[s]===t||i[s].listener===t){a=i[s].listener,r=s;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))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 r,s=Object.keys(i);for(n=0;n<s.length;++n)"removeListener"!==(r=s[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return _(this,e,!0)},o.prototype.rawListeners=function(e){return _(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,i){"use strict";var n,r=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},s=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),a=[];function o(e){for(var t=-1,i=0;i<a.length;i++)if(a[i].identifier===e){t=i;break}return t}function l(e,t){for(var i={},n=[],r=0;r<e.length;r++){var s=e[r],l=t.base?s[0]+t.base:s[0],h=i[l]||0,u="".concat(l," ").concat(h);i[l]=h+1;var d=o(u),c={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(a[d].references++,a[d].updater(c)):a.push({identifier:u,updater:p(c,t),references:1}),n.push(u)}return n}function h(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var r=i.nc;r&&(n.nonce=r)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=s(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function c(e,t,i,n){var r=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var s=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(s,a[t]):e.appendChild(s)}}function f(e,t,i){var n=i.css,r=i.media,s=i.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var _=null,m=0;function p(e,t){var i,n,r;if(t.singleton){var s=m++;i=_||(_=h(t)),n=c.bind(null,i,s,!1),r=c.bind(null,i,s,!0)}else i=h(t),n=f.bind(null,i,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var i=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var r=o(i[n]);a[r].references--}for(var s=l(e,t),h=0;h<i.length;h++){var u=o(i[h]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}i=s}}}},function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(r[a]=!0)}for(var o=0;o<e.length;o++){var l=[].concat(e[o]);n&&r[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),t.push(l))}},t}},function(e,t,i){"use strict";(function(e){var n,r;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2 2 //! moment.js
3 3 //! version : 2.29.1
4 4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
5 5 //! license : MIT
6 6 //! momentjs.com
7   -function a(){return n.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(h(e,t))return!1;return!0}function d(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function f(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function _(e,t){var i,n=[];for(i=0;i<e.length;++i)n.push(t(e[i],i));return n}function m(e,t){for(var i in t)h(t,i)&&(e[i]=t[i]);return h(t,"toString")&&(e.toString=t.toString),h(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,i,n){return Dt(e,t,i,n,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function y(e){if(null==e._isValid){var t=g(e),i=r.call(t.parsedDateParts,(function(e){return null!=e})),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function v(e){var t=p(NaN);return null!=e?m(g(t),e):g(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,i=Object(this),n=i.length>>>0;for(t=0;t<n;t++)if(t in i&&e.call(this,i[t],t,i))return!0;return!1};var A=a.momentProperties=[],S=!1;function b(e,t){var i,n,r;if(d(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),d(t._i)||(e._i=t._i),d(t._f)||(e._f=t._f),d(t._l)||(e._l=t._l),d(t._strict)||(e._strict=t._strict),d(t._tzm)||(e._tzm=t._tzm),d(t._isUTC)||(e._isUTC=t._isUTC),d(t._offset)||(e._offset=t._offset),d(t._pf)||(e._pf=g(t)),d(t._locale)||(e._locale=t._locale),A.length>0)for(i=0;i<A.length;i++)d(r=t[n=A[i]])||(e[n]=r);return e}function E(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===S&&(S=!0,a.updateOffset(this),S=!1)}function w(e){return e instanceof E||null!=e&&null!=e._isAMomentObject}function R(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var i=!0;return m((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),i){var n,r,o,l=[];for(r=0;r<arguments.length;r++){if(n="","object"===s(arguments[r])){for(o in n+="\n["+r+"] ",arguments[0])h(arguments[0],o)&&(n+=o+": "+arguments[0][o]+", ");n=n.slice(0,-2)}else n=arguments[r];l.push(n)}R(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),i=!1}return t.apply(this,arguments)}),t)}var D,T={};function L(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),T[e]||(R(t),T[e]=!0)}function M(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e,t){var i,n=m({},e);for(i in t)h(t,i)&&(l(e[i])&&l(t[i])?(n[i]={},m(n[i],e[i]),m(n[i],t[i])):null!=t[i]?n[i]=t[i]:delete n[i]);for(i in e)h(e,i)&&!h(t,i)&&l(e[i])&&(n[i]=m({},n[i]));return n}function C(e){null!=e&&this.set(e)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,D=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)h(e,t)&&i.push(t);return i};function I(e,t,i){var n=""+Math.abs(e),r=t-n.length;return(e>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}var x=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,P={},B={};function N(e,t,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),e&&(B[e]=r),t&&(B[t[0]]=function(){return I(r.apply(this,arguments),t[1],t[2])}),i&&(B[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function F(e,t){return e.isValid()?(t=V(t,e.localeData()),P[t]=P[t]||function(e){var t,i,n,r=e.match(x);for(t=0,i=r.length;t<i;t++)B[r[t]]?r[t]=B[r[t]]:r[t]=(n=r[t]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(t){var n,s="";for(n=0;n<i;n++)s+=M(r[n])?r[n].call(t,e):r[n];return s}}(t),P[t](e)):e.localeData().invalidDate()}function V(e,t){var i=5;function n(e){return t.longDateFormat(e)||e}for(U.lastIndex=0;i>=0&&U.test(e);)e=e.replace(U,n),U.lastIndex=0,i-=1;return e}var Y={};function q(e,t){var i=e.toLowerCase();Y[i]=Y[i+"s"]=Y[t]=e}function j(e){return"string"==typeof e?Y[e]||Y[e.toLowerCase()]:void 0}function W(e){var t,i,n={};for(i in e)h(e,i)&&(t=j(i))&&(n[t]=e[i]);return n}var G={};function z(e,t){G[e]=t}function H(e){return e%4==0&&e%100!=0||e%400==0}function K(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Q(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=K(t)),i}function Z(e,t){return function(i){return null!=i?(J(this,e,i),a.updateOffset(this,t),this):X(this,e)}}function X(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function J(e,t,i){e.isValid()&&!isNaN(i)&&("FullYear"===t&&H(e.year())&&1===e.month()&&29===e.date()?(i=Q(i),e._d["set"+(e._isUTC?"UTC":"")+t](i,e.month(),we(i,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](i))}var $,ee=/\d/,te=/\d\d/,ie=/\d{3}/,ne=/\d{4}/,re=/[+-]?\d{6}/,se=/\d\d?/,ae=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,le=/\d{1,3}/,he=/\d{1,4}/,ue=/[+-]?\d{1,6}/,de=/\d+/,ce=/[+-]?\d+/,fe=/Z|[+-]\d\d:?\d\d/gi,_e=/Z|[+-]\d\d(?::?\d\d)?/gi,me=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function pe(e,t,i){$[e]=M(t)?t:function(e,n){return e&&i?i:t}}function ge(e,t){return h($,e)?$[e](t._strict,t._locale):new RegExp(ye(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,i,n,r){return t||i||n||r}))))}function ye(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}$={};var ve={};function Ae(e,t){var i,n=t;for("string"==typeof e&&(e=[e]),c(t)&&(n=function(e,i){i[t]=Q(e)}),i=0;i<e.length;i++)ve[e[i]]=n}function Se(e,t){Ae(e,(function(e,i,n,r){n._w=n._w||{},t(e,n._w,n,r)}))}function be(e,t,i){null!=t&&h(ve,e)&&ve[e](t,i._a,i,e)}var Ee;function we(e,t){if(isNaN(e)||isNaN(t))return NaN;var i,n=(t%(i=12)+i)%i;return e+=(t-n)/12,1===n?H(e)?29:28:31-n%7%2}Ee=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},N("M",["MM",2],"Mo",(function(){return this.month()+1})),N("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),N("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),q("month","M"),z("month",8),pe("M",se),pe("MM",se,te),pe("MMM",(function(e,t){return t.monthsShortRegex(e)})),pe("MMMM",(function(e,t){return t.monthsRegex(e)})),Ae(["M","MM"],(function(e,t){t[1]=Q(e)-1})),Ae(["MMM","MMMM"],(function(e,t,i,n){var r=i._locale.monthsParse(e,n,i._strict);null!=r?t[1]=r:g(i).invalidMonth=e}));var Re="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ke="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),De=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te=me,Le=me;function Me(e,t,i){var n,r,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===t?-1!==(r=Ee.call(this._shortMonthsParse,a))?r:null:-1!==(r=Ee.call(this._longMonthsParse,a))?r:null:"MMM"===t?-1!==(r=Ee.call(this._shortMonthsParse,a))||-1!==(r=Ee.call(this._longMonthsParse,a))?r:null:-1!==(r=Ee.call(this._longMonthsParse,a))||-1!==(r=Ee.call(this._shortMonthsParse,a))?r:null}function Oe(e,t){var i;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Q(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return i=Math.min(e.date(),we(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e}function Ce(e){return null!=e?(Oe(this,e),a.updateOffset(this,!0),this):X(this,"Month")}function Ie(){function e(e,t){return t.length-e.length}var t,i,n=[],r=[],s=[];for(t=0;t<12;t++)i=p([2e3,t]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(n.sort(e),r.sort(e),s.sort(e),t=0;t<12;t++)n[t]=ye(n[t]),r[t]=ye(r[t]);for(t=0;t<24;t++)s[t]=ye(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function xe(e){return H(e)?366:365}N("Y",0,0,(function(){var e=this.year();return e<=9999?I(e,4):"+"+e})),N(0,["YY",2],0,(function(){return this.year()%100})),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),q("year","y"),z("year",1),pe("Y",ce),pe("YY",se,te),pe("YYYY",he,ne),pe("YYYYY",ue,re),pe("YYYYYY",ue,re),Ae(["YYYYY","YYYYYY"],0),Ae("YYYY",(function(e,t){t[0]=2===e.length?a.parseTwoDigitYear(e):Q(e)})),Ae("YY",(function(e,t){t[0]=a.parseTwoDigitYear(e)})),Ae("Y",(function(e,t){t[0]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return Q(e)+(Q(e)>68?1900:2e3)};var Ue=Z("FullYear",!0);function Pe(e,t,i,n,r,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,i,n,r,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,i,n,r,s,a),o}function Be(e){var t,i;return e<100&&e>=0?((i=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ne(e,t,i){var n=7+t-i;return-((7+Be(e,0,n).getUTCDay()-t)%7)+n-1}function Fe(e,t,i,n,r){var s,a,o=1+7*(t-1)+(7+i-n)%7+Ne(e,n,r);return o<=0?a=xe(s=e-1)+o:o>xe(e)?(s=e+1,a=o-xe(e)):(s=e,a=o),{year:s,dayOfYear:a}}function Ve(e,t,i){var n,r,s=Ne(e.year(),t,i),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?n=a+Ye(r=e.year()-1,t,i):a>Ye(e.year(),t,i)?(n=a-Ye(e.year(),t,i),r=e.year()+1):(r=e.year(),n=a),{week:n,year:r}}function Ye(e,t,i){var n=Ne(e,t,i),r=Ne(e+1,t,i);return(xe(e)-n+r)/7}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),q("week","w"),q("isoWeek","W"),z("week",5),z("isoWeek",5),pe("w",se),pe("ww",se,te),pe("W",se),pe("WW",se,te),Se(["w","ww","W","WW"],(function(e,t,i,n){t[n.substr(0,1)]=Q(e)}));function qe(e,t){return e.slice(t,7).concat(e.slice(0,t))}N("d",0,"do","day"),N("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),N("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),N("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),q("day","d"),q("weekday","e"),q("isoWeekday","E"),z("day",11),z("weekday",11),z("isoWeekday",11),pe("d",se),pe("e",se),pe("E",se),pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),Se(["dd","ddd","dddd"],(function(e,t,i,n){var r=i._locale.weekdaysParse(e,n,i._strict);null!=r?t.d=r:g(i).invalidWeekday=e})),Se(["d","e","E"],(function(e,t,i,n){t[n]=Q(e)}));var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),We="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ge="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ze=me,He=me,Ke=me;function Qe(e,t,i){var n,r,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(r=Ee.call(this._weekdaysParse,a))?r:null:"ddd"===t?-1!==(r=Ee.call(this._shortWeekdaysParse,a))?r:null:-1!==(r=Ee.call(this._minWeekdaysParse,a))?r:null:"dddd"===t?-1!==(r=Ee.call(this._weekdaysParse,a))||-1!==(r=Ee.call(this._shortWeekdaysParse,a))||-1!==(r=Ee.call(this._minWeekdaysParse,a))?r:null:"ddd"===t?-1!==(r=Ee.call(this._shortWeekdaysParse,a))||-1!==(r=Ee.call(this._weekdaysParse,a))||-1!==(r=Ee.call(this._minWeekdaysParse,a))?r:null:-1!==(r=Ee.call(this._minWeekdaysParse,a))||-1!==(r=Ee.call(this._weekdaysParse,a))||-1!==(r=Ee.call(this._shortWeekdaysParse,a))?r:null}function Ze(){function e(e,t){return t.length-e.length}var t,i,n,r,s,a=[],o=[],l=[],h=[];for(t=0;t<7;t++)i=p([2e3,1]).day(t),n=ye(this.weekdaysMin(i,"")),r=ye(this.weekdaysShort(i,"")),s=ye(this.weekdays(i,"")),a.push(n),o.push(r),l.push(s),h.push(n),h.push(r),h.push(s);a.sort(e),o.sort(e),l.sort(e),h.sort(e),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Je(e,t){N(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function $e(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,Xe),N("k",["kk",2],0,(function(){return this.hours()||24})),N("hmm",0,0,(function(){return""+Xe.apply(this)+I(this.minutes(),2)})),N("hmmss",0,0,(function(){return""+Xe.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)})),N("Hmm",0,0,(function(){return""+this.hours()+I(this.minutes(),2)})),N("Hmmss",0,0,(function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)})),Je("a",!0),Je("A",!1),q("hour","h"),z("hour",13),pe("a",$e),pe("A",$e),pe("H",se),pe("h",se),pe("k",se),pe("HH",se,te),pe("hh",se,te),pe("kk",se,te),pe("hmm",ae),pe("hmmss",oe),pe("Hmm",ae),pe("Hmmss",oe),Ae(["H","HH"],3),Ae(["k","kk"],(function(e,t,i){var n=Q(e);t[3]=24===n?0:n})),Ae(["a","A"],(function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e})),Ae(["h","hh"],(function(e,t,i){t[3]=Q(e),g(i).bigHour=!0})),Ae("hmm",(function(e,t,i){var n=e.length-2;t[3]=Q(e.substr(0,n)),t[4]=Q(e.substr(n)),g(i).bigHour=!0})),Ae("hmmss",(function(e,t,i){var n=e.length-4,r=e.length-2;t[3]=Q(e.substr(0,n)),t[4]=Q(e.substr(n,2)),t[5]=Q(e.substr(r)),g(i).bigHour=!0})),Ae("Hmm",(function(e,t,i){var n=e.length-2;t[3]=Q(e.substr(0,n)),t[4]=Q(e.substr(n))})),Ae("Hmmss",(function(e,t,i){var n=e.length-4,r=e.length-2;t[3]=Q(e.substr(0,n)),t[4]=Q(e.substr(n,2)),t[5]=Q(e.substr(r))}));var et=Z("Hours",!0);var tt,it={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Re,monthsShort:ke,week:{dow:0,doy:6},weekdays:je,weekdaysMin:Ge,weekdaysShort:We,meridiemParse:/[ap]\.?m?\.?/i},nt={},rt={};function st(e,t){var i,n=Math.min(e.length,t.length);for(i=0;i<n;i+=1)if(e[i]!==t[i])return i;return n}function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(t){var n=null;if(void 0===nt[t]&&void 0!==e&&e&&e.exports)try{n=tt._abbr,void 0,i(17)("./"+t),lt(n)}catch(e){nt[t]=null}return nt[t]}function lt(e,t){var i;return e&&((i=d(t)?ut(e):ht(e,t))?tt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function ht(e,t){if(null!==t){var i,n=it;if(t.abbr=e,null!=nt[e])L("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=nt[e]._config;else if(null!=t.parentLocale)if(null!=nt[t.parentLocale])n=nt[t.parentLocale]._config;else{if(null==(i=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;n=i._config}return nt[e]=new C(O(n,t)),rt[e]&&rt[e].forEach((function(e){ht(e.name,e.config)})),lt(e),nt[e]}return delete nt[e],null}function ut(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,i,n,r,s=0;s<e.length;){for(t=(r=at(e[s]).split("-")).length,i=(i=at(e[s+1]))?i.split("-"):null;t>0;){if(n=ot(r.slice(0,t).join("-")))return n;if(i&&i.length>=t&&st(r,i)>=t-1)break;t--}s++}return tt}(e)}function dt(e){var t,i=e._a;return i&&-2===g(e).overflow&&(t=i[1]<0||i[1]>11?1:i[2]<1||i[2]>we(i[0],i[1])?2:i[3]<0||i[3]>24||24===i[3]&&(0!==i[4]||0!==i[5]||0!==i[6])?3:i[4]<0||i[4]>59?4:i[5]<0||i[5]>59?5:i[6]<0||i[6]>999?6:-1,g(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),g(e)._overflowWeeks&&-1===t&&(t=7),g(e)._overflowWeekday&&-1===t&&(t=8),g(e).overflow=t),e}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],gt=/^\/?Date\((-?\d+)/i,yt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function At(e){var t,i,n,r,s,a,o=e._i,l=ct.exec(o)||ft.exec(o);if(l){for(g(e).iso=!0,t=0,i=mt.length;t<i;t++)if(mt[t][1].exec(l[1])){r=mt[t][0],n=!1!==mt[t][2];break}if(null==r)return void(e._isValid=!1);if(l[3]){for(t=0,i=pt.length;t<i;t++)if(pt[t][1].exec(l[3])){s=(l[2]||" ")+pt[t][0];break}if(null==s)return void(e._isValid=!1)}if(!n&&null!=s)return void(e._isValid=!1);if(l[4]){if(!_t.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=r+(s||"")+(a||""),Rt(e)}else e._isValid=!1}function St(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function bt(e){var t,i,n,r,s,a,o,l,h=yt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(h){if(i=h[4],n=h[3],r=h[2],s=h[5],a=h[6],o=h[7],l=[St(i),ke.indexOf(n),parseInt(r,10),parseInt(s,10),parseInt(a,10)],o&&l.push(parseInt(o,10)),t=l,!function(e,t,i){return!e||We.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(i).weekdayMismatch=!0,i._isValid=!1,!1)}(h[1],t,e))return;e._a=t,e._tzm=function(e,t,i){if(e)return vt[e];if(t)return 0;var n=parseInt(i,10),r=n%100;return 60*((n-r)/100)+r}(h[8],h[9],h[10]),e._d=Be.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Et(e,t,i){return null!=e?e:null!=t?t:i}function wt(e){var t,i,n,r,s,o=[];if(!e._d){for(n=function(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,i,n,r,s,a,o,l,h;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,a=4,i=Et(t.GG,e._a[0],Ve(Tt(),1,4).year),n=Et(t.W,1),((r=Et(t.E,1))<1||r>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,h=Ve(Tt(),s,a),i=Et(t.gg,e._a[0],h.year),n=Et(t.w,h.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+s,(t.e<0||t.e>6)&&(l=!0)):r=s);n<1||n>Ye(i,s,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(o=Fe(i,n,r,s,a),e._a[0]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(s=Et(e._a[0],n[0]),(e._dayOfYear>xe(s)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),i=Be(s,0,e._dayOfYear),e._a[1]=i.getUTCMonth(),e._a[2]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=n[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Be:Pe).apply(null,o),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(g(e).weekdayMismatch=!0)}}function Rt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],g(e).empty=!0;var t,i,n,r,s,o,l=""+e._i,h=l.length,u=0;for(n=V(e._f,e._locale).match(x)||[],t=0;t<n.length;t++)r=n[t],(i=(l.match(ge(r,e))||[])[0])&&((s=l.substr(0,l.indexOf(i))).length>0&&g(e).unusedInput.push(s),l=l.slice(l.indexOf(i)+i.length),u+=i.length),B[r]?(i?g(e).empty=!1:g(e).unusedTokens.push(r),be(r,i,e)):e._strict&&!i&&g(e).unusedTokens.push(r);g(e).charsLeftOver=h-u,l.length>0&&g(e).unusedInput.push(l),e._a[3]<=12&&!0===g(e).bigHour&&e._a[3]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[3]=function(e,t,i){var n;if(null==i)return t;return null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?((n=e.isPM(i))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(o=g(e).era)&&(e._a[0]=e._locale.erasConvertYear(o,e._a[0])),wt(e),dt(e)}else bt(e);else At(e)}function kt(e){var t=e._i,i=e._f;return e._locale=e._locale||ut(e._l),null===t||void 0===i&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new E(dt(t)):(f(t)?e._d=t:o(i)?function(e){var t,i,n,r,s,a,o=!1;if(0===e._f.length)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)s=0,a=!1,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Rt(t),y(t)&&(a=!0),s+=g(t).charsLeftOver,s+=10*g(t).unusedTokens.length,g(t).score=s,o?s<n&&(n=s,i=t):(null==n||s<n||a)&&(n=s,i=t,a&&(o=!0));m(e,i||t)}(e):i?Rt(e):function(e){var t=e._i;d(t)?e._d=new Date(a.now()):f(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=gt.exec(e._i);null===t?(At(e),!1===e._isValid&&(delete e._isValid,bt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):o(t)?(e._a=_(t.slice(0),(function(e){return parseInt(e,10)})),wt(e)):l(t)?function(e){if(!e._d){var t=W(e._i),i=void 0===t.day?t.date:t.day;e._a=_([t.year,t.month,i,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),wt(e)}}(e):c(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),y(e)||(e._d=null),e))}function Dt(e,t,i,n,r){var s,a={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==i&&!1!==i||(n=i,i=void 0),(l(e)&&u(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=r,a._l=i,a._i=e,a._f=t,a._strict=n,(s=new E(dt(kt(a))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Tt(e,t,i,n){return Dt(e,t,i,n,!1)}a.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),a.ISO_8601=function(){},a.RFC_2822=function(){};var Lt=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()})),Mt=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()}));function Ot(e,t){var i,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(i=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](i)||(i=t[n]);return i}var Ct=["year","quarter","month","week","day","hour","minute","second","millisecond"];function It(e){var t=W(e),i=t.year||0,n=t.quarter||0,r=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,i,n=!1;for(t in e)if(h(e,t)&&(-1===Ee.call(Ct,t)||null!=e[t]&&isNaN(e[t])))return!1;for(i=0;i<Ct.length;++i)if(e[Ct[i]]){if(n)return!1;parseFloat(e[Ct[i]])!==Q(e[Ct[i]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*l+1e3*o*60*60,this._days=+a+7*s,this._months=+r+3*n+12*i,this._data={},this._locale=ut(),this._bubble()}function xt(e){return e instanceof It}function Ut(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Pt(e,t){N(e,0,0,(function(){var e=this.utcOffset(),i="+";return e<0&&(e=-e,i="-"),i+I(~~(e/60),2)+t+I(~~e%60,2)}))}Pt("Z",":"),Pt("ZZ",""),pe("Z",_e),pe("ZZ",_e),Ae(["Z","ZZ"],(function(e,t,i){i._useUTC=!0,i._tzm=Nt(_e,e)}));var Bt=/([\+\-]|\d\d)/gi;function Nt(e,t){var i,n,r=(t||"").match(e);return null===r?null:0===(n=60*(i=((r[r.length-1]||[])+"").match(Bt)||["-",0,0])[1]+Q(i[2]))?0:"+"===i[0]?n:-n}function Ft(e,t){var i,n;return t._isUTC?(i=t.clone(),n=(w(e)||f(e)?e.valueOf():Tt(e).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),a.updateOffset(i,!1),i):Tt(e).local()}function Vt(e){return-Math.round(e._d.getTimezoneOffset())}function Yt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}a.updateOffset=function(){};var qt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wt(e,t){var i,n,r,a=e,o=null;return xt(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(o=qt.exec(e))?(i="-"===o[1]?-1:1,a={y:0,d:Q(o[2])*i,h:Q(o[3])*i,m:Q(o[4])*i,s:Q(o[5])*i,ms:Q(Ut(1e3*o[6]))*i}):(o=jt.exec(e))?(i="-"===o[1]?-1:1,a={y:Gt(o[2],i),M:Gt(o[3],i),w:Gt(o[4],i),d:Gt(o[5],i),h:Gt(o[6],i),m:Gt(o[7],i),s:Gt(o[8],i)}):null==a?a={}:"object"===s(a)&&("from"in a||"to"in a)&&(r=function(e,t){var i;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Ft(t,e),e.isBefore(t)?i=zt(e,t):((i=zt(t,e)).milliseconds=-i.milliseconds,i.months=-i.months);return i}(Tt(a.from),Tt(a.to)),(a={}).ms=r.milliseconds,a.M=r.months),n=new It(a),xt(e)&&h(e,"_locale")&&(n._locale=e._locale),xt(e)&&h(e,"_isValid")&&(n._isValid=e._isValid),n}function Gt(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function zt(e,t){var i={};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function Ht(e,t){return function(i,n){var r;return null===n||isNaN(+n)||(L(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=n,n=r),Kt(this,Wt(i,n),e),this}}function Kt(e,t,i,n){var r=t._milliseconds,s=Ut(t._days),o=Ut(t._months);e.isValid()&&(n=null==n||n,o&&Oe(e,X(e,"Month")+o*i),s&&J(e,"Date",X(e,"Date")+s*i),r&&e._d.setTime(e._d.valueOf()+r*i),n&&a.updateOffset(e,s||o))}Wt.fn=It.prototype,Wt.invalid=function(){return Wt(NaN)};var Qt=Ht(1,"add"),Zt=Ht(-1,"subtract");function Xt(e){return"string"==typeof e||e instanceof String}function Jt(e){return w(e)||f(e)||Xt(e)||c(e)||function(e){var t=o(e),i=!1;t&&(i=0===e.filter((function(t){return!c(t)&&Xt(e)})).length);return t&&i}(e)||function(e){var t,i,n=l(e)&&!u(e),r=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<s.length;t+=1)i=s[t],r=r||h(e,i);return n&&r}(e)||null==e}function $t(e){var t,i=l(e)&&!u(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)n=n||h(e,r[t]);return i&&n}function ei(e,t){if(e.date()<t.date())return-ei(t,e);var i=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(i,"months");return-(i+(t-n<0?(t-n)/(n-e.clone().add(i-1,"months")):(t-n)/(e.clone().add(i+1,"months")-n)))||0}function ti(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ut(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ii=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ni(){return this._locale}function ri(e,t){return(e%t+t)%t}function si(e,t,i){return e<100&&e>=0?new Date(e+400,t,i)-126227808e5:new Date(e,t,i).valueOf()}function ai(e,t,i){return e<100&&e>=0?Date.UTC(e+400,t,i)-126227808e5:Date.UTC(e,t,i)}function oi(e,t){return t.erasAbbrRegex(e)}function li(){var e,t,i=[],n=[],r=[],s=[],a=this.eras();for(e=0,t=a.length;e<t;++e)n.push(ye(a[e].name)),i.push(ye(a[e].abbr)),r.push(ye(a[e].narrow)),s.push(ye(a[e].name)),s.push(ye(a[e].abbr)),s.push(ye(a[e].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function hi(e,t){N(0,[e,e.length],0,t)}function ui(e,t,i,n,r){var s;return null==e?Ve(this,n,r).year:(t>(s=Ye(e,n,r))&&(t=s),di.call(this,e,t,i,n,r))}function di(e,t,i,n,r){var s=Fe(e,t,i,n,r),a=Be(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),pe("N",oi),pe("NN",oi),pe("NNN",oi),pe("NNNN",(function(e,t){return t.erasNameRegex(e)})),pe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),Ae(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,i,n){var r=i._locale.erasParse(e,n,i._strict);r?g(i).era=r:g(i).invalidEra=e})),pe("y",de),pe("yy",de),pe("yyy",de),pe("yyyy",de),pe("yo",(function(e,t){return t._eraYearOrdinalRegex||de})),Ae(["y","yy","yyy","yyyy"],0),Ae(["yo"],(function(e,t,i,n){var r;i._locale._eraYearOrdinalRegex&&(r=e.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?t[0]=i._locale.eraYearOrdinalParse(e,r):t[0]=parseInt(e,10)})),N(0,["gg",2],0,(function(){return this.weekYear()%100})),N(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),hi("gggg","weekYear"),hi("ggggg","weekYear"),hi("GGGG","isoWeekYear"),hi("GGGGG","isoWeekYear"),q("weekYear","gg"),q("isoWeekYear","GG"),z("weekYear",1),z("isoWeekYear",1),pe("G",ce),pe("g",ce),pe("GG",se,te),pe("gg",se,te),pe("GGGG",he,ne),pe("gggg",he,ne),pe("GGGGG",ue,re),pe("ggggg",ue,re),Se(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,i,n){t[n.substr(0,2)]=Q(e)})),Se(["gg","GG"],(function(e,t,i,n){t[n]=a.parseTwoDigitYear(e)})),N("Q",0,"Qo","quarter"),q("quarter","Q"),z("quarter",7),pe("Q",ee),Ae("Q",(function(e,t){t[1]=3*(Q(e)-1)})),N("D",["DD",2],"Do","date"),q("date","D"),z("date",9),pe("D",se),pe("DD",se,te),pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ae(["D","DD"],2),Ae("Do",(function(e,t){t[2]=Q(e.match(se)[0])}));var ci=Z("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),q("dayOfYear","DDD"),z("dayOfYear",4),pe("DDD",le),pe("DDDD",ie),Ae(["DDD","DDDD"],(function(e,t,i){i._dayOfYear=Q(e)})),N("m",["mm",2],0,"minute"),q("minute","m"),z("minute",14),pe("m",se),pe("mm",se,te),Ae(["m","mm"],4);var fi=Z("Minutes",!1);N("s",["ss",2],0,"second"),q("second","s"),z("second",15),pe("s",se),pe("ss",se,te),Ae(["s","ss"],5);var _i,mi,pi=Z("Seconds",!1);for(N("S",0,0,(function(){return~~(this.millisecond()/100)})),N(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),N(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),N(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),N(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),N(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),N(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),q("millisecond","ms"),z("millisecond",16),pe("S",le,ee),pe("SS",le,te),pe("SSS",le,ie),_i="SSSS";_i.length<=9;_i+="S")pe(_i,de);function gi(e,t){t[6]=Q(1e3*("0."+e))}for(_i="S";_i.length<=9;_i+="S")Ae(_i,gi);mi=Z("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var yi=E.prototype;function vi(e){return e}yi.add=Qt,yi.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):$t(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var i=e||Tt(),n=Ft(i,this).startOf("day"),r=a.calendarFormat(this,n)||"sameElse",s=t&&(M(t[r])?t[r].call(this,i):t[r]);return this.format(s||this.localeData().calendar(r,this,Tt(i)))},yi.clone=function(){return new E(this)},yi.diff=function(e,t,i){var n,r,s;if(!this.isValid())return NaN;if(!(n=Ft(e,this)).isValid())return NaN;switch(r=6e4*(n.utcOffset()-this.utcOffset()),t=j(t)){case"year":s=ei(this,n)/12;break;case"month":s=ei(this,n);break;case"quarter":s=ei(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-r)/864e5;break;case"week":s=(this-n-r)/6048e5;break;default:s=this-n}return i?s:K(s)},yi.endOf=function(e){var t,i;if(void 0===(e=j(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?ai:si,e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-ri(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-ri(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-ri(t,1e3)-1}return this._d.setTime(t),a.updateOffset(this,!0),this},yi.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)},yi.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Tt(e).isValid())?Wt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},yi.fromNow=function(e){return this.from(Tt(),e)},yi.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Tt(e).isValid())?Wt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},yi.toNow=function(e){return this.to(Tt(),e)},yi.get=function(e){return M(this[e=j(e)])?this[e]():this},yi.invalidAt=function(){return g(this).overflow},yi.isAfter=function(e,t){var i=w(e)?e:Tt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=j(t)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf())},yi.isBefore=function(e,t){var i=w(e)?e:Tt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=j(t)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf())},yi.isBetween=function(e,t,i,n){var r=w(e)?e:Tt(e),s=w(t)?t:Tt(t);return!!(this.isValid()&&r.isValid()&&s.isValid())&&(("("===(n=n||"()")[0]?this.isAfter(r,i):!this.isBefore(r,i))&&(")"===n[1]?this.isBefore(s,i):!this.isAfter(s,i)))},yi.isSame=function(e,t){var i,n=w(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=j(t)||"millisecond")?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()))},yi.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},yi.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},yi.isValid=function(){return y(this)},yi.lang=ii,yi.locale=ti,yi.localeData=ni,yi.max=Mt,yi.min=Lt,yi.parsingFlags=function(){return m({},g(this))},yi.set=function(e,t){if("object"===s(e)){var i,n=function(e){var t,i=[];for(t in e)h(e,t)&&i.push({unit:t,priority:G[t]});return i.sort((function(e,t){return e.priority-t.priority})),i}(e=W(e));for(i=0;i<n.length;i++)this[n[i].unit](e[n[i].unit])}else if(M(this[e=j(e)]))return this[e](t);return this},yi.startOf=function(e){var t,i;if(void 0===(e=j(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?ai:si,e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ri(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=ri(t,6e4);break;case"second":t=this._d.valueOf(),t-=ri(t,1e3)}return this._d.setTime(t),a.updateOffset(this,!0),this},yi.subtract=Zt,yi.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},yi.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},yi.toDate=function(){return new Date(this.valueOf())},yi.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,i=t?this.clone().utc():this;return i.year()<0||i.year()>9999?F(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):M(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(i,"Z")):F(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},yi.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,i,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",i=r+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+i)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(yi[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),yi.toJSON=function(){return this.isValid()?this.toISOString():null},yi.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},yi.unix=function(){return Math.floor(this.valueOf()/1e3)},yi.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},yi.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},yi.eraName=function(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until)return n[e].name;if(n[e].until<=i&&i<=n[e].since)return n[e].name}return""},yi.eraNarrow=function(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until)return n[e].narrow;if(n[e].until<=i&&i<=n[e].since)return n[e].narrow}return""},yi.eraAbbr=function(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until)return n[e].abbr;if(n[e].until<=i&&i<=n[e].since)return n[e].abbr}return""},yi.eraYear=function(){var e,t,i,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(i=r[e].since<=r[e].until?1:-1,n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return(this.year()-a(r[e].since).year())*i+r[e].offset;return this.year()},yi.year=Ue,yi.isLeapYear=function(){return H(this.year())},yi.weekYear=function(e){return ui.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},yi.isoWeekYear=function(e){return ui.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},yi.quarter=yi.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},yi.month=Ce,yi.daysInMonth=function(){return we(this.year(),this.month())},yi.week=yi.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},yi.isoWeek=yi.isoWeeks=function(e){var t=Ve(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},yi.weeksInYear=function(){var e=this.localeData()._week;return Ye(this.year(),e.dow,e.doy)},yi.weeksInWeekYear=function(){var e=this.localeData()._week;return Ye(this.weekYear(),e.dow,e.doy)},yi.isoWeeksInYear=function(){return Ye(this.year(),1,4)},yi.isoWeeksInISOWeekYear=function(){return Ye(this.isoWeekYear(),1,4)},yi.date=ci,yi.day=yi.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},yi.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},yi.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},yi.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},yi.hour=yi.hours=et,yi.minute=yi.minutes=fi,yi.second=yi.seconds=pi,yi.millisecond=yi.milliseconds=mi,yi.utcOffset=function(e,t,i){var n,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Nt(_e,e)))return this}else Math.abs(e)<16&&!i&&(e*=60);return!this._isUTC&&t&&(n=Vt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==e&&(!t||this._changeInProgress?Kt(this,Wt(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Vt(this)},yi.utc=function(e){return this.utcOffset(0,e)},yi.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Vt(this),"m")),this},yi.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Nt(fe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},yi.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},yi.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yi.isLocal=function(){return!!this.isValid()&&!this._isUTC},yi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yi.isUtc=Yt,yi.isUTC=Yt,yi.zoneAbbr=function(){return this._isUTC?"UTC":""},yi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yi.dates=k("dates accessor is deprecated. Use date instead.",ci),yi.months=k("months accessor is deprecated. Use month instead",Ce),yi.years=k("years accessor is deprecated. Use year instead",Ue),yi.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),yi.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!d(this._isDSTShifted))return this._isDSTShifted;var e,t={};return b(t,this),(t=kt(t))._a?(e=t._isUTC?p(t._a):Tt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,i){var n,r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0;for(n=0;n<r;n++)(i&&e[n]!==t[n]||!i&&Q(e[n])!==Q(t[n]))&&a++;return a+s}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Ai=C.prototype;function Si(e,t,i,n){var r=ut(),s=p().set(n,t);return r[i](s,e)}function bi(e,t,i){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return Si(e,t,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=Si(e,n,i,"month");return r}function Ei(e,t,i,n){"boolean"==typeof e?(c(t)&&(i=t,t=void 0),t=t||""):(i=t=e,e=!1,c(t)&&(i=t,t=void 0),t=t||"");var r,s=ut(),a=e?s._week.dow:0,o=[];if(null!=i)return Si(t,(i+a)%7,n,"day");for(r=0;r<7;r++)o[r]=Si(t,(r+a)%7,n,"day");return o}Ai.calendar=function(e,t,i){var n=this._calendar[e]||this._calendar.sameElse;return M(n)?n.call(t,i):n},Ai.longDateFormat=function(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.match(x).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Ai.invalidDate=function(){return this._invalidDate},Ai.ordinal=function(e){return this._ordinal.replace("%d",e)},Ai.preparse=vi,Ai.postformat=vi,Ai.relativeTime=function(e,t,i,n){var r=this._relativeTime[i];return M(r)?r(e,t,i,n):r.replace(/%d/i,e)},Ai.pastFuture=function(e,t){var i=this._relativeTime[e>0?"future":"past"];return M(i)?i(t):i.replace(/%s/i,t)},Ai.set=function(e){var t,i;for(i in e)h(e,i)&&(M(t=e[i])?this[i]=t:this["_"+i]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Ai.eras=function(e,t){var i,n,r,o=this._eras||ut("en")._eras;for(i=0,n=o.length;i<n;++i){switch(s(o[i].since)){case"string":r=a(o[i].since).startOf("day"),o[i].since=r.valueOf()}switch(s(o[i].until)){case"undefined":o[i].until=1/0;break;case"string":r=a(o[i].until).startOf("day").valueOf(),o[i].until=r.valueOf()}}return o},Ai.erasParse=function(e,t,i){var n,r,s,a,o,l=this.eras();for(e=e.toUpperCase(),n=0,r=l.length;n<r;++n)if(s=l[n].name.toUpperCase(),a=l[n].abbr.toUpperCase(),o=l[n].narrow.toUpperCase(),i)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[n];break;case"NNNN":if(s===e)return l[n];break;case"NNNNN":if(o===e)return l[n]}else if([s,a,o].indexOf(e)>=0)return l[n]},Ai.erasConvertYear=function(e,t){var i=e.since<=e.until?1:-1;return void 0===t?a(e.since).year():a(e.since).year()+(t-e.offset)*i},Ai.erasAbbrRegex=function(e){return h(this,"_erasAbbrRegex")||li.call(this),e?this._erasAbbrRegex:this._erasRegex},Ai.erasNameRegex=function(e){return h(this,"_erasNameRegex")||li.call(this),e?this._erasNameRegex:this._erasRegex},Ai.erasNarrowRegex=function(e){return h(this,"_erasNarrowRegex")||li.call(this),e?this._erasNarrowRegex:this._erasRegex},Ai.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||De).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},Ai.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[De.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Ai.monthsParse=function(e,t,i){var n,r,s;if(this._monthsParseExact)return Me.call(this,e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(r=p([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(i&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!i&&this._monthsParse[n].test(e))return n}},Ai.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Ai.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Te),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Ai.week=function(e){return Ve(e,this._week.dow,this._week.doy).week},Ai.firstDayOfYear=function(){return this._week.doy},Ai.firstDayOfWeek=function(){return this._week.dow},Ai.weekdays=function(e,t){var i=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?qe(i,this._week.dow):e?i[e.day()]:i},Ai.weekdaysMin=function(e){return!0===e?qe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Ai.weekdaysShort=function(e){return!0===e?qe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Ai.weekdaysParse=function(e,t,i){var n,r,s;if(this._weekdaysParseExact)return Qe.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=p([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(i&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(i&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!i&&this._weekdaysParse[n].test(e))return n}},Ai.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Ai.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=He),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Ai.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ke),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Ai.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Ai.meridiem=function(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"},lt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=k("moment.lang is deprecated. Use moment.locale instead.",lt),a.langData=k("moment.langData is deprecated. Use moment.localeData instead.",ut);var wi=Math.abs;function Ri(e,t,i,n){var r=Wt(t,i);return e._milliseconds+=n*r._milliseconds,e._days+=n*r._days,e._months+=n*r._months,e._bubble()}function ki(e){return e<0?Math.floor(e):Math.ceil(e)}function Di(e){return 4800*e/146097}function Ti(e){return 146097*e/4800}function Li(e){return function(){return this.as(e)}}var Mi=Li("ms"),Oi=Li("s"),Ci=Li("m"),Ii=Li("h"),xi=Li("d"),Ui=Li("w"),Pi=Li("M"),Bi=Li("Q"),Ni=Li("y");function Fi(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vi=Fi("milliseconds"),Yi=Fi("seconds"),qi=Fi("minutes"),ji=Fi("hours"),Wi=Fi("days"),Gi=Fi("months"),zi=Fi("years");var Hi=Math.round,Ki={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Qi(e,t,i,n,r){return r.relativeTime(t||1,!!i,e,n)}var Zi=Math.abs;function Xi(e){return(e>0)-(e<0)||+e}function Ji(){if(!this.isValid())return this.localeData().invalidDate();var e,t,i,n,r,s,a,o,l=Zi(this._milliseconds)/1e3,h=Zi(this._days),u=Zi(this._months),d=this.asSeconds();return d?(e=K(l/60),t=K(e/60),l%=60,e%=60,i=K(u/12),u%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=d<0?"-":"",s=Xi(this._months)!==Xi(d)?"-":"",a=Xi(this._days)!==Xi(d)?"-":"",o=Xi(this._milliseconds)!==Xi(d)?"-":"",r+"P"+(i?s+i+"Y":"")+(u?s+u+"M":"")+(h?a+h+"D":"")+(t||e||l?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(l?o+n+"S":"")):"P0D"}var $i=It.prototype;$i.isValid=function(){return this._isValid},$i.abs=function(){var e=this._data;return this._milliseconds=wi(this._milliseconds),this._days=wi(this._days),this._months=wi(this._months),e.milliseconds=wi(e.milliseconds),e.seconds=wi(e.seconds),e.minutes=wi(e.minutes),e.hours=wi(e.hours),e.months=wi(e.months),e.years=wi(e.years),this},$i.add=function(e,t){return Ri(this,e,t,1)},$i.subtract=function(e,t){return Ri(this,e,t,-1)},$i.as=function(e){if(!this.isValid())return NaN;var t,i,n=this._milliseconds;if("month"===(e=j(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,i=this._months+Di(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(t=this._days+Math.round(Ti(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},$i.asMilliseconds=Mi,$i.asSeconds=Oi,$i.asMinutes=Ci,$i.asHours=Ii,$i.asDays=xi,$i.asWeeks=Ui,$i.asMonths=Pi,$i.asQuarters=Bi,$i.asYears=Ni,$i.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Q(this._months/12):NaN},$i._bubble=function(){var e,t,i,n,r,s=this._milliseconds,a=this._days,o=this._months,l=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*ki(Ti(o)+a),a=0,o=0),l.milliseconds=s%1e3,e=K(s/1e3),l.seconds=e%60,t=K(e/60),l.minutes=t%60,i=K(t/60),l.hours=i%24,a+=K(i/24),o+=r=K(Di(a)),a-=ki(Ti(r)),n=K(o/12),o%=12,l.days=a,l.months=o,l.years=n,this},$i.clone=function(){return Wt(this)},$i.get=function(e){return e=j(e),this.isValid()?this[e+"s"]():NaN},$i.milliseconds=Vi,$i.seconds=Yi,$i.minutes=qi,$i.hours=ji,$i.days=Wi,$i.weeks=function(){return K(this.days()/7)},$i.months=Gi,$i.years=zi,$i.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var i,n,r=!1,a=Ki;return"object"===s(e)&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"===s(t)&&(a=Object.assign({},Ki,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),n=function(e,t,i,n){var r=Wt(e).abs(),s=Hi(r.as("s")),a=Hi(r.as("m")),o=Hi(r.as("h")),l=Hi(r.as("d")),h=Hi(r.as("M")),u=Hi(r.as("w")),d=Hi(r.as("y")),c=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||a<=1&&["m"]||a<i.m&&["mm",a]||o<=1&&["h"]||o<i.h&&["hh",o]||l<=1&&["d"]||l<i.d&&["dd",l];return null!=i.w&&(c=c||u<=1&&["w"]||u<i.w&&["ww",u]),(c=c||h<=1&&["M"]||h<i.M&&["MM",h]||d<=1&&["y"]||["yy",d])[2]=t,c[3]=+e>0,c[4]=n,Qi.apply(null,c)}(this,!r,a,i=this.localeData()),r&&(n=i.pastFuture(+this,n)),i.postformat(n)},$i.toISOString=Ji,$i.toString=Ji,$i.toJSON=Ji,$i.locale=ti,$i.localeData=ni,$i.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ji),$i.lang=ii,N("X",0,0,"unix"),N("x",0,0,"valueOf"),pe("x",ce),pe("X",/[+-]?\d+(\.\d{1,3})?/),Ae("X",(function(e,t,i){i._d=new Date(1e3*parseFloat(e))})),Ae("x",(function(e,t,i){i._d=new Date(Q(e))})),//! moment.js
8   -a.version="2.29.1",n=Tt,a.fn=yi,a.min=function(){var e=[].slice.call(arguments,0);return Ot("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return Ot("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=p,a.unix=function(e){return Tt(1e3*e)},a.months=function(e,t){return bi(e,t,"months")},a.isDate=f,a.locale=lt,a.invalid=v,a.duration=Wt,a.isMoment=w,a.weekdays=function(e,t,i){return Ei(e,t,i,"weekdays")},a.parseZone=function(){return Tt.apply(null,arguments).parseZone()},a.localeData=ut,a.isDuration=xt,a.monthsShort=function(e,t){return bi(e,t,"monthsShort")},a.weekdaysMin=function(e,t,i){return Ei(e,t,i,"weekdaysMin")},a.defineLocale=ht,a.updateLocale=function(e,t){if(null!=t){var i,n,r=it;null!=nt[e]&&null!=nt[e].parentLocale?nt[e].set(O(nt[e]._config,t)):(null!=(n=ot(e))&&(r=n._config),t=O(r,t),null==n&&(t.abbr=e),(i=new C(t)).parentLocale=nt[e],nt[e]=i),lt(e)}else null!=nt[e]&&(null!=nt[e].parentLocale?(nt[e]=nt[e].parentLocale,e===lt()&&lt(e)):null!=nt[e]&&delete nt[e]);return nt[e]},a.locales=function(){return D(nt)},a.weekdaysShort=function(e,t,i){return Ei(e,t,i,"weekdaysShort")},a.normalizeUnits=j,a.relativeTimeRounding=function(e){return void 0===e?Hi:"function"==typeof e&&(Hi=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Ki[e]&&(void 0===t?Ki[e]:(Ki[e]=t,"s"===e&&(Ki.ss=t-1),!0))},a.calendarFormat=function(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},a.prototype=yi,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t.a=a}).call(this,i(16)(e))},function(e,t,i){"use strict";var n=i(3),r=i.n(n)()((function(e){return e[1]}));r.push([e.i,".flvWai,.flvWai>.videoFlv{\r\n width: 100%; \r\n height: 100%; \r\n}\r\n.flvWai>.videoFlv:hover{\r\n outline: none;\r\n}",""]),t.a=r},function(e,t,i){"use strict";var n=i(3),r=i.n(n)()((function(e){return e[1]}));r.push([e.i,'.timerComCss{\r\n font-family: "fontInit";\r\n color: rgb(47, 233, 242);\r\n font-size: 20px;\r\n letter-spacing: 2px;\r\n}\r\np{\r\n margin: 0;\r\n padding: 0;\r\n}',""]),t.a=r},function(e,t,i){"use strict";var n=i(3),r=i.n(n)()((function(e){return e[1]}));r.push([e.i,"img{\r\n width: 100%;\r\n}",""]),t.a=r},function(e,t,i){"use strict";var n=i(3),r=i.n(n)()((function(e){return e[1]}));r.push([e.i,".funAreaSelectCss{\r\n position: relative;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n.funAreaSelectCss canvas{\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n}",""]),t.a=r},function(e,t,i){"use strict";i.r(t);var n=i(4);
  7 +function a(){return n.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(h(e,t))return!1;return!0}function d(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function f(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function _(e,t){var i,n=[];for(i=0;i<e.length;++i)n.push(t(e[i],i));return n}function m(e,t){for(var i in t)h(t,i)&&(e[i]=t[i]);return h(t,"toString")&&(e.toString=t.toString),h(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,i,n){return Dt(e,t,i,n,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function y(e){if(null==e._isValid){var t=g(e),i=r.call(t.parsedDateParts,(function(e){return null!=e})),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function v(e){var t=p(NaN);return null!=e?m(g(t),e):g(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,i=Object(this),n=i.length>>>0;for(t=0;t<n;t++)if(t in i&&e.call(this,i[t],t,i))return!0;return!1};var A=a.momentProperties=[],S=!1;function b(e,t){var i,n,r;if(d(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),d(t._i)||(e._i=t._i),d(t._f)||(e._f=t._f),d(t._l)||(e._l=t._l),d(t._strict)||(e._strict=t._strict),d(t._tzm)||(e._tzm=t._tzm),d(t._isUTC)||(e._isUTC=t._isUTC),d(t._offset)||(e._offset=t._offset),d(t._pf)||(e._pf=g(t)),d(t._locale)||(e._locale=t._locale),A.length>0)for(i=0;i<A.length;i++)d(r=t[n=A[i]])||(e[n]=r);return e}function E(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===S&&(S=!0,a.updateOffset(this),S=!1)}function w(e){return e instanceof E||null!=e&&null!=e._isAMomentObject}function R(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var i=!0;return m((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),i){var n,r,o,l=[];for(r=0;r<arguments.length;r++){if(n="","object"===s(arguments[r])){for(o in n+="\n["+r+"] ",arguments[0])h(arguments[0],o)&&(n+=o+": "+arguments[0][o]+", ");n=n.slice(0,-2)}else n=arguments[r];l.push(n)}R(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),i=!1}return t.apply(this,arguments)}),t)}var D,T={};function L(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),T[e]||(R(t),T[e]=!0)}function M(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e,t){var i,n=m({},e);for(i in t)h(t,i)&&(l(e[i])&&l(t[i])?(n[i]={},m(n[i],e[i]),m(n[i],t[i])):null!=t[i]?n[i]=t[i]:delete n[i]);for(i in e)h(e,i)&&!h(t,i)&&l(e[i])&&(n[i]=m({},n[i]));return n}function C(e){null!=e&&this.set(e)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,D=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)h(e,t)&&i.push(t);return i};function I(e,t,i){var n=""+Math.abs(e),r=t-n.length;return(e>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}var x=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,P={},B={};function N(e,t,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),e&&(B[e]=r),t&&(B[t[0]]=function(){return I(r.apply(this,arguments),t[1],t[2])}),i&&(B[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function F(e,t){return e.isValid()?(t=V(t,e.localeData()),P[t]=P[t]||function(e){var t,i,n,r=e.match(x);for(t=0,i=r.length;t<i;t++)B[r[t]]?r[t]=B[r[t]]:r[t]=(n=r[t]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(t){var n,s="";for(n=0;n<i;n++)s+=M(r[n])?r[n].call(t,e):r[n];return s}}(t),P[t](e)):e.localeData().invalidDate()}function V(e,t){var i=5;function n(e){return t.longDateFormat(e)||e}for(U.lastIndex=0;i>=0&&U.test(e);)e=e.replace(U,n),U.lastIndex=0,i-=1;return e}var Y={};function q(e,t){var i=e.toLowerCase();Y[i]=Y[i+"s"]=Y[t]=e}function j(e){return"string"==typeof e?Y[e]||Y[e.toLowerCase()]:void 0}function W(e){var t,i,n={};for(i in e)h(e,i)&&(t=j(i))&&(n[t]=e[i]);return n}var G={};function z(e,t){G[e]=t}function H(e){return e%4==0&&e%100!=0||e%400==0}function K(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Q(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=K(t)),i}function X(e,t){return function(i){return null!=i?(J(this,e,i),a.updateOffset(this,t),this):Z(this,e)}}function Z(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function J(e,t,i){e.isValid()&&!isNaN(i)&&("FullYear"===t&&H(e.year())&&1===e.month()&&29===e.date()?(i=Q(i),e._d["set"+(e._isUTC?"UTC":"")+t](i,e.month(),we(i,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](i))}var $,ee=/\d/,te=/\d\d/,ie=/\d{3}/,ne=/\d{4}/,re=/[+-]?\d{6}/,se=/\d\d?/,ae=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,le=/\d{1,3}/,he=/\d{1,4}/,ue=/[+-]?\d{1,6}/,de=/\d+/,ce=/[+-]?\d+/,fe=/Z|[+-]\d\d:?\d\d/gi,_e=/Z|[+-]\d\d(?::?\d\d)?/gi,me=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function pe(e,t,i){$[e]=M(t)?t:function(e,n){return e&&i?i:t}}function ge(e,t){return h($,e)?$[e](t._strict,t._locale):new RegExp(ye(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,i,n,r){return t||i||n||r}))))}function ye(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}$={};var ve={};function Ae(e,t){var i,n=t;for("string"==typeof e&&(e=[e]),c(t)&&(n=function(e,i){i[t]=Q(e)}),i=0;i<e.length;i++)ve[e[i]]=n}function Se(e,t){Ae(e,(function(e,i,n,r){n._w=n._w||{},t(e,n._w,n,r)}))}function be(e,t,i){null!=t&&h(ve,e)&&ve[e](t,i._a,i,e)}var Ee;function we(e,t){if(isNaN(e)||isNaN(t))return NaN;var i,n=(t%(i=12)+i)%i;return e+=(t-n)/12,1===n?H(e)?29:28:31-n%7%2}Ee=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},N("M",["MM",2],"Mo",(function(){return this.month()+1})),N("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),N("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),q("month","M"),z("month",8),pe("M",se),pe("MM",se,te),pe("MMM",(function(e,t){return t.monthsShortRegex(e)})),pe("MMMM",(function(e,t){return t.monthsRegex(e)})),Ae(["M","MM"],(function(e,t){t[1]=Q(e)-1})),Ae(["MMM","MMMM"],(function(e,t,i,n){var r=i._locale.monthsParse(e,n,i._strict);null!=r?t[1]=r:g(i).invalidMonth=e}));var Re="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ke="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),De=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te=me,Le=me;function Me(e,t,i){var n,r,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===t?-1!==(r=Ee.call(this._shortMonthsParse,a))?r:null:-1!==(r=Ee.call(this._longMonthsParse,a))?r:null:"MMM"===t?-1!==(r=Ee.call(this._shortMonthsParse,a))||-1!==(r=Ee.call(this._longMonthsParse,a))?r:null:-1!==(r=Ee.call(this._longMonthsParse,a))||-1!==(r=Ee.call(this._shortMonthsParse,a))?r:null}function Oe(e,t){var i;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Q(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return i=Math.min(e.date(),we(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e}function Ce(e){return null!=e?(Oe(this,e),a.updateOffset(this,!0),this):Z(this,"Month")}function Ie(){function e(e,t){return t.length-e.length}var t,i,n=[],r=[],s=[];for(t=0;t<12;t++)i=p([2e3,t]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(n.sort(e),r.sort(e),s.sort(e),t=0;t<12;t++)n[t]=ye(n[t]),r[t]=ye(r[t]);for(t=0;t<24;t++)s[t]=ye(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function xe(e){return H(e)?366:365}N("Y",0,0,(function(){var e=this.year();return e<=9999?I(e,4):"+"+e})),N(0,["YY",2],0,(function(){return this.year()%100})),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),q("year","y"),z("year",1),pe("Y",ce),pe("YY",se,te),pe("YYYY",he,ne),pe("YYYYY",ue,re),pe("YYYYYY",ue,re),Ae(["YYYYY","YYYYYY"],0),Ae("YYYY",(function(e,t){t[0]=2===e.length?a.parseTwoDigitYear(e):Q(e)})),Ae("YY",(function(e,t){t[0]=a.parseTwoDigitYear(e)})),Ae("Y",(function(e,t){t[0]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return Q(e)+(Q(e)>68?1900:2e3)};var Ue=X("FullYear",!0);function Pe(e,t,i,n,r,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,i,n,r,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,i,n,r,s,a),o}function Be(e){var t,i;return e<100&&e>=0?((i=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ne(e,t,i){var n=7+t-i;return-((7+Be(e,0,n).getUTCDay()-t)%7)+n-1}function Fe(e,t,i,n,r){var s,a,o=1+7*(t-1)+(7+i-n)%7+Ne(e,n,r);return o<=0?a=xe(s=e-1)+o:o>xe(e)?(s=e+1,a=o-xe(e)):(s=e,a=o),{year:s,dayOfYear:a}}function Ve(e,t,i){var n,r,s=Ne(e.year(),t,i),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?n=a+Ye(r=e.year()-1,t,i):a>Ye(e.year(),t,i)?(n=a-Ye(e.year(),t,i),r=e.year()+1):(r=e.year(),n=a),{week:n,year:r}}function Ye(e,t,i){var n=Ne(e,t,i),r=Ne(e+1,t,i);return(xe(e)-n+r)/7}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),q("week","w"),q("isoWeek","W"),z("week",5),z("isoWeek",5),pe("w",se),pe("ww",se,te),pe("W",se),pe("WW",se,te),Se(["w","ww","W","WW"],(function(e,t,i,n){t[n.substr(0,1)]=Q(e)}));function qe(e,t){return e.slice(t,7).concat(e.slice(0,t))}N("d",0,"do","day"),N("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),N("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),N("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),q("day","d"),q("weekday","e"),q("isoWeekday","E"),z("day",11),z("weekday",11),z("isoWeekday",11),pe("d",se),pe("e",se),pe("E",se),pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),Se(["dd","ddd","dddd"],(function(e,t,i,n){var r=i._locale.weekdaysParse(e,n,i._strict);null!=r?t.d=r:g(i).invalidWeekday=e})),Se(["d","e","E"],(function(e,t,i,n){t[n]=Q(e)}));var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),We="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ge="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ze=me,He=me,Ke=me;function Qe(e,t,i){var n,r,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(r=Ee.call(this._weekdaysParse,a))?r:null:"ddd"===t?-1!==(r=Ee.call(this._shortWeekdaysParse,a))?r:null:-1!==(r=Ee.call(this._minWeekdaysParse,a))?r:null:"dddd"===t?-1!==(r=Ee.call(this._weekdaysParse,a))||-1!==(r=Ee.call(this._shortWeekdaysParse,a))||-1!==(r=Ee.call(this._minWeekdaysParse,a))?r:null:"ddd"===t?-1!==(r=Ee.call(this._shortWeekdaysParse,a))||-1!==(r=Ee.call(this._weekdaysParse,a))||-1!==(r=Ee.call(this._minWeekdaysParse,a))?r:null:-1!==(r=Ee.call(this._minWeekdaysParse,a))||-1!==(r=Ee.call(this._weekdaysParse,a))||-1!==(r=Ee.call(this._shortWeekdaysParse,a))?r:null}function Xe(){function e(e,t){return t.length-e.length}var t,i,n,r,s,a=[],o=[],l=[],h=[];for(t=0;t<7;t++)i=p([2e3,1]).day(t),n=ye(this.weekdaysMin(i,"")),r=ye(this.weekdaysShort(i,"")),s=ye(this.weekdays(i,"")),a.push(n),o.push(r),l.push(s),h.push(n),h.push(r),h.push(s);a.sort(e),o.sort(e),l.sort(e),h.sort(e),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ze(){return this.hours()%12||12}function Je(e,t){N(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function $e(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,Ze),N("k",["kk",2],0,(function(){return this.hours()||24})),N("hmm",0,0,(function(){return""+Ze.apply(this)+I(this.minutes(),2)})),N("hmmss",0,0,(function(){return""+Ze.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)})),N("Hmm",0,0,(function(){return""+this.hours()+I(this.minutes(),2)})),N("Hmmss",0,0,(function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)})),Je("a",!0),Je("A",!1),q("hour","h"),z("hour",13),pe("a",$e),pe("A",$e),pe("H",se),pe("h",se),pe("k",se),pe("HH",se,te),pe("hh",se,te),pe("kk",se,te),pe("hmm",ae),pe("hmmss",oe),pe("Hmm",ae),pe("Hmmss",oe),Ae(["H","HH"],3),Ae(["k","kk"],(function(e,t,i){var n=Q(e);t[3]=24===n?0:n})),Ae(["a","A"],(function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e})),Ae(["h","hh"],(function(e,t,i){t[3]=Q(e),g(i).bigHour=!0})),Ae("hmm",(function(e,t,i){var n=e.length-2;t[3]=Q(e.substr(0,n)),t[4]=Q(e.substr(n)),g(i).bigHour=!0})),Ae("hmmss",(function(e,t,i){var n=e.length-4,r=e.length-2;t[3]=Q(e.substr(0,n)),t[4]=Q(e.substr(n,2)),t[5]=Q(e.substr(r)),g(i).bigHour=!0})),Ae("Hmm",(function(e,t,i){var n=e.length-2;t[3]=Q(e.substr(0,n)),t[4]=Q(e.substr(n))})),Ae("Hmmss",(function(e,t,i){var n=e.length-4,r=e.length-2;t[3]=Q(e.substr(0,n)),t[4]=Q(e.substr(n,2)),t[5]=Q(e.substr(r))}));var et=X("Hours",!0);var tt,it={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Re,monthsShort:ke,week:{dow:0,doy:6},weekdays:je,weekdaysMin:Ge,weekdaysShort:We,meridiemParse:/[ap]\.?m?\.?/i},nt={},rt={};function st(e,t){var i,n=Math.min(e.length,t.length);for(i=0;i<n;i+=1)if(e[i]!==t[i])return i;return n}function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(t){var n=null;if(void 0===nt[t]&&void 0!==e&&e&&e.exports)try{n=tt._abbr,void 0,i(16)("./"+t),lt(n)}catch(e){nt[t]=null}return nt[t]}function lt(e,t){var i;return e&&((i=d(t)?ut(e):ht(e,t))?tt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function ht(e,t){if(null!==t){var i,n=it;if(t.abbr=e,null!=nt[e])L("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=nt[e]._config;else if(null!=t.parentLocale)if(null!=nt[t.parentLocale])n=nt[t.parentLocale]._config;else{if(null==(i=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;n=i._config}return nt[e]=new C(O(n,t)),rt[e]&&rt[e].forEach((function(e){ht(e.name,e.config)})),lt(e),nt[e]}return delete nt[e],null}function ut(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,i,n,r,s=0;s<e.length;){for(t=(r=at(e[s]).split("-")).length,i=(i=at(e[s+1]))?i.split("-"):null;t>0;){if(n=ot(r.slice(0,t).join("-")))return n;if(i&&i.length>=t&&st(r,i)>=t-1)break;t--}s++}return tt}(e)}function dt(e){var t,i=e._a;return i&&-2===g(e).overflow&&(t=i[1]<0||i[1]>11?1:i[2]<1||i[2]>we(i[0],i[1])?2:i[3]<0||i[3]>24||24===i[3]&&(0!==i[4]||0!==i[5]||0!==i[6])?3:i[4]<0||i[4]>59?4:i[5]<0||i[5]>59?5:i[6]<0||i[6]>999?6:-1,g(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),g(e)._overflowWeeks&&-1===t&&(t=7),g(e)._overflowWeekday&&-1===t&&(t=8),g(e).overflow=t),e}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],gt=/^\/?Date\((-?\d+)/i,yt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function At(e){var t,i,n,r,s,a,o=e._i,l=ct.exec(o)||ft.exec(o);if(l){for(g(e).iso=!0,t=0,i=mt.length;t<i;t++)if(mt[t][1].exec(l[1])){r=mt[t][0],n=!1!==mt[t][2];break}if(null==r)return void(e._isValid=!1);if(l[3]){for(t=0,i=pt.length;t<i;t++)if(pt[t][1].exec(l[3])){s=(l[2]||" ")+pt[t][0];break}if(null==s)return void(e._isValid=!1)}if(!n&&null!=s)return void(e._isValid=!1);if(l[4]){if(!_t.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=r+(s||"")+(a||""),Rt(e)}else e._isValid=!1}function St(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function bt(e){var t,i,n,r,s,a,o,l,h=yt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(h){if(i=h[4],n=h[3],r=h[2],s=h[5],a=h[6],o=h[7],l=[St(i),ke.indexOf(n),parseInt(r,10),parseInt(s,10),parseInt(a,10)],o&&l.push(parseInt(o,10)),t=l,!function(e,t,i){return!e||We.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(i).weekdayMismatch=!0,i._isValid=!1,!1)}(h[1],t,e))return;e._a=t,e._tzm=function(e,t,i){if(e)return vt[e];if(t)return 0;var n=parseInt(i,10),r=n%100;return 60*((n-r)/100)+r}(h[8],h[9],h[10]),e._d=Be.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Et(e,t,i){return null!=e?e:null!=t?t:i}function wt(e){var t,i,n,r,s,o=[];if(!e._d){for(n=function(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,i,n,r,s,a,o,l,h;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,a=4,i=Et(t.GG,e._a[0],Ve(Tt(),1,4).year),n=Et(t.W,1),((r=Et(t.E,1))<1||r>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,h=Ve(Tt(),s,a),i=Et(t.gg,e._a[0],h.year),n=Et(t.w,h.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+s,(t.e<0||t.e>6)&&(l=!0)):r=s);n<1||n>Ye(i,s,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(o=Fe(i,n,r,s,a),e._a[0]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(s=Et(e._a[0],n[0]),(e._dayOfYear>xe(s)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),i=Be(s,0,e._dayOfYear),e._a[1]=i.getUTCMonth(),e._a[2]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=n[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Be:Pe).apply(null,o),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(g(e).weekdayMismatch=!0)}}function Rt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],g(e).empty=!0;var t,i,n,r,s,o,l=""+e._i,h=l.length,u=0;for(n=V(e._f,e._locale).match(x)||[],t=0;t<n.length;t++)r=n[t],(i=(l.match(ge(r,e))||[])[0])&&((s=l.substr(0,l.indexOf(i))).length>0&&g(e).unusedInput.push(s),l=l.slice(l.indexOf(i)+i.length),u+=i.length),B[r]?(i?g(e).empty=!1:g(e).unusedTokens.push(r),be(r,i,e)):e._strict&&!i&&g(e).unusedTokens.push(r);g(e).charsLeftOver=h-u,l.length>0&&g(e).unusedInput.push(l),e._a[3]<=12&&!0===g(e).bigHour&&e._a[3]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[3]=function(e,t,i){var n;if(null==i)return t;return null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?((n=e.isPM(i))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(o=g(e).era)&&(e._a[0]=e._locale.erasConvertYear(o,e._a[0])),wt(e),dt(e)}else bt(e);else At(e)}function kt(e){var t=e._i,i=e._f;return e._locale=e._locale||ut(e._l),null===t||void 0===i&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new E(dt(t)):(f(t)?e._d=t:o(i)?function(e){var t,i,n,r,s,a,o=!1;if(0===e._f.length)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)s=0,a=!1,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Rt(t),y(t)&&(a=!0),s+=g(t).charsLeftOver,s+=10*g(t).unusedTokens.length,g(t).score=s,o?s<n&&(n=s,i=t):(null==n||s<n||a)&&(n=s,i=t,a&&(o=!0));m(e,i||t)}(e):i?Rt(e):function(e){var t=e._i;d(t)?e._d=new Date(a.now()):f(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=gt.exec(e._i);null===t?(At(e),!1===e._isValid&&(delete e._isValid,bt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):o(t)?(e._a=_(t.slice(0),(function(e){return parseInt(e,10)})),wt(e)):l(t)?function(e){if(!e._d){var t=W(e._i),i=void 0===t.day?t.date:t.day;e._a=_([t.year,t.month,i,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),wt(e)}}(e):c(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),y(e)||(e._d=null),e))}function Dt(e,t,i,n,r){var s,a={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==i&&!1!==i||(n=i,i=void 0),(l(e)&&u(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=r,a._l=i,a._i=e,a._f=t,a._strict=n,(s=new E(dt(kt(a))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Tt(e,t,i,n){return Dt(e,t,i,n,!1)}a.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),a.ISO_8601=function(){},a.RFC_2822=function(){};var Lt=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()})),Mt=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()}));function Ot(e,t){var i,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(i=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](i)||(i=t[n]);return i}var Ct=["year","quarter","month","week","day","hour","minute","second","millisecond"];function It(e){var t=W(e),i=t.year||0,n=t.quarter||0,r=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,i,n=!1;for(t in e)if(h(e,t)&&(-1===Ee.call(Ct,t)||null!=e[t]&&isNaN(e[t])))return!1;for(i=0;i<Ct.length;++i)if(e[Ct[i]]){if(n)return!1;parseFloat(e[Ct[i]])!==Q(e[Ct[i]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*l+1e3*o*60*60,this._days=+a+7*s,this._months=+r+3*n+12*i,this._data={},this._locale=ut(),this._bubble()}function xt(e){return e instanceof It}function Ut(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Pt(e,t){N(e,0,0,(function(){var e=this.utcOffset(),i="+";return e<0&&(e=-e,i="-"),i+I(~~(e/60),2)+t+I(~~e%60,2)}))}Pt("Z",":"),Pt("ZZ",""),pe("Z",_e),pe("ZZ",_e),Ae(["Z","ZZ"],(function(e,t,i){i._useUTC=!0,i._tzm=Nt(_e,e)}));var Bt=/([\+\-]|\d\d)/gi;function Nt(e,t){var i,n,r=(t||"").match(e);return null===r?null:0===(n=60*(i=((r[r.length-1]||[])+"").match(Bt)||["-",0,0])[1]+Q(i[2]))?0:"+"===i[0]?n:-n}function Ft(e,t){var i,n;return t._isUTC?(i=t.clone(),n=(w(e)||f(e)?e.valueOf():Tt(e).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),a.updateOffset(i,!1),i):Tt(e).local()}function Vt(e){return-Math.round(e._d.getTimezoneOffset())}function Yt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}a.updateOffset=function(){};var qt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wt(e,t){var i,n,r,a=e,o=null;return xt(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(o=qt.exec(e))?(i="-"===o[1]?-1:1,a={y:0,d:Q(o[2])*i,h:Q(o[3])*i,m:Q(o[4])*i,s:Q(o[5])*i,ms:Q(Ut(1e3*o[6]))*i}):(o=jt.exec(e))?(i="-"===o[1]?-1:1,a={y:Gt(o[2],i),M:Gt(o[3],i),w:Gt(o[4],i),d:Gt(o[5],i),h:Gt(o[6],i),m:Gt(o[7],i),s:Gt(o[8],i)}):null==a?a={}:"object"===s(a)&&("from"in a||"to"in a)&&(r=function(e,t){var i;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Ft(t,e),e.isBefore(t)?i=zt(e,t):((i=zt(t,e)).milliseconds=-i.milliseconds,i.months=-i.months);return i}(Tt(a.from),Tt(a.to)),(a={}).ms=r.milliseconds,a.M=r.months),n=new It(a),xt(e)&&h(e,"_locale")&&(n._locale=e._locale),xt(e)&&h(e,"_isValid")&&(n._isValid=e._isValid),n}function Gt(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function zt(e,t){var i={};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function Ht(e,t){return function(i,n){var r;return null===n||isNaN(+n)||(L(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=n,n=r),Kt(this,Wt(i,n),e),this}}function Kt(e,t,i,n){var r=t._milliseconds,s=Ut(t._days),o=Ut(t._months);e.isValid()&&(n=null==n||n,o&&Oe(e,Z(e,"Month")+o*i),s&&J(e,"Date",Z(e,"Date")+s*i),r&&e._d.setTime(e._d.valueOf()+r*i),n&&a.updateOffset(e,s||o))}Wt.fn=It.prototype,Wt.invalid=function(){return Wt(NaN)};var Qt=Ht(1,"add"),Xt=Ht(-1,"subtract");function Zt(e){return"string"==typeof e||e instanceof String}function Jt(e){return w(e)||f(e)||Zt(e)||c(e)||function(e){var t=o(e),i=!1;t&&(i=0===e.filter((function(t){return!c(t)&&Zt(e)})).length);return t&&i}(e)||function(e){var t,i,n=l(e)&&!u(e),r=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<s.length;t+=1)i=s[t],r=r||h(e,i);return n&&r}(e)||null==e}function $t(e){var t,i=l(e)&&!u(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)n=n||h(e,r[t]);return i&&n}function ei(e,t){if(e.date()<t.date())return-ei(t,e);var i=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(i,"months");return-(i+(t-n<0?(t-n)/(n-e.clone().add(i-1,"months")):(t-n)/(e.clone().add(i+1,"months")-n)))||0}function ti(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ut(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ii=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ni(){return this._locale}function ri(e,t){return(e%t+t)%t}function si(e,t,i){return e<100&&e>=0?new Date(e+400,t,i)-126227808e5:new Date(e,t,i).valueOf()}function ai(e,t,i){return e<100&&e>=0?Date.UTC(e+400,t,i)-126227808e5:Date.UTC(e,t,i)}function oi(e,t){return t.erasAbbrRegex(e)}function li(){var e,t,i=[],n=[],r=[],s=[],a=this.eras();for(e=0,t=a.length;e<t;++e)n.push(ye(a[e].name)),i.push(ye(a[e].abbr)),r.push(ye(a[e].narrow)),s.push(ye(a[e].name)),s.push(ye(a[e].abbr)),s.push(ye(a[e].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function hi(e,t){N(0,[e,e.length],0,t)}function ui(e,t,i,n,r){var s;return null==e?Ve(this,n,r).year:(t>(s=Ye(e,n,r))&&(t=s),di.call(this,e,t,i,n,r))}function di(e,t,i,n,r){var s=Fe(e,t,i,n,r),a=Be(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),pe("N",oi),pe("NN",oi),pe("NNN",oi),pe("NNNN",(function(e,t){return t.erasNameRegex(e)})),pe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),Ae(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,i,n){var r=i._locale.erasParse(e,n,i._strict);r?g(i).era=r:g(i).invalidEra=e})),pe("y",de),pe("yy",de),pe("yyy",de),pe("yyyy",de),pe("yo",(function(e,t){return t._eraYearOrdinalRegex||de})),Ae(["y","yy","yyy","yyyy"],0),Ae(["yo"],(function(e,t,i,n){var r;i._locale._eraYearOrdinalRegex&&(r=e.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?t[0]=i._locale.eraYearOrdinalParse(e,r):t[0]=parseInt(e,10)})),N(0,["gg",2],0,(function(){return this.weekYear()%100})),N(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),hi("gggg","weekYear"),hi("ggggg","weekYear"),hi("GGGG","isoWeekYear"),hi("GGGGG","isoWeekYear"),q("weekYear","gg"),q("isoWeekYear","GG"),z("weekYear",1),z("isoWeekYear",1),pe("G",ce),pe("g",ce),pe("GG",se,te),pe("gg",se,te),pe("GGGG",he,ne),pe("gggg",he,ne),pe("GGGGG",ue,re),pe("ggggg",ue,re),Se(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,i,n){t[n.substr(0,2)]=Q(e)})),Se(["gg","GG"],(function(e,t,i,n){t[n]=a.parseTwoDigitYear(e)})),N("Q",0,"Qo","quarter"),q("quarter","Q"),z("quarter",7),pe("Q",ee),Ae("Q",(function(e,t){t[1]=3*(Q(e)-1)})),N("D",["DD",2],"Do","date"),q("date","D"),z("date",9),pe("D",se),pe("DD",se,te),pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ae(["D","DD"],2),Ae("Do",(function(e,t){t[2]=Q(e.match(se)[0])}));var ci=X("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),q("dayOfYear","DDD"),z("dayOfYear",4),pe("DDD",le),pe("DDDD",ie),Ae(["DDD","DDDD"],(function(e,t,i){i._dayOfYear=Q(e)})),N("m",["mm",2],0,"minute"),q("minute","m"),z("minute",14),pe("m",se),pe("mm",se,te),Ae(["m","mm"],4);var fi=X("Minutes",!1);N("s",["ss",2],0,"second"),q("second","s"),z("second",15),pe("s",se),pe("ss",se,te),Ae(["s","ss"],5);var _i,mi,pi=X("Seconds",!1);for(N("S",0,0,(function(){return~~(this.millisecond()/100)})),N(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),N(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),N(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),N(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),N(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),N(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),q("millisecond","ms"),z("millisecond",16),pe("S",le,ee),pe("SS",le,te),pe("SSS",le,ie),_i="SSSS";_i.length<=9;_i+="S")pe(_i,de);function gi(e,t){t[6]=Q(1e3*("0."+e))}for(_i="S";_i.length<=9;_i+="S")Ae(_i,gi);mi=X("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var yi=E.prototype;function vi(e){return e}yi.add=Qt,yi.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):$t(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var i=e||Tt(),n=Ft(i,this).startOf("day"),r=a.calendarFormat(this,n)||"sameElse",s=t&&(M(t[r])?t[r].call(this,i):t[r]);return this.format(s||this.localeData().calendar(r,this,Tt(i)))},yi.clone=function(){return new E(this)},yi.diff=function(e,t,i){var n,r,s;if(!this.isValid())return NaN;if(!(n=Ft(e,this)).isValid())return NaN;switch(r=6e4*(n.utcOffset()-this.utcOffset()),t=j(t)){case"year":s=ei(this,n)/12;break;case"month":s=ei(this,n);break;case"quarter":s=ei(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-r)/864e5;break;case"week":s=(this-n-r)/6048e5;break;default:s=this-n}return i?s:K(s)},yi.endOf=function(e){var t,i;if(void 0===(e=j(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?ai:si,e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-ri(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-ri(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-ri(t,1e3)-1}return this._d.setTime(t),a.updateOffset(this,!0),this},yi.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)},yi.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Tt(e).isValid())?Wt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},yi.fromNow=function(e){return this.from(Tt(),e)},yi.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Tt(e).isValid())?Wt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},yi.toNow=function(e){return this.to(Tt(),e)},yi.get=function(e){return M(this[e=j(e)])?this[e]():this},yi.invalidAt=function(){return g(this).overflow},yi.isAfter=function(e,t){var i=w(e)?e:Tt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=j(t)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf())},yi.isBefore=function(e,t){var i=w(e)?e:Tt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=j(t)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf())},yi.isBetween=function(e,t,i,n){var r=w(e)?e:Tt(e),s=w(t)?t:Tt(t);return!!(this.isValid()&&r.isValid()&&s.isValid())&&(("("===(n=n||"()")[0]?this.isAfter(r,i):!this.isBefore(r,i))&&(")"===n[1]?this.isBefore(s,i):!this.isAfter(s,i)))},yi.isSame=function(e,t){var i,n=w(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=j(t)||"millisecond")?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()))},yi.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},yi.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},yi.isValid=function(){return y(this)},yi.lang=ii,yi.locale=ti,yi.localeData=ni,yi.max=Mt,yi.min=Lt,yi.parsingFlags=function(){return m({},g(this))},yi.set=function(e,t){if("object"===s(e)){var i,n=function(e){var t,i=[];for(t in e)h(e,t)&&i.push({unit:t,priority:G[t]});return i.sort((function(e,t){return e.priority-t.priority})),i}(e=W(e));for(i=0;i<n.length;i++)this[n[i].unit](e[n[i].unit])}else if(M(this[e=j(e)]))return this[e](t);return this},yi.startOf=function(e){var t,i;if(void 0===(e=j(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?ai:si,e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ri(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=ri(t,6e4);break;case"second":t=this._d.valueOf(),t-=ri(t,1e3)}return this._d.setTime(t),a.updateOffset(this,!0),this},yi.subtract=Xt,yi.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},yi.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},yi.toDate=function(){return new Date(this.valueOf())},yi.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,i=t?this.clone().utc():this;return i.year()<0||i.year()>9999?F(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):M(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(i,"Z")):F(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},yi.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,i,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",i=r+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+i)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(yi[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),yi.toJSON=function(){return this.isValid()?this.toISOString():null},yi.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},yi.unix=function(){return Math.floor(this.valueOf()/1e3)},yi.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},yi.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},yi.eraName=function(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until)return n[e].name;if(n[e].until<=i&&i<=n[e].since)return n[e].name}return""},yi.eraNarrow=function(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until)return n[e].narrow;if(n[e].until<=i&&i<=n[e].since)return n[e].narrow}return""},yi.eraAbbr=function(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until)return n[e].abbr;if(n[e].until<=i&&i<=n[e].since)return n[e].abbr}return""},yi.eraYear=function(){var e,t,i,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(i=r[e].since<=r[e].until?1:-1,n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return(this.year()-a(r[e].since).year())*i+r[e].offset;return this.year()},yi.year=Ue,yi.isLeapYear=function(){return H(this.year())},yi.weekYear=function(e){return ui.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},yi.isoWeekYear=function(e){return ui.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},yi.quarter=yi.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},yi.month=Ce,yi.daysInMonth=function(){return we(this.year(),this.month())},yi.week=yi.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},yi.isoWeek=yi.isoWeeks=function(e){var t=Ve(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},yi.weeksInYear=function(){var e=this.localeData()._week;return Ye(this.year(),e.dow,e.doy)},yi.weeksInWeekYear=function(){var e=this.localeData()._week;return Ye(this.weekYear(),e.dow,e.doy)},yi.isoWeeksInYear=function(){return Ye(this.year(),1,4)},yi.isoWeeksInISOWeekYear=function(){return Ye(this.isoWeekYear(),1,4)},yi.date=ci,yi.day=yi.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},yi.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},yi.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},yi.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},yi.hour=yi.hours=et,yi.minute=yi.minutes=fi,yi.second=yi.seconds=pi,yi.millisecond=yi.milliseconds=mi,yi.utcOffset=function(e,t,i){var n,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Nt(_e,e)))return this}else Math.abs(e)<16&&!i&&(e*=60);return!this._isUTC&&t&&(n=Vt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==e&&(!t||this._changeInProgress?Kt(this,Wt(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Vt(this)},yi.utc=function(e){return this.utcOffset(0,e)},yi.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Vt(this),"m")),this},yi.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Nt(fe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},yi.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},yi.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yi.isLocal=function(){return!!this.isValid()&&!this._isUTC},yi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yi.isUtc=Yt,yi.isUTC=Yt,yi.zoneAbbr=function(){return this._isUTC?"UTC":""},yi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yi.dates=k("dates accessor is deprecated. Use date instead.",ci),yi.months=k("months accessor is deprecated. Use month instead",Ce),yi.years=k("years accessor is deprecated. Use year instead",Ue),yi.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),yi.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!d(this._isDSTShifted))return this._isDSTShifted;var e,t={};return b(t,this),(t=kt(t))._a?(e=t._isUTC?p(t._a):Tt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,i){var n,r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0;for(n=0;n<r;n++)(i&&e[n]!==t[n]||!i&&Q(e[n])!==Q(t[n]))&&a++;return a+s}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Ai=C.prototype;function Si(e,t,i,n){var r=ut(),s=p().set(n,t);return r[i](s,e)}function bi(e,t,i){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return Si(e,t,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=Si(e,n,i,"month");return r}function Ei(e,t,i,n){"boolean"==typeof e?(c(t)&&(i=t,t=void 0),t=t||""):(i=t=e,e=!1,c(t)&&(i=t,t=void 0),t=t||"");var r,s=ut(),a=e?s._week.dow:0,o=[];if(null!=i)return Si(t,(i+a)%7,n,"day");for(r=0;r<7;r++)o[r]=Si(t,(r+a)%7,n,"day");return o}Ai.calendar=function(e,t,i){var n=this._calendar[e]||this._calendar.sameElse;return M(n)?n.call(t,i):n},Ai.longDateFormat=function(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.match(x).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Ai.invalidDate=function(){return this._invalidDate},Ai.ordinal=function(e){return this._ordinal.replace("%d",e)},Ai.preparse=vi,Ai.postformat=vi,Ai.relativeTime=function(e,t,i,n){var r=this._relativeTime[i];return M(r)?r(e,t,i,n):r.replace(/%d/i,e)},Ai.pastFuture=function(e,t){var i=this._relativeTime[e>0?"future":"past"];return M(i)?i(t):i.replace(/%s/i,t)},Ai.set=function(e){var t,i;for(i in e)h(e,i)&&(M(t=e[i])?this[i]=t:this["_"+i]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Ai.eras=function(e,t){var i,n,r,o=this._eras||ut("en")._eras;for(i=0,n=o.length;i<n;++i){switch(s(o[i].since)){case"string":r=a(o[i].since).startOf("day"),o[i].since=r.valueOf()}switch(s(o[i].until)){case"undefined":o[i].until=1/0;break;case"string":r=a(o[i].until).startOf("day").valueOf(),o[i].until=r.valueOf()}}return o},Ai.erasParse=function(e,t,i){var n,r,s,a,o,l=this.eras();for(e=e.toUpperCase(),n=0,r=l.length;n<r;++n)if(s=l[n].name.toUpperCase(),a=l[n].abbr.toUpperCase(),o=l[n].narrow.toUpperCase(),i)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[n];break;case"NNNN":if(s===e)return l[n];break;case"NNNNN":if(o===e)return l[n]}else if([s,a,o].indexOf(e)>=0)return l[n]},Ai.erasConvertYear=function(e,t){var i=e.since<=e.until?1:-1;return void 0===t?a(e.since).year():a(e.since).year()+(t-e.offset)*i},Ai.erasAbbrRegex=function(e){return h(this,"_erasAbbrRegex")||li.call(this),e?this._erasAbbrRegex:this._erasRegex},Ai.erasNameRegex=function(e){return h(this,"_erasNameRegex")||li.call(this),e?this._erasNameRegex:this._erasRegex},Ai.erasNarrowRegex=function(e){return h(this,"_erasNarrowRegex")||li.call(this),e?this._erasNarrowRegex:this._erasRegex},Ai.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||De).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},Ai.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[De.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Ai.monthsParse=function(e,t,i){var n,r,s;if(this._monthsParseExact)return Me.call(this,e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(r=p([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(i&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!i&&this._monthsParse[n].test(e))return n}},Ai.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Ai.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Te),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Ai.week=function(e){return Ve(e,this._week.dow,this._week.doy).week},Ai.firstDayOfYear=function(){return this._week.doy},Ai.firstDayOfWeek=function(){return this._week.dow},Ai.weekdays=function(e,t){var i=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?qe(i,this._week.dow):e?i[e.day()]:i},Ai.weekdaysMin=function(e){return!0===e?qe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Ai.weekdaysShort=function(e){return!0===e?qe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Ai.weekdaysParse=function(e,t,i){var n,r,s;if(this._weekdaysParseExact)return Qe.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=p([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(i&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(i&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!i&&this._weekdaysParse[n].test(e))return n}},Ai.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Ai.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=He),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Ai.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ke),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Ai.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Ai.meridiem=function(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"},lt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=k("moment.lang is deprecated. Use moment.locale instead.",lt),a.langData=k("moment.langData is deprecated. Use moment.localeData instead.",ut);var wi=Math.abs;function Ri(e,t,i,n){var r=Wt(t,i);return e._milliseconds+=n*r._milliseconds,e._days+=n*r._days,e._months+=n*r._months,e._bubble()}function ki(e){return e<0?Math.floor(e):Math.ceil(e)}function Di(e){return 4800*e/146097}function Ti(e){return 146097*e/4800}function Li(e){return function(){return this.as(e)}}var Mi=Li("ms"),Oi=Li("s"),Ci=Li("m"),Ii=Li("h"),xi=Li("d"),Ui=Li("w"),Pi=Li("M"),Bi=Li("Q"),Ni=Li("y");function Fi(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vi=Fi("milliseconds"),Yi=Fi("seconds"),qi=Fi("minutes"),ji=Fi("hours"),Wi=Fi("days"),Gi=Fi("months"),zi=Fi("years");var Hi=Math.round,Ki={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Qi(e,t,i,n,r){return r.relativeTime(t||1,!!i,e,n)}var Xi=Math.abs;function Zi(e){return(e>0)-(e<0)||+e}function Ji(){if(!this.isValid())return this.localeData().invalidDate();var e,t,i,n,r,s,a,o,l=Xi(this._milliseconds)/1e3,h=Xi(this._days),u=Xi(this._months),d=this.asSeconds();return d?(e=K(l/60),t=K(e/60),l%=60,e%=60,i=K(u/12),u%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=d<0?"-":"",s=Zi(this._months)!==Zi(d)?"-":"",a=Zi(this._days)!==Zi(d)?"-":"",o=Zi(this._milliseconds)!==Zi(d)?"-":"",r+"P"+(i?s+i+"Y":"")+(u?s+u+"M":"")+(h?a+h+"D":"")+(t||e||l?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(l?o+n+"S":"")):"P0D"}var $i=It.prototype;$i.isValid=function(){return this._isValid},$i.abs=function(){var e=this._data;return this._milliseconds=wi(this._milliseconds),this._days=wi(this._days),this._months=wi(this._months),e.milliseconds=wi(e.milliseconds),e.seconds=wi(e.seconds),e.minutes=wi(e.minutes),e.hours=wi(e.hours),e.months=wi(e.months),e.years=wi(e.years),this},$i.add=function(e,t){return Ri(this,e,t,1)},$i.subtract=function(e,t){return Ri(this,e,t,-1)},$i.as=function(e){if(!this.isValid())return NaN;var t,i,n=this._milliseconds;if("month"===(e=j(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,i=this._months+Di(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(t=this._days+Math.round(Ti(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},$i.asMilliseconds=Mi,$i.asSeconds=Oi,$i.asMinutes=Ci,$i.asHours=Ii,$i.asDays=xi,$i.asWeeks=Ui,$i.asMonths=Pi,$i.asQuarters=Bi,$i.asYears=Ni,$i.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Q(this._months/12):NaN},$i._bubble=function(){var e,t,i,n,r,s=this._milliseconds,a=this._days,o=this._months,l=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*ki(Ti(o)+a),a=0,o=0),l.milliseconds=s%1e3,e=K(s/1e3),l.seconds=e%60,t=K(e/60),l.minutes=t%60,i=K(t/60),l.hours=i%24,a+=K(i/24),o+=r=K(Di(a)),a-=ki(Ti(r)),n=K(o/12),o%=12,l.days=a,l.months=o,l.years=n,this},$i.clone=function(){return Wt(this)},$i.get=function(e){return e=j(e),this.isValid()?this[e+"s"]():NaN},$i.milliseconds=Vi,$i.seconds=Yi,$i.minutes=qi,$i.hours=ji,$i.days=Wi,$i.weeks=function(){return K(this.days()/7)},$i.months=Gi,$i.years=zi,$i.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var i,n,r=!1,a=Ki;return"object"===s(e)&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"===s(t)&&(a=Object.assign({},Ki,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),n=function(e,t,i,n){var r=Wt(e).abs(),s=Hi(r.as("s")),a=Hi(r.as("m")),o=Hi(r.as("h")),l=Hi(r.as("d")),h=Hi(r.as("M")),u=Hi(r.as("w")),d=Hi(r.as("y")),c=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||a<=1&&["m"]||a<i.m&&["mm",a]||o<=1&&["h"]||o<i.h&&["hh",o]||l<=1&&["d"]||l<i.d&&["dd",l];return null!=i.w&&(c=c||u<=1&&["w"]||u<i.w&&["ww",u]),(c=c||h<=1&&["M"]||h<i.M&&["MM",h]||d<=1&&["y"]||["yy",d])[2]=t,c[3]=+e>0,c[4]=n,Qi.apply(null,c)}(this,!r,a,i=this.localeData()),r&&(n=i.pastFuture(+this,n)),i.postformat(n)},$i.toISOString=Ji,$i.toString=Ji,$i.toJSON=Ji,$i.locale=ti,$i.localeData=ni,$i.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ji),$i.lang=ii,N("X",0,0,"unix"),N("x",0,0,"valueOf"),pe("x",ce),pe("X",/[+-]?\d+(\.\d{1,3})?/),Ae("X",(function(e,t,i){i._d=new Date(1e3*parseFloat(e))})),Ae("x",(function(e,t,i){i._d=new Date(Q(e))})),//! moment.js
  8 +a.version="2.29.1",n=Tt,a.fn=yi,a.min=function(){var e=[].slice.call(arguments,0);return Ot("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return Ot("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=p,a.unix=function(e){return Tt(1e3*e)},a.months=function(e,t){return bi(e,t,"months")},a.isDate=f,a.locale=lt,a.invalid=v,a.duration=Wt,a.isMoment=w,a.weekdays=function(e,t,i){return Ei(e,t,i,"weekdays")},a.parseZone=function(){return Tt.apply(null,arguments).parseZone()},a.localeData=ut,a.isDuration=xt,a.monthsShort=function(e,t){return bi(e,t,"monthsShort")},a.weekdaysMin=function(e,t,i){return Ei(e,t,i,"weekdaysMin")},a.defineLocale=ht,a.updateLocale=function(e,t){if(null!=t){var i,n,r=it;null!=nt[e]&&null!=nt[e].parentLocale?nt[e].set(O(nt[e]._config,t)):(null!=(n=ot(e))&&(r=n._config),t=O(r,t),null==n&&(t.abbr=e),(i=new C(t)).parentLocale=nt[e],nt[e]=i),lt(e)}else null!=nt[e]&&(null!=nt[e].parentLocale?(nt[e]=nt[e].parentLocale,e===lt()&&lt(e)):null!=nt[e]&&delete nt[e]);return nt[e]},a.locales=function(){return D(nt)},a.weekdaysShort=function(e,t,i){return Ei(e,t,i,"weekdaysShort")},a.normalizeUnits=j,a.relativeTimeRounding=function(e){return void 0===e?Hi:"function"==typeof e&&(Hi=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Ki[e]&&(void 0===t?Ki[e]:(Ki[e]=t,"s"===e&&(Ki.ss=t-1),!0))},a.calendarFormat=function(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},a.prototype=yi,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t.a=a}).call(this,i(15)(e))},function(e,t,i){"use strict";var n=i(3),r=i.n(n)()((function(e){return e[1]}));r.push([e.i,".flvWai,.flvWai>.videoFlv{\r\n width: 100%; \r\n height: 100%; \r\n}\r\n.flvWai>.videoFlv:hover{\r\n outline: none;\r\n}",""]),t.a=r},function(e,t,i){"use strict";var n=i(3),r=i.n(n)()((function(e){return e[1]}));r.push([e.i,'.timerComCss{\r\n font-family: "fontInit";\r\n color: rgb(47, 233, 242);\r\n font-size: 20px;\r\n letter-spacing: 2px;\r\n}\r\np{\r\n margin: 0;\r\n padding: 0;\r\n}',""]),t.a=r},function(e,t,i){"use strict";var n=i(3),r=i.n(n)()((function(e){return e[1]}));r.push([e.i,"img{\r\n width: 100%;\r\n}",""]),t.a=r},function(e,t,i){"use strict";i.r(t);var n=i(4);
9 9 //! moment.js locale configuration
10 10 //! locale : Chinese (China) [zh-cn]
11 11 //! author : suupic : https://github.com/suupic
... ... @@ -19,7 +19,7 @@ t.default=n.a.defineLocale(&quot;zh-cn&quot;,{months:&quot;一月_二月_三月_四月_五月_å
19 19 *
20 20 * This source code is licensed under the MIT license found in the
21 21 * LICENSE file in the root directory of this source tree.
22   - */var n=i(11),r=60103,s=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,o=60110,l=60112;t.Suspense=60113;var h=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;r=d("react.element"),s=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),o=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),h=d("react.memo"),u=d("react.lazy")}var c="function"==typeof Symbol&&Symbol.iterator;function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function p(e,t,i){this.props=e,this.context=t,this.refs=m,this.updater=i||_}function g(){}function y(e,t,i){this.props=e,this.context=t,this.refs=m,this.updater=i||_}p.prototype.isReactComponent={},p.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(f(85));this.updater.enqueueSetState(this,e,t,"setState")},p.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=p.prototype;var v=y.prototype=new g;v.constructor=y,n(v,p.prototype),v.isPureReactComponent=!0;var A={current:null},S=Object.prototype.hasOwnProperty,b={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,i){var n,s={},a=null,o=null;if(null!=t)for(n in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,n)&&!b.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(1===l)s.children=i;else if(1<l){for(var h=Array(l),u=0;u<l;u++)h[u]=arguments[u+2];s.children=h}if(e&&e.defaultProps)for(n in l=e.defaultProps)void 0===s[n]&&(s[n]=l[n]);return{$$typeof:r,type:e,key:a,ref:o,props:s,_owner:A.current}}function w(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var R=/\/+/g;function k(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function D(e,t,i,n,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case r:case s:l=!0}}if(l)return a=a(l=e),e=""===n?"."+k(l,0):n,Array.isArray(a)?(i="",null!=e&&(i=e.replace(R,"$&/")+"/"),D(a,t,i,"",(function(e){return e}))):null!=a&&(w(a)&&(a=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(R,"$&/")+"/")+e)),t.push(a)),1;if(l=0,n=""===n?".":n+":",Array.isArray(e))for(var h=0;h<e.length;h++){var u=n+k(o=e[h],h);l+=D(o,t,i,u,a)}else if("function"==typeof(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=c&&e[c]||e["@@iterator"])?e:null}(e)))for(e=u.call(e),h=0;!(o=e.next()).done;)l+=D(o=o.value,t,i,u=n+k(o,h++),a);else if("object"===o)throw t=""+e,Error(f(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function T(e,t,i){if(null==e)return e;var n=[],r=0;return D(e,n,"","",(function(e){return t.call(i,e,r++)})),n}function L(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var M={current:null};function O(){var e=M.current;if(null===e)throw Error(f(321));return e}var C={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:A,IsSomeRendererActing:{current:!1},assign:n};t.Children={map:T,forEach:function(e,t,i){T(e,(function(){t.apply(this,arguments)}),i)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!w(e))throw Error(f(143));return e}},t.Component=p,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C,t.cloneElement=function(e,t,i){if(null==e)throw Error(f(267,e));var s=n({},e.props),a=e.key,o=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,l=A.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var h=e.type.defaultProps;for(u in t)S.call(t,u)&&!b.hasOwnProperty(u)&&(s[u]=void 0===t[u]&&void 0!==h?h[u]:t[u])}var u=arguments.length-2;if(1===u)s.children=i;else if(1<u){h=Array(u);for(var d=0;d<u;d++)h[d]=arguments[d+2];s.children=h}return{$$typeof:r,type:e.type,key:a,ref:o,props:s,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:o,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=w,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return O().useCallback(e,t)},t.useContext=function(e,t){return O().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return O().useEffect(e,t)},t.useImperativeHandle=function(e,t,i){return O().useImperativeHandle(e,t,i)},t.useLayoutEffect=function(e,t){return O().useLayoutEffect(e,t)},t.useMemo=function(e,t){return O().useMemo(e,t)},t.useReducer=function(e,t,i){return O().useReducer(e,t,i)},t.useRef=function(e){return O().useRef(e)},t.useState=function(e){return O().useState(e)},t.version="17.0.1"},function(e,t,i){"use strict";
  22 + */var n=i(10),r=60103,s=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,o=60110,l=60112;t.Suspense=60113;var h=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;r=d("react.element"),s=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),o=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),h=d("react.memo"),u=d("react.lazy")}var c="function"==typeof Symbol&&Symbol.iterator;function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function p(e,t,i){this.props=e,this.context=t,this.refs=m,this.updater=i||_}function g(){}function y(e,t,i){this.props=e,this.context=t,this.refs=m,this.updater=i||_}p.prototype.isReactComponent={},p.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(f(85));this.updater.enqueueSetState(this,e,t,"setState")},p.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=p.prototype;var v=y.prototype=new g;v.constructor=y,n(v,p.prototype),v.isPureReactComponent=!0;var A={current:null},S=Object.prototype.hasOwnProperty,b={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,i){var n,s={},a=null,o=null;if(null!=t)for(n in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,n)&&!b.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(1===l)s.children=i;else if(1<l){for(var h=Array(l),u=0;u<l;u++)h[u]=arguments[u+2];s.children=h}if(e&&e.defaultProps)for(n in l=e.defaultProps)void 0===s[n]&&(s[n]=l[n]);return{$$typeof:r,type:e,key:a,ref:o,props:s,_owner:A.current}}function w(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var R=/\/+/g;function k(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function D(e,t,i,n,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case r:case s:l=!0}}if(l)return a=a(l=e),e=""===n?"."+k(l,0):n,Array.isArray(a)?(i="",null!=e&&(i=e.replace(R,"$&/")+"/"),D(a,t,i,"",(function(e){return e}))):null!=a&&(w(a)&&(a=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(R,"$&/")+"/")+e)),t.push(a)),1;if(l=0,n=""===n?".":n+":",Array.isArray(e))for(var h=0;h<e.length;h++){var u=n+k(o=e[h],h);l+=D(o,t,i,u,a)}else if("function"==typeof(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=c&&e[c]||e["@@iterator"])?e:null}(e)))for(e=u.call(e),h=0;!(o=e.next()).done;)l+=D(o=o.value,t,i,u=n+k(o,h++),a);else if("object"===o)throw t=""+e,Error(f(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function T(e,t,i){if(null==e)return e;var n=[],r=0;return D(e,n,"","",(function(e){return t.call(i,e,r++)})),n}function L(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var M={current:null};function O(){var e=M.current;if(null===e)throw Error(f(321));return e}var C={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:A,IsSomeRendererActing:{current:!1},assign:n};t.Children={map:T,forEach:function(e,t,i){T(e,(function(){t.apply(this,arguments)}),i)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!w(e))throw Error(f(143));return e}},t.Component=p,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C,t.cloneElement=function(e,t,i){if(null==e)throw Error(f(267,e));var s=n({},e.props),a=e.key,o=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,l=A.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var h=e.type.defaultProps;for(u in t)S.call(t,u)&&!b.hasOwnProperty(u)&&(s[u]=void 0===t[u]&&void 0!==h?h[u]:t[u])}var u=arguments.length-2;if(1===u)s.children=i;else if(1<u){h=Array(u);for(var d=0;d<u;d++)h[d]=arguments[d+2];s.children=h}return{$$typeof:r,type:e.type,key:a,ref:o,props:s,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:o,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=w,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return O().useCallback(e,t)},t.useContext=function(e,t){return O().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return O().useEffect(e,t)},t.useImperativeHandle=function(e,t,i){return O().useImperativeHandle(e,t,i)},t.useLayoutEffect=function(e,t){return O().useLayoutEffect(e,t)},t.useMemo=function(e,t){return O().useMemo(e,t)},t.useReducer=function(e,t,i){return O().useReducer(e,t,i)},t.useRef=function(e){return O().useRef(e)},t.useState=function(e){return O().useState(e)},t.version="17.0.1"},function(e,t,i){"use strict";
23 23 /*
24 24 object-assign
25 25 (c) Sindre Sorhus
... ... @@ -31,4 +31,4 @@ object-assign
31 31 * @license Licensed under MIT license
32 32 * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
33 33 * @version v4.2.8+1e68dce6
34   - */var n;n=function(){"use strict";function e(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,s=void 0,a=void 0,o=function(e,t){_[r]=e,_[r+1]=t,2===(r+=2)&&(a?a(m):A())},l="undefined"!=typeof window?window:void 0,h=l||{},u=h.MutationObserver||h.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),c="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(m,1)}}var _=new Array(1e3);function m(){for(var e=0;e<r;e+=2)(0,_[e])(_[e+1]),_[e]=void 0,_[e+1]=void 0;r=0}var p,g,y,v,A=void 0;function S(e,t){var i=this,n=new this.constructor(w);void 0===n[E]&&x(n);var r=i._state;if(r){var s=arguments[r-1];o((function(){return C(r,n,s,i._result)}))}else M(i,n,e,t);return n}function b(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(w);return k(t,e),t}d?A=function(){return t.nextTick(m)}:u?(g=0,y=new u(m),v=document.createTextNode(""),y.observe(v,{characterData:!0}),A=function(){v.data=g=++g%2}):c?((p=new MessageChannel).port1.onmessage=m,A=function(){return p.port2.postMessage(0)}):A=void 0===l?function(){try{var e=Function("return this")().require("vertx");return void 0!==(s=e.runOnLoop||e.runOnContext)?function(){s(m)}:f()}catch(e){return f()}}():f();var E=Math.random().toString(36).substring(2);function w(){}function R(t,i,n){i.constructor===t.constructor&&n===S&&i.constructor.resolve===b?function(e,t){1===t._state?T(e,t._result):2===t._state?L(e,t._result):M(t,void 0,(function(t){return k(e,t)}),(function(t){return L(e,t)}))}(t,i):void 0===n?T(t,i):e(n)?function(e,t,i){o((function(e){var n=!1,r=function(e,t,i,n){try{e.call(t,i,n)}catch(e){return e}}(i,t,(function(i){n||(n=!0,t!==i?k(e,i):T(e,i))}),(function(t){n||(n=!0,L(e,t))}),e._label);!n&&r&&(n=!0,L(e,r))}),e)}(t,i,n):T(t,i)}function k(e,t){if(e===t)L(e,new TypeError("You cannot resolve a promise with itself"));else if(r=typeof(n=t),null===n||"object"!==r&&"function"!==r)T(e,t);else{var i=void 0;try{i=t.then}catch(t){return void L(e,t)}R(e,t,i)}var n,r}function D(e){e._onerror&&e._onerror(e._result),O(e)}function T(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&o(O,e))}function L(e,t){void 0===e._state&&(e._state=2,e._result=t,o(D,e))}function M(e,t,i,n){var r=e._subscribers,s=r.length;e._onerror=null,r[s]=t,r[s+1]=i,r[s+2]=n,0===s&&e._state&&o(O,e)}function O(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n=void 0,r=void 0,s=e._result,a=0;a<t.length;a+=3)n=t[a],r=t[a+i],n?C(i,n,r,s):r(s);e._subscribers.length=0}}function C(t,i,n,r){var s=e(n),a=void 0,o=void 0,l=!0;if(s){try{a=n(r)}catch(e){l=!1,o=e}if(i===a)return void L(i,new TypeError("A promises callback cannot return that same promise."))}else a=r;void 0!==i._state||(s&&l?k(i,a):!1===l?L(i,o):1===t?T(i,a):2===t&&L(i,a))}var I=0;function x(e){e[E]=I++,e._state=void 0,e._result=void 0,e._subscribers=[]}var U=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(w),this.promise[E]||x(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?T(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&T(this.promise,this._result))):L(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,n=i.resolve;if(n===b){var r=void 0,s=void 0,a=!1;try{r=e.then}catch(e){a=!0,s=e}if(r===S&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(i===P){var o=new i(w);a?L(o,s):R(o,e,r),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;void 0===n._state&&(this._remaining--,2===e?L(n,i):this._result[t]=i),0===this._remaining&&T(n,this._result)},e.prototype._willSettleAt=function(e,t){var i=this;M(e,void 0,(function(e){return i._settledAt(1,t,e)}),(function(e){return i._settledAt(2,t,e)}))},e}(),P=function(){function t(e){this[E]=I++,this._result=this._state=void 0,this._subscribers=[],w!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){k(e,t)}),(function(t){L(e,t)}))}catch(t){L(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var i=this.constructor;return e(t)?this.then((function(e){return i.resolve(t()).then((function(){return e}))}),(function(e){return i.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return P.prototype.then=S,P.all=function(e){return new U(this,e).promise},P.race=function(e){var t=this;return n(e)?new t((function(i,n){for(var r=e.length,s=0;s<r;s++)t.resolve(e[s]).then(i,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},P.resolve=b,P.reject=function(e){var t=new this(w);return L(t,e),t},P._setScheduler=function(e){a=e},P._setAsap=function(e){o=e},P._asap=o,P.polyfill=function(){var e=void 0;if(void 0!==i)e=i;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){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(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=P},P.Promise=P,P},e.exports=n()}).call(this,i(13),i(14))},function(e,t){var i,n,r=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(i===setTimeout)return setTimeout(e,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(e){i=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,h=[],u=!1,d=-1;function c(){u&&l&&(u=!1,l.length?h=l.concat(h):d=-1,h.length&&f())}function f(){if(!u){var e=o(c);u=!0;for(var t=h.length;t;){for(l=h,h=[];++d<t;)l&&l[d].run();d=-1,t=h.length}l=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function _(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];h.push(new _(e,t)),1!==h.length||u||o(f)},_.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t){var i=arguments[3],n=arguments[4],r=arguments[5],s=JSON.stringify;e.exports=function(e,t){for(var a,o=Object.keys(r),l=0,h=o.length;l<h;l++){var u=o[l],d=r[u].exports;if(d===e||d&&d.default===e){a=u;break}}if(!a){a=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var c={};for(l=0,h=o.length;l<h;l++){c[u=o[l]]=u}n[a]=["function(require,module,exports){"+e+"(self); }",c]}var f=Math.floor(Math.pow(16,8)*Math.random()).toString(16),_={};_[a]=a,n[f]=["function(require,module,exports){var f = require("+s(a)+");(f.default ? f.default : f)(self);}",_];var m={};!function e(t){for(var i in m[t]=!0,n[t][1]){var r=n[t][1][i];m[r]||e(r)}}(f);var p="("+i+")({"+Object.keys(m).map((function(e){return s(e)+":["+n[e][0]+","+s(n[e][1])+"]"})).join(",")+"},{},["+s(f)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([p],{type:"text/javascript"});if(t&&t.bare)return y;var v=g.createObjectURL(y),A=new Worker(v);return A.objectURL=v,A}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,i){var n={"./zh-cn":9,"./zh-cn.js":9};function r(e){var t=s(e);return i(t)}function s(e){if(!i.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}r.keys=function(){return Object.keys(n)},r.resolve=s,e.exports=r,r.id=17},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVQAAAFUCAYAAAB7ksS1AAAgAElEQVR4Xu2debgcVZn/37e6yU3EAQeNC2JQEDdUFFEgkO461fcSjOJucFBn3J0R/TmgjqOjP+PoqM+oMD8VZ9TBbcQliI6gmYTcrlP3goCKOi4gyCYIk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UTcZizuv7ryuNwgIlcz84/r9fqPli1b9mvleIK5dy8W77zzzkNFxJ3asDcRPTqYMxjWUsCdbHsLM9/i/u12u7fWarUroyjacjjmnnvuedV+++1XysGYGgKMNVA1BIVPKAAFJlcBAHVyxx6ZQwEo4FkBANWzoDAHBaDA5CoAoE7u2CNzKAAFPCsAoHoWFOagABSYXAUA1Mkde2QOBaCAZwUAVM+CwhwUgAKTqwCAOrljj8yhABTwrACA6llQmIMCUGByFQBQJ3fskTkUgAKeFQBQPQsKc1AACkyuAgDq5I49MocCUMCzAgCqZ0FhDgpAgclVAECd3LFH5lAACnhWAED1LCjMQQEoMLkKAKiTO/bIHApAAc8KAKieBYU5KAAFJlcBAHVyxx6ZQwEo4FkBANWzoDAHBaDA5CoAoE7u2CNzKAAFPCsAoHoWFOagABSYXAX+Pwt9MBd//fZfAAAAAElFTkSuQmCC"},function(e,t,i){"use strict";i.r(t),i.d(t,"FlvCom",(function(){return Ee})),i.d(t,"Timer",(function(){return Ie})),i.d(t,"ImgCom",(function(){return qe})),i.d(t,"AreaSelete",(function(){return Qe})),i.d(t,"FunAreaSelect",(function(){return rt}));var n=i(0),r=i.n(n);class s{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");let t=Object(e);for(let e=1;e<arguments.length;e++){let i=arguments[e];if(null!=i)for(let e in i)i.hasOwnProperty(e)&&(t[e]=i[e])}return t},"function"!=typeof self.Promise&&i(12).polyfill()}}s.install();var a=s,o=i(1),l=i.n(o);class h{static e(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","error",i),h.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}static i(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","info",i),h.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}static w(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","warn",i),h.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}static d(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","debug",i),h.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}static v(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","verbose",i),h.ENABLE_VERBOSE&&console.log(i)}}h.GLOBAL_TAG="flv.js",h.FORCE_GLOBAL_TAG=!1,h.ENABLE_ERROR=!0,h.ENABLE_INFO=!0,h.ENABLE_WARN=!0,h.ENABLE_DEBUG=!0,h.ENABLE_VERBOSE=!0,h.ENABLE_CALLBACK=!1,h.emitter=new l.a;var u=h;var d=class{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}};class c{constructor(e){this._message=e}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class f extends c{constructor(e){super(e)}get name(){return"IllegalStateException"}}class _ extends c{constructor(e){super(e)}get name(){return"InvalidArgumentException"}}class m extends c{constructor(e){super(e)}get name(){return"NotImplementedException"}}const p={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},g={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class y{constructor(e){this._type=e||"undefined",this._status=p.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=p.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===p.kConnecting||this._status===p.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 m("Unimplemented abstract function!")}abort(){throw new m("Unimplemented abstract function!")}}let v={};!function(){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]||""},r={};if(n.browser){r[n.browser]=!0;let e=n.majorVersion.split(".");r.version={major:parseInt(n.majorVersion,10),string:n.version},e.length>1&&(r.version.minor=parseInt(e[1],10)),e.length>2&&(r.version.build=parseInt(e[2],10))}if(n.platform&&(r[n.platform]=!0),(r.chrome||r.opr||r.safari)&&(r.webkit=!0),r.rv||r.iemobile){r.rv&&delete r.rv;let e="msie";n.browser=e,r[e]=!0}if(r.edge){delete r.edge;let e="msedge";n.browser=e,r[e]=!0}if(r.opr){let e="opera";n.browser=e,r[e]=!0}if(r.safari&&r.android){let e="android";n.browser=e,r[e]=!0}r.name=n.browser,r.platform=n.platform;for(let e in v)v.hasOwnProperty(e)&&delete v[e];Object.assign(v,r)}();var A=v;var S=class extends y{static isSupported(){try{let e=A.msedge&&A.version.minor>=15048,t=!A.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&&null!=e.redirectedURL&&(i=e.redirectedURL);let n=this._seekHandler.getConfig(i,t),r=new self.Headers;if("object"==typeof n.headers){let e=n.headers;for(let t in e)e.hasOwnProperty(t)&&r.append(t,e[t])}let s={method:"GET",headers:r,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(let e in this._config.headers)r.append(e,this._config.headers[e]);!1===e.cors&&(s.mode="same-origin"),e.withCredentials&&(s.credentials="include"),e.referrerPolicy&&(s.referrerPolicy=e.referrerPolicy),this._status=p.kConnecting,self.fetch(n.url,s).then(e=>{if(this._requestAbort)return this._requestAbort=!1,void(this._status=p.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=p.kError,!this._onError)throw new c("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(g.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(e=>{if(this._status=p.kError,!this._onError)throw e;this._onError(g.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=p.kError;let e=g.EARLY_EOF,t={code:-1,msg:"Fetch stream meet Early-EOF"};if(!this._onError)throw new c(t.msg);this._onError(e,t)}else this._status=p.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=p.kComplete,e.cancel();this._status=p.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&&A.msedge)return;this._status=p.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=g.EXCEPTION,i={code:e.code,msg:e.message}):(t=g.EARLY_EOF,i={code:e.code,msg:"Fetch stream meet Early-EOF"}),!this._onError)throw new c(i.msg);this._onError(t,i)})}};var b=class extends y{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 u.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&&null!=e.redirectedURL&&(i=e.redirectedURL);let n=this._seekHandler.getConfig(i,t);this._requestURL=n.url;let r=this._xhr=new XMLHttpRequest;if(r.open("GET",n.url,!0),r.responseType="moz-chunked-arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onloadend=this._onLoadEnd.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"==typeof n.headers){let e=n.headers;for(let t in e)e.hasOwnProperty(t)&&r.setRequestHeader(t,e[t])}if("object"==typeof this._config.headers){let e=this._config.headers;for(let t in e)e.hasOwnProperty(t)&&r.setRequestHeader(t,e[t])}this._status=p.kConnecting,r.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=p.kComplete}_onReadyStateChange(e){let t=e.target;if(2===t.readyState){if(null!=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=p.kError,!this._onError)throw new c("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(g.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=p.kBuffering}}_onProgress(e){if(this._status===p.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!==p.kError&&(this._status=p.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}_onXhrError(e){this._status=p.kError;let t=0,i=null;if(this._contentLength&&e.loaded<this._contentLength?(t=g.EARLY_EOF,i={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=g.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new c(i.msg);this._onError(t,i)}};var E=class extends y{static isSupported(){try{let e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return u.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 d,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=p.kConnecting;let i=!1;null!=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&&(null!=this._currentRedirectedURL?i=this._currentRedirectedURL:null!=e.redirectedURL&&(i=e.redirectedURL));let n=this._seekHandler.getConfig(i,t);this._currentRequestURL=n.url;let r=this._xhr=new XMLHttpRequest;if(r.open("GET",n.url,!0),r.responseType="arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onload=this._onLoad.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"==typeof n.headers){let e=n.headers;for(let t in e)e.hasOwnProperty(t)&&r.setRequestHeader(t,e[t])}if("object"==typeof this._config.headers){let e=this._config.headers;for(let t in e)e.hasOwnProperty(t)&&r.setRequestHeader(t,e[t])}r.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=p.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(null!=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=p.kBuffering}else{if(this._status=p.kError,!this._onError)throw new c("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(g.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}_onProgress(e){if(this._status===p.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,r=0,s=i;if(e<t[0])return t[0];for(;r<=s;){if(n=r+Math.floor((s-r)/2),n===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?r=n+1:s=n-1}}_onLoad(e){if(this._status===p.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 r=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():r=!0,this._onDataArrival&&this._onDataArrival(i,n,this._receivedLength),r&&(this._status=p.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(e){this._status=p.kError;let t=0,i=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=g.EARLY_EOF,i={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=g.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new c(i.msg);this._onError(t,i)}};var w=class extends y{static isSupported(){try{return void 0!==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=p.kConnecting}catch(e){this._status=p.kError;let t={code:e.code,msg:e.message};if(!this._onError)throw new c(t.msg);this._onError(g.EXCEPTION,t)}}abort(){let e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=p.kComplete}_onWebSocketOpen(e){this._status=p.kBuffering}_onWebSocketClose(e){!0!==this._requestAbort?(this._status=p.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=p.kError;let t={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new c(t.msg);this._onError(g.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=p.kError;let t={code:e.code,msg:e.message};if(!this._onError)throw new c(t.msg);this._onError(g.EXCEPTION,t)}};var R=class{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 k=class{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 r="";if(null!=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&&(r+="&"),r+=e[t])}}return 0===r.length?t:t+"?"+r}};var D=class{constructor(e,t,i){this.TAG="IOController",this._config=t,this._extraData=i,this._stashInitialSize=393216,null!=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 d,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||null!=this._dataSource.redirectedURL}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===E?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let e=this._config;if("range"===e.seekType)this._seekHandler=new R(this._config.rangeLoadZeroStart);else if("param"===e.seekType){let t=e.seekParamStart||"bstart",i=e.seekParamEnd||"bend";this._seekHandler=new k(t,i)}else{if("custom"!==e.seekType)throw new _("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new _("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=w;else if(S.isSupported())this._loaderClass=S;else if(b.isSupported())this._loaderClass=b;else{if(!E.isSupported())throw new c("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=E}}_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 _("Url must be a non-empty string!");this._dataSource.url=e}_expandBuffer(e){let t=this._stashSize;for(;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);new Uint8Array(i,0,t).set(e,0)}this._stashBuffer=i,this._bufferSize=t}_normalizeSpeed(e){let t=this._speedNormalizeList,i=t.length-1,n=0,r=0,s=i;if(e<t[0])return t[0];for(;r<=s;){if(n=r+Math.floor((s-r)/2),n===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?r=n+1:s=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 f("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){new Uint8Array(this._stashBuffer,0,this._stashSize).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 r=e.byteLength-n;r>this._bufferSize&&(this._expandBuffer(r),i=new Uint8Array(this._stashBuffer,0,this._bufferSize)),i.set(new Uint8Array(e,n),0),this._stashUsed+=r,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),new Uint8Array(this._stashBuffer,0,this._bufferSize).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}u.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(u.e(this.TAG,`Loader error, code = ${t.code}, msg = ${t.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=g.UNRECOVERABLE_EARLY_EOF),e){case g.EARLY_EOF:if(!this._config.isLive&&this._totalLength){let e=this._currentRange.to+1;return void(e<this._totalLength&&(u.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(e,!1)))}e=g.UNRECOVERABLE_EARLY_EOF}if(!this._onError)throw new c("IOException: "+t.msg);this._onError(e,t)}};const T={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 L(){return Object.assign({},T)}class M{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let e=new D({},L()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}static getNetworkLoaderTypeName(){let e=new D({},L()),t=e.loaderType;return e.destroy(),t}static supportNativeMediaPlayback(e){null==M.videoElement&&(M.videoElement=window.document.createElement("video"));let t=M.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=M.supportMSEH264Playback(),e.networkStreamIO=M.supportNetworkStreamIO(),e.networkLoaderName=M.getNetworkLoaderTypeName(),e.mseLiveFlvPlayback=e.mseFlvPlayback&&e.networkStreamIO,e.nativeMP4H264Playback=M.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),e.nativeWebmVP8Playback=M.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),e.nativeWebmVP9Playback=M.supportNativeMediaPlayback('video/webm; codecs="vp9"'),e}}var O=M;var C={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"};class I{static get forceGlobalTag(){return u.FORCE_GLOBAL_TAG}static set forceGlobalTag(e){u.FORCE_GLOBAL_TAG=e,I._notifyChange()}static get globalTag(){return u.GLOBAL_TAG}static set globalTag(e){u.GLOBAL_TAG=e,I._notifyChange()}static get enableAll(){return u.ENABLE_VERBOSE&&u.ENABLE_DEBUG&&u.ENABLE_INFO&&u.ENABLE_WARN&&u.ENABLE_ERROR}static set enableAll(e){u.ENABLE_VERBOSE=e,u.ENABLE_DEBUG=e,u.ENABLE_INFO=e,u.ENABLE_WARN=e,u.ENABLE_ERROR=e,I._notifyChange()}static get enableDebug(){return u.ENABLE_DEBUG}static set enableDebug(e){u.ENABLE_DEBUG=e,I._notifyChange()}static get enableVerbose(){return u.ENABLE_VERBOSE}static set enableVerbose(e){u.ENABLE_VERBOSE=e,I._notifyChange()}static get enableInfo(){return u.ENABLE_INFO}static set enableInfo(e){u.ENABLE_INFO=e,I._notifyChange()}static get enableWarn(){return u.ENABLE_WARN}static set enableWarn(e){u.ENABLE_WARN=e,I._notifyChange()}static get enableError(){return u.ENABLE_ERROR}static set enableError(e){u.ENABLE_ERROR=e,I._notifyChange()}static getConfig(){return{globalTag:u.GLOBAL_TAG,forceGlobalTag:u.FORCE_GLOBAL_TAG,enableVerbose:u.ENABLE_VERBOSE,enableDebug:u.ENABLE_DEBUG,enableInfo:u.ENABLE_INFO,enableWarn:u.ENABLE_WARN,enableError:u.ENABLE_ERROR,enableCallback:u.ENABLE_CALLBACK}}static applyConfig(e){u.GLOBAL_TAG=e.globalTag,u.FORCE_GLOBAL_TAG=e.forceGlobalTag,u.ENABLE_VERBOSE=e.enableVerbose,u.ENABLE_DEBUG=e.enableDebug,u.ENABLE_INFO=e.enableInfo,u.ENABLE_WARN=e.enableWarn,u.ENABLE_ERROR=e.enableError,u.ENABLE_CALLBACK=e.enableCallback}static _notifyChange(){let e=I.emitter;if(e.listenerCount("change")>0){let t=I.getConfig();e.emit("change",t)}}static registerListener(e){I.emitter.addListener("change",e)}static removeListener(e){I.emitter.removeListener("change",e)}static addLogListener(e){u.emitter.addListener("log",e),u.emitter.listenerCount("log")>0&&(u.ENABLE_CALLBACK=!0,I._notifyChange())}static removeLogListener(e){u.emitter.removeListener("log",e),0===u.emitter.listenerCount("log")&&(u.ENABLE_CALLBACK=!1,I._notifyChange())}}I.emitter=new l.a;var x=I;var U=class{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,r=0,s=0,a=n;for(t<e[0]&&(i=0,s=a+1);s<=a;){if(r=s+Math.floor((a-s)/2),r===n||t>=e[r]&&t<e[r+1]){i=r;break}e[r]<t?s=r+1:a=r-1}return i}};function P(e,t,i){let n=e;if(t+i<n.length){for(;i--;)if(128!=(192&n[++t]))return!1;return!0}return!1}var B=function(e){let t=[],i=e,n=0,r=e.length;for(;n<r;)if(i[n]<128)t.push(String.fromCharCode(i[n])),++n;else{if(i[n]<192);else if(i[n]<224){if(P(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(P(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&&P(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("")};let N=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();class F{static parseScriptData(e,t,i){let n={};try{let r=F.parseValue(e,t,i),s=F.parseValue(e,t+r.size,i-r.size);n[r.data]=s.data}catch(e){u.e("AMF",e.toString())}return n}static parseObject(e,t,i){if(i<3)throw new f("Data not enough when parse ScriptDataObject");let n=F.parseString(e,t,i),r=F.parseValue(e,t+n.size,i-n.size),s=r.objectEnd;return{data:{name:n.data,value:r.data},size:n.size+r.size,objectEnd:s}}static parseVariable(e,t,i){return F.parseObject(e,t,i)}static parseString(e,t,i){if(i<2)throw new f("Data not enough when parse String");let n,r=new DataView(e,t,i).getUint16(0,!N);return n=r>0?B(new Uint8Array(e,t+2,r)):"",{data:n,size:2+r}}static parseLongString(e,t,i){if(i<4)throw new f("Data not enough when parse LongString");let n,r=new DataView(e,t,i).getUint32(0,!N);return n=r>0?B(new Uint8Array(e,t+4,r)):"",{data:n,size:4+r}}static parseDate(e,t,i){if(i<10)throw new f("Data size invalid when parse Date");let n=new DataView(e,t,i),r=n.getFloat64(0,!N);return r+=60*n.getInt16(8,!N)*1e3,{data:new Date(r),size:10}}static parseValue(e,t,i){if(i<1)throw new f("Data not enough when parse Value");let n,r=new DataView(e,t,i),s=1,a=r.getUint8(0),o=!1;try{switch(a){case 0:n=r.getFloat64(1,!N),s+=8;break;case 1:n=!!r.getUint8(1),s+=1;break;case 2:{let r=F.parseString(e,t+1,i-1);n=r.data,s+=r.size;break}case 3:{n={};let a=0;for(9==(16777215&r.getUint32(i-4,!N))&&(a=3);s<i-4;){let r=F.parseObject(e,t+s,i-s-a);if(r.objectEnd)break;n[r.data.name]=r.data.value,s+=r.size}if(s<=i-3){9===(16777215&r.getUint32(s-1,!N))&&(s+=3)}break}case 8:{n={},s+=4;let a=0;for(9==(16777215&r.getUint32(i-4,!N))&&(a=3);s<i-8;){let r=F.parseVariable(e,t+s,i-s-a);if(r.objectEnd)break;n[r.data.name]=r.data.value,s+=r.size}if(s<=i-3){9===(16777215&r.getUint32(s-1,!N))&&(s+=3)}break}case 9:n=void 0,s=1,o=!0;break;case 10:{n=[];let a=r.getUint32(1,!N);s+=4;for(let r=0;r<a;r++){let r=F.parseValue(e,t+s,i-s);n.push(r.data),s+=r.size}break}case 11:{let r=F.parseDate(e,t+1,i-1);n=r.data,s+=r.size;break}case 12:{let r=F.parseString(e,t+1,i-1);n=r.data,s+=r.size;break}default:s=i,u.w("AMF","Unsupported AMF value type "+a)}}catch(e){u.e("AMF",e.toString())}return{data:n,size:s,objectEnd:o}}}var V=F;var Y=class{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 f("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 _("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),r=this._current_word>>>32-n;return this._current_word<<=n,this._current_word_bits_left-=n,t=t<<n|r,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)}};class q{static _ebsp2rbsp(e){let t=e,i=t.byteLength,n=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(n[r]=t[e],r++);return new Uint8Array(n.buffer,0,r)}static parseSPS(e){let t=q._ebsp2rbsp(e),i=new Y(t);i.readByte();let n=i.readByte();i.readByte();let r=i.readByte();i.readUEG();let s=q.getProfileString(n),a=q.getLevelString(r),o=1,l=420,h=[0,420,422,444],u=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=h[o]),u=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?q._skipScalingList(i,16):q._skipScalingList(i,64))}i.readUEG();let d=i.readUEG();if(0===d)i.readUEG();else if(1===d){i.readBits(1),i.readSEG(),i.readSEG();let e=i.readUEG();for(let t=0;t<e;t++)i.readSEG()}let c=i.readUEG();i.readBits(1);let f=i.readUEG(),_=i.readUEG(),m=i.readBits(1);0===m&&i.readBits(1),i.readBits(1);let p=0,g=0,y=0,v=0;i.readBool()&&(p=i.readUEG(),g=i.readUEG(),y=i.readUEG(),v=i.readUEG());let A=1,S=1,b=0,E=!0,w=0,R=0;if(i.readBool()){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?(A=t[e-1],S=n[e-1]):255===e&&(A=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);E=i.readBool(),w=t,R=2*e,b=w/R}}let k=1;1===A&&1===S||(k=A/S);let D=0,T=0;if(0===o)D=1,T=2-m;else{D=3===o?1:2,T=(1===o?2:1)*(2-m)}let L=16*(f+1),M=16*(_+1)*(2-m);L-=(p+g)*D,M-=(y+v)*T;let O=Math.ceil(L*k);return i.destroy(),i=null,{profile_string:s,level_string:a,bit_depth:u,ref_frames:c,chroma_format:l,chroma_format_string:q.getChromaFormatString(l),frame_rate:{fixed:E,fps:b,fps_den:R,fps_num:w},sar_ratio:{width:A,height:S},codec_size:{width:L,height:M},present_size:{width:O,height:M}}}static _skipScalingList(e,t){let i=8,n=8,r=0;for(let s=0;s<t;s++)0!==n&&(r=e.readSEG(),n=(i+r+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 j=q;var W={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};class G{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 U,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,r=0!=(1&t[4]),s=(a=t)[o=5]<<24|a[o+1]<<16|a[o+2]<<8|a[o+3];var a,o;return s<9?i:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:n,hasVideoTrack:r}}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 U}_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 f("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let i=0,n=this._littleEndian;if(0===t){if(!(e.byteLength>13))return 0;i=G.probe(e).dataOffset}if(this._firstParse){this._firstParse=!1,t+i!==this._dataOffset&&u.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(e,i).getUint32(0,!n)&&u.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4}for(;i<e.byteLength;){this._dispatch=!0;let r=new DataView(e,i);if(i+11+4>e.byteLength)break;let s=r.getUint8(0),a=16777215&r.getUint32(0,!n);if(i+11+a+4>e.byteLength)break;if(8!==s&&9!==s&&18!==s){u.w(this.TAG,`Unsupported tag type ${s}, skipped`),i+=11+a+4;continue}let o=r.getUint8(4),l=r.getUint8(5),h=r.getUint8(6)|l<<8|o<<16|r.getUint8(7)<<24;0!==(16777215&r.getUint32(7,!n))&&u.w(this.TAG,"Meet tag which has StreamID != 0!");let d=i+11;switch(s){case 8:this._parseAudioData(e,d,a,h);break;case 9:this._parseVideoData(e,d,a,h,t+i);break;case 18:this._parseScriptData(e,d,a)}let c=r.getUint32(11+a,!n);c!==11+a&&u.w(this.TAG,"Invalid PrevTagSize "+c),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=V.parseScriptData(e,t,i);if(n.hasOwnProperty("onMetaData")){if(null==n.onMetaData||"object"!=typeof n.onMetaData)return void u.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&u.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,u.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 r=this._timestampBase+Math.floor(1e3*e.times[n]);t.push(r),i.push(e.filepositions[n])}return{times:t,filepositions:i}}_parseAudioData(e,t,i,n){if(i<=1)return void u.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");if(!0===this._hasAudioFlagOverrided&&!1===this._hasAudio)return;this._littleEndian;let r=new DataView(e,t,i).getUint8(0),s=r>>>4;if(2!==s&&10!==s)return void this._onError(W.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+s);let a=0,o=(12&r)>>>2;if(!(o>=0&&o<=4))return void this._onError(W.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+o);a=this._flvSoundRateTable[o];let l=1&r,h=this._audioMetadata,d=this._audioTrack;if(h||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),h=this._audioMetadata={},h.type="audio",h.id=d.id,h.timescale=this._timescale,h.duration=this._duration,h.audioSampleRate=a,h.channelCount=0===l?1:2),10===s){let r=this._parseAACAudioData(e,t+1,i-1);if(null==r)return;if(0===r.packetType){h.config&&u.w(this.TAG,"Found another AudioSpecificConfig!");let e=r.data;h.audioSampleRate=e.samplingRate,h.channelCount=e.channelCount,h.codec=e.codec,h.originalCodec=e.originalCodec,h.config=e.config,h.refSampleDuration=1024/h.audioSampleRate*h.timescale,u.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",h);let t=this._mediaInfo;t.audioCodec=h.originalCodec,t.audioSampleRate=h.audioSampleRate,t.audioChannelCount=h.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===r.packetType){let e=this._timestampBase+n,t={unit:r.data,length:r.data.byteLength,dts:e,pts:e};d.samples.push(t),d.length+=r.data.length}else u.e(this.TAG,"Flv: Unsupported AAC data type "+r.packetType)}else if(2===s){if(!h.codec){let n=this._parseMP3AudioData(e,t+1,i-1,!0);if(null==n)return;h.audioSampleRate=n.samplingRate,h.channelCount=n.channelCount,h.codec=n.codec,h.originalCodec=n.originalCodec,h.refSampleDuration=1152/h.audioSampleRate*h.timescale,u.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",h);let r=this._mediaInfo;r.audioCodec=h.codec,r.audioSampleRate=h.audioSampleRate,r.audioChannelCount=h.channelCount,r.audioDataRate=n.bitRate,r.hasVideo?null!=r.videoCodec&&(r.mimeType='video/x-flv; codecs="'+r.videoCodec+","+r.audioCodec+'"'):r.mimeType='video/x-flv; codecs="'+r.audioCodec+'"',r.isComplete()&&this._onMediaInfo(r)}let r=this._parseMP3AudioData(e,t+1,i-1,!1);if(null==r)return;let s=this._timestampBase+n,a={unit:r,length:r.byteLength,dts:s,pts:s};d.samples.push(a),d.length+=r.length}}_parseAACAudioData(e,t,i){if(i<=1)return void u.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");let n={},r=new Uint8Array(e,t,i);return n.packetType=r[0],0===r[0]?n.data=this._parseAACAudioSpecificConfig(e,t+1,i-1):n.data=r.subarray(1),n}_parseAACAudioSpecificConfig(e,t,i){let n=new Uint8Array(e,t,i),r=null,s=0,a=0,o=null,l=0,h=null;if(s=a=n[0]>>>3,l=(7&n[0])<<1|n[1]>>>7,l<0||l>=this._mpegSamplingRates.length)return void this._onError(W.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");let u=this._mpegSamplingRates[l],d=(120&n[1])>>>3;if(d<0||d>=8)return void this._onError(W.FORMAT_ERROR,"Flv: AAC invalid channel configuration");5===s&&(h=(7&n[1])<<1|n[2]>>>7,o=(124&n[2])>>>2);let c=self.navigator.userAgent.toLowerCase();return-1!==c.indexOf("firefox")?l>=6?(s=5,r=new Array(4),h=l-3):(s=2,r=new Array(2),h=l):-1!==c.indexOf("android")?(s=2,r=new Array(2),h=l):(s=5,h=l,r=new Array(4),l>=6?h=l-3:1===d&&(s=2,r=new Array(2),h=l)),r[0]=s<<3,r[0]|=(15&l)>>>1,r[1]=(15&l)<<7,r[1]|=(15&d)<<3,5===s&&(r[1]|=(15&h)>>>1,r[2]=(1&h)<<7,r[2]|=8,r[3]=0),{config:r,samplingRate:u,channelCount:d,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+a}}_parseMP3AudioData(e,t,i,n){if(i<4)return void u.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");this._littleEndian;let r=new Uint8Array(e,t,i),s=null;if(n){if(255!==r[0])return;let e=r[1]>>>3&3,t=(6&r[1])>>1,i=(240&r[2])>>>4,n=(12&r[2])>>>2,a=3!==(r[3]>>>6&3)?2:1,o=0,l=0,h=34,u="mp3";switch(e){case 0:o=this._mpegAudioV25SampleRateTable[n];break;case 2:o=this._mpegAudioV20SampleRateTable[n];break;case 3:o=this._mpegAudioV10SampleRateTable[n]}switch(t){case 1:h=34,i<this._mpegAudioL3BitRateTable.length&&(l=this._mpegAudioL3BitRateTable[i]);break;case 2:h=33,i<this._mpegAudioL2BitRateTable.length&&(l=this._mpegAudioL2BitRateTable[i]);break;case 3:h=32,i<this._mpegAudioL1BitRateTable.length&&(l=this._mpegAudioL1BitRateTable[i])}s={bitRate:l,samplingRate:o,channelCount:a,codec:u,originalCodec:u}}else s=r;return s}_parseVideoData(e,t,i,n,r){if(i<=1)return void u.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");if(!0===this._hasVideoFlagOverrided&&!1===this._hasVideo)return;let s=new Uint8Array(e,t,i)[0],a=(240&s)>>>4,o=15&s;7===o?this._parseAVCVideoPacket(e,t+1,i-1,n,r,a):this._onError(W.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+o)}_parseAVCVideoPacket(e,t,i,n,r,s){if(i<4)return void u.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),h=(16777215&o.getUint32(0,!a))<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(e,t+4,i-4);else if(1===l)this._parseAVCVideoData(e,t+4,i-4,n,r,s,h);else if(2!==l)return void this._onError(W.FORMAT_ERROR,"Flv: Invalid video packet type "+l)}_parseAVCDecoderConfigurationRecord(e,t,i){if(i<7)return void u.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");let n=this._videoMetadata,r=this._videoTrack,s=this._littleEndian,a=new DataView(e,t,i);n?void 0!==n.avcc&&u.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=r.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(W.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");if(this._naluLengthSize=1+(3&a.getUint8(4)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void this._onError(W.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));let h=31&a.getUint8(5);if(0===h)return void this._onError(W.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");h>1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+h);let d=6;for(let i=0;i<h;i++){let r=a.getUint16(d,!s);if(d+=2,0===r)continue;let o=new Uint8Array(e,t+d,r);d+=r;let l=j.parseSPS(o);if(0!==i)continue;n.codecWidth=l.codec_size.width,n.codecHeight=l.codec_size.height,n.presentWidth=l.present_size.width,n.presentHeight=l.present_size.height,n.profile=l.profile_string,n.level=l.level_string,n.bitDepth=l.bit_depth,n.chromaFormat=l.chroma_format,n.sarRatio=l.sar_ratio,n.frameRate=l.frame_rate,!1!==l.frame_rate.fixed&&0!==l.frame_rate.fps_num&&0!==l.frame_rate.fps_den||(n.frameRate=this._referenceFrameRate);let h=n.frameRate.fps_den,u=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(h/u);let c=o.subarray(1,4),f="avc1.";for(let e=0;e<3;e++){let t=c[e].toString(16);t.length<2&&(t="0"+t),f+=t}n.codec=f;let _=this._mediaInfo;_.width=n.codecWidth,_.height=n.codecHeight,_.fps=n.frameRate.fps,_.profile=n.profile,_.level=n.level,_.refFrames=l.ref_frames,_.chromaFormat=l.chroma_format_string,_.sarNum=n.sarRatio.width,_.sarDen=n.sarRatio.height,_.videoCodec=f,_.hasAudio?null!=_.audioCodec&&(_.mimeType='video/x-flv; codecs="'+_.videoCodec+","+_.audioCodec+'"'):_.mimeType='video/x-flv; codecs="'+_.videoCodec+'"',_.isComplete()&&this._onMediaInfo(_)}let c=a.getUint8(d);if(0!==c){c>1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+c),d++;for(let e=0;e<c;e++){let e=a.getUint16(d,!s);d+=2,0!==e&&(d+=e)}n.avcc=new Uint8Array(i),n.avcc.set(new Uint8Array(e,t,i),0),u.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(W.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}_parseAVCVideoData(e,t,i,n,r,s,a){let o=this._littleEndian,l=new DataView(e,t,i),h=[],d=0,c=0;const f=this._naluLengthSize;let _=this._timestampBase+n,m=1===s;for(;c<i;){if(c+4>=i){u.w(this.TAG,`Malformed Nalu near timestamp ${_}, offset = ${c}, dataSize = ${i}`);break}let n=l.getUint32(c,!o);if(3===f&&(n>>>=8),n>i-f)return void u.w(this.TAG,`Malformed Nalus near timestamp ${_}, NaluSize > DataSize!`);let r=31&l.getUint8(c+f);5===r&&(m=!0);let s=new Uint8Array(e,t+c,f+n),a={type:r,data:s};h.push(a),d+=s.byteLength,c+=f+n}if(h.length){let e=this._videoTrack,t={units:h,length:d,isKeyframe:m,dts:_,cts:a,pts:_+a};m&&(t.fileposition=r),e.samples.push(t),e.length+=d}}}var z=G;class H{static init(){H.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 e in H.types)H.types.hasOwnProperty(e)&&(H.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=H.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),r=n.length;for(let e=0;e<r;e++)t+=n[e].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 s=8;for(let e=0;e<r;e++)i.set(n[e],s),s+=n[e].byteLength;return i}static generateInitSegment(e){let t=H.box(H.types.ftyp,H.constants.FTYP),i=H.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=H.mvhd(e.timescale,e.duration),i=H.trak(e),n=H.mvex(e);return H.box(H.types.moov,t,i,n)}static mvhd(e,t){return H.box(H.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 H.box(H.types.trak,H.tkhd(e),H.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,n=e.presentWidth,r=e.presentHeight;return H.box(H.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,r>>>8&255,255&r,0,0]))}static mdia(e){return H.box(H.types.mdia,H.mdhd(e),H.hdlr(e),H.minf(e))}static mdhd(e){let t=e.timescale,i=e.duration;return H.box(H.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?H.constants.HDLR_AUDIO:H.constants.HDLR_VIDEO,H.box(H.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?H.box(H.types.smhd,H.constants.SMHD):H.box(H.types.vmhd,H.constants.VMHD),H.box(H.types.minf,t,H.dinf(),H.stbl(e))}static dinf(){return H.box(H.types.dinf,H.box(H.types.dref,H.constants.DREF))}static stbl(e){return H.box(H.types.stbl,H.stsd(e),H.box(H.types.stts,H.constants.STTS),H.box(H.types.stsc,H.constants.STSC),H.box(H.types.stsz,H.constants.STSZ),H.box(H.types.stco,H.constants.STCO))}static stsd(e){return"audio"===e.type?"mp3"===e.codec?H.box(H.types.stsd,H.constants.STSD_PREFIX,H.mp3(e)):H.box(H.types.stsd,H.constants.STSD_PREFIX,H.mp4a(e)):H.box(H.types.stsd,H.constants.STSD_PREFIX,H.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 H.box(H.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 H.box(H.types.mp4a,n,H.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 H.box(H.types.esds,n)}static avc1(e){let t=e.avcc,i=e.codecWidth,n=e.codecHeight,r=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 H.box(H.types.avc1,r,H.box(H.types.avcC,t))}static mvex(e){return H.box(H.types.mvex,H.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 H.box(H.types.trex,i)}static moof(e,t){return H.box(H.types.moof,H.mfhd(e.sequenceNumber),H.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 H.box(H.types.mfhd,t)}static traf(e,t){let i=e.id,n=H.box(H.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=H.box(H.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),s=H.sdtp(e),a=H.trun(e,s.byteLength+16+16+8+16+8+8);return H.box(H.types.traf,n,r,a,s)}static sdtp(e){let t=e.samples||[],i=t.length,n=new Uint8Array(4+i);for(let e=0;e<i;e++){let i=t[e].flags;n[e+4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy}return H.box(H.types.sdtp,n)}static trun(e,t){let i=e.samples||[],n=i.length,r=12+16*n,s=new Uint8Array(r);t+=8+r,s.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 e=0;e<n;e++){let t=i[e].duration,n=i[e].size,r=i[e].flags,a=i[e].cts;s.set([t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.isNonSync,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12+16*e)}return H.box(H.types.trun,s)}static mdat(e){return H.box(H.types.mdat,e)}}H.init();var K=H;var Q=class{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}};class Z{constructor(e,t,i,n,r){this.dts=e,this.pts=t,this.duration=i,this.originalDts=n,this.isSyncPoint=r,this.fileposition=null}}class X{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 J{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,r=0,s=0,a=n;for(e<t[0].dts&&(i=0,s=a+1);s<=a;){if(r=s+Math.floor((a-s)/2),r===n||e>=t[r].dts&&e<t[r+1].dts){i=r;break}t[r].dts<e?s=r+1:a=r-1}return this._list[i]}}class ${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,r=0,s=i,a=0;if(e<t[0].originalBeginDts)return a=-1,a;for(;r<=s;){if(n=r+Math.floor((s-r)/2),n===i||e>t[n].lastSample.originalDts&&e<t[n+1].originalBeginDts){a=n;break}t[n].originalBeginDts<e?r=n+1:s=n-1}return a}_searchNearestSegmentAfter(e){return this._searchNearestSegmentBefore(e)+1}append(e){let t=this._list,i=e,n=this._lastAppendLocation,r=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)?r=n+1:t.length>0&&(r=this._searchNearestSegmentBefore(i.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,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;for(;0===i.length&&t>0;)t--,i=this._list[t].syncPoints;return i.length>0?i[i.length-1]:null}}var ee=class{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 $("audio"),this._videoSegmentInfoList=new $("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!A.chrome||!(A.version.major<50||50===A.version.major&&A.version.build<2661)),this._fillSilentAfterSeek=A.msedge||A.msie,this._mp3UseMpegAudio=!A.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 f("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",r=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(n="mpeg",r="",i=new Uint8Array):i=K.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=K.generateInitSegment(t)}if(!this._onInitSegment)throw new f("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:r,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,r=void 0,s=-1,a=-1,o=this._audioMeta.refSampleDuration,l="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,h=this._dtsBaseInited&&void 0===this._audioNextDts,d=!1;if(!n||0===n.length)return;if(1===n.length&&!t)return;let c=0,f=null,_=0;l?(c=0,_=i.length):(c=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)r=p-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())r=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(d=!0);else{let e=this._audioSegmentInfoList.getLastSampleBefore(p);if(null!=e){let t=p-(e.originalDts+e.duration);t<=3&&(t=0),r=p-(e.dts+e.duration+t)}else r=0}if(d){let e=p-r,t=this._videoSegmentInfoList.getLastSegmentBefore(p);if(null!=t&&t.beginDts<e){let i=Q.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(i){let r=t.beginDts,s=e-t.beginDts;u.v(this.TAG,`InsertPrefixSilentAudio: dts: ${r}, duration: ${s}`),n.unshift({unit:i,dts:r,pts:r}),_+=i.byteLength}}else d=!1}let g=[];for(let e=0;e<n.length;e++){let t=n[e],i=t.unit,a=t.dts-this._dtsBase,l=a-r;-1===s&&(s=l);let h=0;if(e!==n.length-1){h=n[e+1].dts-this._dtsBase-r-l}else if(null!=m){h=m.dts-this._dtsBase-r-l}else h=g.length>=1?g[g.length-1].duration:Math.floor(o);let d=!1,c=null;if(h>1.5*o&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!A.safari){d=!0;let e=Math.abs(h-o),t=Math.ceil(e/o),n=l+o;u.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: ${l+h} ms, expected: ${l+Math.round(o)} ms, delta: ${Math.round(e)} ms, generate: ${t} frames`);let r=Q.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==r&&(u.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),r=i),c=[];for(let e=0;e<t;e++){let e=Math.round(n);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:a,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};c.push(t),_+=t.size,n+=o}let s=c[c.length-1];s.duration=l+h-s.dts,h=Math.round(o)}g.push({dts:l,pts:l,cts:0,unit:t.unit,size:t.unit.byteLength,duration:h,originalDts:a,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),d&&g.push.apply(g,c)}l?f=new Uint8Array(_):(f=new Uint8Array(_),f[0]=_>>>24&255,f[1]=_>>>16&255,f[2]=_>>>8&255,f[3]=255&_,f.set(K.types.mdat,4));for(let e=0;e<g.length;e++){let t=g[e].unit;f.set(t,c),c+=t.byteLength}let y=g[g.length-1];a=y.dts+y.duration,this._audioNextDts=a;let v=new X;v.beginDts=s,v.endDts=a,v.beginPts=s,v.endPts=a,v.originalBeginDts=g[0].originalDts,v.originalEndDts=y.originalDts+y.duration,v.firstSample=new Z(g[0].dts,g[0].pts,g[0].duration,g[0].originalDts,!1),v.lastSample=new Z(y.dts,y.pts,y.duration,y.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(v),i.samples=g,i.sequenceNumber++;let S=null;S=l?new Uint8Array:K.moof(i,s),i.samples=[],i.length=0;let b={type:"audio",data:this._mergeBoxes(S,f).buffer,sampleCount:g.length,info:v};l&&h&&(b.timestampOffset=s),this._onMediaSegment("audio",b)}_remuxVideo(e,t){if(null==this._videoMeta)return;let i=e,n=i.samples,r=void 0,s=-1,a=-1,o=-1,l=-1;if(!n||0===n.length)return;if(1===n.length&&!t)return;let h=8,u=null,d=8+e.length,c=null;if(n.length>1&&(c=n.pop(),d-=c.length),null!=this._videoStashedLastSample){let e=this._videoStashedLastSample;this._videoStashedLastSample=null,n.unshift(e),d+=e.length}null!=c&&(this._videoStashedLastSample=c);let f=n[0].dts-this._dtsBase;if(this._videoNextDts)r=f-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())r=0;else{let e=this._videoSegmentInfoList.getLastSampleBefore(f);if(null!=e){let t=f-(e.originalDts+e.duration);t<=3&&(t=0),r=f-(e.dts+e.duration+t)}else r=0}let _=new X,m=[];for(let e=0;e<n.length;e++){let t=n[e],i=t.dts-this._dtsBase,a=t.isKeyframe,l=i-r,h=t.cts,u=l+h;-1===s&&(s=l,o=u);let d=0;if(e!==n.length-1){d=n[e+1].dts-this._dtsBase-r-l}else if(null!=c){d=c.dts-this._dtsBase-r-l}else d=m.length>=1?m[m.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(a){let e=new Z(l,u,d,t.dts,!0);e.fileposition=t.fileposition,_.appendSyncPoint(e)}m.push({dts:l,pts:u,cts:h,units:t.units,size:t.length,isKeyframe:a,duration:d,originalDts:i,flags:{isLeading:0,dependsOn:a?2:1,isDependedOn:a?1:0,hasRedundancy:0,isNonSync:a?0:1}})}u=new Uint8Array(d),u[0]=d>>>24&255,u[1]=d>>>16&255,u[2]=d>>>8&255,u[3]=255&d,u.set(K.types.mdat,4);for(let e=0;e<m.length;e++){let t=m[e].units;for(;t.length;){let e=t.shift().data;u.set(e,h),h+=e.byteLength}}let p=m[m.length-1];if(a=p.dts+p.duration,l=p.pts+p.duration,this._videoNextDts=a,_.beginDts=s,_.endDts=a,_.beginPts=o,_.endPts=l,_.originalBeginDts=m[0].originalDts,_.originalEndDts=p.originalDts+p.duration,_.firstSample=new Z(m[0].dts,m[0].pts,m[0].duration,m[0].originalDts,m[0].isKeyframe),_.lastSample=new Z(p.dts,p.pts,p.duration,p.originalDts,p.isKeyframe),this._isLive||this._videoSegmentInfoList.append(_),i.samples=m,i.sequenceNumber++,this._forceFirstIDR){let e=m[0].flags;e.dependsOn=2,e.isNonSync=0}let g=K.moof(i,s);i.samples=[],i.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(g,u).buffer,sampleCount:m.length,info:_})}_mergeBoxes(e,t){let i=new Uint8Array(e.byteLength+t.byteLength);return i.set(e,0),i.set(t,e.byteLength),i}};var te={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 ie=class{constructor(e,t){this.TAG="TransmuxingController",this._emitter=new l.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 D(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(null==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(null==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=z.probe(e)).match){this._demuxer=new z(i,this._config),this._remuxer||(this._remuxer=new ee(this._config));let r=this._mediaDataSource;null==r.duration||isNaN(r.duration)||(this._demuxer.overridedDuration=r.duration),"boolean"==typeof r.hasAudio&&(this._demuxer.overridedHasAudio=r.hasAudio),"boolean"==typeof r.hasVideo&&(this._demuxer.overridedHasVideo=r.hasVideo),this._demuxer.timestampBase=r.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,u.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(te.DEMUX_ERROR,W.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,U.prototype));let t=Object.assign({},e);Object.setPrototypeOf(t,U.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(te.METADATA_ARRIVED,e)}_onScriptDataArrived(e){this._emitter.emit(te.SCRIPTDATA_ARRIVED,e)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(e){let t=e+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer.flushStashedSamples(),this._emitter.emit(te.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(e){let t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}_onIORecoveredEarlyEof(){this._emitter.emit(te.RECOVERED_EARLY_EOF)}_onIOException(e,t){u.e(this.TAG,`IOException: type = ${e}, code = ${t.code}, msg = ${t.msg}`),this._emitter.emit(te.IO_ERROR,e,t),this._disableStatisticsReporter()}_onDemuxException(e,t){u.e(this.TAG,`DemuxException: type = ${e}, info = ${t}`),this._emitter.emit(te.DEMUX_ERROR,e,t)}_onRemuxerInitSegmentArrival(e,t){this._emitter.emit(te.INIT_SEGMENT,e,t)}_onRemuxerMediaSegmentArrival(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(te.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){let e=t.info.syncPoints,i=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,A.safari&&e.length>0&&e[0].originalDts===i&&(i=e[0].pts),this._emitter.emit(te.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(te.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(te.STATISTICS_INFO,e)}};var ne=function(e){let t=null,i=function(t,i){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:i}})}.bind(this);function n(t,i){let n={msg:te.INIT_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function r(t,i){let n={msg:te.MEDIA_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function s(){let t={msg:te.LOADING_COMPLETE};e.postMessage(t)}function o(){let t={msg:te.RECOVERED_EARLY_EOF};e.postMessage(t)}function l(t){let i={msg:te.MEDIA_INFO,data:t};e.postMessage(i)}function h(t){let i={msg:te.METADATA_ARRIVED,data:t};e.postMessage(i)}function u(t){let i={msg:te.SCRIPTDATA_ARRIVED,data:t};e.postMessage(i)}function d(t){let i={msg:te.STATISTICS_INFO,data:t};e.postMessage(i)}function c(t,i){e.postMessage({msg:te.IO_ERROR,data:{type:t,info:i}})}function f(t,i){e.postMessage({msg:te.DEMUX_ERROR,data:{type:t,info:i}})}function _(t){e.postMessage({msg:te.RECOMMEND_SEEKPOINT,data:t})}a.install(),e.addEventListener("message",(function(a){switch(a.data.cmd){case"init":t=new ie(a.data.param[0],a.data.param[1]),t.on(te.IO_ERROR,c.bind(this)),t.on(te.DEMUX_ERROR,f.bind(this)),t.on(te.INIT_SEGMENT,n.bind(this)),t.on(te.MEDIA_SEGMENT,r.bind(this)),t.on(te.LOADING_COMPLETE,s.bind(this)),t.on(te.RECOVERED_EARLY_EOF,o.bind(this)),t.on(te.MEDIA_INFO,l.bind(this)),t.on(te.METADATA_ARRIVED,h.bind(this)),t.on(te.SCRIPTDATA_ARRIVED,u.bind(this)),t.on(te.STATISTICS_INFO,d.bind(this)),t.on(te.RECOMMEND_SEEKPOINT,_.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(a.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":{let e=a.data.param;x.applyConfig(e),!0===e.enableCallback?x.addLogListener(i):x.removeLogListener(i);break}}}))};var re=class{constructor(e,t){if(this.TAG="Transmuxer",this._emitter=new l.a,t.enableWorker&&"undefined"!=typeof Worker)try{let n=i(15);this._worker=n(ne),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)},x.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:x.getConfig()})}catch(i){u.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ie(e,t)}else this._controller=new ie(e,t);if(this._controller){let e=this._controller;e.on(te.IO_ERROR,this._onIOError.bind(this)),e.on(te.DEMUX_ERROR,this._onDemuxError.bind(this)),e.on(te.INIT_SEGMENT,this._onInitSegment.bind(this)),e.on(te.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),e.on(te.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),e.on(te.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),e.on(te.MEDIA_INFO,this._onMediaInfo.bind(this)),e.on(te.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),e.on(te.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),e.on(te.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),e.on(te.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),x.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(te.INIT_SEGMENT,e,t)})}_onMediaSegment(e,t){Promise.resolve().then(()=>{this._emitter.emit(te.MEDIA_SEGMENT,e,t)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(te.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(te.RECOVERED_EARLY_EOF)})}_onMediaInfo(e){Promise.resolve().then(()=>{this._emitter.emit(te.MEDIA_INFO,e)})}_onMetaDataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(te.METADATA_ARRIVED,e)})}_onScriptDataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(te.SCRIPTDATA_ARRIVED,e)})}_onStatisticsInfo(e){Promise.resolve().then(()=>{this._emitter.emit(te.STATISTICS_INFO,e)})}_onIOError(e,t){Promise.resolve().then(()=>{this._emitter.emit(te.IO_ERROR,e,t)})}_onDemuxError(e,t){Promise.resolve().then(()=>{this._emitter.emit(te.DEMUX_ERROR,e,t)})}_onRecommendSeekpoint(e){Promise.resolve().then(()=>{this._emitter.emit(te.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 te.INIT_SEGMENT:case te.MEDIA_SEGMENT:this._emitter.emit(t.msg,i.type,i.data);break;case te.LOADING_COMPLETE:case te.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case te.MEDIA_INFO:Object.setPrototypeOf(i,U.prototype),this._emitter.emit(t.msg,i);break;case te.METADATA_ARRIVED:case te.SCRIPTDATA_ARRIVED:case te.STATISTICS_INFO:this._emitter.emit(t.msg,i);break;case te.IO_ERROR:case te.DEMUX_ERROR:this._emitter.emit(t.msg,i.type,i.info);break;case te.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,i);break;case"logcat_callback":u.emitter.emit("log",i.type,i.logcat)}}};var se={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};var ae=class{constructor(e){this.TAG="MSEController",this._config=e,this._emitter=new l.a,this._config.isLive&&null==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 J}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 f("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 e=this._mediaSource;for(let t in this._sourceBuffers){let i=this._pendingSegments[t];i.splice(0,i.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;let n=this._sourceBuffers[t];if(n){if("closed"!==e.readyState){try{e.removeSourceBuffer(n)}catch(e){u.e(this.TAG,e.message)}n.removeEventListener("error",this.e.onSourceBufferError),n.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){u.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.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 r=!1;if(u.v(this.TAG,"Received Initialization Segment, mimeType: "+n),this._lastInitSegments[i.type]=i,n!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])u.v(this.TAG,`Notice: ${i.type} mimeType changed, origin: ${this._mimeTypes[i.type]}, target: ${n}`);else{r=!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(e){return u.e(this.TAG,e.message),void this._emitter.emit(se.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[i.type]=n}t||this._pendingSegments[i.type].push(i),r||this._sourceBuffers[i.type]&&!this._sourceBuffers[i.type].updating&&this._doAppendSegments(),A.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 e in this._sourceBuffers){if(!this._sourceBuffers[e])continue;let t=this._sourceBuffers[e];if("open"===this._mediaSource.readyState)try{t.abort()}catch(e){u.e(this.TAG,e.message)}this._idrList.clear();let i=this._pendingSegments[e];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(let i=0;i<t.buffered.length;i++){let n=t.buffered.start(i),r=t.buffered.end(i);this._pendingRemoveRanges[e].push({start:n,end:r})}if(t.updating||this._doRemoveRanges(),A.safari){let i=this._lastInitSegments[e];i&&(this._pendingSegments[e].push(i),t.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,r=!1;for(let i=0;i<n.length;i++){let s=n.start(i),a=n.end(i);if(s<=e&&e<a+3){if(e-s>=this._config.autoCleanupMaxBackwardDuration){r=!0;let i=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:s,end:i})}}else a<e&&(r=!0,this._pendingRemoveRanges[t].push({start:s,end:a}))}r&&!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)&&(u.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];for(;i.length&&!t.updating;){let e=i.shift();t.remove(e.start,e.end)}}}_doAppendSegments(){let e=this._pendingSegments;for(let t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){let i=e[t].shift();if(i.timestampOffset){let e=this._sourceBuffers[t].timestampOffset,n=i.timestampOffset/1e3;Math.abs(e-n)>.1&&(u.v(this.TAG,`Update MPEG audio timestampOffset from ${e} to ${n}`),this._sourceBuffers[t].timestampOffset=n),delete i.timestampOffset}if(!i.data||0===i.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(i.data),this._isBufferFull=!1,"video"===t&&i.hasOwnProperty("info")&&this._idrList.appendArray(i.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(i),22===e.code?(this._isBufferFull||this._emitter.emit(se.BUFFER_FULL),this._isBufferFull=!0):(u.e(this.TAG,e.message),this._emitter.emit(se.ERROR,{code:e.code,msg:e.message}))}}}_onSourceOpen(){if(u.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let e=this._pendingSourceBufferInit;for(;e.length;){let t=e.shift();this.appendInitSegment(t,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(se.SOURCE_OPEN)}_onSourceEnded(){u.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){u.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(se.UPDATE_END)}_onSourceBufferError(e){u.e(this.TAG,"SourceBuffer Error: "+e)}};const oe={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},le={NETWORK_EXCEPTION:g.EXCEPTION,NETWORK_STATUS_CODE_INVALID:g.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:g.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:g.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:W.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:W.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:W.CODEC_UNSUPPORTED};var he=class{constructor(e,t){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new l.a,this._config=L(),"object"==typeof t&&Object.assign(this._config,t),"flv"!==e.type.toLowerCase())throw new _("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=A.chrome&&(A.version.major<50||50===A.version.major&&A.version.build<2661);this._alwaysSeekKeyframe=!!(i||A.msedge||A.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===C.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then(()=>{this._emitter.emit(C.MEDIA_INFO,this.mediaInfo)}):e===C.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then(()=>{this._emitter.emit(C.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 ae(this._config),this._msectl.on(se.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(se.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(se.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(se.ERROR,e=>{this._emitter.emit(C.ERROR,oe.MEDIA_ERROR,le.MEDIA_MSE_ERROR,e)}),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}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 f("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new f("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 re(this._mediaDataSource,this._config),this._transmuxer.on(te.INIT_SEGMENT,(e,t)=>{this._msectl.appendInitSegment(t)}),this._transmuxer.on(te.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&&(u.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(te.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(C.LOADING_COMPLETE)}),this._transmuxer.on(te.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(C.RECOVERED_EARLY_EOF)}),this._transmuxer.on(te.IO_ERROR,(e,t)=>{this._emitter.emit(C.ERROR,oe.NETWORK_ERROR,e,t)}),this._transmuxer.on(te.DEMUX_ERROR,(e,t)=>{this._emitter.emit(C.ERROR,oe.MEDIA_ERROR,e,{code:-1,msg:t})}),this._transmuxer.on(te.MEDIA_INFO,e=>{this._mediaInfo=e,this._emitter.emit(C.MEDIA_INFO,Object.assign({},e))}),this._transmuxer.on(te.METADATA_ARRIVED,e=>{this._emitter.emit(C.METADATA_ARRIVED,e)}),this._transmuxer.on(te.SCRIPTDATA_ARRIVED,e=>{this._emitter.emit(C.SCRIPTDATA_ARRIVED,e)}),this._transmuxer.on(te.STATISTICS_INFO,e=>{this._statisticsInfo=this._fillStatisticsInfo(e),this._emitter.emit(C.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(te.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 null!=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 r=0;r<e.length;r++){let s=e.start(r),a=e.end(r);if(s<=t&&t<a){i=s,n=a;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(u.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){u.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 r=t.start(n),s=t.end(n);if(e>=r&&e<s){e>=s-this._config.lazyLoadRecoverDuration&&(i=!0);break}}i&&(window.clearInterval(this._progressChecker),this._progressChecker=null,i&&(u.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),r=t.end(i);if(e>=n&&e<r)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||A.safari)&&(i=!0,n=A.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)&&(u.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||A.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=A.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 ue=class{constructor(e,t){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new l.a,this._config=L(),"object"==typeof t&&Object.assign(this._config,t),"flv"===e.type.toLowerCase())throw new _("NativePlayer does't support flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new _(`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===C.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(()=>{this._emitter.emit(C.MEDIA_INFO,this.mediaInfo)}):e===C.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(()=>{this._emitter.emit(C.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(e){}}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 f("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={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}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 null!=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(C.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(C.STATISTICS_INFO,this.statisticsInfo)}};a.install();let de={createPlayer:function(e,t){let i=e;if(null==i||"object"!=typeof i)throw new _("MediaDataSource must be an javascript object!");if(!i.hasOwnProperty("type"))throw new _("MediaDataSource must has type field to indicate video file type!");switch(i.type){case"flv":return new he(i,t);default:return new ue(i,t)}},isSupported:function(){return O.supportMSEH264Playback()},getFeatureList:function(){return O.getFeatureList()}};de.BaseLoader=y,de.LoaderStatus=p,de.LoaderErrors=g,de.Events=C,de.ErrorTypes=oe,de.ErrorDetails=le,de.FlvPlayer=he,de.NativePlayer=ue,de.LoggingControl=x,Object.defineProperty(de,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var ce=de,fe=i(2),_e=i.n(fe),me=i(5),pe={insert:"head",singleton:!1};_e()(me.a,pe),me.a.locals;function ge(e){return(ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=be(e);if(t){var r=be(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Se(this,i)}}function Se(e,t){return!t||"object"!==ge(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function be(e){return(be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(a,e);var t,i,n,s=Ae(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this,e)).state={vidoeUrl:"",id:(new Date).getTime()+Math.floor(9999*Math.random())+1},t}return t=a,n=[{key:"getDerivedStateFromProps",value:function(e){var t=e.vidoeUrl;return t?{vidoeUrl:t}:null}}],(i=[{key:"componentDidUpdate",value:function(){this.state.vidoeUrl&&this.startFlv()}},{key:"componentDidMount",value:function(){this.state.vidoeUrl&&this.startFlv()}},{key:"startFlv",value:function(){var e=this.state,t=e.vidoeUrl,i=e.id;if(ce.isSupported()){var n=document.getElementById(i);this.flvPlayer&&this.destroyFlv(),this.flvPlayer=ce.createPlayer({type:"flv",isLive:!0,hasAudio:!1,url:t},{enableStashBuffer:!0,stashInitialSize:128}),this.flvPlayer.attachMediaElement(n),this.flvPlayer.load(),this.flvPlayer.play()}else alert("请更换浏览器,该浏览器暂不支持。")}},{key:"destroyFlv",value:function(){this.flvPlayer.pause(),this.flvPlayer.unload(),this.flvPlayer.detachMediaElement(),this.flvPlayer.destroy(),this.flvPlayer=null}},{key:"render",value:function(){return r.a.createElement("div",{className:"flvWai"},r.a.createElement("video",{id:this.state.id,className:"videoFlv",autoPlay:!0,controls:!0,muted:!0}))}}])&&ye(t.prototype,i),n&&ye(t,n),a}(n.Component),we=i(4),Re=i(6),ke={insert:"head",singleton:!1};_e()(Re.a,ke),Re.a.locals;function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=Ce(e);if(t){var r=Ce(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Oe(this,i)}}function Oe(e,t){return!t||"object"!==De(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Le(e,t)}(a,e);var t,i,n,s=Me(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=s.call(this)).state={showDateTime:"",classInfo:""},e}return t=a,n=[{key:"getDerivedStateFromProps",value:function(e,t){var i=e.className;return i!==t.className?{classInfo:i}:null}}],(i=[{key:"forShowDateTime",value:function(){var e=this.props.type,t=void 0===e?"YYYY-MM-DD HH:mm:ss":e;this.setState({showDateTime:Object(we.a)().format(t)})}},{key:"componentDidMount",value:function(){var e=this;this.forShowDateTime(),this.timer=setInterval((function(){e.forShowDateTime()}),1e3)}},{key:"render",value:function(){var e=this.state,t=e.classInfo,i=e.showDateTime;return r.a.createElement("div",{className:"timerComCss"},r.a.createElement("p",{className:t},i))}}])&&Te(t.prototype,i),n&&Te(t,n),a}(n.Component),xe=i(7),Ue={insert:"head",singleton:!1};_e()(xe.a,Ue),xe.a.locals;function Pe(e){return(Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Be(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=Ye(e);if(t){var r=Ye(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Ve(this,i)}}function Ve(e,t){return!t||"object"!==Pe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ne(e,t)}(o,e);var t,n,s,a=Fe(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=a.call(this)).state={imgUrl:"",httpImg:"",base64Url:""},e}return t=o,s=[{key:"getDerivedStateFromProps",value:function(e,t){var i=e.httpImg,n=e.imgUrl;return i&&i!==t.httpImg?{httpImg:i,imgUrl:n}:n!==t.imgUrl?{imgUrl:n}:null}}],(n=[{key:"shouldComponentUpdate",value:function(e){return this.props.imgUrl!==e.imgUrl?(this.count=0,this.getImage(e.imgUrl),!0):0===this.count&&(this.count++,!0)}},{key:"componentDidMount",value:function(){this.count=0,this.state.httpImg&&this.getImage(this.props.imgUrl)}},{key:"getImage",value:function(e){var t=this,n=this.state.httpImg,r=new XMLHttpRequest;r.open("POST",n),r.setRequestHeader("Content-Type","application/json");var s={reqInfo:{imgPath:e},request:"getImgDataByPath"};r.send(JSON.stringify(s)),r.onreadystatechange=function(){if(4===r.readyState&&(200===r.status||304===r.status)){var e=JSON.parse(r.responseText);0===e.status?t.setImgUrl("data:image/png;base64,"+e.resInfo.imgData):t.setImgUrl(i(18))}}}},{key:"setImgUrl",value:function(e){this.setState({base64Url:e})}},{key:"render",value:function(){var e=this.state.base64Url;return r.a.createElement("img",{src:e,alt:""})}}])&&Be(t.prototype,n),s&&Be(t,s),o}(n.Component);function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function We(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ge(e,t){return(Ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=Ke(e);if(t){var r=Ke(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return He(this,i)}}function He(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ke(e){return(Ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ge(e,t)}(a,e);var t,i,n,s=ze(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=s.call(this)).state={id:(new Date).getTime()+Math.floor(9999*Math.random())+1,mode:"",width:"100px",height:"100px",circleRadius:5,circleBorderWidth:2,circleBorderColor:"#28B1D9",circleInColor:"#28B1D9",circleSelectColor:"#FFF",lineColor:"#28B1D9",lineWidth:2,areaColor:"rgba(40, 177, 217, 0.2)",disabled:"false",title:"",titleColor:"#000",titleFont:"14px bold 黑体",titleLineHeight:"",position:[10,10],serviceData:[]},e}return t=a,n=[{key:"getDerivedStateFromProps",value:function(e,t){var i={};for(var n in e)e[n]&&e[n]!==t[n]&&(i[n]=e[n]);return Object.keys(i).length>0?i:null}}],(i=[{key:"shouldComponentUpdate",value:function(e){return this.props.serviceData.length!==e.serviceData}},{key:"componentDidMount",value:function(){var e=this;this.init(),window.addEventListener("resize",(function(){e.init()}))}},{key:"init",value:function(){this.setCanvasSize()}},{key:"setCanvasSize",value:function(){var e=this.state.id,t=document.getElementById(e).parentNode,i=t.offsetWidth,n=t.offsetHeight;this.setData({width:i+"px",height:n+"px"})}},{key:"draw",value:function(){var e=this.state,t=e.id,i=e.serviceData,n=e.width,r=e.height,s=e.mode,a=e.disabled,o=document.getElementById(t).getContext("2d");o.clearRect(0,0,parseFloat(n),parseFloat(r)),this.drawLine(o,i),this.drawCircleAll(o,i),this.drawWriting(o,i),"false"===a&&("click"===s?this.isontouchend()?this.touchMove():this.clickMove():this.isontouchend()?this.touchMove():this.mouseMove())}},{key:"isontouchend",value:function(){return"ontouchend"in document}},{key:"drawCircleAll",value:function(e,t){for(var i=0;i<t.length;i++)this.drawCircle(e,t[i][0],t[i][1],this.selectedIndex===i)}},{key:"drawCircle",value:function(e,t,i,n){var r=this.state,s=r.circleRadius,a=r.circleInColor,o=r.circleBorderColor,l=r.circleBorderWidth,h=r.circleSelectColor;e.fillStyle=n?h:a,e.beginPath(),e.arc(t,i,parseInt(s),0,2*Math.PI,!0),e.closePath(),e.fill(),e.beginPath(),e.arc(t,i,parseInt(s),0,2*Math.PI,!0),e.lineWidth=parseInt(l),e.strokeStyle=o,e.stroke(),e.closePath()}},{key:"drawLine",value:function(e,t){var i=this.state,n=i.lineColor,r=i.lineWidth,s=i.areaColor;e.beginPath();for(var a=0;a<t.length;a++)0===a?e.moveTo(t[a][0],t[a][1]):e.lineTo(t[a][0],t[a][1]);e.lineWidth=parseInt(r),e.strokeStyle=n,e.closePath(),e.fillStyle=s,e.fill(),e.stroke()}},{key:"drawWriting",value:function(e,t){var i=this.state,n=i.title,r=i.titleColor,s=i.titleFont,a=i.titleLineHeight,o=i.position;e.font=s||"18px bold 黑体",e.fillStyle=r||"#fff",e.lineHeight=a||s.split(" ")[0],e.textBaseline="middle";for(var l=parseInt(a||s.split(" ")[0]),h=0,u=99999999,d=0;d<t.length;d++)parseFloat(t[d][0])>h&&(h=t[d][0]),parseFloat(t[d][1])<u&&(u=t[d][1]);n.split(/\n/).forEach((function(t,i){e.fillText(t,h+(o[0]||15),u+(o[1]||15)+i*l)}))}},{key:"clickMove",value:function(){var e=this,t=this.state,i=t.id,n=t.serviceData,r=t.disabled;document.getElementById(i).onclick=function(t){var i=t.layerX,s=t.layerY;e.selectedIndex||0===e.selectedIndex?(n[e.selectedIndex]=[i,s],e.selectedIndex=null,e.setData({serviceData:n}),"true"===r&&e.props.change(n)):(e.selectBox(i,s),e.setData({serviceData:n}))}}},{key:"mouseMove",value:function(){var e=this,t=this.state,i=t.id,n=t.serviceData,r=t.disabled,s=document.getElementById(i);s.onmousedown=function(t){var i=t.layerX,r=t.layerY;e.selectBox(i,r)&&(s.onmousemove=function(t){n[e.selectedIndex]=[t.layerX,t.layerY],e.setData({serviceData:n})})},s.onmouseup=function(t){s.onmousemove=null,e.selectedIndex=null,e.setData({serviceData:n});var i=t.layerX,a=t.layerY;e.selectBox(i,a)&&"true"===r&&e.props.change(n)}}},{key:"touchMove",value:function(){var e=this,t=this.state,i=t.id,n=t.serviceData,r=t.disabled,s=document.getElementById(i),a=s.parentNode,o=a.getBoundingClientRect().top,l=a.getBoundingClientRect().left;s.ontouchstart=function(t){var i=t.touches[0].pageX-l,r=t.touches[0].pageY-o;e.selectBox(i,r)&&(s.ontouchmove=function(t){n[e.selectedIndex]=[t.touches[0].pageX-l,t.touches[0].pageY-o],e.setData({serviceData:n})})},s.ontouchend=function(t){e.selectedIndex=null,s.ontouchmove=null,e.setData({serviceData:n});var i=t.changedTouches[0].pageX-l,a=t.changedTouches[0].pageY-o;e.selectBox(i,a)&&"true"===r&&e.props.change(n)}}},{key:"selectBox",value:function(e,t){var i=this.state,n=i.serviceData,r=i.circleRadius+i.circleBorderWidth;this.selectedIndex=null;for(var s=0;s<n.length;s++){var a=n[s][0],o=n[s][1];if((a-e)*(a-e)+(o-t)*(o-t)<r*r)return this.selectedIndex=s,!0}if(s==n.length)return!1}},{key:"setData",value:function(e){var t=this;this.setState(e,(function(){t.draw()}))}},{key:"render",value:function(){var e=this.state,t=e.id,i=e.width,n=e.height;return r.a.createElement("canvas",{style:{position:"absolute"},id:t,width:i,height:n})}}])&&We(t.prototype,i),n&&We(t,n),a}(n.Component),Ze=i(8),Xe={insert:"head",singleton:!1};_e()(Ze.a,Xe),Ze.a.locals;function Je(e){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function et(e,t){return(et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=nt(e);if(t){var r=nt(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return it(this,i)}}function it(e,t){return!t||"object"!==Je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&et(e,t)}(a,e);var t,i,n,s=tt(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this,e)).state={serviceData:[]},t}return t=a,n=[{key:"getDerivedStateFromProps",value:function(e){return null}}],(i=[{key:"componentDidUpdate",value:function(){}},{key:"componentDidMount",value:function(){}},{key:"change",value:function(){}},{key:"render",value:function(){var e=this,t=this.state.serviceData;return r.a.createElement("div",{className:"funAreaSelectCss"},r.a.createElement(Qe,{serviceData:t,change:function(t){return e.change(t)}}))}}])&&$e(t.prototype,i),n&&$e(t,n),a}(n.Component)}])}));
35 34 \ No newline at end of file
  35 + */var n;n=function(){"use strict";function e(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,s=void 0,a=void 0,o=function(e,t){_[r]=e,_[r+1]=t,2===(r+=2)&&(a?a(m):A())},l="undefined"!=typeof window?window:void 0,h=l||{},u=h.MutationObserver||h.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),c="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(m,1)}}var _=new Array(1e3);function m(){for(var e=0;e<r;e+=2)(0,_[e])(_[e+1]),_[e]=void 0,_[e+1]=void 0;r=0}var p,g,y,v,A=void 0;function S(e,t){var i=this,n=new this.constructor(w);void 0===n[E]&&x(n);var r=i._state;if(r){var s=arguments[r-1];o((function(){return C(r,n,s,i._result)}))}else M(i,n,e,t);return n}function b(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(w);return k(t,e),t}d?A=function(){return t.nextTick(m)}:u?(g=0,y=new u(m),v=document.createTextNode(""),y.observe(v,{characterData:!0}),A=function(){v.data=g=++g%2}):c?((p=new MessageChannel).port1.onmessage=m,A=function(){return p.port2.postMessage(0)}):A=void 0===l?function(){try{var e=Function("return this")().require("vertx");return void 0!==(s=e.runOnLoop||e.runOnContext)?function(){s(m)}:f()}catch(e){return f()}}():f();var E=Math.random().toString(36).substring(2);function w(){}function R(t,i,n){i.constructor===t.constructor&&n===S&&i.constructor.resolve===b?function(e,t){1===t._state?T(e,t._result):2===t._state?L(e,t._result):M(t,void 0,(function(t){return k(e,t)}),(function(t){return L(e,t)}))}(t,i):void 0===n?T(t,i):e(n)?function(e,t,i){o((function(e){var n=!1,r=function(e,t,i,n){try{e.call(t,i,n)}catch(e){return e}}(i,t,(function(i){n||(n=!0,t!==i?k(e,i):T(e,i))}),(function(t){n||(n=!0,L(e,t))}),e._label);!n&&r&&(n=!0,L(e,r))}),e)}(t,i,n):T(t,i)}function k(e,t){if(e===t)L(e,new TypeError("You cannot resolve a promise with itself"));else if(r=typeof(n=t),null===n||"object"!==r&&"function"!==r)T(e,t);else{var i=void 0;try{i=t.then}catch(t){return void L(e,t)}R(e,t,i)}var n,r}function D(e){e._onerror&&e._onerror(e._result),O(e)}function T(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&o(O,e))}function L(e,t){void 0===e._state&&(e._state=2,e._result=t,o(D,e))}function M(e,t,i,n){var r=e._subscribers,s=r.length;e._onerror=null,r[s]=t,r[s+1]=i,r[s+2]=n,0===s&&e._state&&o(O,e)}function O(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n=void 0,r=void 0,s=e._result,a=0;a<t.length;a+=3)n=t[a],r=t[a+i],n?C(i,n,r,s):r(s);e._subscribers.length=0}}function C(t,i,n,r){var s=e(n),a=void 0,o=void 0,l=!0;if(s){try{a=n(r)}catch(e){l=!1,o=e}if(i===a)return void L(i,new TypeError("A promises callback cannot return that same promise."))}else a=r;void 0!==i._state||(s&&l?k(i,a):!1===l?L(i,o):1===t?T(i,a):2===t&&L(i,a))}var I=0;function x(e){e[E]=I++,e._state=void 0,e._result=void 0,e._subscribers=[]}var U=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(w),this.promise[E]||x(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?T(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&T(this.promise,this._result))):L(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,n=i.resolve;if(n===b){var r=void 0,s=void 0,a=!1;try{r=e.then}catch(e){a=!0,s=e}if(r===S&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(i===P){var o=new i(w);a?L(o,s):R(o,e,r),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;void 0===n._state&&(this._remaining--,2===e?L(n,i):this._result[t]=i),0===this._remaining&&T(n,this._result)},e.prototype._willSettleAt=function(e,t){var i=this;M(e,void 0,(function(e){return i._settledAt(1,t,e)}),(function(e){return i._settledAt(2,t,e)}))},e}(),P=function(){function t(e){this[E]=I++,this._result=this._state=void 0,this._subscribers=[],w!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){k(e,t)}),(function(t){L(e,t)}))}catch(t){L(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var i=this.constructor;return e(t)?this.then((function(e){return i.resolve(t()).then((function(){return e}))}),(function(e){return i.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return P.prototype.then=S,P.all=function(e){return new U(this,e).promise},P.race=function(e){var t=this;return n(e)?new t((function(i,n){for(var r=e.length,s=0;s<r;s++)t.resolve(e[s]).then(i,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},P.resolve=b,P.reject=function(e){var t=new this(w);return L(t,e),t},P._setScheduler=function(e){a=e},P._setAsap=function(e){o=e},P._asap=o,P.polyfill=function(){var e=void 0;if(void 0!==i)e=i;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){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(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=P},P.Promise=P,P},e.exports=n()}).call(this,i(12),i(13))},function(e,t){var i,n,r=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(i===setTimeout)return setTimeout(e,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(e){i=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l,h=[],u=!1,d=-1;function c(){u&&l&&(u=!1,l.length?h=l.concat(h):d=-1,h.length&&f())}function f(){if(!u){var e=o(c);u=!0;for(var t=h.length;t;){for(l=h,h=[];++d<t;)l&&l[d].run();d=-1,t=h.length}l=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function _(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];h.push(new _(e,t)),1!==h.length||u||o(f)},_.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t){var i=arguments[3],n=arguments[4],r=arguments[5],s=JSON.stringify;e.exports=function(e,t){for(var a,o=Object.keys(r),l=0,h=o.length;l<h;l++){var u=o[l],d=r[u].exports;if(d===e||d&&d.default===e){a=u;break}}if(!a){a=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var c={};for(l=0,h=o.length;l<h;l++){c[u=o[l]]=u}n[a]=["function(require,module,exports){"+e+"(self); }",c]}var f=Math.floor(Math.pow(16,8)*Math.random()).toString(16),_={};_[a]=a,n[f]=["function(require,module,exports){var f = require("+s(a)+");(f.default ? f.default : f)(self);}",_];var m={};!function e(t){for(var i in m[t]=!0,n[t][1]){var r=n[t][1][i];m[r]||e(r)}}(f);var p="("+i+")({"+Object.keys(m).map((function(e){return s(e)+":["+n[e][0]+","+s(n[e][1])+"]"})).join(",")+"},{},["+s(f)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([p],{type:"text/javascript"});if(t&&t.bare)return y;var v=g.createObjectURL(y),A=new Worker(v);return A.objectURL=v,A}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,i){var n={"./zh-cn":8,"./zh-cn.js":8};function r(e){var t=s(e);return i(t)}function s(e){if(!i.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}r.keys=function(){return Object.keys(n)},r.resolve=s,e.exports=r,r.id=16},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVQAAAFUCAYAAAB7ksS1AAAgAElEQVR4Xu2debgcVZn/37e6yU3EAQeNC2JQEDdUFFEgkO461fcSjOJucFBn3J0R/TmgjqOjP+PoqM+oMD8VZ9TBbcQliI6gmYTcrlP3goCKOi4gyCYIkV1ZI0l3vb/nhEIDZOnlnHqru7/1PDz5g3Pe5Xve+txTXafOYcIFBaAAFIACXhRgL1ZgBApAASgABQhARRFAASgABTwpAKB6EhJmoAAUgAIAKmoACkABKOBJAQDVk5AwAwWgABQAUFEDUAAKQAFPCgConoSEGSgABaAAgIoagAJQAAp4UgBA9SQkzEABKAAFAFTUABSAAlDAkwIAqichYQYKQAEoAKCiBqAAFIACnhQAUD0JCTNQAApAAQAVNQAFoAAU8KQAgOpJSJiBAlAACgCoqAEoAAWggCcFAFRPQsIMFIACUABARQ1AASgABTwpAKB6EhJmoAAUgAIAKmoACkABKOBJAQDVk5AwAwWgABQAUFEDUAAKQAFPCgConoSEGSgABaAAgIoagAJQAAp4UgBA9SQkzEABKAAFAFTUABSAAlDAkwIAqichYQYKQAEoAKCiBqAAFIACnhQAUD0JCTNQAApAAQAVNQAFoAAU8KQAgOpJSJiBAlAACgCoqAEoAAWggCcFAFRPQsIMFIACUABARQ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.d(t,"Timer",(function(){return Ie})),i.d(t,"ImgCom",(function(){return qe})),i.d(t,"AreaSelete",(function(){return Qe})),i.d(t,"FunAreaSelect",(function(){return it})),i.d(t,"FunAreaSelectPlus",(function(){return ht}));var n=i(0),r=i.n(n);class s{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");let t=Object(e);for(let e=1;e<arguments.length;e++){let i=arguments[e];if(null!=i)for(let e in i)i.hasOwnProperty(e)&&(t[e]=i[e])}return t},"function"!=typeof self.Promise&&i(11).polyfill()}}s.install();var a=s,o=i(1),l=i.n(o);class h{static e(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","error",i),h.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}static i(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","info",i),h.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}static w(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","warn",i),h.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}static d(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","debug",i),h.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}static v(e,t){e&&!h.FORCE_GLOBAL_TAG||(e=h.GLOBAL_TAG);let i=`[${e}] > ${t}`;h.ENABLE_CALLBACK&&h.emitter.emit("log","verbose",i),h.ENABLE_VERBOSE&&console.log(i)}}h.GLOBAL_TAG="flv.js",h.FORCE_GLOBAL_TAG=!1,h.ENABLE_ERROR=!0,h.ENABLE_INFO=!0,h.ENABLE_WARN=!0,h.ENABLE_DEBUG=!0,h.ENABLE_VERBOSE=!0,h.ENABLE_CALLBACK=!1,h.emitter=new l.a;var u=h;var d=class{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}};class c{constructor(e){this._message=e}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class f extends c{constructor(e){super(e)}get name(){return"IllegalStateException"}}class _ extends c{constructor(e){super(e)}get name(){return"InvalidArgumentException"}}class m extends c{constructor(e){super(e)}get name(){return"NotImplementedException"}}const p={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},g={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class y{constructor(e){this._type=e||"undefined",this._status=p.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=p.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===p.kConnecting||this._status===p.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 m("Unimplemented abstract function!")}abort(){throw new m("Unimplemented abstract function!")}}let v={};!function(){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]||""},r={};if(n.browser){r[n.browser]=!0;let e=n.majorVersion.split(".");r.version={major:parseInt(n.majorVersion,10),string:n.version},e.length>1&&(r.version.minor=parseInt(e[1],10)),e.length>2&&(r.version.build=parseInt(e[2],10))}if(n.platform&&(r[n.platform]=!0),(r.chrome||r.opr||r.safari)&&(r.webkit=!0),r.rv||r.iemobile){r.rv&&delete r.rv;let e="msie";n.browser=e,r[e]=!0}if(r.edge){delete r.edge;let e="msedge";n.browser=e,r[e]=!0}if(r.opr){let e="opera";n.browser=e,r[e]=!0}if(r.safari&&r.android){let e="android";n.browser=e,r[e]=!0}r.name=n.browser,r.platform=n.platform;for(let e in v)v.hasOwnProperty(e)&&delete v[e];Object.assign(v,r)}();var A=v;var S=class extends y{static isSupported(){try{let e=A.msedge&&A.version.minor>=15048,t=!A.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&&null!=e.redirectedURL&&(i=e.redirectedURL);let n=this._seekHandler.getConfig(i,t),r=new self.Headers;if("object"==typeof n.headers){let e=n.headers;for(let t in e)e.hasOwnProperty(t)&&r.append(t,e[t])}let s={method:"GET",headers:r,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(let e in this._config.headers)r.append(e,this._config.headers[e]);!1===e.cors&&(s.mode="same-origin"),e.withCredentials&&(s.credentials="include"),e.referrerPolicy&&(s.referrerPolicy=e.referrerPolicy),this._status=p.kConnecting,self.fetch(n.url,s).then(e=>{if(this._requestAbort)return this._requestAbort=!1,void(this._status=p.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=p.kError,!this._onError)throw new c("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(g.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(e=>{if(this._status=p.kError,!this._onError)throw e;this._onError(g.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=p.kError;let e=g.EARLY_EOF,t={code:-1,msg:"Fetch stream meet Early-EOF"};if(!this._onError)throw new c(t.msg);this._onError(e,t)}else this._status=p.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=p.kComplete,e.cancel();this._status=p.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&&A.msedge)return;this._status=p.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=g.EXCEPTION,i={code:e.code,msg:e.message}):(t=g.EARLY_EOF,i={code:e.code,msg:"Fetch stream meet Early-EOF"}),!this._onError)throw new c(i.msg);this._onError(t,i)})}};var b=class extends y{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 u.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&&null!=e.redirectedURL&&(i=e.redirectedURL);let n=this._seekHandler.getConfig(i,t);this._requestURL=n.url;let r=this._xhr=new XMLHttpRequest;if(r.open("GET",n.url,!0),r.responseType="moz-chunked-arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onloadend=this._onLoadEnd.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"==typeof n.headers){let e=n.headers;for(let t in e)e.hasOwnProperty(t)&&r.setRequestHeader(t,e[t])}if("object"==typeof this._config.headers){let e=this._config.headers;for(let t in e)e.hasOwnProperty(t)&&r.setRequestHeader(t,e[t])}this._status=p.kConnecting,r.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=p.kComplete}_onReadyStateChange(e){let t=e.target;if(2===t.readyState){if(null!=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=p.kError,!this._onError)throw new c("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(g.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=p.kBuffering}}_onProgress(e){if(this._status===p.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!==p.kError&&(this._status=p.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}_onXhrError(e){this._status=p.kError;let t=0,i=null;if(this._contentLength&&e.loaded<this._contentLength?(t=g.EARLY_EOF,i={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=g.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new c(i.msg);this._onError(t,i)}};var E=class extends y{static isSupported(){try{let e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return u.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 d,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=p.kConnecting;let i=!1;null!=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&&(null!=this._currentRedirectedURL?i=this._currentRedirectedURL:null!=e.redirectedURL&&(i=e.redirectedURL));let n=this._seekHandler.getConfig(i,t);this._currentRequestURL=n.url;let r=this._xhr=new XMLHttpRequest;if(r.open("GET",n.url,!0),r.responseType="arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onload=this._onLoad.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"==typeof n.headers){let e=n.headers;for(let t in e)e.hasOwnProperty(t)&&r.setRequestHeader(t,e[t])}if("object"==typeof this._config.headers){let e=this._config.headers;for(let t in e)e.hasOwnProperty(t)&&r.setRequestHeader(t,e[t])}r.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=p.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(null!=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=p.kBuffering}else{if(this._status=p.kError,!this._onError)throw new c("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(g.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}_onProgress(e){if(this._status===p.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,r=0,s=i;if(e<t[0])return t[0];for(;r<=s;){if(n=r+Math.floor((s-r)/2),n===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?r=n+1:s=n-1}}_onLoad(e){if(this._status===p.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 r=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():r=!0,this._onDataArrival&&this._onDataArrival(i,n,this._receivedLength),r&&(this._status=p.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(e){this._status=p.kError;let t=0,i=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=g.EARLY_EOF,i={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=g.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new c(i.msg);this._onError(t,i)}};var w=class extends y{static isSupported(){try{return void 0!==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=p.kConnecting}catch(e){this._status=p.kError;let t={code:e.code,msg:e.message};if(!this._onError)throw new c(t.msg);this._onError(g.EXCEPTION,t)}}abort(){let e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=p.kComplete}_onWebSocketOpen(e){this._status=p.kBuffering}_onWebSocketClose(e){!0!==this._requestAbort?(this._status=p.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=p.kError;let t={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new c(t.msg);this._onError(g.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=p.kError;let t={code:e.code,msg:e.message};if(!this._onError)throw new c(t.msg);this._onError(g.EXCEPTION,t)}};var R=class{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 k=class{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 r="";if(null!=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&&(r+="&"),r+=e[t])}}return 0===r.length?t:t+"?"+r}};var D=class{constructor(e,t,i){this.TAG="IOController",this._config=t,this._extraData=i,this._stashInitialSize=393216,null!=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 d,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||null!=this._dataSource.redirectedURL}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===E?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let e=this._config;if("range"===e.seekType)this._seekHandler=new R(this._config.rangeLoadZeroStart);else if("param"===e.seekType){let t=e.seekParamStart||"bstart",i=e.seekParamEnd||"bend";this._seekHandler=new k(t,i)}else{if("custom"!==e.seekType)throw new _("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new _("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=w;else if(S.isSupported())this._loaderClass=S;else if(b.isSupported())this._loaderClass=b;else{if(!E.isSupported())throw new c("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=E}}_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 _("Url must be a non-empty string!");this._dataSource.url=e}_expandBuffer(e){let t=this._stashSize;for(;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);new Uint8Array(i,0,t).set(e,0)}this._stashBuffer=i,this._bufferSize=t}_normalizeSpeed(e){let t=this._speedNormalizeList,i=t.length-1,n=0,r=0,s=i;if(e<t[0])return t[0];for(;r<=s;){if(n=r+Math.floor((s-r)/2),n===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?r=n+1:s=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 f("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){new Uint8Array(this._stashBuffer,0,this._stashSize).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 r=e.byteLength-n;r>this._bufferSize&&(this._expandBuffer(r),i=new Uint8Array(this._stashBuffer,0,this._bufferSize)),i.set(new Uint8Array(e,n),0),this._stashUsed+=r,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),new Uint8Array(this._stashBuffer,0,this._bufferSize).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}u.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(u.e(this.TAG,`Loader error, code = ${t.code}, msg = ${t.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=g.UNRECOVERABLE_EARLY_EOF),e){case g.EARLY_EOF:if(!this._config.isLive&&this._totalLength){let e=this._currentRange.to+1;return void(e<this._totalLength&&(u.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(e,!1)))}e=g.UNRECOVERABLE_EARLY_EOF}if(!this._onError)throw new c("IOException: "+t.msg);this._onError(e,t)}};const T={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 L(){return Object.assign({},T)}class M{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let e=new D({},L()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}static getNetworkLoaderTypeName(){let e=new D({},L()),t=e.loaderType;return e.destroy(),t}static supportNativeMediaPlayback(e){null==M.videoElement&&(M.videoElement=window.document.createElement("video"));let t=M.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=M.supportMSEH264Playback(),e.networkStreamIO=M.supportNetworkStreamIO(),e.networkLoaderName=M.getNetworkLoaderTypeName(),e.mseLiveFlvPlayback=e.mseFlvPlayback&&e.networkStreamIO,e.nativeMP4H264Playback=M.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),e.nativeWebmVP8Playback=M.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),e.nativeWebmVP9Playback=M.supportNativeMediaPlayback('video/webm; codecs="vp9"'),e}}var O=M;var C={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"};class I{static get forceGlobalTag(){return u.FORCE_GLOBAL_TAG}static set forceGlobalTag(e){u.FORCE_GLOBAL_TAG=e,I._notifyChange()}static get globalTag(){return u.GLOBAL_TAG}static set globalTag(e){u.GLOBAL_TAG=e,I._notifyChange()}static get enableAll(){return u.ENABLE_VERBOSE&&u.ENABLE_DEBUG&&u.ENABLE_INFO&&u.ENABLE_WARN&&u.ENABLE_ERROR}static set enableAll(e){u.ENABLE_VERBOSE=e,u.ENABLE_DEBUG=e,u.ENABLE_INFO=e,u.ENABLE_WARN=e,u.ENABLE_ERROR=e,I._notifyChange()}static get enableDebug(){return u.ENABLE_DEBUG}static set enableDebug(e){u.ENABLE_DEBUG=e,I._notifyChange()}static get enableVerbose(){return u.ENABLE_VERBOSE}static set enableVerbose(e){u.ENABLE_VERBOSE=e,I._notifyChange()}static get enableInfo(){return u.ENABLE_INFO}static set enableInfo(e){u.ENABLE_INFO=e,I._notifyChange()}static get enableWarn(){return u.ENABLE_WARN}static set enableWarn(e){u.ENABLE_WARN=e,I._notifyChange()}static get enableError(){return u.ENABLE_ERROR}static set enableError(e){u.ENABLE_ERROR=e,I._notifyChange()}static getConfig(){return{globalTag:u.GLOBAL_TAG,forceGlobalTag:u.FORCE_GLOBAL_TAG,enableVerbose:u.ENABLE_VERBOSE,enableDebug:u.ENABLE_DEBUG,enableInfo:u.ENABLE_INFO,enableWarn:u.ENABLE_WARN,enableError:u.ENABLE_ERROR,enableCallback:u.ENABLE_CALLBACK}}static applyConfig(e){u.GLOBAL_TAG=e.globalTag,u.FORCE_GLOBAL_TAG=e.forceGlobalTag,u.ENABLE_VERBOSE=e.enableVerbose,u.ENABLE_DEBUG=e.enableDebug,u.ENABLE_INFO=e.enableInfo,u.ENABLE_WARN=e.enableWarn,u.ENABLE_ERROR=e.enableError,u.ENABLE_CALLBACK=e.enableCallback}static _notifyChange(){let e=I.emitter;if(e.listenerCount("change")>0){let t=I.getConfig();e.emit("change",t)}}static registerListener(e){I.emitter.addListener("change",e)}static removeListener(e){I.emitter.removeListener("change",e)}static addLogListener(e){u.emitter.addListener("log",e),u.emitter.listenerCount("log")>0&&(u.ENABLE_CALLBACK=!0,I._notifyChange())}static removeLogListener(e){u.emitter.removeListener("log",e),0===u.emitter.listenerCount("log")&&(u.ENABLE_CALLBACK=!1,I._notifyChange())}}I.emitter=new l.a;var x=I;var U=class{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,r=0,s=0,a=n;for(t<e[0]&&(i=0,s=a+1);s<=a;){if(r=s+Math.floor((a-s)/2),r===n||t>=e[r]&&t<e[r+1]){i=r;break}e[r]<t?s=r+1:a=r-1}return i}};function P(e,t,i){let n=e;if(t+i<n.length){for(;i--;)if(128!=(192&n[++t]))return!1;return!0}return!1}var B=function(e){let t=[],i=e,n=0,r=e.length;for(;n<r;)if(i[n]<128)t.push(String.fromCharCode(i[n])),++n;else{if(i[n]<192);else if(i[n]<224){if(P(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(P(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&&P(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("")};let N=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();class F{static parseScriptData(e,t,i){let n={};try{let r=F.parseValue(e,t,i),s=F.parseValue(e,t+r.size,i-r.size);n[r.data]=s.data}catch(e){u.e("AMF",e.toString())}return n}static parseObject(e,t,i){if(i<3)throw new f("Data not enough when parse ScriptDataObject");let n=F.parseString(e,t,i),r=F.parseValue(e,t+n.size,i-n.size),s=r.objectEnd;return{data:{name:n.data,value:r.data},size:n.size+r.size,objectEnd:s}}static parseVariable(e,t,i){return F.parseObject(e,t,i)}static parseString(e,t,i){if(i<2)throw new f("Data not enough when parse String");let n,r=new DataView(e,t,i).getUint16(0,!N);return n=r>0?B(new Uint8Array(e,t+2,r)):"",{data:n,size:2+r}}static parseLongString(e,t,i){if(i<4)throw new f("Data not enough when parse LongString");let n,r=new DataView(e,t,i).getUint32(0,!N);return n=r>0?B(new Uint8Array(e,t+4,r)):"",{data:n,size:4+r}}static parseDate(e,t,i){if(i<10)throw new f("Data size invalid when parse Date");let n=new DataView(e,t,i),r=n.getFloat64(0,!N);return r+=60*n.getInt16(8,!N)*1e3,{data:new Date(r),size:10}}static parseValue(e,t,i){if(i<1)throw new f("Data not enough when parse Value");let n,r=new DataView(e,t,i),s=1,a=r.getUint8(0),o=!1;try{switch(a){case 0:n=r.getFloat64(1,!N),s+=8;break;case 1:n=!!r.getUint8(1),s+=1;break;case 2:{let r=F.parseString(e,t+1,i-1);n=r.data,s+=r.size;break}case 3:{n={};let a=0;for(9==(16777215&r.getUint32(i-4,!N))&&(a=3);s<i-4;){let r=F.parseObject(e,t+s,i-s-a);if(r.objectEnd)break;n[r.data.name]=r.data.value,s+=r.size}if(s<=i-3){9===(16777215&r.getUint32(s-1,!N))&&(s+=3)}break}case 8:{n={},s+=4;let a=0;for(9==(16777215&r.getUint32(i-4,!N))&&(a=3);s<i-8;){let r=F.parseVariable(e,t+s,i-s-a);if(r.objectEnd)break;n[r.data.name]=r.data.value,s+=r.size}if(s<=i-3){9===(16777215&r.getUint32(s-1,!N))&&(s+=3)}break}case 9:n=void 0,s=1,o=!0;break;case 10:{n=[];let a=r.getUint32(1,!N);s+=4;for(let r=0;r<a;r++){let r=F.parseValue(e,t+s,i-s);n.push(r.data),s+=r.size}break}case 11:{let r=F.parseDate(e,t+1,i-1);n=r.data,s+=r.size;break}case 12:{let r=F.parseString(e,t+1,i-1);n=r.data,s+=r.size;break}default:s=i,u.w("AMF","Unsupported AMF value type "+a)}}catch(e){u.e("AMF",e.toString())}return{data:n,size:s,objectEnd:o}}}var V=F;var Y=class{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 f("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 _("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),r=this._current_word>>>32-n;return this._current_word<<=n,this._current_word_bits_left-=n,t=t<<n|r,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)}};class q{static _ebsp2rbsp(e){let t=e,i=t.byteLength,n=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(n[r]=t[e],r++);return new Uint8Array(n.buffer,0,r)}static parseSPS(e){let t=q._ebsp2rbsp(e),i=new Y(t);i.readByte();let n=i.readByte();i.readByte();let r=i.readByte();i.readUEG();let s=q.getProfileString(n),a=q.getLevelString(r),o=1,l=420,h=[0,420,422,444],u=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=h[o]),u=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?q._skipScalingList(i,16):q._skipScalingList(i,64))}i.readUEG();let d=i.readUEG();if(0===d)i.readUEG();else if(1===d){i.readBits(1),i.readSEG(),i.readSEG();let e=i.readUEG();for(let t=0;t<e;t++)i.readSEG()}let c=i.readUEG();i.readBits(1);let f=i.readUEG(),_=i.readUEG(),m=i.readBits(1);0===m&&i.readBits(1),i.readBits(1);let p=0,g=0,y=0,v=0;i.readBool()&&(p=i.readUEG(),g=i.readUEG(),y=i.readUEG(),v=i.readUEG());let A=1,S=1,b=0,E=!0,w=0,R=0;if(i.readBool()){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?(A=t[e-1],S=n[e-1]):255===e&&(A=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);E=i.readBool(),w=t,R=2*e,b=w/R}}let k=1;1===A&&1===S||(k=A/S);let D=0,T=0;if(0===o)D=1,T=2-m;else{D=3===o?1:2,T=(1===o?2:1)*(2-m)}let L=16*(f+1),M=16*(_+1)*(2-m);L-=(p+g)*D,M-=(y+v)*T;let O=Math.ceil(L*k);return i.destroy(),i=null,{profile_string:s,level_string:a,bit_depth:u,ref_frames:c,chroma_format:l,chroma_format_string:q.getChromaFormatString(l),frame_rate:{fixed:E,fps:b,fps_den:R,fps_num:w},sar_ratio:{width:A,height:S},codec_size:{width:L,height:M},present_size:{width:O,height:M}}}static _skipScalingList(e,t){let i=8,n=8,r=0;for(let s=0;s<t;s++)0!==n&&(r=e.readSEG(),n=(i+r+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 j=q;var W={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};class G{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 U,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,r=0!=(1&t[4]),s=(a=t)[o=5]<<24|a[o+1]<<16|a[o+2]<<8|a[o+3];var a,o;return s<9?i:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:n,hasVideoTrack:r}}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 U}_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 f("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let i=0,n=this._littleEndian;if(0===t){if(!(e.byteLength>13))return 0;i=G.probe(e).dataOffset}if(this._firstParse){this._firstParse=!1,t+i!==this._dataOffset&&u.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(e,i).getUint32(0,!n)&&u.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4}for(;i<e.byteLength;){this._dispatch=!0;let r=new DataView(e,i);if(i+11+4>e.byteLength)break;let s=r.getUint8(0),a=16777215&r.getUint32(0,!n);if(i+11+a+4>e.byteLength)break;if(8!==s&&9!==s&&18!==s){u.w(this.TAG,`Unsupported tag type ${s}, skipped`),i+=11+a+4;continue}let o=r.getUint8(4),l=r.getUint8(5),h=r.getUint8(6)|l<<8|o<<16|r.getUint8(7)<<24;0!==(16777215&r.getUint32(7,!n))&&u.w(this.TAG,"Meet tag which has StreamID != 0!");let d=i+11;switch(s){case 8:this._parseAudioData(e,d,a,h);break;case 9:this._parseVideoData(e,d,a,h,t+i);break;case 18:this._parseScriptData(e,d,a)}let c=r.getUint32(11+a,!n);c!==11+a&&u.w(this.TAG,"Invalid PrevTagSize "+c),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=V.parseScriptData(e,t,i);if(n.hasOwnProperty("onMetaData")){if(null==n.onMetaData||"object"!=typeof n.onMetaData)return void u.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&u.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,u.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 r=this._timestampBase+Math.floor(1e3*e.times[n]);t.push(r),i.push(e.filepositions[n])}return{times:t,filepositions:i}}_parseAudioData(e,t,i,n){if(i<=1)return void u.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");if(!0===this._hasAudioFlagOverrided&&!1===this._hasAudio)return;this._littleEndian;let r=new DataView(e,t,i).getUint8(0),s=r>>>4;if(2!==s&&10!==s)return void this._onError(W.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+s);let a=0,o=(12&r)>>>2;if(!(o>=0&&o<=4))return void this._onError(W.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+o);a=this._flvSoundRateTable[o];let l=1&r,h=this._audioMetadata,d=this._audioTrack;if(h||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),h=this._audioMetadata={},h.type="audio",h.id=d.id,h.timescale=this._timescale,h.duration=this._duration,h.audioSampleRate=a,h.channelCount=0===l?1:2),10===s){let r=this._parseAACAudioData(e,t+1,i-1);if(null==r)return;if(0===r.packetType){h.config&&u.w(this.TAG,"Found another AudioSpecificConfig!");let e=r.data;h.audioSampleRate=e.samplingRate,h.channelCount=e.channelCount,h.codec=e.codec,h.originalCodec=e.originalCodec,h.config=e.config,h.refSampleDuration=1024/h.audioSampleRate*h.timescale,u.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",h);let t=this._mediaInfo;t.audioCodec=h.originalCodec,t.audioSampleRate=h.audioSampleRate,t.audioChannelCount=h.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===r.packetType){let e=this._timestampBase+n,t={unit:r.data,length:r.data.byteLength,dts:e,pts:e};d.samples.push(t),d.length+=r.data.length}else u.e(this.TAG,"Flv: Unsupported AAC data type "+r.packetType)}else if(2===s){if(!h.codec){let n=this._parseMP3AudioData(e,t+1,i-1,!0);if(null==n)return;h.audioSampleRate=n.samplingRate,h.channelCount=n.channelCount,h.codec=n.codec,h.originalCodec=n.originalCodec,h.refSampleDuration=1152/h.audioSampleRate*h.timescale,u.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",h);let r=this._mediaInfo;r.audioCodec=h.codec,r.audioSampleRate=h.audioSampleRate,r.audioChannelCount=h.channelCount,r.audioDataRate=n.bitRate,r.hasVideo?null!=r.videoCodec&&(r.mimeType='video/x-flv; codecs="'+r.videoCodec+","+r.audioCodec+'"'):r.mimeType='video/x-flv; codecs="'+r.audioCodec+'"',r.isComplete()&&this._onMediaInfo(r)}let r=this._parseMP3AudioData(e,t+1,i-1,!1);if(null==r)return;let s=this._timestampBase+n,a={unit:r,length:r.byteLength,dts:s,pts:s};d.samples.push(a),d.length+=r.length}}_parseAACAudioData(e,t,i){if(i<=1)return void u.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");let n={},r=new Uint8Array(e,t,i);return n.packetType=r[0],0===r[0]?n.data=this._parseAACAudioSpecificConfig(e,t+1,i-1):n.data=r.subarray(1),n}_parseAACAudioSpecificConfig(e,t,i){let n=new Uint8Array(e,t,i),r=null,s=0,a=0,o=null,l=0,h=null;if(s=a=n[0]>>>3,l=(7&n[0])<<1|n[1]>>>7,l<0||l>=this._mpegSamplingRates.length)return void this._onError(W.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");let u=this._mpegSamplingRates[l],d=(120&n[1])>>>3;if(d<0||d>=8)return void this._onError(W.FORMAT_ERROR,"Flv: AAC invalid channel configuration");5===s&&(h=(7&n[1])<<1|n[2]>>>7,o=(124&n[2])>>>2);let c=self.navigator.userAgent.toLowerCase();return-1!==c.indexOf("firefox")?l>=6?(s=5,r=new Array(4),h=l-3):(s=2,r=new Array(2),h=l):-1!==c.indexOf("android")?(s=2,r=new Array(2),h=l):(s=5,h=l,r=new Array(4),l>=6?h=l-3:1===d&&(s=2,r=new Array(2),h=l)),r[0]=s<<3,r[0]|=(15&l)>>>1,r[1]=(15&l)<<7,r[1]|=(15&d)<<3,5===s&&(r[1]|=(15&h)>>>1,r[2]=(1&h)<<7,r[2]|=8,r[3]=0),{config:r,samplingRate:u,channelCount:d,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+a}}_parseMP3AudioData(e,t,i,n){if(i<4)return void u.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");this._littleEndian;let r=new Uint8Array(e,t,i),s=null;if(n){if(255!==r[0])return;let e=r[1]>>>3&3,t=(6&r[1])>>1,i=(240&r[2])>>>4,n=(12&r[2])>>>2,a=3!==(r[3]>>>6&3)?2:1,o=0,l=0,h=34,u="mp3";switch(e){case 0:o=this._mpegAudioV25SampleRateTable[n];break;case 2:o=this._mpegAudioV20SampleRateTable[n];break;case 3:o=this._mpegAudioV10SampleRateTable[n]}switch(t){case 1:h=34,i<this._mpegAudioL3BitRateTable.length&&(l=this._mpegAudioL3BitRateTable[i]);break;case 2:h=33,i<this._mpegAudioL2BitRateTable.length&&(l=this._mpegAudioL2BitRateTable[i]);break;case 3:h=32,i<this._mpegAudioL1BitRateTable.length&&(l=this._mpegAudioL1BitRateTable[i])}s={bitRate:l,samplingRate:o,channelCount:a,codec:u,originalCodec:u}}else s=r;return s}_parseVideoData(e,t,i,n,r){if(i<=1)return void u.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");if(!0===this._hasVideoFlagOverrided&&!1===this._hasVideo)return;let s=new Uint8Array(e,t,i)[0],a=(240&s)>>>4,o=15&s;7===o?this._parseAVCVideoPacket(e,t+1,i-1,n,r,a):this._onError(W.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+o)}_parseAVCVideoPacket(e,t,i,n,r,s){if(i<4)return void u.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),h=(16777215&o.getUint32(0,!a))<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(e,t+4,i-4);else if(1===l)this._parseAVCVideoData(e,t+4,i-4,n,r,s,h);else if(2!==l)return void this._onError(W.FORMAT_ERROR,"Flv: Invalid video packet type "+l)}_parseAVCDecoderConfigurationRecord(e,t,i){if(i<7)return void u.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");let n=this._videoMetadata,r=this._videoTrack,s=this._littleEndian,a=new DataView(e,t,i);n?void 0!==n.avcc&&u.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=r.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(W.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");if(this._naluLengthSize=1+(3&a.getUint8(4)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void this._onError(W.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));let h=31&a.getUint8(5);if(0===h)return void this._onError(W.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");h>1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+h);let d=6;for(let i=0;i<h;i++){let r=a.getUint16(d,!s);if(d+=2,0===r)continue;let o=new Uint8Array(e,t+d,r);d+=r;let l=j.parseSPS(o);if(0!==i)continue;n.codecWidth=l.codec_size.width,n.codecHeight=l.codec_size.height,n.presentWidth=l.present_size.width,n.presentHeight=l.present_size.height,n.profile=l.profile_string,n.level=l.level_string,n.bitDepth=l.bit_depth,n.chromaFormat=l.chroma_format,n.sarRatio=l.sar_ratio,n.frameRate=l.frame_rate,!1!==l.frame_rate.fixed&&0!==l.frame_rate.fps_num&&0!==l.frame_rate.fps_den||(n.frameRate=this._referenceFrameRate);let h=n.frameRate.fps_den,u=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(h/u);let c=o.subarray(1,4),f="avc1.";for(let e=0;e<3;e++){let t=c[e].toString(16);t.length<2&&(t="0"+t),f+=t}n.codec=f;let _=this._mediaInfo;_.width=n.codecWidth,_.height=n.codecHeight,_.fps=n.frameRate.fps,_.profile=n.profile,_.level=n.level,_.refFrames=l.ref_frames,_.chromaFormat=l.chroma_format_string,_.sarNum=n.sarRatio.width,_.sarDen=n.sarRatio.height,_.videoCodec=f,_.hasAudio?null!=_.audioCodec&&(_.mimeType='video/x-flv; codecs="'+_.videoCodec+","+_.audioCodec+'"'):_.mimeType='video/x-flv; codecs="'+_.videoCodec+'"',_.isComplete()&&this._onMediaInfo(_)}let c=a.getUint8(d);if(0!==c){c>1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+c),d++;for(let e=0;e<c;e++){let e=a.getUint16(d,!s);d+=2,0!==e&&(d+=e)}n.avcc=new Uint8Array(i),n.avcc.set(new Uint8Array(e,t,i),0),u.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(W.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}_parseAVCVideoData(e,t,i,n,r,s,a){let o=this._littleEndian,l=new DataView(e,t,i),h=[],d=0,c=0;const f=this._naluLengthSize;let _=this._timestampBase+n,m=1===s;for(;c<i;){if(c+4>=i){u.w(this.TAG,`Malformed Nalu near timestamp ${_}, offset = ${c}, dataSize = ${i}`);break}let n=l.getUint32(c,!o);if(3===f&&(n>>>=8),n>i-f)return void u.w(this.TAG,`Malformed Nalus near timestamp ${_}, NaluSize > DataSize!`);let r=31&l.getUint8(c+f);5===r&&(m=!0);let s=new Uint8Array(e,t+c,f+n),a={type:r,data:s};h.push(a),d+=s.byteLength,c+=f+n}if(h.length){let e=this._videoTrack,t={units:h,length:d,isKeyframe:m,dts:_,cts:a,pts:_+a};m&&(t.fileposition=r),e.samples.push(t),e.length+=d}}}var z=G;class H{static init(){H.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 e in H.types)H.types.hasOwnProperty(e)&&(H.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=H.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),r=n.length;for(let e=0;e<r;e++)t+=n[e].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 s=8;for(let e=0;e<r;e++)i.set(n[e],s),s+=n[e].byteLength;return i}static generateInitSegment(e){let t=H.box(H.types.ftyp,H.constants.FTYP),i=H.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=H.mvhd(e.timescale,e.duration),i=H.trak(e),n=H.mvex(e);return H.box(H.types.moov,t,i,n)}static mvhd(e,t){return H.box(H.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 H.box(H.types.trak,H.tkhd(e),H.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,n=e.presentWidth,r=e.presentHeight;return H.box(H.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,r>>>8&255,255&r,0,0]))}static mdia(e){return H.box(H.types.mdia,H.mdhd(e),H.hdlr(e),H.minf(e))}static mdhd(e){let t=e.timescale,i=e.duration;return H.box(H.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?H.constants.HDLR_AUDIO:H.constants.HDLR_VIDEO,H.box(H.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?H.box(H.types.smhd,H.constants.SMHD):H.box(H.types.vmhd,H.constants.VMHD),H.box(H.types.minf,t,H.dinf(),H.stbl(e))}static dinf(){return H.box(H.types.dinf,H.box(H.types.dref,H.constants.DREF))}static stbl(e){return H.box(H.types.stbl,H.stsd(e),H.box(H.types.stts,H.constants.STTS),H.box(H.types.stsc,H.constants.STSC),H.box(H.types.stsz,H.constants.STSZ),H.box(H.types.stco,H.constants.STCO))}static stsd(e){return"audio"===e.type?"mp3"===e.codec?H.box(H.types.stsd,H.constants.STSD_PREFIX,H.mp3(e)):H.box(H.types.stsd,H.constants.STSD_PREFIX,H.mp4a(e)):H.box(H.types.stsd,H.constants.STSD_PREFIX,H.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 H.box(H.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 H.box(H.types.mp4a,n,H.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 H.box(H.types.esds,n)}static avc1(e){let t=e.avcc,i=e.codecWidth,n=e.codecHeight,r=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 H.box(H.types.avc1,r,H.box(H.types.avcC,t))}static mvex(e){return H.box(H.types.mvex,H.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 H.box(H.types.trex,i)}static moof(e,t){return H.box(H.types.moof,H.mfhd(e.sequenceNumber),H.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 H.box(H.types.mfhd,t)}static traf(e,t){let i=e.id,n=H.box(H.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=H.box(H.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),s=H.sdtp(e),a=H.trun(e,s.byteLength+16+16+8+16+8+8);return H.box(H.types.traf,n,r,a,s)}static sdtp(e){let t=e.samples||[],i=t.length,n=new Uint8Array(4+i);for(let e=0;e<i;e++){let i=t[e].flags;n[e+4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy}return H.box(H.types.sdtp,n)}static trun(e,t){let i=e.samples||[],n=i.length,r=12+16*n,s=new Uint8Array(r);t+=8+r,s.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 e=0;e<n;e++){let t=i[e].duration,n=i[e].size,r=i[e].flags,a=i[e].cts;s.set([t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.isNonSync,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12+16*e)}return H.box(H.types.trun,s)}static mdat(e){return H.box(H.types.mdat,e)}}H.init();var K=H;var Q=class{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}};class X{constructor(e,t,i,n,r){this.dts=e,this.pts=t,this.duration=i,this.originalDts=n,this.isSyncPoint=r,this.fileposition=null}}class Z{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 J{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,r=0,s=0,a=n;for(e<t[0].dts&&(i=0,s=a+1);s<=a;){if(r=s+Math.floor((a-s)/2),r===n||e>=t[r].dts&&e<t[r+1].dts){i=r;break}t[r].dts<e?s=r+1:a=r-1}return this._list[i]}}class ${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,r=0,s=i,a=0;if(e<t[0].originalBeginDts)return a=-1,a;for(;r<=s;){if(n=r+Math.floor((s-r)/2),n===i||e>t[n].lastSample.originalDts&&e<t[n+1].originalBeginDts){a=n;break}t[n].originalBeginDts<e?r=n+1:s=n-1}return a}_searchNearestSegmentAfter(e){return this._searchNearestSegmentBefore(e)+1}append(e){let t=this._list,i=e,n=this._lastAppendLocation,r=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)?r=n+1:t.length>0&&(r=this._searchNearestSegmentBefore(i.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,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;for(;0===i.length&&t>0;)t--,i=this._list[t].syncPoints;return i.length>0?i[i.length-1]:null}}var ee=class{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 $("audio"),this._videoSegmentInfoList=new $("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!A.chrome||!(A.version.major<50||50===A.version.major&&A.version.build<2661)),this._fillSilentAfterSeek=A.msedge||A.msie,this._mp3UseMpegAudio=!A.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 f("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",r=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(n="mpeg",r="",i=new Uint8Array):i=K.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=K.generateInitSegment(t)}if(!this._onInitSegment)throw new f("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:r,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,r=void 0,s=-1,a=-1,o=this._audioMeta.refSampleDuration,l="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,h=this._dtsBaseInited&&void 0===this._audioNextDts,d=!1;if(!n||0===n.length)return;if(1===n.length&&!t)return;let c=0,f=null,_=0;l?(c=0,_=i.length):(c=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)r=p-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())r=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(d=!0);else{let e=this._audioSegmentInfoList.getLastSampleBefore(p);if(null!=e){let t=p-(e.originalDts+e.duration);t<=3&&(t=0),r=p-(e.dts+e.duration+t)}else r=0}if(d){let e=p-r,t=this._videoSegmentInfoList.getLastSegmentBefore(p);if(null!=t&&t.beginDts<e){let i=Q.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(i){let r=t.beginDts,s=e-t.beginDts;u.v(this.TAG,`InsertPrefixSilentAudio: dts: ${r}, duration: ${s}`),n.unshift({unit:i,dts:r,pts:r}),_+=i.byteLength}}else d=!1}let g=[];for(let e=0;e<n.length;e++){let t=n[e],i=t.unit,a=t.dts-this._dtsBase,l=a-r;-1===s&&(s=l);let h=0;if(e!==n.length-1){h=n[e+1].dts-this._dtsBase-r-l}else if(null!=m){h=m.dts-this._dtsBase-r-l}else h=g.length>=1?g[g.length-1].duration:Math.floor(o);let d=!1,c=null;if(h>1.5*o&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!A.safari){d=!0;let e=Math.abs(h-o),t=Math.ceil(e/o),n=l+o;u.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: ${l+h} ms, expected: ${l+Math.round(o)} ms, delta: ${Math.round(e)} ms, generate: ${t} frames`);let r=Q.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==r&&(u.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),r=i),c=[];for(let e=0;e<t;e++){let e=Math.round(n);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:a,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};c.push(t),_+=t.size,n+=o}let s=c[c.length-1];s.duration=l+h-s.dts,h=Math.round(o)}g.push({dts:l,pts:l,cts:0,unit:t.unit,size:t.unit.byteLength,duration:h,originalDts:a,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),d&&g.push.apply(g,c)}l?f=new Uint8Array(_):(f=new Uint8Array(_),f[0]=_>>>24&255,f[1]=_>>>16&255,f[2]=_>>>8&255,f[3]=255&_,f.set(K.types.mdat,4));for(let e=0;e<g.length;e++){let t=g[e].unit;f.set(t,c),c+=t.byteLength}let y=g[g.length-1];a=y.dts+y.duration,this._audioNextDts=a;let v=new Z;v.beginDts=s,v.endDts=a,v.beginPts=s,v.endPts=a,v.originalBeginDts=g[0].originalDts,v.originalEndDts=y.originalDts+y.duration,v.firstSample=new X(g[0].dts,g[0].pts,g[0].duration,g[0].originalDts,!1),v.lastSample=new X(y.dts,y.pts,y.duration,y.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(v),i.samples=g,i.sequenceNumber++;let S=null;S=l?new Uint8Array:K.moof(i,s),i.samples=[],i.length=0;let b={type:"audio",data:this._mergeBoxes(S,f).buffer,sampleCount:g.length,info:v};l&&h&&(b.timestampOffset=s),this._onMediaSegment("audio",b)}_remuxVideo(e,t){if(null==this._videoMeta)return;let i=e,n=i.samples,r=void 0,s=-1,a=-1,o=-1,l=-1;if(!n||0===n.length)return;if(1===n.length&&!t)return;let h=8,u=null,d=8+e.length,c=null;if(n.length>1&&(c=n.pop(),d-=c.length),null!=this._videoStashedLastSample){let e=this._videoStashedLastSample;this._videoStashedLastSample=null,n.unshift(e),d+=e.length}null!=c&&(this._videoStashedLastSample=c);let f=n[0].dts-this._dtsBase;if(this._videoNextDts)r=f-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())r=0;else{let e=this._videoSegmentInfoList.getLastSampleBefore(f);if(null!=e){let t=f-(e.originalDts+e.duration);t<=3&&(t=0),r=f-(e.dts+e.duration+t)}else r=0}let _=new Z,m=[];for(let e=0;e<n.length;e++){let t=n[e],i=t.dts-this._dtsBase,a=t.isKeyframe,l=i-r,h=t.cts,u=l+h;-1===s&&(s=l,o=u);let d=0;if(e!==n.length-1){d=n[e+1].dts-this._dtsBase-r-l}else if(null!=c){d=c.dts-this._dtsBase-r-l}else d=m.length>=1?m[m.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(a){let e=new X(l,u,d,t.dts,!0);e.fileposition=t.fileposition,_.appendSyncPoint(e)}m.push({dts:l,pts:u,cts:h,units:t.units,size:t.length,isKeyframe:a,duration:d,originalDts:i,flags:{isLeading:0,dependsOn:a?2:1,isDependedOn:a?1:0,hasRedundancy:0,isNonSync:a?0:1}})}u=new Uint8Array(d),u[0]=d>>>24&255,u[1]=d>>>16&255,u[2]=d>>>8&255,u[3]=255&d,u.set(K.types.mdat,4);for(let e=0;e<m.length;e++){let t=m[e].units;for(;t.length;){let e=t.shift().data;u.set(e,h),h+=e.byteLength}}let p=m[m.length-1];if(a=p.dts+p.duration,l=p.pts+p.duration,this._videoNextDts=a,_.beginDts=s,_.endDts=a,_.beginPts=o,_.endPts=l,_.originalBeginDts=m[0].originalDts,_.originalEndDts=p.originalDts+p.duration,_.firstSample=new X(m[0].dts,m[0].pts,m[0].duration,m[0].originalDts,m[0].isKeyframe),_.lastSample=new X(p.dts,p.pts,p.duration,p.originalDts,p.isKeyframe),this._isLive||this._videoSegmentInfoList.append(_),i.samples=m,i.sequenceNumber++,this._forceFirstIDR){let e=m[0].flags;e.dependsOn=2,e.isNonSync=0}let g=K.moof(i,s);i.samples=[],i.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(g,u).buffer,sampleCount:m.length,info:_})}_mergeBoxes(e,t){let i=new Uint8Array(e.byteLength+t.byteLength);return i.set(e,0),i.set(t,e.byteLength),i}};var te={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 ie=class{constructor(e,t){this.TAG="TransmuxingController",this._emitter=new l.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 D(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(null==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(null==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=z.probe(e)).match){this._demuxer=new z(i,this._config),this._remuxer||(this._remuxer=new ee(this._config));let r=this._mediaDataSource;null==r.duration||isNaN(r.duration)||(this._demuxer.overridedDuration=r.duration),"boolean"==typeof r.hasAudio&&(this._demuxer.overridedHasAudio=r.hasAudio),"boolean"==typeof r.hasVideo&&(this._demuxer.overridedHasVideo=r.hasVideo),this._demuxer.timestampBase=r.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,u.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(te.DEMUX_ERROR,W.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,U.prototype));let t=Object.assign({},e);Object.setPrototypeOf(t,U.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(te.METADATA_ARRIVED,e)}_onScriptDataArrived(e){this._emitter.emit(te.SCRIPTDATA_ARRIVED,e)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(e){let t=e+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer.flushStashedSamples(),this._emitter.emit(te.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(e){let t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}_onIORecoveredEarlyEof(){this._emitter.emit(te.RECOVERED_EARLY_EOF)}_onIOException(e,t){u.e(this.TAG,`IOException: type = ${e}, code = ${t.code}, msg = ${t.msg}`),this._emitter.emit(te.IO_ERROR,e,t),this._disableStatisticsReporter()}_onDemuxException(e,t){u.e(this.TAG,`DemuxException: type = ${e}, info = ${t}`),this._emitter.emit(te.DEMUX_ERROR,e,t)}_onRemuxerInitSegmentArrival(e,t){this._emitter.emit(te.INIT_SEGMENT,e,t)}_onRemuxerMediaSegmentArrival(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(te.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){let e=t.info.syncPoints,i=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,A.safari&&e.length>0&&e[0].originalDts===i&&(i=e[0].pts),this._emitter.emit(te.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(te.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(te.STATISTICS_INFO,e)}};var ne=function(e){let t=null,i=function(t,i){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:i}})}.bind(this);function n(t,i){let n={msg:te.INIT_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function r(t,i){let n={msg:te.MEDIA_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function s(){let t={msg:te.LOADING_COMPLETE};e.postMessage(t)}function o(){let t={msg:te.RECOVERED_EARLY_EOF};e.postMessage(t)}function l(t){let i={msg:te.MEDIA_INFO,data:t};e.postMessage(i)}function h(t){let i={msg:te.METADATA_ARRIVED,data:t};e.postMessage(i)}function u(t){let i={msg:te.SCRIPTDATA_ARRIVED,data:t};e.postMessage(i)}function d(t){let i={msg:te.STATISTICS_INFO,data:t};e.postMessage(i)}function c(t,i){e.postMessage({msg:te.IO_ERROR,data:{type:t,info:i}})}function f(t,i){e.postMessage({msg:te.DEMUX_ERROR,data:{type:t,info:i}})}function _(t){e.postMessage({msg:te.RECOMMEND_SEEKPOINT,data:t})}a.install(),e.addEventListener("message",(function(a){switch(a.data.cmd){case"init":t=new ie(a.data.param[0],a.data.param[1]),t.on(te.IO_ERROR,c.bind(this)),t.on(te.DEMUX_ERROR,f.bind(this)),t.on(te.INIT_SEGMENT,n.bind(this)),t.on(te.MEDIA_SEGMENT,r.bind(this)),t.on(te.LOADING_COMPLETE,s.bind(this)),t.on(te.RECOVERED_EARLY_EOF,o.bind(this)),t.on(te.MEDIA_INFO,l.bind(this)),t.on(te.METADATA_ARRIVED,h.bind(this)),t.on(te.SCRIPTDATA_ARRIVED,u.bind(this)),t.on(te.STATISTICS_INFO,d.bind(this)),t.on(te.RECOMMEND_SEEKPOINT,_.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(a.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":{let e=a.data.param;x.applyConfig(e),!0===e.enableCallback?x.addLogListener(i):x.removeLogListener(i);break}}}))};var re=class{constructor(e,t){if(this.TAG="Transmuxer",this._emitter=new l.a,t.enableWorker&&"undefined"!=typeof Worker)try{let n=i(14);this._worker=n(ne),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)},x.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:x.getConfig()})}catch(i){u.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ie(e,t)}else this._controller=new ie(e,t);if(this._controller){let e=this._controller;e.on(te.IO_ERROR,this._onIOError.bind(this)),e.on(te.DEMUX_ERROR,this._onDemuxError.bind(this)),e.on(te.INIT_SEGMENT,this._onInitSegment.bind(this)),e.on(te.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),e.on(te.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),e.on(te.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),e.on(te.MEDIA_INFO,this._onMediaInfo.bind(this)),e.on(te.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),e.on(te.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),e.on(te.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),e.on(te.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),x.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(te.INIT_SEGMENT,e,t)})}_onMediaSegment(e,t){Promise.resolve().then(()=>{this._emitter.emit(te.MEDIA_SEGMENT,e,t)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(te.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(te.RECOVERED_EARLY_EOF)})}_onMediaInfo(e){Promise.resolve().then(()=>{this._emitter.emit(te.MEDIA_INFO,e)})}_onMetaDataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(te.METADATA_ARRIVED,e)})}_onScriptDataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(te.SCRIPTDATA_ARRIVED,e)})}_onStatisticsInfo(e){Promise.resolve().then(()=>{this._emitter.emit(te.STATISTICS_INFO,e)})}_onIOError(e,t){Promise.resolve().then(()=>{this._emitter.emit(te.IO_ERROR,e,t)})}_onDemuxError(e,t){Promise.resolve().then(()=>{this._emitter.emit(te.DEMUX_ERROR,e,t)})}_onRecommendSeekpoint(e){Promise.resolve().then(()=>{this._emitter.emit(te.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 te.INIT_SEGMENT:case te.MEDIA_SEGMENT:this._emitter.emit(t.msg,i.type,i.data);break;case te.LOADING_COMPLETE:case te.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case te.MEDIA_INFO:Object.setPrototypeOf(i,U.prototype),this._emitter.emit(t.msg,i);break;case te.METADATA_ARRIVED:case te.SCRIPTDATA_ARRIVED:case te.STATISTICS_INFO:this._emitter.emit(t.msg,i);break;case te.IO_ERROR:case te.DEMUX_ERROR:this._emitter.emit(t.msg,i.type,i.info);break;case te.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,i);break;case"logcat_callback":u.emitter.emit("log",i.type,i.logcat)}}};var se={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};var ae=class{constructor(e){this.TAG="MSEController",this._config=e,this._emitter=new l.a,this._config.isLive&&null==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 J}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 f("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 e=this._mediaSource;for(let t in this._sourceBuffers){let i=this._pendingSegments[t];i.splice(0,i.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;let n=this._sourceBuffers[t];if(n){if("closed"!==e.readyState){try{e.removeSourceBuffer(n)}catch(e){u.e(this.TAG,e.message)}n.removeEventListener("error",this.e.onSourceBufferError),n.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){u.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.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 r=!1;if(u.v(this.TAG,"Received Initialization Segment, mimeType: "+n),this._lastInitSegments[i.type]=i,n!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])u.v(this.TAG,`Notice: ${i.type} mimeType changed, origin: ${this._mimeTypes[i.type]}, target: ${n}`);else{r=!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(e){return u.e(this.TAG,e.message),void this._emitter.emit(se.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[i.type]=n}t||this._pendingSegments[i.type].push(i),r||this._sourceBuffers[i.type]&&!this._sourceBuffers[i.type].updating&&this._doAppendSegments(),A.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 e in this._sourceBuffers){if(!this._sourceBuffers[e])continue;let t=this._sourceBuffers[e];if("open"===this._mediaSource.readyState)try{t.abort()}catch(e){u.e(this.TAG,e.message)}this._idrList.clear();let i=this._pendingSegments[e];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(let i=0;i<t.buffered.length;i++){let n=t.buffered.start(i),r=t.buffered.end(i);this._pendingRemoveRanges[e].push({start:n,end:r})}if(t.updating||this._doRemoveRanges(),A.safari){let i=this._lastInitSegments[e];i&&(this._pendingSegments[e].push(i),t.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,r=!1;for(let i=0;i<n.length;i++){let s=n.start(i),a=n.end(i);if(s<=e&&e<a+3){if(e-s>=this._config.autoCleanupMaxBackwardDuration){r=!0;let i=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:s,end:i})}}else a<e&&(r=!0,this._pendingRemoveRanges[t].push({start:s,end:a}))}r&&!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)&&(u.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];for(;i.length&&!t.updating;){let e=i.shift();t.remove(e.start,e.end)}}}_doAppendSegments(){let e=this._pendingSegments;for(let t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){let i=e[t].shift();if(i.timestampOffset){let e=this._sourceBuffers[t].timestampOffset,n=i.timestampOffset/1e3;Math.abs(e-n)>.1&&(u.v(this.TAG,`Update MPEG audio timestampOffset from ${e} to ${n}`),this._sourceBuffers[t].timestampOffset=n),delete i.timestampOffset}if(!i.data||0===i.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(i.data),this._isBufferFull=!1,"video"===t&&i.hasOwnProperty("info")&&this._idrList.appendArray(i.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(i),22===e.code?(this._isBufferFull||this._emitter.emit(se.BUFFER_FULL),this._isBufferFull=!0):(u.e(this.TAG,e.message),this._emitter.emit(se.ERROR,{code:e.code,msg:e.message}))}}}_onSourceOpen(){if(u.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let e=this._pendingSourceBufferInit;for(;e.length;){let t=e.shift();this.appendInitSegment(t,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(se.SOURCE_OPEN)}_onSourceEnded(){u.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){u.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(se.UPDATE_END)}_onSourceBufferError(e){u.e(this.TAG,"SourceBuffer Error: "+e)}};const oe={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},le={NETWORK_EXCEPTION:g.EXCEPTION,NETWORK_STATUS_CODE_INVALID:g.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:g.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:g.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:W.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:W.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:W.CODEC_UNSUPPORTED};var he=class{constructor(e,t){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new l.a,this._config=L(),"object"==typeof t&&Object.assign(this._config,t),"flv"!==e.type.toLowerCase())throw new _("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=A.chrome&&(A.version.major<50||50===A.version.major&&A.version.build<2661);this._alwaysSeekKeyframe=!!(i||A.msedge||A.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===C.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then(()=>{this._emitter.emit(C.MEDIA_INFO,this.mediaInfo)}):e===C.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then(()=>{this._emitter.emit(C.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 ae(this._config),this._msectl.on(se.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(se.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(se.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(se.ERROR,e=>{this._emitter.emit(C.ERROR,oe.MEDIA_ERROR,le.MEDIA_MSE_ERROR,e)}),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}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 f("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new f("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 re(this._mediaDataSource,this._config),this._transmuxer.on(te.INIT_SEGMENT,(e,t)=>{this._msectl.appendInitSegment(t)}),this._transmuxer.on(te.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&&(u.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(te.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(C.LOADING_COMPLETE)}),this._transmuxer.on(te.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(C.RECOVERED_EARLY_EOF)}),this._transmuxer.on(te.IO_ERROR,(e,t)=>{this._emitter.emit(C.ERROR,oe.NETWORK_ERROR,e,t)}),this._transmuxer.on(te.DEMUX_ERROR,(e,t)=>{this._emitter.emit(C.ERROR,oe.MEDIA_ERROR,e,{code:-1,msg:t})}),this._transmuxer.on(te.MEDIA_INFO,e=>{this._mediaInfo=e,this._emitter.emit(C.MEDIA_INFO,Object.assign({},e))}),this._transmuxer.on(te.METADATA_ARRIVED,e=>{this._emitter.emit(C.METADATA_ARRIVED,e)}),this._transmuxer.on(te.SCRIPTDATA_ARRIVED,e=>{this._emitter.emit(C.SCRIPTDATA_ARRIVED,e)}),this._transmuxer.on(te.STATISTICS_INFO,e=>{this._statisticsInfo=this._fillStatisticsInfo(e),this._emitter.emit(C.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(te.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 null!=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 r=0;r<e.length;r++){let s=e.start(r),a=e.end(r);if(s<=t&&t<a){i=s,n=a;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(u.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){u.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 r=t.start(n),s=t.end(n);if(e>=r&&e<s){e>=s-this._config.lazyLoadRecoverDuration&&(i=!0);break}}i&&(window.clearInterval(this._progressChecker),this._progressChecker=null,i&&(u.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),r=t.end(i);if(e>=n&&e<r)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||A.safari)&&(i=!0,n=A.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)&&(u.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||A.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=A.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 ue=class{constructor(e,t){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new l.a,this._config=L(),"object"==typeof t&&Object.assign(this._config,t),"flv"===e.type.toLowerCase())throw new _("NativePlayer does't support flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new _(`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===C.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(()=>{this._emitter.emit(C.MEDIA_INFO,this.mediaInfo)}):e===C.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(()=>{this._emitter.emit(C.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(e){}}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 f("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={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}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 null!=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(C.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(C.STATISTICS_INFO,this.statisticsInfo)}};a.install();let de={createPlayer:function(e,t){let i=e;if(null==i||"object"!=typeof i)throw new _("MediaDataSource must be an javascript object!");if(!i.hasOwnProperty("type"))throw new _("MediaDataSource must has type field to indicate video file type!");switch(i.type){case"flv":return new he(i,t);default:return new ue(i,t)}},isSupported:function(){return O.supportMSEH264Playback()},getFeatureList:function(){return O.getFeatureList()}};de.BaseLoader=y,de.LoaderStatus=p,de.LoaderErrors=g,de.Events=C,de.ErrorTypes=oe,de.ErrorDetails=le,de.FlvPlayer=he,de.NativePlayer=ue,de.LoggingControl=x,Object.defineProperty(de,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var ce=de,fe=i(2),_e=i.n(fe),me=i(5),pe={insert:"head",singleton:!1};_e()(me.a,pe),me.a.locals;function ge(e){return(ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=be(e);if(t){var r=be(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Se(this,i)}}function Se(e,t){return!t||"object"!==ge(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function be(e){return(be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(a,e);var t,i,n,s=Ae(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this,e)).state={vidoeUrl:"",id:(new Date).getTime()+Math.floor(9999*Math.random())+1},t}return t=a,n=[{key:"getDerivedStateFromProps",value:function(e){var t=e.vidoeUrl;return t?{vidoeUrl:t}:null}}],(i=[{key:"componentDidUpdate",value:function(){this.state.vidoeUrl&&this.startFlv()}},{key:"componentDidMount",value:function(){this.state.vidoeUrl&&this.startFlv()}},{key:"startFlv",value:function(){var e=this.state,t=e.vidoeUrl,i=e.id;if(ce.isSupported()){var n=document.getElementById(i);this.flvPlayer&&this.destroyFlv(),this.flvPlayer=ce.createPlayer({type:"flv",isLive:!0,hasAudio:!1,url:t},{enableStashBuffer:!0,stashInitialSize:128}),this.flvPlayer.attachMediaElement(n),this.flvPlayer.load(),this.flvPlayer.play()}else alert("请更换浏览器,该浏览器暂不支持。")}},{key:"destroyFlv",value:function(){this.flvPlayer.pause(),this.flvPlayer.unload(),this.flvPlayer.detachMediaElement(),this.flvPlayer.destroy(),this.flvPlayer=null}},{key:"render",value:function(){return r.a.createElement("div",{className:"flvWai"},r.a.createElement("video",{id:this.state.id,className:"videoFlv",autoPlay:!0,controls:!0,muted:!0}))}}])&&ye(t.prototype,i),n&&ye(t,n),a}(n.Component),we=i(4),Re=i(6),ke={insert:"head",singleton:!1};_e()(Re.a,ke),Re.a.locals;function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=Ce(e);if(t){var r=Ce(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Oe(this,i)}}function Oe(e,t){return!t||"object"!==De(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Le(e,t)}(a,e);var t,i,n,s=Me(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=s.call(this)).state={showDateTime:"",classInfo:""},e}return t=a,n=[{key:"getDerivedStateFromProps",value:function(e,t){var i=e.className;return i!==t.className?{classInfo:i}:null}}],(i=[{key:"forShowDateTime",value:function(){var e=this.props.type,t=void 0===e?"YYYY-MM-DD HH:mm:ss":e;this.setState({showDateTime:Object(we.a)().format(t)})}},{key:"componentDidMount",value:function(){var e=this;this.forShowDateTime(),this.timer=setInterval((function(){e.forShowDateTime()}),1e3)}},{key:"render",value:function(){var e=this.state,t=e.classInfo,i=e.showDateTime;return r.a.createElement("div",{className:"timerComCss"},r.a.createElement("p",{className:t},i))}}])&&Te(t.prototype,i),n&&Te(t,n),a}(n.Component),xe=i(7),Ue={insert:"head",singleton:!1};_e()(xe.a,Ue),xe.a.locals;function Pe(e){return(Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Be(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=Ye(e);if(t){var r=Ye(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Ve(this,i)}}function Ve(e,t){return!t||"object"!==Pe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ne(e,t)}(o,e);var t,n,s,a=Fe(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=a.call(this)).state={imgUrl:"",httpImg:"",base64Url:""},e}return t=o,s=[{key:"getDerivedStateFromProps",value:function(e,t){var i=e.httpImg,n=e.imgUrl;return i&&i!==t.httpImg?{httpImg:i,imgUrl:n}:n!==t.imgUrl?{imgUrl:n}:null}}],(n=[{key:"shouldComponentUpdate",value:function(e){return this.props.imgUrl!==e.imgUrl?(this.count=0,this.getImage(e.imgUrl),!0):0===this.count&&(this.count++,!0)}},{key:"componentDidMount",value:function(){this.count=0,this.state.httpImg&&this.getImage(this.props.imgUrl)}},{key:"getImage",value:function(e){var t=this,n=this.state.httpImg,r=new XMLHttpRequest;r.open("POST",n),r.setRequestHeader("Content-Type","application/json");var s={reqInfo:{imgPath:e},request:"getImgDataByPath"};r.send(JSON.stringify(s)),r.onreadystatechange=function(){if(4===r.readyState&&(200===r.status||304===r.status)){var e=JSON.parse(r.responseText);0===e.status?t.setImgUrl("data:image/png;base64,"+e.resInfo.imgData):t.setImgUrl(i(17))}}}},{key:"setImgUrl",value:function(e){this.setState({base64Url:e})}},{key:"render",value:function(){var e=this.state.base64Url;return r.a.createElement("img",{src:e,alt:""})}}])&&Be(t.prototype,n),s&&Be(t,s),o}(n.Component);function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function We(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ge(e,t){return(Ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=Ke(e);if(t){var r=Ke(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return He(this,i)}}function He(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ke(e){return(Ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ge(e,t)}(a,e);var t,i,n,s=ze(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=s.call(this)).state={id:(new Date).getTime()+Math.floor(9999*Math.random())+1,mode:"",width:"100px",height:"100px",circleRadius:5,circleBorderWidth:2,circleBorderColor:"#28B1D9",circleInColor:"#28B1D9",circleSelectColor:"#FFF",lineColor:"#28B1D9",lineWidth:2,areaColor:"rgba(40, 177, 217, 0.2)",disabled:"false",title:"",titleColor:"#000",titleFont:"14px bold 黑体",titleLineHeight:"",position:[10,10],serviceData:[]},e}return t=a,n=[{key:"getDerivedStateFromProps",value:function(e,t){var i={};for(var n in e)e[n]&&e[n]!==t[n]&&(i[n]=e[n]);return Object.keys(i).length>0?i:null}}],(i=[{key:"shouldComponentUpdate",value:function(e){return this.props.serviceData.length!==e.serviceData}},{key:"componentDidMount",value:function(){var e=this;this.init(),window.addEventListener("resize",(function(){e.init()}))}},{key:"init",value:function(){this.setCanvasSize()}},{key:"setCanvasSize",value:function(){var e=this.state.id,t=document.getElementById(e).parentNode,i=t.offsetWidth,n=t.offsetHeight;this.setData({width:i+"px",height:n+"px"})}},{key:"draw",value:function(){var e=this.state,t=e.id,i=e.serviceData,n=e.width,r=e.height,s=e.mode,a=e.disabled,o=document.getElementById(t).getContext("2d");o.clearRect(0,0,parseFloat(n),parseFloat(r)),this.drawLine(o,i),this.drawCircleAll(o,i),this.drawWriting(o,i),"false"===a&&("click"===s?this.isontouchend()?this.touchMove():this.clickMove():this.isontouchend()?this.touchMove():this.mouseMove())}},{key:"isontouchend",value:function(){return"ontouchend"in document}},{key:"drawCircleAll",value:function(e,t){for(var i=0;i<t.length;i++)this.drawCircle(e,t[i][0],t[i][1],this.selectedIndex===i)}},{key:"drawCircle",value:function(e,t,i,n){var r=this.state,s=r.circleRadius,a=r.circleInColor,o=r.circleBorderColor,l=r.circleBorderWidth,h=r.circleSelectColor;e.fillStyle=n?h:a,e.beginPath(),e.arc(t,i,parseInt(s),0,2*Math.PI,!0),e.closePath(),e.fill(),e.beginPath(),e.arc(t,i,parseInt(s),0,2*Math.PI,!0),e.lineWidth=parseInt(l),e.strokeStyle=o,e.stroke(),e.closePath()}},{key:"drawLine",value:function(e,t){var i=this.state,n=i.lineColor,r=i.lineWidth,s=i.areaColor;e.beginPath();for(var a=0;a<t.length;a++)0===a?e.moveTo(t[a][0],t[a][1]):e.lineTo(t[a][0],t[a][1]);e.lineWidth=parseInt(r),e.strokeStyle=n,e.closePath(),e.fillStyle=s,e.fill(),e.stroke()}},{key:"drawWriting",value:function(e,t){var i=this.state,n=i.title,r=i.titleColor,s=i.titleFont,a=i.titleLineHeight,o=i.position;e.font=s||"18px bold 黑体",e.fillStyle=r||"#fff",e.lineHeight=a||s.split(" ")[0],e.textBaseline="middle";for(var l=parseInt(a||s.split(" ")[0]),h=0,u=99999999,d=0;d<t.length;d++)parseFloat(t[d][0])>h&&(h=parseFloat(t[d][0])),parseFloat(t[d][1])<u&&(u=parseFloat(t[d][1]));n.split(/\n/).forEach((function(t,i){console.log(h,u+(o[1]||15)+i*l),e.fillText(t,h+(o[0]||15),u+(o[1]||15)+i*l)}))}},{key:"clickMove",value:function(){var e=this,t=this.state,i=t.id,n=t.serviceData;document.getElementById(i).onclick=function(t){var i=t.layerX,r=t.layerY;e.selectedIndex||0===e.selectedIndex?(n[e.selectedIndex]=[i,r],e.selectedIndex=null,e.setData({serviceData:n}),e.sendFather(n)):(e.selectBox(i,r),e.setData({serviceData:n}))}}},{key:"mouseMove",value:function(){var e=this,t=this.state,i=t.id,n=t.serviceData,r=document.getElementById(i);r.onmousedown=function(t){var i=t.layerX,s=t.layerY;e.selectBox(i,s)&&(r.onmousemove=function(t){n[e.selectedIndex]=[t.layerX,t.layerY],e.setData({serviceData:n})})},r.onmouseup=function(t){r.onmousemove=null,e.selectedIndex=null,e.setData({serviceData:n});var i=t.layerX,s=t.layerY;e.selectBox(i,s)&&e.sendFather(n)}}},{key:"touchMove",value:function(){var e=this,t=this.state,i=t.id,n=t.serviceData,r=document.getElementById(i),s=r.parentNode,a=s.getBoundingClientRect().top,o=s.getBoundingClientRect().left;r.ontouchstart=function(t){var i=t.touches[0].pageX-o,s=t.touches[0].pageY-a;e.selectBox(i,s)&&(r.ontouchmove=function(t){n[e.selectedIndex]=[t.touches[0].pageX-o,t.touches[0].pageY-a],e.setData({serviceData:n})})},r.ontouchend=function(t){e.selectedIndex=null,r.ontouchmove=null,e.setData({serviceData:n});var i=t.changedTouches[0].pageX-o,s=t.changedTouches[0].pageY-a;e.selectBox(i,s)&&e.sendFather(n)}}},{key:"selectBox",value:function(e,t){var i=this.state,n=i.serviceData,r=i.circleRadius+i.circleBorderWidth;this.selectedIndex=null;for(var s=0;s<n.length;s++){var a=n[s][0],o=n[s][1];if((a-e)*(a-e)+(o-t)*(o-t)<r*r)return this.selectedIndex=s,!0}if(s==n.length)return!1}},{key:"sendFather",value:function(e){"true"!==this.state.disabled&&this.props.change(e)}},{key:"setData",value:function(e){var t=this;this.setState(e,(function(){t.draw()}))}},{key:"render",value:function(){var e=this.state,t=e.id,i=e.width,n=e.height;return r.a.createElement("canvas",{style:{position:"absolute",top:0,left:0},id:t,width:i,height:n})}}])&&We(t.prototype,i),n&&We(t,n),a}(n.Component);function Xe(e){return(Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ze(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Je(e,t){return(Je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=tt(e);if(t){var r=tt(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return et(this,i)}}function et(e,t){return!t||"object"!==Xe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var it=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Je(e,t)}(a,e);var t,i,n,s=$e(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this,e)).state={serviceData:[],mode:"polygon",disabled:"false"},t}return t=a,n=[{key:"getDerivedStateFromProps",value:function(e,t){var i={};for(var n in e)e[n]&&e[n]!==t[n]&&(i[n]=e[n]);return Object.keys(i).length>0?i:null}}],(i=[{key:"componentDidMount",value:function(){var e=this.state.mode;"react"===e?this.setReact():"polygon"===e&&this.setPolygon()}},{key:"isNull",value:function(){var e=document.getElementById(this.myRef.state.id),t=document.createElement("canvas");return t.width=e.width,t.height=e.height,e.toDataURL()==t.toDataURL()}},{key:"setReact",value:function(){var e=this;this.count=0;var t=document.getElementById(this.myRef.state.id),i=function(t){var i=JSON.parse(JSON.stringify(e.state.serviceData)),n=t.layerX,r=t.layerY;if(0===e.count)i[1][1]=r,i[2]=[n,r],i[3][0]=n;else if(e.myRef.selectedIndex||0===e.myRef.selectedIndex)switch(i[e.myRef.selectedIndex]=[n,r],e.myRef.selectedIndex){case 0:i[1][0]=n,i[3][1]=r;break;case 1:i[0][0]=n,i[2][1]=r;break;case 2:i[1][1]=r,i[3][0]=n;break;case 3:i[0][1]=r,i[2][0]=n}e.setState({serviceData:i},(function(){e.myRef.draw()}))};t.addEventListener("mousedown",(function(n){if(2!==n.button){var r=[n.layerX,n.layerY];if(0===e.state.serviceData.length){e.count++;var s=[[].concat(r),[].concat(r),[].concat(r),[].concat(r)];e.setState({serviceData:s},(function(){e.myRef.draw()}))}t.addEventListener("mousemove",i)}})),t.addEventListener("mouseup",(function(e){t.removeEventListener("mousemove",i)})),t.oncontextmenu=function(e){e.preventDefault()}}},{key:"setPolygon",value:function(){var e=this;this.polygonCount=0;var t=document.getElementById(this.myRef.state.id);t.onclick=function(t){var i=t.layerX,n=t.layerY,r=e.state.serviceData;r.push([i,n]),e.setState({serviceData:r},(function(){e.myRef.draw()}))},t.oncontextmenu=function(i){i.preventDefault(),2===i.button&&(0==e.polygonCount&&(e.polygonCount++,e.sendFather(e.state.serviceData)),t.onclick=null)}}},{key:"change",value:function(e){this.sendFather(e)}},{key:"sendFather",value:function(e){"true"!==this.state.disabled&&this.props.change(e)}},{key:"render",value:function(){var e=this,t=this.state.serviceData;return r.a.createElement(Qe,{ref:function(t){e.myRef=t},serviceData:t,change:function(t){return e.change(t)}})}}])&&Ze(t.prototype,i),n&&Ze(t,n),a}(n.Component);function nt(e){return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rt(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function st(e,t){return(st=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function at(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=lt(e);if(t){var r=lt(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return ot(this,i)}}function ot(e,t){return!t||"object"!==nt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ht=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&st(e,t)}(a,e);var t,i,n,s=at(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=s.call(this)).state={id:(new Date).getTime()+"waiceng",list:[]},e}return t=a,(i=[{key:"componentDidMount",value:function(){this.selectArea()}},{key:"clickIt",value:function(){var e=this.state.list;0===e.length?e.push({id:1,mode:"polygon"}):this.refs[e[e.length-1].id+e[e.length-1].mode].isNull()?console.log("画布为空"):e[e.length-1].serviceData?"polygon"===e[e.length-1].mode?e.push({id:e.length,mode:"react"}):e.push({id:e.length,mode:"polygon"}):console.log("没有保存"),this.setState({list:e})}},{key:"change",value:function(e){var t=this.state.list;t[t.length-1].serviceData=e}},{key:"selectArea",value:function(){var e=this,t=this.state,i=t.list,n=t.id;document.getElementById(n).onclick=function(t){for(var n=t.layerX,r=t.layerY,s=0;s<i.length;s++)if(i[s].serviceData){if(e.isInPolygon([n,r],i[s].serviceData)){var a=e.refs[i[s].id+i[s].mode].myRef.state.id;document.getElementById(a).style.zIndex=99;break}a=e.refs[i[s].id+i[s].mode].myRef.state.id,document.getElementById(a).style.zIndex=0}else console.log("正在绘画中")}}},{key:"isInPolygon",value:function(e,t){var i,n,r,s=0,a=t.length;n=t[0];for(var o=1;o<=a;o++)r=t[o%a],e[0]>Math.min(n[0],r[0])&&e[0]<=Math.max(n[0],r[0])&&e[1]<=Math.max(n[1],r[1])&&n[0]!=r[0]&&(i=(e[0]-n[0])*(r[1]-n[1])/(r[0]-n[0])+n[1],(n[1]==r[1]||e[1]<=i)&&s++),n=r;return s%2!=0}},{key:"render",value:function(){var e=this,t=this.state,i=t.id,n=t.list;return r.a.createElement("div",{id:i,style:{width:"100%",height:"100%",position:"relative"}},r.a.createElement("button",{style:{position:"absolute",right:"-20px",top:"0"},onClick:function(){return e.clickIt()}},"添加"),n.map((function(t,i){return r.a.createElement(it,{key:i,ref:t.id+t.mode,mode:t.mode,change:function(t){return e.change(t)}})})))}}])&&rt(t.prototype,i),n&&rt(t,n),a}(n.Component)}])}));
36 36 \ No newline at end of file
... ...
package.json
1 1 {
2 2 "name": "zzreact",
3   - "version": "1.0.12",
  3 + "version": "1.0.13",
4 4 "description": "react中使用的组件更新适配问题",
5 5 "main": "dist/index.js",
6 6 "files": [
... ...
src/components/areaSelete/areaSelete.js
... ... @@ -15,7 +15,7 @@ export default class AreaSelete extends Component {
15 15 lineColor: "#28B1D9",//线的颜色
16 16 lineWidth: 2,//线的宽度
17 17 areaColor: "rgba(40, 177, 217, 0.2)",//选中区域颜色
18   - disabled: "false",//判断是否可以移动
  18 + disabled: "false",//判断是否可以移动 false是可以移动
19 19 title: "",//文字的内容
20 20 titleColor: "#000",//文字的颜色
21 21 titleFont: "14px bold 黑体",//文字的字体
... ... @@ -46,7 +46,7 @@ export default class AreaSelete extends Component {
46 46 }
47 47 componentDidMount() {
48 48 this.init()
49   - window.addEventListener("resize",()=>{
  49 + window.addEventListener("resize", () => {
50 50 this.init()
51 51 })
52 52 }
... ... @@ -132,15 +132,16 @@ export default class AreaSelete extends Component {
132 132 var x = 0;
133 133 var y = 99999999;
134 134 for (var i = 0; i < data.length; i++) {
135   - if (parseFloat(data[i][0]) > x) x = data[i][0];
136   - if (parseFloat(data[i][1]) < y) y = data[i][1];
  135 + if (parseFloat(data[i][0]) > x) x = parseFloat(data[i][0]);
  136 + if (parseFloat(data[i][1]) < y) y = parseFloat(data[i][1]);
137 137 }
  138 +
138 139 title.split(/\n/).forEach((item, index) => {
139 140 ctx.fillText(item, x + (position[0] || 15), y + (position[1] || 15) + index * lineHeight);
140 141 })
141 142 }
142 143 clickMove() {//鼠标点击移动
143   - let { id, serviceData, disabled } = this.state;
  144 + let { id, serviceData } = this.state;
144 145 var canvasEl = document.getElementById(id)
145 146 canvasEl.onclick = (e) => {
146 147 var left = e.layerX
... ... @@ -151,9 +152,7 @@ export default class AreaSelete extends Component {
151 152 this.setData({
152 153 serviceData: serviceData
153 154 })
154   - if (disabled === "true") {
155   - this.props.change(serviceData)
156   - }
  155 + this.sendFather(serviceData)
157 156 } else {
158 157 this.selectBox(left, top)
159 158 this.setData({
... ... @@ -163,14 +162,18 @@ export default class AreaSelete extends Component {
163 162 }
164 163 }
165 164 mouseMove() {//鼠标移动
166   - let { id, serviceData, disabled } = this.state;
  165 + let { id } = this.state;
  166 + var serviceDataw = ""
167 167 var canvasEl = document.getElementById(id)
168 168 canvasEl.onmousedown = (e) => {
  169 + var {serviceData} = this.state;
  170 + serviceDataw = serviceData
169 171 var left = e.layerX
170 172 var top = e.layerY
171 173 if (this.selectBox(left, top)) {
172 174 canvasEl.onmousemove = (e) => {
173 175 serviceData[this.selectedIndex] = [e.layerX, e.layerY];
  176 + serviceDataw = serviceData
174 177 this.setData({
175 178 serviceData: serviceData
176 179 })
... ... @@ -181,19 +184,17 @@ export default class AreaSelete extends Component {
181 184 canvasEl.onmousemove = null;
182 185 this.selectedIndex = null;
183 186 this.setData({
184   - serviceData: serviceData
  187 + serviceData: this.state.serviceData
185 188 })
186 189 var left = e.layerX
187 190 var top = e.layerY
188 191 if (this.selectBox(left, top)) {
189   - if (disabled === "true") {
190   - this.props.change(serviceData)
191   - }
  192 + this.sendFather(this.state.serviceData)
192 193 }
193 194 };
194 195 }
195 196 touchMove() {//手指触摸移动
196   - let { id, serviceData, disabled } = this.state;
  197 + let { id, serviceData } = this.state;
197 198 var canvasEl = document.getElementById(id)
198 199 var parentEl = canvasEl.parentNode;
199 200 var pingmuTop = parentEl.getBoundingClientRect().top; //画布距离屏幕上面的距离 这里要计算出触摸距离当前画布的距离好进行移动
... ... @@ -219,9 +220,7 @@ export default class AreaSelete extends Component {
219 220 var left = e.changedTouches[0].pageX - pingmuLeft
220 221 var top = e.changedTouches[0].pageY - pingmuTop
221 222 if (this.selectBox(left, top)) {
222   - if (disabled === "true") {
223   - this.props.change(serviceData)
224   - }
  223 + this.sendFather(serviceData)
225 224 }
226 225 };
227 226 }
... ... @@ -232,13 +231,21 @@ export default class AreaSelete extends Component {
232 231 for (var i = 0; i < serviceData.length; i++) {
233 232 var dianX = serviceData[i][0];
234 233 var dianY = serviceData[i][1];
235   - if ((dianX - x) * (dianX - x) + (dianY - y) * (dianY - y) < rangeMax * rangeMax) {
  234 + if ((((dianX - x) * (dianX - x)) + ((dianY - y) * (dianY - y))) < (rangeMax * rangeMax)) {
236 235 this.selectedIndex = i;//选中后返回下标然后返回真
237   - return true
  236 + break;
238 237 }
239 238 }
240 239 if (i == serviceData.length) {
241 240 return false
  241 + }else{
  242 +
  243 + return true
  244 + }
  245 + }
  246 + sendFather(serviceData) {//向父亲发送里面的值
  247 + if (this.state.disabled !== "true") {
  248 + this.props.change(serviceData)
242 249 }
243 250 }
244 251 setData(data) {//设置值发生变化重新画
... ... @@ -248,6 +255,6 @@ export default class AreaSelete extends Component {
248 255 }
249 256 render() {
250 257 let { id, width, height } = this.state;
251   - return (<canvas style={{position:"absolute"}} id={id} width={width} height={height}></canvas>)
  258 + return (<canvas style={{ position: "absolute",top:0,left:0 }} id={id} width={width} height={height}></canvas>)
252 259 }
253 260 }
254 261 \ No newline at end of file
... ...
src/components/funAreaSelect/funAreaSelect.css deleted
1   -.funAreaSelectCss{
2   - position: relative;
3   - width: 100%;
4   - height: 100%;
5   -}
6   -.funAreaSelectCss canvas{
7   - position: absolute;
8   - left: 0;
9   - top: 0;
10   -}
11 0 \ No newline at end of file
src/components/funAreaSelect/funAreaSelect.js
1 1 import React, { Component } from "react"
2 2 import AreaSelect from "../areaSelete/areaSelete"
3   -import "./funAreaSelect.css"
4   -export default class FlvCom extends Component {
  3 +export default class FunAreaSelect extends Component {
5 4 constructor(props) {
6 5 super(props);
7 6 this.state = {
  7 + id:new Date().getTime()+"fun",
8 8 serviceData: [],
9   - mode:"polygon",//polygon react
  9 + mode: "polygon",//polygon react
  10 + disabled: "false",//判断是否可以移动 false是可以移动
  11 + circleRadius: 5,//圆半径
  12 + circleBorderWidth: 2,//圆边线的半径宽
  13 + circleBorderColor: "#28B1D9",//圆边线的颜色
  14 + circleInColor: "#28B1D9",//圆里里面的颜色
  15 + circleSelectColor: "#FFF",
  16 + lineColor: "#28B1D9",//线的颜色
  17 + lineWidth: 2,//线的宽度
  18 + areaColor: "rgba(40, 177, 217, 0.2)",//选中区域颜色
  19 + disabled: "false",//判断是否可以移动 false是可以移动
  20 + title: "",//文字的内容
  21 + titleColor: "#000",//文字的颜色
  22 + titleFont: "14px bold 黑体",//文字的字体
  23 + titleLineHeight: "",//文字的行高
  24 + position: [10, 10],//文字的位置
10 25 }
11 26 }
12   - static getDerivedStateFromProps(props) {
13   -
14   - return null;
15   - }
16   - componentDidUpdate() {
17   -
  27 + static getDerivedStateFromProps(props, state) {
  28 + var obj = {};
  29 + for (var key in props) {
  30 + if (props[key] && props[key] !== state[key]) {
  31 + obj[key] = props[key]
  32 + }
  33 + }
  34 + if (Object.keys(obj).length > 0) {
  35 + return obj;
  36 + } else {
  37 + return null
  38 + }
18 39 }
19 40 componentDidMount() {
20   - let {mode} = this.state;
21   - if(mode==="react"){
  41 + let { mode } = this.state;
  42 + console.log(mode)
  43 + if (mode === "react") {
22 44 this.setReact()
23   - }else{
  45 + } else if (mode === "polygon") {
  46 + this.setPolygon()
  47 + } else {
24 48 this.setPolygon()
25 49 }
26 50 }
  51 + isNull() {//判断画布是否为空
  52 + let {id} = this.state;
  53 + var canvasEl = document.getElementById(this[id].state.id)//获取canvas的id 这id是动态的所以要用ref进行获取
  54 + var blank = document.createElement('canvas');//系统获取一个空canvas对象
  55 + blank.width = canvasEl.width;
  56 + blank.height = canvasEl.height;
  57 + return canvasEl.toDataURL() == blank.toDataURL();//比较值相等则为空
  58 + }
27 59 setReact() {//设置矩形
28   - this.count = -1;//用来判断是否生成了一个框
29   - var canvasEl = document.getElementById(this.myRef.state.id)//获取canvas的id 这id是动态的所以要用ref进行获取
  60 + let {id} = this.state;
  61 + this.count = 0;//用来判断是否生成了一个框
  62 + var canvasEl = document.getElementById(this[id].state.id)//获取canvas的id 这id是动态的所以要用ref进行获取
30 63 var mousemoveFc = (e) => {
31   - var serviceData = JSON.parse(JSON.stringify(this.state.serviceData));
  64 + var serviceData = this.state.serviceData;
32 65 var left1 = e.layerX;
33 66 var top1 = e.layerY;
34 67 if (this.count === 0) {//如果是第一次画就正常
... ... @@ -36,9 +69,9 @@ export default class FlvCom extends Component {
36 69 serviceData[2] = [left1, top1];
37 70 serviceData[3][0] = left1;
38 71 } else {//不是第一次,也就是有框了这时候你直接就可以拖拽
39   - if (this.myRef.selectedIndex||this.myRef.selectedIndex===0) {
40   - serviceData[this.myRef.selectedIndex] = [left1, top1]
41   - switch (this.myRef.selectedIndex) {
  72 + if (this[id].selectedIndex || this[id].selectedIndex === 0) {
  73 + serviceData[this[id].selectedIndex] = [left1, top1]
  74 + switch (this[id].selectedIndex) {
42 75 case 0:
43 76 serviceData[1][0] = left1;
44 77 serviceData[3][1] = top1;
... ... @@ -56,37 +89,50 @@ export default class FlvCom extends Component {
56 89 serviceData[2][0] = left1;
57 90 break;
58 91 }
  92 + this.props.change(serviceData)
59 93 }
60 94 }
61 95 this.setState({
62 96 serviceData
63 97 }, () => {
64   - this.myRef.draw()
  98 + this[id].draw()
65 99 })
66 100 }
67 101 canvasEl.addEventListener("mousedown", (e) => {
  102 + if (e.button === 2) return
68 103 var left = e.layerX;
69 104 var top = e.layerY;
70 105 var arr = [left, top]
71   - this.count++;//这个参数每次点击就加加这样就可以判断上面是否画图了
72 106 if (this.state.serviceData.length === 0) {//刚按下的时候进行初始化
  107 + this.count++;//这个参数每次点击就加加这样就可以判断上面是否画图了
73 108 let serviceData = [[...arr], [...arr], [...arr], [...arr]]
74 109 this.setState({
75 110 serviceData
76 111 }, () => {
77   - this.myRef.draw();
  112 + this[id].draw();
78 113 })
  114 + canvasEl.addEventListener("mousemove", mousemoveFc)
  115 + }else{
  116 + if(this[id].selectBox(left, top)){
  117 + this.count++;
  118 + canvasEl.addEventListener("mousemove", mousemoveFc)
  119 + }
79 120 }
80   - canvasEl.addEventListener("mousemove", mousemoveFc)
81 121 })
82 122 canvasEl.addEventListener("mouseup", (e) => {
83 123 canvasEl.removeEventListener("mousemove", mousemoveFc)
84 124 })
85   -
  125 + canvasEl.oncontextmenu = (e) => { e.preventDefault() }
86 126 }
87 127 setPolygon() {//设置多边形
88   - var canvasEl = document.getElementById(this.myRef.state.id)//获取canvas的id 这id是动态的所以要用ref进行获取
89   - canvasEl.onclick = (e) => {
  128 + let {id} = this.state
  129 + if (this.state.serviceData.length > 1) {
  130 + this.serviceDataFlag = true//用来看外面传来的是否有数据,有数据就不用在添加
  131 + } else {
  132 + this.polygonCount = 0
  133 + }
  134 + var canvasEl = document.getElementById(this[id].state.id)//获取canvas的id 这id是动态的所以要用ref进行获取
  135 + var onclickRE = (e)=>{
90 136 var left = e.layerX;
91 137 var top = e.layerY;
92 138 let { serviceData } = this.state;
... ... @@ -94,25 +140,111 @@ export default class FlvCom extends Component {
94 140 this.setState({
95 141 serviceData
96 142 }, () => {
97   - this.myRef.draw()
  143 + this[id].draw()
98 144 })
99 145 }
  146 + if (!this.serviceDataFlag) {
  147 + canvasEl.addEventListener("click",onclickRE);
  148 + }
  149 + // canvasEl.onclick = (e) => {
  150 + // var left = e.layerX;
  151 + // var top = e.layerY;
  152 + // if (!this.serviceDataFlag) {
  153 + // let { serviceData } = this.state;
  154 + // serviceData.push([left, top])
  155 + // this.setState({
  156 + // serviceData
  157 + // }, () => {
  158 + // this.myRef.draw()
  159 + // })
  160 + // }
  161 + // }
100 162 canvasEl.oncontextmenu = (e) => {
101 163 e.preventDefault()
102 164 if (e.button === 2) {
103   - canvasEl.onclick = null
  165 + if (this.polygonCount == 0) {//这里判断一下防止点击多右键多次传值
  166 + this.polygonCount++
  167 + console.log(this.state.serviceData)
  168 + this.sendFather(this.state.serviceData)
  169 + }
  170 + canvasEl.removeEventListener("click",onclickRE);
104 171 }
105 172 }
106 173 }
107   - change() {
108   -
  174 + isInPolygon(checkPoint, polygonPoints, childEl) {//判断多边形是否在点内
  175 + var counter = 0;
  176 + var xinters;
  177 + var p1, p2;
  178 + var pointCount = polygonPoints.length;
  179 + p1 = polygonPoints[0];
  180 + for (var i = 1; i <= pointCount; i++) {
  181 + p2 = polygonPoints[i % pointCount];
  182 + if (
  183 + checkPoint[0] > Math.min(p1[0], p2[0]) &&
  184 + checkPoint[0] <= Math.max(p1[0], p2[0])
  185 + ) {
  186 + if (checkPoint[1] <= Math.max(p1[1], p2[1])) {
  187 + if (p1[0] != p2[0]) {
  188 + xinters =
  189 + (checkPoint[0] - p1[0]) *
  190 + (p2[1] - p1[1]) /
  191 + (p2[0] - p1[0]) +
  192 + p1[1];
  193 + if (p1[1] == p2[1] || checkPoint[1] <= xinters) {
  194 + counter++;
  195 + }
  196 + }
  197 + }
  198 + }
  199 + p1 = p2;
  200 + }
  201 + if (counter % 2 == 0) {
  202 + if (childEl.selectBox(checkPoint[0], checkPoint[1])) {
  203 + return true;
  204 + }
  205 + return false;
  206 + } else {
  207 + return true;
  208 + }
  209 + }
  210 + change(val) {//当改变的时候在向父组件发送值
  211 + this.sendFather(val)
  212 + }
  213 + sendFather(serviceData) {//向父组件发送变化的值
  214 + if (this.state.disabled !== "true") {
  215 + this.props.change(serviceData)
  216 + }
109 217 }
110 218 render() {
111   - let { serviceData } = this.state;
112   - return (
113   - <div className="funAreaSelectCss">
114   - <AreaSelect ref={(inst) => { this.myRef = inst }} serviceData={serviceData} change={(val) => this.change(val)}></AreaSelect>
115   - </div>
116   - )
  219 + let { serviceData, disabled, circleRadius,
  220 + circleBorderWidth,
  221 + circleBorderColor,
  222 + circleInColor,
  223 + circleSelectColor,
  224 + lineColor,
  225 + lineWidth,
  226 + areaColor,
  227 + title,
  228 + titleColor,
  229 + titleFont,
  230 + titleLineHeight,
  231 + position,id } = this.state
  232 + return <AreaSelect
  233 + serviceData={serviceData}
  234 + disabled={disabled}
  235 + circleRadius={circleRadius}
  236 + circleBorderWidth={circleBorderWidth}
  237 + circleBorderColor={circleBorderColor}
  238 + circleSelectColor={circleSelectColor}
  239 + circleInColor={circleInColor}
  240 + lineColor={lineColor}
  241 + lineWidth={lineWidth}
  242 + areaColor={areaColor}
  243 + title={title}
  244 + titleColor={titleColor}
  245 + titleFont={titleFont}
  246 + titleLineHeight={titleLineHeight}
  247 + position={position}
  248 + ref={(inst) => { this[id] = inst }} change={(val) => this.change(val)}></AreaSelect>
117 249 }
118 250 }
119 251 \ No newline at end of file
... ...
src/components/funAreaSelectPlus/funAreaSelectPlus.js 0 → 100644
  1 +import React, { Component } from 'react';
  2 +import FunAreaSelect from "../funAreaSelect/funAreaSelect.js"
  3 +export default class FunAreaSelectPlus extends Component {
  4 + constructor() {
  5 + super();
  6 + this.state = {
  7 + id: new Date().getTime() + "waiceng",
  8 + list: [],
  9 + disabled: "false",//判断是否可以移动 false是可以移动
  10 + circleRadius: 5,//圆半径
  11 + circleBorderWidth: 2,//圆边线的半径宽
  12 + circleBorderColor: "#28B1D9",//圆边线的颜色
  13 + circleInColor: "#28B1D9",//圆里里面的颜色
  14 + circleSelectColor: "#FFF",
  15 + lineColor: "#28B1D9",//线的颜色
  16 + lineWidth: 2,//线的宽度
  17 + areaColor: "rgba(40, 177, 217, 0.2)",//选中区域颜色
  18 + disabled: "false",//判断是否可以移动 false是可以移动
  19 + title: "",//文字的内容
  20 + titleColor: "#000",//文字的颜色
  21 + titleFont: "14px bold 黑体",//文字的字体
  22 + titleLineHeight: "",//文字的行高
  23 + position: [10, 10],//文字的位置
  24 + }
  25 + }
  26 + static getDerivedStateFromProps(props, state) {
  27 + var obj = {};
  28 + for (var key in props) {
  29 + if (props[key] && props[key] !== state[key]) {
  30 + if(typeof props[key] === "object"){
  31 + obj[key] = JSON.parse(JSON.stringify(props[key]))
  32 + }else{
  33 + obj[key] = props[key]
  34 + }
  35 +
  36 + }
  37 + }
  38 + if (Object.keys(obj).length > 0) {
  39 + return obj;
  40 + } else {
  41 + return null
  42 + }
  43 + }
  44 + componentDidMount() {
  45 + this.selectIndex = this.state.list.length-1;
  46 + this.selectArea();
  47 + }
  48 + clickIt() {
  49 + let { list } = this.state;
  50 + if (list.length === 0) {
  51 + list.push({
  52 + id: new Date().getTime(),
  53 + mode: "polygon"
  54 + })
  55 + } else {
  56 + var boo = this.refs[list[list.length - 1].id + list[list.length - 1].mode].isNull()//判断画布是否为空
  57 + if (boo) {//画布为空
  58 + console.log("画布为空")
  59 + } else if (!list[list.length - 1].serviceData) {
  60 + console.log("没有保存")
  61 + } else {
  62 + this.selectIndex = list.length;
  63 + if (list[list.length - 1].mode === "polygon") {
  64 + list.push({
  65 + id: new Date().getTime(),
  66 + mode: "react"
  67 + })
  68 + } else {
  69 + list.push({
  70 + id: new Date().getTime(),
  71 + mode: "polygon"
  72 + })
  73 + }
  74 + }
  75 + }
  76 + this.setState({
  77 + list: list
  78 + },()=>{
  79 + this.props.change(list)
  80 + })
  81 + }
  82 + change(val) {//保存后把最后一个放入这个list中储存,这样可以判断是否储存,点击的时候是否在点内
  83 + let { list } = this.state;
  84 + console.log(this.selectIndex)
  85 + list[this.selectIndex].serviceData = JSON.parse(JSON.stringify(val));
  86 + this.list = list
  87 + this.setState({ list: list})
  88 + this.props.change(list)
  89 + }
  90 + selectArea() {//选中区域z-index应该增大放在最上面
  91 + let { id } = this.state;
  92 + var waiceng = document.getElementById(id);
  93 + waiceng.onclick = (e) => {
  94 + let {list} = this.state;
  95 + // let list = this.list
  96 + var left = e.layerX
  97 + var top = e.layerY
  98 + this.indexflag = false;//这里是为了防止点击到重复的区域导致无法选区的情况
  99 + for (var i = 0; i < list.length; i++) {
  100 + if (list[i].serviceData) {
  101 + var myRef = this.refs[list[i].id + list[i].mode].state.id;//获取内部id
  102 + if (this.isInPolygon([left, top], JSON.parse(JSON.stringify(list[i].serviceData)), this.refs[list[i].id + list[i].mode][myRef])) {//选中之后放在最上层
  103 + var id = this.refs[list[i].id + list[i].mode][myRef].state.id
  104 + if (this.indexflag) {
  105 + document.getElementById(id).style.zIndex = 0
  106 + } else {
  107 + document.getElementById(id).style.zIndex = 99
  108 + this.indexflag = true
  109 + }
  110 + this.selectIndex = i;
  111 + } else {
  112 + var id = this.refs[list[i].id + list[i].mode][myRef].state.id
  113 + document.getElementById(id).style.zIndex = 0
  114 + }
  115 + }
  116 + }
  117 + }
  118 + }
  119 + isInPolygon(checkPoint, polygonPoints, childEl) {//判断多边形是否在点内
  120 + var counter = 0;
  121 + var xinters;
  122 + var p1, p2;
  123 + var pointCount = polygonPoints.length;
  124 + p1 = polygonPoints[0];
  125 + for (var i = 1; i <= pointCount; i++) {
  126 + p2 = polygonPoints[i % pointCount];
  127 + if (
  128 + checkPoint[0] > Math.min(p1[0], p2[0]) &&
  129 + checkPoint[0] <= Math.max(p1[0], p2[0])
  130 + ) {
  131 + if (checkPoint[1] <= Math.max(p1[1], p2[1])) {
  132 + if (p1[0] != p2[0]) {
  133 + xinters =
  134 + (checkPoint[0] - p1[0]) *
  135 + (p2[1] - p1[1]) /
  136 + (p2[0] - p1[0]) +
  137 + p1[1];
  138 + if (p1[1] == p2[1] || checkPoint[1] <= xinters) {
  139 + counter++;
  140 + }
  141 + }
  142 + }
  143 + }
  144 + p1 = p2;
  145 + }
  146 + if (counter % 2 == 0) {
  147 + if (childEl.selectBox(checkPoint[0], checkPoint[1])) {
  148 + return true;
  149 + }
  150 + return false;
  151 + } else {
  152 + return true;
  153 + }
  154 + }
  155 + render() {
  156 + let { id, list, disabled, circleRadius,
  157 + circleBorderWidth,
  158 + circleBorderColor,
  159 + circleInColor,
  160 + circleSelectColor,
  161 + lineColor,
  162 + lineWidth,
  163 + areaColor,
  164 + title,
  165 + titleColor,
  166 + titleFont,
  167 + titleLineHeight,
  168 + position } = this.state;
  169 + return (
  170 + <div id={id} style={{ width: "100%", height: "100%", position: "relative" }}>
  171 + <button style={{ position: "absolute", right: "-20px", top: "0" }} onClick={() => this.clickIt()}>添加</button>
  172 + {
  173 + list.map((item, index) => {
  174 + return <FunAreaSelect
  175 + disabled={disabled}
  176 + circleRadius={circleRadius}
  177 + circleBorderWidth={circleBorderWidth}
  178 + circleBorderColor={circleBorderColor}
  179 + circleSelectColor={circleSelectColor}
  180 + circleInColor={circleInColor}
  181 + lineColor={lineColor}
  182 + lineWidth={lineWidth}
  183 + areaColor={areaColor}
  184 + title={title}
  185 + titleColor={titleColor}
  186 + titleFont={titleFont}
  187 + titleLineHeight={titleLineHeight}
  188 + position={position} key={index} serviceData={item.serviceData} ref={item.id + item.mode} mode={item.mode} change={(val) => this.change(val)}></FunAreaSelect>
  189 + })
  190 + }
  191 + </div>)
  192 + }
  193 +}
0 194 \ No newline at end of file
... ...
src/components/index.js
... ... @@ -2,4 +2,5 @@ export { default as FlvCom } from &#39;./flvCom/flvCom.js&#39;;
2 2 export { default as Timer } from './timer/timer.js';
3 3 export { default as ImgCom } from './imgCom/imgCom.js';
4 4 export { default as AreaSelete } from './areaSelete/areaSelete.js';
5   -export { default as FunAreaSelect } from './funAreaSelect/funAreaSelect.js';
6 5 \ No newline at end of file
  6 +export { default as FunAreaSelect } from './funAreaSelect/funAreaSelect.js';
  7 +export { default as FunAreaSelectPlus } from './funAreaSelectPlus/funAreaSelectPlus.js';
7 8 \ No newline at end of file
... ...
src/index.js
1 1 import React, { Component } from 'react';
2 2 import ReactDOM from 'react-dom';
3   -import { FlvCom, Timer, ImgCom, AreaSelete, FunAreaSelect } from "./components/index"
  3 +import { FlvCom, Timer, ImgCom, AreaSelete, FunAreaSelect, FunAreaSelectPlus } from "./components/index"
4 4 // import {FlvCom,Timer,ImgCom,AreaSelete} from "../dist/index.js"
5 5 class App extends Component {
6 6 constructor() {
... ... @@ -8,55 +8,57 @@ class App extends Component {
8 8 this.state = {
9 9 imgUrl: "C:/imagelib/imgalarm/2020/12/21/192.168.166.155/192.168.166.155_00_20201221181716755_ALARM_210_9891_HEL_SNAP.jpg",
10 10 serviceData: [[431, 55], [479, 55], [481, 107], [435, 107]],
11   - // arr: [
12   - // {
13   - // id: "1", title: "点位1", serviceData: [
14   - // ["95.16", "13.60"],
15   - // ["126.40", "13.37"],
16   - // ["127.37", "28.82"],
17   - // ["95.65", "28.59"]]
18   - // },
19   - // { id: "2", title: "点位2", serviceData:[
20   - // ["210.34", "12.68"],
21   - // ["233.76", "12.68"],
22   - // ["234.74", "24.67"],
23   - // ["212.29", "24.67"]
24   - // ] },
25   - // { id: "3", title: "点位3", serviceData:[
26   - // ["256.21", "29.51"],
27   - // ["283.05", "29.51"],
28   - // ["282.08", "41.50"],
29   - // ["257.19", "41.50"]
30   - // ] },
31   - // ],
32   - serviceData2: []
  11 + arr: [
  12 + {
  13 + id: "1", title: "点位1", num: 5, serviceData: [
  14 + ["95.16", "13.60"],
  15 + ["126.40", "13.37"],
  16 + ["127.37", "28.82"],
  17 + ["95.65", "28.59"]]
  18 + },
  19 + {
  20 + id: "2", title: "点位2", num: 5, serviceData: [
  21 + ["210.34", "12.68"],
  22 + ["233.76", "12.68"],
  23 + ["234.74", "24.67"],
  24 + ["212.29", "24.67"]
  25 + ]
  26 + },
  27 + {
  28 + id: "3", title: "点位3", num: 5, serviceData: [
  29 + ["256.21", "29.51"],
  30 + ["283.05", "29.51"],
  31 + ["282.08", "41.50"],
  32 + ["257.19", "41.50"]
  33 + ]
  34 + },
  35 + ],
  36 + serviceData2: [],
  37 + list: [{ "id": 1608808157114, "mode": "polygon", "serviceData": [[323, 76], [336, 195], [617, 151], [452, 45]] }, { "id": 1608808178878, "mode": "react", "serviceData": [[615, 379], [615, 254], [309, 254], [309, 379]] }]
33 38 }
34 39 }
35   - clickIt() {
36   -
  40 + changeSelect(val) {//保存后把最后一个放入这个list中储存,这样可以判断是否储存,点击的时候是否在点内
37 41 this.setState({
38   - serviceData2: [[20, 21], [20, 80]]
  42 + list:val
39 43 })
40 44 }
41   - change(val) {
42   - // console.log(val)
43   - }
44 45 render() {
45   - let { imgUrl, serviceData, serviceData2,arr } = this.state;
  46 + let { imgUrl, serviceData, serviceData2, arr, list } = this.state;
46 47 return (
47 48 <div style={{
48 49 width: "1000px", height: "100%"
49 50 }}>
50   - <button onClick={() => this.clickIt()}>切换</button>
51   - <div style={{ width: "81.2%", height: "80%" }}>
52   - <FunAreaSelect></FunAreaSelect>
53   - {/* {
54   - arr.map(item=>{
55   - return <AreaSelete key={item.id} title={item.title} serviceData={item.serviceData} change={(val) => this.change(val)}></AreaSelete>
  51 + <FunAreaSelectPlus list={list} change={(val) => { this.changeSelect(val) }}></FunAreaSelectPlus>
  52 + {/* <button onClick={() => this.clickIt()}>添加</button> */}
  53 + {/* <div id="waiceng" style={{ width: "81.2%", height: "80%", position: "relative" }}>
  54 + {
  55 + arr.map(item => {
  56 + return (<AreaSelete key={item.id}
  57 + serviceData={item.serviceData}
  58 + title={item.title+"\n偏移量:"+item.num} change={(val) => this.changeSelect(val)}></AreaSelete>)
56 59 })
57   - } */}
58   - {/* <AreaSelete ref={(inst) => { this.myRef = inst } } serviceData={serviceData2} change={(val)=>this.change(val)}></AreaSelete> */}
59   - </div>
  60 + }
  61 + </div> */}
60 62 {/* <ImgCom httpImg="http://112.125.25.140:8083/syboxms/getImgDataByPath" imgUrl={imgUrl}></ImgCom> */}
61 63 {/* <FlvCom vidoeUrl=""></FlvCom>
62 64 <Timer className="timerComCssss" type="YYYY-MM-DD HH:mm:ss"></Timer> */}
... ...