@volcengine/veplayer-plugin 2.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +1 -0
  2. package/esm/flv.d.ts +3 -0
  3. package/esm/hls.d.ts +3 -0
  4. package/esm/index.d.ts +6 -0
  5. package/esm/index.development.css +63 -0
  6. package/esm/index.development.js +83150 -0
  7. package/esm/index.production.css +1 -0
  8. package/esm/index.production.js +26 -0
  9. package/esm/mp4.d.ts +3 -0
  10. package/esm/rtm.d.ts +3 -0
  11. package/esm/shaka.d.ts +3 -0
  12. package/esm/veplayer.plugin.flv.development.js +17622 -0
  13. package/esm/veplayer.plugin.flv.production.js +2 -0
  14. package/esm/veplayer.plugin.hls.development.js +21398 -0
  15. package/esm/veplayer.plugin.hls.production.js +2 -0
  16. package/esm/veplayer.plugin.mp4.development.js +33148 -0
  17. package/esm/veplayer.plugin.mp4.production.js +2 -0
  18. package/esm/veplayer.plugin.rtm.development.js +5469 -0
  19. package/esm/veplayer.plugin.rtm.production.js +2 -0
  20. package/esm/veplayer.plugin.shaka.development.js +15890 -0
  21. package/esm/veplayer.plugin.shaka.production.js +20 -0
  22. package/esm/veplayer.plugin.time.shift.development.css +63 -0
  23. package/esm/veplayer.plugin.time.shift.development.js +339 -0
  24. package/esm/veplayer.plugin.time.shift.production.css +1 -0
  25. package/esm/veplayer.plugin.time.shift.production.js +2 -0
  26. package/esm/veplayer.plugin.xgvideo.development.js +19094 -0
  27. package/esm/veplayer.plugin.xgvideo.production.js +2 -0
  28. package/esm/xgvideo.d.ts +3 -0
  29. package/package.json +155 -0
  30. package/umd/flv.d.ts +3 -0
  31. package/umd/hls.d.ts +3 -0
  32. package/umd/index.d.ts +6 -0
  33. package/umd/index.development.js +82776 -0
  34. package/umd/index.production.js +1 -0
  35. package/umd/mp4.d.ts +3 -0
  36. package/umd/rtm.d.ts +3 -0
  37. package/umd/shaka.d.ts +3 -0
  38. package/umd/veplayer.plugin.flv.development.js +17625 -0
  39. package/umd/veplayer.plugin.flv.production.js +1 -0
  40. package/umd/veplayer.plugin.hls.development.js +21402 -0
  41. package/umd/veplayer.plugin.hls.production.js +1 -0
  42. package/umd/veplayer.plugin.mp4.development.js +33152 -0
  43. package/umd/veplayer.plugin.mp4.production.js +1 -0
  44. package/umd/veplayer.plugin.rtm.development.js +5473 -0
  45. package/umd/veplayer.plugin.rtm.production.js +1 -0
  46. package/umd/veplayer.plugin.shaka.development.js +15894 -0
  47. package/umd/veplayer.plugin.shaka.production.js +1 -0
  48. package/umd/veplayer.plugin.time.shift.development.css +63 -0
  49. package/umd/veplayer.plugin.time.shift.development.js +342 -0
  50. package/umd/veplayer.plugin.time.shift.production.css +1 -0
  51. package/umd/veplayer.plugin.time.shift.production.js +1 -0
  52. package/umd/veplayer.plugin.xgvideo.development.js +19098 -0
  53. package/umd/veplayer.plugin.xgvideo.production.js +1 -0
  54. package/umd/xgvideo.d.ts +3 -0
@@ -0,0 +1,2 @@
1
+ function _iterableToArrayLimit$1(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}function ownKeys$7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2$2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$7(Object(r),!0).forEach((function(t){_defineProperty$3(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys$7(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _regeneratorRuntime$1(){_regeneratorRuntime$1=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,o){var a=t&&t.prototype instanceof p?t:p,i=Object.create(a.prototype),s=new I(o||[]);return n(i,"_invoke",{value:b(e,r,s)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var $={};function p(){}function f(){}function d(){}var y={};c(y,a,(function(){return this}));var h=Object.getPrototypeOf,g=h&&h(h(O([])));g&&g!==t&&r.call(g,a)&&(y=g);var m=d.prototype=p.prototype=Object.create(y);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function o(n,a,i,s){var c=u(e[n],e,a);if("throw"!==c.type){var l=c.arg,$=l.value;return $&&"object"==typeof $&&r.call($,"__await")?t.resolve($.__await).then((function(e){o("next",e,i,s)}),(function(e){o("throw",e,i,s)})):t.resolve($).then((function(e){l.value=e,i(l)}),(function(e){return o("throw",e,i,s)}))}s(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=v(i,r);if(s){if(s===$)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===$)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function v(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,v(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),$;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,$;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,$):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,$)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return f.prototype=d,n(m,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:f,configurable:!0}),f.displayName=c(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},_(S.prototype),c(S.prototype,i,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new S(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},_(m),c(m,s,"Generator"),c(m,a,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=O,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,$):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),$},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),$}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),$}},e}function _typeof$3(e){return(_typeof$3="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 asyncGeneratorStep$1(e,t,r,n,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator$1(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){asyncGeneratorStep$1(a,n,o,i,s,"next",e)}function s(e){asyncGeneratorStep$1(a,n,o,i,s,"throw",e)}i(void 0)}))}}function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey$2(n.key),n)}}function _createClass$3(e,t,r){return t&&_defineProperties$3(e.prototype,t),r&&_defineProperties$3(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$3(e,t,r){return(t=_toPropertyKey$2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits$2(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$2(e,t)}function _getPrototypeOf$2(e){return(_getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf$2(e,t){return(_setPrototypeOf$2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized$2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$2(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$2(e)}function _createSuper$2(e){var t=_isNativeReflectConstruct$2();return function(){var r,n=_getPrototypeOf$2(e);if(t){var o=_getPrototypeOf$2(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$2(this,r)}}function _slicedToArray$1(e,t){return _arrayWithHoles$1(e)||_iterableToArrayLimit$1(e,t)||_unsupportedIterableToArray$3(e,t)||_nonIterableRest$1()}function _toConsumableArray$2(e){return _arrayWithoutHoles$2(e)||_iterableToArray$2(e)||_unsupportedIterableToArray$3(e)||_nonIterableSpread$2()}function _arrayWithoutHoles$2(e){if(Array.isArray(e))return _arrayLikeToArray$3(e)}function _arrayWithHoles$1(e){if(Array.isArray(e))return e}function _iterableToArray$2(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray$3(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray$3(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray$3(e,t):void 0}}function _arrayLikeToArray$3(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread$2(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive$2(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey$2(e){var t=_toPrimitive$2(e,"string");return"symbol"==typeof t?t:String(t)}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var check$1=function(e){return e&&e.Math==Math&&e},global$13=check$1("object"==typeof globalThis&&globalThis)||check$1("object"==typeof window&&window)||check$1("object"==typeof self&&self)||check$1("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor$1={},fails$1i=function(e){try{return!!e()}catch(e){return!0}},fails$1h=fails$1i,descriptors$1=!fails$1h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),fails$1g=fails$1i,functionBindNative$1=!fails$1g((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$8=functionBindNative$1,call$10=Function.prototype.call,functionCall$1=NATIVE_BIND$8?call$10.bind(call$10):function(){return call$10.apply(call$10,arguments)},objectPropertyIsEnumerable$1={},$propertyIsEnumerable$2={}.propertyIsEnumerable,getOwnPropertyDescriptor$h=Object.getOwnPropertyDescriptor,NASHORN_BUG$1=getOwnPropertyDescriptor$h&&!$propertyIsEnumerable$2.call({1:2},1);objectPropertyIsEnumerable$1.f=NASHORN_BUG$1?function(e){var t=getOwnPropertyDescriptor$h(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$2;var match$1,version$2,createPropertyDescriptor$f=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},NATIVE_BIND$7=functionBindNative$1,FunctionPrototype$7=Function.prototype,call$$=FunctionPrototype$7.call,uncurryThisWithBind$1=NATIVE_BIND$7&&FunctionPrototype$7.bind.bind(call$$,call$$),functionUncurryThis$1=NATIVE_BIND$7?uncurryThisWithBind$1:function(e){return function(){return call$$.apply(e,arguments)}},uncurryThis$1h=functionUncurryThis$1,toString$y=uncurryThis$1h({}.toString),stringSlice$e=uncurryThis$1h("".slice),classofRaw$5=function(e){return stringSlice$e(toString$y(e),8,-1)},uncurryThis$1g=functionUncurryThis$1,fails$1f=fails$1i,classof$x=classofRaw$5,$Object$a=Object,split$7=uncurryThis$1g("".split),indexedObject$1=fails$1f((function(){return!$Object$a("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$x(e)?split$7(e,""):$Object$a(e)}:$Object$a,isNullOrUndefined$h=function(e){return null==e},isNullOrUndefined$g=isNullOrUndefined$h,$TypeError$H=TypeError,requireObjectCoercible$i=function(e){if(isNullOrUndefined$g(e))throw $TypeError$H("Can't call method on "+e);return e},IndexedObject$9=indexedObject$1,requireObjectCoercible$h=requireObjectCoercible$i,toIndexedObject$l=function(e){return IndexedObject$9(requireObjectCoercible$h(e))},documentAll$5="object"==typeof document&&document.all,IS_HTMLDDA$1=void 0===documentAll$5&&void 0!==documentAll$5,documentAll_1$1={all:documentAll$5,IS_HTMLDDA:IS_HTMLDDA$1},$documentAll$3=documentAll_1$1,documentAll$4=$documentAll$3.all,isCallable$V=$documentAll$3.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$4}:function(e){return"function"==typeof e},isCallable$U=isCallable$V,$documentAll$2=documentAll_1$1,documentAll$3=$documentAll$2.all,isObject$I=$documentAll$2.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$U(e)||e===documentAll$3}:function(e){return"object"==typeof e?null!==e:isCallable$U(e)},global$12=global$13,isCallable$T=isCallable$V,aFunction$1=function(e){return isCallable$T(e)?e:void 0},getBuiltIn$u=function(e,t){return arguments.length<2?aFunction$1(global$12[e]):global$12[e]&&global$12[e][t]},uncurryThis$1f=functionUncurryThis$1,objectIsPrototypeOf$1=uncurryThis$1f({}.isPrototypeOf),getBuiltIn$t=getBuiltIn$u,engineUserAgent$1=getBuiltIn$t("navigator","userAgent")||"",global$11=global$13,userAgent$d=engineUserAgent$1,process$8=global$11.process,Deno$2=global$11.Deno,versions$1=process$8&&process$8.versions||Deno$2&&Deno$2.version,v8$1=versions$1&&versions$1.v8;v8$1&&(version$2=(match$1=v8$1.split("."))[0]>0&&match$1[0]<4?1:+(match$1[0]+match$1[1])),!version$2&&userAgent$d&&(!(match$1=userAgent$d.match(/Edge\/(\d+)/))||match$1[1]>=74)&&(match$1=userAgent$d.match(/Chrome\/(\d+)/))&&(version$2=+match$1[1]);var engineV8Version$1=version$2,V8_VERSION$7=engineV8Version$1,fails$1e=fails$1i,symbolConstructorDetection$1=!!Object.getOwnPropertySymbols&&!fails$1e((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$7&&V8_VERSION$7<41})),NATIVE_SYMBOL$8=symbolConstructorDetection$1,useSymbolAsUid$1=NATIVE_SYMBOL$8&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$s=getBuiltIn$u,isCallable$S=isCallable$V,isPrototypeOf$s=objectIsPrototypeOf$1,USE_SYMBOL_AS_UID$3=useSymbolAsUid$1,$Object$9=Object,isSymbol$b=USE_SYMBOL_AS_UID$3?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$s("Symbol");return isCallable$S(t)&&isPrototypeOf$s(t.prototype,$Object$9(e))},$String$9=String,tryToString$f=function(e){try{return $String$9(e)}catch(e){return"Object"}},isCallable$R=isCallable$V,tryToString$e=tryToString$f,$TypeError$G=TypeError,aCallable$v=function(e){if(isCallable$R(e))return e;throw $TypeError$G(tryToString$e(e)+" is not a function")},aCallable$u=aCallable$v,isNullOrUndefined$f=isNullOrUndefined$h,getMethod$a=function(e,t){var r=e[t];return isNullOrUndefined$f(r)?void 0:aCallable$u(r)},call$_=functionCall$1,isCallable$Q=isCallable$V,isObject$H=isObject$I,$TypeError$F=TypeError,ordinaryToPrimitive$3=function(e,t){var r,n;if("string"===t&&isCallable$Q(r=e.toString)&&!isObject$H(n=call$_(r,e)))return n;if(isCallable$Q(r=e.valueOf)&&!isObject$H(n=call$_(r,e)))return n;if("string"!==t&&isCallable$Q(r=e.toString)&&!isObject$H(n=call$_(r,e)))return n;throw $TypeError$F("Can't convert object to primitive value")},shared$c={exports:{}},isPure$1=!1,global$10=global$13,defineProperty$s=Object.defineProperty,defineGlobalProperty$5=function(e,t){try{defineProperty$s(global$10,e,{value:t,configurable:!0,writable:!0})}catch(r){global$10[e]=t}return t},global$$=global$13,defineGlobalProperty$4=defineGlobalProperty$5,SHARED$1="__core-js_shared__",store$7=global$$[SHARED$1]||defineGlobalProperty$4(SHARED$1,{}),sharedStore$1=store$7,store$6=sharedStore$1;(shared$c.exports=function(e,t){return store$6[e]||(store$6[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports$1=shared$c.exports,requireObjectCoercible$g=requireObjectCoercible$i,$Object$8=Object,toObject$s=function(e){return $Object$8(requireObjectCoercible$g(e))},uncurryThis$1e=functionUncurryThis$1,toObject$r=toObject$s,hasOwnProperty$1=uncurryThis$1e({}.hasOwnProperty),hasOwnProperty_1$1=Object.hasOwn||function(e,t){return hasOwnProperty$1(toObject$r(e),t)},uncurryThis$1d=functionUncurryThis$1,id$3=0,postfix$1=Math.random(),toString$x=uncurryThis$1d(1..toString),uid$9=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$x(++id$3+postfix$1,36)},global$_=global$13,shared$b=sharedExports$1,hasOwn$C=hasOwnProperty_1$1,uid$8=uid$9,NATIVE_SYMBOL$7=symbolConstructorDetection$1,USE_SYMBOL_AS_UID$2=useSymbolAsUid$1,WellKnownSymbolsStore$3=shared$b("wks"),Symbol$6=global$_.Symbol,symbolFor=Symbol$6&&Symbol$6.for,createWellKnownSymbol$1=USE_SYMBOL_AS_UID$2?Symbol$6:Symbol$6&&Symbol$6.withoutSetter||uid$8,wellKnownSymbol$T=function(e){if(!hasOwn$C(WellKnownSymbolsStore$3,e)||!NATIVE_SYMBOL$7&&"string"!=typeof WellKnownSymbolsStore$3[e]){var t="Symbol."+e;NATIVE_SYMBOL$7&&hasOwn$C(Symbol$6,e)?WellKnownSymbolsStore$3[e]=Symbol$6[e]:WellKnownSymbolsStore$3[e]=USE_SYMBOL_AS_UID$2&&symbolFor?symbolFor(t):createWellKnownSymbol$1(t)}return WellKnownSymbolsStore$3[e]},call$Z=functionCall$1,isObject$G=isObject$I,isSymbol$a=isSymbol$b,getMethod$9=getMethod$a,ordinaryToPrimitive$2=ordinaryToPrimitive$3,wellKnownSymbol$S=wellKnownSymbol$T,$TypeError$E=TypeError,TO_PRIMITIVE$1=wellKnownSymbol$S("toPrimitive"),toPrimitive$b=function(e,t){if(!isObject$G(e)||isSymbol$a(e))return e;var r,n=getMethod$9(e,TO_PRIMITIVE$1);if(n){if(void 0===t&&(t="default"),r=call$Z(n,e,t),!isObject$G(r)||isSymbol$a(r))return r;throw $TypeError$E("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive$2(e,t)},toPrimitive$a=toPrimitive$b,isSymbol$9=isSymbol$b,toPropertyKey$9=function(e){var t=toPrimitive$a(e,"string");return isSymbol$9(t)?t:t+""},global$Z=global$13,isObject$F=isObject$I,document$6=global$Z.document,EXISTS$3=isObject$F(document$6)&&isObject$F(document$6.createElement),documentCreateElement$4=function(e){return EXISTS$3?document$6.createElement(e):{}},DESCRIPTORS$H=descriptors$1,fails$1d=fails$1i,createElement$3=documentCreateElement$4,ie8DomDefine$1=!DESCRIPTORS$H&&!fails$1d((function(){return 7!=Object.defineProperty(createElement$3("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$G=descriptors$1,call$Y=functionCall$1,propertyIsEnumerableModule$4=objectPropertyIsEnumerable$1,createPropertyDescriptor$e=createPropertyDescriptor$f,toIndexedObject$k=toIndexedObject$l,toPropertyKey$8=toPropertyKey$9,hasOwn$B=hasOwnProperty_1$1,IE8_DOM_DEFINE$3=ie8DomDefine$1,$getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor$1.f=DESCRIPTORS$G?$getOwnPropertyDescriptor$4:function(e,t){if(e=toIndexedObject$k(e),t=toPropertyKey$8(t),IE8_DOM_DEFINE$3)try{return $getOwnPropertyDescriptor$4(e,t)}catch(e){}if(hasOwn$B(e,t))return createPropertyDescriptor$e(!call$Y(propertyIsEnumerableModule$4.f,e,t),e[t])};var objectDefineProperty$1={},DESCRIPTORS$F=descriptors$1,fails$1c=fails$1i,v8PrototypeDefineBug$1=DESCRIPTORS$F&&fails$1c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$E=isObject$I,$String$8=String,$TypeError$D=TypeError,anObject$B=function(e){if(isObject$E(e))return e;throw $TypeError$D($String$8(e)+" is not an object")},DESCRIPTORS$E=descriptors$1,IE8_DOM_DEFINE$2=ie8DomDefine$1,V8_PROTOTYPE_DEFINE_BUG$3=v8PrototypeDefineBug$1,anObject$A=anObject$B,toPropertyKey$7=toPropertyKey$9,$TypeError$C=TypeError,$defineProperty$2=Object.defineProperty,$getOwnPropertyDescriptor$3=Object.getOwnPropertyDescriptor,ENUMERABLE$1="enumerable",CONFIGURABLE$3="configurable",WRITABLE$1="writable";objectDefineProperty$1.f=DESCRIPTORS$E?V8_PROTOTYPE_DEFINE_BUG$3?function(e,t,r){if(anObject$A(e),t=toPropertyKey$7(t),anObject$A(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE$1 in r&&!r[WRITABLE$1]){var n=$getOwnPropertyDescriptor$3(e,t);n&&n[WRITABLE$1]&&(e[t]=r.value,r={configurable:CONFIGURABLE$3 in r?r[CONFIGURABLE$3]:n[CONFIGURABLE$3],enumerable:ENUMERABLE$1 in r?r[ENUMERABLE$1]:n[ENUMERABLE$1],writable:!1})}return $defineProperty$2(e,t,r)}:$defineProperty$2:function(e,t,r){if(anObject$A(e),t=toPropertyKey$7(t),anObject$A(r),IE8_DOM_DEFINE$2)try{return $defineProperty$2(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$C("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$D=descriptors$1,definePropertyModule$b=objectDefineProperty$1,createPropertyDescriptor$d=createPropertyDescriptor$f,createNonEnumerableProperty$k=DESCRIPTORS$D?function(e,t,r){return definePropertyModule$b.f(e,t,createPropertyDescriptor$d(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$3={exports:{}},DESCRIPTORS$C=descriptors$1,hasOwn$A=hasOwnProperty_1$1,FunctionPrototype$6=Function.prototype,getDescriptor$1=DESCRIPTORS$C&&Object.getOwnPropertyDescriptor,EXISTS$2=hasOwn$A(FunctionPrototype$6,"name"),PROPER$1=EXISTS$2&&"something"===function(){}.name,CONFIGURABLE$2=EXISTS$2&&(!DESCRIPTORS$C||DESCRIPTORS$C&&getDescriptor$1(FunctionPrototype$6,"name").configurable),functionName$1={EXISTS:EXISTS$2,PROPER:PROPER$1,CONFIGURABLE:CONFIGURABLE$2},uncurryThis$1c=functionUncurryThis$1,isCallable$P=isCallable$V,store$5=sharedStore$1,functionToString$2=uncurryThis$1c(Function.toString);isCallable$P(store$5.inspectSource)||(store$5.inspectSource=function(e){return functionToString$2(e)});var set$g,get$b,has$8,inspectSource$6=store$5.inspectSource,global$Y=global$13,isCallable$O=isCallable$V,WeakMap$3=global$Y.WeakMap,weakMapBasicDetection$1=isCallable$O(WeakMap$3)&&/native code/.test(String(WeakMap$3)),shared$a=sharedExports$1,uid$7=uid$9,keys$a=shared$a("keys"),sharedKey$8=function(e){return keys$a[e]||(keys$a[e]=uid$7(e))},hiddenKeys$c={},NATIVE_WEAK_MAP$1=weakMapBasicDetection$1,global$X=global$13,isObject$D=isObject$I,createNonEnumerableProperty$j=createNonEnumerableProperty$k,hasOwn$z=hasOwnProperty_1$1,shared$9=sharedStore$1,sharedKey$7=sharedKey$8,hiddenKeys$b=hiddenKeys$c,OBJECT_ALREADY_INITIALIZED$1="Object already initialized",TypeError$b=global$X.TypeError,WeakMap$2=global$X.WeakMap,enforce$1=function(e){return has$8(e)?get$b(e):set$g(e,{})},getterFor$1=function(e){return function(t){var r;if(!isObject$D(t)||(r=get$b(t)).type!==e)throw TypeError$b("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP$1||shared$9.state){var store$4=shared$9.state||(shared$9.state=new WeakMap$2);store$4.get=store$4.get,store$4.has=store$4.has,store$4.set=store$4.set,set$g=function(e,t){if(store$4.has(e))throw TypeError$b(OBJECT_ALREADY_INITIALIZED$1);return t.facade=e,store$4.set(e,t),t},get$b=function(e){return store$4.get(e)||{}},has$8=function(e){return store$4.has(e)}}else{var STATE$1=sharedKey$7("state");hiddenKeys$b[STATE$1]=!0,set$g=function(e,t){if(hasOwn$z(e,STATE$1))throw TypeError$b(OBJECT_ALREADY_INITIALIZED$1);return t.facade=e,createNonEnumerableProperty$j(e,STATE$1,t),t},get$b=function(e){return hasOwn$z(e,STATE$1)?e[STATE$1]:{}},has$8=function(e){return hasOwn$z(e,STATE$1)}}var internalState$1={set:set$g,get:get$b,has:has$8,enforce:enforce$1,getterFor:getterFor$1},fails$1b=fails$1i,isCallable$N=isCallable$V,hasOwn$y=hasOwnProperty_1$1,DESCRIPTORS$B=descriptors$1,CONFIGURABLE_FUNCTION_NAME$2=functionName$1.CONFIGURABLE,inspectSource$5=inspectSource$6,InternalStateModule$h=internalState$1,enforceInternalState$3=InternalStateModule$h.enforce,getInternalState$a=InternalStateModule$h.get,defineProperty$r=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$B&&!fails$1b((function(){return 8!==defineProperty$r((function(){}),"length",{value:8}).length})),TEMPLATE=String(String).split("String"),makeBuiltIn$2=makeBuiltIn$3.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$y(e,"name")||CONFIGURABLE_FUNCTION_NAME$2&&e.name!==t)&&(DESCRIPTORS$B?defineProperty$r(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&r&&hasOwn$y(r,"arity")&&e.length!==r.arity&&defineProperty$r(e,"length",{value:r.arity});try{r&&hasOwn$y(r,"constructor")&&r.constructor?DESCRIPTORS$B&&defineProperty$r(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=enforceInternalState$3(e);return hasOwn$y(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e};Function.prototype.toString=makeBuiltIn$2((function(){return isCallable$N(this)&&getInternalState$a(this).source||inspectSource$5(this)}),"toString");var makeBuiltInExports=makeBuiltIn$3.exports,isCallable$M=isCallable$V,definePropertyModule$a=objectDefineProperty$1,makeBuiltIn$1=makeBuiltInExports,defineGlobalProperty$3=defineGlobalProperty$5,defineBuiltIn$p=function(e,t,r,n){n||(n={});var o=n.enumerable,a=void 0!==n.name?n.name:t;if(isCallable$M(r)&&makeBuiltIn$1(r,a,n),n.global)o?e[t]=r:defineGlobalProperty$3(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:definePropertyModule$a.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},objectGetOwnPropertyNames$1={},ceil$3=Math.ceil,floor$b=Math.floor,mathTrunc$1=Math.trunc||function(e){var t=+e;return(t>0?floor$b:ceil$3)(t)},trunc$1=mathTrunc$1,toIntegerOrInfinity$i=function(e){var t=+e;return t!=t||0===t?0:trunc$1(t)},toIntegerOrInfinity$h=toIntegerOrInfinity$i,max$9=Math.max,min$9=Math.min,toAbsoluteIndex$c=function(e,t){var r=toIntegerOrInfinity$h(e);return r<0?max$9(r+t,0):min$9(r,t)},toIntegerOrInfinity$g=toIntegerOrInfinity$i,min$8=Math.min,toLength$c=function(e){return e>0?min$8(toIntegerOrInfinity$g(e),9007199254740991):0},toLength$b=toLength$c,lengthOfArrayLike$s=function(e){return toLength$b(e.length)},toIndexedObject$j=toIndexedObject$l,toAbsoluteIndex$b=toAbsoluteIndex$c,lengthOfArrayLike$r=lengthOfArrayLike$s,createMethod$c=function(e){return function(t,r,n){var o,a=toIndexedObject$j(t),i=lengthOfArrayLike$r(a),s=toAbsoluteIndex$b(n,i);if(e&&r!=r){for(;i>s;)if((o=a[s++])!=o)return!0}else for(;i>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},arrayIncludes$1={includes:createMethod$c(!0),indexOf:createMethod$c(!1)},uncurryThis$1b=functionUncurryThis$1,hasOwn$x=hasOwnProperty_1$1,toIndexedObject$i=toIndexedObject$l,indexOf$9=arrayIncludes$1.indexOf,hiddenKeys$a=hiddenKeys$c,push$j=uncurryThis$1b([].push),objectKeysInternal$1=function(e,t){var r,n=toIndexedObject$i(e),o=0,a=[];for(r in n)!hasOwn$x(hiddenKeys$a,r)&&hasOwn$x(n,r)&&push$j(a,r);for(;t.length>o;)hasOwn$x(n,r=t[o++])&&(~indexOf$9(a,r)||push$j(a,r));return a},enumBugKeys$7=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$3=objectKeysInternal$1,enumBugKeys$6=enumBugKeys$7,hiddenKeys$9=enumBugKeys$6.concat("length","prototype");objectGetOwnPropertyNames$1.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$3(e,hiddenKeys$9)};var objectGetOwnPropertySymbols$1={};objectGetOwnPropertySymbols$1.f=Object.getOwnPropertySymbols;var getBuiltIn$r=getBuiltIn$u,uncurryThis$1a=functionUncurryThis$1,getOwnPropertyNamesModule$4=objectGetOwnPropertyNames$1,getOwnPropertySymbolsModule$5=objectGetOwnPropertySymbols$1,anObject$z=anObject$B,concat$c=uncurryThis$1a([].concat),ownKeys$6=getBuiltIn$r("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$4.f(anObject$z(e)),r=getOwnPropertySymbolsModule$5.f;return r?concat$c(t,r(e)):t},hasOwn$w=hasOwnProperty_1$1,ownKeys$5=ownKeys$6,getOwnPropertyDescriptorModule$5=objectGetOwnPropertyDescriptor$1,definePropertyModule$9=objectDefineProperty$1,copyConstructorProperties$3=function(e,t,r){for(var n=ownKeys$5(t),o=definePropertyModule$9.f,a=getOwnPropertyDescriptorModule$5.f,i=0;i<n.length;i++){var s=n[i];hasOwn$w(e,s)||r&&hasOwn$w(r,s)||o(e,s,a(t,s))}},fails$1a=fails$1i,isCallable$L=isCallable$V,replacement$1=/#|\.prototype\./,isForced$8=function(e,t){var r=data$1[normalize$1(e)];return r==POLYFILL$1||r!=NATIVE$1&&(isCallable$L(t)?fails$1a(t):!!t)},normalize$1=isForced$8.normalize=function(e){return String(e).replace(replacement$1,".").toLowerCase()},data$1=isForced$8.data={},NATIVE$1=isForced$8.NATIVE="N",POLYFILL$1=isForced$8.POLYFILL="P",isForced_1$1=isForced$8,global$W=global$13,getOwnPropertyDescriptor$g=objectGetOwnPropertyDescriptor$1.f,createNonEnumerableProperty$i=createNonEnumerableProperty$k,defineBuiltIn$o=defineBuiltIn$p,defineGlobalProperty$2=defineGlobalProperty$5,copyConstructorProperties$2=copyConstructorProperties$3,isForced$7=isForced_1$1,_export$1=function(e,t){var r,n,o,a,i,s=e.target,c=e.global,l=e.stat;if(r=c?global$W:l?global$W[s]||defineGlobalProperty$2(s,{}):(global$W[s]||{}).prototype)for(n in t){if(a=t[n],o=e.dontCallGetSet?(i=getOwnPropertyDescriptor$g(r,n))&&i.value:r[n],!isForced$7(c?n:s+(l?".":"#")+n,e.forced)&&void 0!==o){if(typeof a==typeof o)continue;copyConstructorProperties$2(a,o)}(e.sham||o&&o.sham)&&createNonEnumerableProperty$i(a,"sham",!0),defineBuiltIn$o(r,n,a,e)}},internalObjectKeys$2=objectKeysInternal$1,enumBugKeys$5=enumBugKeys$7,objectKeys$6=Object.keys||function(e){return internalObjectKeys$2(e,enumBugKeys$5)},DESCRIPTORS$A=descriptors$1,uncurryThis$19=functionUncurryThis$1,call$X=functionCall$1,fails$19=fails$1i,objectKeys$5=objectKeys$6,getOwnPropertySymbolsModule$4=objectGetOwnPropertySymbols$1,propertyIsEnumerableModule$3=objectPropertyIsEnumerable$1,toObject$q=toObject$s,IndexedObject$8=indexedObject$1,$assign$1=Object.assign,defineProperty$q=Object.defineProperty,concat$b=uncurryThis$19([].concat),objectAssign$1=!$assign$1||fails$19((function(){if(DESCRIPTORS$A&&1!==$assign$1({b:1},$assign$1(defineProperty$q({},"a",{enumerable:!0,get:function(){defineProperty$q(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=$assign$1({},e)[r]||objectKeys$5($assign$1({},t)).join("")!=n}))?function(e,t){for(var r=toObject$q(e),n=arguments.length,o=1,a=getOwnPropertySymbolsModule$4.f,i=propertyIsEnumerableModule$3.f;n>o;)for(var s,c=IndexedObject$8(arguments[o++]),l=a?concat$b(objectKeys$5(c),a(c)):objectKeys$5(c),u=l.length,$=0;u>$;)s=l[$++],DESCRIPTORS$A&&!call$X(i,c,s)||(r[s]=c[s]);return r}:$assign$1,$$2b=_export$1,assign$9=objectAssign$1;$$2b({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$9},{assign:assign$9});var classof$w=classofRaw$5,isArray$j=Array.isArray||function(e){return"Array"==classof$w(e)},$TypeError$B=TypeError,MAX_SAFE_INTEGER$1=9007199254740991,doesNotExceedSafeInteger$5=function(e){if(e>MAX_SAFE_INTEGER$1)throw $TypeError$B("Maximum allowed index exceeded");return e},toPropertyKey$6=toPropertyKey$9,definePropertyModule$8=objectDefineProperty$1,createPropertyDescriptor$c=createPropertyDescriptor$f,createProperty$c=function(e,t,r){var n=toPropertyKey$6(t);n in e?definePropertyModule$8.f(e,n,createPropertyDescriptor$c(0,r)):e[n]=r},wellKnownSymbol$R=wellKnownSymbol$T,TO_STRING_TAG$9=wellKnownSymbol$R("toStringTag"),test$3={};test$3[TO_STRING_TAG$9]="z";var toStringTagSupport$1="[object z]"===String(test$3),TO_STRING_TAG_SUPPORT$5=toStringTagSupport$1,isCallable$K=isCallable$V,classofRaw$4=classofRaw$5,wellKnownSymbol$Q=wellKnownSymbol$T,TO_STRING_TAG$8=wellKnownSymbol$Q("toStringTag"),$Object$7=Object,CORRECT_ARGUMENTS$1="Arguments"==classofRaw$4(function(){return arguments}()),tryGet$1=function(e,t){try{return e[t]}catch(e){}},classof$v=TO_STRING_TAG_SUPPORT$5?classofRaw$4:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet$1(t=$Object$7(e),TO_STRING_TAG$8))?r:CORRECT_ARGUMENTS$1?classofRaw$4(t):"Object"==(n=classofRaw$4(t))&&isCallable$K(t.callee)?"Arguments":n},uncurryThis$18=functionUncurryThis$1,fails$18=fails$1i,isCallable$J=isCallable$V,classof$u=classof$v,getBuiltIn$q=getBuiltIn$u,inspectSource$4=inspectSource$6,noop$1=function(){},empty$1=[],construct$8=getBuiltIn$q("Reflect","construct"),constructorRegExp$1=/^\s*(?:class|function)\b/,exec$b=uncurryThis$18(constructorRegExp$1.exec),INCORRECT_TO_STRING$1=!constructorRegExp$1.exec(noop$1),isConstructorModern$1=function(e){if(!isCallable$J(e))return!1;try{return construct$8(noop$1,empty$1,e),!0}catch(e){return!1}},isConstructorLegacy$1=function(e){if(!isCallable$J(e))return!1;switch(classof$u(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING$1||!!exec$b(constructorRegExp$1,inspectSource$4(e))}catch(e){return!0}};isConstructorLegacy$1.sham=!0;var isConstructor$9=!construct$8||fails$18((function(){var e;return isConstructorModern$1(isConstructorModern$1.call)||!isConstructorModern$1(Object)||!isConstructorModern$1((function(){e=!0}))||e}))?isConstructorLegacy$1:isConstructorModern$1,isArray$i=isArray$j,isConstructor$8=isConstructor$9,isObject$C=isObject$I,wellKnownSymbol$P=wellKnownSymbol$T,SPECIES$c=wellKnownSymbol$P("species"),$Array$8=Array,arraySpeciesConstructor$3=function(e){var t;return isArray$i(e)&&(t=e.constructor,(isConstructor$8(t)&&(t===$Array$8||isArray$i(t.prototype))||isObject$C(t)&&null===(t=t[SPECIES$c]))&&(t=void 0)),void 0===t?$Array$8:t},arraySpeciesConstructor$2=arraySpeciesConstructor$3,arraySpeciesCreate$7=function(e,t){return new(arraySpeciesConstructor$2(e))(0===t?0:t)},fails$17=fails$1i,wellKnownSymbol$O=wellKnownSymbol$T,V8_VERSION$6=engineV8Version$1,SPECIES$b=wellKnownSymbol$O("species"),arrayMethodHasSpeciesSupport$b=function(e){return V8_VERSION$6>=51||!fails$17((function(){var t=[];return(t.constructor={})[SPECIES$b]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$2a=_export$1,fails$16=fails$1i,isArray$h=isArray$j,isObject$B=isObject$I,toObject$p=toObject$s,lengthOfArrayLike$q=lengthOfArrayLike$s,doesNotExceedSafeInteger$4=doesNotExceedSafeInteger$5,createProperty$b=createProperty$c,arraySpeciesCreate$6=arraySpeciesCreate$7,arrayMethodHasSpeciesSupport$a=arrayMethodHasSpeciesSupport$b,wellKnownSymbol$N=wellKnownSymbol$T,V8_VERSION$5=engineV8Version$1,IS_CONCAT_SPREADABLE$1=wellKnownSymbol$N("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT$1=V8_VERSION$5>=51||!fails$16((function(){var e=[];return e[IS_CONCAT_SPREADABLE$1]=!1,e.concat()[0]!==e})),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport$a("concat"),isConcatSpreadable$1=function(e){if(!isObject$B(e))return!1;var t=e[IS_CONCAT_SPREADABLE$1];return void 0!==t?!!t:isArray$h(e)},FORCED$d=!IS_CONCAT_SPREADABLE_SUPPORT$1||!SPECIES_SUPPORT;$$2a({target:"Array",proto:!0,arity:1,forced:FORCED$d},{concat:function(e){var t,r,n,o,a,i=toObject$p(this),s=arraySpeciesCreate$6(i,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable$1(a=-1===t?i:arguments[t]))for(o=lengthOfArrayLike$q(a),doesNotExceedSafeInteger$4(c+o),r=0;r<o;r++,c++)r in a&&createProperty$b(s,c,a[r]);else doesNotExceedSafeInteger$4(c+1),createProperty$b(s,c++,a);return s.length=c,s}});var TO_STRING_TAG_SUPPORT$4=toStringTagSupport$1,classof$t=classof$v,objectToString$1=TO_STRING_TAG_SUPPORT$4?{}.toString:function(){return"[object "+classof$t(this)+"]"},TO_STRING_TAG_SUPPORT$3=toStringTagSupport$1,defineBuiltIn$n=defineBuiltIn$p,toString$w=objectToString$1;TO_STRING_TAG_SUPPORT$3||defineBuiltIn$n(Object.prototype,"toString",toString$w,{unsafe:!0});var $location$1,defer$1,channel$1,port$1,classof$s=classofRaw$5,global$V=global$13,engineIsNode$1="process"==classof$s(global$V.process),isCallable$I=isCallable$V,$String$7=String,$TypeError$A=TypeError,aPossiblePrototype$3=function(e){if("object"==typeof e||isCallable$I(e))return e;throw $TypeError$A("Can't set "+$String$7(e)+" as a prototype")},uncurryThis$17=functionUncurryThis$1,anObject$y=anObject$B,aPossiblePrototype$2=aPossiblePrototype$3,objectSetPrototypeOf$1=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=uncurryThis$17(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return anObject$y(r),aPossiblePrototype$2(n),t?e(r,n):r.__proto__=n,r}}():void 0),defineProperty$p=objectDefineProperty$1.f,hasOwn$v=hasOwnProperty_1$1,wellKnownSymbol$M=wellKnownSymbol$T,TO_STRING_TAG$7=wellKnownSymbol$M("toStringTag"),setToStringTag$h=function(e,t,r){e&&!r&&(e=e.prototype),e&&!hasOwn$v(e,TO_STRING_TAG$7)&&defineProperty$p(e,TO_STRING_TAG$7,{configurable:!0,value:t})},getBuiltIn$p=getBuiltIn$u,definePropertyModule$7=objectDefineProperty$1,wellKnownSymbol$L=wellKnownSymbol$T,DESCRIPTORS$z=descriptors$1,SPECIES$a=wellKnownSymbol$L("species"),setSpecies$8=function(e){var t=getBuiltIn$p(e),r=definePropertyModule$7.f;DESCRIPTORS$z&&t&&!t[SPECIES$a]&&r(t,SPECIES$a,{configurable:!0,get:function(){return this}})},isPrototypeOf$r=objectIsPrototypeOf$1,$TypeError$z=TypeError,anInstance$d=function(e,t){if(isPrototypeOf$r(t,e))return e;throw $TypeError$z("Incorrect invocation")},isConstructor$7=isConstructor$9,tryToString$d=tryToString$f,$TypeError$y=TypeError,aConstructor$6=function(e){if(isConstructor$7(e))return e;throw $TypeError$y(tryToString$d(e)+" is not a constructor")},anObject$x=anObject$B,aConstructor$5=aConstructor$6,isNullOrUndefined$e=isNullOrUndefined$h,wellKnownSymbol$K=wellKnownSymbol$T,SPECIES$9=wellKnownSymbol$K("species"),speciesConstructor$7=function(e,t){var r,n=anObject$x(e).constructor;return void 0===n||isNullOrUndefined$e(r=anObject$x(n)[SPECIES$9])?t:aConstructor$5(r)},NATIVE_BIND$6=functionBindNative$1,FunctionPrototype$5=Function.prototype,apply$e=FunctionPrototype$5.apply,call$W=FunctionPrototype$5.call,functionApply$1="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$6?call$W.bind(apply$e):function(){return call$W.apply(apply$e,arguments)}),classofRaw$3=classofRaw$5,uncurryThis$16=functionUncurryThis$1,functionUncurryThisClause$1=function(e){if("Function"===classofRaw$3(e))return uncurryThis$16(e)},uncurryThis$15=functionUncurryThisClause$1,aCallable$t=aCallable$v,NATIVE_BIND$5=functionBindNative$1,bind$I=functionUncurryThisClause$1(functionUncurryThisClause$1.bind),functionBindContext$1=function(e,t){return aCallable$t(e),void 0===t?e:NATIVE_BIND$5?bind$I(e,t):function(){return e.apply(t,arguments)}},getBuiltIn$o=getBuiltIn$u,html$5=getBuiltIn$o("document","documentElement"),uncurryThis$14=functionUncurryThis$1,arraySlice$j=uncurryThis$14([].slice),$TypeError$x=TypeError,validateArgumentsLength$9=function(e,t){if(e<t)throw $TypeError$x("Not enough arguments");return e},userAgent$c=engineUserAgent$1,engineIsIos$1=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$c),global$U=global$13,apply$d=functionApply$1,bind$H=functionBindContext$1,isCallable$H=isCallable$V,hasOwn$u=hasOwnProperty_1$1,fails$15=fails$1i,html$4=html$5,arraySlice$i=arraySlice$j,createElement$2=documentCreateElement$4,validateArgumentsLength$8=validateArgumentsLength$9,IS_IOS$3=engineIsIos$1,IS_NODE$8=engineIsNode$1,set$f=global$U.setImmediate,clear$1=global$U.clearImmediate,process$7=global$U.process,Dispatch$1=global$U.Dispatch,Function$3=global$U.Function,MessageChannel$1=global$U.MessageChannel,String$2=global$U.String,counter$1=0,queue$4={},ONREADYSTATECHANGE$1="onreadystatechange";try{$location$1=global$U.location}catch(e){}var run$1=function(e){if(hasOwn$u(queue$4,e)){var t=queue$4[e];delete queue$4[e],t()}},runner$1=function(e){return function(){run$1(e)}},listener=function(e){run$1(e.data)},post=function(e){global$U.postMessage(String$2(e),$location$1.protocol+"//"+$location$1.host)};set$f&&clear$1||(set$f=function(e){validateArgumentsLength$8(arguments.length,1);var t=isCallable$H(e)?e:Function$3(e),r=arraySlice$i(arguments,1);return queue$4[++counter$1]=function(){apply$d(t,void 0,r)},defer$1(counter$1),counter$1},clear$1=function(e){delete queue$4[e]},IS_NODE$8?defer$1=function(e){process$7.nextTick(runner$1(e))}:Dispatch$1&&Dispatch$1.now?defer$1=function(e){Dispatch$1.now(runner$1(e))}:MessageChannel$1&&!IS_IOS$3?(port$1=(channel$1=new MessageChannel$1).port2,channel$1.port1.onmessage=listener,defer$1=bind$H(port$1.postMessage,port$1)):global$U.addEventListener&&isCallable$H(global$U.postMessage)&&!global$U.importScripts&&$location$1&&"file:"!==$location$1.protocol&&!fails$15(post)?(defer$1=post,global$U.addEventListener("message",listener,!1)):defer$1=ONREADYSTATECHANGE$1 in createElement$2("script")?function(e){html$4.appendChild(createElement$2("script"))[ONREADYSTATECHANGE$1]=function(){html$4.removeChild(this),run$1(e)}}:function(e){setTimeout(runner$1(e),0)});var flush$1,head,last,notify$3,toggle$1,node$1,promise$7,then$1,task$3={set:set$f,clear:clear$1},userAgent$b=engineUserAgent$1,global$T=global$13,engineIsIosPebble$1=/ipad|iphone|ipod/i.test(userAgent$b)&&void 0!==global$T.Pebble,userAgent$a=engineUserAgent$1,engineIsWebosWebkit$1=/web0s(?!.*chrome)/i.test(userAgent$a),global$S=global$13,bind$G=functionBindContext$1,getOwnPropertyDescriptor$f=objectGetOwnPropertyDescriptor$1.f,macrotask$1=task$3.set,IS_IOS$2=engineIsIos$1,IS_IOS_PEBBLE$1=engineIsIosPebble$1,IS_WEBOS_WEBKIT$1=engineIsWebosWebkit$1,IS_NODE$7=engineIsNode$1,MutationObserver$1=global$S.MutationObserver||global$S.WebKitMutationObserver,document$5=global$S.document,process$6=global$S.process,Promise$2=global$S.Promise,queueMicrotaskDescriptor$1=getOwnPropertyDescriptor$f(global$S,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor$1&&queueMicrotaskDescriptor$1.value;queueMicrotask||(flush$1=function(){var e,t;for(IS_NODE$7&&(e=process$6.domain)&&e.exit();head;){t=head.fn,head=head.next;try{t()}catch(e){throw head?notify$3():last=void 0,e}}last=void 0,e&&e.enter()},IS_IOS$2||IS_NODE$7||IS_WEBOS_WEBKIT$1||!MutationObserver$1||!document$5?!IS_IOS_PEBBLE$1&&Promise$2&&Promise$2.resolve?((promise$7=Promise$2.resolve(void 0)).constructor=Promise$2,then$1=bind$G(promise$7.then,promise$7),notify$3=function(){then$1(flush$1)}):IS_NODE$7?notify$3=function(){process$6.nextTick(flush$1)}:(macrotask$1=bind$G(macrotask$1,global$S),notify$3=function(){macrotask$1(flush$1)}):(toggle$1=!0,node$1=document$5.createTextNode(""),new MutationObserver$1(flush$1).observe(node$1,{characterData:!0}),notify$3=function(){node$1.data=toggle$1=!toggle$1}));var microtask$3=queueMicrotask||function(e){var t={fn:e,next:void 0};last&&(last.next=t),head||(head=t,notify$3()),last=t},global$R=global$13,hostReportErrors$3=function(e,t){var r=global$R.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},perform$a=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Queue$4=function(){this.head=null,this.tail=null};Queue$4.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var queue$3=Queue$4,global$Q=global$13,promiseNativeConstructor$1=global$Q.Promise,engineIsDeno$1="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$3=engineIsDeno$1,IS_NODE$6=engineIsNode$1,engineIsBrowser$1=!IS_DENO$3&&!IS_NODE$6&&"object"==typeof window&&"object"==typeof document,global$P=global$13,NativePromiseConstructor$a=promiseNativeConstructor$1,isCallable$G=isCallable$V,isForced$6=isForced_1$1,inspectSource$3=inspectSource$6,wellKnownSymbol$J=wellKnownSymbol$T,IS_BROWSER$1=engineIsBrowser$1,IS_DENO$2=engineIsDeno$1,V8_VERSION$4=engineV8Version$1;NativePromiseConstructor$a&&NativePromiseConstructor$a.prototype;var SPECIES$8=wellKnownSymbol$J("species"),SUBCLASSING$1=!1,NATIVE_PROMISE_REJECTION_EVENT$3=isCallable$G(global$P.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$b=isForced$6("Promise",(function(){var e=inspectSource$3(NativePromiseConstructor$a),t=e!==String(NativePromiseConstructor$a);if(!t&&66===V8_VERSION$4)return!0;if(!V8_VERSION$4||V8_VERSION$4<51||!/native code/.test(e)){var r=new NativePromiseConstructor$a((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES$8]=n,!(SUBCLASSING$1=r.then((function(){}))instanceof n))return!0}return!t&&(IS_BROWSER$1||IS_DENO$2)&&!NATIVE_PROMISE_REJECTION_EVENT$3})),promiseConstructorDetection$1={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$b,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$3,SUBCLASSING:SUBCLASSING$1},newPromiseCapability$5={},aCallable$s=aCallable$v,$TypeError$w=TypeError,PromiseCapability$1=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError$w("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$s(t),this.reject=aCallable$s(r)};newPromiseCapability$5.f=function(e){return new PromiseCapability$1(e)};var Internal$1,OwnPromiseCapability$1,PromiseWrapper$1,nativeThen,$$29=_export$1,IS_NODE$5=engineIsNode$1,global$O=global$13,call$V=functionCall$1,defineBuiltIn$m=defineBuiltIn$p,setPrototypeOf$d=objectSetPrototypeOf$1,setToStringTag$g=setToStringTag$h,setSpecies$7=setSpecies$8,aCallable$r=aCallable$v,isCallable$F=isCallable$V,isObject$A=isObject$I,anInstance$c=anInstance$d,speciesConstructor$6=speciesConstructor$7,task$2=task$3.set,microtask$2=microtask$3,hostReportErrors$2=hostReportErrors$3,perform$9=perform$a,Queue$3=queue$3,InternalStateModule$g=internalState$1,NativePromiseConstructor$9=promiseNativeConstructor$1,PromiseConstructorDetection$1=promiseConstructorDetection$1,newPromiseCapabilityModule$a=newPromiseCapability$5,PROMISE$1="Promise",FORCED_PROMISE_CONSTRUCTOR$a=PromiseConstructorDetection$1.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT$2=PromiseConstructorDetection$1.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=PromiseConstructorDetection$1.SUBCLASSING,getInternalPromiseState$1=InternalStateModule$g.getterFor(PROMISE$1),setInternalState$f=InternalStateModule$g.set,NativePromisePrototype$5=NativePromiseConstructor$9&&NativePromiseConstructor$9.prototype,PromiseConstructor$1=NativePromiseConstructor$9,PromisePrototype$1=NativePromisePrototype$5,TypeError$a=global$O.TypeError,document$4=global$O.document,process$5=global$O.process,newPromiseCapability$4=newPromiseCapabilityModule$a.f,newGenericPromiseCapability$1=newPromiseCapability$4,DISPATCH_EVENT$1=!!(document$4&&document$4.createEvent&&global$O.dispatchEvent),UNHANDLED_REJECTION$1="unhandledrejection",REJECTION_HANDLED$1="rejectionhandled",PENDING$1=0,FULFILLED$1=1,REJECTED$1=2,HANDLED$1=1,UNHANDLED$1=2,isThenable$1=function(e){var t;return!(!isObject$A(e)||!isCallable$F(t=e.then))&&t},callReaction$1=function(e,t){var r,n,o,a=t.value,i=t.state==FULFILLED$1,s=i?e.ok:e.fail,c=e.resolve,l=e.reject,u=e.domain;try{s?(i||(t.rejection===UNHANDLED$1&&onHandleUnhandled$1(t),t.rejection=HANDLED$1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),o=!0)),r===e.promise?l(TypeError$a("Promise-chain cycle")):(n=isThenable$1(r))?call$V(n,r,c,l):c(r)):l(a)}catch(e){u&&!o&&u.exit(),l(e)}},notify$2=function(e,t){e.notified||(e.notified=!0,microtask$2((function(){for(var r,n=e.reactions;r=n.get();)callReaction$1(r,e);e.notified=!1,t&&!e.rejection&&onUnhandled$1(e)})))},dispatchEvent$1=function(e,t,r){var n,o;DISPATCH_EVENT$1?((n=document$4.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$O.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT$2&&(o=global$O["on"+e])?o(n):e===UNHANDLED_REJECTION$1&&hostReportErrors$2("Unhandled promise rejection",r)},onUnhandled$1=function(e){call$V(task$2,global$O,(function(){var t,r=e.facade,n=e.value;if(isUnhandled$1(e)&&(t=perform$9((function(){IS_NODE$5?process$5.emit("unhandledRejection",n,r):dispatchEvent$1(UNHANDLED_REJECTION$1,r,n)})),e.rejection=IS_NODE$5||isUnhandled$1(e)?UNHANDLED$1:HANDLED$1,t.error))throw t.value}))},isUnhandled$1=function(e){return e.rejection!==HANDLED$1&&!e.parent},onHandleUnhandled$1=function(e){call$V(task$2,global$O,(function(){var t=e.facade;IS_NODE$5?process$5.emit("rejectionHandled",t):dispatchEvent$1(REJECTION_HANDLED$1,t,e.value)}))},bind$F=function(e,t,r){return function(n){e(t,n,r)}},internalReject$1=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=REJECTED$1,notify$2(e,!0))},internalResolve$1=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw TypeError$a("Promise can't be resolved itself");var n=isThenable$1(t);n?microtask$2((function(){var r={done:!1};try{call$V(n,t,bind$F(internalResolve$1,r,e),bind$F(internalReject$1,r,e))}catch(t){internalReject$1(r,t,e)}})):(e.value=t,e.state=FULFILLED$1,notify$2(e,!1))}catch(t){internalReject$1({done:!1},t,e)}}};if(FORCED_PROMISE_CONSTRUCTOR$a&&(PromisePrototype$1=(PromiseConstructor$1=function(e){anInstance$c(this,PromisePrototype$1),aCallable$r(e),call$V(Internal$1,this);var t=getInternalPromiseState$1(this);try{e(bind$F(internalResolve$1,t),bind$F(internalReject$1,t))}catch(e){internalReject$1(t,e)}}).prototype,(Internal$1=function(e){setInternalState$f(this,{type:PROMISE$1,done:!1,notified:!1,parent:!1,reactions:new Queue$3,rejection:!1,state:PENDING$1,value:void 0})}).prototype=defineBuiltIn$m(PromisePrototype$1,"then",(function(e,t){var r=getInternalPromiseState$1(this),n=newPromiseCapability$4(speciesConstructor$6(this,PromiseConstructor$1));return r.parent=!0,n.ok=!isCallable$F(e)||e,n.fail=isCallable$F(t)&&t,n.domain=IS_NODE$5?process$5.domain:void 0,r.state==PENDING$1?r.reactions.add(n):microtask$2((function(){callReaction$1(n,r)})),n.promise})),OwnPromiseCapability$1=function(){var e=new Internal$1,t=getInternalPromiseState$1(e);this.promise=e,this.resolve=bind$F(internalResolve$1,t),this.reject=bind$F(internalReject$1,t)},newPromiseCapabilityModule$a.f=newPromiseCapability$4=function(e){return e===PromiseConstructor$1||e===PromiseWrapper$1?new OwnPromiseCapability$1(e):newGenericPromiseCapability$1(e)},isCallable$F(NativePromiseConstructor$9)&&NativePromisePrototype$5!==Object.prototype)){nativeThen=NativePromisePrototype$5.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$m(NativePromisePrototype$5,"then",(function(e,t){var r=this;return new PromiseConstructor$1((function(e,t){call$V(nativeThen,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete NativePromisePrototype$5.constructor}catch(e){}setPrototypeOf$d&&setPrototypeOf$d(NativePromisePrototype$5,PromisePrototype$1)}$$29({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$a},{Promise:PromiseConstructor$1}),setToStringTag$g(PromiseConstructor$1,PROMISE$1,!1),setSpecies$7(PROMISE$1);var iterators$1={},wellKnownSymbol$I=wellKnownSymbol$T,Iterators$b=iterators$1,ITERATOR$i=wellKnownSymbol$I("iterator"),ArrayPrototype$f=Array.prototype,isArrayIteratorMethod$6=function(e){return void 0!==e&&(Iterators$b.Array===e||ArrayPrototype$f[ITERATOR$i]===e)},classof$r=classof$v,getMethod$8=getMethod$a,isNullOrUndefined$d=isNullOrUndefined$h,Iterators$a=iterators$1,wellKnownSymbol$H=wellKnownSymbol$T,ITERATOR$h=wellKnownSymbol$H("iterator"),getIteratorMethod$g=function(e){if(!isNullOrUndefined$d(e))return getMethod$8(e,ITERATOR$h)||getMethod$8(e,"@@iterator")||Iterators$a[classof$r(e)]},call$U=functionCall$1,aCallable$q=aCallable$v,anObject$w=anObject$B,tryToString$c=tryToString$f,getIteratorMethod$f=getIteratorMethod$g,$TypeError$v=TypeError,getIterator$8=function(e,t){var r=arguments.length<2?getIteratorMethod$f(e):t;if(aCallable$q(r))return anObject$w(call$U(r,e));throw $TypeError$v(tryToString$c(e)+" is not iterable")},call$T=functionCall$1,anObject$v=anObject$B,getMethod$7=getMethod$a,iteratorClose$7=function(e,t,r){var n,o;anObject$v(e);try{if(!(n=getMethod$7(e,"return"))){if("throw"===t)throw r;return r}n=call$T(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$v(n),r},bind$E=functionBindContext$1,call$S=functionCall$1,anObject$u=anObject$B,tryToString$b=tryToString$f,isArrayIteratorMethod$5=isArrayIteratorMethod$6,lengthOfArrayLike$p=lengthOfArrayLike$s,isPrototypeOf$q=objectIsPrototypeOf$1,getIterator$7=getIterator$8,getIteratorMethod$e=getIteratorMethod$g,iteratorClose$6=iteratorClose$7,$TypeError$u=TypeError,Result$1=function(e,t){this.stopped=e,this.result=t},ResultPrototype$1=Result$1.prototype,iterate$z=function(e,t,r){var n,o,a,i,s,c,l,u=r&&r.that,$=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),f=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),y=bind$E(t,u),h=function(e){return n&&iteratorClose$6(n,"normal",e),new Result$1(!0,e)},g=function(e){return $?(anObject$u(e),d?y(e[0],e[1],h):y(e[0],e[1])):d?y(e,h):y(e)};if(p)n=e.iterator;else if(f)n=e;else{if(!(o=getIteratorMethod$e(e)))throw $TypeError$u(tryToString$b(e)+" is not iterable");if(isArrayIteratorMethod$5(o)){for(a=0,i=lengthOfArrayLike$p(e);i>a;a++)if((s=g(e[a]))&&isPrototypeOf$q(ResultPrototype$1,s))return s;return new Result$1(!1)}n=getIterator$7(e,o)}for(c=p?e.next:n.next;!(l=call$S(c,n)).done;){try{s=g(l.value)}catch(e){iteratorClose$6(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$q(ResultPrototype$1,s))return s}return new Result$1(!1)},wellKnownSymbol$G=wellKnownSymbol$T,ITERATOR$g=wellKnownSymbol$G("iterator"),SAFE_CLOSING$1=!1;try{var called$1=0,iteratorWithReturn$1={next:function(){return{done:!!called$1++}},return:function(){SAFE_CLOSING$1=!0}};iteratorWithReturn$1[ITERATOR$g]=function(){return this},Array.from(iteratorWithReturn$1,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$7=function(e,t){if(!t&&!SAFE_CLOSING$1)return!1;var r=!1;try{var n={};n[ITERATOR$g]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$8=promiseNativeConstructor$1,checkCorrectnessOfIteration$6=checkCorrectnessOfIteration$7,FORCED_PROMISE_CONSTRUCTOR$9=promiseConstructorDetection$1.CONSTRUCTOR,promiseStaticsIncorrectIteration$1=FORCED_PROMISE_CONSTRUCTOR$9||!checkCorrectnessOfIteration$6((function(e){NativePromiseConstructor$8.all(e).then(void 0,(function(){}))})),$$28=_export$1,call$R=functionCall$1,aCallable$p=aCallable$v,newPromiseCapabilityModule$9=newPromiseCapability$5,perform$8=perform$a,iterate$y=iterate$z,PROMISE_STATICS_INCORRECT_ITERATION$5=promiseStaticsIncorrectIteration$1;$$28({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$5},{all:function(e){var t=this,r=newPromiseCapabilityModule$9.f(t),n=r.resolve,o=r.reject,a=perform$8((function(){var r=aCallable$p(t.resolve),a=[],i=0,s=1;iterate$y(e,(function(e){var c=i++,l=!1;s++,call$R(r,t,e).then((function(e){l||(l=!0,a[c]=e,--s||n(a))}),o)})),--s||n(a)}));return a.error&&o(a.value),r.promise}});var $$27=_export$1,FORCED_PROMISE_CONSTRUCTOR$8=promiseConstructorDetection$1.CONSTRUCTOR,NativePromiseConstructor$7=promiseNativeConstructor$1,getBuiltIn$n=getBuiltIn$u,isCallable$E=isCallable$V,defineBuiltIn$l=defineBuiltIn$p,NativePromisePrototype$4=NativePromiseConstructor$7&&NativePromiseConstructor$7.prototype;if($$27({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$8,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable$E(NativePromiseConstructor$7)){var method$g=getBuiltIn$n("Promise").prototype.catch;NativePromisePrototype$4.catch!==method$g&&defineBuiltIn$l(NativePromisePrototype$4,"catch",method$g,{unsafe:!0})}var $$26=_export$1,call$Q=functionCall$1,aCallable$o=aCallable$v,newPromiseCapabilityModule$8=newPromiseCapability$5,perform$7=perform$a,iterate$x=iterate$z,PROMISE_STATICS_INCORRECT_ITERATION$4=promiseStaticsIncorrectIteration$1;$$26({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$4},{race:function(e){var t=this,r=newPromiseCapabilityModule$8.f(t),n=r.reject,o=perform$7((function(){var o=aCallable$o(t.resolve);iterate$x(e,(function(e){call$Q(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var $$25=_export$1,call$P=functionCall$1,newPromiseCapabilityModule$7=newPromiseCapability$5,FORCED_PROMISE_CONSTRUCTOR$7=promiseConstructorDetection$1.CONSTRUCTOR;$$25({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$7},{reject:function(e){var t=newPromiseCapabilityModule$7.f(this);return call$P(t.reject,void 0,e),t.promise}});var anObject$t=anObject$B,isObject$z=isObject$I,newPromiseCapability$3=newPromiseCapability$5,promiseResolve$5=function(e,t){if(anObject$t(e),isObject$z(t)&&t.constructor===e)return t;var r=newPromiseCapability$3.f(e);return(0,r.resolve)(t),r.promise},$$24=_export$1,getBuiltIn$m=getBuiltIn$u,FORCED_PROMISE_CONSTRUCTOR$6=promiseConstructorDetection$1.CONSTRUCTOR,promiseResolve$4=promiseResolve$5;getBuiltIn$m("Promise"),$$24({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$6},{resolve:function(e){return promiseResolve$4(this,e)}});var $$23=_export$1,isArray$g=isArray$j,isConstructor$6=isConstructor$9,isObject$y=isObject$I,toAbsoluteIndex$a=toAbsoluteIndex$c,lengthOfArrayLike$o=lengthOfArrayLike$s,toIndexedObject$h=toIndexedObject$l,createProperty$a=createProperty$c,wellKnownSymbol$F=wellKnownSymbol$T,arrayMethodHasSpeciesSupport$9=arrayMethodHasSpeciesSupport$b,nativeSlice$1=arraySlice$j,HAS_SPECIES_SUPPORT$7=arrayMethodHasSpeciesSupport$9("slice"),SPECIES$7=wellKnownSymbol$F("species"),$Array$7=Array,max$8=Math.max;$$23({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$7},{slice:function(e,t){var r,n,o,a=toIndexedObject$h(this),i=lengthOfArrayLike$o(a),s=toAbsoluteIndex$a(e,i),c=toAbsoluteIndex$a(void 0===t?i:t,i);if(isArray$g(a)&&(r=a.constructor,(isConstructor$6(r)&&(r===$Array$7||isArray$g(r.prototype))||isObject$y(r)&&null===(r=r[SPECIES$7]))&&(r=void 0),r===$Array$7||void 0===r))return nativeSlice$1(a,s,c);for(n=new(void 0===r?$Array$7:r)(max$8(c-s,0)),o=0;s<c;s++,o++)s in a&&createProperty$a(n,o,a[s]);return n.length=o,n}});var fails$14=fails$1i,arrayMethodIsStrict$a=function(e,t){var r=[][e];return!!r&&fails$14((function(){r.call(null,t||function(){return 1},1)}))},$$22=_export$1,uncurryThis$13=functionUncurryThis$1,IndexedObject$7=indexedObject$1,toIndexedObject$g=toIndexedObject$l,arrayMethodIsStrict$9=arrayMethodIsStrict$a,nativeJoin=uncurryThis$13([].join),ES3_STRINGS=IndexedObject$7!=Object,STRICT_METHOD$6=arrayMethodIsStrict$9("join",",");$$22({target:"Array",proto:!0,forced:ES3_STRINGS||!STRICT_METHOD$6},{join:function(e){return nativeJoin(toIndexedObject$g(this),void 0===e?",":e)}});var bind$D=functionBindContext$1,uncurryThis$12=functionUncurryThis$1,IndexedObject$6=indexedObject$1,toObject$o=toObject$s,lengthOfArrayLike$n=lengthOfArrayLike$s,arraySpeciesCreate$5=arraySpeciesCreate$7,push$i=uncurryThis$12([].push),createMethod$b=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,a=6==e,i=7==e,s=5==e||a;return function(c,l,u,$){for(var p,f,d=toObject$o(c),y=IndexedObject$6(d),h=bind$D(l,u),g=lengthOfArrayLike$n(y),m=0,_=$||arraySpeciesCreate$5,S=t?_(c,g):r||i?_(c,0):void 0;g>m;m++)if((s||m in y)&&(f=h(p=y[m],m,d),e))if(t)S[m]=f;else if(f)switch(e){case 3:return!0;case 5:return p;case 6:return m;case 2:push$i(S,p)}else switch(e){case 4:return!1;case 7:push$i(S,p)}return a?-1:n||o?o:S}},arrayIteration$1={forEach:createMethod$b(0),map:createMethod$b(1),filter:createMethod$b(2),some:createMethod$b(3),every:createMethod$b(4),find:createMethod$b(5),findIndex:createMethod$b(6),filterReject:createMethod$b(7)},$$21=_export$1,$map$2=arrayIteration$1.map,arrayMethodHasSpeciesSupport$8=arrayMethodHasSpeciesSupport$b,HAS_SPECIES_SUPPORT$6=arrayMethodHasSpeciesSupport$8("map");$$21({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$6},{map:function(e){return $map$2(this,e,arguments.length>1?arguments[1]:void 0)}});var anObject$s=anObject$B,iteratorClose$5=iteratorClose$7,callWithSafeIterationClosing$3=function(e,t,r,n){try{return n?t(anObject$s(r)[0],r[1]):t(r)}catch(t){iteratorClose$5(e,"throw",t)}},bind$C=functionBindContext$1,call$O=functionCall$1,toObject$n=toObject$s,callWithSafeIterationClosing$2=callWithSafeIterationClosing$3,isArrayIteratorMethod$4=isArrayIteratorMethod$6,isConstructor$5=isConstructor$9,lengthOfArrayLike$m=lengthOfArrayLike$s,createProperty$9=createProperty$c,getIterator$6=getIterator$8,getIteratorMethod$d=getIteratorMethod$g,$Array$6=Array,arrayFrom$3=function(e){var t=toObject$n(e),r=isConstructor$5(this),n=arguments.length,o=n>1?arguments[1]:void 0,a=void 0!==o;a&&(o=bind$C(o,n>2?arguments[2]:void 0));var i,s,c,l,u,$,p=getIteratorMethod$d(t),f=0;if(!p||this===$Array$6&&isArrayIteratorMethod$4(p))for(i=lengthOfArrayLike$m(t),s=r?new this(i):$Array$6(i);i>f;f++)$=a?o(t[f],f):t[f],createProperty$9(s,f,$);else for(u=(l=getIterator$6(t,p)).next,s=r?new this:[];!(c=call$O(u,l)).done;f++)$=a?callWithSafeIterationClosing$2(l,o,[c.value,f],!0):c.value,createProperty$9(s,f,$);return s.length=f,s},$$20=_export$1,from$9=arrayFrom$3,checkCorrectnessOfIteration$5=checkCorrectnessOfIteration$7,INCORRECT_ITERATION$1=!checkCorrectnessOfIteration$5((function(e){Array.from(e)}));$$20({target:"Array",stat:!0,forced:INCORRECT_ITERATION$1},{from:from$9});var classof$q=classof$v,$String$6=String,toString$v=function(e){if("Symbol"===classof$q(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$6(e)},uncurryThis$11=functionUncurryThis$1,toIntegerOrInfinity$f=toIntegerOrInfinity$i,toString$u=toString$v,requireObjectCoercible$f=requireObjectCoercible$i,charAt$e=uncurryThis$11("".charAt),charCodeAt$6=uncurryThis$11("".charCodeAt),stringSlice$d=uncurryThis$11("".slice),createMethod$a=function(e){return function(t,r){var n,o,a=toString$u(requireObjectCoercible$f(t)),i=toIntegerOrInfinity$f(r),s=a.length;return i<0||i>=s?e?"":void 0:(n=charCodeAt$6(a,i))<55296||n>56319||i+1===s||(o=charCodeAt$6(a,i+1))<56320||o>57343?e?charAt$e(a,i):n:e?stringSlice$d(a,i,i+2):o-56320+(n-55296<<10)+65536}},stringMultibyte$1={codeAt:createMethod$a(!1),charAt:createMethod$a(!0)},objectDefineProperties$1={},DESCRIPTORS$y=descriptors$1,V8_PROTOTYPE_DEFINE_BUG$2=v8PrototypeDefineBug$1,definePropertyModule$6=objectDefineProperty$1,anObject$r=anObject$B,toIndexedObject$f=toIndexedObject$l,objectKeys$4=objectKeys$6;objectDefineProperties$1.f=DESCRIPTORS$y&&!V8_PROTOTYPE_DEFINE_BUG$2?Object.defineProperties:function(e,t){anObject$r(e);for(var r,n=toIndexedObject$f(t),o=objectKeys$4(t),a=o.length,i=0;a>i;)definePropertyModule$6.f(e,r=o[i++],n[r]);return e};var activeXDocument$1,anObject$q=anObject$B,definePropertiesModule$2=objectDefineProperties$1,enumBugKeys$4=enumBugKeys$7,hiddenKeys$8=hiddenKeys$c,html$3=html$5,documentCreateElement$3=documentCreateElement$4,sharedKey$6=sharedKey$8,GT$1=">",LT$1="<",PROTOTYPE$3="prototype",SCRIPT$1="script",IE_PROTO$3=sharedKey$6("IE_PROTO"),EmptyConstructor$1=function(){},scriptTag$1=function(e){return LT$1+SCRIPT$1+GT$1+e+LT$1+"/"+SCRIPT$1+GT$1},NullProtoObjectViaActiveX$1=function(e){e.write(scriptTag$1("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame$1=function(){var e,t=documentCreateElement$3("iframe"),r="java"+SCRIPT$1+":";return t.style.display="none",html$3.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag$1("document.F=Object")),e.close(),e.F},NullProtoObject$1=function(){try{activeXDocument$1=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject$1="undefined"!=typeof document?document.domain&&activeXDocument$1?NullProtoObjectViaActiveX$1(activeXDocument$1):NullProtoObjectViaIFrame$1():NullProtoObjectViaActiveX$1(activeXDocument$1);for(var e=enumBugKeys$4.length;e--;)delete NullProtoObject$1[PROTOTYPE$3][enumBugKeys$4[e]];return NullProtoObject$1()};hiddenKeys$8[IE_PROTO$3]=!0;var IteratorPrototype$4,PrototypeOfArrayIteratorPrototype$1,arrayIterator$1,objectCreate$1=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor$1[PROTOTYPE$3]=anObject$q(e),r=new EmptyConstructor$1,EmptyConstructor$1[PROTOTYPE$3]=null,r[IE_PROTO$3]=e):r=NullProtoObject$1(),void 0===t?r:definePropertiesModule$2.f(r,t)},fails$13=fails$1i,correctPrototypeGetter$1=!fails$13((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$t=hasOwnProperty_1$1,isCallable$D=isCallable$V,toObject$m=toObject$s,sharedKey$5=sharedKey$8,CORRECT_PROTOTYPE_GETTER$3=correctPrototypeGetter$1,IE_PROTO$2=sharedKey$5("IE_PROTO"),$Object$6=Object,ObjectPrototype$5=$Object$6.prototype,objectGetPrototypeOf$1=CORRECT_PROTOTYPE_GETTER$3?$Object$6.getPrototypeOf:function(e){var t=toObject$m(e);if(hasOwn$t(t,IE_PROTO$2))return t[IE_PROTO$2];var r=t.constructor;return isCallable$D(r)&&t instanceof r?r.prototype:t instanceof $Object$6?ObjectPrototype$5:null},fails$12=fails$1i,isCallable$C=isCallable$V,isObject$x=isObject$I,getPrototypeOf$d=objectGetPrototypeOf$1,defineBuiltIn$k=defineBuiltIn$p,wellKnownSymbol$E=wellKnownSymbol$T,ITERATOR$f=wellKnownSymbol$E("iterator"),BUGGY_SAFARI_ITERATORS$3=!1;[].keys&&("next"in(arrayIterator$1=[].keys())?(PrototypeOfArrayIteratorPrototype$1=getPrototypeOf$d(getPrototypeOf$d(arrayIterator$1)))!==Object.prototype&&(IteratorPrototype$4=PrototypeOfArrayIteratorPrototype$1):BUGGY_SAFARI_ITERATORS$3=!0);var NEW_ITERATOR_PROTOTYPE$1=!isObject$x(IteratorPrototype$4)||fails$12((function(){var e={};return IteratorPrototype$4[ITERATOR$f].call(e)!==e}));NEW_ITERATOR_PROTOTYPE$1&&(IteratorPrototype$4={}),isCallable$C(IteratorPrototype$4[ITERATOR$f])||defineBuiltIn$k(IteratorPrototype$4,ITERATOR$f,(function(){return this}));var iteratorsCore$1={IteratorPrototype:IteratorPrototype$4,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$3},IteratorPrototype$3=iteratorsCore$1.IteratorPrototype,create$i=objectCreate$1,createPropertyDescriptor$b=createPropertyDescriptor$f,setToStringTag$f=setToStringTag$h,Iterators$9=iterators$1,returnThis$3=function(){return this},iteratorCreateConstructor$1=function(e,t,r,n){var o=t+" Iterator";return e.prototype=create$i(IteratorPrototype$3,{next:createPropertyDescriptor$b(+!n,r)}),setToStringTag$f(e,o,!1),Iterators$9[o]=returnThis$3,e},$$1$=_export$1,call$N=functionCall$1,FunctionName$2=functionName$1,isCallable$B=isCallable$V,createIteratorConstructor$3=iteratorCreateConstructor$1,getPrototypeOf$c=objectGetPrototypeOf$1,setPrototypeOf$c=objectSetPrototypeOf$1,setToStringTag$e=setToStringTag$h,createNonEnumerableProperty$h=createNonEnumerableProperty$k,defineBuiltIn$j=defineBuiltIn$p,wellKnownSymbol$D=wellKnownSymbol$T,Iterators$8=iterators$1,IteratorsCore$1=iteratorsCore$1,PROPER_FUNCTION_NAME$5=FunctionName$2.PROPER,CONFIGURABLE_FUNCTION_NAME$1=FunctionName$2.CONFIGURABLE,IteratorPrototype$2=IteratorsCore$1.IteratorPrototype,BUGGY_SAFARI_ITERATORS$2=IteratorsCore$1.BUGGY_SAFARI_ITERATORS,ITERATOR$e=wellKnownSymbol$D("iterator"),KEYS$1="keys",VALUES$1="values",ENTRIES$1="entries",returnThis$2=function(){return this},iteratorDefine$1=function(e,t,r,n,o,a,i){createIteratorConstructor$3(r,t,n);var s,c,l,u=function(e){if(e===o&&y)return y;if(!BUGGY_SAFARI_ITERATORS$2&&e in f)return f[e];switch(e){case KEYS$1:case VALUES$1:case ENTRIES$1:return function(){return new r(this,e)}}return function(){return new r(this)}},$=t+" Iterator",p=!1,f=e.prototype,d=f[ITERATOR$e]||f["@@iterator"]||o&&f[o],y=!BUGGY_SAFARI_ITERATORS$2&&d||u(o),h="Array"==t&&f.entries||d;if(h&&(s=getPrototypeOf$c(h.call(new e)))!==Object.prototype&&s.next&&(getPrototypeOf$c(s)!==IteratorPrototype$2&&(setPrototypeOf$c?setPrototypeOf$c(s,IteratorPrototype$2):isCallable$B(s[ITERATOR$e])||defineBuiltIn$j(s,ITERATOR$e,returnThis$2)),setToStringTag$e(s,$,!0)),PROPER_FUNCTION_NAME$5&&o==VALUES$1&&d&&d.name!==VALUES$1&&(CONFIGURABLE_FUNCTION_NAME$1?createNonEnumerableProperty$h(f,"name",VALUES$1):(p=!0,y=function(){return call$N(d,this)})),o)if(c={values:u(VALUES$1),keys:a?y:u(KEYS$1),entries:u(ENTRIES$1)},i)for(l in c)(BUGGY_SAFARI_ITERATORS$2||p||!(l in f))&&defineBuiltIn$j(f,l,c[l]);else $$1$({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS$2||p},c);return f[ITERATOR$e]!==y&&defineBuiltIn$j(f,ITERATOR$e,y,{name:o}),Iterators$8[t]=y,c},createIterResultObject$7=function(e,t){return{value:e,done:t}},charAt$d=stringMultibyte$1.charAt,toString$t=toString$v,InternalStateModule$f=internalState$1,defineIterator$5=iteratorDefine$1,createIterResultObject$6=createIterResultObject$7,STRING_ITERATOR$1="String Iterator",setInternalState$e=InternalStateModule$f.set,getInternalState$9=InternalStateModule$f.getterFor(STRING_ITERATOR$1);defineIterator$5(String,"String",(function(e){setInternalState$e(this,{type:STRING_ITERATOR$1,string:toString$t(e),index:0})}),(function(){var e,t=getInternalState$9(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject$6(void 0,!0):(e=charAt$d(r,n),t.index+=e.length,createIterResultObject$6(e,!1))}));var fails$11=function(e){try{return!!e()}catch(e){return!0}},fails$10=fails$11,functionBindNative=!fails$10((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$4=functionBindNative,FunctionPrototype$4=Function.prototype,call$M=FunctionPrototype$4.call,uncurryThisWithBind=NATIVE_BIND$4&&FunctionPrototype$4.bind.bind(call$M,call$M),functionUncurryThis=NATIVE_BIND$4?uncurryThisWithBind:function(e){return function(){return call$M.apply(e,arguments)}},uncurryThis$10=functionUncurryThis,objectIsPrototypeOf=uncurryThis$10({}.isPrototypeOf),check=function(e){return e&&e.Math==Math&&e},global$N=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||commonjsGlobal||Function("return this")(),NATIVE_BIND$3=functionBindNative,FunctionPrototype$3=Function.prototype,apply$c=FunctionPrototype$3.apply,call$L=FunctionPrototype$3.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$3?call$L.bind(apply$c):function(){return call$L.apply(apply$c,arguments)}),uncurryThis$$=functionUncurryThis,toString$s=uncurryThis$$({}.toString),stringSlice$c=uncurryThis$$("".slice),classofRaw$2=function(e){return stringSlice$c(toString$s(e),8,-1)},classofRaw$1=classofRaw$2,uncurryThis$_=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw$1(e))return uncurryThis$_(e)},documentAll$2="object"==typeof document&&document.all,IS_HTMLDDA=void 0===documentAll$2&&void 0!==documentAll$2,documentAll_1={all:documentAll$2,IS_HTMLDDA:IS_HTMLDDA},$documentAll$1=documentAll_1,documentAll$1=$documentAll$1.all,isCallable$A=$documentAll$1.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$1}:function(e){return"function"==typeof e},objectGetOwnPropertyDescriptor={},fails$$=fails$11,descriptors=!fails$$((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),NATIVE_BIND$2=functionBindNative,call$K=Function.prototype.call,functionCall=NATIVE_BIND$2?call$K.bind(call$K):function(){return call$K.apply(call$K,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable$1={}.propertyIsEnumerable,getOwnPropertyDescriptor$e=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$e&&!$propertyIsEnumerable$1.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor$e(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$1;var match,version$1,createPropertyDescriptor$a=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},uncurryThis$Z=functionUncurryThis,fails$_=fails$11,classof$p=classofRaw$2,$Object$5=Object,split$6=uncurryThis$Z("".split),indexedObject=fails$_((function(){return!$Object$5("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$p(e)?split$6(e,""):$Object$5(e)}:$Object$5,isNullOrUndefined$c=function(e){return null==e},isNullOrUndefined$b=isNullOrUndefined$c,$TypeError$t=TypeError,requireObjectCoercible$e=function(e){if(isNullOrUndefined$b(e))throw $TypeError$t("Can't call method on "+e);return e},IndexedObject$5=indexedObject,requireObjectCoercible$d=requireObjectCoercible$e,toIndexedObject$e=function(e){return IndexedObject$5(requireObjectCoercible$d(e))},isCallable$z=isCallable$A,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$w=$documentAll.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$z(e)||e===documentAll}:function(e){return"object"==typeof e?null!==e:isCallable$z(e)},path$u={},path$t=path$u,global$M=global$N,isCallable$y=isCallable$A,aFunction=function(e){return isCallable$y(e)?e:void 0},getBuiltIn$l=function(e,t){return arguments.length<2?aFunction(path$t[e])||aFunction(global$M[e]):path$t[e]&&path$t[e][t]||global$M[e]&&global$M[e][t]},engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$L=global$N,userAgent$9=engineUserAgent,process$4=global$L.process,Deno$1=global$L.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8;v8&&(version$1=(match=v8.split("."))[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version$1&&userAgent$9&&(!(match=userAgent$9.match(/Edge\/(\d+)/))||match[1]>=74)&&(match=userAgent$9.match(/Chrome\/(\d+)/))&&(version$1=+match[1]);var engineV8Version=version$1,V8_VERSION$3=engineV8Version,fails$Z=fails$11,global$K=global$N,$String$5=global$K.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$Z((function(){var e=Symbol();return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$3&&V8_VERSION$3<41})),NATIVE_SYMBOL$6=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$6&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$k=getBuiltIn$l,isCallable$x=isCallable$A,isPrototypeOf$p=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$4=Object,isSymbol$8=USE_SYMBOL_AS_UID$1?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$k("Symbol");return isCallable$x(t)&&isPrototypeOf$p(t.prototype,$Object$4(e))},$String$4=String,tryToString$a=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$w=isCallable$A,tryToString$9=tryToString$a,$TypeError$s=TypeError,aCallable$n=function(e){if(isCallable$w(e))return e;throw $TypeError$s(tryToString$9(e)+" is not a function")},aCallable$m=aCallable$n,isNullOrUndefined$a=isNullOrUndefined$c,getMethod$6=function(e,t){var r=e[t];return isNullOrUndefined$a(r)?void 0:aCallable$m(r)},call$J=functionCall,isCallable$v=isCallable$A,isObject$v=isObject$w,$TypeError$r=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$v(r=e.toString)&&!isObject$v(n=call$J(r,e)))return n;if(isCallable$v(r=e.valueOf)&&!isObject$v(n=call$J(r,e)))return n;if("string"!==t&&isCallable$v(r=e.toString)&&!isObject$v(n=call$J(r,e)))return n;throw $TypeError$r("Can't convert object to primitive value")},shared$8={exports:{}},isPure=!0,global$J=global$N,defineProperty$o=Object.defineProperty,defineGlobalProperty$1=function(e,t){try{defineProperty$o(global$J,e,{value:t,configurable:!0,writable:!0})}catch(r){global$J[e]=t}return t},global$I=global$N,defineGlobalProperty=defineGlobalProperty$1,SHARED="__core-js_shared__",store$3=global$I[SHARED]||defineGlobalProperty(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$8.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports=shared$8.exports,requireObjectCoercible$c=requireObjectCoercible$e,$Object$3=Object,toObject$l=function(e){return $Object$3(requireObjectCoercible$c(e))},uncurryThis$Y=functionUncurryThis,toObject$k=toObject$l,hasOwnProperty=uncurryThis$Y({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$k(e),t)},uncurryThis$X=functionUncurryThis,id$2=0,postfix=Math.random(),toString$r=uncurryThis$X(1..toString),uid$6=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$r(++id$2+postfix,36)},global$H=global$N,shared$7=sharedExports,hasOwn$s=hasOwnProperty_1,uid$5=uid$6,NATIVE_SYMBOL$5=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$5=global$H.Symbol,WellKnownSymbolsStore$2=shared$7("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$5.for||Symbol$5:Symbol$5&&Symbol$5.withoutSetter||uid$5,wellKnownSymbol$C=function(e){return hasOwn$s(WellKnownSymbolsStore$2,e)||(WellKnownSymbolsStore$2[e]=NATIVE_SYMBOL$5&&hasOwn$s(Symbol$5,e)?Symbol$5[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore$2[e]},call$I=functionCall,isObject$u=isObject$w,isSymbol$7=isSymbol$8,getMethod$5=getMethod$6,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$B=wellKnownSymbol$C,$TypeError$q=TypeError,TO_PRIMITIVE=wellKnownSymbol$B("toPrimitive"),toPrimitive$9=function(e,t){if(!isObject$u(e)||isSymbol$7(e))return e;var r,n=getMethod$5(e,TO_PRIMITIVE);if(n){if(void 0===t&&(t="default"),r=call$I(n,e,t),!isObject$u(r)||isSymbol$7(r))return r;throw $TypeError$q("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPrimitive$8=toPrimitive$9,isSymbol$6=isSymbol$8,toPropertyKey$5=function(e){var t=toPrimitive$8(e,"string");return isSymbol$6(t)?t:t+""},global$G=global$N,isObject$t=isObject$w,document$3=global$G.document,EXISTS$1=isObject$t(document$3)&&isObject$t(document$3.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$x=descriptors,fails$Y=fails$11,createElement$1=documentCreateElement$2,ie8DomDefine=!DESCRIPTORS$x&&!fails$Y((function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$w=descriptors,call$H=functionCall,propertyIsEnumerableModule$2=objectPropertyIsEnumerable,createPropertyDescriptor$9=createPropertyDescriptor$a,toIndexedObject$d=toIndexedObject$e,toPropertyKey$4=toPropertyKey$5,hasOwn$r=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$w?$getOwnPropertyDescriptor$2:function(e,t){if(e=toIndexedObject$d(e),t=toPropertyKey$4(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$2(e,t)}catch(e){}if(hasOwn$r(e,t))return createPropertyDescriptor$9(!call$H(propertyIsEnumerableModule$2.f,e,t),e[t])};var fails$X=fails$11,isCallable$u=isCallable$A,replacement=/#|\.prototype\./,isForced$5=function(e,t){var r=data[normalize(e)];return r==POLYFILL||r!=NATIVE&&(isCallable$u(t)?fails$X(t):!!t)},normalize=isForced$5.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$5.data={},NATIVE=isForced$5.NATIVE="N",POLYFILL=isForced$5.POLYFILL="P",isForced_1=isForced$5,uncurryThis$W=functionUncurryThisClause,aCallable$l=aCallable$n,NATIVE_BIND$1=functionBindNative,bind$B=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$l(e),void 0===t?e:NATIVE_BIND$1?bind$B(e,t):function(){return e.apply(t,arguments)}},objectDefineProperty={},DESCRIPTORS$v=descriptors,fails$W=fails$11,v8PrototypeDefineBug=DESCRIPTORS$v&&fails$W((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$s=isObject$w,$String$3=String,$TypeError$p=TypeError,anObject$p=function(e){if(isObject$s(e))return e;throw $TypeError$p($String$3(e)+" is not an object")},DESCRIPTORS$u=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$o=anObject$p,toPropertyKey$3=toPropertyKey$5,$TypeError$o=TypeError,$defineProperty$1=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$u?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){if(anObject$o(e),t=toPropertyKey$3(t),anObject$o(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]){var n=$getOwnPropertyDescriptor$1(e,t);n&&n[WRITABLE]&&(e[t]=r.value,r={configurable:CONFIGURABLE$1 in r?r[CONFIGURABLE$1]:n[CONFIGURABLE$1],enumerable:ENUMERABLE in r?r[ENUMERABLE]:n[ENUMERABLE],writable:!1})}return $defineProperty$1(e,t,r)}:$defineProperty$1:function(e,t,r){if(anObject$o(e),t=toPropertyKey$3(t),anObject$o(r),IE8_DOM_DEFINE)try{return $defineProperty$1(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$o("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$t=descriptors,definePropertyModule$5=objectDefineProperty,createPropertyDescriptor$8=createPropertyDescriptor$a,createNonEnumerableProperty$g=DESCRIPTORS$t?function(e,t,r){return definePropertyModule$5.f(e,t,createPropertyDescriptor$8(1,r))}:function(e,t,r){return e[t]=r,e},global$F=global$N,apply$b=functionApply,uncurryThis$V=functionUncurryThisClause,isCallable$t=isCallable$A,getOwnPropertyDescriptor$d=objectGetOwnPropertyDescriptor.f,isForced$4=isForced_1,path$s=path$u,bind$A=functionBindContext,createNonEnumerableProperty$f=createNonEnumerableProperty$g,hasOwn$q=hasOwnProperty_1,wrapConstructor=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return apply$b(e,this,arguments)};return t.prototype=e.prototype,t},_export=function(e,t){var r,n,o,a,i,s,c,l,u,$=e.target,p=e.global,f=e.stat,d=e.proto,y=p?global$F:f?global$F[$]:(global$F[$]||{}).prototype,h=p?path$s:path$s[$]||createNonEnumerableProperty$f(path$s,$,{})[$],g=h.prototype;for(a in t)n=!(r=isForced$4(p?a:$+(f?".":"#")+a,e.forced))&&y&&hasOwn$q(y,a),s=h[a],n&&(c=e.dontCallGetSet?(u=getOwnPropertyDescriptor$d(y,a))&&u.value:y[a]),i=n&&c?c:t[a],n&&typeof s==typeof i||(l=e.bind&&n?bind$A(i,global$F):e.wrap&&n?wrapConstructor(i):d&&isCallable$t(i)?uncurryThis$V(i):i,(e.sham||i&&i.sham||s&&s.sham)&&createNonEnumerableProperty$f(l,"sham",!0),createNonEnumerableProperty$f(h,a,l),d&&(hasOwn$q(path$s,o=$+"Prototype")||createNonEnumerableProperty$f(path$s,o,{}),createNonEnumerableProperty$f(path$s[o],a,i),e.real&&g&&(r||!g[a])&&createNonEnumerableProperty$f(g,a,i)))},ceil$2=Math.ceil,floor$a=Math.floor,mathTrunc=Math.trunc||function(e){var t=+e;return(t>0?floor$a:ceil$2)(t)},trunc3=mathTrunc,toIntegerOrInfinity$e=function(e){var t=+e;return t!=t||0===t?0:trunc3(t)},toIntegerOrInfinity$d=toIntegerOrInfinity$e,max$7=Math.max,min$7=Math.min,toAbsoluteIndex$9=function(e,t){var r=toIntegerOrInfinity$d(e);return r<0?max$7(r+t,0):min$7(r,t)},toIntegerOrInfinity$c=toIntegerOrInfinity$e,min$6=Math.min,toLength$a=function(e){return e>0?min$6(toIntegerOrInfinity$c(e),9007199254740991):0},toLength$9=toLength$a,lengthOfArrayLike$l=function(e){return toLength$9(e.length)},toIndexedObject$c=toIndexedObject$e,toAbsoluteIndex$8=toAbsoluteIndex$9,lengthOfArrayLike$k=lengthOfArrayLike$l,createMethod$9=function(e){return function(t,r,n){var o,a=toIndexedObject$c(t),i=lengthOfArrayLike$k(a),s=toAbsoluteIndex$8(n,i);if(e&&r!=r){for(;i>s;)if((o=a[s++])!=o)return!0}else for(;i>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},arrayIncludes={includes:createMethod$9(!0),indexOf:createMethod$9(!1)},fails$V=fails$11,arrayMethodIsStrict$8=function(e,t){var r=[][e];return!!r&&fails$V((function(){r.call(null,t||function(){return 1},1)}))},$$1_=_export,uncurryThis$U=functionUncurryThisClause,$indexOf$1=arrayIncludes.indexOf,arrayMethodIsStrict$7=arrayMethodIsStrict$8,nativeIndexOf=uncurryThis$U([].indexOf),NEGATIVE_ZERO$1=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$c=NEGATIVE_ZERO$1||!arrayMethodIsStrict$7("indexOf");$$1_({target:"Array",proto:!0,forced:FORCED$c},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO$1?nativeIndexOf(this,e,t)||0:$indexOf$1(this,e,t)}});var path$r=path$u,entryVirtual$h=function(e){return path$r[e+"Prototype"]},entryVirtual$g=entryVirtual$h,indexOf$8=entryVirtual$g("Array").indexOf,isPrototypeOf$o=objectIsPrototypeOf,method$f=indexOf$8,ArrayPrototype$e=Array.prototype,indexOf$7=function(e){var t=e.indexOf;return e===ArrayPrototype$e||isPrototypeOf$o(ArrayPrototype$e,e)&&t===ArrayPrototype$e.indexOf?method$f:t},parent$24=indexOf$7,indexOf$6=parent$24,parent$23=indexOf$6,indexOf$5=parent$23,parent$22=indexOf$5,indexOf$4=parent$22,indexOf$3=indexOf$4,indexOf$2=indexOf$3,_indexOfInstanceProperty=getDefaultExportFromCjs(indexOf$2),classof$o=classofRaw$2,isArray$f=Array.isArray||function(e){return"Array"==classof$o(e)},wellKnownSymbol$A=wellKnownSymbol$C,TO_STRING_TAG$6=wellKnownSymbol$A("toStringTag"),test$2={};test$2[TO_STRING_TAG$6]="z";var toStringTagSupport="[object z]"===String(test$2),TO_STRING_TAG_SUPPORT$2=toStringTagSupport,isCallable$s=isCallable$A,classofRaw=classofRaw$2,wellKnownSymbol$z=wellKnownSymbol$C,TO_STRING_TAG$5=wellKnownSymbol$z("toStringTag"),$Object$2=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$n=TO_STRING_TAG_SUPPORT$2?classofRaw:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=$Object$2(e),TO_STRING_TAG$5))?r:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(n=classofRaw(t))&&isCallable$s(t.callee)?"Arguments":n},uncurryThis$T=functionUncurryThis,isCallable$r=isCallable$A,store$1=sharedStore,functionToString$1=uncurryThis$T(Function.toString);isCallable$r(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString$1(e)});var inspectSource$2=store$1.inspectSource,uncurryThis$S=functionUncurryThis,fails$U=fails$11,isCallable$q=isCallable$A,classof$m=classof$n,getBuiltIn$j=getBuiltIn$l,inspectSource$1=inspectSource$2,noop=function(){},empty=[],construct$7=getBuiltIn$j("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$a=uncurryThis$S(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$q(e))return!1;try{return construct$7(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$q(e))return!1;switch(classof$m(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$a(constructorRegExp,inspectSource$1(e))}catch(e){return!0}};isConstructorLegacy.sham=!0;var isConstructor$4=!construct$7||fails$U((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,isArray$e=isArray$f,isConstructor$3=isConstructor$4,isObject$r=isObject$w,wellKnownSymbol$y=wellKnownSymbol$C,SPECIES$6=wellKnownSymbol$y("species"),$Array$5=Array,arraySpeciesConstructor$1=function(e){var t;return isArray$e(e)&&(t=e.constructor,(isConstructor$3(t)&&(t===$Array$5||isArray$e(t.prototype))||isObject$r(t)&&null===(t=t[SPECIES$6]))&&(t=void 0)),void 0===t?$Array$5:t},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$4=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},bind$z=functionBindContext,uncurryThis$R=functionUncurryThis,IndexedObject$4=indexedObject,toObject$j=toObject$l,lengthOfArrayLike$j=lengthOfArrayLike$l,arraySpeciesCreate$3=arraySpeciesCreate$4,push$h=uncurryThis$R([].push),createMethod$8=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,a=6==e,i=7==e,s=5==e||a;return function(c,l,u,$){for(var p,f,d=toObject$j(c),y=IndexedObject$4(d),h=bind$z(l,u),g=lengthOfArrayLike$j(y),m=0,_=$||arraySpeciesCreate$3,S=t?_(c,g):r||i?_(c,0):void 0;g>m;m++)if((s||m in y)&&(f=h(p=y[m],m,d),e))if(t)S[m]=f;else if(f)switch(e){case 3:return!0;case 5:return p;case 6:return m;case 2:push$h(S,p)}else switch(e){case 4:return!1;case 7:push$h(S,p)}return a?-1:n||o?o:S}},arrayIteration={forEach:createMethod$8(0),map:createMethod$8(1),filter:createMethod$8(2),some:createMethod$8(3),every:createMethod$8(4),find:createMethod$8(5),findIndex:createMethod$8(6),filterReject:createMethod$8(7)},$TypeError$n=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$3=function(e){if(e>MAX_SAFE_INTEGER)throw $TypeError$n("Maximum allowed index exceeded");return e},toPropertyKey$2=toPropertyKey$5,definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$7=createPropertyDescriptor$a,createProperty$8=function(e,t,r){var n=toPropertyKey$2(t);n in e?definePropertyModule$4.f(e,n,createPropertyDescriptor$7(0,r)):e[n]=r},fails$T=fails$11,wellKnownSymbol$x=wellKnownSymbol$C,V8_VERSION$2=engineV8Version,SPECIES$5=wellKnownSymbol$x("species"),arrayMethodHasSpeciesSupport$7=function(e){return V8_VERSION$2>=51||!fails$T((function(){var t=[];return(t.constructor={})[SPECIES$5]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$1Z=_export,fails$S=fails$11,isArray$d=isArray$f,isObject$q=isObject$w,toObject$i=toObject$l,lengthOfArrayLike$i=lengthOfArrayLike$l,doesNotExceedSafeInteger$2=doesNotExceedSafeInteger$3,createProperty$7=createProperty$8,arraySpeciesCreate$2=arraySpeciesCreate$4,arrayMethodHasSpeciesSupport$6=arrayMethodHasSpeciesSupport$7,wellKnownSymbol$w=wellKnownSymbol$C,V8_VERSION$1=engineV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$w("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$1>=51||!fails$S((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),isConcatSpreadable=function(e){if(!isObject$q(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray$d(e)},FORCED$b=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$6("concat");$$1Z({target:"Array",proto:!0,arity:1,forced:FORCED$b},{concat:function(e){var t,r,n,o,a,i=toObject$i(this),s=arraySpeciesCreate$2(i,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(a=-1===t?i:arguments[t]))for(o=lengthOfArrayLike$i(a),doesNotExceedSafeInteger$2(c+o),r=0;r<o;r++,c++)r in a&&createProperty$7(s,c,a[r]);else doesNotExceedSafeInteger$2(c+1),createProperty$7(s,c++,a);return s.length=c,s}});var set$e,get$a,has$7,entryVirtual$f=entryVirtual$h,concat$a=entryVirtual$f("Array").concat,isPrototypeOf$n=objectIsPrototypeOf,method$e=concat$a,ArrayPrototype$d=Array.prototype,concat$9=function(e){var t=e.concat;return e===ArrayPrototype$d||isPrototypeOf$n(ArrayPrototype$d,e)&&t===ArrayPrototype$d.concat?method$e:t},parent$21=concat$9,concat$8=parent$21,parent$20=concat$8,concat$7=parent$20,parent$1$=concat$7,concat$6=parent$1$,concat$5=concat$6,concat$4=concat$5,_concatInstanceProperty=getDefaultExportFromCjs(concat$4),iterators={},global$E=global$N,isCallable$p=isCallable$A,WeakMap$1=global$E.WeakMap,weakMapBasicDetection=isCallable$p(WeakMap$1)&&/native code/.test(String(WeakMap$1)),shared$6=sharedExports,uid$4=uid$6,keys$9=shared$6("keys"),sharedKey$4=function(e){return keys$9[e]||(keys$9[e]=uid$4(e))},hiddenKeys$7={},NATIVE_WEAK_MAP=weakMapBasicDetection,global$D=global$N,isObject$p=isObject$w,createNonEnumerableProperty$e=createNonEnumerableProperty$g,hasOwn$p=hasOwnProperty_1,shared$5=sharedStore,sharedKey$3=sharedKey$4,hiddenKeys$6=hiddenKeys$7,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$9=global$D.TypeError,WeakMap=global$D.WeakMap,enforce=function(e){return has$7(e)?get$a(e):set$e(e,{})},getterFor=function(e){return function(t){var r;if(!isObject$p(t)||(r=get$a(t)).type!==e)throw TypeError$9("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP||shared$5.state){var store=shared$5.state||(shared$5.state=new WeakMap);store.get=store.get,store.has=store.has,store.set=store.set,set$e=function(e,t){if(store.has(e))throw TypeError$9(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get$a=function(e){return store.get(e)||{}},has$7=function(e){return store.has(e)}}else{var STATE=sharedKey$3("state");hiddenKeys$6[STATE]=!0,set$e=function(e,t){if(hasOwn$p(e,STATE))throw TypeError$9(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$e(e,STATE,t),t},get$a=function(e){return hasOwn$p(e,STATE)?e[STATE]:{}},has$7=function(e){return hasOwn$p(e,STATE)}}var internalState={set:set$e,get:get$a,has:has$7,enforce:enforce,getterFor:getterFor},DESCRIPTORS$s=descriptors,hasOwn$o=hasOwnProperty_1,FunctionPrototype$2=Function.prototype,getDescriptor=DESCRIPTORS$s&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$o(FunctionPrototype$2,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$s||DESCRIPTORS$s&&getDescriptor(FunctionPrototype$2,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},objectDefineProperties={},uncurryThis$Q=functionUncurryThis,hasOwn$n=hasOwnProperty_1,toIndexedObject$b=toIndexedObject$e,indexOf$1=arrayIncludes.indexOf,hiddenKeys$5=hiddenKeys$7,push$g=uncurryThis$Q([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$b(e),o=0,a=[];for(r in n)!hasOwn$n(hiddenKeys$5,r)&&hasOwn$n(n,r)&&push$g(a,r);for(;t.length>o;)hasOwn$n(n,r=t[o++])&&(~indexOf$1(a,r)||push$g(a,r));return a},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$3=Object.keys||function(e){return internalObjectKeys$1(e,enumBugKeys$2)},DESCRIPTORS$r=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$3=objectDefineProperty,anObject$n=anObject$p,toIndexedObject$a=toIndexedObject$e,objectKeys$2=objectKeys$3;objectDefineProperties.f=DESCRIPTORS$r&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$n(e);for(var r,n=toIndexedObject$a(t),o=objectKeys$2(t),a=o.length,i=0;a>i;)definePropertyModule$3.f(e,r=o[i++],n[r]);return e};var activeXDocument,getBuiltIn$i=getBuiltIn$l,html$2=getBuiltIn$i("document","documentElement"),anObject$m=anObject$p,definePropertiesModule$1=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$4=hiddenKeys$7,html$1=html$2,documentCreateElement$1=documentCreateElement$2,sharedKey$2=sharedKey$4,GT=">",LT="<",PROTOTYPE$2="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$2("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement$1("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html$1.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys$1.length;e--;)delete NullProtoObject[PROTOTYPE$2][enumBugKeys$1[e]];return NullProtoObject()};hiddenKeys$4[IE_PROTO$1]=!0;var IteratorPrototype$1,PrototypeOfArrayIteratorPrototype,arrayIterator,objectCreate=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE$2]=anObject$m(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE$2]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule$1.f(r,t)},fails$R=fails$11,correctPrototypeGetter=!fails$R((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$m=hasOwnProperty_1,isCallable$o=isCallable$A,toObject$h=toObject$l,sharedKey$1=sharedKey$4,CORRECT_PROTOTYPE_GETTER$2=correctPrototypeGetter,IE_PROTO=sharedKey$1("IE_PROTO"),$Object$1=Object,ObjectPrototype$4=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER$2?$Object$1.getPrototypeOf:function(e){var t=toObject$h(e);if(hasOwn$m(t,IE_PROTO))return t[IE_PROTO];var r=t.constructor;return isCallable$o(r)&&t instanceof r?r.prototype:t instanceof $Object$1?ObjectPrototype$4:null},createNonEnumerableProperty$d=createNonEnumerableProperty$g,defineBuiltIn$i=function(e,t,r,n){return n&&n.enumerable?e[t]=r:createNonEnumerableProperty$d(e,t,r),e},fails$Q=fails$11,isCallable$n=isCallable$A,isObject$o=isObject$w,create$h=objectCreate,getPrototypeOf$b=objectGetPrototypeOf,defineBuiltIn$h=defineBuiltIn$i,wellKnownSymbol$v=wellKnownSymbol$C,ITERATOR$d=wellKnownSymbol$v("iterator"),BUGGY_SAFARI_ITERATORS$1=!1;[].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$b(getPrototypeOf$b(arrayIterator)))!==Object.prototype&&(IteratorPrototype$1=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$o(IteratorPrototype$1)||fails$Q((function(){var e={};return IteratorPrototype$1[ITERATOR$d].call(e)!==e}));isCallable$n((IteratorPrototype$1=NEW_ITERATOR_PROTOTYPE?{}:create$h(IteratorPrototype$1))[ITERATOR$d])||defineBuiltIn$h(IteratorPrototype$1,ITERATOR$d,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype$1,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},TO_STRING_TAG_SUPPORT$1=toStringTagSupport,classof$l=classof$n,objectToString=TO_STRING_TAG_SUPPORT$1?{}.toString:function(){return"[object "+classof$l(this)+"]"},TO_STRING_TAG_SUPPORT=toStringTagSupport,defineProperty$n=objectDefineProperty.f,createNonEnumerableProperty$c=createNonEnumerableProperty$g,hasOwn$l=hasOwnProperty_1,toString$q=objectToString,wellKnownSymbol$u=wellKnownSymbol$C,TO_STRING_TAG$4=wellKnownSymbol$u("toStringTag"),setToStringTag$d=function(e,t,r,n){if(e){var o=r?e:e.prototype;hasOwn$l(o,TO_STRING_TAG$4)||defineProperty$n(o,TO_STRING_TAG$4,{configurable:!0,value:t}),n&&!TO_STRING_TAG_SUPPORT&&createNonEnumerableProperty$c(o,"toString",toString$q)}},IteratorPrototype=iteratorsCore.IteratorPrototype,create$g=objectCreate,createPropertyDescriptor$6=createPropertyDescriptor$a,setToStringTag$c=setToStringTag$d,Iterators$7=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){var o=t+" Iterator";return e.prototype=create$g(IteratorPrototype,{next:createPropertyDescriptor$6(+!n,r)}),setToStringTag$c(e,o,!1,!0),Iterators$7[o]=returnThis$1,e},uncurryThis$P=functionUncurryThis,aCallable$k=aCallable$n,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$P(aCallable$k(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isCallable$m=isCallable$A,$String$2=String,$TypeError$m=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$m(e))return e;throw $TypeError$m("Can't set "+$String$2(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$l=anObject$p,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=uncurryThisAccessor(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return anObject$l(r),aPossiblePrototype(n),t?e(r,n):r.__proto__=n,r}}():void 0),$$1Y=_export,call$G=functionCall,FunctionName$1=functionName,createIteratorConstructor$2=iteratorCreateConstructor,getPrototypeOf$a=objectGetPrototypeOf,setToStringTag$b=setToStringTag$d,defineBuiltIn$g=defineBuiltIn$i,wellKnownSymbol$t=wellKnownSymbol$C,Iterators$6=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$4=FunctionName$1.PROPER;FunctionName$1.CONFIGURABLE,IteratorsCore.IteratorPrototype;var BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$c=wellKnownSymbol$t("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,o,a,i){createIteratorConstructor$2(r,t,n);var s,c,l,u=function(e){if(e===o&&y)return y;if(!BUGGY_SAFARI_ITERATORS&&e in f)return f[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}},$=t+" Iterator",p=!1,f=e.prototype,d=f[ITERATOR$c]||f["@@iterator"]||o&&f[o],y=!BUGGY_SAFARI_ITERATORS&&d||u(o),h="Array"==t&&f.entries||d;if(h&&(s=getPrototypeOf$a(h.call(new e)))!==Object.prototype&&s.next&&(setToStringTag$b(s,$,!0,!0),Iterators$6[$]=returnThis),PROPER_FUNCTION_NAME$4&&o==VALUES&&d&&d.name!==VALUES&&(p=!0,y=function(){return call$G(d,this)}),o)if(c={values:u(VALUES),keys:a?y:u(KEYS),entries:u(ENTRIES)},i)for(l in c)(BUGGY_SAFARI_ITERATORS||p||!(l in f))&&defineBuiltIn$g(f,l,c[l]);else $$1Y({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||p},c);return i&&f[ITERATOR$c]!==y&&defineBuiltIn$g(f,ITERATOR$c,y,{name:o}),Iterators$6[t]=y,c},createIterResultObject$5=function(e,t){return{value:e,done:t}},toIndexedObject$9=toIndexedObject$e,Iterators$5=iterators,InternalStateModule$e=internalState;objectDefineProperty.f;var defineIterator$4=iteratorDefine,createIterResultObject$4=createIterResultObject$5,ARRAY_ITERATOR$1="Array Iterator",setInternalState$d=InternalStateModule$e.set,getInternalState$8=InternalStateModule$e.getterFor(ARRAY_ITERATOR$1);defineIterator$4(Array,"Array",(function(e,t){setInternalState$d(this,{type:ARRAY_ITERATOR$1,target:toIndexedObject$9(e),index:0,kind:t})}),(function(){var e=getInternalState$8(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$4(void 0,!0)):createIterResultObject$4("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),Iterators$5.Arguments=Iterators$5.Array;var domIterables$1={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$3=domIterables$1,global$C=global$N,classof$k=classof$n,createNonEnumerableProperty$b=createNonEnumerableProperty$g,Iterators$4=iterators,wellKnownSymbol$s=wellKnownSymbol$C,TO_STRING_TAG$3=wellKnownSymbol$s("toStringTag");for(var COLLECTION_NAME$2 in DOMIterables$3){var Collection=global$C[COLLECTION_NAME$2],CollectionPrototype=Collection&&Collection.prototype;CollectionPrototype&&classof$k(CollectionPrototype)!==TO_STRING_TAG$3&&createNonEnumerableProperty$b(CollectionPrototype,TO_STRING_TAG$3,COLLECTION_NAME$2),Iterators$4[COLLECTION_NAME$2]=Iterators$4.Array}var $forEach$3=arrayIteration.forEach,arrayMethodIsStrict$6=arrayMethodIsStrict$8,STRICT_METHOD$5=arrayMethodIsStrict$6("forEach"),arrayForEach$1=STRICT_METHOD$5?[].forEach:function(e){return $forEach$3(this,e,arguments.length>1?arguments[1]:void 0)},$$1X=_export,forEach$a=arrayForEach$1;$$1X({target:"Array",proto:!0,forced:[].forEach!=arrayForEach$1},{forEach:arrayForEach$1});var entryVirtual$e=entryVirtual$h,forEach$9=entryVirtual$e("Array").forEach,parent$1_=forEach$9,forEach$8=parent$1_,classof$j=classof$n,hasOwn$k=hasOwnProperty_1,isPrototypeOf$m=objectIsPrototypeOf,method$d=forEach$8,ArrayPrototype$c=Array.prototype,DOMIterables$2={DOMTokenList:!0,NodeList:!0},forEach$7=function(e){var t=e.forEach;return e===ArrayPrototype$c||isPrototypeOf$m(ArrayPrototype$c,e)&&t===ArrayPrototype$c.forEach||hasOwn$k(DOMIterables$2,classof$j(e))?method$d:t},parent$1Z=forEach$7,forEach$6=parent$1Z,parent$1Y=forEach$6,forEach$5=parent$1Y,forEach$4=forEach$5,forEach$3=forEach$4,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$3),$$1W=_export,toObject$g=toObject$l,nativeKeys$1=objectKeys$3,fails$P=fails$11,FAILS_ON_PRIMITIVES$5=fails$P((function(){nativeKeys$1(1)}));$$1W({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$5},{keys:function(e){return nativeKeys$1(toObject$g(e))}});var path$q=path$u,keys$8=path$q.Object.keys,parent$1X=keys$8,keys$7=parent$1X,parent$1W=keys$7,keys$6=parent$1W,parent$1V=keys$6,keys$5=parent$1V,keys$4=keys$5,keys$3=keys$4,_Object$keys=getDefaultExportFromCjs(keys$3),uncurryThis$O=functionUncurryThis,arraySlice$h=uncurryThis$O([].slice),$$1V=_export,isArray$c=isArray$f,isConstructor$2=isConstructor$4,isObject$n=isObject$w,toAbsoluteIndex$7=toAbsoluteIndex$9,lengthOfArrayLike$h=lengthOfArrayLike$l,toIndexedObject$8=toIndexedObject$e,createProperty$6=createProperty$8,wellKnownSymbol$r=wellKnownSymbol$C,arrayMethodHasSpeciesSupport$5=arrayMethodHasSpeciesSupport$7,nativeSlice=arraySlice$h,HAS_SPECIES_SUPPORT$5=arrayMethodHasSpeciesSupport$5("slice"),SPECIES$4=wellKnownSymbol$r("species"),$Array$4=Array,max$6=Math.max;$$1V({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$5},{slice:function(e,t){var r,n,o,a=toIndexedObject$8(this),i=lengthOfArrayLike$h(a),s=toAbsoluteIndex$7(e,i),c=toAbsoluteIndex$7(void 0===t?i:t,i);if(isArray$c(a)&&(r=a.constructor,(isConstructor$2(r)&&(r===$Array$4||isArray$c(r.prototype))||isObject$n(r)&&null===(r=r[SPECIES$4]))&&(r=void 0),r===$Array$4||void 0===r))return nativeSlice(a,s,c);for(n=new(void 0===r?$Array$4:r)(max$6(c-s,0)),o=0;s<c;s++,o++)s in a&&createProperty$6(n,o,a[s]);return n.length=o,n}});var entryVirtual$d=entryVirtual$h,slice$8=entryVirtual$d("Array").slice,isPrototypeOf$l=objectIsPrototypeOf,method$c=slice$8,ArrayPrototype$b=Array.prototype,slice$7=function(e){var t=e.slice;return e===ArrayPrototype$b||isPrototypeOf$l(ArrayPrototype$b,e)&&t===ArrayPrototype$b.slice?method$c:t},parent$1U=slice$7,slice$6=parent$1U,parent$1T=slice$6,slice$5=parent$1T,parent$1S=slice$5,slice$4=parent$1S,slice$3=slice$4,slice$2=slice$3,_sliceInstanceProperty=getDefaultExportFromCjs(slice$2),DESCRIPTORS$q=descriptors,isArray$b=isArray$f,$TypeError$l=TypeError,getOwnPropertyDescriptor$c=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET$1=DESCRIPTORS$q&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),arraySetLength$1=SILENT_ON_NON_WRITABLE_LENGTH_SET$1?function(e,t){if(isArray$b(e)&&!getOwnPropertyDescriptor$c(e,"length").writable)throw $TypeError$l("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},tryToString$8=tryToString$a,$TypeError$k=TypeError,deletePropertyOrThrow$5=function(e,t){if(!delete e[t])throw $TypeError$k("Cannot delete property "+tryToString$8(t)+" of "+tryToString$8(e))},$$1U=_export,toObject$f=toObject$l,toAbsoluteIndex$6=toAbsoluteIndex$9,toIntegerOrInfinity$b=toIntegerOrInfinity$e,lengthOfArrayLike$g=lengthOfArrayLike$l,setArrayLength$1=arraySetLength$1,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$3,arraySpeciesCreate$1=arraySpeciesCreate$4,createProperty$5=createProperty$8,deletePropertyOrThrow$4=deletePropertyOrThrow$5,arrayMethodHasSpeciesSupport$4=arrayMethodHasSpeciesSupport$7,HAS_SPECIES_SUPPORT$4=arrayMethodHasSpeciesSupport$4("splice"),max$5=Math.max,min$5=Math.min;$$1U({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$4},{splice:function(e,t){var r,n,o,a,i,s,c=toObject$f(this),l=lengthOfArrayLike$g(c),u=toAbsoluteIndex$6(e,l),$=arguments.length;for(0===$?r=n=0:1===$?(r=0,n=l-u):(r=$-2,n=min$5(max$5(toIntegerOrInfinity$b(t),0),l-u)),doesNotExceedSafeInteger$1(l+r-n),o=arraySpeciesCreate$1(c,n),a=0;a<n;a++)(i=u+a)in c&&createProperty$5(o,a,c[i]);if(o.length=n,r<n){for(a=u;a<l-n;a++)s=a+r,(i=a+n)in c?c[s]=c[i]:deletePropertyOrThrow$4(c,s);for(a=l;a>l-n+r;a--)deletePropertyOrThrow$4(c,a-1)}else if(r>n)for(a=l-n;a>u;a--)s=a+r-1,(i=a+n-1)in c?c[s]=c[i]:deletePropertyOrThrow$4(c,s);for(a=0;a<r;a++)c[a+u]=arguments[a+2];return setArrayLength$1(c,l-n+r),o}});var entryVirtual$c=entryVirtual$h,splice$8=entryVirtual$c("Array").splice,isPrototypeOf$k=objectIsPrototypeOf,method$b=splice$8,ArrayPrototype$a=Array.prototype,splice$7=function(e){var t=e.splice;return e===ArrayPrototype$a||isPrototypeOf$k(ArrayPrototype$a,e)&&t===ArrayPrototype$a.splice?method$b:t},parent$1R=splice$7,splice$6=parent$1R,parent$1Q=splice$6,splice$5=parent$1Q,parent$1P=splice$5,splice$4=parent$1P,splice$3=splice$4,splice$2=splice$3,_spliceInstanceProperty=getDefaultExportFromCjs(splice$2),objectGetOwnPropertyNames={},internalObjectKeys=objectKeysInternal,enumBugKeys=enumBugKeys$3,hiddenKeys$3=enumBugKeys.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys(e,hiddenKeys$3)};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var getBuiltIn$h=getBuiltIn$l,uncurryThis$N=functionUncurryThis,getOwnPropertyNamesModule$3=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols,anObject$k=anObject$p,concat$3=uncurryThis$N([].concat),ownKeys$4=getBuiltIn$h("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$3.f(anObject$k(e)),r=getOwnPropertySymbolsModule$3.f;return r?concat$3(t,r(e)):t},hasOwn$j=hasOwnProperty_1,ownKeys$3=ownKeys$4,getOwnPropertyDescriptorModule$4=objectGetOwnPropertyDescriptor,definePropertyModule$2=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys$3(t),o=definePropertyModule$2.f,a=getOwnPropertyDescriptorModule$4.f,i=0;i<n.length;i++){var s=n[i];hasOwn$j(e,s)||r&&hasOwn$j(r,s)||o(e,s,a(t,s))}},isObject$m=isObject$w,createNonEnumerableProperty$a=createNonEnumerableProperty$g,installErrorCause$1=function(e,t){isObject$m(t)&&"cause"in t&&createNonEnumerableProperty$a(e,"cause",t.cause)},uncurryThis$M=functionUncurryThis,$Error$1=Error,replace$d=uncurryThis$M("".replace),TEST=String($Error$1("zxcasd").stack),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(e,t){if(IS_V8_OR_CHAKRA_STACK&&"string"==typeof e&&!$Error$1.prepareStackTrace)for(;t--;)e=replace$d(e,V8_OR_CHAKRA_STACK_ENTRY,"");return e},fails$O=fails$11,createPropertyDescriptor$5=createPropertyDescriptor$a,errorStackInstallable=!fails$O((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",createPropertyDescriptor$5(1,7)),7!==e.stack)})),createNonEnumerableProperty$9=createNonEnumerableProperty$g,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(e,t,r,n){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(e,t):createNonEnumerableProperty$9(e,"stack",clearErrorStack(r,n)))},wellKnownSymbol$q=wellKnownSymbol$C,Iterators$3=iterators,ITERATOR$b=wellKnownSymbol$q("iterator"),ArrayPrototype$9=Array.prototype,isArrayIteratorMethod$3=function(e){return void 0!==e&&(Iterators$3.Array===e||ArrayPrototype$9[ITERATOR$b]===e)},classof$i=classof$n,getMethod$4=getMethod$6,isNullOrUndefined$9=isNullOrUndefined$c,Iterators$2=iterators,wellKnownSymbol$p=wellKnownSymbol$C,ITERATOR$a=wellKnownSymbol$p("iterator"),getIteratorMethod$c=function(e){if(!isNullOrUndefined$9(e))return getMethod$4(e,ITERATOR$a)||getMethod$4(e,"@@iterator")||Iterators$2[classof$i(e)]},call$F=functionCall,aCallable$j=aCallable$n,anObject$j=anObject$p,tryToString$7=tryToString$a,getIteratorMethod$b=getIteratorMethod$c,$TypeError$j=TypeError,getIterator$5=function(e,t){var r=arguments.length<2?getIteratorMethod$b(e):t;if(aCallable$j(r))return anObject$j(call$F(r,e));throw $TypeError$j(tryToString$7(e)+" is not iterable")},call$E=functionCall,anObject$i=anObject$p,getMethod$3=getMethod$6,iteratorClose$4=function(e,t,r){var n,o;anObject$i(e);try{if(!(n=getMethod$3(e,"return"))){if("throw"===t)throw r;return r}n=call$E(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$i(n),r},bind$y=functionBindContext,call$D=functionCall,anObject$h=anObject$p,tryToString$6=tryToString$a,isArrayIteratorMethod$2=isArrayIteratorMethod$3,lengthOfArrayLike$f=lengthOfArrayLike$l,isPrototypeOf$j=objectIsPrototypeOf,getIterator$4=getIterator$5,getIteratorMethod$a=getIteratorMethod$c,iteratorClose$3=iteratorClose$4,$TypeError$i=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$w=function(e,t,r){var n,o,a,i,s,c,l,u=r&&r.that,$=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),f=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),y=bind$y(t,u),h=function(e){return n&&iteratorClose$3(n,"normal",e),new Result(!0,e)},g=function(e){return $?(anObject$h(e),d?y(e[0],e[1],h):y(e[0],e[1])):d?y(e,h):y(e)};if(p)n=e.iterator;else if(f)n=e;else{if(!(o=getIteratorMethod$a(e)))throw $TypeError$i(tryToString$6(e)+" is not iterable");if(isArrayIteratorMethod$2(o)){for(a=0,i=lengthOfArrayLike$f(e);i>a;a++)if((s=g(e[a]))&&isPrototypeOf$j(ResultPrototype,s))return s;return new Result(!1)}n=getIterator$4(e,o)}for(c=p?e.next:n.next;!(l=call$D(c,n)).done;){try{s=g(l.value)}catch(e){iteratorClose$3(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$j(ResultPrototype,s))return s}return new Result(!1)},classof$h=classof$n,$String$1=String,toString$p=function(e){if("Symbol"===classof$h(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$1(e)},toString$o=toString$p,normalizeStringArgument$1=function(e,t){return void 0===e?arguments.length<2?"":t:toString$o(e)},$$1T=_export,isPrototypeOf$i=objectIsPrototypeOf,getPrototypeOf$9=objectGetPrototypeOf,setPrototypeOf$b=objectSetPrototypeOf,copyConstructorProperties=copyConstructorProperties$1,create$f=objectCreate,createNonEnumerableProperty$8=createNonEnumerableProperty$g,createPropertyDescriptor$4=createPropertyDescriptor$a,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,iterate$v=iterate$w,normalizeStringArgument=normalizeStringArgument$1,wellKnownSymbol$o=wellKnownSymbol$C,TO_STRING_TAG$2=wellKnownSymbol$o("toStringTag"),$Error=Error,push$f=[].push,$AggregateError=function(e,t){var r,n=isPrototypeOf$i(AggregateErrorPrototype,this);setPrototypeOf$b?r=setPrototypeOf$b($Error(),n?getPrototypeOf$9(this):AggregateErrorPrototype):(r=n?this:create$f(AggregateErrorPrototype),createNonEnumerableProperty$8(r,TO_STRING_TAG$2,"Error")),void 0!==t&&createNonEnumerableProperty$8(r,"message",normalizeStringArgument(t)),installErrorStack(r,$AggregateError,r.stack,1),arguments.length>2&&installErrorCause(r,arguments[2]);var o=[];return iterate$v(e,push$f,{that:o}),createNonEnumerableProperty$8(r,"errors",o),r};setPrototypeOf$b?setPrototypeOf$b($AggregateError,$Error):copyConstructorProperties($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=create$f($Error.prototype,{constructor:createPropertyDescriptor$4(1,$AggregateError),message:createPropertyDescriptor$4(1,""),name:createPropertyDescriptor$4(1,"AggregateError")});$$1T({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var $location,defer,channel,port,classof$g=classofRaw$2,engineIsNode="undefined"!=typeof process&&"process"==classof$g(process),defineProperty$m=objectDefineProperty,defineBuiltInAccessor$9=function(e,t,r){return defineProperty$m.f(e,t,r)},getBuiltIn$g=getBuiltIn$l,defineBuiltInAccessor$8=defineBuiltInAccessor$9,wellKnownSymbol$n=wellKnownSymbol$C,DESCRIPTORS$p=descriptors,SPECIES$3=wellKnownSymbol$n("species"),setSpecies$6=function(e){var t=getBuiltIn$g(e);DESCRIPTORS$p&&t&&!t[SPECIES$3]&&defineBuiltInAccessor$8(t,SPECIES$3,{configurable:!0,get:function(){return this}})},isPrototypeOf$h=objectIsPrototypeOf,$TypeError$h=TypeError,anInstance$b=function(e,t){if(isPrototypeOf$h(t,e))return e;throw $TypeError$h("Incorrect invocation")},isConstructor$1=isConstructor$4,tryToString$5=tryToString$a,$TypeError$g=TypeError,aConstructor$4=function(e){if(isConstructor$1(e))return e;throw $TypeError$g(tryToString$5(e)+" is not a constructor")},anObject$g=anObject$p,aConstructor$3=aConstructor$4,isNullOrUndefined$8=isNullOrUndefined$c,wellKnownSymbol$m=wellKnownSymbol$C,SPECIES$2=wellKnownSymbol$m("species"),speciesConstructor$5=function(e,t){var r,n=anObject$g(e).constructor;return void 0===n||isNullOrUndefined$8(r=anObject$g(n)[SPECIES$2])?t:aConstructor$3(r)},$TypeError$f=TypeError,validateArgumentsLength$7=function(e,t){if(e<t)throw $TypeError$f("Not enough arguments");return e},userAgent$8=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$8),global$B=global$N,apply$a=functionApply,bind$x=functionBindContext,isCallable$l=isCallable$A,hasOwn$i=hasOwnProperty_1,fails$N=fails$11,html=html$2,arraySlice$g=arraySlice$h,createElement=documentCreateElement$2,validateArgumentsLength$6=validateArgumentsLength$7,IS_IOS$1=engineIsIos,IS_NODE$4=engineIsNode,set$d=global$B.setImmediate,clear=global$B.clearImmediate,process$3=global$B.process,Dispatch=global$B.Dispatch,Function$2=global$B.Function,MessageChannel=global$B.MessageChannel,String$1=global$B.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange";fails$N((function(){$location=global$B.location}));var run=function(e){if(hasOwn$i(queue$2,e)){var t=queue$2[e];delete queue$2[e],t()}},runner=function(e){return function(){run(e)}},eventListener=function(e){run(e.data)},globalPostMessageDefer=function(e){global$B.postMessage(String$1(e),$location.protocol+"//"+$location.host)};set$d&&clear||(set$d=function(e){validateArgumentsLength$6(arguments.length,1);var t=isCallable$l(e)?e:Function$2(e),r=arraySlice$g(arguments,1);return queue$2[++counter]=function(){apply$a(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$4?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$x(port.postMessage,port)):global$B.addEventListener&&isCallable$l(global$B.postMessage)&&!global$B.importScripts&&$location&&"file:"!==$location.protocol&&!fails$N(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$B.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$d,clear:clear},Queue$2=function(){this.head=null,this.tail=null};Queue$2.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var notify$1,toggle,node,promise$6,then,queue$1=Queue$2,userAgent$7=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$7)&&"undefined"!=typeof Pebble,userAgent$6=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$6),global$A=global$N,bind$w=functionBindContext,getOwnPropertyDescriptor$b=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$3=engineIsNode,MutationObserver=global$A.MutationObserver||global$A.WebKitMutationObserver,document$2=global$A.document,process$2=global$A.process,Promise$1=global$A.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$b(global$A,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value;if(!microtask$1){var queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$3&&(e=process$2.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&&notify$1(),e}e&&e.enter()};IS_IOS||IS_NODE$3||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise$6=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$w(promise$6.then,promise$6),notify$1=function(){then(flush)}):IS_NODE$3?notify$1=function(){process$2.nextTick(flush)}:(macrotask=bind$w(macrotask,global$A),notify$1=function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}}var microtask_1=microtask$1,hostReportErrors$1=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$6=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$z=global$N,promiseNativeConstructor=global$z.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$2=engineIsNode,engineIsBrowser=!IS_DENO$1&&!IS_NODE$2&&"object"==typeof window&&"object"==typeof document,global$y=global$N,NativePromiseConstructor$6=promiseNativeConstructor,isCallable$k=isCallable$A,isForced$3=isForced_1,inspectSource=inspectSource$2,wellKnownSymbol$l=wellKnownSymbol$C,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,NativePromisePrototype$3=NativePromiseConstructor$6&&NativePromiseConstructor$6.prototype,SPECIES$1=wellKnownSymbol$l("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$k(global$y.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced$3("Promise",(function(){var e=inspectSource(NativePromiseConstructor$6),t=e!==String(NativePromiseConstructor$6);if(!t&&66===V8_VERSION)return!0;if(!NativePromisePrototype$3.catch||!NativePromisePrototype$3.finally)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){var r=new NativePromiseConstructor$6((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES$1]=n,!(SUBCLASSING=r.then((function(){}))instanceof n))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1})),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$i=aCallable$n,$TypeError$e=TypeError,PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError$e("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$i(t),this.reject=aCallable$i(r)};newPromiseCapability$2.f=function(e){return new PromiseCapability(e)};var $$1S=_export,IS_NODE$1=engineIsNode,global$x=global$N,call$C=functionCall,defineBuiltIn$f=defineBuiltIn$i,setToStringTag$a=setToStringTag$d,setSpecies$5=setSpecies$6,aCallable$h=aCallable$n,isCallable$j=isCallable$A,isObject$l=isObject$w,anInstance$a=anInstance$b,speciesConstructor$4=speciesConstructor$5,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$5=perform$6,Queue=queue$1,InternalStateModule$d=internalState,NativePromiseConstructor$5=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$6=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT;PromiseConstructorDetection.SUBCLASSING;var Internal,OwnPromiseCapability,PromiseWrapper,getInternalPromiseState=InternalStateModule$d.getterFor(PROMISE),setInternalState$c=InternalStateModule$d.set,NativePromisePrototype$2=NativePromiseConstructor$5&&NativePromiseConstructor$5.prototype,PromiseConstructor=NativePromiseConstructor$5,PromisePrototype=NativePromisePrototype$2,TypeError$8=global$x.TypeError,document$1=global$x.document,process$1=global$x.process,newPromiseCapability$1=newPromiseCapabilityModule$6.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$x.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$l(e)||!isCallable$j(t=e.then))&&t},callReaction=function(e,t){var r,n,o,a=t.value,i=t.state==FULFILLED,s=i?e.ok:e.fail,c=e.resolve,l=e.reject,u=e.domain;try{s?(i||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),o=!0)),r===e.promise?l(TypeError$8("Promise-chain cycle")):(n=isThenable(r))?call$C(n,r,c,l):c(r)):l(a)}catch(e){u&&!o&&u.exit(),l(e)}},notify=function(e,t){e.notified||(e.notified=!0,microtask((function(){for(var r,n=e.reactions;r=n.get();)callReaction(r,e);e.notified=!1,t&&!e.rejection&&onUnhandled(e)})))},dispatchEvent=function(e,t,r){var n,o;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$x.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(o=global$x["on"+e])?o(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(e){call$C(task,global$x,(function(){var t,r=e.facade,n=e.value;if(isUnhandled(e)&&(t=perform$5((function(){IS_NODE$1?process$1.emit("unhandledRejection",n,r):dispatchEvent(UNHANDLED_REJECTION,r,n)})),e.rejection=IS_NODE$1||isUnhandled(e)?UNHANDLED:HANDLED,t.error))throw t.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){call$C(task,global$x,(function(){var t=e.facade;IS_NODE$1?process$1.emit("rejectionHandled",t):dispatchEvent(REJECTION_HANDLED,t,e.value)}))},bind$v=function(e,t,r){return function(n){e(t,n,r)}},internalReject=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw TypeError$8("Promise can't be resolved itself");var n=isThenable(t);n?microtask((function(){var r={done:!1};try{call$C(n,t,bind$v(internalResolve,r,e),bind$v(internalReject,r,e))}catch(t){internalReject(r,t,e)}})):(e.value=t,e.state=FULFILLED,notify(e,!1))}catch(t){internalReject({done:!1},t,e)}}};FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance$a(this,PromisePrototype),aCallable$h(e),call$C(Internal,this);var t=getInternalPromiseState(this);try{e(bind$v(internalResolve,t),bind$v(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState$c(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$f(PromisePrototype,"then",(function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor$4(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$j(e)||e,n.fail=isCallable$j(t)&&t,n.domain=IS_NODE$1?process$1.domain:void 0,r.state==PENDING?r.reactions.add(n):microtask((function(){callReaction(n,r)})),n.promise})),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$v(internalResolve,t),this.reject=bind$v(internalReject,t)},newPromiseCapabilityModule$6.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),$$1S({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag$a(PromiseConstructor,PROMISE,!1,!0),setSpecies$5(PROMISE);var wellKnownSymbol$k=wellKnownSymbol$C,ITERATOR$9=wellKnownSymbol$k("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$9]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$4=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var n={};n[ITERATOR$9]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$4=promiseNativeConstructor,checkCorrectnessOfIteration$3=checkCorrectnessOfIteration$4,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$3((function(e){NativePromiseConstructor$4.all(e).then(void 0,(function(){}))})),$$1R=_export,call$B=functionCall,aCallable$g=aCallable$n,newPromiseCapabilityModule$5=newPromiseCapability$2,perform$4=perform$6,iterate$u=iterate$w,PROMISE_STATICS_INCORRECT_ITERATION$3=promiseStaticsIncorrectIteration;$$1R({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$3},{all:function(e){var t=this,r=newPromiseCapabilityModule$5.f(t),n=r.resolve,o=r.reject,a=perform$4((function(){var r=aCallable$g(t.resolve),a=[],i=0,s=1;iterate$u(e,(function(e){var c=i++,l=!1;s++,call$B(r,t,e).then((function(e){l||(l=!0,a[c]=e,--s||n(a))}),o)})),--s||n(a)}));return a.error&&o(a.value),r.promise}});var $$1Q=_export,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor$3=promiseNativeConstructor;promiseNativeConstructor&&promiseNativeConstructor.prototype,$$1Q({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}});var $$1P=_export,call$A=functionCall,aCallable$f=aCallable$n,newPromiseCapabilityModule$4=newPromiseCapability$2,perform$3=perform$6,iterate$t=iterate$w,PROMISE_STATICS_INCORRECT_ITERATION$2=promiseStaticsIncorrectIteration;$$1P({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$2},{race:function(e){var t=this,r=newPromiseCapabilityModule$4.f(t),n=r.reject,o=perform$3((function(){var o=aCallable$f(t.resolve);iterate$t(e,(function(e){call$A(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var $$1O=_export,call$z=functionCall,newPromiseCapabilityModule$3=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$1O({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule$3.f(this);return call$z(t.reject,void 0,e),t.promise}});var anObject$f=anObject$p,isObject$k=isObject$w,newPromiseCapability=newPromiseCapability$2,promiseResolve$3=function(e,t){if(anObject$f(e),isObject$k(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},$$1N=_export,getBuiltIn$f=getBuiltIn$l,IS_PURE$2=isPure,NativePromiseConstructor$2=promiseNativeConstructor,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve$2=promiseResolve$3,PromiseConstructorWrapper=getBuiltIn$f("Promise"),CHECK_WRAPPER=!FORCED_PROMISE_CONSTRUCTOR;$$1N({target:"Promise",stat:!0,forced:IS_PURE$2},{resolve:function(e){return promiseResolve$2(CHECK_WRAPPER&&this===PromiseConstructorWrapper?NativePromiseConstructor$2:this,e)}});var $$1M=_export,call$y=functionCall,aCallable$e=aCallable$n,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$2=perform$6,iterate$s=iterate$w,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$1M({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{allSettled:function(e){var t=this,r=newPromiseCapabilityModule$2.f(t),n=r.resolve,o=r.reject,a=perform$2((function(){var r=aCallable$e(t.resolve),o=[],a=0,i=1;iterate$s(e,(function(e){var s=a++,c=!1;i++,call$y(r,t,e).then((function(e){c||(c=!0,o[s]={status:"fulfilled",value:e},--i||n(o))}),(function(e){c||(c=!0,o[s]={status:"rejected",reason:e},--i||n(o))}))})),--i||n(o)}));return a.error&&o(a.value),r.promise}});var $$1L=_export,call$x=functionCall,aCallable$d=aCallable$n,getBuiltIn$e=getBuiltIn$l,newPromiseCapabilityModule$1=newPromiseCapability$2,perform$1=perform$6,iterate$r=iterate$w,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,PROMISE_ANY_ERROR="No one promise resolved";$$1L({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{any:function(e){var t=this,r=getBuiltIn$e("AggregateError"),n=newPromiseCapabilityModule$1.f(t),o=n.resolve,a=n.reject,i=perform$1((function(){var n=aCallable$d(t.resolve),i=[],s=0,c=1,l=!1;iterate$r(e,(function(e){var u=s++,$=!1;c++,call$x(n,t,e).then((function(e){$||l||(l=!0,o(e))}),(function(e){$||l||($=!0,i[u]=e,--c||a(new r(i,PROMISE_ANY_ERROR)))}))})),--c||a(new r(i,PROMISE_ANY_ERROR))}));return i.error&&a(i.value),n.promise}});var $$1K=_export,NativePromiseConstructor$1=promiseNativeConstructor,fails$M=fails$11,getBuiltIn$d=getBuiltIn$l,isCallable$i=isCallable$A,speciesConstructor$3=speciesConstructor$5,promiseResolve$1=promiseResolve$3,NativePromisePrototype$1=NativePromiseConstructor$1&&NativePromiseConstructor$1.prototype,NON_GENERIC$1=!!NativePromiseConstructor$1&&fails$M((function(){NativePromisePrototype$1.finally.call({then:function(){}},(function(){}))}));$$1K({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC$1},{finally:function(e){var t=speciesConstructor$3(this,getBuiltIn$d("Promise")),r=isCallable$i(e);return this.then(r?function(r){return promiseResolve$1(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve$1(t,e()).then((function(){throw r}))}:e)}});var uncurryThis$L=functionUncurryThis,toIntegerOrInfinity$a=toIntegerOrInfinity$e,toString$n=toString$p,requireObjectCoercible$b=requireObjectCoercible$e,charAt$c=uncurryThis$L("".charAt),charCodeAt$5=uncurryThis$L("".charCodeAt),stringSlice$b=uncurryThis$L("".slice),createMethod$7=function(e){return function(t,r){var n,o,a=toString$n(requireObjectCoercible$b(t)),i=toIntegerOrInfinity$a(r),s=a.length;return i<0||i>=s?e?"":void 0:(n=charCodeAt$5(a,i))<55296||n>56319||i+1===s||(o=charCodeAt$5(a,i+1))<56320||o>57343?e?charAt$c(a,i):n:e?stringSlice$b(a,i,i+2):o-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$7(!1),charAt:createMethod$7(!0)},charAt$b=stringMultibyte.charAt,toString$m=toString$p,InternalStateModule$c=internalState,defineIterator$3=iteratorDefine,createIterResultObject$3=createIterResultObject$5,STRING_ITERATOR="String Iterator",setInternalState$b=InternalStateModule$c.set,getInternalState$7=InternalStateModule$c.getterFor(STRING_ITERATOR);defineIterator$3(String,"String",(function(e){setInternalState$b(this,{type:STRING_ITERATOR,string:toString$m(e),index:0})}),(function(){var e,t=getInternalState$7(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject$3(void 0,!0):(e=charAt$b(r,n),t.index+=e.length,createIterResultObject$3(e,!1))}));var path$p=path$u,promise$5=path$p.Promise,parent$1O=promise$5,promise$4=parent$1O,parent$1N=promise$4,promise$3=parent$1N,$$1J=_export,newPromiseCapabilityModule=newPromiseCapability$2,perform=perform$6;$$1J({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=newPromiseCapabilityModule.f(this),r=perform(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var parent$1M=promise$3,promise$2=parent$1M,promise$1=promise$2,promise=promise$1,_Promise=getDefaultExportFromCjs(promise),$$1I=_export;$$1I({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var path$o=path$u,isNan$5=path$o.Number.isNaN,parent$1L=isNan$5,isNan$4=parent$1L,parent$1K=isNan$4,isNan$3=parent$1K,parent$1J=isNan$3,isNan$2=parent$1J,isNan$1=isNan$2,isNan=isNan$1,_Number$isNaN=getDefaultExportFromCjs(isNan),whitespaces$7="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis$K=functionUncurryThis,requireObjectCoercible$a=requireObjectCoercible$e,toString$l=toString$p,whitespaces$6=whitespaces$7,replace$c=uncurryThis$K("".replace),ltrim$1=RegExp("^["+whitespaces$6+"]+"),rtrim$1=RegExp("(^|[^"+whitespaces$6+"])["+whitespaces$6+"]+$"),createMethod$6=function(e){return function(t){var r=toString$l(requireObjectCoercible$a(t));return 1&e&&(r=replace$c(r,ltrim$1,"")),2&e&&(r=replace$c(r,rtrim$1,"$1")),r}},stringTrim$1={start:createMethod$6(1),end:createMethod$6(2),trim:createMethod$6(3)},global$w=global$N,fails$L=fails$11,uncurryThis$J=functionUncurryThis,toString$k=toString$p,trim$9=stringTrim$1.trim,whitespaces$5=whitespaces$7,$parseInt$1=global$w.parseInt,Symbol$4=global$w.Symbol,ITERATOR$8=Symbol$4&&Symbol$4.iterator,hex=/^[+-]?0x/i,exec$9=uncurryThis$J(hex.exec),FORCED$a=8!==$parseInt$1(whitespaces$5+"08")||22!==$parseInt$1(whitespaces$5+"0x16")||ITERATOR$8&&!fails$L((function(){$parseInt$1(Object(ITERATOR$8))})),numberParseInt=FORCED$a?function(e,t){var r=trim$9(toString$k(e));return $parseInt$1(r,t>>>0||(exec$9(hex,r)?16:10))}:$parseInt$1,$$1H=_export,$parseInt=numberParseInt;$$1H({global:!0,forced:parseInt!=numberParseInt},{parseInt:numberParseInt});var path$n=path$u,_parseInt$6=path$n.parseInt,parent$1I=_parseInt$6,_parseInt$5=parent$1I,parent$1H=_parseInt$5,_parseInt$4=parent$1H,parent$1G=_parseInt$4,_parseInt$3=parent$1G,_parseInt$2=_parseInt$3,_parseInt=_parseInt$2,_parseInt$1=getDefaultExportFromCjs(_parseInt),$$1G=_export,$map$1=arrayIteration.map,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$7,HAS_SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport$3("map");$$1G({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3},{map:function(e){return $map$1(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$b=entryVirtual$h,map$c=entryVirtual$b("Array").map,isPrototypeOf$g=objectIsPrototypeOf,method$a=map$c,ArrayPrototype$8=Array.prototype,map$b=function(e){var t=e.map;return e===ArrayPrototype$8||isPrototypeOf$g(ArrayPrototype$8,e)&&t===ArrayPrototype$8.map?method$a:t},parent$1F=map$b,map$a=parent$1F,parent$1E=map$a,map$9=parent$1E,parent$1D=map$9,map$8=parent$1D,map$7=map$8,map$6=map$7,_mapInstanceProperty=getDefaultExportFromCjs(map$6),$$1F=_export,isArray$a=isArray$f;$$1F({target:"Array",stat:!0},{isArray:isArray$a});var path$m=path$u,isArray$9=path$m.Array.isArray,parent$1C=isArray$9,isArray$8=parent$1C,parent$1B=isArray$8,isArray$7=parent$1B,parent$1A=isArray$7,isArray$6=parent$1A,isArray$5=isArray$6,isArray$4=isArray$5,_Array$isArray=getDefaultExportFromCjs(isArray$4),$$1E=_export,$filter$2=arrayIteration.filter,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$7,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$2("filter");$$1E({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{filter:function(e){return $filter$2(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$a=entryVirtual$h,filter$6=entryVirtual$a("Array").filter,isPrototypeOf$f=objectIsPrototypeOf,method$9=filter$6,ArrayPrototype$7=Array.prototype,filter$5=function(e){var t=e.filter;return e===ArrayPrototype$7||isPrototypeOf$f(ArrayPrototype$7,e)&&t===ArrayPrototype$7.filter?method$9:t},parent$1z=filter$5,filter$4=parent$1z,parent$1y=filter$4,filter$3=parent$1y,parent$1x=filter$3,filter$2=parent$1x,filter$1=filter$2,filter2=filter$1,_filterInstanceProperty=getDefaultExportFromCjs(filter2),objectGetOwnPropertyNamesExternal$1={},toAbsoluteIndex$5=toAbsoluteIndex$9,lengthOfArrayLike$e=lengthOfArrayLike$l,createProperty$4=createProperty$8,$Array$3=Array,max$4=Math.max,arraySliceSimple$1=function(e,t,r){for(var n=lengthOfArrayLike$e(e),o=toAbsoluteIndex$5(t,n),a=toAbsoluteIndex$5(void 0===r?n:r,n),i=$Array$3(max$4(a-o,0)),s=0;o<a;o++,s++)createProperty$4(i,s,e[o]);return i.length=s,i},classof$f=classofRaw$2,toIndexedObject$7=toIndexedObject$e,$getOwnPropertyNames$2=objectGetOwnPropertyNames.f,arraySlice$f=arraySliceSimple$1,windowNames$1="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames$1=function(e){try{return $getOwnPropertyNames$2(e)}catch(e){return arraySlice$f(windowNames$1)}};objectGetOwnPropertyNamesExternal$1.f=function(e){return windowNames$1&&"Window"==classof$f(e)?getWindowNames$1(e):$getOwnPropertyNames$2(toIndexedObject$7(e))};var wellKnownSymbolWrapped={},wellKnownSymbol$j=wellKnownSymbol$C;wellKnownSymbolWrapped.f=wellKnownSymbol$j;var path$l=path$u,hasOwn$h=hasOwnProperty_1,wrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,defineProperty$l=objectDefineProperty.f,wellKnownSymbolDefine=function(e){var t=path$l.Symbol||(path$l.Symbol={});hasOwn$h(t,e)||defineProperty$l(t,e,{value:wrappedWellKnownSymbolModule$1.f(e)})},call$w=functionCall,getBuiltIn$c=getBuiltIn$l,wellKnownSymbol$i=wellKnownSymbol$C,defineBuiltIn$e=defineBuiltIn$i,symbolDefineToPrimitive=function(){var e=getBuiltIn$c("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=wellKnownSymbol$i("toPrimitive");t&&!t[n]&&defineBuiltIn$e(t,n,(function(e){return call$w(r,this)}),{arity:1})},$$1D=_export,global$v=global$N,call$v=functionCall,uncurryThis$I=functionUncurryThis,DESCRIPTORS$o=descriptors,NATIVE_SYMBOL$4=symbolConstructorDetection,fails$K=fails$11,hasOwn$g=hasOwnProperty_1,isPrototypeOf$e=objectIsPrototypeOf,anObject$e=anObject$p,toIndexedObject$6=toIndexedObject$e,toPropertyKey$1=toPropertyKey$5,$toString$5=toString$p,createPropertyDescriptor$3=createPropertyDescriptor$a,nativeObjectCreate=objectCreate,objectKeys$1=objectKeys$3,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal$1,getOwnPropertySymbolsModule$2=objectGetOwnPropertySymbols,getOwnPropertyDescriptorModule$3=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,definePropertiesModule=objectDefineProperties,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,defineBuiltIn$d=defineBuiltIn$i,defineBuiltInAccessor$7=defineBuiltInAccessor$9,shared$4=sharedExports,sharedKey=sharedKey$4,hiddenKeys$2=hiddenKeys$7,uid$3=uid$6,wellKnownSymbol$h=wellKnownSymbol$C,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol$l=wellKnownSymbolDefine,defineSymbolToPrimitive$1=symbolDefineToPrimitive,setToStringTag$9=setToStringTag$d,InternalStateModule$b=internalState,$forEach$2=arrayIteration.forEach,HIDDEN=sharedKey("hidden"),SYMBOL="Symbol",PROTOTYPE$1="prototype",setInternalState$a=InternalStateModule$b.set,getInternalState$6=InternalStateModule$b.getterFor(SYMBOL),ObjectPrototype$3=Object[PROTOTYPE$1],$Symbol=global$v.Symbol,SymbolPrototype=$Symbol&&$Symbol[PROTOTYPE$1],TypeError$7=global$v.TypeError,QObject=global$v.QObject,nativeGetOwnPropertyDescriptor$2=getOwnPropertyDescriptorModule$3.f,nativeDefineProperty$1=definePropertyModule$1.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule$1.f,push$e=uncurryThis$I([].push),AllSymbols=shared$4("symbols"),ObjectPrototypeSymbols=shared$4("op-symbols"),WellKnownSymbolsStore$1=shared$4("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE$1]||!QObject[PROTOTYPE$1].findChild,setSymbolDescriptor=DESCRIPTORS$o&&fails$K((function(){return 7!=nativeObjectCreate(nativeDefineProperty$1({},"a",{get:function(){return nativeDefineProperty$1(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=nativeGetOwnPropertyDescriptor$2(ObjectPrototype$3,t);n&&delete ObjectPrototype$3[t],nativeDefineProperty$1(e,t,r),n&&e!==ObjectPrototype$3&&nativeDefineProperty$1(ObjectPrototype$3,t,n)}:nativeDefineProperty$1,wrap=function(e,t){var r=AllSymbols[e]=nativeObjectCreate(SymbolPrototype);return setInternalState$a(r,{type:SYMBOL,tag:e,description:t}),DESCRIPTORS$o||(r.description=t),r},$defineProperty=function(e,t,r){e===ObjectPrototype$3&&$defineProperty(ObjectPrototypeSymbols,t,r),anObject$e(e);var n=toPropertyKey$1(t);return anObject$e(r),hasOwn$g(AllSymbols,n)?(r.enumerable?(hasOwn$g(e,HIDDEN)&&e[HIDDEN][n]&&(e[HIDDEN][n]=!1),r=nativeObjectCreate(r,{enumerable:createPropertyDescriptor$3(0,!1)})):(hasOwn$g(e,HIDDEN)||nativeDefineProperty$1(e,HIDDEN,createPropertyDescriptor$3(1,{})),e[HIDDEN][n]=!0),setSymbolDescriptor(e,n,r)):nativeDefineProperty$1(e,n,r)},$defineProperties=function(e,t){anObject$e(e);var r=toIndexedObject$6(t),n=objectKeys$1(r).concat($getOwnPropertySymbols(r));return $forEach$2(n,(function(t){DESCRIPTORS$o&&!call$v($propertyIsEnumerable,r,t)||$defineProperty(e,t,r[t])})),e},$create=function(e,t){return void 0===t?nativeObjectCreate(e):$defineProperties(nativeObjectCreate(e),t)},$propertyIsEnumerable=function(e){var t=toPropertyKey$1(e),r=call$v(nativePropertyIsEnumerable,this,t);return!(this===ObjectPrototype$3&&hasOwn$g(AllSymbols,t)&&!hasOwn$g(ObjectPrototypeSymbols,t))&&(!(r||!hasOwn$g(this,t)||!hasOwn$g(AllSymbols,t)||hasOwn$g(this,HIDDEN)&&this[HIDDEN][t])||r)},$getOwnPropertyDescriptor=function(e,t){var r=toIndexedObject$6(e),n=toPropertyKey$1(t);if(r!==ObjectPrototype$3||!hasOwn$g(AllSymbols,n)||hasOwn$g(ObjectPrototypeSymbols,n)){var o=nativeGetOwnPropertyDescriptor$2(r,n);return!o||!hasOwn$g(AllSymbols,n)||hasOwn$g(r,HIDDEN)&&r[HIDDEN][n]||(o.enumerable=!0),o}},$getOwnPropertyNames$1=function(e){var t=nativeGetOwnPropertyNames(toIndexedObject$6(e)),r=[];return $forEach$2(t,(function(e){hasOwn$g(AllSymbols,e)||hasOwn$g(hiddenKeys$2,e)||push$e(r,e)})),r},$getOwnPropertySymbols=function(e){var t=e===ObjectPrototype$3,r=nativeGetOwnPropertyNames(t?ObjectPrototypeSymbols:toIndexedObject$6(e)),n=[];return $forEach$2(r,(function(e){!hasOwn$g(AllSymbols,e)||t&&!hasOwn$g(ObjectPrototype$3,e)||push$e(n,AllSymbols[e])})),n};NATIVE_SYMBOL$4||(defineBuiltIn$d(SymbolPrototype=($Symbol=function(){if(isPrototypeOf$e(SymbolPrototype,this))throw TypeError$7("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$toString$5(arguments[0]):void 0,t=uid$3(e),r=function(e){this===ObjectPrototype$3&&call$v(r,ObjectPrototypeSymbols,e),hasOwn$g(this,HIDDEN)&&hasOwn$g(this[HIDDEN],t)&&(this[HIDDEN][t]=!1),setSymbolDescriptor(this,t,createPropertyDescriptor$3(1,e))};return DESCRIPTORS$o&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$3,t,{configurable:!0,set:r}),wrap(t,e)})[PROTOTYPE$1],"toString",(function(){return getInternalState$6(this).tag})),defineBuiltIn$d($Symbol,"withoutSetter",(function(e){return wrap(uid$3(e),e)})),propertyIsEnumerableModule$1.f=$propertyIsEnumerable,definePropertyModule$1.f=$defineProperty,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule$3.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule$2.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames$1,getOwnPropertySymbolsModule$2.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(e){return wrap(wellKnownSymbol$h(e),e)},DESCRIPTORS$o&&defineBuiltInAccessor$7(SymbolPrototype,"description",{configurable:!0,get:function(){return getInternalState$6(this).description}})),$$1D({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$4,sham:!NATIVE_SYMBOL$4},{Symbol:$Symbol}),$forEach$2(objectKeys$1(WellKnownSymbolsStore$1),(function(e){defineWellKnownSymbol$l(e)})),$$1D({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$4},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$$1D({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$4,sham:!DESCRIPTORS$o},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),$$1D({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$4},{getOwnPropertyNames:$getOwnPropertyNames$1}),defineSymbolToPrimitive$1(),setToStringTag$9($Symbol,SYMBOL),hiddenKeys$2[HIDDEN]=!0;var NATIVE_SYMBOL$3=symbolConstructorDetection,symbolRegistryDetection=NATIVE_SYMBOL$3&&!!Symbol.for&&!!Symbol.keyFor,$$1C=_export,getBuiltIn$b=getBuiltIn$l,hasOwn$f=hasOwnProperty_1,toString$j=toString$p,shared$3=sharedExports,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$3("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$3("symbol-to-string-registry");$$1C({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(e){var t=toString$j(e);if(hasOwn$f(StringToSymbolRegistry,t))return StringToSymbolRegistry[t];var r=getBuiltIn$b("Symbol")(t);return StringToSymbolRegistry[t]=r,SymbolToStringRegistry$1[r]=t,r}});var $$1B=_export,hasOwn$e=hasOwnProperty_1,isSymbol$5=isSymbol$8,tryToString$4=tryToString$a,shared$2=sharedExports,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared$2("symbol-to-string-registry");$$1B({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function(e){if(!isSymbol$5(e))throw TypeError(tryToString$4(e)+" is not a symbol");if(hasOwn$e(SymbolToStringRegistry,e))return SymbolToStringRegistry[e]}});var uncurryThis$H=functionUncurryThis,isArray$3=isArray$f,isCallable$h=isCallable$A,classof$e=classofRaw$2,toString$i=toString$p,push$d=uncurryThis$H([].push),getJsonReplacerFunction=function(e){if(isCallable$h(e))return e;if(isArray$3(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?push$d(r,o):"number"!=typeof o&&"Number"!=classof$e(o)&&"String"!=classof$e(o)||push$d(r,toString$i(o))}var a=r.length,i=!0;return function(e,t){if(i)return i=!1,t;if(isArray$3(this))return t;for(var n=0;n<a;n++)if(r[n]===e)return t}}},$$1A=_export,getBuiltIn$a=getBuiltIn$l,apply$9=functionApply,call$u=functionCall,uncurryThis$G=functionUncurryThis,fails$J=fails$11,isCallable$g=isCallable$A,isSymbol$4=isSymbol$8,arraySlice$e=arraySlice$h,getReplacerFunction=getJsonReplacerFunction,NATIVE_SYMBOL$2=symbolConstructorDetection,$String=String,$stringify$1=getBuiltIn$a("JSON","stringify"),exec$8=uncurryThis$G(/./.exec),charAt$a=uncurryThis$G("".charAt),charCodeAt$4=uncurryThis$G("".charCodeAt),replace$b=uncurryThis$G("".replace),numberToString$3=uncurryThis$G(1..toString),tester$1=/[\uD800-\uDFFF]/g,low$1=/^[\uD800-\uDBFF]$/,hi$1=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION$1=!NATIVE_SYMBOL$2||fails$J((function(){var e=getBuiltIn$a("Symbol")();return"[null]"!=$stringify$1([e])||"{}"!=$stringify$1({a:e})||"{}"!=$stringify$1(Object(e))})),ILL_FORMED_UNICODE$1=fails$J((function(){return'"\\udf06\\ud834"'!==$stringify$1("\udf06\ud834")||'"\\udead"'!==$stringify$1("\udead")})),stringifyWithSymbolsFix$1=function(e,t){var r=arraySlice$e(arguments),n=getReplacerFunction(t);if(isCallable$g(n)||void 0!==e&&!isSymbol$4(e))return r[1]=function(e,t){if(isCallable$g(n)&&(t=call$u(n,this,$String(e),t)),!isSymbol$4(t))return t},apply$9($stringify$1,null,r)},fixIllFormed$1=function(e,t,r){var n=charAt$a(r,t-1),o=charAt$a(r,t+1);return exec$8(low$1,e)&&!exec$8(hi$1,o)||exec$8(hi$1,e)&&!exec$8(low$1,n)?"\\u"+numberToString$3(charCodeAt$4(e,0),16):e};$stringify$1&&$$1A({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION$1||ILL_FORMED_UNICODE$1},{stringify:function(e,t,r){var n=arraySlice$e(arguments),o=apply$9(WRONG_SYMBOLS_CONVERSION$1?stringifyWithSymbolsFix$1:$stringify$1,null,n);return ILL_FORMED_UNICODE$1&&"string"==typeof o?replace$b(o,tester$1,fixIllFormed$1):o}});var $$1z=_export,NATIVE_SYMBOL$1=symbolConstructorDetection,fails$I=fails$11,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,toObject$e=toObject$l,FORCED$9=!NATIVE_SYMBOL$1||fails$I((function(){getOwnPropertySymbolsModule$1.f(1)}));$$1z({target:"Object",stat:!0,forced:FORCED$9},{getOwnPropertySymbols:function(e){var t=getOwnPropertySymbolsModule$1.f;return t?t(toObject$e(e)):[]}});var defineWellKnownSymbol$k=wellKnownSymbolDefine;defineWellKnownSymbol$k("asyncIterator");var defineWellKnownSymbol$j=wellKnownSymbolDefine;defineWellKnownSymbol$j("hasInstance");var defineWellKnownSymbol$i=wellKnownSymbolDefine;defineWellKnownSymbol$i("isConcatSpreadable");var defineWellKnownSymbol$h=wellKnownSymbolDefine;defineWellKnownSymbol$h("iterator");var defineWellKnownSymbol$g=wellKnownSymbolDefine;defineWellKnownSymbol$g("match");var defineWellKnownSymbol$f=wellKnownSymbolDefine;defineWellKnownSymbol$f("matchAll");var defineWellKnownSymbol$e=wellKnownSymbolDefine;defineWellKnownSymbol$e("replace");var defineWellKnownSymbol$d=wellKnownSymbolDefine;defineWellKnownSymbol$d("search");var defineWellKnownSymbol$c=wellKnownSymbolDefine;defineWellKnownSymbol$c("species");var defineWellKnownSymbol$b=wellKnownSymbolDefine;defineWellKnownSymbol$b("split");var defineWellKnownSymbol$a=wellKnownSymbolDefine,defineSymbolToPrimitive=symbolDefineToPrimitive;defineWellKnownSymbol$a("toPrimitive"),defineSymbolToPrimitive();var getBuiltIn$9=getBuiltIn$l,defineWellKnownSymbol$9=wellKnownSymbolDefine,setToStringTag$8=setToStringTag$d;defineWellKnownSymbol$9("toStringTag"),setToStringTag$8(getBuiltIn$9("Symbol"),"Symbol");var defineWellKnownSymbol$8=wellKnownSymbolDefine;defineWellKnownSymbol$8("unscopables");var global$u=global$N,setToStringTag$7=setToStringTag$d;setToStringTag$7(global$u.JSON,"JSON",!0);var path$k=path$u,symbol$5=path$k.Symbol,parent$1w=symbol$5,symbol$4=parent$1w,defineWellKnownSymbol$7=wellKnownSymbolDefine;defineWellKnownSymbol$7("dispose");var parent$1v=symbol$4,symbol$3=parent$1v,defineWellKnownSymbol$6=wellKnownSymbolDefine;defineWellKnownSymbol$6("asyncDispose");var $$1y=_export,getBuiltIn$8=getBuiltIn$l,uncurryThis$F=functionUncurryThis,Symbol$3=getBuiltIn$8("Symbol"),keyFor2=Symbol$3.keyFor,thisSymbolValue$1=uncurryThis$F(Symbol$3.prototype.valueOf);$$1y({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==keyFor2(thisSymbolValue$1(e))}catch(e){return!1}}});for(var $$1x=_export,shared$1=sharedExports,getBuiltIn$7=getBuiltIn$l,uncurryThis$E=functionUncurryThis,isSymbol$3=isSymbol$8,wellKnownSymbol$g=wellKnownSymbol$C,Symbol$2=getBuiltIn$7("Symbol"),$isWellKnown=Symbol$2.isWellKnown,getOwnPropertyNames$4=getBuiltIn$7("Object","getOwnPropertyNames"),thisSymbolValue=uncurryThis$E(Symbol$2.prototype.valueOf),WellKnownSymbolsStore=shared$1("wks"),i=0,symbolKeys=getOwnPropertyNames$4(Symbol$2),symbolKeysLength=symbolKeys.length;i<symbolKeysLength;i++)try{var symbolKey=symbolKeys[i];isSymbol$3(Symbol$2[symbolKey])&&wellKnownSymbol$g(symbolKey)}catch(e){}$$1x({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if($isWellKnown&&$isWellKnown(e))return!0;try{for(var t=thisSymbolValue(e),r=0,n=getOwnPropertyNames$4(WellKnownSymbolsStore),o=n.length;r<o;r++)if(WellKnownSymbolsStore[n[r]]==t)return!0}catch(e){}return!1}});var defineWellKnownSymbol$5=wellKnownSymbolDefine;defineWellKnownSymbol$5("matcher");var defineWellKnownSymbol$4=wellKnownSymbolDefine;defineWellKnownSymbol$4("metadataKey");var defineWellKnownSymbol$3=wellKnownSymbolDefine;defineWellKnownSymbol$3("observable");var defineWellKnownSymbol$2=wellKnownSymbolDefine;defineWellKnownSymbol$2("metadata");var defineWellKnownSymbol$1=wellKnownSymbolDefine;defineWellKnownSymbol$1("patternMatch");var defineWellKnownSymbol=wellKnownSymbolDefine;defineWellKnownSymbol("replaceAll");var parent$1u=symbol$3,symbol$2=parent$1u,symbol$1=symbol$2,_Symbol$1=getDefaultExportFromCjs(symbol$1),WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,iterator$5=WrappedWellKnownSymbolModule$1.f("iterator"),parent$1t=iterator$5,iterator$4=parent$1t,parent$1s=iterator$4,iterator$3=parent$1s,parent$1r=iterator$3,iterator$2=parent$1r,iterator$1=iterator$2,_Symbol$iterator$1=getDefaultExportFromCjs(iterator$1);function _typeof$2(e){return(_typeof$2="function"==typeof _Symbol$1&&"symbol"==typeof _Symbol$iterator$1?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol$1&&e.constructor===_Symbol$1&&e!==_Symbol$1.prototype?"symbol":typeof e})(e)}var path$j=path$u,getOwnPropertySymbols$5=path$j.Object.getOwnPropertySymbols,parent$1q=getOwnPropertySymbols$5,getOwnPropertySymbols$4=parent$1q,parent$1p=getOwnPropertySymbols$4,getOwnPropertySymbols$3=parent$1p,parent$1o=getOwnPropertySymbols$3,getOwnPropertySymbols$2=parent$1o,getOwnPropertySymbols$1=getOwnPropertySymbols$2,getOwnPropertySymbols2=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols2),getOwnPropertyDescriptor$a={exports:{}},$$1w=_export,fails$H=fails$11,toIndexedObject$5=toIndexedObject$e,nativeGetOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$n=descriptors,FORCED$8=!DESCRIPTORS$n||fails$H((function(){nativeGetOwnPropertyDescriptor$1(1)}));$$1w({target:"Object",stat:!0,forced:FORCED$8,sham:!DESCRIPTORS$n},{getOwnPropertyDescriptor:function(e,t){return nativeGetOwnPropertyDescriptor$1(toIndexedObject$5(e),t)}});var path$i=path$u,Object$4=path$i.Object,getOwnPropertyDescriptor$9=getOwnPropertyDescriptor$a.exports=function(e,t){return Object$4.getOwnPropertyDescriptor(e,t)};Object$4.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$9.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$a.exports,parent$1n=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$8=parent$1n,parent$1m=getOwnPropertyDescriptor$8,getOwnPropertyDescriptor$7=parent$1m,parent$1l=getOwnPropertyDescriptor$7,getOwnPropertyDescriptor$6=parent$1l,getOwnPropertyDescriptor$5=getOwnPropertyDescriptor$6,getOwnPropertyDescriptor$4=getOwnPropertyDescriptor$5,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor$4),$$1v=_export,DESCRIPTORS$m=descriptors,ownKeys$2=ownKeys$4,toIndexedObject$4=toIndexedObject$e,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor,createProperty$3=createProperty$8;$$1v({target:"Object",stat:!0,sham:!DESCRIPTORS$m},{getOwnPropertyDescriptors:function(e){for(var t,r,n=toIndexedObject$4(e),o=getOwnPropertyDescriptorModule$2.f,a=ownKeys$2(n),i={},s=0;a.length>s;)void 0!==(r=o(n,t=a[s++]))&&createProperty$3(i,t,r);return i}});var path$h=path$u,getOwnPropertyDescriptors$5=path$h.Object.getOwnPropertyDescriptors,parent$1k=getOwnPropertyDescriptors$5,getOwnPropertyDescriptors$4=parent$1k,parent$1j=getOwnPropertyDescriptors$4,getOwnPropertyDescriptors$3=parent$1j,parent$1i=getOwnPropertyDescriptors$3,getOwnPropertyDescriptors$2=parent$1i,getOwnPropertyDescriptors$1=getOwnPropertyDescriptors$2,getOwnPropertyDescriptors2=getOwnPropertyDescriptors$1,_Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors2),defineProperties$7={exports:{}},$$1u=_export,DESCRIPTORS$l=descriptors,defineProperties$6=objectDefineProperties.f;$$1u({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$6,sham:!DESCRIPTORS$l},{defineProperties:defineProperties$6});var path$g=path$u,Object$3=path$g.Object,defineProperties$5=defineProperties$7.exports=function(e,t){return Object$3.defineProperties(e,t)};Object$3.defineProperties.sham&&(defineProperties$5.sham=!0);var definePropertiesExports=defineProperties$7.exports,parent$1h=definePropertiesExports,defineProperties$4=parent$1h,parent$1g=defineProperties$4,defineProperties$3=parent$1g,parent$1f=defineProperties$3,defineProperties$2=parent$1f,defineProperties$1=defineProperties$2,defineProperties5=defineProperties$1,_Object$defineProperties=getDefaultExportFromCjs(defineProperties5),defineProperty$k={exports:{}},$$1t=_export,DESCRIPTORS$k=descriptors,defineProperty$j=objectDefineProperty.f;$$1t({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$j,sham:!DESCRIPTORS$k},{defineProperty:defineProperty$j});var path$f=path$u,Object$2=path$f.Object,defineProperty$i=defineProperty$k.exports=function(e,t,r){return Object$2.defineProperty(e,t,r)};Object$2.defineProperty.sham&&(defineProperty$i.sham=!0);var definePropertyExports=defineProperty$k.exports,parent$1e=definePropertyExports,defineProperty$h=parent$1e,parent$1d=defineProperty$h,defineProperty$g=parent$1d,parent$1c=defineProperty$g,defineProperty$f=parent$1c,defineProperty$e=defineProperty$f,defineProperty$d=defineProperty$e,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$d),symbol=symbol$1,_Symbol=getDefaultExportFromCjs(symbol),iterator=iterator$1,_Symbol$iterator=getDefaultExportFromCjs(iterator),$$1s=_export,DESCRIPTORS$j=descriptors,create$e=objectCreate;$$1s({target:"Object",stat:!0,sham:!DESCRIPTORS$j},{create:create$e});var path$e=path$u,Object$1=path$e.Object,create$d=function(e,t){return Object$1.create(e,t)},parent$1b=create$d,create$c=parent$1b,parent$1a=create$c,create$b=parent$1a,parent$19=create$b,create$a=parent$19,create$9=create$a,create$8=create$9,_Object$create=getDefaultExportFromCjs(create$8),$$1r=_export,setPrototypeOf$a=objectSetPrototypeOf;$$1r({target:"Object",stat:!0},{setPrototypeOf:setPrototypeOf$a});var path$d=path$u,setPrototypeOf$9=path$d.Object.setPrototypeOf,parent$18=setPrototypeOf$9,setPrototypeOf$8=parent$18,parent$17=setPrototypeOf$8,setPrototypeOf$7=parent$17,parent$16=setPrototypeOf$7,setPrototypeOf$6=parent$16,setPrototypeOf$5=setPrototypeOf$6,setPrototypeOf$4=setPrototypeOf$5,_Object$setPrototypeOf=getDefaultExportFromCjs(setPrototypeOf$4),uncurryThis$D=functionUncurryThis,aCallable$c=aCallable$n,isObject$j=isObject$w,hasOwn$d=hasOwnProperty_1,arraySlice$d=arraySlice$h,NATIVE_BIND=functionBindNative,$Function=Function,concat$2=uncurryThis$D([].concat),join$7=uncurryThis$D([].join),factories={},construct$6=function(e,t,r){if(!hasOwn$d(factories,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";factories[t]=$Function("C,a","return new C("+join$7(n,",")+")")}return factories[t](e,r)},functionBind=NATIVE_BIND?$Function.bind:function(e){var t=aCallable$c(this),r=t.prototype,n=arraySlice$d(arguments,1),o=function(){var r=concat$2(n,arraySlice$d(arguments));return this instanceof o?construct$6(t,r.length,r):t.apply(e,r)};return isObject$j(r)&&(o.prototype=r),o},$$1q=_export,bind$u=functionBind;$$1q({target:"Function",proto:!0,forced:Function.bind!==bind$u},{bind:bind$u});var entryVirtual$9=entryVirtual$h,bind$t=entryVirtual$9("Function").bind,isPrototypeOf$d=objectIsPrototypeOf,method$8=bind$t,FunctionPrototype$1=Function.prototype,bind$s=function(e){var t=e.bind;return e===FunctionPrototype$1||isPrototypeOf$d(FunctionPrototype$1,e)&&t===FunctionPrototype$1.bind?method$8:t},parent$15=bind$s,bind$r=parent$15,parent$14=bind$r,bind$q=parent$14,parent$13=bind$q,bind$p=parent$13,bind$o=bind$p,bind$n=bind$o,_bindInstanceProperty=getDefaultExportFromCjs(bind$n),$$1p=_export,fails$G=fails$11,toObject$d=toObject$l,nativeGetPrototypeOf$1=objectGetPrototypeOf,CORRECT_PROTOTYPE_GETTER$1=correctPrototypeGetter,FAILS_ON_PRIMITIVES$4=fails$G((function(){nativeGetPrototypeOf$1(1)}));$$1p({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$4,sham:!CORRECT_PROTOTYPE_GETTER$1},{getPrototypeOf:function(e){return nativeGetPrototypeOf$1(toObject$d(e))}});var path$c=path$u,getPrototypeOf$8=path$c.Object.getPrototypeOf,parent$12=getPrototypeOf$8,getPrototypeOf$7=parent$12,parent$11=getPrototypeOf$7,getPrototypeOf$6=parent$11,parent$10=getPrototypeOf$6,getPrototypeOf$5=parent$10,getPrototypeOf$4=getPrototypeOf$5,getPrototypeOf$3=getPrototypeOf$4,_Object$getPrototypeOf=getDefaultExportFromCjs(getPrototypeOf$3),$$1o=_export,getBuiltIn$6=getBuiltIn$l,apply$8=functionApply,bind$m=functionBind,aConstructor$2=aConstructor$4,anObject$d=anObject$p,isObject$i=isObject$w,create$7=objectCreate,fails$F=fails$11,nativeConstruct=getBuiltIn$6("Reflect","construct"),ObjectPrototype$2=Object.prototype,push$c=[].push,NEW_TARGET_BUG=fails$F((function(){function e(){}return!(nativeConstruct((function(){}),[],e)instanceof e)})),ARGS_BUG=!fails$F((function(){nativeConstruct((function(){}))})),FORCED$7=NEW_TARGET_BUG||ARGS_BUG;$$1o({target:"Reflect",stat:!0,forced:FORCED$7,sham:FORCED$7},{construct:function(e,t){aConstructor$2(e),anObject$d(t);var r=arguments.length<3?e:aConstructor$2(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return apply$8(push$c,n,t),new(apply$8(bind$m,e,n))}var o=r.prototype,a=create$7(isObject$i(o)?o:ObjectPrototype$2),i=apply$8(e,a,t);return isObject$i(i)?i:a}});var path$b=path$u,construct$5=path$b.Reflect.construct,parent$$=construct$5,construct$4=parent$$,parent$_=construct$4,construct$3=parent$_,parent$Z=construct$3,construct$2=parent$Z,construct$1=construct$2,construct2=construct$1,_Reflect$construct=getDefaultExportFromCjs(construct2),hasOwn$c=hasOwnProperty_1,isDataDescriptor$1=function(e){return void 0!==e&&(hasOwn$c(e,"value")||hasOwn$c(e,"writable"))},$$1n=_export,call$t=functionCall,isObject$h=isObject$w,anObject$c=anObject$p,isDataDescriptor=isDataDescriptor$1,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,getPrototypeOf$2=objectGetPrototypeOf;function get$9(e,t){var r,n,o=arguments.length<3?e:arguments[2];return anObject$c(e)===o?e[t]:(r=getOwnPropertyDescriptorModule$1.f(e,t))?isDataDescriptor(r)?r.value:void 0===r.get?void 0:call$t(r.get,o):isObject$h(n=getPrototypeOf$2(e))?get$9(n,t,o):void 0}$$1n({target:"Reflect",stat:!0},{get:get$9});var path$a=path$u,get$8=path$a.Reflect.get,parent$Y=get$8,get$7=parent$Y,parent$X=get$7,get$6=parent$X,parent$W=get$6,get$5=parent$W,get$4=get$5,get$3=get$4,_Reflect$get=getDefaultExportFromCjs(get$3),getIteratorMethod$9=getIteratorMethod$c,getIteratorMethod_1=getIteratorMethod$9,parent$V=getIteratorMethod_1,getIteratorMethod$8=parent$V,parent$U=getIteratorMethod$8,getIteratorMethod$7=parent$U,parent$T=getIteratorMethod$7,getIteratorMethod$6=parent$T,getIteratorMethod$5=getIteratorMethod$6,getIteratorMethod$4=getIteratorMethod$5,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$4),anObject$b=anObject$p,iteratorClose$2=iteratorClose$4,callWithSafeIterationClosing$1=function(e,t,r,n){try{return n?t(anObject$b(r)[0],r[1]):t(r)}catch(t){iteratorClose$2(e,"throw",t)}},bind$l=functionBindContext,call$s=functionCall,toObject$c=toObject$l,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod$1=isArrayIteratorMethod$3,isConstructor5=isConstructor$4,lengthOfArrayLike$d=lengthOfArrayLike$l,createProperty$2=createProperty$8,getIterator$3=getIterator$5,getIteratorMethod$3=getIteratorMethod$c,$Array$2=Array,arrayFrom$2=function(e){var t=toObject$c(e),r=isConstructor5(this),n=arguments.length,o=n>1?arguments[1]:void 0,a=void 0!==o;a&&(o=bind$l(o,n>2?arguments[2]:void 0));var i,s,c,l,u,$,p=getIteratorMethod$3(t),f=0;if(!p||this===$Array$2&&isArrayIteratorMethod$1(p))for(i=lengthOfArrayLike$d(t),s=r?new this(i):$Array$2(i);i>f;f++)$=a?o(t[f],f):t[f],createProperty$2(s,f,$);else for(u=(l=getIterator$3(t,p)).next,s=r?new this:[];!(c=call$s(u,l)).done;f++)$=a?callWithSafeIterationClosing(l,o,[c.value,f],!0):c.value,createProperty$2(s,f,$);return s.length=f,s},$$1m=_export,from$8=arrayFrom$2,checkCorrectnessOfIteration$2=checkCorrectnessOfIteration$4,INCORRECT_ITERATION=!checkCorrectnessOfIteration$2((function(e){Array.from(e)}));$$1m({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$8});var path$9=path$u,from$7=path$9.Array.from,parent$S=from$7,from$6=parent$S,parent$R=from$6,from$5=parent$R,parent$Q=from$5,from$4=parent$Q,from$3=from$4,from$2=from$3,_Array$from=getDefaultExportFromCjs(from$2),WrappedWellKnownSymbolModule=wellKnownSymbolWrapped,toPrimitive$7=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$P=toPrimitive$7,toPrimitive$6=parent$P,parent$O=toPrimitive$6,toPrimitive$5=parent$O,parent$N=toPrimitive$5,toPrimitive$4=parent$N,toPrimitive$3=toPrimitive$4,toPrimitive$2=toPrimitive$3,_Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive$2);function ownKeys$1(e,t){var r=_Object$keys(e);if(_Object$getOwnPropertySymbols){var n=_Object$getOwnPropertySymbols(e);t&&(n=_filterInstanceProperty(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2$1(e){for(var t=1;t<arguments.length;t++){var r,n,o=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys$1(Object(o),!0)).call(r,(function(t){_defineProperty$2(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty(n=ownKeys$1(Object(o))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(o,t))}))}return e}function _typeof$1(e){return(_typeof$1="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 _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey$1(n.key),n)}}function _createClass$2(e,t,r){return t&&_defineProperties$2(e.prototype,t),r&&_defineProperties$2(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$2(e,t,r){return(t=_toPropertyKey$1(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toConsumableArray$1(e){return _arrayWithoutHoles$1(e)||_iterableToArray$1(e)||_unsupportedIterableToArray$2(e)||_nonIterableSpread$1()}function _arrayWithoutHoles$1(e){if(_Array$isArray(e))return _arrayLikeToArray$2(e)}function _iterableToArray$1(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _unsupportedIterableToArray$2(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$2(e,t);var n=_sliceInstanceProperty(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$2(e,t):void 0}}function _arrayLikeToArray$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread$1(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive$1(e,t){if("object"!==_typeof$2(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$2(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey$1(e){var t=_toPrimitive$1(e,"string");return"symbol"===_typeof$2(t)?t:String(t)}var DESCRIPTORS$i=descriptors,uncurryThis$C=functionUncurryThis,call$r=functionCall,fails$E=fails$11,objectKeys=objectKeys$3,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$b=toObject$l,IndexedObject$3=indexedObject,$assign=Object.assign,defineProperty$c=Object.defineProperty,concat$1=uncurryThis$C([].concat),objectAssign=!$assign||fails$E((function(){if(DESCRIPTORS$i&&1!==$assign({b:1},$assign(defineProperty$c({},"a",{enumerable:!0,get:function(){defineProperty$c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=$assign({},e)[r]||objectKeys($assign({},t)).join("")!=n}))?function(e,t){for(var r=toObject$b(e),n=arguments.length,o=1,a=getOwnPropertySymbolsModule.f,i=propertyIsEnumerableModule.f;n>o;)for(var s,c=IndexedObject$3(arguments[o++]),l=a?concat$1(objectKeys(c),a(c)):objectKeys(c),u=l.length,$=0;u>$;)s=l[$++],DESCRIPTORS$i&&!call$r(i,c,s)||(r[s]=c[s]);return r}:$assign,$$1l=_export,assign$8=objectAssign;$$1l({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$8},{assign:assign$8});var path$8=path$u,assign$7=path$8.Object.assign,parent$M=assign$7,assign$6=parent$M,parent$L=assign$6,assign$5=parent$L,parent$K=assign$5,assign$4=parent$K,assign$3=assign$4,assign$2=assign$3,_Object$assign=getDefaultExportFromCjs(assign$2),eventemitter3={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,a||e,i),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}_Object$create&&(n.prototype=_Object$create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?_sliceInstanceProperty(n).call(n,1):n);return _Object$getOwnPropertySymbols?_concatInstanceProperty(o).call(o,_Object$getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,a=n.length,i=new Array(a);o<a;o++)i[o]=n[o].fn;return i},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,a,i){var s=r?r+e:e;if(!this._events[s])return!1;var c,l,u=this._events[s],$=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),$){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,a),!0;case 6:return u.fn.call(u.context,t,n,o,a,i),!0}for(l=1,c=new Array($-1);l<$;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var p,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),$){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,n);break;case 4:u[l].fn.call(u[l].context,t,n,o);break;default:if(!c)for(p=1,c=new Array($-1);p<$;p++)c[p-1]=arguments[p];u[l].fn.apply(u[l].context,c)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||i(this,a);else{for(var c=0,l=[],u=s.length;c<u;c++)(s[c].fn!==t||o&&!s[c].once||n&&s[c].context!==n)&&l.push(s[c]);l.length?this._events[a]=1===l.length?l[0]:l:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&i(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(eventemitter3);var eventemitter3Exports=eventemitter3.exports,EventEmitter=getDefaultExportFromCjs(eventemitter3Exports),$$1k=_export,$some$1=arrayIteration.some,arrayMethodIsStrict$5=arrayMethodIsStrict$8,STRICT_METHOD$4=arrayMethodIsStrict$5("some");$$1k({target:"Array",proto:!0,forced:!STRICT_METHOD$4},{some:function(e){return $some$1(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$8=entryVirtual$h,some$6=entryVirtual$8("Array").some,isPrototypeOf$c=objectIsPrototypeOf,method$7=some$6,ArrayPrototype$6=Array.prototype,some$5=function(e){var t=e.some;return e===ArrayPrototype$6||isPrototypeOf$c(ArrayPrototype$6,e)&&t===ArrayPrototype$6.some?method$7:t},parent$J=some$5,some$4=parent$J,parent$I=some$4,some$3=parent$I,parent$H=some$3,some$2=parent$H,some$1=some$2,some2=some$1,_someInstanceProperty=getDefaultExportFromCjs(some2),toIntegerOrInfinity$9=toIntegerOrInfinity$e,toString$h=toString$p,requireObjectCoercible$9=requireObjectCoercible$e,$RangeError$6=RangeError,stringRepeat$1=function(e){var t=toString$h(requireObjectCoercible$9(this)),r="",n=toIntegerOrInfinity$9(e);if(n<0||n==1/0)throw $RangeError$6("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$B=functionUncurryThis,toLength$8=toLength$a,toString$g=toString$p,$repeat$1=stringRepeat$1,requireObjectCoercible$8=requireObjectCoercible$e,repeat$1=uncurryThis$B($repeat$1),stringSlice$a=uncurryThis$B("".slice),ceil$1=Math.ceil,createMethod$5=function(e){return function(t,r,n){var o,a,i=toString$g(requireObjectCoercible$8(t)),s=toLength$8(r),c=i.length,l=void 0===n?" ":toString$g(n);return s<=c||""==l?i:((a=repeat$1(l,ceil$1((o=s-c)/l.length))).length>o&&(a=stringSlice$a(a,0,o)),e?i+a:a+i)}},stringPad$1={start:createMethod$5(!1),end:createMethod$5(!0)},userAgent$5=engineUserAgent,stringPadWebkitBug$1=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent$5),$$1j=_export,$padStart$1=stringPad$1.start,WEBKIT_BUG$1=stringPadWebkitBug$1;$$1j({target:"String",proto:!0,forced:WEBKIT_BUG$1},{padStart:function(e){return $padStart$1(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$7=entryVirtual$h,padStart$7=entryVirtual$7("String").padStart,isPrototypeOf$b=objectIsPrototypeOf,method$6=padStart$7,StringPrototype$2=String.prototype,padStart$6=function(e){var t=e.padStart;return"string"==typeof e||e===StringPrototype$2||isPrototypeOf$b(StringPrototype$2,e)&&t===StringPrototype$2.padStart?method$6:t},parent$G=padStart$6,padStart$5=parent$G,parent$F=padStart$5,padStart$4=parent$F,parent$E=padStart$4,padStart$3=parent$E,padStart$2=padStart$3,padStart$1=padStart$2,_padStartInstanceProperty=getDefaultExportFromCjs(padStart$1),engineIsBun="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,global$t=global$N,apply$7=functionApply,isCallable$f=isCallable$A,ENGINE_IS_BUN=engineIsBun,USER_AGENT=engineUserAgent,arraySlice$c=arraySlice$h,validateArgumentsLength$5=validateArgumentsLength$7,Function$1=global$t.Function,WRAP=/MSIE .\./.test(USER_AGENT)||ENGINE_IS_BUN&&function(){var e=global$t.Bun.version.split(".");return e.length<3||0==e[0]&&(e[1]<3||3==e[1]&&0==e[2])}(),schedulersFix$2=function(e,t){var r=t?2:1;return WRAP?function(n,o){var a=validateArgumentsLength$5(arguments.length,1)>r,i=isCallable$f(n)?n:Function$1(n),s=a?arraySlice$c(arguments,r):[],c=a?function(){apply$7(i,this,s)}:i;return t?e(c,o):e(c)}:e},$$1i=_export,global$s=global$N,schedulersFix$1=schedulersFix$2,setInterval$5=schedulersFix$1(global$s.setInterval,!0);$$1i({global:!0,bind:!0,forced:global$s.setInterval!==setInterval$5},{setInterval:setInterval$5});var $$1h=_export,global$r=global$N,schedulersFix=schedulersFix$2,setTimeout$6=schedulersFix(global$r.setTimeout,!0);$$1h({global:!0,bind:!0,forced:global$r.setTimeout!==setTimeout$6},{setTimeout:setTimeout$6});var path$7=path$u,setInterval$4=path$7.setInterval,parent$D=setInterval$4,setInterval$3=parent$D,parent$C=setInterval$3,setInterval$2=parent$C,setInterval$1=setInterval$2,setInterval=setInterval$1,_setInterval=getDefaultExportFromCjs(setInterval),path$6=path$u,setTimeout$5=path$6.setTimeout,parent$B=setTimeout$5,setTimeout$4=parent$B,parent$A=setTimeout$4,setTimeout$3=parent$A,setTimeout$2=setTimeout$3,setTimeout$1=setTimeout$2,_setTimeout=getDefaultExportFromCjs(setTimeout$1),$$1g=_export,$every$1=arrayIteration.every,arrayMethodIsStrict$4=arrayMethodIsStrict$8,STRICT_METHOD$3=arrayMethodIsStrict$4("every");$$1g({target:"Array",proto:!0,forced:!STRICT_METHOD$3},{every:function(e){return $every$1(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$6=entryVirtual$h,every$6=entryVirtual$6("Array").every,isPrototypeOf$a=objectIsPrototypeOf,method$5=every$6,ArrayPrototype$5=Array.prototype,every$5=function(e){var t=e.every;return e===ArrayPrototype$5||isPrototypeOf$a(ArrayPrototype$5,e)&&t===ArrayPrototype$5.every?method$5:t},parent$z=every$5,every$4=parent$z,parent$y=every$4,every$3=parent$y,parent$x=every$3,every$2=parent$x,every$1=every$2,every2=every$1,_everyInstanceProperty=getDefaultExportFromCjs(every2),global$q=global$N,fails$D=fails$11,uncurryThis$A=functionUncurryThis,toString$f=toString$p,trim$8=stringTrim$1.trim,whitespaces$4=whitespaces$7,charAt$9=uncurryThis$A("".charAt),$parseFloat$1=global$q.parseFloat,Symbol$1=global$q.Symbol,ITERATOR$7=Symbol$1&&Symbol$1.iterator,FORCED$6=1/$parseFloat$1(whitespaces$4+"-0")!=-1/0||ITERATOR$7&&!fails$D((function(){$parseFloat$1(Object(ITERATOR$7))})),numberParseFloat=FORCED$6?function(e){var t=trim$8(toString$f(e)),r=$parseFloat$1(t);return 0===r&&"-"==charAt$9(t,0)?-0:r}:$parseFloat$1,$$1f=_export,$parseFloat=numberParseFloat;$$1f({global:!0,forced:parseFloat!=numberParseFloat},{parseFloat:numberParseFloat});var path$5=path$u,_parseFloat$6=path$5.parseFloat,parent$w=_parseFloat$6,_parseFloat$5=parent$w,parent$v=_parseFloat$5,_parseFloat$4=parent$v,parent$u=_parseFloat$4,_parseFloat$3=parent$u,_parseFloat$2=_parseFloat$3,_parseFloat=_parseFloat$2,_parseFloat$1=getDefaultExportFromCjs(_parseFloat),PROPER_FUNCTION_NAME$3=functionName.PROPER,fails$C=fails$11,whitespaces$3=whitespaces$7,non$1="​…᠎",stringTrimForced$1=function(e){return fails$C((function(){return!!whitespaces$3[e]()||non$1[e]()!==non$1||PROPER_FUNCTION_NAME$3&&whitespaces$3[e].name!==e}))},$$1e=_export,$trim$1=stringTrim$1.trim,forcedStringTrimMethod$1=stringTrimForced$1;$$1e({target:"String",proto:!0,forced:forcedStringTrimMethod$1("trim")},{trim:function(){return $trim$1(this)}});var entryVirtual$5=entryVirtual$h,trim$7=entryVirtual$5("String").trim,isPrototypeOf$9=objectIsPrototypeOf,method$4=trim$7,StringPrototype$1=String.prototype,trim$6=function(e){var t=e.trim;return"string"==typeof e||e===StringPrototype$1||isPrototypeOf$9(StringPrototype$1,e)&&t===StringPrototype$1.trim?method$4:t},parent$t=trim$6,trim$5=parent$t,parent$s=trim$5,trim$4=parent$s,parent$r=trim$4,trim$3=parent$r,trim$2=trim$3,trim$1=trim$2,_trimInstanceProperty=getDefaultExportFromCjs(trim$1),arraySlice$b=arraySliceSimple$1,floor$9=Math.floor,mergeSort$1=function(e,t){var r=e.length,n=floor$9(r/2);return r<8?insertionSort$1(e,t):merge$1(e,mergeSort$1(arraySlice$b(e,0,n),t),mergeSort$1(arraySlice$b(e,n),t),t)},insertionSort$1=function(e,t){for(var r,n,o=e.length,a=1;a<o;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},merge$1=function(e,t,r,n){for(var o=t.length,a=r.length,i=0,s=0;i<o||s<a;)e[i+s]=i<o&&s<a?n(t[i],r[s])<=0?t[i++]:r[s++]:i<o?t[i++]:r[s++];return e},arraySort$3=mergeSort$1,userAgent$4=engineUserAgent,firefox$1=userAgent$4.match(/firefox\/(\d+)/i),engineFfVersion$1=!!firefox$1&&+firefox$1[1],UA$1=engineUserAgent,engineIsIeOrEdge$1=/MSIE|Trident/.test(UA$1),userAgent$3=engineUserAgent,webkit$1=userAgent$3.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion$1=!!webkit$1&&+webkit$1[1],$$1d=_export,uncurryThis$z=functionUncurryThis,aCallable$b=aCallable$n,toObject$a=toObject$l,lengthOfArrayLike$c=lengthOfArrayLike$l,deletePropertyOrThrow$3=deletePropertyOrThrow$5,toString$e=toString$p,fails$B=fails$11,internalSort$1=arraySort$3,arrayMethodIsStrict$3=arrayMethodIsStrict$8,FF$1=engineFfVersion$1,IE_OR_EDGE$1=engineIsIeOrEdge$1,V8$1=engineV8Version,WEBKIT$1=engineWebkitVersion$1,test$1=[],nativeSort$1=uncurryThis$z(test$1.sort),push$b=uncurryThis$z(test$1.push),FAILS_ON_UNDEFINED=fails$B((function(){test$1.sort(void 0)})),FAILS_ON_NULL=fails$B((function(){test$1.sort(null)})),STRICT_METHOD$2=arrayMethodIsStrict$3("sort"),STABLE_SORT$1=!fails$B((function(){if(V8$1)return V8$1<70;if(!(FF$1&&FF$1>3)){if(IE_OR_EDGE$1)return!0;if(WEBKIT$1)return WEBKIT$1<603;var e,t,r,n,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)test$1.push({k:t+n,v:r})}for(test$1.sort((function(e,t){return t.v-e.v})),n=0;n<test$1.length;n++)t=test$1[n].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}})),FORCED$5=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$2||!STABLE_SORT$1,getSortCompare$1=function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:toString$e(t)>toString$e(r)?1:-1}};$$1d({target:"Array",proto:!0,forced:FORCED$5},{sort:function(e){void 0!==e&&aCallable$b(e);var t=toObject$a(this);if(STABLE_SORT$1)return void 0===e?nativeSort$1(t):nativeSort$1(t,e);var r,n,o=[],a=lengthOfArrayLike$c(t);for(n=0;n<a;n++)n in t&&push$b(o,t[n]);for(internalSort$1(o,getSortCompare$1(e)),r=lengthOfArrayLike$c(o),n=0;n<r;)t[n]=o[n++];for(;n<a;)deletePropertyOrThrow$3(t,n++);return t}});var entryVirtual$4=entryVirtual$h,sort$6=entryVirtual$4("Array").sort,isPrototypeOf$8=objectIsPrototypeOf,method$3=sort$6,ArrayPrototype$4=Array.prototype,sort$5=function(e){var t=e.sort;return e===ArrayPrototype$4||isPrototypeOf$8(ArrayPrototype$4,e)&&t===ArrayPrototype$4.sort?method$3:t},parent$q=sort$5,sort$4=parent$q,parent$p=sort$4,sort$3=parent$p,parent$o=sort$3,sort$2=parent$o,sort$1=sort$2,sort2=sort$1,_sortInstanceProperty=getDefaultExportFromCjs(sort2),$$1c=_export,uncurryThis$y=functionUncurryThis,$Date=Date,thisTimeValue=uncurryThis$y($Date.prototype.getTime);$$1c({target:"Date",stat:!0},{now:function(){return thisTimeValue(new $Date)}});var _context,path$4=path$u,now$5=path$4.Date.now,parent$n=now$5,now$4=parent$n,parent$m=now$4,now$3=parent$m,parent$l=now$3,now$2=parent$l,now$1=now$2,now2=now$1,_Date$now=getDefaultExportFromCjs(now2),XG_DEBUG_OPEN="undefined"!=typeof window&&window.location&&_indexOfInstanceProperty(_context=window.location.href).call(_context,"xgplayerdebugger=1")>-1,STYLE={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},XGTAG="%c[xgplayer]",XG_DEBUG={config:{debug:XG_DEBUG_OPEN?3:0},logInfo:function(e){for(var t,r,n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];this.config.debug>=3&&(r=console).log.apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.info,e]).call(t,o))},logWarn:function(e){for(var t,r,n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];this.config.debug>=1&&(r=console).warn.apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.warn,e]).call(t,o))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];(r=console)[n].apply(r,_concatInstanceProperty(t=[XGTAG,STYLE.error,e]).call(t,a))}}},XgplayerTimeRange=function(){function e(t){_classCallCheck$2(this,e),this.bufferedList=t}return _createClass$2(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),util={};function checkIsIn(e,t){for(var r=0,n=t.length;r<n;r++)if(_indexOfInstanceProperty(e).call(e,t[r])>-1)return!0;return!1}util.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=document.createElement(t);return a.className=o,a.innerHTML=r,_forEachInstanceProperty(e=_Object$keys(n)).call(e,(function(e){var r=e,o=n[e];"video"===t||"audio"===t||"live-video"===t?o&&a.setAttribute(r,o):a.setAttribute(r,o)})),a},util.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var o=n.children;if(n=null,o.length>0){var a;if(o=o[0],r&&util.addClass(o,r),t)_forEachInstanceProperty(a=_Object$keys(t)).call(a,(function(e){o.setAttribute(e,t[e])}));return o}return null}catch(e){return XG_DEBUG.logError("util.createDomFromHtml",e),null}},util.hasClass=function(e,t){if(!e||!t)return!1;try{return _someInstanceProperty(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===_typeof$1(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},util.addClass=function(e,t){if(e&&t)try{var r;_forEachInstanceProperty(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(r){util.hasClass(e,t)||(e.className&&"object"===_typeof$1(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},util.removeClass=function(e,t){if(e&&t)try{var r;_forEachInstanceProperty(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(r){var n;if(util.hasClass(e,t))_forEachInstanceProperty(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===_typeof$1(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},util.toggleClass=function(e,t){var r;e&&_forEachInstanceProperty(r=t.split(/\s+/g)).call(r,(function(t){util.hasClass(e,t)?util.removeClass(e,t):util.addClass(e,t)}))},util.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===util.typeOf(e[r]))t.push(e[r]);else if("Object"===util.typeOf(e[r])){var n;_mapInstanceProperty(n=_Object$keys(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},util.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){XG_DEBUG.logError("util.findDom",n),0===_indexOfInstanceProperty(r).call(r,"#")&&(e=t.getElementById(_sliceInstanceProperty(r).call(r,1)))}return e},util.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},util.padStart=function(e,t,r){for(var n=String(r),o=t>>0,a=Math.ceil(o/n.length),i=[],s=String(e);a--;)i.push(n);return i.join("").substring(0,o-s.length)+s},util.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=_padStartInstanceProperty(util).call(util,Math.floor(e/3600),2,0),r=_padStartInstanceProperty(util).call(util,Math.floor((e-3600*t)/60),2,0),n=_padStartInstanceProperty(util).call(util,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},util.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},util.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},util.deepCopy=function(e,t){var r;if("Object"===util.typeOf(t)&&"Object"===util.typeOf(e))return _forEachInstanceProperty(r=_Object$keys(t)).call(r,(function(r){if("Object"!==util.typeOf(t[r])||t[r]instanceof Node)if("Array"===util.typeOf(t[r])){var n;e[r]="Array"===util.typeOf(e[r])?_concatInstanceProperty(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:util.deepCopy(e[r],t[r])})),e},util.deepMerge=function(e,t){var r;return _mapInstanceProperty(r=_Object$keys(t)).call(r,(function(r){var n;"Array"===util.typeOf(t[r])&&"Array"===util.typeOf(e[r])?"Array"===util.typeOf(e[r])&&(n=e[r]).push.apply(n,_toConsumableArray$1(t[r])):util.typeOf(e[r])!==util.typeOf(t[r])||null===e[r]||"Object"!==util.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):util.deepMerge(e[r],t[r])})),e},util.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},util.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return _forEachInstanceProperty(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},util.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=_setInterval(_bindInstanceProperty(r).call(r,e),n))},util.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},util.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=_setTimeout((function(){t(),util.clearTimeout(e,n)}),r);return e._timers.push(n),n},util.clearTimeout=function(e,t){var r=e._timers;if("Array"===util.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){_spliceInstanceProperty(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},util.clearAllTimers=function(e){var t=e._timers;"Array"===util.typeOf(t)&&(_mapInstanceProperty(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},util.createImgBtn=function(e,t,r,n){var o,a,i,s,c,l,u,$,p,f,d,y,h=util.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(h.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(_everyInstanceProperty(o=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(o,(function(e){var t,o;return!(_indexOfInstanceProperty(r).call(r,e)>-1&&_indexOfInstanceProperty(n).call(n,e)>-1)||(u=_parseFloat$1(_trimInstanceProperty(t=_sliceInstanceProperty(r).call(r,0,_indexOfInstanceProperty(r).call(r,e))).call(t)),$=_parseFloat$1(_trimInstanceProperty(o=_sliceInstanceProperty(n).call(n,0,_indexOfInstanceProperty(n).call(n,e))).call(o)),p=e,!1)})),h.style.width=_concatInstanceProperty(a="".concat(u)).call(a,p),h.style.height=_concatInstanceProperty(i="".concat($)).call(i,p),h.style.backgroundSize=_concatInstanceProperty(s=_concatInstanceProperty(c=_concatInstanceProperty(l="".concat(u)).call(l,p," ")).call(c,$)).call(s,p),h.style.margin="start"===e?_concatInstanceProperty(f=_concatInstanceProperty(d=_concatInstanceProperty(y="-".concat($/2)).call(y,p," auto auto -")).call(d,u/2)).call(f,p):"auto 5px auto 5px");return h},util.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var o="#";e.replace(/[0-9A-F]/gi,(function(e){o+=e+e})),e=o}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(_parseInt$1(e,16))})),_concatInstanceProperty(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},util.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},util.checkIsFunction=function(e){return e&&"function"==typeof e},util.checkIsObject=function(e){return null!==e&&"object"===_typeof$1(e)},util.hide=function(e){e.style.display="none"},util.show=function(e,t){e.style.display=t||"block"},util.isUndefined=function(e){if(null==e)return!0},util.isNotNull=function(e){return!(null==e)},util.setStyleFromCsstext=function(e,t){if(t)if("String"===util.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");_mapInstanceProperty(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;_mapInstanceProperty(n=_Object$keys(t)).call(n,(function(r){e.style[r]=t[r]}))}},util.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var o=n.replace(/\s+/g,"").split(";"),a={},i={};return _mapInstanceProperty(o).call(o,(function(e){if(e){var t=e.split(":");t.length>1&&(checkIsIn(t[0],r)?a[t[0]]=t[1]:i[t[0]]=t[1])}})),e.setAttribute("style",""),_mapInstanceProperty(t=_Object$keys(i)).call(t,(function(t){e.style[t]=i[t]})),a},util.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return _mapInstanceProperty(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},util.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},util.stopPropagation=function(e){e&&e.stopPropagation()},util.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},util.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},util.checkTouchSupport=function(){return"ontouchstart"in window},util.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});_sortInstanceProperty(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var o=[];if(t)for(var a=0;a<r.length;a++){var i=o.length;if(i){var s=o[i-1].end;r[a].start-s<t?r[a].end>s&&(o[i-1].end=r[a].end):o.push(r[a])}else o.push(r[a])}else o=r;return new XgplayerTimeRange(o)},util.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},util.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},util.getHostFromUrl=function(e){if("String"!==util.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},util.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},util.isMSE=function(e){return!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},util.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=_parseInt$1(e)}catch(t){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=_parseInt$1(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},util.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},util.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},util.createPositionBar=function(e,t){var r=util.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},util.getTransformStyle=function(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0};return _concatInstanceProperty(e=_concatInstanceProperty(t=_concatInstanceProperty(r="scale(".concat(n.scale||1,") translate(")).call(r,n.x||0,"%, ")).call(t,n.y||0,"%) rotate(")).call(e,n.rotate||0,"deg)")},util.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360};var version="3.0.7",ERROR_MAP={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},Errors=_createClass$2((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};_classCallCheck$2(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var o,a=r.mediaError?r.mediaError:t.media.error||{},i=t.duration,s=t.currentTime,c=t.ended,l=t.src,u=t.currentSrc,$=t.media,p=$.readyState,f=$.networkState,d=r.errorCode||a.code;ERROR_MAP[d]&&(d=ERROR_MAP[d]);var y={playerVersion:version,currentTime:s,duration:i,ended:c,readyState:p,networkState:f,src:l||u,errorType:r.errorType,errorCode:d,message:r.errorMessage||a.message,mediaError:a,originError:r.originError?r.originError.stack:"",host:util.getHostFromUrl(l||u)};return r.ext&&_mapInstanceProperty(o=_Object$keys(r.ext)).call(o,(function(e){y[e]=r.ext[e]})),y}if(arguments.length>1){for(var h={playerVersion:version,domain:document.domain},g=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m<arguments.length;m++)h[g[m]]=arguments[m];return h.ex=n?(n[arguments[0]]||{}).msg:"",h}})),ERROR="error",DESTROY="destroy",URL_CHANGE="urlchange",SWITCH_SUBTITLE="switch_subtitle";function callHandler(e,t,r){for(var n,o=arguments.length,a=new Array(o>3?o-3:0),i=3;i<o;i++)a[i-3]=arguments[i];var s,c=t.call.apply(t,_concatInstanceProperty(n=[e]).call(n,a));r&&"function"==typeof r&&(c&&c.then?c.then((function(){for(var t,n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];r.call.apply(r,_concatInstanceProperty(t=[e]).call(t,o))})):r.call.apply(r,_concatInstanceProperty(s=[e]).call(s,a)))}function hook(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),_bindInstanceProperty(r=function(){var r,o=arguments,a=this;if(n.pre)try{var i,s;(s=n.pre).call.apply(s,_concatInstanceProperty(i=[this]).call(i,_sliceInstanceProperty(Array.prototype).call(arguments)))}catch(t){var c,l;throw t.message=_concatInstanceProperty(c=_concatInstanceProperty(l="[pluginName: ".concat(this.pluginName,":")).call(l,e,":pre error] >> ")).call(c,t.message),t}if(this.__hooks&&this.__hooks[e])try{var u,$,p,f=($=this.__hooks[e]).call.apply($,_concatInstanceProperty(u=[this,this]).call(u,_sliceInstanceProperty(Array.prototype).call(arguments)));if(f)if(f.then)f.then((function(e){var r;!1!==e&&callHandler.apply(void 0,_concatInstanceProperty(r=[a,t,n.next]).call(r,_toConsumableArray$1(o)))})).catch((function(e){throw e}));else callHandler.apply(void 0,_concatInstanceProperty(p=[this,t,n.next]).call(p,_sliceInstanceProperty(Array.prototype).call(arguments)));else if(void 0===f){var d;callHandler.apply(void 0,_concatInstanceProperty(d=[this,t,n.next]).call(d,_sliceInstanceProperty(Array.prototype).call(arguments)))}}catch(t){var y,h;throw t.message=_concatInstanceProperty(y=_concatInstanceProperty(h="[pluginName: ".concat(this.pluginName,":")).call(h,e,"] >> ")).call(y,t.message),t}else callHandler.apply(void 0,_concatInstanceProperty(r=[this,t,n.next]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}).call(r,this)}function useHooks(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(r&&(r[e]=t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function removeHooks(e,t){var r=this.__hooks;r&&delete r[e]}function hooksDescriptor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&_mapInstanceProperty(t).call(t,(function(t){e.__hooks[t]=null})),_Object$defineProperty(e,"hooks",{get:function(){var t;return e.__hooks&&_mapInstanceProperty(t=_Object$keys(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function delHooksDescriptor(e){e.__hooks=null}function showErrorMsg(e,t){var r;XG_DEBUG.logError(_concatInstanceProperty(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var BasePlugin=function(){function e(t){_classCallCheck$2(this,e),util.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),hooksDescriptor(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return _createClass$2(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=util.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):_Array$isArray(e)&&_forEachInstanceProperty(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):showErrorMsg(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):_Array$isArray(e)&&_forEachInstanceProperty(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):showErrorMsg(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):_Array$isArray(e)&&_forEachInstanceProperty(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):showErrorMsg(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;_forEachInstanceProperty(e=["__events","__onceEvents"]).call(e,(function(e){var r;_forEachInstanceProperty(r=_Object$keys(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(r=this.player).emit.apply(r,_concatInstanceProperty(t=[e]).call(t,o))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=_objectSpread2$1(_objectSpread2$1({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return hook.call.apply(hook,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];return useHooks.call.apply(useHooks,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];return removeHooks.call.apply(removeHooks,_concatInstanceProperty(r=[this]).call(r,_sliceInstanceProperty(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,r=this.player,n=this.pluginName;this.offAll(),util.clearAllTimers(this),util.checkIsFunction(this.destroy)&&this.destroy(),_mapInstanceProperty(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),delHooksDescriptor(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&_Object$defineProperty(e,r,t[r])}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),fails$A=fails$11,wellKnownSymbol$f=wellKnownSymbol$C,DESCRIPTORS$h=descriptors,IS_PURE$1=isPure,ITERATOR$6=wellKnownSymbol$f("iterator"),urlConstructorDetection$1=!fails$A((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),IS_PURE$1&&!e.toJSON||!t.size&&(IS_PURE$1||!DESCRIPTORS$h)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[ITERATOR$6]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),uncurryThis$x=functionUncurryThis,maxInt$1=2147483647,base$1=36,tMin$1=1,tMax$1=26,skew$1=38,damp$1=700,initialBias$1=72,initialN$1=128,delimiter$1="-",regexNonASCII$1=/[^\0-\u007E]/,regexSeparators$1=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR$1="Overflow: input needs wider integers to process",baseMinusTMin$1=base$1-tMin$1,$RangeError$5=RangeError,exec$7=uncurryThis$x(regexSeparators$1.exec),floor$8=Math.floor,fromCharCode$1=String.fromCharCode,charCodeAt$3=uncurryThis$x("".charCodeAt),join$6=uncurryThis$x([].join),push$a=uncurryThis$x([].push),replace$a=uncurryThis$x("".replace),split$5=uncurryThis$x("".split),toLowerCase$3=uncurryThis$x("".toLowerCase),ucs2decode$1=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=charCodeAt$3(e,r++);if(o>=55296&&o<=56319&&r<n){var a=charCodeAt$3(e,r++);56320==(64512&a)?push$a(t,((1023&o)<<10)+(1023&a)+65536):(push$a(t,o),r--)}else push$a(t,o)}return t},digitToBasic$1=function(e){return e+22+75*(e<26)},adapt$1=function(e,t,r){var n=0;for(e=r?floor$8(e/damp$1):e>>1,e+=floor$8(e/t);e>baseMinusTMin$1*tMax$1>>1;)e=floor$8(e/baseMinusTMin$1),n+=base$1;return floor$8(n+(baseMinusTMin$1+1)*e/(e+skew$1))},encode$2=function(e){var t,r,n=[],o=(e=ucs2decode$1(e)).length,a=initialN$1,i=0,s=initialBias$1;for(t=0;t<e.length;t++)(r=e[t])<128&&push$a(n,fromCharCode$1(r));var c=n.length,l=c;for(c&&push$a(n,delimiter$1);l<o;){var u=maxInt$1;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var $=l+1;if(u-a>floor$8((maxInt$1-i)/$))throw $RangeError$5(OVERFLOW_ERROR$1);for(i+=(u-a)*$,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++i>maxInt$1)throw $RangeError$5(OVERFLOW_ERROR$1);if(r==a){for(var p=i,f=base$1;;){var d=f<=s?tMin$1:f>=s+tMax$1?tMax$1:f-s;if(p<d)break;var y=p-d,h=base$1-d;push$a(n,fromCharCode$1(digitToBasic$1(d+y%h))),p=floor$8(y/h),f+=base$1}push$a(n,fromCharCode$1(digitToBasic$1(p))),s=adapt$1(i,$,l==c),i=0,l++}}i++,a++}return join$6(n,"")},stringPunycodeToAscii$1=function(e){var t,r,n=[],o=split$5(replace$a(toLowerCase$3(e),regexSeparators$1,"."),".");for(t=0;t<o.length;t++)r=o[t],push$a(n,exec$7(regexNonASCII$1,r)?"xn--"+encode$2(r):r);return join$6(n,".")},defineBuiltIn$c=defineBuiltIn$i,defineBuiltIns$6=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:defineBuiltIn$c(e,n,t[n],r);return e},$$1b=_export,global$p=global$N,call$q=functionCall,uncurryThis$w=functionUncurryThis,DESCRIPTORS$g=descriptors,USE_NATIVE_URL$4=urlConstructorDetection$1,defineBuiltIn$b=defineBuiltIn$i,defineBuiltInAccessor$6=defineBuiltInAccessor$9,defineBuiltIns$5=defineBuiltIns$6,setToStringTag$6=setToStringTag$d,createIteratorConstructor$1=iteratorCreateConstructor,InternalStateModule$a=internalState,anInstance$9=anInstance$b,isCallable$e=isCallable$A,hasOwn$b=hasOwnProperty_1,bind$k=functionBindContext,classof$d=classof$n,anObject$a=anObject$p,isObject$g=isObject$w,$toString$4=toString$p,create$6=objectCreate,createPropertyDescriptor$2=createPropertyDescriptor$a,getIterator$2=getIterator$5,getIteratorMethod$2=getIteratorMethod$c,validateArgumentsLength$4=validateArgumentsLength$7,wellKnownSymbol$e=wellKnownSymbol$C,arraySort$2=arraySort$3,ITERATOR$5=wellKnownSymbol$e("iterator"),URL_SEARCH_PARAMS$1="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR$1=URL_SEARCH_PARAMS$1+"Iterator",setInternalState$9=InternalStateModule$a.set,getInternalParamsState$1=InternalStateModule$a.getterFor(URL_SEARCH_PARAMS$1),getInternalIteratorState$1=InternalStateModule$a.getterFor(URL_SEARCH_PARAMS_ITERATOR$1),getOwnPropertyDescriptor$3=Object.getOwnPropertyDescriptor,safeGetBuiltIn$1=function(e){if(!DESCRIPTORS$g)return global$p[e];var t=getOwnPropertyDescriptor$3(global$p,e);return t&&t.value},nativeFetch$1=safeGetBuiltIn$1("fetch"),NativeRequest$1=safeGetBuiltIn$1("Request"),Headers$2=safeGetBuiltIn$1("Headers"),RequestPrototype$1=NativeRequest$1&&NativeRequest$1.prototype,HeadersPrototype$1=Headers$2&&Headers$2.prototype,RegExp$3=global$p.RegExp,TypeError$6=global$p.TypeError,decodeURIComponent$1=global$p.decodeURIComponent,encodeURIComponent$2=global$p.encodeURIComponent,charAt$8=uncurryThis$w("".charAt),join$5=uncurryThis$w([].join),push$9=uncurryThis$w([].push),replace$9=uncurryThis$w("".replace),shift$3=uncurryThis$w([].shift),splice$1=uncurryThis$w([].splice),split$4=uncurryThis$w("".split),stringSlice$9=uncurryThis$w("".slice),plus$1=/\+/g,sequences$1=Array(4),percentSequence$1=function(e){return sequences$1[e-1]||(sequences$1[e-1]=RegExp$3("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode$1=function(e){try{return decodeURIComponent$1(e)}catch(t){return e}},deserialize$1=function(e){var t=replace$9(e,plus$1," "),r=4;try{return decodeURIComponent$1(t)}catch(e){for(;r;)t=replace$9(t,percentSequence$1(r--),percentDecode$1);return t}},find$1=/[!'()~]|%20/g,replacements$1={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer$1=function(e){return replacements$1[e]},serialize$1=function(e){return replace$9(encodeURIComponent$2(e),find$1,replacer$1)},URLSearchParamsIterator$1=createIteratorConstructor$1((function(e,t){setInternalState$9(this,{type:URL_SEARCH_PARAMS_ITERATOR$1,iterator:getIterator$2(getInternalParamsState$1(e).entries),kind:t})}),"Iterator",(function(){var e=getInternalIteratorState$1(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),URLSearchParamsState$1=function(e){this.entries=[],this.url=null,void 0!==e&&(isObject$g(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===charAt$8(e,0)?stringSlice$9(e,1):e:$toString$4(e)))};URLSearchParamsState$1.prototype={type:URL_SEARCH_PARAMS$1,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,a,i,s,c=getIteratorMethod$2(e);if(c)for(r=(t=getIterator$2(e,c)).next;!(n=call$q(r,t)).done;){if(a=(o=getIterator$2(anObject$a(n.value))).next,(i=call$q(a,o)).done||(s=call$q(a,o)).done||!call$q(a,o).done)throw TypeError$6("Expected sequence with length 2");push$9(this.entries,{key:$toString$4(i.value),value:$toString$4(s.value)})}else for(var l in e)hasOwn$b(e,l)&&push$9(this.entries,{key:l,value:$toString$4(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=split$4(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=split$4(t,"="),push$9(this.entries,{key:deserialize$1(shift$3(r)),value:deserialize$1(join$5(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],push$9(r,serialize$1(e.key)+"="+serialize$1(e.value));return join$5(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor$1=function(){anInstance$9(this,URLSearchParamsPrototype$1);var e=setInternalState$9(this,new URLSearchParamsState$1(arguments.length>0?arguments[0]:void 0));DESCRIPTORS$g||(this.length=e.entries.length)},URLSearchParamsPrototype$1=URLSearchParamsConstructor$1.prototype;if(defineBuiltIns$5(URLSearchParamsPrototype$1,{append:function(e,t){validateArgumentsLength$4(arguments.length,2);var r=getInternalParamsState$1(this);push$9(r.entries,{key:$toString$4(e),value:$toString$4(t)}),DESCRIPTORS$g||this.length++,r.updateURL()},delete:function(e){validateArgumentsLength$4(arguments.length,1);for(var t=getInternalParamsState$1(this),r=t.entries,n=$toString$4(e),o=0;o<r.length;)r[o].key===n?splice$1(r,o,1):o++;DESCRIPTORS$g||(this.length=r.length),t.updateURL()},get:function(e){validateArgumentsLength$4(arguments.length,1);for(var t=getInternalParamsState$1(this).entries,r=$toString$4(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){validateArgumentsLength$4(arguments.length,1);for(var t=getInternalParamsState$1(this).entries,r=$toString$4(e),n=[],o=0;o<t.length;o++)t[o].key===r&&push$9(n,t[o].value);return n},has:function(e){validateArgumentsLength$4(arguments.length,1);for(var t=getInternalParamsState$1(this).entries,r=$toString$4(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){validateArgumentsLength$4(arguments.length,1);for(var r,n=getInternalParamsState$1(this),o=n.entries,a=!1,i=$toString$4(e),s=$toString$4(t),c=0;c<o.length;c++)(r=o[c]).key===i&&(a?splice$1(o,c--,1):(a=!0,r.value=s));a||push$9(o,{key:i,value:s}),DESCRIPTORS$g||(this.length=o.length),n.updateURL()},sort:function(){var e=getInternalParamsState$1(this);arraySort$2(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=getInternalParamsState$1(this).entries,n=bind$k(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new URLSearchParamsIterator$1(this,"keys")},values:function(){return new URLSearchParamsIterator$1(this,"values")},entries:function(){return new URLSearchParamsIterator$1(this,"entries")}},{enumerable:!0}),defineBuiltIn$b(URLSearchParamsPrototype$1,ITERATOR$5,URLSearchParamsPrototype$1.entries,{name:"entries"}),defineBuiltIn$b(URLSearchParamsPrototype$1,"toString",(function(){return getInternalParamsState$1(this).serialize()}),{enumerable:!0}),DESCRIPTORS$g&&defineBuiltInAccessor$6(URLSearchParamsPrototype$1,"size",{get:function(){return getInternalParamsState$1(this).entries.length},configurable:!0,enumerable:!0}),setToStringTag$6(URLSearchParamsConstructor$1,URL_SEARCH_PARAMS$1),$$1b({global:!0,constructor:!0,forced:!USE_NATIVE_URL$4},{URLSearchParams:URLSearchParamsConstructor$1}),!USE_NATIVE_URL$4&&isCallable$e(Headers$2)){var headersHas$1=uncurryThis$w(HeadersPrototype$1.has),headersSet$1=uncurryThis$w(HeadersPrototype$1.set),wrapRequestOptions$1=function(e){if(isObject$g(e)){var t,r=e.body;if(classof$d(r)===URL_SEARCH_PARAMS$1)return t=e.headers?new Headers$2(e.headers):new Headers$2,headersHas$1(t,"content-type")||headersSet$1(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create$6(e,{body:createPropertyDescriptor$2(0,$toString$4(r)),headers:createPropertyDescriptor$2(0,t)})}return e};if(isCallable$e(nativeFetch$1)&&$$1b({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return nativeFetch$1(e,arguments.length>1?wrapRequestOptions$1(arguments[1]):{})}}),isCallable$e(NativeRequest$1)){var RequestConstructor$1=function(e){return anInstance$9(this,RequestPrototype$1),new NativeRequest$1(e,arguments.length>1?wrapRequestOptions$1(arguments[1]):{})};RequestPrototype$1.constructor=RequestConstructor$1,RequestConstructor$1.prototype=RequestPrototype$1,$$1b({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor$1})}}var EOF$1,web_urlSearchParams_constructor$1={URLSearchParams:URLSearchParamsConstructor$1,getState:getInternalParamsState$1},$$1a=_export,DESCRIPTORS$f=descriptors,USE_NATIVE_URL$3=urlConstructorDetection$1,global$o=global$N,bind$j=functionBindContext,uncurryThis$v=functionUncurryThis,defineBuiltIn$a=defineBuiltIn$i,defineBuiltInAccessor$5=defineBuiltInAccessor$9,anInstance$8=anInstance$b,hasOwn$a=hasOwnProperty_1,assign$1=objectAssign,arrayFrom$1=arrayFrom$2,arraySlice$a=arraySliceSimple$1,codeAt$1=stringMultibyte.codeAt,toASCII$1=stringPunycodeToAscii$1,$toString$3=toString$p,setToStringTag$5=setToStringTag$d,validateArgumentsLength$3=validateArgumentsLength$7,URLSearchParamsModule$1=web_urlSearchParams_constructor$1,InternalStateModule$9=internalState,setInternalState$8=InternalStateModule$9.set,getInternalURLState$1=InternalStateModule$9.getterFor("URL"),URLSearchParams$2=URLSearchParamsModule$1.URLSearchParams,getInternalSearchParamsState$1=URLSearchParamsModule$1.getState,NativeURL$1=global$o.URL,TypeError$5=global$o.TypeError,parseInt$2=global$o.parseInt,floor$7=Math.floor,pow$2=Math.pow,charAt$7=uncurryThis$v("".charAt),exec$6=uncurryThis$v(/./.exec),join$4=uncurryThis$v([].join),numberToString$2=uncurryThis$v(1..toString),pop$1=uncurryThis$v([].pop),push$8=uncurryThis$v([].push),replace$8=uncurryThis$v("".replace),shift$2=uncurryThis$v([].shift),split$3=uncurryThis$v("".split),stringSlice$8=uncurryThis$v("".slice),toLowerCase$2=uncurryThis$v("".toLowerCase),unshift$1=uncurryThis$v([].unshift),INVALID_AUTHORITY$1="Invalid authority",INVALID_SCHEME$1="Invalid scheme",INVALID_HOST$1="Invalid host",INVALID_PORT$1="Invalid port",ALPHA$1=/[a-z]/i,ALPHANUMERIC$1=/[\d+-.a-z]/i,DIGIT$1=/\d/,HEX_START$1=/^0x/i,OCT$1=/^[0-7]+$/,DEC$1=/^\d+$/,HEX$1=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT$1=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT$1=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+/,TRAILING_C0_CONTROL_OR_SPACE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,TAB_AND_NEW_LINE$1=/[\t\n\r]/g,parseIPv4$1=function(e){var t,r,n,o,a,i,s,c=split$3(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=c[n]))return e;if(a=10,o.length>1&&"0"==charAt$7(o,0)&&(a=exec$6(HEX_START$1,o)?16:8,o=stringSlice$8(o,8==a?1:2)),""===o)i=0;else{if(!exec$6(10==a?DEC$1:8==a?OCT$1:HEX$1,o))return e;i=parseInt$2(o,a)}push$8(r,i)}for(n=0;n<t;n++)if(i=r[n],n==t-1){if(i>=pow$2(256,5-t))return null}else if(i>255)return null;for(s=pop$1(r),n=0;n<r.length;n++)s+=r[n]*pow$2(256,3-n);return s},parseIPv6$1=function(e){var t,r,n,o,a,i,s,c=[0,0,0,0,0,0,0,0],l=0,u=null,$=0,p=function(){return charAt$7(e,$)};if(":"==p()){if(":"!=charAt$7(e,1))return;$+=2,u=++l}for(;p();){if(8==l)return;if(":"!=p()){for(t=r=0;r<4&&exec$6(HEX$1,p());)t=16*t+parseInt$2(p(),16),$++,r++;if("."==p()){if(0==r)return;if($-=r,l>6)return;for(n=0;p();){if(o=null,n>0){if(!("."==p()&&n<4))return;$++}if(!exec$6(DIGIT$1,p()))return;for(;exec$6(DIGIT$1,p());){if(a=parseInt$2(p(),10),null===o)o=a;else{if(0==o)return;o=10*o+a}if(o>255)return;$++}c[l]=256*c[l]+o,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==p()){if($++,!p())return}else if(p())return;c[l++]=t}else{if(null!==u)return;$++,u=++l}}if(null!==u)for(i=l-u,l=7;0!=l&&i>0;)s=c[l],c[l--]=c[u+i-1],c[u+--i]=s;else if(8!=l)return;return c},findLongestZeroSequence$1=function(e){for(var t=null,r=1,n=null,o=0,a=0;a<8;a++)0!==e[a]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=a),++o);return o>r&&(t=n,r=o),t},serializeHost$1=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)unshift$1(t,e%256),e=floor$7(e/256);return join$4(t,".")}if("object"==typeof e){for(t="",n=findLongestZeroSequence$1(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=numberToString$2(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},C0ControlPercentEncodeSet$1={},fragmentPercentEncodeSet$1=assign$1({},C0ControlPercentEncodeSet$1,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet$1=assign$1({},fragmentPercentEncodeSet$1,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet$1=assign$1({},pathPercentEncodeSet$1,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode$1=function(e,t){var r=codeAt$1(e,0);return r>32&&r<127&&!hasOwn$a(t,e)?e:encodeURIComponent(e)},specialSchemes$1={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter$1=function(e,t){var r;return 2==e.length&&exec$6(ALPHA$1,charAt$7(e,0))&&(":"==(r=charAt$7(e,1))||!t&&"|"==r)},startsWithWindowsDriveLetter$1=function(e){var t;return e.length>1&&isWindowsDriveLetter$1(stringSlice$8(e,0,2))&&(2==e.length||"/"===(t=charAt$7(e,2))||"\\"===t||"?"===t||"#"===t)},isSingleDot$1=function(e){return"."===e||"%2e"===toLowerCase$2(e)},isDoubleDot$1=function(e){return".."===(e=toLowerCase$2(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START$1={},SCHEME$1={},NO_SCHEME$1={},SPECIAL_RELATIVE_OR_AUTHORITY$1={},PATH_OR_AUTHORITY$1={},RELATIVE$1={},RELATIVE_SLASH$1={},SPECIAL_AUTHORITY_SLASHES$1={},SPECIAL_AUTHORITY_IGNORE_SLASHES$1={},AUTHORITY$1={},HOST$1={},HOSTNAME$1={},PORT$1={},FILE$1={},FILE_SLASH$1={},FILE_HOST$1={},PATH_START$1={},PATH$1={},CANNOT_BE_A_BASE_URL_PATH$1={},QUERY$1={},FRAGMENT$1={},URLState$1=function(e,t,r){var n,o,a,i=$toString$3(e);if(t){if(o=this.parse(i))throw TypeError$5(o);this.searchParams=null}else{if(void 0!==r&&(n=new URLState$1(r,!0)),o=this.parse(i,null,n))throw TypeError$5(o);(a=getInternalSearchParamsState$1(new URLSearchParams$2)).bindURL(this),this.searchParams=a}};URLState$1.prototype={type:"URL",parse:function(e,t,r){var n,o,a,i,s=this,c=t||SCHEME_START$1,l=0,u="",$=!1,p=!1,f=!1;for(e=$toString$3(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=replace$8(e,LEADING_C0_CONTROL_OR_SPACE,""),e=replace$8(e,TRAILING_C0_CONTROL_OR_SPACE,"$1")),e=replace$8(e,TAB_AND_NEW_LINE$1,""),n=arrayFrom$1(e);l<=n.length;){switch(o=n[l],c){case SCHEME_START$1:if(!o||!exec$6(ALPHA$1,o)){if(t)return INVALID_SCHEME$1;c=NO_SCHEME$1;continue}u+=toLowerCase$2(o),c=SCHEME$1;break;case SCHEME$1:if(o&&(exec$6(ALPHANUMERIC$1,o)||"+"==o||"-"==o||"."==o))u+=toLowerCase$2(o);else{if(":"!=o){if(t)return INVALID_SCHEME$1;u="",c=NO_SCHEME$1,l=0;continue}if(t&&(s.isSpecial()!=hasOwn$a(specialSchemes$1,u)||"file"==u&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=u,t)return void(s.isSpecial()&&specialSchemes$1[s.scheme]==s.port&&(s.port=null));u="","file"==s.scheme?c=FILE$1:s.isSpecial()&&r&&r.scheme==s.scheme?c=SPECIAL_RELATIVE_OR_AUTHORITY$1:s.isSpecial()?c=SPECIAL_AUTHORITY_SLASHES$1:"/"==n[l+1]?(c=PATH_OR_AUTHORITY$1,l++):(s.cannotBeABaseURL=!0,push$8(s.path,""),c=CANNOT_BE_A_BASE_URL_PATH$1)}break;case NO_SCHEME$1:if(!r||r.cannotBeABaseURL&&"#"!=o)return INVALID_SCHEME$1;if(r.cannotBeABaseURL&&"#"==o){s.scheme=r.scheme,s.path=arraySlice$a(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,c=FRAGMENT$1;break}c="file"==r.scheme?FILE$1:RELATIVE$1;continue;case SPECIAL_RELATIVE_OR_AUTHORITY$1:if("/"!=o||"/"!=n[l+1]){c=RELATIVE$1;continue}c=SPECIAL_AUTHORITY_IGNORE_SLASHES$1,l++;break;case PATH_OR_AUTHORITY$1:if("/"==o){c=AUTHORITY$1;break}c=PATH$1;continue;case RELATIVE$1:if(s.scheme=r.scheme,o==EOF$1)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$a(r.path),s.query=r.query;else if("/"==o||"\\"==o&&s.isSpecial())c=RELATIVE_SLASH$1;else if("?"==o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$a(r.path),s.query="",c=QUERY$1;else{if("#"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$a(r.path),s.path.length--,c=PATH$1;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$a(r.path),s.query=r.query,s.fragment="",c=FRAGMENT$1}break;case RELATIVE_SLASH$1:if(!s.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,c=PATH$1;continue}c=AUTHORITY$1}else c=SPECIAL_AUTHORITY_IGNORE_SLASHES$1;break;case SPECIAL_AUTHORITY_SLASHES$1:if(c=SPECIAL_AUTHORITY_IGNORE_SLASHES$1,"/"!=o||"/"!=charAt$7(u,l+1))continue;l++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES$1:if("/"!=o&&"\\"!=o){c=AUTHORITY$1;continue}break;case AUTHORITY$1:if("@"==o){$&&(u="%40"+u),$=!0,a=arrayFrom$1(u);for(var d=0;d<a.length;d++){var y=a[d];if(":"!=y||f){var h=percentEncode$1(y,userinfoPercentEncodeSet$1);f?s.password+=h:s.username+=h}else f=!0}u=""}else if(o==EOF$1||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if($&&""==u)return INVALID_AUTHORITY$1;l-=arrayFrom$1(u).length+1,u="",c=HOST$1}else u+=o;break;case HOST$1:case HOSTNAME$1:if(t&&"file"==s.scheme){c=FILE_HOST$1;continue}if(":"!=o||p){if(o==EOF$1||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if(s.isSpecial()&&""==u)return INVALID_HOST$1;if(t&&""==u&&(s.includesCredentials()||null!==s.port))return;if(i=s.parseHost(u))return i;if(u="",c=PATH_START$1,t)return;continue}"["==o?p=!0:"]"==o&&(p=!1),u+=o}else{if(""==u)return INVALID_HOST$1;if(i=s.parseHost(u))return i;if(u="",c=PORT$1,t==HOSTNAME$1)return}break;case PORT$1:if(!exec$6(DIGIT$1,o)){if(o==EOF$1||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()||t){if(""!=u){var g=parseInt$2(u,10);if(g>65535)return INVALID_PORT$1;s.port=s.isSpecial()&&g===specialSchemes$1[s.scheme]?null:g,u=""}if(t)return;c=PATH_START$1;continue}return INVALID_PORT$1}u+=o;break;case FILE$1:if(s.scheme="file","/"==o||"\\"==o)c=FILE_SLASH$1;else{if(!r||"file"!=r.scheme){c=PATH$1;continue}if(o==EOF$1)s.host=r.host,s.path=arraySlice$a(r.path),s.query=r.query;else if("?"==o)s.host=r.host,s.path=arraySlice$a(r.path),s.query="",c=QUERY$1;else{if("#"!=o){startsWithWindowsDriveLetter$1(join$4(arraySlice$a(n,l),""))||(s.host=r.host,s.path=arraySlice$a(r.path),s.shortenPath()),c=PATH$1;continue}s.host=r.host,s.path=arraySlice$a(r.path),s.query=r.query,s.fragment="",c=FRAGMENT$1}}break;case FILE_SLASH$1:if("/"==o||"\\"==o){c=FILE_HOST$1;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter$1(join$4(arraySlice$a(n,l),""))&&(isWindowsDriveLetter$1(r.path[0],!0)?push$8(s.path,r.path[0]):s.host=r.host),c=PATH$1;continue;case FILE_HOST$1:if(o==EOF$1||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&isWindowsDriveLetter$1(u))c=PATH$1;else if(""==u){if(s.host="",t)return;c=PATH_START$1}else{if(i=s.parseHost(u))return i;if("localhost"==s.host&&(s.host=""),t)return;u="",c=PATH_START$1}continue}u+=o;break;case PATH_START$1:if(s.isSpecial()){if(c=PATH$1,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=EOF$1&&(c=PATH$1,"/"!=o))continue}else s.fragment="",c=FRAGMENT$1;else s.query="",c=QUERY$1;break;case PATH$1:if(o==EOF$1||"/"==o||"\\"==o&&s.isSpecial()||!t&&("?"==o||"#"==o)){if(isDoubleDot$1(u)?(s.shortenPath(),"/"==o||"\\"==o&&s.isSpecial()||push$8(s.path,"")):isSingleDot$1(u)?"/"==o||"\\"==o&&s.isSpecial()||push$8(s.path,""):("file"==s.scheme&&!s.path.length&&isWindowsDriveLetter$1(u)&&(s.host&&(s.host=""),u=charAt$7(u,0)+":"),push$8(s.path,u)),u="","file"==s.scheme&&(o==EOF$1||"?"==o||"#"==o))for(;s.path.length>1&&""===s.path[0];)shift$2(s.path);"?"==o?(s.query="",c=QUERY$1):"#"==o&&(s.fragment="",c=FRAGMENT$1)}else u+=percentEncode$1(o,pathPercentEncodeSet$1);break;case CANNOT_BE_A_BASE_URL_PATH$1:"?"==o?(s.query="",c=QUERY$1):"#"==o?(s.fragment="",c=FRAGMENT$1):o!=EOF$1&&(s.path[0]+=percentEncode$1(o,C0ControlPercentEncodeSet$1));break;case QUERY$1:t||"#"!=o?o!=EOF$1&&("'"==o&&s.isSpecial()?s.query+="%27":s.query+="#"==o?"%23":percentEncode$1(o,C0ControlPercentEncodeSet$1)):(s.fragment="",c=FRAGMENT$1);break;case FRAGMENT$1:o!=EOF$1&&(s.fragment+=percentEncode$1(o,fragmentPercentEncodeSet$1))}l++}},parseHost:function(e){var t,r,n;if("["==charAt$7(e,0)){if("]"!=charAt$7(e,e.length-1))return INVALID_HOST$1;if(!(t=parseIPv6$1(stringSlice$8(e,1,-1))))return INVALID_HOST$1;this.host=t}else if(this.isSpecial()){if(e=toASCII$1(e),exec$6(FORBIDDEN_HOST_CODE_POINT$1,e))return INVALID_HOST$1;if(null===(t=parseIPv4$1(e)))return INVALID_HOST$1;this.host=t}else{if(exec$6(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT$1,e))return INVALID_HOST$1;for(t="",r=arrayFrom$1(e),n=0;n<r.length;n++)t+=percentEncode$1(r[n],C0ControlPercentEncodeSet$1);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hasOwn$a(specialSchemes$1,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&isWindowsDriveLetter$1(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,a=e.port,i=e.path,s=e.query,c=e.fragment,l=t+":";return null!==o?(l+="//",e.includesCredentials()&&(l+=r+(n?":"+n:"")+"@"),l+=serializeHost$1(o),null!==a&&(l+=":"+a)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?i[0]:i.length?"/"+join$4(i,"/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},setHref:function(e){var t=this.parse(e);if(t)throw TypeError$5(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new URLConstructor$1(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+serializeHost$1(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($toString$3(e)+":",SCHEME_START$1)},getUsername:function(){return this.username},setUsername:function(e){var t=arrayFrom$1($toString$3(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=percentEncode$1(t[r],userinfoPercentEncodeSet$1)}},getPassword:function(){return this.password},setPassword:function(e){var t=arrayFrom$1($toString$3(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=percentEncode$1(t[r],userinfoPercentEncodeSet$1)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?serializeHost$1(e):serializeHost$1(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HOST$1)},getHostname:function(){var e=this.host;return null===e?"":serializeHost$1(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,HOSTNAME$1)},getPort:function(){var e=this.port;return null===e?"":$toString$3(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$toString$3(e))?this.port=null:this.parse(e,PORT$1))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+join$4(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,PATH_START$1))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$toString$3(e))?this.query=null:("?"==charAt$7(e,0)&&(e=stringSlice$8(e,1)),this.query="",this.parse(e,QUERY$1)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$toString$3(e))?("#"==charAt$7(e,0)&&(e=stringSlice$8(e,1)),this.fragment="",this.parse(e,FRAGMENT$1)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var URLConstructor$1=function(e){var t=anInstance$8(this,URLPrototype$1),r=validateArgumentsLength$3(arguments.length,1)>1?arguments[1]:void 0,n=setInternalState$8(t,new URLState$1(e,!1,r));DESCRIPTORS$f||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},URLPrototype$1=URLConstructor$1.prototype,accessorDescriptor$1=function(e,t){return{get:function(){return getInternalURLState$1(this)[e]()},set:t&&function(e){return getInternalURLState$1(this)[t](e)},configurable:!0,enumerable:!0}};if(DESCRIPTORS$f&&(defineBuiltInAccessor$5(URLPrototype$1,"href",accessorDescriptor$1("serialize","setHref")),defineBuiltInAccessor$5(URLPrototype$1,"origin",accessorDescriptor$1("getOrigin")),defineBuiltInAccessor$5(URLPrototype$1,"protocol",accessorDescriptor$1("getProtocol","setProtocol")),defineBuiltInAccessor$5(URLPrototype$1,"username",accessorDescriptor$1("getUsername","setUsername")),defineBuiltInAccessor$5(URLPrototype$1,"password",accessorDescriptor$1("getPassword","setPassword")),defineBuiltInAccessor$5(URLPrototype$1,"host",accessorDescriptor$1("getHost","setHost")),defineBuiltInAccessor$5(URLPrototype$1,"hostname",accessorDescriptor$1("getHostname","setHostname")),defineBuiltInAccessor$5(URLPrototype$1,"port",accessorDescriptor$1("getPort","setPort")),defineBuiltInAccessor$5(URLPrototype$1,"pathname",accessorDescriptor$1("getPathname","setPathname")),defineBuiltInAccessor$5(URLPrototype$1,"search",accessorDescriptor$1("getSearch","setSearch")),defineBuiltInAccessor$5(URLPrototype$1,"searchParams",accessorDescriptor$1("getSearchParams")),defineBuiltInAccessor$5(URLPrototype$1,"hash",accessorDescriptor$1("getHash","setHash"))),defineBuiltIn$a(URLPrototype$1,"toJSON",(function(){return getInternalURLState$1(this).serialize()}),{enumerable:!0}),defineBuiltIn$a(URLPrototype$1,"toString",(function(){return getInternalURLState$1(this).serialize()}),{enumerable:!0}),NativeURL$1){var nativeCreateObjectURL$1=NativeURL$1.createObjectURL,nativeRevokeObjectURL$1=NativeURL$1.revokeObjectURL;nativeCreateObjectURL$1&&defineBuiltIn$a(URLConstructor$1,"createObjectURL",bind$j(nativeCreateObjectURL$1,NativeURL$1)),nativeRevokeObjectURL$1&&defineBuiltIn$a(URLConstructor$1,"revokeObjectURL",bind$j(nativeRevokeObjectURL$1,NativeURL$1))}setToStringTag$5(URLConstructor$1,"URL"),$$1a({global:!0,constructor:!0,forced:!USE_NATIVE_URL$3,sham:!DESCRIPTORS$f},{URL:URLConstructor$1});var $$19=_export,getBuiltIn$5=getBuiltIn$l,fails$z=fails$11,validateArgumentsLength$2=validateArgumentsLength$7,toString$d=toString$p,USE_NATIVE_URL$2=urlConstructorDetection$1,URL$1=getBuiltIn$5("URL"),THROWS_WITHOUT_ARGUMENTS=USE_NATIVE_URL$2&&fails$z((function(){URL$1.canParse()}));$$19({target:"URL",stat:!0,forced:!THROWS_WITHOUT_ARGUMENTS},{canParse:function(e){var t=validateArgumentsLength$2(arguments.length,1),r=toString$d(e),n=t<2||void 0===arguments[1]?void 0:toString$d(arguments[1]);try{return!!new URL$1(r,n)}catch(e){return!1}}});var path$3=path$u,url$5=path$3.URL,parent$k=url$5,url$4=parent$k,parent$j=url$4,url$3=parent$j,parent$i=url$3,url$2=parent$i,url$1=url$2,url=url$1,_URL=getDefaultExportFromCjs(url),path$2=path$u,apply$6=functionApply;path$2.JSON||(path$2.JSON={stringify:JSON.stringify});var stringify$5=function(e,t,r){return apply$6(path$2.JSON.stringify,null,arguments)},parent$h=stringify$5,stringify$4=parent$h,parent$g=stringify$4,stringify$3=parent$g,parent$f=stringify$3,stringify$2=parent$f,stringify$1=stringify$2,stringify2=stringify$1,_JSON$stringify=getDefaultExportFromCjs(stringify2),isObject$f=isObject$w,classof$c=classofRaw$2,wellKnownSymbol$d=wellKnownSymbol$C,MATCH$4=wellKnownSymbol$d("match"),isRegexp$1=function(e){var t;return isObject$f(e)&&(void 0!==(t=e[MATCH$4])?!!t:"RegExp"==classof$c(e))},isRegExp$3=isRegexp$1,$TypeError$d=TypeError,notARegexp$1=function(e){if(isRegExp$3(e))throw $TypeError$d("The method doesn't accept regular expressions");return e},wellKnownSymbol$c=wellKnownSymbol$C,MATCH$3=wellKnownSymbol$c("match"),correctIsRegexpLogic$1=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH$3]=!1,"/./"[e](t)}catch(e){}}return!1},$$18=_export,$includes$2=arrayIncludes.includes,fails$y=fails$11,BROKEN_ON_SPARSE$1=fails$y((function(){return!Array(1).includes()}));$$18({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE$1},{includes:function(e){return $includes$2(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$3=entryVirtual$h,includes$7=entryVirtual$3("Array").includes,$$17=_export,uncurryThis$u=functionUncurryThis,notARegExp$1=notARegexp$1,requireObjectCoercible$7=requireObjectCoercible$e,toString$c=toString$p,correctIsRegExpLogic$1=correctIsRegexpLogic$1,stringIndexOf$3=uncurryThis$u("".indexOf);$$17({target:"String",proto:!0,forced:!correctIsRegExpLogic$1("includes")},{includes:function(e){return!!~stringIndexOf$3(toString$c(requireObjectCoercible$7(this)),toString$c(notARegExp$1(e)),arguments.length>1?arguments[1]:void 0)}});var entryVirtual$2=entryVirtual$h,includes$6=entryVirtual$2("String").includes,isPrototypeOf$7=objectIsPrototypeOf,arrayMethod=includes$7,stringMethod=includes$6,ArrayPrototype$3=Array.prototype,StringPrototype=String.prototype,includes$5=function(e){var t=e.includes;return e===ArrayPrototype$3||isPrototypeOf$7(ArrayPrototype$3,e)&&t===ArrayPrototype$3.includes?arrayMethod:"string"==typeof e||e===StringPrototype||isPrototypeOf$7(StringPrototype,e)&&t===StringPrototype.includes?stringMethod:t},parent$e=includes$5,includes$4=parent$e,parent$d=includes$4,includes$3=parent$d,parent$c=includes$3,includes$2=parent$c,includes$1=includes$2,includes3=includes$1,_includesInstanceProperty=getDefaultExportFromCjs(includes3),$$16=_export,uncurryThis$t=functionUncurryThis,isArray$2=isArray$f,nativeReverse=uncurryThis$t([].reverse),test=[1,2];$$16({target:"Array",proto:!0,forced:String(test)===String(test.reverse())},{reverse:function(){return isArray$2(this)&&(this.length=this.length),nativeReverse(this)}});var entryVirtual$1=entryVirtual$h,reverse$7=entryVirtual$1("Array").reverse,isPrototypeOf$6=objectIsPrototypeOf,method$2=reverse$7,ArrayPrototype$2=Array.prototype,reverse$6=function(e){var t=e.reverse;return e===ArrayPrototype$2||isPrototypeOf$6(ArrayPrototype$2,e)&&t===ArrayPrototype$2.reverse?method$2:t},parent$b=reverse$6,reverse$5=parent$b,parent$a=reverse$5,reverse$4=parent$a,parent$9=reverse$4,reverse$3=parent$9,reverse$2=reverse$3,reverse$1=reverse$2,_reverseInstanceProperty=getDefaultExportFromCjs(reverse$1),internalMetadata$1={exports:{}},fails$x=fails$11,arrayBufferNonExtensible$1=fails$x((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$w=fails$11,isObject$e=isObject$w,classof$b=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE$1=arrayBufferNonExtensible$1,$isExtensible$1=Object.isExtensible,FAILS_ON_PRIMITIVES$3=fails$w((function(){$isExtensible$1(1)})),objectIsExtensible$1=FAILS_ON_PRIMITIVES$3||ARRAY_BUFFER_NON_EXTENSIBLE$1?function(e){return!!isObject$e(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE$1||"ArrayBuffer"!=classof$b(e))&&(!$isExtensible$1||$isExtensible$1(e)))}:$isExtensible$1,fails$v=fails$11,freezing$1=!fails$v((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$15=_export,uncurryThis$s=functionUncurryThis,hiddenKeys$1=hiddenKeys$7,isObject$d=isObject$w,hasOwn$9=hasOwnProperty_1,defineProperty$b=objectDefineProperty.f,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule$1=objectGetOwnPropertyNamesExternal$1,isExtensible$1=objectIsExtensible$1,uid$2=uid$6,FREEZING$1=freezing$1,REQUIRED$1=!1,METADATA$1=uid$2("meta"),id$1=0,setMetadata$1=function(e){defineProperty$b(e,METADATA$1,{value:{objectID:"O"+id$1++,weakData:{}}})},fastKey$3=function(e,t){if(!isObject$d(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn$9(e,METADATA$1)){if(!isExtensible$1(e))return"F";if(!t)return"E";setMetadata$1(e)}return e[METADATA$1].objectID},getWeakData$1=function(e,t){if(!hasOwn$9(e,METADATA$1)){if(!isExtensible$1(e))return!0;if(!t)return!1;setMetadata$1(e)}return e[METADATA$1].weakData},onFreeze$1=function(e){return FREEZING$1&&REQUIRED$1&&isExtensible$1(e)&&!hasOwn$9(e,METADATA$1)&&setMetadata$1(e),e},enable$1=function(){meta$1.enable=function(){},REQUIRED$1=!0;var e=getOwnPropertyNamesModule$1.f,t=uncurryThis$s([].splice),r={};r[METADATA$1]=1,e(r).length&&(getOwnPropertyNamesModule$1.f=function(r){for(var n=e(r),o=0,a=n.length;o<a;o++)if(n[o]===METADATA$1){t(n,o,1);break}return n},$$15({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule$1.f}))},meta$1=internalMetadata$1.exports={enable:enable$1,fastKey:fastKey$3,getWeakData:getWeakData$1,onFreeze:onFreeze$1};hiddenKeys$1[METADATA$1]=!0;var internalMetadataExports$1=internalMetadata$1.exports,$$14=_export,global$n=global$N,InternalMetadataModule$1=internalMetadataExports$1,fails$u=fails$11,createNonEnumerableProperty$7=createNonEnumerableProperty$g,iterate$q=iterate$w,anInstance$7=anInstance$b,isCallable$d=isCallable$A,isObject$c=isObject$w,setToStringTag$4=setToStringTag$d,defineProperty$a=objectDefineProperty.f,forEach$2=arrayIteration.forEach,DESCRIPTORS$e=descriptors,InternalStateModule$8=internalState,setInternalState$7=InternalStateModule$8.set,internalStateGetterFor$2=InternalStateModule$8.getterFor,collection$4=function(e,t,r){var n,o=-1!==e.indexOf("Map"),a=-1!==e.indexOf("Weak"),i=o?"set":"add",s=global$n[e],c=s&&s.prototype,l={};if(DESCRIPTORS$e&&isCallable$d(s)&&(a||c.forEach&&!fails$u((function(){(new s).entries().next()})))){var u=(n=t((function(t,r){setInternalState$7(anInstance$7(t,u),{type:e,collection:new s}),null!=r&&iterate$q(r,t[i],{that:t,AS_ENTRIES:o})}))).prototype,$=internalStateGetterFor$2(e);forEach$2(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in c)||a&&"clear"==e||createNonEnumerableProperty$7(u,e,(function(r,n){var o=$(this).collection;if(!t&&a&&!isObject$c(r))return"get"==e&&void 0;var i=o[e](0===r?0:r,n);return t?this:i}))})),a||defineProperty$a(u,"size",{configurable:!0,get:function(){return $(this).collection.size}})}else n=r.getConstructor(t,e,o,i),InternalMetadataModule$1.enable();return setToStringTag$4(n,e,!1,!0),l[e]=n,$$14({global:!0,forced:!0},l),a||r.setStrong(n,e,o),n},create$5=objectCreate,defineBuiltInAccessor$4=defineBuiltInAccessor$9,defineBuiltIns$4=defineBuiltIns$6,bind$i=functionBindContext,anInstance$6=anInstance$b,isNullOrUndefined$7=isNullOrUndefined$c,iterate$p=iterate$w,defineIterator$2=iteratorDefine,createIterResultObject$2=createIterResultObject$5,setSpecies$4=setSpecies$6,DESCRIPTORS$d=descriptors,fastKey$2=internalMetadataExports$1.fastKey,InternalStateModule$7=internalState,setInternalState$6=InternalStateModule$7.set,internalStateGetterFor$1=InternalStateModule$7.getterFor,collectionStrong$4={getConstructor:function(e,t,r,n){var o=e((function(e,o){anInstance$6(e,a),setInternalState$6(e,{type:t,index:create$5(null),first:void 0,last:void 0,size:0}),DESCRIPTORS$d||(e.size=0),isNullOrUndefined$7(o)||iterate$p(o,e[n],{that:e,AS_ENTRIES:r})})),a=o.prototype,i=internalStateGetterFor$1(t),s=function(e,t,r){var n,o,a=i(e),s=c(e,t);return s?s.value=r:(a.last=s={index:o=fastKey$2(t,!0),key:t,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=s),n&&(n.next=s),DESCRIPTORS$d?a.size++:e.size++,"F"!==o&&(a.index[o]=s)),e},c=function(e,t){var r,n=i(e),o=fastKey$2(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return defineBuiltIns$4(a,{clear:function(){for(var e=i(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,DESCRIPTORS$d?e.size=0:this.size=0},delete:function(e){var t=this,r=i(t),n=c(t,e);if(n){var o=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=o),o&&(o.previous=a),r.first==n&&(r.first=o),r.last==n&&(r.last=a),DESCRIPTORS$d?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=i(this),n=bind$i(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),defineBuiltIns$4(a,r?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),DESCRIPTORS$d&&defineBuiltInAccessor$4(a,"size",{configurable:!0,get:function(){return i(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=internalStateGetterFor$1(t),a=internalStateGetterFor$1(n);defineIterator$2(e,t,(function(e,t){setInternalState$6(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?createIterResultObject$2("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,createIterResultObject$2(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies$4(t)}},collection$3=collection$4,collectionStrong$3=collectionStrong$4;collection$3("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong$3);var path$1=path$u,map$5=path$1.Map,parent$8=map$5,map$4=parent$8,parent$7=map$4,map$3=parent$7,bind$h=functionBindContext,call$p=functionCall,aCallable$a=aCallable$n,aConstructor$1=aConstructor$4,isNullOrUndefined$6=isNullOrUndefined$c,iterate$o=iterate$w,push$7=[].push,collectionFrom=function(e){var t,r,n,o,a=arguments.length,i=a>1?arguments[1]:void 0;return aConstructor$1(this),(t=void 0!==i)&&aCallable$a(i),isNullOrUndefined$6(e)?new this:(r=[],t?(n=0,o=bind$h(i,a>2?arguments[2]:void 0),iterate$o(e,(function(e){call$p(push$7,r,o(e,n++))}))):iterate$o(e,push$7,{that:r}),new this(r))},$$13=_export,from$1=collectionFrom;$$13({target:"Map",stat:!0,forced:!0},{from:from$1});var arraySlice$9=arraySlice$h,collectionOf=function(){return new this(arraySlice$9(arguments))},$$12=_export,of$1=collectionOf;$$12({target:"Map",stat:!0,forced:!0},{of:of$1});var tryToString$3=tryToString$a,aMap$e=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(tryToString$3(e)+" is not a map")},caller$2=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},getBuiltIn$4=getBuiltIn$l,caller$1=caller$2,Map$5=getBuiltIn$4("Map"),mapHelpers={Map:Map$5,set:caller$1("set",2),get:caller$1("get",1),has:caller$1("has",1),remove:caller$1("delete",1),proto:Map$5.prototype},$$11=_export,aMap$d=aMap$e,remove$3=mapHelpers.remove;$$11({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aMap$d(this),r=!0,n=0,o=arguments.length;n<o;n++)e=remove$3(t,arguments[n]),r=r&&e;return!!r}});var $$10=_export,aMap$c=aMap$e,MapHelpers$4=mapHelpers,get$2=MapHelpers$4.get,has$6=MapHelpers$4.has,set$c=MapHelpers$4.set;$$10({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,o=aMap$c(this);return has$6(o,e)?(r=get$2(o,e),"update"in t&&(r=t.update(r,e,o),set$c(o,e,r)),r):(n=t.insert(e,o),set$c(o,e,n),n)}});var call$o=functionCall,iterateSimple$8=function(e,t,r){for(var n,o,a=r||e.next;!(n=call$o(a,e)).done;)if(void 0!==(o=t(n.value)))return o},iterateSimple$7=iterateSimple$8,mapIterate=function(e,t,r){return r?iterateSimple$7(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},$$$=_export,bind$g=functionBindContext,aMap$b=aMap$e,iterate$n=mapIterate;$$$({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=aMap$b(this),r=bind$g(e,arguments.length>1?arguments[1]:void 0);return!1!==iterate$n(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var $$_=_export,bind$f=functionBindContext,aMap$a=aMap$e,MapHelpers$3=mapHelpers,iterate$m=mapIterate,Map$4=MapHelpers$3.Map,set$b=MapHelpers$3.set;$$_({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aMap$a(this),r=bind$f(e,arguments.length>1?arguments[1]:void 0),n=new Map$4;return iterate$m(t,(function(e,o){r(e,o,t)&&set$b(n,o,e)})),n}});var $$Z=_export,bind$e=functionBindContext,aMap$9=aMap$e,iterate$l=mapIterate;$$Z({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=aMap$9(this),r=bind$e(e,arguments.length>1?arguments[1]:void 0),n=iterate$l(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var $$Y=_export,bind$d=functionBindContext,aMap$8=aMap$e,iterate$k=mapIterate;$$Y({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=aMap$8(this),r=bind$d(e,arguments.length>1?arguments[1]:void 0),n=iterate$k(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var $$X=_export,call$n=functionCall,uncurryThis$r=functionUncurryThis,isCallable$c=isCallable$A,aCallable$9=aCallable$n,iterate$j=iterate$w,Map$3=mapHelpers.Map,push$6=uncurryThis$r([].push);$$X({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(isCallable$c(this)?this:Map$3);aCallable$9(t);var n=aCallable$9(r.has),o=aCallable$9(r.get),a=aCallable$9(r.set);return iterate$j(e,(function(e){var i=t(e);call$n(n,r,i)?push$6(call$n(o,r,i),e):call$n(a,r,i,[e])})),r}});var sameValueZero$1=function(e,t){return e===t||e!=e&&t!=t},$$W=_export,sameValueZero=sameValueZero$1,aMap$7=aMap$e,iterate$i=mapIterate;$$W({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iterate$i(aMap$7(this),(function(t){if(sameValueZero(t,e))return!0}),!0)}});var $$V=_export,call$m=functionCall,iterate$h=iterate$w,isCallable$b=isCallable$A,aCallable$8=aCallable$n,Map$2=mapHelpers.Map;$$V({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(isCallable$b(this)?this:Map$2);aCallable$8(t);var n=aCallable$8(r.set);return iterate$h(e,(function(e){call$m(n,r,t(e),e)})),r}});var $$U=_export,aMap$6=aMap$e,iterate$g=mapIterate;$$U({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=iterate$g(aMap$6(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var $$T=_export,bind$c=functionBindContext,aMap$5=aMap$e,MapHelpers$2=mapHelpers,iterate$f=mapIterate,Map$1=MapHelpers$2.Map,set$a=MapHelpers$2.set;$$T({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=aMap$5(this),r=bind$c(e,arguments.length>1?arguments[1]:void 0),n=new Map$1;return iterate$f(t,(function(e,o){set$a(n,r(e,o,t),e)})),n}});var $$S=_export,bind$b=functionBindContext,aMap$4=aMap$e,MapHelpers$1=mapHelpers,iterate$e=mapIterate,Map=MapHelpers$1.Map,set$9=MapHelpers$1.set;$$S({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=aMap$4(this),r=bind$b(e,arguments.length>1?arguments[1]:void 0),n=new Map;return iterate$e(t,(function(e,o){set$9(n,o,r(e,o,t))})),n}});var $$R=_export,aMap$3=aMap$e,iterate$d=iterate$w,set$8=mapHelpers.set;$$R({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=aMap$3(this),r=arguments.length,n=0;n<r;)iterate$d(arguments[n++],(function(e,r){set$8(t,e,r)}),{AS_ENTRIES:!0});return t}});var $$Q=_export,aCallable$7=aCallable$n,aMap$2=aMap$e,iterate$c=mapIterate,$TypeError$c=TypeError;$$Q({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aMap$2(this),r=arguments.length<2,n=r?void 0:arguments[1];if(aCallable$7(e),iterate$c(t,(function(o,a){r?(r=!1,n=o):n=e(n,o,a,t)})),r)throw $TypeError$c("Reduce of empty map with no initial value");return n}});var $$P=_export,bind$a=functionBindContext,aMap$1=aMap$e,iterate$b=mapIterate;$$P({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=aMap$1(this),r=bind$a(e,arguments.length>1?arguments[1]:void 0);return!0===iterate$b(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var $$O=_export,aCallable$6=aCallable$n,aMap=aMap$e,MapHelpers=mapHelpers,$TypeError$b=TypeError,get$1=MapHelpers.get,has$5=MapHelpers.has,set$7=MapHelpers.set;$$O({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=aMap(this),n=arguments.length;aCallable$6(t);var o=has$5(r,e);if(!o&&n<3)throw $TypeError$b("Updating absent value");var a=o?get$1(r,e):aCallable$6(n>2?arguments[2]:void 0)(e,r);return set$7(r,e,t(a,e,r)),r}});var call$l=functionCall,aCallable$5=aCallable$n,isCallable$a=isCallable$A,anObject$9=anObject$p,$TypeError$a=TypeError,mapUpsert=function(e,t){var r,n=anObject$9(this),o=aCallable$5(n.get),a=aCallable$5(n.has),i=aCallable$5(n.set),s=arguments.length>2?arguments[2]:void 0;if(!isCallable$a(t)&&!isCallable$a(s))throw $TypeError$a("At least one callback required");return call$l(a,n,e)?(r=call$l(o,n,e),isCallable$a(t)&&(r=t(r),call$l(i,n,e,r))):isCallable$a(s)&&(r=s(),call$l(i,n,e,r)),r},$$N=_export,upsert$1=mapUpsert;$$N({target:"Map",proto:!0,real:!0,forced:!0},{upsert:upsert$1});var $$M=_export,upsert2=mapUpsert;$$M({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:upsert2});var parent$6=map$3,map$2=parent$6,map$1=map$2,map3=map$1,_Map=getDefaultExportFromCjs(map3);function ownKeys3(e,t){var r=_Object$keys(e);if(_Object$getOwnPropertySymbols){var n=_Object$getOwnPropertySymbols(e);t&&(n=_filterInstanceProperty(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r,n,o=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys3(Object(o),!0)).call(r,(function(t){_defineProperty$1(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty(n=ownKeys3(Object(o))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(o,t))}))}return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=_Object$defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof _Symbol?_Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return _Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,o){var a=t&&t.prototype instanceof p?t:p,i=_Object$create(a.prototype),s=new T(o||[]);return n(i,"_invoke",{value:S(e,r,s)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var $={};function p(){}function f(){}function d(){}var y={};c(y,a,(function(){return this}));var h=_Object$getPrototypeOf&&_Object$getPrototypeOf(_Object$getPrototypeOf(I([])));h&&h!==t&&r.call(h,a)&&(y=h);var g=d.prototype=p.prototype=_Object$create(y);function m(e){var t;_forEachInstanceProperty(t=["next","throw","return"]).call(t,(function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(n,a,i,s){var c=u(e[n],e,a);if("throw"!==c.type){var l=c.arg,$=l.value;return $&&"object"==_typeof$2($)&&r.call($,"__await")?t.resolve($.__await).then((function(e){o("next",e,i,s)}),(function(e){o("throw",e,i,s)})):t.resolve($).then((function(e){l.value=e,i(l)}),(function(e){return o("throw",e,i,s)}))}s(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=b(i,r);if(s){if(s===$)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===$)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function b(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),$;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,$;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,$):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,$)}function v(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty(e).call(e,v,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=d,n(g,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:f,configurable:!0}),f.displayName=c(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return _Object$setPrototypeOf?_Object$setPrototypeOf(e,d):(e.__proto__=d,c(e,s,"GeneratorFunction")),e.prototype=_Object$create(g),e},e.awrap=function(e){return{__await:e}},m(_.prototype),c(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=_Promise);var i=new _(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},m(g),c(g,s,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return _reverseInstanceProperty(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=I,T.prototype={constructor:T,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,_forEachInstanceProperty(t=this.tryEntries).call(t,E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+_sliceInstanceProperty(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,$):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),$},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),$}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),$}},e}function _typeof(e){return(_typeof="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void r(e)}s.done?t(c):_Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new _Promise((function(n,o){var a=e.apply(t,r);function i(e){asyncGeneratorStep(a,n,o,i,s,"next",e)}function s(e){asyncGeneratorStep(a,n,o,i,s,"throw",e)}i(void 0)}))}}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass$1(e,t,r){return t&&_defineProperties$1(e.prototype,t),r&&_defineProperties$1(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$1(e,t,r){return(t=_toPropertyKey(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits$1(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}}),_Object$defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$1(e,t)}function _getPrototypeOf$1(e){var t;return(_getPrototypeOf$1=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf$1(e,t){var r;return(_setPrototypeOf$1=_Object$setPrototypeOf?_bindInstanceProperty(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!_Reflect$construct)return!1;if(_Reflect$construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _construct(e,t,r){var n;_isNativeReflectConstruct$1()?_construct=_bindInstanceProperty(n=_Reflect$construct).call(n):_construct=function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(_bindInstanceProperty(Function).apply(e,n));return r&&_setPrototypeOf$1(o,r.prototype),o};return _construct.apply(null,arguments)}function _isNativeFunction(e){var t;return-1!==_indexOfInstanceProperty(t=Function.toString.call(e)).call(t,"[native code]")}function _wrapNativeSuper(e){var t="function"==typeof _Map?new _Map:void 0;return _wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_getPrototypeOf$1(this).constructor)}return r.prototype=_Object$create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$1(r,e)},_wrapNativeSuper(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},a=_Object$keys(e);for(n=0;n<a.length;n++)r=a[n],_indexOfInstanceProperty(t).call(t,r)>=0||(o[r]=e[r]);return o}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose(e,t);if(_Object$getOwnPropertySymbols){var a=_Object$getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],_indexOfInstanceProperty(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$1(e,t){if(t&&("object"===_typeof$2(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(e)}function _createSuper$1(e){var t=_isNativeReflectConstruct$1();return function(){var r,n=_getPrototypeOf$1(e);if(t){var o=_getPrototypeOf$1(this).constructor;r=_Reflect$construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn$1(this,r)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf$1(e)););return e}function _get(){var e;"undefined"!=typeof Reflect&&_Reflect$get?_get=_bindInstanceProperty(e=_Reflect$get).call(e):_get=function(e,t,r){var n=_superPropBase(e,t);if(n){var o=_Object$getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}};return _get.apply(this,arguments)}function _unsupportedIterableToArray$1(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$1(e,t);var n=_sliceInstanceProperty(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$1(e,t):void 0}}function _arrayLikeToArray$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _createForOfIteratorHelper(e,t){var r=void 0!==_Symbol&&_getIteratorMethod(e)||e["@@iterator"];if(!r){if(_Array$isArray(e)||(r=_unsupportedIterableToArray$1(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function _toPrimitive(e,t){if("object"!==_typeof$2(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$2(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof$2(t)?t:String(t)}var wellKnownSymbol$b=wellKnownSymbol$T,create$4=objectCreate$1,defineProperty$9=objectDefineProperty$1.f,UNSCOPABLES=wellKnownSymbol$b("unscopables"),ArrayPrototype$1=Array.prototype;null==ArrayPrototype$1[UNSCOPABLES]&&defineProperty$9(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$4(null)});var addToUnscopables$4=function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0},toIndexedObject$3=toIndexedObject$l,addToUnscopables$3=addToUnscopables$4,Iterators$1=iterators$1,InternalStateModule$6=internalState$1,defineProperty$8=objectDefineProperty$1.f,defineIterator$1=iteratorDefine$1,createIterResultObject$1=createIterResultObject$7,DESCRIPTORS$c=descriptors$1,ARRAY_ITERATOR="Array Iterator",setInternalState$5=InternalStateModule$6.set,getInternalState$5=InternalStateModule$6.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator$1(Array,"Array",(function(e,t){setInternalState$5(this,{type:ARRAY_ITERATOR,target:toIndexedObject$3(e),index:0,kind:t})}),(function(){var e=getInternalState$5(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$1(void 0,!0)):createIterResultObject$1("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),values2=Iterators$1.Arguments=Iterators$1.Array;if(addToUnscopables$3("keys"),addToUnscopables$3("values"),addToUnscopables$3("entries"),DESCRIPTORS$c&&"values"!==values2.name)try{defineProperty$8(values2,"name",{value:"values"})}catch(e){}var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$4,classList=documentCreateElement("span").classList,DOMTokenListPrototype$2=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$2===Object.prototype?void 0:DOMTokenListPrototype$2,global$m=global$13,DOMIterables$1=domIterables,DOMTokenListPrototype$1=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty$6=createNonEnumerableProperty$k,wellKnownSymbol$a=wellKnownSymbol$T,ITERATOR$4=wellKnownSymbol$a("iterator"),TO_STRING_TAG$1=wellKnownSymbol$a("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype$1=function(e,t){if(e){if(e[ITERATOR$4]!==ArrayValues)try{createNonEnumerableProperty$6(e,ITERATOR$4,ArrayValues)}catch(t){e[ITERATOR$4]=ArrayValues}if(e[TO_STRING_TAG$1]||createNonEnumerableProperty$6(e,TO_STRING_TAG$1,t),DOMIterables$1[t])for(var r in ArrayIteratorMethods)if(e[r]!==ArrayIteratorMethods[r])try{createNonEnumerableProperty$6(e,r,ArrayIteratorMethods[r])}catch(t){e[r]=ArrayIteratorMethods[r]}}};for(var COLLECTION_NAME$1 in DOMIterables$1)handlePrototype$1(global$m[COLLECTION_NAME$1]&&global$m[COLLECTION_NAME$1].prototype,COLLECTION_NAME$1);handlePrototype$1(DOMTokenListPrototype$1,"DOMTokenList");var fails$t=fails$1i,wellKnownSymbol$9=wellKnownSymbol$T,IS_PURE=isPure$1,ITERATOR$3=wellKnownSymbol$9("iterator"),urlConstructorDetection=!fails$t((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),IS_PURE&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[ITERATOR$3]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),makeBuiltIn=makeBuiltInExports,defineProperty$7=objectDefineProperty$1,defineBuiltInAccessor$3=function(e,t,r){return r.get&&makeBuiltIn(r.get,t,{getter:!0}),r.set&&makeBuiltIn(r.set,t,{setter:!0}),defineProperty$7.f(e,t,r)},toAbsoluteIndex$4=toAbsoluteIndex$c,lengthOfArrayLike$b=lengthOfArrayLike$s,createProperty$1=createProperty$c,$Array$1=Array,max$3=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike$b(e),o=toAbsoluteIndex$4(t,n),a=toAbsoluteIndex$4(void 0===r?n:r,n),i=$Array$1(max$3(a-o,0)),s=0;o<a;o++,s++)createProperty$1(i,s,e[o]);return i.length=s,i},uncurryThis$q=functionUncurryThis$1,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,$RangeError$4=RangeError,exec$5=uncurryThis$q(regexSeparators.exec),floor$6=Math.floor,fromCharCode=String.fromCharCode,charCodeAt$2=uncurryThis$q("".charCodeAt),join$3=uncurryThis$q([].join),push$5=uncurryThis$q([].push),replace$7=uncurryThis$q("".replace),split$2=uncurryThis$q("".split),toLowerCase$1=uncurryThis$q("".toLowerCase),ucs2decode=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=charCodeAt$2(e,r++);if(o>=55296&&o<=56319&&r<n){var a=charCodeAt$2(e,r++);56320==(64512&a)?push$5(t,((1023&o)<<10)+(1023&a)+65536):(push$5(t,o),r--)}else push$5(t,o)}return t},digitToBasic=function(e){return e+22+75*(e<26)},adapt=function(e,t,r){var n=0;for(e=r?floor$6(e/damp):e>>1,e+=floor$6(e/t);e>baseMinusTMin*tMax>>1;)e=floor$6(e/baseMinusTMin),n+=base;return floor$6(n+(baseMinusTMin+1)*e/(e+skew))},encode$1=function(e){var t,r,n=[],o=(e=ucs2decode(e)).length,a=initialN,i=0,s=initialBias;for(t=0;t<e.length;t++)(r=e[t])<128&&push$5(n,fromCharCode(r));var c=n.length,l=c;for(c&&push$5(n,delimiter);l<o;){var u=maxInt;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var $=l+1;if(u-a>floor$6((maxInt-i)/$))throw $RangeError$4(OVERFLOW_ERROR);for(i+=(u-a)*$,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++i>maxInt)throw $RangeError$4(OVERFLOW_ERROR);if(r==a){for(var p=i,f=base;;){var d=f<=s?tMin:f>=s+tMax?tMax:f-s;if(p<d)break;var y=p-d,h=base-d;push$5(n,fromCharCode(digitToBasic(d+y%h))),p=floor$6(y/h),f+=base}push$5(n,fromCharCode(digitToBasic(p))),s=adapt(i,$,l==c),i=0,l++}}i++,a++}return join$3(n,"")},stringPunycodeToAscii=function(e){var t,r,n=[],o=split$2(replace$7(toLowerCase$1(e),regexSeparators,"."),".");for(t=0;t<o.length;t++)r=o[t],push$5(n,exec$5(regexNonASCII,r)?"xn--"+encode$1(r):r);return join$3(n,".")},defineBuiltIn$9=defineBuiltIn$p,defineBuiltIns$3=function(e,t,r){for(var n in t)defineBuiltIn$9(e,n,t[n],r);return e},arraySlice$8=arraySliceSimple,floor$5=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor$5(r/2);return r<8?insertionSort(e,t):merge2(e,mergeSort(arraySlice$8(e,0,n),t),mergeSort(arraySlice$8(e,n),t),t)},insertionSort=function(e,t){for(var r,n,o=e.length,a=1;a<o;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},merge2=function(e,t,r,n){for(var o=t.length,a=r.length,i=0,s=0;i<o||s<a;)e[i+s]=i<o&&s<a?n(t[i],r[s])<=0?t[i++]:r[s++]:i<o?t[i++]:r[s++];return e},arraySort$1=mergeSort,$$L=_export$1,global$l=global$13,call$k=functionCall$1,uncurryThis$p=functionUncurryThis$1,DESCRIPTORS$b=descriptors$1,USE_NATIVE_URL$1=urlConstructorDetection,defineBuiltIn$8=defineBuiltIn$p,defineBuiltIns$2=defineBuiltIns$3,setToStringTag$3=setToStringTag$h,createIteratorConstructor=iteratorCreateConstructor$1,InternalStateModule$5=internalState$1,anInstance$5=anInstance$d,isCallable$9=isCallable$V,hasOwn$8=hasOwnProperty_1$1,bind$9=functionBindContext$1,classof$a=classof$v,anObject$8=anObject$B,isObject$b=isObject$I,$toString$2=toString$v,create$3=objectCreate$1,createPropertyDescriptor$1=createPropertyDescriptor$f,getIterator$1=getIterator$8,getIteratorMethod$1=getIteratorMethod$g,validateArgumentsLength$1=validateArgumentsLength$9,wellKnownSymbol$8=wellKnownSymbol$T,arraySort=arraySort$1,ITERATOR$2=wellKnownSymbol$8("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$4=InternalStateModule$5.set,getInternalParamsState=InternalStateModule$5.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$5.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(e){if(!DESCRIPTORS$b)return global$l[e];var t=getOwnPropertyDescriptor$2(global$l,e);return t&&t.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers$1=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers$1&&Headers$1.prototype,RegExp$2=global$l.RegExp,TypeError$4=global$l.TypeError,decodeURIComponent=global$l.decodeURIComponent,encodeURIComponent$1=global$l.encodeURIComponent,charAt$6=uncurryThis$p("".charAt),join$2=uncurryThis$p([].join),push$4=uncurryThis$p([].push),replace$6=uncurryThis$p("".replace),shift$1=uncurryThis$p([].shift),splice2=uncurryThis$p([].splice),split$1=uncurryThis$p("".split),stringSlice$7=uncurryThis$p("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(e){return sequences[e-1]||(sequences[e-1]=RegExp$2("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode=function(e){try{return decodeURIComponent(e)}catch(t){return e}},deserialize=function(e){var t=replace$6(e,plus," "),r=4;try{return decodeURIComponent(t)}catch(e){for(;r;)t=replace$6(t,percentSequence(r--),percentDecode);return t}},find2=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(e){return replacements[e]},serialize=function(e){return replace$6(encodeURIComponent$1(e),find2,replacer)},URLSearchParamsIterator=createIteratorConstructor((function(e,t){setInternalState$4(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator$1(getInternalParamsState(e).entries),kind:t})}),"Iterator",(function(){var e=getInternalIteratorState(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),URLSearchParamsState=function(e){this.entries=[],this.url=null,void 0!==e&&(isObject$b(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===charAt$6(e,0)?stringSlice$7(e,1):e:$toString$2(e)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,a,i,s,c=getIteratorMethod$1(e);if(c)for(r=(t=getIterator$1(e,c)).next;!(n=call$k(r,t)).done;){if(a=(o=getIterator$1(anObject$8(n.value))).next,(i=call$k(a,o)).done||(s=call$k(a,o)).done||!call$k(a,o).done)throw TypeError$4("Expected sequence with length 2");push$4(this.entries,{key:$toString$2(i.value),value:$toString$2(s.value)})}else for(var l in e)hasOwn$8(e,l)&&push$4(this.entries,{key:l,value:$toString$2(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=split$1(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=split$1(t,"="),push$4(this.entries,{key:deserialize(shift$1(r)),value:deserialize(join$2(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],push$4(r,serialize(e.key)+"="+serialize(e.value));return join$2(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor=function(){anInstance$5(this,URLSearchParamsPrototype),setInternalState$4(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0))},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(defineBuiltIns$2(URLSearchParamsPrototype,{append:function(e,t){validateArgumentsLength$1(arguments.length,2);var r=getInternalParamsState(this);push$4(r.entries,{key:$toString$2(e),value:$toString$2(t)}),r.updateURL()},delete:function(e){validateArgumentsLength$1(arguments.length,1);for(var t=getInternalParamsState(this),r=t.entries,n=$toString$2(e),o=0;o<r.length;)r[o].key===n?splice2(r,o,1):o++;t.updateURL()},get:function(e){validateArgumentsLength$1(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$2(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){validateArgumentsLength$1(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$2(e),n=[],o=0;o<t.length;o++)t[o].key===r&&push$4(n,t[o].value);return n},has:function(e){validateArgumentsLength$1(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$2(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){validateArgumentsLength$1(arguments.length,1);for(var r,n=getInternalParamsState(this),o=n.entries,a=!1,i=$toString$2(e),s=$toString$2(t),c=0;c<o.length;c++)(r=o[c]).key===i&&(a?splice2(o,c--,1):(a=!0,r.value=s));a||push$4(o,{key:i,value:s}),n.updateURL()},sort:function(){var e=getInternalParamsState(this);arraySort(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=getInternalParamsState(this).entries,n=bind$9(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0}),defineBuiltIn$8(URLSearchParamsPrototype,ITERATOR$2,URLSearchParamsPrototype.entries,{name:"entries"}),defineBuiltIn$8(URLSearchParamsPrototype,"toString",(function(){return getInternalParamsState(this).serialize()}),{enumerable:!0}),setToStringTag$3(URLSearchParamsConstructor,URL_SEARCH_PARAMS),$$L({global:!0,constructor:!0,forced:!USE_NATIVE_URL$1},{URLSearchParams:URLSearchParamsConstructor}),!USE_NATIVE_URL$1&&isCallable$9(Headers$1)){var headersHas=uncurryThis$p(HeadersPrototype.has),headersSet=uncurryThis$p(HeadersPrototype.set),wrapRequestOptions=function(e){if(isObject$b(e)){var t,r=e.body;if(classof$a(r)===URL_SEARCH_PARAMS)return t=e.headers?new Headers$1(e.headers):new Headers$1,headersHas(t,"content-type")||headersSet(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create$3(e,{body:createPropertyDescriptor$1(0,$toString$2(r)),headers:createPropertyDescriptor$1(0,t)})}return e};if(isCallable$9(nativeFetch)&&$$L({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return nativeFetch(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),isCallable$9(NativeRequest)){var RequestConstructor=function(e){return anInstance$5(this,RequestPrototype),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$L({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var EOF,web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$K=_export$1,DESCRIPTORS$a=descriptors$1,USE_NATIVE_URL=urlConstructorDetection,global$k=global$13,bind$8=functionBindContext$1,uncurryThis$o=functionUncurryThis$1,defineBuiltIn$7=defineBuiltIn$p,defineBuiltInAccessor$2=defineBuiltInAccessor$3,anInstance$4=anInstance$d,hasOwn$7=hasOwnProperty_1$1,assign3=objectAssign$1,arrayFrom=arrayFrom$3,arraySlice$7=arraySliceSimple,codeAt=stringMultibyte$1.codeAt,toASCII=stringPunycodeToAscii,$toString$1=toString$v,setToStringTag$2=setToStringTag$h,validateArgumentsLength=validateArgumentsLength$9,URLSearchParamsModule=web_urlSearchParams_constructor,InternalStateModule$4=internalState$1,setInternalState$3=InternalStateModule$4.set,getInternalURLState=InternalStateModule$4.getterFor("URL"),URLSearchParams$1=URLSearchParamsModule.URLSearchParams,getInternalSearchParamsState=URLSearchParamsModule.getState,NativeURL=global$k.URL,TypeError$3=global$k.TypeError,parseInt$1=global$k.parseInt,floor$4=Math.floor,pow$1=Math.pow,charAt$5=uncurryThis$o("".charAt),exec$4=uncurryThis$o(/./.exec),join$1=uncurryThis$o([].join),numberToString$1=uncurryThis$o(1..toString),pop=uncurryThis$o([].pop),push$3=uncurryThis$o([].push),replace$5=uncurryThis$o("".replace),shift=uncurryThis$o([].shift),split=uncurryThis$o("".split),stringSlice$6=uncurryThis$o("".slice),toLowerCase=uncurryThis$o("".toLowerCase),unshift=uncurryThis$o([].unshift),INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[a-z]/i,ALPHANUMERIC=/[\d+-.a-z]/i,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,TAB_AND_NEW_LINE=/[\t\n\r]/g,parseIPv4=function(e){var t,r,n,o,a,i,s,c=split(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=c[n]))return e;if(a=10,o.length>1&&"0"==charAt$5(o,0)&&(a=exec$4(HEX_START,o)?16:8,o=stringSlice$6(o,8==a?1:2)),""===o)i=0;else{if(!exec$4(10==a?DEC:8==a?OCT:HEX,o))return e;i=parseInt$1(o,a)}push$3(r,i)}for(n=0;n<t;n++)if(i=r[n],n==t-1){if(i>=pow$1(256,5-t))return null}else if(i>255)return null;for(s=pop(r),n=0;n<r.length;n++)s+=r[n]*pow$1(256,3-n);return s},parseIPv6=function(e){var t,r,n,o,a,i,s,c=[0,0,0,0,0,0,0,0],l=0,u=null,$=0,p=function(){return charAt$5(e,$)};if(":"==p()){if(":"!=charAt$5(e,1))return;$+=2,u=++l}for(;p();){if(8==l)return;if(":"!=p()){for(t=r=0;r<4&&exec$4(HEX,p());)t=16*t+parseInt$1(p(),16),$++,r++;if("."==p()){if(0==r)return;if($-=r,l>6)return;for(n=0;p();){if(o=null,n>0){if(!("."==p()&&n<4))return;$++}if(!exec$4(DIGIT,p()))return;for(;exec$4(DIGIT,p());){if(a=parseInt$1(p(),10),null===o)o=a;else{if(0==o)return;o=10*o+a}if(o>255)return;$++}c[l]=256*c[l]+o,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==p()){if($++,!p())return}else if(p())return;c[l++]=t}else{if(null!==u)return;$++,u=++l}}if(null!==u)for(i=l-u,l=7;0!=l&&i>0;)s=c[l],c[l--]=c[u+i-1],c[u+--i]=s;else if(8!=l)return;return c},findLongestZeroSequence=function(e){for(var t=null,r=1,n=null,o=0,a=0;a<8;a++)0!==e[a]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=a),++o);return o>r&&(t=n,r=o),t},serializeHost=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)unshift(t,e%256),e=floor$4(e/256);return join$1(t,".")}if("object"==typeof e){for(t="",n=findLongestZeroSequence(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=numberToString$1(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=assign3({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=assign3({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=assign3({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,t){var r=codeAt(e,0);return r>32&&r<127&&!hasOwn$7(t,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(e,t){var r;return 2==e.length&&exec$4(ALPHA,charAt$5(e,0))&&(":"==(r=charAt$5(e,1))||!t&&"|"==r)},startsWithWindowsDriveLetter=function(e){var t;return e.length>1&&isWindowsDriveLetter(stringSlice$6(e,0,2))&&(2==e.length||"/"===(t=charAt$5(e,2))||"\\"===t||"?"===t||"#"===t)},isSingleDot=function(e){return"."===e||"%2e"===toLowerCase(e)},isDoubleDot=function(e){return".."===(e=toLowerCase(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},URLState=function(e,t,r){var n,o,a,i=$toString$1(e);if(t){if(o=this.parse(i))throw TypeError$3(o);this.searchParams=null}else{if(void 0!==r&&(n=new URLState(r,!0)),o=this.parse(i,null,n))throw TypeError$3(o);(a=getInternalSearchParamsState(new URLSearchParams$1)).bindURL(this),this.searchParams=a}};URLState.prototype={type:"URL",parse:function(e,t,r){var n,o,a,i,s=this,c=t||SCHEME_START,l=0,u="",$=!1,p=!1,f=!1;for(e=$toString$1(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=replace$5(e,LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE,"")),e=replace$5(e,TAB_AND_NEW_LINE,""),n=arrayFrom(e);l<=n.length;){switch(o=n[l],c){case SCHEME_START:if(!o||!exec$4(ALPHA,o)){if(t)return INVALID_SCHEME;c=NO_SCHEME;continue}u+=toLowerCase(o),c=SCHEME;break;case SCHEME:if(o&&(exec$4(ALPHANUMERIC,o)||"+"==o||"-"==o||"."==o))u+=toLowerCase(o);else{if(":"!=o){if(t)return INVALID_SCHEME;u="",c=NO_SCHEME,l=0;continue}if(t&&(s.isSpecial()!=hasOwn$7(specialSchemes,u)||"file"==u&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=u,t)return void(s.isSpecial()&&specialSchemes[s.scheme]==s.port&&(s.port=null));u="","file"==s.scheme?c=FILE:s.isSpecial()&&r&&r.scheme==s.scheme?c=SPECIAL_RELATIVE_OR_AUTHORITY:s.isSpecial()?c=SPECIAL_AUTHORITY_SLASHES:"/"==n[l+1]?(c=PATH_OR_AUTHORITY,l++):(s.cannotBeABaseURL=!0,push$3(s.path,""),c=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!r||r.cannotBeABaseURL&&"#"!=o)return INVALID_SCHEME;if(r.cannotBeABaseURL&&"#"==o){s.scheme=r.scheme,s.path=arraySlice$7(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,c=FRAGMENT;break}c="file"==r.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=o||"/"!=n[l+1]){c=RELATIVE;continue}c=SPECIAL_AUTHORITY_IGNORE_SLASHES,l++;break;case PATH_OR_AUTHORITY:if("/"==o){c=AUTHORITY;break}c=PATH;continue;case RELATIVE:if(s.scheme=r.scheme,o==EOF)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$7(r.path),s.query=r.query;else if("/"==o||"\\"==o&&s.isSpecial())c=RELATIVE_SLASH;else if("?"==o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$7(r.path),s.query="",c=QUERY;else{if("#"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$7(r.path),s.path.length--,c=PATH;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice$7(r.path),s.query=r.query,s.fragment="",c=FRAGMENT}break;case RELATIVE_SLASH:if(!s.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,c=PATH;continue}c=AUTHORITY}else c=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(c=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=o||"/"!=charAt$5(u,l+1))continue;l++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=o&&"\\"!=o){c=AUTHORITY;continue}break;case AUTHORITY:if("@"==o){$&&(u="%40"+u),$=!0,a=arrayFrom(u);for(var d=0;d<a.length;d++){var y=a[d];if(":"!=y||f){var h=percentEncode(y,userinfoPercentEncodeSet);f?s.password+=h:s.username+=h}else f=!0}u=""}else if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if($&&""==u)return INVALID_AUTHORITY;l-=arrayFrom(u).length+1,u="",c=HOST}else u+=o;break;case HOST:case HOSTNAME:if(t&&"file"==s.scheme){c=FILE_HOST;continue}if(":"!=o||p){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if(s.isSpecial()&&""==u)return INVALID_HOST;if(t&&""==u&&(s.includesCredentials()||null!==s.port))return;if(i=s.parseHost(u))return i;if(u="",c=PATH_START,t)return;continue}"["==o?p=!0:"]"==o&&(p=!1),u+=o}else{if(""==u)return INVALID_HOST;if(i=s.parseHost(u))return i;if(u="",c=PORT,t==HOSTNAME)return}break;case PORT:if(!exec$4(DIGIT,o)){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()||t){if(""!=u){var g=parseInt$1(u,10);if(g>65535)return INVALID_PORT;s.port=s.isSpecial()&&g===specialSchemes[s.scheme]?null:g,u=""}if(t)return;c=PATH_START;continue}return INVALID_PORT}u+=o;break;case FILE:if(s.scheme="file","/"==o||"\\"==o)c=FILE_SLASH;else{if(!r||"file"!=r.scheme){c=PATH;continue}if(o==EOF)s.host=r.host,s.path=arraySlice$7(r.path),s.query=r.query;else if("?"==o)s.host=r.host,s.path=arraySlice$7(r.path),s.query="",c=QUERY;else{if("#"!=o){startsWithWindowsDriveLetter(join$1(arraySlice$7(n,l),""))||(s.host=r.host,s.path=arraySlice$7(r.path),s.shortenPath()),c=PATH;continue}s.host=r.host,s.path=arraySlice$7(r.path),s.query=r.query,s.fragment="",c=FRAGMENT}}break;case FILE_SLASH:if("/"==o||"\\"==o){c=FILE_HOST;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter(join$1(arraySlice$7(n,l),""))&&(isWindowsDriveLetter(r.path[0],!0)?push$3(s.path,r.path[0]):s.host=r.host),c=PATH;continue;case FILE_HOST:if(o==EOF||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&isWindowsDriveLetter(u))c=PATH;else if(""==u){if(s.host="",t)return;c=PATH_START}else{if(i=s.parseHost(u))return i;if("localhost"==s.host&&(s.host=""),t)return;u="",c=PATH_START}continue}u+=o;break;case PATH_START:if(s.isSpecial()){if(c=PATH,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=EOF&&(c=PATH,"/"!=o))continue}else s.fragment="",c=FRAGMENT;else s.query="",c=QUERY;break;case PATH:if(o==EOF||"/"==o||"\\"==o&&s.isSpecial()||!t&&("?"==o||"#"==o)){if(isDoubleDot(u)?(s.shortenPath(),"/"==o||"\\"==o&&s.isSpecial()||push$3(s.path,"")):isSingleDot(u)?"/"==o||"\\"==o&&s.isSpecial()||push$3(s.path,""):("file"==s.scheme&&!s.path.length&&isWindowsDriveLetter(u)&&(s.host&&(s.host=""),u=charAt$5(u,0)+":"),push$3(s.path,u)),u="","file"==s.scheme&&(o==EOF||"?"==o||"#"==o))for(;s.path.length>1&&""===s.path[0];)shift(s.path);"?"==o?(s.query="",c=QUERY):"#"==o&&(s.fragment="",c=FRAGMENT)}else u+=percentEncode(o,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==o?(s.query="",c=QUERY):"#"==o?(s.fragment="",c=FRAGMENT):o!=EOF&&(s.path[0]+=percentEncode(o,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=o?o!=EOF&&("'"==o&&s.isSpecial()?s.query+="%27":s.query+="#"==o?"%23":percentEncode(o,C0ControlPercentEncodeSet)):(s.fragment="",c=FRAGMENT);break;case FRAGMENT:o!=EOF&&(s.fragment+=percentEncode(o,fragmentPercentEncodeSet))}l++}},parseHost:function(e){var t,r,n;if("["==charAt$5(e,0)){if("]"!=charAt$5(e,e.length-1))return INVALID_HOST;if(!(t=parseIPv6(stringSlice$6(e,1,-1))))return INVALID_HOST;this.host=t}else if(this.isSpecial()){if(e=toASCII(e),exec$4(FORBIDDEN_HOST_CODE_POINT,e))return INVALID_HOST;if(null===(t=parseIPv4(e)))return INVALID_HOST;this.host=t}else{if(exec$4(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT,e))return INVALID_HOST;for(t="",r=arrayFrom(e),n=0;n<r.length;n++)t+=percentEncode(r[n],C0ControlPercentEncodeSet);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hasOwn$7(specialSchemes,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&isWindowsDriveLetter(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,a=e.port,i=e.path,s=e.query,c=e.fragment,l=t+":";return null!==o?(l+="//",e.includesCredentials()&&(l+=r+(n?":"+n:"")+"@"),l+=serializeHost(o),null!==a&&(l+=":"+a)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?i[0]:i.length?"/"+join$1(i,"/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},setHref:function(e){var t=this.parse(e);if(t)throw TypeError$3(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new URLConstructor(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+serializeHost(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($toString$1(e)+":",SCHEME_START)},getUsername:function(){return this.username},setUsername:function(e){var t=arrayFrom($toString$1(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=percentEncode(t[r],userinfoPercentEncodeSet)}},getPassword:function(){return this.password},setPassword:function(e){var t=arrayFrom($toString$1(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=percentEncode(t[r],userinfoPercentEncodeSet)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?serializeHost(e):serializeHost(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HOST)},getHostname:function(){var e=this.host;return null===e?"":serializeHost(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,HOSTNAME)},getPort:function(){var e=this.port;return null===e?"":$toString$1(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$toString$1(e))?this.port=null:this.parse(e,PORT))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+join$1(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,PATH_START))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$toString$1(e))?this.query=null:("?"==charAt$5(e,0)&&(e=stringSlice$6(e,1)),this.query="",this.parse(e,QUERY)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$toString$1(e))?("#"==charAt$5(e,0)&&(e=stringSlice$6(e,1)),this.fragment="",this.parse(e,FRAGMENT)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var URLConstructor=function(e){var t=anInstance$4(this,URLPrototype),r=validateArgumentsLength(arguments.length,1)>1?arguments[1]:void 0,n=setInternalState$3(t,new URLState(e,!1,r));DESCRIPTORS$a||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},URLPrototype=URLConstructor.prototype,accessorDescriptor=function(e,t){return{get:function(){return getInternalURLState(this)[e]()},set:t&&function(e){return getInternalURLState(this)[t](e)},configurable:!0,enumerable:!0}};if(DESCRIPTORS$a&&(defineBuiltInAccessor$2(URLPrototype,"href",accessorDescriptor("serialize","setHref")),defineBuiltInAccessor$2(URLPrototype,"origin",accessorDescriptor("getOrigin")),defineBuiltInAccessor$2(URLPrototype,"protocol",accessorDescriptor("getProtocol","setProtocol")),defineBuiltInAccessor$2(URLPrototype,"username",accessorDescriptor("getUsername","setUsername")),defineBuiltInAccessor$2(URLPrototype,"password",accessorDescriptor("getPassword","setPassword")),defineBuiltInAccessor$2(URLPrototype,"host",accessorDescriptor("getHost","setHost")),defineBuiltInAccessor$2(URLPrototype,"hostname",accessorDescriptor("getHostname","setHostname")),defineBuiltInAccessor$2(URLPrototype,"port",accessorDescriptor("getPort","setPort")),defineBuiltInAccessor$2(URLPrototype,"pathname",accessorDescriptor("getPathname","setPathname")),defineBuiltInAccessor$2(URLPrototype,"search",accessorDescriptor("getSearch","setSearch")),defineBuiltInAccessor$2(URLPrototype,"searchParams",accessorDescriptor("getSearchParams")),defineBuiltInAccessor$2(URLPrototype,"hash",accessorDescriptor("getHash","setHash"))),defineBuiltIn$7(URLPrototype,"toJSON",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),defineBuiltIn$7(URLPrototype,"toString",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&defineBuiltIn$7(URLConstructor,"createObjectURL",bind$8(nativeCreateObjectURL,NativeURL)),nativeRevokeObjectURL&&defineBuiltIn$7(URLConstructor,"revokeObjectURL",bind$8(nativeRevokeObjectURL,NativeURL))}setToStringTag$2(URLConstructor,"URL"),$$K({global:!0,constructor:!0,forced:!USE_NATIVE_URL,sham:!DESCRIPTORS$a},{URL:URLConstructor});var $forEach$1=arrayIteration$1.forEach,arrayMethodIsStrict$2=arrayMethodIsStrict$a,STRICT_METHOD$1=arrayMethodIsStrict$2("forEach"),arrayForEach=STRICT_METHOD$1?[].forEach:function(e){return $forEach$1(this,e,arguments.length>1?arguments[1]:void 0)},global$j=global$13,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,forEach$1=arrayForEach,createNonEnumerableProperty$5=createNonEnumerableProperty$k,handlePrototype=function(e){if(e&&e.forEach!==forEach$1)try{createNonEnumerableProperty$5(e,"forEach",forEach$1)}catch(t){e.forEach=forEach$1}};for(var COLLECTION_NAME in DOMIterables)DOMIterables[COLLECTION_NAME]&&handlePrototype(global$j[COLLECTION_NAME]&&global$j[COLLECTION_NAME].prototype);handlePrototype(DOMTokenListPrototype);var $$J=_export$1,toObject$9=toObject$s,nativeKeys=objectKeys$6,fails$s=fails$1i,FAILS_ON_PRIMITIVES$2=fails$s((function(){nativeKeys(1)}));$$J({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$2},{keys:function(e){return nativeKeys(toObject$9(e))}});var DESCRIPTORS$9=descriptors$1,isArray$1=isArray$j,$TypeError$9=TypeError,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$9&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(e,t){if(isArray$1(e)&&!getOwnPropertyDescriptor$1(e,"length").writable)throw $TypeError$9("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},tryToString$2=tryToString$f,$TypeError$8=TypeError,deletePropertyOrThrow$2=function(e,t){if(!delete e[t])throw $TypeError$8("Cannot delete property "+tryToString$2(t)+" of "+tryToString$2(e))},$$I=_export$1,toObject$8=toObject$s,toAbsoluteIndex$3=toAbsoluteIndex$c,toIntegerOrInfinity$8=toIntegerOrInfinity$i,lengthOfArrayLike$a=lengthOfArrayLike$s,setArrayLength=arraySetLength,doesNotExceedSafeInteger=doesNotExceedSafeInteger$5,arraySpeciesCreate=arraySpeciesCreate$7,createProperty=createProperty$c,deletePropertyOrThrow$1=deletePropertyOrThrow$2,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$b,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("splice"),max$2=Math.max,min$4=Math.min;$$I({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{splice:function(e,t){var r,n,o,a,i,s,c=toObject$8(this),l=lengthOfArrayLike$a(c),u=toAbsoluteIndex$3(e,l),$=arguments.length;for(0===$?r=n=0:1===$?(r=0,n=l-u):(r=$-2,n=min$4(max$2(toIntegerOrInfinity$8(t),0),l-u)),doesNotExceedSafeInteger(l+r-n),o=arraySpeciesCreate(c,n),a=0;a<n;a++)(i=u+a)in c&&createProperty(o,a,c[i]);if(o.length=n,r<n){for(a=u;a<l-n;a++)s=a+r,(i=a+n)in c?c[s]=c[i]:deletePropertyOrThrow$1(c,s);for(a=l;a>l-n+r;a--)deletePropertyOrThrow$1(c,a-1)}else if(r>n)for(a=l-n;a>u;a--)s=a+r-1,(i=a+n-1)in c?c[s]=c[i]:deletePropertyOrThrow$1(c,s);for(a=0;a<r;a++)c[a+u]=arguments[a+2];return setArrayLength(c,l-n+r),o}});var anObject$7=anObject$B,regexpFlags$1=function(){var e=anObject$7(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},fails$r=fails$1i,global$i=global$13,$RegExp$2=global$i.RegExp,UNSUPPORTED_Y$3=fails$r((function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),MISSED_STICKY$2=UNSUPPORTED_Y$3||fails$r((function(){return!$RegExp$2("a","y").sticky})),BROKEN_CARET=UNSUPPORTED_Y$3||fails$r((function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY$2,UNSUPPORTED_Y:UNSUPPORTED_Y$3},fails$q=fails$1i,global$h=global$13,$RegExp$1=global$h.RegExp,regexpUnsupportedDotAll=fails$q((function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),fails$p=fails$1i,global$g=global$13,$RegExp=global$g.RegExp,regexpUnsupportedNcg=fails$p((function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),call$j=functionCall$1,uncurryThis$n=functionUncurryThis$1,toString$b=toString$v,regexpFlags=regexpFlags$1,stickyHelpers$2=regexpStickyHelpers,shared=sharedExports$1,create$2=objectCreate$1,getInternalState$4=internalState$1.get,UNSUPPORTED_DOT_ALL$1=regexpUnsupportedDotAll,UNSUPPORTED_NCG$1=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$4=uncurryThis$n("".charAt),indexOf2=uncurryThis$n("".indexOf),replace$4=uncurryThis$n("".replace),stringSlice$5=uncurryThis$n("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return call$j(nativeExec,e,"a"),call$j(nativeExec,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y$2=stickyHelpers$2.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$2||UNSUPPORTED_DOT_ALL$1||UNSUPPORTED_NCG$1;PATCH&&(patchedExec=function(e){var t,r,n,o,a,i,s,c=this,l=getInternalState$4(c),u=toString$b(e),$=l.raw;if($)return $.lastIndex=c.lastIndex,t=call$j(patchedExec,$,u),c.lastIndex=$.lastIndex,t;var p=l.groups,f=UNSUPPORTED_Y$2&&c.sticky,d=call$j(regexpFlags,c),y=c.source,h=0,g=u;if(f&&(d=replace$4(d,"y",""),-1===indexOf2(d,"g")&&(d+="g"),g=stringSlice$5(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==charAt$4(u,c.lastIndex-1))&&(y="(?: "+y+")",g=" "+g,h++),r=new RegExp("^(?:"+y+")",d)),NPCG_INCLUDED&&(r=new RegExp("^"+y+"$(?!\\s)",d)),UPDATES_LAST_INDEX_WRONG&&(n=c.lastIndex),o=call$j(nativeExec,f?r:c,g),f?o?(o.input=stringSlice$5(o.input,h),o[0]=stringSlice$5(o[0],h),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),NPCG_INCLUDED&&o&&o.length>1&&call$j(nativeReplace,o[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&p)for(o.groups=i=create$2(null),a=0;a<p.length;a++)i[(s=p[a])[0]]=o[s[1]];return o});var regexpExec$3=patchedExec,$$H=_export$1,exec$3=regexpExec$3;function createPublicPromise(){var e,t,r=new _Promise((function(r,n){e=r,t=n}));return r.used=!1,r.resolve=function(){return r.used=!0,e.apply(void 0,arguments)},r.reject=function(){return r.used=!0,t.apply(void 0,arguments)},r}function nowTime$1(){try{return _parseInt$1(performance.now(),10)}catch(e){return(new Date).getTime()}}$$H({target:"RegExp",proto:!0,forced:/./.exec!==regexpExec$3},{exec:regexpExec$3});var aCallable$4=aCallable$n,toObject$7=toObject$l,IndexedObject$2=indexedObject,lengthOfArrayLike$9=lengthOfArrayLike$l,$TypeError$7=TypeError,createMethod$4=function(e){return function(t,r,n,o){aCallable$4(r);var a=toObject$7(t),i=IndexedObject$2(a),s=lengthOfArrayLike$9(a),c=e?s-1:0,l=e?-1:1;if(n<2)for(;;){if(c in i){o=i[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw $TypeError$7("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=l)c in i&&(o=r(o,i[c],c,a));return o}},arrayReduce$1={left:createMethod$4(!1),right:createMethod$4(!0)},$$G=_export,$reduce$1=arrayReduce$1.left,arrayMethodIsStrict$1=arrayMethodIsStrict$8,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,CHROME_BUG=!IS_NODE&&engineV8Version>79&&engineV8Version<83,FORCED$4=CHROME_BUG||!arrayMethodIsStrict$1("reduce");$$G({target:"Array",proto:!0,forced:FORCED$4},{reduce:function(e){var t=arguments.length;return $reduce$1(this,e,t,t>1?arguments[1]:void 0)}});var _ERR_CODE,entryVirtual=entryVirtual$h,reduce$6=entryVirtual("Array").reduce,isPrototypeOf$5=objectIsPrototypeOf,method$1=reduce$6,ArrayPrototype=Array.prototype,reduce$5=function(e){var t=e.reduce;return e===ArrayPrototype||isPrototypeOf$5(ArrayPrototype,e)&&t===ArrayPrototype.reduce?method$1:t},parent$5=reduce$5,reduce$4=parent$5,parent$4=reduce$4,reduce$3=parent$4,parent$3=reduce$3,reduce$2=parent$3,reduce$1=reduce$2,reduce3=reduce$1,_reduceInstanceProperty=getDefaultExportFromCjs(reduce3),Buffer$1=function(){function e(){_classCallCheck$1(this,e)}return _createClass$1(e,null,[{key:"start",value:function(e){return e&&e.length?1===e.length&&e.end(0)-e.start(0)<1e-6||1===e.length&&e.start(0)<0?0:e.start(0):0}},{key:"end",value:function(e){return e&&e.length?1===e.length&&e.end(0)-e.start(0)<1e-6?0:e.end(e.length-1):0}},{key:"get",value:function(e){if(e)try{return e.buffered}catch(e){}}},{key:"buffers",value:function(e,t){if(!e||!e.length)return[];for(var r=[],n=0,o=e.length;n<o;n++){var a=r.length;if(a&&t){var i=r[a-1],s=i[1];if(e.start(n)-s<=t){var c=e.end(n);c>s&&(i[1]=c)}else r.push([e.start(n),e.end(n)])}else r.push([e.start(n),e.end(n)])}return r}},{key:"totalLength",value:function(e){return e&&e.length?_reduceInstanceProperty(e).call(e,(function(e,t){return e+(t[1]-t[0])}),0):0}},{key:"info",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t||!t.length)return{start:0,end:0,buffers:[]};for(var o=0,a=0,i=0,s=0,c=0,l=0,u=0,$=e.buffers(t,n),p=0,f=$.length;p<f;p++){var d=$[p];if(r+n>=d[0]&&r<d[1])o=d[0],a=d[1],i=p;else{if(r+n<d[0]){s=d[0],c=d[1];break}r+n>d[1]&&(l=d[0],u=d[1])}}return{start:o,end:a,index:i,buffers:$,nextStart:s,nextEnd:c,prevStart:l,prevEnd:u,currentTime:r,behind:r-o,remaining:a?a-r:0,length:e.totalLength&&e.totalLength($)}}}]),e}(),ERR={MANIFEST:"manifest",NETWORK:"network",NETWORK_TIMEOUT:"network_timeout",DEMUX:"demux",REMUX:"remux",MEDIA:"media",DRM:"drm",OTHER:"other",SUB_TYPES:{FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",OPTION:"OPTION"}},ERR_CODE=(_defineProperty$1(_ERR_CODE={},ERR.MANIFEST,{HLS:1100}),_defineProperty$1(_ERR_CODE,ERR.NETWORK,2100),_defineProperty$1(_ERR_CODE,ERR.NETWORK_TIMEOUT,2101),_defineProperty$1(_ERR_CODE,ERR.DEMUX,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400}),_defineProperty$1(_ERR_CODE,ERR.REMUX,{FMP4:4100,MP4:4200}),_defineProperty$1(_ERR_CODE,ERR.MEDIA,{MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203}),_defineProperty$1(_ERR_CODE,ERR.OTHER,8e3),_ERR_CODE),StreamingError=function(e){_inherits$1(r,_wrapNativeSuper(Error));var t=_createSuper$1(r);function r(e,n,o,a,i){var s;return _classCallCheck$1(this,r),(s=t.call(this,i||(null==o?void 0:o.message))).errorType=e===ERR.NETWORK_TIMEOUT?ERR.NETWORK:e,s.originError=o,s.ext=a,s.errorCode=ERR_CODE[e][n]||ERR_CODE[e],s.errorMessage=s.message,s.errorCode||(s.errorType=ERR.OTHER,s.errorCode=ERR_CODE[s.errorType]),s}return _createClass$1(r,null,[{key:"create",value:function(e,t,n,o,a){return e instanceof r?e:(e instanceof Error&&(n=e,e=""),e||(e=ERR.OTHER),new r(e,t,n,o,a))}},{key:"network",value:function(e){var t;return new r(null!=e&&e.isTimeout?ERR.NETWORK_TIMEOUT:ERR.NETWORK,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),r}(),isBrowser$1="undefined"!=typeof window,DESCRIPTORS$8=descriptors$1,FUNCTION_NAME_EXISTS=functionName$1.EXISTS,uncurryThis$m=functionUncurryThis$1,defineProperty$6=objectDefineProperty$1.f,FunctionPrototype=Function.prototype,functionToString=uncurryThis$m(FunctionPrototype.toString),nameRE=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,regExpExec$2=uncurryThis$m(nameRE.exec),NAME$1="name";DESCRIPTORS$8&&!FUNCTION_NAME_EXISTS&&defineProperty$6(FunctionPrototype,NAME$1,{configurable:!0,get:function(){try{return regExpExec$2(nameRE,functionToString(this))[1]}catch(e){return""}}});var $$F=_export$1,getBuiltIn$3=getBuiltIn$u,apply$5=functionApply$1,call$i=functionCall$1,uncurryThis$l=functionUncurryThis$1,fails$o=fails$1i,isArray3=isArray$j,isCallable$8=isCallable$V,isObject$a=isObject$I,isSymbol$2=isSymbol$b,arraySlice$6=arraySlice$j,NATIVE_SYMBOL=symbolConstructorDetection$1,$stringify=getBuiltIn$3("JSON","stringify"),exec$2=uncurryThis$l(/./.exec),charAt$3=uncurryThis$l("".charAt),charCodeAt$1=uncurryThis$l("".charCodeAt),replace$3=uncurryThis$l("".replace),numberToString=uncurryThis$l(1..toString),tester=/[\uD800-\uDFFF]/g,low=/^[\uD800-\uDBFF]$/,hi=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION=!NATIVE_SYMBOL||fails$o((function(){var e=getBuiltIn$3("Symbol")();return"[null]"!=$stringify([e])||"{}"!=$stringify({a:e})||"{}"!=$stringify(Object(e))})),ILL_FORMED_UNICODE=fails$o((function(){return'"\\udf06\\ud834"'!==$stringify("\udf06\ud834")||'"\\udead"'!==$stringify("\udead")})),stringifyWithSymbolsFix=function(e,t){var r=arraySlice$6(arguments),n=t;if((isObject$a(t)||void 0!==e)&&!isSymbol$2(e))return isArray3(t)||(t=function(e,t){if(isCallable$8(n)&&(t=call$i(n,this,e,t)),!isSymbol$2(t))return t}),r[1]=t,apply$5($stringify,null,r)},fixIllFormed=function(e,t,r){var n=charAt$3(r,t-1),o=charAt$3(r,t+1);return exec$2(low,e)&&!exec$2(hi,o)||exec$2(hi,e)&&!exec$2(low,n)?"\\u"+numberToString(charCodeAt$1(e,0),16):e};$stringify&&$$F({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION||ILL_FORMED_UNICODE},{stringify:function(e,t,r){var n=arraySlice$6(arguments),o=apply$5(WRONG_SYMBOLS_CONVERSION?stringifyWithSymbolsFix:$stringify,null,n);return ILL_FORMED_UNICODE&&"string"==typeof o?replace$3(o,tester,fixIllFormed):o}});var $$E=_export$1,$includes$1=arrayIncludes$1.includes,fails$n=fails$1i,addToUnscopables$2=addToUnscopables$4,BROKEN_ON_SPARSE=fails$n((function(){return!Array(1).includes()}));$$E({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes$1(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables$2("includes");var LogCacheLevel={DEBUG:1,LOG:2,WARN:3,ERROR:4},LOG_MAX_SIZE=204800,SIMPLE_TYPE=["Boolean","Number","String","Undefined","Null","Date","Object"],Logger$2=function(){function e(t,r){_classCallCheck$1(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=(null==r?void 0:r.disabled)||!0,this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||LOG_MAX_SIZE,this.logSize=0,this.logTextArray=[]}return _createClass$1(e,[{key:"debug",value:function(){for(var t,r,n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.DEBUG]).call(t,a)),e.disabled||(n=console).debug.apply(n,_concatInstanceProperty(r=[this._prefix,nowTime()]).call(r,a))}},{key:"log",value:function(){for(var t,r,n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.LOG]).call(t,a)),e.disabled||(n=console).log.apply(n,_concatInstanceProperty(r=[this._prefix,nowTime()]).call(r,a))}},{key:"warn",value:function(){for(var t,r,n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.WARN]).call(t,a)),e.disabled||(n=console).warn.apply(n,_concatInstanceProperty(r=[this._prefix,nowTime()]).call(r,a))}},{key:"error",value:function(){for(var t,r,n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];this.logCache.apply(this,_concatInstanceProperty(t=[LogCacheLevel.ERROR]).call(t,a)),e.disabled||(n=console).error.apply(n,_concatInstanceProperty(r=[this._prefix,nowTime()]).call(r,a))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var a=_mapInstanceProperty(n).call(n,(function(e){return logable(e)}));t=this._prefix+nowTime()+_JSON$stringify(a)}catch(e){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var i=this.logTextArray.shift();this.logSize-=i.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function nowTime(){return(new Date).toLocaleString()}function reduceDepth(e){var t;if("object"!==_typeof(e))return e;var r=_sliceInstanceProperty(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function logable(e,t,r){var n;r||(r=1),t||(t=2);var o={};if(!e||"object"!==_typeof(e))return e;var a=_sliceInstanceProperty(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!_includesInstanceProperty(SIMPLE_TYPE).call(SIMPLE_TYPE,a))return a;if(!(r>t)){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r===t?o[i]=reduceDepth(e[i]):"object"===_typeof(e[i])?o[i]=logable(e[i],t,r+1):o[i]=e[i]);return o}}function getMediaSource(){try{return isBrowser$1?window.MediaSource:null}catch(e){}}_defineProperty$1(Logger$2,"disabled",!0);var MediaSource=getMediaSource(),OP_NAME={APPEND:"appendBuffer",REMOVE:"removeBuffer"},MSE=function(){function e(t,r){var n=this;_classCallCheck$1(this,e),_defineProperty$1(this,"media",null),_defineProperty$1(this,"mediaSource",null),_defineProperty$1(this,"_openPromise",createPublicPromise()),_defineProperty$1(this,"_queue",_Object$create(null)),_defineProperty$1(this,"_sourceBuffer",_Object$create(null)),_defineProperty$1(this,"_mseFullFlag",{}),_defineProperty$1(this,"_st",0),_defineProperty$1(this,"_opst",0),_defineProperty$1(this,"_logger",null),_defineProperty$1(this,"_config",null),_defineProperty$1(this,"_url",null),_defineProperty$1(this,"_onSBUpdateEnd",(function(e){var t=n._queue[e];if(t){var r=t.shift();if(r){var o=nowTime$1()-n._opst;n._logger.debug("UpdateEnd",r.opName,o,r.context),r.promise.resolve({name:r.opName,context:r.context,costtime:o}),n._startQueue(e)}}})),_defineProperty$1(this,"_onSBUpdateError",(function(e,t){var r=n._queue[e];if(r){var o=r[0];o&&(n._logger.error("UpdateError",e,o.opName,o.context),o.promise.reject(new StreamingError(ERR.MEDIA,ERR.SUB_TYPES.MSE_APPEND_BUFFER,t)))}})),this._config=_Object$assign(e.getDefaultConfig(),r),t&&this.bindMedia(t),this._logger=new Logger$2("MSE"),this._config.openLog&&Logger$2.enable()}var t,r,n;return _createClass$1(e,[{key:"isOpened",get:function(){var e;return"open"===(null===(e=this.mediaSource)||void 0===e?void 0:e.readyState)}},{key:"url",get:function(){return this._url}},{key:"duration",get:function(){var e;return(null===(e=this.mediaSource)||void 0===e?void 0:e.duration)||-1}},{key:"isEnded",get:function(){return!!this.mediaSource&&"ended"===this.mediaSource.readyState}},{key:"isFull",value:function(t){return t?this._mseFullFlag[t]:this._mseFullFlag[e.VIDEO]}},{key:"updateDuration",value:function(e){var t=this;return this.mediaSource&&this.mediaSource.duration>e?_Promise.resolve():this._enqueueBlockingOp((function(){t.isEnded?t._logger.debug("[debug mse] setDuration ended"):t.mediaSource&&(t.mediaSource.duration=e,t._logger.debug("[debug mse] setDuration"))}),"updateDuration")}},{key:"open",value:function(){var e=this;if(this._openPromise.used&&!this.isOpened&&this.mediaSource){var t=this.mediaSource;t.addEventListener("sourceopen",(function r(){var n=nowTime$1()-e._st;e._logger.debug("MSE OPEN",n),t.removeEventListener("sourceopen",r),e._openPromise.resolve({costtime:n})})),this._openPromise=createPublicPromise()}return this._openPromise}},{key:"bindMedia",value:(n=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.mediaSource&&!this.media){e.next=3;break}return e.next=3,this.unbindMedia();case 3:if(t&&MediaSource){e.next=5;break}throw new Error("Param media or MediaSource does not exist");case 5:return this.media=t,r=this.mediaSource=new MediaSource,this._st=nowTime$1(),n=function e(){var n=nowTime$1()-o._st;o._logger.debug("MSE OPEN"),r.removeEventListener("sourceopen",e),_URL.revokeObjectURL(t.src),o._openPromise.resolve({costtime:n})},r.addEventListener("sourceopen",n),this._url=_URL.createObjectURL(r),t.src=this._url,e.abrupt("return",this._openPromise);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"unbindMedia",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n,o=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._openPromise.used||this._openPromise.resolve(),t=this.mediaSource){var a,i;if(_forEachInstanceProperty(a=_Object$keys(this._queue)).call(a,(function(e){var t=o._queue[e];t&&_forEachInstanceProperty(t).call(t,(function(e){return e.promise.resolve}))})),r=!!this.media&&this.media.readyState>=1,n="open"===t.readyState,r&&n)try{t.endOfStream()}catch(e){}_forEachInstanceProperty(i=_Object$keys(this._sourceBuffer)).call(i,(function(e){try{t.removeSourceBuffer(o._sourceBuffer[e])}catch(e){}}))}if(this.media){this.media.removeAttribute("src");try{this.media.load()}catch(e){}this.media=null}this.mediaSource=null,this._openPromise=createPublicPromise(),this._queue=_Object$create(null),this._sourceBuffer=_Object$create(null);case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"createSource",value:function(e,t){var r,n;if(!this._sourceBuffer[e]&&this.mediaSource){var o;try{o=this._sourceBuffer[e]=this.mediaSource.addSourceBuffer(t)}catch(e){throw new StreamingError(ERR.MEDIA,ERR.SUB_TYPES.MSE_ADD_SB,e)}o.mimeType=t,o.addEventListener("updateend",_bindInstanceProperty(r=this._onSBUpdateEnd).call(r,this,e)),o.addEventListener("error",_bindInstanceProperty(n=this._onSBUpdateError).call(n,this,e))}}},{key:"changeType",value:function(e,t){var r=this,n=this._sourceBuffer[e];return this.mediaSource&&n&&n.mimeType!==t&&"function"==typeof n.changeType?this._enqueueOp(e,(function(){n.changeType(t),n.mimeType=t,r._onSBUpdateEnd(e)})):_Promise.resolve()}},{key:"createOrChangeSource",value:function(e,t){return this.createSource(e,t),this.changeType(e,t)}},{key:"append",value:function(e,t,r){var n=this;return t&&t.byteLength&&this._sourceBuffer[e]?this._enqueueOp(e,(function(){var o;n.mediaSource&&(n._logger.debug("MSE APPEND START",r),n._opst=nowTime$1(),null===(o=n._sourceBuffer[e])||void 0===o||o.appendBuffer(t))}),OP_NAME.APPEND,r):_Promise.resolve()}},{key:"remove",value:function(e,t,r,n){var o=this,a=!1;return this._mseFullFlag[e]&&(a=!0),this._enqueueOp(e,(function(){if(o.mediaSource){var a=o._sourceBuffer[e];t>=r||!a?o._onSBUpdateEnd(e):(o._opst=nowTime$1(),o._logger.debug("MSE REMOVE START",e,t,r,n),a.remove(t,r))}}),OP_NAME.REMOVE,n,a)}},{key:"clearBuffer",value:function(e,t){var r,n,o=this;return _forEachInstanceProperty(r=_Object$keys(this._sourceBuffer)).call(r,(function(r){n=o._enqueueOp(r,(function(){if(o.mediaSource){var n=o._sourceBuffer[r];o._logger.debug("MSE clearBuffer START",r,e,t),n.remove(e,t)}}))})),n}},{key:"clearAllBuffer",value:function(){var e,t,r=this;return _forEachInstanceProperty(e=_Object$keys(this._sourceBuffer)).call(e,(function(e){t=r._enqueueOp(e,(function(){if(r.mediaSource){var t=r._sourceBuffer[e];r._logger.debug("MSE clearAllBuffer START",e),t.remove(0,Buffer$1.end(Buffer$1.get(t)))}}))})),t}},{key:"clearOpQueues",value:function(e){var t;this._logger.debug("MSE clearOpQueue START");var r=this._queue[e];if(r&&r[e]&&!(r.length<5)){var n=[];_forEachInstanceProperty(r).call(r,(function(e){e.context&&e.context.isinit&&n.push(e)})),this._queue[e]=_sliceInstanceProperty(r).call(r,0,2),n.length>0&&(t=this._queue[e]).push.apply(t,n)}}},{key:"endOfStream",value:function(e){var t=this;return this.mediaSource&&"open"===this.mediaSource.readyState?this._enqueueBlockingOp((function(){var r=t.mediaSource;r&&"open"===r.readyState&&(t._logger.debug("MSE endOfStream START"),e?r.endOfStream(e):r.endOfStream())}),"endOfStream"):_Promise.resolve()}},{key:"setLiveSeekableRange",value:function(e,t){var r=this.mediaSource;e<0||t<e||null==r||!r.setLiveSeekableRange||"open"!==r.readyState||r.setLiveSeekableRange(e,t)}},{key:"getSourceBuffer",value:function(e){return this._sourceBuffer[e]}},{key:"buffered",value:function(e){return Buffer$1.get(this._sourceBuffer[e])}},{key:"bufferStart",value:function(e){return Buffer$1.start(this.buffered(e))}},{key:"bufferEnd",value:function(e){return Buffer$1.end(this.buffered(e))}},{key:"_enqueueOp",value:function(e,t,r,n,o){var a=this;if(!this.mediaSource)return _Promise.resolve();var i=this._queue[e]=this._queue[e]||[],s={exec:t,promise:createPublicPromise(),opName:r,context:n};return o?(_spliceInstanceProperty(i).call(i,0,0,s),this._mseFullFlag[e]=!1,this._startQueue(e)):i.push(s),this.isOpened?1===i.length&&this._startQueue(e):this._openPromise.then((function(){1===i.length&&a._startQueue(e)})),s.promise}},{key:"_enqueueBlockingOp",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n,o,a=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaSource){e.next=2;break}return e.abrupt("return",_Promise.resolve());case 2:if((n=_Object$keys(this._sourceBuffer)).length){e.next=5;break}return e.abrupt("return",t());case 5:return o=[],_forEachInstanceProperty(n).call(n,(function(e){var t=a._queue[e],n=createPublicPromise();o.push(n),t.push({exec:function(){return n.resolve()},promise:n,opName:r}),1===t.length&&a._startQueue(e)})),e.abrupt("return",_Promise.all(o).then((function(){try{return t()}finally{_forEachInstanceProperty(n).call(n,(function(e){var t=a._queue[e],r=a._sourceBuffer[e];null==t||t.shift(),r&&r.updating||a._startQueue(e)}))}})));case 8:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"_startQueue",value:function(e){var t=this._queue[e];if(t){var r=t[0];if(r&&!this._mseFullFlag[e])try{r.exec()}catch(o){var n;o&&o.message&&_indexOfInstanceProperty(n=o.message).call(n,"SourceBuffer is full")>=0?(this._mseFullFlag[e]=!0,this._logger.error("[MSE error], context,",r.context," ,name,",r.opName,",err,SourceBuffer is full"),r.promise.reject(new StreamingError(ERR.MEDIA,ERR.SUB_TYPES.MSE_FULL,o))):(this._logger.error(o),r.promise.reject(new StreamingError(ERR.MEDIA,ERR.SUB_TYPES.MSE_OTHER,o)),t.shift(),this._startQueue(e))}}}},{key:"setTimeoffset",value:function(e,t,r){var n=this;return this._enqueueOp(e,(function(){t<0&&(t+=.001),n._sourceBuffer[e].timestampOffset=t,n._onSBUpdateEnd(e)}),"setTimeoffset",r)}},{key:"abort",value:function(e,t){var r=this;return this.isOpened?this._enqueueOp(e,(function(){r._sourceBuffer[e].abort(),r._onSBUpdateEnd(e)}),"abort",t):_Promise.resolve()}}],[{key:"getDefaultConfig",value:function(){return{openLog:!1}}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if(!MediaSource)return!1;try{return MediaSource.isTypeSupported(e)}catch(t){return this._logger.error(e,t),!1}}}]),e}();_defineProperty$1(MSE,"VIDEO","video"),_defineProperty$1(MSE,"AUDIO","audio");var $$D=_export$1,NativePromiseConstructor=promiseNativeConstructor$1,fails$m=fails$1i,getBuiltIn$2=getBuiltIn$u,isCallable$7=isCallable$V,speciesConstructor$2=speciesConstructor$7,promiseResolve=promiseResolve$5,defineBuiltIn$6=defineBuiltIn$p,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails$m((function(){NativePromisePrototype.finally.call({then:function(){}},(function(){}))}));if($$D({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(e){var t=speciesConstructor$2(this,getBuiltIn$2("Promise")),r=isCallable$7(e);return this.then(r?function(r){return promiseResolve(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve(t,e()).then((function(){throw r}))}:e)}}),isCallable$7(NativePromiseConstructor)){var method=getBuiltIn$2("Promise").prototype.finally;NativePromisePrototype.finally!==method&&defineBuiltIn$6(NativePromisePrototype,"finally",method,{unsafe:!0})}var $$C=_export$1,$filter$1=arrayIteration$1.filter,arrayMethodHasSpeciesSupport=arrayMethodHasSpeciesSupport$b,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("filter");$$C({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{filter:function(e){return $filter$1(this,e,arguments.length>1?arguments[1]:void 0)}});var NAME,Constructor,Prototype,typedArrayConstructor={exports:{}},arrayBufferBasicDetection="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,NATIVE_ARRAY_BUFFER$1=arrayBufferBasicDetection,DESCRIPTORS$7=descriptors$1,global$f=global$13,isCallable$6=isCallable$V,isObject$9=isObject$I,hasOwn$6=hasOwnProperty_1$1,classof$9=classof$v,tryToString$1=tryToString$f,createNonEnumerableProperty$4=createNonEnumerableProperty$k,defineBuiltIn$5=defineBuiltIn$p,defineProperty$5=objectDefineProperty$1.f,isPrototypeOf$4=objectIsPrototypeOf$1,getPrototypeOf$1=objectGetPrototypeOf$1,setPrototypeOf$3=objectSetPrototypeOf$1,wellKnownSymbol$7=wellKnownSymbol$T,uid$1=uid$9,InternalStateModule$3=internalState$1,enforceInternalState$2=InternalStateModule$3.enforce,getInternalState$3=InternalStateModule$3.get,Int8Array$4=global$f.Int8Array,Int8ArrayPrototype$1=Int8Array$4&&Int8Array$4.prototype,Uint8ClampedArray$1=global$f.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray$1&&Uint8ClampedArray$1.prototype,TypedArray$1=Int8Array$4&&getPrototypeOf$1(Int8Array$4),TypedArrayPrototype$2=Int8ArrayPrototype$1&&getPrototypeOf$1(Int8ArrayPrototype$1),ObjectPrototype$1=Object.prototype,TypeError$2=global$f.TypeError,TO_STRING_TAG=wellKnownSymbol$7("toStringTag"),TYPED_ARRAY_TAG$1=uid$1("TYPED_ARRAY_TAG"),TYPED_ARRAY_CONSTRUCTOR="TypedArrayConstructor",NATIVE_ARRAY_BUFFER_VIEWS$2=NATIVE_ARRAY_BUFFER$1&&!!setPrototypeOf$3&&"Opera"!==classof$9(global$f.opera),TYPED_ARRAY_TAG_REQUIRED=!1,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BigIntArrayConstructorsList={BigInt64Array:8,BigUint64Array:8},isView=function(e){if(!isObject$9(e))return!1;var t=classof$9(e);return"DataView"===t||hasOwn$6(TypedArrayConstructorsList,t)||hasOwn$6(BigIntArrayConstructorsList,t)},getTypedArrayConstructor$1=function(e){var t=getPrototypeOf$1(e);if(isObject$9(t)){var r=getInternalState$3(t);return r&&hasOwn$6(r,TYPED_ARRAY_CONSTRUCTOR)?r[TYPED_ARRAY_CONSTRUCTOR]:getTypedArrayConstructor$1(t)}},isTypedArray$1=function(e){if(!isObject$9(e))return!1;var t=classof$9(e);return hasOwn$6(TypedArrayConstructorsList,t)||hasOwn$6(BigIntArrayConstructorsList,t)},aTypedArray$p=function(e){if(isTypedArray$1(e))return e;throw TypeError$2("Target is not a typed array")},aTypedArrayConstructor$3=function(e){if(isCallable$6(e)&&(!setPrototypeOf$3||isPrototypeOf$4(TypedArray$1,e)))return e;throw TypeError$2(tryToString$1(e)+" is not a typed array constructor")},exportTypedArrayMethod$q=function(e,t,r,n){if(DESCRIPTORS$7){if(r)for(var o in TypedArrayConstructorsList){var a=global$f[o];if(a&&hasOwn$6(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}TypedArrayPrototype$2[e]&&!r||defineBuiltIn$5(TypedArrayPrototype$2,e,r?t:NATIVE_ARRAY_BUFFER_VIEWS$2&&Int8ArrayPrototype$1[e]||t,n)}},exportTypedArrayStaticMethod=function(e,t,r){var n,o;if(DESCRIPTORS$7){if(setPrototypeOf$3){if(r)for(n in TypedArrayConstructorsList)if((o=global$f[n])&&hasOwn$6(o,e))try{delete o[e]}catch(e){}if(TypedArray$1[e]&&!r)return;try{return defineBuiltIn$5(TypedArray$1,e,r?t:NATIVE_ARRAY_BUFFER_VIEWS$2&&TypedArray$1[e]||t)}catch(e){}}for(n in TypedArrayConstructorsList)!(o=global$f[n])||o[e]&&!r||defineBuiltIn$5(o,e,t)}};for(NAME in TypedArrayConstructorsList)(Prototype=(Constructor=global$f[NAME])&&Constructor.prototype)?enforceInternalState$2(Prototype)[TYPED_ARRAY_CONSTRUCTOR]=Constructor:NATIVE_ARRAY_BUFFER_VIEWS$2=!1;for(NAME in BigIntArrayConstructorsList)(Prototype=(Constructor=global$f[NAME])&&Constructor.prototype)&&(enforceInternalState$2(Prototype)[TYPED_ARRAY_CONSTRUCTOR]=Constructor);if((!NATIVE_ARRAY_BUFFER_VIEWS$2||!isCallable$6(TypedArray$1)||TypedArray$1===Function.prototype)&&(TypedArray$1=function(){throw TypeError$2("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$2))for(NAME in TypedArrayConstructorsList)global$f[NAME]&&setPrototypeOf$3(global$f[NAME],TypedArray$1);if((!NATIVE_ARRAY_BUFFER_VIEWS$2||!TypedArrayPrototype$2||TypedArrayPrototype$2===ObjectPrototype$1)&&(TypedArrayPrototype$2=TypedArray$1.prototype,NATIVE_ARRAY_BUFFER_VIEWS$2))for(NAME in TypedArrayConstructorsList)global$f[NAME]&&setPrototypeOf$3(global$f[NAME].prototype,TypedArrayPrototype$2);if(NATIVE_ARRAY_BUFFER_VIEWS$2&&getPrototypeOf$1(Uint8ClampedArrayPrototype)!==TypedArrayPrototype$2&&setPrototypeOf$3(Uint8ClampedArrayPrototype,TypedArrayPrototype$2),DESCRIPTORS$7&&!hasOwn$6(TypedArrayPrototype$2,TO_STRING_TAG))for(NAME in TYPED_ARRAY_TAG_REQUIRED=!0,defineProperty$5(TypedArrayPrototype$2,TO_STRING_TAG,{get:function(){return isObject$9(this)?this[TYPED_ARRAY_TAG$1]:void 0}}),TypedArrayConstructorsList)global$f[NAME]&&createNonEnumerableProperty$4(global$f[NAME],TYPED_ARRAY_TAG$1,NAME);var arrayBufferViewCore={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$2,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQUIRED&&TYPED_ARRAY_TAG$1,aTypedArray:aTypedArray$p,aTypedArrayConstructor:aTypedArrayConstructor$3,exportTypedArrayMethod:exportTypedArrayMethod$q,exportTypedArrayStaticMethod:exportTypedArrayStaticMethod,getTypedArrayConstructor:getTypedArrayConstructor$1,isView:isView,isTypedArray:isTypedArray$1,TypedArray:TypedArray$1,TypedArrayPrototype:TypedArrayPrototype$2},global$e=global$13,fails$l=fails$1i,checkCorrectnessOfIteration$1=checkCorrectnessOfIteration$7,NATIVE_ARRAY_BUFFER_VIEWS$1=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$3=global$e.ArrayBuffer,Int8Array$3=global$e.Int8Array,typedArrayConstructorsRequireWrappers=!NATIVE_ARRAY_BUFFER_VIEWS$1||!fails$l((function(){Int8Array$3(1)}))||!fails$l((function(){new Int8Array$3(-1)}))||!checkCorrectnessOfIteration$1((function(e){new Int8Array$3,new Int8Array$3(null),new Int8Array$3(1.5),new Int8Array$3(e)}),!0)||fails$l((function(){return 1!==new Int8Array$3(new ArrayBuffer$3(2),1,void 0).length})),toIntegerOrInfinity$7=toIntegerOrInfinity$i,toLength$7=toLength$c,$RangeError$3=RangeError,toIndex$2=function(e){if(void 0===e)return 0;var t=toIntegerOrInfinity$7(e),r=toLength$7(t);if(t!==r)throw $RangeError$3("Wrong length or index");return r},$Array=Array,abs=Math.abs,pow=Math.pow,floor$3=Math.floor,log=Math.log,LN2=Math.LN2,pack=function(e,t,r){var n,o,a,i=$Array(r),s=8*r-t-1,c=(1<<s)-1,l=c>>1,u=23===t?pow(2,-24)-pow(2,-77):0,$=e<0||0===e&&1/e<0?1:0,p=0;for((e=abs(e))!=e||e===1/0?(o=e!=e?1:0,n=c):(n=floor$3(log(e)/LN2),e*(a=pow(2,-n))<1&&(n--,a*=2),(e+=n+l>=1?u/a:u*pow(2,1-l))*a>=2&&(n++,a/=2),n+l>=c?(o=0,n=c):n+l>=1?(o=(e*a-1)*pow(2,t),n+=l):(o=e*pow(2,l-1)*pow(2,t),n=0));t>=8;)i[p++]=255&o,o/=256,t-=8;for(n=n<<t|o,s+=t;s>0;)i[p++]=255&n,n/=256,s-=8;return i[--p]|=128*$,i},unpack=function(e,t){var r,n=e.length,o=8*n-t-1,a=(1<<o)-1,i=a>>1,s=o-7,c=n-1,l=e[c--],u=127&l;for(l>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-i;else{if(u===a)return r?NaN:l?-1/0:1/0;r+=pow(2,t),u-=i}return(l?-1:1)*r*pow(2,u-t)},ieee754={pack:pack,unpack:unpack},toObject$6=toObject$s,toAbsoluteIndex$2=toAbsoluteIndex$c,lengthOfArrayLike$8=lengthOfArrayLike$s,arrayFill$1=function(e){for(var t=toObject$6(this),r=lengthOfArrayLike$8(t),n=arguments.length,o=toAbsoluteIndex$2(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,i=void 0===a?r:toAbsoluteIndex$2(a,r);i>o;)t[o++]=e;return t},global$d=global$13,uncurryThis$k=functionUncurryThis$1,DESCRIPTORS$6=descriptors$1,NATIVE_ARRAY_BUFFER=arrayBufferBasicDetection,FunctionName=functionName$1,createNonEnumerableProperty$3=createNonEnumerableProperty$k,defineBuiltIns$1=defineBuiltIns$3,fails$k=fails$1i,anInstance$3=anInstance$d,toIntegerOrInfinity$6=toIntegerOrInfinity$i,toLength$6=toLength$c,toIndex$1=toIndex$2,IEEE754=ieee754,getPrototypeOf2=objectGetPrototypeOf$1,setPrototypeOf$2=objectSetPrototypeOf$1,getOwnPropertyNames$3=objectGetOwnPropertyNames$1.f,defineProperty$4=objectDefineProperty$1.f,arrayFill=arrayFill$1,arraySlice$5=arraySliceSimple,setToStringTag$1=setToStringTag$h,InternalStateModule$2=internalState$1,PROPER_FUNCTION_NAME$2=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,getInternalState$2=InternalStateModule$2.get,setInternalState$2=InternalStateModule$2.set,ARRAY_BUFFER$1="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH$1="Wrong length",WRONG_INDEX="Wrong index",NativeArrayBuffer$1=global$d[ARRAY_BUFFER$1],$ArrayBuffer=NativeArrayBuffer$1,ArrayBufferPrototype$1=$ArrayBuffer&&$ArrayBuffer[PROTOTYPE],$DataView=global$d[DATA_VIEW],DataViewPrototype=$DataView&&$DataView[PROTOTYPE],ObjectPrototype=Object.prototype,Array$1=global$d.Array,RangeError$3=global$d.RangeError,fill2=uncurryThis$k(arrayFill),reverse2=uncurryThis$k([].reverse),packIEEE754=IEEE754.pack,unpackIEEE754=IEEE754.unpack,packInt8=function(e){return[255&e]},packInt16=function(e){return[255&e,e>>8&255]},packInt32=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},unpackInt32=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32=function(e){return packIEEE754(e,23,4)},packFloat64=function(e){return packIEEE754(e,52,8)},addGetter$1=function(e,t){defineProperty$4(e[PROTOTYPE],t,{get:function(){return getInternalState$2(this)[t]}})},get3=function(e,t,r,n){var o=toIndex$1(r),a=getInternalState$2(e);if(o+t>a.byteLength)throw RangeError$3(WRONG_INDEX);var i=getInternalState$2(a.buffer).bytes,s=o+a.byteOffset,c=arraySlice$5(i,s,s+t);return n?c:reverse2(c)},set$6=function(e,t,r,n,o,a){var i=toIndex$1(r),s=getInternalState$2(e);if(i+t>s.byteLength)throw RangeError$3(WRONG_INDEX);for(var c=getInternalState$2(s.buffer).bytes,l=i+s.byteOffset,u=n(+o),$=0;$<t;$++)c[l+$]=u[a?$:t-$-1]};if(NATIVE_ARRAY_BUFFER){var INCORRECT_ARRAY_BUFFER_NAME=PROPER_FUNCTION_NAME$2&&NativeArrayBuffer$1.name!==ARRAY_BUFFER$1;if(fails$k((function(){NativeArrayBuffer$1(1)}))&&fails$k((function(){new NativeArrayBuffer$1(-1)}))&&!fails$k((function(){return new NativeArrayBuffer$1,new NativeArrayBuffer$1(1.5),new NativeArrayBuffer$1(NaN),1!=NativeArrayBuffer$1.length||INCORRECT_ARRAY_BUFFER_NAME&&!CONFIGURABLE_FUNCTION_NAME})))INCORRECT_ARRAY_BUFFER_NAME&&CONFIGURABLE_FUNCTION_NAME&&createNonEnumerableProperty$3(NativeArrayBuffer$1,"name",ARRAY_BUFFER$1);else{($ArrayBuffer=function(e){return anInstance$3(this,ArrayBufferPrototype$1),new NativeArrayBuffer$1(toIndex$1(e))})[PROTOTYPE]=ArrayBufferPrototype$1;for(var key$1,keys$2=getOwnPropertyNames$3(NativeArrayBuffer$1),j$1=0;keys$2.length>j$1;)(key$1=keys$2[j$1++])in $ArrayBuffer||createNonEnumerableProperty$3($ArrayBuffer,key$1,NativeArrayBuffer$1[key$1]);ArrayBufferPrototype$1.constructor=$ArrayBuffer}setPrototypeOf$2&&getPrototypeOf2(DataViewPrototype)!==ObjectPrototype&&setPrototypeOf$2(DataViewPrototype,ObjectPrototype);var testView=new $DataView(new $ArrayBuffer(2)),$setInt8=uncurryThis$k(DataViewPrototype.setInt8);testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),!testView.getInt8(0)&&testView.getInt8(1)||defineBuiltIns$1(DataViewPrototype,{setInt8:function(e,t){$setInt8(this,e,t<<24>>24)},setUint8:function(e,t){$setInt8(this,e,t<<24>>24)}},{unsafe:!0})}else ArrayBufferPrototype$1=($ArrayBuffer=function(e){anInstance$3(this,ArrayBufferPrototype$1);var t=toIndex$1(e);setInternalState$2(this,{bytes:fill2(Array$1(t),0),byteLength:t}),DESCRIPTORS$6||(this.byteLength=t)})[PROTOTYPE],DataViewPrototype=($DataView=function(e,t,r){anInstance$3(this,DataViewPrototype),anInstance$3(e,ArrayBufferPrototype$1);var n=getInternalState$2(e).byteLength,o=toIntegerOrInfinity$6(t);if(o<0||o>n)throw RangeError$3("Wrong offset");if(o+(r=void 0===r?n-o:toLength$6(r))>n)throw RangeError$3(WRONG_LENGTH$1);setInternalState$2(this,{buffer:e,byteLength:r,byteOffset:o}),DESCRIPTORS$6||(this.buffer=e,this.byteLength=r,this.byteOffset=o)})[PROTOTYPE],DESCRIPTORS$6&&(addGetter$1($ArrayBuffer,"byteLength"),addGetter$1($DataView,"buffer"),addGetter$1($DataView,"byteLength"),addGetter$1($DataView,"byteOffset")),defineBuiltIns$1(DataViewPrototype,{getInt8:function(e){return get3(this,1,e)[0]<<24>>24},getUint8:function(e){return get3(this,1,e)[0]},getInt16:function(e){var t=get3(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=get3(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return unpackInt32(get3(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return unpackInt32(get3(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return unpackIEEE754(get3(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return unpackIEEE754(get3(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){set$6(this,1,e,packInt8,t)},setUint8:function(e,t){set$6(this,1,e,packInt8,t)},setInt16:function(e,t){set$6(this,2,e,packInt16,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){set$6(this,2,e,packInt16,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){set$6(this,4,e,packInt32,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){set$6(this,4,e,packInt32,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){set$6(this,4,e,packFloat32,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){set$6(this,8,e,packFloat64,t,arguments.length>2?arguments[2]:void 0)}});setToStringTag$1($ArrayBuffer,ARRAY_BUFFER$1),setToStringTag$1($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},isObject$8=isObject$I,floor$2=Math.floor,isIntegralNumber$1=Number.isInteger||function(e){return!isObject$8(e)&&isFinite(e)&&floor$2(e)===e},toIntegerOrInfinity$5=toIntegerOrInfinity$i,$RangeError$2=RangeError,toPositiveInteger$1=function(e){var t=toIntegerOrInfinity$5(e);if(t<0)throw $RangeError$2("The argument can't be less than 0");return t},toPositiveInteger=toPositiveInteger$1,$RangeError$1=RangeError,toOffset$2=function(e,t){var r=toPositiveInteger(e);if(r%t)throw $RangeError$1("Wrong offset");return r},classof$8=classof$v,uncurryThis$j=functionUncurryThis$1,slice$1=uncurryThis$j("".slice),isBigIntArray$1=function(e){return"Big"===slice$1(classof$8(e),0,3)},toPrimitive$1=toPrimitive$b,$TypeError$6=TypeError,toBigInt$2=function(e){var t=toPrimitive$1(e,"number");if("number"==typeof t)throw $TypeError$6("Can't convert number to bigint");return BigInt(t)},bind$7=functionBindContext$1,call$h=functionCall$1,aConstructor=aConstructor$6,toObject$5=toObject$s,lengthOfArrayLike$7=lengthOfArrayLike$s,getIterator=getIterator$8,getIteratorMethod=getIteratorMethod$g,isArrayIteratorMethod=isArrayIteratorMethod$6,isBigIntArray=isBigIntArray$1,aTypedArrayConstructor$2=arrayBufferViewCore.aTypedArrayConstructor,toBigInt$1=toBigInt$2,typedArrayFrom$1=function(e){var t,r,n,o,a,i,s,c,l=aConstructor(this),u=toObject$5(e),$=arguments.length,p=$>1?arguments[1]:void 0,f=void 0!==p,d=getIteratorMethod(u);if(d&&!isArrayIteratorMethod(d))for(c=(s=getIterator(u,d)).next,u=[];!(i=call$h(c,s)).done;)u.push(i.value);for(f&&$>2&&(p=bind$7(p,arguments[2])),r=lengthOfArrayLike$7(u),n=new(aTypedArrayConstructor$2(l))(r),o=isBigIntArray(n),t=0;r>t;t++)a=f?p(u[t],t):u[t],n[t]=o?toBigInt$1(a):+a;return n},isCallable$5=isCallable$V,isObject$7=isObject$I,setPrototypeOf$1=objectSetPrototypeOf$1,inheritIfRequired$4=function(e,t,r){var n,o;return setPrototypeOf$1&&isCallable$5(n=t.constructor)&&n!==r&&isObject$7(o=n.prototype)&&o!==r.prototype&&setPrototypeOf$1(e,o),e},$$B=_export$1,global$c=global$13,call$g=functionCall$1,DESCRIPTORS$5=descriptors$1,TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS=typedArrayConstructorsRequireWrappers,ArrayBufferViewCore$q=arrayBufferViewCore,ArrayBufferModule=arrayBuffer,anInstance$2=anInstance$d,createPropertyDescriptor=createPropertyDescriptor$f,createNonEnumerableProperty$2=createNonEnumerableProperty$k,isIntegralNumber=isIntegralNumber$1,toLength$5=toLength$c,toIndex=toIndex$2,toOffset$1=toOffset$2,toPropertyKey=toPropertyKey$9,hasOwn$5=hasOwnProperty_1$1,classof$7=classof$v,isObject$6=isObject$I,isSymbol$1=isSymbol$b,create$1=objectCreate$1,isPrototypeOf$3=objectIsPrototypeOf$1,setPrototypeOf=objectSetPrototypeOf$1,getOwnPropertyNames$2=objectGetOwnPropertyNames$1.f,typedArrayFrom=typedArrayFrom$1,forEach5=arrayIteration$1.forEach,setSpecies$3=setSpecies$8,definePropertyModule=objectDefineProperty$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor$1,InternalStateModule$1=internalState$1,inheritIfRequired$3=inheritIfRequired$4,getInternalState$1=InternalStateModule$1.get,setInternalState$1=InternalStateModule$1.set,enforceInternalState$1=InternalStateModule$1.enforce,nativeDefineProperty=definePropertyModule.f,nativeGetOwnPropertyDescriptor=getOwnPropertyDescriptorModule.f,round=Math.round,RangeError$2=global$c.RangeError,ArrayBuffer$2=ArrayBufferModule.ArrayBuffer,ArrayBufferPrototype=ArrayBuffer$2.prototype,DataView$1=ArrayBufferModule.DataView,NATIVE_ARRAY_BUFFER_VIEWS=ArrayBufferViewCore$q.NATIVE_ARRAY_BUFFER_VIEWS,TYPED_ARRAY_TAG=ArrayBufferViewCore$q.TYPED_ARRAY_TAG,TypedArray=ArrayBufferViewCore$q.TypedArray,TypedArrayPrototype$1=ArrayBufferViewCore$q.TypedArrayPrototype,aTypedArrayConstructor$1=ArrayBufferViewCore$q.aTypedArrayConstructor,isTypedArray=ArrayBufferViewCore$q.isTypedArray,BYTES_PER_ELEMENT="BYTES_PER_ELEMENT",WRONG_LENGTH="Wrong length",fromList=function(e,t){aTypedArrayConstructor$1(e);for(var r=0,n=t.length,o=new e(n);n>r;)o[r]=t[r++];return o},addGetter=function(e,t){nativeDefineProperty(e,t,{get:function(){return getInternalState$1(this)[t]}})},isArrayBuffer=function(e){var t;return isPrototypeOf$3(ArrayBufferPrototype,e)||"ArrayBuffer"==(t=classof$7(e))||"SharedArrayBuffer"==t},isTypedArrayIndex=function(e,t){return isTypedArray(e)&&!isSymbol$1(t)&&t in e&&isIntegralNumber(+t)&&t>=0},wrappedGetOwnPropertyDescriptor=function(e,t){return t=toPropertyKey(t),isTypedArrayIndex(e,t)?createPropertyDescriptor(2,e[t]):nativeGetOwnPropertyDescriptor(e,t)},wrappedDefineProperty=function(e,t,r){return t=toPropertyKey(t),!(isTypedArrayIndex(e,t)&&isObject$6(r)&&hasOwn$5(r,"value"))||hasOwn$5(r,"get")||hasOwn$5(r,"set")||r.configurable||hasOwn$5(r,"writable")&&!r.writable||hasOwn$5(r,"enumerable")&&!r.enumerable?nativeDefineProperty(e,t,r):(e[t]=r.value,e)};DESCRIPTORS$5?(NATIVE_ARRAY_BUFFER_VIEWS||(getOwnPropertyDescriptorModule.f=wrappedGetOwnPropertyDescriptor,definePropertyModule.f=wrappedDefineProperty,addGetter(TypedArrayPrototype$1,"buffer"),addGetter(TypedArrayPrototype$1,"byteOffset"),addGetter(TypedArrayPrototype$1,"byteLength"),addGetter(TypedArrayPrototype$1,"length")),$$B({target:"Object",stat:!0,forced:!NATIVE_ARRAY_BUFFER_VIEWS},{getOwnPropertyDescriptor:wrappedGetOwnPropertyDescriptor,defineProperty:wrappedDefineProperty}),typedArrayConstructor.exports=function(e,t,r){var n=e.match(/\d+$/)[0]/8,o=e+(r?"Clamped":"")+"Array",a="get"+e,i="set"+e,s=global$c[o],c=s,l=c&&c.prototype,u={},$=function(e,t){nativeDefineProperty(e,t,{get:function(){return function(e,t){var r=getInternalState$1(e);return r.view[a](t*n+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var a=getInternalState$1(e);r&&(o=(o=round(o))<0?0:o>255?255:255&o),a.view[i](t*n+a.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};NATIVE_ARRAY_BUFFER_VIEWS?TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS&&(c=t((function(e,t,r,o){return anInstance$2(e,l),inheritIfRequired$3(isObject$6(t)?isArrayBuffer(t)?void 0!==o?new s(t,toOffset$1(r,n),o):void 0!==r?new s(t,toOffset$1(r,n)):new s(t):isTypedArray(t)?fromList(c,t):call$g(typedArrayFrom,c,t):new s(toIndex(t)),e,c)})),setPrototypeOf&&setPrototypeOf(c,TypedArray),forEach5(getOwnPropertyNames$2(s),(function(e){e in c||createNonEnumerableProperty$2(c,e,s[e])})),c.prototype=l):(c=t((function(e,t,r,o){anInstance$2(e,l);var a,i,s,u=0,p=0;if(isObject$6(t)){if(!isArrayBuffer(t))return isTypedArray(t)?fromList(c,t):call$g(typedArrayFrom,c,t);a=t,p=toOffset$1(r,n);var f=t.byteLength;if(void 0===o){if(f%n)throw RangeError$2(WRONG_LENGTH);if((i=f-p)<0)throw RangeError$2(WRONG_LENGTH)}else if((i=toLength$5(o)*n)+p>f)throw RangeError$2(WRONG_LENGTH);s=i/n}else s=toIndex(t),a=new ArrayBuffer$2(i=s*n);for(setInternalState$1(e,{buffer:a,byteOffset:p,byteLength:i,length:s,view:new DataView$1(a)});u<s;)$(e,u++)})),setPrototypeOf&&setPrototypeOf(c,TypedArray),l=c.prototype=create$1(TypedArrayPrototype$1)),l.constructor!==c&&createNonEnumerableProperty$2(l,"constructor",c),enforceInternalState$1(l).TypedArrayConstructor=c,TYPED_ARRAY_TAG&&createNonEnumerableProperty$2(l,TYPED_ARRAY_TAG,o);var p=c!=s;u[o]=c,$$B({global:!0,constructor:!0,forced:p,sham:!NATIVE_ARRAY_BUFFER_VIEWS},u),BYTES_PER_ELEMENT in c||createNonEnumerableProperty$2(c,BYTES_PER_ELEMENT,n),BYTES_PER_ELEMENT in l||createNonEnumerableProperty$2(l,BYTES_PER_ELEMENT,n),setSpecies$3(o)}):typedArrayConstructor.exports=function(){};var typedArrayConstructorExports=typedArrayConstructor.exports,createTypedArrayConstructor=typedArrayConstructorExports;createTypedArrayConstructor("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var ArrayBufferViewCore$p=arrayBufferViewCore,lengthOfArrayLike$6=lengthOfArrayLike$s,toIntegerOrInfinity$4=toIntegerOrInfinity$i,aTypedArray$o=ArrayBufferViewCore$p.aTypedArray,exportTypedArrayMethod$p=ArrayBufferViewCore$p.exportTypedArrayMethod;exportTypedArrayMethod$p("at",(function(e){var t=aTypedArray$o(this),r=lengthOfArrayLike$6(t),n=toIntegerOrInfinity$4(e),o=n>=0?n:r+n;return o<0||o>=r?void 0:t[o]}));var toObject$4=toObject$s,toAbsoluteIndex$1=toAbsoluteIndex$c,lengthOfArrayLike$5=lengthOfArrayLike$s,deletePropertyOrThrow=deletePropertyOrThrow$2,min$3=Math.min,arrayCopyWithin=[].copyWithin||function(e,t){var r=toObject$4(this),n=lengthOfArrayLike$5(r),o=toAbsoluteIndex$1(e,n),a=toAbsoluteIndex$1(t,n),i=arguments.length>2?arguments[2]:void 0,s=min$3((void 0===i?n:toAbsoluteIndex$1(i,n))-a,n-o),c=1;for(a<o&&o<a+s&&(c=-1,a+=s-1,o+=s-1);s-- >0;)a in r?r[o]=r[a]:deletePropertyOrThrow(r,o),o+=c,a+=c;return r},uncurryThis$i=functionUncurryThis$1,ArrayBufferViewCore$o=arrayBufferViewCore,$ArrayCopyWithin=arrayCopyWithin,u$ArrayCopyWithin=uncurryThis$i($ArrayCopyWithin),aTypedArray$n=ArrayBufferViewCore$o.aTypedArray,exportTypedArrayMethod$o=ArrayBufferViewCore$o.exportTypedArrayMethod;exportTypedArrayMethod$o("copyWithin",(function(e,t){return u$ArrayCopyWithin(aTypedArray$n(this),e,t,arguments.length>2?arguments[2]:void 0)}));var ArrayBufferViewCore$n=arrayBufferViewCore,$every=arrayIteration$1.every,aTypedArray$m=ArrayBufferViewCore$n.aTypedArray,exportTypedArrayMethod$n=ArrayBufferViewCore$n.exportTypedArrayMethod;exportTypedArrayMethod$n("every",(function(e){return $every(aTypedArray$m(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$m=arrayBufferViewCore,$fill=arrayFill$1,toBigInt=toBigInt$2,classof$6=classof$v,call$f=functionCall$1,uncurryThis$h=functionUncurryThis$1,fails$j=fails$1i,aTypedArray$l=ArrayBufferViewCore$m.aTypedArray,exportTypedArrayMethod$m=ArrayBufferViewCore$m.exportTypedArrayMethod,slice3=uncurryThis$h("".slice),CONVERSION_BUG=fails$j((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e}));exportTypedArrayMethod$m("fill",(function(e){var t=arguments.length;aTypedArray$l(this);var r="Big"===slice3(classof$6(this),0,3)?toBigInt(e):+e;return call$f($fill,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),CONVERSION_BUG);var lengthOfArrayLike$4=lengthOfArrayLike$s,arrayFromConstructorAndList$1=function(e,t){for(var r=0,n=lengthOfArrayLike$4(t),o=new e(n);n>r;)o[r]=t[r++];return o},ArrayBufferViewCore$l=arrayBufferViewCore,speciesConstructor$1=speciesConstructor$7,aTypedArrayConstructor=ArrayBufferViewCore$l.aTypedArrayConstructor,getTypedArrayConstructor=ArrayBufferViewCore$l.getTypedArrayConstructor,typedArraySpeciesConstructor$4=function(e){return aTypedArrayConstructor(speciesConstructor$1(e,getTypedArrayConstructor(e)))},arrayFromConstructorAndList=arrayFromConstructorAndList$1,typedArraySpeciesConstructor$3=typedArraySpeciesConstructor$4,typedArrayFromSpeciesAndList=function(e,t){return arrayFromConstructorAndList(typedArraySpeciesConstructor$3(e),t)},ArrayBufferViewCore$k=arrayBufferViewCore,$filter=arrayIteration$1.filter,fromSpeciesAndList=typedArrayFromSpeciesAndList,aTypedArray$k=ArrayBufferViewCore$k.aTypedArray,exportTypedArrayMethod$l=ArrayBufferViewCore$k.exportTypedArrayMethod;exportTypedArrayMethod$l("filter",(function(e){var t=$filter(aTypedArray$k(this),e,arguments.length>1?arguments[1]:void 0);return fromSpeciesAndList(this,t)}));var ArrayBufferViewCore$j=arrayBufferViewCore,$find$1=arrayIteration$1.find,aTypedArray$j=ArrayBufferViewCore$j.aTypedArray,exportTypedArrayMethod$k=ArrayBufferViewCore$j.exportTypedArrayMethod;exportTypedArrayMethod$k("find",(function(e){return $find$1(aTypedArray$j(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$i=arrayBufferViewCore,$findIndex$1=arrayIteration$1.findIndex,aTypedArray$i=ArrayBufferViewCore$i.aTypedArray,exportTypedArrayMethod$j=ArrayBufferViewCore$i.exportTypedArrayMethod;exportTypedArrayMethod$j("findIndex",(function(e){return $findIndex$1(aTypedArray$i(this),e,arguments.length>1?arguments[1]:void 0)}));var bind$6=functionBindContext$1,IndexedObject$1=indexedObject$1,toObject$3=toObject$s,lengthOfArrayLike$3=lengthOfArrayLike$s,createMethod$3=function(e){var t=1==e;return function(r,n,o){for(var a,i=toObject$3(r),s=IndexedObject$1(i),c=bind$6(n,o),l=lengthOfArrayLike$3(s);l-- >0;)if(c(a=s[l],l,i))switch(e){case 0:return a;case 1:return l}return t?-1:void 0}},arrayIterationFromLast={findLast:createMethod$3(0),findLastIndex:createMethod$3(1)},ArrayBufferViewCore$h=arrayBufferViewCore,$findLast=arrayIterationFromLast.findLast,aTypedArray$h=ArrayBufferViewCore$h.aTypedArray,exportTypedArrayMethod$i=ArrayBufferViewCore$h.exportTypedArrayMethod;exportTypedArrayMethod$i("findLast",(function(e){return $findLast(aTypedArray$h(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$g=arrayBufferViewCore,$findLastIndex=arrayIterationFromLast.findLastIndex,aTypedArray$g=ArrayBufferViewCore$g.aTypedArray,exportTypedArrayMethod$h=ArrayBufferViewCore$g.exportTypedArrayMethod;exportTypedArrayMethod$h("findLastIndex",(function(e){return $findLastIndex(aTypedArray$g(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$f=arrayBufferViewCore,$forEach=arrayIteration$1.forEach,aTypedArray$f=ArrayBufferViewCore$f.aTypedArray,exportTypedArrayMethod$g=ArrayBufferViewCore$f.exportTypedArrayMethod;exportTypedArrayMethod$g("forEach",(function(e){$forEach(aTypedArray$f(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$e=arrayBufferViewCore,$includes=arrayIncludes$1.includes,aTypedArray$e=ArrayBufferViewCore$e.aTypedArray,exportTypedArrayMethod$f=ArrayBufferViewCore$e.exportTypedArrayMethod;exportTypedArrayMethod$f("includes",(function(e){return $includes(aTypedArray$e(this),e,arguments.length>1?arguments[1]:void 0)}));var ArrayBufferViewCore$d=arrayBufferViewCore,$indexOf=arrayIncludes$1.indexOf,aTypedArray$d=ArrayBufferViewCore$d.aTypedArray,exportTypedArrayMethod$e=ArrayBufferViewCore$d.exportTypedArrayMethod;exportTypedArrayMethod$e("indexOf",(function(e){return $indexOf(aTypedArray$d(this),e,arguments.length>1?arguments[1]:void 0)}));var global$b=global$13,fails$i=fails$1i,uncurryThis$g=functionUncurryThis$1,ArrayBufferViewCore$c=arrayBufferViewCore,ArrayIterators=es_array_iterator,wellKnownSymbol$6=wellKnownSymbol$T,ITERATOR$1=wellKnownSymbol$6("iterator"),Uint8Array$2=global$b.Uint8Array,arrayValues=uncurryThis$g(ArrayIterators.values),arrayKeys=uncurryThis$g(ArrayIterators.keys),arrayEntries=uncurryThis$g(ArrayIterators.entries),aTypedArray$c=ArrayBufferViewCore$c.aTypedArray,exportTypedArrayMethod$d=ArrayBufferViewCore$c.exportTypedArrayMethod,TypedArrayPrototype=Uint8Array$2&&Uint8Array$2.prototype,GENERIC=!fails$i((function(){TypedArrayPrototype[ITERATOR$1].call([1])})),ITERATOR_IS_VALUES=!!TypedArrayPrototype&&TypedArrayPrototype.values&&TypedArrayPrototype[ITERATOR$1]===TypedArrayPrototype.values&&"values"===TypedArrayPrototype.values.name,typedArrayValues=function(){return arrayValues(aTypedArray$c(this))};exportTypedArrayMethod$d("entries",(function(){return arrayEntries(aTypedArray$c(this))}),GENERIC),exportTypedArrayMethod$d("keys",(function(){return arrayKeys(aTypedArray$c(this))}),GENERIC),exportTypedArrayMethod$d("values",typedArrayValues,GENERIC||!ITERATOR_IS_VALUES,{name:"values"}),exportTypedArrayMethod$d(ITERATOR$1,typedArrayValues,GENERIC||!ITERATOR_IS_VALUES,{name:"values"});var ArrayBufferViewCore$b=arrayBufferViewCore,uncurryThis$f=functionUncurryThis$1,aTypedArray$b=ArrayBufferViewCore$b.aTypedArray,exportTypedArrayMethod$c=ArrayBufferViewCore$b.exportTypedArrayMethod,$join=uncurryThis$f([].join);exportTypedArrayMethod$c("join",(function(e){return $join(aTypedArray$b(this),e)}));var apply$4=functionApply$1,toIndexedObject$2=toIndexedObject$l,toIntegerOrInfinity$3=toIntegerOrInfinity$i,lengthOfArrayLike$2=lengthOfArrayLike$s,arrayMethodIsStrict=arrayMethodIsStrict$a,min$2=Math.min,$lastIndexOf$1=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf$1&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD=arrayMethodIsStrict("lastIndexOf"),FORCED$3=NEGATIVE_ZERO||!STRICT_METHOD,arrayLastIndexOf=FORCED$3?function(e){if(NEGATIVE_ZERO)return apply$4($lastIndexOf$1,this,arguments)||0;var t=toIndexedObject$2(this),r=lengthOfArrayLike$2(t),n=r-1;for(arguments.length>1&&(n=min$2(n,toIntegerOrInfinity$3(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:$lastIndexOf$1,ArrayBufferViewCore$a=arrayBufferViewCore,apply$3=functionApply$1,$lastIndexOf=arrayLastIndexOf,aTypedArray$a=ArrayBufferViewCore$a.aTypedArray,exportTypedArrayMethod$b=ArrayBufferViewCore$a.exportTypedArrayMethod;exportTypedArrayMethod$b("lastIndexOf",(function(e){var t=arguments.length;return apply$3($lastIndexOf,aTypedArray$a(this),t>1?[e,arguments[1]]:[e])}));var ArrayBufferViewCore$9=arrayBufferViewCore,$map=arrayIteration$1.map,typedArraySpeciesConstructor$2=typedArraySpeciesConstructor$4,aTypedArray$9=ArrayBufferViewCore$9.aTypedArray,exportTypedArrayMethod$a=ArrayBufferViewCore$9.exportTypedArrayMethod;exportTypedArrayMethod$a("map",(function(e){return $map(aTypedArray$9(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(typedArraySpeciesConstructor$2(e))(t)}))}));var aCallable$3=aCallable$v,toObject$2=toObject$s,IndexedObject=indexedObject$1,lengthOfArrayLike$1=lengthOfArrayLike$s,$TypeError$5=TypeError,createMethod$2=function(e){return function(t,r,n,o){aCallable$3(r);var a=toObject$2(t),i=IndexedObject(a),s=lengthOfArrayLike$1(a),c=e?s-1:0,l=e?-1:1;if(n<2)for(;;){if(c in i){o=i[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw $TypeError$5("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=l)c in i&&(o=r(o,i[c],c,a));return o}},arrayReduce={left:createMethod$2(!1),right:createMethod$2(!0)},ArrayBufferViewCore$8=arrayBufferViewCore,$reduce=arrayReduce.left,aTypedArray$8=ArrayBufferViewCore$8.aTypedArray,exportTypedArrayMethod$9=ArrayBufferViewCore$8.exportTypedArrayMethod;exportTypedArrayMethod$9("reduce",(function(e){var t=arguments.length;return $reduce(aTypedArray$8(this),e,t,t>1?arguments[1]:void 0)}));var ArrayBufferViewCore$7=arrayBufferViewCore,$reduceRight=arrayReduce.right,aTypedArray$7=ArrayBufferViewCore$7.aTypedArray,exportTypedArrayMethod$8=ArrayBufferViewCore$7.exportTypedArrayMethod;exportTypedArrayMethod$8("reduceRight",(function(e){var t=arguments.length;return $reduceRight(aTypedArray$7(this),e,t,t>1?arguments[1]:void 0)}));var ArrayBufferViewCore$6=arrayBufferViewCore,aTypedArray$6=ArrayBufferViewCore$6.aTypedArray,exportTypedArrayMethod$7=ArrayBufferViewCore$6.exportTypedArrayMethod,floor$1=Math.floor;exportTypedArrayMethod$7("reverse",(function(){for(var e,t=this,r=aTypedArray$6(t).length,n=floor$1(r/2),o=0;o<n;)e=t[o],t[o++]=t[--r],t[r]=e;return t}));var global$a=global$13,call$e=functionCall$1,ArrayBufferViewCore$5=arrayBufferViewCore,lengthOfArrayLike=lengthOfArrayLike$s,toOffset=toOffset$2,toIndexedObject$1=toObject$s,fails$h=fails$1i,RangeError$1=global$a.RangeError,Int8Array$2=global$a.Int8Array,Int8ArrayPrototype=Int8Array$2&&Int8Array$2.prototype,$set=Int8ArrayPrototype&&Int8ArrayPrototype.set,aTypedArray$5=ArrayBufferViewCore$5.aTypedArray,exportTypedArrayMethod$6=ArrayBufferViewCore$5.exportTypedArrayMethod,WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS=!fails$h((function(){var e=new Uint8ClampedArray(2);return call$e($set,e,{length:1,0:3},1),3!==e[1]})),TO_OBJECT_BUG=WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS&&ArrayBufferViewCore$5.NATIVE_ARRAY_BUFFER_VIEWS&&fails$h((function(){var e=new Int8Array$2(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));exportTypedArrayMethod$6("set",(function(e){aTypedArray$5(this);var t=toOffset(arguments.length>1?arguments[1]:void 0,1),r=toIndexedObject$1(e);if(WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS)return call$e($set,this,r,t);var n=this.length,o=lengthOfArrayLike(r),a=0;if(o+t>n)throw RangeError$1("Wrong length");for(;a<o;)this[t+a]=r[a++]}),!WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS||TO_OBJECT_BUG);var ArrayBufferViewCore$4=arrayBufferViewCore,typedArraySpeciesConstructor$1=typedArraySpeciesConstructor$4,fails$g=fails$1i,arraySlice$4=arraySlice$j,aTypedArray$4=ArrayBufferViewCore$4.aTypedArray,exportTypedArrayMethod$5=ArrayBufferViewCore$4.exportTypedArrayMethod,FORCED$2=fails$g((function(){new Int8Array(1).slice()}));exportTypedArrayMethod$5("slice",(function(e,t){for(var r=arraySlice$4(aTypedArray$4(this),e,t),n=typedArraySpeciesConstructor$1(this),o=0,a=r.length,i=new n(a);a>o;)i[o]=r[o++];return i}),FORCED$2);var ArrayBufferViewCore$3=arrayBufferViewCore,$some=arrayIteration$1.some,aTypedArray$3=ArrayBufferViewCore$3.aTypedArray,exportTypedArrayMethod$4=ArrayBufferViewCore$3.exportTypedArrayMethod;exportTypedArrayMethod$4("some",(function(e){return $some(aTypedArray$3(this),e,arguments.length>1?arguments[1]:void 0)}));var userAgent$2=engineUserAgent$1,firefox=userAgent$2.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent$1,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent$1=engineUserAgent$1,webkit=userAgent$1.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],global$9=global$13,uncurryThis$e=functionUncurryThisClause$1,fails$f=fails$1i,aCallable$2=aCallable$v,internalSort=arraySort$1,ArrayBufferViewCore$2=arrayBufferViewCore,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version$1,WEBKIT=engineWebkitVersion,aTypedArray$2=ArrayBufferViewCore$2.aTypedArray,exportTypedArrayMethod$3=ArrayBufferViewCore$2.exportTypedArrayMethod,Uint16Array=global$9.Uint16Array,nativeSort=Uint16Array&&uncurryThis$e(Uint16Array.prototype.sort),ACCEPT_INCORRECT_ARGUMENTS=!(!nativeSort||fails$f((function(){nativeSort(new Uint16Array(2),null)}))&&fails$f((function(){nativeSort(new Uint16Array(2),{})}))),STABLE_SORT=!!nativeSort&&!fails$f((function(){if(V8)return V8<74;if(FF)return FF<67;if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<602;var e,t,r=new Uint16Array(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(nativeSort(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0})),getSortCompare=function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}};exportTypedArrayMethod$3("sort",(function(e){return void 0!==e&&aCallable$2(e),STABLE_SORT?nativeSort(this,e):internalSort(aTypedArray$2(this),getSortCompare(e))}),!STABLE_SORT||ACCEPT_INCORRECT_ARGUMENTS);var ArrayBufferViewCore$1=arrayBufferViewCore,toLength$4=toLength$c,toAbsoluteIndex=toAbsoluteIndex$c,typedArraySpeciesConstructor=typedArraySpeciesConstructor$4,aTypedArray$1=ArrayBufferViewCore$1.aTypedArray,exportTypedArrayMethod$2=ArrayBufferViewCore$1.exportTypedArrayMethod;exportTypedArrayMethod$2("subarray",(function(e,t){var r=aTypedArray$1(this),n=r.length,o=toAbsoluteIndex(e,n);return new(typedArraySpeciesConstructor(r))(r.buffer,r.byteOffset+o*r.BYTES_PER_ELEMENT,toLength$4((void 0===t?n:toAbsoluteIndex(t,n))-o))}));var global$8=global$13,apply$2=functionApply$1,ArrayBufferViewCore=arrayBufferViewCore,fails$e=fails$1i,arraySlice$3=arraySlice$j,Int8Array$1=global$8.Int8Array,aTypedArray=ArrayBufferViewCore.aTypedArray,exportTypedArrayMethod$1=ArrayBufferViewCore.exportTypedArrayMethod,$toLocaleString=[].toLocaleString,TO_LOCALE_STRING_BUG=!!Int8Array$1&&fails$e((function(){$toLocaleString.call(new Int8Array$1(1))})),FORCED$1=fails$e((function(){return[1,2].toLocaleString()!=new Int8Array$1([1,2]).toLocaleString()}))||!fails$e((function(){Int8Array$1.prototype.toLocaleString.call([1,2])}));exportTypedArrayMethod$1("toLocaleString",(function(){return apply$2($toLocaleString,TO_LOCALE_STRING_BUG?arraySlice$3(aTypedArray(this)):aTypedArray(this),arraySlice$3(arguments))}),FORCED$1);var exportTypedArrayMethod=arrayBufferViewCore.exportTypedArrayMethod,fails$d=fails$1i,global$7=global$13,uncurryThis$d=functionUncurryThis$1,Uint8Array$1=global$7.Uint8Array,Uint8ArrayPrototype=Uint8Array$1&&Uint8Array$1.prototype||{},arrayToString=[].toString,join3=uncurryThis$d([].join);fails$d((function(){arrayToString.call({})}))&&(arrayToString=function(){return join3(this)});var IS_NOT_ARRAY_METHOD=Uint8ArrayPrototype.toString!=arrayToString;exportTypedArrayMethod("toString",arrayToString,IS_NOT_ARRAY_METHOD);var LoaderType={FETCH:"fetch",XHR:"xhr"},ResponseType={ARRAY_BUFFER:"arraybuffer",TEXT:"text",JSON:"json"},NetError=function(e){_inherits$1(r,_wrapNativeSuper(Error));var t=_createSuper$1(r);function r(e,n,o,a){var i;return _classCallCheck$1(this,r),_defineProperty$1(_assertThisInitialized$1(i=t.call(this,a)),"retryCount",0),_defineProperty$1(_assertThisInitialized$1(i),"isTimeout",!1),_defineProperty$1(_assertThisInitialized$1(i),"loaderType",LoaderType.FETCH),_defineProperty$1(_assertThisInitialized$1(i),"startTime",0),_defineProperty$1(_assertThisInitialized$1(i),"endTime",0),_defineProperty$1(_assertThisInitialized$1(i),"options",{}),i.url=e,i.request=n,i.response=o,i}return _createClass$1(r)}(),uncurryThis$c=functionUncurryThisClause$1,defineBuiltIn$4=defineBuiltIn$p,regexpExec$2=regexpExec$3,fails$c=fails$1i,wellKnownSymbol$5=wellKnownSymbol$T,createNonEnumerableProperty$1=createNonEnumerableProperty$k,SPECIES=wellKnownSymbol$5("species"),RegExpPrototype$5=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(e,t,r,n){var o=wellKnownSymbol$5(e),a=!fails$c((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),i=a&&!fails$c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[SPECIES]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!a||!i||r){var s=uncurryThis$c(/./[o]),c=t(o,""[e],(function(e,t,r,n,o){var i=uncurryThis$c(e),c=t.exec;return c===regexpExec$2||c===RegExpPrototype$5.exec?a&&!o?{done:!0,value:s(t,r,n)}:{done:!0,value:i(r,t,n)}:{done:!1}}));defineBuiltIn$4(String.prototype,e,c[0]),defineBuiltIn$4(RegExpPrototype$5,o,c[1])}n&&createNonEnumerableProperty$1(RegExpPrototype$5[o],"sham",!0)},charAt$2=stringMultibyte$1.charAt,advanceStringIndex$3=function(e,t,r){return t+(r?charAt$2(e,t).length:1)},uncurryThis$b=functionUncurryThis$1,toObject$1=toObject$s,floor=Math.floor,charAt$1=uncurryThis$b("".charAt),replace$2=uncurryThis$b("".replace),stringSlice$4=uncurryThis$b("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(e,t,r,n,o,a){var i=r+e.length,s=n.length,c=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==o&&(o=toObject$1(o),c=SUBSTITUTION_SYMBOLS),replace$2(a,c,(function(a,c){var l;switch(charAt$1(c,0)){case"$":return"$";case"&":return e;case"`":return stringSlice$4(t,0,r);case"'":return stringSlice$4(t,i);case"<":l=o[stringSlice$4(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var $=floor(u/10);return 0===$?a:$<=s?void 0===n[$-1]?charAt$1(c,1):n[$-1]+charAt$1(c,1):a}l=n[u-1]}return void 0===l?"":l}))},call$d=functionCall$1,anObject$6=anObject$B,isCallable$4=isCallable$V,classof$5=classofRaw$5,regexpExec$1=regexpExec$3,$TypeError$4=TypeError,regexpExecAbstract=function(e,t){var r=e.exec;if(isCallable$4(r)){var n=call$d(r,e,t);return null!==n&&anObject$6(n),n}if("RegExp"===classof$5(e))return call$d(regexpExec$1,e,t);throw $TypeError$4("RegExp#exec called on incompatible receiver")},apply$1=functionApply$1,call$c=functionCall$1,uncurryThis$a=functionUncurryThis$1,fixRegExpWellKnownSymbolLogic$2=fixRegexpWellKnownSymbolLogic,fails$b=fails$1i,anObject$5=anObject$B,isCallable$3=isCallable$V,isNullOrUndefined$5=isNullOrUndefined$h,toIntegerOrInfinity$2=toIntegerOrInfinity$i,toLength$3=toLength$c,toString$a=toString$v,requireObjectCoercible$6=requireObjectCoercible$i,advanceStringIndex$2=advanceStringIndex$3,getMethod$2=getMethod$a,getSubstitution=getSubstitution$1,regExpExec$1=regexpExecAbstract,wellKnownSymbol$4=wellKnownSymbol$T,REPLACE=wellKnownSymbol$4("replace"),max$1=Math.max,min$1=Math.min,concat3=uncurryThis$a([].concat),push$2=uncurryThis$a([].push),stringIndexOf$2=uncurryThis$a("".indexOf),stringSlice$3=uncurryThis$a("".slice),maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails$b((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));fixRegExpWellKnownSymbolLogic$2("replace",(function(e,t,r){var n=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,r){var n=requireObjectCoercible$6(this),o=isNullOrUndefined$5(e)?void 0:getMethod$2(e,REPLACE);return o?call$c(o,e,n,r):call$c(t,toString$a(n),e,r)},function(e,o){var a=anObject$5(this),i=toString$a(e);if("string"==typeof o&&-1===stringIndexOf$2(o,n)&&-1===stringIndexOf$2(o,"$<")){var s=r(t,a,i,o);if(s.done)return s.value}var c=isCallable$3(o);c||(o=toString$a(o));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var $=[];;){var p=regExpExec$1(a,i);if(null===p)break;if(push$2($,p),!l)break;""===toString$a(p[0])&&(a.lastIndex=advanceStringIndex$2(i,toLength$3(a.lastIndex),u))}for(var f="",d=0,y=0;y<$.length;y++){for(var h=toString$a((p=$[y])[0]),g=max$1(min$1(toIntegerOrInfinity$2(p.index),i.length),0),m=[],_=1;_<p.length;_++)push$2(m,maybeToString(p[_]));var S=p.groups;if(c){var b=concat3([h],m,g,i);void 0!==S&&push$2(b,S);var v=toString$a(apply$1(o,void 0,b))}else v=getSubstitution(h,i,g,m,S,o);g>=d&&(f+=stringSlice$3(i,d,g)+v,d=g+h.length)}return f+stringSlice$3(i,d)}]}),!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var $$A=_export$1;$$A({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var uncurryThis$9=functionUncurryThis$1,thisNumberValue$1=uncurryThis$9(1..valueOf),whitespaces$2="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis$8=functionUncurryThis$1,requireObjectCoercible$5=requireObjectCoercible$i,toString$9=toString$v,whitespaces$1=whitespaces$2,replace$1=uncurryThis$8("".replace),whitespace="["+whitespaces$1+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod$1=function(e){return function(t){var r=toString$9(requireObjectCoercible$5(t));return 1&e&&(r=replace$1(r,ltrim,"")),2&e&&(r=replace$1(r,rtrim,"")),r}},stringTrim={start:createMethod$1(1),end:createMethod$1(2),trim:createMethod$1(3)},DESCRIPTORS$4=descriptors$1,global$6=global$13,uncurryThis$7=functionUncurryThis$1,isForced$2=isForced_1$1,defineBuiltIn$3=defineBuiltIn$p,hasOwn$4=hasOwnProperty_1$1,inheritIfRequired$2=inheritIfRequired$4,isPrototypeOf$2=objectIsPrototypeOf$1,isSymbol=isSymbol$b,toPrimitive=toPrimitive$b,fails$a=fails$1i,getOwnPropertyNames$1=objectGetOwnPropertyNames$1.f,getOwnPropertyDescriptor7=objectGetOwnPropertyDescriptor$1.f,defineProperty$3=objectDefineProperty$1.f,thisNumberValue=thisNumberValue$1,trim2=stringTrim.trim,NUMBER="Number",NativeNumber=global$6[NUMBER],NumberPrototype=NativeNumber.prototype,TypeError$1=global$6.TypeError,arraySlice$2=uncurryThis$7("".slice),charCodeAt=uncurryThis$7("".charCodeAt),toNumeric=function(e){var t=toPrimitive(e,"number");return"bigint"==typeof t?t:toNumber(t)},toNumber=function(e){var t,r,n,o,a,i,s,c,l=toPrimitive(e,"number");if(isSymbol(l))throw TypeError$1("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=trim2(l),43===(t=charCodeAt(l,0))||45===t){if(88===(r=charCodeAt(l,2))||120===r)return NaN}else if(48===t){switch(charCodeAt(l,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+l}for(i=(a=arraySlice$2(l,2)).length,s=0;s<i;s++)if((c=charCodeAt(a,s))<48||c>o)return NaN;return parseInt(a,n)}return+l};if(isForced$2(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1"))){for(var key,NumberWrapper=function(e){var t=arguments.length<1?0:NativeNumber(toNumeric(e)),r=this;return isPrototypeOf$2(NumberPrototype,r)&&fails$a((function(){thisNumberValue(r)}))?inheritIfRequired$2(Object(t),r,NumberWrapper):t},keys$1=DESCRIPTORS$4?getOwnPropertyNames$1(NativeNumber):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),j=0;keys$1.length>j;j++)hasOwn$4(NativeNumber,key=keys$1[j])&&!hasOwn$4(NumberWrapper,key)&&defineProperty$3(NumberWrapper,key,getOwnPropertyDescriptor7(NativeNumber,key));NumberWrapper.prototype=NumberPrototype,NumberPrototype.constructor=NumberWrapper,defineBuiltIn$3(global$6,NUMBER,NumberWrapper,{constructor:!0})}var $$z=_export$1,fails$9=fails$1i,toObject=toObject$s,nativeGetPrototypeOf=objectGetPrototypeOf$1,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter$1,FAILS_ON_PRIMITIVES$1=fails$9((function(){nativeGetPrototypeOf(1)}));$$z({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1,sham:!CORRECT_PROTOTYPE_GETTER},{getPrototypeOf:function(e){return nativeGetPrototypeOf(toObject(e))}});var toString$8=Object.prototype.toString;function isObject$5(e){return null!==e&&"object"===_typeof(e)}function isPlainObject(e){if("[object Object]"!==toString$8.call(e))return!1;var t=_Object$getPrototypeOf(e);return null===t||t===Object.prototype}function isDate(e){return"[object Date]"===toString$8.call(e)}function getRangeValue(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function setUrlParams(e,t){var r,n;if(e){if(!t)return e;var o,a=_filterInstanceProperty(r=_mapInstanceProperty(n=_Object$keys(t)).call(n,(function(e){if(null!=(o=t[e]))return _Array$isArray(o)?e+="[]":o=[o],_mapInstanceProperty(o).call(o,(function(t){var r;return isDate(t)?t=t.toISOString():isObject$5(t)&&(t=_JSON$stringify(t)),_concatInstanceProperty(r="".concat(encode(e),"=")).call(r,encode(t))})).join("&")}))).call(r,Boolean).join("&");if(a){var i=_indexOfInstanceProperty(e).call(e,"#");-1!==i&&(e=_sliceInstanceProperty(e).call(e,0,i)),e+=(-1===_indexOfInstanceProperty(e).call(e,"?")?"?":"&")+a}return e}}function createResponse(e,t,r,n,o,a,i,s,c,l,u){return o=null!=o?_parseFloat$1(o):null,n=_parseInt$1(n||"0",10),_Number$isNaN(n)&&(n=0),{data:e,done:t,option:{range:c,vid:l,index:s,contentLength:n,age:o,startTime:a,firstByteTime:i,endTime:_Date$now(),priOptions:u},response:r}}function calculateSpeed(e,t){return Math.round(8*e*1e3/t/1024)}var EVENT={ERROR:"error",TTFB:"core.ttfb",LOAD_START:"core.loadstart",LOAD_RESPONSE_HEADERS:"core.loadresponseheaders",LOAD_COMPLETE:"core.loadcomplete",LOAD_RETRY:"core.loadretry",SOURCEBUFFER_CREATED:"core.sourcebuffercreated",ANALYZE_DURATION_EXCEEDED:"core.analyzedurationexceeded",REMOVE_BUFFER:"core.removebuffer",BUFFEREOS:"core.buffereos",KEYFRAME:"core.keyframe",METADATA_PARSED:"core.metadataparsed",SEI:"core.sei",SEI_IN_TIME:"core.seiintime",FLV_SCRIPT_DATA:"core.flvscriptdata",LOWDECODE:"core.lowdecode",SWITCH_URL_SUCCESS:"core.switchurlsuccess",SWITCH_URL_FAILED:"core.switchurlfailed",SPEED:"core.speed",HLS_MANIFEST_LOADED:"core.hlsmanifestloaded",HLS_LEVEL_LOADED:"core.hlslevelloaded",DEMUXED_TRACK:"demuxedtrack",STREAM_EXCEPTION:"core.streamexception",LARGE_AV_FIRST_FRAME_GAP_DETECT:"LARGE_AV_FIRST_FRAME_GAP_DETECT",LARGE_VIDEO_DTS_GAP_DETECT:"LARGE_VIDEO_DTS_GAP_DETECT",LARGE_AUDIO_DTS_GAP_DETECT:"LARGE_AUDIO_DTS_GAP_DETECT",AUDIO_GAP_DETECT:"AUDIO_GAP_DETECT",AUDIO_OVERLAP_DETECT:"AUDIO_OVERLAP_DETECT",MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT:"MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT",REAL_TIME_SPEED:"real_time_speed"},CACHESIZE=2097152,FetchLoader=function(e){_inherits$1(n,EventEmitter);var t,r=_createSuper$1(n);function n(){var e;return _classCallCheck$1(this,n),_defineProperty$1(_assertThisInitialized$1(e=r.call(this)),"_abortController",null),_defineProperty$1(_assertThisInitialized$1(e),"_timeoutTimer",null),_defineProperty$1(_assertThisInitialized$1(e),"_reader",null),_defineProperty$1(_assertThisInitialized$1(e),"_response",null),_defineProperty$1(_assertThisInitialized$1(e),"_aborted",!1),_defineProperty$1(_assertThisInitialized$1(e),"_index",-1),_defineProperty$1(_assertThisInitialized$1(e),"_range",null),_defineProperty$1(_assertThisInitialized$1(e),"_receivedLength",0),_defineProperty$1(_assertThisInitialized$1(e),"_running",!1),_defineProperty$1(_assertThisInitialized$1(e),"_logger",null),_defineProperty$1(_assertThisInitialized$1(e),"_vid",""),_defineProperty$1(_assertThisInitialized$1(e),"_onProcessMinLen",0),_defineProperty$1(_assertThisInitialized$1(e),"_onCancel",null),_defineProperty$1(_assertThisInitialized$1(e),"_priOptions",null),e}return _createClass$1(n,[{key:"load",value:function(e){var t,r=this,n=e.url,o=e.vid,a=e.timeout,i=e.responseType,s=e.onProgress,c=e.index,l=e.onTimeout,u=e.onCancel,$=e.range,p=e.transformResponse,f=e.request,d=e.params,y=e.logger,h=e.method,g=e.headers,m=e.body,_=e.mode,S=e.credentials,b=e.cache,v=e.redirect,E=e.referrer,T=e.referrerPolicy,I=e.onProcessMinLen,O=e.priOptions;this._logger=y,this._aborted=!1,this._onProcessMinLen=I,this._onCancel=u,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=c,this._range=$||[0,0],this._vid=o||n,this._priOptions=O||{};var P={method:h,headers:g,body:m,mode:_,credentials:S,cache:b,redirect:v,referrer:E,referrerPolicy:T,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},A=!1;clearTimeout(this._timeoutTimer),n=setUrlParams(n,d);var R=getRangeValue($);R&&(g=f?f.headers:P.headers=P.headers||(Headers?new Headers:{}),Headers&&g instanceof Headers?g.append("Range",R):g.Range=R),a&&(this._timeoutTimer=_setTimeout((function(){if(A=!0,r.cancel(),l){var e=new NetError(n,P,null,"timeout");e.isTimeout=!0,l(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions})}}),a));var C=_Date$now();return this._logger.debug("[fetch load start], index,",c,",range,",$),new _Promise((function(e,t){fetch(f||n,f?void 0:P).then(function(){var o=_asyncToGenerator(_regeneratorRuntime().mark((function o(a){var l,u,f,d;return _regeneratorRuntime().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=a,!r._aborted&&r._running){o.next=4;break}return o.abrupt("return");case 4:if(p&&(a=p(a,n)||a),a.ok){o.next=7;break}throw new NetError(n,P,a,"bad network response");case 7:if(l=_Date$now(),i!==ResponseType.TEXT){o.next=15;break}return o.next=11,a.text();case 11:u=o.sent,r._running=!1,o.next=37;break;case 15:if(i!==ResponseType.JSON){o.next=22;break}return o.next=18,a.json();case 18:u=o.sent,r._running=!1,o.next=37;break;case 22:if(!s){o.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(a,s,C,l),o.abrupt("return");case 29:return o.next=31,a.arrayBuffer();case 31:u=o.sent,u=new Uint8Array(u),r._running=!1,f=_Date$now()-C,d=calculateSpeed(u.byteLength,f),r.emit(EVENT.REAL_TIME_SPEED,{speed:d,len:u.byteLength,time:f,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",c,",range,",$),e(createResponse(u,!0,a,a.headers.get("Content-Length"),a.headers.get("age"),C,l,c,$,r._vid,r._priOptions));case 39:case"end":return o.stop()}}),o)})));return function(e){return o.apply(this,arguments)}}()).catch((function(e){var o;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!A||((e=e instanceof NetError?e:new NetError(n,P,null,null===(o=e)||void 0===o?void 0:o.message)).startTime=C,e.endTime=_Date$now(),e.isTimeout=A,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))}))}))}},{key:"cancel",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(e){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var o=this;if(!e.body||!e.body.getReader){this._running=!1;var a=new NetError(e.url,"",e,"onProgress of bad response.body.getReader");return a.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(a)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(CACHESIZE),this._writeIdx=0);var i,s,c,l=this._reader=e.body.getReader(),u=function(){var a=_asyncToGenerator(_regeneratorRuntime().mark((function a(){var $,p,f,d,y,h,g,m;return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return s=_Date$now(),a.prev=1,a.next=4,l.read();case 4:i=a.sent,c=_Date$now(),a.next=13;break;case 8:return a.prev=8,a.t0=a.catch(1),c=_Date$now(),o._aborted||(o._running=!1,a.t0.options={index:o._index,range:o._range,vid:o._vid,priOptions:o._priOptions},o.reject(a.t0)),a.abrupt("return");case 13:if(p=(null===($=o._range)||void 0===$?void 0:$.length)>0?o._range[0]:0,f=p+o._receivedLength,!o._aborted){a.next=19;break}return o._running=!1,t(void 0,!1,{range:[f,f],vid:o._vid,index:o._index,startTime:s,endTime:c,st:r,firstByteTime:n,priOptions:o._priOptions},e),a.abrupt("return");case 19:var _;if(d=i.value?i.value.byteLength:0,o._receivedLength+=d,o._logger.debug("【fetchLoader,onProgress call】,task,",o._range,", start,",f,", end,",p+o._receivedLength,", done,",i.done),o._onProcessMinLen>0){if(o._writeIdx+d>=o._onProcessMinLen||i.done)(y=new Uint8Array(o._writeIdx+d)).set(_sliceInstanceProperty(_=o._cache).call(_,0,o._writeIdx),0),d>0&&y.set(i.value,o._writeIdx),o._writeIdx=0,o._logger.debug("【fetchLoader,onProgress enough】,done,",i.done,",len,",y.byteLength,", writeIdx,",o._writeIdx);else if(d>0&&o._writeIdx+d<CACHESIZE)o._cache.set(i.value,o._writeIdx),o._writeIdx+=d,o._logger.debug("【fetchLoader,onProgress cache】,len,",d,", writeIdx,",o._writeIdx);else if(d>0){var S;h=new Uint8Array(o._writeIdx+d+2048),o._logger.debug("【fetchLoader,onProgress extra start】,size,",o._writeIdx+d+2048,", datalen,",d,", writeIdx,",o._writeIdx),h.set(_sliceInstanceProperty(S=o._cache).call(S,0,o._writeIdx),0),d>0&&h.set(i.value,o._writeIdx),o._writeIdx+=d,delete o._cache,o._cache=h,o._logger.debug("【fetchLoader,onProgress extra end】,len,",d,", writeIdx,",o._writeIdx)}}else y=i.value;(y&&y.byteLength>0||i.done)&&t(y,i.done,{range:[o._range[0]+o._receivedLength-(y?y.byteLength:0),o._range[0]+o._receivedLength],vid:o._vid,index:o._index,startTime:s,endTime:c,st:r,firstByteTime:n,priOptions:o._priOptions},e),i.done?(g=_Date$now()-r,m=calculateSpeed(o._receivedLength,g),o.emit(EVENT.REAL_TIME_SPEED,{speed:m,len:o._receivedLength,time:g,vid:o._vid,index:o._index,range:o._range,priOptions:o._priOptions}),o._running=!1,o._logger.debug("[fetchLoader onProgress end],task,",o._range,",done,",i.done),o.resolve(createResponse(i,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,o._index,o._range,o._vid,o._priOptions))):u();case 25:case"end":return a.stop()}}),a,null,[[1,8]])})));return function(){return a.apply(this,arguments)}}();u()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}();function getConfig$1(e){return _objectSpread2({loaderType:LoaderType.FETCH,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:ResponseType.TEXT,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}var PROPER_FUNCTION_NAME$1=functionName$1.PROPER,fails$8=fails$1i,whitespaces=whitespaces$2,non="​…᠎",stringTrimForced=function(e){return fails$8((function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME$1&&whitespaces[e].name!==e}))},$$y=_export$1,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$$y({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function(){return $trim(this)}});var XhrLoader=function(e){_inherits$1(r,EventEmitter);var t=_createSuper$1(r);function r(){var e;return _classCallCheck$1(this,r),_defineProperty$1(_assertThisInitialized$1(e=t.call(this)),"_xhr",null),_defineProperty$1(_assertThisInitialized$1(e),"_aborted",!1),_defineProperty$1(_assertThisInitialized$1(e),"_timeoutTimer",null),_defineProperty$1(_assertThisInitialized$1(e),"_range",null),_defineProperty$1(_assertThisInitialized$1(e),"_receivedLength",0),_defineProperty$1(_assertThisInitialized$1(e),"_url",null),_defineProperty$1(_assertThisInitialized$1(e),"_onProgress",null),_defineProperty$1(_assertThisInitialized$1(e),"_index",-1),_defineProperty$1(_assertThisInitialized$1(e),"_headers",null),_defineProperty$1(_assertThisInitialized$1(e),"_currentChunkSizeKB",384),_defineProperty$1(_assertThisInitialized$1(e),"_timeout",null),_defineProperty$1(_assertThisInitialized$1(e),"_xhr",null),_defineProperty$1(_assertThisInitialized$1(e),"_withCredentials",null),_defineProperty$1(_assertThisInitialized$1(e),"_startTime",-1),_defineProperty$1(_assertThisInitialized$1(e),"_loadCompleteResolve",null),_defineProperty$1(_assertThisInitialized$1(e),"_loadCompleteReject",null),_defineProperty$1(_assertThisInitialized$1(e),"_runing",!1),_defineProperty$1(_assertThisInitialized$1(e),"_logger",!1),_defineProperty$1(_assertThisInitialized$1(e),"_vid",""),_defineProperty$1(_assertThisInitialized$1(e),"_responseType",void 0),_defineProperty$1(_assertThisInitialized$1(e),"_credentials",void 0),_defineProperty$1(_assertThisInitialized$1(e),"_method",void 0),_defineProperty$1(_assertThisInitialized$1(e),"_transformResponse",void 0),_defineProperty$1(_assertThisInitialized$1(e),"_firstRtt",void 0),_defineProperty$1(_assertThisInitialized$1(e),"_onCancel",null),_defineProperty$1(_assertThisInitialized$1(e),"_priOptions",null),e}return _createClass$1(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=setUrlParams(e.url,e.params);var r=_Date$now();return new _Promise((function(e,r){t._loadCompleteResolve=e,t._loadCompleteReject=r,t._startLoad()})).catch((function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof NetError?e:new NetError(t._url,t._request)).startTime=r,e.endTime=_Date$now(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===ResponseType.ARRAY_BUFFER&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=_Date$now();var o=this._xhr=new XMLHttpRequest;o.open(this._method||"GET",this._url,!0),o.responseType=this._responseType,this._timeout&&(o.timeout=this._timeout),o.withCredentials=this._withCredentials,o.onload=_bindInstanceProperty(r=this._onLoad).call(r,this),o.onreadystatechange=_bindInstanceProperty(n=this._onReadyStatechange).call(n,this),o.onerror=function(e){var r,n,o;t._running=!1;var a=new NetError(t._url,t._request,null==e||null===(r=e.currentTarget)||void 0===r?void 0:r.response,"xhr.onerror.status:"+(null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.status)+",statusText,"+(null==e||null===(o=e.currentTarget)||void 0===o?void 0:o.statusText));a.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(a)},o.ontimeout=function(e){t.cancel();var r=new NetError(t._url,t._request,{status:408},"timeout");t._onTimeout&&(r.isTimeout=!0,t._onTimeout(r,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),r.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(r)};var a,i=this._headers||{},s=getRangeValue(e);if(s&&(i.Range=s),i)_forEachInstanceProperty(a=_Object$keys(i)).call(a,(function(e){o.setRequestHeader(e,i[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),o.send(this._body)}catch(t){t.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=_Date$now())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new NetError(this._url,null,_objectSpread2(_objectSpread2({},e.target.response),{},{status:r}),"bad response,status:"+r);return n.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(n)}var o,a=null,i=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===ResponseType.ARRAY_BUFFER){var c,l=new Uint8Array(e.target.response);if(o=s+this._receivedLength,l&&l.byteLength>0){this._receivedLength+=l.byteLength;var u=_Date$now()-this._startTime,$=calculateSpeed(this._receivedLength,u);this.emit(EVENT.REAL_TIME_SPEED,{speed:$,len:this._receivedLength,time:u,vid:this._vid,index:this._index,range:[o,s+this._receivedLength],priOptions:this._priOptions})}a=l,i=!((null===(c=this._range)||void 0===c?void 0:c.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",o,"end ",s+this._receivedLength,",dataLen,",l?l.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",i)}else i=!0,a=e.target.response;var p={ok:r>=200&&r<300,status:r,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(p=this._transformResponse(p,this._url)||p),this._onProgress&&this._onProgress(a,i,{index:this._index,vid:this._vid,range:[o,s+this._receivedLength],startTime:this._startTime,endTime:_Date$now(),priOptions:this._priOptions},p),i?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(createResponse(this._onProgress?null:a,i,p,p.headers["content-length"],p.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,_get(_getPrototypeOf$1(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},o=_createForOfIteratorHelper(_trimInstanceProperty(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(o.s();!(r=o.n()).done;){var a=r.value.split(": ");n[a[0].toLowerCase()]=_sliceInstanceProperty(a).call(a,1).join(": ")}}catch(e){o.e(e)}finally{o.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(),_excluded=["retry","retryDelay","onRetryError","transformError"],Task=function(){function e(t,r){_classCallCheck$1(this,e),this.promise=createPublicPromise(),this.alive=!!r.onProgress,!r.logger&&(r.logger=new Logger$2("Loader")),this._loaderType=t,this._loader=t===LoaderType.FETCH&&window.fetch?new FetchLoader:new XhrLoader,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}var t;return _createClass$1(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,o=t.onRetryError,a=t.transformError,i=_objectWithoutProperties(t,_excluded),s=function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(){var c,l,u;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(i);case 3:c=t.sent,e.promise.resolve(c),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,l=t.t0,a&&(l=a(l)||l),o&&e._retryCount>0&&o(l,e._retryCount,{index:i.index,vid:i.vid,range:i.range,priOptions:i.priOptions}),e._retryCount++,u=!0,e._retryCheckFunc&&(u=e._retryCheckFunc(t.t0)),!(u&&e._retryCount<=r)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",i.range),e._retryTimer=_setTimeout(s,n),t.abrupt("return");case 26:e.promise.reject(l);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function isMediaPlaying(e){return e&&!e.paused&&!e.ended&&0!==e.playbackRate&&0!==e.readyState}function getVideoPlaybackQuality(e){if(!e)return{};if("function"==typeof e.getVideoPlaybackQuality){var t=e.getVideoPlaybackQuality();return{droppedVideoFrames:t.droppedVideoFrames||t.corruptedVideoFrames,totalVideoFrames:t.totalVideoFrames,creationTime:t.creationTime}}return{droppedVideoFrames:e.webkitDroppedFrameCount,totalVideoFrames:e.webkitDecodedFrameCount,creationTime:performance.now()}}function concatUint8Array$1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if((t=_filterInstanceProperty(t).call(t,Boolean)).length<2)return t[0];var n=new Uint8Array(_reduceInstanceProperty(t).call(t,(function(e,t){return e+t.byteLength}),0)),o=0;return _forEachInstanceProperty(t).call(t,(function(e){n.set(e,o),o+=e.byteLength})),n}function sleep(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new _Promise((function(t){return _setTimeout(t,e)}))}var NetLoader=function(e){_inherits$1(n,EventEmitter);var t,r=_createSuper$1(n);function n(e){var t;return _classCallCheck$1(this,n),_defineProperty$1(_assertThisInitialized$1(t=r.call(this,e)),"type",LoaderType.FETCH),_defineProperty$1(_assertThisInitialized$1(t),"_queue",[]),_defineProperty$1(_assertThisInitialized$1(t),"_alive",[]),_defineProperty$1(_assertThisInitialized$1(t),"_currentTask",null),_defineProperty$1(_assertThisInitialized$1(t),"_config",void 0),t._config=getConfig$1(e),t._config.loaderType!==LoaderType.XHR&&FetchLoader.isSupported()||(t.type=LoaderType.XHR),t.log=e.logger,t}return _createClass$1(n,[{key:"isFetch",value:function(){return this.type===LoaderType.FETCH}},{key:"load",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?r=e:r.url=e||r.url||this._config.url,(r=_Object$assign({},this._config,r)).params&&(r.params=_Object$assign({},r.params)),r.headers&&isPlainObject(r.headers)&&(r.headers=_Object$assign({},r.headers)),r.body&&isPlainObject(r.body)&&(r.body=_Object$assign({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new Task(this.type,r);return n.loader.on(EVENT.REAL_TIME_SPEED,(function(e){t.emit(EVENT.REAL_TIME_SPEED,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(var r,n,o;;)switch(e.prev=e.next){case 0:return t=_concatInstanceProperty(r=_mapInstanceProperty(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,_mapInstanceProperty(o=this._alive).call(o,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,_Promise.all(t);case 6:return e.next=8,sleep();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=_filterInstanceProperty(n=e._alive).call(n,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return FetchLoader.isSupported()}}]),n}(),GapService=function(){function e(){_classCallCheck$1(this,e),_defineProperty$1(this,"_prevCurrentTime",0)}return _createClass$1(e,[{key:"do",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(e){var o=e.currentTime,a=0;if(this._prevCurrentTime===o){var i=Buffer$1.info(Buffer$1.get(e),o);if(!i.buffers.length)return;r&&i.nextStart||i.nextStart&&i.nextStart-o<t?a=i.nextStart+.1:i.end&&i.end-o>n&&!e.seeking&&(a=o+.1)}this._prevCurrentTime=o,a&&o!==a&&(e.currentTime=a)}}}]),e}(),collection$2=collection$4,collectionStrong$2=collectionStrong$4;collection$2("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong$2);var path=path$u,set$5=path.Set,parent$2=set$5,set$4=parent$2,tryToString=tryToString$a,aSet$g=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"add"in e&&"delete"in e&&"keys"in e)return e;throw TypeError(tryToString(e)+" is not a set")},getBuiltIn$1=getBuiltIn$l,caller=caller$2,Set$5=getBuiltIn$1("Set"),SetPrototype=Set$5.prototype,setHelpers={Set:Set$5,add:caller("add",1),has:caller("has",1),remove:caller("delete",1),proto:SetPrototype},iterateSimple$6=iterateSimple$8,setIterate=function(e,t,r){return r?iterateSimple$6(e.keys(),t):e.forEach(t)},SetHelpers$5=setHelpers,iterate$a=setIterate,Set$4=SetHelpers$5.Set,add$6=SetHelpers$5.add,setClone=function(e){var t=new Set$4;return iterate$a(e,(function(e){add$6(t,e)})),t},setSize=function(e){return e.size},aCallable$1=aCallable$n,anObject$4=anObject$p,call$b=functionCall,toIntegerOrInfinity$1=toIntegerOrInfinity$e,$TypeError$3=TypeError,max=Math.max,SetRecord=function(e,t,r,n){this.set=e,this.size=t,this.has=r,this.keys=n};SetRecord.prototype={getIterator:function(){return anObject$4(call$b(this.keys,this.set))},includes:function(e){return call$b(this.has,this.set,e)}};var getSetRecord$7=function(e){anObject$4(e);var t=+e.size;if(t!=t)throw $TypeError$3("Invalid size");return new SetRecord(e,max(toIntegerOrInfinity$1(t),0),aCallable$1(e.has),aCallable$1(e.keys))},aSet$f=aSet$g,SetHelpers$4=setHelpers,clone$2=setClone,size$4=setSize,getSetRecord$6=getSetRecord$7,iterateSet$2=setIterate,iterateSimple$5=iterateSimple$8,has$4=SetHelpers$4.has,remove$2=SetHelpers$4.remove,setDifference=function(e){var t=aSet$f(this),r=getSetRecord$6(e),n=clone$2(t);return size$4(t)<=r.size?iterateSet$2(t,(function(e){r.includes(e)&&remove$2(n,e)})):iterateSimple$5(r.getIterator(),(function(e){has$4(t,e)&&remove$2(n,e)})),n},setMethodAcceptSetLike$7=function(){return!1},$$x=_export,difference2=setDifference,setMethodAcceptSetLike$6=setMethodAcceptSetLike$7;$$x({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$6()},{difference:difference2});var aSet$e=aSet$g,SetHelpers$3=setHelpers,size$3=setSize,getSetRecord$5=getSetRecord$7,iterateSet$1=setIterate,iterateSimple$4=iterateSimple$8,Set$3=SetHelpers$3.Set,add$5=SetHelpers$3.add,has$3=SetHelpers$3.has,setIntersection=function(e){var t=aSet$e(this),r=getSetRecord$5(e),n=new Set$3;return size$3(t)>r.size?iterateSimple$4(r.getIterator(),(function(e){has$3(t,e)&&add$5(n,e)})):iterateSet$1(t,(function(e){r.includes(e)&&add$5(n,e)})),n},$$w=_export,intersection2=setIntersection,setMethodAcceptSetLike$5=setMethodAcceptSetLike$7,INCORRECT=!setMethodAcceptSetLike$5();$$w({target:"Set",proto:!0,real:!0,forced:INCORRECT},{intersection:intersection2});var aSet$d=aSet$g,has$2=setHelpers.has,size$2=setSize,getSetRecord$4=getSetRecord$7,iterateSet=setIterate,iterateSimple$3=iterateSimple$8,iteratorClose$1=iteratorClose$4,setIsDisjointFrom=function(e){var t=aSet$d(this),r=getSetRecord$4(e);if(size$2(t)<=r.size)return!1!==iterateSet(t,(function(e){if(r.includes(e))return!1}),!0);var n=r.getIterator();return!1!==iterateSimple$3(n,(function(e){if(has$2(t,e))return iteratorClose$1(n,"normal",!1)}))},$$v=_export,isDisjointFrom2=setIsDisjointFrom,setMethodAcceptSetLike$4=setMethodAcceptSetLike$7;$$v({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$4()},{isDisjointFrom:isDisjointFrom2});var aSet$c=aSet$g,size$1=setSize,iterate$9=setIterate,getSetRecord$3=getSetRecord$7,setIsSubsetOf=function(e){var t=aSet$c(this),r=getSetRecord$3(e);return!(size$1(t)>r.size)&&!1!==iterate$9(t,(function(e){if(!r.includes(e))return!1}),!0)},$$u=_export,isSubsetOf2=setIsSubsetOf,setMethodAcceptSetLike$3=setMethodAcceptSetLike$7;$$u({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$3()},{isSubsetOf:isSubsetOf2});var aSet$b=aSet$g,has$1=setHelpers.has,size2=setSize,getSetRecord$2=getSetRecord$7,iterateSimple$2=iterateSimple$8,iteratorClose=iteratorClose$4,setIsSupersetOf=function(e){var t=aSet$b(this),r=getSetRecord$2(e);if(size2(t)<r.size)return!1;var n=r.getIterator();return!1!==iterateSimple$2(n,(function(e){if(!has$1(t,e))return iteratorClose(n,"normal",!1)}))},$$t=_export,isSupersetOf2=setIsSupersetOf,setMethodAcceptSetLike$2=setMethodAcceptSetLike$7;$$t({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$2()},{isSupersetOf:isSupersetOf2});var aSet$a=aSet$g,SetHelpers$2=setHelpers,clone$1=setClone,getSetRecord$1=getSetRecord$7,iterateSimple$1=iterateSimple$8,add$4=SetHelpers$2.add,has3=SetHelpers$2.has,remove$1=SetHelpers$2.remove,setSymmetricDifference=function(e){var t=aSet$a(this),r=getSetRecord$1(e).getIterator(),n=clone$1(t);return iterateSimple$1(r,(function(e){has3(t,e)?remove$1(n,e):add$4(n,e)})),n},$$s=_export,symmetricDifference2=setSymmetricDifference,setMethodAcceptSetLike$1=setMethodAcceptSetLike$7;$$s({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$1()},{symmetricDifference:symmetricDifference2});var aSet$9=aSet$g,add$3=setHelpers.add,clone=setClone,getSetRecord=getSetRecord$7,iterateSimple=iterateSimple$8,setUnion=function(e){var t=aSet$9(this),r=getSetRecord(e).getIterator(),n=clone(t);return iterateSimple(r,(function(e){add$3(n,e)})),n},$$r=_export,union2=setUnion,setMethodAcceptSetLike=setMethodAcceptSetLike$7;$$r({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike()},{union:union2});var parent$1=set$4,set$3=parent$1,$$q=_export,from5=collectionFrom;$$q({target:"Set",stat:!0,forced:!0},{from:from5});var $$p=_export,of2=collectionOf;$$p({target:"Set",stat:!0,forced:!0},{of:of2});var $$o=_export,aSet$8=aSet$g,add$2=setHelpers.add;$$o({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=aSet$8(this),t=0,r=arguments.length;t<r;t++)add$2(e,arguments[t]);return e}});var $$n=_export,aSet$7=aSet$g,remove=setHelpers.remove;$$n({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aSet$7(this),r=!0,n=0,o=arguments.length;n<o;n++)e=remove(t,arguments[n]),r=r&&e;return!!r}});var $$m=_export,bind$5=functionBindContext,aSet$6=aSet$g,iterate$8=setIterate;$$m({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=aSet$6(this),r=bind$5(e,arguments.length>1?arguments[1]:void 0);return!1!==iterate$8(t,(function(e){if(!r(e,e,t))return!1}),!0)}});var classof$4=classof$n,hasOwn$3=hasOwnProperty_1,isNullOrUndefined$4=isNullOrUndefined$c,wellKnownSymbol$3=wellKnownSymbol$C,Iterators=iterators,ITERATOR=wellKnownSymbol$3("iterator"),$Object=Object,isIterable$1=function(e){if(isNullOrUndefined$4(e))return!1;var t=$Object(e);return void 0!==t[ITERATOR]||"@@iterator"in t||hasOwn$3(Iterators,classof$4(t))},getBuiltIn=getBuiltIn$l,isCallable$2=isCallable$A,isIterable=isIterable$1,isObject$4=isObject$w,Set$2=getBuiltIn("Set"),isSetLike=function(e){return isObject$4(e)&&"number"==typeof e.size&&isCallable$2(e.has)&&isCallable$2(e.keys)},toSetLike$7=function(e){return isSetLike(e)?e:isIterable(e)?new Set$2(e):e},$$l=_export,call$a=functionCall,toSetLike$6=toSetLike$7,$difference=setDifference;$$l({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return call$a($difference,this,toSetLike$6(e))}});var $$k=_export,bind$4=functionBindContext,aSet$5=aSet$g,SetHelpers$1=setHelpers,iterate$7=setIterate,Set$1=SetHelpers$1.Set,add$1=SetHelpers$1.add;$$k({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aSet$5(this),r=bind$4(e,arguments.length>1?arguments[1]:void 0),n=new Set$1;return iterate$7(t,(function(e){r(e,e,t)&&add$1(n,e)})),n}});var $$j=_export,bind$3=functionBindContext,aSet$4=aSet$g,iterate$6=setIterate;$$j({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=aSet$4(this),r=bind$3(e,arguments.length>1?arguments[1]:void 0),n=iterate$6(t,(function(e){if(r(e,e,t))return{value:e}}),!0);return n&&n.value}});var $$i=_export,call$9=functionCall,toSetLike$5=toSetLike$7,$intersection=setIntersection;$$i({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return call$9($intersection,this,toSetLike$5(e))}});var $$h=_export,call$8=functionCall,toSetLike$4=toSetLike$7,$isDisjointFrom=setIsDisjointFrom;$$h({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return call$8($isDisjointFrom,this,toSetLike$4(e))}});var $$g=_export,call$7=functionCall,toSetLike$3=toSetLike$7,$isSubsetOf=setIsSubsetOf;$$g({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return call$7($isSubsetOf,this,toSetLike$3(e))}});var $$f=_export,call$6=functionCall,toSetLike$2=toSetLike$7,$isSupersetOf=setIsSupersetOf;$$f({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return call$6($isSupersetOf,this,toSetLike$2(e))}});var $$e=_export,uncurryThis$6=functionUncurryThis,aSet$3=aSet$g,iterate$5=setIterate,toString$7=toString$p,arrayJoin=uncurryThis$6([].join),push$1=uncurryThis$6([].push);$$e({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=aSet$3(this),r=void 0===e?",":toString$7(e),n=[];return iterate$5(t,(function(e){push$1(n,e)})),arrayJoin(n,r)}});var $$d=_export,bind$2=functionBindContext,aSet$2=aSet$g,SetHelpers=setHelpers,iterate$4=setIterate,Set=SetHelpers.Set,add=SetHelpers.add;$$d({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=aSet$2(this),r=bind$2(e,arguments.length>1?arguments[1]:void 0),n=new Set;return iterate$4(t,(function(e){add(n,r(e,e,t))})),n}});var $$c=_export,aCallable=aCallable$n,aSet$1=aSet$g,iterate$3=setIterate,$TypeError$2=TypeError;$$c({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aSet$1(this),r=arguments.length<2,n=r?void 0:arguments[1];if(aCallable(e),iterate$3(t,(function(o){r?(r=!1,n=o):n=e(n,o,o,t)})),r)throw $TypeError$2("Reduce of empty set with no initial value");return n}});var $$b=_export,bind$1=functionBindContext,aSet=aSet$g,iterate$2=setIterate;$$b({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=aSet(this),r=bind$1(e,arguments.length>1?arguments[1]:void 0);return!0===iterate$2(t,(function(e){if(r(e,e,t))return!0}),!0)}});var $$a=_export,call$5=functionCall,toSetLike$1=toSetLike$7,$symmetricDifference=setSymmetricDifference;$$a({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return call$5($symmetricDifference,this,toSetLike$1(e))}});var $$9=_export,call$4=functionCall,toSetLike=toSetLike$7,$union=setUnion;$$9({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return call$4($union,this,toSetLike(e))}});var parent=set$3,set$2=parent,set$1=set$2,set4=set$1,_Set=getDefaultExportFromCjs(set4),internalMetadata={exports:{}},objectGetOwnPropertyNamesExternal={},classof$3=classofRaw$5,toIndexedObject=toIndexedObject$l,$getOwnPropertyNames=objectGetOwnPropertyNames$1.f,arraySlice$1=arraySliceSimple,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return $getOwnPropertyNames(e)}catch(e){return arraySlice$1(windowNames)}};objectGetOwnPropertyNamesExternal.f=function(e){return windowNames&&"Window"==classof$3(e)?getWindowNames(e):$getOwnPropertyNames(toIndexedObject(e))};var fails$7=fails$1i,arrayBufferNonExtensible=fails$7((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$6=fails$1i,isObject$3=isObject$I,classof$2=classofRaw$5,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES=fails$6((function(){$isExtensible(1)})),objectIsExtensible=FAILS_ON_PRIMITIVES||ARRAY_BUFFER_NON_EXTENSIBLE?function(e){return!!isObject$3(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE||"ArrayBuffer"!=classof$2(e))&&(!$isExtensible||$isExtensible(e)))}:$isExtensible,fails$5=fails$1i,freezing=!fails$5((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$8=_export$1,uncurryThis$5=functionUncurryThis$1,hiddenKeys=hiddenKeys$c,isObject$2=isObject$I,hasOwn$2=hasOwnProperty_1$1,defineProperty$2=objectDefineProperty$1.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames$1,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible3=objectIsExtensible,uid=uid$9,FREEZING=freezing,REQUIRED=!1,METADATA=uid("meta"),id=0,setMetadata=function(e){defineProperty$2(e,METADATA,{value:{objectID:"O"+id++,weakData:{}}})},fastKey$1=function(e,t){if(!isObject$2(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn$2(e,METADATA)){if(!isExtensible3(e))return"F";if(!t)return"E";setMetadata(e)}return e[METADATA].objectID},getWeakData=function(e,t){if(!hasOwn$2(e,METADATA)){if(!isExtensible3(e))return!0;if(!t)return!1;setMetadata(e)}return e[METADATA].weakData},onFreeze=function(e){return FREEZING&&REQUIRED&&isExtensible3(e)&&!hasOwn$2(e,METADATA)&&setMetadata(e),e},enable=function(){meta.enable=function(){},REQUIRED=!0;var e=getOwnPropertyNamesModule.f,t=uncurryThis$5([].splice),r={};r[METADATA]=1,e(r).length&&(getOwnPropertyNamesModule.f=function(r){for(var n=e(r),o=0,a=n.length;o<a;o++)if(n[o]===METADATA){t(n,o,1);break}return n},$$8({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule.f}))},meta=internalMetadata.exports={enable:enable,fastKey:fastKey$1,getWeakData:getWeakData,onFreeze:onFreeze};hiddenKeys[METADATA]=!0;var internalMetadataExports=internalMetadata.exports,$$7=_export$1,global$5=global$13,uncurryThis$4=functionUncurryThis$1,isForced$1=isForced_1$1,defineBuiltIn$2=defineBuiltIn$p,InternalMetadataModule=internalMetadataExports,iterate$1=iterate$z,anInstance$1=anInstance$d,isCallable$1=isCallable$V,isNullOrUndefined$3=isNullOrUndefined$h,isObject$1=isObject$I,fails$4=fails$1i,checkCorrectnessOfIteration=checkCorrectnessOfIteration$7,setToStringTag=setToStringTag$h,inheritIfRequired$1=inheritIfRequired$4,collection$1=function(e,t,r){var n=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=n?"set":"add",i=global$5[e],s=i&&i.prototype,c=i,l={},u=function(e){var t=uncurryThis$4(s[e]);defineBuiltIn$2(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!isObject$1(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!isObject$1(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!isObject$1(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(isForced$1(e,!isCallable$1(i)||!(o||s.forEach&&!fails$4((function(){(new i).entries().next()})))))c=r.getConstructor(t,e,n,a),InternalMetadataModule.enable();else if(isForced$1(e,!0)){var $=new c,p=$[a](o?{}:-0,1)!=$,f=fails$4((function(){$.has(1)})),d=checkCorrectnessOfIteration((function(e){new i(e)})),y=!o&&fails$4((function(){for(var e=new i,t=5;t--;)e[a](t,t);return!e.has(-0)}));d||((c=t((function(e,t){anInstance$1(e,s);var r=inheritIfRequired$1(new i,e,c);return isNullOrUndefined$3(t)||iterate$1(t,r[a],{that:r,AS_ENTRIES:n}),r}))).prototype=s,s.constructor=c),(f||y)&&(u("delete"),u("has"),n&&u("get")),(y||p)&&u(a),o&&s.clear&&delete s.clear}return l[e]=c,$$7({global:!0,constructor:!0,forced:c!=i},l),setToStringTag(c,e),o||r.setStrong(c,e,n),c},defineProperty$1=objectDefineProperty$1.f,create5=objectCreate$1,defineBuiltIns=defineBuiltIns$3,bind2=functionBindContext$1,anInstance=anInstance$d,isNullOrUndefined$2=isNullOrUndefined$h,iterate=iterate$z,defineIterator=iteratorDefine$1,createIterResultObject=createIterResultObject$7,setSpecies$2=setSpecies$8,DESCRIPTORS$3=descriptors$1,fastKey=internalMetadataExports.fastKey,InternalStateModule=internalState$1,setInternalState=InternalStateModule.set,internalStateGetterFor=InternalStateModule.getterFor,collectionStrong$1={getConstructor:function(e,t,r,n){var o=e((function(e,o){anInstance(e,a),setInternalState(e,{type:t,index:create5(null),first:void 0,last:void 0,size:0}),DESCRIPTORS$3||(e.size=0),isNullOrUndefined$2(o)||iterate(o,e[n],{that:e,AS_ENTRIES:r})})),a=o.prototype,i=internalStateGetterFor(t),s=function(e,t,r){var n,o,a=i(e),s=c(e,t);return s?s.value=r:(a.last=s={index:o=fastKey(t,!0),key:t,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=s),n&&(n.next=s),DESCRIPTORS$3?a.size++:e.size++,"F"!==o&&(a.index[o]=s)),e},c=function(e,t){var r,n=i(e),o=fastKey(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return defineBuiltIns(a,{clear:function(){for(var e=i(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,DESCRIPTORS$3?e.size=0:this.size=0},delete:function(e){var t=this,r=i(t),n=c(t,e);if(n){var o=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=o),o&&(o.previous=a),r.first==n&&(r.first=o),r.last==n&&(r.last=a),DESCRIPTORS$3?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=i(this),n=bind2(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),defineBuiltIns(a,r?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),DESCRIPTORS$3&&defineProperty$1(a,"size",{get:function(){return i(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=internalStateGetterFor(t),a=internalStateGetterFor(n);defineIterator(e,t,(function(e,t){setInternalState(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?createIterResultObject("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,createIterResultObject(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies$2(t)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong);var SeiService=function(){function e(t){var r=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_seiSet",new _Set),this.emitter=t,t.on(EVENT.SEI,(function(e){e&&r._seiSet.add(e)}))}return _createClass$1(e,[{key:"throw",value:function(e){var t,r=this;if(null!=e&&this._seiSet.size){var n=e-.2,o=e+.2,a=[];_forEachInstanceProperty(t=this._seiSet).call(t,(function(e){e.time>=n&&e.time<=o&&a.push(e)})),_forEachInstanceProperty(a).call(a,(function(e){r._seiSet.delete(e),r.emitter.emit(EVENT.SEI_IN_TIME,e)}))}}},{key:"reset",value:function(){this._seiSet.clear()}}]),e}(),BandwidthService=function(){function e(){_classCallCheck$1(this,e),_defineProperty$1(this,"_chunkSpeeds",[]),_defineProperty$1(this,"_speeds",[])}return _createClass$1(e,[{key:"addRecord",value:function(e,t){var r;e&&t&&(this._speeds.push(8e3*e/t),this._speeds=_sliceInstanceProperty(r=this._speeds).call(r,-3))}},{key:"addChunkRecord",value:function(e,t){var r;e&&t&&(this._chunkSpeeds.push(8e3*e/t),this._chunkSpeeds=_sliceInstanceProperty(r=this._chunkSpeeds).call(r,-100))}},{key:"getAvgSpeed",value:function(){var e,t;return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?_reduceInstanceProperty(t=this._speeds).call(t,(function(e,t){return e+t}))/this._speeds.length:_reduceInstanceProperty(e=this._chunkSpeeds).call(e,(function(e,t){return e+t}))/this._chunkSpeeds.length:0}},{key:"getLatestSpeed",value:function(){return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?this._speeds[this._speeds.length-1]:this._chunkSpeeds[this._chunkSpeeds.length-1]:0}},{key:"reset",value:function(){this._chunkSpeeds=[],this._speeds=[]}}]),e}(),Stats=function(){function e(t){_classCallCheck$1(this,e),_defineProperty$1(this,"encodeType",""),_defineProperty$1(this,"audioCodec",""),_defineProperty$1(this,"videoCodec",""),_defineProperty$1(this,"domain",""),_defineProperty$1(this,"fps",0),_defineProperty$1(this,"bitrate",0),_defineProperty$1(this,"width",0),_defineProperty$1(this,"height",0),_defineProperty$1(this,"samplerate",0),_defineProperty$1(this,"channelCount",0),_defineProperty$1(this,"gop",0),_defineProperty$1(this,"_bitsAccumulateSize",0),_defineProperty$1(this,"_bitsAccumulateDuration",0),this._timescale=t}return _createClass$1(e,[{key:"getStats",value:function(){return{encodeType:this.encodeType,audioCodec:this.audioCodec,videoCodec:this.videoCodec,domain:this.domain,fps:this.fps,bitrate:this.bitrate,width:this.width,height:this.height,samplerate:this.samplerate,channelCount:this.channelCount,gop:this.gop}}},{key:"setEncodeType",value:function(e){this.encodeType=e}},{key:"setVideoMeta",value:function(e){this.width=e.width,this.height=e.height,this.videoCodec=e.codec,this.encodeType=e.codecType,e.fpsNum&&e.fpsDen&&(this.fps=e.fpsNum/e.fpsDen)}},{key:"setAudioMeta",value:function(e){this.audioCodec=e.codec,this.samplerate=e.sampleRate,this.channelCount=e.channelCount}},{key:"setDomain",value:function(e){var t;this.domain=_sliceInstanceProperty(t=e.split("/")).call(t,2,3)[0]}},{key:"updateBitrate",value:function(e){var t=this;if(!this.fps||this.fps>=100){var r=e[0];null!=r&&r.duration&&(this.fps=Math.round(this._timescale/r.duration))}_forEachInstanceProperty(e).call(e,(function(e){var r;1===e.gopId&&t.gop++,t._bitsAccumulateDuration+=e.duration/(t._timescale/1e3),t._bitsAccumulateSize+=_reduceInstanceProperty(r=e.units).call(r,(function(e,t){return e+t.length}),0),t._bitsAccumulateDuration>=1e3&&(t.bitrate=8*t._bitsAccumulateSize,t._bitsAccumulateDuration=0,t._bitsAccumulateSize=0)}))}}]),e}(),MediaStatsService=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;_classCallCheck$1(this,e),_defineProperty$1(this,"_core",null),_defineProperty$1(this,"_samples",[]),this._core=t,this._timescale=r,this._stats=new Stats(r),this._bindEvents()}return _createClass$1(e,[{key:"getStats",value:function(){var e,t,r,n,o,a,i,s=(null===(e=this._core)||void 0===e?void 0:e.media)||{},c=s.currentTime,l=void 0===c?0:c,u=s.decodeFps,$=void 0===u?0:u;return _objectSpread2(_objectSpread2({},this._stats.getStats()),{},{downloadSpeed:(null===(t=this._core)||void 0===t||null===(r=t.speedInfo)||void 0===r?void 0:r.call(t).speed)||0,avgSpeed:(null===(n=this._core)||void 0===n||null===(o=n.speedInfo)||void 0===o?void 0:o.call(n).avgSpeed)||0,currentTime:l,bufferEnd:(null===(a=this._core)||void 0===a||null===(i=a.bufferInfo())||void 0===i?void 0:i.remaining)||0,decodeFps:$})}},{key:"_bindEvents",value:function(){var e=this;this._core.on(EVENT.DEMUXED_TRACK,(function(t){return e._stats.updateBitrate(t.samples)})),this._core.on(EVENT.METADATA_PARSED,(function(t){"video"===t.type?e._stats.setVideoMeta(t.track):e._stats.setAudioMeta(t.track)})),this._core.on(EVENT.TTFB,(function(t){e._stats.setDomain(t.responseUrl)}))}},{key:"reset",value:function(){this._samples=[],this._stats=new Stats(this._timescale)}}]),e}(),global$4=global$13,globalIsFinite=global$4.isFinite,numberIsFinite$1=Number.isFinite||function(e){return"number"==typeof e&&globalIsFinite(e)},$$6=_export$1,numberIsFinite=numberIsFinite$1;$$6({target:"Number",stat:!0},{isFinite:numberIsFinite});var $$5=_export$1,$find=arrayIteration$1.find,addToUnscopables$1=addToUnscopables$4,FIND="find",SKIPS_HOLES$1=!0;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}FIND in[]&&Array(1)[FIND]((function(){SKIPS_HOLES$1=!1})),$$5({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{find:function(e){return $find(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables$1(FIND);var isObject=isObject$I,classof$1=classofRaw$5,wellKnownSymbol$2=wellKnownSymbol$T,MATCH$2=wellKnownSymbol$2("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$2])?!!t:"RegExp"==classof$1(e))},isRegExp$2=isRegexp,$TypeError$1=TypeError,notARegexp=function(e){if(isRegExp$2(e))throw $TypeError$1("The method doesn't accept regular expressions");return e},wellKnownSymbol$1=wellKnownSymbol$T,MATCH$1=wellKnownSymbol$1("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH$1]=!1,"/./"[e](t)}catch(e){}}return!1},$$4=_export$1,uncurryThis$3=functionUncurryThis$1,notARegExp=notARegexp,requireObjectCoercible$4=requireObjectCoercible$i,toString$6=toString$v,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf$1=uncurryThis$3("".indexOf);$$4({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf$1(toString$6(requireObjectCoercible$4(this)),toString$6(notARegExp(e)),arguments.length>1?arguments[1]:void 0)}});var TrackType={VIDEO:"video",AUDIO:"audio",METADATA:"metadata"},VideoCodecType={AVC:"avc",HEVC:"hevc"},AudioCodecType={AAC:"aac",G711PCMA:"g7110a",G711PCMU:"g7110m"},WarningType={LARGE_AV_SHIFT:"LARGE_AV_SHIFT",LARGE_VIDEO_GAP:"LARGE_VIDEO_GAP",LARGE_VIDEO_GAP_BETWEEN_CHUNK:"LARGE_VIDEO_GAP_BETWEEN_CHUNK",LARGE_AUDIO_GAP:"LARGE_AUDIO_GAP",AUDIO_FILLED:"AUDIO_FILLED",AUDIO_DROPPED:"AUDIO_DROPPED"},VideoTrack=function(){function e(){_classCallCheck(this,e),_defineProperty(this,"id",1),_defineProperty(this,"type",TrackType.VIDEO),_defineProperty(this,"codecType",VideoCodecType.AVC),_defineProperty(this,"pid",-1),_defineProperty(this,"hvcC",void 0),_defineProperty(this,"codec",""),_defineProperty(this,"timescale",0),_defineProperty(this,"formatTimescale",0),_defineProperty(this,"sequenceNumber",0),_defineProperty(this,"baseMediaDecodeTime",0),_defineProperty(this,"baseDts",0),_defineProperty(this,"duration",0),_defineProperty(this,"warnings",[]),_defineProperty(this,"samples",[]),_defineProperty(this,"pps",[]),_defineProperty(this,"sps",[]),_defineProperty(this,"vps",[]),_defineProperty(this,"fpsNum",0),_defineProperty(this,"fpsDen",0),_defineProperty(this,"sarRatio",[]),_defineProperty(this,"width",0),_defineProperty(this,"height",0),_defineProperty(this,"nalUnitSize",4),_defineProperty(this,"present",!1),_defineProperty(this,"isVideoEncryption",!1),_defineProperty(this,"isAudioEncryption",!1),_defineProperty(this,"isVideo",!0),_defineProperty(this,"kid",null),_defineProperty(this,"pssh",null),_defineProperty(this,"ext",void 0)}return _createClass(e,[{key:"reset",value:function(){this.sequenceNumber=this.width=this.height=this.fpsDen=this.fpsNum=this.duration=this.baseMediaDecodeTime=this.timescale=0,this.codec="",this.present=!1,this.pid=-1,this.pps=[],this.sps=[],this.vps=[],this.sarRatio=[],this.samples=[],this.warnings=[],this.hvcC=null}},{key:"exist",value:function(){return!!(this.pps.length&&this.sps.length&&this.codec)}},{key:"hasSample",value:function(){return!!this.samples.length}},{key:"isEncryption",get:function(){return this.isVideoEncryption}}]),e}(),AudioTrack=function(){function e(){_classCallCheck(this,e),_defineProperty(this,"id",2),_defineProperty(this,"type",TrackType.AUDIO),_defineProperty(this,"codecType",AudioCodecType.AAC),_defineProperty(this,"pid",-1),_defineProperty(this,"codec",""),_defineProperty(this,"sequenceNumber",0),_defineProperty(this,"sampleDuration",0),_defineProperty(this,"timescale",0),_defineProperty(this,"formatTimescale",0),_defineProperty(this,"baseMediaDecodeTime",0),_defineProperty(this,"duration",0),_defineProperty(this,"warnings",[]),_defineProperty(this,"samples",[]),_defineProperty(this,"baseDts",0),_defineProperty(this,"sampleSize",16),_defineProperty(this,"sampleRate",0),_defineProperty(this,"channelCount",0),_defineProperty(this,"objectType",0),_defineProperty(this,"sampleRateIndex",0),_defineProperty(this,"config",[]),_defineProperty(this,"present",!1),_defineProperty(this,"isVideoEncryption",!1),_defineProperty(this,"isAudioEncryption",!1),_defineProperty(this,"kid",null),_defineProperty(this,"ext",void 0)}return _createClass(e,[{key:"reset",value:function(){this.sequenceNumber=0,this.timescale=0,this.sampleDuration=0,this.sampleRate=0,this.channelCount=0,this.baseMediaDecodeTime=0,this.present=!1,this.pid=-1,this.codec="",this.samples=[],this.config=[],this.warnings=[]}},{key:"exist",value:function(){return!!(this.sampleRate&&this.channelCount&&this.codec&&this.codecType===AudioCodecType.AAC)}},{key:"hasSample",value:function(){return!!this.samples.length}},{key:"isEncryption",get:function(){return this.isAudioEncryption}}]),e}(),VideoSample=function(){function e(t,r,n){_classCallCheck(this,e),_defineProperty(this,"flag",{}),_defineProperty(this,"keyframe",!1),_defineProperty(this,"gopId",0),_defineProperty(this,"duration",0),_defineProperty(this,"size",0),_defineProperty(this,"units",[]),_defineProperty(this,"chromaFormat",420),this.originPts=this.pts=t,this.originDts=this.dts=r,n&&(this.units=n)}return _createClass(e,[{key:"cts",get:function(){return this.pts-this.dts}},{key:"setToKeyframe",value:function(){this.keyframe=!0,this.flag.dependsOn=2,this.flag.isNonSyncSample=0}}]),e}(),AudioSample=_createClass((function e(t,r,n,o){_classCallCheck(this,e),_defineProperty(this,"duration",1024),_defineProperty(this,"flag",{dependsOn:2,isNonSyncSample:0}),_defineProperty(this,"keyframe",!0),this.originPts=this.pts=this.dts=t,this.data=r,this.size=r.byteLength,this.sampleOffset=o,n&&(this.duration=n)})),Sample=_createClass((function e(t,r){_classCallCheck(this,e),_defineProperty(this,"time",0),this.data=t,this.originPts=this.pts=r})),SeiSample=function(e){_inherits(r,Sample);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r)}(),MetadataTrack=function(){function e(){_classCallCheck(this,e),_defineProperty(this,"id",3),_defineProperty(this,"type",TrackType.METADATA),_defineProperty(this,"timescale",0),_defineProperty(this,"flvScriptSamples",[]),_defineProperty(this,"seiSamples",[])}return _createClass(e,[{key:"exist",value:function(){return!(!this.flvScriptSamples.length&&!this.seiSamples.length||!this.timescale)}},{key:"reset",value:function(){this.timescale=0,this.flvScriptSamples=[],this.seiSamples=[]}},{key:"hasSample",value:function(){return!(!this.flvScriptSamples.length&&!this.seiSamples.length)}}]),e}(),call$3=functionCall$1,hasOwn$1=hasOwnProperty_1$1,isPrototypeOf$1=objectIsPrototypeOf$1,regExpFlags$1=regexpFlags$1,RegExpPrototype$4=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$4||hasOwn$1(e,"flags")||!isPrototypeOf$1(RegExpPrototype$4,e)?t:call$3(regExpFlags$1,e)},PROPER_FUNCTION_NAME=functionName$1.PROPER,defineBuiltIn$1=defineBuiltIn$p,anObject$3=anObject$B,$toString=toString$v,fails$3=fails$1i,getRegExpFlags$1=regexpGetFlags,TO_STRING="toString",RegExpPrototype$3=RegExp.prototype,nativeToString=RegExpPrototype$3[TO_STRING],NOT_GENERIC=fails$3((function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})})),INCORRECT_NAME=PROPER_FUNCTION_NAME&&nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&defineBuiltIn$1(RegExp.prototype,TO_STRING,(function(){var e=anObject$3(this);return"/"+$toString(e.source)+"/"+$toString(getRegExpFlags$1(e))}),{unsafe:!0});var Logger$1=function(){function e(t){_classCallCheck(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]")}return _createClass(e,[{key:"warn",value:function(){var t;if(!e.disabled){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];(t=console).warn.apply(t,[this._prefix].concat(n))}}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();_defineProperty(Logger$1,"disabled",!0);var $$3=_export$1,call$2=functionCall$1,isCallable=isCallable$V,anObject$2=anObject$B,toString$5=toString$v,DELEGATES_TO_EXEC=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),nativeTest=/./.test;$$3({target:"RegExp",proto:!0,forced:!DELEGATES_TO_EXEC},{test:function(e){var t=anObject$2(this),r=toString$5(e),n=t.exec;if(!isCallable(n))return call$2(nativeTest,t,r);var o=call$2(n,t,r);return null!==o&&(anObject$2(o),!0)}});var isBrowser="undefined"!=typeof window,ua=isBrowser&&navigator.userAgent.toLocaleLowerCase(),isSafari=isBrowser&&/^((?!chrome|android).)*safari/.test(ua),isFirefox=isBrowser&&ua.includes("firefox"),isAndroid=isBrowser&&ua.includes("android"),AAC=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"getRateIndexByRate",value:function(t){return e.FREQ.indexOf(t)}},{key:"parseADTS",value:function(t,r){for(var n=t.length,o=0;o+2<n&&(255!==t[o]||240!=(246&t[o+1]));)o++;if(!(o>=n)){var a=o,i=[],s=(60&t[o+2])>>>2,c=e.FREQ[s];if(!c)throw new Error("Invalid sampling index: ".concat(s));for(var l,u,$=1+((192&t[o+2])>>>6),p=(1&t[o+2])<<2|(192&t[o+3])>>>6,f=e._getConfig(s,p,$),d=f.config,y=f.codec,h=0,g=e.getFrameDuration(c);o+7<n;)if(255===t[o]&&240==(246&t[o+1])){if(n-o<(u=(3&t[o+3])<<11|t[o+4]<<3|(224&t[o+5])>>5))break;l=2*(1&~t[o+1]),i.push({pts:r+h*g,data:t.subarray(o+7+l,o+u)}),h++,o+=u}else o++;return{skip:a,remaining:o>=n?void 0:t.subarray(o),frames:i,samplingFrequencyIndex:s,sampleRate:c,objectType:$,channelCount:p,codec:y,config:d,originCodec:"mp4a.40.".concat($)}}}},{key:"parseAudioSpecificConfig",value:function(t){if(t.length){var r=t[0]>>>3,n=(7&t[0])<<1|t[1]>>>7,o=(120&t[1])>>>3,a=e.FREQ[n];if(a){var i=e._getConfig(n,o,r);return{samplingFrequencyIndex:n,sampleRate:a,objectType:r,channelCount:o,config:i.config,codec:i.codec,originCodec:"mp4a.40.".concat(r)}}}}},{key:"getFrameDuration",value:function(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}},{key:"_getConfig",value:function(e,t,r){var n,o,a=[];return isFirefox?e>=6?(n=5,o=e-3):(n=2,o=e):isAndroid?(n=2,o=e):(n=2===r||5===r?r:5,o=e,e>=6?o=e-3:1===t&&(n=2,o=e)),a[0]=n<<3,a[0]|=(14&e)>>1,a[1]=(1&e)<<7,a[1]|=t<<3,5===n&&(a[1]|=(14&o)>>1,a[2]=(1&o)<<7,a[2]|=8,a[3]=0),{config:a,codec:"mp4a.40.".concat(n)}}},{key:"getSilentFrame",value:function(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])}}}]),e}();function concatUint8Array(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t=t.filter(Boolean);var n=new Uint8Array(t.reduce((function(e,t){return e+t.byteLength}),0)),o=0;return t.forEach((function(e){n.set(e,o),o+=e.byteLength})),n}_defineProperty(AAC,"FREQ",[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);var MAX_SIZE=Math.pow(2,32);function readBig16(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<8)+(e[t+1]||0)}function readBig24(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<16)+(e[t+1]<<8)+(e[t+2]||0)}function readBig32(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function readBig64(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return readBig32(e,t)*MAX_SIZE+readBig32(e,t+4)}function getAvcCodec(e){for(var t,r="avc1.",n=0;n<3;n++)(t=e[n].toString(16)).length<2&&(t="0".concat(t)),r+=t;return r}function parse(e){if(!Array.isArray(e)){for(var t=[],r="",n=0;n<e.length;n++)n%2&&(r=e[n-1]+e[n],t.push(parseInt(r,16)),r="");return t}return e.map((function(e){return parseInt(e,16)}))}var NALu=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"parseAnnexB",value:function(e){for(var t=e.length,r=2,n=0;null!==e[r]&&void 0!==e[r]&&1!==e[r];)r++;if((n=++r+2)>=t)return[];for(var o=[];n<t;)switch(e[n]){case 0:if(0!==e[n-1]){n+=2;break}if(0!==e[n-2]){n++;break}r!==n-2&&o.push(e.subarray(r,n-2));do{n++}while(1!==e[n]&&n<t);n=(r=n+1)+2;break;case 1:if(0!==e[n-1]||0!==e[n-2]){n+=3;break}r!==n-2&&o.push(e.subarray(r,n-2)),n=(r=n+1)+2;break;default:n+=3}return r<t&&o.push(e.subarray(r)),o}},{key:"parseAvcC",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r,n=e.length,o=[],a=0;a+t<n;)if(r=readBig32(e,a),3===t&&(r>>>=8),a+=t,r){if(a+r>n)break;o.push(e.subarray(a,a+r)),a+=r}return o}}},{key:"parseSEI",value:function(e,t){for(var r=e.length,n=t?2:1,o=0,a=0,i="";255===e[n];)o+=255,n++;for(o+=e[n++];255===e[n];)a+=255,n++;if(a+=e[n++],5===o&&r>n+16)for(var s=0;s<16;s++)i+=e[n].toString(16),n++;return{payload:e.subarray(n),type:o,size:a,uuid:i}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(!r.length)return e;var o=t-r.length,a=new Uint8Array(o),i=0;for(n=0;n<o;i++,n++)i===r[0]&&(i++,r.shift()),a[n]=e[i];return a}}]),e}(),ExpGolomb=function(){function e(t){if(_classCallCheck(this,e),_defineProperty(this,"_bytesAvailable",void 0),_defineProperty(this,"_bitsAvailable",0),_defineProperty(this,"_word",0),!t)throw new Error("ExpGolomb data params is required");this._data=t,this._bytesAvailable=t.byteLength,this._bytesAvailable&&this._loadWord()}return _createClass(e,[{key:"_loadWord",value:function(){var e=this._data.byteLength-this._bytesAvailable,t=Math.min(4,this._bytesAvailable);if(0===t)throw new Error("No bytes available");var r=new Uint8Array(4);r.set(this._data.subarray(e,e+t)),this._word=new DataView(r.buffer).getUint32(0),this._bitsAvailable=8*t,this._bytesAvailable-=t}},{key:"skipBits",value:function(e){if(this._bitsAvailable>e)this._word<<=e,this._bitsAvailable-=e;else{e-=this._bitsAvailable;var t=Math.floor(e/8);e-=8*t,this._bytesAvailable-=t,this._loadWord(),this._word<<=e,this._bitsAvailable-=e}}},{key:"readBits",value:function(e){if(e>32)throw new Error("Cannot read more than 32 bits");var t=Math.min(this._bitsAvailable,e),r=this._word>>>32-t;return this._bitsAvailable-=t,this._bitsAvailable>0?this._word<<=t:this._bytesAvailable>0&&this._loadWord(),(t=e-t)>0&&this._bitsAvailable?r<<t|this.readBits(t):r}},{key:"skipLZ",value:function(){var e;for(e=0;e<this._bitsAvailable;++e)if(0!=(this._word&2147483648>>>e))return this._word<<=e,this._bitsAvailable-=e,e;return this._loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(e){for(var t=8,r=8,n=0;n<e;n++)0!==r&&(r=(t+this.readEG()+256)%256),t=0===r?t:r}}]),e}(),AVC=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"parseAVCDecoderConfigurationRecord",value:function(t){if(!(t.length<7)){for(var r,n,o=1+(3&t[4]),a=[],i=[],s=6,c=31&t[5],l=0;l<c;l++)if(n=t[s]<<8|t[s+1],s+=2,n){var u=t.subarray(s,s+n);s+=n,a.push(u),r||(r=e.parseSPS(NALu.removeEPB(u)))}var $,p=t[s];s++;for(var f=0;f<p;f++)$=t[s]<<8|t[s+1],s+=2,$&&(i.push(t.subarray(s,s+$)),s+=$);return{sps:r,spsArr:a,ppsArr:i,nalUnitSize:o}}}},{key:"parseSPS",value:function(e){var t=new ExpGolomb(e);t.readUByte();var r=t.readUByte(),n=t.readUByte(),o=t.readUByte();t.skipUEG();var a=420;if(100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r||138===r||144===r){var i=t.readUEG();if(i<=3&&(a=[0,420,422,444][i]),3===i&&t.skipBits(1),t.skipUEG(),t.skipUEG(),t.skipBits(1),t.readBool())for(var s=3!==i?8:12,c=0;c<s;c++)t.readBool()&&(c<6?t.skipScalingList(16):t.skipScalingList(64))}t.skipUEG();var l=t.readUEG();if(0===l)t.readUEG();else if(1===l){t.skipBits(1),t.skipUEG(),t.skipUEG();for(var u=t.readUEG(),$=0;$<u;$++)t.skipUEG()}t.skipUEG(),t.skipBits(1);var p=t.readUEG(),f=t.readUEG(),d=t.readBits(1);0===d&&t.skipBits(1),t.skipBits(1);var y,h,g,m,_,S=0,b=0,v=0,E=0;if(t.readBool()&&(S=t.readUEG(),b=t.readUEG(),v=t.readUEG(),E=t.readUEG()),t.readBool()){if(t.readBool())switch(t.readUByte()){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:y=[t.readUByte()<<8|t.readUByte(),t.readUByte()<<8|t.readUByte()]}if(t.readBool()&&t.readBool(),t.readBool()&&(t.readBits(4),t.readBool()&&t.readBits(24)),t.readBool()&&(t.readUEG(),t.readUEG()),t.readBool()){var T=t.readBits(32),I=t.readBits(32);h=t.readBool(),_=(g=I)/(m=2*T)}}return{codec:getAvcCodec(e.subarray(1,4)),profileIdc:r,profileCompatibility:n,levelIdc:o,chromaFormat:a,width:Math.ceil(16*(p+1)-2*(S+b)),height:(2-d)*(f+1)*16-(d?2:4)*(v+E),sarRatio:y,fpsNum:g,fpsDen:m,fps:_,fixedFrame:h}}}]),e}(),HEVC=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"parseHEVCDecoderConfigurationRecord",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t.length<23)){r=r||{};for(var n,o,a,i,s,c=1+(3&t[21]),l=[],u=[],$=[],p=23,f=t[22],d=0;d<f;d++){a=63&t[p],i=t[p+1]<<8|t[p+2],p+=3;for(var y=0;y<i;y++)if(s=t[p]<<8|t[p+1],p+=2,s){switch(a){case 32:var h=t.subarray(p,p+s);n||(n=e.parseVPS(NALu.removeEPB(h),r)),$.push(h);break;case 33:var g=t.subarray(p,p+s);o||(o=e.parseSPS(NALu.removeEPB(g),r)),l.push(g);break;case 34:u.push(t.subarray(p,p+s))}p+=s}}return{hvcC:r,sps:o,spsArr:l,ppsArr:u,vpsArr:$,nalUnitSize:c}}}},{key:"parseVPS",value:function(t,r){r=r||{};var n=new ExpGolomb(t);n.readUByte(),n.readUByte(),n.readBits(12);var o=n.readBits(3);return r.numTemporalLayers=Math.max(r.numTemporalLayers||0,o+1),n.readBits(17),e._parseProfileTierLevel(n,o,r),r}},{key:"parseSPS",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r=r||{};var n=new ExpGolomb(t);n.readUByte(),n.readUByte(),n.readBits(4);var o=n.readBits(3);r.numTemporalLayers=Math.max(o+1,r.numTemporalLayers||0),r.temporalIdNested=n.readBits(1),e._parseProfileTierLevel(n,o,r),n.readUEG();var a=r.chromaFormatIdc=n.readUEG(),i=420;a<=3&&(i=[0,420,422,444][a]);var s=0;3===a&&(s=n.readBits(1));var c,l,u,$,p=n.readUEG(),f=n.readUEG(),d=n.readBits(1);(1===d&&(c=n.readUEG(),l=n.readUEG(),u=n.readUEG(),$=n.readUEG()),r.bitDepthLumaMinus8=n.readUEG(),r.bitDepthChromaMinus8=n.readUEG(),1===d)&&(p-=(1!==a&&2!==a||0!==s?1:2)*(l+c),f-=(1===a&&0===s?2:1)*($+u));return{codec:"hev1.1.6.L93.B0",width:p,height:f,chromaFormat:i,hvcC:r}}},{key:"_parseProfileTierLevel",value:function(e,t,r){var n=r.generalTierFlag||0;r.generalProfileSpace=e.readBits(2),r.generalTierFlag=Math.max(e.readBits(1),n),r.generalProfileIdc=Math.max(e.readBits(5),r.generalProfileIdc||0),r.generalProfileCompatibilityFlags=e.readBits(32),r.generalConstraintIndicatorFlags=[e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8)];var o=e.readBits(8);n<r.generalTierFlag?r.generalLevelIdc=o:r.generalLevelIdc=Math.max(o,r.generalLevelIdc||0);for(var a=[],i=[],s=0;s<t;s++)a[s]=e.readBits(1),i[s]=e.readBits(1);t>0&&e.readBits(2*(8-t));for(var c=0;c<t;c++)0!==a[c]&&(e.readBits(2),e.readBits(1),e.readBits(5),e.readBits(16),e.readBits(16),e.readBits(4),e.readBits(16),e.readBits(16),e.readBits(12)),0!==i[c]&&e.readBits(8)}}]),e}(),LARGE_AV_FIRST_FRAME_GAP=45e3,AUDIO_GAP_OVERLAP_THRESHOLD_COUNT=3,MAX_SILENT_FRAME_DURATION=9e4,AUDIO_EXCETION_LOG_EMIT_DURATION=45e4,MAX_VIDEO_FRAME_DURATION=9e4,MAX_DTS_DELTA_WITH_NEXT_CHUNK=45e3,TsFixer=function(){function e(t,r,n){_classCallCheck(this,e),this.videoTrack=t,this.audioTrack=r,this.metadataTrack=n,this._baseDts=-1,this._baseDtsInited=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=!1,this._videoTimestampBreak=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this._lastAudioExceptionLargeGapDot=0}return _createClass(e,[{key:"fix",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t=Math.round(9e4*t);var o=this.videoTrack,a=this.audioTrack,i=o.samples,s=a.samples;if(i.length||s.length){var c=i[0],l=s[0],u=0;if(i.length&&s.length&&(u=c.dts-l.pts),this._baseDtsInited||this._calculateBaseDts(this.audioTrack,this.videoTrack),r&&(this._calculateBaseDts(this.audioTrack,this.videoTrack),this._baseDts-=t),!n){this._videoNextDts=u>0?t+u:t,this._audioNextPts=u>0?t:t-u;var $=c?c.dts-this._baseDts-this._videoNextDts:0,p=l?l.pts-this._baseDts-this._audioNextPts:0;Math.abs($||p)>MAX_VIDEO_FRAME_DURATION&&(this._calculateBaseDts(this.audioTrack,this.videoTrack),this._baseDts-=t)}if(this._resetBaseDtsWhenStreamBreaked(),this._fixAudio(a),this._fixVideo(o),this.metadataTrack.exist()){var f=this.metadataTrack.timescale;this.metadataTrack.seiSamples.forEach((function(t){t.pts=t.originPts-e._baseDts,t.time=Math.max(0,t.pts)/f}))}o.samples.length&&(o.baseMediaDecodeTime=o.samples[0].dts),a.samples.length&&(a.baseMediaDecodeTime=a.samples[0].pts*a.timescale/9e4)}}},{key:"_fixVideo",value:function(e){var t=this,r=e.samples;if(r.length){if(r.forEach((function(e){e.dts-=t._baseDts,e.pts-=t._baseDts})),void 0===this._videoNextDts){var n=r[0];this._videoNextDts=n.dts}var o,a,i=r.length,s=0,c=r[0],l=r[1],u=this._videoNextDts-c.dts;if(Math.abs(u)>MAX_DTS_DELTA_WITH_NEXT_CHUNK)c.dts+=u,c.pts+=u,e.warnings.push({type:WarningType.LARGE_VIDEO_GAP_BETWEEN_CHUNK,nextDts:this._videoNextDts,firstSampleDts:c.dts,nextSampleDts:null===(o=r[1])||void 0===o?void 0:o.dts,sampleDuration:u}),l&&Math.abs(l.dts-c.dts)>MAX_VIDEO_FRAME_DURATION&&(this._videoTimestampBreak=!0,r.forEach((function(e,t){0!==t&&(e.dts+=u,e.pts+=u)})));if(e.fpsNum&&e.fpsDen)a=e.timescale*(e.fpsDen/e.fpsNum);else{var $=e.samples[0],p=e.samples[i-1];a=1===i?9e3:Math.floor((p.dts-$.dts)/(i-1))}for(var f=0;f<i;f++){var d=r[f].dts,y=r[f+1];if((s=f<i-1?y.dts-d:r[f-1]?Math.min(d-r[f-1].dts,a):a)>MAX_VIDEO_FRAME_DURATION||s<0){this._videoTimestampBreak=!0,s=this._audioTimestampBreak?a:Math.max(s,2700);var h=this._audioNextPts||0;y&&y.dts>h&&(s=a),e.warnings.push({type:WarningType.LARGE_VIDEO_GAP,time:d/e.timescale,dts:d,originDts:r[f].originDts,nextDts:this._videoNextDts,sampleDuration:s,refSampleDuration:a})}r[f].duration=s,this._videoNextDts+=s}}}},{key:"_fixAudio",value:function(e){var t=this,r=e.samples;r.length&&(r.forEach((function(e){e.pts-=t._baseDts,e.dts=e.pts})),this._doFixAudioInternal(e,r,9e4))}},{key:"_calculateBaseDts",value:function(e,t){var r=e.samples,n=t.samples;if(!r.length&&!n.length)return!1;var o=1/0,a=1/0;r.length&&(e.baseDts=o=r[0].pts),n.length&&(t.baseDts=a=n[0].dts),this._baseDts=Math.min(o,a);var i=a-o;return Number.isFinite(i)&&Math.abs(i)>LARGE_AV_FIRST_FRAME_GAP&&t.warnings.push({type:WarningType.LARGE_AV_SHIFT,videoBaseDts:a,audioBasePts:o,baseDts:this._baseDts,delta:i}),this._baseDtsInited=!0,!0}},{key:"_resetBaseDtsWhenStreamBreaked",value:function(){if(this._baseDtsInited&&this._videoTimestampBreak&&this._audioTimestampBreak){if(!this._calculateBaseDts(this.audioTrack,this.videoTrack))return;this._baseDts-=Math.min(this._audioNextPts,this._videoNextDts),this._audioLastSample=null,this._videoLastSample=null,this._videoTimestampBreak=!1,this._audioTimestampBreak=!1}}},{key:"_doFixAudioInternal",value:function(e,t,r){e.sampleDuration||(e.sampleDuration=AAC.getFrameDuration(e.timescale,r));var n=e.sampleDuration;if(void 0===this._audioNextPts){var o=t[0];this._audioNextPts=o.pts}for(var a=0;a<t.length;a++){var i=this._audioNextPts,s=t[a],c=s.pts-i;if(!this._audioTimestampBreak&&c>=AUDIO_GAP_OVERLAP_THRESHOLD_COUNT*n&&c<=MAX_SILENT_FRAME_DURATION&&!isSafari){var l=AAC.getSilentFrame(e.codec,e.channelCount)||t[0].data.subarray(),u=Math.floor(c/n);Math.abs(s.pts-this._lastAudioExceptionGapDot)>AUDIO_EXCETION_LOG_EMIT_DURATION&&(this._lastAudioExceptionGapDot=s.pts),e.warnings.push({type:WarningType.AUDIO_FILLED,pts:s.pts,originPts:s.originPts,count:u,nextPts:i,refSampleDuration:n});for(var $=0;$<u;$++){var p=new AudioSample(Math.floor(i),l);p.originPts=Math.floor(this._baseDts+i),t.splice(a,0,p),this._audioNextPts+=n,a++}a--}else c<=-AUDIO_GAP_OVERLAP_THRESHOLD_COUNT*n&&c>=-1*MAX_SILENT_FRAME_DURATION?(Math.abs(s.pts-this._lastAudioExceptionOverlapDot)>AUDIO_EXCETION_LOG_EMIT_DURATION&&(this._lastAudioExceptionOverlapDot=s.pts,e.warnings.push({type:WarningType.AUDIO_DROPPED,pts:s.pts,originPts:s.originPts,nextPts:i,refSampleDuration:n})),t.splice(a,1),a--):(Math.abs(c)>=MAX_SILENT_FRAME_DURATION&&(this._audioTimestampBreak=!0,Math.abs(s.pts-this._lastAudioExceptionLargeGapDot)>AUDIO_EXCETION_LOG_EMIT_DURATION&&(this._lastAudioExceptionLargeGapDot=s.pts,e.warnings.push({type:WarningType.LARGE_AUDIO_GAP,time:s.pts/1e3,pts:s.pts,originPts:s.originPts,nextPts:i,sampleDuration:c,refSampleDuration:n}))),s.dts=s.pts=i,this._audioNextPts+=n)}}}]),e}(),logger$3=new Logger$1("TsDemuxer"),TsDemuxer=function(){function e(t,r,n){_classCallCheck(this,e),_defineProperty(this,"_pmtId",-1),_defineProperty(this,"_remainingPacketData",null),_defineProperty(this,"_videoPesData",[]),_defineProperty(this,"_audioPesData",[]),_defineProperty(this,"_gopId",0),this.videoTrack=t||new VideoTrack,this.audioTrack=r||new AudioTrack,this.metadataTrack=n||new MetadataTrack,this._fixer=new TsFixer(this.videoTrack,this.audioTrack,this.metadataTrack)}return _createClass(e,[{key:"demux",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.audioTrack,o=this.videoTrack,a=this.metadataTrack;t&&(this._pmtId=-1,o.reset(),n.reset(),a.reset()),!r||t?(this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[]):(o.samples=[],n.samples=[],a.seiSamples=[],o.warnings=[],n.warnings=[],this._remainingPacketData&&(e=concatUint8Array(this._remainingPacketData,e),this._remainingPacketData=null));var i=e.length,s=i%188;s&&(this._remainingPacketData=e.subarray(i-s),i-=s);for(var c=o.pid,l=n.pid,u=0;u<i;u+=188){if(71!==e[u])throw new Error("TS packet did not start with 0x47");var $=!!(64&e[u+1]),p=((31&e[u+1])<<8)+e[u+2],f=void 0;if((48&e[u+3])>>4>1){if((f=u+5+e[u+4])===u+188)continue}else f=u+4;switch(p){case 0:$&&(f+=e[f]+1),this._pmtId=(31&e[f+10])<<8|e[f+11];break;case this._pmtId:$&&(f+=e[f]+1);var d=f+3+((15&e[f+1])<<8|e[f+2])-4;for(f+=12+((15&e[f+10])<<8|e[f+11]);f<d;){var y=(31&e[f+1])<<8|e[f+2];switch(e[f]){case 15:n.pid=l=y;break;case 27:if(-1!==c)break;o.codecType=VideoCodecType.AVC,o.pid=c=y;break;case 36:if(-1!==c)break;o.codecType=VideoCodecType.HEVC,o.pid=c=y;break;default:logger$3.warn("Unsupported stream. type: ".concat(e[f],", pid: ").concat(y))}f+=5+((15&e[f+3])<<8|e[f+4])}break;case c:$&&this._videoPesData.length&&this._parseVideoData(),this._videoPesData.push(e.subarray(f,u+188));break;case l:$&&this._audioPesData.length&&this._parseAudioData(),this._audioPesData.push(e.subarray(f,u+188));break;case 17:case 8191:break;default:logger$3.warn("Unknown pid: ".concat(p))}}return this._parseVideoData(),this._parseAudioData(),n.formatTimescale=o.formatTimescale=o.timescale=a.timescale=9e4,n.timescale=n.sampleRate||0,{videoTrack:o,audioTrack:n,metadataTrack:a}}},{key:"fix",value:function(e,t,r){return this._fixer.fix(e,t,r),{videoTrack:this.videoTrack,audioTrack:this.audioTrack,metadataTrack:this.metadataTrack}}},{key:"demuxAndFix",value:function(e,t,r,n){return this.demux(e,t,r),this.fix(n,t,r)}},{key:"_parseVideoData",value:function(){if(this._videoPesData.length){var t=e._parsePES(concatUint8Array.apply(void 0,_toConsumableArray(this._videoPesData)));if(t){var r=NALu.parseAnnexB(t.data);r?this._createVideoSample(r,t.pts,t.dts):logger$3.warn("Cannot parse avc units",t),this._videoPesData=[]}else logger$3.warn("Cannot parse video pes",this._videoPesData)}}},{key:"_createVideoSample",value:function(e,t,r){var n=this;if(e.length){var o=this.videoTrack,a=o.codecType===VideoCodecType.HEVC,i=new VideoSample(t,r);e.forEach((function(e){var r=a?e[0]>>>1&63:31&e[0];switch(r){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!a&&5!==r||a&&5===r)break;i.setToKeyframe(),n._gopId++;break;case 6:case 39:case 40:if(!a&&6!==r||a&&6===r)break;return void n.metadataTrack.seiSamples.push(new SeiSample(NALu.parseSEI(NALu.removeEPB(e),a),t));case 32:if(!a)break;if(!o.vps.length){var s=HEVC.parseVPS(NALu.removeEPB(e),o.hvcC);o.hvcC=o.hvcC||s,o.vps=[e]}break;case 7:case 33:if(!a&&7!==r||a&&7===r)break;if(!o.sps.length){var c=NALu.removeEPB(e),l=a?HEVC.parseSPS(c,o.hvcC):AVC.parseSPS(c);o.sps=[e],o.hvcC=o.hvcC||l.hvcC,o.codec=l.codec,o.width=l.width,o.height=l.height,o.sarRatio=l.sarRatio,o.fpsNum=l.fpsNum,o.fpsDen=l.fpsDen}break;case 8:case 34:if(!a&&8!==r||a&&8===r)break;o.pps.length||(o.pps=[e])}i.units.push(e)})),i.gopId=this._gopId,this._pushVideoSample(o,i)}}},{key:"_pushVideoSample",value:function(e,t){if(t.units.length)if(null===t.pts||void 0===t.pts){logger$3.warn("Video sample no pts",t);var r=e.samples[e.samples.length-1];r?(t.pts=r.pts,t.dts=r.dts):logger$3.warn("Drop video sample",t)}else e.samples.push(t)}},{key:"_parseAudioData",value:function(){if(this._audioPesData.length){var t=e._parsePES(concatUint8Array.apply(void 0,_toConsumableArray(this._audioPesData)));t?(this._parseAacData(t),this._audioPesData=[]):logger$3.warn("Cannot parse audio pes",this._audioPesData)}}},{key:"_parseAacData",value:function(e){var t=this.audioTrack,r=e.pts;if(null==r){if(logger$3.warn("AAC pes not pts",t),!t.samples.length||!t.sampleRate)return;r=t.samples[t.samples.length-1].pts+AAC.getFrameDuration(t.sampleRate)}var n,o=AAC.parseADTS(e.data,r);o?(t.codec=o.codec,t.channelCount=o.channelCount,t.sampleRate=o.sampleRate,t.objectType=o.objectType,t.sampleRateIndex=o.samplingFrequencyIndex,t.config=o.config,(n=t.samples).push.apply(n,_toConsumableArray(o.frames.map((function(e){return new AudioSample(e.pts,e.data)})))),o.skip&&logger$3.warn("Skip aac adts ".concat(o.skip," bits")),o.remaining&&logger$3.warn("Remaining aac adts ".concat(o.remaining," bits"))):logger$3.warn("Cannot parse aac adts",e)}}],[{key:"probe",value:function(e){return!!e.length&&(71===e[0]&&71===e[188]&&71===e[376])}},{key:"_parsePES",value:function(e){var t=e[8];if(!(null==t||e.length<t+9)&&1===(e[0]<<16|e[1]<<8|e[2])){var r=(e[4]<<8)+e[5];if(!(r&&r>e.length-6)){var n,o,a=e[7];return 192&a&&(n=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&a?n-(o=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(n=o):o=n),{data:e.subarray(9+t),pts:n,dts:o}}}}}]),e}(),global$3=global$13,DESCRIPTORS$2=descriptors$1,defineBuiltInAccessor$1=defineBuiltInAccessor$3,regExpFlags=regexpFlags$1,fails$2=fails$1i,RegExp$1=global$3.RegExp,RegExpPrototype$2=RegExp$1.prototype,FORCED=DESCRIPTORS$2&&fails$2((function(){var e=!0;try{RegExp$1(".","d")}catch(t){e=!1}var t={},r="",n=e?"dgimsy":"gimsy",o=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var i in e&&(a.hasIndices="d"),a)o(i,a[i]);return Object.getOwnPropertyDescriptor(RegExpPrototype$2,"flags").get.call(t)!==n||r!==n}));FORCED&&defineBuiltInAccessor$1(RegExpPrototype$2,"flags",{configurable:!0,get:regExpFlags});var toIntegerOrInfinity=toIntegerOrInfinity$i,toString$4=toString$v,requireObjectCoercible$3=requireObjectCoercible$i,$RangeError=RangeError,stringRepeat=function(e){var t=toString$4(requireObjectCoercible$3(this)),r="",n=toIntegerOrInfinity(e);if(n<0||n==1/0)throw $RangeError("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$2=functionUncurryThis$1,toLength$2=toLength$c,toString$3=toString$v,$repeat=stringRepeat,requireObjectCoercible$2=requireObjectCoercible$i,repeat3=uncurryThis$2($repeat),stringSlice$2=uncurryThis$2("".slice),ceil=Math.ceil,createMethod=function(e){return function(t,r,n){var o,a,i=toString$3(requireObjectCoercible$2(t)),s=toLength$2(r),c=i.length,l=void 0===n?" ":toString$3(n);return s<=c||""==l?i:((a=repeat3(l,ceil((o=s-c)/l.length))).length>o&&(a=stringSlice$2(a,0,o)),e?i+a:a+i)}},stringPad={start:createMethod(!1),end:createMethod(!0)},userAgent=engineUserAgent$1,stringPadWebkitBug=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent),$$2=_export$1,$padStart=stringPad.start,WEBKIT_BUG=stringPadWebkitBug;$$2({target:"String",proto:!0,forced:WEBKIT_BUG},{padStart:function(e){return $padStart(this,e,arguments.length>1?arguments[1]:void 0)}});var MP4Parser=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"findBox",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=[];if(!t)return o;for(var a=0,i="",s=0;t.length>7;){if(a=readBig32(t),i=String.fromCharCode.apply(null,t.subarray(4,8)),s=8,1===a?(a=readBig64(t,8),s+=8):a||(a=t.length),!r[0]||i===r[0]){var c=t.subarray(0,a);if(!(r.length<2))return e.findBox(c.subarray(s),r.slice(1),n+s);o.push({start:n,size:a,headerSize:s,type:i,data:c})}n+=a,t=t.subarray(a)}return o}},{key:"tfhd",value:function(e){return parseBox(e,!0,(function(e,t){e.trackId=readBig32(t);var r=4,n=1&e.flags,o=2&e.flags,a=8&e.flags,i=16&e.flags,s=32&e.flags;n&&(r+=4,e.baseDataOffset=readBig32(t,r),r+=4),o&&(e.sampleDescriptionIndex=readBig32(t,r),r+=4),a&&(e.defaultSampleDuration=readBig32(t,r),r+=4),i&&(e.defaultSampleSize=readBig32(t,r),r+=4),s&&(e.defaultSampleFlags=readBig32(t,r))}))}},{key:"sidx",value:function(e){return parseBox(e,!0,(function(e,t){var r=0;e.reference_ID=readBig32(t,r),r+=4,e.timescale=readBig32(t,r),r+=4,0===e.version?(e.earliest_presentation_time=readBig32(t,r),r+=4,e.first_offset=readBig32(t,r),r+=4):(e.earliest_presentation_time=readBig64(t,r),r+=8,e.first_offset=readBig64(t,r),r+=8),r+=2,e.references=[];var n=readBig16(t,r);r+=2;for(var o=0;o<n;o++){var a={};e.references.push(a);var i=readBig32(t,r);r+=4,a.reference_type=i>>31&1,a.referenced_size=2147483647&i,a.subsegment_duration=readBig32(t,r),i=readBig32(t,r+=4),r+=4,a.starts_with_SAP=i>>31&1,a.SAP_type=i>>28&7,a.SAP_delta_time=268435455&i}}))}},{key:"moov",value:function(t){return parseBox(t,!1,(function(t,r,n){t.mvhd=e.mvhd(e.findBox(r,["mvhd"],n)[0]),t.trak=e.findBox(r,["trak"],n).map((function(t){return e.trak(t)})),t.pssh=e.pssh(e.findBox(r,["pssh"],n)[0])}))}},{key:"mvhd",value:function(e){return parseBox(e,!0,(function(e,t){var r=0;1===e.version?(e.timescale=readBig32(t,16),e.duration=readBig64(t,20),r+=28):(e.timescale=readBig32(t,8),e.duration=readBig32(t,12),r+=16),e.nextTrackId=readBig32(t,r+76)}))}},{key:"trak",value:function(t){return parseBox(t,!1,(function(t,r,n){t.tkhd=e.tkhd(e.findBox(r,["tkhd"],n)[0]),t.mdia=e.mdia(e.findBox(r,["mdia"],n)[0])}))}},{key:"tkhd",value:function(e){return parseBox(e,!0,(function(e,t){var r=0;1===e.version?(e.trackId=readBig32(t,16),e.duration=readBig64(t,24),r+=32):(e.trackId=readBig32(t,8),e.duration=readBig32(t,16),r+=20),e.width=readBig32(t,r+52),e.height=readBig32(t,r+56)}))}},{key:"mdia",value:function(t){return parseBox(t,!1,(function(t,r,n){t.mdhd=e.mdhd(e.findBox(r,["mdhd"],n)[0]),t.hdlr=e.hdlr(e.findBox(r,["hdlr"],n)[0]),t.minf=e.minf(e.findBox(r,["minf"],n)[0])}))}},{key:"mdhd",value:function(e){return parseBox(e,!0,(function(e,t){var r=0;1===e.version?(e.timescale=readBig32(t,16),e.duration=readBig64(t,20),r+=28):(e.timescale=readBig32(t,8),e.duration=readBig32(t,12),r+=16);var n=readBig16(t,r);e.language=String.fromCharCode(96+(n>>10&31),96+(n>>5&31),96+(31&n))}))}},{key:"hdlr",value:function(e){return parseBox(e,!0,(function(e,t){0===e.version&&(e.handlerType=String.fromCharCode.apply(null,t.subarray(4,8)))}))}},{key:"minf",value:function(t){return parseBox(t,!1,(function(t,r,n){t.vmhd=e.vmhd(e.findBox(r,["vmhd"],n)[0]),t.smhd=e.smhd(e.findBox(r,["smhd"],n)[0]),t.stbl=e.stbl(e.findBox(r,["stbl"],n)[0])}))}},{key:"vmhd",value:function(e){return parseBox(e,!0,(function(e,t){e.graphicsmode=readBig16(t),e.opcolor=[readBig16(t,2),readBig16(t,4),readBig16(t,6)]}))}},{key:"smhd",value:function(e){return parseBox(e,!0,(function(e,t){e.balance=readBig16(t)}))}},{key:"stbl",value:function(t){return parseBox(t,!1,(function(t,r,n){var o,a,i;t.stsd=e.stsd(e.findBox(r,["stsd"],n)[0]),t.stts=e.stts(e.findBox(r,["stts"],n)[0]),t.ctts=e.ctts(e.findBox(r,["ctts"],n)[0]),t.stsc=e.stsc(e.findBox(r,["stsc"],n)[0]),t.stsz=e.stsz(e.findBox(r,["stsz"],n)[0]),t.stco=e.stco(e.findBox(r,["stco"],n)[0]),t.stco||(t.co64=e.co64(e.findBox(r,["co64"],n)[0]),t.stco=t.co64);var s=null===(o=t.stsd.entries[0])||void 0===o||null===(a=o.sinf)||void 0===a||null===(i=a.schi)||void 0===i?void 0:i.tenc.default_IV_size;t.stss=e.stss(e.findBox(r,["stss"],n)[0]),t.senc=e.senc(e.findBox(r,["senc"],n)[0],s)}))}},{key:"senc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return parseBox(e,!0,(function(e,r){var n=0,o=readBig32(r,n);n+=4,e.samples=[];for(var a=0;a<o;a++){for(var i={InitializationVector:[]},s=0;s<t;s++)i.InitializationVector[s]=r[n+s];if(n+=t,2&e.flags){i.subsamples=[];var c=readBig16(r,n);n+=2;for(var l=0;l<c;l++){var u={};u.BytesOfClearData=readBig16(r,n),n+=2,u.BytesOfProtectedData=readBig32(r,n),n+=4,i.subsamples.push(u)}}e.samples.push(i)}}))}},{key:"pssh",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=[],n=[],o=0,a=0;a<16;a++)n.push(toHex(t[o+a]));if(o+=16,e.version>0){var i=readBig32(t,o);o+=4;for(var s=0;s<(""+i).length;s++)for(var c=0;c<16;c++){var l=t[o];o+=1,r.push(toHex(l))}}var u=readBig32(t,o);e.data_size=u,o+=4,e.kid=r,e.system_id=n,e.buffer=t}))}},{key:"stsd",value:function(t){return parseBox(t,!0,(function(t,r,n){t.entryCount=readBig32(r),t.entries=e.findBox(r.subarray(4),[],n+4).map((function(t){switch(t.type){case"avc1":case"avc2":case"avc3":case"avc4":return e.avc1(t);case"hvc1":case"hev1":return e.hvc1(t);case"mp4a":return e.mp4a(t);case"alaw":case"ulaw":return e.alaw(t);case"enca":return parseBox(t,!1,(function(t,r,n){t.channelCount=readBig16(r,16),t.samplesize=readBig16(r,18),t.sampleRate=readBig32(r,24)/65536,r=r.subarray(28),t.sinf=e.sinf(e.findBox(r,["sinf"],n)[0]),t.esds=e.esds(e.findBox(r,["esds"],n)[0])}));case"encv":return parseBox(t,!1,(function(t,r,n){t.width=readBig16(r,24),t.height=readBig16(r,26),t.horizresolution=readBig32(r,28),t.vertresolution=readBig32(r,32),r=r.subarray(78),t.sinf=e.sinf(e.findBox(r,["sinf"],n)[0]),t.avcC=e.avcC(e.findBox(r,["avcC"],n)[0]),t.hvcC=e.hvcC(e.findBox(r,["hvcC"],n)[0]),t.pasp=e.pasp(e.findBox(r,["pasp"],n)[0])}))}})).filter(Boolean)}))}},{key:"tenc",value:function(e){return parseBox(e,!1,(function(e,t){var r=6;e.default_IsEncrypted=t[r],r+=1,e.default_IV_size=t[r],r+=1,e.default_KID=[];for(var n=0;n<16;n++)e.default_KID.push(toHex(t[r])),r+=1}))}},{key:"schi",value:function(t){return parseBox(t,!1,(function(t,r,n){t.tenc=e.tenc(e.findBox(r,["tenc"],n)[0])}))}},{key:"sinf",value:function(t){return parseBox(t,!1,(function(t,r,n){t.schi=e.schi(e.findBox(r,["schi"],n)[0]),t.frma=e.frma(e.findBox(r,["frma"],n)[0])}))}},{key:"frma",value:function(e){return parseBox(e,!1,(function(e,t){e.data_format="";for(var r=0;r<4;r++)e.data_format+=String.fromCharCode(t[r])}))}},{key:"avc1",value:function(t){return parseBox(t,!1,(function(t,r,n){var o=parseVisualSampleEntry(t,r),a=r.subarray(o);n+=o,t.avcC=e.avcC(e.findBox(a,["avcC"],n)[0]),t.pasp=e.pasp(e.findBox(a,["pasp"],n)[0])}))}},{key:"avcC",value:function(e){return parseBox(e,!1,(function(e,t){e.configurationVersion=t[0],e.AVCProfileIndication=t[1],e.profileCompatibility=t[2],e.AVCLevelIndication=t[3],e.codec=getAvcCodec([t[1],t[2],t[3]]),e.lengthSizeMinusOne=3&t[4],e.spsLength=31&t[5],e.sps=[];for(var r=6,n=0;n<e.spsLength;n++){var o=readBig16(t,r);r+=2,e.sps.push(t.subarray(r,r+o)),r+=o}e.ppsLength=t[r],r+=1,e.pps=[];for(var a=0;a<e.ppsLength;a++){var i=readBig16(t,r);r+=2,e.pps.push(t.subarray(r,r+=i)),r+=i}}))}},{key:"hvc1",value:function(t){return parseBox(t,!1,(function(t,r,n){var o=parseVisualSampleEntry(t,r),a=r.subarray(o);n+=o,t.hvcC=e.hvcC(e.findBox(a,["hvcC"],n)[0]),t.pasp=e.pasp(e.findBox(a,["pasp"],n)[0])}))}},{key:"hvcC",value:function(e){return parseBox(e,!1,(function(t,r){t.data=e.data,t.codec="hev1.1.6.L93.B0",t.configurationVersion=r[0];var n=r[1];t.generalProfileSpace=n>>6,t.generalTierFlag=(32&n)>>5,t.generalProfileIdc=31&n,t.generalProfileCompatibility=readBig32(r,2),t.generalConstraintIndicatorFlags=r.subarray(6,12),t.generalLevelIdc=r[12],t.avgFrameRate=readBig16(r,19),t.numOfArrays=r[22],t.vps=[],t.sps=[],t.pps=[];for(var o=23,a=0,i=0,s=0,c=0;c<t.numOfArrays;c++){a=63&r[o],i=readBig16(r,o+1),o+=3;for(var l,u=[],$=0;$<i;$++)s=readBig16(r,o),o+=2,u.push(r.subarray(o,o+s)),o+=s;if(32===a)(l=t.vps).push.apply(l,u);else if(33===a){var p;(p=t.sps).push.apply(p,u)}else if(34===a){var f;(f=t.pps).push.apply(f,u)}}}))}},{key:"pasp",value:function(e){return parseBox(e,!1,(function(e,t){e.hSpacing=readBig32(t),e.vSpacing=readBig32(t,4)}))}},{key:"mp4a",value:function(t){return parseBox(t,!1,(function(t,r,n){var o=parseAudioSampleEntry(t,r);t.esds=e.esds(e.findBox(r.subarray(o),["esds"],n+o)[0])}))}},{key:"esds",value:function(e){return parseBox(e,!0,(function(e,t){e.codec="mp4a.";for(var r=0,n=0,o=0,a=0;t.length;){for(a=t[r=0],n=t[r+1],r+=2;128&n;)o=(127&n)<<7,n=t[r],r+=1;if(o+=127&n,3===a)t=t.subarray(r+3);else{if(4!==a){if(5===a){var i=e.config=t.subarray(r,r+o),s=(248&i[0])>>3;return 31===s&&i.length>=2&&(s=32+((7&i[0])<<3)+((224&i[1])>>5)),e.objectType=s,e.codec+=s.toString(16),void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}return void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}e.codec+=(t[r].toString(16)+".").padStart(3,"0"),t=t.subarray(r+13)}}}))}},{key:"alaw",value:function(e){return parseBox(e,!1,(function(e,t){parseAudioSampleEntry(e,t)}))}},{key:"stts",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,a=0;a<r;a++)n.push({count:readBig32(t,o),delta:readBig32(t,o+4)}),o+=8;e.entryCount=r,e.entries=n}))}},{key:"ctts",value:function(e){return parseBox(e,!0,(function(e,t){var r=readBig32(t),n=[],o=4;if(1===e.version)for(var a=0;a<r;a++)n.push({count:readBig32(t,o),offset:readBig32(t,o+4)}),o+=8;else for(var i=0;i<r;i++)n.push({count:readBig32(t,o),offset:-(1+~readBig32(t,o+4))}),o+=8;e.entryCount=r,e.entries=n}))}},{key:"stsc",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,a=0;a<r;a++)n.push({firstChunk:readBig32(t,o),samplesPerChunk:readBig32(t,o+4),sampleDescriptionIndex:readBig32(t,o+8)}),o+=12;e.entryCount=r,e.entries=n}))}},{key:"stsz",value:function(e){return parseBox(e,!0,(function(e,t){var r=readBig32(t),n=readBig32(t,4),o=[];if(!r)for(var a=8,i=0;i<n;i++)o.push(readBig32(t,a)),a+=4;e.sampleSize=r,e.sampleCount=n,e.entrySizes=o}))}},{key:"stco",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,a=0;a<r;a++)n.push(readBig32(t,o)),o+=4;e.entryCount=r,e.entries=n}))}},{key:"co64",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,a=0;a<r;a++)n.push(readBig64(t,o)),o+=8;e.entryCount=r,e.entries=n}))}},{key:"stss",value:function(e){return parseBox(e,!0,(function(e,t){for(var r=readBig32(t),n=[],o=4,a=0;a<r;a++)n.push(readBig32(t,o)),o+=4;e.entryCount=r,e.entries=n}))}},{key:"moof",value:function(t){return parseBox(t,!1,(function(t,r,n){t.mfhd=e.mfhd(e.findBox(r,["mfhd"],n)[0]),t.traf=e.findBox(r,["traf"],n).map((function(t){return e.traf(t)}))}))}},{key:"mfhd",value:function(e){return parseBox(e,!0,(function(e,t){e.sequenceNumber=readBig32(t)}))}},{key:"traf",value:function(t){return parseBox(t,!1,(function(t,r,n){t.tfhd=e.tfhd(e.findBox(r,["tfhd"],n)[0]),t.tfdt=e.tfdt(e.findBox(r,["tfdt"],n)[0]),t.trun=e.trun(e.findBox(r,["trun"],n)[0])}))}},{key:"trun",value:function(e){return parseBox(e,!0,(function(e,t){var r=e.version,n=e.flags,o=t.length,a=e.sampleCount=readBig32(t),i=4;if(o>i&&1&n&&(e.dataOffset=-(1+~readBig32(t,i)),i+=4),o>i&&4&n&&(e.firstSampleFlags=readBig32(t,i),i+=4),e.samples=[],o>i)for(var s,c=0;c<a;c++)s={},256&n&&(s.duration=readBig32(t,i),i+=4),512&n&&(s.size=readBig32(t,i),i+=4),1024&n&&(s.flags=readBig32(t,i),i+=4),2048&n&&(s.cts=r?-(1+~readBig32(t,i+4)):readBig32(t,i),i+=4),e.samples.push(s)}))}},{key:"tfdt",value:function(e){return parseBox(e,!0,(function(e,t){1===e.version?e.baseMediaDecodeTime=readBig64(t):e.baseMediaDecodeTime=readBig32(t)}))}},{key:"probe",value:function(t){return!!e.findBox(t,["ftyp"])}},{key:"parseSampleFlags",value:function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}},{key:"moovToTrack",value:function(e,t,r){var n,o,a=e.trak;if(a&&a.length){var i=a.find((function(e){var t,r;return"vide"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)})),s=a.find((function(e){var t,r;return"soun"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)}));if(i&&t){var c,l,u,$,p,f,d,y=t,h=null===(c=i.tkhd)||void 0===c?void 0:c.trackId;null!=h&&(y.id=i.tkhd.trackId),y.tkhdDuration=i.tkhd.duration,y.mvhdDurtion=e.mvhd.duration,y.mvhdTimecale=e.mvhd.timescale,y.timescale=y.formatTimescale=i.mdia.mdhd.timescale,y.duration=i.mdia.mdhd.duration||y.mvhdDurtion/y.mvhdTimecale*y.timescale;var g,m,_,S,b,v,E,T,I=i.mdia.minf.stbl.stsd.entries[0];if(y.width=I.width,y.height=I.height,I.pasp&&(y.sarRatio=[I.pasp.hSpacing,I.pasp.vSpacing]),I.hvcC)y.codecType=VideoCodecType.HEVC,y.codec=I.hvcC.codec,y.vps=I.hvcC.vps,y.sps=I.hvcC.sps,y.pps=I.hvcC.pps,y.hvcC=I.hvcC.data;else{if(!I.avcC)throw new Error("unknown video stsd entry");y.codec=I.avcC.codec,y.sps=I.avcC.sps,y.pps=I.avcC.pps}if(y.present=!0,y.ext={},y.ext.stss=null===(l=i.mdia)||void 0===l||null===(u=l.minf)||void 0===u||null===($=u.stbl)||void 0===$?void 0:$.stss,y.ext.ctts=null===(p=i.mdia)||void 0===p||null===(f=p.minf)||void 0===f||null===(d=f.stbl)||void 0===d?void 0:d.ctts,I&&"encv"===I.type)y.isVideoEncryption=!0,I.default_KID=null===(g=I.sinf)||void 0===g||null===(m=g.schi)||void 0===m?void 0:m.tenc.default_KID,I.default_IsEncrypted=null===(_=I.sinf)||void 0===_||null===(S=_.schi)||void 0===S?void 0:S.tenc.default_IsEncrypted,I.default_IV_size=null===(b=I.sinf)||void 0===b||null===(v=b.schi)||void 0===v?void 0:v.tenc.default_IV_size,y.videoSenc=i.mdia.minf.stbl.senc&&i.mdia.minf.stbl.senc.samples,I.data_format=null===(E=I.sinf)||void 0===E||null===(T=E.frma)||void 0===T?void 0:T.data_format,y.useEME=e.useEME,y.kidValue=e.kidValue,y.pssh=e.pssh,y.encv=I}if(s&&r){var O,P,A,R,C,w,x,N,D,L=r,k=null===(O=s.tkhd)||void 0===O?void 0:O.trackId;null!=k&&(L.id=s.tkhd.trackId),L.tkhdDuration=s.tkhd.duration,L.mvhdDurtion=e.mvhd.duration,L.mvhdTimecale=e.mvhd.timescale,L.timescale=L.formatTimescale=s.mdia.mdhd.timescale,L.duration=s.mdia.mdhd.duration||L.mvhdDurtion/L.mvhdTimecale*L.timescale;var M,j,B,U,F,V,G,H,K=s.mdia.minf.stbl.stsd.entries[0];switch(L.sampleSize=K.sampleSize,L.sampleRate=K.sampleRate,L.channelCount=K.channelCount,L.present=!0,K.type){case"alaw":L.codecType=L.codec=AudioCodecType.G711PCMA,L.sampleRate=8e3;break;case"ulaw":L.codecType=L.codec=AudioCodecType.G711PCMU,L.sampleRate=8e3;break;default:L.sampleDuration=AAC.getFrameDuration(L.sampleRate,L.timescale),L.sampleRateIndex=AAC.getRateIndexByRate(L.sampleRate),L.objectType=(null===(n=K.esds)||void 0===n?void 0:n.objectType)||2,K.esds&&(L.config=Array.from(K.esds.config)),L.codec=(null===(o=K.esds)||void 0===o?void 0:o.codec)||"mp4a.40.2"}if(L.sampleDuration=AAC.getFrameDuration(L.sampleRate,L.timescale),L.objectType=(null===(P=K.esds)||void 0===P?void 0:P.objectType)||2,K.esds&&(K.esds.config?L.config=Array.from(K.esds.config):console.warn("esds config is null")),L.codec=(null===(A=K.esds)||void 0===A?void 0:A.codec)||"mp4a.40.2",L.sampleRateIndex=AAC.getRateIndexByRate(L.sampleRate),L.ext={},L.ext.stss=null===(R=s.mdia)||void 0===R||null===(C=R.minf)||void 0===C||null===(w=C.stbl)||void 0===w?void 0:w.stss,L.ext.ctts=null===(x=s.mdia)||void 0===x||null===(N=x.minf)||void 0===N||null===(D=N.stbl)||void 0===D?void 0:D.ctts,L.present=!0,K&&"enca"===K.type)L.isAudioEncryption=!0,K.data_format=null===(M=K.sinf)||void 0===M||null===(j=M.frma)||void 0===j?void 0:j.data_format,K.default_KID=null===(B=K.sinf)||void 0===B||null===(U=B.schi)||void 0===U?void 0:U.tenc.default_KID,K.default_IsEncrypted=null===(F=K.sinf)||void 0===F||null===(V=F.schi)||void 0===V?void 0:V.tenc.default_IsEncrypted,K.default_IV_size=null===(G=K.sinf)||void 0===G||null===(H=G.schi)||void 0===H?void 0:H.tenc.default_IV_size,L.audioSenc=s.mdia.minf.stbl.senc&&s.mdia.minf.stbl.senc.samples,L.useEME=e.useEME,L.kidValue=e.kidValue,L.enca=K}if(r&&(r.isVideoEncryption=!!t&&t.isVideoEncryption),t&&(t.isAudioEncryption=!!r&&r.isAudioEncryption),null!=t&&t.encv||null!=r&&r.enca){var W,Y,z=null==t||null===(W=t.encv)||void 0===W?void 0:W.default_KID,q=null==r||null===(Y=r.enca)||void 0===Y?void 0:Y.default_KID,X=z||q?(z||q).join(""):null;t&&(t.kid=X),r&&(r.kid=X)}return t&&(t.flags=3841),r&&(r.flags=1793),{videoTrack:t,audioTrack:r}}}},{key:"evaluateDefaultDuration",value:function(e,t,r){var n,o=null==t||null===(n=t.samples)||void 0===n?void 0:n.length;return o?1024*o/t.timescale*e.timescale/r:1024}},{key:"moofToSamples",value:function(t,r,n){var o={};return t.mfhd&&(r&&(r.sequenceNumber=t.mfhd.sequenceNumber),n&&(n.sequenceNumber=t.mfhd.sequenceNumber)),t.traf.forEach((function(t){var a=t.tfhd,i=t.tfdt,s=t.trun;if(a&&s){i&&(r&&r.id===a.trackId&&(r.baseMediaDecodeTime=i.baseMediaDecodeTime),n&&n.id===a.trackId&&(n.baseMediaDecodeTime=i.baseMediaDecodeTime));var c=a.defaultSampleSize||0,l=a.defaultSampleDuration||e.evaluateDefaultDuration(r,n,s.samples.length||s.sampleCount),u=s.dataOffset||0,$=0,p=-1;if(!s.samples.length&&s.sampleCount){o[a.trackId]=[];for(var f=0;f<s.sampleCount;f++)o[a.trackId].push({offset:u,dts:$,duration:l,size:c}),$+=l,u+=c}else o[a.trackId]=s.samples.map((function(e,t){return(e={offset:u,dts:$,pts:$+(e.cts||0),duration:e.duration||l,size:e.size||c,gopId:p,keyframe:0===t||null!==e.flags&&void 0!==e.flags&&(65536&e.flags)>>>0!=65536}).keyframe&&(p++,e.gopId=p),$+=e.duration,u+=e.size,e}))}})),o}},{key:"moovToSamples",value:function(e){var t=e.trak;if(t&&t.length){var r=t.find((function(e){var t,r;return"vide"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)})),n=t.find((function(e){var t,r;return"soun"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)}));if(r||n){var o,a;if(r){var i,s,c=null===(i=r.mdia)||void 0===i||null===(s=i.minf)||void 0===s?void 0:s.stbl;if(!c)return;var l=c.stts,u=c.stsc,$=c.stsz,p=c.stco,f=c.stss,d=c.ctts;if(!(l&&u&&$&&p&&f))return;o=getSamples(l,u,$,p,d,f)}if(n){var y,h,g,m=null===(y=n.mdia)||void 0===y||null===(h=y.minf)||void 0===h?void 0:h.stbl;if(!m)return;var _=null===(g=n.mdia.mdhd)||void 0===g?void 0:g.timescale,S=m.stts,b=m.stsc,v=m.stsz,E=m.stco;if(!(_&&S&&b&&v&&E))return;a=getSamples(S,b,v,E)}return{videoSamples:o,audioSamples:a}}}}}]),e}();function getSamples(e,t,r,n,o,a){var i,s,c,l=[],u=null==o?void 0:o.entries,$=t.entries,p=n.entries,f=r.entrySizes,d=null==a?void 0:a.entries;d&&(i={},d.forEach((function(e){i[e-1]=!0}))),u&&(s=[],u.forEach((function(e){for(var t=e.count,r=e.offset,n=0;n<t;n++)s.push(r)})));var y=-1,h=0,g=0,m=0,_=0,S=0,b=$[0].samplesPerChunk,v=$[1]?$[1].firstChunk-1:1/0;return e.entries.forEach((function(e){for(var t=e.count,n=e.delta,o=0;o<t;o++)c={dts:h,duration:n,size:f[g]||r.sampleSize,offset:p[m]+S,index:g},d&&(c.keyframe=i[g],c.keyframe&&y++,c.gopId=y),s&&g<s.length&&(c.pts=c.dts+s[g]),l.push(c),h+=n,++g<b?S+=c.size:(m++,S=0,m>=v&&(_++,v=$[_+1]?$[_+1].firstChunk-1:1/0),b+=$[_].samplesPerChunk)})),l}function parseVisualSampleEntry(e,t){return e.dataReferenceIndex=readBig16(t,6),e.width=readBig16(t,24),e.height=readBig16(t,26),e.horizresolution=readBig32(t,28),e.vertresolution=readBig32(t,32),e.frameCount=readBig16(t,40),e.depth=readBig16(t,74),78}function parseAudioSampleEntry(e,t){return e.dataReferenceIndex=readBig16(t,6),e.channelCount=readBig16(t,16),e.sampleSize=readBig16(t,18),e.sampleRate=readBig32(t,24)/65536,28}function parseBox(e,t,r){if(e){if(e.size!==e.data.length)throw new Error("box ".concat(e.type," size !== data.length"));var n={start:e.start,size:e.size,headerSize:e.headerSize,type:e.type};return t&&(n.version=e.data[e.headerSize],n.flags=readBig24(e.data,e.headerSize+1),n.headerSize+=4),r(n,e.data.subarray(n.headerSize),n.start+n.headerSize),n}}var padStart3=function(e,t,r){for(var n=String(r),o=t>>0,a=Math.ceil(o/n.length),i=[],s=String(e);a--;)i.push(n);return i.join("").substring(0,o-s.length)+s},toHex=function(){for(var e=[],t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach((function(t){e.push(padStart3(Number(t).toString(16),2,0))})),e[0]},FMP4Demuxer=function(){function e(t,r,n){_classCallCheck(this,e),this.videoTrack=t||new VideoTrack,this.audioTrack=r||new AudioTrack,this.metadataTrack=n||new MetadataTrack}return _createClass(e,[{key:"demux",value:function(e,t){var r=this.videoTrack,n=this.audioTrack,o=r.exist(),a=n.exist();if(r.samples=[],n.samples=[],t){if(!a){var i=MP4Parser.findBox(t,["moov"])[0];if(!i)throw new Error("cannot found moov box");MP4Parser.moovToTrack(MP4Parser.moov(i),null,n)}var s=MP4Parser.findBox(t,["moof"])[0];if(s){var c=MP4Parser.moofToSamples(MP4Parser.moof(s),null,n)[n.id],l=n.baseMediaDecodeTime;if(c){var u=s.start;c.map((function(e){e.offset+=u;var r=t.subarray(e.offset,e.offset+e.size);n.samples.push(new AudioSample(e.dts+l,r,e.duration))}))}}}if(e){if(!o&&!a){var $=MP4Parser.findBox(e,["moov"])[0];if(!$)throw new Error("cannot found moov box");MP4Parser.moovToTrack(MP4Parser.moov($),r,n)}var p=MP4Parser.findBox(e,["moof"])[0];if(p){var f,d=MP4Parser.moofToSamples(MP4Parser.moof(p),r,n),y=r.baseMediaDecodeTime,h=n.baseMediaDecodeTime,g=p.start;Object.keys(d).forEach((function(t){r.id==t?d[t].map((function(t){t.offset+=g;var n=new VideoSample((t.pts||t.dts)+y,t.dts+y);n.duration=t.duration,n.gopId=t.gopId,t.keyframe&&n.setToKeyframe();var o=e.subarray(t.offset,t.offset+t.size);n.data=o;for(var a=0,i=o.length-1;a<i;)f=readBig32(o,a),a+=4,n.units.push(o.subarray(a,a+f)),a+=f;r.samples.push(n)})):n.id==t&&d[t].map((function(t){t.offset+=g;var r=e.subarray(t.offset,t.offset+t.size);n.samples.push(new AudioSample(t.dts+h,r,t.duration))}))}))}}return{videoTrack:r,audioTrack:n,metadataTrack:this.metadataTrack}}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset(),this.metadataTrack.reset()}}],[{key:"probe",value:function(e){return MP4Parser.probe(e)}}]),e}(),$$1=_export$1,global$2=global$13,arrayBufferModule=arrayBuffer,setSpecies$1=setSpecies$8,ARRAY_BUFFER="ArrayBuffer",ArrayBuffer$1=arrayBufferModule[ARRAY_BUFFER],NativeArrayBuffer=global$2[ARRAY_BUFFER];function Concat(e){for(var t=0,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];n.forEach((function(e){t+=e.length}));var a=new e(t),i=0;return n.forEach((function(e){a.set(e,i),i+=e.length})),a}$$1({global:!0,constructor:!0,forced:NativeArrayBuffer!==ArrayBuffer$1},{ArrayBuffer:ArrayBuffer$1}),setSpecies$1(ARRAY_BUFFER);var Buffer=function(){function e(){_classCallCheck(this,e),this.buffer=new Uint8Array(0)}return _createClass(e,[{key:"write",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];r.forEach((function(t){t?e.buffer=Concat(Uint8Array,e.buffer,t):window.console.warn(t)}))}}],[{key:"writeUint16",value:function(e){return new Uint8Array([e>>8&255,255&e])}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>24,e>>16&255,e>>8&255,255&e])}}]),e}(),UINT32_MAX=Math.pow(2,32)-1,MP4=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"box",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=8+(r=r.filter(Boolean)).reduce((function(e,t){return e+t.byteLength}),0),a=new Uint8Array(o);a[0]=o>>24&255,a[1]=o>>16&255,a[2]=o>>8&255,a[3]=255&o,a.set(e,4);var i=8;return r.forEach((function(e){a.set(e,i),i+=e.byteLength})),a}},{key:"ftyp",value:function(t){return t.find((function(e){return e.type===TrackType.VIDEO&&e.codecType===VideoCodecType.HEVC}))?e.FTYPHEV1:e.FTYPAVC1}},{key:"initSegment",value:function(t){return concatUint8Array(e.ftyp(t),e.moov(t))}},{key:"pssh",value:function(t){var r=new Uint8Array([1,0,0,0].concat([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75],[0,0,0,1],parse(t.kid),[0,0,0,0]));return e.box(e.types.pssh,r)}},{key:"moov",value:function(t){if(t[0].useEME&&(t[0].encv||t[0].enca)){t[0].pssh||(t[0].pssh={kid:t[0].kid});var r=this.pssh(t[0].pssh);return e.box.apply(e,[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale),e.mvex(t)].concat(_toConsumableArray(t.map((function(t){return e.trak(t)}))),[r]))}return e.box.apply(e,[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale)].concat(_toConsumableArray(t.map((function(t){return e.trak(t)}))),[e.mvex(t)]))}},{key:"mvhd",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,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]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.tkhdDuration||0,t.width,t.height),e.mdia(t))}},{key:"tkhd",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return e.box(e.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,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,1,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,o>>8&255,255&o,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minf(t))}},{key:"mdhd",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,t>>24&255,t>>16&255,t>>8&255,255&t,85,196,0,0]))}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"minf",value:function(t){return e.box(e.types.minf,t.type===TrackType.VIDEO?e.VMHD:e.SMHD,e.DINF,e.stbl(t))}},{key:"stbl",value:function(t){var r=[];return t&&t.ext&&t.ext.stss&&r.push(e.stss(t.ext.stss.entries)),e.box(e.types.stbl,e.stsd(t),e.STTS,r[0],e.STSC,e.STSZ,e.STCO)}},{key:"stsd",value:function(t){var r;return r="audio"===t.type?t.useEME&&t.enca?e.enca(t):e.mp4a(t):t.useEME&&t.encv?e.encv(t):e.avc1hev1(t),e.box(e.types.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),r)}},{key:"enca",value:function(t){var r=t.enca.channelCount,n=t.enca.sampleRate,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>8&255,255&n,0,0]),a=e.esds(t.config),i=e.sinf(t.enca);return e.box(e.types.enca,o,a,i)}},{key:"encv",value:function(t){var r,n,o=t.sps.length>0?t.sps[0]:[],a=t.pps.length>0?t.pps[0]:[],i=t.width,s=t.height,c=t.sarRatio[0],l=t.sarRatio[1],u=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,s>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),$=new Uint8Array((r=(n=[1,o[1],o[2],o[3],255,225,o.length>>>8&255,255&o.length]).concat.apply(n,_toConsumableArray(o)).concat([1,a.length>>>8&255,255&a.length])).concat.apply(r,_toConsumableArray(a))),p=new Uint8Array([0,0,88,57,0,15,200,192,0,4,86,72]),f=e.sinf(t.encv),d=new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,l>>24,l>>16&255,l>>8&255,255&l]);return e.box(e.types.encv,u,e.box(e.types.avcC,$),e.box(e.types.btrt,p),f,e.box(e.types.pasp,d))}},{key:"schi",value:function(t){var r=new Uint8Array([]),n=e.tenc(t);return e.box(e.types.schi,r,n)}},{key:"tenc",value:function(t){var r=new Uint8Array([0,0,0,0,0,0,255&t.default_IsEncrypted,255&t.default_IV_size].concat(parse(t.default_KID)));return e.box(e.types.tenc,r)}},{key:"sinf",value:function(t){var r=new Uint8Array([]),n=new Uint8Array([t.data_format.charCodeAt(0),t.data_format.charCodeAt(1),t.data_format.charCodeAt(2),t.data_format.charCodeAt(3)]),o=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]),a=e.schi(t);return e.box(e.types.sinf,r,e.box(e.types.frma,n),e.box(e.types.schm,o),a)}},{key:"avc1hev1",value:function(t){var r=t.codecType===VideoCodecType.HEVC,n=r?e.types.hvc1:e.types.avc1,o=r?e.hvcC(t):e.avcC(t),a=[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,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,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,0,0,0,0,0,0,24,17,17]),o];return r?a.push(e.box(e.types.fiel,new Uint8Array([1,0]))):t.sarRatio&&t.sarRatio.length>1&&a.push(e.pasp(t.sarRatio)),e.box.apply(e,[n].concat(a))}},{key:"avcC",value:function(t){var r,n,o,a=[],i=[];return t.sps.forEach((function(e){o=e.byteLength,a.push(o>>>8&255),a.push(255&o),a.push.apply(a,_toConsumableArray(e))})),t.pps.forEach((function(e){o=e.byteLength,i.push(o>>>8&255),i.push(255&o),i.push.apply(i,_toConsumableArray(e))})),e.box(e.types.avcC,new Uint8Array((r=(n=[1,a[3],a[4],a[5],255,224|t.sps.length]).concat.apply(n,a).concat([t.pps.length])).concat.apply(r,i)))}},{key:"hvcC",value:function(t){var r=t.hvcC;if(r instanceof ArrayBuffer||r instanceof Uint8Array)return r;var n,o=t.vps,a=t.sps,i=t.pps;if(r){var s=r.generalProfileCompatibilityFlags,c=r.generalConstraintIndicatorFlags,l=(o.length&&1)+(a.length&&1)+(i.length&&1);n=[1,r.generalProfileSpace<<6|r.generalTierFlag<<5|r.generalProfileIdc,s>>>24,s>>>16,s>>>8,s,c[0],c[1],c[2],c[3],c[4],c[5],r.generalLevelIdc,240,0,252,252|r.chromaFormatIdc,248|r.bitDepthLumaMinus8,248|r.bitDepthChromaMinus8,0,0,r.numTemporalLayers<<3|r.temporalIdNested<<2|3,l];var u=function(e){var t;n.push(e.length>>8,e.length),(t=n).push.apply(t,_toConsumableArray(e))};o.length&&(n.push(160,0,o.length),o.forEach(u)),a.length&&(n.push(161,0,a.length),a.forEach(u)),i.length&&(n.push(162,0,i.length),i.forEach(u))}else n=[1,1,96,0,0,0,144,0,0,0,0,0,93,240,0,252,253,248,248,0,0,15,3,160,0,1,0,24,64,1,12,1,255,255,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,153,152,9,161,0,1,0,45,66,1,1,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,160,2,128,128,45,22,89,153,164,147,43,154,128,128,128,130,0,0,3,0,2,0,0,3,0,50,16,162,0,1,0,7,68,1,193,114,180,98,64];return e.box(e.types.hvcC,new Uint8Array(n))}},{key:"pasp",value:function(t){var r=_slicedToArray(t,2),n=r[0],o=r[1];return e.box(e.types.pasp,new Uint8Array([n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o]))}},{key:"mp4a",value:function(t){return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.sampleRate>>8&255,255&t.sampleRate,0,0]),t.config.length?e.esds(t.config):void 0)}},{key:"esds",value:function(t){var r=t.length;return e.box(e.types.esds,new Uint8Array([0,0,0,0,3,23+r,0,0,0,4,15+r,64,21,0,6,0,0,0,218,192,0,0,218,192,5].concat([r]).concat(t).concat([6,1,2])))}},{key:"mvex",value:function(t){return e.box.apply(e,[e.types.mvex].concat(_toConsumableArray(t.map((function(t){return e.trex(t.id)})))))}},{key:"trex",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trex1",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,2,0,0,0,0,0,0,1,0,0]))}},{key:"trex2",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,4,0,0,0,0,0,2,0,0,0]))}},{key:"moof",value:function(t){return e.box.apply(e,[e.types.moof,e.mfhd(t[0].samples?t[0].samples[0].gopId:0)].concat(_toConsumableArray(t.map((function(t){return e.traf(t)})))))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"traf",value:function(t){var r=e.tfhd(t.id),n=e.tfdt(t,t.baseMediaDecodeTime),o=0;if(t.isVideo&&t.videoSenc&&t.videoSenc.forEach((function(e){o+=8,e.subsamples&&e.subsamples.length&&(o+=2,o+=6*e.subsamples.length)})),t.videoSencLength=o,t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)){if(t.isVideoEncryption){if(t.isVideo){var a=e.saiz(t),i=e.saio(t),s=e.trun1(t),c=e.senc(t);return e.box(e.types.traf,r,n,a,i,s,c)}if(t.isAudioEncryption){var l=e.sbgp(),u=e.saiz(t),$=e.saio(t),p=e.senc(t),f=e.trun1(t);return e.box(e.types.traf,r,n,l,u,$,p,f)}var d=e.sbgp(),y=e.trun1(t);return e.box(e.types.traf,r,n,d,y)}if(t.isVideo){var h=e.trun1(t);return e.box(e.types.traf,r,n,h)}var g=e.sbgp(),m=e.saiz(t),_=e.saio(t),S=e.senc(t),b=e.trun1(t);return e.box(e.types.traf,r,n,g,m,_,S,b)}var v=e.sdtp(t);return e.box(e.types.traf,r,n,v,e.trun(t.samples,v.byteLength+76))}},{key:"sdtp",value:function(t){var r=new Buffer;return t.samples.forEach((function(e){r.write(new Uint8Array(t.isVideo?[e.keyframe?32:16]:[16]))})),e.box(e.types.sdtp,this.extension(0,0),r.buffer)}},{key:"trun1",value:function(t){var r=new Buffer,n=Buffer.writeUint32(t.samples.length),o=null;if(t.isVideo){var a=t.videoSencLength;o=Buffer.writeUint32(16*t.samples.length+a+149),!t.isVideoEncryption&&t.isAudioEncryption&&(o=Buffer.writeUint32(16*t.samples.length+92))}else{var i=12*t.samples.length+124;t.isAudioEncryption&&(i=12*t.samples.length+8*t.audioSenc.length+177),o=Buffer.writeUint32(i)}return t.samples.forEach((function(e){r.write(Buffer.writeUint32(e.duration)),r.write(Buffer.writeUint32(e.size)),r.write(Buffer.writeUint32(e.keyframe?33554432:65536)),t.isVideo&&r.write(Buffer.writeUint32(e.cts?e.cts:0))})),e.box(e.types.trun,this.extension(0,t.flags),n,o,r.buffer)}},{key:"senc",value:function(t){var r=new Buffer,n=t.samples.length,o=t.isVideo?16:8,a=t.isVideo?2:0,i=[],s=0;return t.isVideo?(i=t.videoSenc,s=t.videoSencLength):i=t.audioSenc,s=s||o*n,r.write(Buffer.writeUint32(16+s),e.types.senc,this.extension(0,a)),r.write(Buffer.writeUint32(n)),i.forEach((function(e){for(var t=0;t<e.InitializationVector.length;t++)r.write(new Uint8Array([e.InitializationVector[t]]));e.subsamples&&e.subsamples.length&&(r.write(Buffer.writeUint16(e.subsamples.length)),e.subsamples.forEach((function(e){r.write(Buffer.writeUint16(e.BytesOfClearData)),r.write(Buffer.writeUint32(e.BytesOfProtectedData))})))})),r.buffer}},{key:"saio",value:function(t){var r=12*t.samples.length+141;!t.isVideo&&t.isAudioEncryption&&(r=149);var n=new Uint8Array([1,0,0,0,0,0,0,1,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r]);return e.box(e.types.saio,n)}},{key:"saiz",value:function(t){var r=t.samples.length,n=new Uint8Array([0,0,0,0,16,r>>24&255,r>>16&255,r>>8&255,255&r]);return e.box(e.types.saiz,n)}},{key:"sbgp",value:function(){var t=new Uint8Array([114,111,108,108,0,0,0,1,0,0,1,25,0,0,0,1]);return e.box(e.types.sbgp,this.extension(0,0),t)}},{key:"extension",value:function(e,t){return new Uint8Array([e,t>>16&255,t>>8&255,255&t])}},{key:"tfhd",value:function(t){return e.box(e.types.tfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"tfdt",value:function(t,r){var n=Math.floor(r/(UINT32_MAX+1)),o=Math.floor(r%(UINT32_MAX+1));return t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)?e.box(e.types.tfdt,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o])):e.box(e.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o]))}},{key:"trun",value:function(t,r){var n=t.length,o=12+16*n;r+=8+o;var a=new Uint8Array(o);a.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0);for(var i=0;i<n;i++){var s=t[i],c=s.duration,l=s.size,u=s.flag,$=void 0===u?{}:u,p=s.cts,f=void 0===p?0:p;a.set([c>>>24&255,c>>>16&255,c>>>8&255,255&c,l>>>24&255,l>>>16&255,l>>>8&255,255&l,$.isLeading<<2|(null===$.dependsOn||void 0===$.dependsOn?1:$.dependsOn),$.isDependedOn<<6|$.hasRedundancy<<4|$.paddingValue<<1|(null===$.isNonSyncSample||void 0===$.isNonSyncSample?1:$.isNonSyncSample),61440&$.degradationPriority,15&$.degradationPriority,f>>>24&255,f>>>16&255,f>>>8&255,255&f],12+16*i)}return e.box(e.types.trun,a)}},{key:"moovMP4",value:function(t){return e.box.apply(e,[e.types.moov,e.mvhd(t[0].duration,t[0].timescale)].concat(_toConsumableArray(t.map((function(t){return e.trackMP4(t)})))))}},{key:"trackMP4",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.duration,t.width,t.height),e.mdiaMP4(t))}},{key:"mdiaMP4",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minfMP4(t))}},{key:"minfMP4",value:function(t){return e.box(e.types.minf,t.type===TrackType.VIDEO?e.VMHD:e.SMHD,e.DINF,e.stblMP4(t))}},{key:"stblMP4",value:function(t){var r=t.ext,n=[e.stsd(t),e.stts(r.stts),e.stsc(r.stsc),e.stsz(r.stsz),e.stco(r.stco)];return r.stss.length&&n.push(e.stss(r.stss)),r.ctts.length&&n.push(e.ctts(r.ctts)),e.box.apply(e,[e.types.stbl].concat(n))}},{key:"stts",value:function(t){var r=t.length,n=new Uint8Array(8*r),o=0;return t.forEach((function(e){var t=e.value,r=e.count;n.set([r>>24,r>>16&255,r>>8&255,255&r,t>>24,t>>16&255,t>>8&255,255&t],o),o+=8})),e.box(e.types.stts,concatUint8Array(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stsc",value:function(t){var r=t.length,n=new Uint8Array(12*r),o=0;return t.forEach((function(e){var t=e.firstChunk,r=e.samplesPerChunk,a=e.sampleDescIndex;n.set([t>>24,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a],o),o+=12})),e.box(e.types.stsc,concatUint8Array(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stsz",value:function(t){var r=t.length,n=new Uint8Array(4*r),o=0;return t.forEach((function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],o),o+=4})),e.box(e.types.stsz,concatUint8Array(new Uint8Array([0,0,0,0,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stco",value:function(t){var r=t.length,n=new Uint8Array(4*r),o=0;return t.forEach((function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],o),o+=4})),e.box(e.types.stco,concatUint8Array(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"stss",value:function(t){var r=t.length,n=new Uint8Array(4*r),o=0;return t.forEach((function(e){n.set([e>>24,e>>16&255,e>>8&255,255&e],o),o+=4})),e.box(e.types.stss,concatUint8Array(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"ctts",value:function(t){var r=t.length,n=new Uint8Array(8*r),o=0;return t.forEach((function(e){var t=e.value,r=e.count;n.set([r>>24,r>>16&255,r>>8&255,255&r,t>>24,t>>16&255,t>>8&255,255&t],o),o+=8})),e.box(e.types.ctts,concatUint8Array(new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r]),n))}},{key:"styp",value:function(){return e.box(e.types.styp,new Uint8Array([109,115,100,104,0,0,0,0,109,115,100,104,109,115,105,120]))}},{key:"sidx",value:function(t){var r=t.timescale,n=t.samples[0].duration,o=n*t.samples.length,a=t.samples[0].sampleOffset*n,i=8;t.samples.forEach((function(e){i+=e.size}));var s=0;if(t.isVideo){var c,l=0;t.videoSenc&&(c=t.videoSenc),t.isVideo&&c.forEach((function(e){l+=8,e.subsamples&&e.subsamples.length&&(l+=2,l+=6*e.subsamples.length)})),t.videoSencLength=l,s=i+141+16*t.samples.length+l,t.useEME&&t.isAudioEncryption&&!t.isVideoEncryption&&(s=i+16*t.samples.length+84)}else s=i+116+12*t.samples.length,t.useEME&&t.isAudioEncryption&&(s=i+169+12*t.samples.length+8*t.audioSenc.length);var u=new Uint8Array([0,0,0,0,0,0,0,255&t.id,r>>24&255,r>>16&255,r>>8&255,255&r,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,0,0,0,0,1,0,s>>16&255,s>>8&255,255&s,o>>24&255,o>>16&255,o>>8&255,255&o,144,0,0,0]);return e.box(e.types.sidx,u)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();_defineProperty(MP4,"types",["avc1","avcC","hvc1","hvcC","dinf","dref","esds","ftyp","hdlr","mdat","mdhd","mdia","mfhd","minf","moof","moov","mp4a","mvex","mvhd","pasp","stbl","stco","stsc","stsd","stsz","stts","tfdt","tfhd","traf","trak","trex","tkhd","vmhd","smhd","ctts","stss","styp","pssh","sidx","sbgp","saiz","saio","senc","trun","encv","enca","sinf","btrt","frma","tenc","schm","schi","mehd","fiel","sdtp"].reduce((function(e,t){return e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)],e}),Object.create(null))),_defineProperty(MP4,"HDLR_TYPES",{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]),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])}),_defineProperty(MP4,"FTYPAVC1",MP4.box(MP4.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))),_defineProperty(MP4,"FTYPHEV1",MP4.box(MP4.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,104,101,118,49]))),_defineProperty(MP4,"DINF",MP4.box(MP4.types.dinf,MP4.box(MP4.types.dref,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])))),_defineProperty(MP4,"VMHD",MP4.box(MP4.types.vmhd,new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))),_defineProperty(MP4,"SMHD",MP4.box(MP4.types.smhd,new Uint8Array([0,0,0,0,0,0,0,0]))),_defineProperty(MP4,"StblTable",new Uint8Array([0,0,0,0,0,0,0,0])),_defineProperty(MP4,"STTS",MP4.box(MP4.types.stts,MP4.StblTable)),_defineProperty(MP4,"STSC",MP4.box(MP4.types.stsc,MP4.StblTable)),_defineProperty(MP4,"STSZ",MP4.box(MP4.types.stsz,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]))),_defineProperty(MP4,"STCO",MP4.box(MP4.types.stco,MP4.StblTable));var Logger=function(){function e(t,r){_classCallCheck(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=r}return _createClass(e,[{key:"debug",value:function(){var t;if(!e.disabled){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];(t=console).debug.apply(t,[this._prefix].concat(n))}}},{key:"log",value:function(){var t;if(!e.disabled){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];(t=console).log.apply(t,[this._prefix].concat(n))}}},{key:"warn",value:function(){var t;if(!e.disabled){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];(t=console).warn.apply(t,[this._prefix].concat(n))}}},{key:"error",value:function(){var t;if(!e.disabled){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];(t=console).error.apply(t,[this._prefix].concat(n))}}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();_defineProperty(Logger,"disabled",!0);var FMP4Remuxer=function(){function e(t,r,n){_classCallCheck(this,e),this.videoTrack=t,this.audioTrack=r;var o=/Chrome\/([^.]+)/.exec(navigator.userAgent);this.forceFirstIDR=o&&Number(o[1])<50,this.log=new Logger("FMP4Remuxer",!n||!n.openLog||!n.openLog)}return _createClass(e,[{key:"remux",value:function(){var e,t,r,n,o,a=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.videoTrack,c=this.audioTrack,l=s.exist(),u=c.exist(),$=[];return a&&(i&&i.initMerge?(l&&$.push(this.videoTrack),u&&$.push(this.audioTrack),r=MP4.initSegment($)):(l&&(e=MP4.initSegment([this.videoTrack])),u&&(t=MP4.initSegment([this.audioTrack])))),l&&s.hasSample()&&(n=this._remuxVideo()),u&&c.hasSample()&&(o=this._remuxAudio()),s.samples=[],c.samples=[],{initSegment:r,videoInitSegment:e,audioInitSegment:t,videoSegment:n,audioSegment:o}}},{key:"_remuxVideo",value:function(){var e=this.videoTrack;this.forceFirstIDR&&(e.samples[0].flag={dependsOn:2,isNonSyncSample:0});var t=e.samples,r=0;t.forEach((function(e){r+=e.units.reduce((function(e,t){return e+t.byteLength}),0),r+=4*e.units.length}));for(var n,o=new Uint8Array(r),a=new DataView(o.buffer),i=function(e,r,i,s){s=t[e];var c=0;s.units.forEach((function(e){a.setUint32(i,e.byteLength),i+=4,o.set(e,i),i+=e.byteLength,c+=4+e.byteLength})),s.size=c,l=i,n=s},s=0,c=t.length,l=0;s<c;s++)i(s,0,l,n);var u=MP4.mdat(o);return concatUint8Array(MP4.moof([e]),u)}},{key:"_remuxAudio",value:function(){var e=this.audioTrack,t=new Uint8Array(e.samples.reduce((function(e,t){return e+t.size}),0));e.samples.reduce((function(e,r){return t.set(r.data,e),e+r.size}),0);var r=MP4.mdat(t);return concatUint8Array(MP4.moof([e]),r)}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset()}}]),e}(),defineProperty8=objectDefineProperty$1.f,proxyAccessor$1=function(e,t,r){r in e||defineProperty8(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},DESCRIPTORS$1=descriptors$1,global$1=global$13,uncurryThis$1=functionUncurryThis$1,isForced=isForced_1$1,inheritIfRequired=inheritIfRequired$4,createNonEnumerableProperty=createNonEnumerableProperty$k,getOwnPropertyNames6=objectGetOwnPropertyNames$1.f,isPrototypeOf=objectIsPrototypeOf$1,isRegExp$1=isRegexp,toString$2=toString$v,getRegExpFlags=regexpGetFlags,stickyHelpers$1=regexpStickyHelpers,proxyAccessor=proxyAccessor$1,defineBuiltIn=defineBuiltIn$p,fails$1=fails$1i,hasOwn3=hasOwnProperty_1$1,enforceInternalState=internalState$1.enforce,setSpecies=setSpecies$8,wellKnownSymbol=wellKnownSymbol$T,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,MATCH=wellKnownSymbol("match"),NativeRegExp=global$1.RegExp,RegExpPrototype$1=NativeRegExp.prototype,SyntaxError=global$1.SyntaxError,exec$1=uncurryThis$1(RegExpPrototype$1.exec),charAt=uncurryThis$1("".charAt),replace=uncurryThis$1("".replace),stringIndexOf=uncurryThis$1("".indexOf),stringSlice$1=uncurryThis$1("".slice),IS_NCG=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,re1=/a/g,re2=/a/g,CORRECT_NEW=new NativeRegExp(re1)!==re1,MISSED_STICKY$1=stickyHelpers$1.MISSED_STICKY,UNSUPPORTED_Y$1=stickyHelpers$1.UNSUPPORTED_Y,BASE_FORCED=DESCRIPTORS$1&&(!CORRECT_NEW||MISSED_STICKY$1||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG||fails$1((function(){return re2[MATCH]=!1,NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||"/a/i"!=NativeRegExp(re1,"i")}))),handleDotAll=function(e){for(var t,r=e.length,n=0,o="",a=!1;n<=r;n++)"\\"!==(t=charAt(e,n))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),o+=t):o+="[\\s\\S]":o+=t+charAt(e,++n);return o},handleNCG=function(e){for(var t,r=e.length,n=0,o="",a=[],i={},s=!1,c=!1,l=0,u="";n<=r;n++){if("\\"===(t=charAt(e,n)))t+=charAt(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:exec$1(IS_NCG,stringSlice$1(e,n+1))&&(n+=2,c=!0),o+=t,l++;continue;case">"===t&&c:if(""===u||hasOwn3(i,u))throw new SyntaxError("Invalid capture group name");i[u]=!0,a[a.length]=[u,l],c=!1,u="";continue}c?u+=t:o+=t}return[o,a]};if(isForced("RegExp",BASE_FORCED)){for(var RegExpWrapper=function(e,t){var r,n,o,a,i,s,c=isPrototypeOf(RegExpPrototype$1,this),l=isRegExp$1(e),u=void 0===t,$=[],p=e;if(!c&&l&&u&&e.constructor===RegExpWrapper)return e;if((l||isPrototypeOf(RegExpPrototype$1,e))&&(e=e.source,u&&(t=getRegExpFlags(p))),e=void 0===e?"":toString$2(e),t=void 0===t?"":toString$2(t),p=e,UNSUPPORTED_DOT_ALL&&"dotAll"in re1&&(n=!!t&&stringIndexOf(t,"s")>-1)&&(t=replace(t,/s/g,"")),r=t,MISSED_STICKY$1&&"sticky"in re1&&(o=!!t&&stringIndexOf(t,"y")>-1)&&UNSUPPORTED_Y$1&&(t=replace(t,/y/g,"")),UNSUPPORTED_NCG&&(e=(a=handleNCG(e))[0],$=a[1]),i=inheritIfRequired(NativeRegExp(e,t),c?this:RegExpPrototype$1,RegExpWrapper),(n||o||$.length)&&(s=enforceInternalState(i),n&&(s.dotAll=!0,s.raw=RegExpWrapper(handleDotAll(e),r)),o&&(s.sticky=!0),$.length&&(s.groups=$)),e!==p)try{createNonEnumerableProperty(i,"source",""===p?"(?:)":p)}catch(e){}return i},keys8=getOwnPropertyNames6(NativeRegExp),index=0;keys8.length>index;)proxyAccessor(RegExpWrapper,NativeRegExp,keys8[index++]);RegExpPrototype$1.constructor=RegExpWrapper,RegExpWrapper.prototype=RegExpPrototype$1,defineBuiltIn(global$1,"RegExp",RegExpWrapper,{constructor:!0})}setSpecies("RegExp");var DESCRIPTORS=descriptors$1,MISSED_STICKY=regexpStickyHelpers.MISSED_STICKY,classof=classofRaw$5,defineBuiltInAccessor=defineBuiltInAccessor$3,getInternalState=internalState$1.get,RegExpPrototype=RegExp.prototype,$TypeError=TypeError;DESCRIPTORS&&MISSED_STICKY&&defineBuiltInAccessor(RegExpPrototype,"sticky",{configurable:!0,get:function(){if(this!==RegExpPrototype){if("RegExp"===classof(this))return!!getInternalState(this).sticky;throw $TypeError("Incompatible receiver, RegExp required")}}});var Decryptor=function(){function e(){_classCallCheck$3(this,e);var t=window.crypto||window.msCrypto;this.subtle=t&&(t.subtle||t.webkitSubtle),this.externalDecryptor=null}var t,r;return _createClass$3(e,[{key:"decrypt",value:function(e,t){if(e||t){var r=[];return e&&(r[0]=this._decryptSegment(e)),t&&(r[1]=this._decryptSegment(t)),Promise.all(r)}}},{key:"_decryptSegment",value:(r=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.data,!t.key){e.next=5;break}return e.next=4,this._decryptData(t.data,t.key,t.keyIv);case 4:r=e.sent;case 5:if(t.map){e.next=7;break}return e.abrupt("return",r);case 7:return e.abrupt("return",concatUint8Array$1(t.map,r));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_decryptData",value:(t=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r,n){var o;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.externalDecryptor){e.next=6;break}return e.next=3,this.externalDecryptor.decrypt(t,r,n);case 3:return e.abrupt("return",e.sent);case 6:if(this.subtle){e.next=8;break}throw new Error("crypto is not defined");case 8:return e.next=10,this.subtle.importKey("raw",r,{name:"AES-CBC"},!1,["encrypt","decrypt"]);case 10:return o=e.sent,e.t0=Uint8Array,e.next=14,this.subtle.decrypt({name:"AES-CBC",iv:n},o,t);case 14:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 16:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})}]),e}(),Event$1=_objectSpread2$2(_objectSpread2$2({},EVENT),{},{STREAM_PARSED:"core.streamparsed",NO_AUDIO_TRACK:"core.noaudiotrack",SUBTITLE_SEGMENTS:"core.subtitlesegments",SUBTITLE_PLAYLIST:"core.subtitleplaylist",SEI_PAYLOAD_TIME:"core.seipayloadtime"}),logger$2=new Logger$2("Transmuxer"),Transmuxer=function(){function e(t,r,n){_classCallCheck$3(this,e),_defineProperty$3(this,"_initSegmentId",""),this.hls=t,this._demuxer=r?new FMP4Demuxer:new TsDemuxer,this._isMP4=r,n&&(this._remuxer=new FMP4Remuxer(this._demuxer.videoTrack,this._demuxer.audioTrack))}return _createClass$3(e,[{key:"transmux",value:function(e,t,r,n,o,a){var i=this._demuxer;try{this._isMP4?i.demux(e,t):i.demuxAndFix(concatUint8Array$1(e,t),r,n,o)}catch(e){throw new StreamingError(ERR.DEMUX,ERR.SUB_TYPES.HLS,e)}var s=i.videoTrack,c=i.audioTrack,l=i.metadataTrack,u="".concat(s.codec,"/").concat(s.width,"/").concat(s.height,"/").concat(c.codec,"/").concat(c.config);if(u!==this._initSegmentId&&(this._initSegmentId=u,a=!0),this._fireEvents(s,c,l,r||a),this.hls.emit(Event$1.DEMUXED_TRACK,s),!this._remuxer)return[s,c];try{var $=this._remuxer.remux(a),p=$.videoInitSegment,f=$.videoSegment,d=$.audioInitSegment,y=$.audioSegment,h=concatUint8Array$1(p,f),g=concatUint8Array$1(d,y);return[h?{codec:s.codec,data:h}:void 0,g?{codec:c.codec,data:g}:void 0]}catch(e){throw new StreamingError(ERR.REMUX,ERR.SUB_TYPES.FMP4,e)}}},{key:"_fireEvents",value:function(e,t,r,n){var o=this;logger$2.debug(e.samples,t.samples),n&&(e.exist()&&this.hls.emit(Event$1.METADATA_PARSED,{type:"video",track:e,meta:{codec:e.codec,timescale:e.timescale,width:e.width,height:e.height,sarRatio:e.sarRatio,baseDts:e.baseDts}}),t.exist()&&this.hls.emit(Event$1.METADATA_PARSED,{type:"audio",track:t,meta:{codec:t.codec,channelCount:t.channelCount,sampleRate:t.sampleRate,timescale:t.timescale,baseDts:t.baseDts}}),logger$2.debug("discontinuity",e,t)),e.warnings.forEach((function(e){var t;switch(e.type){case WarningType.LARGE_AV_SHIFT:t=Event$1.LARGE_AV_FIRST_FRAME_GAP_DETECT;break;case WarningType.LARGE_VIDEO_GAP:t=Event$1.LARGE_VIDEO_DTS_GAP_DETECT;break;case WarningType.LARGE_VIDEO_GAP_BETWEEN_CHUNK:t=Event$1.MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT}t&&o.hls.emit(Event$1.STREAM_EXCEPTION,_objectSpread2$2(_objectSpread2$2({},e),{},{type:t})),logger$2.warn("video exception",e)})),t.warnings.forEach((function(e){var t;switch(e.type){case WarningType.LARGE_AUDIO_GAP:t=Event$1.LARGE_AUDIO_DTS_GAP_DETECT;break;case WarningType.AUDIO_FILLED:t=Event$1.AUDIO_GAP_DETECT;break;case WarningType.AUDIO_DROPPED:t=Event$1.AUDIO_OVERLAP_DETECT}t&&o.hls.emit(Event$1.STREAM_EXCEPTION,_objectSpread2$2(_objectSpread2$2({},e),{},{type:t})),logger$2.warn("audio exception",e)})),e.samples.forEach((function(e){e.keyframe&&o.hls.emit(Event$1.KEYFRAME,{pts:e.pts})})),r.seiSamples.forEach((function(e){o.hls.emit(Event$1.SEI,_objectSpread2$2(_objectSpread2$2({},e),{},{originPts:e.originPts/90,sei:{code:e.data.type,content:e.data.payload,dts:e.pts}}))}))}}]),e}(),logger$1=new Logger$2("BufferService"),BufferService=function(){function e(t){if(_classCallCheck$3(this,e),_defineProperty$3(this,"_decryptor",new Decryptor),_defineProperty$3(this,"_transmuxer",null),_defineProperty$3(this,"_mse",null),_defineProperty$3(this,"_softVideo",null),_defineProperty$3(this,"_sourceCreated",!1),_defineProperty$3(this,"_needInitSegment",!0),_defineProperty$3(this,"_directAppend",!1),this.hls=t,t.config.softDecode)this._softVideo=t.media;else if(this._mse=new MSE,t.config.url){var r=this._mse.bindMedia(t.media);r&&r.then&&r.then((function(){t&&t.emit("sourceAttached")}))}t.config.decryptor&&(this._decryptor.externalDecryptor=t.config.decryptor)}var t,r,n,o,a,i,s,c,l;return _createClass$3(e,[{key:"baseDts",get:function(){var e,t,r;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t||null===(r=t._fixer)||void 0===r?void 0:r._baseDts}},{key:"nbSb",get:function(){var e;return null!==(e=this._mse)&&void 0!==e&&e._sourceBuffer?Object.keys(this._mse._sourceBuffer).length:0}},{key:"updateDuration",value:(l=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(logger$1.debug("update duration",t),!this._mse){e.next=9;break}if(this._mse.isOpened){e.next=5;break}return e.next=5,this._mse.open();case 5:return e.next=7,this._mse.updateDuration(t);case 7:e.next=10;break;case 9:this._softVideo&&(this._softVideo.duration=t);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"createSource",value:function(e,t,r,n){if(!this._sourceCreated){var o=e||t;if(o){if(TsDemuxer.probe(o))this._transmuxer||(this._transmuxer=new Transmuxer(this.hls,!1,!this._softVideo));else{if(!MP4Parser.probe(o))throw new StreamingError(ERR.OTHER,null,null,null,"unsupported stream");if(this._softVideo)this._transmuxer||(this._transmuxer=new Transmuxer(this.hls,!0));else{this._directAppend=!0;var a=!1;e&&!r&&MP4Parser.findBox(e,["moov","trak"]).forEach((function(e){var t=MP4Parser.findBox(e.data,["trak","mdia","minf","stbl","stsd"])[0];if(t){var o=MP4Parser.stsd(t).entries[0];if(o)if(o.hvcC)r=o.hvcC.codec||"hev1.1.6.L93.B0";else if(o.avcC)r=o.avcC.codec;else if(o.sampleRate||o.esds){var i;n=(null===(i=o.esds)||void 0===i?void 0:i.codec)||"mp4a.40.2",a=!0}}})),t&&!n&&MP4Parser.findBox(t,["moov","trak","mdia","minf","stbl","stsd"]).forEach((function(e){var t=MP4Parser.stsd(e).entries[0];t&&t.esds&&(n=t.esds.codec)})),e&&!r&&(r="avc1.42e01e"),t&&!n&&(n="mp4a.40.2"),a&&(r+=", ".concat(n),n=""),this._createMseSource(r,n)}}this._softVideo&&(this._sourceCreated=!0)}}}},{key:"appendBuffer",value:(c=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r,n,o,a,i,s){var c,l,u,$,p,f,d,y,h;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=n&&n.length||null!=o&&o.length){e.next=2;break}return e.abrupt("return");case 2:if(!this._directAppend){e.next=7;break}return c=[],n&&c.push(this._mse.append(MSE.VIDEO,n)),o&&c.push(this._mse.append(MSE.AUDIO,o)),e.abrupt("return",Promise.all(c));case 7:if(l=this._needInitSegment||a,u=this._transmuxer.transmux(n,o,a,i,s,this._needInitSegment||a),$=_slicedToArray$1(u,2),p=$[0],f=$[1],o&&r&&(null==r||r.setTrackExist(!1,!0)),o&&t&&(null==t||t.setTrackExist(!0,!1)),r||null==t||t.setTrackExist(!!p,!!f),p&&!f&&this.hls.emit(Event$1.NO_AUDIO_TRACK),!this._softVideo){e.next=18;break}this._softVideo.appendBuffer(p,f),this._needInitSegment=!1,e.next=28;break;case 18:if(!this._mse){e.next=28;break}return(d=!this._sourceCreated)&&this._createMseSource(null==p?void 0:p.codec,null==f?void 0:f.codec),this._needInitSegment=!1,y=this._mse,h=[],l&&!d&&this._handleCodecChange(p,f),p&&h.push(y.append(MSE.VIDEO,p.data)),f&&h.push(y.append(MSE.AUDIO,f.data)),e.abrupt("return",Promise.all(h));case 28:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n,o,a,i){return c.apply(this,arguments)})},{key:"removeBuffer",value:(s=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var t,r,n,o=this,a=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.length>0&&void 0!==a[0]?a[0]:0,r=a.length>1&&void 0!==a[1]?a[1]:1/0,n=this.hls.media,!(!this._mse||!n||t<0||r<t||t>=this._mse.duration)){e.next=5;break}return e.abrupt("return");case 5:return e.abrupt("return",this._mse.clearBuffer(t,r).then((function(){return o.hls.emit(EVENT.REMOVE_BUFFER,{start:t,end:r,removeEnd:r})})));case 6:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"evictBuffer",value:(i=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n,o;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.hls.media,this._mse&&r&&t&&!(t<0)){e.next=3;break}return e.abrupt("return");case 3:if(n=r.currentTime,!((o=n-t)<=0)){e.next=7;break}return e.abrupt("return");case 7:if(!(Buffer$1.start(Buffer$1.get(r))+1>=o)){e.next=10;break}return e.abrupt("return");case 10:return e.abrupt("return",this.removeBuffer(0,o));case 11:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"clearAllBuffer",value:(a=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=2;break}return e.abrupt("return",this._mse.clearAllBuffer());case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"decryptBuffer",value:function(e,t){return this._decryptor.decrypt(e,t)}},{key:"reset",value:(o=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var t,r=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]&&r[0],!this._mse||t){e.next=7;break}return this._sourceCreated=!1,e.next=5,this._mse.unbindMedia();case 5:return e.next=7,this._mse.bindMedia(this.hls.media);case 7:this._transmuxer=null,this._needInitSegment=!0,this._directAppend=!1;case 10:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"endOfStream",value:(n=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=5;break}if(!this._sourceCreated){e.next=5;break}return e.next=4,this._mse.endOfStream();case 4:this.hls.emit(EVENT.BUFFEREOS);case 5:this._softVideo&&this._softVideo.endOfStream();case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"setLiveSeekableRange",value:(r=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._mse&&this._mse.setLiveSeekableRange(t,r);case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"destroy",value:(t=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var t;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._mse,this._mse=null,this._softVideo=null,!t){e.next=6;break}return e.next=6,t.unbindMedia();case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_createMseSource",value:function(e,t){logger$1.debug("create mse source, videoCodec=".concat(e,", audioCodec=").concat(t));var r=this._mse;r&&(e&&(r.createSource(MSE.VIDEO,"video/mp4;codecs=".concat(e)),this._sourceCreated=!0),t&&(r.createSource(MSE.AUDIO,"audio/mp4;codecs=".concat(t)),this._sourceCreated=!0),this.hls.emit(EVENT.SOURCEBUFFER_CREATED))}},{key:"_handleCodecChange",value:function(e,t){var r=this._mse;[{type:MSE.VIDEO,codecs:null==e?void 0:e.codec},{type:MSE.AUDIO,codecs:null==t?void 0:t.codec}].filter((function(e){return!!e.codecs})).forEach((function(e){var t=e.type,n=e.codecs,o=r.getSourceBuffer(t);if(o){var a=n.split(",")[0];new RegExp(a,"ig").test(o.mimeType)||r.changeType(t,"".concat(t,"/mp4;codecs=").concat(n))}}))}},{key:"seamlessSwitch",value:function(){this._needInitSegment=!0}}]),e}();function getConfig(e){var t=(null==e?void 0:e.media)||document.createElement("video");return _objectSpread2$2(_objectSpread2$2({maxPlaylistSize:50,retryCount:3,retryDelay:1e3,pollRetryCount:2,loadTimeout:1e4,preloadTime:30,softDecode:!1,bufferBehind:10,maxJumpDistance:3,startTime:0,targetLatency:10,maxLatency:20,allowedStreamTrackChange:!0},e),{},{media:t})}var apply=functionApply$1,call$1=functionCall$1,uncurryThis=functionUncurryThis$1,fixRegExpWellKnownSymbolLogic$1=fixRegexpWellKnownSymbolLogic,anObject$1=anObject$B,isNullOrUndefined$1=isNullOrUndefined$h,isRegExp=isRegexp,requireObjectCoercible$1=requireObjectCoercible$i,speciesConstructor=speciesConstructor$7,advanceStringIndex$1=advanceStringIndex$3,toLength$1=toLength$c,toString$1=toString$v,getMethod$1=getMethod$a,arraySlice=arraySliceSimple,callRegExpExec=regexpExecAbstract,regexpExec=regexpExec$3,stickyHelpers=regexpStickyHelpers,fails=fails$1i,UNSUPPORTED_Y=stickyHelpers.UNSUPPORTED_Y,MAX_UINT32=4294967295,min=Math.min,$push=[].push,exec=uncurryThis(/./.exec),push=uncurryThis($push),stringSlice=uncurryThis("".slice),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));fixRegExpWellKnownSymbolLogic$1("split",(function(e,t,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var n=toString$1(requireObjectCoercible$1(this)),o=void 0===r?MAX_UINT32:r>>>0;if(0===o)return[];if(void 0===e)return[n];if(!isRegExp(e))return call$1(t,n,e,o);for(var a,i,s,c=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,$=new RegExp(e.source,l+"g");(a=call$1(regexpExec,$,n))&&!((i=$.lastIndex)>u&&(push(c,stringSlice(n,u,a.index)),a.length>1&&a.index<n.length&&apply($push,c,arraySlice(a,1)),s=a[0].length,u=i,c.length>=o));)$.lastIndex===a.index&&$.lastIndex++;return u===n.length?!s&&exec($,"")||push(c,""):push(c,stringSlice(n,u)),c.length>o?arraySlice(c,0,o):c}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:call$1(t,this,e,r)}:t,[function(t,r){var o=requireObjectCoercible$1(this),a=isNullOrUndefined$1(t)?void 0:getMethod$1(t,e);return a?call$1(a,t,o,r):call$1(n,toString$1(o),t,r)},function(e,o){var a=anObject$1(this),i=toString$1(e),s=r(n,a,i,o,n!==t);if(s.done)return s.value;var c=speciesConstructor(a,RegExp),l=a.unicode,u=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(UNSUPPORTED_Y?"g":"y"),$=new c(UNSUPPORTED_Y?"^(?:"+a.source+")":a,u),p=void 0===o?MAX_UINT32:o>>>0;if(0===p)return[];if(0===i.length)return null===callRegExpExec($,i)?[i]:[];for(var f=0,d=0,y=[];d<i.length;){$.lastIndex=UNSUPPORTED_Y?0:d;var h,g=callRegExpExec($,UNSUPPORTED_Y?stringSlice(i,d):i);if(null===g||(h=min(toLength$1($.lastIndex+(UNSUPPORTED_Y?d:0)),i.length))===f)d=advanceStringIndex$1(i,d,l);else{if(push(y,stringSlice(i,f,d)),y.length===p)return y;for(var m=1;m<=g.length-1;m++)if(push(y,g[m]),y.length===p)return y;d=f=h}}return push(y,stringSlice(i,f)),y}]}),!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC,UNSUPPORTED_Y);var MasterPlaylist=_createClass$3((function e(){_classCallCheck$3(this,e),_defineProperty$3(this,"version",0),_defineProperty$3(this,"streams",[]),_defineProperty$3(this,"isMaster",!0)})),MediaType={Audio:"AUDIO",Video:"VIDEO",SubTitle:"SUBTITLE",ClosedCaptions:"CLOSED-CAPTIONS"},MediaStream=_createClass$3((function e(){_classCallCheck$3(this,e),_defineProperty$3(this,"id",0),_defineProperty$3(this,"url",""),_defineProperty$3(this,"default",!1),_defineProperty$3(this,"autoSelect",!1),_defineProperty$3(this,"forced",!1),_defineProperty$3(this,"group",""),_defineProperty$3(this,"name",""),_defineProperty$3(this,"lang",""),_defineProperty$3(this,"segments",[]),_defineProperty$3(this,"endSN",0)})),AudioStream=function(e){_inherits$2(r,MediaStream);var t=_createSuper$2(r);function r(){var e;_classCallCheck$3(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _defineProperty$3(_assertThisInitialized$2(e=t.call.apply(t,[this].concat(o))),"mediaType",MediaType.Audio),_defineProperty$3(_assertThisInitialized$2(e),"channels",0),e}return _createClass$3(r)}(),SubTitleStream=function(e){_inherits$2(r,MediaStream);var t=_createSuper$2(r);function r(){var e;_classCallCheck$3(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _defineProperty$3(_assertThisInitialized$2(e=t.call.apply(t,[this].concat(o))),"mediaType",MediaType.SubTitle),e}return _createClass$3(r)}(),MasterStream=_createClass$3((function e(){_classCallCheck$3(this,e),_defineProperty$3(this,"id",0),_defineProperty$3(this,"bitrate",0),_defineProperty$3(this,"width",0),_defineProperty$3(this,"height",0),_defineProperty$3(this,"name",""),_defineProperty$3(this,"url",""),_defineProperty$3(this,"audioCodec",""),_defineProperty$3(this,"videoCodec",""),_defineProperty$3(this,"textCodec",""),_defineProperty$3(this,"audioGroup",""),_defineProperty$3(this,"audioStreams",[]),_defineProperty$3(this,"subtitleStreams",[]),_defineProperty$3(this,"closedCaptionsStream",[])})),MediaPlaylist=_createClass$3((function e(){_classCallCheck$3(this,e),_defineProperty$3(this,"version",0),_defineProperty$3(this,"url",""),_defineProperty$3(this,"type",""),_defineProperty$3(this,"startCC",0),_defineProperty$3(this,"endCC",0),_defineProperty$3(this,"startSN",0),_defineProperty$3(this,"endSN",0),_defineProperty$3(this,"totalDuration",0),_defineProperty$3(this,"targetDuration",0),_defineProperty$3(this,"live",!0),_defineProperty$3(this,"segments",[])})),MediaSegment=function(){function e(){_classCallCheck$3(this,e),_defineProperty$3(this,"sn",0),_defineProperty$3(this,"cc",0),_defineProperty$3(this,"url",""),_defineProperty$3(this,"title",""),_defineProperty$3(this,"start",0),_defineProperty$3(this,"duration",0),_defineProperty$3(this,"key",null),_defineProperty$3(this,"byteRange",null),_defineProperty$3(this,"isInitSegment",!1),_defineProperty$3(this,"initSegment",null),_defineProperty$3(this,"isLast",!1),_defineProperty$3(this,"hasAudio",!1),_defineProperty$3(this,"hasVideo",!1)}return _createClass$3(e,[{key:"end",get:function(){return this.start+this.duration}},{key:"setTrackExist",value:function(e,t){this.hasVideo=e,this.hasAudio=t}},{key:"setByteRange",value:function(e,t){this.byteRange=[0];var r=e.split("@");1===r.length&&t&&t.byteRange?(this.byteRange[0]=t.byteRange[1]||0,this.byteRange[0]&&(this.byteRange[0]+=1)):this.byteRange[0]=parseInt(r[1]),this.byteRange[1]=this.byteRange[0]+parseInt(r[0])-1}}]),e}(),MediaSegmentKey=function(){function e(t){_classCallCheck$3(this,e),_defineProperty$3(this,"method",""),_defineProperty$3(this,"url",""),_defineProperty$3(this,"iv",null),_defineProperty$3(this,"keyFormat",""),_defineProperty$3(this,"keyFormatVersions",""),t instanceof e&&(this.method=t.method,this.url=t.url,this.keyFormat=t.keyFormat,this.keyFormatVersions=t.keyFormatVersions,t.iv&&(this.iv=new Uint8Array(t.iv)))}return _createClass$3(e,[{key:"clone",value:function(t){var r=new e(this);return null!=t&&r.setIVFromSN(t),r}},{key:"setIVFromSN",value:function(e){if(!this.iv&&"AES-128"===this.method&&"number"==typeof e&&this.url){this.iv=new Uint8Array(16);for(var t=12;t<16;t++)this.iv[t]=e>>8*(15-t)&255}}}]),e}(),call=functionCall$1,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject=anObject$B,isNullOrUndefined=isNullOrUndefined$h,toLength=toLength$c,toString8=toString$v,requireObjectCoercible=requireObjectCoercible$i,getMethod=getMethod$a,advanceStringIndex=advanceStringIndex$3,regExpExec=regexpExecAbstract;fixRegExpWellKnownSymbolLogic("match",(function(e,t,r){return[function(t){var r=requireObjectCoercible(this),n=isNullOrUndefined(t)?void 0:getMethod(t,e);return n?call(n,t,r):new RegExp(t)[e](toString8(r))},function(e){var n=anObject(this),o=toString8(e),a=r(t,n,o);if(a.done)return a.value;if(!n.global)return regExpExec(n,o);var i=n.unicode;n.lastIndex=0;for(var s,c=[],l=0;null!==(s=regExpExec(n,o));){var u=toString8(s[0]);c[l]=u,""===u&&(n.lastIndex=advanceStringIndex(o,toLength(n.lastIndex),i)),l++}return 0===l?null:c}]}));var REGEXP_TAG=/^#(EXT[^:]*)(?::(.*))?$/,REGEXP_ATTR=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,REGEXP_ABSOLUTE_URL=/^(?:[a-zA-Z0-9+\-.]+:)?\/\//,REGEXP_URL_PAIR=/^((?:[a-zA-Z0-9+\-.]+:)?\/\/[^/?#]*)?([^?#]*\/)?/;function getLines(e){return e.split(/[\r\n]/).map((function(e){return e.trim()})).filter(Boolean)}function parseTag(e){var t=e.match(REGEXP_TAG);if(t&&t[1])return[t[1].replace("EXT-X-",""),t[2]]}function parseAttr(e){for(var t={},r=REGEXP_ATTR.exec(e);r;)t[r[1]]=r[2]||r[3],r=REGEXP_ATTR.exec(e);return t}function getAbsoluteUrl(e,t){if(!t||!e||REGEXP_ABSOLUTE_URL.test(e))return e;var r=REGEXP_URL_PAIR.exec(t);return r?"/"===e[0]?r[1]+e:r[1]+r[2]+e:e}var CODECS_REGEXP={audio:[/^mp4a/,/^vorbis$/,/^opus$/,/^flac$/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function getCodecs(e,t){var r=CODECS_REGEXP[e];if(r&&t&&t.length)for(var n=0;n<r.length;n++)for(var o=0;o<t.length;o++)if(r[n].test(t[o]))return t[o]}function parseMasterPlaylist(e,t){for(var r,n=new MasterPlaylist,o=0,a=[],i=[];r=e[o++];){var s=parseTag(r);if(s){var c=_slicedToArray$1(s,2),l=c[0],u=c[1];if("VERSION"===l)n.version=parseInt(u);else if("MEDIA"===l&&u){var $=parseAttr(u),p=void 0;switch($.TYPE){case"AUDIO":p=new AudioStream;break;case"SUBTITLES":p=new SubTitleStream;break;default:p=new MediaStream}p.url=getAbsoluteUrl($.URI,t),p.default="YES"===$.DEFAULT,p.autoSelect="YES"===$.AUTOSELECT,p.group=$["GROUP-ID"],p.name=$.NAME,p.lang=$.LANGUAGE,$.CHANNELS&&(p.channels=Number($.CHANNELS.split("/")[0]),Number.isNaN(p.channels)&&(p.channels=0)),"AUDIO"===$.TYPE&&$.URI&&a.push(p),"SUBTITLES"===$.TYPE&&i.push(p)}else if("STREAM-INF"===l&&u){var f=new MasterStream,d=parseAttr(u);if(f.bitrate=parseInt(d["AVERAGE-BANDWIDTH"]||d.BANDWIDTH),f.name=d.NAME,f.url=getAbsoluteUrl(e[o++],t),d.RESOLUTION){var y=_slicedToArray$1(d.RESOLUTION.split("x"),2),h=y[0],g=y[1];f.width=parseInt(h),f.height=parseInt(g)}if(d.CODECS){var m=d.CODECS.split(/[ ,]+/).filter(Boolean);f.videoCodec=getCodecs("video",m),f.audioCodec=getCodecs("audio",m),f.textCodec=getCodecs("text",m)}f.audioGroup=d.AUDIO,f.subtitleGroup=d.SUBTITLES,n.streams.push(f)}}}return n.streams.forEach((function(e,t){e.id=t})),a.length&&(a.forEach((function(e,t){e.id=t})),n.streams.forEach((function(e){e.audioGroup&&(e.audioStreams=a.filter((function(t){return t.group===e.audioGroup})))}))),i.length&&(i.forEach((function(e,t){e.id=t})),n.streams.forEach((function(e){e.subtitleGroup&&(e.subtitleStreams=i.filter((function(t){return t.group===e.subtitleGroup})))}))),n}function parseMediaPlaylist(e,t){var r=new MediaPlaylist;r.url=t;for(var n,o=new MediaSegment,a=null,i=null,s=0,c=0,l=0,u=0,$=!1;(n=e[u++])&&!$;)if("#"===n[0]){var p=parseTag(n);if(p){var f=_slicedToArray$1(p,2),d=f[0],y=f[1];switch(d){case"VERSION":r.version=parseInt(y);break;case"PLAYLIST-TYPE":r.type=null==y?void 0:y.toUpperCase();break;case"TARGETDURATION":r.targetDuration=parseFloat(y);break;case"ENDLIST":var h=r.segments[r.segments.length-1];h&&(h.isLast=!0),r.live=!1,$=!0;break;case"MEDIA-SEQUENCE":c=r.startSN=parseInt(y);break;case"DISCONTINUITY-SEQUENCE":l=r.startCC=parseInt(y);break;case"DISCONTINUITY":l++;break;case"BYTERANGE":o.setByteRange(y,r.segments[r.segments.length-1]);break;case"EXTINF":var g=_slicedToArray$1(y.split(","),2),m=g[0],_=g[1];o.start=s,o.duration=parseFloat(m),s+=o.duration,o.title=_;break;case"KEY":var S=parseAttr(y);if("NONE"===S.METHOD){i=null;break}if("AES-128"!==S.METHOD)throw new Error("encrypt ".concat(S.METHOD,"/").concat(S.KEYFORMAT," is not supported"));if((i=new MediaSegmentKey).method=S.METHOD,i.url=/^blob:/.test(S.URI)?S.URI:getAbsoluteUrl(S.URI,t),i.keyFormat=S.KEYFORMAT||"identity",i.keyFormatVersions=S.KEYFORMATVERSIONS,S.IV){var b=S.IV.slice(2);b=(1&b.length?"0":"")+b,i.iv=new Uint8Array(b.length/2);for(var v=0,E=b.length/2;v<E;v++)i.iv[v]=parseInt(b.slice(2*v,2*v+2),16)}break;case"MAP":var T=parseAttr(y);o.url=getAbsoluteUrl(T.URI,t),T.BYTERANGE&&o.setByteRange(T.BYTERANGE),o.isInitSegment=!0,o.sn=0,i&&(o.key=i.clone(0)),a=o,o=new MediaSegment}}}else o.sn=c,o.cc=l,o.url=getAbsoluteUrl(n,t),i&&(o.key=i.clone(c)),a&&(o.initSegment=a),r.segments.push(o),o=new MediaSegment,c++;var I=r.segments[r.segments.length-1];return I&&(r.endSN=I.sn),r.totalDuration=s,r.endCC=l,r}var M3U8Parser=function(){function e(){_classCallCheck$3(this,e)}return _createClass$3(e,null,[{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0;if(!t.includes("#EXTM3U"))throw new Error("Invalid m3u8 file");var n=getLines(t);return e.isMediaPlaylist(t)?parseMediaPlaylist(n,r):parseMasterPlaylist(n,r)}},{key:"isMediaPlaylist",value:function(e){return e.includes("#EXTINF:")||e.includes("#EXT-X-TARGETDURATION:")}}]),e}(),ManifestLoader=function(){function e(t){var r=this;_classCallCheck$3(this,e),_defineProperty$3(this,"_onLoaderRetry",(function(e,t){r.hls.emit(Event$1.LOAD_RETRY,{error:StreamingError.network(e),retryTime:t})})),this.hls=t,this._timer=null;var n=this.hls.config,o=n.retryCount,a=n.retryDelay,i=n.loadTimeout,s=n.fetchOptions;this._loader=new NetLoader(_objectSpread2$2(_objectSpread2$2({},s),{},{responseType:"text",retry:o,retryDelay:a,timeout:i,onRetryError:this._onLoaderRetry})),this._audioLoader=new NetLoader(_objectSpread2$2(_objectSpread2$2({},s),{},{responseType:"text",retry:o,retryDelay:a,timeout:i,onRetryError:this._onLoaderRetry})),this._subtitleLoader=new NetLoader(_objectSpread2$2(_objectSpread2$2({},s),{},{responseType:"text",retry:o,retryDelay:a,timeout:i,onRetryError:this._onLoaderRetry}))}var t;return _createClass$3(e,[{key:"load",value:(t=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r,n){var o,a,i,s,c,l,u,$,p,f,d,y,h,g;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=[this._loader.load(t)],r&&o.push(this._audioLoader.load(r)),n&&o.push(this._subtitleLoader.load(n)),e.prev=3,e.next=6,Promise.all(o);case 6:if(c=e.sent,l=_slicedToArray$1(c,3),u=l[0],$=l[1],p=l[2],u){e.next=13;break}return e.abrupt("return",[]);case 13:a=u.data,r?(i=null==$?void 0:$.data,s=null==p?void 0:p.data):s=null==$?void 0:$.data,e.next=20;break;case 17:throw e.prev=17,e.t0=e.catch(3),StreamingError.network(e.t0);case 20:if(f=this.hls.config.onPreM3U8Parse,e.prev=21,f&&(a=f(a)||a,i&&(i=f(i,!0)||i),s&&(s=f(s,!0)||s)),d=M3U8Parser.parse(a,t),!1!==(null===(g=d)||void 0===g?void 0:g.live)||!d.segments||d.segments.length){e.next=26;break}throw new Error("empty segments list");case 26:i&&(y=M3U8Parser.parse(i,r)),s&&(h=M3U8Parser.parse(s,n)),e.next=33;break;case 30:throw e.prev=30,e.t1=e.catch(21),new StreamingError(ERR.MANIFEST,ERR.SUB_TYPES.HLS,e.t1);case 33:return d&&(d.isMaster?this.hls.emit(Event$1.HLS_MANIFEST_LOADED,{playlist:d}):this.hls.emit(Event$1.HLS_LEVEL_LOADED,{playlist:d})),e.abrupt("return",[d,y,h]);case 35:case"end":return e.stop()}}),e,this,[[3,17],[21,30]])}))),function(e,r,n){return t.apply(this,arguments)})},{key:"poll",value:function(e,t,r,n,o,a){var i=this;clearTimeout(this._timer),a=a||3e3;var s=this.hls.config.pollRetryCount,c=function(){var l=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function l(){var u;return _regeneratorRuntime$1().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return clearTimeout(i._timer),l.prev=1,l.next=4,i.load(e,t,r);case 4:if((u=l.sent)[0]){l.next=7;break}return l.abrupt("return");case 7:s=i.hls.config.pollRetryCount,n(u[0],u[1],u[2]),l.next=15;break;case 11:l.prev=11,l.t0=l.catch(1),--s<=0&&o(l.t0);case 15:i._timer=setTimeout(c,a);case 16:case"end":return l.stop()}}),l,null,[[1,11]])})));return function(){return l.apply(this,arguments)}}();this._timer=setTimeout(c,a)}},{key:"stopPoll",value:function(){return clearTimeout(this._timer),this.cancel()}},{key:"cancel",value:function(){return Promise.all([this._loader.cancel(),this._audioLoader.cancel()])}}]),e}();function clamp(e,t,r){return t>r&&(r=t),Math.min(Math.max(e,t),r)}var $=_export$1,$findIndex=arrayIteration$1.findIndex,addToUnscopables=addToUnscopables$4,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX]((function(){SKIPS_HOLES=!1})),$({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function(e){return $findIndex(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables(FIND_INDEX);var Stream=function(){function e(t,r,n){_classCallCheck$3(this,e),_defineProperty$3(this,"live",void 0),_defineProperty$3(this,"id",0),_defineProperty$3(this,"bitrate",0),_defineProperty$3(this,"width",0),_defineProperty$3(this,"height",0),_defineProperty$3(this,"name",""),_defineProperty$3(this,"url",""),_defineProperty$3(this,"audioCodec",""),_defineProperty$3(this,"videoCodec",""),_defineProperty$3(this,"textCodec",""),_defineProperty$3(this,"startCC",0),_defineProperty$3(this,"endCC",0),_defineProperty$3(this,"startSN",0),_defineProperty$3(this,"endSN",-1),_defineProperty$3(this,"totalDuration",0),_defineProperty$3(this,"targetDuration",0),_defineProperty$3(this,"snDiff",null),_defineProperty$3(this,"segments",[]),_defineProperty$3(this,"audioStreams",[]),_defineProperty$3(this,"subtitleStreams",[]),_defineProperty$3(this,"closedCaptions",[]),_defineProperty$3(this,"currentAudioStream",null),_defineProperty$3(this,"currentSubtitleStream",null),this.update(t,r,n)}return _createClass$3(e,[{key:"lastSegment",get:function(){return this.segments.length?this.segments[this.segments.length-1]:null}},{key:"segmentDuration",get:function(){var e;return this.targetDuration||(null===(e=this.segments[0])||void 0===e?void 0:e.duration)||0}},{key:"liveEdge",get:function(){return this.endTime}},{key:"endTime",get:function(){var e;return(null===(e=this.lastSegment)||void 0===e?void 0:e.end)||0}},{key:"currentSubtitleEndSn",get:function(){var e;return(null===(e=this.currentSubtitleStream)||void 0===e?void 0:e.endSN)||0}},{key:"clearOldSegment",value:function(e,t){return this.currentAudioStream&&this._clearSegments(e,t),this._clearSegments(e,t)}},{key:"getAudioSegment",value:function(e){if(e&&this.currentAudioStream){var t=e.sn-this.snDiff;return this.currentAudioStream.segments.find((function(e){return e.sn===t}))}}},{key:"update",value:function(e,t){this.url=e.url,Array.isArray(e.segments)?(null!==this.live&&void 0!==this.live||(this.live=e.live),this._updateSegments(e,this),this.startCC=e.startCC,this.endCC=e.endCC,this.startSN=e.startSN,this.endSN=e.endSN||-1,this.totalDuration=e.totalDuration,this.targetDuration=e.targetDuration,this.live=e.live,t&&this.currentAudioStream&&Array.isArray(t.segments)&&(this._updateSegments(t,this.currentAudioStream),(null===this.snDiff||void 0===this.snDiff)&&e.segments.length&&t.segments.length&&(this.snDiff=e.segments[0].sn-t.segments[0].sn))):(this.id=e.id,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.name=e.name,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.textCodec=e.textCodec,this.audioStreams=e.audioStreams,this.subtitleStreams=e.subtitleStreams,!this.currentAudioStream&&this.audioStreams.length&&(this.currentAudioStream=this.audioStreams.find((function(e){return e.default}))||this.audioStreams[0]),!this.currentSubtitleStream&&this.subtitleStreams.length&&(this.currentSubtitleStream=this.subtitleStreams.find((function(e){return e.default}))||this.subtitleStreams[0]))}},{key:"updateSubtitle",value:function(e){var t=this;if(e&&this.currentSubtitleStream&&Array.isArray(e.segments)){var r=this._updateSegments(e,this.currentSubtitleStream),n=this.currentSubtitleStream.segments;if(n.length>100&&(this.currentSubtitleStream.segments=n.slice(100)),r)return r.map((function(e){return{sn:e.sn,url:e.url,duration:e.duration,start:e.start,end:e.end,lang:t.currentSubtitleStream.lang}}))}}},{key:"switchSubtitle",value:function(e){var t=this.subtitleStreams.find((function(t){return t.lang===e})),r=this.currentSubtitleStream;t&&(this.currentSubtitleStream=t,r.segments=[])}},{key:"_clearSegments",value:function(e,t){for(var r=0,n=this.segments,o=0,a=n.length;o<a;o++)if(n[o].end>=e){r=o;break}return r>t&&(r=t),r&&(this.segments=this.segments.slice(r),this.currentAudioStream&&(this.currentAudioStream.segments=this.currentAudioStream.segments.slice(r))),t-r}},{key:"_updateSegments",value:function(e,t){var r=t.segments;if(this.live){var n=r[r.length-1],o=(null==n?void 0:n.sn)||-1;if(o<e.endSN&&e.segments.length){var a=e.segments.findIndex((function(e){return e.sn===o})),i=a<0?e.segments:e.segments.slice(a+1);if(r.length&&i.length){var s=n.end;i.forEach((function(e){e.start=s,s=e.end}));var c=(null==n?void 0:n.cc)||-1;c>i[0].cc&&i.forEach((function(e){return e.cc+=c}))}return t.endSN=e.endSN,t.segments=r.concat(i),i}}else t.segments=e.segments}}]),e}(),Playlist=function(){function e(t){_classCallCheck$3(this,e),_defineProperty$3(this,"streams",[]),_defineProperty$3(this,"currentStream",null),_defineProperty$3(this,"dvrWindow",0),_defineProperty$3(this,"_segmentPointer",-1),this.hls=t}return _createClass$3(e,[{key:"lastSegment",get:function(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.lastSegment}},{key:"currentSegment",get:function(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer]}},{key:"nextSegment",get:function(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer+1]}},{key:"currentSegments",get:function(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.segments}},{key:"currentSubtitleEndSn",get:function(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.currentSubtitleEndSn}},{key:"liveEdge",get:function(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.liveEdge}},{key:"totalDuration",get:function(){var e;return(null===(e=this.currentStream)||void 0===e?void 0:e.totalDuration)||0}},{key:"seekRange",get:function(){var e=this.currentSegments;if(e&&e.length)return[e[0].start,e[e.length-1].end]}},{key:"isEmpty",get:function(){var e;return!(null!==(e=this.currentSegments)&&void 0!==e&&e.length)}},{key:"isLive",get:function(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.live}},{key:"hasSubtitle",get:function(){var e;return!(null===(e=this.currentStream)||void 0===e||!e.currentSubtitleStream)}},{key:"getAudioSegment",value:function(e){var t;return null===(t=this.currentStream)||void 0===t?void 0:t.getAudioSegment(e)}},{key:"moveSegmentPointer",value:function(e){var t;null==e&&(e=this._segmentPointer+1),this._segmentPointer=clamp(e,-1,null===(t=this.currentSegments)||void 0===t?void 0:t.length)}},{key:"reset",value:function(){this.streams=[],this.currentStream=null,this.dvrWindow=0,this._segmentPointer=-1}},{key:"getSegmentByIndex",value:function(e){var t;return null===(t=this.currentSegments)||void 0===t?void 0:t[e]}},{key:"setNextSegmentByIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._segmentPointer=e-1}},{key:"findSegmentIndexByTime",value:function(e){var t=this.currentSegments;if(t){for(var r,n=0,o=t.length;n<o;n++)if(e>=(r=t[n]).start&&e<r.end)return n;var a=t[t.length-1];if(Math.abs(e-a.end)<.2)return t.length-1}}},{key:"upsertPlaylist",value:function(e,t,r){var n=this;if(e){if(e.isMaster)this.streams.length=e.streams.length,e.streams.filter((function(e){return e.url})).forEach((function(e,t){n.streams[t]?n.streams[t].update(e):n.streams[t]=new Stream(e)})),this.currentStream=this.streams[0];else if(Array.isArray(e.segments)){var o=this.currentStream;if(o){o.update(e,t,r);var a=o.updateSubtitle(r);a&&this.hls.emit(Event$1.SUBTITLE_SEGMENTS,{list:a})}else this.reset(),this.currentStream=this.streams[0]=new Stream(e,t,r)}this.currentStream&&this.hls.isLive&&!this.dvrWindow&&(this.dvrWindow=this.currentSegments.reduce((function(e,t){return e+=t.duration}),0))}}},{key:"switchSubtitle",value:function(e){var t;null===(t=this.currentStream)||void 0===t||t.switchSubtitle(e)}},{key:"clearOldSegment",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=this.currentStream;if(this.dvrWindow&&t){var r=t.endTime-this.dvrWindow;if(!(r<=0))t.segments.length<=e||(this._segmentPointer=t.clearOldSegment(r,this._segmentPointer))}}},{key:"checkSegmentTrackChange",value:function(e,t){var r=this.findSegmentIndexByTime(e),n=this.getSegmentByIndex(r);if(n&&(n.hasAudio||n.hasVideo)){if(2!==t&&n.hasAudio&&n.hasVideo)return n;if(!(n.end-e>.3)){var o=this.getSegmentByIndex(r+1);if(o&&(o.hasAudio||o.hasVideo))return o.hasAudio!==n.hasAudio||o.hasVideo!==n.hasVideo?o:void 0}}}}]),e}(),SegmentLoader=function(){function e(t){var r=this;_classCallCheck$3(this,e),_defineProperty$3(this,"error",null),_defineProperty$3(this,"_emitOnLoaded",(function(e,t){var n=e.data,o=e.response,a=e.option||{},i=a.firstByteTime,s=a.startTime,c=a.endTime,l=a.contentLength,u=c-s;r._bandwidthService.addRecord(l||n.byteLength,u),r.hls.emit(EVENT.SPEED,{time:u,byteLength:l,url:t}),r.hls.emit(EVENT.LOAD_COMPLETE,{url:t,elapsed:u||0}),r.hls.emit(EVENT.TTFB,{url:t,responseUrl:o.url,elapsed:i-s}),r.hls.emit(EVENT.LOAD_RESPONSE_HEADERS,{headers:o.headers})})),_defineProperty$3(this,"_onLoaderRetry",(function(e,t){r.hls.emit(EVENT.LOAD_RETRY,{error:StreamingError.network(e),retryTime:t})})),this.hls=t,this._bandwidthService=new BandwidthService,this._mapCache={},this._keyCache={};var n=this.hls.config,o=n.retryCount,a=n.retryDelay,i=n.loadTimeout,s=n.fetchOptions;this._segmentLoader=new NetLoader(_objectSpread2$2(_objectSpread2$2({},s),{},{responseType:"arraybuffer",retry:o,retryDelay:a,timeout:i,onRetryError:this._onLoaderRetry})),this._audioSegmentLoader=new NetLoader(_objectSpread2$2(_objectSpread2$2({},s),{},{responseType:"arraybuffer",retry:o,retryDelay:a,timeout:i,onRetryError:this._onLoaderRetry})),this._keyLoader=new NetLoader(_objectSpread2$2(_objectSpread2$2({},s),{},{responseType:"arraybuffer",retry:o,retryDelay:a,timeout:i,onRetryError:this._onLoaderRetry}))}var t,r;return _createClass$3(e,[{key:"speedInfo",value:function(){return{speed:this._bandwidthService.getLatestSpeed(),avgSpeed:this._bandwidthService.getAvgSpeed()}}},{key:"load",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r,o=[];return e&&(o[0]=this.loadVideoSegment(e,r)),t&&(o[1]=this.loadAudioSegment(t,n)),Promise.all(o)}},{key:"loadVideoSegment",value:function(e,t){return this._loadSegment(this._segmentLoader,e,t)}},{key:"loadAudioSegment",value:function(e,t){return this._loadSegment(this._audioSegmentLoader,e,t)}},{key:"_loadSegment",value:(r=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r,n){var o,a,i,s,c,l,u,$,p,f,d,y,h,g,m,_=this;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=[],this.hls.emit(EVENT.LOAD_START,{url:r.url}),u[0]=t.load(r.url),n&&r.initSegment&&(p=r.initSegment.url,(a=this._mapCache[p])||(this.hls.emit(EVENT.LOAD_START,{url:p}),u[1]=t.load(p).then((function(e){e&&(Object.keys(_._mapCache)>30&&(_._mapCache={}),a=_._mapCache[p]=e.data,_._emitOnLoaded(e,p))}))),(f=null===($=r.initSegment.key)||void 0===$?void 0:$.url)&&(l=r.initSegment.key.iv,(c=this._keyCache[f])||(this.hls.emit(EVENT.LOAD_START,{url:f}),u[2]=this._keyLoader.load(f).then((function(e){e&&(c=_._keyCache[f]=e.data,_._emitOnLoaded(e,f))}))))),(d=null===(o=r.key)||void 0===o?void 0:o.url)&&(s=r.key.iv,(i=this._keyCache[d])||(this.hls.emit(EVENT.LOAD_START,{url:d}),u[3]=this._keyLoader.load(d).then((function(e){e&&(i=_._keyCache[d]=e.data,_._emitOnLoaded(e,d))})))),e.next=8,Promise.all(u);case 8:if(y=e.sent,h=_slicedToArray$1(y,1),g=h[0]){e.next=13;break}return e.abrupt("return");case 13:return m=g.data,this._emitOnLoaded(g,r.url),e.abrupt("return",{data:m,map:a,key:i,mapKey:c,keyIv:s,mapKeyIv:l});case 16:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"reset",value:function(){this.error=null,this._mapCache={},this._keyCache={},this._bandwidthService.reset()}},{key:"cancel",value:(t=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this._keyLoader.cancel(),this._segmentLoader.cancel(),this._audioSegmentLoader.cancel()]);case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),logger=new Logger$2("hls"),Hls=function(e){_inherits$2(y,EventEmitter);var t,r,n,o,a,i,s,c,l,u,$,p,f,d=_createSuper$2(y);function y(e){var t;return _classCallCheck$3(this,y),_defineProperty$3(_assertThisInitialized$2(t=d.call(this)),"version",y.version),_defineProperty$3(_assertThisInitialized$2(t),"media",null),_defineProperty$3(_assertThisInitialized$2(t),"config",null),_defineProperty$3(_assertThisInitialized$2(t),"_manifestLoader",null),_defineProperty$3(_assertThisInitialized$2(t),"_segmentLoader",null),_defineProperty$3(_assertThisInitialized$2(t),"_playlist",null),_defineProperty$3(_assertThisInitialized$2(t),"_bufferService",null),_defineProperty$3(_assertThisInitialized$2(t),"_gapService",null),_defineProperty$3(_assertThisInitialized$2(t),"_seiService",null),_defineProperty$3(_assertThisInitialized$2(t),"_stats",null),_defineProperty$3(_assertThisInitialized$2(t),"_prevSegSn",null),_defineProperty$3(_assertThisInitialized$2(t),"_prevSegCc",null),_defineProperty$3(_assertThisInitialized$2(t),"_tickTimer",null),_defineProperty$3(_assertThisInitialized$2(t),"_tickInterval",500),_defineProperty$3(_assertThisInitialized$2(t),"_segmentProcessing",!1),_defineProperty$3(_assertThisInitialized$2(t),"_reloadOnPlay",!1),_defineProperty$3(_assertThisInitialized$2(t),"_switchUrlOpts",null),_defineProperty$3(_assertThisInitialized$2(t),"_loadSegment",_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var r,n;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._segmentProcessing&&t.media){e.next=2;break}return e.abrupt("return");case 2:if(r=t.media.currentTime,n=t._playlist.currentSegment,t._playlist.nextSegment&&!(n&&!t.isLive&&n.end-r>=t.config.preloadTime)){e.next=7;break}return e.abrupt("return");case 7:return e.abrupt("return",t._loadSegmentDirect());case 8:case"end":return e.stop()}}),e)})))),_defineProperty$3(_assertThisInitialized$2(t),"_onPlay",_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(clearTimeout(t._disconnectTimer),!t._reloadOnPlay){e.next=6;break}t._reloadOnPlay=!1,t.replay(!0),e.next=9;break;case 6:return e.next=8,t._loadSegment();case 8:t._startTick();case 9:case"end":return e.stop()}}),e)})))),_defineProperty$3(_assertThisInitialized$2(t),"_onPause",(function(){if(t.isLive){if(!t._reloadOnPlay){var e=t.config.disconnectTime;if(null==e&&(e=t._playlist.dvrWindow),!Number.isFinite(e))return;clearTimeout(t._disconnectTimer),t._disconnectTimer=setTimeout((function(){t._reloadOnPlay=!0,t._clear()}),e||0)}}else t._stopTick()})),_defineProperty$3(_assertThisInitialized$2(t),"_onSeeking",_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var r,n,o,a,i,s,c;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.media){e.next=2;break}return e.abrupt("return");case 2:if(r=t.media.currentTime,!(n=t._playlist.seekRange)){e.next=9;break}if(!((o=clamp(r,n[0]+.1,n[1]-.1))>=0&&Math.abs(r-o)>=.1)){e.next=9;break}return t.media.currentTime=o,e.abrupt("return");case 9:if(!(a=t._playlist.currentSegment)){e.next=14;break}if(!((i=Buffer$1.info(Buffer$1.get(t.media),r,.1)).end&&Math.abs(i.end-a.end)<.2)){e.next=14;break}return e.abrupt("return");case 14:if(s=t._playlist.findSegmentIndexByTime(r),c=t._playlist.getSegmentByIndex(s),null!=s&&c&&(!t._segmentProcessing||c!==t._playlist.nextSegment)){e.next=18;break}return e.abrupt("return");case 18:return logger.debug("seek to",r,c),t._playlist.setNextSegmentByIndex(s),t._stopTick(),e.next=23,t._segmentLoader.cancel();case 23:return e.next=25,t._loadSegmentDirect();case 25:t._startTick();case 26:case"end":return e.stop()}}),e)})))),_defineProperty$3(_assertThisInitialized$2(t),"_onTimeupdate",(function(){if(t.media){var e=t.config;if(e.isLive&&e.maxLatency&&e.targetLatency&&t.media){var r=t._playlist.liveEdge;if(!r)return;var n=r-t.media.currentTime;n>=e.maxLatency&&(logger.debug("latency jump, currentTime:".concat(t.media.currentTime,", liveEdge:").concat(r,", latency=").concat(n)),t.media.currentTime=r-e.targetLatency)}t._seiService.throw(t.media.currentTime),t.config.allowedStreamTrackChange&&!t.config.softDecode&&t._checkStreamTrackChange(t.media.currentTime)}})),_defineProperty$3(_assertThisInitialized$2(t),"_tick",(function(){if(t.media){t._startTick();var e=t.media,r=Buffer$1.get(e),n=t._segmentLoader.error;if(n){(!e.readyState||t.bufferInfo(.5).remaining<1)&&(n.fatal=!0,t._emitError(StreamingError.network(n)))}else Buffer$1.end(r)<.1||!e.readyState||(isMediaPlaying(e)?(t._loadSegment(),t._gapService&&t._gapService.do(e,t.config.maxJumpDistance,t.isLive)):e.readyState<2&&t._gapService&&t._gapService.do(e,t.config.maxJumpDistance,!e.currentTime||t.isLive))}})),t.config=e=getConfig(e),t.media=t.config.media,t._manifestLoader=new ManifestLoader(_assertThisInitialized$2(t)),t._segmentLoader=new SegmentLoader(_assertThisInitialized$2(t)),t._playlist=new Playlist(_assertThisInitialized$2(t)),t._bufferService=new BufferService(_assertThisInitialized$2(t)),t._seiService=new SeiService(_assertThisInitialized$2(t)),e.softDecode||(t._gapService=new GapService),t._stats=new MediaStatsService(_assertThisInitialized$2(t),9e4),t.media.addEventListener("play",t._onPlay),t.media.addEventListener("pause",t._onPause),t.media.addEventListener("seeking",t._onSeeking),t.media.addEventListener("timeupdate",t._onTimeupdate),t}return _createClass$3(y,[{key:"isLive",get:function(){return this._playlist.isLive}},{key:"streams",get:function(){return this._playlist.streams}},{key:"currentStream",get:function(){return this._playlist.currentStream}},{key:"hasSubtitle",get:function(){return this._playlist.hasSubtitle}},{key:"baseDts",get:function(){var e;return null===(e=this._bufferService)||void 0===e?void 0:e.baseDts}},{key:"speedInfo",value:function(){return this._segmentLoader.speedInfo()}},{key:"bufferInfo",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1;return Buffer$1.info(Buffer$1.get(this.media),null===(e=this.media)||void 0===e?void 0:e.currentTime,t)}},{key:"getStats",value:function(){return this._stats.getStats()}},{key:"playbackQuality",value:function(){return getVideoPlaybackQuality(this.media)}},{key:"load",value:(f=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]&&n[1],t&&(this.config.url=t),t=this.config.url,e.next=5,this._reset(r);case 5:return e.next=7,this._loadData(t);case 7:this._startTick();case 8:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:"_loadData",value:(p=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n,o,a,i,s,c,l,u,$;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(t=t.trim()),t){e.next=3;break}throw this._emitError(new StreamingError(ERR.OTHER,ERR.SUB_TYPES.OPTION,null,null,"m3u8 url is missing"));case 3:return e.next=5,this._loadM3U8(t);case 5:if(r=e.sent,n=this._playlist.currentStream,!this._urlSwitching){e.next=17;break}if(0===n.bitrate&&null!==(o=this._switchUrlOpts)&&void 0!==o&&o.bitrate&&(n.bitrate=null===(a=this._switchUrlOpts)||void 0===a?void 0:a.bitrate),i=this._getSeamlessSwitchPoint(),this.config.startTime=i,s=this._playlist.findSegmentIndexByTime(i),!(c=this._playlist.getSegmentByIndex(s+1))){e.next=17;break}return l=c.start,e.next=17,this._bufferService.removeBuffer(l);case 17:if(!r){e.next=29;break}if(!this.isLive){e.next=25;break}this._bufferService.setLiveSeekableRange(0,4294967295),logger.log("totalDuration first time got",this._playlist.totalDuration),this.config.targetLatency<this._playlist.totalDuration&&(this.config.targetLatency=this._playlist.totalDuration,this.config.maxLatency=1.5*this.config.targetLatency),r.isMaster||this._pollM3U8(t),e.next=29;break;case 25:return e.next=27,this._bufferService.updateDuration(n.totalDuration);case 27:(u=this.config.startTime)&&(null!==($=this._switchUrlOpts)&&void 0!==$&&$.seamless||(this.media.currentTime=u),this._playlist.setNextSegmentByIndex(this._playlist.findSegmentIndexByTime(u)||0));case 29:return e.next=31,this._loadSegment();case 31:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"replay",value:($=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.config.startTime=0,!this.config.softDecode){e.next=5;break}this.load(),e.next=7;break;case 5:return e.next=7,this.load();case 7:return this._reloadOnPlay=!1,e.abrupt("return",this.media.play(!t));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return $.apply(this,arguments)})},{key:"switchURL",value:(u=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n,o,a,i,s,c,l=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=l.length>1&&void 0!==l[1]?l[1]:{},n={seamless:!1,startTime:0,bitrate:0},e.t0=_typeof$3(r),e.next="number"===e.t0?5:"boolean"===e.t0?7:"object"===e.t0?9:11;break;case 5:return r={startTime:r},e.abrupt("break",12);case 7:return r={seamless:r},e.abrupt("break",12);case 9:for(o in r)void 0!==r[o]&&null!==r[o]||delete r[o];return e.abrupt("break",12);case 11:throw"unsupported switchURL args: ".concat(r);case 12:if(r=Object.assign({},n,r),i=(a=r).seamless,s=a.startTime,this.config.url=t,this.config.startTime=s,this._switchUrlOpts=r,i){e.next=38;break}if(e.prev=18,!this.config.softDecode){e.next=23;break}e.t1=this.load(t),e.next=26;break;case 23:return e.next=25,this.load(t);case 25:e.t1=e.sent;case 26:c=e.t1,e.next=33;break;case 29:throw e.prev=29,e.t2=e.catch(18),this.emit(Event$1.SWITCH_URL_FAILED,e.t2),e.t2;case 33:return this._reloadOnPlay=!1,c&&this.emit(Event$1.SWITCH_URL_SUCCESS,{url:t}),e.abrupt("return",this.media.play(!0));case 38:return this._urlSwitching=!0,this._prevSegSn=null,this._prevSegCc=null,this._playlist.reset(),this._bufferService.seamlessSwitch(),e.next=45,this._clear();case 45:return e.next=47,this._loadData(t);case 47:this._startTick();case 48:this._switchUrlOpts=null;case 49:case"end":return e.stop()}}),e,this,[[18,29]])}))),function(e){return u.apply(this,arguments)})},{key:"switchStream",value:(l=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n,o,a,i,s=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!(s.length>1&&void 0!==s[1])||s[1],n=this.currentStream,o=this.streams,n&&n.id!==t&&o&&!(o.length<2)){e.next=5;break}return e.abrupt("return");case 5:if(a=o.find((function(e){return e.id===t}))){e.next=8;break}return e.abrupt("return");case 8:return e.prev=8,e.next=11,this._clear();case 11:if(!r){e.next=14;break}return e.next=14,this._bufferService.clearAllBuffer();case 14:e.next=19;break;case 16:throw e.prev=16,e.t0=e.catch(8),this._emitError(StreamingError.create(e.t0));case 19:if(n.currentAudioStream&&a.audioStreams.length>2&&(i=n.currentAudioStream.id,a.currentAudioStream=a.audioStreams.find((function(e){return e.id===i}))||a.currentAudioStream),this._playlist.currentStream=a,e.prev=21,!this.isLive&&a.segments.length){e.next=25;break}return e.next=25,this._refreshM3U8();case 25:return this._playlist.setNextSegmentByIndex(this._playlist.findSegmentIndexByTime(this.media.currentTime)||0),this._prevSegCc=null,e.next=29,this._loadSegmentDirect();case 29:e.next=35;break;case 31:throw e.prev=31,e.t1=e.catch(21),this._playlist.currentStream=n,e.t1;case 35:return this._startTick(),e.abrupt("return",a);case 37:case"end":return e.stop()}}),e,this,[[8,16],[21,31]])}))),function(e){return l.apply(this,arguments)})},{key:"switchAudioStream",value:(c=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n,o,a,i=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!(i.length>1&&void 0!==i[1])||i[1],n=this.currentStream){e.next=4;break}return e.abrupt("return");case 4:if((o=n.currentAudioStream)&&o.id!==t&&!(n.audioStreams.length<2)){e.next=7;break}return e.abrupt("return");case 7:if(a=n.audioStreams.find((function(e){return e.id===t}))){e.next=10;break}return e.abrupt("return");case 10:return e.prev=10,e.next=13,this._clear();case 13:if(!r){e.next=16;break}return e.next=16,this._bufferService.clearAllBuffer();case 16:e.next=21;break;case 18:throw e.prev=18,e.t0=e.catch(10),this._emitError(StreamingError.create(e.t0));case 21:if(n.currentAudioStream=a,e.prev=22,!this.isLive&&a.segments.length){e.next=26;break}return e.next=26,this._refreshM3U8();case 26:return this._playlist.setNextSegmentByIndex(this._playlist.findSegmentIndexByTime(this.media.currentTime)||0),this._prevSegCc=null,e.next=30,this._loadSegmentDirect();case 30:e.next=36;break;case 32:throw e.prev=32,e.t1=e.catch(22),n.currentAudioStream=o,e.t1;case 36:return this._startTick(),e.abrupt("return",a);case 38:case"end":return e.stop()}}),e,this,[[10,18],[22,32]])}))),function(e){return c.apply(this,arguments)})},{key:"switchSubtitleStream",value:(s=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._playlist.switchSubtitle(t),e.next=3,this._manifestLoader.stopPoll();case 3:return e.next=5,this._refreshM3U8();case 5:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"destroy",value:(i=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.media){e.next=2;break}return e.abrupt("return");case 2:return this.removeAllListeners(),this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),this.media.removeEventListener("play",this._onPlay),this.media.removeEventListener("pause",this._onPause),this.media.removeEventListener("seeking",this._onSeeking),this.media.removeEventListener("timeupdate",this._onTimeupdate),e.next=12,Promise.all([this._clear(),this._bufferService.destroy()]);case 12:this.media=null;case 13:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"_loadM3U8",value:(a=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t){var r,n,o,a;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._manifestLoader.load(t);case 3:n=e.sent,o=_slicedToArray$1(n,1),r=o[0],e.next=11;break;case 8:throw e.prev=8,e.t0=e.catch(0),this._emitError(StreamingError.create(e.t0));case 11:if(r){e.next=13;break}return e.abrupt("return");case 13:if(this._playlist.upsertPlaylist(r),!r.isMaster){e.next=18;break}return null!==(a=this._playlist.currentStream.subtitleStreams)&&void 0!==a&&a.length&&this.emit(Event$1.SUBTITLE_PLAYLIST,{list:this._playlist.currentStream.subtitleStreams}),e.next=18,this._refreshM3U8();case 18:return this.emit(Event$1.STREAM_PARSED),e.abrupt("return",r);case 20:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e){return a.apply(this,arguments)})},{key:"_refreshM3U8",value:function(){var e,t,r=this,n=this._playlist.currentStream;if(!n||!n.url)throw this._emitError(StreamingError.create(null,null,new Error("m3u8 url is not defined")));var o=n.url,a=null===(e=n.currentAudioStream)||void 0===e?void 0:e.url,i=null===(t=n.currentSubtitleStream)||void 0===t?void 0:t.url;return this._manifestLoader.load(o,a,i).then((function(e){var t=_slicedToArray$1(e,3),n=t[0],s=t[1],c=t[2];n&&(r._playlist.upsertPlaylist(n,s,c),r.isLive&&r._pollM3U8(o,a,i))})).catch((function(e){throw r._emitError(StreamingError.create(e))}))}},{key:"_pollM3U8",value:function(e,t,r){var n,o=this,a=this._playlist.isEmpty;this._manifestLoader.poll(e,t,r,(function(e,t,r){o._playlist.upsertPlaylist(e,t,r),o._playlist.clearOldSegment(),e&&a&&!o._playlist.isEmpty&&o._loadSegment(),a&&(a=o._playlist.isEmpty)}),(function(e){o._emitError(StreamingError.create(e))}),1e3*((null===(n=this._playlist.lastSegment)||void 0===n?void 0:n.duration)||0))}},{key:"_loadSegmentDirect",value:(o=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var t,r,n;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._playlist.nextSegment){e.next=3;break}return e.abrupt("return");case 3:return r=!1,n=null,e.prev=5,this._segmentProcessing=!0,e.next=9,this._reqAndBufferSegment(t,this._playlist.getAudioSegment(t));case 9:r=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),n=e.t0;case 15:return e.prev=15,this._segmentProcessing=!1,e.finish(15);case 18:if(!n){e.next=20;break}return e.abrupt("return",this._emitError(StreamingError.create(n)));case 20:return r&&(this._urlSwitching&&(this._urlSwitching=!1,this.emit(Event$1.SWITCH_URL_SUCCESS,{url:this.config.url})),this._playlist.moveSegmentPointer(),t.isLast?this._end():this._loadSegment()),e.abrupt("return",r);case 22:case"end":return e.stop()}}),e,this,[[5,12,15,18]])}))),function(){return o.apply(this,arguments)})},{key:"_reqAndBufferSegment",value:(n=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(t,r){var n,o,a,i,s,c,l,u;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t?t.cc:r.cc,a=this._prevSegCc!==o,i=[],e.prev=3,e.next=6,this._segmentLoader.load(t,r,a);case 6:i=e.sent,e.next=14;break;case 9:throw e.prev=9,e.t0=e.catch(3),e.t0.fatal=!1,this._segmentLoader.error=e.t0,e.t0;case 14:if(i[0]){e.next=16;break}return e.abrupt("return");case 16:return e.next=18,(n=this._bufferService).decryptBuffer.apply(n,_toConsumableArray$2(i));case 18:if(s=e.sent){e.next=21;break}return e.abrupt("return");case 21:return c=t?t.sn:r.sn,l=t?t.start:r.start,u=this._playlist.currentStream,this._bufferService.createSource(s[0],s[1],null==u?void 0:u.videoCodec,null==u?void 0:u.audioCodec),e.next=27,this._bufferService.appendBuffer(t,r,s[0],s[1],a,this._prevSegSn===c-1,l);case 27:return e.next=29,this._bufferService.evictBuffer(this.config.bufferBehind);case 29:return this._prevSegCc=o,this._prevSegSn=c,e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,this,[[3,9]])}))),function(e,t){return n.apply(this,arguments)})},{key:"_checkStreamTrackChange",value:function(e){var t=this._playlist.checkSegmentTrackChange(e,this._bufferService.nbSb);t&&this.switchURL(this.config.url,t.start+.2)}},{key:"_clear",value:(r=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._disconnectTimer),this._stopTick(),e.next=4,Promise.all([this._segmentLoader.cancel(),this._manifestLoader.stopPoll()]);case 4:this._segmentProcessing=!1;case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"_reset",value:(t=_asyncToGenerator$1(_regeneratorRuntime$1().mark((function e(){var t,r=arguments;return _regeneratorRuntime$1().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]&&r[0],this._reloadOnPlay=!1,this._prevSegSn=null,this._prevSegCc=null,this._switchUrlOpts=null,this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),this._stats.reset(),e.next=11,this._clear();case 11:return e.abrupt("return",this._bufferService.reset(t));case 12:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_end",value:function(){this._clear(),this._bufferService.endOfStream()}},{key:"_stopTick",value:function(){this._tickTimer&&clearTimeout(this._tickTimer),this._tickTimer=null}},{key:"_startTick",value:function(){this._stopTick(),this._tickTimer=setTimeout(this._tick,this._tickInterval)}},{key:"_emitError",value:function(e){var t,r,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!1===(null===(t=e.originError)||void 0===t?void 0:t.fatal)?logger.warn(e):(logger.table(e),logger.error(e),logger.error(null===(r=this.media)||void 0===r?void 0:r.error),null!==(n=this.media)&&void 0!==n&&n.readyState&&this.media.pause(),this._stopTick(),this._urlSwitching&&(this._urlSwitching=!1,this.emit(Event$1.SWITCH_URL_FAILED,e)),this.emit(Event$1.ERROR,e),o&&this._end(),this._seiService.reset());return e}},{key:"_getSeamlessSwitchPoint",value:function(){var e=this.media,t=e.currentTime;if(!e.paused){var r,n=this._playlist.findSegmentIndexByTime(e.currentTime),o=this._playlist.getSegmentByIndex(n),a=null===(r=this._stats)||void 0===r?void 0:r.getStats().downloadSpeed;if(a&&o)t+=o.duration*this._playlist.currentStream.bitrate/a+1;else t+=5}return t}}],[{key:"isSupported",value:function(e){return e&&"video"!==e&&"audio"!==e?"undefined"!=typeof WebAssembly:MSE.isSupported()}},{key:"enableLogger",value:function(){Logger$2.enable(),Logger$1.enable()}},{key:"disableLogger",value:function(){Logger$2.disable(),Logger$1.disable()}}]),y}();_defineProperty$3(Hls,"version","3.0.0-next.36-1");try{localStorage.getItem("xgd")?Hls.enableLogger():Hls.disableLogger()}catch(e){}var PluginExtension=function(){function e(t,r){var n=this;_classCallCheck$3(this,e),_defineProperty$3(this,"_opts",null),_defineProperty$3(this,"_plugin",null),_defineProperty$3(this,"_onLowDecode",(function(){var e,t,r,o,a=n._opts,i=a.media,s=a.innerDegrade;null===(e=n._plugin)||void 0===e||null===(t=e.player)||void 0===t||t.emit("lowdecode",i.degradeInfo),null===(r=n._plugin)||void 0===r||null===(o=r.player)||void 0===o||o.emit("core_event",_objectSpread2$2(_objectSpread2$2({},i.degradeInfo),{},{eventName:Event$1.LOWDECODE})),1===s&&n._degrade(i.src)})),_defineProperty$3(this,"_degrade",(function(e){var t=n._plugin.player,r=t.video;if(!r||"MVideo"===r.TAG){var o=t.video.degradeVideo;t.video=o,r.degrade(e),e&&(t.config.url=e);var a=t.root.firstChild;"MVideo"===a.TAG&&t.root.replaceChild(o,a);var i=n._plugin.constructor.pluginName.toLowerCase();t.unRegisterPlugin(i),t.once("canplay",(function(){t.play()}))}})),_defineProperty$3(this,"forceDegradeToVideo",(function(e){1===n._opts.innerDegrade&&n._degrade(e)})),this._opts=t,this._plugin=r,this._init()}return _createClass$3(e,[{key:"_init",value:function(){var e=this._opts,t=e.media,r=e.preloadTime,n=e.innerDegrade,o=e.isLive;t&&(o||!t.setPlayMode?(n&&t.setAttribute("innerdegrade",n),r&&t.setAttribute("preloadtime",r),this._bindEvents()):t.setPlayMode("VOD"))}},{key:"_bindEvents",value:function(){this._opts.media.addEventListener("lowdecode",this._onLowDecode)}},{key:"destroy",value:function(){var e,t;null===(e=this._opts)||void 0===e||null===(t=e.media)||void 0===t||t.removeEventListener("lowdecode",this._onLowDecode),this._plugin=null}}]),e}();function parseSwitchUrlArgs(e,t){var r={startTime:t.player.currentTime};switch(_typeof$3(e)){case"boolean":r.seamless=e;break;case"object":Object.assign(r,e)}return r}var HlsPlugin=function(e){_inherits$2(r,BasePlugin);var t=_createSuper$2(r);function r(){var e;_classCallCheck$3(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _defineProperty$3(_assertThisInitialized$2(e=t.call.apply(t,[this].concat(o))),"hls",null),_defineProperty$3(_assertThisInitialized$2(e),"pluginExtension",null),_defineProperty$3(_assertThisInitialized$2(e),"getStats",(function(){var t;return null===(t=e.hls)||void 0===t?void 0:t.getStats()})),_defineProperty$3(_assertThisInitialized$2(e),"destroy",(function(){var t;e.hls&&(e.hls.destroy(),e.hls=null),null===(t=e.pluginExtension)||void 0===t||t.destroy(),e.pluginExtension=null})),_defineProperty$3(_assertThisInitialized$2(e),"_onSwitchSubtitle",(function(t){var r,n=t.lang;null===(r=e.hls)||void 0===r||r.switchSubtitleStream(n)})),_defineProperty$3(_assertThisInitialized$2(e),"_onSwitchURL",(function(t,r){var n=_assertThisInitialized$2(e),o=n.player,a=n.hls;if(a){var i=parseSwitchUrlArgs(r,_assertThisInitialized$2(e));o.config.url=t,a.switchURL(t,i).catch((function(e){}))}})),e}return _createClass$3(r,[{key:"core",get:function(){return this.hls}},{key:"version",get:function(){var e;return null===(e=this.hls)||void 0===e?void 0:e.version}},{key:"softDecode",get:function(){var e,t,r=null===(e=this.player)||void 0===e||null===(t=e.config)||void 0===t?void 0:t.mediaType;return!!r&&"video"!==r&&"audio"!==r}},{key:"beforePlayerInit",value:function(){var e,t=this,r=new Promise((function(t,r){e=t})),n=this.player.config;if(n.url||n.__allowHlsEmptyUrl__){this.hls&&this.hls.destroy(),this.player.switchURL=this._onSwitchURL;var o,a,i=n.hls||{};if(i.innerDegrade=i.innerDegrade||n.innerDegrade,null!==i.disconnectTime&&void 0!==i.disconnectTime||(i.disconnectTime=0),this.hls=new Hls(_objectSpread2$2({softDecode:this.softDecode,isLive:n.isLive,media:this.player.media||this.player.video,startTime:n.startTime,url:n.url},i)),this.softDecode)e(!0);else BasePlugin.defineGetterOrSetter(this.player,{url:{get:function(){var e,r;return null===(e=t.hls)||void 0===e||null===(r=e.media)||void 0===r?void 0:r.src},configurable:!0}}),null!==(o=this.hls.media)&&void 0!==o&&o.src?this.hls.on("sourceAttached",(function(){e(!0)})):e(!0);if(this.softDecode&&(this.pluginExtension=new PluginExtension(_objectSpread2$2({isLive:n.isLive,media:this.player.video},i),this),this.player.forceDegradeToVideo=function(){for(var e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return null===(e=t.pluginExtension)||void 0===e?void 0:e.forceDegradeToVideo.apply(e,n)}),n.isLive)null===(a=this.player)||void 0===a||a.useHooks("replay",(function(){var e;return null===(e=t.hls)||void 0===e?void 0:e.replay()}));return this.on(SWITCH_SUBTITLE,this._onSwitchSubtitle),this.on(URL_CHANGE,this._onSwitchURL),this.on(DESTROY,this.destroy),this._transError(),this._transCoreEvent(EVENT.TTFB),this._transCoreEvent(EVENT.LOAD_START),this._transCoreEvent(EVENT.LOAD_RESPONSE_HEADERS),this._transCoreEvent(EVENT.LOAD_COMPLETE),this._transCoreEvent(EVENT.LOAD_RETRY),this._transCoreEvent(EVENT.SOURCEBUFFER_CREATED),this._transCoreEvent(EVENT.REMOVE_BUFFER),this._transCoreEvent(EVENT.BUFFEREOS),this._transCoreEvent(EVENT.KEYFRAME),this._transCoreEvent(EVENT.METADATA_PARSED),this._transCoreEvent(EVENT.SEI),this._transCoreEvent(EVENT.SEI_IN_TIME),this._transCoreEvent(EVENT.SPEED),this._transCoreEvent(EVENT.HLS_MANIFEST_LOADED),this._transCoreEvent(EVENT.HLS_LEVEL_LOADED),this._transCoreEvent(EVENT.STREAM_EXCEPTION),this._transCoreEvent(EVENT.SWITCH_URL_SUCCESS),this._transCoreEvent(EVENT.SWITCH_URL_FAILED),this._transCoreEvent(Event$1.NO_AUDIO_TRACK),this._transCoreEvent(Event$1.STREAM_PARSED),this._transCoreEvent(Event$1.SUBTITLE_SEGMENTS),this._transCoreEvent(Event$1.SUBTITLE_PLAYLIST),n.url&&this.hls.load(n.url,!0).catch((function(e){})),r}e()}},{key:"_transError",value:function(){var e=this;this.hls.on(Event$1.ERROR,(function(t){e.player&&e.player.emit(ERROR,new Errors(e.player,t))}))}},{key:"_transCoreEvent",value:function(e){var t=this;this.hls.on(e,(function(r){t.player&&(t.player.emit("core_event",_objectSpread2$2(_objectSpread2$2({},r),{},{eventName:e})),e===EVENT.SEI_IN_TIME&&t.hls.hasSubtitle&&t._emitSeiPaylodTime(r))}))}},{key:"_emitSeiPaylodTime",value:function(e){try{var t=JSON.parse(Array.from(e.data.payload).map((function(e){return String.fromCharCode(e)})).join("").slice(0,-1));if(!t.rtmp_dts)return;this.player.emit("core_event",{eventName:Event$1.SEI_PAYLOAD_TIME,time:t.rtmp_dts})}catch(e){}}}],[{key:"pluginName",get:function(){return"hls"}},{key:"isSupported",value:function(e,t){return Hls.isSupported(e,t)}}]),r}();_defineProperty$3(HlsPlugin,"Hls",Hls),_defineProperty$3(HlsPlugin,"EVENT",Event$1);export{HlsPlugin as default};
2
+ //# sourceMappingURL=esm/veplayer.plugin.hls.production.js.map