@kwai-video-team/kwai-player-web
Version:
<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
1 lines • 460 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KwaiPlayerVue2=t():e.KwaiPlayerVue2=t()}(this,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t,i){var n=i(5);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(){return e.exports=i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.r(t),i.d(t,"CallbackProxy",(function(){return bt})),i.d(t,"ControlsPluginLabel",(function(){return ut})),i.d(t,"ControlsPluginModule",(function(){return Tt})),i.d(t,"ControlsSlotPos",(function(){return yt})),i.d(t,"DanmakuControlsPos",(function(){return gt})),i.d(t,"DanmakuPluginDomStyle",(function(){return mt})),i.d(t,"DanmakuPluginLabel",(function(){return _t})),i.d(t,"DanmakuPluginModule",(function(){return Gt})),i.d(t,"FullscreenType",(function(){return Fe})),i.d(t,"HotkeyPluginLabel",(function(){return dt})),i.d(t,"HotkeyPluginModule",(function(){return xt})),i.d(t,"I18nPluginLabel",(function(){return lt})),i.d(t,"I18nPluginModule",(function(){return St})),i.d(t,"KwaiPlayer",(function(){return qt})),i.d(t,"KwaiPlayerEvent",(function(){return He})),i.d(t,"KwaiPlayerLayer",(function(){return Be})),i.d(t,"KwaiPlayerVue2",(function(){return ii})),i.d(t,"LiveShiftType",(function(){return Ue})),i.d(t,"LoggerPluginLabel",(function(){return ct})),i.d(t,"LoggerPluginModule",(function(){return kt})),i.d(t,"MaskPluginLabel",(function(){return At})),i.d(t,"MaskPluginModule",(function(){return Ft})),i.d(t,"PlayInfoPluginLabel",(function(){return ht})),i.d(t,"PlayInfoPluginModule",(function(){return Ct})),i.d(t,"PluginModule",(function(){return Et})),i.d(t,"PreviewPluginLabel",(function(){return pt})),i.d(t,"PreviewPluginModule",(function(){return Pt})),i.d(t,"RotatePluginLabel",(function(){return ft})),i.d(t,"RotatePluginModule",(function(){return Mt})),i.d(t,"VRPluginLabel",(function(){return vt})),i.d(t,"VRPluginModule",(function(){return Ht})),i.d(t,"default",(function(){return ii}));var n=i(1),r=i.n(n),o=i(3),a=i.n(o),s=i(0),u=i.n(s),l=i(2),c=i.n(l);function d(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return h(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}var f=Object.defineProperty,p=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,_=function(e,t,i){return t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i};Number.isFinite||(Number.isFinite=function(e){return"number"==typeof e&&isFinite(e)}),Array.prototype.find||(Array.prototype.find=function(e,t){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("callback must be a function");for(var i=Object(this),n=i.length>>>0,r=0;r<n;r++)if(e.call(t,i[r],r,i))return i[r]}),Array.prototype.findIndex||(Array.prototype.findIndex=function(e,t){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("callback must be a function");for(var i=Object(this),n=i.length>>>0,r=0;r<n;r++)if(r in i&&e.call(t,i[r],r,i))return r;return-1}),Array.prototype.fill||(Array.prototype.fill=function(e,t,i){if(void 0===t&&(t=0),void 0===i&&(i=this.length),null==this)throw new TypeError("Array.prototype.fill called on null or undefined");for(var n=Object(this),r=n.length>>>0,o=t>>0,a=i>>0,s=o<0?Math.max(r+o,0):Math.min(o,r),u=a<0?Math.max(r+a,0):Math.min(a,r),l=s;l<u;l++)n[l]=e;return n});var m=Object.defineProperty,g=function(e,t,i){return function(e,t,i){t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i}(e,"symbol"!=typeof t?t+"":t,i),i},y=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=8)}([function(e,t,i){var n=i(5);function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(t){return e.exports=i="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.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(7)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t){function i(){return e.exports=i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(e,t,i,n,r,o,a){try{var s=e[o](a),u=s.value}catch(e){return void i(e)}s.done?t(u):Promise.resolve(u).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(1).default,r=i(6);e.exports=function(e){var t=r(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(1).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(1).default;function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=r=function(){return i},e.exports.__esModule=!0,e.exports.default=e.exports;var t,i={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(e,t,i){e[t]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,i){return e[t]=i}}function f(e,t,i,n){var r=t&&t.prototype instanceof g?t:g,o=Object.create(r.prototype),a=new C(n||[]);return s(o,"_invoke",{value:k(e,i,a)}),o}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}i.wrap=f;var A="suspendedStart",v="executing",_="completed",m={};function g(){}function y(){}function b(){}var E={};h(E,l,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(D([])));T&&T!==o&&a.call(T,l)&&(E=T);var R=b.prototype=g.prototype=Object.create(E);function S(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){var i;s(this,"_invoke",{value:function(r,o){function s(){return new t((function(i,s){!function i(r,o,s,u){var l=p(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,s,u)}),(function(e){i("throw",e,s,u)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return i("throw",e,s,u)}))}u(l.arg)}(r,o,i,s)}))}return i=i?i.then(s,s):s()}})}function k(e,i,n){var r=A;return function(o,a){if(r===v)throw Error("Generator is already running");if(r===_){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===A)throw r=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=v;var l=p(e,i,n);if("normal"===l.type){if(r=n.done?_:"suspendedYield",l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=_,n.method="throw",n.arg=l.arg)}}}function I(e,i){var n=i.method,r=e.iterator[n];if(r===t)return i.delegate=null,"throw"===n&&e.iterator.return&&(i.method="return",i.arg=t,I(e,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=p(r,e.iterator,i.arg);if("throw"===o.type)return i.method="throw",i.arg=o.arg,i.delegate=null,m;var a=o.arg;return a?a.done?(i[e.resultName]=a.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,m):a:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,m)}function x(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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function D(e){if(e||""===e){var i=e[l];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function i(){for(;++r<e.length;)if(a.call(e,r))return i.value=e[r],i.done=!1,i;return i.value=t,i.done=!0,i};return o.next=o}}throw new TypeError(n(e)+" is not iterable")}return y.prototype=b,s(R,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:y,configurable:!0}),y.displayName=h(b,d,"GeneratorFunction"),i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,h(e,d,"GeneratorFunction")),e.prototype=Object.create(R),e},i.awrap=function(e){return{__await:e}},S(L.prototype),h(L.prototype,c,(function(){return this})),i.AsyncIterator=L,i.async=function(e,t,n,r,o){void 0===o&&(o=Promise);var a=new L(f(e,t,n,r),o);return i.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(R),h(R,d,"Generator"),h(R,l,(function(){return this})),h(R,"toString",(function(){return"[object Generator]"})),i.keys=function(e){var t=Object(e),i=[];for(var n in t)i.push(n);return i.reverse(),function e(){for(;i.length;){var n=i.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},i.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var i in this)"t"===i.charAt(0)&&a.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},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 i=this;function n(n,r){return s.type="throw",s.arg=e,i.next=n,r&&(i.method="next",i.arg=t),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,m):this.complete(o)},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),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),O(i),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;O(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:D(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),m}},i}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){i.r(t),i.d(t,"KwaiVideoLocalLog",(function(){return k})),i.d(t,"LogLevel",(function(){return f})),i.d(t,"DefaultLogger",(function(){return _})),i.d(t,"Logger",(function(){return v})),i.d(t,"printVersion",(function(){return u})),i.d(t,"DEFAULT_LOG_LEVEL",(function(){return p}));var n=i(0),r=i.n(n),o=i(3),a=i.n(o),s={idbName:"kwai-video-local-log",idbMaxDataCount:25e3,idbMaxFoldLog:20,maxLogLen:4096};function u(e,t){console.log("%c "+e+" %c "+t+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px; color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0; color: #fff","background:transparent")}var l=function(){function e(){this.timeout=6048e5}var t=e.prototype;return t.write=function(t,i){if(e.available)try{localStorage.setItem(t,JSON.stringify({value:i,time:Date.now()}))}catch(e){}},t.read=function(t,i){if(void 0===i&&(i=!0),e.available)try{var n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=r.value,a=r.time,s=void 0===a?0:a;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return o}}catch(e){}},r()(e,null,[{key:"available",get:function(){if(void 0===e._available)try{localStorage.setItem("alg","test"),e._available=!0}catch(t){e._available=!1}return e._available}}])}();l._available=void 0;var c,d,h=l,f=((d={}).NONE="none",d.ERROR="e",d.WARN="w",d.INFO="i",d.DEBUG="d",d.VERBOSE="v",d),p=f.ERROR,A=((c={})[f.NONE]={value:1,str:"N"},c[f.ERROR]={value:100,str:"E"},c[f.WARN]={value:200,str:"W"},c[f.INFO]={value:300,str:"I"},c[f.DEBUG]={value:400,str:"D"},c[f.VERBOSE]={value:500,str:"V"},c),v=function(){function e(e){if(this._name="kwai-v",this._level=p,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&"blob:"===location.protocol){var t,i=location.href.split("/"),n=null==(t=i[i.length-1])?void 0:t.match(/(\w+)-/);n&&(this._workerTag=e?e+"-"+n[1]:n[1])}else e&&(this._workerTag=e)}e.loadLogLevel=function(e,t){if(void 0===t&&(t=!0),location.href){var i=new RegExp(e+"=([a-z]{1})"),n=location.href.match(i);if(n&&n.length>1){var r=n[1];if(this._isValueInLevel(r))return r}}var o=(new h).read(e,t);if(this._isValueInLevel(o))return o},e.saveLogLevel=function(e,t){this._isValueInLevel(t)&&(new h).write(e,t)},e._isValueInLevel=function(e){return-1!==Object.values(f).indexOf(e)};var t=e.prototype;return t.setOutput=function(e){return this._output=e,this},t.setLevel=function(e){return this._level=e,this},t.setId=function(e){return this._id=e,this},t.setName=function(e){return this._name=e,this},t.getLevel=function(){return this._level},t.getOutput=function(){return this._output},t.hasOutput=function(){return!!this._output},t.e=function(e){if(this._isLevelEnabled(this._level,f.ERROR)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.ERROR,e,i);try{var o;null==(o=this._output)||o.e.apply(o,[r].concat(i))}catch(e){}}},t.w=function(e){if(this._isLevelEnabled(this._level,f.WARN)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.WARN,e,i);try{var o;null==(o=this._output)||o.w.apply(o,[r].concat(i))}catch(e){}}},t.i=function(e){if(this._isLevelEnabled(this._level,f.INFO)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.INFO,e,i);try{var o;null==(o=this._output)||o.i.apply(o,[r].concat(i))}catch(e){}}},t.d=function(e){if(this._isLevelEnabled(this._level,f.DEBUG)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.DEBUG,e,i);try{var o;null==(o=this._output)||o.d.apply(o,[r].concat(i))}catch(e){}}},t.v=function(e){if(this._isLevelEnabled(this._level,f.VERBOSE)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.VERBOSE,e,i);try{var o;null==(o=this._output)||o.v.apply(o,[r].concat(i))}catch(e){}}},t._isLevelEnabled=function(e,t){return A[e].value>=A[t].value},t._printLog=function(e,t,i){var n,r,o=typeof t;if("object"===o)t=(null==(r=t)?void 0:r.constructor.name)||"unknown";else if("function"===o){var a;t=(null==(a=Object.getOwnPropertyDescriptor(t,"name"))?void 0:a.value)||"unknown"}var s,u,l=((null==(n=A[e])?void 0:n.str)||"")+"|"+this._name+"["+("function"==typeof this._id?this._id():this._id)+"]["+this._workerTag+"]::"+t;return e===f.ERROR?(s=console).error.apply(s,[l].concat(i.slice(0))):(u=console).log.apply(u,[l].concat(i.slice(0))),l},e}(),_=new v,m=r()((function e(t){this._logger=void 0,this._id=0,this._config=s,this._id=e._id,e._id++,this._logger=(new v).setId(this._id).setLevel(f.INFO),this._config=a()({},s,t)}),[{key:"config",get:function(){return this._config}},{key:"logger",get:function(){return this._logger}},{key:"id",get:function(){return this._id}}],[{key:"packName",get:function(){return"ll_es"}},{key:"version",get:function(){return"1.0.13"}},{key:"buildTime",get:function(){return"Tue Oct 08 2024 17:18:49 GMT+0800 (中国标准时间)"}}]);m._id=0;var g=i(4),y=i.n(g),b=i(2),E=i.n(b),w=function(){function e(e,t,i,n,r){var o=this;void 0===r&&(r=1),this._logger=void 0,this._name=void 0,this._storeName=void 0,this._dbIndex=void 0,this._version=void 0,this._taskQueue=[],this._openReq=void 0,this._isTransactionActive=!1,this._runTaskQueue=function(){for(;o._taskQueue.length;){var e=o._taskQueue.shift();e&&o.run(e.task,e.mode)}},this._logger=e,this._name=t,this._storeName=i,this._dbIndex=n,this._version=r}var t=e.prototype;return t.init=function(){var e=this;if(!this._openReq&&indexedDB){var t=this._openReq=indexedDB.open(this._name,this._version);this._logger.i("idb-wrapper","open",t),t.onerror=function(){e._logger.i("idb-wrapper","open error.")},t.onsuccess=function(){e._logger.i("idb-wrapper","open success."),e._runTaskQueue()},t.onupgradeneeded=function(){e._logger.i("idb-wrapper","open upgradeneeded."),t.result.objectStoreNames.contains(e._storeName)&&t.result.deleteObjectStore(e._storeName);var i=t.result.createObjectStore(e._storeName,{keyPath:"id",autoIncrement:!0});e._dbIndex&&e._dbIndex.forEach((function(e){i.createIndex(e.name,e.keyPath,e.option)}))}}},t.run=function(e,t){if(void 0===t&&(t="readwrite"),this.init(),this._openReq&&"done"===this._openReq.readyState&&!this._openReq.error)return this._doTask(e,t);"error"!==this.state&&(this._taskQueue.push({task:e,mode:t}),this._taskQueue.length>1e3&&this._taskQueue.shift())},t.close=function(){var e=this;this._logger.i("idb-wrapper","close"),this._openReq&&("done"===this._openReq.readyState?(this._openReq.result.close(),this._openReq=void 0):this._openReq.onsuccess=function(){e.close()})},t.destroy=function(){this._logger.i("idb-wrapper","destroy"),this.close(),this._taskQueue=[]},t._doTask=function(e,t){var i=this;if(void 0===t&&(t="readwrite"),this._openReq&&!this._openReq.error)try{this._isTransactionActive=!0;var n=this._openReq.result.transaction(this._storeName,t),r=void 0;n.oncomplete=function(){i._isTransactionActive=!1,e.callback&&e.callback(r),i._runTaskQueue()},n.onabort=n.onerror=function(){i._isTransactionActive=!1,e.callback&&e.callback(r),i._runTaskQueue()},r=e.exec(n.objectStore(this._storeName))}catch(e){}else e.callback&&e.callback()},r()(e,[{key:"isTransactionActive",get:function(){return this._isTransactionActive}},{key:"state",get:function(){return this._openReq&&"done"===this._openReq.readyState?this._openReq.error?"error":"ready":"idle"}}])}(),T=[{name:"id",keyPath:"id",option:{unique:!0}}],R=[function(){function e(e){this._ctx=void 0,this._idb=void 0,this._logCount=0,this._saveCount=0,this._reCountOnSaveCount=100,this._reduceData=!1,this._ctx=e,this._idb=new w(e.logger,e.config.idbName,e.config.idbName,T),this._reCountOnSaveCount=Math.min(200,Math.max(50,Math.round(this._ctx.config.idbMaxDataCount/10))),this._count()}e.isSupported=function(){return typeof indexedDB<"u"};var t,i=e.prototype;return i.saveLog=function(e){var t=this,i={exec:function(t){return t.add({value:e})},callback:function(e){t._saveCount++,t._saveCount%t._reCountOnSaveCount==0&&t._count(),null!=e&&e.error&&t._ctx.logger.i("idb-backend","save log err",e.error)}};this._idb.run(i)},i.exportLog=(t=y()(E.a.mark((function e(){var t=this;return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){t._ctx.logger.i("idb-backend","export start");var n={exec:function(e){return e.getAll()},callback:function(i){e(void 0===i?"":t._mergeGetAll(i.result))}};t._idb.run(n,"readonly")})));case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)}),i.destroy=function(){this._idb.destroy()},i.clean=function(){this._idb.run({exec:function(e){return e.clear()}})},i._count=function(){var e=this,t={exec:function(e){return e.count()},callback:function(t){null!=t&&t.error||null==t||!t.result||(e._ctx.logger.i("idb-backend","count: "+t.result+" max: "+e._ctx.config.idbMaxDataCount),e._logCount=t.result,e._logCount>=e._ctx.config.idbMaxDataCount&&!e._reduceData&&e._deleteFromHead(e._logCount-Math.round(e._ctx.config.idbMaxDataCount/2)))}};this._idb.run(t)},i._deleteFromHead=function(e){var t=this;this._ctx.logger.i("idb-backend","delete from head"),this._reduceData=!0;var i={exec:function(e){return e.openCursor()},callback:function(i){if(t._reduceData=!1,null!=i&&i.result){var n=IDBKeyRange.bound(i.result.key,i.result.key+e,!1,!1),r={exec:function(e){return t._ctx.logger.i("idb-backend","del: "+n.lower+"~"+n.upper),e.delete(n)},callback:function(e){t._ctx.logger.i("idb-backend","del result: "+!(null==e||!e.error))}};t._idb.run(r)}}};this._idb.run(i)},i._mergeGetAll=function(e){return e.length?e.reduce((function(e,t){return""+e+t.value+"\n"}),""):""},r()(e,[{key:"isActive",get:function(){return"error"!==this._idb.state}}])}()];function S(e,t,i){var n=new Date;"string"!=typeof e&&(e=e.toString());var r=n.toLocaleString()+"."+n.getMilliseconds().toString().padStart(3,"0")+"|"+e+"|";return t.forEach((function(e){r+="object"==typeof e?JSON.stringify(e)+" ":e+" "})),r.length>i?r.substring(0,i):r}function L(e){return e.join("\n")}var k=function(){function e(e){var t=this;this._ctx=void 0,this._backend=void 0,this._delayTimer=void 0,this._logCache=[],this._loggerForAdd=void 0,this._downloadHref=void 0,this._startDelay=function(){t._delayTimer=setInterval((function(){t._saveLog(!0)}),1e3)},this._stopDelay=function(){t._delayTimer&&(clearTimeout(t._delayTimer),t._delayTimer=void 0)},u("kwai-video-local-log","1.0.13"),this._ctx=new m(e);var i=function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];t.addLog.apply(t,[e].concat(n))};this._loggerForAdd={e:i,w:i,i:i,d:i,v:i},this._ctx.logger.setOutput(this._loggerForAdd),this._ctx.logger.i("kwai-video-local-log","constructor",e,this._ctx.config),this._backend=function(e){for(var t=0;t<R.length;t++){var i=R[t];if(null!=i&&i.isSupported())return new i(e)}}(this._ctx),this._backend&&this._startDelay()}e.isSupported=function(){return function(){for(var e=0;e<R.length;e++){var t=R[e];if(null!=t&&t.isSupported())return!0}return!1}()};var t=e.prototype;return t.addLog=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this._logCache.push(S(e,i,this._ctx.config.maxLogLen)),this._saveLog()},t.cleanLog=function(){var e;this._ctx.logger.i("kwai-video-local-log","clean"),null==(e=this._backend)||e.clean()},t.exportLog=function(){var e=this;return this._ctx.logger.i("kwai-video-local-log","export log"),new Promise((function(t,i){e._backend?e._backend.exportLog().then((function(i){t(L([i].concat(e._logCache)))})):t("")}))},t.downloadLog=function(e){var t=this;this._ctx.logger.i("kwai-video-local-log","download log: "+e),this._destroyDownloadHref(),this.exportLog().then((function(i){var n=new Blob([i],{type:"text/plain"});if(document){var r=document.createElement("a");t._downloadHref=r.href=URL.createObjectURL(n),r.download=e||"Log_web_"+(new Date).toLocaleString()+".log",document.body.appendChild(r),r.click(),r.remove()}else console.log("无document,当前是否在worker中")}))},t.destroy=function(){var e;this._destroyDownloadHref(),null==(e=this._backend)||e.destroy(),this._stopDelay()},t.getLoggerForAdd=function(){return this._loggerForAdd},t._destroyDownloadHref=function(){try{this._downloadHref&&(URL.revokeObjectURL(this._downloadHref),this._downloadHref=void 0)}catch(e){}},t._saveLog=function(e){if(void 0===e&&(e=!1),this._backend&&this._backend.isActive&&(this._logCache.length>=this._ctx.config.idbMaxFoldLog||this._logCache.length>0&&e)){var t=L(this._logCache);this._logCache.splice(0,this._logCache.length),t&&this._backend.saveLog(t)}},r()(e,null,[{key:"version",get:function(){return"1.0.13"}}])}();t.default=k}]);void 0===y&&console.error("esm-webpack-plugin: nothing exported!"),y.KwaiVideoLocalLog;var b=y.LogLevel,E=y.DefaultLogger,w=y.Logger,T=y.printVersion;y.DEFAULT_LOG_LEVEL,y.default;var R=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L,k={exports:{}},I="object"==typeof Reflect?Reflect:null,x=I&&"function"==typeof I.apply?I.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};L=I&&"function"==typeof I.ownKeys?I.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var O=Number.isNaN||function(e){return e!=e};function C(){C.init.call(this)}k.exports=C,k.exports.once=function(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,o),n(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}G(e,t,o,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&G(e,"error",t,i)}(e,r,{once:!0})}))},C.EventEmitter=C,C.prototype._events=void 0,C.prototype._eventsCount=0,C.prototype._maxListeners=void 0;var D=10;function M(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function N(e){return void 0===e._maxListeners?C.defaultMaxListeners:e._maxListeners}function P(e,t,i,n){var r,o,a;if(M(i),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),a=o[t]),void 0===a)a=o[t]=i,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),(r=N(e))>0&&a.length>r&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){console&&console.warn&&console.warn(e)}(s)}return e}function U(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function F(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=U.bind(n);return r.listener=i,n.wrapFn=r,r}function B(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):V(r,r.length)}function H(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function V(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function G(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){n.once&&e.removeEventListener(t,r),i(o)}))}}Object.defineProperty(C,"defaultMaxListeners",{enumerable:!0,get:function(){return D},set:function(e){if("number"!=typeof e||e<0||O(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");D=e}}),C.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},C.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||O(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},C.prototype.getMaxListeners=function(){return N(this)},C.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=r[e];if(void 0===s)return!1;if("function"==typeof s)x(s,this,t);else{var u=s.length,l=V(s,u);for(i=0;i<u;++i)x(l[i],this,t)}return!0},C.prototype.addListener=function(e,t){return P(this,e,t,!1)},C.prototype.on=C.prototype.addListener,C.prototype.prependListener=function(e,t){return P(this,e,t,!0)},C.prototype.once=function(e,t){return M(t),this.on(e,F(this,e,t)),this},C.prototype.prependOnceListener=function(e,t){return M(t),this.prependListener(e,F(this,e,t)),this},C.prototype.removeListener=function(e,t){var i,n,r,o,a;if(M(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){a=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},C.prototype.off=C.prototype.removeListener,C.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,o=Object.keys(i);for(n=0;n<o.length;++n)"removeListener"!==(r=o[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},C.prototype.listeners=function(e){return B(this,e,!0)},C.prototype.rawListeners=function(e){return B(this,e,!1)},C.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):H.call(e,t)},C.prototype.listenerCount=H,C.prototype.eventNames=function(){return this._eventsCount>0?L(this._events):[]};var j=k.exports,W=function(){if(typeof Map<"u")return Map;function e(e,t){var i=-1;return e.some((function(e,n){return e[0]===t&&(i=n,!0)})),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var i=e(this.__entries__,t),n=this.__entries__[i];return n&&n[1]},t.prototype.set=function(t,i){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=i:this.__entries__.push([t,i])},t.prototype.delete=function(t){var i=this.__entries__,n=e(i,t);~n&&i.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var i=0,n=this.__entries__;i<n.length;i++){var r=n[i];e.call(t,r[1],r[0])}},t}()}(),K=typeof window<"u"&&typeof document<"u"&&window.document===document,z=typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),J="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(z):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var q=["top","right","bottom","left","width","height","size","weight"],Y=typeof MutationObserver<"u",Q=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var i=!1,n=!1,r=0;function o(){i&&(i=!1,e()),n&&s()}function a(){J(o)}function s(){var e=Date.now();if(i){if(e-r<2)return;n=!0}else i=!0,n=!1,setTimeout(a,t);r=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,i=t.indexOf(e);~i&&t.splice(i,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){!K||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Y?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!K||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,i=void 0===t?"":t;q.some((function(e){return!!~i.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Z=function(e,t){for(var i=0,n=Object.keys(t);i<n.length;i++){var r=n[i];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},X=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||z},$=oe(0,0,0,0);function ee(e){return parseFloat(e)||0}function te(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return t.reduce((function(t,i){return t+ee(e["border-"+i+"-width"])}),0)}function ie(e){var t=e.clientWidth,i=e.clientHeight;if(!t&&!i)return $;var n=X(e).getComputedStyle(e),r=function(e){for(var t={},i=0,n=["top","right","bottom","left"];i<n.length;i++){var r=n[i],o=e["padding-"+r];t[r]=ee(o)}return t}(n),o=r.left+r.right,a=r.top+r.bottom,s=ee(n.width),u=ee(n.height);if("border-box"===n.boxSizing&&(Math.round(s+o)!==t&&(s-=te(n,"left","right")+o),Math.round(u+a)!==i&&(u-=te(n,"top","bottom")+a)),!function(e){return e===X(e).document.documentElement}(e)){var l=Math.round(s+o)-t,c=Math.round(u+a)-i;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return oe(r.left,r.top,s,u)}var ne=typeof SVGGraphicsElement<"u"?function(e){return e instanceof X(e).SVGGraphicsElement}:function(e){return e instanceof X(e).SVGElement&&"function"==typeof e.getBBox};function re(e){return K?ne(e)?function(e){var t=e.getBBox();return oe(0,0,t.width,t.height)}(e):ie(e):$}function oe(e,t,i,n){return{x:e,y:t,width:i,height:n}}var ae=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=oe(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=re(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),se=function(e,t){var i=function(e){var t=e.x,i=e.y,n=e.width,r=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Z(a,{x:t,y:i,width:n,height:r,top:i,right:t+n,bottom:r+i,left:t}),a}(t);Z(this,{target:e,contentRect:i})},ue=function(){function e(e,t,i){if(this.activeObservations_=[],this.observations_=new W,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=i}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u")&&Element instanceof Object){if(!(e instanceof X(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new ae(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u")&&Element instanceof Object){if(!(e instanceof X(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new se(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),le=typeof WeakMap<"u"?new WeakMap:new W,ce=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Q.getInstance(),n=new ue(t,i,this);le.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){ce.prototype[e]=function(){var t;return(t=le.get(this))[e].apply(t,arguments)}})),typeof z.ResizeObserver<"u"&&z.ResizeObserver;var de={},he=Object.prototype.hasOwnProperty;function fe(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function pe(e){try{return encodeURIComponent(e)}catch(e){return null}}de.stringify=function(e,t){t=t||"";var i,n,r=[];for(n in"string"!=typeof t&&(t="?"),e)if(he.call(e,n)){if(!(i=e[n])&&(null==i||isNaN(i))&&(i=""),n=pe(n),i=pe(i),null===n||null===i)continue;r.push(n+"="+i)}return r.length?t+r.join("&"):""},de.parse=function(e){for(var t,i=/([^=?#&]+)=?([^&]*)/g,n={};t=i.exec(e);){var r=fe(t[1]),o=fe(t[2]);null===r||null===o||r in n||(n[r]=o)}return n};var Ae=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t){function i(t){return e.exports=i="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.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(2);function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(0).default,r=i(3);e.exports=function(e){var t=r(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(0).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){function n(e,t){console.log("%c "+e+" %c "+t+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px; color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0; color: #fff","background:transparent")}i.r(t),i.d(t,"LogLevel",(function(){return c})),i.d(t,"DefaultLogger",(function(){return p})),i.d(t,"Logger",(function(){return f})),i.d(t,"printVersion",(function(){return n})),i.d(t,"DEFAULT_LOG_LEVEL",(function(){return d}));var r=i(1),o=i.n(r),a=function(){function e(){this.timeout=6048e5}var t=e.prototype;return t.write=function(t,i){if(e.available)try{localStorage.setItem(t,JSON.stringify({value:i,time:Date.now()}))}catch(e){}},t.read=function(t,i){if(void 0===i&&(i=!0),e.available)try{var n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=r.value,a=r.time,s=void 0===a?0:a;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return o}}catch(e){}},o()(e,null,[{key:"available",get:function(){if(void 0===e._available)try{localStorage.setItem("alg","test"),e._available=!0}catch(t){e._available=!1}return e._available}}])}();a._available=void 0;var s,u,l=a,c=((u={}).NONE="none",u.ERROR="e",u.WARN="w",u.INFO="i",u.DEBUG="d",u.VERBOSE="v",u),d=c.ERROR,h=((s={})[c.NONE]={value:1,str:"N"},s[c.ERROR]={value:100,str:"E"},s[c.WARN]={value:200,str:"W"},s[c.INFO]={value:300,str:"I"},s[c.DEBUG]={value:400,str:"D"},s[c.VERBOSE]={value:500,str:"V"},s),f=function(){function e(e){if(this._name="kwai-v",this._level=d,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&"blob:"===location.protocol){var t,i=location.href.split("/"),n=null==(t=i[i.length-1])?void 0:t.match(/(\w+)-/);n&&(this._workerTag=e?e+"-"+n[1]:n[1])}else e&&(this._workerTag=e)}e.loadLogLevel=function(e,t){if(void 0===t&&(t=!0),location.href){var i=new RegExp(e+"=([a-z]{1})"),n=location.href.match(i);if(n&&n.length>1){var r=n[1];if(this._isValueInLevel(r))return r}}var o=(new l).read(e,t);if(this._isValueInLevel(o))return o},e.saveLogLevel=function(e,t){this._isValueInLevel(t)&&(new l).write(e,t)},e._isValueInLevel=function(e){return-1!==Object.values(c).indexOf(e)};var t=e.prototype;return t.setOutput=function(e){return this._output=e,this},t.setLevel=function(e){return this._level=e,this},t.setId=function(e){return this._id=e,this},t.setName=function(e){return this._name=e,this},t.getLevel=function(){return this._level},t.getOutput=function(){return this._output},t.hasOutput=function(){return!!this._output},t.e=function(e){if(this._isLevelEnabled(this._level,c.ERROR)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.ERROR,e,i);try{var o;null==(o=this._output)||o.e.apply(o,[r].concat(i))}catch(e){}}},t.w=function(e){if(this._isLevelEnabled(this._level,c.WARN)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.WARN,e,i);try{var o;null==(o=this._output)||o.w.apply(o,[r].concat(i))}catch(e){}}},t.i=function(e){if(this._isLevelEnabled(this._level,c.INFO)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.INFO,e,i);try{var o;null==(o=this._output)||o.i.apply(o,[r].concat(i))}catch(e){}}},t.d=function(e){if(this._isLevelEnabled(this._level,c.DEBUG)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.DEBUG,e,i);try{var o;null==(o=this._output)||o.d.apply(o,[r].concat(i))}catch(e){}}},t.v=function(e){if(this._isLevelEnabled(this._level,c.VERBOSE)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.VERBOSE,e,i);try{var o;null==(o=this._output)||o.v.apply(o,[r].concat(i))}catch(e){}}},t._isLevelEnabled=function(e,t){return h[e].value>=h[t].value},t._printLog=function(e,t,i){var n,r,o=typeof t;if("object"===o)t=(null==(r=t)?void 0:r.constructor.name)||"unknown";else if("function"===o){var a;t=(null==(a=Object.getOwnPropertyDescriptor(t,"name"))?void 0:a.value)||"unknown"}var s,u,l=((null==(n=h[e])?void 0:n.str)||"")+"|"+this._name+"["+("function"==typeof this._id?this._id():this._id)+"]["+this._workerTag+"]::"+t;return e===c.ERROR?(s=console).error.apply(s,[l].concat(i.slice(0))):(u=console).log.apply(u,[l].concat(i.slice(0))),l},e}(),p=new f}]);void 0===Ae&&console.error("esm-webpack-plugin: nothing exported!"),Ae.LogLevel;var ve=Ae.DefaultLogger;/*! js-cookie v3.0.5 | MIT */function _e(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}Ae.Logger,Ae.printVersion,Ae.DEFAULT_LOG_LEVEL;var me=function e(t,i){function n(e,n,r){if(!(typeof document>"u")){"number"==typeof(r=_e({},i,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in r)r[a]&&(o+="; "+a,!0!==r[a]&&(o+="="+r[a].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+o}}return Object.create({set:n,get:function(e){if(!(typeof document>"u"||arguments.length&&!e)){for(var i=document.cookie?document.cookie.split("; "):[],n={},r=0;r<i.length;r++){var o=i[r].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(n[s]=t.read(a,s),e===s)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){n(e,"",_e({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,_e({},this.attributes,t))},withConverter:function(t){return e(_e({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),ge="did",ye="kwai_player_device_id";function be(){try{for(var e=1e9*Math.random()>>>0,t=[],i=0;i<7;i++)t.push("0123456789ABCDEF".charAt(16*Math.random()));var n="web_"+e+t.join("");return ve.i(ge,"generate nanoId",n),n}catch(e){}return"web_did_generation_failed"}!function(){var e="";try{e=(me.get("did")||me.get("_did")||me.get("weblogger_did")||"").trim(),ve.i(ge,"generate deviceId from cookie",e)}catch(e){ve.i(ge,"generate deviceId from cookie err",e)}try{e?null==localStorage||localStorage.setItem(ye,e):(e=((null==localStorage?void 0:localStorage.getItem(ye))||"").trim(),ve.i(ge,"generate deviceId from ls",e)),e||(e=be(),null==localStorage||localStorage.setItem(ye,e))}catch(e){ve.i(ge,"generate deviceId from ls err",e)}e||be()}();var Ee=function(){function e(){g(this,"timeout",6048e5)}var t=e.prototype;return t.write=function(t,i){if(e.available)try{localStorage.setItem(t,JSON.stringify({value:i,time:Date.now()}))}catch(e){}},t.read=function(t,i){if(void 0===i&&(i=!0),e.available)try{var n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=r.value,a=r.time,s=void 0===a?0:a;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return o}}catch(n){}},c()(e,null,[{key:"available",get:function(){if(typeof e._available>"u")try{localStorage.setItem("alg","test"),e._available=!0}catch(t){e._available=!1}return e._available}}])}();g(Ee,"_available");var we,Te,Re=Ee,Se={exports:{}};we=Se,Te=Se.exports,function(e,t){var i="function",n="undefined",r="object",o="string",a="model",s="name",u="type",l="vendor",c="version",d="architecture",h="console",f="mobile",p="tablet",A="smarttv",v="wearable",_="embedded",m="Amazon",g="Apple",y="BlackBerry",b="Browser",E="Chrome",w="Firefox",T="Google",R="Huawei",S="LG",L="Microsoft",k="Motorola",I="Opera",x="Samsung",O="Sony",C="Zebra",D="Facebook",M=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},N=function(e,t){return typeof e===o&&-1!==P(t).indexOf(P(e))},P=function(e){return e.toLowerCase()},U=function(e,t){if(typeof e===o)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===n?e:e.substring(0,255)},F=function(e,n){for(var o,a,s,u,l,c,d=0;d<n.length&&!l;){var h=n[d],f=n[d+1];for(o=a=0;o<h.length&&!l;)if(l=h[o++].exec(e))for(s=0;s<f.length;s++)c=l[++a],typeof(u=f[s])===r&&u.length>0?2===u.length?typeof u[1]==i?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?typeof u[1]!==i||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):t:this[u[0]]=c?u[1].call(this,c,u[2]):t:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):t):this[u]=c||t;d+=2}},B=function(e,i){for(var n in i)if(typeof i[n]===r&&i[n].length>0){for(var o=0;o<i[n].length;o++)if(N(i[n][o],e))return"?"===n?t:n}else if(N(i[n],e))return"?"===n?t:n;return e},H={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},V={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[c,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[c,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,c],[/opios[\/ ]+([\w\.]+)/i],[c,[s,I+" Mini"]],[/\bopr\/([\w\.]+)/i],[c,[s,I]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[s,c],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[c,[s,"UC"+b]],[/\bqbcore\/([\w\.]+)/i],[c,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[c,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[c,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[c,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[c,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure "+b],c],[/\bfocus\/([\w\.]+)/i],[c,[s,w+" Focus"]],[/\bopt\/([\w\.]+)/i],[c,[s,I+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[c,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[c,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[c,[s,I+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[c,[s,"MIUI "+b]],[/fxios\/([-\w\.]+)/i],[c,[s,w]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 "+b]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 "+b],c],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],c],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,c],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,D],c],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,c],[/\bgsa\/([\w\.]+) .*safari\//i],[c,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[c,[s,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,E+" WebView"],c],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[c,[s,"Android "+b]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,c],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[c,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[c,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[c,B,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[s,c],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],c],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[c,[s,w+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[s,c]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[d,"amd64"]],[/(ia32(?=;))/i],[[d,P]],[/((?:i[346]|x)86)[;\)]/i],[[d,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[d,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[d,"armhf"]],[/windows (ce|mobile); ppc;/i],[[d,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[d,/ower/,"",P]],[/(sun4\w)[;\)]/i],[[d,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[d,P]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[l,x],[u,p]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[l,x],[u,f]],[/\((ip(?:hone|od)[\w ]*);/i],[a,[l,g],[u,f]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[l,g],[u,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[l,R],[u,p]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[a,[l,R],[u,f]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[a,/_/g," "],[l,"Xiaomi"],[u,f]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[l,"Xiaomi"],[u,p]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[l,"OPPO"],[u,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[l,"Vivo"],[u,f]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[a,[l,"Realme"],[u,f]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[a,[l,k],[u,f]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[l,k],[u,p]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[l,S],[u,p]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[l,S],[u,f]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[l,"Lenovo"],[u,p]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[l,"Nokia"],[u,f]],[/(pixel c)\b/i],[a,[l,T],[u,p]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[l,T],[u,f]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[l,O],[u,f]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[l,O],[u,p]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[l,"OnePlus"],[u,f]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[l,m],[u,p]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[l,m],[u,f]],[/(playbook);[-\w\),; ]+(rim)/i],[a,l,[u,p]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[l,y],[u,f]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[l,"ASUS"],[u,p]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[l,"ASUS"],[u,f]],[/(nexus 9)/i],[a,[l,"HTC"],[u,p]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[l,[a,/_/g," "],[u,f]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[l,"Acer"],[u,p]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[l,"Meizu"],[u,f]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[l,"Sharp"],[u,f]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[l,a,[u,f]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[l,a,[u,p]],[/(surface duo)/i],[a,[l,L],[u,p]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[l,"Fairphone"],[u,f]],[/(u304aa)/i],[a,[l,"AT&T"],[u,f]],[/\bsie-(\w*)/i],[a,[l,"Siemens"],[u,f]],[/\b(rct\w+) b/i],[a,[l,"RCA"],[u,p]],[/\b(venue[\d ]{2,7}) b/i],[a,[l,"Dell"],[u,p]],[/\b(q(?:mv|ta)\w+) b/i],[a,[l,"Verizon"],[u,p]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[l,"Barnes & Noble"],[u,p]],[/\b(tm\d{3}\w+) b/i],[a,[l,"NuVision"],[u,p]],[/\b(k88) b/i],[a,[l,"ZTE"],[u,p]],[/\b(nx\d{3}j) b/i],[a,[l,"ZTE"],[u,f]],[/\b(gen\d{3}) b.+49h/i],[a,[l,"Swiss"],[u,f]],[/\b(zur\d{3}) b/i],[a,[l,"Swiss"],[u,p]],[/\b((zeki)?tb.*\b) b/i],[a,[l,"Zeki"],[u,p]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[l,"Dragon Touch"],a,[u,p]],[/\b(ns-?\w{0,9}) b/i],[a,[l,"Insignia"],[u,p]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[l,"NextBook"],[u,p]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[l,"Voice"],a,[u,f]],[/\b(lvtel\-)?(v1[12]) b/i],[[l,"LvTel"],a,[u,f]],[/\b(ph-1) /i],[a,[l,"Essential"],[u,f]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[l,"Envizen"],[u,p]],[/\b(trio[-\w\. ]+) b/i],[a,[l,"MachSpeed"],[u,p]],[/\btu_(1491) b/i],[a,[l,"Rotor"],[u,p]],[/(shield[\w ]+) b/i],[a,[l,"Nvidia"],[u,p]],[/(sprint) (\w+)/i],[l,a,[u,f]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[l,L],[u,f]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[l,C],[u,p]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[l,C],[u,f]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[l,a,[u,h]],[/droid.+; (shield) bui/i],[a,[l,"Nvidia"],[u,h]],[/(playstation [345portablevi]+)/i],[a,[l,O],[u,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[l,L],[u,h]],[/smart-tv.+(samsung)/i],[l,[u,A]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[l,x],[u,A]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[l,S],[u,A]],[/(apple) ?tv/i],[l,[a,g+" TV"],[u,A]],[/crkey/i],[[a,E+"cast"],[l,T],[u,A]],[/droid.+aft(\w)( bui|\))/i],[a,[l,m],[u,A]],[/\(dtv[\);].+(aquos)/i],[a,[l,"Sharp"],[u,A]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[l,U],[a,U],[u,A]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,A]],[/((pebble))app/i],[l,a,[u,v]],[/droid.+; (glass) \d/i],[a,[l,T],[u,v]],[/droid.+; (wt63?0{2,3})\)/i],[a,[l,C],[u,v]],[/(quest( 2)?)/i],[a,[l,D],[u,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[l,[u,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[a,[u,f]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[u,p]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,p]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[u,f]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[l,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[c,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[c,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[s,c],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[c,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,c],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[c,B,H]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[c,B,H]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[c,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[c,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[c,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,c],[/\(bb(10);/i],[c,[s,y]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[c,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[c,[s,w+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[c,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[c,[s,E+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],c],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,c],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],c],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,c]]},G=function(i,h){if(typeof i===r&&(h=i,i=t),!(this instanceof G))return new G(i,h).getResult();var f=i||(typeof e!==n&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:""),p=h?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(V,h):V;return this.getBrowser=function(){var e={};return e[s]=t,e[c]=t,F.call(e,f,p.browser),e.major=function(e){return typeof e===o?e.replace(/[^\d\.]/g,"").split(".")[0]:t}(e.version),e},this.getCPU=function(){var e={};return e[d]=t,F.call(e,f,p.cpu),e},this.getDevice=function(){var e={};return e[l]=t,e[a]=t,e[u]=t,F.call(e,f,p.device),e},this.getEngine=function(){var e={};return e[s]=t,e[c]=t,F.call(e,f,p.engine),e},this.getOS=function(){var e={};return e[s]=t,e[c]=t,F.call(e,f,p.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return f},this.setUA=function(e){return f=typeof e===o&&e.length>255?U(e,255):e,this},this.setUA(f),this};G.VERSION="1.0.2",G.BROWSER=M([s,c,"major"]),G.CPU=M([d]),G.DEVICE=M([a,l,u,h,f,A,p,v,_]),G.ENGINE=G.OS=M([s,c]),we.exports&&(Te=we.exports=G),Te.UAParser=G;var j=typeof e!==n&&(e.jQuery||e.Zepto);if(j&&!j.ua){var W=new G;j.ua=W.getResult(),j.ua.get=function(){return W.getUA()},j.ua.set=function(e){W.setUA(e);var t=W.getResult();for(var i in t)j.ua[i]=t[i]}}}("object"==typeof window?window:R);var Le=0;var ke=S(Se.exports)(),Ie=ke.os.name,xe=Ie&&Ie.toLowerCase().indexOf("android")>=0,Oe=Ie&&Ie.toLowerCase().indexOf("ios")>=0,Ce="mobile"===ke.device.type||xe||Oe,De=b.ERROR;typeof location<"u"&&(De=w.loadLogLevel("kwai-player-log")||b.ERROR,E.setLevel(De).setName("kwai-p"));var Me=j.EventEmitter;!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._kwai-player_1ufc0_2{position:relative;margin:0;padding:0}._kwai-player_1ufc0_2 *{margin:0;padding:0}._kwai-player-video-interactive_1ufc0_11{display:block;width:100%;height:100%;position:absolute;top:0;left:0}._kwai-player-poster_1ufc0_19{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#333;background-size:contain;background-position:center;background-repeat:no-repeat}._kwai-player-video_1ufc0_11{display:block;width:100%;height:100%;position:absolute;top:0;left:0}._kwai-player-video_1ufc0_11 video{display:block;width:100%;height:100%}._kwai-player-video_1ufc0_11 canvas{display:block;margin:0 auto;width:100%;height:100%;max-width:100%;max-height:100%;position:relative}._kwai-player-disable-scroll_1ufc0_52{overflow:hidden;height:100%}._kwai-player-yoda_1ufc0_56{display:block;width:100%;height:100%;position:absolute;top:0;left:0}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var Ne=Object.defineProperty,Pe=function(e,t,i){return function(e,t,i){t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i}(e,"symbol"!=typeof t?t+"":t,i),i},Ue=function(e){return e.NONE="none",e.KWAI="kwai",e.KWAI2="kwai2",e}(Ue||{}),Fe=function(e){return e.SYSTEM="system",e.WINDOW="window",e}(Fe||{}),Be=function(e){return e.VIDEO="video",e.VIDEO_INTERACTIVE="videoInteractive",e.DEFAULT="default",e}(Be||{}),He=function(e){return e.ERROR="error",e.MANIFEST_PARSED="manifestparsed",e.LEVEL_SWITCHING="levelswitching",e.LEVEL_SWITCHED="levelswitched",e.LEVEL_SWITCH_PLAYING="levelswitchplaying",e.LEVEL_SWITCH_FAILED="levelswitchfailed",e.LEVEL_UPDATED="levelupdated",e.AUDIO_TRACKS_SWITCHING="audiotrackswitching",e.AUDIO_TRACKS_SWITCHED="audiotrackswitched",e.LOADSTART="loadstart",e.PROGRESS="progress",e.SUSPEND="suspend",e.ABORT="abort",e.EMPTIED="emptied",e.STALLED="stalled",e.LOADEDMETADATA="loadedmetadata",e.LOADEDDATA="loadeddata",e.CANPLAY="canplay",e.CANPLAYTHROUGH="canplaythrough",e.PLAYING="playing",e.WAITING="waiting",e.SEEKING="seeking",e.SEEKED="seeked",e.ENDED="ended",e.DURATIONCHANGE="durationchange",e.TIMEUPDATE="timeupdate",e.PLAY="play",e.PAUSE="pause",e.RATECHANGE="ratechange",e.RESIZE="resize",e.VOLUMECHANGE="volumechange",e.ENTER_PICTURE_IN_PICTURE="enterpictureinpicture",e.LEAVE_PICTURE_IN_PICTURE="leavepictureinpicture",e.REPORT="report",e.VIDEO_RENDERER_CHANGE="videorendererchange",e.FULLSCREEN_CHANGE="fullscreenchange",e.ATTRIBUTE_CHANGE="attribute:change",e.INTERACTION="interaction",e.LIVE_SHIFT_CHANGE="liveshiftchange",e.LIVE_SHIFT_TYPE_CHANGE="liveshifttypechange",e.OBJECT_FIT_CHANGE="objectfitchange",e.ATTRIBUTE_CHANGE_CONFIG="attribute:change:config",e.ATTRIBUTE_CHANGE_SRC="attribute:change:src",e.ATTRIBUTE_CHANGE_VIDEO_ID="attribute:change:videoid",e.ATTRIBUTE_CHANGE_PREVIEW_URL="attribute:change:previewurl",e.ATTRIBUTE_CHANGE_MASK_URL="attribute:change:maskurl",e.ATTRIBUTE_CHANGE_CROSS_ORIGIN="attribute:change:crossorigin",e.ATTRIBUTE_CHANGE_PRELOAD="attribute:change:preload",e.ATTRIBUTE_CHANGE_CURRENT_TIME="attribute:change:currenttime",e.ATTRIBUTE_CHANGE_DEFAULT_PLAYBACK_RATE="attribute:change:defaultplaybackrate",e.ATTRIBUTE_CHANGE_PLAYBACK_RATE="attribute:change:playbackrate",e.ATTRIBUTE_CHANGE_AUTOPLAY="attribute:change:autoplay",e.ATTRIBUTE_CHANGE_LOOP="attribute:change:loop",e.ATTRIBUTE_CHANGE_CONTROLS="attribute:change:controls",e.ATTRIBUTE_CHANGE_VOLUME="attribute:change:volume",e.ATTRIBUTE_CHANGE_MUTED="attribute:change:muted",e.ATTRIBUTE_CHANGE_DEFAULT_MUTED="attribute:change:defaultmuted",e.ATTRIBUTE_CHANGE_POSTER="attribute:change:poster",e.ATTRIBUTE_CHANGE_DISABLE_PICTURE_IN_PICTURE="attribute:change:disablepictureinpicture",e.ATTRIBUTE_CHANGE_PLAYSINLINE="attribute:change:playsinline",e.ATTRIBUTE_CHANGE_DISABLE_ADAPTIVE="attribute:change:disableadaptive",e.ATTRIBUTE_CHANGE_DISABLE_DOWNLOAD="attribute:change:disabledownload",e.ATTRIBUTE_CHANGE_DISABLE_MASK="attribute:change:disablemask",e.ATTRIBUTE_CHANGE_DISABLE_HOTKEY="attribute:change:disablehotkey",e.ATTRIBUTE_CHANGE_DISABLE_DANMAKU="attribute:change:disabledanmaku",e.ATTRIBUTE_CHANGE_DANMAKU_RENDERING="attribute:change:danmakurendering",e.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS="attribute:change:danmakucontrolspos",e.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS_FULLSCREEN="attribute:change:danmakucontrolsposfullscreen",e.ATTRIBUTE_CHANGE_CURRENT_LEVEL="attribute:change:currentlevel",e.ATTRIBUTE_CHANGE_NEXT_LEVEL="attribute:change:nextlevel",e.ATTRIBUTE_CHANGE_CURRENT_FRAME="attribute:change:currentframe",e.ATTRIBUTE_CHANGE_AUDIO_TRACK="attribute:change:audiotrack",e.ATTRIBUTE_CHANGE_PREFETCH="attribute:change:prefetch",e.ATTRIBUTE_CHANGE_SHOW_PROGRESS="attribute:change:showprogress",e.ATTRIBUTE_CHANGE_SHOW_TIME="attribute:change:showtime",e.ATTRIBUTE_CHANGE_SHOW_NEXT="attribute:change:shownext",e.ATTRIBUTE_CHANGE_SHOW_PREV="attribute:change:showprev",e.ATTRIBUTE_CHANGE_BIZ_DATA="attribute:change:bizdata",e.ATTRIBUTE_CHANGE_LIVE_TIME="attribute:change:livetime",e.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL="attribute:change:showinfopanel",e.CLICK_NEXT="clicknext",e.CLICK_LOGIN="clicklogin",e.CLICK_REGISTER="clickregister",e.CLICK_VIP="clickvip",e}(He||{}),Ve=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=16)}([function(e,t,i){var n=i(10);function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(){return e.exports=i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(12);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=void 0},function(e,t,i){var n=i(14),r=i(15),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(o,"")}var h=[["#","hash"],["?","query"],function(e,t){return A(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function p(e){var t,i=(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{}).location||{},n={},r=typeof(e=e||i);if("blob:"===e.protocol)n=new _(unescape(e.pathname),{});else if("string"===r)for(t in n=new _(e,{}),f)delete n[t];else if("object"===r){for(t in e)t in f||(n[t]=e[t]);void 0===n.slashes&&(n.slashes=s.test(e.href))}return n}function A(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function v(e,t){e=(e=d(e)).replace(a,""),t=t||{};var i,n=l.exec(e),r=n[1]?n[1].toLowerCase():"",o=!!n[2],s=!!n[3],u=0;return o?s?(i=n[2]+n[3]+n[4],u=n[2].length+n[3].length):(i=n[2]+n[4],u=n[2].length):s?(i=n[3]+n[4],u=n[3].length):i=n[4],"file:"===r?u>=2&&(i=i.slice(2)):A(r)?i=n[4]:r?o&&(i=i.slice(2)):u>=2&&A(t.protocol)&&(i=n[4]),{protocol:r,slashes:o||A(r),slashesCount:u,rest:i}}function _(e,t,i){if(e=(e=d(e)).replace(a,""),!(this instanceof _))return new _(e,t,i);var o,s,u,l,f,m,g=h.slice(),y=typeof t,b=this,E=0;for("object"!==y&&"string"!==y&&(i=t,t=null),i&&"function"!=typeof i&&(i=r.parse),o=!(s=v(e||"",t=p(t))).protocol&&!s.slashes,b.slashes=s.slashes||o&&t.slashes,b.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||c.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!A(b.protocol)))&&(g[3]=[/(.*)/,"pathname"]);E<g.length;E++)"function"!=typeof(l=g[E])?(u=l[0],m=l[1],u!=u?b[m]=e:"string"==typeof u?~(f="@"===u?e.lastIndexOf(u):e.indexOf(u))&&("number"==typeof l[2]?(b[m]=e.slice(0,f),e=e.slice(f+l[2])):(b[m]=e.slice(f),e=e.slice(0,f))):(f=u.exec(e))&&(b[m]=f[1],e=e.slice(0,f.index)),b[m]=b[m]||o&&l[3]&&t[m]||"",l[4]&&(b[m]=b[m].toLowerCase())):e=l(e,b);i&&(b.query=i(b.query)),o&&t.slashes&&"/"!==b.pathname.charAt(0)&&(""!==b.pathname||""!==t.pathname)&&(b.pathname=function(e,t){if(""===e)return t;for(var i=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=i.length,r=i[n-1],o=!1,a=0;n--;)"."===i[n]?i.splice(n,1):".."===i[n]?(i.splice(n,1),a++):a&&(0===n&&(o=!0),i.splice(n,1),a--);return o&&i.unshift(""),"."!==r&&".."!==r||i.push(""),i.join("/")}(b.pathname,t.pathname)),"/"!==b.pathname.charAt(0)&&A(b.protocol)&&(b.pathname="/"+b.pathname),n(b.port,b.protocol)||(b.host=b.hostname,b.port=""),b.username=b.password="",b.auth&&(~(f=b.auth.indexOf(":"))?(b.username=b.auth.slice(0,f),b.username=encodeURIComponent(decodeURIComponent(b.username)),b.password=b.auth.slice(f+1),b.password=encodeURIComponent(decodeURIComponent(b.password))):b.username=encodeURIComponent(decodeURIComponent(b.auth)),b.auth=b.password?b.username+":"+b.password:b.username),b.origin="file:"!==b.protocol&&A(b.protocol)&&b.host?b.protocol+"//"+b.host:"null",b.href=b.toString()}_.prototype={set:function(e,t,i){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(i||r.parse)(t)),o[e]=t;break;case"port":o[e]=t,n(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,u.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!i;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";o[e]=t.charAt(0)!==a?a+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(o.username=t.slice(0,s),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(s+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<h.length;l++){var c=h[l];c[4]&&(o[c[1]]=o[c[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&A(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=r.stringify);var t,i=this,n=i.host,o=i.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var a=o+(i.protocol&&i.slashes||A(i.protocol)?"//":"");return i.username?(a+=i.username,i.password&&(a+=":"+i.password),a+="@"):i.password?(a+=":"+i.password,a+="@"):"file:"!==i.protocol&&A(i.protocol)&&!n&&"/"!==i.pathname&&(a+="@"),(":"===n[n.length-1]||u.test(i.hostname)&&!i.port)&&(n+=":"),a+=n+i.pathname,(t="object"==typeof i.query?e(i.query):i.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),i.hash&&(a+=i.hash),a}},_.extractProtocol=v,_.location=p,_.trimLeft=d,_.qs=r,e.exports=_},function(e,t,i){var n,r,o,a,s;n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var n=s.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=s.normalizePath(n.path),s.buildURLFromParts(n)}var o=s.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return i.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):t;var a=s.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var u=r.exec(a.path);a.netLoc=u[1],a.path=u[2]}a.netLoc&&!a.path&&(a.path="/");var l={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(l.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var c=a.path,d=c.substring(0,c.lastIndexOf("/")+1)+o.path;l.path=s.normalizePath(d)}else l.path=a.path,o.params||(l.params=a.params,o.query||(l.query=a.query));return null===l.path&&(l.path=i.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(l)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(o,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},function(e,t,i){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t){function i(t){return e.exports=i="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.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(2);function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(0).default,r=i(3);e.exports=function(e){var t=r(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(0).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){function n(e,t){console.log("%c "+e+" %c "+t+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px; color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0; color: #fff","background:transparent")}i.r(t),i.d(t,"LogLevel",(function(){return c})),i.d(t,"DefaultLogger",(function(){return p})),i.d(t,"Logger",(function(){return f})),i.d(t,"printVersion",(function(){return n})),i.d(t,"DEFAULT_LOG_LEVEL",(function(){return d}));var r=i(1),o=i.n(r),a=function(){function e(){this.timeout=6048e5}var t=e.prototype;return t.write=function(t,i){if(e.available)try{localStorage.setItem(t,JSON.stringify({value:i,time:Date.now()}))}catch(e){}},t.read=function(t,i){if(void 0===i&&(i=!0),e.available)try{var n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=r.value,a=r.time,s=void 0===a?0:a;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return o}}catch(e){}},o()(e,null,[{key:"available",get:function(){if(void 0===e.A)try{localStorage.setItem("alg","test"),e.A=!0}catch(t){e.A=!1}return e.A}}])}();a.A=void 0;var s,u,l=a,c=((u={}).NONE="none",u.ERROR="e",u.WARN="w",u.INFO="i",u.DEBUG="d",u.VERBOSE="v",u),d=c.ERROR,h=((s={})[c.NONE]={value:1,str:"N"},s[c.ERROR]={value:100,str:"E"},s[c.WARN]={value:200,str:"W"},s[c.INFO]={value:300,str:"I"},s[c.DEBUG]={value:400,str:"D"},s[c.VERBOSE]={value:500,str:"V"},s),f=function(){function e(e){if(this.h="kwai-v",this.M=d,this._=-1,this.R=void 0,this.D="main",typeof location<"u"&&"blob:"===location.protocol){var t,i=location.href.split("/"),n=null==(t=i[i.length-1])?void 0:t.match(/(\w+)-/);n&&(this.D=e?e+"-"+n[1]:n[1])}else e&&(this.D=e)}e.loadLogLevel=function(e,t){if(void 0===t&&(t=!0),location.href){var i=new RegExp(e+"=([a-z]{1})"),n=location.href.match(i);if(n&&n.length>1){var r=n[1];if(this.T(r))return r}}var o=(new l).read(e,t);if(this.T(o))return o},e.saveLogLevel=function(e,t){this.T(t)&&(new l).write(e,t)},e.T=function(e){return-1!==Object.values(c).indexOf(e)};var t=e.prototype;return t.setOutput=function(e){return this.R=e,this},t.setLevel=function(e){return this.M=e,this},t.setId=function(e){return this._=e,this},t.setName=function(e){return this.h=e,this},t.getLevel=function(){return this.M},t.getOutput=function(){return this.R},t.hasOutput=function(){return!!this.R},t.e=function(e){if(this.S(this.M,c.ERROR)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this.O(c.ERROR,e,i);try{var o;null==(o=this.R)||o.e.apply(o,[r].concat(i))}catch(e){}}},t.w=function(e){if(this.S(this.M,c.WARN)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this.O(c.WARN,e,i);try{var o;null==(o=this.R)||o.w.apply(o,[r].concat(i))}catch(e){}}},t.i=function(e){if(this.S(this.M,c.INFO)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this.O(c.INFO,e,i);try{var o;null==(o=this.R)||o.i.apply(o,[r].concat(i))}catch(e){}}},t.d=function(e){if(this.S(this.M,c.DEBUG)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this.O(c.DEBUG,e,i);try{var o;null==(o=this.R)||o.d.apply(o,[r].concat(i))}catch(e){}}},t.v=function(e){if(this.S(this.M,c.VERBOSE)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this.O(c.VERBOSE,e,i);try{var o;null==(o=this.R)||o.v.apply(o,[r].concat(i))}catch(e){}}},t.S=function(e,t){return h[e].value>=h[t].value},t.O=function(e,t,i){var n,r,o=typeof t;if("object"===o)t=(null==(r=t)?void 0:r.constructor.name)||"unknown";else if("function"===o){var a;t=(null==(a=Object.getOwnPropertyDescriptor(t,"name"))?void 0:a.value)||"unknown"}var s,u,l=((null==(n=h[e])?void 0:n.str)||"")+"|"+this.h+"["+("function"==typeof this._?this._():this._)+"]["+this.D+"]::"+t;return e===c.ERROR?(s=console).error.apply(s,[l].concat(i.slice(0))):(u=console).log.apply(u,[l].concat(i.slice(0))),l},e}(),p=new f}])},function(e,t,i){var n,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,o),n(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}var a,s;_(e,t,o,{once:!0}),"error"!==t&&(s=r,"function"==typeof(a=e).on&&_(a,"error",s,{once:!0}))}))},s.EventEmitter=s,s.prototype.C=void 0,s.prototype.L=0,s.prototype.N=void 0;var u=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e.N?s.defaultMaxListeners:e.N}function d(e,t,i,n){var r,o,a,s;if(l(i),void 0===(o=e.C)?(o=e.C=Object.create(null),e.L=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e.C),a=o[t]),void 0===a)a=o[t]=i,++e.L;else if("function"==typeof a?a=o[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),(r=c(e))>0&&a.length>r&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=h.bind(n);return r.listener=i,n.wrapFn=r,r}function p(e,t,i){var n=e.C;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):v(r,r.length)}function A(e){var t=this.C;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function v(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function _(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){n.once&&e.removeEventListener(t,r),i(o)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this.C&&this.C!==Object.getPrototypeOf(this).C||(this.C=Object.create(null),this.L=0),this.N=this.N||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this.N=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this.C;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=r[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var l=u.length,c=v(u,l);for(i=0;i<l;++i)o(c[i],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var i,n,r,o,a;if(l(t),void 0===(n=this.C))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this.L?this.C=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){a=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this.C))return this;if(void 0===i.removeListener)return 0===arguments.length?(this.C=Object.create(null),this.L=0):void 0!==i[e]&&(0==--this.L?this.C=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,o=Object.keys(i);for(n=0;n<o.length;++n)"removeListener"!==(r=o[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this.C=Object.create(null),this.L=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):A.call(e,t)},s.prototype.listenerCount=A,s.prototype.eventNames=function(){return this.L>0?n(this.C):[]}},function(e,t){function i(t){return e.exports=i="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.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){function n(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.i=function(e){return e},i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var n=i(i.s=ENTRY_MODULE);return n.default||n}var r="[\\.|\\-|\\+|\\w|/|@]+",o="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+r+").*?\\)";function a(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function s(e,t,n){var s={};s[n]=[];var u=t.toString(),l=u.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return s;for(var c,d=l[1],h=new RegExp("(\\\\n|\\W)"+a(d)+o,"g");c=h.exec(u);)"dll-reference"!==c[3]&&s[n].push(c[3]);for(h=new RegExp("\\("+a(d)+'\\("(dll-reference\\s('+r+'))"\\)\\)'+o,"g");c=h.exec(u);)e[c[2]]||(s[n].push(c[1]),e[c[2]]=i(c[1]).m),s[c[2]]=s[c[2]]||[],s[c[2]].push(c[4]);for(var f,p=Object.keys(s),A=0;A<p.length;A++)for(var v=0;v<s[p[A]].length;v++)f=s[p[A]][v],isNaN(1*f)||(s[p[A]][v]=1*s[p[A]][v]);return s}function u(e){return Object.keys(e).reduce((function(t,i){return t||e[i].length>0}),!1)}e.exports=function(e,t){t=t||{};var r={main:i.m},o=t.all?{main:Object.keys(r.main)}:function(e,t){for(var i={main:[t]},n={main:[]},r={main:{}};u(i);)for(var o=Object.keys(i),a=0;a<o.length;a++){var l=o[a],c=i[l].pop();if(r[l]=r[l]||{},!r[l][c]&&e[l][c]){r[l][c]=!0,n[l]=n[l]||[],n[l].push(c);for(var d=s(e,e[l][c],l),h=Object.keys(d),f=0;f<h.length;f++)i[h[f]]=i[h[f]]||[],i[h[f]]=i[h[f]].concat(d[h[f]])}}return n}(r,e),a="";Object.keys(o).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;o[e][t];)t++;o[e].push(t),r[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+e+" = ("+n.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o[e].map((function(t){return JSON.stringify(t)+": "+r[e][t].toString()})).join(",")+"});\n"})),a=a+"new (("+n.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o.main.map((function(e){return JSON.stringify(e)+": "+r.main[e].toString()})).join(",")+"}))(self);";var l=new window.Blob([a],{type:"text/javascript"});if(t.bare)return l;var c=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(l),d=new window.Worker(c);return d.objectURL=c,d}},function(e,t,i){var n=i(8).default,r=i(11);e.exports=function(e){var t=r(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(8).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t,n)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){Number.isFinite||(Number.isFinite=function(e){return"number"==typeof e&&isFinite(e)}),Number.MAX_SAFE_INTEGER||(Number.MAX_SAFE_INTEGER=Math.pow(2,53)-1),Object.values||(Object.values=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(e[i]);return t})},function(e,t,i){e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},function(e,t,i){var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var i,r,a=[];for(r in"string"!=typeof t&&(t="?"),e)if(n.call(e,r)){if((i=e[r])||null!=i&&!isNaN(i)||(i=""),r=o(r),i=o(i),null===r||null===i)continue;a.push(r+"="+i)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,i=/([^=?#&]+)=?([^&]*)/g,n={};t=i.exec(e);){var o=r(t[1]),a=r(t[2]);null===o||null===a||o in n||(n[o]=a)}return n}},function(e,t,i){i.r(t),i.d(t,"default",(function(){return An})),i.d(t,"createKernel",(function(){return vn})),i.d(t,"AbstractDestroyable",(function(){return O})),i.d(t,"CanvasContextType",(function(){return A})),i.d(t,"CodecType",(function(){return d})),i.d(t,"DestroyableList",(function(){return x})),i.d(t,"Decoder",(function(){return v})),i.d(t,"DemuxerType",(function(){return X})),i.d(t,"DownloadStatus",(function(){return we})),i.d(t,"ErrorDetails",(function(){return te})),i.d(t,"ErrorTypes",(function(){return ee})),i.d(t,"HttpRangeType",(function(){return E})),i.d(t,"KEvents",(function(){return ke})),i.d(t,"LiveShiftType",(function(){return k})),i.d(t,"LogLevel",(function(){return nt.LogLevel})),i.d(t,"MediaBox",(function(){return m})),i.d(t,"ReportTypes",(function(){return at})),i.d(t,"StereoType",(function(){return S})),i.d(t,"VideoDecBlockPolicy",(function(){return b})),i.d(t,"VideoDropFramePolicy",(function(){return y})),i.d(t,"VideoRendererType",(function(){return p})),i.d(t,"WasmDecoder",(function(){return f}));var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),u=i(2),l=i.n(u),c=(i(13),i(7)),d=((n={}).unknown="unknown",n.h264="h264",n.hevc="hevc",n.av1="av1",n.kvc3="kvc3",n.kvc4="kvc4",n.kvc5="kvc5",n.kvc6="kvc6",n.aac="aac",n.mp3="mp3",n.opus="opus",n.yuv="yuv",n.rawvideo="rawvideo",n.vvc="vvc",n.bvc2="bvc2",n.kvc30="kvc30",n),h=function(e){return e.UNKNOWN="unknown",e.FHD="fhd",e.UHD_4K="4k",e}({}),f=function(e){return e.kvc3="kvc3",e.kvc4="kvc4",e.kvc5="kvc5",e.kvc6="kvc6",e.h265="h265",e.kw265="kw265",e.kvc30="kvc30",e}({}),p=function(e){return e.video="video",e.canvas="canvas",e}({}),A=function(e){return e.canvas2d="canvas2d",e.webgl="webgl",e}({}),v=function(e){return e.buildin="buildin",e.wasm="wasm",e.none="none",e.unsupported="unsupported",e}({}),_=function(e){return e.KWAI_FLV_ABR="kwaiFlvAbr",e.KWAI_FLV_MP="kwaiFlvMultipart",e.KWAI="kwai",e.FILE="file",e.OTHERS="others",e}({}),m=function(e){return e.flv="flv",e.hls="hls",e.hls_ts="hls_ts",e.hls_fmp4="hls_fmp4",e.webrtc="webrtc",e.mp4="mp4",e.raw="raw",e.mp3="mp3",e.wav="wav",e.aac="aac",e.matroska="matroska",e.ts="ts",e.ivf="ivf",e.yuv="yuv",e.unknown="unknown",e}({}),g=function(e){return e.RTC="rtc_retry",e.BACKUP="backup",e.FALLBACK="fallback",e.LOADER="loader",e}({}),y=function(e){return e.AUTO="auto",e.MIN="min",e}({}),b=function(e){return e.NONE="none",e.WAITING="waiting",e}({}),E=function(e){return e.STANDARD="standard",e.QUERY_START_END="queryStartEnd",e}({}),w=function(e){return e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle",e}({}),T=function(e){return e.VIDEO="video",e.AUDIO="audio",e}({}),R=function(e){return e.unknown="unknown",e.native="native",e.mse="mse",e.rtc="rtc",e}({}),S=function(e){return e[e.Normal=0]="Normal",e[e.V360=1]="V360",e[e.V180=2]="V180",e}({}),L=function(e){return e[e.normal=0]="normal",e[e.internal=1]="internal",e[e.retry=2]="retry",e}({}),k=function(e){return e.NONE="none",e.KWAI="kwai",e.KWAI2="kwai2",e}({}),I=function(e){return e.UNKNOWN="",e.PROBABLY="probably",e}({}),x=function(){function e(){var e;this.I=[],(e=this.I).push.apply(e,arguments)}var t=e.prototype;return t.push=function(){var e;(e=this.I).push.apply(e,arguments)},t.destroyItem=function(e){for(var t=0;t<this.I.length;t++)if(this.I[t]===e)return this.I.splice(t,1),void e.destroy()},t.destroy=function(){for(;this.I.length;){var e=this.I.shift();e&&e.destroy()}},s()(e,[{key:"destroyed",get:function(){return!!this.I.length}}])}(),O=function(){function e(){this.F=new x}return e.prototype.destroy=function(){this.F.destroy()},e}(),C=function(e){return e.LOADER_CONNECT_TIMEOUT="connectTimeout",e.LOADER_TRANS_TIMEOUT="transTimeout",e.HANDLING_DATA_ERROR="handlingDataError",e}({}),D=function(e){return e.XHR_ERROR_NAME="XHRError",e.FETCH_ERROR_NAME="FetchError",e.FETCH_READ_ERROR_NAME="ReadError",e.SLICE_UNPACK_ERROR_NAME="SliceUnpackError",e}({}),M=function(e){return e.UNKNOWN="unknown",e.FETCH="fetch",e.XHR="xhr",e}({});function N(e,t,i){if(void 0===e[t])e[t]=i;else{var n=e[t];Array.isArray(n)?n.push(i):"string"==typeof n&&(e[t]=[n,i])}}function P(e){var t={};return"string"==typeof e?e.trim().split(/[\r\n]+/).forEach((function(e){var i=e.split(": "),n=i.shift(),r=i.join(":");n&&N(t,n,r)})):e&&e.forEach((function(e,i){e.split(",").forEach((function(e){N(t,i,e)}))})),t}var U=function(e){return 0===e.toLowerCase().indexOf("kwaisign")||0===e.toLowerCase().indexOf("x-ks-")?1:0},F=function(e){return e.MOZ_CHUNK="moz-chunked-arraybuffer",e.UNKNOW="unknow",e.UNSUPPORT="",e}({}),B=function(){function e(){var e=this;this.tag="xhr",this.B=null,this.j=void 0,this.U=null,this.P=F.UNKNOW,this.V=function(){if(e.B){var t=e.B;2===t.readyState&&(e.j.responseUrl=t.responseURL,e.j.responseHeader=P(t.getAllResponseHeaders()),e.U&&e.U.onConnect&&e.U.onConnect(e.j,t.status),(t.status<200||t.status>299)&&e.H())}},this.W=function(){if(e.B){var t=e.B.response;e.U&&e.U.onProgress&&t&&e.U.onProgress(e.j,t)}},this.G=function(){var t=null,i=e.B;!e.P&&i&&(t=i.response),e.U&&e.U.onEnd(e.j,t)},this.H=function(){var t;if(e.U&&e.U.onError){var i=new Error("xhr load error.");i.name=D.XHR_ERROR_NAME,e.U.onError(i)}null==(t=e.B)||t.abort()},this.B=null}e.isSupportChunk=function(){if(e.Y!==F.UNKNOW)return e.Y;try{var t=new XMLHttpRequest;if(t.open("GET","https://example.com",!0),t.responseType=F.MOZ_CHUNK,t.responseType===F.MOZ_CHUNK)return e.Y=F.MOZ_CHUNK,e.Y}catch(t){e.Y=F.UNSUPPORT}return F.UNSUPPORT};var t=e.prototype;return t.load=function(t,i){this.U=i,this.j=t,this.P=F.UNSUPPORT,t.progress&&"arraybuffer"===t.responseType&&(this.P=e.isSupportChunk());var n=this.B=new XMLHttpRequest;n.open(t.requestMethod?t.requestMethod:"GET",this.j.url,!0),this.P===F.MOZ_CHUNK?(n.responseType=F.MOZ_CHUNK,n.onprogress=this.W,n.onload=this.G):(n.responseType=t.responseType||"arraybuffer",n.onload=this.G),n.onreadystatechange=this.V,n.onerror=this.H,n.withCredentials=!!t.credentials,t.range&&n.setRequestHeader("Range",t.range),t.headers&&t.headers.forEach((function(e){n.setRequestHeader(e.header,e.value)})),n.send(t.requestBody)},t.abort=function(){this.B&&(this.B.onreadystatechange=null,this.B.onprogress=null,this.B.onload=null,this.B.onerror=null,this.B.abort(),this.B=null)},t.destroy=function(){this.U=null,this.abort()},e}();B.Y=F.UNKNOW;var H=[m.hls,m.hls_ts,m.hls_fmp4];function V(e){return!!e&&-1!==H.indexOf(e)}var G={version:{major:0,string:""}};!function(e){if(typeof navigator<"u"){e=e?e.toLowerCase():navigator.userAgent.toLowerCase();var t=/(edge)\/([\w.]+)/.exec(e)||/(edg)\/([\w.]+)/.exec(e)||/(opr)[/]([\w.]+)/.exec(e)||/(chrome)[ /]([\w.]+)/.exec(e)||/(iemobile)[/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ /]([\w.]+).*(safari)[ /]([\w.]+)/.exec(e)||/(webkit)[ /]([\w.]+).*(version)[ /]([\w.]+).*(safari)[ /]([\w.]+)/.exec(e)||/(webkit)[ /]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ /]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ /]([\w.]+)/.exec(e)||[],i=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],n=/(?:iphone|ipad|cpu) os (\d+)[._]\d+/.exec(e)||/android ([\d.]+)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:i[0]||"",platformVersion:n[1]||""},a={x5:/ tbs\//.test(e),xweb:/ xweb\//.test(e),version:{major:0,string:""}};if(r.browser){a[r.browser]=!0;var s=r.majorVersion.split(".");a.version={major:parseInt(r.majorVersion,10),string:r.version},s.length>1&&(a.version.minor=parseInt(s[1],10)),s.length>2&&(a.version.build=parseInt(s[2],10))}if(r.platform&&(a[r.platform]=!0),(a.chrome||a.opr||a.safari)&&(a.webkit=!0),a.rv||a.iemobile){a.rv&&delete a.rv;var u="msie";r.browser=u,a[u]=!0}if(a.edg||a.edge){delete a.edg,delete a.edge;var l="msedge";r.browser=l,a[l]=!0}if(a.opr){var c="opera";r.browser=c,a[c]=!0}if(a.safari&&a.android){var d="android";r.browser=d,a[d]=!0}if(a.android){var h=e.match(/android[\s0-9.]+;([\w\s-]+)(build)?/);if(h)try{var f;a.model=null==(f=h[1].split("build")[0])?void 0:f.trim()}catch(e){}}else a.ipad?a.model="ipad":a.iphone&&(a.model="iphone");for(var p in(a.android||a.iphone||a.ipad)&&(a.mobile=!0),a.ios=a.iphone||a.ipad,a.name=r.browser,a.platform=r.platform,a.platformVersion=r.platformVersion,G)Object.prototype.hasOwnProperty.call(G,p)&&delete G[p];o()(G,a)}}();var j=G;function W(e,t){var i=e.toString();return-1!==i.toLowerCase().indexOf("[native code]")&&-1!==i.indexOf(t)?I.UNKNOWN:I.PROBABLY}var K=function(){function e(e){this.tag="fetch",this.J=void 0,this.j=void 0,this.U=null,this.Z=null,this.K=null,this.q=!1,this.J=e}e.isSupported=function(){return typeof fetch<"u"&&typeof ReadableStream<"u"};var t=e.prototype;return t.load=function(e,t){var i=this;this.j=e,this.U=t;var n=new Headers;e.headers&&e.headers.forEach((function(e){n.append(e.header,e.value)})),e.range&&n.append("Range",e.range);var r={method:e.requestMethod?e.requestMethod:"GET",headers:n,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade",signal:this.X()};e.requestBody&&(r.body=e.requestBody),e.credentials&&(r.credentials="include");var o=fetch;if(!0===e.preferNative){var a=this.$();o=a.func,e.monkeyPatched=a.patched,e.useResetNativeFetch=null==a?void 0:a.resetNativeFetch}else e.monkeyPatched=W(o,"fetch");o(e.url,r).then((function(t){if(e.responseUrl=t.url,e.redirected=t.redirected,e.responseHeader=P(t.headers),i.U&&i.U.onConnect&&i.U.onConnect(e,t.status),t.ok)return i.q?void(t.body&&t.body.getReader().cancel().catch((function(e){return i.J.i(i.tag,e)}))):"arraybuffer"===e.responseType?e.progress?void(t.body&&(i.K=t.body.getReader(),i.tt(i.K))):void t.arrayBuffer().then((function(t){i.it(e,t)})).catch((function(e){if(!i.q){var n=new Error("arraybuffer error. "+t.status+" "+e);n.name=D.FETCH_ERROR_NAME,i.H(n)}})):void t.text().then((function(t){i.it(e,t)})).catch((function(e){if(!i.q){var n=new Error("text error. "+t.status+" "+e);n.name=D.FETCH_ERROR_NAME,i.H(n)}}));var n=new Error("res not ok. "+t.status+" "+t.statusText);n.name=D.FETCH_ERROR_NAME,i.H(n)})).catch((function(e){"AbortError"!==e.name&&i.H(e)}))},t.abort=function(){this.Z&&(this.Z.abort(),this.Z=null),this.K&&(this.K.cancel().catch((function(){})),this.K=null),this.q=!0},t.destroy=function(){this.U=null,this.abort()},t.W=function(e,t){this.U&&this.U.onProgress&&this.U.onProgress(e,t)},t.it=function(e,t){this.U&&this.U.onEnd&&(this.K=null,this.Z=null,this.U.onEnd(e,t))},t.H=function(e){this.U&&this.U.onError&&this.U.onError(e)},t.tt=function(e){var t=this;e.read().then((function(i){if(t.q)return e.cancel(),null;if(i.done)return t.it(t.j,null),null;var n=i.value.buffer;return t.j.useResetNativeFetch&&j.safari&&(n=new Uint8Array(new Uint8Array(n).subarray()).buffer),t.W(t.j,n),t.tt(e)})).catch((function(e){"AbortError"!==e.name&&(e.name=D.FETCH_READ_ERROR_NAME,t.H(e))}))},t.X=function(){try{if(AbortController)return this.Z=new AbortController,this.Z.signal}catch(e){return null}return null},t.$=function(){if(void 0!==e.et)return e.et;if(W(fetch,"fetch")===I.PROBABLY){var t=function(e){var t,i,n=document.createElement("iframe");document.body.appendChild(n);var r=null==(t=(null==(i=n.contentWindow)?void 0:i.fetch)||null)?void 0:t.bind(e);return document.body.removeChild(n),r}(window);this.J.i(this.tag,"detected io monkey patched. get native io, fetch: "+!!t),e.et=t?{func:t,patched:I.PROBABLY,resetNativeFetch:!0}:{func:fetch,patched:I.PROBABLY,resetNativeFetch:!1}}else e.et={func:fetch,patched:I.UNKNOWN,resetNativeFetch:!1};return e.et},e}();K.et=void 0;var z=i(3),J=i.n(z),q=536870912,Y={alwaysSeekKeyframe:!1,lazyLoadMaxDuration:-1,lazyLoadRecoverDuration:20,webWorker:!0,appendErrorMaxRetry:3,credentials:!1,streamingMux:!0,autoPlaybackRate:!0,autoPlaybackRateConf:void 0,enableSoftwareAES:!0,startPlayBufferSec:0,startFromSec:-1,startFromKeyframe:!0,defaultSpts:-5e3,resourceBuffer:!0,resourceBufferSize:500,ntp:!0,ensureVideo:!1,adaptive:!0,abrSpeedTest:!0,httpRangeType:E.STANDARD,enableAacPriv:!1,mseDecErrSkip:2,maxAudioFramesDrift:5,forceKeyFrameOnDiscontinuity:!1,videoDropFramePolicy:y.AUTO,videoDecBlockPolicy:b.WAITING,videoFrameBufferSize:q,maxVideoDecThreads:8,mainThreadRendering:!1,mainThreadDecoding:!1,wasmDecoderEnabled:!j.mobile,maxRetry:3,connectionTimeout:1e4,transmissionTimeout:3e4,retryDelay:100,maxFragFailSec:11,flvLoadEndError:!0,catchUpPausedLive:!0,breakpointContinuation:!0,manifestLoadingMaxRetry:3,manifestConnectionTimeout:1e4,manifestTransmissionTimeout:1e4,manifestLoadingRetryDelay:1,levelLoadingMaxRetry:3,levelConnectionTimeout:1e4,levelTransmissionTimeout:1e4,levelLoadingRetryDelay:100,levelNoUpdateRetry:10,emeEnabled:!0,widevineLicenseUrl:"",playreadyLicenseUrl:"",fairplayLicenseUrl:"",keyLoadingMaxRetry:3,keyConnectionTimeout:1e4,keyTransmissionTimeout:5e3,keyLoadingRetryDelay:300,sdpConnectionTimeout:1e4,peerConnectionTimeout:1e4,peerConnectionMaxRetry:5,peerConnectionRetryDelay:3e3,decLibLoadingMaxRetry:2,decLibConnectionTimeout:5e3,decLibLoadingRetryDelay:300,liveDelayFragNum:3,liveShiftDelaySec:60,liveShiftType:k.NONE,preferNativeLoader:void 0,playbackAbilityCacheTimeout:864e5,adjustFragTime:!0},Q={maxRetry:1,retryDelay:100,connectionTimeout:1e4,levelConnectionTimeout:1e4,manifestConnectionTimeout:1e4},Z=function(){function e(){}return e.isStreamingSupported=function(){return void 0===e.nt&&(e.nt=K.isSupported()||!!B.isSupportChunk()),e.nt},e.processConfig=function(e){if(e){var t=e.src,i=e.preprocessUrl,n=e.logger;e=o()(JSON.parse(JSON.stringify(e)),{src:t,preprocessUrl:i,logger:n})}e.isLive?Y.videoFrameBufferSize=104857600:Y.videoFrameBufferSize=q;var r=V(e.box)?o()({},Y,Q):o()({},Y);return o()(r,e),r.wasmDecoderEnabled=r.wasmDecoderEnabled&&!!J.a,r.startPlayBufferSec=Math.min(5,Math.max(0,r.startPlayBufferSec)),this.rt(r),Worker||(r.webWorker=!1),r},e.rt=function(e){var t=e.autoPlaybackRateConf;if(t){var i=t.rule;if(i&&Array.isArray(i)&&((i=i.filter((function(e){return e.upper>e.lower&&e.rate>0}))).sort((function(e,t){return t.rate-e.rate})),i.length>1))return t.rule=i,void(e.autoPlaybackRateConf=t)}},e}();Z.nt=void 0;var X=function(e){return e.UNKNOWN="unknown",e.FLV="flv",e.FMP4="fmp4",e.TS="ts",e.MP4="mp4",e.RAW="raw",e.IVF="ivf",e.YUV="yuv",e}({}),$=function(e){return e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack",e}({}),ee=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e.MSE_ERROR="mseError",e.DECODER_ERROR="decoderError",e.RENDERER_ERROR="rendererError",e}({}),te=function(e){return e[e.LOAD_ERROR=10]="LOAD_ERROR",e[e.MANIFEST_LOAD_ERROR=11]="MANIFEST_LOAD_ERROR",e[e.LEVEL_LOAD_ERROR=12]="LEVEL_LOAD_ERROR",e[e.AUDIO_TRACK_LOAD_ERROR=13]="AUDIO_TRACK_LOAD_ERROR",e[e.KEY_LOAD_ERROR=14]="KEY_LOAD_ERROR",e[e.KEY_SYSTEM_LICENSE_REQUEST_FAILED=15]="KEY_SYSTEM_LICENSE_REQUEST_FAILED",e[e.DEC_LIB_LOAD_ERROR=16]="DEC_LIB_LOAD_ERROR",e[e.RTC_SDP_LOAD_ERROR=17]="RTC_SDP_LOAD_ERROR",e[e.SUBTITLE_TRACK_LOAD_ERROR=18]="SUBTITLE_TRACK_LOAD_ERROR",e[e.CANNOT_SEEK=100]="CANNOT_SEEK",e[e.VIDEO_ERROR=101]="VIDEO_ERROR",e[e.UNSUPPORTED=102]="UNSUPPORTED",e[e.CONFIG_ERROR=103]="CONFIG_ERROR",e[e.OTHER=104]="OTHER",e[e.UNKNOWN=105]="UNKNOWN",e[e.CANNOT_SEEK_BY_FRAME_INDEX=106]="CANNOT_SEEK_BY_FRAME_INDEX",e[e.SRC_EMPTY=107]="SRC_EMPTY",e[e.VIDEO_NO_SIZE=108]="VIDEO_NO_SIZE",e[e.NO_TRACKS_AVAILABLE=109]="NO_TRACKS_AVAILABLE",e[e.VIDEO_ERROR_1=111]="VIDEO_ERROR_1",e[e.VIDEO_ERROR_2=112]="VIDEO_ERROR_2",e[e.VIDEO_ERROR_3=113]="VIDEO_ERROR_3",e[e.VIDEO_ERROR_4=114]="VIDEO_ERROR_4",e[e.MEDIASOURCE_ERROR=200]="MEDIASOURCE_ERROR",e[e.ADDSOURCEBUFFER_ERROR=201]="ADDSOURCEBUFFER_ERROR",e[e.SOURCEBUFFER_ERROR=202]="SOURCEBUFFER_ERROR",e[e.ENDOFSTREAM_ERROR=203]="ENDOFSTREAM_ERROR",e[e.APPENDBUFFER_ERROR=204]="APPENDBUFFER_ERROR",e[e.CHANGETYPE_ERROR=205]="CHANGETYPE_ERROR",e[e.MSE_CAPABILITY_ERROR=206]="MSE_CAPABILITY_ERROR",e[e.MSE_SOURCE_BUFFER_CLOSE_ERROR=207]="MSE_SOURCE_BUFFER_CLOSE_ERROR",e[e.PARSING_ERROR=301]="PARSING_ERROR",e[e.REMUX_ERROR=302]="REMUX_ERROR",e[e.REMUX_ALLOC_ERROR=303]="REMUX_ALLOC_ERROR",e[e.REMUX_WORKER_ERROR=304]="REMUX_WORKER_ERROR",e[e.DEMUX_NOT_FOUND=305]="DEMUX_NOT_FOUND",e[e.MANIFEST_PARSING_ERROR=400]="MANIFEST_PARSING_ERROR",e[e.LEVEL_NO_UPDATE_ERROR=402]="LEVEL_NO_UPDATE_ERROR",e[e.KEY_SYSTEM_NO_ACCESS=500]="KEY_SYSTEM_NO_ACCESS",e[e.KEY_SYSTEM_NO_SESSION=501]="KEY_SYSTEM_NO_SESSION",e[e.KEY_SYSTEM_URL_ERROR=502]="KEY_SYSTEM_URL_ERROR",e[e.KEY_SYSTEM_NO_KEYS=505]="KEY_SYSTEM_NO_KEYS",e[e.FRAG_DECRYPT_ERROR=506]="FRAG_DECRYPT_ERROR",e[e.KEY_SYSTEM_NO_INIT_DATA=507]="KEY_SYSTEM_NO_INIT_DATA",e[e.KEY_SYSTEM_UNSUPPORTED=508]="KEY_SYSTEM_UNSUPPORTED",e[e.DECODER_LOAD_ERROR=600]="DECODER_LOAD_ERROR",e[e.DECODER_INIT_ERROR=601]="DECODER_INIT_ERROR",e[e.DECODER_DRAW_ERROR=602]="DECODER_DRAW_ERROR",e[e.DECODER_WEBGL_ERROR=603]="DECODER_WEBGL_ERROR",e[e.DECODER_UNSUPPORTED=604]="DECODER_UNSUPPORTED",e[e.DECODER_COPY_YUV_ERROR=605]="DECODER_COPY_YUV_ERROR",e[e.DECODER_DEC_ERROR=606]="DECODER_DEC_ERROR",e[e.DECODER_2D_ERROR=607]="DECODER_2D_ERROR",e[e.SCREENSHOT_INIT_ERROR=700]="SCREENSHOT_INIT_ERROR",e[e.SCREENSHOT_EMPTY_DATA_ERROR=701]="SCREENSHOT_EMPTY_DATA_ERROR",e[e.SCREENSHOT_CREATE_IMG_ERROR=702]="SCREENSHOT_CREATE_IMG_ERROR",e[e.LIVE_DISCONNECTED_ERROR=1009]="LIVE_DISCONNECTED_ERROR",e[e.WEBRTC_DISCONNECTED_ERROR=1010]="WEBRTC_DISCONNECTED_ERROR",e[e.WEBRTC_FAILED_ERROR=1011]="WEBRTC_FAILED_ERROR",e[e.WEBRTC_CLOSED_ERROR=1012]="WEBRTC_CLOSED_ERROR",e[e.WEBRTC_ICE_CANDIDATE_ERROR=1013]="WEBRTC_ICE_CANDIDATE_ERROR",e[e.WEBRTC_ICE_CONNECTION_ERROR=1014]="WEBRTC_ICE_CONNECTION_ERROR",e[e.WEBRTC_OFFER_ERROR=1015]="WEBRTC_OFFER_ERROR",e[e.WEBRTC_ANSWER_ERROR=1016]="WEBRTC_ANSWER_ERROR",e[e.WEBRTC_TRANSMISSION_DATA_NULL=1017]="WEBRTC_TRANSMISSION_DATA_NULL",e[e.WEBRTC_CONNECT_TIMEOUT=1018]="WEBRTC_CONNECT_TIMEOUT",e[e.WEBRTC_CONNECT_FAILED=1019]="WEBRTC_CONNECT_FAILED",e}({}),ie=[te.VIDEO_ERROR,te.VIDEO_ERROR_1,te.VIDEO_ERROR_2,te.VIDEO_ERROR_3,te.VIDEO_ERROR_4];function ne(e,t,i,n){var r={type:e,details:t,code:0,fatal:!0,reason:i};if(n)for(var o in n){var a=n[o];void 0!==a&&(r[o]=a)}return r}var re="05",oe="06",ae="07",se="08",ue="10",le="99",ce={400:"01",401:"02",403:"03",404:"04",200:"09",206:"09"};function de(e,t,i){if(void 0===i&&(i=0),e>=100)return e;var n="00";return t.indexOf(C.LOADER_CONNECT_TIMEOUT)>=0?n=ae:function(e){return e.indexOf(C.LOADER_TRANS_TIMEOUT)>=0}(t)?n=se:function(e){return e.indexOf(C.HANDLING_DATA_ERROR)>=0}(t)?n=ue:Object.prototype.hasOwnProperty.call(ce,i)?n=200!==i&&206!==i||!t?ce[i]||"00":le:/^4\d{2}$/.test(i.toString())?n=re:/^5\d{2}$/.test(i.toString())&&(n=oe),parseInt(e+n,10)}var he=/\.[^./\\?#]+(?=$|[?#])/i,fe={".mp4":m.mp4,".m4s":m.mp4,".mov":m.mp4,".m4a":m.mp4,".flv":m.flv,".m3u8":m.hls,".sdp":m.webrtc,".webm":m.matroska,".mkv":m.matroska,".mka":m.matroska,".mp3":m.mp3,".wav":m.wav,".aac":m.aac,".ts":m.ts,".yuv":m.yuv,".slice":m.flv};function pe(e){var t,i=(t=e.toLocaleLowerCase().match(he))?t[0]:"";return i&&fe[i]||m.unknown}var Ae=i(4),ve=i.n(Ae),_e=/^[^_][A-Za-z0-9_-]*$/,me=/_([A-Za-z0-9]+)_/;var ge=function(e){var t=e.match(me),i="";return null!=t&&t.length&&t.length>1&&(i=t[1]),ye(i)},ye=function(e){return _e.test(e)?e:""};var be,Ee=function(){performance&&("function"==typeof performance.clearResourceTimings?performance.clearResourceTimings():"function"==typeof performance.webkitClearResourceTimings&&performance.webkitClearResourceTimings())},we=function(e){return e.FAIL="FAIL",e.ABORT="ABORT",e.SUCCESS="SUCCESS",e.CONNECTED="CONNECTED",e}({});(be={})[$.MANIFEST]=te.MANIFEST_LOAD_ERROR,be[$.LEVEL]=te.LEVEL_LOAD_ERROR,be[$.AUDIO_TRACK]=te.AUDIO_TRACK_LOAD_ERROR,be[$.SUBTITLE_TRACK]=te.SUBTITLE_TRACK_LOAD_ERROR;var Te,Re,Se,Le=function(e){return e.METADATA="metadata",e.MEDIA_INFO="mediaInfo",e.PARSING_INIT_SEGMENT="parsingInitSegment",e.PARSING_DATA="parsingData",e.PARSED_DATA="parsedData",e.SCRIPT_PARSED="scriptParsed",e.KEY_FRAME_INDEXS="keyFrameIndexs",e.VIDEO_FRAME_INFO="videoFrameInfo",e.DISCONTINUITY="discontinuity",e.REPORT="report",e.LOAD_END="loadEnd",e.ERROR="error",e.MANIFEST_LOADED="manifestLoaded",e.MANIFEST_PARSED="manifestParsed",e.LEVEL_SWITCHING="levelSwitching",e.LEVEL_SWITCHED="levelSwitched",e.LEVEL_SWITCH_PLAYING="levelSwitchPlaying",e.LEVEL_SWITCH_FAILED="levelSwitchFailed",e.LEVEL_LOADED="levelLoaded",e.LEVEL_UPDATED="levelUpdated",e.AUDIO_TRACK_SWITCHING="audioTrackSwitching",e.AUDIO_TRACK_SWITCHED="audioTrackSwitched",e.AUDIO_TRACK_UPDATED="audioTrackUpdated",e.AUDIO_TRACK_SWITCH_FAILED="audioTrackSwitchFailed",e.HLS_MANIFEST_PARSED="hlsManifestParsed",e.HLS_KEY_LOADED="hlsKeyLoaded",e.AUDIO_TRACK_LOADED="audioLoaded",e.SUBTITLE_TRACK_LOADED="subtitleTrackLoaded",e.SUBTITLE_LOADED="subtitleLoaded",e.SUBTITLE_TRACK_SWITCHED="subtitleTrackSwitched",e.SUBTITLE_TRACK_UPDATED="subtitleTrackUpdated",e.BUFFER_CLEANING="bufferCleaning",e.VIDEO_SEEK="vdeoSeek",e.ABR_NEXT="abrNext",e.PRIV_NAL="privNal",e.SEI="sei",e.AAC_PRIV="aacPriv",e.RAW_DATA="rawData",e.MP4_NOT_FASTSTART="mp4NotFaststart",e.VIDEO_CODEC_DETECTED="videoCodecChange",e.H265_DETECTED="h265Detected",e.VIDEO_RENDERER_CHANGE="videoRendererChange",e.DEC_LIB_LOADED="decLibLoaded",e.DEC_INIT_COMPLETE="decoderInitComplete",e.DEC_VIDEO_READY="decVideoReady",e.STEP="step",e.RENDERER_INIT_COMPLETE="rendererInitComplete",e.RENDERER_BUF_EXPIRED="rendererBufExpired",e.RENDERER_SEEK="rendererSeek",e.RENDERER_BUF_UPDATE="rendererBufUpdate",e.RENDERER_DRAW="rendererDraw",e.RENDERER_WAITING="rendererWaiting",e.RENDERER_WAITING_END="rendererWaitingEnd",e.DECODER_FRAME="decoderFrame",e.DECODER_IMG="decoderImg",e.DECODER_SEEK="decoderSeek",e.DECODER_SEEK_ABORT="decoderSeekAbort",e.DECODER_WAITING="decoderWaiting",e.DECODER_DATA_END="decoderDataEnd",e.DECODER_BUF_LOW="decoderDataEmpty",e.DECODER_DROP_FRAME="decocerDropFrame",e.DECODER_MEDIA_INFO="decoderMediaInfo",e.MEDIA_CONNECTED="mediaConnected",e.LOADER_CHUNK_ARRIVAL="loaderChunkArrival",e.DEMUXER_DETECTED="demuxerDetected",e.MEDIA_DEMUX="mediaDemux",e.KEY_FRAME="keyFrame",e.USE_BACKUP="useBackup",e.NEW_SOURCE="newSource",e.DOWNLOAD="download",e.STOP_LOAD="stopLoad",e.LOAD="load",e.WAITING="waiting",e.LOADEDMETADATA="loadedmetadata",e.LOADEDDATA="loadeddata",e.CANPLAY="canplay",e.SEEKING="seeking",e.SEEK_WITH_LOAD="seekWithLoad",e.SEEKED="seeked",e.PLAYING="playing",e.PAUSE="pause",e.PLAY="play",e.ENDED="ended",e.TIMEUPDATE="timeupdate",e.PROGRESS="progress",e.RATE_CHANGE="ratechange",e.DURATION_CHANGE="durationchange",e.HEARTBEAT="heartbeat",e.MSE_UPDATE="mseUpdate",e.MSE_BUFFER_FULL="mseBufferFull",e.MSE_SOURCE_CLOSE="mseSourceClose",e.RETRY="retry",e.WORKER_LOG="workerLog",e.VISIBILITY_CHANGE="visibilityChange",e.SCREENSHOT="screenshot",e}(Le||{}),ke=Le,Ie="event-bus-consumer-manager",xe=function(){function e(e,t){this.J=void 0,this.At=[],this.ot=void 0,e.i(Ie,"constructor"),this.J=e,this.ot=t,this.st()}var t=e.prototype;return t.destroy=function(){this.J.i(Ie,"destroy"),this.ot.removeAllListeners(),this.At.splice(0,this.At.length)},t.register=function(e,t){void 0===t&&(t=!1),this.J.i(Ie,"register",e.getName()),t?this.At.unshift(e):this.At.push(e),e.setEvtEmitter(this.ot)},t.unregister=function(e){for(var t=this.At.length-1;t>=0;t--)e===this.At[t]&&this.At.splice(t,1)},t.st=function(){var e=this;Object.values(ke).forEach((function(t){var i="on"+t.charAt(0).toUpperCase()+t.slice(1);e.ot.on(t,(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var o=0;o<e.At.length;o++){var a=e.At[o];if(a&&i in a){var s,u=(s=a[i]).call.apply(s,[a].concat(n));if(null!=u&&u.stop)break}}}))}))},s()(e,[{key:"evt",get:function(){return this.ot}}])}(),Oe=function(e){function t(){for(var t,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return(t=e.call.apply(e,[this].concat(n))||this).ot=void 0,t}l()(t,e);var i=t.prototype;return i.getName=function(){throw new Error("getName method must be override.")},i.setEvtEmitter=function(e){this.ot=e},i.emit=function(e,t){var i;return(null==(i=this.ot)?void 0:i.emit(e,t))||!1},i.onWorkerLog=function(e){},t}(O),Ce="exposed-event",De=function(e){function t(t,i){var n;return(n=e.call(this)||this).ut=void 0,n.J=void 0,n.ht=void 0,n.ut=t,n.J=t.logger,n.ht=i,n}l()(t,e);var i=t.prototype;return i.onReport=function(e){this.ht.emit(ke.REPORT,e)},i.onError=function(e){if((null==e||!e.preventFollowUp)&&e.fatal){var t=o()({},e);if(this.ut.stat.coreType===R.native){var i=this.ut.stat.retryInfo.getLastMseError();i&&(this.J.i(Ce,"replace error info by mse error."),o()(t,{type:i.type,details:i.details,reason:i.reason,code:i.code}),void 0!==i.url&&(t.url=i.url),void 0!==i.statusCode&&(t.statusCode=i.statusCode))}this.ht.emit(ke.ERROR,t)}},i.onManifestParsed=function(e){null!=e&&e.preventFollowUp||this.ht.emit(ke.MANIFEST_PARSED,e)},i.onLevelSwitching=function(e){this.ht.emit(ke.LEVEL_SWITCHING,e)},i.onLevelSwitched=function(e){this.ht.emit(ke.LEVEL_SWITCHED,e)},i.onLevelSwitchFailed=function(){this.ht.emit(ke.LEVEL_SWITCH_FAILED)},i.onLevelUpdated=function(e){this.ht.emit(ke.LEVEL_UPDATED,e)},i.onLevelSwitchPlaying=function(e){this.ht.emit(ke.LEVEL_SWITCH_PLAYING,e)},i.onAudioTrackSwitching=function(e){this.ht.emit(ke.AUDIO_TRACK_SWITCHING,e)},i.onAudioTrackSwitched=function(e){this.ht.emit(ke.AUDIO_TRACK_SWITCHED,e)},i.onAudioTrackUpdated=function(e){this.ht.emit(ke.AUDIO_TRACK_UPDATED,e)},i.onAudioTrackSwitchFailed=function(){this.ht.emit(ke.AUDIO_TRACK_SWITCH_FAILED)},i.onSubtitleTrackSwitched=function(e){this.ht.emit(ke.SUBTITLE_TRACK_SWITCHED,e)},i.onLoadEnd=function(e){null!=e&&e.preventFollowUp||this.ht.emit(ke.LOAD_END)},i.onVideoRendererChange=function(e){this.ht.emit(ke.VIDEO_RENDERER_CHANGE,e)},i.onH265Detected=function(e){this.ht.emit(ke.H265_DETECTED,e)},i.onScreenshot=function(e){-1===e.pts&&(e.pts=this.ut.video?1e3*this.ut.video.currentTime:0),this.ht.emit(ke.SCREENSHOT,e)},i.getName=function(){return Ce},t}(Oe),Me="fallback",Ne=function(e){function t(t){var i;return(i=e.call(this)||this).ut=void 0,i.J=void 0,i.ct=!1,i.ft=void 0,i.ut=t,i.J=t.logger,i}l()(t,e);var i=t.prototype;return i.reset=function(){return this.J.i(Me,"reset"),this.ct=!1,this},i.stop=function(){return this},i.setRetryFunc=function(e){return this.ft=e,this},i.destroy=function(){this.J.i(Me,"fallback: "+this.constructor.name+" destroy."),this.ft=void 0,e.prototype.destroy.call(this)},i.getAvailable=function(){return!(!this.ft||this.ct)},i.vt=function(e){if(this.ft&&!1!==this.ft())return this.ct=!0,e},i.emit=function(e,t){return this.ut.evt.emit(e,t)},t}(O),Pe=function(e){return e.FLV_LIVE_RELOAD="flvLiveReload",e.USE_BACKUP="useBackup",e.USE_BACKUP_MULTIPART="useBackupMultipart",e.NO_WORKER="noWorker",e.SWAP_REMUX_TYPE="swapRemuxType",e.SWAP_AUDIO_CODECSTR="swapAudioCodecStr",e.NEXT_DESC="nextDesc",e.SWAP_WASM_DECODER="swapWasmDecoder",e.SWAP_CORE="swapCore",e.SWAP_264="swap264",e.RELOAD_WASM="reloadWasm",e.DROP_V_FRAME="dropVFrame",e}({}),Ue="fallback",Fe=function(e){function t(t){var i;return(i=e.call(this)||this).ut=void 0,i.J=void 0,i.dt={},i.lt=void 0,i.H=function(e){if(i.J.i(Ue,"on error",e,Object.keys(i.dt)),i.lt||(i.lt=i.yt()),e.fatal){i.J.i(Ue,"error. type: "+e.type+" details: "+e.details+" reason: "+e.reason);for(var t=0;t<i.lt.actions.length;t++){var n=i.lt.actions[t];if(n){var r=i.dt[n.type];if(null!=r&&r.getAvailable()){var a=i.ut.stat.coreType,s=r.run(e);if(s)return i.J.i(Ue,"fallback run. type: "+n.type+" "+t+"/"+i.lt.actions.length+". reason: "+e.reason),e.preventFollowUp=!0,s.code=de(e.details,e.reason,e.statusCode),s.errorData=o()({},e),s.core=a,i.ut.evt.emit(ke.RETRY,s),void i.Mt(t)}}}i.J.i(Ue,"no fallback matched. reason: "+e.reason)}},i.ut=t,i.J=t.logger,i.F.push(i.ut.evt.prependListener(ke.ERROR,i.H)),i}l()(t,e);var i=t.prototype;return i.register=function(e,t){var i=this;return this.J.i(Ue,"register "+e+" "+t.constructor.name),this.dt[e]&&(this.J.i(Ue,e+" existed."),this.F.destroyItem(t)),this.dt[e]=t,this.F.push(t),{destroy:function(){return i.unregisterAndDestroy(e)}}},i.unregisterAndDestroy=function(e){var t=this.dt[e];return t&&(this.F.destroyItem(t),t.destroy(),delete this.dt[e],this.J.i(Ue,"unregisterAndDestroy "+e)),this},i.hasFallback=function(e){return!!this.dt[e]},i.reset=function(){for(var e in this.J.i(Ue,"reset"),this.dt)this.unregisterAndDestroy(e);this.dt={},this.lt=void 0},i.stop=function(){for(var e in this.dt)this.dt[e].stop()},i.Mt=function(e){if(this.lt){var t=this.lt.actions[e];!t||t.type!==Pe.SWAP_CORE&&t.type!==Pe.NO_WORKER||(this.wt(Pe.USE_BACKUP),this.wt(Pe.USE_BACKUP_MULTIPART),this.wt(Pe.FLV_LIVE_RELOAD))}},i.yt=function(){this.J.i(Ue,"generate fallback policy.");var e=this.ut,t=(j.mobile,{core:e.stat.coreType,actions:[]});return e.stat.coreType===R.mse?t.actions.push({type:Pe.RELOAD_WASM},{type:Pe.FLV_LIVE_RELOAD},{type:Pe.USE_BACKUP_MULTIPART},{type:Pe.USE_BACKUP},{type:Pe.NO_WORKER},{type:Pe.DROP_V_FRAME},{type:Pe.SWAP_REMUX_TYPE},{type:Pe.SWAP_AUDIO_CODECSTR},{type:Pe.SWAP_264},{type:Pe.NEXT_DESC},{type:Pe.SWAP_WASM_DECODER},{type:Pe.SWAP_CORE}):e.stat.coreType===R.native&&t.actions.push({type:Pe.USE_BACKUP},{type:Pe.SWAP_264},{type:Pe.NEXT_DESC},{type:Pe.SWAP_CORE},{type:Pe.RELOAD_WASM},{type:Pe.FLV_LIVE_RELOAD},{type:Pe.USE_BACKUP_MULTIPART},{type:Pe.NO_WORKER},{type:Pe.SWAP_REMUX_TYPE},{type:Pe.SWAP_AUDIO_CODECSTR},{type:Pe.SWAP_WASM_DECODER}),t},i.wt=function(e){var t;null==(t=this.dt[e])||t.reset()},t}(O),Be=function(e){function t(){return e.apply(this,arguments)||this}return l()(t,e),t.prototype.run=function(e){if(this.getAvailable()&&this.ut.hasNextMediaDesc()&&(this.ut.stat.coreType===R.mse||this.ut.stat.coreType===R.native)&&(this.J.i("fallback-next-desc","run"),this.ut.nextMediaDesc()))return this.vt({type:g.FALLBACK,message:"use next media description.",fallback:Pe.NEXT_DESC})},t}(Ne),He={preferLowPowerToHighPerformance:!0,preserveDrawingBuffer:!0};function Ve(){return typeof HTMLCanvasElement>"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function Ge(){if(!Te){var e=Ve();je(e,Te={webGL:!1,performance:!1},!0)||je(e,Te,!1)}return Te}function je(e,t,i){void 0===i&&(i=!1);var n=!1,r=o()({failIfMajorPerformanceCaveat:i},He);try{var a=e.getContext("webgl",r);if(a){var s=a.getExtension("WEBGL_debug_renderer_info");t.webGL=!0,t.performance=i,null!=s&&s.UNMASKED_VENDOR_WEBGL&&(t.vendor=a.getParameter(null==s?void 0:s.UNMASKED_VENDOR_WEBGL)),null!=s&&s.UNMASKED_RENDERER_WEBGL&&(t.renderer=a.getParameter(null==s?void 0:s.UNMASKED_RENDERER_WEBGL)),n=!0;var u=a.getExtension("WEBGL_lose_context");u&&u.loseContext()}}catch(e){}return n}function We(){return typeof navigator>"u"?0:navigator.hardwareConcurrency||0}function Ke(){return"object"!=typeof window||"object"!=typeof document||"function"!=typeof document.createElement}function ze(){var e,t,i;if(!Ke())return(null==(e=window)?void 0:e.ManagedMediaSource)||(null==(t=window)?void 0:t.MediaSource)||(null==(i=window)?void 0:i.WebKitMediaSource)}function Je(){var e,t,i;if(!Ke())return(null==(e=window)?void 0:e.ManagedSourceBuffer)||(null==(t=window)?void 0:t.SourceBuffer)||(null==(i=window)?void 0:i.WebKitSourceBuffer)}var qe={av1:['video/mp4; codecs="av01.0.08M.08,mp4a.40.2"'],hevc:['video/mp4; codecs="hev1.1.6.L120.90,mp4a.40.2"','video/mp4; codecs="hvc1.1.6.L120.90,mp4a.40.2"'],h264:['video/mp4; codecs="avc1.4D4028,mp4a.40.2"'],opus:['video/mp4; codecs="opus"'],mp3:['video/mp4; codecs="mp3"'],aac:['video/mp4; codecs="mp4a.40.2"']},Ye={av1:['video/mp4; codecs="av01.0.08M.10"'],hevc:['video/mp4; codecs="hev1.2.2.L120.90"','video/mp4; codecs="hvc1.2.2.L120.90"'],h264:['video/mp4; codecs="avc1.6e0028"']},Qe={av1:['video/mp4; codecs="av01.0.12M.08"'],hevc:['video/mp4; codecs="hev1.1.6.L150.90"','video/mp4; codecs="hvc1.1.6.L150.90"'],h264:['video/mp4; codecs="avc1.4D4033"']},Ze={av1:['video/mp4; codecs="av01.0.12M.10"'],hevc:['video/mp4; codecs="hev1.2.2.L150.90"','video/mp4; codecs="hvc1.2.2.L150.90"'],h264:['video/mp4; codecs="avc1.6e0028"']},Xe={mp4:["video/mp4","video/quicktime"],flv:["video/x-flv"],ts:["video/mp2t"],matroska:["video/x-matroska","video/webm"],hls:["application/vnd.apple.mpegURL","application/x-mpegURL"],hls_ts:["application/vnd.apple.mpegURL","application/x-mpegURL"],hls_fmp4:["application/vnd.apple.mpegURL","application/x-mpegURL"],aac:["audio/aac"],mp3:["audio/mpeg","audio/mp3"]},$e=function(){function e(){}return e.isMSEAvailable=function(){if(void 0!==e.bt)return e.bt;if(!J.a)return e.bt=!1,!1;var t=ze(),i=Je();if(e.gt=!!(t&&i&&i.prototype&&"function"==typeof i.prototype.appendBuffer&&"function"==typeof i.prototype.remove),t&&j.mobile&&e.gt)try{var n=new t,r=document.createElement("video");r.src=URL.createObjectURL(n),URL.revokeObjectURL(r.src),e.bt=!0}catch(t){e.bt=!1}else e.bt=e.gt;return e.bt},e.isMSECodecCapabilityNormal=function(){return e.isMSEAvailable()&&e.TYPE_SUPPORTED.h264},e.isSupported=function(t){return void 0===t&&(t=d.h264),e.isMSECodecSupported(t)&&e.isMSEAvailable()},e.isMSECodecSupported=function(t,i,n){if(void 0===t&&(t=d.h264),void 0===i&&(i=h.FHD),void 0===n&&(n=!1),j.msedge&&"windows"===j.platform||j.msie)return e.isMSEAvailable()&&t===d.h264;if(!1===e.kt(t,i))return!1;var r=e._t(t,i,n);return!!r&&r.reduce((function(t,i){return t||e.isMSECodecStrSupported(i)}),!1)},e.isVideoCodecSupported=function(t,i,n){if(void 0===t&&(t=d.h264),void 0===i&&(i=h.FHD),void 0===n&&(n=!1),j.msedge&&"windows"===j.platform||j.msie)return t===d.h264;if(!1===e.kt(t,i))return!1;var r=e._t(t,i,n);if(!r)return!1;var o=e.Et();return r.reduce((function(e,t){return e||!(!o||!o.canPlayType(t))}),!0)},e.isVideoBoxSupported=function(t){if(void 0===t&&(t=m.mp4),t===m.unknown)return!0;var i=Xe[t];if(!i)return!1;var n=e.Et();return i.reduce((function(e,t){return e||!(!n||!n.canPlayType(t))}),!1)},e.isVideoCodecStrSupportedInMp4=function(t,i){void 0===i&&(i="");try{var n=e.Et();return!(!n||!n.canPlayType((i||"video")+'/mp4;codecs="'+t+'"'))}catch(e){}return!1},e.isWebRTCSupported=function(){return"RTCPeerConnection"in window&&"RTCRtpTransceiver"in window},e.isMSECodecStrSupportedInMp4=function(e,t){var i;return void 0===t&&(t=""),!(null==(i=ze())||!i.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"'))},e.isMSECodecStrSupported=function(e){var t=ze();return!(!t||"function"!=typeof t.isTypeSupported||!t.isTypeSupported(e))},e.isChangeTypeSupported=function(){if(void 0===e.Rt){var t=Je();e.Rt=!(!t||void 0===t.prototype.changeType)}return e.Rt},e.getVideoCodecCompatibilityByCodec=function(t,i,n){void 0===i&&(i=h.FHD),void 0===n&&(n=!1);var r=v.unsupported,o=!0;t===d.h264?r=i===h.UHD_4K?(n?e.TYPE_SUPPORTED.h264Hdr4k:e.TYPE_SUPPORTED.h2644k)?v.buildin:v.unsupported:(n?e.TYPE_SUPPORTED.h264Hdr:e.TYPE_SUPPORTED.h264)?v.buildin:v.unsupported:t===d.av1?(r=i===h.UHD_4K?(n?e.TYPE_SUPPORTED.av1Hdr4k:e.TYPE_SUPPORTED.av14k)?v.buildin:v.unsupported:(n?e.TYPE_SUPPORTED.av1Hdr:e.TYPE_SUPPORTED.av1)?v.buildin:v.unsupported,o=We()>=2):t===d.hevc?(r=i===h.UHD_4K?(n?e.TYPE_SUPPORTED.hevcHdr4k:e.TYPE_SUPPORTED.hevc4k)?v.buildin:v.unsupported:(n?e.TYPE_SUPPORTED.hevcHdr:e.TYPE_SUPPORTED.hevc)?v.buildin:v.unsupported)===v.buildin?(j.msedge&&"windows"===j.platform&&(r=v.unsupported),o=!!(We()>=2||j.safari)):o=e.wasmSmooth:t!==d.kvc3&&t!==d.kvc4&&t!==d.kvc5&&t!==d.kvc6&&t!==d.vvc&&t!==d.kvc30&&t!==d.bvc2||(r=typeof WebAssembly<"u"?v.wasm:v.unsupported,o=e.wasmSmooth);var a=!1;return r===v.buildin&&(a=e.isChangeTypeSupported(),t===d.hevc&&!1===e.kt(t,i)&&(r=v.wasm)),{decoder:r,smooth:r!==v.unsupported&&o,mix:a}},e.getPlayTestDefinition=function(e){if("number"==typeof e.width&&"number"==typeof e.height){if((null==e?void 0:e.width)>1920||(null==e?void 0:e.height)>1920)return h.UHD_4K}else if(-1!==e.qualityType.toLowerCase().indexOf("4k"))return h.UHD_4K;return h.FHD},e._t=function(e,t,i){void 0===t&&(t=h.FHD),void 0===i&&(i=!1),e===d.unknown&&(e=d.h264);var n=i?Ye:qe,r=i?Ze:Qe;return t===h.UHD_4K&&r[e]||n[e]},e.kt=function(t,i){if(void 0===i&&(i=h.FHD),t===d.hevc&&e.playHEVCTest&&(i===h.UHD_4K&&!1===e.playHEVCTest[i]||i!==h.UHD_4K&&!1===e.playHEVCTest[h.FHD]))return!1},e.Et=function(){return Se||Ke()||(Se=document.createElement("video")),Se},e.Dt=function(){try{return typeof WebAssembly<"u"&&typeof MessageChannel<"u"&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}},e.Tt=function(){return typeof WebAssembly<"u"&&WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))},s()(e,null,[{key:"isSupportSimd",get:function(){return void 0===e.St&&(e.St=e.Tt()),e.St}},{key:"isSupportThreads",get:function(){return void 0===e.Ot&&(e.Ot=e.Dt()),e.Ot}},{key:"wasmSmooth",get:function(){if(void 0===e.Ct){var t=We();e.Ct=!!(e.isSupportHW&&e.isSupportThreads&&t&&t>=6)}return e.Ct}},{key:"isSupportHW",get:function(){return!!Ge().performance}},{key:"playHEVCTest",get:function(){return this.Lt},set:function(e){this.Lt=e}}])}();Re=$e,$e.Rt=void 0,$e.bt=void 0,$e.gt=void 0,$e.St=void 0,$e.Ot=void 0,$e.Ct=void 0,$e.Lt=void 0,$e.TYPE_SUPPORTED={mpeg:Re.isMSECodecStrSupported("audio/mpeg"),mp3:Re.isMSECodecSupported(d.mp3),opus:Re.isMSECodecSupported(d.opus),aac:Re.isMSECodecSupported(d.aac),hevc:Re.isMSECodecSupported(d.hevc),hevc4k:Re.isMSECodecSupported(d.hevc,h.UHD_4K),hevcHdr:Re.isMSECodecSupported(d.hevc,h.FHD,!0),hevcHdr4k:Re.isMSECodecSupported(d.hevc,h.UHD_4K,!0),av1:Re.isMSECodecSupported(d.av1),av14k:Re.isMSECodecSupported(d.av1,h.UHD_4K),av1Hdr:Re.isMSECodecSupported(d.av1,h.FHD,!0),av1Hdr4k:Re.isMSECodecSupported(d.av1,h.UHD_4K,!0),h264:Re.isMSECodecSupported(d.h264),h2644k:Re.isMSECodecSupported(d.h264,h.UHD_4K),h264Hdr:Re.isMSECodecSupported(d.h264,h.FHD,!0),h264Hdr4k:Re.isMSECodecSupported(d.h264,h.UHD_4K,!0)};var et=$e,tt="fallback-swap-to-264",it=function(e){function t(){return e.apply(this,arguments)||this}return l()(t,e),t.prototype.run=function(e){var t;if(this.getAvailable()&&e.type===ee.MEDIA_ERROR&&(e.details===te.VIDEO_ERROR||e.details===te.VIDEO_ERROR_3||e.details===te.VIDEO_ERROR_4||e.details===te.VIDEO_NO_SIZE)&&this.ut.canCodecFallback&&this.ut.video instanceof HTMLVideoElement&&(this.ut.stat.coreType===R.mse||this.ut.stat.coreType===R.native&&(null==(t=this.ut.video)||!t.videoWidth))&&this.ut.stat.codecType!==d.h264&&this.ut.stat.decoder===v.buildin){var i="metadata video size: "+this.ut.video.videoWidth+". fallback 264";this.J.i(tt,"run"),this.ut.reProcessSrc(d.h264,this.ut.stat.native);var n=this.vt({type:g.FALLBACK,message:i,fallback:Pe.SWAP_264});return void 0===et.playHEVCTest&&(this.J.i(tt,"play hevc test start"),this.ut.hevcTest.start()),n}},t}(Ne),nt=i(6),rt="ios-compatible",ot=function(e){function t(t,i){var n;return(n=e.call(this)||this).ut=void 0,n.J=void 0,n.xt=void 0,n.Nt=!1,n.It=void 0,n.Ft=function(){var e=n.ut.video;n.It=setTimeout((function(){n.J.i(rt,"fix play stuck",null==e?void 0:e.currentTime),e&&n.xt((null==e?void 0:e.currentTime)+.001)}),1e3)},n.Bt=function(){n.It&&(clearTimeout(n.It),n.It=void 0)},n.ut=t,n.J=t.logger,n.xt=i,n.J.i(rt,"constructor"),n}l()(t,e);var i=t.prototype;return i.onLoad=function(){this.jt()},i.destroy=function(){this.J.i(rt,"destroy"),this.jt()},i.onVisibilityChange=function(e){this.J.i(rt,"onVisibilityChange",e.hidden),!e.hidden&&j.ios&&(this.J.i(rt,"ios hidden false. play stuck detector on."),this.Nt=!0)},i.onPlay=function(){this.Nt&&(this.J.i(rt,"on play. start detector timer."),this.Nt=!1,this.Ft())},i.onTimeupdate=function(){this.It&&this.jt()},i.getName=function(){return rt},i.jt=function(){this.J.i(rt,"reset"),this.Nt=!1,this.Bt()},t}(Oe),at=function(e){return e.METADATA="metadata",e.MEDIA_INFO="mediaInfo",e.HEARTBEAT="heartbeat",e.DOWNLOAD="download",e.REALTIME_BEACON="realtimeBeacon",e.DISCONTINUITY="discontinuity",e.KEY_FRAME="keyFrame",e.PRIV_NAL="privNal",e.SEI="sei",e.AAC_PRIV="aacPriv",e}({}),st=function(e){function t(){return e.apply(this,arguments)||this}return l()(t,e),t.prototype.run=function(e){if(this.getAvailable()&&(this.ut.stat.coreType===R.mse&&e.type===ee.NETWORK_ERROR&&e.details!==te.DEC_LIB_LOAD_ERROR&&e.details!==te.KEY_SYSTEM_LICENSE_REQUEST_FAILED&&!this.ut.stat.multipart||this.ut.stat.coreType===R.native&&e.details!==te.KEY_SYSTEM_UNSUPPORTED)){var t=this.ut.lctx.current;if(t&&t.urlId<t.url.length-1)return this.J.i("fallback-backup","run"),t.urlId++,this.vt({type:g.BACKUP,message:"trans error. use backup url.",fallback:Pe.USE_BACKUP})}},t}(Ne),ut=function(){function e(){var e=this;this.Ut=void 0,this.B=void 0,this.Pt=void 0,this.it=function(){e.Vt()},this.Ht=function(){e.B&&e.B.readyState>=2&&e.Vt()},this.Vt=function(){e.B&&e.Pt&&e.Pt(e.B.status),e.stop()}}var t=e.prototype;return t.start=function(e,t){this.Pt=t,this.B&&this.stop();var i=this.B=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=this.Ht,i.onerror=this.it,i.onload=this.it,i.send(),this.Ut=setTimeout(this.Vt,1e3)},t.stop=function(){this.Ut&&(clearTimeout(this.Ut),this.Ut=void 0),this.B&&(this.B.onreadystatechange=null,this.B.onload=null,this.B.onerror=null,this.B.abort(),this.B=void 0),this.Pt=void 0},e}(),lt={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function ct(e){var t={};return(e||"").split(/[ ,]+/).forEach((function(e){0!==e.indexOf("avc1")&&0!==e.indexOf("hev1")&&0!==e.indexOf("av01")&&0!==e.indexOf("kvc")||(t.video=e),0===e.indexOf("mp4a")&&(t.audio=e)})),t}function dt(e){return 0===e.indexOf("avc1")?d.h264:0===e.indexOf("hev1")||0===e.indexOf("hvc1")?d.hevc:0===e.indexOf("av01")?d.av1:d.unknown}var ht=1e3;function ft(e,t,i){return void 0===i?{width:e,height:t}:i.width>i.height?{width:Math.round(i.width/i.height*e),height:t}:i.width<i.height?{width:e,height:Math.round(t*i.height/i.width)}:{width:e,height:t}}var pt=function(e){function t(t){var i;return(i=e.call(this)||this).J=void 0,i.Wt=void 0,i.Gt=void 0,i.J=t,i}l()(t,e);var i=t.prototype;return i.copyImageData=function(e,t,i,n){var r;this.Wt||(this.Wt=Ve());var o={willReadFrequently:!0};n&&(o.colorSpace=n),this.Gt||(this.Gt=this.Wt.getContext("2d",o));var a,s,u=0,l=0,c=typeof window<"u"&&e instanceof HTMLVideoElement;if(c)u=e.videoWidth,l=e.videoHeight;else if(90===i||270===i){var d=ft(e.height,e.width,t);u=d.height,l=d.width}else{var h=ft(e.width,e.height,t);u=h.width,l=h.height}return this.Wt.width=u,this.Wt.height=l,c?null==(a=this.Gt)||a.drawImage(e,0,0):null==(s=this.Gt)||s.drawImage(e,0,0,e.width,e.height,0,0,this.Wt.width,this.Wt.height),null==(r=this.Gt)?void 0:r.getImageData(0,0,u,l,o)},i.destroy=function(){this.J.i("image-data-copier","destrpy"),this.Wt=void 0,this.Gt=void 0},t}(O),At=function(e){return e[e.NONE=0]="NONE",e[e.WAITING=1]="WAITING",e[e.SEEK=2]="SEEK",e[e.SELECT_BITRATE=3]="SELECT_BITRATE",e[e.INIT=4]="INIT",e[e.LOADING=5]="LOADING",e}({}),vt="kernel-base",_t="kernel-native",mt=function(e){function t(t){var i;return(i=e.call(this,t)||this).Qt=void 0,i.Yt=!1,i.F.push(i.ut.fallback.register(Pe.USE_BACKUP,new st(t).setRetryFunc(i.Jt.bind(i)))),i}l()(t,e);var i=t.prototype;return i.Jt=function(e){this.Zt(L.retry)},i.load=function(e){var t;this.J.i(_t,"load",this.ut.stat.startFromSec);var i=this.ut.lctx.levels;if(i.length||this.emit(ke.ERROR,ne(ee.OTHER_ERROR,te.MANIFEST_PARSING_ERROR,"manifest parse error. core: native")),this.ut.stat.drm)this.emit(ke.ERROR,ne(ee.KEY_SYSTEM_ERROR,te.KEY_SYSTEM_UNSUPPORTED,"DRM unsupported."));else{var n=this.ut.lctx.default,r=this.ut.lctx.startIdx;"number"==typeof r&&r>=0&&r<i.length&&(n=r,this.J.i(_t,"set level from level startIdx.")),this.J.i(_t,"level: "+n+" "+(null==(t=i[n])?void 0:t.qualityType)),this.ut.lctx.currentIdx=this.ut.lctx.nextIdx=n,this.ut.lctx.abr=!1,this.emit(ke.MANIFEST_PARSED,{levels:[],currentLevel:0}),this.Zt(e)}},i.onAbrLevelsUpdated=function(){},i.refresh=function(){var e,t=this;this.ut.stat.startFromSec=this.zt.currentTime,this.Zt(L.retry),null==(e=this.zt.play())||e.catch((function(e){return t.J.i(_t,"refresh. call play() fail.",e)}))},i.stopLoad=function(){this.emit(ke.STOP_LOAD),this.Kt()},i.setCurrentLevel=function(e){var t=this;this.J.i(_t,"set current level: "+e+" @ "+this.zt.currentTime);var i=this.ut;if(i.lctx.levels.length){if(e>=0&&e<i.lctx.levels.length&&i.lctx.currentIdx!==e){i.lctx.currentIdx=i.lctx.nextIdx=e;var n,r=i.lctx.current;if(r)return this.qt=At.SELECT_BITRATE,i.stat.startFromSec=this.zt.currentTime,this.Xt++,this.emit(ke.LEVEL_SWITCHING,{time:i.currentTime,bitrate:r.bitrate,level:e,smooth:!1,auto:!1,id:this.Xt}),this.$t(i.lctx.currentIdx),!this.zt.paused&&(null==(n=this.zt.play())||n.catch((function(e){return t.J.i(_t,"set current level, call play() fail.",e)}))),void this.emit(ke.LEVEL_SWITCHED,{time:i.currentTime,bitrate:r.bitrate,level:e,smooth:!1,auto:!1,id:this.Xt})}this.emit(ke.LEVEL_SWITCH_FAILED)}else i.lctx.currentIdx=i.lctx.nextIdx=e},i.setNextLevel=function(e){this.setCurrentLevel(e)},i.liveEnd=function(){},i.destroy=function(){this.J.i(_t,"destroy"),this.Qt&&(this.Qt.stop(),this.Qt=void 0),e.prototype.destroy.call(this),this.zt.src=""},i.ti=function(){this.ii||this.zt.src||this.load(),e.prototype.ti.call(this)},i.ei=function(){var t=this.ut,i=t.lctx.current;i&&this.qt===At.SELECT_BITRATE&&this.emit(ke.LEVEL_SWITCH_PLAYING,{time:t.currentTime,bitrate:i.bitrate,level:t.lctx.currentIdx,smooth:!1,auto:!1,id:this.Xt}),this.qt!==At.NONE&&(this.qt=At.NONE),e.prototype.ei.call(this)},i.ni=function(){var t=this.ut;e.prototype.ni.call(this),this.Yt&&(this.J.i(_t,"timeupdate start from: "+t.stat.startFromSec),this.ri(),this.Yt=!1)},i.Ai=function(){this.J.i(_t,"video waiting"),this.qt=this.qt||At.WAITING;var e=this.ut.bufferedSec,t=!this.zt.ended&&!this.zt.seeking&&this.qt===At.WAITING;this.emit(ke.WAITING,{block:t,bufferedSec:e})},i.oi=function(){var t;(j.android||void 0===this.ut.stat.isLive||0===(null==(t=this.si)?void 0:t.width))&&this.si&&this.zt.duration>0&&(this.si.isLive=this.ut.stat.isLive=!isFinite(this.zt.duration),this.zt instanceof HTMLVideoElement&&(this.si.width=this.zt.videoWidth,this.si.height=this.zt.videoHeight),this.emit(ke.MEDIA_INFO,this.si)),this.ui()&&this.zt.duration>0&&(this.J.i(_t,"check video dec failed. on android wechat hls duration change."),this.ai()),e.prototype.oi.call(this)},i.hi=function(){if(this.J.i(_t,"video loadeddata. duration: "+this.zt.duration+" box: "+this.ut.stat.box),!(!this.ui()&&this.zt instanceof HTMLVideoElement&&(this.J.i(_t,"check video dec failed. on video loaded data."),this.ai()))){void 0===this.ut.stat.isLive&&this.zt.duration>0&&(this.ut.stat.isLive=!isFinite(this.zt.duration)),this.si={videoDecoder:v.buildin},this.zt instanceof HTMLVideoElement&&(this.J.i(_t,"video loadeddata. width: "+this.zt.videoWidth+" height: "+this.zt.videoHeight),this.si.width=this.zt.videoWidth,this.si.height=this.zt.videoHeight);var e=this.ut,t=e.lctx.current;if(t&&t.codec){var i=ct(t.codec);this.si.audioCodec=i.audio,this.si.videoCodec=i.video,i.video&&(e.stat.codecType=dt(i.video))}this.si.videoCodecType=e.stat.codecType,j.android?e.stat.startFromSec&&(this.Yt=!0):this.ri(),this.emit(ke.MEDIA_INFO,this.si)}},i.ci=function(){this.J.i(_t,"seeking "+this.zt.currentTime);var e=this.zt.currentTime;this.fi?this.fi=!1:(this.emit(ke.SEEKING),this.ut.isTimeinBuffered(e)||this.emit(ke.SEEK_WITH_LOAD))},i.di=function(e){var t,i=this;this.J.i(_t,"video error",e);var n=(null==(t=this.zt.error)?void 0:t.code)||0,r=de(ie[n]||te.VIDEO_ERROR,"video error");if(4===n&&this.ut.canCodecFallback)this.emit(ke.ERROR,ne(ee.MEDIA_ERROR,r,"buildin "+this.ut.stat.codecType+" dec error. video error: "+n));else{var o="video error";this.zt&&this.zt.error&&(o+=" code:"+n+" message:"+this.zt.error.message);var a=ne(ee.MEDIA_ERROR,(n?ie[n]:te.VIDEO_ERROR)||te.VIDEO_ERROR,o,{url:this.zt.src});2===n||4===n?(this.Qt||(this.Qt=new ut),this.J.i(_t,"video error start detect status code."),this.Qt.start(this.zt.src,(function(e){i.J.i(_t,"video error check http status code:",e),(2===n||4===n&&e>0)&&(e<200||e>299)?i.emit(ke.ERROR,ne(ee.NETWORK_ERROR,te.LOAD_ERROR,o,{statusCode:e,url:i.zt.src})):(0===e&&(a.statusCode=0),i.emit(ke.ERROR,a))}))):this.emit(ke.ERROR,a)}},i.Zt=function(t){this.J.i(_t,"_load type: "+t),this.si=void 0,this.ii=void 0,this.ut.isLiveShift?this.emit(ke.ERROR,ne(ee.OTHER_ERROR,te.UNSUPPORTED,"unsupported. core: "+this.type+" liveShift: "+this.ut.stat.liveShiftType)):(this.qt=At.LOADING,e.prototype.Zt.call(this,t),this.emit(ke.LOAD,{type:t}),this.$t(this.ut.lctx.currentIdx),this.li())},i.$t=function(e){var t=this.ut,i=t.lctx.current;if(i){var n;this.J.i(_t,"level",e);var r,o=i.currentUrl;this.emit(ke.NEW_SOURCE,{sync:t.stat.startFromSec||0}),null!=(n=this.ut.config.preprocessUrl)&&n.stream&&(this.J.d(_t,"preprocessUrl stream"),o=null==(r=this.ut.config.preprocessUrl)?void 0:r.stream(o)),this.J.i(_t,"play: "+o),this.zt.src=o}},i.ri=function(){var e=this.ut;e.stat.startFromSec>0&&(this.J.i(_t,"start from: "+e.stat.startFromSec),this.zt.currentTime=e.stat.startFromSec,e.stat.startFromSec=0)},i.ai=function(){return this.J.i(_t,"check video dec failed."),!!(this.zt instanceof HTMLVideoElement&&!this.zt.videoWidth&&this.ut.canCodecFallback)&&(this.emit(ke.ERROR,ne(ee.MEDIA_ERROR,te.VIDEO_NO_SIZE,"buildin "+this.ut.stat.codecType+" dec no width.")),!0)},i.ui=function(){return j.android&&(j.xweb||j.x5)&&V(this.ut.stat.box)},s()(t,[{key:"type",get:function(){return R.native}}])}(function(e){function t(t){var i;if((i=e.call(this)||this).ut=void 0,i.J=void 0,i.zt=void 0,i.ii=void 0,i.pi=void 0,i.qt=At.INIT,i.si=void 0,i.Xt=0,i.mi=[],i.yi=void 0,i.Mi=void 0,i.fi=!1,i.wi=void 0,!t.video)throw new Error("video is null");return i.ut=t,i.J=t.logger,i.zt=t.video,i.Mi={loadedmetadata:i.bi.bind(i),loadeddata:i.hi.bind(i),canplay:i.ei.bind(i),seeking:i.ci.bind(i),seeked:i.gi.bind(i),waiting:i.Ai.bind(i),playing:i.ki.bind(i),pause:i._i.bind(i),play:i.ti.bind(i),error:i.di.bind(i),ended:i.Ei.bind(i),ratechange:i.Ri.bind(i),durationchange:i.oi.bind(i),timeupdate:i.ni.bind(i),progress:i.Di.bind(i),emptied:i.Ti.bind(i),resize:i.Si.bind(i)},i.Oi(),i}l()(t,e);var i=t.prototype;return i.destroy=function(){this.J.i(vt,"destroy"),this.fi=!1,this.Kt(),this.Ci(),e.prototype.destroy.call(this)},i.getTrackBufInfo=function(){},i.load=function(){this.zt.load()},i.resume=function(){var e,t=this;this.zt.paused&&(null==(e=this.zt.play())||e.catch((function(e){return t.J.i(vt,"resume, call play() fail.",e)})))},i.refresh=function(){},i.stopLoad=function(){},i.Li=function(){var e=this.si&&this.si.fps?this.si.fps:30;return this.zt.duration&&!this.zt.ended?this.zt.currentTime+1/e:-1},i.xi=function(){var e=this.si&&this.si.fps?this.si.fps:30;return this.zt.duration&&this.zt.currentTime-1/e>=0?this.zt.currentTime-1/e:-1},i.Oi=function(){if(this.zt)for(var e in this.Mi)this.zt.addEventListener(e,this.Mi[e])},i.Ci=function(){if(this.zt)for(var e in this.Mi)this.zt.removeEventListener(e,this.Mi[e])},i.bi=function(){this.J.i(vt,"loadedmetadata"),this.emit(ke.LOADEDMETADATA)},i.hi=function(){this.J.i(vt,"loadeddata"),this.emit(ke.LOADEDDATA)},i.ei=function(){this.J.i(vt,"canplay "+!!this.qt),this.emit(ke.CANPLAY)},i.ci=function(){this.J.i(vt,"seeking "+this.zt.currentTime),this.emit(ke.SEEKING)},i.gi=function(){this.J.i(vt,"seeked"),this.emit(ke.SEEKED)},i.Ai=function(){this.J.i(vt,"video waiting")},i.ki=function(){this.J.i(vt,"playing"),this.ii||(this.qt=At.NONE,this.li(),this.emit(ke.PLAYING))},i._i=function(){this.J.i(vt,"pause. seeking: "+this.zt.seeking),this.zt.ended||this.emit(ke.PAUSE)},i.ti=function(){this.J.i(vt,"play",this.ii),this.emit(ke.PLAY),j.safari&&this.zt.currentTime>=this.zt.duration&&this.zt.loop&&(this.J.i(vt,"safari loop fix. seek 0. loop: "+this.zt.loop+" "+this.zt.currentTime+"/"+this.zt.duration+"."),this.zt.currentTime=0)},i.di=function(e){this.J.i(vt,"error",e)},i.Ei=function(){this.J.i(vt,"ended"),this.fi=!1,this.emit(ke.ENDED),this.Kt()},i.Ri=function(){this.J.i(vt,"ratechange "+this.zt.playbackRate),this.emit(ke.RATE_CHANGE)},i.oi=function(){this.J.i(vt,"durationchange "+this.zt.duration),this.emit(ke.DURATION_CHANGE)},i.ni=function(){this.emit(ke.TIMEUPDATE)},i.Di=function(){this.emit(ke.PROGRESS)},i.Ti=function(){this.J.i(vt,"video emptied")},i.Si=function(){this.J.i(vt,"video resize")},i.Ni=function(){this.emit(ke.HEARTBEAT)},i.li=function(){this.pi||(this.pi=setInterval(this.Ni.bind(this),1e3))},i.Kt=function(){this.pi&&(clearInterval(this.pi),this.pi=void 0)},i.Zt=function(e){this.fi=!1},i.emit=function(e,t){if(e===ke.ERROR){var i=t;i.fatal&&(this.ii=i),this.J.i(vt,"error",i)}return this.ut.evt.emit(e,t)},i.internalSeek=function(e){this.fi=!0;try{this.zt.currentTime=e}catch(e){this.J.i(vt,"internal seek err.",e)}},i.screenshot=function(e){var t=1e3*this.zt.currentTime;if(this.zt instanceof HTMLVideoElement&&this.zt.videoWidth){this.wi||(this.wi=new pt(this.J),this.F.push(this.wi));var i=this.wi.copyImageData(this.zt,void 0,0,null==e?void 0:e.colorSpace);i&&this.emit(ke.SCREENSHOT,{pts:t,id:null==e?void 0:e.id,image:i})}else this.emit(ke.SCREENSHOT,{pts:t,id:null==e?void 0:e.id,errorCode:te.SCREENSHOT_CREATE_IMG_ERROR,errorMessage:"no video"})},s()(t,[{key:"type",get:function(){return R.unknown}}])}(O)),gt=function(){function e(){this.timeout=6048e5}var t=e.prototype;return t.write=function(t,i){if(e.available)try{return localStorage.setItem(t,JSON.stringify({value:i,time:Date.now()})),!0}catch(e){}return!1},t.read=function(t,i){if(void 0===i&&(i=!0),e.available)try{var n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=r.value,a=r.time,s=void 0===a?0:a;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return o}}catch(e){}},s()(e,null,[{key:"available",get:function(){if(void 0===e.A)try{localStorage.setItem("alg","test"),e.A=!0}catch(t){e.A=!1}return e.A}}])}();gt.A=void 0;var yt=gt,bt="kwai-kernel-id",Et=function(){function e(){}return e.next=function(){if(yt.available){var t=e.Ii.read(bt,!1),i=e._;return"number"==typeof t?(i=this.getNextId(t),this.Ii.write(bt,i)):(i=this.getNextId(i),this.Ii.write(bt,i)),e._=i,i}return e._=e.getNextId(e._),e._},e.getNextId=function(t){return++t>e.MAX_ID?0:t},s()(e,null,[{key:"MAX_ID",get:function(){return 999}}])}();Et._=0,Et.Ii=new yt;var wt="sei-time",Tt=function(e){function t(t){var i;return(i=e.call(this)||this).ut=void 0,i.Fi=0,i.J=void 0,i.Bi={idx:0,data:[],name:"sei"},i.ji={idx:0,data:[],name:"aacPriv"},i.Ui={idx:0,data:[],name:"privNal"},i.Pi=function(e){e.segments.forEach((function(e){e.type===T.VIDEO?(e.sei&&i.Vi(e.sei,i.Bi),e.privNal&&i.Vi(e.privNal,i.Ui)):e.type===T.AUDIO&&e.aacPriv&&i.Vi(e.aacPriv,i.ji)})),i.Hi()},i.Wi=function(e){e.sei&&i.Vi(e.sei,i.Bi),i.Hi()},i.Gi=function(){var e;if(null==(e=i.ut.video)||!e.seeking){var t=1e3*i.ut.currentTime,n=i.Qi(t,i.Bi);null==n||n.forEach((function(e){i.ut.evt.emit(ke.SEI,e)}));var r=i.Qi(t,i.ji);null==r||r.forEach((function(e){i.ut.evt.emit(ke.AAC_PRIV,e)}));var o=i.Qi(t,i.Ui);null==o||o.forEach((function(e){i.ut.evt.emit(ke.PRIV_NAL,e)}))}},i.Qi=function(e,t){if(t.data.length&&t.idx<t.data.length){for(var i=[],n=0,r=t.idx;r<t.data.length;r++){var o;if(!(e>=((null==(o=t.data[r])?void 0:o.time)||0)))break;i.push(t.data[r]),n=r}if(i.length)return t.idx=n+1,i}},i.Yi=function(){i.J.i(wt,"seek with load. remove all sei"),i.Bi.data.splice(0),i.Bi.idx=0,i.ji.data.splice(0),i.ji.idx=0,i.Ui.data.splice(0),i.Ui.idx=0,i.Fi=0},i.Ji=function(){var e=1e3*i.ut.currentTime;i.Zi(e,i.Bi),i.Zi(e,i.ji),i.Zi(e,i.Ui)},i.Zi=function(e,t){for(var i=0;i<t.data.length;i++)if(t.data[i].time>=e){t.idx=i;break}},i.Vi=function(e,t){e.forEach((function(e){e&&"number"==typeof e.streamTimestamp&&(e.time=i.ut.streamTime.getLocalTime(e.streamTimestamp/1e3),"number"==typeof e.time&&(e.time=Math.round(1e3*e.time),t.data.push(e)))})),t.data.sort((function(e,t){return e.time-t.time}))},i.Hi=function(){var e=i.ut.video;if(i.Fi>20&&e&&e.buffered.length){var t=1e3*e.buffered.start(0);i.zi(t,i.Bi),i.zi(t,i.ji),i.zi(t,i.Ui),i.Fi=0}i.Fi++},i.zi=function(e,t){if(t.data.length&&e>t.data[0].time)for(var n=0;n<Math.min(t.idx,t.data.length);n++)if(t.data[n].time>=e){t.data.splice(0,n),t.idx=Math.max(0,t.idx-n),i.J.i(wt,"remove "+n+" "+t.name+" info @"+e+". remain "+t.data.length);break}},i.ut=t,i.J=t.logger,i.F.push(i.ut.evt.on(ke.PARSING_DATA,i.Pi),i.ut.evt.on(ke.RAW_DATA,i.Wi),i.ut.evt.on(ke.TIMEUPDATE,i.Gi),i.ut.evt.on(ke.SEEK_WITH_LOAD,i.Yi),i.ut.evt.on(ke.SEEKING,i.Ji)),i}return l()(t,e),s()(t,[{key:"seiLength",get:function(){return this.Bi.data.length}},{key:"seiIdx",get:function(){return this.Bi.idx}},{key:"aacPrivLength",get:function(){return this.ji.data.length}},{key:"aacPrivIdx",get:function(){return this.ji.idx}},{key:"privNalLength",get:function(){return this.Ui.data.length}},{key:"privNalIdx",get:function(){return this.Ui.idx}}])}(O),Rt=function(e,t){for(var i=0,n=e.length-1,r=null,o=null;i<=n;){var a=t(o=e[r=(i+n)/2|0]);if(a>0)i=r+1;else{if(!(a<0))return o;n=r-1}}return null},St="stream-time",Lt=function(e){function t(t){var i;return(i=e.call(this)||this).J=void 0,i.ut=void 0,i.Ki=[],i.qi=void 0,i.Xi=function(e){e.expired||e.segments.forEach((function(t){var n;t.type===T.VIDEO&&t.keyTime&&(t.keyTime.forEach((function(e){e.key&&i.ut.evt.emit(ke.KEY_FRAME,{pts:e.pts,cts:e.cts})})),(n=i.Ki).push.apply(n,t.keyTime.map((function(t){return o()({frag:e.frag},t)}))),i.Ki.sort((function(e,t){return e.pts-t.pts}))),t.type===T.AUDIO&&t.originFirstDTS&&(i.qi=t.originFirstDTS-t.startDTS)}))},i.Wi=function(e){var t;e.keyTime&&!e.expired&&(t=i.Ki).push.apply(t,e.keyTime.map((function(t){return o()({frag:e.frag},t)})))},i.Yi=function(){var e,t,n,r=(null==(e=i.ut.video)?void 0:e.currentTime)||0,o=i.ut.lctx.current,a=0;if(i.J.i(St,"on seek with load. current time: "+i.ut.currentTime),i.ut.stat.multipart&&Object.prototype.hasOwnProperty.call(o,"fragments")){var s=(t=r,(n=o.fragments)?Rt(n,(function(e){return t<e.start?-1:t>e.start+e.duration?1:0})):null);if(!s)return i.J.i(St,"no frag. clear video key time."),void i.Ki.splice(0,i.Ki.length);for(var u=i.Ki.length-1;u>=0;u--){var l;if((null==(l=i.Ki[u].frag)?void 0:l.sn)===s.sn||i.Ki[u].originPTS<r){a=u;break}}}i.J.i(St,"clear video key time. st: "+a),i.Ki.splice(a,i.Ki.length-a)},t.logger.i(St,"constructor"),i.ut=t,i.J=t.logger,i.F.push(i.ut.evt.on(ke.PARSING_DATA,i.Xi),i.ut.evt.on(ke.RAW_DATA,i.Wi),i.ut.evt.on(ke.SEEK_WITH_LOAD,i.Yi)),i}l()(t,e);var i=t.prototype;return i.reset=function(){this.J.i(St,"reset"),this.qi=void 0,this.Ki=[]},i.getLocalTime=function(e){if(!(e<0)){if(this.Ki.length){var t=this.$i(e,this.Ki);if(t)return e-t.originPTS+t.pts}return"number"==typeof this.qi?e-this.qi:void 0}},i.getStreamTime=function(e){if(!(e<0)){if(this.Ki.length){var t,i=this.te(e,this.Ki);if(i)return this.J.i(St,"get stream time by video. local: "+e+" pts: "+i.info.pts+" originPTS: "+i.info.originPTS+" sn: "+(null==(t=i.info.frag)?void 0:t.sn)+" key: "+this.Ki.length),e-i.info.pts+i.info.originPTS}return this.J.i(St,"get local time by audio. local: "+e+" offset: "+this.qi),"number"==typeof this.qi?e+this.qi:void 0}},i.getKeyFrameTime=function(e,t){if(void 0===t&&(t=0),this.Ki.length){var i=this.te(e,this.Ki);return i?this.Ki[i.idx+t]:void 0}},i.te=function(e,t){if(t)for(var i=t.length-1;i>=0;i--)if(t[i].pts<=e)return{info:t[i],idx:i}},i.$i=function(e,t){if(t)for(var i=t.length-1;i>=0;i--)if(t[i].originPTS<=e)return t[i]},s()(t,[{key:"localTimeOffset",get:function(){return this.qi},set:function(e){this.qi=e}}])}(O);function kt(e,t,i,n,r){void 0===i&&(i=3),t=Math.round(t),!n||n.startDelay===t||t<=0||(n.startDelay="number"==typeof r?r:t,n.rule=[{rate:1.5,lower:t+2*i+1,upper:Number.MAX_SAFE_INTEGER},{rate:1.25,lower:t+i+1,upper:t+2*i},{rate:1.1,lower:t+1,upper:t+i},{rate:1,lower:0,upper:t}],e.i("playback-rate","update auto playbackRate delay: "+t+", step: "+i+" startDelay: "+r,JSON.stringify(n)))}var It=function(e){return e.SERIES_12="15_pro_max/15_plus/14_pro_max",e.SERIES_11="15_pro/15/14_pro",e.SERIES_10="14_plus/13_pro_max/12_pro_max",e.SERIES_9="14/13/13_pro/12/12_pro",e.SERIES_8="se_3/se_2/8/7/6s/6",e.SERIES_7="13_mini/12/11_pro/xs/x",e.SERIES_6="11_pro_max/xs_max",e.SERIES_5="11/xr",e.SERIES_4="8_plus/7_plus/6s_plus/6_plus",e.SERIES_3="se/5c/5s/5",e.SERIES_2="4s/4",e.SERIES_1="3gs/3g/1",e}({}),xt={"430_932_3":It.SERIES_12,"393_852_3":It.SERIES_11,"428_926_3":It.SERIES_10,"390_844_3":It.SERIES_9,"375_667_2":It.SERIES_8,"375_812_3":It.SERIES_7,"414_896_3":It.SERIES_6,"414_896_2":It.SERIES_5,"414_736_3":It.SERIES_4,"320_568_2":It.SERIES_3,"320_480_2":It.SERIES_2,"320_480_1":It.SERIES_1};function Ot(){if(j.iphone&&typeof window<"u"&&window.screen){var e=window.screen.width+"_"+window.screen.height+"_"+window.devicePixelRatio;return xt[e]||"unknown"}return"unknown"}var Ct,Dt=function(){function e(){this.I=[]}var t=e.prototype;return t.append=function(e){this.I.push(e)},t.clear=function(){this.I=[]},t.getLastMseError=function(){for(var e=this.I.length-1;e>=0;e--){var t=this.I[e];if(t&&t.core===R.mse){var i=t.errorData;return i&&(i.code=de(i.details,i.reason,i.statusCode)),i}}},t.ie=function(e){return e.map((function(e){var t={message:e.message,pos:e.pos,ts:e.ts};return void 0!==e.code&&(t.code=e.code),void 0!==e.core&&(t.core=e.core),void 0!==e.count&&(t.count=e.count),void 0!==e.fallback&&(t.fallback=e.fallback),t}))},s()(e,[{key:"hasData",get:function(){return!!this.I.length}},{key:"retryCount",get:function(){return this.I.reduce((function(e,t){return("number"==typeof t.count&&t.count>0?t.count:1)+e}),0)}},{key:"mergedBeacon",get:function(){var e=[];return this.I.forEach((function(t){var i;if(e.length&&t.type===g.LOADER&&(null==(i=e[e.length-1])?void 0:i.type)===g.LOADER){var n=e[e.length-1].count;e[e.length-1].count=n?n+1:2}else e.push(o()({},t))})),this.ie(e.slice(-10))}},{key:"beacon",get:function(){return this.ie(this.I.slice(-10))}}])}(),Mt=function(){function e(){this.coreType=R.unknown,this.native=!1,this.codecType=d.unknown,this.gopRemux=!1,this.audioCodec="",this.recoverSwapRemux=!1,this.recoverSwapAudioCodec=!1,this.box=void 0,this.isLive=void 0,this.autoLazyLoad=!0,this.lazyLoadRecoverDuration=12.8,this.lazyLoadMaxDuration=16,this.firstFrameLoaded=!1,this.startFromSec=-1,this.webWorker=!0,this.muxWorker=void 0,this.isNetworkInUse=!1,this.srcType=_.OTHERS,this.videoPlaybackQuality=void 0,this.drm=void 0,this.mixContainerInput=void 0,this.mixCodecInput=void 0,this.mixCodecAvailable=void 0,this.srcMeta=void 0,this.multipart=void 0,this.demuxerType=void 0,this.retryInfo=new Dt,this.mainThreadRendering=void 0,this.stereoType=void 0,this.decoder=v.buildin,this.wasmDecoder=void 0,this.wasmSimd=void 0,this.wasmThreads=void 0,this.wasmThreadsEnabled=void 0,this.wasmLibHitCache=void 0,this.isKwaiSlice=void 0,this.autoPlaybackRateConf=void 0,this.preferNativeLoader=void 0,this.avSeparated=!1,this.mms=!1,this.hevcFallbackWasm=!1,this.frameBufLen=0,this.flvAbrNotAligned=!1,this.seekingId=1,this.liveShiftKwai2Params={paramName:"offset",time:0},this.liveStartTime=0,this.liveShiftOffset=void 0,this.liveShiftOffsetAligned=void 0,this.ee=!1,this.ne=k.NONE}return e.prototype.reset=function(){this.coreType=R.unknown,this.codecType=d.unknown,this.audioCodec="",this.recoverSwapRemux=!1,this.recoverSwapAudioCodec=!1,this.box=m.unknown,this.autoLazyLoad=!0,this.firstFrameLoaded=!1,this.isNetworkInUse=!1,this.srcType=_.OTHERS,this.retryInfo.clear(),this.decoder=v.buildin,this.lazyLoadMaxDuration=16,this.lazyLoadRecoverDuration=.8*this.lazyLoadMaxDuration,this.isKwaiSlice=!1,this.avSeparated=!1,this.mms=!1,this.hevcFallbackWasm=!1,this.frameBufLen=0,this.flvAbrNotAligned=!1,this.seekingId=1,this.liveShiftKwai2Params={paramName:"offset",time:0},this.liveStartTime=0,this.liveShiftOffset=void 0,this.ee=!1,this.ne=k.NONE,this.drm=this.videoPlaybackQuality=this.mixContainerInput=this.mixCodecInput=this.mixCodecAvailable=this.multipart=this.stereoType=this.mainThreadRendering=this.wasmDecoder=this.wasmSimd=this.wasmThreads=this.wasmLibHitCache=void 0},s()(e,[{key:"liveShiftActive",get:function(){return this.liveShiftType!==k.NONE&&this.ee},set:function(e){this.ee=e}},{key:"liveShiftType",get:function(){return this.isLive&&(this.ne!==k.KWAI&&this.ne!==k.KWAI2||!j.mobile)&&V(this.box)?this.ne:k.NONE},set:function(e){this.ne=e}}])}(),Nt=function(){function e(){this.re=0,this.Ae=0,this.se=0,this.ue=0,this.ae=0}var t=e.prototype;return t.reset=function(){this.se=performance.now(),this.re=this.Ae=this.ue=this.ae=0},t.getFPS=function(e){if(e){var t,i=performance.now(),n=e.totalVideoFrames,r=e.droppedVideoFrames;if(n){n<this.Ae&&(this.Ae=0,this.re=0);var o=i-this.se,a=r-this.re,s=n-this.Ae,u=0,l=0;this.se&&(u=parseFloat((1e3*a/o).toFixed(2)),l=parseFloat((1e3*s/o).toFixed(2))),this.ue=this.ue+=s,this.ae=this.ae+=a,this.se=i,this.re=r,this.Ae=n,t={decoded:this.ue,dropped:this.ae,decodedFPS:l,droppedFPS:u}}return this.se=i,t}},e}(),Pt=function(){function e(){this._$evt=new c.EventEmitter}var t=e.prototype;return t.on=function(e,t){var i=this;return this._$evt.on(e,t),{destroy:function(){return i._$evt.off(e,t)}}},t.prependListener=function(e,t){var i=this;return this._$evt.prependListener(e,t),{destroy:function(){return i._$evt.off(e,t)}}},t.removeAllListeners=function(e){this._$evt.removeAllListeners(e)},t.off=function(e,t){this._$evt.off(e,t)},t.listeners=function(e){return this._$evt.listeners(e)},t.emit=function(e,t){return this._$evt.emit(e,t)},t.listenerCount=function(e){return this._$evt.listenerCount(e)},e}(),Ut="level-ctx",Ft=function(){function e(e,t){this.J=void 0,this.he=void 0,this.ce=void 0,this.fe=!1,this.ve=-1,this.de=0,this.le=0,this.pe=[],this.me=0,this.ye=[],this.Me=0,this.we=[],this.be=[],this.ge=void 0,this.ke=void 0,e.i(Ut,"constructor abr:"+t),this.J=e,this.fe=t}var t=e.prototype;return t.getLevel=function(e){return void 0===e&&(e=w.MAIN),e===w.MAIN?this.pe[this.de]:e===w.AUDIO?this.ye[this.me]:e===w.SUBTITLE?this.we[this.Me]:void 0},t.setLevelIdx=function(e,t){void 0===t&&(t=w.MAIN),t===w.MAIN?this.currentIdx=e:t===w.AUDIO?this.audioIdx=e:t===w.SUBTITLE&&(this.subtitleIdx=e)},t.getLevelIdx=function(e){return void 0===e&&(e=w.MAIN),e===w.MAIN?this.de:e===w.AUDIO?this.me:e===w.SUBTITLE?this.Me:-1},t.setNextIdx=function(e,t){void 0===t&&(t=w.MAIN),t===w.MAIN&&(this.nextIdx=e)},t.getNextIdx=function(e){return void 0===e&&(e=w.MAIN),e===w.MAIN?this.le:-1},t.clearFrag=function(){this.J.i(Ut,"clear"),[this.pe,this.ye,this.we].forEach((function(e){e.forEach((function(e){var t=e;t.fragments&&t.clear()}))}))},t.verifyLevelIdx=function(e){return this.pe.length>0&&e<this.pe.length&&e>=-1},t.verifyAudioTrackIdx=function(e){return this.ye.length>0&&e<this.ye.length&&e>=0},t.verifySubtitleTracksIdx=function(e){return this.we.length>0&&e<this.we.length&&e>=0},t.abrIndexToOrign=function(e){var t=this.be[e];return t?t.index:0},t.orignIndexToAbr=function(e){var t=0;return this.be.forEach((function(i,n){i.index!==e||(t=n)})),t},t._e=function(){var e=this,t=this.ke;this.ge=0,this.be=[],this.pe.forEach((function(i,n){i.default&&!t&&(e.ge=n),i.enableAdaptive&&(!t||t&&-1!==t.indexOf(n))&&e.be.push(i)})),this.be.sort((function(e,t){return e.bitrate-t.bitrate}))},s()(e,[{key:"hasAudio",get:function(){return this.he},set:function(e){this.he=e}},{key:"hasVideo",get:function(){return this.ce},set:function(e){this.ce=e}},{key:"abr",get:function(){return this.fe},set:function(e){this.fe=e}},{key:"startIdx",get:function(){return this.ve},set:function(e){this.ve=e}},{key:"currentIdx",get:function(){return this.de},set:function(e){e>=0&&(this.de=e)}},{key:"nextIdx",get:function(){return this.le},set:function(e){e>=0&&(this.le=e)}},{key:"levels",get:function(){return this.pe},set:function(e){this.pe=e,this._e()}},{key:"current",get:function(){return this.pe[this.de]}},{key:"currentUrl",get:function(){var e=this.pe[this.de];return(null==e?void 0:e.currentUrl)||""}},{key:"audioIdx",get:function(){return this.me},set:function(e){e>=0&&(this.me=e)}},{key:"audioTracks",get:function(){return this.ye},set:function(e){this.ye=e}},{key:"audio",get:function(){return this.ye[this.me]}},{key:"subtitleIdx",get:function(){return this.Me},set:function(e){e>=0&&(this.Me=e)}},{key:"subtitleTracks",get:function(){return this.we},set:function(e){this.we=e}},{key:"subtitle",get:function(){return this.we[this.Me]}},{key:"abrLevels",get:function(){return this.be}},{key:"availableList",set:function(e){this.ke=e,this._e()}},{key:"default",get:function(){return this.ge||0},set:function(e){this.ge=e}},{key:"abrDefault",get:function(){var e=0;return this.be.forEach((function(t,i){t.default&&(e=i)})),e}}])}(),Bt=0,Ht="loader",Vt=function(){function e(e){var t=this;this.J=void 0,this.j=void 0,this.Ee=void 0,this.U=null,this.Re=void 0,this.De=void 0,this.Te=void 0,this.Se=0,this.Oe=!1,this.Ce=!1,this.Le=void 0,this.xe=void 0,this.Ne=void 0,this.Ie=void 0,this.Fe=0,this.Be=0,this.je=function(){var e;t.Oe=!0,t.Ce=!1;var i=t.Te,n=t.j;null!=(e=t.U)&&e.onLoad&&t.U.onLoad(n,i),i.code=0,i.tfirst=0,i.loaded=0,t.Ue(),t.Ee=new(t.Pe())(t.J),i.type=t.Ee instanceof K?M.FETCH:M.XHR,t.Ee&&(i.id=t.Ee.tag+"-"+t.Be,t.Re.connectionTimeout&&(t.Le=setTimeout((function(){return t.Ve(C.LOADER_CONNECT_TIMEOUT)}),t.Re.connectionTimeout)),t.He(n),i.tsload=Date.now(),i.tstart=performance.now(),t.J.i(Ht,"["+t.Be+"]load: "+t.Ee.tag+" "+n.url+" progress: "+n.progress+" type: "+n.type+" responseType: "+n.responseType+" range: "+n.range),t.Ee.load(n,t.De))},this.We=function(e,i){t.Ge();var n=t.Te;t.Qe(e,n),t.Ye(),n.code=i,n.tfirst=Math.max(n.trequest,performance.now()),t.J.i(Ht,"["+t.Be+"]connect code: "+i+" len: "+n.contentLength+" totalLength: "+n.contentTotalLength),t.U&&t.U.onConnect&&t.U.onConnect(e,n),"number"==typeof e.rangeStart&&e.rangeStart>0&&206!==n.code&&t.U&&t.U.onError&&setTimeout((function(){t.H(new Error("range error. "+e.range+" statu code:"+n.code))}),0)},this.W=function(e,i){try{var n=t.Te;if(t.Fe=performance.now(),!e.breakpointContinuation&&n.output>n.loaded){if(n.loaded+i.byteLength-n.output>0){var r=i.slice(n.output-n.loaded);t.Je(t.j,r,n)}n.loaded+=i.byteLength}else n.loaded+=i.byteLength,t.Je(t.j,i,n)}catch(e){t.J.i(Ht,"handling data error. ",e),t.H(new Error(C.HANDLING_DATA_ERROR+". "+e))}},this.H=function(e){t.Ze(),t.ze();var i,n=t.Te,r=t.Re,o=t.j,a=n.type===M.FETCH&&o.monkeyPatched&&void 0===o.preferNative;t.Oe=!1,t.J.i(Ht,"["+t.Be+"]error: "+e.name+" "+(null==e?void 0:e.message)+" code: "+n.code+" retry: "+n.retry+"/"+r.maxRetry+" "+(a?"monkeyPatchedFetch":"")),t.j.breakpointContinuation&&416===n.code||a&&t.Te.output===n.loaded&&n.loaded>0?null!=(i=t.U)&&i.onEnd&&t.U.onEnd(t.j,null,n):(n.fatal=!r.maxRetry||n.retry>=r.maxRetry||!r.maxRetry,n.errName=e.name,n.errMessage=e.name+": "+e.message+". status: "+n.code,a&&(e.name===D.FETCH_READ_ERROR_NAME&&!t.Te.loaded||e.message===C.LOADER_TRANS_TIMEOUT&&!t.Te.loaded||e.message===C.LOADER_CONNECT_TIMEOUT||!t.Te.code)&&(t.j.preferNative=!0,t.J.i(Ht,"monkey patched fetch error. switch to native fetch.")),t.U&&t.U.onError&&t.U.onError(t.j,n),n.fatal||(r.breakpointContinuation&&t.Te.contentTotalLength&&(t.J.i(Ht,"["+t.Be+"]breakpointContinuation. "+t.Te.loaded+" / "+t.Te.contentTotalLength),t.Te.output&&t.Te.loaded>0?(t.Ie?t.j.rangeStart=t.Ie+t.Te.output:t.j.rangeStart=t.Te.output,t.j.breakpointContinuation=!0):(t.j.rangeStart=t.Ie,t.j.breakpointContinuation=!1)),n.retry++,t.U&&(t.Se?(t.Ne=setTimeout(t.je,t.Se),t.Se=2*t.Se):t.je())))},this.Ve=function(e){t.Oe=!1,t.Ke();var i=new Error(e);t.H(i)},this.J=e,this.Be=Bt+=1,this.J.i(Ht,"["+this.Be+"]constructor"),this.Ee=null,this.Re={connectionTimeout:0,transmissionTimeout:0,maxRetry:0,retryDelay:0},this.De={onConnect:this.We,onProgress:this.W,onEnd:this.it.bind(this),onError:this.H}}var t=e.prototype;return t.Pe=function(){return void 0!==e.qe||(e.qe=B,j.msie||j.msedge?B.isSupportChunk()?e.qe=B:K.isSupported()&&(e.qe=K):K.isSupported()?e.qe=K:B.isSupportChunk()&&(e.qe=B)),e.qe},t.load=function(e,t,i){this.Xe(e,t,i),this.je()},t.destroy=function(){this.Ee&&this.J.i(Ht,"["+this.Be+"]destroy."),this.Ze(),this.Ke(!1),this.ze(),this.U=null},t.abort=function(){this.J.i(Ht,"["+this.Be+"]abort"),this.Ze(),this.Ke()},t.Xe=function(e,t,i){this.j=e,this.Ie=e.rangeStart,this.U=t,this.Re=i||this.Re,this.Te={id:"",type:M.UNKNOWN,trequest:performance.now(),retry:0,loaded:0,code:0,output:0,tfirst:0,tload:0,total:0,tsload:0,tstart:0,fatal:!1,errName:"",errMessage:""},this.Re.retryDelay&&(this.Se=this.Re.retryDelay)},t.ze=function(){this.Ee&&(this.Ee.destroy(),this.Ee=null)},t.Ke=function(e){void 0===e&&(e=!0),e&&this.U&&this.U.onAbort&&!this.Ce&&this.Oe&&this.U.onAbort(this.j,this.Te),this.Ce=!0,this.Ee&&this.Ee.abort()},t.Ze=function(){this.Ge(),this.Ue(),this.$e()},t.Je=function(e,t,i){this.Te.output+=t.byteLength,this.U&&this.U.onProgress&&this.U.onProgress(e,t,i)},t.it=function(e,t){this.Ze();var i=this.Te;this.Qe(e,i),i.total=t?i.loaded="string"==typeof t?t.length||0:t.byteLength||0:i.loaded,i.tload=Math.max(i.tfirst,performance.now()),this.Oe=!1,i.output=0,this.J.i(Ht,"["+this.Be+"]end size: "+i.total+" duration: "+i.trequest+"-"+i.tload),this.U&&this.U.onEnd(e,t,i)},t.Ye=function(){var e=this;this.$e(),this.Fe=performance.now();var t=this.Re.transmissionTimeout||0;t&&(this.xe=setInterval((function(){performance.now()-e.Fe>t&&e.Ve(C.LOADER_TRANS_TIMEOUT)}),1e3))},t.$e=function(){this.xe&&(clearInterval(this.xe),this.xe=void 0)},t.Ge=function(){this.Le&&(clearTimeout(this.Le),this.Le=void 0)},t.Ue=function(){this.Ne&&(clearTimeout(this.Ne),this.Ne=void 0)},t.He=function(e){if(e.rangeEnd||e.rangeStart)if(e.rangeType&&e.rangeType!==E.STANDARD&&"string"==typeof e.url){var t=new ve.a(e.url,!0);e.rangeEnd?(t.query.start=(e.rangeStart||0).toString(),t.query.end=(e.rangeEnd-1).toString()):e.rangeStart&&(t.query.start=e.rangeStart.toString()),e.url=t.toString()}else e.rangeEnd?e.range="bytes="+(e.rangeStart||0)+"-"+(e.rangeEnd-1):e.rangeStart&&(e.range="bytes="+e.rangeStart+"-")},t.Qe=function(e,t){if(!t.contentTotalLength||!t.contentLength){var i=e.responseHeader;if(i){if(e.range||"number"==typeof e.rangeStart){var n=i["content-range"];n&&(t.contentTotalLength=parseInt((Array.isArray(n)?n[0]||"0":n).split("/")[1]||"0")||0)}var r=i["content-length"];r&&(t.contentLength=parseInt(Array.isArray(r)?r[0]||"0":r)||0)}}},s()(e,[{key:"context",get:function(){return this.j}},{key:"config",get:function(){return this.Re}}])}();Vt.qe=void 0;var Gt={local:0,server:0},jt="live-time",Wt=function(e){function t(i){var n;return(n=e.call(this)||this).J=void 0,n.tn={abst:0,originDTS:0},n.en=void 0,n.nn=void 0,t.J=n.J=i,i.i(jt,"constructor"),t.rn={onError:t.An,onEnd:t.un},t.an={connectionTimeout:5e3},n}l()(t,e),t.load=function(e,i){t.hn();var n={url:"https://ntp.nc.gifshow.com/",responseType:"text",progress:!1,preferNative:i};(t.Ee=new Vt(e)).load(n,t.rn,t.an)};var i=t.prototype;return i.ntpSync=function(e){this.J.i(jt,"sync. state:",t.cn);var i=performance.now();("suspend"===t.cn||i-t.fn>18e5)&&(this.J.i(jt,"sync start."),t.fn=i,t.cn="loading",t.load(this.J,e))},i.onPrivNal=function(e){var t=this;e.info.forEach((function(i){"number"==typeof i.abst&&"number"==typeof e.streamTimestamp&&(t.tn.abst=i.abst/1e3,t.tn.originDTS=e.streamTimestamp/1e3)}))},i.onParsing=function(e){var t=this;e.segments.forEach((function(e){e.type===T.VIDEO?t.en={dts:e.startDTS,originDTS:e.originFirstDTS,parseTime:e.firstParseTime}:e.type===T.AUDIO&&(t.nn={dts:e.startDTS,originDTS:e.originFirstDTS,parseTime:e.firstParseTime})}))},i.destroy=function(){t.hn()},i.getDisplayDelay=function(e){return this.vn(e,this.en)},i.getAudioRenderDelay=function(e){return this.vn(e,this.nn)},i.getRecDelay=function(){var e=this.en;if(this.serverNowMs&&null!=e&&e.parseTime){var i=this.tn,n=this.serverMs(1e3*e.parseTime+t.dn);if(n&&i.originDTS&&i.abst)return Math.round(n-1e3*(e.originDTS-i.originDTS+i.abst))}return 0},i.serverMs=function(e){return Gt.server?e-Gt.local+Gt.server:null},i.vn=function(e,t){var i=this.serverNowMs,n=this.tn;return i&&t&&n.abst&&n.originDTS?Math.round(1e3*(t.dts-e-(t.originDTS-n.originDTS+n.abst))+i):0},t.hn=function(){t.Ee&&t.Ee.destroy()},s()(t,[{key:"syncState",get:function(){return t.cn}},{key:"time",get:function(){return o()({},Gt)}},{key:"now",get:function(){return this.serverNowMs||Date.now()}},{key:"serverNowMs",get:function(){return Gt.server?performance.now()-Gt.local+Gt.server:null}}],[{key:"workerTimeOffset",set:function(e){t.dn=e}}])}(O);Ct=Wt,Wt.dn=0,Wt.Ee=void 0,Wt.rn=void 0,Wt.an=void 0,Wt.cn="suspend",Wt.J=void 0,Wt.fn=void 0,Wt.An=function(){Ct.J.i(jt,"ntp sync load error."),Ct.hn()},Wt.un=function(e,t){if(Ct.hn(),"string"==typeof t){Gt.local=performance.now();var i=t.split(",");i.length>1&&(Gt.server=1e3*parseFloat(i[0])+parseInt(i[1],10)/1e3/2)}};var Kt=Wt,zt=function(){function e(){this.ln=0,this.pn=[],this.mn=[],this.yn={},this.Mn={},this.wn=void 0,this.bn=0,this.gn=0,this.kn=0,this._n=0,this.En=0,this.Rn=0,this.Dn=0}var t=e.prototype;return t.onStreamOpen=function(e,t,i,n){if(this.pn.length>10){var r=this.pn.shift();if(r){this.yn[r.vCodecType]=(this.yn[r.vCodecType]||0)+r.traffic;var o=r.qualityType||"unknown";this.Mn[o]=(this.Mn[o]||0)+r.traffic}}var a=this.wn?this.wn.index+1:0;this.wn={index:a,startPos:e,url:t,bitrate:i,qualityType:n,traffic:0,loadTimeCost:0,keyFrame:0,videoDataRate:0,audioDataRate:0,speed:0,vCodecType:d.unknown,segments:[]},this.pn.push(this.wn)},t.onMediaInfo=function(e){var t=this.pn[this.pn.length-1];t&&(e.videoCodecType&&(t.vCodecType=e.videoCodecType),t.mediaInfo=o()({},e))},t.setRTCStats=function(e){var t=this.wn;t&&(t.traffic=e.totalReceive,t.audioDataRate=e.audioDataRate,t.videoDataRate=e.videoDataRate,t.speed=e.speed,t.keyFrame=e.key,this.ln=t.traffic)},t.onDataReceive=function(e){this.ln+=e.byteLength;var t=this.mn;t.length>200&&t.pop(),t.unshift(e);var i=this.wn;i&&(i.traffic+=e.byteLength,i.loadTimeCost+=e.timeCost,i.speed=Math.round(i.traffic/i.loadTimeCost*1e3)||0)},t.onParsing=function(e){var t=this;e.segments.forEach((function(e){if(t.Tn(e.type,1e3*(e.endDTS-e.startDTS),e.payload.byteLength),e.type===T.VIDEO){var i=e.endDTS-e.startDTS;isNaN(i)||(t.kn+=Math.round(1e3*i)),e.fillDuration&&(t.En+=Math.round(1e3*e.fillDuration)),e.droppedDuration&&(t.Dn+=Math.round(1e3*e.droppedDuration))}if(e.type===T.AUDIO){var n=e.endDTS-e.startDTS;isNaN(n)||(t.gn+=Math.round(1e3*n)),e.fillDuration&&(t._n+=Math.round(1e3*e.fillDuration)),e.droppedDuration&&(t.Rn+=Math.round(1e3*e.droppedDuration))}}))},t.onRaw=function(e){if(e.samples.length){var t=e.samples.reduce((function(e,t){return t.yuv?e+t.yuv.y.bytes.length+t.yuv.u.bytes.length+t.yuv.v.bytes.length:e+t.units.reduce((function(e,t){return e+t.data.byteLength}),0)}),0),i=e.samples[e.samples.length-1].dts-e.samples[0].dts+(e.samples[e.samples.length-1].duration||0);this.Tn(T.VIDEO,i/90,t)}},t.downloadInfoByRange=function(e){void 0===e&&(e=1e3);var t={size:0,timeCost:0};if(this.mn.length)for(var i=performance.now(),n=0;n<this.mn.length;n++){var r=this.mn[n];if(!(r&&r.ts>i-e))break;t.size+=r.byteLength,t.timeCost+=r.timeCost}return t},t.Tn=function(e,t,i){var n=this.pn[this.pn.length-1];if(n){var r=n.segments;r.push({type:e,duration:t,byteLength:i}),r.length>200&&r.shift();for(var o=0,a=0,s=0;s<r.length;s++){var u=r[s];u&&u.type===e&&(a+=u.byteLength,o+=u.duration)}o>0&&(e===T.VIDEO?n.videoDataRate=Math.round(8*a/o):e===T.AUDIO&&(n.audioDataRate=Math.round(8*a/o)))}},s()(e,[{key:"smoothedDownloadSpeed",get:function(){var e=this.mn,t=e[0];return t&&!t.progress?t.byteLength/t.timeCost*1e3:1e3*e.reduceRight((function(e,t){var i=t.byteLength/t.timeCost;return e>0?i*(1-.9)+.9*e:i}),0)}},{key:"trafficGroupedByVCodecType",get:function(){var e=o()({},this.yn);return e.total=this.ln,this.pn.forEach((function(t){e[t.vCodecType]=(e[t.vCodecType]||0)+t.traffic})),e}},{key:"trafficGroupedByLevel",get:function(){var e=o()({},this.Mn);return e.total=this.ln,this.pn.forEach((function(t){var i=t.qualityType||"unknown";e[i]=(e[i]||0)+t.traffic})),e}},{key:"traffic",get:function(){return this.ln}},{key:"speed",get:function(){var e=this.wn,t=this.downloadInfoByRange();return this.mn.length?t.timeCost?Math.round(t.size/t.timeCost*1e3):0:(null==e?void 0:e.speed)||0}},{key:"currentLoad",get:function(){return this.wn}},{key:"streams",get:function(){return this.pn}},{key:"contentLen",get:function(){return this.bn},set:function(e){this.bn=e}},{key:"muxA",get:function(){return this.gn}},{key:"muxV",get:function(){return this.kn}},{key:"fillA",get:function(){return this._n}},{key:"fillV",get:function(){return this.En}},{key:"droppedA",get:function(){return this.Rn}},{key:"droppedV",get:function(){return this.Dn}}])}(),Jt=i(5),qt=function(e){return e.WIDEVINE="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",e}({});function Yt(e){return!e.drmSchemaId||e.drmSchemaId===qt.WIDEVINE}!Ke()&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.navigator.requestMediaKeySystemAccess.bind(window.navigator);var Qt=new RegExp('codecs="((/w|.)+)"'),Zt=[{k:"video/mp4",v:m.mp4},{k:"video/quicktime",v:m.mp4},{k:"video/x-flv",v:m.flv},{k:"video/webm",v:m.matroska},{k:"video/x-matroska",v:m.matroska},{k:"video/mp2t",v:m.ts},{k:"audio/x-matroska",v:m.matroska},{k:"audio/mp4",v:m.mp4},{k:"audio/mpeg",v:m.mp3},{k:"audio/aac",v:m.aac},{k:"application/vnd.apple.mpegurl",v:m.hls},{k:"application/x-mpegurl",v:m.hls},{k:"audio/wave",v:m.wav},{k:"audio/wav",v:m.wav},{k:"audio/x-wav",v:m.wav},{k:"audio/x-pn-wav",v:m.wav}];function Xt(e){for(var t={type:e,box:m.unknown,vCodec:d.unknown},i=0;i<Zt.length;i++)if(0===e.toLocaleLowerCase().indexOf(Zt[i].k)){t.box=Zt[i].v;var n=e.match(Qt);n&&n.length>2&&n[1].split(",").forEach((function(e){0===e.indexOf("avc1")?t.vCodec=d.h264:0===e.indexOf("av01")?t.vCodec=d.av1:0!==e.indexOf("hev1")&&0!==e.indexOf("hvc1")||(t.vCodec=d.hevc)}));break}return t}var $t=function(){function e(e){this.url=[],this.urlId=0,this.bitrate=0,this.maxBitrate=0,this.qualityType="",this.qualityLabel="",this.id=0,this.codec="",this.audioCodec="",this.videoCodec="",this.hidden=!1,this.enableAdaptive=!0,this.default=!1,this.width=void 0,this.height=void 0,this.index=0,this.drmSchemaId="",this.drmToken="",this.hdr=void 0,this.vCodecType=d.unknown,this.meta=void 0,this.fileName=void 0,this.fileSize=void 0,this.dropVideo=[],this.url=[e],this.urlId=0}return e.prototype.getKLevel=function(){return{width:this.width,height:this.height,qualityLabel:this.qualityLabel,qualityType:this.qualityType,bitrate:this.bitrate,maxBitrate:this.maxBitrate}},s()(e,[{key:"currentUrl",get:function(){return this.url[this.urlId]||""}}])}(),ei=function(){function e(){}return e.verify=function(e){return!!(e&&Object.prototype.hasOwnProperty.call(e,"version")&&Object.prototype.hasOwnProperty.call(e,"adaptationSet")&&Object.prototype.hasOwnProperty.call(e.adaptationSet,"representation")&&Array.isArray(e.adaptationSet.representation)&&e.adaptationSet.representation.length>0)&&e.adaptationSet.representation.reduce((function(e,t){return!!(e&&t.url&&t.bitrate&&t.qualityType)}),!0)},e.parse=function(t){var i,n=[];return e.verify(t)&&t.adaptationSet.representation.forEach((function(e,t){var r=new $t(e.url);r.id=e.id||t,r.maxBitrate=e.bitrate||0,r.bitrate=e.averageBitrate||r.maxBitrate,r.qualityType=e.qualityType||"",r.qualityLabel=e.name||"",r.codec=e.codec||"",r.hidden=e.hidden||!1,r.enableAdaptive=void 0===e.enableAdaptive||!!e.enableAdaptive,r.default=e.defaultSelect||!1,r.index=t,n.push(r),r.default&&void 0===i&&(i=t)})),{levels:n,def:i||0,srcType:_.KWAI_FLV_ABR}},e}(),ti=s()((function(e,t){this.Sn=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=void 0,this.baseuri=e,this.reluri=t}),[{key:"uri",get:function(){return!this.Sn&&this.reluri&&(this.Sn=Object(Jt.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this.Sn}}]),ii=function(e){return e.AUDIO="audio",e.VIDEO="video",e}({}),ni=function(){function e(){var e;this.On="",this.Cn=null,this.Ln=null,this.xn=((e={})[ii.AUDIO]=!1,e[ii.VIDEO]=!1,e),this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.sn=0,this.levelkey=void 0,this.level=0,this.start=0,this.cc=0,this.maxStartPTS=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.deltaPTS=void 0,this.dropped=0,this.type=void 0,this.loader=void 0,this.title=null,this.urlId=0,this.data=void 0}var t=e.prototype;return t.setByteRange=function(e,t){var i=e.split("@",2),n=[];1===i.length?n[0]=t?t.byteRangeEndOffset:0:n[0]=parseInt(i[1],10),n[1]=parseInt(i[0],10)+n[0],this.Cn=n},t.addElementaryStream=function(e){this.xn[e]=!0},t.hasElementaryStream=function(e){return!0===this.xn[e]},t.createInitializationVector=function(e){for(var t=new Uint8Array(16),i=12;i<16;i++)t[i]=e>>8*(15-i)&255;return t},t.setDecryptDataFromLevelKey=function(e,t){var i=e;return e&&e.method&&e.uri&&!e.iv&&((i=new ti(e.baseuri,e.reluri)).method=e.method,i.iv=this.createInitializationVector(t)),i},s()(e,[{key:"url",get:function(){return!this.On&&this.relurl&&(this.On=Object(Jt.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this.On},set:function(e){this.On=e}},{key:"byteRange",get:function(){return this.Cn?this.Cn:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this.Ln)return null;if(!this.Ln&&this.levelkey){var e=this.sn;"number"!=typeof e&&(e=0),this.Ln=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this.Ln}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime||!Number.isFinite(this.programDateTime))return null;var e=Number.isFinite(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])}(),ri=function(e){function t(t){var i;return(i=e.call(this,t)||this).startSN=0,i.endSN=0,i.fragments=[],i.initSegment=null,i.live=!0,i.needSidxRanges=!1,i.startTimeOffset=null,i.targetduration=0,i.totalduration=0,i.type=null,i.version=null,i.ptsKnown=!1,i.m3u8Slice=void 0,i.audioGroupIds=void 0,i.attrs=void 0,i.averagetargetduration=void 0,i.name=void 0,i.lang=void 0,i.groupId="",i.instreamId="",i.autoselect=void 0,i.forced=void 0,i.size=0,i.partOfData=!1,i.http416=0,i}l()(t,e);var i=t.prototype;return i.clear=function(){this.fragments=[],this.startSN=0,this.endSN=0,this.initSegment=null,this.m3u8Slice=void 0,this.live=!0,this.needSidxRanges=!1,this.startTimeOffset=0},i.mergeFrom=function(e,t){if(void 0===t&&(t=!1),e.fragments.length){var i=this.endSN;if(this.endSN=e.endSN,e.partOfData||(e.initSegment&&!this.initSegment&&(this.initSegment=e.initSegment),this.live=e.live,this.needSidxRanges=e.needSidxRanges,this.targetduration=e.targetduration,this.ptsKnown=e.ptsKnown,this.averagetargetduration=e.averagetargetduration,this.hasFrag||(this.m3u8Slice=e.m3u8Slice,this.audioGroupIds=e.audioGroupIds,this.attrs=e.attrs,this.name=e.name,this.lang=e.lang,this.groupId=e.groupId,this.instreamId=e.instreamId,this.autoselect=e.autoselect,this.forced=e.forced)),t&&this.fragments.length){for(var n,r=e.fragments.length,o=0;o<e.fragments.length;o++){var a=e.fragments[o].sn;if("number"==typeof a&&a>i){r=o;break}}if(this.fragments.length&&e.fragments.splice(0,r),e.partOfData){var s=this.fragments[this.fragments.length-1],u=s.endPTS,l=s.cc;u&&e.fragments.forEach((function(e){e.start=e.startPTS=u,e.endPTS=e.startPTS+e.duration,u=e.endPTS,e.cc=l+e.cc}))}(n=this.fragments).push.apply(n,e.fragments),this.totalduration=this.fragments.reduce((function(e,t){return e+t.duration}),0),e.partOfData?this.size+=e.size:this.size=e.size}else this.startSN=e.startSN,this.fragments=e.fragments,this.totalduration=e.totalduration,this.size=e.size}},i.getTimeInfoAfter=function(e){void 0===e&&(e=0);var t,i,n=[],r=[];return this.fragments.forEach((function(o){"number"==typeof o.sn&&(o.sn>=e&&"number"==typeof i&&i!==o.cc&&(t?t.push({sn:o.sn,start:o.start}):t=[{sn:o.sn,start:o.start}]),i=o.cc,o.sn>=e&&(n.push(o.start),"number"==typeof o.programDateTime&&r.push(o.programDateTime)))})),{live:this.live,startSn:this.startSN,endSn:this.endSN,duration:this.totalduration,times:n,utcs:r,discontinuity:t,targetduration:this.targetduration}},s()(t,[{key:"timeInfo",get:function(){return this.getTimeInfoAfter()}},{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||"number"!=typeof this.fragments[0].programDateTime||!Number.isFinite(this.fragments[0].programDateTime))}},{key:"hasFrag",get:function(){return this.fragments.length>0}}])}($t),oi=function(){function e(){}return e.verify=function(e){return!!(e&&Object.prototype.hasOwnProperty.call(e,"segments")&&Array.isArray(e.segments)&&e.segments.length>0)&&(e.segments.forEach((function(e){if(!e.url||!e.duration||!e.time)return!1})),!0)},e.parse=function(t,i){void 0===i&&(i="");var n=[],r={levels:n,withCredentials:!1,hasVideo:!0,hasAudio:!0};if(e.verify(t)){var o=new ri("");n.push(o);var a=t;r.withCredentials=!!a.withCredentials,void 0!==a.hasAudio&&(r.hasAudio=!!a.hasAudio),void 0!==a.hasVideo&&(r.hasVideo=!!a.hasVideo);var s=0,u=0,l=0,c=0,d=0;a.segments.forEach((function(e,t){var n=new ni;n.sn=t,"string"==typeof e.startUtcTime?n.programDateTime=parseInt(e.startUtcTime):"number"==typeof e.startUtcTime&&(n.programDateTime=e.startUtcTime),"string"==typeof e.duration?n.duration=(parseFloat(e.duration)||0)/1e3:n.duration=(e.duration||0)/1e3,n.start=s,n.baseurl=i,n.relurl=e.url,e.filesize&&(d+=e.filesize),n.duration>c&&(c=n.duration),s+=n.duration,t>0&&l!==e.periodId&&(n.tagList.push(["DIS"]),u++),n.cc=u,l=e.periodId,o.fragments.push(n)})),o.bitrate=8*d/1024/o.totalduration,o.live=!1,o.type=w.MAIN,o.startSN=0,o.endSN=o.fragments.length-1,o.totalduration=s,o.targetduration=c,o.averagetargetduration=s/o.fragments.length}return r},e}(),ai=function(){function e(){}return e.verify=function(e){return!!(e&&e.adaptationSet&&e.adaptationSet.representation&&e.adaptationSet.representation.length)&&e.adaptationSet.representation.reduce((function(e,t){return!!(t.url&&t.bandwidth&&e)}),!0)},e.parse=function(t){var i=[];return e.verify(t)&&t.adaptationSet.representation.forEach((function(e){if(e&&(e.url||e.m3u8)){var t=new ri(e.baseUrl?Object(Jt.buildAbsoluteURL)(e.baseUrl,e.url,{alwaysNormalize:!0}):e.url);t.bitrate=Math.floor(e.bandwidth/1e3),t.maxBitrate=Math.floor(e.bandwidth/1e3),t.qualityType=e.qualityType||"",t.qualityLabel=e.qualityLabel||"",e.width&&e.height&&(t.width=e.width,t.height=e.height),function(e,t){var i=[].concat(e.split(/[ ,]+/));["video","audio"].forEach((function(e){var n=i.filter((function(t){return i=t,!!(n=lt[e])&&!0===n[i.slice(0,4)];var i,n}));if(n.length){var r=n.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("av01",0)||0===e.lastIndexOf("hev1",0)||0===e.lastIndexOf("hvc1",0)||0===e.lastIndexOf("mp4a",0)}));t[e+"Codec"]=r.length>0?r[0]:n[0],i=i.filter((function(e){return-1===n.indexOf(e)}))}})),t.codec=i.join(",")}(e.codecs||"",t),t.audioCodec="",t.m3u8Slice=e.m3u8||e.m3u8Slice,t.totalduration=e.duration,e.backupUrl&&e.backupUrl.length&&(t.url=t.url.concat(e.backupUrl)),t.default=e.defaultSelect||!1,t.urlId=0,i.push(t)}})),{levels:i,def:0}},e}(),si=function(e){return e[e.LongVideo=1]="LongVideo",e[e.ShortVideo=2]="ShortVideo",e[e.LiveGame=3]="LiveGame",e[e.LiveShow=4]="LiveShow",e[e.LivePlayBack=5]="LivePlayBack",e}({}),ui={1:m.hls_ts,2:m.mp4,3:m.flv,4:m.hls_fmp4},li={avc:d.h264,hevc:d.hevc,av1:d.av1,kvc3:d.kvc3,kvc4:d.kvc4,kvc5:d.kvc5,kvc6:d.kvc6,kvc30:d.kvc30};function ci(e){var t=m.unknown;if(e&&e.length<2048)for(var i=e.split("\n"),n=0;n<i.length;n++){var r=i[n].trim();r&&0!==r.indexOf("#")&&(t=pe(r))}return t===m.ts?m.hls_ts:t===m.mp4?m.hls_fmp4:m.unknown}var di,hi=function(){function e(){}return e.verify=function(e){return!!(e&&e.adaptationSet&&e.adaptationSet.length)&&e.adaptationSet.reduce((function(e,t){return!!(e&&t.representation&&t.representation.length)}),!0)},e.parse=function(t,i){void 0===i&&(i=!1);var n,r,o,a,s,u,l,c,h,f=[],p=!1,A=0,v=[],_={};if(e.verify(t)){var m=t;u=ui[m.mediaType],l=1===m.stereoType?S.V360:S.Normal,void 0!==m.businessType&&(c=m.businessType>=3&&m.businessType<=5),m.businessType===si.LivePlayBack&&(h=!0),m.version&&(_.version=m.version),m.videoId&&(_.videoId=m.videoId),m.videoBaseFeature&&(_.videoBaseFeature=m.videoBaseFeature),m.videoAestheticFeature&&(_.videoAestheticFeature=m.videoAestheticFeature),m.videoFeature&&(_.videoFeature=m.videoFeature),"number"==typeof m.programStartTime&&(_.programStartTime=m.programStartTime),m.adaptationSet.forEach((function(e){var t=e.duration/1e3;void 0===c&&t&&(c=!1),!A&&t&&(A=t);var i=e.drmSchemaId,l=e.drmToken;e.drmSchemaId&&(p=!0);var h=w.MAIN;if(e.mimeType&&(-1!==e.mimeType.indexOf("video")?_.videoMimeType=e.mimeType:-1!==e.mimeType.indexOf("audio")?(_.audioMimeType=e.mimeType,h=w.AUDIO):"text/vtt"===e.mimeType?(_.subtitleMimeType=e.mimeType,h=w.SUBTITLE):h=void 0),h){h===w.MAIN?_.videoDuration=e.duration:h===w.AUDIO&&(_.audioDuration=e.duration);var g=e.representation.map((function(n,r){var c;if(!u&&n.m3u8Slice&&(u=ci(n.m3u8Slice)),u||(u=pe(n.url)),V(u)?((c=new ri(n.url)).lang=e.language||"",c.default=!!n.defaultSelect,c.id=n.id||r,c.m3u8Slice=n.m3u8Slice,c.totalduration=t||A):c=new $t(n.url),"number"==typeof n.fileSize&&(c.fileSize=n.fileSize),c.vCodecType=d.unknown,c.hdr=n.hdrType||0,c.maxBitrate=n.maxBitrate||0,c.bitrate=n.avgBitrate||c.maxBitrate,c.qualityType=n.qualityType||"",c.qualityLabel=n.qualityLabel||"",c.codec=n.codecs||"",c.codec){var f=ct(c.codec);c.videoCodec=f.video||"",c.vCodecType=dt(c.videoCodec)}return n.videoCodec&&li[n.videoCodec]&&(c.vCodecType=li[n.videoCodec]||d.unknown),v.push(c.vCodecType),1===m.adaptationSet.length&&(c.audioCodec=""),n.width&&n.height&&(c.width=n.width,c.height=n.height),c.hidden=n.hidden||!1,c.enableAdaptive=void 0===n.disableAdaptive||!n.disableAdaptive,c.default=n.defaultSelect||!1,c.index=r,c.drmSchemaId=n.drmSchemaId||i,c.drmToken=n.drmToken||l,c.drmSchemaId&&(p=!0),n.backupUrl&&n.backupUrl.length&&(c.url=c.url.concat(n.backupUrl)),c.urlId=0,c.default&&void 0===o&&(h===w.MAIN?o=r:h===w.AUDIO?a=r:h===w.SUBTITLE&&(s=r)),(n.comment||n.kvqScore)&&(c.meta={comment:n.comment,kvqScore:n.kvqScore}),c}));h===w.MAIN?f=f.concat(g):h===w.AUDIO?(n||(n=[]),n=n.concat(g)):h===w.SUBTITLE&&(r||(r=[]),r=r.concat(g))}}))}if(r&&e.processingSubtitleType(r,A),i)return[{codecType:1===v.length?v[0]:d.unknown,mediaLevels:{levels:f,def:o||0,audioTracks:n,defAudio:a||0,subtitleTracks:r,defSubtitle:s||0,drm:p,box:u,stereoType:l,isLive:c,meta:_}}];var g={};f.forEach((function(e){var t=g[e.vCodecType];t||(g[e.vCodecType]=t={def:0,levels:[]}),e.default&&(t.def=t.levels.length),t.levels.push(e)}));var y=Object.keys(g).length,b=[];for(var E in g){var T=g[E];if(T){var R=T.levels[0];if(y>1&&R&&R.m3u8Slice){var L=ci(R.m3u8Slice);V(L)&&(u=L)}b.push({codecType:E,mediaLevels:{levels:T.levels,def:T.def,audioTracks:n,defAudio:a||0,subtitleTracks:r,defSubtitle:s||0,drm:p,box:u,stereoType:l,isLive:c,isLiveShift:h,meta:_}})}}return b},e.processingSubtitleType=function(e,t){e.forEach((function(e,i){if(pe(e.currentUrl)===m.hls){e.live=!1,e.index=i,e.totalduration=t,e.targetduration=t,e.endSN=1;var n=new ni;n.type=w.SUBTITLE,n.start=0,n.sn=1,n.level=i,n.cc=0,n.url=e.currentUrl,n.duration=t,e.fragments=[n]}}))},e.getAdaptationIdxByType=function(e,t){for(var i=0;i<e.adaptationSet.length;i++){var n=e.adaptationSet[i];if(n){var r;if(void 0===n.mimeType)return"video"===t?0:-1;if(0===(null==(r=n.mimeType)?void 0:r.indexOf(t)))return i}}return-1},e}(),fi=new RegExp("^((http|https)://)|blob:"),pi=[m.matroska,m.mp3,m.aac],Ai=[m.flv,m.raw,m.webrtc,m.ivf],vi=[m.mp4,m.flv,m.hls,m.raw,m.hls_fmp4,m.hls_ts,m.ts,m.ivf],_i=Object.values(d),mi="media-src",gi=function(){function e(){}return e.verifyMix=function(e){var t=0;for(var i in e)-1!==_i.indexOf(i)&&t++;return t>0},e.isSrcEmpty=function(e){try{if("string"==typeof e){if(!(e=e.trim()))return!0;if(!fi.test(e))return 0===Object.keys(JSON.parse(e)).length}else if(!(e instanceof Blob))return!e||0===Object.keys(e).length}catch(e){}return!1},e.filteringLevels=function(t,i,n){void 0===n&&(n=!1),t.i(mi,"filteringLevels. input: "+i.levels.length+". mse: "+et.isMSEAvailable()+" mixCodec: "+n);var r=j.chrome||j.firefox;i.levels.forEach((function(e){r&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec="")}));var o=et.isMSEAvailable()?et.isMSECodecStrSupportedInMp4:et.isVideoCodecStrSupportedInMp4,a=et.isMSEAvailable()?et.isMSECodecSupported:et.isVideoCodecSupported;return i.levels=i.levels.filter((function(e){var i=!e.audioCodec||o(e.audioCodec,"audio"),r="number"==typeof e.hdr&&e.hdr>0,s=!0;(n||e.vCodecType===d.av1||j.mobile)&&((s=e.videoCodec?o(e.videoCodec):e.vCodecType===d.unknown||a(e.vCodecType,et.getPlayTestDefinition(e),r))||t.i(mi,"filteringLevels. "+e.qualityType+" v unsupported. codec: "+e.vCodecType+" hdr: "+r),e.qualityType.toLocaleLowerCase().indexOf("4k")>=0&&(j.mobile&&(s=!1),s||t.i(mi,"filteringLevels. "+e.qualityType+" v unsupported. mobile: "+j.mobile)));var u=Yt(e);return u||t.i(mi,"filteringLevels. "+e.qualityType+" v unsupported. drm: "+e.drmSchemaId),i&&s&&u})),i.audioTracks&&(i.audioTracks=i.audioTracks.filter((function(e){var i=!e.audioCodec||o(e.audioCodec,"audio");i||t.i(mi,"filteringLevels. "+e.qualityType+" a unsupported. codec: "+e.audioCodec);var n=Yt(e);return n||t.i(mi,"filteringLevels. "+e.qualityType+" a unsupported. drm: "+e.drmSchemaId),i&&n})),i.audioTracks.forEach((function(e){r&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec="")}))),e.initLevelsDefault(t,i),i},e.initLevelsDefault=function(e,t){return e.i(mi,"init level default"),t.def=-1,t.levels.forEach((function(e,i){e.index=i,e.default&&(t.def=i)})),t.def<0&&(t.def=t.levels.reduce((function(e,i,n){return i.bitrate<t.levels[e].bitrate?n:e}),0),e.i(mi,"no default main level, select lowest bit rate idx: "+t.def)),e.i(mi,"audio level default: "+t.def),t.audioTracks&&t.audioTracks.length&&(t.defAudio=void 0,t.audioTracks.forEach((function(e,i){e.index=i,e.default&&(t.defAudio=i)})),void 0===t.defAudio&&(t.defAudio=0),e.i(mi,"audio level default: "+t.defAudio)),t.subtitleTracks&&t.subtitleTracks.length&&(t.subtitleTracks.forEach((function(e,i){e.index=i,e.default&&(t.defSubtitle=i)})),void 0===t.defSubtitle&&(t.defSubtitle=0),e.i(mi,"subtitle level default: "+t.defSubtitle)),t},e.preParse=function(t,i,n,r,o){if(void 0===o&&(o=""),t.i(mi,"pre parse. native: "+n+", codecType: "+r+", baseUrl: "+o),"string"==typeof i){var a=this.Nn(t,i);if(!a)return[{src:i,box:m.unknown,srcType:_.OTHERS}];i=a}else i instanceof Blob||(i=JSON.parse(JSON.stringify(i)));if(Array.isArray(i)){t.i(mi,"input mix container.",i.length);var s=[],u=[];i.forEach((function(i){if(null!=i&&i.src){var a={info:e.In(t,i.src,n,r,o),priority:0,mime:void 0};s.push(a.info.box),i.type&&(a.mime=Xt(i.type)),u.push(a)}}));for(var l=0;l<u.length;l++){var c=u[l];if(c.info&&c.info.src){if(c.mime&&(c.mime.box!==m.unknown&&(c.info.box=c.mime.box),c.mime.vCodec!==d.unknown&&(c.info.codecType=c.mime.vCodec)),void 0!==n&&n!==c.info.nativeFirst||c.priority++,c.info.nativeFirst)c.priority+=c.info.box===m.unknown?1:et.isVideoBoxSupported(c.info.box)?2:-100,c.priority+=c.info.codecType===d.unknown?1:r&&r===c.info.codecType||et.isVideoCodecSupported(c.info.codecType)?2:-100;else{if(!et.isMSEAvailable())continue;c.priority+=c.info.box===m.unknown?1:vi.indexOf(c.info.box)>=0?2:-100,c.priority+=c.info.codecType===d.unknown?1:r&&r===c.info.codecType||et.isMSECodecSupported(c.info.codecType)?2:-100}t.i(mi,"input mix container. media desc "+l+". box: "+c.info.box+" codec: "+c.info.codecType+" priority: "+c.priority)}}return u.sort((function(e,t){return t.priority-e.priority})).filter((function(e){return e.priority>0})).map((function(e){return e.info}))}return[e.In(t,i,n,r,o)]},e.In=function(t,i,n,r,o){if(void 0===o&&(o=""),t.i(mi,"parse media desc. native: "+n+" codecType: "+r),"string"==typeof i){var a=this.Nn(t,i);if(!a)return{src:i,box:m.unknown,srcType:_.OTHERS};i=a}var s,u=et.isMSEAvailable();if(e.verifyMix(i)){t.i(mi,"input mix codec.",Object.keys(i));var l=i,c=[];for(var d in l){var h=d;if(-1!==_i.indexOf(h)){var f=l[h];if("string"==typeof f&&(f=f.trim()),!f){t.i(mi,d+" src is empty.");continue}var p=this.Fn(t,f,o,h,!0),A=Array.isArray(p)?this.Bn(p,h)||p[0]:p;if(!A)continue;A.codecType=h,c.push(A)}}s=this.jn(t,c,n,r)}else{var v=this.Fn(t,i,o);Array.isArray(v)?v.length>1?(t.i(mi,"input aas v2 mix codec."),s=this.jn(t,v,n,r)):1===v.length&&((s=v[0]).nativeFirst=this.Un(t,s.box,u,n)):(s=v).nativeFirst=this.Un(t,s.box,u,n)}return s||(s={src:i,box:m.unknown,srcType:_.OTHERS}),s},e.jn=function(e,t,i,n){var r,o,a=this,s={},u={},l=[],c=et.isMSEAvailable();t.forEach((function(t){var n=t.codecType;if(n)if(t.nativeFirst=a.Un(e,t.box,c,i),l.push(n),c&&!t.nativeFirst){var r=et.getVideoCodecCompatibilityByCodec(n);u[n]=r.decoder,n===d.h264&&(r.decoder=v.buildin,r.smooth=!0),r.smooth&&r.decoder===v.buildin&&t.mediaLevels&&(t.compatibility=r,s[n]=t)}else{var o=et.isVideoCodecSupported(n);u[n]=o?v.buildin:v.unsupported,(n===d.h264||o)&&(t.compatibility={decoder:v.buildin,smooth:!0,mix:!1},s[n]=t)}}));var h,f,p=null!=(r=s[d.hevc])&&r.mediaLevels&&s[d.hevc].mediaLevels.levels.length?s[d.hevc]:void 0,A=null!=(o=s[d.av1])&&o.mediaLevels&&s[d.av1].mediaLevels.levels.length?s[d.av1]:void 0,_=s[d.h264];return e.i(mi,"input vcodec. hevc: "+!!p+" av1: "+!!A+" h264: "+!!_),n&&s[n]&&(h=s[n],e.i(mi,"selected the specified codec: "+n)),h||((h=A||p||_)&&(h.nativeFirst=this.Un(e,h.box,c,i)),e.i(mi,"selected src: "+(null==(f=h)?void 0:f.codecType),h)),h&&(l.length&&(h.mixCodecInput=l),h.mixCodecAvailable=u),h},e.Bn=function(e,t){for(var i=0;i<e.length;i++)if(e[i].codecType===t)return e[i]},e.Un=function(e,t,i,n){if(!i||-1!==pi.indexOf(t))return e.i(mi,"get native first true. box: "+t+" mse: "+i),!0;if(-1!==Ai.indexOf(t)||!et.isVideoBoxSupported(t))return e.i(mi,"get native first false. box: "+t),!1;if(!j.mobile){if(n){var r=et.isVideoBoxSupported(t),o=!!r;return e.i(mi,"get native first pc "+o+". box: "+t+" nativeFirstParams: true video box supported: "+r),o}if(void 0===n){var a=et.isMSEAvailable(),s=!a;return e.i(mi,"get native first pc "+s+". box: "+t+" nativeFirstParams: undefined mse supported: "+a),s}return e.i(mi,"get native first pc false. nativeFirstParams: false"),!1}if(t===m.mp4||t===m.hls||t===m.hls_ts||t===m.ts){if(void 0===n||n){var u=et.isVideoBoxSupported(t),l=!!u;return e.i(mi,"get native first mobile "+l+". box: "+t+" nativeFirstParams: "+n+" video box supported: "+u),l}return e.i(mi,"get native first mobile false. nativeFirstParams: "+n),!1}if(t===m.hls_fmp4){if(void 0===n||n){var c=et.isVideoBoxSupported(t),d=!(!c||!j.x5&&!j.xweb);return e.i(mi,"get native first mobile "+d+". box: "+t+" nativeFirstParams: "+n+" video box supported: "+c+" x5: "+j.x5+" xweb: "+j.xweb),d}return e.i(mi,"get native first mobile false. nativeFirstParams: "+n),!1}},e.Fn=function(t,i,n,r,a){var s=this;void 0===n&&(n=""),void 0===r&&(r=d.unknown),void 0===a&&(a=!1);var u={src:i,box:m.unknown,srcType:_.OTHERS};if("string"==typeof i){var l=new $t(i);l.vCodecType=r,u.box=pe(i),u.mediaLevels={levels:[l],def:0},u.isLive=this.Pn(u.box)}else if(i instanceof Blob){var c="unknow";i instanceof File?(u.box=pe(i.name),c=i.name):u.box=Xt(i.type).box;var h=V(u.box)?new ri(URL.createObjectURL(i)):new $t(URL.createObjectURL(i));h.vCodecType=r,h.fileName=c,u.mediaLevels={levels:[h],def:0},u.srcType=_.FILE,u.isLive=!1}else{if(hi.verify(i)){var f=hi.parse(i);return t.i(mi,"kwai manifest"),f.map((function(n){var o,l;t.i(mi,"kwai manifest codec: "+n.codecType+" meta:",n.mediaLevels.meta),e.Vn(n.mediaLevels.levels,r);var c={meta:n.mediaLevels.meta,mediaLevels:e.filteringLevels(t,n.mediaLevels,a||f.length>1),src:i,box:n.mediaLevels.box||pe((null==(o=n.mediaLevels.levels[0])?void 0:o.url[0])||""),srcType:_.KWAI,isLive:s.Pn(u.box),isLiveShift:n.mediaLevels.isLiveShift,codecType:n.codecType};return"boolean"==typeof(null==(l=c.mediaLevels)?void 0:l.isLive)&&(c.isLive=c.mediaLevels.isLive),V(c.box)&&(c.multipart=!0),c}))}if(ei.verify(i)){t.i(mi,"flv abr manifest",r);var p=ei.parse(i);e.Vn(p.levels,r),u.mediaLevels=e.filteringLevels(t,p,a),u.box=m.flv,u.isLive=!0,u.srcType=_.KWAI_FLV_ABR}else if(oi.verify(i)){t.i(mi,"flv multipart");var A=oi.parse(i,n);u.mediaLevels=o()({def:0},A),e.Vn(u.mediaLevels.levels,r),u.box=m.flv,u.isLive=!1,u.multipart=!0,u.srcType=_.KWAI_FLV_MP}else ai.verify(i)&&(u.mediaLevels=e.filteringLevels(t,ai.parse(i),a),u.box=m.hls,u.srcType=_.KWAI)}return V(u.box)&&(u.multipart=!0),u},e.Vn=function(e,t){void 0===t&&(t=d.unknown),e.forEach((function(e){e.vCodecType===d.unknown&&t!==d.unknown&&(e.vCodecType=t)}))},e.Pn=function(e){var t;return-1===[m.flv,m.hls,m.unknown,m.ivf,m.yuv].indexOf(e)&&(t=!1),e===m.webrtc&&(t=!0),t},e.Nn=function(e,t){var i=t.trim();if(i){if(!fi.test(i)){try{i=JSON.parse(i)}catch(t){e.i(mi,"formatStrData error",t)}"string"==typeof i&&(i=Object(Jt.buildAbsoluteURL)(location.href,i,{alwaysNormalize:!0}))}return i}},e}(),yi=((di={})[h.FHD]="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAA1Btb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAADmAABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACenRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAADmAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAHgAAABDgAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAA5gAAXcAAAEAAAAAAfJtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAEk+AABJPgFXEAAAAAAAhaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAAAAAAGpbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABaXN0YmwAAAEFc3RzZAAAAAAAAAABAAAA9Wh2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAHgAQ4AEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAB7aHZjQwEBYAAAAJAAAAAAAHjwAPz9+PgAAA8DoAABABhAAQwB//8BYAAAAwCQAAADAAADAHiVmAmhAAEALkIBAQFgAAADAJAAAAMAAAMAeKADwIAQ5ZZWaSTK8BagIIBAgAAAAwCAAAADAISiAAEAB0QBwXK0YkAAAAAQcGFzcAAAAAEAAAABAAAAFGJ0cnQAAAAAAAAV+AAAFfgAAAAYc3R0cwAAAAAAAAABAAAAAQAST4AAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAACvwAAAAEAAAAUc3RjbwAAAAAAAAABAAADfAAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNjAuMTYuMTAwAAAACGZyZWUAAALHbWRhdAAAABhAAQwB//8BYAAAAwCQAAADAAADAHiVmAkAAAAuQgEBAWAAAAMAkAAAAwAAAwB4oAPAgBDlllZpJMrwFqAggECAAAADAIAAAAMAhAAAAAdEAcFytGJAAAACYigBrxMImujggedddccbbbbbbuZo4//8Qs/H9kAtWJjtrvgCQAzQ8gAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwFbpe9yuAXAHyJgAAADAAADAAADAAADAAADAAADAAADAAADAAFJkwKEKkAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAZEhwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwPuAAADAAADAAADAAADAAADAAADAAADAAADAAADAAAHpAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwABzQAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAUMAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwBsQAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwGHAAADAAADAAADAAADAAADAAADAAADAAADAAADAtoAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAWMAAADAAADAAADAAADAAADAAADAAADAAADAAAJCAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAADygAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAABawAAADAAADAAADAAADAAADAAADAAADAAADAAAhYAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAALeAFwEAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAUUA=",di[h.UHD_4K]="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAA1Ftb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAADmAABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACe3RyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAADmAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAPAAAACHAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAA5gAAXcAAAEAAAAAAfNtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAEk+AABJPgFXEAAAAAAAhaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAAAAAAGqbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABanN0YmwAAAEGc3RzZAAAAAAAAAABAAAA9mh2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAPAAhwAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAB8aHZjQwEBYAAAAJAAAAAAAJbwAPz9+PgAAA8DoAABABhAAQwB//8BYAAAAwCQAAADAAADAJaVmAmhAAEAL0IBAQFgAAADAJAAAAMAAAMAlqAB4CACHFllZpJMrwFqAggECAAAAwAIAAADAAhAogABAAdEAcFytGJAAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAAQGgAAEBoAAAAGHN0dHMAAAAAAAAAAQAAAAEAEk+AAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAABRzdHN6AAAAAAAACA0AAAABAAAAFHN0Y28AAAAAAAAAAQAAA30AAABidWR0YQAAAFptZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAAC1pbHN0AAAAJal0b28AAAAdZGF0YQAAAAEAAAAATGF2ZjYwLjE2LjEwMAAAAAhmcmVlAAAIFW1kYXQAAAAYQAEMAf//AWAAAAMAkAAAAwAAAwCWlZgJAAAAL0IBAQFgAAADAJAAAAMAAAMAlqAB4CACHFllZpJMrwFqAggECAAAAwAIAAADAAhAAAAAB0QBwXK0YkAAAAevKAGvEwRHlP3jty4cOG7Zs2bNmzZs2bNWrVq1atWrVq1atWvmaOP//ELPx/ZALViY7a74AkAM0PIAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAX8Cl73K4BcAfImAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAIWAkwKEKkAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMDMocAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMCkgAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAABgwAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAasAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAFZAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAg4AAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMCJgAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAABFQAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAkIAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAAPqAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAHJAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAACugAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAABDQAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAX8AAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAIqAAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAC2gAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAA54AAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAASkAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAXUAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAdMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAhYAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAmoAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAq4AAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAvoAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAA04AAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAA5IAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAA84AAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAA+oAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMABCwAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMABEwAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMABHQAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAgIA=",di),bi="kwai-kernel-hevc",Ei="playback-hevc-test",wi=function(){function e(t){var i=this;this.J=void 0,this.Ii=new yt,this.Hn=void 0,this.Wn=[h.FHD,h.UHD_4K],this.Gn=0,this.Qn=void 0,this.Yn=function(){var t,n;i.J.i(Ei,"on video event. "+(null==(t=e.Jn)?void 0:t.videoWidth)+" "+(null==(n=e.Jn)?void 0:n.error)),i.Qn?(i.Qn[i.Wn[i.Gn]]=!!e.Jn&&e.Jn.videoWidth>0&&!e.Jn.error,i.Gn++,i.Gn<i.Wn.length?(i.Zn(),i.zn(i.Wn[i.Gn])):i.Kn()):i.Kn()},this.J=t}var t=e.prototype;return t.init=function(e){if(this.J.i(Ei,"init"),e>0){var t=this.Ii.read(bi,e);this.J.i(Ei,"load from ls",t);try{void 0!==t&&Object.prototype.hasOwnProperty.call(t,h.FHD)&&Object.prototype.hasOwnProperty.call(t,h.UHD_4K)&&(et.playHEVCTest=t,this.Qn=et.playHEVCTest)}catch(e){this.J.i(Ei,"load ls error")}}},t.start=function(){var t;this.J.i(Ei,"start");var i=void 0!==this.Qn||e.Jn;this.J.i(Ei,"start. tested: "+i),i||null!=(t=e.Jn)&&t.src||this.qn()},t.destroy=function(){this.Ze(),this.Zn()},t.Kn=function(){this.J.i(Ei,"complete result:",this.Qn,performance.now()),this.Ze(),this.Zn(),et.playHEVCTest=this.Qn,this.Ii.write(bi,this.Qn)},t.qn=function(){var e;this.J.i(Ei,"start video test"),Ke()?this.Kn():(this.Xn(),this.Qn=((e={})[h.FHD]=!1,e[h.UHD_4K]=!1,e),this.Gn=0,this.zn(this.Wn[0]))},t.zn=function(t){this.J.i(Ei,"test: "+t),e.Jn||(e.Jn=document.createElement("video")),e.Jn.preload="metadata",e.Jn.addEventListener("error",this.Yn),e.Jn.addEventListener("loadeddata",this.Yn),e.Jn.addEventListener("loadedmetadata",this.Yn),e.Jn.src=yi[t],e.Jn.play().catch((function(){}))},t.Zn=function(){e.Jn&&(e.Jn.removeEventListener("error",this.Yn),e.Jn.removeEventListener("loadeddata",this.Yn),e.Jn.removeEventListener("loadedmetadata",this.Yn),e.Jn.src="")},t.Xn=function(){var e=this;this.Ze(),this.Hn=setTimeout((function(){e.J.i(Ei,"timeout"),e.Kn()}),1e3)},t.Ze=function(){this.Hn&&(clearTimeout(this.Hn),this.Hn=void 0)},e}();wi.Jn=void 0;var Ti=wi,Ri=i(9),Si=i.n(Ri),Li="av-ctx",ki=function(e){function t(t,i){var n;return(n=e.call(this)||this).video=void 0,n.mse=void 0,n.stat=new Mt,n.loadRec=void 0,n.lctx=void 0,n.$n=[],n.tr=0,n.ir=0,n.er=void 0,n.Re=void 0,n.nr=!1,n.rr=!1,n.Ar=void 0,n.sr=void 0,n.ur=new Nt,n.ar=void 0,n.hr=void 0,n._=void 0,n.J=void 0,n.ot=void 0,n.cr=void 0,n.vr=void 0,n.dr=void 0,n._=Et.next(),n.J=(new nt.Logger).setName("kwai-k").setId(n._),n.ot=new Pt,n.video=i,n.sr=new Kt(n.J),n.hr=new Ti(n.J),n.lctx=new Ft(n.J,!0),n.cr=new Fe(n),n.vr=new Lt(n),n.dr=new Tt(n),n.lr(Z.processConfig(t)),n.sr&&n.F.push(n.sr),n.F.push(n.hr,n.cr,n.vr,n.dr),n}l()(t,e);var i=t.prototype;return i.destroy=function(){var t;this.logger.i(Li,"destroy"),null==(t=this.stat.muxWorker)||t.terminate(),this.pr(),this.mr(),this.ot.removeAllListeners(),e.prototype.destroy.call(this)},i.updateVideoPlaybackQuality=function(e,t){this.stat.videoPlaybackQuality?(this.stat.videoPlaybackQuality.droppedVideoFrames=t,this.stat.videoPlaybackQuality.totalVideoFrames=e):this.stat.videoPlaybackQuality={corruptedVideoFrames:0,creationTime:0,droppedVideoFrames:t,totalVideoFrames:e}},i.isTimeinBuffered=function(e){if(this.video)for(var t=this.video.buffered,i=0;i<t.length;i++)if(e>=t.start(i)&&e<t.end(i))return!0;return!1},i.currentBuffer=function(e){if(this.video)for(var t=this.video.buffered,i=0;i<t.length;i++){var n=t.start(i),r=t.end(i);if(n<=e&&e<r)return{start:n,end:r}}},i.nextBuffer=function(e){if(this.video)for(var t=this.video.buffered,i=0;i<t.length;i++){var n=t.start(i),r=t.end(i);if(n>e)return{start:n,end:r}}},i.getLiveShiftKwai2OffsetUTC=function(e){return this.stat.liveStartTime+e},i.getLiveShiftKwai2Duration=function(){return(this.sr.now-this.stat.liveStartTime)/1e3},i.getKwai2LiveShiftReloadInterval=function(){var e=this.lctx.current;if(e){if(e.fragments.length>1&&"number"==typeof this.stat.liveShiftOffset){var t=e.fragments[e.fragments.length-2];return Math.max((e.averagetargetduration||e.targetduration)*ht,(this.stat.liveShiftOffsetAligned||this.stat.liveShiftOffset)+t.start*ht-this.currentTime*ht)/this.playbackRate}return(e.averagetargetduration||e.targetduration)*ht/this.playbackRate}return 1e4/this.playbackRate},i.getKwai2LiveShiftUrl=function(e){var t=this.lctx.current,i=ve()(e,!0),n=this.stat.liveShiftKwai2Params;if(this.sr){if("seqId"===n.paramName){var r=t.fragments[t.fragments.length-1],o=n.seqId||(null==r?void 0:r.sn);if("number"==typeof o)return i.query.seqID=o.toString(),i.toString()}return n.time=Math.round(this.getLiveShiftKwai2OffsetUTC(this.stat.liveShiftOffset||0)),i.query.startTime=n.time.toString(),i.toString()}return i.toString()},i.getLiveDelay=function(){var e=this.stat,t=this.Re,i=10;if(e.multipart){var n=this.lctx.current;i=(null==n?void 0:n.averagetargetduration)||(null==n?void 0:n.targetduration)||i}return e.box===m.flv?-this.Re.defaultSpts:V(e.box)?this.isLiveShift?t.liveShiftDelaySec*ht:i*ht*(t.liveDelayFragNum||1):-this.Re.defaultSpts},i.initLiveShiftKwai2StartSec=function(){if(this.isLiveShiftKwai2){var e=this.stat.startFromSec>=0?this.stat.startFromSec:this.liveLocalTime;this.J.i(Li,"init liveshift kwai2 start from sec: "+e+" startFromSec: "+this.stat.startFromSec+" live: "+this.liveLocalTime+" duration: "+this.getLiveShiftKwai2Duration()),e>0&&(this.stat.startFromSec=e,this.stat.liveShiftOffset=1e3*e,this.stat.liveShiftOffsetAligned=void 0,this.updateLiveShiftStatuByTime(e))}},i.getRemuxConfig=function(){var e=this.Re,t={isLive:this.stat.isLive,logLevel:e.logLevel,enableSoftwareAES:e.enableSoftwareAES,gopRemux:this.stat.gopRemux,preferDecoder:e.preferDecoder,streamingMux:this.streamingMux,ensureVideo:e.ensureVideo,maxAudioFramesDrift:e.maxAudioFramesDrift,forceKeyFrameOnDiscontinuity:e.forceKeyFrameOnDiscontinuity,wasmDecoderEnabled:e.wasmDecoderEnabled,enableAacPriv:e.enableAacPriv,audioEnabled:e.audioEnabled,videoEnabled:e.videoEnabled,mseDecErrSkip:e.mseDecErrSkip,adjustFragTime:e.adjustFragTime};return this.video instanceof HTMLAudioElement&&(this.J.i(Li,"HTMLAudioElement. set videoEnabled false."),t.videoEnabled=!1),t.preferDecoder=void 0,t},i.getDecConfig=function(){var e=this.Re;return{logLevel:e.logLevel,videoDropFramePolicy:e.videoDropFramePolicy,videoFrameBufferSize:e.videoFrameBufferSize,videoDecBlockPolicy:e.videoDecBlockPolicy,maxVideoDecThreads:e.maxVideoDecThreads,mainThreadRendering:e.mainThreadRendering,mainThreadDecoding:e.mainThreadDecoding,preferCanvasType:e.preferCanvasType,preferCanvasColorSpace:e.preferCanvasColorSpace}},i.setSrc=function(e,t){this.logger.i(Li,"set src",e),e&&(this.jt(),this.resetStreamingEnabled(),this.ar=void 0,this.loadRec=new zt),this.yr(e,t)},i.reProcessSrc=function(e,t){this.logger.i(Li,"reprocess src. codecType: "+e+" native: "+t+", has origin src: "+!!this.er),this.er&&this.Mr(this.er,e,t)},i.updateLiveShiftStatuByTime=function(e){var t;if(this.isLiveShift&&(void 0===e&&(e=null==(t=this.video)?void 0:t.currentTime),this.lctx.current&&"number"==typeof e&&Number.isFinite(e))){var i=this.liveLocalTime;i>0&&(this.stat.liveShiftActive=!!(i&&e<i-5),this.J.i(Li,"update live shift statu by time. type: "+this.stat.liveShiftType+" "+this.stat.liveShiftActive+", time: "+e+" ed: "+i))}},i.resetStreamingEnabled=function(){var e=this.Re;this.nr=this.rr=!(!e.streamingMux||!Z.isStreamingSupported()||j.msie||j.safari&&(!1===this.stat.isLive||this.stat.multipart)||j.msedge&&j.version.major<88&&(!1===this.stat.isLive||this.stat.multipart)),this.logger.i(Li,"resetStreamingEnabled: "+this.nr)},i.resetGopRemux=function(){this.stat.multipart&&!this.nr?this.stat.gopRemux=!1:this.stat.gopRemux=!!(j.safari||j.opera&&j.version.major<37),this.logger.i(Li,"resetGopRemux: "+this.stat.gopRemux)},i.hasNextMediaDesc=function(){return this.tr+1<this.$n.length},i.nextMediaDesc=function(){if(this.hasNextMediaDesc()){this.tr++;var e=this.$n[this.tr];if(e)return this.J.i(Li,"next media desc."),this.wr(e),!0}return!1},i.lr=function(e){if(this.Re=e,!e.logLevel){var i=nt.Logger.loadLogLevel("kwai-kernel-log");e.logLevel=i||nt.DEFAULT_LOG_LEVEL}var n;if(e.logger&&this.J.setOutput(e.logger),this.J.setLevel(e.logLevel),this.J.getLevel()!==nt.LogLevel.NONE&&(n=t.version,j.msie||console.log("%c kwai-player-kernel %c "+n+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px; color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0; color: #fff","background:transparent")),this.logger.i(Li,"logger init."),this.logger.i(Li,"set config"),this.hr.init(this.Re.playbackAbilityCacheTimeout),this.resetStreamingEnabled(),this.logger.i(Li,"browser",JSON.stringify(j)),Ke()||this.logger.i(Li,"ua",navigator.userAgent),this.jt(),this.ar=void 0,this.stat.startFromSec=e.startFromSec>=0?e.startFromSec:"number"==typeof e.startFrom&&e.startFrom>=0?e.startFrom/1e3:-1,this.stat.webWorker=e.webWorker&&!!J.a,"boolean"==typeof e.preferNativeLoader&&(this.stat.preferNativeLoader=e.preferNativeLoader),this.Re.autoPlaybackRateConf)this.logger.i(Li,"use config.autoPlaybackRateConf",this.Re.autoPlaybackRateConf),this.stat.autoPlaybackRateConf=this.Re.autoPlaybackRateConf;else{var r=-Math.floor(this.Re.defaultSpts/ht);this.stat.autoPlaybackRateConf=function(e,t,i){void 0===i&&(i=3);var n={startDelay:0,interval:.6,rule:[]};return kt(e,t,i,n),n}(this.J,r),this.logger.i(Li,"use default autoPlaybackRateConf",this.stat.autoPlaybackRateConf),this.J.i(Li,"get by delay: "+r)}try{this.stat.webWorker&&(this.stat.muxWorker=Si()(3)),Kt.workerTimeOffset=performance.now(),this.logger.i(Li,"init mux worker")}catch(e){}e.lazyLoadMaxDuration>0&&e.lazyLoadRecoverDuration>0&&e.lazyLoadMaxDuration>=e.lazyLoadRecoverDuration&&(this.stat.lazyLoadMaxDuration=e.lazyLoadMaxDuration,this.stat.lazyLoadRecoverDuration=e.lazyLoadRecoverDuration),this.loadRec=new zt,e.src&&this.yr(e.src)},i.jt=function(){this.logger.i(Li,"reset stat");var e=this.Re,t=this.stat;this.rr=this.nr;var i=t.preferNativeLoader;t.reset(),this.resetGopRemux(),this.vr.reset(),this.cr.reset(),t.isLive=e.isLive,t.native=e.nativeFirst,t.liveShiftType=this.Re.liveShiftType,t.preferNativeLoader=i,this.stat=t},i.yr=function(e,t){this.tr=0,this.ir=Date.now(),this.Mr(e,t)},i.Mr=function(e,t,i){this.J.i(Li,"process src. codec: "+t+" native: "+i),e&&(this.er=e);var n=this.config;this.$n=gi.preParse(this.J,e,"boolean"==typeof i?i:n.nativeFirst,t,n.baseURL);var r=this.$n[this.tr];r&&this.wr(r)},i.wr=function(e){var t,i,n,r,o,a,s=this.config,u=this.stat;null==(t=this.Ar)||t.reset(),this.stat.srcType===_.FILE&&this.pr();var l,c,h=this.lctx=new Ft(this.J,s.adaptive);if(u.codecType=e.codecType?e.codecType:d.unknown,u.box=s.box||e.box||m.unknown,u.srcType=e.srcType,u.mixContainerInput=e.mixContainerInput,u.mixCodecInput=e.mixCodecInput,u.mixCodecAvailable=e.mixCodecAvailable,u.multipart=e.multipart,u.stereoType=null==(i=e.mediaLevels)?void 0:i.stereoType,null!=(n=e.mediaLevels)&&n.meta&&(u.srcMeta=null==(l=e.mediaLevels)?void 0:l.meta,this.liveTime&&"number"==typeof e.mediaLevels.meta.programStartTime&&(this.stat.liveStartTime=e.mediaLevels.meta.programStartTime)),s.liveDelayFragNum&&s.liveDelayFragNum>0&&u.multipart&&!s.autoPlaybackRateConf){var f=this.getLiveDelay();kt(this.J,f/1e3,10,u.autoPlaybackRateConf),this.J.i(Li,"update by delay: "+f+".",s)}void 0!==e.nativeFirst&&(u.native=e.nativeFirst),"boolean"==typeof e.isLive&&(u.isLive=e.isLive),!0===e.isLiveShift&&(u.liveShiftType=k.KWAI2),"boolean"==typeof(null==(r=e.mediaLevels)?void 0:r.isLive)&&(u.isLive=e.mediaLevels.isLive),h.hasAudio=null==(o=e.mediaLevels)?void 0:o.hasAudio,h.hasVideo=null==(a=e.mediaLevels)?void 0:a.hasVideo,!e.mediaLevels||e.srcType===_.OTHERS&&V(u.box)&&!u.native||(this.J.i(Li,"src. get levels from src."),u.drm=e.mediaLevels.drm,this.lctx.levels=e.mediaLevels.levels,this.lctx.default=this.lctx.currentIdx=e.mediaLevels.def,e.mediaLevels.audioTracks&&(this.lctx.audioTracks=e.mediaLevels.audioTracks,this.lctx.audioIdx=e.mediaLevels.defAudio||0),e.mediaLevels.subtitleTracks&&(this.lctx.subtitleTracks=e.mediaLevels.subtitleTracks,this.lctx.subtitleIdx=e.mediaLevels.defSubtitle||0)),this.lctx.default=function(e){if(!j.mobile||e.levels.length<=1||e.levels[0].vCodecType!==d.hevc)return e.default;var t,i;if(e.levels.forEach((function(e,n){if(e.width&&e.height){var r=Math.min(e.width,e.height);r>720?i=i&&r>i.minWH?i:{idx:n,minWH:r}:t=t&&t.minWH>r?t:{idx:n,minWH:r}}})),!t||!i)return e.default;if(j.android)return parseFloat(j.platformVersion||"")>=10?i.idx:t.idx;if(j.iphone){var n=Ot();return"unknown"===n?typeof window<"u"&&window.screen&&(window.screen.width>400||window.devicePixelRatio>2)?i.idx:t.idx:-1===[It.SERIES_1,It.SERIES_2,It.SERIES_3,It.SERIES_4,It.SERIES_8].indexOf(n)?i.idx:t.idx}return e.default}(this.lctx),this.config.ntp&&!1!==this.stat.isLive&&this.stat.box===m.flv&&(null==(c=this.sr)||c.ntpSync(this.stat.preferNativeLoader)),this.resetStreamingEnabled(),this.resetGopRemux(),this.logger.i(Li,"use media desc complete. box: "+u.box+" live: "+u.isLive+" native: "+u.native+" mobile: "+!!j.mobile+" gopRemux: "+u.gopRemux+" streamingMux: "+this.streamingMux+" liveShift: "+u.liveShiftType+" mixCodec: "+u.mixCodecInput+" levelCnt: "+h.levels.length+" hasVideo: "+h.hasVideo+" hasAudio: "+h.hasAudio)},i.pr=function(){this.lctx&&this.lctx.levels.forEach((function(e){e.url.forEach((function(e){0===e.indexOf("blob:")&&URL.revokeObjectURL(e)}))}))},i.mr=function(){this.Ar&&(this.Ar.destroy(),this.Ar=void 0)},s()(t,[{key:"isLiveShiftKwai2",get:function(){return this.stat.liveShiftType===k.KWAI2}},{key:"isLiveShift",get:function(){return this.stat.liveShiftType!==k.NONE}},{key:"logger",get:function(){return this.J}},{key:"id",get:function(){return this._}},{key:"live",get:function(){return!(!this.stat.isLive||this.stat.liveShiftActive)}},{key:"isDownloadInterruptible",get:function(){return!(this.live&&!1===this.stat.multipart)}},{key:"liveLocalTime",get:function(){var e=this.lctx.current;if(this.isLiveShift){var t,i,n=Number.isFinite(null==(t=this.video)?void 0:t.duration)?null==(i=this.video)?void 0:i.duration:this.isLiveShiftKwai2?this.getLiveShiftKwai2Duration():(null==e?void 0:e.totalduration)||0;if(n)return n-(this.getLiveDelay()/ht+.1)}else if(e&&e.totalduration)return e.totalduration-(this.getLiveDelay()/ht+.1);return 0}},{key:"yuvParams",get:function(){return this.ar}},{key:"canCodecFallback",get:function(){return!(!this.stat.mixCodecInput||this.stat.codecType===d.h264||-1===this.stat.mixCodecInput.indexOf(d.h264)||this.stat.decoder!==v.buildin)}},{key:"fps",get:function(){return this.ur}},{key:"liveTime",get:function(){return this.sr}},{key:"cOutput",get:function(){if(J.a)return this.Ar||(this.Ar=new J.a(this.J,this.Re)),this.Ar}},{key:"isAbrAvailable",get:function(){return this.Re.adaptive&&this.lctx.levels.length>1&&!this.isSwitchLevelByReload&&!this.isLiveShift}},{key:"isSwitchLevelByReload",get:function(){return!(this.stat.box===m.flv&&!1!==this.stat.isLive&&!j.firefox&&!1!==this.Re.videoEnabled||V(this.stat.box))}},{key:"mediaBufferedSec",get:function(){return this.video&&this.video.buffered&&this.video.buffered.length?{start:this.video.buffered.start(0),end:this.video.buffered.end(this.video.buffered.length-1)}:{start:0,end:0}}},{key:"bufferedSt",get:function(){return this.video&&this.video.buffered.length?this.video.buffered.start(0):-1}},{key:"bufferedEnd",get:function(){return this.video&&this.video.buffered.length?this.video.buffered.end(this.video.buffered.length-1):0}},{key:"bufferedSec",get:function(){return this.video&&this.video.buffered.length>0?Math.max(0,this.video.buffered.end(this.video.buffered.length-1)-this.video.currentTime):0}},{key:"bufferSliceNum",get:function(){return this.video?this.video.buffered.length:0}},{key:"currentTime",get:function(){return this.video?this.video.currentTime:0}},{key:"playbackRate",get:function(){return this.video?this.video.playbackRate:1}},{key:"config",get:function(){return this.Re}},{key:"src",get:function(){var e;return(null==(e=this.$n[this.tr])?void 0:e.src)||""}},{key:"srcUpdateTime",get:function(){return this.ir}},{key:"originSrc",get:function(){return this.er}},{key:"videoPlaybackQuality",get:function(){return this.stat.videoPlaybackQuality?this.stat.videoPlaybackQuality:this.video instanceof HTMLVideoElement?void 0!==this.video.getVideoPlaybackQuality?this.video.getVideoPlaybackQuality():{corruptedVideoFrames:0,creationTime:0,droppedVideoFrames:this.video.webkitDecodedFrameCount||0,totalVideoFrames:this.video.webkitDroppedFrameCount||0}:void 0}},{key:"demuxerType",get:function(){return this.stat.demuxerType},set:function(e){this.logger.i(Li,"set demuxer type",e);var t=this.stat;if(e!==t.demuxerType){var i=void 0===t.box||t.box===m.unknown;e===X.RAW?(t.box=m.raw,t.isLive=!1):e===X.FLV?(t.box=m.flv,t.multipart&&(t.isLive=!1)):e===X.MP4||e===X.FMP4?(i&&(t.box=m.mp4),t.multipart||(t.isLive=!1)):e===X.TS?i&&(t.box=m.ts):e===X.IVF&&(t.box=m.ivf,t.isLive=!1),t.demuxerType=e,this.resetGopRemux()}}},{key:"streamingMuxEnabled",get:function(){return this.nr&&!(this.src instanceof Blob)},set:function(e){this.nr=e}},{key:"streamingMux",get:function(){return this.stat.box===m.flv&&!1!==this.stat.isLive||this.streamingMuxEnabled&&this.rr},set:function(e){this.rr=e}},{key:"hevcTest",get:function(){return this.hr}},{key:"evt",get:function(){return this.ot}},{key:"fallback",get:function(){return this.cr}},{key:"streamTime",get:function(){return this.vr}}],[{key:"packName",get:function(){return"mini_es"}},{key:"version",get:function(){return"3.3.37"}},{key:"buildTime",get:function(){return"Mon Jan 20 2025 18:07:08 GMT+0800 (中国标准时间)"}}])}(O);ki.instanceCount=0;var Ii,xi=ki,Oi=function(e){return e.NORMEL="normal",e.SEEK="seek",e.END="end",e.LEVEL_SWITCH="levelSwitch",e.FIRST_FRAME="firstFrame",e.LOAD="load",e.BACKUP="backup",e}({}),Ci=function(e){return e.START="start",e.MANIFEST="manifest",e.LEVEL="level",e.STREAM_CONNECTED="streamConnected",e.DATA="data",e.DEMUX="demux",e.SEGMENT="segment",e.CANPLAY="canplay",e.LOADEDMETADATA="loadedmetadata",e.LOADEDDATA="loadeddata",e.SEEKED="seeked",e}(Ci||{}),Di=[{event:Ci.START,detailName:"first-loader-open"},{event:Ci.MANIFEST,detailName:"manifest-duration"},{event:Ci.LEVEL,detailName:"level-duration"},{event:Ci.STREAM_CONNECTED,detailName:"stream-connected-duration"},{event:Ci.DATA,detailName:"first-package-duration"},{event:Ci.DEMUX,detailName:"first-remux-duration"},{event:Ci.SEGMENT,detailName:"first-segment-duration"},{event:Ci.LOADEDMETADATA,detailName:"first-meta-duration"},{event:[Ci.LOADEDDATA,Ci.CANPLAY,Ci.SEEKED],detailName:"first-frame-duration"}],Mi="first-frame",Ni=function(){function e(e){this.br=0,this.gr=0,this.C=void 0,this.kr=0,this._r=0,this.Er={},this.ut=void 0,this.J=void 0,this.C=Di.slice(0),this.ut=e,this.J=e.logger}var t=e.prototype;return t.start=function(){this.J.i(Mi,"start"),this.br=0,this.kr=performance.now(),this.gr=0,this.C=Di.slice(0),this._r=0,this.Er={},this.process(Ci.START,this.kr)},t.process=function(e,t){var i;if(void 0===t&&(t=0),this.J.i(Mi,"process type: "+e+" "+t+" complete: "+this.br),this.br)return!1;var n=this.C,r=-1;t=t||performance.now();for(var o=0;o<n.length;o++){var a=n[o];if(Array.isArray(a.event)){if(-1!==a.event.indexOf(e)){r=o;break}}else if(a.event===e){r=o;break}}if(-1===r)return!1;var s=n.splice(0,r+1).pop(),u="closed"===(null==(i=this.ut.mse)?void 0:i.readyState);if((0===n.length||u&&e===Ci.SEGMENT)&&(this.gr=t-this.kr,this.br=Date.now(),this.J.i(Mi,"complete "+this.gr+" "+this.br)),s){var l=Math.round(t-this._r);0===this._r&&(l=Date.now()),this._r=t,this.Er[s.detailName]=l}return!!this.br},t.onDownloadError=function(){this.Er.download_retry?this.Er.download_retry++:this.Er.download_retry=1},t.onRetry=function(){this.Er.retry?this.Er.retry++:this.Er.retry=1},s()(e,[{key:"complete",get:function(){return this.br}},{key:"duration",get:function(){return this.gr}},{key:"details",get:function(){return this.Er}}])}(),Pi=[/headless/,/spider/,/[a-z0-9]+bot[^a-z0-9]/],Ui=function(e){return e.none="",e.probably="probably",e.maybe="maybe",e}(Ui||{}),Fi=function(){if(Ke())return Ui.none;if(navigator.webdriver)return Ui.probably;for(var e=navigator.userAgent.toLowerCase(),t=0;t<Pi.length;t++)if(Pi[t].test(e))return Ui.probably;if(window.innerWidth<=0&&window.innerHeight<=0)return Ui.probably;if(et.isMSEAvailable()&&!et.isMSECodecCapabilityNormal())return Ui.maybe;try{var i=document.createElement("canvas");i.width=4,i.width=4;var n=i.getContext("2d");if(n){n.fillStyle="#FFFFFF",null==n||n.fillRect(0,0,i.width,i.height);for(var r=n.getImageData(0,0,i.width,i.height).data,o=0;o<r.length;o++)if(0!==r[o])return Ui.none;return Ui.maybe}}catch(e){return Ui.probably}return Ui.none}(),Bi={};try{var Hi;null==(Hi=navigator.userAgentData)||Hi.getHighEntropyValues(["architecture","bitness","model","platform","platformVersion"]).then((function(e){o()(Bi,e)}))}catch(n){}var Vi=new Uint8Array(16);function Gi(){if(!Ii&&!(Ii=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ii(Vi)}for(var ji=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Wi=function(e){return"string"==typeof e&&ji.test(e)},Ki=[],zi=0;zi<256;++zi)Ki.push((zi+256).toString(16).substr(1));var Ji,qi=function(e,t,i){var n=(e=e||{}).random||(e.rng||Gi)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){i=i||0;for(var r=0;r<16;++r)t[i+r]=n[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(Ki[e[t+0]]+Ki[e[t+1]]+Ki[e[t+2]]+Ki[e[t+3]]+"-"+Ki[e[t+4]]+Ki[e[t+5]]+"-"+Ki[e[t+6]]+Ki[e[t+7]]+"-"+Ki[e[t+8]]+Ki[e[t+9]]+"-"+Ki[e[t+10]]+Ki[e[t+11]]+Ki[e[t+12]]+Ki[e[t+13]]+Ki[e[t+14]]+Ki[e[t+15]]).toLowerCase();if(!Wi(i))throw TypeError("Stringified UUID is invalid");return i}(n)},Yi=(new Date).getTimezoneOffset()/-60;function Qi(){return Ji||(Ji={support_mse:et.isMSEAvailable()?1:0,support_aac_mse:et.TYPE_SUPPORTED.aac?1:0,support_aac:et.isVideoCodecSupported(d.aac)?1:0,support_h264_mse:et.TYPE_SUPPORTED.h264?1:0,support_h264:et.isVideoCodecSupported(d.h264)?1:0,support_h265_mse:et.TYPE_SUPPORTED.hevc?1:0,support_h265:et.isVideoCodecSupported(d.hevc)?1:0,support_av1_mse:et.TYPE_SUPPORTED.av1?1:0,support_simd:et.isSupportSimd?1:0,support_thread:et.isSupportThreads?1:0,support_hw:et.isSupportHW?1:0,support_change_type:et.isChangeTypeSupported()?1:0,support_streaming:Z.isStreamingSupported()?1:0,hardware_concurrency:We()||0,wasm_dec_smooth:et.wasmSmooth?1:0}),Ji}function Zi(e,t){var i,n;return typeof navigator<"u"&&(navigator.webdriver&&(i=navigator.webdriver?1:0),void 0!==navigator.onLine&&(n=navigator.onLine?1:0)),{session_id:t.sessionId,kernel_version:xi.version,pack_name:xi.packName,creation_time:t.creationTime,time_zone:Yi,src_update_time:e.srcUpdateTime,load_start_time:t.loadStartTime,instance_count:xi.instanceCount,webdriver:i,on_line:n}}function Xi(){var e={};if(typeof navigator<"u"){void 0!==navigator.onLine&&(e.network_on_line=navigator.onLine?1:0);var t=navigator.connection||navigator.mozConnection||navigator.webkitConnection;void 0!==(null==t?void 0:t.rtt)&&(e.network_rtt=t.rtt),void 0!==(null==t?void 0:t.rtt)&&(e.network_downlink=t.downlink),void 0!==(null==t?void 0:t.effectiveType)&&(e.network_effective_type=t.effectiveType),void 0!==(null==t?void 0:t.saveData)&&(e.network_save_data=t.saveData?1:0)}return e}function $i(e,t){var i,n,r,a,s=null==(i=e.video)?void 0:i.duration,u=e.lctx.current,l=(null==u?void 0:u.currentUrl)||"",c=o()({play_url:(null==u?void 0:u.fileName)||l,url_id:(null==u?void 0:u.urlId)||0,stream_host:l?new ve.a(l).host:"",reuse:t.reuse,metadata_time:t.metadataTime,play_start_time:t.playStartTime,playing_start_time:t.playingStartTime,stream_duration:Math.round(1e3*(s&&Number.isFinite(s)?s:0)),max_bitrate:(null==u?void 0:u.maxBitrate)||0,codec:t.codecs,play_pos:t.playPos||0,v_data_rate:Math.round((null==(n=e.loadRec.currentLoad)?void 0:n.videoDataRate)||0),a_data_rate:Math.round((null==(r=e.loadRec.currentLoad)?void 0:r.audioDataRate)||0),drm:e.stat.drm?1:0,adaptive_multi_rate:e.lctx.abr?1:0,use_backup:t.useBackup,play_to_end:t.playToEnd,v_decoder:e.stat.decoder,video_codec_type:e.stat.codecType||d.unknown,start_codec:t.startCodec,demuxer:e.stat.demuxerType||X.UNKNOWN,core_type:e.stat.coreType,mms:e.stat.mms?1:0,box:e.stat.box,kwai_slice:e.stat.isKwaiSlice?1:0,monkey_patched_fetch:t.monkeyPatchedFetch},Zi(e,t),Xi(),(a=e.video)?{elem_crossorigin:a.crossOrigin,elem_autoplay:a.autoplay?1:0,elem_loop:a.loop?1:0,elem_volume:a.volume,elem_muted:a.muted?1:0,elem_preload:a.preload,elem_controls:a.controls?1:0,elem_ready_state:a.readyState,elem_network_state:a.networkState,elem_playback_rate:a.playbackRate,elem_paused:a.paused?1:0,elem_ended:a.ended?1:0,elem_seeking:a.seeking?1:0,elem_tag_name:a.tagName}:{});e.stat.flvAbrNotAligned&&(c.flv_abr_not_aligned=1),"boolean"==typeof et.playHEVCTest&&(c.play_hevc_test=et.playHEVCTest?1:0),void 0!==e.stat.isLive&&(c.live=e.stat.isLive?1:0),c.live_shift_type=e.stat.liveShiftType;var h=function(e){var t=new ve.a(e).pathname,i=pe(e),n=i===m.flv||V(i)||i===m.ts,r="",o="",a=t.split("/"),s=a[a.length-1]||"";if(n){try{var u=t.lastIndexOf("/");u>=0&&(t=t.slice(u+1));var l=t.split(".")[0].split("_");1===l.length?(r=ye(l[0]),o=ge(e)):2===l.length?(r=ye(l[0]),o=ye(l[1])):l.length>2&&(r=ye(l.slice(0,l.length-1).join("_")),o=ye(l[l.length-1]))}catch(e){}return{streamID:r,transcodingTpl:o,filename:s}}return{streamID:"",transcodingTpl:ge(e),filename:s}}((null==u?void 0:u.fileName)||l);e.stat.box===m.flv&&!1!==e.stat.isLive&&(c.stream_id=h.streamID),t.httpHeader&&(c.response_header=function(e){var t=[];if(e)for(var i in e){var n=e[i];n&&t.push(i+": "+(Array.isArray(n)?n.join(","):n).slice(0,255))}if(t.length)return t.length>20?(t.sort((function(e,t){return U(t)-U(e)})),t.slice(0,20)):t}(t.httpHeader)),null!=u&&u.bitrate&&(c.bitrate=Math.round(u.bitrate)),null!=u&&u.qualityType&&(c.quality_type=u.qualityType),null!=u&&u.qualityLabel&&(c.quality_label=u.qualityLabel),t.startQualityType&&(c.start_quality_type=t.startQualityType),h.transcodingTpl&&(c.transcoding_template=h.transcodingTpl),h.filename&&(c.filename=h.filename),typeof navigator<"u"&&navigator.deviceMemory&&(c.device_memory=navigator.deviceMemory);var f=Ge();return f.renderer&&(c.gpu_renderer=f.renderer),Fi&&(c.bot=Fi),t.canvasCtxType&&(c.canvas_ctx=t.canvasCtxType),e.stat.wasmDecoder&&(c.wasm_dec=e.stat.wasmDecoder,c.wasm_dec_simd=e.stat.wasmSimd?1:0,c.wasm_dec_threads=e.stat.wasmThreads||0),c}function en(e){var t={};if(e.metadata)for(var i in e.metadata){if(Object.keys(t).length>50)break;var n=e.metadata[i];"string"==typeof n?t[i]=n.substring(0,50):"number"!=typeof n&&"boolean"!=typeof n||(t[i]=n)}return t}function tn(){var e={};return Bi&&(Bi.architecture&&(e.architecture=Bi.architecture),Bi.bitness&&(e.bitness=Bi.bitness),Bi.model&&(e.model=Bi.model),Bi.platform&&(e.platform=Bi.platform),Bi.platformVersion&&(e.platform_version=Bi.platformVersion)),e}function nn(){var e={};return j.platformVersion&&(e.platform=j.platform||"",e.platform_version=j.platformVersion||0),j.iphone?e.model=Ot():j.model&&(e.model=j.model),j.version&&(e.browser_name=j.name||"",e.browser_major=j.version.major||0),e}function rn(){var e,t,i,n={};return Ke()||(null!=(e=window.screen)&&e.width&&(n.screen_w=window.screen.width),null!=(t=window.screen)&&t.height&&(n.screen_h=window.screen.height),null!=(i=window.screen)&&i.colorDepth&&(n.screen_color_depth=window.screen.colorDepth),n.device_pixel_ratio=window.devicePixelRatio||1),n}function on(e){var t={};return e&&(e.fps&&(t.fps=Math.round(1e3*e.fps)/1e3),e.width&&(t.width=e.width),e.height&&(t.height=e.height),e.codedWidth&&(t.coded_width=e.codedWidth),e.codedHeight&&(t.coded_height=e.codedHeight),e.sar&&e.sar.width!==e.sar.height&&(t.sar=e.sar),e.enhancedFlv&&(t.enhanced_flv=e.enhancedFlv?1:0)),t}function an(e){var t={src_type:e.stat.srcType};return e.stat.stereoType&&(t.stereo_type=e.stat.stereoType),e.stat.mixCodecInput&&e.stat.mixCodecInput.length&&(t.mix_codec_input=e.stat.mixCodecInput),e.stat.mixContainerInput&&e.stat.mixContainerInput.length&&(t.mix_container_input=e.stat.mixContainerInput),e.stat.mixCodecAvailable&&(t.mix_codec_available=e.stat.mixCodecAvailable),t}function sn(e){var t={};return e.stat.srcMeta&&(t.src_meta=e.stat.srcMeta),t}function un(e){var t,i,n,r={};return null!=(t=e.lctx.current)&&t.meta&&(r.current_level_meta=e.lctx.current.meta,e.lctx.current.meta.comment&&e.lctx.current.meta.comment.split("/").forEach((function(e){0===e.indexOf("tt=")&&(r.transcoding_template=e.substring(3)),0===e.indexOf("ttExplain=")&&(r.transcoding_template_explain=e.substring(10))}))),null!=(i=e.lctx.current)&&i.fileSize&&(r.filesize=null==(n=e.lctx.current)?void 0:n.fileSize),r}function ln(e){var t=performance.now();return{play:Math.round(e.playDuration+(e.playStartMS?t-e.playStartMS:0)),actualPlay:Math.round(e.actualPlayDuration+(e.actualPlayStartMS?t-e.actualPlayStartMS:0)),pause:Math.round(e.pauseDuration+(e.pauseStartMS?t-e.pauseStartMS:0)),buffer:Math.round(e.bufferTime+(e.bufferingStartMS?t-e.bufferingStartMS:0))}}function cn(){return document.hidden||document.webkitHidden||document.mozHidden||!0}var dn=function(){function e(e,t){this.Rr=void 0,this.ut=void 0,this.Dr=void 0,this.Tr=1,this.Sr=0,this.Or=0,this.Cr=!0,this.Lr=void 0,this.Nr=void 0,this.Ir=0,this.Fr=0,this.Br="",this.jr=new Dt,this.Rr=e,this.ut=t,this.Tr=1,this.Dr={play:0,actualPlay:0,pause:0,buffer:0,blockCount:0,pauseCnt:0,renderBlockCount:0,seekCnt:0,seekLoadCnt:0,decodedFrames:0,droppedFrames:0,muxDroppedFrames:0,traffic:0,download:0,mseUpdate:0,mseRemove:0,segment:0,muxA:0,muxV:0,fillA:0,fillV:0,droppedA:0,droppedV:0,keyFrame:0,onLineChange:0,visibilityChange:0,heartbeatTimeout:0,loadCnt:0,refreshCnt:0,wasmDecErr:0,videoRemuxSampleCount:0,audioRemuxSampleCount:0,videoRemuxDuration:0,audioRemuxDuration:0},this.Ur()}var t=e.prototype;return t.Pr=function(e,t){var i={};for(var n in t){var r=e[n],o=t[n];"number"==typeof r&&"number"==typeof o&&(i[n]=r-o,t[n]=r)}return i},t.Ur=function(){this.Sr=performance.now(),this.Or=Date.now(),this.Nr=void 0,this.Lr=void 0,this.Fr=0,this.Br=""},t.setFirstScreenDuration=function(e,t,i){this.Nr=Math.round(e),this.Lr=t,this.Cr=!0,this.Ir=i},t.setError=function(e,t){this.Fr=e,this.Br=t},t.build=function(){var e,t,i,n,r,a,s,u=this.Rr,l=this.ut,c=this.ut.stat,d=performance.now(),h=Math.round(d-this.Sr),f=this.Pr(u,this.Dr),p=l.mse?this.Pr(null==(e=l.mse)?void 0:e.stat,this.Dr):void 0,A=this.Pr(ln(this.Rr),this.Dr),v=this.Pr(this.ut.loadRec,this.Dr),_=this.ut.loadRec.downloadInfoByRange(h),g=_.timeCost?Math.round(_.size/_.timeCost*1e3):0,y={tick_index:this.Tr,tick_start:this.Or,tick_duration:h,error_code:this.Fr,error_message:this.Br,block_cnt:f.blockCount||0,render_block_cnt:f.renderBlockCount||0,decoded_video_frames:f.decodedFrames||0,dropped_video_frames:(f.droppedFrames||0)+(f.muxDroppedFrames||0),segment_cnt:f.segment||0,play_duration:A.play||0,buffer_time:A.buffer||0,actual_play_duration:A.actualPlay||0,played_video_duration:A.play||0,traffic:Math.round(((null==v?void 0:v.traffic)||0)/1024),hidden:cn()?1:0,download:f.download,download_speed:g,seek_cnt:f.seekCnt,seek_load_cnt:f.seekLoadCnt,pause_duration:A.pause,pause_cnt:f.pauseCnt,on_line_change:f.onLineChange,visibility_change:f.visibilityChange,heartbeat_timeout:f.heartbeatTimeout,load_cnt:f.loadCnt,refresh_cnt:f.refreshCnt,media_buffered_a:u.bufferedEndA,media_buffered_v:u.bufferedEndV};return o()(y,Qi(),$i(l,u),nn(),tn(),((t=l).mse?(a=t.mse.bufferedByType(T.VIDEO),s=t.mse.bufferedByType(T.AUDIO)):a=s=t.mediaBufferedSec,{a_buf_start:Math.round(1e3*s.start)||0,a_buf_end:Math.round(1e3*s.end)||0,a_buf_len:Math.round(1e3*Math.max(0,s.end-t.currentTime))||0,a_buf_slices:(null==(i=t.mse)?void 0:i.bufferSliceNumByType(T.AUDIO))||t.bufferSliceNum||0,v_buf_start:Math.round(1e3*a.start)||0,v_buf_end:Math.round(1e3*a.end)||0,v_buf_len:Math.round(1e3*Math.max(0,a.end-t.currentTime))||0,v_buf_slices:(null==(n=t.mse)?void 0:n.bufferSliceNumByType(T.VIDEO))||t.bufferSliceNum||0,buffer_queue_cnt:(null==(r=t.mse)?void 0:r.pendingNum())||0}),function(e){if(e.stat.isLive&&e.stat.box===m.flv){var t,i,n,r=null==(t=e.liveTime)?void 0:t.getDisplayDelay(e.currentTime);if(r)return{v_rec_delay:null==(i=e.liveTime)?void 0:i.getRecDelay(),v_render_delay:r||0,a_render_delay:(null==(n=e.liveTime)?void 0:n.getAudioRenderDelay(e.currentTime))||0}}return{}}(l),un(l)),this.jr.hasData&&(y.retry_record=this.jr.beacon,y.retry_cnt=this.jr.retryCount,this.jr.clear()),f.wasmDecErr&&(y.wasm_dec_err=f.wasmDecErr),v.muxA&&(y.mux_a=v.muxA),v.muxV&&(y.mux_v=v.muxV),v.fillA&&(y.fill_a=v.fillA),v.fillV&&(y.fill_v=v.fillV),v.droppedA&&(y.dropped_a=v.droppedA),v.droppedV&&(y.dropped_v=v.droppedV),f.muxDroppedFrames&&(y.mux_dropped_video_frames=f.muxDroppedFrames),c.coreType===R.mse&&(y.mse_update_cnt=(null==p?void 0:p.mseUpdate)||0,y.mse_remove_cnt=(null==p?void 0:p.mseRemove)||0,y.key_frame_cnt=f.keyFrame,c.isLive?(y.live_shift_type=l.stat.liveShiftType,l.isLiveShift&&(y.live_shift=l.stat.liveShiftActive?1:0)):(y.lazyload_min=Math.floor(c.lazyLoadRecoverDuration),y.lazyload_max=Math.floor(c.lazyLoadMaxDuration)),f.audioRemuxSampleCount&&(y.a_remux_sample_cnt=f.audioRemuxSampleCount),f.videoRemuxSampleCount&&(y.v_remux_sample_cnt=f.videoRemuxSampleCount),f.audioRemuxDuration&&(y.a_remux_duration=Math.floor(1e3*f.audioRemuxDuration)),f.videoRemuxDuration&&(y.v_remux_duration=Math.floor(1e3*f.videoRemuxDuration))),this.Cr&&(void 0===this.Nr?y.first_screen_total_duration=0:(y.first_screen_total_duration=this.Nr,y.first_screen_details=this.Lr,c.coreType===R.mse&&c.box===m.mp4&&(y.mp4_moov_size=u.mp4MoovSize,void 0!==u.mp4FastStart&&(y.mp4_fast_start=u.mp4FastStart?0:1)),this.Lr=void 0,this.Nr=void 0,this.Cr=!1)),"number"==typeof this.Ir&&u.playStartTime&&(y.click_to_first_frame=this.Ir,this.Ir>0&&(this.Ir=void 0)),1===this.Tr&&o()(y,Qi(),an(this.ut),rn()),this.Ur(),this.Tr++,y},e}(),hn="monitor",fn=function(e){function t(t){var i;return(i=e.call(this)||this).Vr=void 0,i.Hr=void 0,i.Wr=void 0,i.ut=void 0,i.J=void 0,i.Gr=void 0,i.Rr=void 0,i.Qr=void 0,i.Yr=!1,i.Jr=!1,i.Zr=!1,i.zr=!1,i.Kr=function(){i.Rr.onLineChange++},i.qr=function(e){var t,n;void 0===e&&(e=Oi.NORMEL);try{var r;t=null==(r=i.Qr)?void 0:r.build()}catch(e){}t&&(e===Oi.NORMEL&&t.first_screen_total_duration>0?(t.type=Oi.FIRST_FRAME,t.metadata=en(i.data)):(e===Oi.LOAD&&o()(t,sn(i.ut)),t.type=e),i.zr&&(o()(t,on(null==(n=i.ut.loadRec.currentLoad)?void 0:n.mediaInfo)),i.zr=!1),i.ut.stat.isLive||(t.seek_record=i.Rr.seekRecord.slice(0),i.Rr.seekRecord=[]),i.J.i(hn,"realtime beacon",t),i.emit(ke.REPORT,{type:at.REALTIME_BEACON,value:t}))},i.Wr=performance.now(),i.Hr=Date.now(),i.Gr=new Ni(t),i.ut=t,i.J=t.logger,i.Xr(),Ke||(window.addEventListener("online",i.Kr),window.addEventListener("offline",i.Kr)),i}l()(t,e);var i=t.prototype;return i.getName=function(){return hn},i.Xr=function(){var e;this.Jr=!1,this.Zr=!1,this.zr=!1,this.Rr=(e={decodedFrames:0,droppedFrames:0,muxDroppedFrames:0,sessionId:qi(),creationTime:0,startTime:0,loadStartTime:0,playStartTime:0,metadataTime:0,playingStartTime:0,playDuration:0,actualPlayDuration:0,pauseDuration:0,pauseCnt:0,bufferTime:0,blockCount:0,renderBlockCount:0,seekCnt:0,seekDuration:0,seekLoadCnt:0,seekLoadDuration:0,seekStartTime:0,unknownTSPacketCount:0,audioNonMonotonous:0,startBitrate:0,smoothBitrate:-1,useBackup:0,aacOverhead:0,errorCode:0,errorMessage:"",download:0,reuse:0,playPos:0,seekRecord:[],codecs:"",firstScreenTotalDuration:0,clickToFirstFrame:0,playToEnd:0,keyFrame:0,onLineChange:0,visibilityChange:0,lastHeartbeatTime:0,heartbeatTimeout:0,loadCnt:0,refreshCnt:0,monkeyPatchedFetch:"",bufferedEndA:0,bufferedEndV:0,wasmDecErr:0,audioRemuxSampleCount:0,videoRemuxSampleCount:0,audioRemuxDuration:0,videoRemuxDuration:0},K.isSupported()&&(e.monkeyPatchedFetch=W(fetch,"fetch")),e),this.Rr.creationTime=this.Hr,this.J.i(hn,"reset",this.Rr.sessionId),this.ut.fps.reset(),this.ut.fps.getFPS(this.ut.videoPlaybackQuality)},i.onRendererInitComplete=function(e){this.J.i(hn,"renderer init complete. type: "+e.type),this.data.canvasCtxType=e.type},i.onLoaderChunkArrival=function(e){this.ut.loadRec.onDataReceive(e),this.$r(Ci.DATA)},i.onMediaConnected=function(e){e.headers&&(this.Rr.httpHeader=e.headers),this.$r(Ci.STREAM_CONNECTED)},i.onMediaDemux=function(){this.$r(Ci.DEMUX,performance.now())},i.onKeyFrame=function(e){this.ut.loadRec.currentLoad&&this.ut.loadRec.currentLoad.keyFrame++,this.data.keyFrame++,e&&this.emit(ke.REPORT,{type:at.KEY_FRAME,value:e})},i.onDecLibLoaded=function(e){this.Rr.decLibLoadDuration=e.duration,this.Rr.decLibCacheHit=e.hitCache},i.onNewSource=function(e){var t=this.Rr,i=this.ut.lctx.current;i?(this.ut.loadRec.onStreamOpen(e.sync,i.currentUrl,i.bitrate,i.qualityType),t.level=this.ut.lctx.currentIdx,t.startQualityType||(t.startQualityType=i.qualityType)):this.ut.loadRec.onStreamOpen(e.sync,"",0,"unknown")},i.onDiscontinuity=function(e){this.emit(ke.REPORT,{type:at.DISCONTINUITY,value:e})},i.onDownload=function(e){var t=this,i=this.Rr;e.error_code&&!this.Gr.complete&&this.Gr.onDownloadError(),i.download++;var n=o()({use_backup:i.useBackup,first_screen:i.firstScreenTotalDuration?1:0},Zi(this.ut,i),nn(),tn(),Xi(),e);1009===e.error_code?setTimeout((function(){t.emit(ke.REPORT,{type:at.DOWNLOAD,value:n})}),0):this.emit(ke.REPORT,{type:at.DOWNLOAD,value:n})},i.onHeartbeat=function(){var e,t,i=this.Rr,n=this.ut,r=n.fps.getFPS(this.ut.videoPlaybackQuality),o={},a=n.loadRec,s=performance.now();i.lastHeartbeatTime&&s-i.lastHeartbeatTime>1500&&i.heartbeatTimeout++,i.lastHeartbeatTime=performance.now(),(n.stat.coreType===R.mse||n.stat.coreType===R.rtc)&&(o.totalReceive=a.traffic,o.speed=a.speed,o.videoDataRate=(null==(e=a.currentLoad)?void 0:e.videoDataRate)||0,o.audioDataRate=(null==(t=a.currentLoad)?void 0:t.audioDataRate)||0),n.mse&&(o.videoBuffered=i.bufferedEndV=Math.round(Math.max(0,1e3*(n.mse.bufferedEndByType(T.VIDEO)-n.currentTime))),o.audioBuffered=i.bufferedEndA=Math.round(Math.max(0,1e3*(n.mse.bufferedEndByType(T.AUDIO)-n.currentTime))),o.fillAudio=a.fillA,o.fillVideo=a.fillV,o.keyFrame=i.keyFrame,n.stat.isLive?(o.isLive=n.stat.isLive,n.stat.liveShiftType&&(o.liveShift=n.stat.liveShiftActive)):(o.lazyloadMin=n.stat.lazyLoadRecoverDuration,o.lazyloadMax=n.stat.lazyLoadMaxDuration)),o.buffered=Math.round(1e3*n.bufferedSec),o.decodedFPS=(null==r?void 0:r.decodedFPS)||0,o.droppedFPS=(null==r?void 0:r.droppedFPS)||0,i.decodedFrames=o.decodedFrames=(null==r?void 0:r.decoded)||0,i.droppedFrames=o.droppedFrames=((null==r?void 0:r.dropped)||0)+i.muxDroppedFrames,n.stat.isLive&&n.stat.box===m.flv&&n.liveTime&&(o.audioRenderDelay=n.liveTime.getAudioRenderDelay(n.currentTime),o.displayDelay=n.liveTime.getDisplayDelay(n.currentTime),o.recDelay=n.liveTime.getRecDelay()),n.stat.decoder===v.wasm&&(o.wasmFrameBufLen=n.stat.frameBufLen),o.playPos=1e3*n.currentTime,this.J.i(hn,"heartbeat",o),this.emit(ke.REPORT,{type:at.HEARTBEAT,value:o})},i.destroy=function(){this.J.i(hn,"destroy"),this.qr(Oi.END),this.tA(),Ke()||(window.removeEventListener("online",this.Kr),window.removeEventListener("offline",this.Kr)),e.prototype.destroy.call(this)},i.onLoad=function(e){if(this.J.i(hn,"on load: "+e.type),this.Rr.loadCnt++,this.Rr.metadata=void 0,e.type)e.type!==L.internal&&e.type!==L.retry||this.Gr.complete||this.Gr.start(),this.Rr.errorCode=0,this.Rr.errorMessage="";else{var t;if(null==(t=this.ut.lctx.current)||t.currentUrl,this.Rr.startTime){var i=this.Rr.reuse;this.Xr(),this.Rr.reuse=i+1}this.Rr.startTime=performance.now(),this.Rr.loadStartTime=Date.now(),this.Gr.start(),this.Yr=cn(),this.tA(),this.Qr=new dn(this.Rr,this.ut),this.qr(Oi.LOAD)}},i.onStopLoad=function(){this.qr(Oi.END),this.tA(),this.iA()},i.onManifestParsed=function(e){this.J.i(hn,"on manifest:",e);var t=this.ut.lctx.current;t&&(this.Rr.startBitrate||(this.Rr.startBitrate=t.bitrate)),this.$r(Ci.MANIFEST)},i.onLevelUpdated=function(e){this.$r(Ci.LEVEL)},i.onAudioTrackUpdated=function(){},i.onMediaInfo=function(e){var t,i,n,r=this.ut;(e=e||{}).box=r.stat.box,e.tagName=null==(t=r.video)?void 0:t.tagName,r.stat.srcMeta&&(e.srcMeta=r.stat.srcMeta),null!=(i=r.lctx.current)&&i.meta&&(e.currentLevelMeta=null==(n=r.lctx.current)?void 0:n.meta),"boolean"==typeof r.stat.isLive&&(e.isLive=r.stat.isLive),e.liveShiftEnabled=r.isLiveShift,e.liveShiftType=r.stat.liveShiftType,e.packName=xi.packName,r.loadRec.onMediaInfo(e);var o=[];e.videoCodec&&o.push(e.videoCodec),e.audioCodec&&o.push(e.audioCodec),this.Rr.codecs=o.join(","),this.Rr.startCodec||(this.Rr.startCodec=this.Rr.codecs),e.sid=this.Rr.sessionId,e.hardwareAccelerated=et.isSupportHW,e.coreType=r.stat.coreType,!e.streamHost&&r.lctx.currentUrl&&(e.streamHost=new ve.a(r.lctx.currentUrl).host);var a,s=Ge();s.renderer&&(e.gpu=s.renderer),r.loadRec.currentLoad&&(r.loadRec.currentLoad.mediaInfo=e),r.config.ntp&&!1!==r.stat.isLive&&r.stat.box===m.flv&&(null==(a=r.liveTime)||a.ntpSync(r.stat.preferNativeLoader)),r.stat.isKwaiSlice&&(e.isKwaiSlice=r.stat.isKwaiSlice);var u=JSON.stringify(e);this.J.i(hn,"mediainfo",u),this.zr=!0,this.emit(ke.REPORT,{type:at.MEDIA_INFO,value:JSON.parse(u)})},i.onParsingData=function(e){var t=this.Rr;e.extra&&e.extra.stat&&(t.unknownTSPacketCount=t.unknownTSPacketCount||e.extra.stat.unknownTSPacketCount||0,t.audioNonMonotonous=t.audioNonMonotonous||e.extra.stat.audioNonMonotonous||0,t.aacOverhead=t.aacOverhead||e.extra.stat.aacOverhead||0),e.segments.forEach((function(e){e.type===T.VIDEO?(e.droppedFrames&&(t.muxDroppedFrames+=e.droppedFrames),t.videoRemuxSampleCount+=e.sampleCount,t.videoRemuxDuration+=e.endDTS-e.startDTS):e.type===T.AUDIO&&(t.audioRemuxSampleCount+=e.sampleCount,t.audioRemuxDuration+=e.endDTS-e.startDTS)})),this.$r(Ci.SEGMENT)},i.onPrivNal=function(e){var t;null==(t=this.ut.liveTime)||t.onPrivNal(e),this.emit(ke.REPORT,{type:at.PRIV_NAL,value:e})},i.onSei=function(e){this.emit(ke.REPORT,{type:at.SEI,value:e})},i.onAacPriv=function(e){this.emit(ke.REPORT,{type:at.AAC_PRIV,value:e})},i.onPlay=function(){this.Rr.playStartTime||(this.Rr.playStartTime=Date.now()),this.eA()},i.onLoadedmetadata=function(){this.$r(Ci.LOADEDMETADATA),this.Rr.metadataTime||(this.Rr.metadataTime=Date.now())},i.onLoadeddata=function(){this.$r(Ci.LOADEDDATA),this.iA()},i.onCanplay=function(){this.$r(Ci.CANPLAY),j.safari&&this.ut.stat.coreType!==R.mse||this.iA()},i.onPlaying=function(){var e;j.ios&&4!==(null==(e=this.ut.video)?void 0:e.readyState)||(this.Jr||(this.Jr=!0),this.nA(),this.rA(),this.iA())},i.onPause=function(){var e;null!=(e=this.ut.video)&&e.seeking||!this.Jr||(this.AA(),this.oA(),this.Jr=!1)},i.onEnded=function(){this.Rr.playToEnd++,this.Jr=!1,this.AA(),this.rA(),this.iA(),this.qr(Oi.END),this.tA()},i.onWaiting=function(e){this.Rr.playPos=Math.round(1e3*this.ut.currentTime),this.Jr&&this.Gr.complete&&e.block&&this.sA(e.bufferedSec)},i.onSeeking=function(e){this.Rr.seekRecord.push({from:this.Rr.playPos,to:Math.round(1e3*this.ut.currentTime),time:Date.now()}),this.Rr.seekRecord.length>50&&this.Rr.seekRecord.shift(),this.ut.stat.isLive||null!=e&&e.internal||(this.Rr.seekStartTime=performance.now())},i.onSeekWithLoad=function(){this.Gr.complete&&(this.qr(Oi.SEEK),this.uA(),this.Zr=!0)},i.onSeeked=function(){if(this.ut.fps.getFPS(this.ut.videoPlaybackQuality),this.Rr.seekStartTime){this.Rr.seekCnt++;var e=Math.round(performance.now()-this.Rr.seekStartTime);this.Rr.seekDuration+=e,this.Rr.seekStartTime=0,this.Zr&&(this.Rr.seekLoadCnt++,this.Rr.seekLoadDuration+=e)}this.Zr=!1,this.Gr.complete||this.ut.stat.coreType===R.mse||!j.safari&&!j.msie||this.$r(Ci.SEEKED)},i.onTimeupdate=function(){var e,t,i=this.ut,n=i.video;if(n){n.loop&&!i.stat.isLive&&0===i.currentTime&&Number.isFinite(n.duration)&&n.duration>0&&n.duration-this.Rr.playPos/1e3<1&&this.Rr.playToEnd++;var r=Math.round(1e3*i.currentTime);j.msie&&i.stat.coreType!==R.mse&&this.Rr.bufferingStartMS&&this.Rr.playPos!==r&&this.onPlaying(),this.Rr.playPos=r,!j.ios||"number"!=typeof this.Rr.bufferingStartMS||4!==(null==(e=this.ut.video)?void 0:e.readyState)||null!=(t=this.ut.video)&&t.paused||this.onPlaying()}},i.onProgress=function(){var e;j.safari&&this.ut.stat.coreType!==R.mse&&this.Rr.bufferingStartMS&&4===(null==(e=this.ut.video)?void 0:e.readyState)&&this.iA()},i.mediaCapabilities=function(e){this.Rr.smoothBitrate=e},i.onLevelSwitching=function(e){e.smooth||(this.qr(Oi.LEVEL_SWITCH),this.uA())},i.onRetry=function(e){this.ut.stat.retryInfo.append(e),e.type===g.BACKUP&&(this.Rr.useBackup=1),this.Gr.onRetry(),e.type===g.BACKUP&&(this.Qr&&this.Qr.setError(e.code||0,e.message||""),this.qr(Oi.BACKUP),this.Qr&&this.Qr.setError(0,""))},i.onRefresh=function(){this.Rr.refreshCnt++},i.onMetadata=function(e){this.Rr.metadata||(this.Rr.metadata=e),e.mp4MoovSize&&(this.Rr.mp4MoovSize=e.mp4MoovSize),"boolean"==typeof e.mp4FastStart&&(this.Rr.mp4FastStart=e.mp4FastStart),"boolean"==typeof e.mp4MoovNoPs&&(this.Rr.mp4MoovNoPs=e.mp4MoovNoPs),"string"==typeof e.compatible_brands&&(this.Rr.mp4CompatibleBrands=e.compatible_brands),this.J.i(hn,"metadata",e),this.emit(ke.REPORT,{type:at.METADATA,value:e})},i.onVisibilityChange=function(){this.Rr.visibilityChange++},i.onError=function(e){e.preventFollowUp||(e.fatal?(this.J.i(hn,"error",e),this.Rr.errorCode=e.code,this.Rr.errorMessage=e.reason,this.Qr&&this.Qr.setError(e.code,e.reason),this.AA(),this.rA(),this.iA()):e.details===te.DECODER_DEC_ERROR&&this.Rr.wasmDecErr++)},i.$r=function(e,t){void 0===t&&(t=0),!this.Gr.complete&&this.Gr.process(e,t)&&this.aA()},i.nA=function(){this.Rr.playingStartTime||(this.Rr.playingStartTime=Date.now()),this.Rr.playStartMS=this.Rr.playStartMS||performance.now(),this.Rr.actualPlayStartMS=this.Rr.actualPlayStartMS||performance.now()},i.AA=function(){this.Rr.playStartMS&&(this.Rr.playDuration+=performance.now()-this.Rr.playStartMS),this.Rr.actualPlayStartMS&&(this.Rr.actualPlayDuration+=performance.now()-this.Rr.actualPlayStartMS),this.Rr.playStartMS=void 0,this.Rr.actualPlayStartMS=void 0},i.oA=function(){this.Rr.pauseCnt++,this.Rr.pauseStartMS=this.Rr.pauseStartMS||performance.now()},i.rA=function(){this.Rr.pauseStartMS&&(this.Rr.pauseDuration+=performance.now()-this.Rr.pauseStartMS),this.Rr.pauseStartMS=void 0},i.sA=function(e){this.Rr.bufferingStartMS||(this.Rr.blockCount++,this.Rr.bufferingStartMS=performance.now(),e>.6&&this.Rr.renderBlockCount++),this.Rr.actualPlayStartMS&&(this.Rr.actualPlayDuration+=performance.now()-this.Rr.actualPlayStartMS),this.Rr.actualPlayStartMS=void 0},i.iA=function(){this.Rr.bufferingStartMS&&(this.Rr.bufferTime+=performance.now()-this.Rr.bufferingStartMS,this.Rr.bufferingStartMS=void 0)},i.aA=function(){this.J.i(hn,"first frame"),this.ut.stat.firstFrameLoaded=!0;var e=this.Rr;e.firstScreenTotalDuration=e.firstScreenTotalDuration||Math.round(this.Gr.duration),e.firstScreenDetails=e.firstScreenDetails||this.Gr.details,e.playStartTime&&this.Gr.complete?e.clickToFirstFrame=e.clickToFirstFrame||Math.max(1,this.Gr.complete-e.playStartTime):e.clickToFirstFrame=1,this.Qr&&this.Qr.setFirstScreenDuration(this.Gr.duration,this.Gr.details,e.clickToFirstFrame),this.ut.video&&!this.ut.video.paused&&this.nA()},i.eA=function(){void 0===this.Vr&&(this.Vr=setInterval(this.qr,1e4))},i.tA=function(){this.Vr&&(clearTimeout(this.Vr),this.Vr=void 0)},i.uA=function(){this.tA(),this.eA()},s()(t,[{key:"runningStartTime",get:function(){return this.Wr}},{key:"sid",get:function(){return this.Rr.sessionId}},{key:"snapshot",get:function(){var e=this.ut.loadRec,t=this.ut.stat;return o()({streams:e.streams,live:t.isLive,liveShift:t.liveShiftActive,demuxer:t.demuxerType,decSimd:t.wasmSimd,decThreads:t.wasmThreads,decoderType:t.wasmDecoder},this.Rr)}},{key:"data",get:function(){return this.Rr}},{key:"audienceStat",get:function(){var e,t=this.Rr,i=ln(t),n=this.ut.stat,r=this.ut.loadRec,a={play_duration:i.play,actual_play_duration:i.actualPlay,traffic:Math.round(r.traffic/1024),buffer_time:i.buffer,block_cnt:t.blockCount,render_block_cnt:t.renderBlockCount,click_to_first_frame:t.playStartTime&&t.clickToFirstFrame||0,first_screen_total_duration:Math.round(t.firstScreenTotalDuration)||0,first_screen_details:t.firstScreenDetails||this.Gr.details||null,error_code:t.errorCode||0,error_message:t.errorMessage||"",remux_process_type:(this.ut.streamingMuxEnabled?1:0)+(n.gopRemux?1:0),hidden_start:this.Yr?1:0,current_running_time:Math.round(performance.now()-t.startTime),running_time:Math.round(performance.now()-this.Wr),smooth_bitrate:t.smoothBitrate,start_bitrate:t.startBitrate||0,abr:this.ut.config.adaptive?1:0,pause_cnt:t.pauseCnt,traffic_vcodec:r.trafficGroupedByVCodecType,traffic_level:r.trafficGroupedByLevel,decoded_video_frames:t.decodedFrames,dropped_video_frames:t.droppedFrames+t.muxDroppedFrames,pause_duration:i.pause,seek_cnt:t.seekCnt,seek_duration:t.seekDuration,seek_load_cnt:t.seekLoadCnt,seek_load_duration:t.seekLoadDuration,start_sec:n.isLive?0:Math.round(this.ut.config.startFromSec||0),on_line_change:t.onLineChange,visibility_change:t.visibilityChange,heartbeat_timeout:t.heartbeatTimeout,load_cnt:t.loadCnt,refresh_cnt:t.refreshCnt,media_buffered_v:t.bufferedEndV,media_buffered_a:t.bufferedEndA,remux_worker:this.ut.stat.webWorker?1:0,av_separated:this.ut.stat.avSeparated?1:0};if(n.retryInfo.hasData&&(a.retry_record=n.retryInfo.mergedBeacon,a.retry_cnt=n.retryInfo.retryCount),t.wasmDecErr&&(a.wasm_dec_err=t.wasmDecErr),o()(a,Qi(),$i(this.ut,t),nn(),tn(),on(null==(e=this.ut.loadRec.currentLoad)?void 0:e.mediaInfo),an(this.ut),sn(this.ut),un(this.ut),rn()),a.metadata=en(t),n.coreType===R.mse&&this.ut.mse&&(a.mse_buffer_full=this.ut.mse.stat.mseBufferFull,a.mse_remove=this.ut.mse.stat.mseRemove,a.key_frame_cnt=t.keyFrame,n.box===m.mp4&&(a.mp4_moov_size=t.mp4MoovSize,void 0!==t.mp4CompatibleBrands&&(a.mp4_compatible_brands=t.mp4CompatibleBrands),void 0!==t.mp4FastStart&&(a.mp4_fast_start=t.mp4FastStart?1:0),void 0!==t.mp4MoovNoPs&&(a.mp4_moov_no_ps=t.mp4MoovNoPs?1:0)),a.a_remux_sample_cnt=t.audioRemuxSampleCount,a.v_remux_sample_cnt=t.videoRemuxSampleCount,a.a_remux_duration=Math.floor(1e3*t.audioRemuxDuration),a.v_remux_duration=Math.floor(1e3*t.videoRemuxDuration)),"boolean"==typeof this.ut.config.audioEnabled&&(a.a_enabled=this.ut.config.audioEnabled?1:0),"boolean"==typeof this.ut.config.videoEnabled&&(a.v_enabled=this.ut.config.videoEnabled?1:0),r.muxA&&(a.mux_a=r.muxA),r.muxV&&(a.mux_v=r.muxV),r.fillA&&(a.fill_a=r.fillA),r.fillV&&(a.fill_v=r.fillV),r.droppedA&&(a.dropped_a=r.droppedA),r.droppedV&&(a.dropped_v=r.droppedV),t.muxDroppedFrames&&(a.mux_dropped_video_frames=t.muxDroppedFrames),V(n.box)&&(a.unknown_ts_packet_count=t.unknownTSPacketCount,a.audio_non_monotonous=t.audioNonMonotonous,a.aac_overhead=t.aacOverhead),"number"==typeof t.decLibLoadDuration&&(a.dec_lib_load_duration=Math.round(t.decLibLoadDuration),a.dec_lib_hit=t.decLibCacheHit||""),this.ut.stat.coreType===R.native){var s=this.ut.stat.retryInfo.getLastMseError();s&&(a.last_error_code=t.errorCode,a.last_error_message=t.errorMessage,a.error_code=s.code,a.error_message=s.reason)}return a}}])}(Oe),pn="kernel",An=function(e){function t(t,i){var n;return(n=e.call(this)||this).zt=void 0,n.ut=void 0,n.hA=void 0,n.ii=void 0,n.cA=new c.EventEmitter,n.J=void 0,n.fA=!1,n.vA=void 0,n.ot=void 0,n.dA=void 0,n.lA=function(e){var t=n.ut;e.levels=t.lctx.levels.map((function(e){return e.getKLevel()})),e.currentLevel=t.lctx.currentIdx,e.auto=t.lctx.abr,e.levels=t.lctx.levels.map((function(e){return e.getKLevel()}));var i=t.lctx.audioTracks;i&&i.length&&(e.audioTrack=t.lctx.audioIdx,e.audioTracks=i.map((function(e){return{lang:e.lang,qualityLabel:e.qualityLabel,qualityType:e.qualityType,bitrate:e.bitrate,groupId:e.groupId}})));var r=t.lctx.subtitleTracks;r&&r.length&&(e.subtitleTrack=t.lctx.subtitleIdx,e.subtitleTracks=r.map((function(e){return{lang:e.lang,name:e.name,groupId:e.groupId}}))),e.currentLevel=t.lctx.currentIdx,e.auto=t.lctx.abr,e.isLive=t.stat.isLive,void 0!==t.stat.stereoType&&(e.stereoType=t.stat.stereoType)},n.pA=function(e){n.mA(e)},n.yA=function(e){e.type===L.retry&&(n.ii=void 0)},n.MA=function(e){e.pos=Math.floor(n.zt.currentTime),e.ts=Math.floor(performance.now())},n.H=function(e){if(n.J.i(pn,"on error",e),!e.preventFollowUp){var t=n.ut;if(e.details===te.MANIFEST_PARSING_ERROR)try{gi.isSrcEmpty(n.ut.src)&&(n.J.i(pn,"src empty",n.ut.src),e.details=te.SRC_EMPTY),t.src?"string"==typeof t.src?e.reason+="src str:"+t.src.slice(0,1024):t.src instanceof Blob?e.reason+="src: blob":e.reason+="src other:"+JSON.stringify(t.src).slice(0,1024):e.reason+="src:"+t.src}catch(t){e.reason+=t.message}var i=de(e.details,e.reason,e.statusCode||0);e.code=i,n.ii||(n.ii=e),e.fatal&&n.stopLoad()}},n.wA=function(e){n.J.i(pn,"window error:",e.message);try{n.J.i(pn,"window error stack:",e.error.stack)}catch(e){}},n.bA=function(){n.ut.evt.emit(ke.VISIBILITY_CHANGE,{hidden:document.hidden})},n.zt=t,n.ut=new xi(i||{},n.zt),n.gA(),n.J=n.ut.logger,typeof location<"u"&&n.J.i(pn,"href: "+location.href),n.J.i(pn,xi.packName+", "+xi.version+" build: "+xi.buildTime+" cors: "+(null==t?void 0:t.crossOrigin)+" autoplay: "+(null==t?void 0:t.autoplay)+" dom: "+t.tagName,i),(!n.ut.config||!1===n.ut.config.audioEnabled&&!1===n.ut.config.videoEnabled)&&setTimeout((function(){n.kA(ne(ee.OTHER_ERROR,te.CONFIG_ERROR,"config data error"))}),0),n.hA=new fn(n.ut),n.ut.config.src&&(n.dA=n._A()),n.vA=new ot(n.ut,(function(e){var t;return null==(t=n.dA)?void 0:t.internalSeek(e)})),n.ot=new xe(n.J,n.ut.evt),n.ot.register(n.vA),n.ot.register(n.hA),n.ot.register(new De(n.ut,n.cA)),n.F.push(n.ot,n.vA,n.hA),n.J.i(pn,"config",n.ut.config),xi.instanceCount++,Ke()||(window.addEventListener("error",n.wA),document.addEventListener("visibilitychange",n.bA)),n}l()(t,e),t.isSupport=function(e){if(m.webrtc===(null==e?void 0:e.box))return et.isWebRTCSupported();if(null!=e&&e.nativeFirst)return et.isVideoBoxSupported(null==e?void 0:e.box);var t=et.isSupported();if(t){var i=!0;e&&(i=!(!e.isLive||e.box!==m.flv));var n=!i||Z.isStreamingSupported();return t&&!!n}return et.isVideoBoxSupported(null==e?void 0:e.box)},t.videoCodecCapabilities=function(e){return et.getVideoCodecCompatibilityByCodec(e)};var i=t.prototype;return i.on=function(e,t){this.J.i(pn,"call on "+e),this.cA.on(e,t)},i.once=function(e,t){this.J.i(pn,"call once "+e),this.cA.once(e,t)},i.removeAllListeners=function(e){this.J.i(pn,"call removeAllListeners"),this.cA.removeAllListeners(e)},i.off=function(e,t){this.J.i(pn,"call off "+e),this.cA.off(e,t)},i.listeners=function(e){return this.cA.listeners(e)},i.emit=function(e,t){return this.cA.emit(e,t)},i.listenerCount=function(e){return this.cA.listenerCount(e)},i.prependListener=function(e,t){this.cA.prependListener(e,t)},i.prependOnceListener=function(e,t){this.cA.prependOnceListener(e,t)},i.load=function(e,i){var n,r,o,a=this;(this.J.i(pn,"call kernel load",e,i),this.hA.data.startTime>0&&this.J.i(pn,"play summary data:",this.hA.audienceStat),e&&this.ut.setSrc(e),this.ut.src)?t.isSupport({box:this.ut.stat.box,isLive:this.ut.stat.isLive,nativeFirst:this.ut.stat.native})?("number"==typeof(null==i?void 0:i.startFromSec)?this.ut.stat.startFromSec=i.startFromSec:e&&(this.ut.stat.startFromSec=-1),this.ut.stat.multipart&&this.ut.config.resourceBuffer&&function(e){var t;performance.addEventListener&&(t=e,performance&&("function"==typeof performance.setResourceTimingBufferSize?performance.setResourceTimingBufferSize(t):"function"==typeof performance.webkitSetResourceTimingBufferSize&&performance.webkitSetResourceTimingBufferSize(t)),performance.addEventListener("resourcetimingbufferfull",Ee))}(this.ut.config.resourceBufferSize),e&&(null==(n=this.dA)?void 0:n.type)!==((o=this.ut).stat.box===m.webrtc?R.rtc:o.stat.native?R.native:R.mse)&&(null==(r=this.dA)||r.destroy(),this.dA=void 0),this.ut.fallback.register(Pe.NEXT_DESC,new Be(this.ut).setRetryFunc(this.EA.bind(this))),this.ut.fallback.register(Pe.SWAP_264,new it(this.ut).setRetryFunc(this.EA.bind(this))),this.Zt()):setTimeout((function(){a.kA(ne(ee.OTHER_ERROR,te.UNSUPPORTED,"unsupported: "+a.ut.stat.box+" live: "+a.ut.stat.isLive+" native: "+a.ut.stat.native))}),0):this.kA(ne(ee.OTHER_ERROR,te.SRC_EMPTY,"url empty"))},i.getTimeNow=function(){var e;return(null==(e=this.ut.liveTime)?void 0:e.serverNowMs)||null},i.setAvailableAbrLevels=function(e){this.J.i(pn,"setAvailableAbrLevels",e),this.ut.lctx.availableList=e.splice(0),this.dA&&"onAbrLevelsUpdated"in this.dA&&this.dA.onAbrLevelsUpdated()},i.preload=function(e,t){this.J.i(pn,"call preload")},i.isTimeinBuffered=function(e){return this.ut.stat.box!==m.webrtc&&this.ut.isTimeinBuffered(e)},i.resume=function(){var e,t,i=this;this.J.i(pn,"call resume"),null==(e=this.dA)||e.resume(),this.zt.paused&&(null==(t=this.zt.play())||t.catch((function(e){return i.J.i(pn,"resume, call play() fail.",e)})))},i.destroy=function(){var t;this.J.i(pn,"call kernel destroy. play summary data:",this.hA.audienceStat),this.fA&&(xi.instanceCount--,this.fA=!0),performance.removeEventListener&&performance.removeEventListener("resourcetimingbufferfull",Ee),this.ut.fallback.unregisterAndDestroy(Pe.NEXT_DESC),this.ut.fallback.unregisterAndDestroy(Pe.SWAP_264),this.ut.fallback.unregisterAndDestroy(Pe.SWAP_CORE),e.prototype.destroy.call(this),null==(t=this.dA)||t.destroy(),this.ut.destroy(),this.removeAllListeners(),Ke()||(window.removeEventListener("error",this.wA),document.removeEventListener("visibilitychange",this.bA))},i.refresh=function(){var e,t;this.J.i(pn,"call kernel refresh"),this.hA.onRefresh(),this.ii=void 0,null==(e=this.ut.cOutput)||e.reset(),null==(t=this.dA)||t.refresh()},i.stopLoad=function(){var e;this.J.i(pn,"call kernel stopLoad"),null==(e=this.dA)||e.stopLoad()},i.getStreamTime=function(e){var t=this.ut.streamTime.getStreamTime(e/1e3);return t?1e3*t:NaN},i.getAudienceStat=function(){return this.hA.audienceStat},i.getMediaInfo=function(){var e;return o()({},null==(e=this.ut.loadRec.currentLoad)?void 0:e.mediaInfo)},i.experiment=function(e){this.J.i(pn,"experiment",e)},i.liveEnd=function(){this.J.i(pn,"call liveEnd"),this.dA&&"liveEnd"in this.dA&&this.dA.liveEnd()},i.seekToNextFrame=function(){this.J.i(pn,"call seekToNextFrame"),this.dA&&"seekToNextFrame"in this.dA?this.dA.seekToNextFrame():this.RA()},i.seekToPrevFrame=function(){this.J.i(pn,"call seekToPrevFrame"),this.dA&&"seekToPrevFrame"in this.dA?this.dA.seekToPrevFrame():this.RA()},i.seekByFrameIndex=function(e){if(this.J.i(pn,"call seekByFrameIndex",e),this.dA&&"setCurretVideoFrame"in this.dA)return this.dA.setCurretVideoFrame(e);this.RA()},i.screenshot=function(e){var t;e&&(e=JSON.parse(JSON.stringify(e))),this.J.i(pn,"call screenshot",e),null==(t=this.dA)||t.screenshot(e)},i.Zt=function(e){this.ii=void 0,this.dA||(this.dA=this._A()),this.dA&&(this.dA.load(e),this.ut.stat.coreType=this.dA.type)},i._A=function(){var e,t=this.ut,i=(e=t).stat.native?new mt(e):e.stat.box!==m.webrtc&&J.a||e.stat.box===m.webrtc&&J.a?new J.a(e):void 0;if(i)return this.J.i(pn,"init av core. type: "+i.type),t.stat.coreType=i.type,i;this.kA(ne(ee.OTHER_ERROR,te.UNSUPPORTED,"init core error. "+t.stat.box+" native: "+t.stat.native+" unsupported."))},i.DA=function(){this.EA(R.native)},i.TA=function(){this.EA(R.mse)},i.EA=function(e){var t,i,n=this,r=this.zt.paused;!this.ut.live&&this.ut.stat.startFromSec<=0&&(this.ut.stat.startFromSec=this.zt.currentTime),null==(t=this.dA)||t.destroy(),this.dA=void 0,void 0!==e&&(this.ut.stat.native=e!==R.mse),this.ut.stat.demuxerType=void 0,this.Zt(L.retry),r||null==(i=this.zt.play())||i.catch((function(e){return n.J.i(pn,"recover, call play() fail.",e)}))},i.mA=function(e){var t=this.ut.cOutput;t&&(void 0===e&&(e={enabled:!0,type:t.rendererType,canvas:t.rendererType===p.canvas&&t.canvas?t.canvas:void 0}),this.J.i(pn,"video renderer change",e),e.canvas&&this.emit(ke.H265_DETECTED,{canvas:e.canvas,message:"",enabled:e.enabled,decoder:v.wasm}))},i.RA=function(){this.kA(ne(ee.MEDIA_ERROR,te.CANNOT_SEEK_BY_FRAME_INDEX,"unsupported",{fatal:!1}))},i.kA=function(e){this.ut.evt.emit(ke.ERROR,e)},i.gA=function(){var e=this.ut.evt;e.on(ke.ERROR,this.H),e.on(ke.MANIFEST_PARSED,this.lA),e.on(ke.VIDEO_RENDERER_CHANGE,this.pA),e.on(ke.LOAD,this.yA),e.on(ke.RETRY,this.MA)},s()(t,[{key:"liveShiftType",get:function(){return this.ut.stat.liveShiftType}},{key:"liveShift",get:function(){return this.ut.stat.liveShiftActive}},{key:"liveShiftDelaySec",get:function(){return this.ut.config.liveShiftDelaySec}},{key:"currentVideoFrame",get:function(){return this.dA&&"getCurrentVideoFrame"in this.dA?this.dA.getCurrentVideoFrame():0},set:function(e){this.J.i(pn,"call set currentVideoFrame",e),this.dA&&"setCurretVideoFrame"in this.dA&&this.dA.setCurretVideoFrame(e)}},{key:"totalVideoFrames",get:function(){return this.dA&&"getTotalVideoFrames"in this.dA?this.dA.getTotalVideoFrames():0}},{key:"audioTrack",get:function(){return this.ut.lctx.audioIdx||0},set:function(e){var t;this.J.i(pn,"call set audioTrack",e),!1===this.ut.config.audioEnabled&&(this.J.i(pn,"set audioTrack failed. conf audio enabled false"),this.emit(ke.AUDIO_TRACK_SWITCH_FAILED)),this.dA&&"setAudioTrack"in this.dA&&(null==(t=this.dA)||t.setAudioTrack(e))}},{key:"subtitleTrack",get:function(){return this.ut.lctx.subtitleIdx||0},set:function(e){var t;this.J.i(pn,"call set subtitleTrack",e),this.dA&&"setSubtitleTrack"in this.dA&&(null==(t=this.dA)||t.setSubtitleTrack(e))}},{key:"currentLevel",get:function(){return this.ut.lctx.currentIdx||0},set:function(e){if(this.J.i(pn,"call set currentLevel from: "+this.ut.lctx.currentIdx+" to: "+e+" ",this.ut.lctx.abr),this.dA&&"setCurrentLevel"in this.dA)if(e<0&&!this.ut.isAbrAvailable)this.J.i(pn,"set currentLevel failed. unsupported auto"),this.emit(ke.LEVEL_SWITCH_FAILED);else if(!1===this.ut.config.videoEnabled)this.J.i(pn,"set currentLevel failed. conf video enabled false"),this.emit(ke.LEVEL_SWITCH_FAILED);else{var t;null==(t=this.dA)||t.setCurrentLevel(e)}else this.J.i(pn,"set nextLevel failed. unsupported"),this.emit(ke.LEVEL_SWITCH_FAILED)}},{key:"nextLevel",get:function(){return this.ut.lctx.nextIdx||0},set:function(e){if(this.J.i(pn,"call set nextLevel from: "+this.ut.lctx.nextIdx+" to "+e),this.dA&&"setNextLevel"in this.dA)if(e<0&&!this.ut.isAbrAvailable)this.J.i(pn,"set nextLevel failed. unsupported auto"),this.emit(ke.LEVEL_SWITCH_FAILED);else if(!1===this.ut.config.videoEnabled)this.J.i(pn,"set nextLevel failed. conf video enabled false"),this.emit(ke.LEVEL_SWITCH_FAILED);else{var t;null==(t=this.dA)||t.setNextLevel(e)}else this.J.i(pn,"set nextLevel failed. unsupported"),this.emit(ke.LEVEL_SWITCH_FAILED)}},{key:"startLevel",get:function(){return this.ut.lctx.startIdx||0},set:function(e){this.J.i(pn,"call set startLevel",e),this.ut.lctx.startIdx=e}},{key:"outputLog",get:function(){return this.ut.logger.getOutput()},set:function(e){this.J.i(pn,"call set output log",e),this.ut.logger.setOutput(e)}},{key:"autoLevelEnabled",get:function(){return this.ut.lctx.abr}},{key:"monitorData",get:function(){return this.hA&&this.dA?o()(this.hA.snapshot,{trackBufInfo:this.dA.getTrackBufInfo()}):null}},{key:"currentLevelTimeInfo",get:function(){var e=this.ut.lctx.current;if(e&&e.timeInfo)return e.timeInfo}},{key:"instanceId",get:function(){return this.ut.id}}],[{key:"version",get:function(){return xi.version}},{key:"buildTime",get:function(){return xi.buildTime}},{key:"MediaBox",get:function(){return m}},{key:"Events",get:function(){return{REPORT:ke.REPORT,ERROR:ke.ERROR,LEVEL_SWITCHING:ke.LEVEL_SWITCHING,LEVEL_SWITCHED:ke.LEVEL_SWITCHED,LEVEL_SWITCH_PLAYING:ke.LEVEL_SWITCH_PLAYING,LEVEL_SWITCH_FAILED:ke.LEVEL_SWITCH_FAILED,AUDIO_TRACK_SWITCHING:ke.AUDIO_TRACK_SWITCHING,AUDIO_TRACK_SWITCHED:ke.AUDIO_TRACK_SWITCHED,AUDIO_TRACK_UPDATED:ke.AUDIO_TRACK_UPDATED,SUBTITLE_TRACK_SWITCHED:ke.SUBTITLE_TRACK_SWITCHED,MANIFEST_PARSED:ke.MANIFEST_PARSED,LEVEL_UPDATED:ke.LEVEL_UPDATED,LOAD_END:ke.LOAD_END,VIDEO_RENDERER_CHANGE:ke.VIDEO_RENDERER_CHANGE,SCREENSHOT:ke.SCREENSHOT}}},{key:"Reports",get:function(){return o()({},at)}}])}(O);function vn(e,t){return Ke()?void 0:new An(e,t)}}]);void 0===Ve&&console.error("esm-webpack-plugin: nothing exported!");var Ge=Ve.default;Ve.createKernel,Ve.AbstractDestroyable,Ve.CanvasContextType,Ve.CodecType,Ve.DestroyableList,Ve.Decoder,Ve.DemuxerType,Ve.DownloadStatus,Ve.ErrorDetails,Ve.ErrorTypes,Ve.HttpRangeType;var je=Ve.KEvents;Ve.LiveShiftType,Ve.LogLevel,Ve.MediaBox,Ve.ReportTypes,Ve.StereoType,Ve.VideoDecBlockPolicy,Ve.VideoDropFramePolicy,Ve.VideoRendererType,Ve.WasmDecoder;var We="_kwai-player_1ufc0_2",Ke="_kwai-player-video-interactive_1ufc0_11",ze="_kwai-player-poster_1ufc0_19",Je="_kwai-player-video_1ufc0_11",qe="_kwai-player-disable-scroll_1ufc0_52",Ye="_kwai-player-yoda_1ufc0_56",Qe="kwai-player-id",Ze=function(){function e(){}return e.next=function(){if(Re.available){var t=e._ls.read(Qe,!1),i=e._id;return"number"==typeof t?(i=this.getNextId(t),this._ls.write(Qe,i)):(i=this.getNextId(i),this._ls.write(Qe,i)),e._id=i,i}return e._id=e.getNextId(e._id),e._id},e.getNextId=function(t){return++t>e.MAX_ID?0:t},c()(e,null,[{key:"MAX_ID",get:function(){return 999}}])}();Pe(Ze,"_id",0),Pe(Ze,"_ls",new Re);var Xe=Ze,$e=function(){function e(){}return e.verify=function(e){return!!(e&&e.liveStreamId&&(Array.isArray(e.liveAdaptiveManifest)&&e.liveAdaptiveManifest.length||Array.isArray(e.multiResolutionPlayUrls)&&e.multiResolutionPlayUrls.length||Array.isArray(e.playUrls)&&e.playUrls.length||e.hlsPlayUrl))},e.parse=function(t){var i;if(e.verify(t))return t.liveAdaptiveManifest&&t.liveAdaptiveManifest.length?i=t.liveAdaptiveManifest[0]:t.multiResolutionPlayUrls&&t.multiResolutionPlayUrls.length&&(i=e._multiResolution2Manifest(t.multiResolutionPlayUrls)),Ce&&t.hlsPlayUrl?i?[{src:i},{src:t.hlsPlayUrl}]:t.hlsPlayUrl:i},e._multiResolution2Manifest=function(e){return{version:"1",adaptationSet:{representation:e.map((function(e,t){var i;return{id:t,url:null==(i=e.urls[0])?void 0:i.url,name:e.name,bitrate:0,qualityType:e.type,defaultSelect:e.defaultSelect}})).filter((function(e){return e.url}))}}},e}(),et=function(e){return e[e.CTOR_ERROR=1e4]="CTOR_ERROR",e}(et||{}),tt=function(){function e(){}return e.verify=function(e){return!!(e&&Object.prototype.hasOwnProperty.call(e,"version")&&Object.prototype.hasOwnProperty.call(e,"adaptationSet")&&Object.prototype.hasOwnProperty.call(e.adaptationSet,"representation")&&Array.isArray(e.adaptationSet.representation)&&e.adaptationSet.representation.length>0)&&e.adaptationSet.representation.reduce((function(e,t){return!!(e&&t.url&&t.bitrate&&t.qualityType)}),!0)},e}(),it=function(){function e(){}return e.verify=function(e){return!!(e&&e.adaptationSet&&e.adaptationSet.length)&&e.adaptationSet.reduce((function(e,t){return!!(e&&t.representation&&t.representation.length)}),!0)},e}(),nt=/\.[^./\\?#]+(?=$|[?#])/i;var rt=function(){function e(){}return e.parse=function(t){if("string"==typeof t)try{return t=JSON.parse(t),e._parseManifest(t)}catch(i){return e._parseUrl(t)}else if("object"==typeof t)return e._parseManifest(t)},e._parseUrl=function(e){return".flv"===function(e){var t=e.toLocaleLowerCase().match(nt);return t?t[0]:""}(e)?{isLive:!0,src:{liveStreamId:"",playUrls:[{url:e}]}}:{isLive:!1,src:[{url:e}]}},e._parseManifest=function(e){return it.verify(e)?{isLive:!1,src:e}:tt.verify(e)?{isLive:!0,src:{liveStreamId:"",liveAdaptiveManifest:[e]}}:$e.verify(e)?{isLive:!0,src:e}:{isLive:!1}},e}(),ot=typeof document>"u"?void 0:document.createElement("video");var at="fullscreen",st=function(){function e(e,t){var i=this;Pe(this,"_evt"),Pe(this,"_logger"),Pe(this,"_element"),Pe(this,"_isFillWindow",!1),Pe(this,"_originStyle"),Pe(this,"_isSupportFullscreen",!0),Pe(this,"_onFullscreenChange",(function(){i._logger.i(at,"_onFullscreenChange",i.isFull()),i.isFull()||(i._recoverStyle(),document.body.classList.remove(qe)),i._isFillWindow=!1,i._evt.emit("fullChange",{type:Fe.SYSTEM,isFull:i.isFull()})})),this._evt=e,this._logger=t,!(typeof document>"u")&&(this._isSupportFullscreen=typeof this._getExitFullscreenFunc()<"u"&&!("iOS"===ke.os.name&&"mobile"===ke.device.type),"onfullscreenchange"in document?(document.addEventListener("fullscreenchange",this._onFullscreenChange),document.addEventListener("fullscreenerror",this._onFullscreenChange)):"onwebkitfullscreenchange"in document&&(document.addEventListener("webkitfullscreenchange",this._onFullscreenChange),document.addEventListener("webkitfullscreenerror",this._onFullscreenChange)))}var t=e.prototype;return t.destroy=function(){document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("fullscreenerror",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenerror",this._onFullscreenChange)},t.requestFull=function(e,t){t===Fe.SYSTEM?this.requestFullscreen(e):t===Fe.WINDOW?this.requestFillWindow(e):this._isSupportFullscreen?this.requestFullscreen(e):this.requestFillWindow(e)},t.exitFull=function(e){return e===Fe.SYSTEM?this.exitFullscreen():e===Fe.WINDOW?this.exitFillWindow():void(this.isFull(Fe.SYSTEM)?this.exitFullscreen():this.exitFillWindow())},t.isFull=function(e){return e===Fe.SYSTEM?this.isFullScreen():e===Fe.WINDOW?this.isFillWindow():this.isFullScreen()||this.isFillWindow()},t.requestFullscreen=function(e){var t=this;this._element=e,this._originStyle||this._saveOriginStyle(e),("Mac OS"===ke.os.name||"IE"===ke.browser.name||"iOS"===ke.os.name&&"mobile"!==ke.device.type)&&(e.style.width="100%",e.style.height="100%",e.style.background="black");var i,n=e;n.requestFullscreen?i=n.requestFullscreen():n.mozRequestFullscreen?i=n.mozRequestFullscreen():n.mozRequestFullScreen?i=n.mozRequestFullScreen():n.webkitRequestFullscreen?i=n.webkitRequestFullscreen():n.webkitRequestFullScreen?i=n.webkitRequestFullScreen():n.msRequestFullscreen&&(i=n.msRequestFullscreen()),typeof Promise<"u"&&i instanceof Promise&&i.catch((function(e){return t._logger.e(at,e)}))},t.exitFullscreen=function(){this._recoverStyle(),this._element=void 0;var e=document;e.exitFullscreen?e.exitFullscreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()},t.isFullScreen=function(){var e=document;return!!(e.fullscreen||e.fullscreenElement||e.isFullScreen||e.webkitIsFullScreen||e.mozFullScreen||e.msFullscreenElement)},t.requestFillWindow=function(e){this._element=e,this._originStyle||this._saveOriginStyle(e),e.style.width="100%",e.style.height="100%",e.style.background="black",e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.zIndex="99999",document.body.classList.add(qe),this._isFillWindow=!0,this._evt.emit("fullChange",{type:"window",isFull:!0})},t.exitFillWindow=function(){this._recoverStyle(),this._isFillWindow=!1,this._element&&(this._element.style.zIndex="auto"),this._element=void 0,document.body.classList.remove(qe),this._evt.emit("fullChange",{type:"window",isFull:!1})},t.isFillWindow=function(){return this._isFillWindow},t.isFullscreenAvailable=function(e){return!(e!==Fe.WINDOW&&typeof document<"u")||!!(document.body.requestFullscreen||document.body.webkitRequestFullscreen||document.body.msRequestFullscreen||document.body.mozRequestFullscreen)},t._getExitFullscreenFunc=function(){var e=document;return e.exitFullscreen||e.webkitCancelFullScreen||e.mozCancelFullScreen||e.msExitFullscreen},t._saveOriginStyle=function(e){this._originStyle={position:e.style.position,background:e.style.background,width:e.style.width,height:e.style.height,left:e.style.left,right:e.style.right}},t._recoverStyle=function(){if(this._element)for(var e in this._originStyle)this._element.style[e]=this._originStyle[e];this._originStyle=void 0},e}(),ut="ControlsPlugin",lt="I18nPlugin",ct="LoggerPlugin",dt="HotkeyPlugin",ht="PlayInfoPlugin",ft="RotatePlugin",pt="PreviewPlugin",At="MaskPlugin",vt="VRPlugin",_t="DanmakuPlugin",mt=function(e){return e.DARK="dark",e.LIGHT="light",e}(mt||{}),gt=function(e){return e.BOTTOM="bottom",e.PLAY_BAR="playBar",e.NONE="none",e}(gt||{}),yt=function(e){return e.PLAY_BAR_LEFT="playBarLeft",e.PLAY_BAR_RIGHT="playBarRight",e.CONTEXT_MENU="contextMenu",e}(yt||{}),bt=function(){function e(){Pe(this,"_callbacks",[])}var t=e.prototype;return t.add=function(e){this._callbacks.push(e)},t.remove=function(e){var t=this._callbacks.findIndex((function(t){return t===e}));t>=0&&this._callbacks.splice(t,1)},t.call=function(e){this._callbacks.forEach((function(t){return t(e)}))},t.destroy=function(){this._callbacks.splice(0,this._callbacks.length)},e}(),Et=function(e){function t(){return e.apply(this,arguments)||this}u()(t,e),t.isInstanceOfPlugin=function(e){return"function"==typeof e.beforeInstall&&"function"==typeof e.afterInstall&&"function"==typeof e.beforeUninstall&&"function"==typeof e.afterUninstall&&"function"==typeof e.getLabel};var i=t.prototype;return i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},i.beforeUninstall=function(e){},i.afterUninstall=function(e){},c()(t,[{key:"controlsSoltBtns",get:function(){}}])}(Me);Pe(Et,"label"),Pe(Et,"version"),Pe(Et,"isSupported");var wt=function(e){function t(){return e.apply(this,arguments)||this}u()(t,e);var i=t.prototype;return i.getLabel=function(){return t.label},i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},t}(Et);Pe(wt,"label",ut);var Tt=wt,Rt=function(e){function t(){return e.apply(this,arguments)||this}u()(t,e);var i=t.prototype;return i.getLabel=function(){return t.label},i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},t}(Et);Pe(Rt,"label",lt);var St=Rt,Lt=function(e){function t(){return e.apply(this,arguments)||this}u()(t,e);var i=t.prototype;return i.getLabel=function(){return t.label},i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},i.addBizLog=function(e,t){},i.appendSummaryField=function(e,t){},t}(Et);Pe(Lt,"label",ct);var kt=Lt,It=function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Et);Pe(It,"label",dt);var xt=It,Ot=function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Et);Pe(Ot,"label",ht);var Ct=Ot,Dt=function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Et);Pe(Dt,"label",ft);var Mt=Dt,Nt=function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Et);Pe(Nt,"label",pt);var Pt=Nt,Ut=function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Et);Pe(Ut,"label",At);var Ft=Ut,Bt=function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Et);Pe(Bt,"label",vt);var Ht=Bt,Vt=function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Et);Pe(Vt,"label",_t);var Gt=Vt,jt="pluginBase",Wt=function(){function e(){Pe(this,"_instances",[])}e.register=function(e,t){void 0===t&&(t="append"),E.i(jt,"register",e.label,e.version),e.label||E.i(jt,"register plugin label is empty.");var i=this._plugins.findIndex((function(t){return t.label===e.label}));i>=0?(E.i(jt,"register plugin label: "+e.label+" exists."),this._plugins.splice(i,1,e)):"append"===t?this._plugins.push(e):this._plugins.unshift(e)},e.deregister=function(e){if("string"==typeof e){E.i(jt,"deregister",e);var t=this._plugins.findIndex((function(t){return t.label===e}));if(-1===t)return void E.i(e+" plugin unregistered");this._plugins.splice(t,1)}else{E.i(jt,"deregister",e.label);var i=this._plugins.indexOf(e);if(-1===i)return void E.i(e.label+" plugin unregistered");this._plugins.splice(i,1)}};var t=e.prototype;return t.initialize=function(t){for(var i,n=this._instances,r=d(e._plugins);!(i=r()).done;){var o=i.value;try{if(t&&!1===t[o.label])continue;if(!1===o.isSupported){E.i(jt,"initialize "+o.label+", "+o.version+". The current browser does not support this plugin.");continue}E.i(jt,"initialize",o.label,o.version,t);var a=new o;Et.isInstanceOfPlugin(a)?n.push(a):E.e(jt,"plugin type error: "+a)}catch(a){E.e(jt,"plugin initialize error",a)}}},t.beforeInstallPlugins=function(e,t){for(var i,n=d(this._instances);!(i=n()).done;){var r=i.value,o=r.getLabel();E.i(jt,"beforeInstallPlugins",t,o);try{if(!r.beforeInstall)continue;t&&"object"==typeof t[o]?r.beforeInstall(e,t[o]):r.beforeInstall(e)}catch(e){E.e(jt,"beforeInstallPlugins error",e)}}},t.afterInstallPlugins=function(e,t){for(var i,n=d(this._instances);!(i=n()).done;){var r=i.value,o=r.getLabel();E.i(jt,"afterInstallPlugins",o,t);try{if(!r.afterInstall)continue;t&&"object"==typeof t[o]?r.afterInstall(e,t[o]):r.afterInstall(e)}catch(e){E.e(jt,"afterInstallPlugins error",e)}}},t.beforeUninstallPlugins=function(e){for(var t,i=d(this._instances);!(t=i()).done;){var n=t.value;try{if(E.i(jt,"beforeUninstallPlugins",n.getLabel()),!n.beforeUninstall)continue;n.beforeUninstall.call(n,e)}catch(e){E.e(jt,"plugin beforeUninstall error",e)}}},t.afterUninstallPlugins=function(e){for(var t,i=d(this._instances);!(t=i()).done;){var n=t.value;try{if(E.i(jt,"afterUninstallPlugins",n.getLabel()),!n.afterUninstall)continue;n.afterUninstall.call(n,e)}catch(e){E.e(jt,"plugin afterUninstall error",e)}}this._instances=[]},t.getPlugin=function(e){for(var t=0;t<this._instances.length;t++)if(this._instances[t].getLabel()===e)return this._instances[t]},t.getAllPlugins=function(){return this._instances},e}();Pe(Wt,"_plugins",[]);var Kt=Wt,zt="kwai-player",Jt=function(){function e(t,i){var n,r=this;if(Pe(this,"_pluginBase",new Kt),Pe(this,"_eventHandlers"),Pe(this,"_evt"),Pe(this,"_mainDom"),Pe(this,"_video"),Pe(this,"_kernel"),Pe(this,"_error"),Pe(this,"_config"),Pe(this,"_src",""),Pe(this,"_autoplay",!1),Pe(this,"_preload","none"),Pe(this,"_poster",""),Pe(this,"_controls","default"),Pe(this,"_videoWidth",0),Pe(this,"_videoHeight",0),Pe(this,"_kernelLoaded",!1),Pe(this,"_livePaused",!1),Pe(this,"_canvas"),Pe(this,"_mediaInfo"),Pe(this,"_logger"),Pe(this,"_isLiveShift",!1),Pe(this,"_full"),Pe(this,"_subContainerNumber",0),Pe(this,"_data"),Pe(this,"_id"),Pe(this,"_videoLayer"),Pe(this,"_videoInteractiveLayer"),Pe(this,"_posterLayer"),Pe(this,"_preprocessSrcFunc"),Pe(this,"_preprocessURL"),Pe(this,"_kernelStartTimeout",0),Pe(this,"_instanceId"),Pe(this,"_yodaDom"),Pe(this,"_yoda"),Pe(this,"_kernelType","unknown"),Pe(this,"_outputLogger"),Pe(this,"_yodaEnabled",!0),Pe(this,"_screenshotId",1),Pe(this,"_screenshotQueue",[]),Pe(this,"_observer"),Pe(this,"_objectFit",""),Pe(this,"requestFullscreen",(function(e){if(r._logger.i(zt,"requestFullscreen"),r._mainDom){if(r._yoda)return void(r._yoda.isFullscreen()||r._yoda.fullScreen("portrait"));r._full.isFull(e)||r._full.requestFull(r._mainDom,e)}})),Pe(this,"exitFullscreen",(function(e){if(r._logger.i(zt,"exitFullscreen"),r._mainDom){if(r._yoda)return void r._yoda.exitFullScreen();r._full.isFull(e)&&r._full.exitFull(e)}})),Pe(this,"_onFullscreenchange",(function(e){r.emit(He.FULLSCREEN_CHANGE,e)})),Pe(this,"_onMutedChange",(function(e){r._video&&(r._video.muted=e)})),Pe(this,"_onVideoLoadstart",(function(){r.emit(He.LOADSTART)})),Pe(this,"_onVideoProgress",(function(){r.emit(He.PROGRESS)})),Pe(this,"_onVideoSuspend",(function(){r.emit(He.SUSPEND)})),Pe(this,"_onVideoAbort",(function(){r.emit(He.ABORT)})),Pe(this,"_onVideoEmptied",(function(){r.emit(He.EMPTIED)})),Pe(this,"_onVideoStalled",(function(){r.emit(He.STALLED)})),Pe(this,"_onVideoLoadedmetadata",(function(){r.emit(He.LOADEDMETADATA)})),Pe(this,"_onVideoLoadeddata",(function(){r.emit(He.LOADEDDATA)})),Pe(this,"_onVideoCanplay",(function(){r.emit(He.CANPLAY)})),Pe(this,"_onVideoCanplaythrough",(function(){r.emit(He.CANPLAYTHROUGH)})),Pe(this,"_onVideoPlaying",(function(){"iOS"!==ke.os.name&&"Android"!==ke.os.name&&r._hidePosterDom(),r.emit(He.PLAYING)})),Pe(this,"_onVideoWaiting",(function(){r.emit(He.WAITING)})),Pe(this,"_onVideoSeeking",(function(){r.emit(He.SEEKING)})),Pe(this,"_onVideoSeeked",(function(){r.emit(He.SEEKED),r.kernel&&r._updateIsLiveShift(r.kernel.liveShift)})),Pe(this,"_onVideoEnded",(function(){r.emit(He.ENDED)})),Pe(this,"_onVideoDurationchange",(function(){r.emit(He.DURATIONCHANGE)})),Pe(this,"_onVideoTimeupdate",(function(){var e,t;"none"!==r._posterLayer.style.display&&4===(null==(e=r._video)?void 0:e.readyState)&&!(null!=(t=r._video)&&t.paused)&&r._hidePosterDom(),r.emit(He.TIMEUPDATE)})),Pe(this,"_onVideoPlay",(function(){r.emit(He.PLAY)})),Pe(this,"_onVideoPause",(function(){r.emit(He.PAUSE)})),Pe(this,"_onVideoRatechange",(function(){r.emit(He.RATECHANGE)})),Pe(this,"_onVideoResize",(function(){r.emit(He.RESIZE)})),Pe(this,"_onVideoVolumechange",(function(){r.emit(He.VOLUMECHANGE)})),Pe(this,"_onVideoEnterpictureinpicture",(function(){r.emit(He.ENTER_PICTURE_IN_PICTURE)})),Pe(this,"_onVideoLeavepictureinpicture",(function(){r.emit(He.LEAVE_PICTURE_IN_PICTURE)})),this._instanceId=Xe.next(),this._logger=(new w).setLevel(De).setName("kwai-p").setId(this._instanceId),null!=i&&i.logger&&this._logger.setOutput(i.logger),T("kwai-player",e.packVersion),this._logger.i(zt,e.packVersion,e.version,this._instanceId,t.toString(),i),this._data=i||{},"string"==typeof t?(this._id=t,this._mainDom=document.querySelector(t)):(this._id="kp_"+(1e3*Math.random()|0),this._mainDom=t),this._evt=new Me,this._evt.setMaxListeners(30),this._full=new st(this._evt,this._logger),this._evt.on("fullChange",this._onFullscreenchange),this._eventHandlers={loadstart:this._onVideoLoadstart,progress:this._onVideoProgress,suspend:this._onVideoSuspend,abort:this._onVideoAbort,emptied:this._onVideoEmptied,stalled:this._onVideoStalled,loadedmetadata:this._onVideoLoadedmetadata,loadeddata:this._onVideoLoadeddata,canplay:this._onVideoCanplay,canplaythrough:this._onVideoCanplaythrough,playing:this._onVideoPlaying,waiting:this._onVideoWaiting,seeking:this._onVideoSeeking,seeked:this._onVideoSeeked,ended:this._onVideoEnded,durationchange:this._onVideoDurationchange,timeupdate:this._onVideoTimeupdate,play:this._onVideoPlay,pause:this._onVideoPause,ratechange:this._onVideoRatechange,resize:this._onVideoResize,volumechange:this._onVideoVolumechange,enterpictureinpicture:this._onVideoEnterpictureinpicture,leavepictureinpicture:this._onVideoLeavepictureinpicture},i&&typeof i.controls<"u"&&(this.controls=i.controls),this._videoLayer=document.createElement("div"),this._videoLayer.className=Je,this._posterLayer=document.createElement("div"),this._posterLayer.className=ze,this._posterLayer.dataset.kpRole="poster",this._videoLayer.appendChild(this._posterLayer),this._videoInteractiveLayer=document.createElement("div"),this._videoInteractiveLayer.className=Ke,this._video=document.createElement("video"),!this._mainDom)return this._logger.i(zt,"container not found."+t),void this._setError({code:et.CTOR_ERROR,message:"container not found."+t});this._observer=new MutationObserver((function(e){for(var t,i=d(e);!(t=i()).done;){var n=t.value;"attributes"===n.type&&"style"===n.attributeName&&r._applyObjectFit()}}));this._observer.observe(this._mainDom,{attributes:!0,attributeFilter:["style"]}),this._applyObjectFit(),this._mainDom.className=this._mainDom.className?this._mainDom.className+" "+We:We,this._mainDom.setAttribute("role","player"),this._mainDom.appendChild(this._videoLayer),this._mainDom.appendChild(this._videoInteractiveLayer),this._video.controls=!1,this._videoLayer.appendChild(this.video),e._yodaClass&&(this._yodaDom=document.createElement("div"),this._yodaDom.className=Ye,this._videoLayer.appendChild(this._yodaDom)),this._bindVideo(),this._pluginBase.initialize(null==i?void 0:i.plugins),this._pluginBase.beforeInstallPlugins(this,null==i?void 0:i.plugins),i&&this._parseData(i);var o=(null==(n=this._config)?void 0:n.src)||this._src;o&&this._initKernel(!1),this._pluginBase.afterInstallPlugins(this,null==i?void 0:i.plugins),o&&(this._kernelStartTimeout=+setTimeout((function(){r._clearKernelStartTimer(),r._kernelStart()}),0)),this._logger.i(zt,"constructor completed.")}var t=e.prototype;return t.setPreprocessURL=function(e){this._preprocessURL=e},t.setPreprocessSrcFunc=function(e){this._preprocessSrcFunc=e},t.load=function(){var e;this._logger.i(zt,"call load"),null==(e=this._kernel)||e.load(),this._kernelLoaded=!0},t.play=function(){var e,t,i,n,r,o=this;return this._logger.i(zt,"call play",this._kernelLoaded,this._livePaused),this._yoda?(null==(t=null==(e=this._video)?void 0:e.play())||t.catch((function(e){return o._logger.i(zt,"play, call play() fail.",e)})),this._yoda.play()):(this._livePaused&&!this._isLiveShiftMode()?null==(i=this._kernel)||i.refresh():this._kernelLoaded||this.load(),this._video.paused?null==(r=null==(n=this._video)?void 0:n.play())?void 0:r.catch((function(e){return o._logger.i(zt,"play, call play() fail.",e)})):Promise.resolve())},t.pause=function(){var e,t,i;if(this._logger.i(zt,"call pause",null==(e=this._mediaInfo)?void 0:e.isLive),!this._yoda)return this._kernel&&null!=(t=this._mediaInfo)&&t.isLive&&!this._isLiveShiftMode()&&(this._logger.i(zt,"live stop load"),this._kernel.stopLoad(),this._livePaused=!0),this._isLiveShiftMode()&&!this._isLiveShift&&this._updateIsLiveShift(!0),null==(i=this._video)?void 0:i.pause();this._yoda.pause()},t.requestPictureInPicture=function(){return this._logger.i(zt,"call requestPictureInPicture"),this._yoda?Promise.reject("not support requestPictureInPicture. yoda"):this._video&&"requestPictureInPicture"in this._video?this._video.requestPictureInPicture():Promise.reject("not support requestPictureInPicture")},t.isPictureInPictureAvailable=function(){return!this._yoda&&!(null==ot||!ot.requestPictureInPicture)},t.destroy=function(){var e,t,i;this._logger.i(zt,"call destroy"),null==(e=this._observer)||e.disconnect(),this._observer=void 0,this._clearKernelStartTimer(),this._preprocessSrcFunc=void 0,this._screenshotQueue=[],this._pluginBase.beforeUninstallPlugins(this),this._evt.removeAllListeners(),this._destroyKernel(),this._unbindVideo(),this._destroyYoda(),null==(t=this._videoLayer.parentElement)||t.removeChild(this._videoLayer),null==(i=this._videoLayer.parentElement)||i.removeChild(this._videoInteractiveLayer),this.removeAllListeners(),this._pluginBase.afterUninstallPlugins(this)},t.refresh=function(){var e;this._logger.i(zt,"call refresh"),null==(e=this._kernel)||e.refresh()},t.jumpToLive=function(){var e,t;this._logger.i(zt,"call jumpToLive type: "+(null==(e=this._data)?void 0:e.liveShiftType)),this.kernel&&null!=(t=this._data)&&t.liveShiftType&&this._isLiveShiftMode()&&(this.video.currentTime=this.video.duration-this.kernel.liveShiftDelaySec,this.kernel&&this._updateIsLiveShift(!0))},t.getStreamTime=function(e){var t;return this._yoda?0:(null==(t=this._kernel)?void 0:t.getStreamTime(e))||0},e.register=function(e,t){void 0===t&&(t="append"),Kt.register(e,t)},e.deregister=function(e){Kt.deregister(e)},e.setYoda=function(t){e._yodaClass=t},t.getPluginInstance=function(e){return this._pluginBase.getPlugin(e)},t.getAllPlugins=function(){return this._pluginBase.getAllPlugins()},t.createSubContainer=function(e){void 0===e&&(e=Be.DEFAULT);var t=document.createElement("div");t.id=this._id+"-sub-"+Math.round(this._subContainerNumber++);var i=this._mainDom;if(e===Be.VIDEO&&(i=this._videoLayer),e===Be.VIDEO_INTERACTIVE&&(i=this._videoInteractiveLayer),!i)throw new Error("cteate sub container error. no parent found.");return i.children.length?i.children[i.children.length-1].insertAdjacentElement("afterend",t):i.appendChild(t),t},t.isFullscreen=function(e){return this._yoda?this._yoda.isFullscreen():this._full.isFull(e)},t.isFullscreenAvailable=function(e){return!!this._yoda||this._full.isFullscreenAvailable(e)},t._applyObjectFit=function(){var e,t=(null==(e=this._mainDom)?void 0:e.style.objectFit)||"";this._logger.i(zt,"apply objectFit: "+t),this._video.style.objectFit=t,this._canvas&&(this._canvas.style.objectFit=t),this._yoda&&(this._yoda.objectFit=t||"contain"),this._objectFit=t,this.emit(He.OBJECT_FIT_CHANGE)},t.removeSubContainer=function(e){e.parentElement&&e.parentElement.removeChild(e)},t.screenshot=function(){var e=this,t=this._kernel;return this._yoda?(this._logger.i(zt,"screenshot yoda"),this._yoda.screenshot()):t?(this._screenshotId++,new Promise((function(i){var n=e._screenshotId.toString();e._screenshotQueue.push({id:n,timer:setTimeout((function(){e._logger.i(zt,"screenshot["+n+"] timeout."),e._resolveScreenShotFromQueue(n)}),500),callback:i}),t.screenshot({id:n}),e._logger.i(zt,"screenshot["+n+"] kernel")}))):(this._logger.i(zt,"screenshot player not ready."),Promise.resolve())},t._resolveScreenShotFromQueue=function(e,t){for(var i=0;i<this._screenshotQueue.length;i++)if(e===this._screenshotQueue[i].id)return clearTimeout(this._screenshotQueue[i].timer),this._screenshotQueue[i].callback(t),void this._screenshotQueue.splice(i,1);this._logger.i(zt,"screenshot["+e+"] not found.")},t._updatePosterDom=function(){Ce?(this._video.poster=this._poster||"",this._hidePosterDom()):this._poster?(this._video.poster="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAC1JREFUWEft0EERAAAAAUH6lxbDZxU4s815PffjAAECBAgQIECAAAECBAgQIDAaPwAh6O5R/QAAAABJRU5ErkJggg==",this._posterLayer.className=ze,this._posterLayer.style.backgroundImage="url("+this._poster+")"):(this._video.poster="",this._posterLayer.className="",this._posterLayer.style.backgroundImage="")},t._hidePosterDom=function(){this._posterLayer.style.display="none"},t._setIsUseCanvas=function(e){this._video&&(this._video.style.display=e?"none":"block")},t._setError=function(e){var t=this;this._error=e,this._error&&setTimeout((function(){try{t.emit(He.ERROR,t._error)}catch(e){}}),0)},t._resetPlayerStat=function(){if(this._canvas){try{this._videoLayer.removeChild(this._canvas)}catch(e){}this._canvas=void 0}this._setError(void 0),this._setIsUseCanvas(!1),this._mediaInfo=void 0,this._isLiveShift=!1},t._destroyKernel=function(){this._kernel&&(this._kernelLoaded=!1,this._livePaused=!1,this.pause(),this._kernel.destroy(),this._kernel=void 0)},t._destroyYoda=function(){this._yoda&&(this._yoda.destroy(),this._yoda=void 0)},t._initYodaKernel=function(t){if(this._logger.i(zt,"yoda init"),!e._yodaClass||!this._yodaDom||!this._src)return!1;var i=rt.parse(this._src);return!(!i||!i.src)&&(this._yoda||(this._logger.i(zt,"yoda new instance."),this._yoda=new e._yodaClass(this._yodaDom,this._logger,t),this._bindYoda(this._yoda),this._kernelType="yoda"),this._logger.i(zt,"yoda instance already exists. try update conf"),i.isLive,this._yoda.src={isLive:i.isLive,src:i.src},this.emit(He.ATTRIBUTE_CHANGE_MUTED),!0)},t._bindYoda=function(e){var t=this;this._logger.i(zt,"yoda bind event."),e.on("play",this._onVideoPlay),e.on("playing",this._onVideoPlaying),e.on("pause",this._onVideoPause),e.on("loadedmetadata",(function(){t._onVideoLoadedmetadata(),t._onVideoDurationchange()})),e.on("timeupdate",this._onVideoTimeupdate),e.on("ended",this._onVideoEnded),e.on("waiting",this._onVideoWaiting),e.on("seeked",this._onVideoSeeked),e.on("seeking",this._onVideoSeeking),e.on("resize",(function(e){t._videoWidth=e.data.width,t._videoHeight=e.data.height,t._onVideoResize()})),e.on("error",(function(i){if("initFailed"===i.data.type||"canNotInsert"===i.data.type||"internal"===i.data.type||"domLost"===i.data.type){var n="play"===e.actionOnReady;return t._destroyYoda(),t._yodaEnabled=!1,t._initKernel(),void(n&&t.play())}t._setError(a()({code:0},i.data.originalError))}))},t._bindVideo=function(){if(this._video)for(var e in this._eventHandlers)this._video.addEventListener(e,this._eventHandlers[e])},t._unbindVideo=function(){if(this._video)for(var e in this._eventHandlers)this._video.removeEventListener(e,this._eventHandlers[e])},t._parseData=function(e){this._logger.i(zt,"parse data.",e),e.src&&(this._src=this._preprocessSrcFunc?this._preprocessSrcFunc(e.src):e.src),e.config&&(this._config=e.config),e.crossOrigin&&(this.crossOrigin=e.crossOrigin),typeof e.preload<"u"&&(this.preload=e.preload),"number"==typeof e.defaultPlaybackRate&&(this.defaultPlaybackRate=e.defaultPlaybackRate),"number"==typeof e.playbackRate&&(this.playbackRate=e.playbackRate),typeof e.autoplay<"u"&&(this.autoplay=e.autoplay),typeof e.loop<"u"&&(this.loop=e.loop),typeof e.controls<"u"&&(this.controls=e.controls),"number"==typeof e.volume&&(this.volume=e.volume),typeof e.muted<"u"&&(this.muted=e.muted),typeof e.defaultMuted<"u"&&(this.defaultMuted=e.defaultMuted),typeof e.disablePictureInPicture<"u"&&(this.disablePictureInPicture=e.disablePictureInPicture),typeof e.disableAdaptive<"u"&&(this.disableAdaptive=e.disableAdaptive),typeof e.playsinline<"u"&&(this.playsinline=e.playsinline),typeof e.liveShiftType<"u"&&(this.liveShiftType=e.liveShiftType),typeof e.logger<"u"&&(this._outputLogger=e.logger),this.poster=e.poster||""},t._initKernel=function(t){var i,n,r,o,s,u=this;if(void 0===t&&(t=!0),this._logger.i(zt,"init kernel"),this._video){if(this._posterLayer.style.display=Ce?"none":"block",this._destroyKernel(),!(this._src||null!=(i=this._config)&&i.src))return this._video.src="",void this._resetPlayerStat();this._config||(this._config={});var l=a()({},this._config,{adaptive:!1===(null==(n=this._data)?void 0:n.disableAdaptive),liveShiftType:null==(r=this._data)?void 0:r.liveShiftType,ntp:!1});if($e.verify(this._src)?(this._logger.i(zt,"live feed to media desc"),l.src=$e.parse(this._src)):l.src=this._src,this._preprocessURL&&(l.preprocessUrl=this._preprocessURL),typeof l.nativeFirst>"u"&&Ce&&(l.nativeFirst=!0),this._isLiveShiftMode()&&(l.catchUpPausedLive=!1),null!=(o=this._data)&&o.logger&&(l.logger=this._data.logger),this._resetPlayerStat(),this._logger.i(zt,"yoda check mobile: "+Ce+" liveshift: "+this.liveShiftType+" class: "+!!e._yodaClass),Ce&&this._yodaEnabled&&this.liveShiftType===Ue.NONE&&e._yodaClass){var c={defaultMuted:this.defaultMuted,muted:this.muted,defaultPlaybackRate:this.defaultPlaybackRate,playbackRate:this.playbackRate,autoplay:this._autoplay,loop:this.loop,objectFit:this._objectFit||"contain",biz:null==(s=this._data)?void 0:s.bizData};if(this._initYodaKernel(c))return void(t&&this._clearKernelStartTimer())}else this._destroyYoda();this._kernelType="kwai-player-kernel",this._logger.i(zt,"init kernel",this._kernelType);var d=this._kernel=new Ge(this._video,l);d.on(je.VIDEO_RENDERER_CHANGE,(function(e){var t=u._videoLayer;if("canvas"===e.type&&(u._setIsUseCanvas(!0),u._canvas=e.canvas,u._canvas&&t.insertAdjacentElement("afterbegin",u._canvas)),"video"===e.type){u._setIsUseCanvas(!1);try{u._canvas&&t.removeChild(u._canvas)}catch(e){}u._canvas=void 0}u._applyObjectFit(),u.emit(He.VIDEO_RENDERER_CHANGE,e)})),d.on(je.MANIFEST_PARSED,(function(e){u._logger.i(zt,je.MANIFEST_PARSED,e),u.emit(He.MANIFEST_PARSED,e)})),d.on(je.LEVEL_SWITCHING,(function(e){u.emit(He.LEVEL_SWITCHING,e)})),d.on(je.LEVEL_SWITCHED,(function(e){u.emit(He.LEVEL_SWITCHED,e)})),d.on(je.LEVEL_SWITCH_PLAYING,(function(e){u.emit(He.LEVEL_SWITCH_PLAYING,e)})),d.on(je.LEVEL_SWITCH_FAILED,(function(){u.emit(He.LEVEL_SWITCH_FAILED)})),d.on(je.LEVEL_UPDATED,(function(e){u.emit(He.LEVEL_UPDATED,e)})),d.on(je.AUDIO_TRACK_SWITCHING,(function(e){u.emit(He.AUDIO_TRACKS_SWITCHING,e)})),d.on(je.AUDIO_TRACK_SWITCHED,(function(e){u.emit(He.AUDIO_TRACKS_SWITCHED,e)})),d.on(je.ERROR,(function(e){u._setError({code:e.code,message:e.reason})})),d.on(je.REPORT,(function(e){"mediaInfo"===e.type&&(u._videoWidth=e.value.width||0,u._videoHeight=e.value.height||0,u._mediaInfo=e.value,u._data&&e.value.liveShiftType&&(u.liveShiftType=e.value.liveShiftType)),u.emit(He.REPORT,e)})),d.on(je.SCREENSHOT,(function(e){u._logger.i(zt,"screenshot["+e.id+"] kernel evt. id: "+e.id+" img: "+!!e.image),e.id&&u._resolveScreenShotFromQueue(e.id,e.image)})),t&&(this._clearKernelStartTimer(),this._kernelStart())}},t._clearKernelStartTimer=function(){this._kernelStartTimeout&&(clearTimeout(this._kernelStartTimeout),this._kernelStartTimeout=0)},t._kernelStart=function(){var e=this;if(this._kernel&&this._video&&(this._autoplay||""===this._preload||"auto"===this._preload||"metadata"===this._preload)&&(this._kernel.load(),this._kernelLoaded=!0,this.autoplay)){var t=this._video.play();t instanceof Promise&&t.catch((function(){var t;e._logger.i(zt,"autoplay fail, retry."),e._onMutedChange(!0),null==(t=e._video)||t.play().catch((function(){}))}))}},t._updateIsLiveShift=function(e){e!==this._isLiveShift&&(this._isLiveShift=e,this.emit(He.LIVE_SHIFT_CHANGE))},t._isLiveShiftMode=function(){var e;return!(null==(e=this._data)||!e.liveShiftType)&&this._data.liveShiftType!==Ue.NONE},t.on=function(e,t){this._evt.on(e,t)},t.once=function(e,t){this._evt.once(e,t)},t.removeAllListeners=function(e){this._logger.i(zt,"call removeAllListeners"),this._evt.removeAllListeners(e)},t.off=function(e,t){this._evt.off(e,t)},t.listeners=function(e){return this._evt.listeners(e)},t.emit=function(e,t){return this._evt.emit(e,t)},t.listenerCount=function(e){return this._evt.listenerCount(e)},c()(e,[{key:"version",get:function(){return e.version}},{key:"packVersion",get:function(){return e.packVersion}},{key:"instanceId",get:function(){return this._instanceId}},{key:"kernelType",get:function(){return this._kernelType}},{key:"logger",get:function(){return this._logger}},{key:"outputLogger",get:function(){return this._outputLogger},set:function(e){this._logger.i(zt,"call set output logger",e),this._outputLogger=e,this._logger.setOutput(e),this._kernel&&(this._kernel.outputLog=e)}},{key:"config",get:function(){return this._logger.i(zt,"call get config",this._config),this._config},set:function(e){this._logger.i(zt,"call set config",e),this._config=e,this._yoda||(this._initKernel(),this.emit(He.ATTRIBUTE_CHANGE_CONFIG))}},{key:"error",get:function(){return this._logger.i(zt,"call get error",this._error),this._error}},{key:"videoId",get:function(){var e;return null==(e=this._data)?void 0:e.videoId},set:function(e){this._data&&(this._data.videoId=e,this.emit(He.ATTRIBUTE_CHANGE_VIDEO_ID))}},{key:"previewUrl",get:function(){var e;return null==(e=this._data)?void 0:e.previewUrl},set:function(e){this._logger.i(zt,"call set previewUrl",e),this._data&&(this._data.previewUrl=e,this.emit(He.ATTRIBUTE_CHANGE_PREVIEW_URL))}},{key:"maskUrl",get:function(){var e;return null==(e=this._data)?void 0:e.maskUrl},set:function(e){this._logger.i(zt,"call set maskUrl",e),this._data&&(this._data.maskUrl=e,this.emit(He.ATTRIBUTE_CHANGE_MASK_URL))}},{key:"disableMask",get:function(){var e;return null==(e=this._data)?void 0:e.disableMask},set:function(e){this._logger.i(zt,"call set disableMask",e),this._data&&(this._data.disableMask=e,this.emit(He.ATTRIBUTE_CHANGE_DISABLE_MASK))}},{key:"src",get:function(){return this._logger.v(zt,"call get src",this._src),this._src},set:function(e){this._logger.i(zt,"call set src",e),this._src=this._preprocessSrcFunc?this._preprocessSrcFunc(e):e,this._destroyKernel(),this.emit(He.ATTRIBUTE_CHANGE_SRC),this._initKernel()}},{key:"isLiveShift",get:function(){return this._isLiveShift}},{key:"liveShiftType",get:function(){var e;return(null==(e=this._data)?void 0:e.liveShiftType)||Ue.NONE},set:function(e){this._logger.i(zt,"call set liveShiftType",e),this._data&&(this._data.liveShiftType=e,this.emit(He.LIVE_SHIFT_TYPE_CHANGE))}},{key:"crossOrigin",get:function(){var e;return this._logger.v(zt,"call get crossOrigin",null==(e=this._video)?void 0:e.crossOrigin),this._video?this._video.crossOrigin:null},set:function(e){this._logger.i(zt,"call set crossOrigin",e),this._video&&(this._video.crossOrigin=e),this.emit(He.ATTRIBUTE_CHANGE_CROSS_ORIGIN)}},{key:"networkState",get:function(){var e;return this._logger.v(zt,"call get networkState",null==(e=this._video)?void 0:e.networkState),this._video?this._video.networkState:0}},{key:"preload",get:function(){return this._logger.v(zt,"call get preload",this._preload),this._preload},set:function(e){this._logger.i(zt,"call set preload",e),this._preload=e,this._video.preload=e,this.emit(He.ATTRIBUTE_CHANGE_PRELOAD)}},{key:"buffered",get:function(){var e;if(!this._yoda)return null==(e=this._video)?void 0:e.buffered}},{key:"readyState",get:function(){return this._yoda?this._yoda.readyState:this._video?this._video.readyState:0}},{key:"seeking",get:function(){var e;return this._yoda?this._yoda.seeking:!(null==(e=this._video)||!e.seeking)}},{key:"currentTime",get:function(){return this._yoda?this._yoda.currentTime:this._video?this._video.currentTime:0},set:function(e){this._logger.i(zt,"call set currentTime",e);try{this._yoda&&(this._yoda.currentTime=e),this._video&&(this._video.currentTime=e),this.emit(He.ATTRIBUTE_CHANGE_CURRENT_TIME)}catch(e){}}},{key:"duration",get:function(){return this._yoda?this._yoda.duration:this._video?this._video.duration:NaN}},{key:"paused",get:function(){return this._yoda?this._yoda.paused:!this._video||this._video.paused}},{key:"defaultPlaybackRate",get:function(){var e;return this._logger.v(zt,"call get defaultPlaybackRate",null==(e=this._video)?void 0:e.defaultPlaybackRate),this._video?this._video.defaultPlaybackRate:1},set:function(e){this._logger.i(zt,"call set defaultPlaybackRate",e),this._yoda&&(this._yoda.defaultPlaybackRate=e),this._video&&(this._video.defaultPlaybackRate=e),this.emit(He.ATTRIBUTE_CHANGE_DEFAULT_PLAYBACK_RATE)}},{key:"playbackRate",get:function(){return this._video?this._video.playbackRate:1},set:function(e){this._logger.i(zt,"call set playbackRate",e),this._yoda&&(this._yoda.playbackRate=e),this._video&&(this._video.playbackRate=e),this.emit(He.ATTRIBUTE_CHANGE_PLAYBACK_RATE)}},{key:"played",get:function(){var e;if(!this._yoda)return null==(e=this._video)?void 0:e.played}},{key:"seekable",get:function(){var e;if(!this._yoda)return null==(e=this._video)?void 0:e.seekable}},{key:"ended",get:function(){return this._yoda?this._yoda.ended:!!this._video&&this._video.ended}},{key:"autoplay",get:function(){return this._autoplay},set:function(e){this._logger.i(zt,"call set autoplay",e),this._autoplay=e,this._yoda&&(this._yoda.autoplay=e),this.emit(He.ATTRIBUTE_CHANGE_AUTOPLAY)}},{key:"loop",get:function(){return this._yoda?this._yoda.loop:!!this._video&&this._video.loop},set:function(e){this._logger.i(zt,"call set loop",e),this._video&&(this._video.loop=e),this.emit(He.ATTRIBUTE_CHANGE_LOOP)}},{key:"controls",get:function(){return this._controls},set:function(e){this._logger.i(zt,"call set controls",e),e!==this._controls&&(this._controls=e),this.emit(He.ATTRIBUTE_CHANGE_CONTROLS)}},{key:"volume",get:function(){return this._yoda?1:this._video?this._video.volume:1},set:function(e){this._video&&(this._video.volume=e<0?0:e>1?1:e,this.emit(He.ATTRIBUTE_CHANGE_VOLUME))}},{key:"muted",get:function(){return this._yoda?this._yoda.muted:!!this._video&&this._video.muted},set:function(e){this._logger.i(zt,"call set muted: "+e+", hasVideo: "+!!this._video),this._yoda&&(this._yoda.muted=e),this._video&&(this._video.muted=e),this.emit(He.ATTRIBUTE_CHANGE_MUTED)}},{key:"defaultMuted",get:function(){return this._yoda?this._yoda.defaultMuted:!!this._video&&this._video.defaultMuted},set:function(e){this._logger.i(zt,"call set defaultMuted",e),this._yoda&&(this._yoda.defaultMuted=e),this._video&&(this._video.defaultMuted=e),this.emit(He.ATTRIBUTE_CHANGE_DEFAULT_MUTED)}},{key:"videoWidth",get:function(){var e;return this._videoWidth||(null==(e=this._video)?void 0:e.videoWidth)}},{key:"videoHeight",get:function(){var e;return this._videoHeight||(null==(e=this._video)?void 0:e.videoHeight)}},{key:"poster",get:function(){return this._poster},set:function(e){this._logger.i(zt,"call set poster",e),this._poster=e,this._updatePosterDom(),this.emit(He.ATTRIBUTE_CHANGE_POSTER)}},{key:"disablePictureInPicture",get:function(){var e;return!!this._yoda||!(null==(e=this._video)||!e.disablePictureInPicture)},set:function(e){this._logger.i(zt,"call set disablePictureInPicture",e),!this._yoda&&this._video&&(this._video.disablePictureInPicture=e,this.emit(He.ATTRIBUTE_CHANGE_DISABLE_PICTURE_IN_PICTURE))}},{key:"disableDownload",get:function(){var e;return null==(e=this._data)?void 0:e.disableDownload},set:function(e){this._logger.i(zt,"call set disableDownload",e),this._data&&(this._data.disableDownload=e,this.emit(He.ATTRIBUTE_CHANGE_DISABLE_DOWNLOAD))}},{key:"playsinline",get:function(){var e;return!(null==(e=this._video)||!e.hasAttribute("playsinline"))},set:function(e){this._logger.i(zt,"call set playsinline",e),this._video&&(this._video.playsInline=e,this._video.webKitPlaysInline=e,e?(this._video.setAttribute("playsinline","playsinline"),this._video.setAttribute("webkit-playsinline","webkit-playsinline"),this._video.setAttribute("x5-playsinline","x5-playsinline")):(this._video.removeAttribute("playsinline"),this._video.removeAttribute("webkit-playsinline"),this._video.removeAttribute("x5-playsinline")),this.emit(He.ATTRIBUTE_CHANGE_PLAYSINLINE))}},{key:"disableAdaptive",get:function(){var e;return null==(e=this._data)?void 0:e.disableAdaptive},set:function(e){this._logger.i(zt,"call set disableAdaptive",e),this._data&&(this._data.disableAdaptive=e,this.emit(He.ATTRIBUTE_CHANGE_DISABLE_ADAPTIVE))}},{key:"currentLevel",get:function(){var e;return(null==(e=this._kernel)?void 0:e.currentLevel)||0},set:function(e){var t,i,n,r=this;if(this._logger.i(zt,"call set currentLevel",e,!!this._kernel,this._livePaused),this._kernel){var o=this._video.paused;this._livePaused?(null==(t=this._kernel)||t.refresh(),this._kernel.currentLevel=e):(this._kernel.currentLevel=e,this.emit(He.ATTRIBUTE_CHANGE_CURRENT_LEVEL)),!o&&this._video.paused&&(this._logger.i(zt,"set level. play"),null==(n=null==(i=this._video)?void 0:i.play())||n.catch((function(e){return r._logger.i(zt,"set current level, call play() fail.",e)})))}}},{key:"nextLevel",get:function(){var e;return(null==(e=this._kernel)?void 0:e.nextLevel)||0},set:function(e){var t,i,n,r=this;if(this._logger.i(zt,"call set nextLevel",e),this._kernel){var o=this._video.paused;this._livePaused?(null==(t=this._kernel)||t.refresh(),this._kernel.currentLevel=e):(this._kernel.nextLevel=e,this.emit(He.ATTRIBUTE_CHANGE_NEXT_LEVEL)),!o&&this._video.paused&&(this._logger.i(zt,"set next level. play"),null==(n=null==(i=this._video)?void 0:i.play())||n.catch((function(e){return r._logger.i(zt,"set next level, call play() fail.",e)})))}}},{key:"currentVideoFrame",get:function(){var e;return(null==(e=this._kernel)?void 0:e.currentVideoFrame)||0},set:function(e){this._kernel&&(this._kernel.currentVideoFrame=e,this.emit(He.ATTRIBUTE_CHANGE_CURRENT_FRAME))}},{key:"totalVideoFrames",get:function(){var e;return(null==(e=this._kernel)?void 0:e.totalVideoFrames)||0}},{key:"currentLevelTimeInfo",get:function(){var e;return null==(e=this._kernel)?void 0:e.currentLevelTimeInfo}},{key:"video",get:function(){return this._video}},{key:"canvas",get:function(){return this._canvas}},{key:"yodaDom",get:function(){return this._yodaDom}},{key:"audioTrack",get:function(){return this._kernel?this._kernel.audioTrack:-1},set:function(e){this._logger.i(zt,"call set audioTrack",e),this._kernel&&(this._kernel.audioTrack=e,this.emit(He.ATTRIBUTE_CHANGE_AUDIO_TRACK))}},{key:"productName",get:function(){var e;return null==(e=this._data)?void 0:e.productName},set:function(e){this._logger.i(zt,"call set productName",e),this._data&&(this._data.productName=e)}},{key:"prefetch",get:function(){var e;return null==(e=this._data)?void 0:e.prefetch},set:function(e){this._logger.i(zt,"call set prefetch",e),this._data&&(this._data.prefetch=e,this.emit(He.ATTRIBUTE_CHANGE_PREFETCH))}},{key:"showProgress",get:function(){var e;return null==(e=this._data)?void 0:e.showProgress},set:function(e){this._logger.i(zt,"call set showProgress",e),this._data&&(this._data.showProgress=e,this.emit(He.ATTRIBUTE_CHANGE_SHOW_PROGRESS))}},{key:"showTime",get:function(){var e;return null==(e=this._data)?void 0:e.showTime},set:function(e){this._logger.i(zt,"call set showTime",e),this._data&&(this._data.showTime=e,this.emit(He.ATTRIBUTE_CHANGE_SHOW_TIME))}},{key:"disableHotkey",get:function(){var e;return null==(e=this._data)?void 0:e.disableHotkey},set:function(e){this._logger.i(zt,"call set disableHotkey",e),this._data&&(this._data.disableHotkey=e,this.emit(He.ATTRIBUTE_CHANGE_DISABLE_HOTKEY))}},{key:"disableDanmaku",get:function(){var e;return null==(e=this._data)?void 0:e.disableDanmaku},set:function(e){this._logger.i(zt,"call set disableDanmaku",e),this._data&&(this._data.disableDanmaku=e,this.emit(He.ATTRIBUTE_CHANGE_DISABLE_DANMAKU))}},{key:"danmakuRendering",get:function(){var e;return null==(e=this._data)?void 0:e.danmakuRendering},set:function(e){this._logger.i(zt,"call set danmakuRendering",e),this._data&&(this._data.danmakuRendering=e,this.emit(He.ATTRIBUTE_CHANGE_DANMAKU_RENDERING))}},{key:"showInfoPanel",get:function(){var e;return null==(e=this._data)?void 0:e.showInfoPanel},set:function(e){this._logger.i(zt,"call set showInfoPanel",e),this._data&&(this._data.showInfoPanel=e,this.emit(He.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL))}},{key:"showNext",get:function(){var e;return null==(e=this._data)?void 0:e.showNext},set:function(e){this._logger.i(zt,"call set showNext",e),this._data&&(this._data.showNext=e,this.emit(He.ATTRIBUTE_CHANGE_SHOW_NEXT))}},{key:"showPrev",get:function(){var e;return null==(e=this._data)?void 0:e.showPrev},set:function(e){this._logger.i(zt,"call set showPrev",e),this._data&&(this._data.showPrev=e,this.emit(He.ATTRIBUTE_CHANGE_SHOW_PREV))}},{key:"bizData",get:function(){var e;return null==(e=this._data)?void 0:e.bizData},set:function(e){this._logger.i(zt,"set biz data",e),this._data&&(this._data.bizData=e),this._yoda&&this._yoda.updateUserConfig({biz:JSON.parse(JSON.stringify(e))}),this.emit(He.ATTRIBUTE_CHANGE_BIZ_DATA)}},{key:"liveTime",get:function(){var e;return null!=(e=this._data)&&e.liveTime?{start:this._data.liveTime.start,end:this._data.liveTime.end}:void 0},set:function(e){this._logger.i(zt,"set live time",e),this._data&&(this._data.liveTime=a()({},e)),this.emit(He.ATTRIBUTE_CHANGE_LIVE_TIME)}},{key:"objectFit",get:function(){return this._objectFit}},{key:"kernel",get:function(){return this._kernel}},{key:"mainContainer",get:function(){return this._mainDom}},{key:"videoLayer",get:function(){return this._videoLayer}},{key:"videoInteractiveLayer",get:function(){return this._videoInteractiveLayer}},{key:"audienceStat",get:function(){var e;return null==(e=this._kernel)?void 0:e.getAudienceStat()}}],[{key:"version",get:function(){return"1.1.0"}}])}();Pe(Jt,"packVersion","1.1.0"),Pe(Jt,"_yodaClass");var qt=Jt,Yt="vue2",Qt=[He.LOADSTART,He.PROGRESS,He.SUSPEND,He.ABORT,He.ERROR,He.EMPTIED,He.STALLED,He.LOADEDMETADATA,He.LOADEDDATA,He.CANPLAY,He.CANPLAYTHROUGH,He.PLAYING,He.WAITING,He.SEEKING,He.SEEKED,He.ENDED,He.DURATIONCHANGE,He.TIMEUPDATE,He.PLAY,He.PAUSE,He.RATECHANGE,He.RESIZE,He.VOLUMECHANGE,He.MANIFEST_PARSED,He.LEVEL_SWITCHING,He.LEVEL_SWITCHED,He.LEVEL_SWITCH_PLAYING,He.LEVEL_SWITCH_FAILED,He.AUDIO_TRACKS_SWITCHING,He.AUDIO_TRACKS_SWITCHED,He.FULLSCREEN_CHANGE,He.LEVEL_UPDATED,He.CLICK_NEXT,He.CLICK_REGISTER,He.CLICK_LOGIN,He.CLICK_VIP,He.INTERACTION,He.ATTRIBUTE_CHANGE,He.REPORT],Zt={name:"KwaiPlayerVue2",props:{id:{type:String,default:""},config:{type:Object,default:function(){return{}}},plugins:{type:Object,default:function(){return{}}},src:{type:[Object,String],default:""},controls:{type:[Boolean,String],default:!0},videoId:{type:[String],default:""},autoplay:{type:[Boolean],default:!1},crossOrigin:{type:[String,null],default:null},defaultMuted:{type:[Boolean],default:!1},defaultPlaybackRate:{type:[Number],default:1},loop:{type:[Boolean],default:!1},muted:{type:[Boolean],default:!1},preload:{type:[String,void 0],default:void 0},poster:{type:[String],default:""},currentTime:{type:[Number]},playbackRate:{type:[Number],default:1},volume:{type:[Number],default:1},disablePictureInPicture:{type:[Boolean],default:!1},playsinline:{type:[Boolean],default:!1},disableDownload:{type:[Boolean],default:!0},disableAdaptive:{type:[Boolean],default:!0},disableHotkey:{type:[Boolean],default:!1},disableMask:{type:[Boolean],default:!1},currentLevel:{type:[Number],default:0},nextLevel:{type:[Number],default:0},audioTrack:{type:[Number],default:0},currentVideoFrame:{type:[Number],default:0},showProgress:{type:[Boolean],default:void 0},showTime:{type:[Boolean],default:void 0},prefetch:{type:[Boolean],default:!0},showInfoPanel:{type:[Boolean],default:!1},productName:{type:[String],default:""},previewUrl:{type:[String],default:""},maskUrl:{type:[String],default:""},disableDanmaku:{type:[Boolean]},danmakuRendering:{type:[Boolean],default:!0},bizData:{type:[Object]},liveShiftType:{type:[String]}},data:function(){return{player:void 0,cid:0}},watch:{config:function(e){this.player&&(this.player.logger.i(Yt,"call set config",e),this.player.config=e)},controls:function(e){this.player&&(this.player.logger.i(Yt,"call set controls",e),this.player.controls=e)},videoId:function(e){this.player&&(this.player.logger.i(Yt,"call set videoId",e),this.player.videoId=e)},src:function(e){this.player&&(this.player.logger.i(Yt,"call set src",e),this.player.src=e)},autoplay:function(e){this.player&&(this.player.logger.i(Yt,"call set autoplay",e),this.player.autoplay=e)},crossOrigin:function(e){this.player&&(this.player.logger.i(Yt,"call set crossOrigin",e),this.player.crossOrigin=e)},defaultMuted:function(e){this.player&&(this.player.logger.i(Yt,"call set defaultMuted",e),this.player.defaultMuted=e)},defaultPlaybackRate:function(e){this.player&&(this.player.logger.i(Yt,"call set defaultPlaybackRate",e),this.player.defaultPlaybackRate=e)},loop:function(e){this.player&&(this.player.logger.i(Yt,"call set loop",e),this.player.loop=e)},muted:function(e){this.player&&(this.player.logger.i(Yt,"call set muted",e),this.player.muted=e)},preload:function(e){this.player&&(this.player.logger.i(Yt,"call set preload",e),this.player.preload=e||"none")},poster:function(e){this.player&&(this.player.logger.i(Yt,"call set poster",e),this.player.poster=e||"")},currentTime:function(e){this.player&&(this.player.logger.i(Yt,"call set currentTime",e),this.player.currentTime=e)},playbackRate:function(e){this.player&&(this.player.logger.i(Yt,"call set playbackRate",e),this.player.playbackRate=e)},volume:function(e){this.player&&(this.player.logger.i(Yt,"call set volume",e),this.player.volume=e)},disablePictureInPicture:function(e){this.player&&(this.player.logger.i(Yt,"call set disablePictureInPicture",e),this.player.disablePictureInPicture=e)},playsinline:function(e){this.player&&(this.player.logger.i(Yt,"call set playsinline",e),this.player.playsinline=e)},disableDownload:function(e){this.player&&(this.player.logger.i(Yt,"call set disableDownload",e),this.player.disableDownload=e)},disableAdaptive:function(e){this.player&&(this.player.logger.i(Yt,"call set disableAdaptive",e),this.player.disableAdaptive=e)},disableHotkey:function(e){this.player&&(this.player.logger.i(Yt,"call set disableHotkey",e),this.player.disableHotkey=e)},disableMask:function(e){this.player&&(this.player.logger.i(Yt,"call set disableMask",e),this.player.disableMask=e)},currentLevel:function(e){this.player&&(this.player.logger.i(Yt,"call set currentLevel",e),this.player.currentLevel=e)},nextLevel:function(e){this.player&&(this.player.logger.i(Yt,"call set nextLevel",e),this.player.nextLevel=e)},audioTrack:function(e){this.player&&(this.player.logger.i(Yt,"call set audioTrack",e),this.player.audioTrack=e)},currentVideoFrame:function(e){this.player&&(this.player.logger.i(Yt,"call set currentVideoFrame",e),this.player.currentVideoFrame=e)},showProgress:function(e){this.player&&(this.player.logger.i(Yt,"call set showProgress",e),this.player.showProgress=e)},showTime:function(e){this.player&&(this.player.logger.i(Yt,"call set showTime",e),this.player.showTime=e)},prefetch:function(e){this.player&&(this.player.logger.i(Yt,"call set prefetch",e),this.player.prefetch=e)},showInfoPanel:function(e){this.player&&(this.player.logger.i(Yt,"call set showInfoPanel",e),this.player.showInfoPanel=e)},previewUrl:function(e){this.player&&(this.player.logger.i(Yt,"call set previewUrl",e),this.player.previewUrl=e)},maskUrl:function(e){this.player&&(this.player.logger.i(Yt,"call set maskUrl",e),this.player.maskUrl=e)},disableDanmaku:function(e){this.player&&(this.player.logger.i(Yt,"call set disableDanmaku",e),this.player.disableDanmaku=e)},danmakuRendering:function(e){this.player&&(this.player.logger.i(Yt,"call set danmakuRendering",e),this.player.danmakuRendering=e)},bizData:function(e){this.player&&(this.player.bizData=e)},liveShiftType:function(e){this.player&&(this.player.liveShiftType=e)}},methods:{load:function(){var e;null==(e=this.player)||e.load()},play:function(){var e;return null==(e=this.player)?void 0:e.play()},pause:function(){var e;null==(e=this.player)||e.pause()},destroy:function(){var e;null==(e=this.player)||e.destroy()},requestPictureInPicture:function(){var e;return null==(e=this.player)?void 0:e.requestPictureInPicture()},isFullscreen:function(e){var t;return null==(t=this.player)?void 0:t.isFullscreen(e)},requestFullscreen:function(e){var t;null==(t=this.player)||t.requestFullscreen(e)},exitFullscreen:function(e){var t;null==(t=this.player)||t.exitFullscreen(e)},isFullscreenAvailable:function(e){var t;return null==(t=this.player)?void 0:t.isFullscreenAvailable(e)},screenshot:function(){var e;return null==(e=this.player)?void 0:e.screenshot()},getError:function(){var e;return null==(e=this.player)?void 0:e.error},getNetworkState:function(){var e;return(null==(e=this.player)?void 0:e.networkState)||0},getBuffered:function(){var e;return null==(e=this.player)?void 0:e.buffered},getReadyState:function(){var e;return(null==(e=this.player)?void 0:e.readyState)||0},getSeeking:function(){var e;return(null==(e=this.player)?void 0:e.seeking)||!1},getDuration:function(){var e;return(null==(e=this.player)?void 0:e.duration)||0},getPaused:function(){var e;return(null==(e=this.player)?void 0:e.paused)||!1},getSeekable:function(){var e;return null==(e=this.player)?void 0:e.seekable},getEnded:function(){var e;return(null==(e=this.player)?void 0:e.ended)||!1},getVideoWidth:function(){var e;return null==(e=this.player)?void 0:e.videoWidth},getVideoHeight:function(){var e;return null==(e=this.player)?void 0:e.videoHeight},getTotalVideoFrames:function(){var e;return(null==(e=this.player)?void 0:e.totalVideoFrames)||0},setSrc:function(e){this.player&&(this.player.src=e)},getSrc:function(){var e;return null==(e=this.player)?void 0:e.src},setConfig:function(e){this.player&&(this.player.config=e)},getConfig:function(){var e;return null==(e=this.player)?void 0:e.config},setCrossOrigin:function(e){this.player&&(this.player.crossOrigin=e)},getCrossOrigin:function(){var e;return(null==(e=this.player)?void 0:e.crossOrigin)||null},setPreload:function(e){this.player&&(this.preload=e)},getPreload:function(){var e;return(null==(e=this.player)?void 0:e.preload)||""},setCurrentTime:function(e){this.player&&(this.player.currentTime=e)},getCurrentTime:function(){var e;return(null==(e=this.player)?void 0:e.currentTime)||0},setDefaultPlaybackRate:function(e){this.player&&(this.player.defaultPlaybackRate=e)},getDefaultPlaybackRate:function(){var e;return null==(e=this.player)?void 0:e.defaultPlaybackRate},setPlaybackRate:function(e){this.player&&(this.player.playbackRate=e)},getPlaybackRate:function(){var e;return(null==(e=this.player)?void 0:e.playbackRate)||1},setAutoplay:function(e){this.player&&(this.player.autoplay=e)},getAutoplay:function(){var e;return(null==(e=this.player)?void 0:e.autoplay)||!1},setLoop:function(e){this.player&&(this.player.loop=e)},getLoop:function(){var e;return(null==(e=this.player)?void 0:e.loop)||!1},setControls:function(e){this.player&&(this.player.controls=e)},getControls:function(){var e;return(null==(e=this.player)?void 0:e.controls)||!1},setVideoId:function(e){this.player&&(this.player.videoId=e)},getVideoId:function(){var e;return(null==(e=this.player)?void 0:e.videoId)||!1},setVolume:function(e){this.player&&(this.player.volume=e)},getVolume:function(){var e;return(null==(e=this.player)?void 0:e.volume)||0},setMuted:function(e){this.player&&(this.player.muted=e)},getMuted:function(){var e;return(null==(e=this.player)?void 0:e.muted)||!1},setDefaultMuted:function(e){player&&(this.player.defaultMuted=e)},getDefaultMuted:function(){var e;return(null==(e=this.player)?void 0:e.defaultMuted)||!1},setPoster:function(e){this.player&&(this.player.poster=e)},getPoster:function(){var e;return(null==(e=this.player)?void 0:e.poster)||""},setDisablePictureInPicture:function(e){player&&(this.player.disablePictureInPicture=e)},getDisablePictureInPicture:function(){var e;return(null==(e=this.player)?void 0:e.disablePictureInPicture)||!1},setPlaysinline:function(e){this.player&&(this.player.playsinline=e)},getPlaysinline:function(){var e;return(null==(e=this.player)?void 0:e.playsinline)||!1},setDisableDownload:function(e){this.player&&(this.player.disableDownload=e)},getDisableDownload:function(){var e;return null==(e=this.player)?void 0:e.disableDownload},setDisableAdaptive:function(e){this.player&&(this.player.disableAdaptive=e)},getDisableAdaptive:function(){var e;return null==(e=this.player)?void 0:e.disableAdaptive},setDisableHotkey:function(e){this.player&&(this.player.disableHotkey=e)},getDisableHotkey:function(){var e;return null==(e=this.player)?void 0:e.disableHotkey},setDisableMask:function(e){this.player&&(this.player.disableMask=e)},getDisableMask:function(){var e;return null==(e=this.player)?void 0:e.disableMask},setCurrentLevel:function(e){this.player&&(this.player.currentLevel=e)},getCurrentLevel:function(){var e;return(null==(e=this.player)?void 0:e.currentLevel)||0},setNextLevel:function(e){this.player&&(this.player.nextLevel=e)},getNextLevel:function(){var e;return(null==(e=this.player)?void 0:e.nextLevel)||0},setAudioTrack:function(e){this.player&&(this.player.audioTrack=e)},getAudioTrack:function(){var e;return(null==(e=this.player)?void 0:e.audioTrack)||0},setCurrentVideoFrame:function(e){this.player&&(this.player.currentVideoFrame=e)},getCurrentVideoFrame:function(){var e;return(null==(e=this.player)?void 0:e.currentVideoFrame)||0},setShowProgress:function(e){this.player&&(this.player.showProgress=e)},getShowProgress:function(){var e;return null==(e=this.player)?void 0:e.showProgress},setShowTime:function(e){this.player&&(this.player.showTime=e)},getShowTime:function(){var e;return null==(e=this.player)?void 0:e.showTime},setPrefetch:function(e){this.player&&(this.player.prefetch=e)},getPrefetch:function(){var e;return null==(e=this.player)?void 0:e.prefetch},setShowInfoPanel:function(e){this.player&&(this.player.showInfoPanel=e)},getShowInfoPanel:function(){var e;return null==(e=this.player)?void 0:e.showInfoPanel},setProductName:function(e){this.player&&(this.player.productName=e)},getProductName:function(){var e;return null==(e=this.player)?void 0:e.productName},setPreviewUrl:function(e){this.player&&(this.player.previewUrl=e)},getPreviewUrl:function(){var e;return null==(e=this.player)?void 0:e.previewUrl},setMaskUrl:function(e){this.player&&(this.player.maskUrl=e)},getMaskUrl:function(){var e;return null==(e=this.player)?void 0:e.maskUrl},setDisableDanmaku:function(e){this.player&&(this.player.disableDanmaku=e)},getDisableDanmaku:function(){var e;return null==(e=this.player)?void 0:e.disableDanmaku},setDanmakuRendering:function(e){this.player&&(this.player.danmakuRendering=e)},getDanmakuRendering:function(){var e;return null==(e=this.player)?void 0:e.danmakuRendering},getAudienceStat:function(){var e;return null==(e=this.player)?void 0:e.audienceStat},getStreamTime:function(e){var t;return(null==(t=this.player)?void 0:t.getStreamTime(e))||0},getIsLiveShift:function(){var e;return(null==(e=this.player)?void 0:e.isLiveShift)||!1},getLiveShiftType:function(){var e;return(null==(e=this.player)?void 0:e.liveShiftType)||Ue.NONE},setLiveShiftType:function(e){this.player&&(this.player.liveShiftType=e)},getVersion:function(){return qt.version},getPluginInstance:function(e){var t;return null==(t=this.player)?void 0:t.getPluginInstance(e)},getAllPlugins:function(){var e;return null==(e=this.player)?void 0:e.getAllPlugins()}},created:function(){this.cid=this.id||"c-"+(Le=Le?Le+1:Date.now())},mounted:function(){var e=this,t=this.player=new qt("#"+this.cid,{config:this.config,src:this.src,crossOrigin:this.crossOrigin,preload:this.preload,defaultPlaybackRate:this.defaultPlaybackRate,playbackRate:this.playbackRate,autoplay:this.autoplay,loop:this.loop,controls:this.controls,videoId:this.videoId,volume:this.volume,muted:this.muted,defaultMuted:this.defaultMuted,poster:this.poster,disablePictureInPicture:this.disablePictureInPicture,disableDownload:this.disableDownload,disableAdaptive:this.disableAdaptive,disableHotkey:this.disableHotkey,disableMask:this.disableMask,playsinline:this.playsinline,showProgress:this.showProgress,showTime:this.showTime,prefetch:this.prefetch,showInfoPanel:this.showInfoPanel,productName:this.productName,previewUrl:this.previewUrl,maskUrl:this.maskUrl,disableDanmaku:this.disableDanmaku,danmakuRendering:this.danmakuRendering,plugins:this.plugins,bizData:this.bizData,liveShiftType:this.liveShiftType});t.logger.i(Yt,"mounted"),Qt.forEach((function(i){t.on(i,(function(t){e.$emit(i,t)}))}))},beforeUnmount:function(){this.player.destroy()}};function Xt(e,t,i,n,r,o,a,s){var u,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),a?(u=function(e){!(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)&&typeof __VUE_SSR_CONTEXT__<"u"&&(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=u):r&&(u=s?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(e,t){return u.call(t),c(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:l}}var $t={},ei=Xt(Zt,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{attrs:{id:e.cid}},[e._t("watermark")],2)}),[],!1,ti,null,null,null);function ti(e){for(var t in $t)this[t]=$t[t]}var ii=function(){return ei.exports}(),ni=Object.defineProperty,ri=function(e,t,i){return function(e,t,i){t in e?ni(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i}(e,"symbol"!=typeof t?t+"":t,i),i},oi=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=8)}([function(e,t,i){var n=i(5);function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(t){return e.exports=i="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.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(7)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t){function i(){return e.exports=i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(e,t,i,n,r,o,a){try{var s=e[o](a),u=s.value}catch(e){return void i(e)}s.done?t(u):Promise.resolve(u).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(1).default,r=i(6);e.exports=function(e){var t=r(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(1).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(1).default;function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=r=function(){return i},e.exports.__esModule=!0,e.exports.default=e.exports;var t,i={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(e,t,i){e[t]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,i){return e[t]=i}}function f(e,t,i,n){var r=t&&t.prototype instanceof g?t:g,o=Object.create(r.prototype),a=new C(n||[]);return s(o,"_invoke",{value:k(e,i,a)}),o}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}i.wrap=f;var A="suspendedStart",v="executing",_="completed",m={};function g(){}function y(){}function b(){}var E={};h(E,l,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(D([])));T&&T!==o&&a.call(T,l)&&(E=T);var R=b.prototype=g.prototype=Object.create(E);function S(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){var i;s(this,"_invoke",{value:function(r,o){function s(){return new t((function(i,s){!function i(r,o,s,u){var l=p(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,s,u)}),(function(e){i("throw",e,s,u)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return i("throw",e,s,u)}))}u(l.arg)}(r,o,i,s)}))}return i=i?i.then(s,s):s()}})}function k(e,i,n){var r=A;return function(o,a){if(r===v)throw Error("Generator is already running");if(r===_){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=I(s,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===A)throw r=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=v;var l=p(e,i,n);if("normal"===l.type){if(r=n.done?_:"suspendedYield",l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=_,n.method="throw",n.arg=l.arg)}}}function I(e,i){var n=i.method,r=e.iterator[n];if(r===t)return i.delegate=null,"throw"===n&&e.iterator.return&&(i.method="return",i.arg=t,I(e,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=p(r,e.iterator,i.arg);if("throw"===o.type)return i.method="throw",i.arg=o.arg,i.delegate=null,m;var a=o.arg;return a?a.done?(i[e.resultName]=a.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,m):a:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,m)}function x(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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function D(e){if(e||""===e){var i=e[l];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function i(){for(;++r<e.length;)if(a.call(e,r))return i.value=e[r],i.done=!1,i;return i.value=t,i.done=!0,i};return o.next=o}}throw new TypeError(n(e)+" is not iterable")}return y.prototype=b,s(R,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:y,configurable:!0}),y.displayName=h(b,d,"GeneratorFunction"),i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,h(e,d,"GeneratorFunction")),e.prototype=Object.create(R),e},i.awrap=function(e){return{__await:e}},S(L.prototype),h(L.prototype,c,(function(){return this})),i.AsyncIterator=L,i.async=function(e,t,n,r,o){void 0===o&&(o=Promise);var a=new L(f(e,t,n,r),o);return i.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(R),h(R,d,"Generator"),h(R,l,(function(){return this})),h(R,"toString",(function(){return"[object Generator]"})),i.keys=function(e){var t=Object(e),i=[];for(var n in t)i.push(n);return i.reverse(),function e(){for(;i.length;){var n=i.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},i.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var i in this)"t"===i.charAt(0)&&a.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},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 i=this;function n(n,r){return s.type="throw",s.arg=e,i.next=n,r&&(i.method="next",i.arg=t),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,m):this.complete(o)},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),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),O(i),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;O(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:D(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),m}},i}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){i.r(t),i.d(t,"KwaiVideoLocalLog",(function(){return k})),i.d(t,"LogLevel",(function(){return f})),i.d(t,"DefaultLogger",(function(){return _})),i.d(t,"Logger",(function(){return v})),i.d(t,"printVersion",(function(){return u})),i.d(t,"DEFAULT_LOG_LEVEL",(function(){return p}));var n=i(0),r=i.n(n),o=i(3),a=i.n(o),s={idbName:"kwai-video-local-log",idbMaxDataCount:25e3,idbMaxFoldLog:20,maxLogLen:4096};function u(e,t){console.log("%c "+e+" %c "+t+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px; color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0; color: #fff","background:transparent")}var l=function(){function e(){this.timeout=6048e5}var t=e.prototype;return t.write=function(t,i){if(e.available)try{localStorage.setItem(t,JSON.stringify({value:i,time:Date.now()}))}catch(e){}},t.read=function(t,i){if(void 0===i&&(i=!0),e.available)try{var n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=r.value,a=r.time,s=void 0===a?0:a;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return o}}catch(e){}},r()(e,null,[{key:"available",get:function(){if(void 0===e._available)try{localStorage.setItem("alg","test"),e._available=!0}catch(t){e._available=!1}return e._available}}])}();l._available=void 0;var c,d,h=l,f=((d={}).NONE="none",d.ERROR="e",d.WARN="w",d.INFO="i",d.DEBUG="d",d.VERBOSE="v",d),p=f.ERROR,A=((c={})[f.NONE]={value:1,str:"N"},c[f.ERROR]={value:100,str:"E"},c[f.WARN]={value:200,str:"W"},c[f.INFO]={value:300,str:"I"},c[f.DEBUG]={value:400,str:"D"},c[f.VERBOSE]={value:500,str:"V"},c),v=function(){function e(e){if(this._name="kwai-v",this._level=p,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&"blob:"===location.protocol){var t,i=location.href.split("/"),n=null==(t=i[i.length-1])?void 0:t.match(/(\w+)-/);n&&(this._workerTag=e?e+"-"+n[1]:n[1])}else e&&(this._workerTag=e)}e.loadLogLevel=function(e,t){if(void 0===t&&(t=!0),location.href){var i=new RegExp(e+"=([a-z]{1})"),n=location.href.match(i);if(n&&n.length>1){var r=n[1];if(this._isValueInLevel(r))return r}}var o=(new h).read(e,t);if(this._isValueInLevel(o))return o},e.saveLogLevel=function(e,t){this._isValueInLevel(t)&&(new h).write(e,t)},e._isValueInLevel=function(e){return-1!==Object.values(f).indexOf(e)};var t=e.prototype;return t.setOutput=function(e){return this._output=e,this},t.setLevel=function(e){return this._level=e,this},t.setId=function(e){return this._id=e,this},t.setName=function(e){return this._name=e,this},t.getLevel=function(){return this._level},t.getOutput=function(){return this._output},t.hasOutput=function(){return!!this._output},t.e=function(e){if(this._isLevelEnabled(this._level,f.ERROR)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.ERROR,e,i);try{var o;null==(o=this._output)||o.e.apply(o,[r].concat(i))}catch(e){}}},t.w=function(e){if(this._isLevelEnabled(this._level,f.WARN)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.WARN,e,i);try{var o;null==(o=this._output)||o.w.apply(o,[r].concat(i))}catch(e){}}},t.i=function(e){if(this._isLevelEnabled(this._level,f.INFO)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.INFO,e,i);try{var o;null==(o=this._output)||o.i.apply(o,[r].concat(i))}catch(e){}}},t.d=function(e){if(this._isLevelEnabled(this._level,f.DEBUG)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.DEBUG,e,i);try{var o;null==(o=this._output)||o.d.apply(o,[r].concat(i))}catch(e){}}},t.v=function(e){if(this._isLevelEnabled(this._level,f.VERBOSE)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(f.VERBOSE,e,i);try{var o;null==(o=this._output)||o.v.apply(o,[r].concat(i))}catch(e){}}},t._isLevelEnabled=function(e,t){return A[e].value>=A[t].value},t._printLog=function(e,t,i){var n,r,o=typeof t;if("object"===o)t=(null==(r=t)?void 0:r.constructor.name)||"unknown";else if("function"===o){var a;t=(null==(a=Object.getOwnPropertyDescriptor(t,"name"))?void 0:a.value)||"unknown"}var s,u,l=((null==(n=A[e])?void 0:n.str)||"")+"|"+this._name+"["+("function"==typeof this._id?this._id():this._id)+"]["+this._workerTag+"]::"+t;return e===f.ERROR?(s=console).error.apply(s,[l].concat(i.slice(0))):(u=console).log.apply(u,[l].concat(i.slice(0))),l},e}(),_=new v,m=r()((function e(t){this._logger=void 0,this._id=0,this._config=s,this._id=e._id,e._id++,this._logger=(new v).setId(this._id).setLevel(f.INFO),this._config=a()({},s,t)}),[{key:"config",get:function(){return this._config}},{key:"logger",get:function(){return this._logger}},{key:"id",get:function(){return this._id}}],[{key:"packName",get:function(){return"ll_es"}},{key:"version",get:function(){return"1.0.13"}},{key:"buildTime",get:function(){return"Tue Oct 08 2024 17:18:49 GMT+0800 (中国标准时间)"}}]);m._id=0;var g=i(4),y=i.n(g),b=i(2),E=i.n(b),w=function(){function e(e,t,i,n,r){var o=this;void 0===r&&(r=1),this._logger=void 0,this._name=void 0,this._storeName=void 0,this._dbIndex=void 0,this._version=void 0,this._taskQueue=[],this._openReq=void 0,this._isTransactionActive=!1,this._runTaskQueue=function(){for(;o._taskQueue.length;){var e=o._taskQueue.shift();e&&o.run(e.task,e.mode)}},this._logger=e,this._name=t,this._storeName=i,this._dbIndex=n,this._version=r}var t=e.prototype;return t.init=function(){var e=this;if(!this._openReq&&indexedDB){var t=this._openReq=indexedDB.open(this._name,this._version);this._logger.i("idb-wrapper","open",t),t.onerror=function(){e._logger.i("idb-wrapper","open error.")},t.onsuccess=function(){e._logger.i("idb-wrapper","open success."),e._runTaskQueue()},t.onupgradeneeded=function(){e._logger.i("idb-wrapper","open upgradeneeded."),t.result.objectStoreNames.contains(e._storeName)&&t.result.deleteObjectStore(e._storeName);var i=t.result.createObjectStore(e._storeName,{keyPath:"id",autoIncrement:!0});e._dbIndex&&e._dbIndex.forEach((function(e){i.createIndex(e.name,e.keyPath,e.option)}))}}},t.run=function(e,t){if(void 0===t&&(t="readwrite"),this.init(),this._openReq&&"done"===this._openReq.readyState&&!this._openReq.error)return this._doTask(e,t);"error"!==this.state&&(this._taskQueue.push({task:e,mode:t}),this._taskQueue.length>1e3&&this._taskQueue.shift())},t.close=function(){var e=this;this._logger.i("idb-wrapper","close"),this._openReq&&("done"===this._openReq.readyState?(this._openReq.result.close(),this._openReq=void 0):this._openReq.onsuccess=function(){e.close()})},t.destroy=function(){this._logger.i("idb-wrapper","destroy"),this.close(),this._taskQueue=[]},t._doTask=function(e,t){var i=this;if(void 0===t&&(t="readwrite"),this._openReq&&!this._openReq.error)try{this._isTransactionActive=!0;var n=this._openReq.result.transaction(this._storeName,t),r=void 0;n.oncomplete=function(){i._isTransactionActive=!1,e.callback&&e.callback(r),i._runTaskQueue()},n.onabort=n.onerror=function(){i._isTransactionActive=!1,e.callback&&e.callback(r),i._runTaskQueue()},r=e.exec(n.objectStore(this._storeName))}catch(e){}else e.callback&&e.callback()},r()(e,[{key:"isTransactionActive",get:function(){return this._isTransactionActive}},{key:"state",get:function(){return this._openReq&&"done"===this._openReq.readyState?this._openReq.error?"error":"ready":"idle"}}])}(),T=[{name:"id",keyPath:"id",option:{unique:!0}}],R=[function(){function e(e){this._ctx=void 0,this._idb=void 0,this._logCount=0,this._saveCount=0,this._reCountOnSaveCount=100,this._reduceData=!1,this._ctx=e,this._idb=new w(e.logger,e.config.idbName,e.config.idbName,T),this._reCountOnSaveCount=Math.min(200,Math.max(50,Math.round(this._ctx.config.idbMaxDataCount/10))),this._count()}e.isSupported=function(){return typeof indexedDB<"u"};var t,i=e.prototype;return i.saveLog=function(e){var t=this,i={exec:function(t){return t.add({value:e})},callback:function(e){t._saveCount++,t._saveCount%t._reCountOnSaveCount==0&&t._count(),null!=e&&e.error&&t._ctx.logger.i("idb-backend","save log err",e.error)}};this._idb.run(i)},i.exportLog=(t=y()(E.a.mark((function e(){var t=this;return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){t._ctx.logger.i("idb-backend","export start");var n={exec:function(e){return e.getAll()},callback:function(i){e(void 0===i?"":t._mergeGetAll(i.result))}};t._idb.run(n,"readonly")})));case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)}),i.destroy=function(){this._idb.destroy()},i.clean=function(){this._idb.run({exec:function(e){return e.clear()}})},i._count=function(){var e=this,t={exec:function(e){return e.count()},callback:function(t){null!=t&&t.error||null==t||!t.result||(e._ctx.logger.i("idb-backend","count: "+t.result+" max: "+e._ctx.config.idbMaxDataCount),e._logCount=t.result,e._logCount>=e._ctx.config.idbMaxDataCount&&!e._reduceData&&e._deleteFromHead(e._logCount-Math.round(e._ctx.config.idbMaxDataCount/2)))}};this._idb.run(t)},i._deleteFromHead=function(e){var t=this;this._ctx.logger.i("idb-backend","delete from head"),this._reduceData=!0;var i={exec:function(e){return e.openCursor()},callback:function(i){if(t._reduceData=!1,null!=i&&i.result){var n=IDBKeyRange.bound(i.result.key,i.result.key+e,!1,!1),r={exec:function(e){return t._ctx.logger.i("idb-backend","del: "+n.lower+"~"+n.upper),e.delete(n)},callback:function(e){t._ctx.logger.i("idb-backend","del result: "+!(null==e||!e.error))}};t._idb.run(r)}}};this._idb.run(i)},i._mergeGetAll=function(e){return e.length?e.reduce((function(e,t){return""+e+t.value+"\n"}),""):""},r()(e,[{key:"isActive",get:function(){return"error"!==this._idb.state}}])}()];function S(e,t,i){var n=new Date;"string"!=typeof e&&(e=e.toString());var r=n.toLocaleString()+"."+n.getMilliseconds().toString().padStart(3,"0")+"|"+e+"|";return t.forEach((function(e){r+="object"==typeof e?JSON.stringify(e)+" ":e+" "})),r.length>i?r.substring(0,i):r}function L(e){return e.join("\n")}var k=function(){function e(e){var t=this;this._ctx=void 0,this._backend=void 0,this._delayTimer=void 0,this._logCache=[],this._loggerForAdd=void 0,this._downloadHref=void 0,this._startDelay=function(){t._delayTimer=setInterval((function(){t._saveLog(!0)}),1e3)},this._stopDelay=function(){t._delayTimer&&(clearTimeout(t._delayTimer),t._delayTimer=void 0)},u("kwai-video-local-log","1.0.13"),this._ctx=new m(e);var i=function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];t.addLog.apply(t,[e].concat(n))};this._loggerForAdd={e:i,w:i,i:i,d:i,v:i},this._ctx.logger.setOutput(this._loggerForAdd),this._ctx.logger.i("kwai-video-local-log","constructor",e,this._ctx.config),this._backend=function(e){for(var t=0;t<R.length;t++){var i=R[t];if(null!=i&&i.isSupported())return new i(e)}}(this._ctx),this._backend&&this._startDelay()}e.isSupported=function(){return function(){for(var e=0;e<R.length;e++){var t=R[e];if(null!=t&&t.isSupported())return!0}return!1}()};var t=e.prototype;return t.addLog=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this._logCache.push(S(e,i,this._ctx.config.maxLogLen)),this._saveLog()},t.cleanLog=function(){var e;this._ctx.logger.i("kwai-video-local-log","clean"),null==(e=this._backend)||e.clean()},t.exportLog=function(){var e=this;return this._ctx.logger.i("kwai-video-local-log","export log"),new Promise((function(t,i){e._backend?e._backend.exportLog().then((function(i){t(L([i].concat(e._logCache)))})):t("")}))},t.downloadLog=function(e){var t=this;this._ctx.logger.i("kwai-video-local-log","download log: "+e),this._destroyDownloadHref(),this.exportLog().then((function(i){var n=new Blob([i],{type:"text/plain"});if(document){var r=document.createElement("a");t._downloadHref=r.href=URL.createObjectURL(n),r.download=e||"Log_web_"+(new Date).toLocaleString()+".log",document.body.appendChild(r),r.click(),r.remove()}else console.log("无document,当前是否在worker中")}))},t.destroy=function(){var e;this._destroyDownloadHref(),null==(e=this._backend)||e.destroy(),this._stopDelay()},t.getLoggerForAdd=function(){return this._loggerForAdd},t._destroyDownloadHref=function(){try{this._downloadHref&&(URL.revokeObjectURL(this._downloadHref),this._downloadHref=void 0)}catch(e){}},t._saveLog=function(e){if(void 0===e&&(e=!1),this._backend&&this._backend.isActive&&(this._logCache.length>=this._ctx.config.idbMaxFoldLog||this._logCache.length>0&&e)){var t=L(this._logCache);this._logCache.splice(0,this._logCache.length),t&&this._backend.saveLog(t)}},r()(e,null,[{key:"version",get:function(){return"1.0.13"}}])}();t.default=k}]);void 0===oi&&console.error("esm-webpack-plugin: nothing exported!");var ai=oi.KwaiVideoLocalLog,si=oi.LogLevel,ui=oi.DefaultLogger,li=oi.Logger;oi.printVersion,oi.DEFAULT_LOG_LEVEL,oi.default;var ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hi,fi={exports:{}},pi="object"==typeof Reflect?Reflect:null,Ai=pi&&"function"==typeof pi.apply?pi.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};hi=pi&&"function"==typeof pi.ownKeys?pi.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var vi=Number.isNaN||function(e){return e!=e};function _i(){_i.init.call(this)}fi.exports=_i,fi.exports.once=function(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,o),n(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}Li(e,t,o,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&Li(e,"error",t,i)}(e,r,{once:!0})}))},_i.EventEmitter=_i,_i.prototype._events=void 0,_i.prototype._eventsCount=0,_i.prototype._maxListeners=void 0;var mi=10;function gi(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function yi(e){return void 0===e._maxListeners?_i.defaultMaxListeners:e._maxListeners}function bi(e,t,i,n){var r,o,a;if(gi(i),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),a=o[t]),void 0===a)a=o[t]=i,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),(r=yi(e))>0&&a.length>r&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){console&&console.warn&&console.warn(e)}(s)}return e}function Ei(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function wi(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=Ei.bind(n);return r.listener=i,n.wrapFn=r,r}function Ti(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):Si(r,r.length)}function Ri(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function Si(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function Li(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){n.once&&e.removeEventListener(t,r),i(o)}))}}Object.defineProperty(_i,"defaultMaxListeners",{enumerable:!0,get:function(){return mi},set:function(e){if("number"!=typeof e||e<0||vi(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");mi=e}}),_i.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||vi(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},_i.prototype.getMaxListeners=function(){return yi(this)},_i.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=r[e];if(void 0===s)return!1;if("function"==typeof s)Ai(s,this,t);else{var u=s.length,l=Si(s,u);for(i=0;i<u;++i)Ai(l[i],this,t)}return!0},_i.prototype.addListener=function(e,t){return bi(this,e,t,!1)},_i.prototype.on=_i.prototype.addListener,_i.prototype.prependListener=function(e,t){return bi(this,e,t,!0)},_i.prototype.once=function(e,t){return gi(t),this.on(e,wi(this,e,t)),this},_i.prototype.prependOnceListener=function(e,t){return gi(t),this.prependListener(e,wi(this,e,t)),this},_i.prototype.removeListener=function(e,t){var i,n,r,o,a;if(gi(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){a=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},_i.prototype.off=_i.prototype.removeListener,_i.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,o=Object.keys(i);for(n=0;n<o.length;++n)"removeListener"!==(r=o[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},_i.prototype.listeners=function(e){return Ti(this,e,!0)},_i.prototype.rawListeners=function(e){return Ti(this,e,!1)},_i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Ri.call(e,t)},_i.prototype.listenerCount=Ri,_i.prototype.eventNames=function(){return this._eventsCount>0?hi(this._events):[]};var ki=fi.exports,Ii=function(){if(typeof Map<"u")return Map;function e(e,t){var i=-1;return e.some((function(e,n){return e[0]===t&&(i=n,!0)})),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var i=e(this.__entries__,t),n=this.__entries__[i];return n&&n[1]},t.prototype.set=function(t,i){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=i:this.__entries__.push([t,i])},t.prototype.delete=function(t){var i=this.__entries__,n=e(i,t);~n&&i.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var i=0,n=this.__entries__;i<n.length;i++){var r=n[i];e.call(t,r[1],r[0])}},t}()}(),xi=typeof window<"u"&&typeof document<"u"&&window.document===document,Oi=typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),Ci="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Oi):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var Di=["top","right","bottom","left","width","height","size","weight"],Mi=typeof MutationObserver<"u",Ni=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var i=!1,n=!1,r=0;function o(){i&&(i=!1,e()),n&&s()}function a(){Ci(o)}function s(){var e=Date.now();if(i){if(e-r<2)return;n=!0}else i=!0,n=!1,setTimeout(a,t);r=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,i=t.indexOf(e);~i&&t.splice(i,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){!xi||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Mi?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!xi||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,i=void 0===t?"":t;Di.some((function(e){return!!~i.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Pi=function(e,t){for(var i=0,n=Object.keys(t);i<n.length;i++){var r=n[i];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},Ui=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Oi},Fi=Wi(0,0,0,0);function Bi(e){return parseFloat(e)||0}function Hi(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return t.reduce((function(t,i){return t+Bi(e["border-"+i+"-width"])}),0)}function Vi(e){var t=e.clientWidth,i=e.clientHeight;if(!t&&!i)return Fi;var n=Ui(e).getComputedStyle(e),r=function(e){for(var t={},i=0,n=["top","right","bottom","left"];i<n.length;i++){var r=n[i],o=e["padding-"+r];t[r]=Bi(o)}return t}(n),o=r.left+r.right,a=r.top+r.bottom,s=Bi(n.width),u=Bi(n.height);if("border-box"===n.boxSizing&&(Math.round(s+o)!==t&&(s-=Hi(n,"left","right")+o),Math.round(u+a)!==i&&(u-=Hi(n,"top","bottom")+a)),!function(e){return e===Ui(e).document.documentElement}(e)){var l=Math.round(s+o)-t,c=Math.round(u+a)-i;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return Wi(r.left,r.top,s,u)}var Gi=typeof SVGGraphicsElement<"u"?function(e){return e instanceof Ui(e).SVGGraphicsElement}:function(e){return e instanceof Ui(e).SVGElement&&"function"==typeof e.getBBox};function ji(e){return xi?Gi(e)?function(e){var t=e.getBBox();return Wi(0,0,t.width,t.height)}(e):Vi(e):Fi}function Wi(e,t,i,n){return{x:e,y:t,width:i,height:n}}var Ki=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Wi(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=ji(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),zi=function(e,t){var i=function(e){var t=e.x,i=e.y,n=e.width,r=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Pi(a,{x:t,y:i,width:n,height:r,top:i,right:t+n,bottom:r+i,left:t}),a}(t);Pi(this,{target:e,contentRect:i})},Ji=function(){function e(e,t,i){if(this.activeObservations_=[],this.observations_=new Ii,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=i}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u")&&Element instanceof Object){if(!(e instanceof Ui(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new Ki(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u")&&Element instanceof Object){if(!(e instanceof Ui(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new zi(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),qi=typeof WeakMap<"u"?new WeakMap:new Ii,Yi=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Ni.getInstance(),n=new Ji(t,i,this);qi.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){Yi.prototype[e]=function(){var t;return(t=qi.get(this))[e].apply(t,arguments)}})),typeof Oi.ResizeObserver<"u"&&Oi.ResizeObserver;var Qi={},Zi=Object.prototype.hasOwnProperty;function Xi(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function $i(e){try{return encodeURIComponent(e)}catch(e){return null}}Qi.stringify=function(e,t){t=t||"";var i,n,r=[];for(n in"string"!=typeof t&&(t="?"),e)if(Zi.call(e,n)){if(!(i=e[n])&&(null==i||isNaN(i))&&(i=""),n=$i(n),i=$i(i),null===n||null===i)continue;r.push(n+"="+i)}return r.length?t+r.join("&"):""},Qi.parse=function(e){for(var t,i=/([^=?#&]+)=?([^&]*)/g,n={};t=i.exec(e);){var r=Xi(t[1]),o=Xi(t[2]);null===r||null===o||r in n||(n[r]=o)}return n};var en=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e},tn=Qi,nn=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,rn=/[\n\r\t]/g,on=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,an=/:\d+$/,sn=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,un=/^[a-zA-Z]:/;function ln(e){return(e||"").toString().replace(nn,"")}var cn=[["#","hash"],["?","query"],function(e,t){return fn(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],dn={hash:1,query:1};function hn(e){var t,i=(typeof window<"u"?window:typeof ci<"u"?ci:typeof self<"u"?self:{}).location||{},n={},r=typeof(e=e||i);if("blob:"===e.protocol)n=new An(unescape(e.pathname),{});else if("string"===r)for(t in n=new An(e,{}),dn)delete n[t];else if("object"===r){for(t in e)t in dn||(n[t]=e[t]);void 0===n.slashes&&(n.slashes=on.test(e.href))}return n}function fn(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function pn(e,t){e=(e=ln(e)).replace(rn,""),t=t||{};var i,n=sn.exec(e),r=n[1]?n[1].toLowerCase():"",o=!!n[2],a=!!n[3],s=0;return o?a?(i=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(i=n[2]+n[4],s=n[2].length):a?(i=n[3]+n[4],s=n[3].length):i=n[4],"file:"===r?s>=2&&(i=i.slice(2)):fn(r)?i=n[4]:r?o&&(i=i.slice(2)):s>=2&&fn(t.protocol)&&(i=n[4]),{protocol:r,slashes:o||fn(r),slashesCount:s,rest:i}}function An(e,t,i){if(e=(e=ln(e)).replace(rn,""),!(this instanceof An))return new An(e,t,i);var n,r,o,a,s,u,l=cn.slice(),c=typeof t,d=this,h=0;for("object"!==c&&"string"!==c&&(i=t,t=null),i&&"function"!=typeof i&&(i=tn.parse),n=!(r=pn(e||"",t=hn(t))).protocol&&!r.slashes,d.slashes=r.slashes||n&&t.slashes,d.protocol=r.protocol||t.protocol||"",e=r.rest,("file:"===r.protocol&&(2!==r.slashesCount||un.test(e))||!r.slashes&&(r.protocol||r.slashesCount<2||!fn(d.protocol)))&&(l[3]=[/(.*)/,"pathname"]);h<l.length;h++)"function"!=typeof(a=l[h])?(o=a[0],u=a[1],o!=o?d[u]=e:"string"==typeof o?~(s="@"===o?e.lastIndexOf(o):e.indexOf(o))&&("number"==typeof a[2]?(d[u]=e.slice(0,s),e=e.slice(s+a[2])):(d[u]=e.slice(s),e=e.slice(0,s))):(s=o.exec(e))&&(d[u]=s[1],e=e.slice(0,s.index)),d[u]=d[u]||n&&a[3]&&t[u]||"",a[4]&&(d[u]=d[u].toLowerCase())):e=a(e,d);i&&(d.query=i(d.query)),n&&t.slashes&&"/"!==d.pathname.charAt(0)&&(""!==d.pathname||""!==t.pathname)&&(d.pathname=function(e,t){if(""===e)return t;for(var i=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=i.length,r=i[n-1],o=!1,a=0;n--;)"."===i[n]?i.splice(n,1):".."===i[n]?(i.splice(n,1),a++):a&&(0===n&&(o=!0),i.splice(n,1),a--);return o&&i.unshift(""),("."===r||".."===r)&&i.push(""),i.join("/")}(d.pathname,t.pathname)),"/"!==d.pathname.charAt(0)&&fn(d.protocol)&&(d.pathname="/"+d.pathname),en(d.port,d.protocol)||(d.host=d.hostname,d.port=""),d.username=d.password="",d.auth&&(~(s=d.auth.indexOf(":"))?(d.username=d.auth.slice(0,s),d.username=encodeURIComponent(decodeURIComponent(d.username)),d.password=d.auth.slice(s+1),d.password=encodeURIComponent(decodeURIComponent(d.password))):d.username=encodeURIComponent(decodeURIComponent(d.auth)),d.auth=d.password?d.username+":"+d.password:d.username),d.origin="file:"!==d.protocol&&fn(d.protocol)&&d.host?d.protocol+"//"+d.host:"null",d.href=d.toString()}An.prototype={set:function(e,t,i){var n=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(i||tn.parse)(t)),n[e]=t;break;case"port":n[e]=t,en(t,n.protocol)?t&&(n.host=n.hostname+":"+t):(n.host=n.hostname,n[e]="");break;case"hostname":n[e]=t,n.port&&(t+=":"+n.port),n.host=t;break;case"host":n[e]=t,an.test(t)?(t=t.split(":"),n.port=t.pop(),n.hostname=t.join(":")):(n.hostname=t,n.port="");break;case"protocol":n.protocol=t.toLowerCase(),n.slashes=!i;break;case"pathname":case"hash":if(t){var r="pathname"===e?"/":"#";n[e]=t.charAt(0)!==r?r+t:t}else n[e]=t;break;case"username":case"password":n[e]=encodeURIComponent(t);break;case"auth":var o=t.indexOf(":");~o?(n.username=t.slice(0,o),n.username=encodeURIComponent(decodeURIComponent(n.username)),n.password=t.slice(o+1),n.password=encodeURIComponent(decodeURIComponent(n.password))):n.username=encodeURIComponent(decodeURIComponent(t))}for(var a=0;a<cn.length;a++){var s=cn[a];s[4]&&(n[s[1]]=n[s[1]].toLowerCase())}return n.auth=n.password?n.username+":"+n.password:n.username,n.origin="file:"!==n.protocol&&fn(n.protocol)&&n.host?n.protocol+"//"+n.host:"null",n.href=n.toString(),n},toString:function(e){(!e||"function"!=typeof e)&&(e=tn.stringify);var t,i=this,n=i.host,r=i.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(i.protocol&&i.slashes||fn(i.protocol)?"//":"");return i.username?(o+=i.username,i.password&&(o+=":"+i.password),o+="@"):i.password?(o+=":"+i.password,o+="@"):"file:"!==i.protocol&&fn(i.protocol)&&!n&&"/"!==i.pathname&&(o+="@"),(":"===n[n.length-1]||an.test(i.hostname)&&!i.port)&&(n+=":"),o+=n+i.pathname,(t="object"==typeof i.query?e(i.query):i.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),i.hash&&(o+=i.hash),o}},An.extractProtocol=pn,An.location=hn,An.trimLeft=ln,An.qs=tn;var vn=di(An),_n=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t){function i(t){return e.exports=i="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.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(2);function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(0).default,r=i(3);e.exports=function(e){var t=r(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(0).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){function n(e,t){console.log("%c "+e+" %c "+t+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px; color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0; color: #fff","background:transparent")}i.r(t),i.d(t,"LogLevel",(function(){return c})),i.d(t,"DefaultLogger",(function(){return p})),i.d(t,"Logger",(function(){return f})),i.d(t,"printVersion",(function(){return n})),i.d(t,"DEFAULT_LOG_LEVEL",(function(){return d}));var r=i(1),o=i.n(r),a=function(){function e(){this.timeout=6048e5}var t=e.prototype;return t.write=function(t,i){if(e.available)try{localStorage.setItem(t,JSON.stringify({value:i,time:Date.now()}))}catch(e){}},t.read=function(t,i){if(void 0===i&&(i=!0),e.available)try{var n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=r.value,a=r.time,s=void 0===a?0:a;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return o}}catch(e){}},o()(e,null,[{key:"available",get:function(){if(void 0===e._available)try{localStorage.setItem("alg","test"),e._available=!0}catch(t){e._available=!1}return e._available}}])}();a._available=void 0;var s,u,l=a,c=((u={}).NONE="none",u.ERROR="e",u.WARN="w",u.INFO="i",u.DEBUG="d",u.VERBOSE="v",u),d=c.ERROR,h=((s={})[c.NONE]={value:1,str:"N"},s[c.ERROR]={value:100,str:"E"},s[c.WARN]={value:200,str:"W"},s[c.INFO]={value:300,str:"I"},s[c.DEBUG]={value:400,str:"D"},s[c.VERBOSE]={value:500,str:"V"},s),f=function(){function e(e){if(this._name="kwai-v",this._level=d,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&"blob:"===location.protocol){var t,i=location.href.split("/"),n=null==(t=i[i.length-1])?void 0:t.match(/(\w+)-/);n&&(this._workerTag=e?e+"-"+n[1]:n[1])}else e&&(this._workerTag=e)}e.loadLogLevel=function(e,t){if(void 0===t&&(t=!0),location.href){var i=new RegExp(e+"=([a-z]{1})"),n=location.href.match(i);if(n&&n.length>1){var r=n[1];if(this._isValueInLevel(r))return r}}var o=(new l).read(e,t);if(this._isValueInLevel(o))return o},e.saveLogLevel=function(e,t){this._isValueInLevel(t)&&(new l).write(e,t)},e._isValueInLevel=function(e){return-1!==Object.values(c).indexOf(e)};var t=e.prototype;return t.setOutput=function(e){return this._output=e,this},t.setLevel=function(e){return this._level=e,this},t.setId=function(e){return this._id=e,this},t.setName=function(e){return this._name=e,this},t.getLevel=function(){return this._level},t.getOutput=function(){return this._output},t.hasOutput=function(){return!!this._output},t.e=function(e){if(this._isLevelEnabled(this._level,c.ERROR)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.ERROR,e,i);try{var o;null==(o=this._output)||o.e.apply(o,[r].concat(i))}catch(e){}}},t.w=function(e){if(this._isLevelEnabled(this._level,c.WARN)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.WARN,e,i);try{var o;null==(o=this._output)||o.w.apply(o,[r].concat(i))}catch(e){}}},t.i=function(e){if(this._isLevelEnabled(this._level,c.INFO)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.INFO,e,i);try{var o;null==(o=this._output)||o.i.apply(o,[r].concat(i))}catch(e){}}},t.d=function(e){if(this._isLevelEnabled(this._level,c.DEBUG)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.DEBUG,e,i);try{var o;null==(o=this._output)||o.d.apply(o,[r].concat(i))}catch(e){}}},t.v=function(e){if(this._isLevelEnabled(this._level,c.VERBOSE)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(c.VERBOSE,e,i);try{var o;null==(o=this._output)||o.v.apply(o,[r].concat(i))}catch(e){}}},t._isLevelEnabled=function(e,t){return h[e].value>=h[t].value},t._printLog=function(e,t,i){var n,r,o=typeof t;if("object"===o)t=(null==(r=t)?void 0:r.constructor.name)||"unknown";else if("function"===o){var a;t=(null==(a=Object.getOwnPropertyDescriptor(t,"name"))?void 0:a.value)||"unknown"}var s,u,l=((null==(n=h[e])?void 0:n.str)||"")+"|"+this._name+"["+("function"==typeof this._id?this._id():this._id)+"]["+this._workerTag+"]::"+t;return e===c.ERROR?(s=console).error.apply(s,[l].concat(i.slice(0))):(u=console).log.apply(u,[l].concat(i.slice(0))),l},e}(),p=new f}]);void 0===_n&&console.error("esm-webpack-plugin: nothing exported!"),_n.LogLevel;var mn=_n.DefaultLogger;/*! js-cookie v3.0.5 | MIT */function gn(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}_n.Logger,_n.printVersion,_n.DEFAULT_LOG_LEVEL;var yn=function e(t,i){function n(e,n,r){if(!(typeof document>"u")){"number"==typeof(r=gn({},i,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in r)r[a]&&(o+="; "+a,!0!==r[a]&&(o+="="+r[a].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+o}}return Object.create({set:n,get:function(e){if(!(typeof document>"u"||arguments.length&&!e)){for(var i=document.cookie?document.cookie.split("; "):[],n={},r=0;r<i.length;r++){var o=i[r].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(n[s]=t.read(a,s),e===s)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){n(e,"",gn({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,gn({},this.attributes,t))},withConverter:function(t){return e(gn({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),bn="did",En="kwai_player_device_id";function wn(){try{for(var e=1e9*Math.random()>>>0,t=[],i=0;i<7;i++)t.push("0123456789ABCDEF".charAt(16*Math.random()));var n="web_"+e+t.join("");return mn.i(bn,"generate nanoId",n),n}catch(e){}return"web_did_generation_failed"}var Tn=function(){var e="";try{e=(yn.get("did")||yn.get("_did")||yn.get("weblogger_did")||"").trim(),mn.i(bn,"generate deviceId from cookie",e)}catch(e){mn.i(bn,"generate deviceId from cookie err",e)}try{e?null==localStorage||localStorage.setItem(En,e):(e=((null==localStorage?void 0:localStorage.getItem(En))||"").trim(),mn.i(bn,"generate deviceId from ls",e)),e||(e=wn(),null==localStorage||localStorage.setItem(En,e))}catch(e){mn.i(bn,"generate deviceId from ls err",e)}return e||wn()}(),Rn=function(){function e(){ri(this,"timeout",6048e5)}var t=e.prototype;return t.write=function(t,i){if(e.available)try{localStorage.setItem(t,JSON.stringify({value:i,time:Date.now()}))}catch(e){}},t.read=function(t,i){if(void 0===i&&(i=!0),e.available)try{var n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=r.value,a=r.time,s=void 0===a?0:a;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return o}}catch(n){}},c()(e,null,[{key:"available",get:function(){if(typeof e._available>"u")try{localStorage.setItem("alg","test"),e._available=!0}catch(t){e._available=!1}return e._available}}])}();ri(Rn,"_available");var Sn=Rn,Ln={exports:{}};!function(e,t){!function(i,n){var r="function",o="undefined",a="object",s="string",u="model",l="name",c="type",d="vendor",h="version",f="architecture",p="console",A="mobile",v="tablet",_="smarttv",m="wearable",g="embedded",y="Amazon",b="Apple",E="BlackBerry",w="Browser",T="Chrome",R="Firefox",S="Google",L="Huawei",k="LG",I="Microsoft",x="Motorola",O="Opera",C="Samsung",D="Sony",M="Zebra",N="Facebook",P=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},U=function(e,t){return typeof e===s&&-1!==F(t).indexOf(F(e))},F=function(e){return e.toLowerCase()},B=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===o?e:e.substring(0,255)},H=function(e,t){for(var i,o,s,u,l,c,d=0;d<t.length&&!l;){var h=t[d],f=t[d+1];for(i=o=0;i<h.length&&!l;)if(l=h[i++].exec(e))for(s=0;s<f.length;s++)c=l[++o],typeof(u=f[s])===a&&u.length>0?2===u.length?typeof u[1]==r?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?typeof u[1]!==r||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):n:this[u[0]]=c?u[1].call(this,c,u[2]):n:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):n):this[u]=c||n;d+=2}},V=function(e,t){for(var i in t)if(typeof t[i]===a&&t[i].length>0){for(var r=0;r<t[i].length;r++)if(U(t[i][r],e))return"?"===i?n:i}else if(U(t[i],e))return"?"===i?n:i;return e},G={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},j={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,h],[/opios[\/ ]+([\w\.]+)/i],[h,[l,O+" Mini"]],[/\bopr\/([\w\.]+)/i],[h,[l,O]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[l,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[l,"UC"+w]],[/\bqbcore\/([\w\.]+)/i],[h,[l,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[l,"IE"]],[/yabrowser\/([\w\.]+)/i],[h,[l,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+w],h],[/\bfocus\/([\w\.]+)/i],[h,[l,R+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[l,O+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[l,O+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[l,"MIUI "+w]],[/fxios\/([-\w\.]+)/i],[h,[l,R]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+w]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+w],h],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[l,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,N],h],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[l,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[l,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[l,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,T+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[l,"Android "+w]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,h],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[h,[l,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[h,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[h,V,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[l,R+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,F]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",F]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,F]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,C],[c,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,C],[c,A]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,b],[c,A]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,b],[c,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,L],[c,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[u,[d,L],[c,A]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,"Xiaomi"],[c,A]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,"Xiaomi"],[c,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,"OPPO"],[c,A]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[c,A]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[c,A]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,x],[c,A]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,x],[c,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,k],[c,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,k],[c,A]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[c,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[c,A]],[/(pixel c)\b/i],[u,[d,S],[c,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,S],[c,A]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,D],[c,A]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,D],[c,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[c,A]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,y],[c,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,y],[c,A]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[c,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,E],[c,A]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,"ASUS"],[c,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,"ASUS"],[c,A]],[/(nexus 9)/i],[u,[d,"HTC"],[c,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[c,A]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[c,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[c,A]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,"Sharp"],[c,A]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[c,A]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[c,v]],[/(surface duo)/i],[u,[d,I],[c,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[c,A]],[/(u304aa)/i],[u,[d,"AT&T"],[c,A]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[c,A]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[c,v]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[c,v]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[c,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[c,v]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[c,v]],[/\b(k88) b/i],[u,[d,"ZTE"],[c,v]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[c,A]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[c,A]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[c,v]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[c,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[c,v]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[c,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[c,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[c,A]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[c,A]],[/\b(ph-1) /i],[u,[d,"Essential"],[c,A]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[c,v]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[c,v]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[c,v]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[c,v]],[/(sprint) (\w+)/i],[d,u,[c,A]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,I],[c,A]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,M],[c,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,M],[c,A]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[c,p]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[c,p]],[/(playstation [345portablevi]+)/i],[u,[d,D],[c,p]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,I],[c,p]],[/smart-tv.+(samsung)/i],[d,[c,_]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,C],[c,_]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,k],[c,_]],[/(apple) ?tv/i],[d,[u,b+" TV"],[c,_]],[/crkey/i],[[u,T+"cast"],[d,S],[c,_]],[/droid.+aft(\w)( bui|\))/i],[u,[d,y],[c,_]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[c,_]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,B],[u,B],[c,_]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,_]],[/((pebble))app/i],[d,u,[c,m]],[/droid.+; (glass) \d/i],[u,[d,S],[c,m]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,M],[c,m]],[/(quest( 2)?)/i],[u,[d,N],[c,m]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[c,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[c,A]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[c,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,v]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[c,A]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[l,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[l,[h,V,G]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,"Windows"],[h,V,G]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,"Mac OS"],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[h,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,h],[/\(bb(10);/i],[h,[l,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[l,R+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[l,"webOS"]],[/crkey\/([\d\.]+)/i],[h,[l,T+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[l,"Chromium OS"],h],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,h],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[l,h]]},W=function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof W))return new W(e,t).getResult();var r=e||(typeof i!==o&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),p=t?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(j,t):j;return this.getBrowser=function(){var e={};return e[l]=n,e[h]=n,H.call(e,r,p.browser),e.major=function(e){return typeof e===s?e.replace(/[^\d\.]/g,"").split(".")[0]:n}(e.version),e},this.getCPU=function(){var e={};return e[f]=n,H.call(e,r,p.cpu),e},this.getDevice=function(){var e={};return e[d]=n,e[u]=n,e[c]=n,H.call(e,r,p.device),e},this.getEngine=function(){var e={};return e[l]=n,e[h]=n,H.call(e,r,p.engine),e},this.getOS=function(){var e={};return e[l]=n,e[h]=n,H.call(e,r,p.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===s&&e.length>255?B(e,255):e,this},this.setUA(r),this};W.VERSION="1.0.2",W.BROWSER=P([l,h,"major"]),W.CPU=P([f]),W.DEVICE=P([u,d,c,p,A,_,v,m,g]),W.ENGINE=W.OS=P([l,h]),e.exports&&(t=e.exports=W),t.UAParser=W;var K=typeof i!==o&&(i.jQuery||i.Zepto);if(K&&!K.ua){var z=new W;K.ua=z.getResult(),K.ua.get=function(){return z.getUA()},K.ua.set=function(e){z.setUA(e);var t=z.getResult();for(var i in t)K.ua[i]=t[i]}}}("object"==typeof window?window:ci)}(Ln,Ln.exports);var kn=di(Ln.exports)(),In=kn.os.name,xn=In&&In.toLowerCase().indexOf("android")>=0,On=In&&In.toLowerCase().indexOf("ios")>=0,Cn="mobile"===kn.device.type||xn||On,Dn=si.ERROR;typeof location<"u"&&(Dn=li.loadLogLevel("kwai-player-log")||si.ERROR,ui.setLevel(Dn).setName("kwai-p"));var Mn=ki.EventEmitter,Nn=Object.defineProperty,Pn=function(e,t,i){return function(e,t,i){t in e?Nn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i}(e,"symbol"!=typeof t?t+"":t,i),i},Un={development:"./misc2",production:"https://log-sdk.ksapisrv.com/rest/wd/common/log/collect/misc2",oversea:"https://logsdk.kwai-pro.com/rest/wd/common/log/collect/misc2","logger-oversea":"https://data-track-sgp.corp.kuaishou.com/rest/wd/common/log/collect/misc2"},Fn=function(e){return e.SUMMARY="KP_WEB_SUMMARY",e.REALTIME="KP_WEB_REALTIME",e.DOWNLOAD="KP_WEB_DOWNLOAD",e.EVENT="KP_WEB_EVENT",e}(Fn||{}),Bn={summary:"KP_WEB_SUMMARY",realtimeBeacon:"KP_WEB_REALTIME",download:"KP_WEB_DOWNLOAD",event:"KP_WEB_EVENT"},Hn="production",Vn=["summary","realtimeBeacon","download","event"];!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var Gn=Object.defineProperty,jn=function(e,t,i){return function(e,t,i){t in e?Gn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i}(e,"symbol"!=typeof t?t+"":t,i),i},Wn=function(e){function t(){return e.apply(this,arguments)||this}u()(t,e),t.isInstanceOfPlugin=function(e){return"function"==typeof e.beforeInstall&&"function"==typeof e.afterInstall&&"function"==typeof e.beforeUninstall&&"function"==typeof e.afterUninstall&&"function"==typeof e.getLabel};var i=t.prototype;return i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},i.beforeUninstall=function(e){},i.afterUninstall=function(e){},c()(t,[{key:"controlsSoltBtns",get:function(){}}])}(Mn);jn(Wn,"label"),jn(Wn,"version"),jn(Wn,"isSupported"),jn(function(e){function t(){return e.apply(this,arguments)||this}u()(t,e);var i=t.prototype;return i.getLabel=function(){return t.label},i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},t}(Wn),"label","ControlsPlugin"),jn(function(e){function t(){return e.apply(this,arguments)||this}u()(t,e);var i=t.prototype;return i.getLabel=function(){return t.label},i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},t}(Wn),"label","I18nPlugin");var Kn=function(e){function t(){return e.apply(this,arguments)||this}u()(t,e);var i=t.prototype;return i.getLabel=function(){return t.label},i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},i.addBizLog=function(e,t){},i.appendSummaryField=function(e,t){},t}(Wn);jn(Kn,"label","LoggerPlugin");var zn=Kn;jn(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Wn),"label","HotkeyPlugin"),jn(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Wn),"label","PlayInfoPlugin"),jn(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Wn),"label","RotatePlugin"),jn(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Wn),"label","PreviewPlugin"),jn(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Wn),"label","MaskPlugin"),jn(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Wn),"label","VRPlugin"),jn(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(Wn),"label","DanmakuPlugin");var Jn,qn=function(e){return e.ERROR="error",e.MANIFEST_PARSED="manifestparsed",e.LEVEL_SWITCHING="levelswitching",e.LEVEL_SWITCHED="levelswitched",e.LEVEL_SWITCH_PLAYING="levelswitchplaying",e.LEVEL_SWITCH_FAILED="levelswitchfailed",e.LEVEL_UPDATED="levelupdated",e.AUDIO_TRACKS_SWITCHING="audiotrackswitching",e.AUDIO_TRACKS_SWITCHED="audiotrackswitched",e.LOADSTART="loadstart",e.PROGRESS="progress",e.SUSPEND="suspend",e.ABORT="abort",e.EMPTIED="emptied",e.STALLED="stalled",e.LOADEDMETADATA="loadedmetadata",e.LOADEDDATA="loadeddata",e.CANPLAY="canplay",e.CANPLAYTHROUGH="canplaythrough",e.PLAYING="playing",e.WAITING="waiting",e.SEEKING="seeking",e.SEEKED="seeked",e.ENDED="ended",e.DURATIONCHANGE="durationchange",e.TIMEUPDATE="timeupdate",e.PLAY="play",e.PAUSE="pause",e.RATECHANGE="ratechange",e.RESIZE="resize",e.VOLUMECHANGE="volumechange",e.ENTER_PICTURE_IN_PICTURE="enterpictureinpicture",e.LEAVE_PICTURE_IN_PICTURE="leavepictureinpicture",e.REPORT="report",e.VIDEO_RENDERER_CHANGE="videorendererchange",e.FULLSCREEN_CHANGE="fullscreenchange",e.ATTRIBUTE_CHANGE="attribute:change",e.INTERACTION="interaction",e.LIVE_SHIFT_CHANGE="liveshiftchange",e.LIVE_SHIFT_TYPE_CHANGE="liveshifttypechange",e.OBJECT_FIT_CHANGE="objectfitchange",e.ATTRIBUTE_CHANGE_CONFIG="attribute:change:config",e.ATTRIBUTE_CHANGE_SRC="attribute:change:src",e.ATTRIBUTE_CHANGE_VIDEO_ID="attribute:change:videoid",e.ATTRIBUTE_CHANGE_PREVIEW_URL="attribute:change:previewurl",e.ATTRIBUTE_CHANGE_MASK_URL="attribute:change:maskurl",e.ATTRIBUTE_CHANGE_CROSS_ORIGIN="attribute:change:crossorigin",e.ATTRIBUTE_CHANGE_PRELOAD="attribute:change:preload",e.ATTRIBUTE_CHANGE_CURRENT_TIME="attribute:change:currenttime",e.ATTRIBUTE_CHANGE_DEFAULT_PLAYBACK_RATE="attribute:change:defaultplaybackrate",e.ATTRIBUTE_CHANGE_PLAYBACK_RATE="attribute:change:playbackrate",e.ATTRIBUTE_CHANGE_AUTOPLAY="attribute:change:autoplay",e.ATTRIBUTE_CHANGE_LOOP="attribute:change:loop",e.ATTRIBUTE_CHANGE_CONTROLS="attribute:change:controls",e.ATTRIBUTE_CHANGE_VOLUME="attribute:change:volume",e.ATTRIBUTE_CHANGE_MUTED="attribute:change:muted",e.ATTRIBUTE_CHANGE_DEFAULT_MUTED="attribute:change:defaultmuted",e.ATTRIBUTE_CHANGE_POSTER="attribute:change:poster",e.ATTRIBUTE_CHANGE_DISABLE_PICTURE_IN_PICTURE="attribute:change:disablepictureinpicture",e.ATTRIBUTE_CHANGE_PLAYSINLINE="attribute:change:playsinline",e.ATTRIBUTE_CHANGE_DISABLE_ADAPTIVE="attribute:change:disableadaptive",e.ATTRIBUTE_CHANGE_DISABLE_DOWNLOAD="attribute:change:disabledownload",e.ATTRIBUTE_CHANGE_DISABLE_MASK="attribute:change:disablemask",e.ATTRIBUTE_CHANGE_DISABLE_HOTKEY="attribute:change:disablehotkey",e.ATTRIBUTE_CHANGE_DISABLE_DANMAKU="attribute:change:disabledanmaku",e.ATTRIBUTE_CHANGE_DANMAKU_RENDERING="attribute:change:danmakurendering",e.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS="attribute:change:danmakucontrolspos",e.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS_FULLSCREEN="attribute:change:danmakucontrolsposfullscreen",e.ATTRIBUTE_CHANGE_CURRENT_LEVEL="attribute:change:currentlevel",e.ATTRIBUTE_CHANGE_NEXT_LEVEL="attribute:change:nextlevel",e.ATTRIBUTE_CHANGE_CURRENT_FRAME="attribute:change:currentframe",e.ATTRIBUTE_CHANGE_AUDIO_TRACK="attribute:change:audiotrack",e.ATTRIBUTE_CHANGE_PREFETCH="attribute:change:prefetch",e.ATTRIBUTE_CHANGE_SHOW_PROGRESS="attribute:change:showprogress",e.ATTRIBUTE_CHANGE_SHOW_TIME="attribute:change:showtime",e.ATTRIBUTE_CHANGE_SHOW_NEXT="attribute:change:shownext",e.ATTRIBUTE_CHANGE_SHOW_PREV="attribute:change:showprev",e.ATTRIBUTE_CHANGE_BIZ_DATA="attribute:change:bizdata",e.ATTRIBUTE_CHANGE_LIVE_TIME="attribute:change:livetime",e.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL="attribute:change:showinfopanel",e.CLICK_NEXT="clicknext",e.CLICK_LOGIN="clicklogin",e.CLICK_REGISTER="clickregister",e.CLICK_VIP="clickvip",e}(qn||{}),Yn=new Uint8Array(16);function Qn(){if(!Jn&&!(Jn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Jn(Yn)}var Zn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Xn(e){return"string"==typeof e&&Zn.test(e)}for(var $n=[],er=0;er<256;++er)$n.push((er+256).toString(16).substr(1));function tr(e,t,i){var n=(e=e||{}).random||(e.rng||Qn)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){i=i||0;for(var r=0;r<16;++r)t[i+r]=n[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=($n[e[t+0]]+$n[e[t+1]]+$n[e[t+2]]+$n[e[t+3]]+"-"+$n[e[t+4]]+$n[e[t+5]]+"-"+$n[e[t+6]]+$n[e[t+7]]+"-"+$n[e[t+8]]+$n[e[t+9]]+"-"+$n[e[t+10]]+$n[e[t+11]]+$n[e[t+12]]+$n[e[t+13]]+$n[e[t+14]]+$n[e[t+15]]).toLowerCase();if(!Xn(i))throw TypeError("Stringified UUID is invalid");return i}(n)}var ir="log-ctx",nr=function(){function e(){Pn(this,"_env",Hn),Pn(this,"_reportTypes",[]),Pn(this,"_player"),Pn(this,"_logger"),Pn(this,"_logBaseInfo",this._getDefaultLogBaseInfo()),Pn(this,"_biz",{}),Pn(this,"_extraSummaryFields",{}),Pn(this,"_forceSendBeacon",!1)}var t=e.prototype;return t.setBaseInfo=function(e,t,i){this._player=e,this._logger=e.logger,this._logBaseInfo.env=this._env=t,this._reportTypes=i},t.setBizData=function(e){var t,i,n=this;if(null==(t=this._logger)||t.i(ir,"set biz",e),e){var r={};Object.keys(e).forEach((function(t){var i,o=n._underscoreToCamelCase(t),a=e[t];if(["sessionId","deviceId","userId","globalId","networkType","packageName","versionName","channel"].indexOf(o)>=0&&("string"==typeof a||"number"==typeof a)){var s=n._val2String(e[t]).trim();s&&(null==(i=n._logger)||i.i(ir,"biz to log:",o,s),r[o]=s)}"secretId"!==t&&"secretKey"!==t&&(n._biz[t]=a)})),a()(this._logBaseInfo,r),r.deviceId&&(null==(i=this._logger)||i.i(ir,"update did by bizData. "+r.deviceId),function(e){Tn=e}(this._logBaseInfo.deviceId))}else this._logBaseInfo=this._getDefaultLogBaseInfo()},t.preprocessingLog=function(e,t,i){var n,r;if(t)return t=a()(t,{player_version:(null==(n=this._player)?void 0:n.version)||"",pack_version:(null==(r=this._player)?void 0:r.packVersion)||"",biz:this._biz}),e===Fn.SUMMARY&&"object"==typeof t&&(t.extra=i?a()({},this._extraSummaryFields,i):this._extraSummaryFields),t},t.clearExtraSummary=function(){this._extraSummaryFields={}},t.appendSummaryField=function(e,t){this._extraSummaryFields[e]=t},t._getDefaultLogBaseInfo=function(){var e=10;return"iOS"===kn.os.name?e=9:"Android"===kn.os.name&&(e=8),{env:this._env,productName:"streamlake",sessionId:tr(),platform:e,deviceId:Tn,userId:"",globalId:"",networkType:"",packageName:"",versionName:"",channel:""}},t._underscoreToCamelCase=function(e){return e.replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()}))},t._val2String=function(e){return"number"==typeof e?e.toString():e||""},c()(e,[{key:"reportTypes",get:function(){return this._reportTypes}},{key:"logBaseInfo",get:function(){var e;return null!=(e=this._player)&&e.productName&&(this._logBaseInfo.productName=this._player.productName),this._logBaseInfo.deviceId||(this._logBaseInfo.deviceId=Tn),this._logBaseInfo}},{key:"player",get:function(){return this._player}},{key:"forceSendBeacon",get:function(){return this._forceSendBeacon},set:function(e){this._forceSendBeacon=e}}])}(),rr="kwai-player-web-log-temp",or="log-reissue",ar=function(){function e(e,t,i){var n=this;Pn(this,"_ctx"),Pn(this,"_logger"),Pn(this,"_webLogger"),Pn(this,"_active",!1),Pn(this,"_processingTs",0),Pn(this,"_lc",new Sn),Pn(this,"_timer",0),Pn(this,"_checkMissing",!1),Pn(this,"_tick",(function(){if(n._active&&n._ctx.player){n._checkMissing&&(n._checkMissing=!1,n._checkMissingLog());var e=performance.now();if(e-n._processingTs>=5e3){n._processingTs=e;var t=n._ctx.preprocessingLog(Fn.SUMMARY,n._ctx.player.audienceStat,{reissue_log:1});t&&(n._logger.v(or,"write temp"),n._writeTemp(n._webLogger.generateFormData(n._ctx.logBaseInfo,[{key:Fn.SUMMARY,value:t}])))}}})),Pn(this,"_startTimer",(function(){n._timer||(n._timer=+setInterval(n._tick,1e3))})),Pn(this,"_stopTimer",(function(){clearInterval(n._timer),n._timer=0})),this._ctx=e,this._logger=t,this._webLogger=i,this._lc.timeout=2592e5}var t=e.prototype;return t.start=function(){this._logger.i(or,"start"),this._active||(this._active=!0,this._processingTs=performance.now(),this._checkMissing=!0,this._startTimer())},t.stop=function(){this._logger.i(or,"stop"),this._active=!1,this._clear(),this._stopTimer()},t._checkMissingLog=function(){var e=this._readTemp();this._clear(),e?(this._logger.i(or,"send missing log"),this._webLogger.send(this._ctx.logBaseInfo.env,Fn.SUMMARY,e.value)):this._logger.i(or,"no missing log")},t._clear=function(){try{null==localStorage||localStorage.removeItem(rr)}catch(e){}},t._writeTemp=function(e){if(e){var t={version:1,value:e,checkSum:this._fletcher16(e)};try{this._lc.write(rr,btoa(JSON.stringify(t)))}catch(e){}}},t._readTemp=function(){var e=this._lc.read(rr,!0);if("string"==typeof e)try{var t=JSON.parse(atob(e));if(1===t.version&&"string"==typeof t.value&&t.checkSum===this._fletcher16(t.value))return this._logger.i(or,"read success"),t;this._logger.i(or,"read failed",t)}catch(t){}},t._fletcher16=function(e){for(var t=0,i=0,n=0;n<e.length;n++)i=(i+(t=(t+e.charCodeAt(n))%255))%255;return i<<8|t},e}(),sr={unknown:0,none:1,wifi:2,"4g":3,"3g":4,"2g":5,"5g":7,"slow-2g":5},ur=(new Date).toString().match(/GMT\+\d+/),lr="";var cr="web-logger",dr=function(){function e(e){Pn(this,"_waitingQueue",[]),Pn(this,"_nextTickTimer"),Pn(this,"_logger"),this._logger=e}var t=e.prototype;return t.sendLog=function(e,t,i,n,r){var o=this;void 0===n&&(n=!1),this._logger.i(cr,"sendLog",e,t,i,"forceSendBeacon: "+n+" immediately: "+r),i&&(this._waitingQueue.push({key:t,value:i}),r?(this.send(e.env,e.productName,this.generateFormData(e,this._waitingQueue),n),this._waitingQueue.splice(0)):this._nextTickTimer||(this._nextTickTimer=setTimeout((function(){o._nextTickTimer=void 0,o.send(e.env,e.productName,o.generateFormData(e,o._waitingQueue),n),o._waitingQueue.splice(0)}),0)))},t.send=function(t,i,n,r){if(void 0===r&&(r=!1),this._logger.i(cr,"send",t,i,!!n,"forceSendBeacon: "+r),n){var o=Un[t]||Un.production;e._clientIncrementId++;try{localStorage&&(localStorage.kwai_player_client_increment_id=e._clientIncrementId)}catch(s){}var a=new vn(o,!0);if(a.query.v="3.10.24",a.query.kpn=i,o=a.toString(),this._logger.i(cr,"send",t,i,!!n,o),r&&navigator.sendBeacon){var s=navigator.sendBeacon(o,n);this._logger.i(cr,"send data use sendBeacon.",s),s||this._sendByXhr(o,n)}else this._sendByXhr(o,n)}},t._sendByXhr=function(e,t){var i=this;this._logger.i(cr,"send data use xhr.");var n=new XMLHttpRequest;n.open("POST",e),n.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),n.onerror=n.ontimeout=function(){i._logger.i("sendLog error"),n.onerror=n.ontimeout=n.onload=null},n.onload=function(){n.onerror=n.ontimeout=n.onload=null},n.timeout=5e3,n.send(t)},t.generateFormData=function(t,i){this._logger.i(cr,"device_id: "+t.deviceId);var n={common:e._buildCommon(t,{service_name:"KwaiPlayerWeb"}),logs:i.map((function(i){return e._buildEvent(t,i.key,i.value)}))};return n.logs.length?JSON.stringify(n):""},e._buildEvent=function(t,i,n){lr||(lr=tr());var r={identity:lr,page:location.href,hostname:location.hostname,page_type:2,params:new vn(location.href,!0).query};return{client_timestamp:Date.now(),client_increment_id:e._clientIncrementId,session_id:t.sessionId,time_zone:e._timeZone,stat_package:{custom_stat_event:{key:i,value:JSON.stringify(a()({},n,{url_package:r}))}}}},e._buildCommon=function(e,t){return function(e,t){for(var i in t||(t={}))A.call(t,i)&&_(e,i,t[i]);if(p)for(var n,r=d(p(t));!(n=r()).done;){i=n.value;v.call(t,i)&&_(e,i,t[i])}return e}({identity_package:{device_id:e.deviceId,global_id:e.globalId,user_id:e.userId},app_package:{language:navigator.language,platform:e.platform,container:10===e.platform?"WEB":"H5",package_name:e.packageName,product_name:e.productName,version_name:e.versionName,channel:e.channel},device_package:{os_version:kn.os.version,model:kn.os.name,ua:navigator.userAgent},need_encrypt:!1,sdk_version:"",h5_extra_attr:this._getH5ExtraAttr(e),global_attr:"{}",network_package:{type:this._getNetworkType(e.networkType)}},t)},e._getNetworkType=function(e){var t,i=e||(null==(t=(null==navigator?void 0:navigator.connection)||(null==navigator?void 0:navigator.mozConnection)||(null==navigator?void 0:navigator.webkitConnection))?void 0:t.effectiveType);return i&&sr[i]||sr.unknown},e._getH5ExtraAttr=function(e){var t=parseFloat(devicePixelRatio.toFixed(3))||1;return JSON.stringify({sdk_name:"",sdk_version:"",sdk_bundle:"",app_version_name:e.versionName,resolution:Math.floor(screen.width*t)+"x"+Math.floor(screen.height*t),screen_width:Math.floor(screen.width),screen_height:Math.floor(screen.height),device_pixel_ratio:t,domain:location.origin,fromIframe:self!==top})},e}();Pn(dr,"_clientIncrementId",function(){try{return parseInt((null==localStorage?void 0:localStorage.getItem("kwai_player_client_increment_id"))||"")||0}catch(e){}return 0}()),Pn(dr,"_timeZone",ur&&ur[0]?ur[0]:"");var hr=dr,fr="logger-plugin",pr=function(e){function t(){var t;return t=e.apply(this,arguments)||this,Pn(r()(t),"_summaryAlreadySend",!1),Pn(r()(t),"_webLogger"),Pn(r()(t),"_logger"),Pn(r()(t),"_ctx",new nr),Pn(r()(t),"_logReissue"),Pn(r()(t),"_parseBizData",(function(){var e,i,n;null==(i=t._logger)||i.i(fr,"parse biz data",null==(e=t._ctx.player)?void 0:e.bizData),t._ctx.setBizData(null==(n=t._ctx.player)?void 0:n.bizData)})),Pn(r()(t),"_onReport",(function(e){var i,n;if(-1!==t._ctx.reportTypes.indexOf(e.type)){var r=Bn[e.type];r?(null==(i=t._logger)||i.i(fr,"sendLog",t._ctx.logBaseInfo.productName,r),t._send(r,e.value)):null==(n=t._logger)||n.i(fr,"unknown weblogger key.")}})),Pn(r()(t),"_onSrcChange",(function(){var e;t._sendSummary(),t._summaryAlreadySend=!1,null==(e=t._logReissue)||e.start()})),Pn(r()(t),"_sendSummary",(function(){var e,i;!t._ctx.player||t._summaryAlreadySend||!t._ctx.player.audienceStat||(null==(e=t._logReissue)||e.stop(),t._summaryAlreadySend=!0,null==(i=t._logger)||i.i(fr,"send summary"),t._send(Fn.SUMMARY,t._ctx.player.audienceStat,!0))})),Pn(r()(t),"_onBeforeunload",(function(){t._sendSummary()})),t}u()(t,e);var i=t.prototype;return i.beforeInstall=function(e,t){var i;t&&t.reportTypes&&Array.isArray(t.reportTypes)&&(i=t.reportTypes.filter((function(e){return Vn.indexOf(e)>=0}))),null!=t&&t.productName&&(e.productName=t.productName),typeof(null==t?void 0:t.forceSendBeacon)<"u"&&(this._ctx.forceSendBeacon=t.forceSendBeacon),this._logger=e.logger,this._ctx.setBaseInfo(e,(null==t?void 0:t.env)||Hn,i||Vn),this._webLogger||(this._webLogger=new hr(e.logger)),this._logReissue=new ar(this._ctx,e.logger,this._webLogger),e.on(qn.REPORT,this._onReport),e.on(qn.ATTRIBUTE_CHANGE_SRC,this._onSrcChange),e.on(qn.ATTRIBUTE_CHANGE_BIZ_DATA,this._parseBizData),window.addEventListener("beforeunload",this._onBeforeunload),kn&&"mobile"===kn.device.type&&window.addEventListener("unload",this._onBeforeunload),this._parseBizData()},i.beforeUninstall=function(){this._sendSummary()},i.afterUninstall=function(){var e,t,i;null==(e=this._ctx.player)||e.off(qn.REPORT,this._onReport),null==(t=this._ctx.player)||t.off(qn.ATTRIBUTE_CHANGE_SRC,this._onSrcChange),null==(i=this._ctx.player)||i.off(qn.ATTRIBUTE_CHANGE_BIZ_DATA,this._parseBizData),window.removeEventListener("beforeunload",this._onBeforeunload),window.removeEventListener("unload",this._onBeforeunload)},i.appendSummaryField=function(e,t){var i;null==(i=this._logger)||i.i(fr,"add summary field",e,t),this._ctx.appendSummaryField(e,t)},i._send=function(e,t,i){var n;t&&(null==(n=this._webLogger)||n.sendLog(this._ctx.logBaseInfo,e,this._ctx.preprocessingLog(e,t),this._ctx.forceSendBeacon,i))},t}(zn);Pn(pr,"version","1.1.0-alpha.0");var Ar,vr,_r,mr,gr,yr,br,Er,wr={},Tr=[],Rr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Sr(e,t){for(var i in t)e[i]=t[i];return e}function Lr(e){var t=e.parentNode;t&&t.removeChild(e)}function kr(e,t,i,n,r){var o={type:e,props:t,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++_r:r};return null==r&&null!=vr.vnode&&vr.vnode(o),o}function Ir(e){return e.children}function xr(e,t){this.props=e,this.context=t}function Or(e,t){if(null==t)return e.__?Or(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e)return i.__e;return"function"==typeof e.type?Or(e):null}function Cr(e){var t,i;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e){e.__e=e.__c.base=i.__e;break}return Cr(e)}}function Dr(e){(!e.__d&&(e.__d=!0)&&mr.push(e)&&!Mr.__r++||gr!==vr.debounceRendering)&&((gr=vr.debounceRendering)||yr)(Mr)}function Mr(){var e,t,i,n,r,o,a,s;for(mr.sort(br);e=mr.shift();)e.__d&&(t=mr.length,n=void 0,r=void 0,a=(o=(i=e).__v).__e,(s=i.__P)&&(n=[],(r=Sr({},o)).__v=o.__v+1,jr(s,o,r,i.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,n,null==a?Or(o):a,o.__h),Wr(n,o),o.__e!=a&&Cr(o)),mr.length>t&&mr.sort(br));Mr.__r=0}function Nr(e,t,i,n,r,o,a,s,u,l){var c,d,h,f,p,A,v,_=n&&n.__k||Tr,m=_.length;for(i.__k=[],c=0;c<t.length;c++)if(null!=(f=i.__k[c]=null==(f=t[c])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?kr(null,f,null,null,f):Array.isArray(f)?kr(Ir,{children:f},null,null,null):f.__b>0?kr(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=i,f.__b=i.__b+1,null===(h=_[c])||h&&f.key==h.key&&f.type===h.type)_[c]=void 0;else for(d=0;d<m;d++){if((h=_[d])&&f.key==h.key&&f.type===h.type){_[d]=void 0;break}h=null}jr(e,f,h=h||wr,r,o,a,s,u,l),p=f.__e,(d=f.ref)&&h.ref!=d&&(v||(v=[]),h.ref&&v.push(h.ref,null,f),v.push(d,f.__c||p,f)),null!=p?(null==A&&(A=p),"function"==typeof f.type&&f.__k===h.__k?f.__d=u=Pr(f,u,e):u=Ur(e,f,h,_,p,u),"function"==typeof i.type&&(i.__d=u)):u&&h.__e==u&&u.parentNode!=e&&(u=Or(h))}for(i.__e=A,c=m;c--;)null!=_[c]&&("function"==typeof i.type&&null!=_[c].__e&&_[c].__e==i.__d&&(i.__d=Fr(n).nextSibling),zr(_[c],_[c]));if(v)for(c=0;c<v.length;c++)Kr(v[c],v[++c],v[++c])}function Pr(e,t,i){for(var n,r=e.__k,o=0;r&&o<r.length;o++)(n=r[o])&&(n.__=e,t="function"==typeof n.type?Pr(n,t,i):Ur(i,n,n,r,n.__e,t));return t}function Ur(e,t,i,n,r,o){var a,s,u;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==i||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),a=null;else{for(s=o,u=0;(s=s.nextSibling)&&u<n.length;u+=1)if(s==r)break e;e.insertBefore(r,o),a=o}return void 0!==a?a:r.nextSibling}function Fr(e){var t,i,n;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((i=e.__k[t])&&(n=Fr(i)))return n;return null}function Br(e,t,i){"-"===t[0]?e.setProperty(t,null==i?"":i):e[t]=null==i?"":"number"!=typeof i||Rr.test(t)?i:i+"px"}function Hr(e,t,i,n,r){var o;e:if("style"===t)if("string"==typeof i)e.style.cssText=i;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)i&&t in i||Br(e.style,t,"");if(i)for(t in i)n&&i[t]===n[t]||Br(e.style,t,i[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=i,i?n||e.addEventListener(t,o?Gr:Vr,o):e.removeEventListener(t,o?Gr:Vr,o);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==i?"":i;break e}catch(e){}"function"==typeof i||(null==i||!1===i&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,i))}}function Vr(e){return this.l[e.type+!1](vr.event?vr.event(e):e)}function Gr(e){return this.l[e.type+!0](vr.event?vr.event(e):e)}function jr(e,t,i,n,r,o,a,s,u){var l,c,d,h,f,p,A,v,_,m,g,y,b,E,w,T=t.type;if(void 0!==t.constructor)return null;null!=i.__h&&(u=i.__h,s=t.__e=i.__e,t.__h=null,o=[s]),(l=vr.__b)&&l(t);try{e:if("function"==typeof T){if(v=t.props,_=(l=T.contextType)&&n[l.__c],m=l?_?_.props.value:l.__:n,i.__c?A=(c=t.__c=i.__c).__=c.__E:("prototype"in T&&T.prototype.render?t.__c=c=new T(v,m):(t.__c=c=new xr(v,m),c.constructor=T,c.render=Jr),_&&_.sub(c),c.props=v,c.state||(c.state={}),c.context=m,c.__n=n,d=c.__d=!0,c.__h=[],c._sb=[]),null==c.__s&&(c.__s=c.state),null!=T.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=Sr({},c.__s)),Sr(c.__s,T.getDerivedStateFromProps(v,c.__s))),h=c.props,f=c.state,c.__v=t,d)null==T.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==T.getDerivedStateFromProps&&v!==h&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(v,m),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(v,c.__s,m)||t.__v===i.__v){for(t.__v!==i.__v&&(c.props=v,c.state=c.__s,c.__d=!1),c.__e=!1,t.__e=i.__e,t.__k=i.__k,t.__k.forEach((function(e){e&&(e.__=t)})),g=0;g<c._sb.length;g++)c.__h.push(c._sb[g]);c._sb=[],c.__h.length&&a.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(v,c.__s,m),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(h,f,p)}))}if(c.context=m,c.props=v,c.__P=e,y=vr.__r,b=0,"prototype"in T&&T.prototype.render){for(c.state=c.__s,c.__d=!1,y&&y(t),l=c.render(c.props,c.state,c.context),E=0;E<c._sb.length;E++)c.__h.push(c._sb[E]);c._sb=[]}else do{c.__d=!1,y&&y(t),l=c.render(c.props,c.state,c.context),c.state=c.__s}while(c.__d&&++b<25);c.state=c.__s,null!=c.getChildContext&&(n=Sr(Sr({},n),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(p=c.getSnapshotBeforeUpdate(h,f)),w=null!=l&&l.type===Ir&&null==l.key?l.props.children:l,Nr(e,Array.isArray(w)?w:[w],t,i,n,r,o,a,s,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),A&&(c.__E=c.__=null),c.__e=!1}else null==o&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=function(e,t,i,n,r,o,a,s){var u,l,c,d=i.props,h=t.props,f=t.type,p=0;if("svg"===f&&(r=!0),null!=o)for(;p<o.length;p++)if((u=o[p])&&"setAttribute"in u==!!f&&(f?u.localName===f:3===u.nodeType)){e=u,o[p]=null;break}if(null==e){if(null===f)return document.createTextNode(h);e=r?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,h.is&&h),o=null,s=!1}if(null===f)d===h||s&&e.data===h||(e.data=h);else{if(o=o&&Ar.call(e.childNodes),l=(d=i.props||wr).dangerouslySetInnerHTML,c=h.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},p=0;p<e.attributes.length;p++)d[e.attributes[p].name]=e.attributes[p].value;(c||l)&&(c&&(l&&c.__html==l.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,i,n,r){var o;for(o in i)"children"===o||"key"===o||o in t||Hr(e,o,null,i[o],n);for(o in t)r&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||i[o]===t[o]||Hr(e,o,t[o],i[o],n)}(e,h,d,r,s),c)t.__k=[];else if(p=t.props.children,Nr(e,Array.isArray(p)?p:[p],t,i,n,r&&"foreignObject"!==f,o,a,o?o[0]:i.__k&&Or(i,0),s),null!=o)for(p=o.length;p--;)null!=o[p]&&Lr(o[p]);s||("value"in h&&void 0!==(p=h.value)&&(p!==e.value||"progress"===f&&!p||"option"===f&&p!==d.value)&&Hr(e,"value",p,d.value,!1),"checked"in h&&void 0!==(p=h.checked)&&p!==e.checked&&Hr(e,"checked",p,d.checked,!1))}return e}(i.__e,t,i,n,r,o,a,u);(l=vr.diffed)&&l(t)}catch(e){t.__v=null,(u||null!=o)&&(t.__e=s,t.__h=!!u,o[o.indexOf(s)]=null),vr.__e(e,t,i)}}function Wr(e,t){vr.__c&&vr.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){vr.__e(e,t.__v)}}))}function Kr(e,t,i){try{"function"==typeof e?e(t):e.current=t}catch(e){vr.__e(e,i)}}function zr(e,t,i){var n,r;if(vr.unmount&&vr.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Kr(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){vr.__e(e,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(r=0;r<n.length;r++)n[r]&&zr(n[r],t,i||"function"!=typeof e.type);i||null==e.__e||Lr(e.__e),e.__=e.__e=e.__d=void 0}function Jr(e,t,i){return this.constructor(e,i)}function qr(e,t,i){var n,r,o;vr.__&&vr.__(e,t),r=(n="function"==typeof i)?null:i&&i.__k||t.__k,o=[],jr(t,e=(!n&&i||t).__k=function(e,t,i){var n,r,o,a={};for(o in t)"key"==o?n=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Ar.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return kr(e,a,n,r,null)}(Ir,null,[e]),r||wr,wr,void 0!==t.ownerSVGElement,!n&&i?[i]:r?null:t.firstChild?Ar.call(t.childNodes):null,o,!n&&i?i:r?r.__e:t.firstChild,n),Wr(o,e)}Ar=Tr.slice,vr={__e:function(e,t,i,n){for(var r,o,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,n||{}),a=r.__d),a)return r.__E=r}catch(t){e=t}throw e}},_r=0,xr.prototype.setState=function(e,t){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Sr({},this.state),"function"==typeof e&&(e=e(Sr({},i),this.props)),e&&Sr(i,e),null!=e&&this.__v&&(t&&this._sb.push(t),Dr(this))},xr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Dr(this))},xr.prototype.render=Ir,mr=[],yr="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,br=function(e,t){return e.__v.__b-t.__v.__b},Mr.__r=0,Er=0;var Yr=0;function Qr(e,t,i,n,r,o){var a,s,u={};for(s in t)"ref"==s?a=t[s]:u[s]=t[s];var l={type:e,props:u,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Yr,__source:r,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===u[s]&&(u[s]=a[s]);return vr.vnode&&vr.vnode(l),l}var Zr,Xr,$r,eo,to=0,io=[],no=[],ro=vr.__b,oo=vr.__r,ao=vr.diffed,so=vr.__c,uo=vr.unmount;function lo(e,t){vr.__h&&vr.__h(Xr,e,to||t),to=0;var i=Xr.__H||(Xr.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:no}),i.__[e]}function co(e){return to=1,function(e,t,i){var n=lo(Zr++,2);if(n.t=e,!n.__c&&(n.__=[i?i(t):Eo(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],i=n.t(t,e);t!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=Xr,!Xr.u)){var r=function(e,t,i){if(!n.__c.__H)return!0;var r=n.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,i);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&n.__c.props===e)&&(!o||o.call(this,e,t,i))};Xr.u=!0;var o=Xr.shouldComponentUpdate,a=Xr.componentWillUpdate;Xr.componentWillUpdate=function(e,t,i){if(this.__e){var n=o;o=void 0,r(e,t,i),o=n}a&&a.call(this,e,t,i)},Xr.shouldComponentUpdate=r}return n.__N||n.__}(Eo,e)}function ho(e,t){var i=lo(Zr++,3);!vr.__s&&bo(i.__H,t)&&(i.__=e,i.i=t,Xr.__H.__h.push(i))}function fo(e){return to=5,po((function(){return{current:e}}),[])}function po(e,t){var i=lo(Zr++,7);return bo(i.__H,t)?(i.__V=e(),i.i=t,i.__h=e,i.__V):i.__}function Ao(e,t){return to=8,po((function(){return e}),t)}function vo(){for(var e;e=io.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(go),e.__H.__h.forEach(yo),e.__H.__h=[]}catch(t){e.__H.__h=[],vr.__e(t,e.__v)}}vr.__b=function(e){Xr=null,ro&&ro(e)},vr.__r=function(e){oo&&oo(e),Zr=0;var t=(Xr=e.__c).__H;t&&($r===Xr?(t.__h=[],Xr.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=no,e.__N=e.i=void 0}))):(t.__h.forEach(go),t.__h.forEach(yo),t.__h=[])),$r=Xr},vr.diffed=function(e){ao&&ao(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==io.push(t)&&eo===vr.requestAnimationFrame||((eo=vr.requestAnimationFrame)||mo)(vo)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==no&&(e.__=e.__V),e.i=void 0,e.__V=no}))),$r=Xr=null},vr.__c=function(e,t){t.some((function(e){try{e.__h.forEach(go),e.__h=e.__h.filter((function(e){return!e.__||yo(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],vr.__e(i,e.__v)}})),so&&so(e,t)},vr.unmount=function(e){uo&&uo(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.forEach((function(e){try{go(e)}catch(e){t=e}})),i.__H=void 0,t&&vr.__e(t,i.__v))};var _o="function"==typeof requestAnimationFrame;function mo(e){var t,i=function(){clearTimeout(n),_o&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(i,100);_o&&(t=requestAnimationFrame(i))}function go(e){var t=Xr,i=e.__c;"function"==typeof i&&(e.__c=void 0,i()),Xr=t}function yo(e){var t=Xr;e.__c=e.__(),Xr=t}function bo(e,t){return!e||e.length!==t.length||t.some((function(t,i){return t!==e[i]}))}function Eo(e,t){return"function"==typeof t?t(e):t}!function(){try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode("._container_afsrn_1{background-color:rgba(0,0,0,.5);border-radius:.375em;position:relative;color:#fff;font-size:12px;font-family:Arial,Roboto,Noto,sans-serif;box-sizing:border-box;padding:2em .625em .625em;overflow:auto;word-break:break-all;white-space:normal;max-width:500px;max-height:calc(100% - 10px);line-height:1.5;margin:.3125em}._container-h5_afsrn_19{background-color:rgba(0,0,0,.5);border-radius:.375em;position:relative;color:#fff;font-size:12px;font-family:Arial,Roboto,Noto,sans-serif;box-sizing:border-box;padding:2em .625em .625em;overflow:auto;word-break:break-all;white-space:normal;font-size:14px;width:100%;height:100%}._close-btn_afsrn_36{position:absolute;right:0;top:0;cursor:pointer;word-break:keep-all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:.625em}._btn-tip_afsrn_49{background-color:rgba(0,0,0,.5);border-radius:.375em;position:absolute;left:50%;transform:translate(-50%);bottom:2.1875em;white-space:nowrap;padding:.5em}._actions_afsrn_60{display:flex;justify-content:flex-end;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0}._actions_afsrn_60 ._copy-btn_afsrn_69{word-break:keep-all;cursor:pointer;padding:.625em 0 0 .625em}._info-item_afsrn_75{display:flex}._info-item-name_afsrn_79{width:20%;min-width:7.5em;text-align:right;margin-right:.625em;flex-shrink:0}._info-item-value_afsrn_87{flex-grow:1;text-align:left}._item-svg_afsrn_92{display:inline-block;width:60%;height:1em;margin-right:.625em;background:rgba(255,255,255,.2)}._item-value_afsrn_100{display:inline-block}@media (hover: hover){._close-btn_afsrn_36:hover,._copy-btn_afsrn_69:hover{color:#ccc}}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var wo=Object.defineProperty,To=function(e,t,i){return function(e,t,i){t in e?wo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i}(e,"symbol"!=typeof t?t+"":t,i),i};!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();var Ro=Object.defineProperty,So=function(e,t,i){return function(e,t,i){t in e?Ro(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i}(e,"symbol"!=typeof t?t+"":t,i),i},Lo="I18nPlugin",ko=function(e){return e.PLAY_BAR_LEFT="playBarLeft",e.PLAY_BAR_RIGHT="playBarRight",e.CONTEXT_MENU="contextMenu",e}(ko||{}),Io=function(){function e(){So(this,"_callbacks",[])}var t=e.prototype;return t.add=function(e){this._callbacks.push(e)},t.remove=function(e){var t=this._callbacks.findIndex((function(t){return t===e}));t>=0&&this._callbacks.splice(t,1)},t.call=function(e){this._callbacks.forEach((function(t){return t(e)}))},t.destroy=function(){this._callbacks.splice(0,this._callbacks.length)},e}(),xo=function(e){function t(){return e.apply(this,arguments)||this}u()(t,e),t.isInstanceOfPlugin=function(e){return"function"==typeof e.beforeInstall&&"function"==typeof e.afterInstall&&"function"==typeof e.beforeUninstall&&"function"==typeof e.afterUninstall&&"function"==typeof e.getLabel};var i=t.prototype;return i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},i.beforeUninstall=function(e){},i.afterUninstall=function(e){},c()(t,[{key:"controlsSoltBtns",get:function(){}}])}(Mn);So(xo,"label"),So(xo,"version"),So(xo,"isSupported"),So(function(e){function t(){return e.apply(this,arguments)||this}u()(t,e);var i=t.prototype;return i.getLabel=function(){return t.label},i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},t}(xo),"label","ControlsPlugin"),So(function(e){function t(){return e.apply(this,arguments)||this}u()(t,e);var i=t.prototype;return i.getLabel=function(){return t.label},i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},t}(xo),"label",Lo),So(function(e){function t(){return e.apply(this,arguments)||this}u()(t,e);var i=t.prototype;return i.getLabel=function(){return t.label},i.beforeInstall=function(e,t){},i.afterInstall=function(e,t){},i.addBizLog=function(e,t){},i.appendSummaryField=function(e,t){},t}(xo),"label","LoggerPlugin"),So(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(xo),"label","HotkeyPlugin");var Oo=function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(xo);So(Oo,"label","PlayInfoPlugin");var Co=Oo;So(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(xo),"label","RotatePlugin"),So(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(xo),"label","PreviewPlugin"),So(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(xo),"label","MaskPlugin"),So(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(xo),"label","VRPlugin"),So(function(e){function t(){return e.apply(this,arguments)||this}return u()(t,e),t.prototype.getLabel=function(){return t.label},t}(xo),"label","DanmakuPlugin");var Do=function(e){return e.ERROR="error",e.MANIFEST_PARSED="manifestparsed",e.LEVEL_SWITCHING="levelswitching",e.LEVEL_SWITCHED="levelswitched",e.LEVEL_SWITCH_PLAYING="levelswitchplaying",e.LEVEL_SWITCH_FAILED="levelswitchfailed",e.LEVEL_UPDATED="levelupdated",e.AUDIO_TRACKS_SWITCHING="audiotrackswitching",e.AUDIO_TRACKS_SWITCHED="audiotrackswitched",e.LOADSTART="loadstart",e.PROGRESS="progress",e.SUSPEND="suspend",e.ABORT="abort",e.EMPTIED="emptied",e.STALLED="stalled",e.LOADEDMETADATA="loadedmetadata",e.LOADEDDATA="loadeddata",e.CANPLAY="canplay",e.CANPLAYTHROUGH="canplaythrough",e.PLAYING="playing",e.WAITING="waiting",e.SEEKING="seeking",e.SEEKED="seeked",e.ENDED="ended",e.DURATIONCHANGE="durationchange",e.TIMEUPDATE="timeupdate",e.PLAY="play",e.PAUSE="pause",e.RATECHANGE="ratechange",e.RESIZE="resize",e.VOLUMECHANGE="volumechange",e.ENTER_PICTURE_IN_PICTURE="enterpictureinpicture",e.LEAVE_PICTURE_IN_PICTURE="leavepictureinpicture",e.REPORT="report",e.VIDEO_RENDERER_CHANGE="videorendererchange",e.FULLSCREEN_CHANGE="fullscreenchange",e.ATTRIBUTE_CHANGE="attribute:change",e.INTERACTION="interaction",e.LIVE_SHIFT_CHANGE="liveshiftchange",e.LIVE_SHIFT_TYPE_CHANGE="liveshifttypechange",e.OBJECT_FIT_CHANGE="objectfitchange",e.ATTRIBUTE_CHANGE_CONFIG="attribute:change:config",e.ATTRIBUTE_CHANGE_SRC="attribute:change:src",e.ATTRIBUTE_CHANGE_VIDEO_ID="attribute:change:videoid",e.ATTRIBUTE_CHANGE_PREVIEW_URL="attribute:change:previewurl",e.ATTRIBUTE_CHANGE_MASK_URL="attribute:change:maskurl",e.ATTRIBUTE_CHANGE_CROSS_ORIGIN="attribute:change:crossorigin",e.ATTRIBUTE_CHANGE_PRELOAD="attribute:change:preload",e.ATTRIBUTE_CHANGE_CURRENT_TIME="attribute:change:currenttime",e.ATTRIBUTE_CHANGE_DEFAULT_PLAYBACK_RATE="attribute:change:defaultplaybackrate",e.ATTRIBUTE_CHANGE_PLAYBACK_RATE="attribute:change:playbackrate",e.ATTRIBUTE_CHANGE_AUTOPLAY="attribute:change:autoplay",e.ATTRIBUTE_CHANGE_LOOP="attribute:change:loop",e.ATTRIBUTE_CHANGE_CONTROLS="attribute:change:controls",e.ATTRIBUTE_CHANGE_VOLUME="attribute:change:volume",e.ATTRIBUTE_CHANGE_MUTED="attribute:change:muted",e.ATTRIBUTE_CHANGE_DEFAULT_MUTED="attribute:change:defaultmuted",e.ATTRIBUTE_CHANGE_POSTER="attribute:change:poster",e.ATTRIBUTE_CHANGE_DISABLE_PICTURE_IN_PICTURE="attribute:change:disablepictureinpicture",e.ATTRIBUTE_CHANGE_PLAYSINLINE="attribute:change:playsinline",e.ATTRIBUTE_CHANGE_DISABLE_ADAPTIVE="attribute:change:disableadaptive",e.ATTRIBUTE_CHANGE_DISABLE_DOWNLOAD="attribute:change:disabledownload",e.ATTRIBUTE_CHANGE_DISABLE_MASK="attribute:change:disablemask",e.ATTRIBUTE_CHANGE_DISABLE_HOTKEY="attribute:change:disablehotkey",e.ATTRIBUTE_CHANGE_DISABLE_DANMAKU="attribute:change:disabledanmaku",e.ATTRIBUTE_CHANGE_DANMAKU_RENDERING="attribute:change:danmakurendering",e.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS="attribute:change:danmakucontrolspos",e.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS_FULLSCREEN="attribute:change:danmakucontrolsposfullscreen",e.ATTRIBUTE_CHANGE_CURRENT_LEVEL="attribute:change:currentlevel",e.ATTRIBUTE_CHANGE_NEXT_LEVEL="attribute:change:nextlevel",e.ATTRIBUTE_CHANGE_CURRENT_FRAME="attribute:change:currentframe",e.ATTRIBUTE_CHANGE_AUDIO_TRACK="attribute:change:audiotrack",e.ATTRIBUTE_CHANGE_PREFETCH="attribute:change:prefetch",e.ATTRIBUTE_CHANGE_SHOW_PROGRESS="attribute:change:showprogress",e.ATTRIBUTE_CHANGE_SHOW_TIME="attribute:change:showtime",e.ATTRIBUTE_CHANGE_SHOW_NEXT="attribute:change:shownext",e.ATTRIBUTE_CHANGE_SHOW_PREV="attribute:change:showprev",e.ATTRIBUTE_CHANGE_BIZ_DATA="attribute:change:bizdata",e.ATTRIBUTE_CHANGE_LIVE_TIME="attribute:change:livetime",e.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL="attribute:change:showinfopanel",e.CLICK_NEXT="clicknext",e.CLICK_LOGIN="clicklogin",e.CLICK_REGISTER="clickregister",e.CLICK_VIP="clickvip",e}(Do||{}),Mo=function(e,t){var i={__c:t="__cC"+Er++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var i,n;return this.getChildContext||(i=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&i.some((function(e){e.__e=!0,Dr(e)}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}),e.children}};return i.Provider.__=i.Consumer.contextType=i}(void 0),No="kwai_player_ll_enabled",Po=function(e){var t=e.children,i=e.player,n=i.logger,r=new ai,o=ai.isSupported()&&!Cn,a=i.packVersion+"("+i.version+")",s=new Sn,u=co(!1),l=u[0],c=u[1],d=function(e,t){if(void 0===t&&(t=!1),(e=e&&o)?(h(),i.outputLogger=r.getLoggerForAdd()):i.outputLogger=void 0,c(e),t)try{s.write(No,e?"1":"0")}catch(e){}},h=function(){try{localStorage.setItem("kwai-kernel-log",JSON.stringify({value:"i",time:Date.now()})),localStorage.setItem("kwai-player-log",JSON.stringify({value:"i",time:Date.now()}))}catch(e){}};try{var f="1"==s.read(No)&&o;c(f),f&&d(f)}catch(f){}return ho((function(){return function(){n.i("play-info-context","destroy"),r.destroy()}}),[]),Qr(Mo.Provider,{value:{player:i,playerVersion:a,localLogSwitch:l,localLogEnabled:o,toggleLocalLog:function(){d(!l,!0)},downloadLocalLog:function(){r.downloadLog()}},children:t})},Uo={container:"_container_afsrn_1","container-h5":"_container-h5_afsrn_19","close-btn":"_close-btn_afsrn_36","btn-tip":"_btn-tip_afsrn_49",actions:"_actions_afsrn_60","copy-btn":"_copy-btn_afsrn_69","info-item":"_info-item_afsrn_75","info-item-name":"_info-item-name_afsrn_79","info-item-value":"_info-item-value_afsrn_87","item-svg":"_item-svg_afsrn_92","item-value":"_item-value_afsrn_100"};function Fo(e){var t=e.title,i=e.value;return Qr("div",{className:Uo["info-item"],children:[Qr("div",{className:Uo["info-item-name"],children:[t,":"]}),Qr("div",{className:Uo["info-item-value"],children:i})]})}function Bo(e){var t=e.dataArray,i=fo(null),n=co(""),r=n[0],o=n[1];return ho((function(){if(null!=i&&i.current){for(var e=i.current.getBoundingClientRect(),n=e.width,r=e.height,a=Math.max.apply(Math,t)||1,s=r-2,u=n/t.length,l="M0 "+(s*(a-t[0])/a+1),c=1;c<t.length;c++)l+=" L"+c*u+" "+(s*(a-t[c])/a+1);o(l)}}),[t]),Qr("svg",{ref:i,height:"100%",width:"100%",style:"display:block",children:Qr("path",{fill:"none",stroke:"#fff",strokeWidth:"1",d:r})})}function Ho(e){var t=e.title,i=e.suffix,n=e.value,r=co(0),o=r[0],a=r[1];return ho((function(){a(n[n.length-1]||0)}),[n]),Qr("div",{className:Uo["info-item"],children:[Qr("div",{className:Uo["info-item-name"],children:[t,":"]}),Qr("div",{className:Uo["info-item-value"],children:[Qr("div",{className:Uo["item-svg"],children:Qr(Bo,{dataArray:n})}),Qr("div",{className:Uo["item-value"],children:i(o)})]})]})}function Vo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Go=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,i=[],n=0;n<e.rangeCount;n++)i.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||i.forEach((function(t){e.addRange(t)})),t&&t.focus()}},jo={"text/plain":"Text","text/html":"Url",default:"Text"};var Wo=Vo((function(e,t){var i,n,r,o,a,s,u=!1;t||(t={}),i=t.debug||!1;try{if(r=Go(),o=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),typeof n.clipboardData>"u"){i&&console.warn("unable to use e.clipboardData"),i&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=jo[t.format]||jo.default;window.clipboardData.setData(r,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))})),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){i&&console.error("unable to copy using execCommand: ",r),i&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){i&&console.error("unable to copy using clipboardData: ",r),i&&console.error("falling back to prompt"),n=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(n,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),r()}return u}));function Ko(e){var t=function(e){var t=Xr.context[e.__c],i=lo(Zr++,9);return i.c=e,t?(null==i.__&&(i.__=!0,t.sub(Xr)),t.props.value):e.__}(Mo);if(!t)return Qr(Ir,{});var i=t.player,n=t.playerVersion,r=t.localLogEnabled,o=t.localLogSwitch,a=t.toggleLocalLog,s=t.downloadLocalLog,u=e.onChangeShowEventLog,l=Tn,c=co(""),d=c[0],h=c[1],f=co(""),p=f[0],A=f[1],v=co(""),_=v[0],m=v[1],g=co(""),y=g[0],b=g[1],E=co(""),w=E[0],T=E[1],R=co(""),S=R[0],L=R[1],k=co(0),I=k[0],x=k[1],O=co(""),C=O[0],D=O[1],M=co(""),N=M[0],P=M[1],U=co([]),F=U[0],B=U[1],H=co([]),V=H[0],G=H[1],j=co([]),W=j[0],K=j[1],z=co([]),J=z[0],q=z[1],Y=co((new Date).toString()),Q=Y[0],Z=Y[1],X=fo(void 0);!function(e,t){var i=lo(Zr++,4);!vr.__s&&bo(i.__H,t)&&(i.__=e,i.i=t,Xr.__h.push(i))}((function(){var e=function(){A(""),m(""),b(""),T(""),L(""),x(0),D(""),J.splice(0,V.length),V.splice(0,V.length),W.splice(0,W.length),F.splice(0,F.length)},t=function(){h(i.kernelType||"")},n=function(e){if(e&&"mediaInfo"===e.type){X.current=e.value,h(i.kernelType||""),A(e.value.streamHost||""),m(e.value.colorSpace||""),D(e.value.sid||""),P(e.value.gpu||"");var t=[];e.value.coreType&&t.push(e.value.coreType),e.value.box&&(e.value.enhancedFlv?t.push("enhanced-flv"):t.push(e.value.box)),e.value.videoCodecType&&t.push(e.value.videoCodecType),e.value.videoDecoder&&t.push(e.value.videoDecoder),e.value.width&&e.value.height&&t.push(e.value.width+"x"+e.value.height),e.value.sar&&t.push("[SAR "+e.value.sar.width+":"+e.value.sar.height+"]"),e.value.fps&&t.push("@"+e.value.fps.toFixed(2)),b(t.join(" "));var n=[];e.value.videoCodec&&n.push(e.value.videoCodec),e.value.audioCodec&&n.push(e.value.audioCodec),T(n.join(","))}e&&"heartbeat"===e.type&&(e.value.decodedFrames&&L((e.value.decodedFPS||0)+"/"+(e.value.droppedFPS||0)+" "+(e.value.decodedFrames||0)+"/"+(e.value.droppedFrames||0)),"number"==typeof e.value.totalReceive&&x(e.value.totalReceive),ae(e.value.videoBuffered||0,V,G),ae(e.value.audioBuffered||0,W,K),!V.length&&!W.length&&ae(e.value.buffered||0,J,q),ae(e.value.speed||0,F,B),Z((new Date).toString()))};return i.on(Do.ATTRIBUTE_CHANGE_SRC,e),i.on(Do.REPORT,n),i.on(Do.LOADEDMETADATA,t),function(){i.off(Do.ATTRIBUTE_CHANGE_SRC,e),i.off(Do.REPORT,n),i.off(Do.LOADEDMETADATA,t),oe.current&&clearTimeout(oe.current)}}),[]);var $=co(""),ee=$[0],te=$[1],ie=co(!1),ne=ie[0],re=ie[1],oe=fo(0),ae=Ao((function(e,t,i){"number"==typeof e&&!isNaN(e)&&(t.push(e),t.length>100?t.shift():1===t.length&&(t.unshift.apply(t,new Array(99)),t.forEach((function(e,i){"number"!=typeof e&&(t[i]=0)}))),i([].concat(t)))}),[]),se=Ao((function(){i.logger.i("info-panel","click copy");var e={date:Q};l&&(e.did=l),n&&(e.playerVersion=n),C&&(e.sessionId=C),p&&(e.streamHost=p),_&&(e.colorSpace=_),y&&(e.res=y),w&&(e.codec=w),N&&(e.gpu=N),V.length&&(e.vBuffer=V[V.length-1]),W.length&&(e.aBuffer=W[W.length-1]),J.length&&(e.buffer=J[J.length-1]),F.length&&(e.speed=F[F.length-1]),X.current&&(e.mediainfo=X.current),e.userAgent=navigator.userAgent,e.summary=i.audienceStat;var t=Wo(JSON.stringify(e));te(t?"已复制":"复制失败"),re(!0),oe.current&&clearTimeout(oe.current),oe.current=+setTimeout((function(){re(!1),oe.current=0}),1e3)}),[]),ue=Ao((function(e){return e>1e9?(e/1e9).toFixed(2)+" GB":e>1e6?(e/1e6).toFixed(2)+" MB":(e/1e3).toFixed(2)+" KB"}),[]),le=Ao((function(e){return e>1e7?(e/1e6).toFixed(2)+" MB/s":(e/1e3).toFixed(2)+" KB/s"}),[]),ce=Ao((function(e){return e>1e3?(e/1e3).toFixed(2)+" s":e+" ms"}),[]),de=Ao((function(e){e.stopPropagation()}),[]);return Qr("div",{className:Cn?Uo["container-h5"]:Uo.container,onContextMenu:de,children:[l&&Qr(Fo,{title:"DeviceId",value:l}),n&&Qr(Fo,{title:"PlayerVersion",value:n}),d&&Qr(Fo,{title:"kernel",value:d}),C&&Qr(Fo,{title:"SessionId",value:C}),p&&Qr(Fo,{title:"StreamHost",value:p}),y&&Qr(Fo,{title:"Res",value:y}),_&&Qr(Fo,{title:"Color",value:_}),w&&Qr(Fo,{title:"Codec",value:w}),S&&Qr(Fo,{title:"Frames",value:S}),!!J.length&&Qr(Ho,{title:"Buffered",value:J,suffix:ce}),!!V.length&&Qr(Ho,{title:"VideoBuffered",value:V,suffix:ce}),!!W.length&&Qr(Ho,{title:"AudioBuffered",value:W,suffix:ce}),!!F.length&&Qr(Ho,{title:"Speed",value:F,suffix:le}),I>0&&Qr(Fo,{title:"TotalReceive",value:ue(I)}),N&&Qr(Fo,{title:"GPU",value:N}),Qr(Fo,{title:"Date",value:Q}),Qr("div",{className:[Cn?Uo["h5-btn"]:"",Uo["close-btn"]].join(" "),onClick:u,children:"[X]"}),Qr("div",{className:Uo.actions,children:[o&&Qr("div",{className:[Cn?Uo["h5-btn"]:"",Uo["copy-btn"]].join(" "),onClick:s,children:"[Download Log]"}),r&&Qr("div",{className:[Cn?Uo["h5-btn"]:"",Uo["copy-btn"]].join(" "),onClick:a,children:["[Log ",o?"on":"off","]"]}),Qr("div",{className:[Cn?Uo["h5-btn"]:"",Uo["copy-btn"]].join(" "),onClick:se,children:[ne&&Qr("div",{className:Uo["btn-tip"],children:ee}),Qr("div",{children:"[Copy]"})]})]})]})}var zo="play-info-plugin",Jo=function(e){function t(){var t;return t=e.apply(this,arguments)||this,To(r()(t),"_player"),To(r()(t),"_i18n"),To(r()(t),"_callback",new Io),To(r()(t),"_option",{showInPlayBar:!1,showInContextMenu:!0,svgRaw:'<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>'}),To(r()(t),"_container"),To(r()(t),"_onChangeShowEventLog",(function(){t._container&&(t.isShow=!t.isShow)})),To(r()(t),"_onShowInfoPanelChange",(function(){var e;t.isShow=!(null==(e=t._player)||!e.showInfoPanel)})),t}u()(t,e);var i=t.prototype;return i.beforeInstall=function(e,t){t&&(!0===t.showInPlayBar&&(this._option.showInPlayBar=!0),!1===t.showInContextMenu&&(this._option.showInContextMenu=!1),t.svgRaw&&(this._option.svgRaw=t.svgRaw)),this._i18n=e.getPluginInstance(Lo)},i.afterInstall=function(e,t){if(this._player=e,this._player){this._container||(this._container=this._player.createSubContainer(),this._container.style.display="none",this._container.style.position="absolute",this._container.style.maxHeight="100%",this._container.style.overflowY="auto",this._container.style.top="0",this._container.style.left="0",Cn&&(this._container.style.width="100%"));var i=e.logger;if(qr(Qr(Po,{player:e,children:Qr(Ko,{onChangeShowEventLog:this._onChangeShowEventLog})}),this._container),"boolean"==typeof e.showInfoPanel)this.isShow=e.showInfoPanel,i.i(zo,"set show by player: "+e.showInfoPanel);else{var n="kwai-player-web-play-info";"string"==typeof(null==t?void 0:t.keyInUrl)&&(n=null==t?void 0:t.keyInUrl),location.href.indexOf(n)>=0&&(this.isShow=!0,i.i(zo,"set show by url: true"))}e.on(Do.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL,this._onShowInfoPanelChange)}},i.beforeUninstall=function(e){this._callback.destroy()},i.afterUninstall=function(e){this._container&&(qr(null,this._container),e.removeSubContainer(this._container)),this._player=void 0,e.off(Do.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL,this._onShowInfoPanelChange),this.removeAllListeners()},i.getLabel=function(){return t.label},i._text=function(e){var i;return(null==(i=this._i18n)?void 0:i.text(t.label,e))||"视频信息"},c()(t,[{key:"isShow",get:function(){var e;return"block"===(null==(e=this._container)?void 0:e.style.display)},set:function(e){this._container&&(this._container.style.display=e?"block":"none",this.emit(Do.ATTRIBUTE_CHANGE),this._callback.call(e))}},{key:"dom",get:function(){return this._container}},{key:"controlsSoltBtns",get:function(){var e=this,t=[];if(this._option.showInContextMenu){var i={role:"play-info-context-menu",slotPos:ko.CONTEXT_MENU,getChecked:function(){return e.isShow},getText:function(){return e._text("playInfo")},svgRaw:this._option.svgRaw,onClick:function(){return e.isShow=!e.isShow},callback:this._callback};t.push(i)}if(this._option.showInPlayBar&&!Cn){var n={role:"play-info-btn",slotPos:ko.PLAY_BAR_RIGHT,getTips:function(){return e._text("playInfo")},svgRaw:this._option.svgRaw,onClick:function(){return e.isShow=!e.isShow},callback:this._callback};t.push(n)}return t}}])}(Co);To(Jo,"version","1.1.0-alpha.0");var qo=Jo;qt.register(pr),qt.register(qo),qt.packVersion="1.1.19.vue2-mini"},function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t,n)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}])}));