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

94 lines
810 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[4339],{98280:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return ot}});function Z(U){"@babel/helpers - typeof";return Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},Z(U)}function J(U,W){if(Z(U)!="object"||!U)return U;var B=U[Symbol.toPrimitive];if(B!==void 0){var X=B.call(U,W||"default");if(Z(X)!="object")return X;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(U)}function V(U){var W=J(U,"string");return Z(W)=="symbol"?W:W+""}function N(U,W,B){return(W=V(W))in U?Object.defineProperty(U,W,{value:B,enumerable:!0,configurable:!0,writable:!0}):U[W]=B,U}function L(U,W){var B=Object.keys(U);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(U);W&&(X=X.filter(function(ae){return Object.getOwnPropertyDescriptor(U,ae).enumerable})),B.push.apply(B,X)}return B}function C(U){for(var W=1;W<arguments.length;W++){var B=arguments[W]!=null?arguments[W]:{};W%2?L(Object(B),!0).forEach(function(X){N(U,X,B[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(B)):L(Object(B)).forEach(function(X){Object.defineProperty(U,X,Object.getOwnPropertyDescriptor(B,X))})}return U}function P(U){if(Array.isArray(U))return U}function M(U,W){var B=U==null?null:typeof Symbol!="undefined"&&U[Symbol.iterator]||U["@@iterator"];if(B!=null){var X,ae,me,Te,Me=[],Ie=!0,ke=!1;try{if(me=(B=B.call(U)).next,W===0){if(Object(B)!==B)return;Ie=!1}else for(;!(Ie=(X=me.call(B)).done)&&(Me.push(X.value),Me.length!==W);Ie=!0);}catch(at){ke=!0,ae=at}finally{try{if(!Ie&&B.return!=null&&(Te=B.return(),Object(Te)!==Te))return}finally{if(ke)throw ae}}return Me}}function e(U,W){(W==null||W>U.length)&&(W=U.length);for(var B=0,X=Array(W);B<W;B++)X[B]=U[B];return X}function I(U,W){if(U){if(typeof U=="string")return e(U,W);var B={}.toString.call(U).slice(8,-1);return B==="Object"&&U.constructor&&(B=U.constructor.name),B==="Map"||B==="Set"?Array.from(U):B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B)?e(U,W):void 0}}function A(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(U,W){return P(U)||M(U,W)||I(U,W)||A()}function g(U,W){if(U==null)return{};var B={};for(var X in U)if({}.hasOwnProperty.call(U,X)){if(W.indexOf(X)!==-1)continue;B[X]=U[X]}return B}function h(U,W){if(U==null)return{};var B,X,ae=g(U,W);if(Object.getOwnPropertySymbols){var me=Object.getOwnPropertySymbols(U);for(X=0;X<me.length;X++)B=me[X],W.indexOf(B)===-1&&{}.propertyIsEnumerable.call(U,B)&&(ae[B]=U[B])}return ae}function p(U){if(Array.isArray(U))return U}function u(U,W){var B=U==null?null:typeof Symbol!="undefined"&&U[Symbol.iterator]||U["@@iterator"];if(B!=null){var X,ae,me,Te,Me=[],Ie=!0,ke=!1;try{if(me=(B=B.call(U)).next,W===0){if(Object(B)!==B)return;Ie=!1}else for(;!(Ie=(X=me.call(B)).done)&&(Me.push(X.value),Me.length!==W);Ie=!0);}catch(at){ke=!0,ae=at}finally{try{if(!Ie&&B.return!=null&&(Te=B.return(),Object(Te)!==Te))return}finally{if(ke)throw ae}}return Me}}function v(U,W){(W==null||W>U.length)&&(W=U.length);for(var B=0,X=new Array(W);B<W;B++)X[B]=U[B];return X}function m(U,W){if(U){if(typeof U=="string")return v(U,W);var B=Object.prototype.toString.call(U).slice(8,-1);if(B==="Object"&&U.constructor&&(B=U.constructor.name),B==="Map"||B==="Set")return Array.from(U);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return v(U,W)}}function o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(U,W){return p(U)||u(U,W)||m(U,W)||o()}var i=K(67294),s=K.t(i,2),E=K(73935);function b(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var d={};function T(U,W){}function R(U,W){}function S(){d={}}function w(U,W,B){!W&&!d[B]&&(U(!1,B),d[B]=!0)}function r(U,W){w(T,U,W)}function n(U,W){w(R,U,W)}var t=null;function l(U){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},l(U)}var x=K(81640);function y(U,W,B){var X=i.useRef({});return(!("value"in X.current)||B(X.current.condition,W))&&(X.current.value=U(),X.current.condition=W),X.current.value}function c(U,W){typeof U=="function"?U(W):l(U)==="object"&&U&&"current"in U&&(U.current=W)}function _(){for(var U=arguments.length,W=new Array(U),B=0;B<U;B++)W[B]=arguments[B];var X=W.filter(function(ae){return ae});return X.length<=1?X[0]:function(ae){W.forEach(function(me){c(me,ae)})}}function D(){for(var U=arguments.length,W=new Array(U),B=0;B<U;B++)W[B]=arguments[B];return y(function(){return _.apply(void 0,W)},W,function(X,ae){return X.length===ae.length&&X.every(function(me,Te){return me===ae[Te]})})}function O(U){var W,B,X=(0,x.isMemo)(U)?U.type.type:U.type;return!(typeof X=="function"&&!((W=X.prototype)!==null&&W!==void 0&&W.render)||typeof U=="function"&&!((B=U.prototype)!==null&&B!==void 0&&B.render))}var k=i.createContext(null),F=k;function G(U){if(Array.isArray(U))return v(U)}function H(U){if(typeof Symbol!="undefined"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}function j(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q(U){return G(U)||H(U)||m(U)||j()}var ee=b()?i.useLayoutEffect:i.useEffect,ie=ee,se=function(W,B){var X=React.useRef(!0);ee(function(){if(!X.current)return W()},B),ee(function(){return X.current=!1,function(){X.current=!0}},[])},le=[];function xe(U,W){var B=i.useState(function(){if(!b())return null;var mt=document.createElement("div");return mt}),X=a(B,1),ae=X[0],me=i.useRef(!1),Te=i.useContext(F),Me=i.useState(le),Ie=a(Me,2),ke=Ie[0],at=Ie[1],st=Te||(me.current?void 0:function(mt){at(function(kt){var Dt=[mt].concat(Q(kt));return Dt})});function dt(){ae.parentElement||document.body.appendChild(ae),me.current=!0}function nt(){var mt;(mt=ae.parentElement)===null||mt===void 0||mt.removeChild(ae),me.current=!1}return ie(function(){return U?Te?Te(dt):dt():nt(),nt},[U]),ie(function(){ke.length&&(ke.forEach(function(mt){return mt()}),at(le))},[ke]),[ae,st]}function Re(U,W){if(!U)return!1;if(U.contains)return U.contains(W);for(var B=W;B;){if(B===U)return!0;B=B.parentNode}return!1}var Ee="data-rc-order",he="rc-util-key",be=new Map;function Ce(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},W=U.mark;return W?W.startsWith("data-")?W:"data-".concat(W):he}function Ue(U){if(U.attachTo)return U.attachTo;var W=document.querySelector("head");return W||document.body}function $e(U){return U==="queue"?"prependQueue":U?"prepend":"append"}function z(U){return Array.from((be.get(U)||U).children).filter(function(W){return W.tagName==="STYLE"})}function ne(U){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!b())return null;var B=W.csp,X=W.prepend,ae=document.createElement("style");ae.setAttribute(Ee,$e(X)),B!=null&&B.nonce&&(ae.nonce=B==null?void 0:B.nonce),ae.innerHTML=U;var me=Ue(W),Te=me.firstChild;if(X){if(X==="queue"){var Me=z(me).filter(function(Ie){return["prepend","prependQueue"].includes(Ie.getAttribute(Ee))});if(Me.length)return me.insertBefore(ae,Me[Me.length-1].nextSibling),ae}me.insertBefore(ae,Te)}else me.appendChild(ae);return ae}function de(U){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=Ue(W);return z(B).find(function(X){return X.getAttribute(Ce(W))===U})}function ge(U){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=de(U,W);if(B){var X=Ue(W);X.removeChild(B)}}function Ae(U,W){var B=be.get(U);if(!B||!Re(document,B)){var X=ne("",W),ae=X.parentNode;be.set(U,ae),U.removeChild(X)}}function Ve(){be.clear()}function xt(U,W){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},X=Ue(B);Ae(X,B);var ae=de(W,B);if(ae){var me,Te;if((me=B.csp)!==null&&me!==void 0&&me.nonce&&ae.nonce!==((Te=B.csp)===null||Te===void 0?void 0:Te.nonce)){var Me;ae.nonce=(Me=B.csp)===null||Me===void 0?void 0:Me.nonce}return ae.innerHTML!==U&&(ae.innerHTML=U),ae}var Ie=ne(U,B);return Ie.setAttribute(Ce(B),W),Ie}var Je;function pt(U){if(typeof document=="undefined")return 0;if(U||Je===void 0){var W=document.createElement("div");W.style.width="100%",W.style.height="200px";var B=document.createElement("div"),X=B.style;X.position="absolute",X.top="0",X.left="0",X.pointerEvents="none",X.visibility="hidden",X.width="200px",X.height="150px",X.overflow="hidden",B.appendChild(W),document.body.appendChild(B);var ae=W.offsetWidth;B.style.overflow="scroll";var me=W.offsetWidth;ae===me&&(me=B.clientWidth),document.body.removeChild(B),Je=ae-me}return Je}function St(U){var W=U.match(/^(.*)px$/),B=Number(W==null?void 0:W[1]);return Number.isNaN(B)?pt():B}function er(U){if(typeof document=="undefined"||!U||!(U instanceof Element))return{width:0,height:0};var W=getComputedStyle(U,"::-webkit-scrollbar"),B=W.width,X=W.height;return{width:St(B),height:St(X)}}function Ne(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Fe="rc-util-locker-".concat(Date.now()),We=0;function Be(U){var W=!!U,B=i.useState(function(){return We+=1,"".concat(Fe,"_").concat(We)}),X=a(B,1),ae=X[0];ie(function(){if(W){var me=er(document.body).width,Te=Ne();xt(`
html body {
overflow-y: hidden;
`.concat(Te?"width: calc(100% - ".concat(me,"px);"):"",`
}`),ae)}else ge(ae);return function(){ge(ae)}},[W,ae])}var _e=!1;function ht(U){return typeof U=="boolean"&&(_e=U),_e}var Ze=function(W){return W===!1?!1:!b()||!W?null:typeof W=="string"?document.querySelector(W):typeof W=="function"?W():W},At=i.forwardRef(function(U,W){var B=U.open,X=U.autoLock,ae=U.getContainer,me=U.debug,Te=U.autoDestroy,Me=Te===void 0?!0:Te,Ie=U.children,ke=i.useState(B),at=a(ke,2),st=at[0],dt=at[1],nt=st||B;i.useEffect(function(){(Me||B)&&dt(B)},[B,Me]);var mt=i.useState(function(){return Ze(ae)}),kt=a(mt,2),Dt=kt[0],Bt=kt[1];i.useEffect(function(){var Tr=Ze(ae);Bt(Tr!=null?Tr:null)});var Nt=xe(nt&&!Dt,me),Mt=a(Nt,2),Qt=Mt[0],Ot=Mt[1],ft=Dt!=null?Dt:Qt;Be(X&&B&&b()&&(ft===Qt||ft===document.body));var Xt=null;if(Ie&&O(Ie)&&W){var Ht=Ie;Xt=Ht.ref}var nr=D(Xt,W);if(!nt||!b()||Dt===void 0)return null;var Fr=ft===!1||ht(),br=Ie;return W&&(br=i.cloneElement(Ie,{ref:nr})),i.createElement(F.Provider,{value:Ot},Fr?br:(0,E.createPortal)(br,ft))}),yt=At,tt=yt,bt=K(94184),Ye=K.n(bt),je=K(48555);function it(U){return U instanceof HTMLElement||U instanceof SVGElement}function Vt(U){return U&&_typeof(U)==="object"&&it(U.nativeElement)?U.nativeElement:it(U)?U:null}function tr(U){var W=Vt(U);if(W)return W;if(U instanceof React.Component){var B;return(B=ReactDOM.findDOMNode)===null||B===void 0?void 0:B.call(ReactDOM,U)}return null}function or(U){var W;return U==null||(W=U.getRootNode)===null||W===void 0?void 0:W.call(U)}function Dr(U){return or(U)instanceof ShadowRoot}function Yr(U){return Dr(U)?or(U):null}function ur(U){var W=i.useRef();W.current=U;var B=i.useCallback(function(){for(var X,ae=arguments.length,me=new Array(ae),Te=0;Te<ae;Te++)me[Te]=arguments[Te];return(X=W.current)===null||X===void 0?void 0:X.call.apply(X,[W].concat(me))},[]);return B}function qr(U){if(Array.isArray(U))return U}function cr(U,W){var B=U==null?null:typeof Symbol!="undefined"&&U[Symbol.iterator]||U["@@iterator"];if(B!=null){var X,ae,me,Te,Me=[],Ie=!0,ke=!1;try{if(me=(B=B.call(U)).next,W===0){if(Object(B)!==B)return;Ie=!1}else for(;!(Ie=(X=me.call(B)).done)&&(Me.push(X.value),Me.length!==W);Ie=!0);}catch(at){ke=!0,ae=at}finally{try{if(!Ie&&B.return!=null&&(Te=B.return(),Object(Te)!==Te))return}finally{if(ke)throw ae}}return Me}}function Hr(U,W){(W==null||W>U.length)&&(W=U.length);for(var B=0,X=new Array(W);B<W;B++)X[B]=U[B];return X}function mn(U,W){if(U){if(typeof U=="string")return Hr(U,W);var B=Object.prototype.toString.call(U).slice(8,-1);if(B==="Object"&&U.constructor&&(B=U.constructor.name),B==="Map"||B==="Set")return Array.from(U);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return Hr(U,W)}}function En(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tn(U,W){return qr(U)||cr(U,W)||mn(U,W)||En()}function Cr(U){"@babel/helpers - typeof";return Cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},Cr(U)}function Ke(U,W){if(Cr(U)!=="object"||U===null)return U;var B=U[Symbol.toPrimitive];if(B!==void 0){var X=B.call(U,W||"default");if(Cr(X)!=="object")return X;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(U)}function Kr(U){var W=Ke(U,"string");return Cr(W)==="symbol"?W:String(W)}function _n(U,W,B){return W=Kr(W),W in U?Object.defineProperty(U,W,{value:B,enumerable:!0,configurable:!0,writable:!0}):U[W]=B,U}function Vr(U,W){var B=Object.keys(U);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(U);W&&(X=X.filter(function(ae){return Object.getOwnPropertyDescriptor(U,ae).enumerable})),B.push.apply(B,X)}return B}function Wr(U){for(var W=1;W<arguments.length;W++){var B=arguments[W]!=null?arguments[W]:{};W%2?Vr(Object(B),!0).forEach(function(X){_n(U,X,B[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(B)):Vr(Object(B)).forEach(function(X){Object.defineProperty(U,X,Object.getOwnPropertyDescriptor(B,X))})}return U}function xn(){var U=Wr({},s);return U.useId}var In=0;function On(){}var Wn=xn(),oi=Wn?function(W){var B=Wn();return W||B}:function(W){var B=i.useState("ssr-id"),X=Tn(B,2),ae=X[0],me=X[1];return i.useEffect(function(){var Te=In;In+=1,me("rc_unique_".concat(Te))},[]),W||ae};function zn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Mn=zn()?i.useLayoutEffect:i.useEffect,Cn=function(W,B){var X=i.useRef(!0);Mn(function(){return W(X.current)},B),Mn(function(){return X.current=!1,function(){X.current=!0}},[])},ui=function(W,B){Cn(function(X){if(!X)return W()},B)},on=Cn,li=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var U=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(U)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(U==null?void 0:U.substr(0,4))};function Yn(){return Yn=Object.assign?Object.assign.bind():function(U){for(var W=1;W<arguments.length;W++){var B=arguments[W];for(var X in B)({}).hasOwnProperty.call(B,X)&&(U[X]=B[X])}return U},Yn.apply(null,arguments)}var Gn=K(62874),An=K(52481);function _i(U,W,B){var X=i.useRef({});return(!("value"in X.current)||B(X.current.condition,W))&&(X.current.value=U(),X.current.condition=W),X.current.value}var fi=Symbol.for("react.element"),ii=Symbol.for("react.transitional.element"),kn=Symbol.for("react.fragment");function yi(U){return U&&Cr(U)==="object"&&(U.$$typeof===fi||U.$$typeof===ii)&&U.type===kn}var wn=Number(i.version.split(".")[0]),Qn=function(W,B){typeof W=="function"?W(B):Cr(W)==="object"&&W&&"current"in W&&(W.current=B)},yr=function(){for(var W=arguments.length,B=new Array(W),X=0;X<W;X++)B[X]=arguments[X];var ae=B.filter(Boolean);return ae.length<=1?ae[0]:function(me){B.forEach(function(Te){Qn(Te,me)})}},hr=function(){for(var W=arguments.length,B=new Array(W),X=0;X<W;X++)B[X]=arguments[X];return _i(function(){return yr.apply(void 0,B)},B,function(ae,me){return ae.length!==me.length||ae.every(function(Te,Me){return Te!==me[Me]})})},kr=function(W){var B,X;if(!W)return!1;if(Nn(W)&&wn>=19)return!0;var ae=(0,An.isMemo)(W)?W.type.type:W.type;return!(typeof ae=="function"&&!((B=ae.prototype)!==null&&B!==void 0&&B.render)&&ae.$$typeof!==An.ForwardRef||typeof W=="function"&&!((X=W.prototype)!==null&&X!==void 0&&X.render)&&W.$$typeof!==An.ForwardRef)};function Nn(U){return(0,i.isValidElement)(U)&&!yi(U)}var ki=function(W){return Nn(W)&&kr(W)},Ni=function(W){if(W&&Nn(W)){var B=W;return B.props.propertyIsEnumerable("ref")?B.props.ref:B.ref}return null};function en(U){var W=U.prefixCls,B=U.align,X=U.arrow,ae=U.arrowPos,me=X||{},Te=me.className,Me=me.content,Ie=ae.x,ke=Ie===void 0?0:Ie,at=ae.y,st=at===void 0?0:at,dt=i.useRef();if(!B||!B.points)return null;var nt={position:"absolute"};if(B.autoArrow!==!1){var mt=B.points[0],kt=B.points[1],Dt=mt[0],Bt=mt[1],Nt=kt[0],Mt=kt[1];Dt===Nt||!["t","b"].includes(Dt)?nt.top=st:Dt==="t"?nt.top=0:nt.bottom=0,Bt===Mt||!["l","r"].includes(Bt)?nt.left=ke:Bt==="l"?nt.left=0:nt.right=0}return i.createElement("div",{ref:dt,className:Ye()("".concat(W,"-arrow"),Te),style:nt},Me)}function Ri(U){var W=U.prefixCls,B=U.open,X=U.zIndex,ae=U.mask,me=U.motion;return ae?i.createElement(Gn.Z,Yn({},me,{motionAppear:!0,visible:B,removeOnLeave:!0}),function(Te){var Me=Te.className;return i.createElement("div",{style:{zIndex:X},className:Ye()("".concat(W,"-mask"),Me)})}):null}var Fi=i.memo(function(U){var W=U.children;return W},function(U,W){return W.cache}),Gi=Fi,Li=i.forwardRef(function(U,W){var B=U.popup,X=U.className,ae=U.prefixCls,me=U.style,Te=U.target,Me=U.onVisibleChanged,Ie=U.open,ke=U.keepDom,at=U.fresh,st=U.onClick,dt=U.mask,nt=U.arrow,mt=U.arrowPos,kt=U.align,Dt=U.motion,Bt=U.maskMotion,Nt=U.forceRender,Mt=U.getPopupContainer,Qt=U.autoDestroy,Ot=U.portal,ft=U.zIndex,Xt=U.onMouseEnter,Ht=U.onMouseLeave,nr=U.onPointerEnter,Fr=U.onPointerDownCapture,br=U.ready,Tr=U.offsetX,$t=U.offsetY,dr=U.offsetR,vr=U.offsetB,Rr=U.onAlign,tn=U.onPrepare,ir=U.stretch,xr=U.targetWidth,Wt=U.targetHeight,Qr=typeof B=="function"?B():B,Xr=Ie||ke,pr=(Mt==null?void 0:Mt.length)>0,Ft=i.useState(!Mt||!pr),Lr=f(Ft,2),hn=Lr[0],dn=Lr[1];if(on(function(){!hn&&pr&&Te&&dn(!0)},[hn,pr,Te]),!hn)return null;var Sr="auto",ar={left:"-1000vw",top:"-1000vh",right:Sr,bottom:Sr};if(br||!Ie){var Pr,$r=kt.points,gr=kt.dynamicInset||((Pr=kt._experimental)===null||Pr===void 0?void 0:Pr.dynamicInset),Ir=gr&&$r[0][1]==="r",Ar=gr&&$r[0][0]==="b";Ir?(ar.right=dr,ar.left=Sr):(ar.left=Tr,ar.right=Sr),Ar?(ar.bottom=vr,ar.top=Sr):(ar.top=$t,ar.bottom=Sr)}var mr={};return ir&&(ir.includes("height")&&Wt?mr.height=Wt:ir.includes("minHeight")&&Wt&&(mr.minHeight=Wt),ir.includes("width")&&xr?mr.width=xr:ir.includes("minWidth")&&xr&&(mr.minWidth=xr)),Ie||(mr.pointerEvents="none"),i.createElement(Ot,{open:Nt||Xr,getContainer:Mt&&function(){return Mt(Te)},autoDestroy:Qt},i.createElement(Ri,{prefixCls:ae,open:Ie,zIndex:ft,mask:dt,motion:Bt}),i.createElement(je.Z,{onResize:Rr,disabled:!Ie},function(jr){return i.createElement(Gn.Z,Yn({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Nt,leavedClassName:"".concat(ae,"-hidden")},Dt,{onAppearPrepare:tn,onEnterPrepare:tn,visible:Ie,onVisibleChanged:function(Ur){var Jt;Dt==null||(Jt=Dt.onVisibleChanged)===null||Jt===void 0||Jt.call(Dt,Ur),Me(Ur)}}),function(un,Ur){var Jt=un.className,Or=un.style,Mr=Ye()(ae,Jt,X);return i.createElement("div",{ref:yr(jr,W,Ur),className:Mr,style:C(C(C(C({"--arrow-x":"".concat(mt.x||0,"px"),"--arrow-y":"".concat(mt.y||0,"px")},ar),mr),Or),{},{boxSizing:"border-box",zIndex:ft},me),onMouseEnter:Xt,onMouseLeave:Ht,onPointerEnter:nr,onClick:st,onPointerDownCapture:Fr},nt&&i.createElement(en,{prefixCls:ae,arrow:nt,arrowPos:mt,align:kt}),i.createElement(Gi,{cache:!Ie&&!at},Qr))})}))}),$=Li,q=i.forwardRef(function(U,W){var B=U.children,X=U.getTriggerDOMNode,ae=kr(B),me=i.useCallback(function(Me){Qn(W,X?X(Me):Me)},[X]),Te=hr(me,Ni(B));return ae?i.cloneElement(B,{ref:Te}):B}),ue=q,pe=i.createContext(null),Se=pe;function De(U){return U?Array.isArray(U)?U:[U]:[]}function Le(U,W,B,X){return i.useMemo(function(){var ae=De(B!=null?B:W),me=De(X!=null?X:W),Te=new Set(ae),Me=new Set(me);return U&&(Te.has("hover")&&(Te.delete("hover"),Te.add("click")),Me.has("hover")&&(Me.delete("hover"),Me.add("click"))),[Te,Me]},[U,W,B,X])}var Oe=function(U){if(!U)return!1;if(U instanceof Element){if(U.offsetParent)return!0;if(U.getBBox){var W=U.getBBox(),B=W.width,X=W.height;if(B||X)return!0}if(U.getBoundingClientRect){var ae=U.getBoundingClientRect(),me=ae.width,Te=ae.height;if(me||Te)return!0}}return!1};function ze(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],B=arguments.length>2?arguments[2]:void 0;return B?U[0]===W[0]:U[0]===W[0]&&U[1]===W[1]}function ut(U,W,B,X){for(var ae=B.points,me=Object.keys(U),Te=0;Te<me.length;Te+=1){var Me,Ie=me[Te];if(ze((Me=U[Ie])===null||Me===void 0?void 0:Me.points,ae,X))return"".concat(W,"-placement-").concat(Ie)}return""}function _t(U,W,B,X){return W||(B?{motionName:"".concat(U,"-").concat(B)}:X?{motionName:X}:null)}function qe(U){return U.ownerDocument.defaultView}function Rt(U){for(var W=[],B=U==null?void 0:U.parentElement,X=["hidden","scroll","clip","auto"];B;){var ae=qe(B).getComputedStyle(B),me=ae.overflowX,Te=ae.overflowY,Me=ae.overflow;[me,Te,Me].some(function(Ie){return X.includes(Ie)})&&W.push(B),B=B.parentElement}return W}function jt(U){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(U)?W:U}function Yt(U){return jt(parseFloat(U),0)}function Kt(U,W){var B=C({},U);return(W||[]).forEach(function(X){if(!(X instanceof HTMLBodyElement||X instanceof HTMLHtmlElement)){var ae=qe(X).getComputedStyle(X),me=ae.overflow,Te=ae.overflowClipMargin,Me=ae.borderTopWidth,Ie=ae.borderBottomWidth,ke=ae.borderLeftWidth,at=ae.borderRightWidth,st=X.getBoundingClientRect(),dt=X.offsetHeight,nt=X.clientHeight,mt=X.offsetWidth,kt=X.clientWidth,Dt=Yt(Me),Bt=Yt(Ie),Nt=Yt(ke),Mt=Yt(at),Qt=jt(Math.round(st.width/mt*1e3)/1e3),Ot=jt(Math.round(st.height/dt*1e3)/1e3),ft=(mt-kt-Nt-Mt)*Qt,Xt=(dt-nt-Dt-Bt)*Ot,Ht=Dt*Ot,nr=Bt*Ot,Fr=Nt*Qt,br=Mt*Qt,Tr=0,$t=0;if(me==="clip"){var dr=Yt(Te);Tr=dr*Qt,$t=dr*Ot}var vr=st.x+Fr-Tr,Rr=st.y+Ht-$t,tn=vr+st.width+2*Tr-Fr-br-ft,ir=Rr+st.height+2*$t-Ht-nr-Xt;B.left=Math.max(B.left,vr),B.top=Math.max(B.top,Rr),B.right=Math.min(B.right,tn),B.bottom=Math.min(B.bottom,ir)}}),B}function rr(U){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,B="".concat(W),X=B.match(/^(.*)\%$/);return X?U*(parseFloat(X[1])/100):parseFloat(B)}function Pt(U,W){var B=W||[],X=f(B,2),ae=X[0],me=X[1];return[rr(U.width,ae),rr(U.height,me)]}function It(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[U[0],U[1]]}function Lt(U,W){var B=W[0],X=W[1],ae,me;return B==="t"?me=U.y:B==="b"?me=U.y+U.height:me=U.y+U.height/2,X==="l"?ae=U.x:X==="r"?ae=U.x+U.width:ae=U.x+U.width/2,{x:ae,y:me}}function Zt(U,W){var B={t:"b",b:"t",l:"r",r:"l"};return U.map(function(X,ae){return ae===W?B[X]||"c":X}).join("")}function Nr(U,W,B,X,ae,me,Te){var Me=i.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:ae[X]||{}}),Ie=f(Me,2),ke=Ie[0],at=Ie[1],st=i.useRef(0),dt=i.useMemo(function(){return W?Rt(W):[]},[W]),nt=i.useRef({}),mt=function(){nt.current={}};U||mt();var kt=ur(function(){if(W&&B&&U){let Kn=function(Ci,gi){var mi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ln,Wi=Ft.x+Ci,zi=Ft.y+gi,sa=Wi+Ir,oa=zi+gr,ua=Math.max(Wi,mi.left),Xe=Math.max(zi,mi.top),Tt=Math.min(sa,mi.right),Br=Math.min(oa,mi.bottom);return Math.max(0,(Tt-ua)*(Br-Xe))},Zi=function(){ei=Ft.y+fr,Bn=ei+gr,Vn=Ft.x+lr,vi=Vn+Ir};var Nt,Mt,Qt,Ot,ft=W,Xt=ft.ownerDocument,Ht=qe(ft),nr=Ht.getComputedStyle(ft),Fr=nr.width,br=nr.height,Tr=nr.position,$t=ft.style.left,dr=ft.style.top,vr=ft.style.right,Rr=ft.style.bottom,tn=ft.style.overflow,ir=C(C({},ae[X]),me),xr=Xt.createElement("div");(Nt=ft.parentElement)===null||Nt===void 0||Nt.appendChild(xr),xr.style.left="".concat(ft.offsetLeft,"px"),xr.style.top="".concat(ft.offsetTop,"px"),xr.style.position=Tr,xr.style.height="".concat(ft.offsetHeight,"px"),xr.style.width="".concat(ft.offsetWidth,"px"),ft.style.left="0",ft.style.top="0",ft.style.right="auto",ft.style.bottom="auto",ft.style.overflow="hidden";var Wt;if(Array.isArray(B))Wt={x:B[0],y:B[1],width:0,height:0};else{var Qr,Xr,pr=B.getBoundingClientRect();pr.x=(Qr=pr.x)!==null&&Qr!==void 0?Qr:pr.left,pr.y=(Xr=pr.y)!==null&&Xr!==void 0?Xr:pr.top,Wt={x:pr.x,y:pr.y,width:pr.width,height:pr.height}}var Ft=ft.getBoundingClientRect();Ft.x=(Mt=Ft.x)!==null&&Mt!==void 0?Mt:Ft.left,Ft.y=(Qt=Ft.y)!==null&&Qt!==void 0?Qt:Ft.top;var Lr=Xt.documentElement,hn=Lr.clientWidth,dn=Lr.clientHeight,Sr=Lr.scrollWidth,ar=Lr.scrollHeight,Pr=Lr.scrollTop,$r=Lr.scrollLeft,gr=Ft.height,Ir=Ft.width,Ar=Wt.height,mr=Wt.width,jr={left:0,top:0,right:hn,bottom:dn},un={left:-$r,top:-Pr,right:Sr-$r,bottom:ar-Pr},Ur=ir.htmlRegion,Jt="visible",Or="visibleFirst";Ur!=="scroll"&&Ur!==Or&&(Ur=Jt);var Mr=Ur===Or,Xn=Kt(un,dt),zt=Kt(jr,dt),ln=Ur===Jt?zt:Xn,bn=Mr?zt:ln;ft.style.left="auto",ft.style.top="auto",ft.style.right="0",ft.style.bottom="0";var _r=ft.getBoundingClientRect();ft.style.left=$t,ft.style.top=dr,ft.style.right=vr,ft.style.bottom=Rr,ft.style.overflow=tn,(Ot=ft.parentElement)===null||Ot===void 0||Ot.removeChild(xr);var yn=jt(Math.round(Ir/parseFloat(Fr)*1e3)/1e3),rn=jt(Math.round(gr/parseFloat(br)*1e3)/1e3);if(yn===0||rn===0||it(B)&&!Oe(B))return;var Ct=ir.offset,we=ir.targetOffset,et=Pt(Ft,Ct),ct=f(et,2),Gt=ct[0],Ut=ct[1],Fn=Pt(Wt,we),Zr=f(Fn,2),nn=Zr[0],vn=Zr[1];Wt.x-=nn,Wt.y-=vn;var Ei=ir.points||[],ci=f(Ei,2),hi=ci[0],$n=ci[1],Un=It($n),pn=It(hi),Dn=Lt(Wt,Un),fn=Lt(Ft,pn),jn=C({},ir),lr=Dn.x-fn.x+Gt,fr=Dn.y-fn.y+Ut,Rn=Kn(lr,fr),Jn=Kn(lr,fr,zt),bi=Lt(Wt,["t","l"]),Sn=Lt(Ft,["t","l"]),Pi=Lt(Wt,["b","r"]),Ti=Lt(Ft,["b","r"]),Hn=ir.overflow||{},qn=Hn.adjustX,xi=Hn.adjustY,Si=Hn.shiftX,di=Hn.shiftY,Ai=function(gi){return typeof gi=="boolean"?gi:gi>=0},ei,Bn,Vn,vi;Zi();var ai=Ai(xi),wi=pn[0]===Un[0];if(ai&&pn[0]==="t"&&(Bn>bn.bottom||nt.current.bt)){var an=fr;wi?an-=gr-Ar:an=bi.y-Ti.y-Ut;var Ii=Kn(lr,an),Ui=Kn(lr,an,zt);Ii>Rn||Ii===Rn&&(!Mr||Ui>=Jn)?(nt.current.bt=!0,fr=an,Ut=-Ut,jn.points=[Zt(pn,0),Zt(Un,0)]):nt.current.bt=!1}if(ai&&pn[0]==="b"&&(ei<bn.top||nt.current.tb)){var si=fr;wi?si+=gr-Ar:si=Pi.y-Sn.y-Ut;var Oi=Kn(lr,si),wr=Kn(lr,si,zt);Oi>Rn||Oi===Rn&&(!Mr||wr>=Jn)?(nt.current.tb=!0,fr=si,Ut=-Ut,jn.points=[Zt(pn,0),Zt(Un,0)]):nt.current.tb=!1}var qt=Ai(qn),sr=pn[1]===Un[1];if(qt&&pn[1]==="l"&&(vi>bn.right||nt.current.rl)){var Jr=lr;sr?Jr-=Ir-mr:Jr=bi.x-Ti.x-Gt;var cn=Kn(Jr,fr),Zn=Kn(Jr,fr,zt);cn>Rn||cn===Rn&&(!Mr||Zn>=Jn)?(nt.current.rl=!0,lr=Jr,Gt=-Gt,jn.points=[Zt(pn,1),Zt(Un,1)]):nt.current.rl=!1}if(qt&&pn[1]==="r"&&(Vn<bn.left||nt.current.lr)){var Ln=lr;sr?Ln+=Ir-mr:Ln=Pi.x-Sn.x-Gt;var Mi=Kn(Ln,fr),Di=Kn(Ln,fr,zt);Mi>Rn||Mi===Rn&&(!Mr||Di>=Jn)?(nt.current.lr=!0,lr=Ln,Gt=-Gt,jn.points=[Zt(pn,1),Zt(Un,1)]):nt.current.lr=!1}Zi();var Pn=Si===!0?0:Si;typeof Pn=="number"&&(Vn<zt.left&&(lr-=Vn-zt.left-Gt,Wt.x+mr<zt.left+Pn&&(lr+=Wt.x-zt.left+mr-Pn)),vi>zt.right&&(lr-=vi-zt.right-Gt,Wt.x>zt.right-Pn&&(lr+=Wt.x-zt.right+Pn)));var gn=di===!0?0:di;typeof gn=="number"&&(ei<zt.top&&(fr-=ei-zt.top-Ut,Wt.y+Ar<zt.top+gn&&(fr+=Wt.y-zt.top+Ar-gn)),Bn>zt.bottom&&(fr-=Bn-zt.bottom-Ut,Wt.y>zt.bottom-gn&&(fr+=Wt.y-zt.bottom+gn)));var ti=Ft.x+lr,pi=ti+Ir,ri=Ft.y+fr,Xi=ri+gr,ji=Wt.x,$i=ji+mr,Bi=Wt.y,Ji=Bi+Ar,qi=Math.max(ti,ji),ea=Math.min(pi,$i),Hi=(qi+ea)/2,ta=Hi-ti,ra=Math.max(ri,Bi),Vi=Math.min(Xi,Ji),na=(ra+Vi)/2,ia=na-ri;Te==null||Te(W,jn);var Ki=_r.right-Ft.x-(lr+Ft.width),ni=_r.bottom-Ft.y-(fr+Ft.height);yn===1&&(lr=Math.round(lr),Ki=Math.round(Ki)),rn===1&&(fr=Math.round(fr),ni=Math.round(ni));var aa={ready:!0,offsetX:lr/yn,offsetY:fr/rn,offsetR:Ki/yn,offsetB:ni/rn,arrowX:ta/yn,arrowY:ia/rn,scaleX:yn,scaleY:rn,align:jn};at(aa)}}),Dt=function(){st.current+=1;var Mt=st.current;Promise.resolve().then(function(){st.current===Mt&&kt()})},Bt=function(){at(function(Mt){return C(C({},Mt),{},{ready:!1})})};return on(Bt,[X]),on(function(){U||Bt()},[U]),[ke.ready,ke.offsetX,ke.offsetY,ke.offsetR,ke.offsetB,ke.arrowX,ke.arrowY,ke.scaleX,ke.scaleY,ke.align,Dt]}function Er(U){if(Array.isArray(U))return e(U)}function Gr(U){if(typeof Symbol!="undefined"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}function Y(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(U){return Er(U)||Gr(U)||I(U)||Y()}function oe(U,W,B,X,ae){on(function(){if(U&&W&&B){let st=function(){X(),ae()};var me=W,Te=B,Me=Rt(me),Ie=Rt(Te),ke=qe(Te),at=new Set([ke].concat(re(Me),re(Ie)));return at.forEach(function(dt){dt.addEventListener("scroll",st,{passive:!0})}),ke.addEventListener("resize",st,{passive:!0}),X(),function(){at.forEach(function(dt){dt.removeEventListener("scroll",st),ke.removeEventListener("resize",st)})}}},[U,W,B])}var te={},fe=[],ce=function(W){fe.push(W)};function ve(U,W){if(0)var B}function Pe(U,W){if(0)var B}function Qe(){te={}}function Ge(U,W,B){!W&&!te[B]&&(U(!1,B),te[B]=!0)}function vt(U,W){Ge(ve,U,W)}function lt(U,W){Ge(Pe,U,W)}vt.preMessage=ce,vt.resetWarned=Qe,vt.noteOnce=lt;var Et=null;function wt(U,W,B,X,ae,me,Te,Me){var Ie=i.useRef(U);Ie.current=U;var ke=i.useRef(!1);i.useEffect(function(){if(W&&X&&(!ae||me)){var st=function(){ke.current=!1},dt=function(Qt){var Ot;Ie.current&&!Te(((Ot=Qt.composedPath)===null||Ot===void 0||(Ot=Ot.call(Qt))===null||Ot===void 0?void 0:Ot[0])||Qt.target)&&!ke.current&&Me(!1)},nt=qe(X);nt.addEventListener("pointerdown",st,!0),nt.addEventListener("mousedown",dt,!0),nt.addEventListener("contextmenu",dt,!0);var mt=Yr(B);if(mt&&(mt.addEventListener("mousedown",dt,!0),mt.addEventListener("contextmenu",dt,!0)),0)var kt,Dt,Bt,Nt;return function(){nt.removeEventListener("pointerdown",st,!0),nt.removeEventListener("mousedown",dt,!0),nt.removeEventListener("contextmenu",dt,!0),mt&&(mt.removeEventListener("mousedown",dt,!0),mt.removeEventListener("contextmenu",dt,!0))}}},[W,B,X,ae,me]);function at(){ke.current=!0}return at}var gt=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function rt(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tt,W=i.forwardRef(function(B,X){var ae=B.prefixCls,me=ae===void 0?"rc-trigger-popup":ae,Te=B.children,Me=B.action,Ie=Me===void 0?"hover":Me,ke=B.showAction,at=B.hideAction,st=B.popupVisible,dt=B.defaultPopupVisible,nt=B.onPopupVisibleChange,mt=B.afterPopupVisibleChange,kt=B.mouseEnterDelay,Dt=B.mouseLeaveDelay,Bt=Dt===void 0?.1:Dt,Nt=B.focusDelay,Mt=B.blurDelay,Qt=B.mask,Ot=B.maskClosable,ft=Ot===void 0?!0:Ot,Xt=B.getPopupContainer,Ht=B.forceRender,nr=B.autoDestroy,Fr=B.destroyPopupOnHide,br=B.popup,Tr=B.popupClassName,$t=B.popupStyle,dr=B.popupPlacement,vr=B.builtinPlacements,Rr=vr===void 0?{}:vr,tn=B.popupAlign,ir=B.zIndex,xr=B.stretch,Wt=B.getPopupClassNameFromAlign,Qr=B.fresh,Xr=B.alignPoint,pr=B.onPopupClick,Ft=B.onPopupAlign,Lr=B.arrow,hn=B.popupMotion,dn=B.maskMotion,Sr=B.popupTransitionName,ar=B.popupAnimation,Pr=B.maskTransitionName,$r=B.maskAnimation,gr=B.className,Ir=B.getTriggerDOMNode,Ar=h(B,gt),mr=nr||Fr||!1,jr=i.useState(!1),un=f(jr,2),Ur=un[0],Jt=un[1];on(function(){Jt(li())},[]);var Or=i.useRef({}),Mr=i.useContext(Se),Xn=i.useMemo(function(){return{registerSubPopup:function(Tt,Br){Or.current[Tt]=Br,Mr==null||Mr.registerSubPopup(Tt,Br)}}},[Mr]),zt=oi(),ln=i.useState(null),bn=f(ln,2),_r=bn[0],yn=bn[1],rn=i.useRef(null),Ct=ur(function(Xe){rn.current=Xe,it(Xe)&&_r!==Xe&&yn(Xe),Mr==null||Mr.registerSubPopup(zt,Xe)}),we=i.useState(null),et=f(we,2),ct=et[0],Gt=et[1],Ut=i.useRef(null),Fn=ur(function(Xe){it(Xe)&&ct!==Xe&&(Gt(Xe),Ut.current=Xe)}),Zr=i.Children.only(Te),nn=(Zr==null?void 0:Zr.props)||{},vn={},Ei=ur(function(Xe){var Tt,Br,sn=ct;return(sn==null?void 0:sn.contains(Xe))||((Tt=Yr(sn))===null||Tt===void 0?void 0:Tt.host)===Xe||Xe===sn||(_r==null?void 0:_r.contains(Xe))||((Br=Yr(_r))===null||Br===void 0?void 0:Br.host)===Xe||Xe===_r||Object.values(Or.current).some(function(zr){return(zr==null?void 0:zr.contains(Xe))||Xe===zr})}),ci=_t(me,hn,ar,Sr),hi=_t(me,dn,$r,Pr),$n=i.useState(dt||!1),Un=f($n,2),pn=Un[0],Dn=Un[1],fn=st!=null?st:pn,jn=ur(function(Xe){st===void 0&&Dn(Xe)});on(function(){Dn(st||!1)},[st]);var lr=i.useRef(fn);lr.current=fn;var fr=i.useRef([]);fr.current=[];var Rn=ur(function(Xe){var Tt;jn(Xe),((Tt=fr.current[fr.current.length-1])!==null&&Tt!==void 0?Tt:fn)!==Xe&&(fr.current.push(Xe),nt==null||nt(Xe))}),Jn=i.useRef(),bi=function(){clearTimeout(Jn.current)},Sn=function(Tt){var Br=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;bi(),Br===0?Rn(Tt):Jn.current=setTimeout(function(){Rn(Tt)},Br*1e3)};i.useEffect(function(){return bi},[]);var Pi=i.useState(!1),Ti=f(Pi,2),Hn=Ti[0],qn=Ti[1];on(function(Xe){(!Xe||fn)&&qn(!0)},[fn]);var xi=i.useState(null),Si=f(xi,2),di=Si[0],Ai=Si[1],ei=i.useState(null),Bn=f(ei,2),Vn=Bn[0],vi=Bn[1],ai=function(Tt){vi([Tt.clientX,Tt.clientY])},wi=Nr(fn,_r,Xr&&Vn!==null?Vn:ct,dr,Rr,tn,Ft),an=f(wi,11),Ii=an[0],Ui=an[1],si=an[2],Oi=an[3],wr=an[4],qt=an[5],sr=an[6],Jr=an[7],cn=an[8],Zn=an[9],Ln=an[10],Mi=Le(Ur,Ie,ke,at),Di=f(Mi,2),Pn=Di[0],gn=Di[1],ti=Pn.has("click"),pi=gn.has("click")||gn.has("contextMenu"),ri=ur(function(){Hn||Ln()}),Xi=function(){lr.current&&Xr&&pi&&Sn(!1)};oe(fn,ct,_r,ri,Xi),on(function(){ri()},[Vn,dr]),on(function(){fn&&!(Rr!=null&&Rr[dr])&&ri()},[JSON.stringify(tn)]);var ji=i.useMemo(function(){var Xe=ut(Rr,me,Zn,Xr);return Ye()(Xe,Wt==null?void 0:Wt(Zn))},[Zn,Wt,Rr,me,Xr]);i.useImperativeHandle(X,function(){return{nativeElement:Ut.current,popupElement:rn.current,forceAlign:ri}});var $i=i.useState(0),Bi=f($i,2),Ji=Bi[0],qi=Bi[1],ea=i.useState(0),Hi=f(ea,2),ta=Hi[0],ra=Hi[1],Vi=function(){if(xr&&ct){var Tt=ct.getBoundingClientRect();qi(Tt.width),ra(Tt.height)}},na=function(){Vi(),ri()},ia=function(Tt){qn(!1),Ln(),mt==null||mt(Tt)},Ki=function(){return new Promise(function(Tt){Vi(),Ai(function(){return Tt})})};on(function(){di&&(Ln(),di(),Ai(null))},[di]);function ni(Xe,Tt,Br,sn){vn[Xe]=function(zr){var Yi;sn==null||sn(zr),Sn(Tt,Br);for(var la=arguments.length,fa=new Array(la>1?la-1:0),Qi=1;Qi<la;Qi++)fa[Qi-1]=arguments[Qi];(Yi=nn[Xe])===null||Yi===void 0||Yi.call.apply(Yi,[nn,zr].concat(fa))}}(ti||pi)&&(vn.onClick=function(Xe){var Tt;lr.current&&pi?Sn(!1):!lr.current&&ti&&(ai(Xe),Sn(!0));for(var Br=arguments.length,sn=new Array(Br>1?Br-1:0),zr=1;zr<Br;zr++)sn[zr-1]=arguments[zr];(Tt=nn.onClick)===null||Tt===void 0||Tt.call.apply(Tt,[nn,Xe].concat(sn))});var aa=wt(fn,pi,ct,_r,Qt,ft,Ei,Sn),Kn=Pn.has("hover"),Zi=gn.has("hover"),Ci,gi;Kn&&(ni("onMouseEnter",!0,kt,function(Xe){ai(Xe)}),ni("onPointerEnter",!0,kt,function(Xe){ai(Xe)}),Ci=function(Tt){(fn||Hn)&&_r!==null&&_r!==void 0&&_r.contains(Tt.target)&&Sn(!0,kt)},Xr&&(vn.onMouseMove=function(Xe){var Tt;(Tt=nn.onMouseMove)===null||Tt===void 0||Tt.call(nn,Xe)})),Zi&&(ni("onMouseLeave",!1,Bt),ni("onPointerLeave",!1,Bt),gi=function(){Sn(!1,Bt)}),Pn.has("focus")&&ni("onFocus",!0,Nt),gn.has("focus")&&ni("onBlur",!1,Mt),Pn.has("contextMenu")&&(vn.onContextMenu=function(Xe){var Tt;lr.current&&gn.has("contextMenu")?Sn(!1):(ai(Xe),Sn(!0)),Xe.preventDefault();for(var Br=arguments.length,sn=new Array(Br>1?Br-1:0),zr=1;zr<Br;zr++)sn[zr-1]=arguments[zr];(Tt=nn.onContextMenu)===null||Tt===void 0||Tt.call.apply(Tt,[nn,Xe].concat(sn))}),gr&&(vn.className=Ye()(nn.className,gr));var mi=C(C({},nn),vn),Wi={},zi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];zi.forEach(function(Xe){Ar[Xe]&&(Wi[Xe]=function(){for(var Tt,Br=arguments.length,sn=new Array(Br),zr=0;zr<Br;zr++)sn[zr]=arguments[zr];(Tt=mi[Xe])===null||Tt===void 0||Tt.call.apply(Tt,[mi].concat(sn)),Ar[Xe].apply(Ar,sn)})});var sa=i.cloneElement(Zr,C(C({},mi),Wi)),oa={x:qt,y:sr},ua=Lr?C({},Lr!==!0?Lr:{}):null;return i.createElement(i.Fragment,null,i.createElement(je.Z,{disabled:!fn,ref:Fn,onResize:na},i.createElement(ue,{getTriggerDOMNode:Ir},sa)),i.createElement(Se.Provider,{value:Xn},i.createElement($,{portal:U,ref:Ct,prefixCls:me,popup:br,className:Ye()(Tr,ji),style:$t,target:ct,onMouseEnter:Ci,onMouseLeave:gi,onPointerEnter:Ci,zIndex:ir,open:fn,keepDom:Hn,fresh:Qr,onClick:pr,onPointerDownCapture:aa,mask:Qt,motion:ci,maskMotion:hi,onVisibleChanged:ia,onPrepare:Ki,forceRender:Ht,autoDestroy:mr,getPopupContainer:Xt,align:Zn,arrow:ua,arrowPos:oa,ready:Ii,offsetX:Ui,offsetY:si,offsetR:Oi,offsetB:wr,onAlign:ri,stretch:xr,targetWidth:Ji/Jr,targetHeight:ta/cn})))});return W}var ot=rt(tt)},31632:function(He,ye){"use strict";var K;var Z=typeof Symbol=="function"&&Symbol.for,J=Z?Symbol.for("react.element"):60103,V=Z?Symbol.for("react.portal"):60106,N=Z?Symbol.for("react.fragment"):60107,L=Z?Symbol.for("react.strict_mode"):60108,C=Z?Symbol.for("react.profiler"):60114,P=Z?Symbol.for("react.provider"):60109,M=Z?Symbol.for("react.context"):60110,e=Z?Symbol.for("react.async_mode"):60111,I=Z?Symbol.for("react.concurrent_mode"):60111,A=Z?Symbol.for("react.forward_ref"):60112,f=Z?Symbol.for("react.suspense"):60113,g=Z?Symbol.for("react.suspense_list"):60120,h=Z?Symbol.for("react.memo"):60115,p=Z?Symbol.for("react.lazy"):60116,u=Z?Symbol.for("react.block"):60121,v=Z?Symbol.for("react.fundamental"):60117,m=Z?Symbol.for("react.responder"):60118,o=Z?Symbol.for("react.scope"):60119;function a(s){if(typeof s=="object"&&s!==null){var E=s.$$typeof;switch(E){case J:switch(s=s.type,s){case e:case I:case N:case C:case L:case f:return s;default:switch(s=s&&s.$$typeof,s){case M:case A:case p:case h:case P:return s;default:return E}}case V:return E}}}function i(s){return a(s)===I}K=e,K=I,K=M,K=P,K=J,K=A,K=N,K=p,K=h,K=V,K=C,K=L,K=f,K=function(s){return i(s)||a(s)===e},K=i,K=function(s){return a(s)===M},K=function(s){return a(s)===P},K=function(s){return typeof s=="object"&&s!==null&&s.$$typeof===J},K=function(s){return a(s)===A},K=function(s){return a(s)===N},K=function(s){return a(s)===p},ye.isMemo=function(s){return a(s)===h},K=function(s){return a(s)===V},K=function(s){return a(s)===C},K=function(s){return a(s)===L},K=function(s){return a(s)===f},K=function(s){return typeof s=="string"||typeof s=="function"||s===N||s===I||s===C||s===L||s===f||s===g||typeof s=="object"&&s!==null&&(s.$$typeof===p||s.$$typeof===h||s.$$typeof===P||s.$$typeof===M||s.$$typeof===A||s.$$typeof===v||s.$$typeof===m||s.$$typeof===o||s.$$typeof===u)},K=a},81640:function(He,ye,K){"use strict";He.exports=K(31632)},48482:function(He,ye){"use strict";var K;var Z=Symbol.for("react.element"),J=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),P=Symbol.for("react.context"),M=Symbol.for("react.server_context"),e=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),p;p=Symbol.for("react.module.reference");function u(v){if(typeof v=="object"&&v!==null){var m=v.$$typeof;switch(m){case Z:switch(v=v.type,v){case V:case L:case N:case I:case A:return v;default:switch(v=v&&v.$$typeof,v){case M:case P:case e:case g:case f:case C:return v;default:return m}}case J:return m}}}K=P,K=C,K=Z,ye.ForwardRef=e,K=V,K=g,K=f,K=J,K=L,K=N,K=I,K=A,K=function(){return!1},K=function(){return!1},K=function(v){return u(v)===P},K=function(v){return u(v)===C},K=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===Z},K=function(v){return u(v)===e},K=function(v){return u(v)===V},K=function(v){return u(v)===g},ye.isMemo=function(v){return u(v)===f},K=function(v){return u(v)===J},K=function(v){return u(v)===L},K=function(v){return u(v)===N},K=function(v){return u(v)===I},K=function(v){return u(v)===A},K=function(v){return typeof v=="string"||typeof v=="function"||v===V||v===L||v===N||v===I||v===A||v===h||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===f||v.$$typeof===C||v.$$typeof===P||v.$$typeof===e||v.$$typeof===p||v.getModuleId!==void 0)},K=u},52481:function(He,ye,K){"use strict";He.exports=K(48482)},67555:function(He,ye,K){"use strict";K.r(ye),K.d(ye,{default:function(){return T}});var Z=K(67294),J=K(35973),V=K.p+"static/detailTitle3.35713931.png",N=K(18645),L=K(48289),C=K(83062),P=K(74330),M=K(26410),e=K(91064),I=K(93671),A=K(9343),f=K(26194),g=K(53051),h=K(33170),p=Object.defineProperty,u=Object.defineProperties,v=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,i=(R,S,w)=>S in R?p(R,S,{enumerable:!0,configurable:!0,writable:!0,value:w}):R[S]=w,s=(R,S)=>{for(var w in S||(S={}))o.call(S,w)&&i(R,w,S[w]);if(m)for(var w of m(S))a.call(S,w)&&i(R,w,S[w]);return R},E=(R,S)=>u(R,v(S)),b=(R,S,w)=>new Promise((r,n)=>{var t=y=>{try{x(w.next(y))}catch(c){n(c)}},l=y=>{try{x(w.throw(y))}catch(c){n(c)}},x=y=>y.done?r(y.value):Promise.resolve(y.value).then(t,l);x((w=w.apply(R,S)).next())});const d=({pathsDetail:R,dispatch:S})=>{var w,r,n,t,l;const x=(0,J.useParams)(),[y,c]=(0,Z.useState)(1),[,_,D,O]=(0,A.U)(I.Cc,{subject_id:x==null?void 0:x.pathId,uuid:x==null?void 0:x.learningpathId}),[k,F]=(0,Z.useState)([]),[G,H]=(0,Z.useState)(!1),[j,Q]=(0,Z.useState)({}),[ee,ie]=(0,Z.useState)(!1),se=[3,2,1];(0,Z.useEffect)(()=>{D({})},[]),(0,Z.useEffect)(()=>{var he,be;if((he=R==null?void 0:R.detail)!=null&&he.nodes&&y===1){const Ce=[...(be=R==null?void 0:R.detail)==null?void 0:be.nodes];F(Ce==null?void 0:Ce.splice(1)),c(2)}},[(w=R==null?void 0:R.detail)==null?void 0:w.nodes]);const le=(0,Z.useMemo)(()=>[{title:"\u6807\u7B7E\u8282\u70B9\u540D\u79F0",width:"240rem",ellipsis:!0,dataIndex:"name",render:he=>Z.createElement(C.Z,{title:he},he)},{title:"\u5DF2\u5173\u8054\u8D44\u6E90\u6570",ellipsis:!0,dataIndex:"resource_count"},{title:"\u5B9E\u8BAD",ellipsis:!0,dataIndex:"shixun"},{title:"\u89C6\u9891",ellipsis:!0,dataIndex:"video"},{title:"\u8BFE\u4EF6",ellipsis:!0,dataIndex:"attachment"},{title:"\u8BD5\u5377",ellipsis:!0,dataIndex:"examination_bank"},{title:"\u4F5C\u4E1A",ellipsis:!0,dataIndex:"homework"},{title:"\u5176\u4ED6",ellipsis:!0,dataIndex:"other"},{title:"\u67E5\u770B",ellipsis:!0,dataIndex:"look",render:(he,be)=>Z.createElement("a",{style:{color:"#18D6FF"},onClick:()=>{Ee(be)}},"\u67E5\u770B\u8BE6\u60C5")}],[]),xe=()=>b(void 0,null,function*(){D({})}),Re=(0,Z.useMemo)(()=>{var he,be;const Ce=((he=O==null?void 0:O.data)==null?void 0:he.relation_resource_count)||0,Ue=((be=O==null?void 0:O.data)==null?void 0:be.no_relation_resource_count)||0,$e=Ce+Ue;return $e>0?Math.round(Ce/$e*100):0},[O==null?void 0:O.data]),Ee=he=>b(void 0,null,function*(){var be,Ce,Ue,$e,z;ie(!0);let ne=yield(0,h.ZP)("/api/knowledge/v2/get_node.json",{method:"get",params:{depth:0,subject_id:x==null?void 0:x.pathId,nodeUuid:he==null?void 0:he.knowledge_uuid}});if((ne==null?void 0:ne.status)===0&&((Ce=(be=ne==null?void 0:ne.data)==null?void 0:be.nodes)==null?void 0:Ce.length)>0){let de=(z=($e=(Ue=ne==null?void 0:ne.data)==null?void 0:Ue.nodes)==null?void 0:$e.map(ge=>{var Ae,Ve,xt,Je,pt,St,er,Ne,Fe,We,Be,_e,ht;const Ze=(Ae=ne==null?void 0:ne.data)==null?void 0:Ae.resource_count;return E(s({},ge==null?void 0:ge.properties),{rootNodeUuid:(Ve=ge==null?void 0:ge.properties)==null?void 0:Ve.rootNodeUuid,id:(xt=ge==null?void 0:ge.properties)==null?void 0:xt.uuid,name:(Je=ge==null?void 0:ge.properties)==null?void 0:Je.name,description:(pt=ge==null?void 0:ge.properties)==null?void 0:pt.description,nodeType:(St=ge==null?void 0:ge.properties)==null?void 0:St.nodeType,tags:((er=ge==null?void 0:ge.properties)==null?void 0:er.tags)&&((We=(Fe=(Ne=ge==null?void 0:ge.properties)==null?void 0:Ne.tags)==null?void 0:Fe.split("\uFF0C"))==null?void 0:We.map(At=>({name:At})))||[],colorType:parseInt((Be=ge==null?void 0:ge.properties)==null?void 0:Be.color)>3?"3":(_e=ge==null?void 0:ge.properties)==null?void 0:_e.color,activeColor:"#FA6400",size:se[((ht=ge==null?void 0:ge.properties)==null?void 0:ht.color)-1]||1,shape:"circle",hide:!1,isExtendedState:!0,currentResourceTotal:Ze})}))==null?void 0:z[0];de.resourceid=he==null?void 0:he.id,de.tpacti=he==null?void 0:he.knowledge_uuid,Q(de),H(!0)}ie(!1)});return Z.createElement(P.Z,{spinning:_||ee},Z.createElement("div",{className:"w-full c-white text-14px-rem",style:{background:`#030616 url(${L}) 0 0 / 100% auto no-repeat`,height:"100vh",overflow:"auto"}},Z.createElement("div",{className:"w-full flex item-center justify-center",style:{background:`#030616 url(${V}) 0 0 / 100% 100% no-repeat`,height:"108rem"}}),Z.createElement("div",{className:"ml-auto mr-auto flex flex-col mt-20px-rem",style:{width:"1200rem"}},Z.createElement("div",{className:"w-full flex item-center gap-64px-rem",style:{background:`#030616 url(${N}) 0 0 / 100% 100% no-repeat`,height:"156rem",padding:"0 64px",justifyContent:"space-around"}},Z.createElement("div",{className:"flex item-center gap-16px-rem"},Z.createElement("img",{src:K(76296),width:65,height:80,style:{width:"65rem",height:"80rem"}}),Z.createElement("div",{className:"flex flex-col"},Z.createElement("div",{className:"text-500"},"\u5DF2\u5173\u8054\u8D44\u6E90\u6807\u7B7E\u8282\u70B9\u6570"),Z.createElement("div",{className:"text-20px-rem multi_ellipsis1 blod",style:{color:"#7FBEFF"}},((r=O==null?void 0:O.data)==null?void 0:r.relation_resource_count)||0))),Z.createElement("div",{className:"flex item-center gap-16px-rem"},Z.createElement("img",{src:K(30757),width:65,height:80,style:{width:"65rem",height:"80rem"}}),Z.createElement("div",{className:"flex flex-col"},Z.createElement("div",{className:"text-500"},"\u672A\u5173\u8054\u8D44\u6E90\u6807\u7B7E\u8282\u70B9\u6570"),Z.createElement("div",{className:"text-20px-rem multi_ellipsis1 blod",style:{color:"#86A0FF"}},((n=O==null?void 0:O.data)==null?void 0:n.no_relation_resource_count)||0))),Z.createElement("div",{className:"flex item-center gap-16px-rem"},Z.createElement(M.Z,{type:"circle",percent:Re,showInfo:!1,size:65,strokeWidth:18,trailColor:"rgba(100, 135, 188, 0.40)",strokeColor:"#1BBDE0"}),Z.createElement("div",{className:"flex flex-col text-nowrap"},Z.createElement("div",null,"\u77E5\u8BC6\u70B9\u5EFA\u8BBE\u7387\xA0",Z.createElement(C.Z,{title:"\u8D44\u6E90\u5EFA\u8BBE\u7387 = \u56FE\u8C31\u4E2D\u5DF2\u5173\u8054\u8D44\u6E90\u7684\u6807\u7B7E\u8282\u70B9\u6570 / \u56FE\u8C31\u6807\u7B7E\u8282\u70B9\u603B\u6570"},Z.createElement("i",{className:"iconfont icon-xiaowenhao2",style:{fontSize:"16rem"}})," ")),Z.createElement("div",{className:"text-24px-rem ",style:{color:"#1BBDE0",fontWeight:800}},Re,"%")))),Z.createElement("div",{className:"flex flex-col mt-22px-rem gap-12px-rem pb-20px"},Z.createElement("div",{className:`w-full flex item-center justify-center px-30px-rem rounded-2px-rem gap-16px-rem sticky ${e.Z.TableMyHeader}`,style:{height:"40rem",top:0}},le==null?void 0:le.map((he,be)=>Z.createElement("div",{key:be,className:`minW-0 ${he!=null&&he.ellipsis?"multi_ellipsis1":""}`,style:{flex:he!=null&&he.width?"":1,width:(he==null?void 0:he.width)||""}},he==null?void 0:he.title))),(O==null?void 0:O.total_count)==0?Z.createElement(f.Z,null):(l=(t=O==null?void 0:O.data)==null?void 0:t.knowledge_infos)==null?void 0:l.map((he,be)=>Z.createElement("div",{key:be,style:{height:"54rem"},className:`w-full flex item-center justify-center px-30px-rem rounded-2px-rem gap-16px-rem ${e.Z.TableMyDiv}`},le==null?void 0:le.map((Ce,Ue)=>{var $e;return Z.createElement("div",{key:Ue,className:`minW-0 ${Ce!=null&&Ce.ellipsis?"multi_ellipsis1":""}`,style:{flex:Ce!=null&&Ce.width?"":1,width:(Ce==null?void 0:Ce.width)||""}},(($e=Ce==null?void 0:Ce.render)==null?void 0:$e.call(Ce,he==null?void 0:he[Ce==null?void 0:Ce.dataIndex],he,be))||(he==null?void 0:he[Ce==null?void 0:Ce.dataIndex]))})))))),Z.createElement(g.Z,{initdata:xe,uuid:x==null?void 0:x.learningpathId,setshow:()=>{},getData:xe,containerRef:()=>{},showdetail:G,setshowdetail:H,items:j,Tabsdatas:k,tpacti:j==null?void 0:j.tpacti}))};var T=(0,J.connect)(({pathsDetail:R})=>({pathsDetail:R}))(d)},20640:function(He,ye,K){"use strict";var Z=K(11742),J={"text/plain":"Text","text/html":"Url",default:"Text"},V="Copy to clipboard: #{key}, Enter";function N(C){var P=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return C.replace(/#{\s*key\s*}/g,P)}function L(C,P){var M,e,I,A,f,g,h=!1;P||(P={}),M=P.debug||!1;try{I=Z(),A=document.createRange(),f=document.getSelection(),g=document.createElement("span"),g.textContent=C,g.ariaHidden="true",g.style.all="unset",g.style.position="fixed",g.style.top=0,g.style.clip="rect(0, 0, 0, 0)",g.style.whiteSpace="pre",g.style.webkitUserSelect="text",g.style.MozUserSelect="text",g.style.msUserSelect="text",g.style.userSelect="text",g.addEventListener("copy",function(u){if(u.stopPropagation(),P.format)if(u.preventDefault(),typeof u.clipboardData=="undefined"){M&&console.warn("unable to use e.clipboardData"),M&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var v=J[P.format]||J.default;window.clipboardData.setData(v,C)}else u.clipboardData.clearData(),u.clipboardData.setData(P.format,C);P.onCopy&&(u.preventDefault(),P.onCopy(u.clipboardData))}),document.body.appendChild(g),A.selectNodeContents(g),f.addRange(A);var p=document.execCommand("copy");if(!p)throw new Error("copy command was unsuccessful");h=!0}catch(u){M&&console.error("unable to copy using execCommand: ",u),M&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(P.format||"text",C),P.onCopy&&P.onCopy(window.clipboardData),h=!0}catch(v){M&&console.error("unable to copy using clipboardData: ",v),M&&console.error("falling back to prompt"),e=N("message"in P?P.message:V),window.prompt(e,C)}}finally{f&&(typeof f.removeRange=="function"?f.removeRange(A):f.removeAllRanges()),g&&document.body.removeChild(g),I()}return h}He.exports=L},67631:function(He){typeof window!="undefined"&&function(K,Z){He.exports=Z()}(this,()=>(()=>{var ye={"./src/config.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{enableStreamingMode:()=>n,hlsDefaultConfig:()=>S,mergeConfig:()=>r});var C=L("./src/controller/abr-controller.ts"),P=L("./src/controller/audio-stream-controller.ts"),M=L("./src/controller/audio-track-controller.ts"),e=L("./src/controller/subtitle-stream-controller.ts"),I=L("./src/controller/subtitle-track-controller.ts"),A=L("./src/controller/buffer-controller.ts"),f=L("./src/controller/timeline-controller.ts"),g=L("./src/controller/cap-level-controller.ts"),h=L("./src/controller/fps-controller.ts"),p=L("./src/controller/eme-controller.ts"),u=L("./src/controller/cmcd-controller.ts"),v=L("./src/utils/xhr-loader.ts"),m=L("./src/utils/fetch-loader.ts"),o=L("./src/utils/cues.ts"),a=L("./src/utils/mediakeys-helper.ts"),i=L("./src/utils/logger.ts");function s(){return s=Object.assign?Object.assign.bind():function(t){for(var l=1;l<arguments.length;l++){var x=arguments[l];for(var y in x)Object.prototype.hasOwnProperty.call(x,y)&&(t[y]=x[y])}return t},s.apply(this,arguments)}function E(t,l){var x=Object.keys(t);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(t);l&&(y=y.filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable})),x.push.apply(x,y)}return x}function b(t){for(var l=1;l<arguments.length;l++){var x=arguments[l]!=null?arguments[l]:{};l%2?E(Object(x),!0).forEach(function(y){d(t,y,x[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(x)):E(Object(x)).forEach(function(y){Object.defineProperty(t,y,Object.getOwnPropertyDescriptor(x,y))})}return t}function d(t,l,x){return l=T(l),l in t?Object.defineProperty(t,l,{value:x,enumerable:!0,configurable:!0,writable:!0}):t[l]=x,t}function T(t){var l=R(t,"string");return typeof l=="symbol"?l:String(l)}function R(t,l){if(typeof t!="object"||t===null)return t;var x=t[Symbol.toPrimitive];if(x!==void 0){var y=x.call(t,l||"default");if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(t)}var S=b(b({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:v.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:C.default,bufferController:A.default,capLevelController:g.default,fpsController:h.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0},w()),{},{subtitleStreamController:e.SubtitleStreamController,subtitleTrackController:I.default,timelineController:f.TimelineController,audioStreamController:P.default,audioTrackController:M.default,emeController:p.default,cmcdController:u.default});function w(){return{cueHandler:o.default,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function r(t,l){if((l.liveSyncDurationCount||l.liveMaxLatencyDurationCount)&&(l.liveSyncDuration||l.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(l.liveMaxLatencyDurationCount!==void 0&&(l.liveSyncDurationCount===void 0||l.liveMaxLatencyDurationCount<=l.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(l.liveMaxLatencyDuration!==void 0&&(l.liveSyncDuration===void 0||l.liveMaxLatencyDuration<=l.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return s({},t,l)}function n(t){var l=t.loader;if(l!==m.default&&l!==v.default)i.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),t.progressive=!1;else{var x=(0,m.fetchSupported)();x&&(t.loader=m.default,t.progressive=!0,t.enableSoftwareAES=!0,i.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>v});var C=L("./src/polyfills/number.ts"),P=L("./src/utils/ewma-bandwidth-estimator.ts"),M=L("./src/events.ts"),e=L("./src/errors.ts"),I=L("./src/types/loader.ts"),A=L("./src/utils/logger.ts");function f(m,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(m,h(i.key),i)}}function g(m,o,a){return o&&f(m.prototype,o),a&&f(m,a),Object.defineProperty(m,"prototype",{writable:!1}),m}function h(m){var o=p(m,"string");return typeof o=="symbol"?o:String(o)}function p(m,o){if(typeof m!="object"||m===null)return m;var a=m[Symbol.toPrimitive];if(a!==void 0){var i=a.call(m,o||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(m)}var u=function(){function m(a){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=a;var i=a.config;this.bwEstimator=new P.default(i.abrEwmaSlowVoD,i.abrEwmaFastVoD,i.abrEwmaDefaultEstimate),this.registerListeners()}var o=m.prototype;return o.registerListeners=function(){var i=this.hls;i.on(M.Events.FRAG_LOADING,this.onFragLoading,this),i.on(M.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.on(M.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var i=this.hls;i.off(M.Events.FRAG_LOADING,this.onFragLoading,this),i.off(M.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.off(M.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},o.onFragLoading=function(i,s){var E=s.frag;if(E.type===I.PlaylistLevelType.MAIN&&!this.timer){var b;this.fragCurrent=E,this.partCurrent=(b=s.part)!=null?b:null,this.timer=self.setInterval(this.onCheck,100)}},o.onLevelLoaded=function(i,s){var E=this.hls.config;s.details.live?this.bwEstimator.update(E.abrEwmaSlowLive,E.abrEwmaFastLive):this.bwEstimator.update(E.abrEwmaSlowVoD,E.abrEwmaFastVoD)},o._abandonRulesCheck=function(){var i=this.fragCurrent,s=this.partCurrent,E=this.hls,b=E.autoLevelEnabled,d=E.media;if(!(!i||!d)){var T=s?s.stats:i.stats,R=s?s.duration:i.duration;if(T.aborted||T.loaded&&T.loaded===T.total||i.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!(!b||d.paused||!d.playbackRate||!d.readyState)){var S=E.mainForwardBufferInfo;if(S!==null){var w=performance.now()-T.loading.start,r=Math.abs(d.playbackRate);if(!(w<=500*R/r)){var n=T.loaded&&T.loading.first,t=this.bwEstimator.getEstimate(),l=E.levels,x=E.minAutoLevel,y=l[i.level],c=T.total||Math.max(T.loaded,Math.round(R*y.maxBitrate/8)),_=n?T.loaded*1e3/w:0,D=_?(c-T.loaded)/_:c*8/t,O=S.len/r;if(!(D<=O)){var k=Number.POSITIVE_INFINITY,F;for(F=i.level-1;F>x;F--){var G=l[F].maxBitrate;if(k=_?R*G/(8*.8*_):R*G/t,k<O)break}k>=D||(A.logger.warn("Fragment "+i.sn+(s?" part "+s.index:"")+" of level "+i.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+F+`
Current BW estimate: `+((0,C.isFiniteNumber)(t)?(t/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+D.toFixed(3)+` s
Estimated load time for the next fragment: `+k.toFixed(3)+` s
Time to underbuffer: `+O.toFixed(3)+" s"),E.nextLoadLevel=F,n&&this.bwEstimator.sample(w,T.loaded),this.clearTimer(),(i.loader||i.keyLoader)&&(this.fragCurrent=this.partCurrent=null,i.abortRequests()),E.trigger(M.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:s,stats:T}))}}}}}},o.onFragLoaded=function(i,s){var E=s.frag,b=s.part;if(E.type===I.PlaylistLevelType.MAIN&&(0,C.isFiniteNumber)(E.sn)){var d=b?b.stats:E.stats,T=b?b.duration:E.duration;if(this.clearTimer(),this.lastLoadedFragLevel=E.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var R=this.hls.levels[E.level],S=(R.loaded?R.loaded.bytes:0)+d.loaded,w=(R.loaded?R.loaded.duration:0)+T;R.loaded={bytes:S,duration:w},R.realBitrate=Math.round(8*S/w)}if(E.bitrateTest){var r={stats:d,frag:E,part:b,id:E.type};this.onFragBuffered(M.Events.FRAG_BUFFERED,r)}}},o.onFragBuffered=function(i,s){var E=s.frag,b=s.part,d=b?b.stats:E.stats;if(!d.aborted&&!(E.type!==I.PlaylistLevelType.MAIN||E.sn==="initSegment")){var T=d.parsing.end-d.loading.start;this.bwEstimator.sample(T,d.loaded),d.bwEstimate=this.bwEstimator.getEstimate(),E.bitrateTest?this.bitrateTestDelay=T/1e3:this.bitrateTestDelay=0}},o.onError=function(i,s){var E;if(((E=s.frag)===null||E===void 0?void 0:E.type)===I.PlaylistLevelType.MAIN){if(s.type===e.ErrorTypes.KEY_SYSTEM_ERROR){this.clearTimer();return}switch(s.details){case e.ErrorDetails.FRAG_LOAD_ERROR:case e.ErrorDetails.FRAG_LOAD_TIMEOUT:case e.ErrorDetails.KEY_LOAD_ERROR:case e.ErrorDetails.KEY_LOAD_TIMEOUT:this.clearTimer();break;default:break}}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var i=this.fragCurrent,s=this.partCurrent,E=this.hls,b=E.maxAutoLevel,d=E.config,T=E.minAutoLevel,R=E.media,S=s?s.duration:i?i.duration:0,w=R&&R.playbackRate!==0?Math.abs(R.playbackRate):1,r=this.bwEstimator?this.bwEstimator.getEstimate():d.abrEwmaDefaultEstimate,n=E.mainForwardBufferInfo,t=(n?n.len:0)/w,l=this.findBestLevel(r,T,b,t,d.abrBandWidthFactor,d.abrBandWidthUpFactor);if(l>=0)return l;A.logger.trace((t?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var x=S?Math.min(S,d.maxStarvationDelay):d.maxStarvationDelay,y=d.abrBandWidthFactor,c=d.abrBandWidthUpFactor;if(!t){var _=this.bitrateTestDelay;if(_){var D=S?Math.min(S,d.maxLoadingDelay):d.maxLoadingDelay;x=D-_,A.logger.trace("bitrate test took "+Math.round(1e3*_)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*x)+" ms"),y=c=1}}return l=this.findBestLevel(r,T,b,t+x,y,c),Math.max(l,0)},o.findBestLevel=function(i,s,E,b,d,T){for(var R,S=this.fragCurrent,w=this.partCurrent,r=this.lastLoadedFragLevel,n=this.hls.levels,t=n[r],l=!!(t!=null&&(R=t.details)!==null&&R!==void 0&&R.live),x=t==null?void 0:t.codecSet,y=w?w.duration:S?S.duration:0,c=E;c>=s;c--){var _=n[c];if(!(!_||x&&_.codecSet!==x)){var D=_.details,O=(w?D==null?void 0:D.partTarget:D==null?void 0:D.averagetargetduration)||y,k=void 0;c<=r?k=d*i:k=T*i;var F=n[c].maxBitrate,G=F*O/k;if(A.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+c+"/"+Math.round(k)+"/"+F+"/"+O+"/"+b+"/"+G),k>F&&(G===0||!(0,C.isFiniteNumber)(G)||l&&!this.bitrateTestDelay||G<b))return c}}return-1},g(m,[{key:"nextAutoLevel",get:function(){var i=this._nextAutoLevel,s=this.bwEstimator;if(i!==-1&&!s.canEstimate())return i;var E=this.getNextABRAutoLevel();return i!==-1&&this.hls.levels[E].loadError?i:(i!==-1&&(E=Math.min(i,E)),E)},set:function(i){this._nextAutoLevel=i}}]),m}();const v=u},"./src/controller/audio-stream-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>d});var C=L("./src/polyfills/number.ts"),P=L("./src/controller/base-stream-controller.ts"),M=L("./src/events.ts"),e=L("./src/utils/buffer-helper.ts"),I=L("./src/controller/fragment-tracker.ts"),A=L("./src/types/level.ts"),f=L("./src/types/loader.ts"),g=L("./src/loader/fragment.ts"),h=L("./src/demux/chunk-cache.ts"),p=L("./src/demux/transmuxer-interface.ts"),u=L("./src/types/transmuxer.ts"),v=L("./src/controller/fragment-finders.ts"),m=L("./src/utils/discontinuities.ts"),o=L("./src/errors.ts");function a(){return a=Object.assign?Object.assign.bind():function(T){for(var R=1;R<arguments.length;R++){var S=arguments[R];for(var w in S)Object.prototype.hasOwnProperty.call(S,w)&&(T[w]=S[w])}return T},a.apply(this,arguments)}function i(T,R){T.prototype=Object.create(R.prototype),T.prototype.constructor=T,s(T,R)}function s(T,R){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,r){return w.__proto__=r,w},s(T,R)}var E=100,b=function(T){i(R,T);function R(w,r,n){var t;return t=T.call(this,w,r,n,"[audio-stream-controller]")||this,t.videoBuffer=null,t.videoTrackCC=-1,t.waitingVideoCC=-1,t.audioSwitch=!1,t.trackId=-1,t.waitingData=null,t.mainDetails=null,t.bufferFlushed=!1,t.cachedTrackLoadedData=null,t._registerListeners(),t}var S=R.prototype;return S.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},S._registerListeners=function(){var r=this.hls;r.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),r.on(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.on(M.Events.ERROR,this.onError,this),r.on(M.Events.BUFFER_RESET,this.onBufferReset,this),r.on(M.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S._unregisterListeners=function(){var r=this.hls;r.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),r.off(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.off(M.Events.ERROR,this.onError,this),r.off(M.Events.BUFFER_RESET,this.onBufferReset,this),r.off(M.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S.onInitPtsFound=function(r,n){var t=n.frag,l=n.id,x=n.initPTS;if(l==="main"){var y=t.cc;this.initPTS[t.cc]=x,this.log("InitPTS for cc: "+y+" found from main: "+x),this.videoTrackCC=y,this.state===P.State.WAITING_INIT_PTS&&this.tick()}},S.startLoad=function(r){if(!this.levels){this.startPosition=r,this.state=P.State.STOPPED;return}var n=this.lastCurrentTime;this.stopLoad(),this.setInterval(E),this.fragLoadError=0,n>0&&r===-1?(this.log("Override startPosition with lastCurrentTime @"+n.toFixed(3)),r=n,this.state=P.State.IDLE):(this.loadedmetadata=!1,this.state=P.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()},S.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var r,n=this.levels,t=this.trackId,l=n==null||(r=n[t])===null||r===void 0?void 0:r.details;if(l){if(this.waitForCdnTuneIn(l))break;this.state=P.State.WAITING_INIT_PTS}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var x,y=performance.now(),c=this.retryDate;(!c||y>=c||(x=this.media)!==null&&x!==void 0&&x.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=P.State.IDLE);break}case P.State.WAITING_INIT_PTS:{var _=this.waitingData;if(_){var D=_.frag,O=_.part,k=_.cache,F=_.complete;if(this.initPTS[D.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var G=k.flush(),H={frag:D,part:O,payload:G,networkDetails:null};this._handleFragmentLoadProgress(H),F&&T.prototype._handleFragmentLoadComplete.call(this,H)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log("Waiting fragment cc ("+D.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var j=this.getLoadPosition(),Q=e.BufferHelper.bufferInfo(this.mediaBuffer,j,this.config.maxBufferHole),ee=(0,v.fragmentWithinToleranceTest)(Q.end,this.config.maxFragLookUpTolerance,D);ee<0&&(this.log("Waiting fragment cc ("+D.cc+") @ "+D.start+" cancelled because another fragment at "+Q.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},S.clearWaitingFragment=function(){var r=this.waitingData;r&&(this.fragmentTracker.removeFragment(r.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},S.resetLoadingState=function(){this.clearWaitingFragment(),T.prototype.resetLoadingState.call(this)},S.onTickEnd=function(){var r=this.media;!r||!r.readyState||(this.lastCurrentTime=r.currentTime)},S.doTickIdle=function(){var r=this.hls,n=this.levels,t=this.media,l=this.trackId,x=r.config;if(!(!n||!n[l])&&!(!t&&(this.startFragRequested||!x.startFragPrefetch))){var y=n[l],c=y.details;if(!c||c.live&&this.levelLastLoaded!==l||this.waitForCdnTuneIn(c)){this.state=P.State.WAITING_TRACK;return}var _=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&_&&(this.bufferFlushed=!1,this.afterBufferFlushed(_,g.ElementaryStreamTypes.AUDIO,f.PlaylistLevelType.AUDIO));var D=this.getFwdBufferInfo(_,f.PlaylistLevelType.AUDIO);if(D!==null){var O=this.audioSwitch;if(!O&&this._streamEnded(D,c)){r.trigger(M.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var k=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,f.PlaylistLevelType.MAIN),F=D.len,G=this.getMaxBufferLength(k==null?void 0:k.len);if(!(F>=G&&!O)){var H=c.fragments,j=H[0].start,Q=D.end;if(O&&t){var ee=this.getLoadPosition();Q=ee,c.PTSKnown&&ee<j&&(D.end>j||D.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),t.currentTime=j+.05)}if(!(k&&Q>k.end+c.targetduration)&&!((!k||!k.len)&&D.len)){var ie=this.getNextFragment(Q,c);if(!ie){this.bufferFlushed=!0;return}this.loadFragment(ie,c,Q)}}}}},S.getMaxBufferLength=function(r){var n=T.prototype.getMaxBufferLength.call(this);return r?Math.max(n,r):n},S.onMediaDetaching=function(){this.videoBuffer=null,T.prototype.onMediaDetaching.call(this)},S.onAudioTracksUpdated=function(r,n){var t=n.audioTracks;this.resetTransmuxer(),this.levels=t.map(function(l){return new A.Level(l)})},S.onAudioTrackSwitching=function(r,n){var t=!!n.url;this.trackId=n.id;var l=this.fragCurrent;l&&l.abortRequests(),this.fragCurrent=null,this.clearWaitingFragment(),t?this.setInterval(E):this.resetTransmuxer(),t?(this.audioSwitch=!0,this.state=P.State.IDLE):this.state=P.State.STOPPED,this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},S.onLevelLoaded=function(r,n){this.mainDetails=n.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(M.Events.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},S.onAudioTrackLoaded=function(r,n){var t;if(this.mainDetails==null){this.cachedTrackLoadedData=n;return}var l=this.levels,x=n.details,y=n.id;if(!l){this.warn("Audio tracks were reset while loading level "+y);return}this.log("Track "+y+" loaded ["+x.startSN+","+x.endSN+"],duration:"+x.totalduration);var c=l[y],_=0;if(x.live||(t=c.details)!==null&&t!==void 0&&t.live){var D=this.mainDetails;if(x.fragments[0]||(x.deltaUpdateFailed=!0),x.deltaUpdateFailed||!D)return;!c.details&&x.hasProgramDateTime&&D.hasProgramDateTime?((0,m.alignMediaPlaylistByPDT)(x,D),_=x.fragments[0].start):_=this.alignPlaylists(x,c.details)}c.details=x,this.levelLastLoaded=y,!this.startFragRequested&&(this.mainDetails||!x.live)&&this.setStartPosition(c.details,_),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(x)&&(this.state=P.State.IDLE),this.tick()},S._handleFragmentLoadProgress=function(r){var n,t=r.frag,l=r.part,x=r.payload,y=this.config,c=this.trackId,_=this.levels;if(!_){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+t.sn+" of level "+t.level+" will not be buffered");return}var D=_[c];console.assert(D,"Audio track is defined on fragment load progress");var O=D.details;console.assert(O,"Audio track details are defined on fragment load progress");var k=y.defaultAudioCodec||D.audioCodec||"mp4a.40.2",F=this.transmuxer;F||(F=this.transmuxer=new p.default(this.hls,f.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var G=this.initPTS[t.cc],H=(n=t.initSegment)===null||n===void 0?void 0:n.data;if(G!==void 0){var j=!1,Q=l?l.index:-1,ee=Q!==-1,ie=new u.ChunkMetadata(t.level,t.sn,t.stats.chunkCount,x.byteLength,Q,ee);F.push(x,H,k,"",t,l,O.totalduration,j,ie,G)}else{this.log("Unknown video PTS for cc "+t.cc+", waiting for video PTS before demuxing audio frag "+t.sn+" of ["+O.startSN+" ,"+O.endSN+"],track "+c);var se=this.waitingData=this.waitingData||{frag:t,part:l,cache:new h.default,complete:!1},le=se.cache;le.push(new Uint8Array(x)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},S._handleFragmentLoadComplete=function(r){if(this.waitingData){this.waitingData.complete=!0;return}T.prototype._handleFragmentLoadComplete.call(this,r)},S.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},S.onBufferCreated=function(r,n){var t=n.tracks.audio;t&&(this.mediaBuffer=t.buffer||null),n.tracks.video&&(this.videoBuffer=n.tracks.video.buffer||null)},S.onFragBuffered=function(r,n){var t=n.frag,l=n.part;if(t.type!==f.PlaylistLevelType.AUDIO){if(!this.loadedmetadata&&t.type===f.PlaylistLevelType.MAIN){var x;(x=this.videoBuffer||this.media)!==null&&x!==void 0&&x.buffered.length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(t)){this.warn("Fragment "+t.sn+(l?" p: "+l.index:"")+" of level "+t.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}t.sn!=="initSegment"&&(this.fragPrevious=t,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(t,l)},S.onError=function(r,n){if(n.type===o.ErrorTypes.KEY_SYSTEM_ERROR){this.onFragmentOrKeyLoadError(f.PlaylistLevelType.AUDIO,n);return}switch(n.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.FRAG_PARSING_ERROR:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(f.PlaylistLevelType.AUDIO,n);break;case o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==P.State.ERROR&&this.state!==P.State.STOPPED&&(this.state=n.fatal?P.State.ERROR:P.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(n.parent==="audio"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var t=!0,l=this.getFwdBufferInfo(this.mediaBuffer,f.PlaylistLevelType.AUDIO);l&&l.len>.5&&(t=!this.reduceMaxBufferLength(l.len)),t&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,T.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},S.onBufferFlushed=function(r,n){var t=n.type;t===g.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0,this.state===P.State.ENDED&&(this.state=P.State.IDLE))},S._handleTransmuxComplete=function(r){var n,t="audio",l=this.hls,x=r.remuxResult,y=r.chunkMeta,c=this.getCurrentContext(y);if(!c){this.warn("The loading context changed while buffering fragment "+y.sn+" of level "+y.level+". This chunk will not be buffered."),this.resetStartWhenNotLoaded(y.level);return}var _=c.frag,D=c.part,O=c.level.details,k=x.audio,F=x.text,G=x.id3,H=x.initSegment;if(!(this.fragContextChanged(_)||!O)){if(this.state=P.State.PARSING,this.audioSwitch&&k&&this.completeAudioSwitch(),H!=null&&H.tracks&&(this._bufferInitSegment(H.tracks,_,y),l.trigger(M.Events.FRAG_PARSING_INIT_SEGMENT,{frag:_,id:t,tracks:H.tracks})),k){var j=k.startPTS,Q=k.endPTS,ee=k.startDTS,ie=k.endDTS;D&&(D.elementaryStreams[g.ElementaryStreamTypes.AUDIO]={startPTS:j,endPTS:Q,startDTS:ee,endDTS:ie}),_.setElementaryStreamInfo(g.ElementaryStreamTypes.AUDIO,j,Q,ee,ie),this.bufferFragmentData(k,_,D,y)}if(G!=null&&(n=G.samples)!==null&&n!==void 0&&n.length){var se=a({id:t,frag:_,details:O},G);l.trigger(M.Events.FRAG_PARSING_METADATA,se)}if(F){var le=a({id:t,frag:_,details:O},F);l.trigger(M.Events.FRAG_PARSING_USERDATA,le)}}},S._bufferInitSegment=function(r,n,t){if(this.state===P.State.PARSING){r.video&&delete r.video;var l=r.audio;if(l){l.levelCodec=l.codec,l.id="audio",this.log("Init audio buffer, container:"+l.container+", codecs[parsed]=["+l.codec+"]"),this.hls.trigger(M.Events.BUFFER_CODECS,r);var x=l.initSegment;if(x!=null&&x.byteLength){var y={type:"audio",frag:n,part:null,chunkMeta:t,parent:n.type,data:x};this.hls.trigger(M.Events.BUFFER_APPENDING,y)}this.tick()}}},S.loadFragment=function(r,n,t){var l=this.fragmentTracker.getState(r);this.fragCurrent=r,(this.audioSwitch||l===I.FragmentState.NOT_LOADED||l===I.FragmentState.PARTIAL)&&(r.sn==="initSegment"?this._loadInitSegment(r,n):n.live&&!(0,C.isFiniteNumber)(this.initPTS[r.cc])?(this.log("Waiting for video PTS in continuity counter "+r.cc+" of live stream before loading audio fragment "+r.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,T.prototype.loadFragment.call(this,r,n,t)))},S.completeAudioSwitch=function(){var r=this.hls,n=this.media,t=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),T.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,r.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:t})},R}(P.default);const d=b},"./src/controller/audio-track-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>v});var C=L("./src/events.ts"),P=L("./src/errors.ts"),M=L("./src/controller/base-playlist-controller.ts"),e=L("./src/types/loader.ts");function I(m,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(m,f(i.key),i)}}function A(m,o,a){return o&&I(m.prototype,o),a&&I(m,a),Object.defineProperty(m,"prototype",{writable:!1}),m}function f(m){var o=g(m,"string");return typeof o=="symbol"?o:String(o)}function g(m,o){if(typeof m!="object"||m===null)return m;var a=m[Symbol.toPrimitive];if(a!==void 0){var i=a.call(m,o||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(m)}function h(m,o){m.prototype=Object.create(o.prototype),m.prototype.constructor=m,p(m,o)}function p(m,o){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i},p(m,o)}var u=function(m){h(o,m);function o(i){var s;return s=m.call(this,i,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var a=o.prototype;return a.registerListeners=function(){var s=this.hls;s.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(C.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(C.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(C.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(C.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){var s=this.hls;s.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(C.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(C.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(C.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(C.Events.ERROR,this.onError,this)},a.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,m.prototype.destroy.call(this)},a.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},a.onManifestParsed=function(s,E){this.tracks=E.audioTracks||[]},a.onAudioTrackLoaded=function(s,E){var b=E.id,d=E.details,T=this.tracksInGroup[b];if(!T){this.warn("Invalid audio track id "+b);return}var R=T.details;T.details=E.details,this.log("audioTrack "+b+" loaded ["+d.startSN+"-"+d.endSN+"]"),b===this.trackId&&(this.retryCount=0,this.playlistLoaded(b,E,R))},a.onLevelLoading=function(s,E){this.switchLevel(E.level)},a.onLevelSwitching=function(s,E){this.switchLevel(E.level)},a.switchLevel=function(s){var E=this.hls.levels[s];if(E!=null&&E.audioGroupIds){var b=E.audioGroupIds[E.urlId];if(this.groupId!==b){this.groupId=b;var d=this.tracks.filter(function(R){return!b||R.groupId===b});this.selectDefaultTrack&&!d.some(function(R){return R.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=d;var T={audioTracks:d};this.log("Updating audio tracks, "+d.length+' track(s) found in "'+b+'" group-id'),this.hls.trigger(C.Events.AUDIO_TRACKS_UPDATED,T),this.selectInitialTrack()}}},a.onError=function(s,E){m.prototype.onError.call(this,s,E),!(E.fatal||!E.context)&&E.context.type===e.PlaylistContextType.AUDIO_TRACK&&E.context.id===this.trackId&&E.context.groupId===this.groupId&&this.retryLoadingOrFail(E)},a.setAudioTrack=function(s){var E=this.tracksInGroup;if(s<0||s>=E.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var b=E[this.trackId];this.log("Now switching to audio-track index "+s);var d=E[s],T=d.id,R=d.groupId,S=R===void 0?"":R,w=d.name,r=d.type,n=d.url;if(this.trackId=s,this.trackName=w,this.selectDefaultTrack=!1,this.hls.trigger(C.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:S,name:w,type:r,url:n}),!(d.details&&!d.details.live)){var t=this.switchParams(d.url,b==null?void 0:b.details);this.loadPlaylist(t)}},a.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var E=this.trackName,b=this.findTrackId(E)||this.findTrackId();b!==-1?this.setAudioTrack(b):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(C.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},a.findTrackId=function(s){for(var E=this.tracksInGroup,b=0;b<E.length;b++){var d=E[b];if((!this.selectDefaultTrack||d.default)&&(!s||s===d.name))return d.id}return-1},a.loadPlaylist=function(s){m.prototype.loadPlaylist.call(this);var E=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(E)){var b=E.id,d=E.groupId,T=E.url;if(s)try{T=s.addDirectives(T)}catch(R){this.warn("Could not construct new URL with HLS Delivery Directives: "+R)}this.log("loading audio-track playlist for id: "+b),this.clearTimer(),this.hls.trigger(C.Events.AUDIO_TRACK_LOADING,{url:T,id:b,groupId:d,deliveryDirectives:s||null})}},A(o,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),o}(M.default);const v=u},"./src/controller/base-playlist-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>I});var C=L("./src/types/level.ts"),P=L("./src/controller/level-helper.ts"),M=L("./src/utils/logger.ts"),e=L("./src/errors.ts"),I=function(){function A(g,h){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=M.logger.log.bind(M.logger,h+":"),this.warn=M.logger.warn.bind(M.logger,h+":"),this.hls=g}var f=A.prototype;return f.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},f.onError=function(h,p){p.fatal&&(p.type===e.ErrorTypes.NETWORK_ERROR||p.type===e.ErrorTypes.KEY_SYSTEM_ERROR)&&this.stopLoad()},f.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},f.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.requestScheduled=-1,this.loadPlaylist()},f.stopLoad=function(){this.canLoad=!1,this.clearTimer()},f.switchParams=function(h,p){var u=p==null?void 0:p.renditionReports;if(u)for(var v=0;v<u.length;v++){var m=u[v],o=void 0;try{o=new self.URL(m.URI,p.url).href}catch(E){M.logger.warn("Could not construct new URL for Rendition Report: "+E),o=m.URI||""}if(o===h.slice(-o.length)){var a=parseInt(m["LAST-MSN"])||(p==null?void 0:p.lastPartSn),i=parseInt(m["LAST-PART"])||(p==null?void 0:p.lastPartIndex);if(this.hls.config.lowLatencyMode){var s=Math.min(p.age-p.partTarget,p.targetduration);i>=0&&s>p.partTarget&&(i+=1)}return new C.HlsUrlParameters(a,i>=0?i:void 0,C.HlsSkip.No)}}},f.loadPlaylist=function(h){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())},f.shouldLoadTrack=function(h){return this.canLoad&&h&&!!h.url&&(!h.details||h.details.live)},f.playlistLoaded=function(h,p,u){var v=this,m=p.details,o=p.stats,a=self.performance.now(),i=o.loading.first?Math.max(0,a-o.loading.first):0;if(m.advancedDateTime=Date.now()-i,m.live||u!=null&&u.live){if(m.reloaded(u),u&&this.log("live playlist "+h+" "+(m.advanced?"REFRESHED "+m.lastPartSn+"-"+m.lastPartIndex:"MISSED")),u&&m.fragments.length>0&&(0,P.mergeDetails)(u,m),!this.canLoad||!m.live)return;var s,E=void 0,b=void 0;if(m.canBlockReload&&m.endSN&&m.advanced){var d=this.hls.config.lowLatencyMode,T=m.lastPartSn,R=m.endSN,S=m.lastPartIndex,w=S!==-1,r=T===R,n=d?0:S;w?(E=r?R+1:T,b=r?n:S+1):E=R+1;var t=m.age,l=t+m.ageHeader,x=Math.min(l-m.partTarget,m.targetduration*1.5);if(x>0){if(u&&x>u.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+u.tuneInGoal+" to: "+x+" with playlist age: "+m.age),x=0;else{var y=Math.floor(x/m.targetduration);if(E+=y,b!==void 0){var c=Math.round(x%m.targetduration/m.partTarget);b+=c}this.log("CDN Tune-in age: "+m.ageHeader+"s last advanced "+t.toFixed(2)+"s goal: "+x+" skip sn "+y+" to part "+b)}m.tuneInGoal=x}if(s=this.getDeliveryDirectives(m,p.deliveryDirectives,E,b),d||!r){this.loadPlaylist(s);return}}else s=this.getDeliveryDirectives(m,p.deliveryDirectives,E,b);var _=this.hls.mainForwardBufferInfo,D=_?_.end-_.len:0,O=(m.edge-D)*1e3,k=(0,P.computeReloadInterval)(m,O);m.updated?a>this.requestScheduled+k&&(this.requestScheduled=o.loading.start):this.requestScheduled=-1,E!==void 0&&m.canBlockReload?this.requestScheduled=o.loading.first+k-(m.partTarget*1e3||1e3):this.requestScheduled=(this.requestScheduled===-1?a:this.requestScheduled)+k;var F=this.requestScheduled-a;F=Math.max(0,F),this.log("reload live playlist "+h+" in "+Math.round(F)+" ms"),this.timer=self.setTimeout(function(){return v.loadPlaylist(s)},F)}else this.clearTimer()},f.getDeliveryDirectives=function(h,p,u,v){var m=(0,C.getSkipValue)(h,u);return p!=null&&p.skip&&h.deltaUpdateFailed&&(u=p.msn,v=p.part,m=C.HlsSkip.No),new C.HlsUrlParameters(u,v,m)},f.retryLoadingOrFail=function(h){var p=this,u=this.hls.config,v=this.retryCount<u.levelLoadingMaxRetry;if(v){var m;if(this.requestScheduled=-1,this.retryCount++,h.details.indexOf("LoadTimeOut")>-1&&(m=h.context)!==null&&m!==void 0&&m.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+h.details+'"'),this.loadPlaylist();else{var o=Math.min(Math.pow(2,this.retryCount)*u.levelLoadingRetryDelay,u.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return p.loadPlaylist()},o),this.warn("retry playlist loading #"+this.retryCount+" in "+o+' ms after "'+h.details+'"')}}else this.warn('cannot recover from error "'+h.details+'"'),this.clearTimer(),h.fatal=!0;return v},A}()},"./src/controller/base-stream-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{State:()=>w,default:()=>r});var C=L("./src/polyfills/number.ts"),P=L("./src/task-loop.ts"),M=L("./src/controller/fragment-tracker.ts"),e=L("./src/utils/buffer-helper.ts"),I=L("./src/utils/logger.ts"),A=L("./src/events.ts"),f=L("./src/errors.ts"),g=L("./src/types/transmuxer.ts"),h=L("./src/utils/mp4-tools.ts"),p=L("./src/utils/discontinuities.ts"),u=L("./src/controller/fragment-finders.ts"),v=L("./src/controller/level-helper.ts"),m=L("./src/loader/fragment-loader.ts"),o=L("./src/crypt/decrypter.ts"),a=L("./src/utils/time-ranges.ts"),i=L("./src/types/loader.ts");function s(n,t){for(var l=0;l<t.length;l++){var x=t[l];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(n,b(x.key),x)}}function E(n,t,l){return t&&s(n.prototype,t),l&&s(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n}function b(n){var t=d(n,"string");return typeof t=="symbol"?t:String(t)}function d(n,t){if(typeof n!="object"||n===null)return n;var l=n[Symbol.toPrimitive];if(l!==void 0){var x=l.call(n,t||"default");if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function T(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function R(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,S(n,t)}function S(n,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,y){return x.__proto__=y,x},S(n,t)}var w={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},r=function(n){R(t,n);function t(x,y,c,_){var D;return D=n.call(this)||this,D.hls=void 0,D.fragPrevious=null,D.fragCurrent=null,D.fragmentTracker=void 0,D.transmuxer=null,D._state=w.STOPPED,D.media=null,D.mediaBuffer=null,D.config=void 0,D.bitrateTest=!1,D.lastCurrentTime=0,D.nextLoadPosition=0,D.startPosition=0,D.loadedmetadata=!1,D.fragLoadError=0,D.retryDate=0,D.levels=null,D.fragmentLoader=void 0,D.keyLoader=void 0,D.levelLastLoaded=null,D.startFragRequested=!1,D.decrypter=void 0,D.initPTS=[],D.onvseeking=null,D.onvended=null,D.logPrefix="",D.log=void 0,D.warn=void 0,D.logPrefix=_,D.log=I.logger.log.bind(I.logger,_+":"),D.warn=I.logger.warn.bind(I.logger,_+":"),D.hls=x,D.fragmentLoader=new m.default(x.config),D.keyLoader=c,D.fragmentTracker=y,D.config=x.config,D.decrypter=new o.default(x.config),x.on(A.Events.LEVEL_SWITCHING,D.onLevelSwitching,T(D)),D}var l=t.prototype;return l.doTick=function(){this.onTickEnd()},l.onTickEnd=function(){},l.startLoad=function(y){},l.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort();var y=this.fragCurrent;y&&(y.abortRequests(),this.fragmentTracker.removeFragment(y)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=w.STOPPED},l._streamEnded=function(y,c){if(c.live||y.nextStart||!y.end||!this.media)return!1;var _=c.partList;if(_!=null&&_.length){var D=_[_.length-1],O=e.BufferHelper.isBuffered(this.media,D.start+D.duration/2);return O}var k=c.fragments[c.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(k)},l.getLevelDetails=function(){if(this.levels&&this.levelLastLoaded!==null){var y;return(y=this.levels[this.levelLastLoaded])===null||y===void 0?void 0:y.details}},l.onMediaAttached=function(y,c){var _=this.media=this.mediaBuffer=c.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),_.addEventListener("seeking",this.onvseeking),_.addEventListener("ended",this.onvended);var D=this.config;this.levels&&D.autoStartLoad&&this.state===w.STOPPED&&this.startLoad(D.startPosition)},l.onMediaDetaching=function(){var y=this.media;y!=null&&y.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),y&&this.onvseeking&&this.onvended&&(y.removeEventListener("seeking",this.onvseeking),y.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},l.onMediaSeeking=function(){var y=this.config,c=this.fragCurrent,_=this.media,D=this.mediaBuffer,O=this.state,k=_?_.currentTime:0,F=e.BufferHelper.bufferInfo(D||_,k,y.maxBufferHole);if(this.log("media seeking to "+((0,C.isFiniteNumber)(k)?k.toFixed(3):k)+", state: "+O),this.state===w.ENDED)this.resetLoadingState();else if(c){var G=y.maxFragLookUpTolerance,H=c.start-G,j=c.start+c.duration+G;if(!F.len||j<F.start||H>F.end){var Q=k>j;(k<H||Q)&&(Q&&c.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),c.abortRequests()),this.resetLoadingState())}}_&&(this.lastCurrentTime=k),!this.loadedmetadata&&!F.len&&(this.nextLoadPosition=this.startPosition=k),this.tickImmediate()},l.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},l.onLevelSwitching=function(y,c){this.fragLoadError=0},l.onHandlerDestroying=function(){this.stopLoad(),n.prototype.onHandlerDestroying.call(this)},l.onHandlerDestroyed=function(){this.state=w.STOPPED,this.hls.off(A.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,n.prototype.onHandlerDestroyed.call(this)},l.loadFragment=function(y,c,_){this._loadFragForPlayback(y,c,_)},l._loadFragForPlayback=function(y,c,_){var D=this,O=function(F){if(D.fragContextChanged(y)){D.warn("Fragment "+y.sn+(F.part?" p: "+F.part.index:"")+" of level "+y.level+" was dropped during download."),D.fragmentTracker.removeFragment(y);return}y.stats.chunkCount++,D._handleFragmentLoadProgress(F)};this._doFragLoad(y,c,_,O).then(function(k){if(k){D.fragLoadError=0;var F=D.state;if(D.fragContextChanged(y)){(F===w.FRAG_LOADING||!D.fragCurrent&&F===w.PARSING)&&(D.fragmentTracker.removeFragment(y),D.state=w.IDLE);return}"payload"in k&&(D.log("Loaded fragment "+y.sn+" of level "+y.level),D.hls.trigger(A.Events.FRAG_LOADED,k)),D._handleFragmentLoadComplete(k)}}).catch(function(k){D.state===w.STOPPED||D.state===w.ERROR||(D.warn(k),D.resetFragmentLoading(y))})},l.flushMainBuffer=function(y,c,_){if(_===void 0&&(_=null),!!(y-c)){var D={startOffset:y,endOffset:c,type:_};this.fragLoadError=0,this.hls.trigger(A.Events.BUFFER_FLUSHING,D)}},l._loadInitSegment=function(y,c){var _=this;this._doFragLoad(y,c).then(function(D){if(!D||_.fragContextChanged(y)||!_.levels)throw new Error("init load aborted");return D}).then(function(D){var O=_.hls,k=D.payload,F=y.decryptdata;if(k&&k.byteLength>0&&F&&F.key&&F.iv&&F.method==="AES-128"){var G=self.performance.now();return _.decrypter.decrypt(new Uint8Array(k),F.key.buffer,F.iv.buffer).then(function(H){var j=self.performance.now();return O.trigger(A.Events.FRAG_DECRYPTED,{frag:y,payload:H,stats:{tstart:G,tdecrypt:j}}),D.payload=H,D})}return D}).then(function(D){var O=_.fragCurrent,k=_.hls,F=_.levels;if(!F)throw new Error("init load aborted, missing levels");var G=F[y.level].details;console.assert(G,"Level details are defined when init segment is loaded");var H=y.stats;_.state=w.IDLE,_.fragLoadError=0,y.data=new Uint8Array(D.payload),H.parsing.start=H.buffering.start=self.performance.now(),H.parsing.end=H.buffering.end=self.performance.now(),D.frag===O&&k.trigger(A.Events.FRAG_BUFFERED,{stats:H,frag:O,part:null,id:y.type}),_.tick()}).catch(function(D){_.state===w.STOPPED||_.state===w.ERROR||(_.warn(D),_.resetFragmentLoading(y))})},l.fragContextChanged=function(y){var c=this.fragCurrent;return!y||!c||y.level!==c.level||y.sn!==c.sn||y.urlId!==c.urlId},l.fragBufferedComplete=function(y,c){var _,D,O,k,F=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+y.type+" sn: "+y.sn+(c?" part: "+c.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level+" (frag:["+((_=y.startPTS)!=null?_:NaN).toFixed(3)+"-"+((D=y.endPTS)!=null?D:NaN).toFixed(3)+"] > buffer:"+(F?a.default.toString(e.BufferHelper.getBuffered(F)):"(detached)")+")"),this.state=w.IDLE,F&&(!this.loadedmetadata&&y.type==i.PlaylistLevelType.MAIN&&F.buffered.length&&((O=this.fragCurrent)===null||O===void 0?void 0:O.sn)===((k=this.fragPrevious)===null||k===void 0?void 0:k.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},l.seekToStartPos=function(){},l._handleFragmentLoadComplete=function(y){var c=this.transmuxer;if(c){var _=y.frag,D=y.part,O=y.partsLoaded,k=!O||O.length===0||O.some(function(G){return!G}),F=new g.ChunkMetadata(_.level,_.sn,_.stats.chunkCount+1,0,D?D.index:-1,!k);c.flush(F)}},l._handleFragmentLoadProgress=function(y){},l._doFragLoad=function(y,c,_,D){var O,k=this;if(_===void 0&&(_=null),!this.levels)throw new Error("frag load aborted, missing levels");var F=null;if(y.encrypted&&!((O=y.decryptdata)!==null&&O!==void 0&&O.key)?(this.log("Loading key for "+y.sn+" of ["+c.startSN+"-"+c.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level),this.state=w.KEY_LOADING,this.fragCurrent=y,F=this.keyLoader.load(y).then(function(ee){if(!k.fragContextChanged(ee.frag))return k.hls.trigger(A.Events.KEY_LOADED,ee),k.state===w.KEY_LOADING&&(k.state=w.IDLE),ee}),this.hls.trigger(A.Events.KEY_LOADING,{frag:y}),this.throwIfFragContextChanged("KEY_LOADING")):!y.encrypted&&c.encryptedFragments.length&&this.keyLoader.loadClear(y,c.encryptedFragments),_=Math.max(y.start,_||0),this.config.lowLatencyMode&&c){var G=c.partList;if(G&&D){_>y.end&&c.fragmentHint&&(y=c.fragmentHint);var H=this.getNextPart(G,y,_);if(H>-1){var j=G[H];return this.log("Loading part sn: "+y.sn+" p: "+j.index+" cc: "+y.cc+" of playlist ["+c.startSN+"-"+c.endSN+"] parts [0-"+H+"-"+(G.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(_.toFixed(3))),this.nextLoadPosition=j.start+j.duration,this.state=w.FRAG_LOADING,this.hls.trigger(A.Events.FRAG_LOADING,{frag:y,part:G[H],targetBufferTime:_}),this.throwIfFragContextChanged("FRAG_LOADING parts"),F?F.then(function(ee){return!ee||k.fragContextChanged(ee.frag)?null:k.doFragPartsLoad(y,G,H,D)}).catch(function(ee){return k.handleFragLoadError(ee)}):this.doFragPartsLoad(y,G,H,D).catch(function(ee){return k.handleFragLoadError(ee)})}else if(!y.url||this.loadedEndOfParts(G,_))return Promise.resolve(null)}}this.log("Loading fragment "+y.sn+" cc: "+y.cc+" "+(c?"of ["+c.startSN+"-"+c.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(_.toFixed(3))),(0,C.isFiniteNumber)(y.sn)&&!this.bitrateTest&&(this.nextLoadPosition=y.start+y.duration),this.state=w.FRAG_LOADING,this.hls.trigger(A.Events.FRAG_LOADING,{frag:y,targetBufferTime:_}),this.throwIfFragContextChanged("FRAG_LOADING");var Q=this.config.progressive;return Q&&F?F.then(function(ee){return!ee||k.fragContextChanged(ee==null?void 0:ee.frag)?null:k.fragmentLoader.load(y,D)}).catch(function(ee){return k.handleFragLoadError(ee)}):Promise.all([this.fragmentLoader.load(y,Q?D:void 0),F]).then(function(ee){var ie=ee[0];return!Q&&ie&&D&&D(ie),ie}).catch(function(ee){return k.handleFragLoadError(ee)})},l.throwIfFragContextChanged=function(y){if(this.fragCurrent===null)throw new Error("frag load aborted, context changed in "+y)},l.doFragPartsLoad=function(y,c,_,D){var O=this;return new Promise(function(k,F){var G=[],H=function j(Q){var ee=c[Q];O.fragmentLoader.loadPart(y,ee,D).then(function(ie){G[ee.index]=ie;var se=ie.part;O.hls.trigger(A.Events.FRAG_LOADED,ie);var le=c[Q+1];if(le&&le.fragment===y)j(Q+1);else return k({frag:y,part:se,partsLoaded:G})}).catch(F)};H(_)})},l.handleFragLoadError=function(y){if("data"in y){var c=y.data;y.data&&c.details===f.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(c.frag,c.part):this.hls.trigger(A.Events.ERROR,c)}else this.hls.trigger(A.Events.ERROR,{type:f.ErrorTypes.OTHER_ERROR,details:f.ErrorDetails.INTERNAL_EXCEPTION,err:y,fatal:!0});return null},l._handleTransmuxerFlush=function(y){var c=this.getCurrentContext(y);if(!c||this.state!==w.PARSING){!this.fragCurrent&&this.state!==w.STOPPED&&this.state!==w.ERROR&&(this.state=w.IDLE);return}var _=c.frag,D=c.part,O=c.level,k=self.performance.now();_.stats.parsing.end=k,D&&(D.stats.parsing.end=k),this.updateLevelTiming(_,D,O,y.partial)},l.getCurrentContext=function(y){var c=this.levels,_=y.level,D=y.sn,O=y.part;if(!c||!c[_])return this.warn("Levels object was unset while buffering fragment "+D+" of level "+_+". The current chunk will not be buffered."),null;var k=c[_],F=O>-1?(0,v.getPartWith)(k,D,O):null,G=F?F.fragment:(0,v.getFragmentWithSN)(k,D,this.fragCurrent);return G?{frag:G,part:F,level:k}:null},l.bufferFragmentData=function(y,c,_,D){if(!(!y||this.state!==w.PARSING)){var O=y.data1,k=y.data2,F=O;if(O&&k&&(F=(0,h.appendUint8Array)(O,k)),!(!F||!F.length)){var G={type:y.type,frag:c,part:_,chunkMeta:D,parent:c.type,data:F};this.hls.trigger(A.Events.BUFFER_APPENDING,G),y.dropped&&y.independent&&!_&&this.flushBufferGap(c)}}},l.flushBufferGap=function(y){var c=this.media;if(c){if(!e.BufferHelper.isBuffered(c,c.currentTime)){this.flushMainBuffer(0,y.start);return}var _=c.currentTime,D=e.BufferHelper.bufferInfo(c,_,0),O=y.duration,k=Math.min(this.config.maxFragLookUpTolerance*2,O*.25),F=Math.max(Math.min(y.start-k,D.end-k),_+k);y.start-F>k&&this.flushMainBuffer(F,y.start)}},l.getFwdBufferInfo=function(y,c){var _=this.config,D=this.getLoadPosition();if(!(0,C.isFiniteNumber)(D))return null;var O=e.BufferHelper.bufferInfo(y,D,_.maxBufferHole);if(O.len===0&&O.nextStart!==void 0){var k=this.fragmentTracker.getBufferedFrag(D,c);if(k&&O.nextStart<k.end)return e.BufferHelper.bufferInfo(y,D,Math.max(O.nextStart,_.maxBufferHole))}return O},l.getMaxBufferLength=function(y){var c=this.config,_;return y?_=Math.max(8*c.maxBufferSize/y,c.maxBufferLength):_=c.maxBufferLength,Math.min(_,c.maxMaxBufferLength)},l.reduceMaxBufferLength=function(y){var c=this.config,_=y||c.maxBufferLength;return c.maxMaxBufferLength>=_?(c.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+c.maxMaxBufferLength+"s"),!0):!1},l.getNextFragment=function(y,c){var _=c.fragments,D=_.length;if(!D)return null;var O=this.config,k=_[0].start,F;if(c.live){var G=O.initialLiveManifestSize;if(D<G)return this.warn("Not enough fragments to start playback (have: "+D+", need: "+G+")"),null;!c.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(F=this.getInitialLiveFragment(c,_),this.startPosition=F?this.hls.liveSyncPosition||F.start:y)}else y<=k&&(F=_[0]);if(!F){var H=O.lowLatencyMode?c.partEnd:c.fragmentEnd;F=this.getFragmentAtPosition(y,H,c)}return this.mapToInitFragWhenRequired(F)},l.mapToInitFragWhenRequired=function(y){return y!=null&&y.initSegment&&!(y!=null&&y.initSegment.data)&&!this.bitrateTest?y.initSegment:y},l.getNextPart=function(y,c,_){for(var D=-1,O=!1,k=!0,F=0,G=y.length;F<G;F++){var H=y[F];if(k=k&&!H.independent,D>-1&&_<H.start)break;var j=H.loaded;j?D=-1:(O||H.independent||k)&&H.fragment===c&&(D=F),O=j}return D},l.loadedEndOfParts=function(y,c){var _=y[y.length-1];return _&&c>_.start&&_.loaded},l.getInitialLiveFragment=function(y,c){var _=this.fragPrevious,D=null;if(_){if(y.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+_.programDateTime),D=(0,u.findFragmentByPDT)(c,_.endProgramDateTime,this.config.maxFragLookUpTolerance)),!D){var O=_.sn+1;if(O>=y.startSN&&O<=y.endSN){var k=c[O-y.startSN];_.cc===k.cc&&(D=k,this.log("Live playlist, switching playlist, load frag with next SN: "+D.sn))}D||(D=(0,u.findFragWithCC)(c,_.cc),D&&this.log("Live playlist, switching playlist, load frag with same CC: "+D.sn))}}else{var F=this.hls.liveSyncPosition;F!==null&&(D=this.getFragmentAtPosition(F,this.bitrateTest?y.fragmentEnd:y.edge,y))}return D},l.getFragmentAtPosition=function(y,c,_){var D=this.config,O=this.fragPrevious,k=_.fragments,F=_.endSN,G=_.fragmentHint,H=D.maxFragLookUpTolerance,j=!!(D.lowLatencyMode&&_.partList&&G);j&&G&&!this.bitrateTest&&(k=k.concat(G),F=G.sn);var Q;if(y<c){var ee=y>c-H?0:H;Q=(0,u.findFragmentByPTS)(O,k,y,ee)}else Q=k[k.length-1];if(Q){var ie=Q.sn-_.startSN;if(this.fragmentTracker.getState(Q)===M.FragmentState.OK&&(O=Q),O&&Q.sn===O.sn&&!j){var se=O&&Q.level===O.level;if(se){var le=k[ie+1];Q.sn<F&&this.fragmentTracker.getState(le)!==M.FragmentState.OK?(this.log("SN "+Q.sn+" just loaded, load next one: "+le.sn),Q=le):Q=null}}}return Q},l.synchronizeToLiveEdge=function(y){var c=this.config,_=this.media;if(_){var D=this.hls.liveSyncPosition,O=_.currentTime,k=y.fragments[0].start,F=y.edge,G=O>=k-c.maxFragLookUpTolerance&&O<=F;if(D!==null&&_.duration>D&&(O<D||!G)){var H=c.liveMaxLatencyDuration!==void 0?c.liveMaxLatencyDuration:c.liveMaxLatencyDurationCount*y.targetduration;(!G&&_.readyState<4||O<F-H)&&(this.loadedmetadata||(this.nextLoadPosition=D),_.readyState&&(this.warn("Playback: "+O.toFixed(3)+" is located too far from the end of live sliding playlist: "+F+", reset currentTime to : "+D.toFixed(3)),_.currentTime=D))}}},l.alignPlaylists=function(y,c){var _=this.levels,D=this.levelLastLoaded,O=this.fragPrevious,k=D!==null?_[D]:null,F=y.fragments.length;if(!F)return this.warn("No fragments in live playlist"),0;var G=y.fragments[0].start,H=!c,j=y.alignedSliding&&(0,C.isFiniteNumber)(G);if(H||!j&&!G){(0,p.alignStream)(O,k,y);var Q=y.fragments[0].start;return this.log("Live playlist sliding: "+Q.toFixed(2)+" start-sn: "+(c?c.startSN:"na")+"->"+y.startSN+" prev-sn: "+(O?O.sn:"na")+" fragments: "+F),Q}return G},l.waitForCdnTuneIn=function(y){var c=3;return y.live&&y.canBlockReload&&y.partTarget&&y.tuneInGoal>Math.max(y.partHoldBack,y.partTarget*c)},l.setStartPosition=function(y,c){var _=this.startPosition;if(_<c&&(_=-1),_===-1||this.lastCurrentTime===-1){var D=y.startTimeOffset;(0,C.isFiniteNumber)(D)?(_=c+D,D<0&&(_+=y.totalduration),_=Math.min(Math.max(c,_),c+y.totalduration),this.log("Start time offset "+D+" found in playlist, adjust startPosition to "+_),this.startPosition=_):y.live?_=this.hls.liveSyncPosition||c:this.startPosition=_=0,this.lastCurrentTime=_}this.nextLoadPosition=_},l.getLoadPosition=function(){var y=this.media,c=0;return this.loadedmetadata&&y?c=y.currentTime:this.nextLoadPosition&&(c=this.nextLoadPosition),c},l.handleFragLoadAborted=function(y,c){this.transmuxer&&y.sn!=="initSegment"&&y.stats.aborted&&(this.warn("Fragment "+y.sn+(c?" part"+c.index:"")+" of level "+y.level+" was aborted"),this.resetFragmentLoading(y))},l.resetFragmentLoading=function(y){(!this.fragCurrent||!this.fragContextChanged(y)&&this.state!==w.FRAG_LOADING_WAITING_RETRY)&&(this.state=w.IDLE)},l.onFragmentOrKeyLoadError=function(y,c){if(c.fatal){this.stopLoad(),this.state=w.ERROR;return}var _=this.config;if(c.chunkMeta){var D=this.getCurrentContext(c.chunkMeta);D&&(c.frag=D.frag,c.levelRetry=!0,this.fragLoadError=_.fragLoadingMaxRetry)}var O=c.frag;if(!(!O||O.type!==y)){var k=this.fragCurrent;if(console.assert(k&&O.sn===k.sn&&O.level===k.level&&O.urlId===k.urlId,"Frag load error must match current frag to retry"),this.fragLoadError+1<=_.fragLoadingMaxRetry){this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition);var F=Math.min(Math.pow(2,this.fragLoadError)*_.fragLoadingRetryDelay,_.fragLoadingMaxRetryTimeout);this.warn("Fragment "+O.sn+" of "+y+" "+O.level+" failed to load, retrying in "+F+"ms"),this.retryDate=self.performance.now()+F,this.fragLoadError++,this.state=w.FRAG_LOADING_WAITING_RETRY}else c.levelRetry?(y===i.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=w.IDLE):(I.logger.error(c.details+" reaches max retry, redispatch as fatal ..."),c.fatal=!0,this.hls.stopLoad(),this.state=w.ERROR)}},l.afterBufferFlushed=function(y,c,_){if(y){var D=e.BufferHelper.getBuffered(y);this.fragmentTracker.detectEvictedFragments(c,D,_),this.state===w.ENDED&&this.resetLoadingState()}},l.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE},l.resetStartWhenNotLoaded=function(y){if(!this.loadedmetadata){this.startFragRequested=!1;var c=this.levels?this.levels[y].details:null;c!=null&&c.live?(this.startPosition=-1,this.setStartPosition(c,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},l.updateLevelTiming=function(y,c,_,D){var O=this,k=_.details;console.assert(!!k,"level.details must be defined");var F=Object.keys(y.elementaryStreams).reduce(function(G,H){var j=y.elementaryStreams[H];if(j){var Q=j.endPTS-j.startPTS;if(Q<=0)return O.warn("Could not parse fragment "+y.sn+" "+H+" duration reliably ("+Q+")"),G||!1;var ee=D?0:(0,v.updateFragPTSDTS)(k,y,j.startPTS,j.endPTS,j.startDTS,j.endDTS);return O.hls.trigger(A.Events.LEVEL_PTS_UPDATED,{details:k,level:_,drift:ee,type:H,frag:y,start:j.startPTS,end:j.endPTS}),!0}return G},!1);F||(this.warn("Found no media in fragment "+y.sn+" of level "+_.id+" resetting transmuxer to fallback to playlist timing"),this.resetTransmuxer()),this.state=w.PARSED,this.hls.trigger(A.Events.FRAG_PARSED,{frag:y,part:c})},l.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},E(t,[{key:"state",get:function(){return this._state},set:function(y){var c=this._state;c!==y&&(this._state=y,this.log(c+"->"+y))}}]),t}(P.default)},"./src/controller/buffer-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>u});var C=L("./src/polyfills/number.ts"),P=L("./src/events.ts"),M=L("./src/utils/logger.ts"),e=L("./src/errors.ts"),I=L("./src/utils/buffer-helper.ts"),A=L("./src/utils/mediasource-helper.ts"),f=L("./src/loader/fragment.ts"),g=L("./src/controller/buffer-operation-queue.ts"),h=(0,A.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,u=function(){function v(o){var a=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var i=a.media,s=a.mediaSource;M.logger.log("[buffer-controller]: Media source opened"),i&&(i.removeEventListener("emptied",a._onMediaEmptied),a.updateMediaElementDuration(),a.hls.trigger(P.Events.MEDIA_ATTACHED,{media:i})),s&&s.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){M.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){M.logger.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var i=a.media,s=a._objectUrl;i&&i.src!==s&&M.logger.error("Media element src was set while attaching MediaSource ("+s+" > "+i.src+")")},this.hls=o,this._initSourceBuffer(),this.registerListeners()}var m=v.prototype;return m.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},m.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},m.registerListeners=function(){var a=this.hls;a.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(P.Events.BUFFER_RESET,this.onBufferReset,this),a.on(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(P.Events.BUFFER_EOS,this.onBufferEos,this),a.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(P.Events.FRAG_PARSED,this.onFragParsed,this),a.on(P.Events.FRAG_CHANGED,this.onFragChanged,this)},m.unregisterListeners=function(){var a=this.hls;a.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(P.Events.BUFFER_RESET,this.onBufferReset,this),a.off(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(P.Events.BUFFER_EOS,this.onBufferEos,this),a.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(P.Events.FRAG_PARSED,this.onFragParsed,this),a.off(P.Events.FRAG_CHANGED,this.onFragChanged,this)},m._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new g.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},m.onManifestParsed=function(a,i){var s=2;(i.audio&&!i.video||!i.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.details=null,M.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},m.onMediaAttaching=function(a,i){var s=this.media=i.media;if(s&&h){var E=this.mediaSource=new h;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),s.src=self.URL.createObjectURL(E),this._objectUrl=s.src,s.addEventListener("emptied",this._onMediaEmptied)}},m.onMediaDetaching=function(){var a=this.media,i=this.mediaSource,s=this._objectUrl;if(i){if(M.logger.log("[buffer-controller]: media source detaching"),i.readyState==="open")try{i.endOfStream()}catch(E){M.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(a.removeEventListener("emptied",this._onMediaEmptied),s&&self.URL.revokeObjectURL(s),a.src===s?(a.removeAttribute("src"),a.load()):M.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(P.Events.MEDIA_DETACHED,void 0)},m.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(i){var s=a.sourceBuffer[i];try{s&&(a.removeBufferListeners(i),a.mediaSource&&a.mediaSource.removeSourceBuffer(s),a.sourceBuffer[i]=void 0)}catch(E){M.logger.warn("[buffer-controller]: Failed to reset the "+i+" buffer",E)}}),this._initSourceBuffer()},m.onBufferCodecs=function(a,i){var s=this,E=this.getSourceBufferTypes().length;Object.keys(i).forEach(function(b){if(E){var d=s.tracks[b];if(d&&typeof d.buffer.changeType=="function"){var T=i[b],R=T.id,S=T.codec,w=T.levelCodec,r=T.container,n=T.metadata,t=(d.levelCodec||d.codec).replace(p,"$1"),l=(w||S).replace(p,"$1");if(t!==l){var x=r+";codecs="+(w||S);s.appendChangeType(b,x),M.logger.log("[buffer-controller]: switching codec "+t+" to "+l),s.tracks[b]={buffer:d.buffer,codec:S,container:r,levelCodec:w,metadata:n,id:R}}}}else s.pendingTracks[b]=i[b]}),!E&&(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())},m.appendChangeType=function(a,i){var s=this,E=this.operationQueue,b={execute:function(){var T=s.sourceBuffer[a];T&&(M.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+i),T.changeType(i)),E.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(T){M.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",T)}};E.append(b,a)},m.onBufferAppending=function(a,i){var s=this,E=this.hls,b=this.operationQueue,d=this.tracks,T=i.data,R=i.type,S=i.frag,w=i.part,r=i.chunkMeta,n=r.buffering[R],t=self.performance.now();n.start=t;var l=S.stats.buffering,x=w?w.stats.buffering:null;l.start===0&&(l.start=t),x&&x.start===0&&(x.start=t);var y=d.audio,c=!1;R==="audio"&&(y==null?void 0:y.container)==="audio/mpeg"&&(c=!this.lastMpegAudioChunk||r.id===1||this.lastMpegAudioChunk.sn!==r.sn,this.lastMpegAudioChunk=r);var _=S.start,D={execute:function(){if(n.executeStart=self.performance.now(),c){var k=s.sourceBuffer[R];if(k){var F=_-k.timestampOffset;Math.abs(F)>=.1&&(M.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_+" (delta: "+F+") sn: "+S.sn+")"),k.timestampOffset=_)}}s.appendExecutor(T,R)},onStart:function(){},onComplete:function(){var k=self.performance.now();n.executeEnd=n.end=k,l.first===0&&(l.first=k),x&&x.first===0&&(x.first=k);var F=s.sourceBuffer,G={};for(var H in F)G[H]=I.BufferHelper.getBuffered(F[H]);s.appendError=0,s.hls.trigger(P.Events.BUFFER_APPENDED,{type:R,frag:S,part:w,chunkMeta:r,parent:S.type,timeRanges:G})},onError:function(k){M.logger.error("[buffer-controller]: Error encountered while trying to append to the "+R+" SourceBuffer",k);var F={type:e.ErrorTypes.MEDIA_ERROR,parent:S.type,details:e.ErrorDetails.BUFFER_APPEND_ERROR,err:k,fatal:!1};k.code===DOMException.QUOTA_EXCEEDED_ERR?F.details=e.ErrorDetails.BUFFER_FULL_ERROR:(s.appendError++,F.details=e.ErrorDetails.BUFFER_APPEND_ERROR,s.appendError>E.config.appendErrorMaxRetry&&(M.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),F.fatal=!0,E.stopLoad())),E.trigger(P.Events.ERROR,F)}};b.append(D,R)},m.onBufferFlushing=function(a,i){var s=this,E=this.operationQueue,b=function(T){return{execute:s.removeExecutor.bind(s,T,i.startOffset,i.endOffset),onStart:function(){},onComplete:function(){s.hls.trigger(P.Events.BUFFER_FLUSHED,{type:T})},onError:function(S){M.logger.warn("[buffer-controller]: Failed to remove from "+T+" SourceBuffer",S)}}};i.type?E.append(b(i.type),i.type):this.getSourceBufferTypes().forEach(function(d){E.append(b(d),d)})},m.onFragParsed=function(a,i){var s=this,E=i.frag,b=i.part,d=[],T=b?b.elementaryStreams:E.elementaryStreams;T[f.ElementaryStreamTypes.AUDIOVIDEO]?d.push("audiovideo"):(T[f.ElementaryStreamTypes.AUDIO]&&d.push("audio"),T[f.ElementaryStreamTypes.VIDEO]&&d.push("video"));var R=function(){var w=self.performance.now();E.stats.buffering.end=w,b&&(b.stats.buffering.end=w);var r=b?b.stats:E.stats;s.hls.trigger(P.Events.FRAG_BUFFERED,{frag:E,part:b,stats:r,id:E.type})};d.length===0&&M.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+E.type+" level: "+E.level+" sn: "+E.sn),this.blockBuffers(R,d)},m.onFragChanged=function(a,i){this.flushBackBuffer()},m.onBufferEos=function(a,i){var s=this,E=this.getSourceBufferTypes().reduce(function(b,d){var T=s.sourceBuffer[d];return T&&(!i.type||i.type===d)&&(T.ending=!0,T.ended||(T.ended=!0,M.logger.log("[buffer-controller]: "+d+" sourceBuffer now EOS"))),b&&!!(!T||T.ended)},!0);E&&(M.logger.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(function(){s.getSourceBufferTypes().forEach(function(d){var T=s.sourceBuffer[d];T&&(T.ending=!1)});var b=s.mediaSource;if(!b||b.readyState!=="open"){b&&M.logger.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+b.readyState);return}M.logger.log("[buffer-controller]: Calling mediaSource.endOfStream()"),b.endOfStream()}))},m.onLevelUpdated=function(a,i){var s=i.details;s.fragments.length&&(this.details=s,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},m.flushBackBuffer=function(){var a=this.hls,i=this.details,s=this.media,E=this.sourceBuffer;if(!(!s||i===null)){var b=this.getSourceBufferTypes();if(b.length){var d=i.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!(!(0,C.isFiniteNumber)(d)||d<0)){var T=s.currentTime,R=i.levelTargetDuration,S=Math.max(d,R),w=Math.floor(T/R)*R-S;b.forEach(function(r){var n=E[r];if(n){var t=I.BufferHelper.getBuffered(n);if(t.length>0&&w>t.start(0)){if(a.trigger(P.Events.BACK_BUFFER_REACHED,{bufferEnd:w}),i.live)a.trigger(P.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:w});else if(n.ended&&t.end(t.length-1)-T<R*2){M.logger.info("[buffer-controller]: Cannot flush "+r+" back buffer while SourceBuffer is in ended state");return}a.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:w,type:r})}}})}}}},m.updateMediaElementDuration=function(){if(!(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")){var a=this.details,i=this.hls,s=this.media,E=this.mediaSource,b=a.fragments[0].start+a.totalduration,d=s.duration,T=(0,C.isFiniteNumber)(E.duration)?E.duration:0;a.live&&i.config.liveDurationInfinity?(M.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.duration=1/0,this.updateSeekableRange(a)):(b>T&&b>d||!(0,C.isFiniteNumber)(d))&&(M.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),E.duration=b)}},m.updateSeekableRange=function(a){var i=this.mediaSource,s=a.fragments,E=s.length;if(E&&a.live&&i!==null&&i!==void 0&&i.setLiveSeekableRange){var b=Math.max(0,s[0].start),d=Math.max(b,b+a.totalduration);i.setLiveSeekableRange(b,d)}},m.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,i=this.operationQueue,s=this.pendingTracks,E=Object.keys(s).length;if(E&&!a||E===2){this.createSourceBuffers(s),this.pendingTracks={};var b=this.getSourceBufferTypes();if(b.length===0){this.hls.trigger(P.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}b.forEach(function(d){i.executeNext(d)})}},m.createSourceBuffers=function(a){var i=this.sourceBuffer,s=this.mediaSource;if(!s)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var b in a)if(!i[b]){var d=a[b];if(!d)throw Error("source buffer exists for track "+b+", however track does not");var T=d.levelCodec||d.codec,R=d.container+";codecs="+T;M.logger.log("[buffer-controller]: creating sourceBuffer("+R+")");try{var S=i[b]=s.addSourceBuffer(R),w=b;this.addBufferListener(w,"updatestart",this._onSBUpdateStart),this.addBufferListener(w,"updateend",this._onSBUpdateEnd),this.addBufferListener(w,"error",this._onSBUpdateError),this.tracks[b]={buffer:S,codec:T,container:d.container,levelCodec:d.levelCodec,metadata:d.metadata,id:d.id},E++}catch(r){M.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+r.message),this.hls.trigger(P.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:r,mimeType:R})}}E&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},m._onSBUpdateStart=function(a){var i=this.operationQueue,s=i.current(a);s.onStart()},m._onSBUpdateEnd=function(a){var i=this.operationQueue,s=i.current(a);s.onComplete(),i.shiftAndExecuteNext(a)},m._onSBUpdateError=function(a,i){M.logger.error("[buffer-controller]: "+a+" SourceBuffer error",i),this.hls.trigger(P.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var s=this.operationQueue.current(a);s&&s.onError(i)},m.removeExecutor=function(a,i,s){var E=this.media,b=this.mediaSource,d=this.operationQueue,T=this.sourceBuffer,R=T[a];if(!E||!b||!R){M.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),d.shiftAndExecuteNext(a);return}var S=(0,C.isFiniteNumber)(E.duration)?E.duration:1/0,w=(0,C.isFiniteNumber)(b.duration)?b.duration:1/0,r=Math.max(0,i),n=Math.min(s,S,w);n>r&&!R.ending?(R.ended=!1,M.logger.log("[buffer-controller]: Removing ["+r+","+n+"] from the "+a+" SourceBuffer"),console.assert(!R.updating,a+" sourceBuffer must not be updating"),R.remove(r,n)):d.shiftAndExecuteNext(a)},m.appendExecutor=function(a,i){var s=this.operationQueue,E=this.sourceBuffer,b=E[i];if(!b){M.logger.warn("[buffer-controller]: Attempting to append to the "+i+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(i);return}b.ended=!1,console.assert(!b.updating,i+" sourceBuffer must not be updating"),b.appendBuffer(a)},m.blockBuffers=function(a,i){var s=this;if(i===void 0&&(i=this.getSourceBufferTypes()),!i.length){M.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(a);return}var E=this.operationQueue,b=i.map(function(d){return E.appendBlocker(d)});Promise.all(b).then(function(){a(),i.forEach(function(d){var T=s.sourceBuffer[d];(!T||!T.updating)&&E.shiftAndExecuteNext(d)})})},m.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},m.addBufferListener=function(a,i,s){var E=this.sourceBuffer[a];if(E){var b=s.bind(this,a);this.listeners[a].push({event:i,listener:b}),E.addEventListener(i,b)}},m.removeBufferListeners=function(a){var i=this.sourceBuffer[a];i&&this.listeners[a].forEach(function(s){i.removeEventListener(s.event,s.listener)})},v}()},"./src/controller/buffer-operation-queue.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>P});var C=L("./src/utils/logger.ts"),P=function(){function M(I){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=I}var e=M.prototype;return e.append=function(A,f){var g=this.queues[f];g.push(A),g.length===1&&this.buffers[f]&&this.executeNext(f)},e.insertAbort=function(A,f){var g=this.queues[f];g.unshift(A),this.executeNext(f)},e.appendBlocker=function(A){var f,g=new Promise(function(p){f=p}),h={execute:f,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(h,A),g},e.executeNext=function(A){var f=this.buffers,g=this.queues,h=f[A],p=g[A];if(p.length){var u=p[0];try{u.execute()}catch(v){C.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),u.onError(v),(!h||!h.updating)&&(p.shift(),this.executeNext(A))}}},e.shiftAndExecuteNext=function(A){this.queues[A].shift(),this.executeNext(A)},e.current=function(A){return this.queues[A][0]},M}()},"./src/controller/cap-level-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>f});var C=L("./src/events.ts");function P(g,h){for(var p=0;p<h.length;p++){var u=h[p];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,e(u.key),u)}}function M(g,h,p){return h&&P(g.prototype,h),p&&P(g,p),Object.defineProperty(g,"prototype",{writable:!1}),g}function e(g){var h=I(g,"string");return typeof h=="symbol"?h:String(h)}function I(g,h){if(typeof g!="object"||g===null)return g;var p=g[Symbol.toPrimitive];if(p!==void 0){var u=p.call(g,h||"default");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(g)}var A=function(){function g(p){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=p,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var h=g.prototype;return h.setStreamController=function(u){this.streamController=u},h.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},h.registerListeners=function(){var u=this.hls;u.on(C.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),u.on(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(C.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.unregisterListener=function(){var u=this.hls;u.off(C.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),u.off(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(C.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.onFpsDropLevelCapping=function(u,v){g.isLevelAllowed(v.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(v.droppedLevel)},h.onMediaAttaching=function(u,v){this.media=v.media instanceof HTMLVideoElement?v.media:null,this.clientRect=null},h.onManifestParsed=function(u,v){var m=this.hls;this.restrictedLevels=[],this.firstLevel=v.firstLevel,m.config.capLevelToPlayerSize&&v.video&&this.startCapping()},h.onBufferCodecs=function(u,v){var m=this.hls;m.config.capLevelToPlayerSize&&v.video&&this.startCapping()},h.onMediaDetaching=function(){this.stopCapping()},h.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var u=this.hls.levels;if(u.length){var v=this.hls;v.autoLevelCapping=this.getMaxLevel(u.length-1),v.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=v.autoLevelCapping}}},h.getMaxLevel=function(u){var v=this,m=this.hls.levels;if(!m.length)return-1;var o=m.filter(function(a,i){return g.isLevelAllowed(i,v.restrictedLevels)&&i<=u});return this.clientRect=null,g.getMaxLevelByMediaSize(o,this.mediaWidth,this.mediaHeight)},h.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},h.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},h.getDimensions=function(){if(this.clientRect)return this.clientRect;var u=this.media,v={width:0,height:0};if(u){var m=u.getBoundingClientRect();v.width=m.width,v.height=m.height,!v.width&&!v.height&&(v.width=m.right-m.left||u.width||0,v.height=m.bottom-m.top||u.height||0)}return this.clientRect=v,v},g.isLevelAllowed=function(u,v){return v===void 0&&(v=[]),v.indexOf(u)===-1},g.getMaxLevelByMediaSize=function(u,v,m){if(!u||!u.length)return-1;for(var o=function(b,d){return d?b.width!==d.width||b.height!==d.height:!0},a=u.length-1,i=0;i<u.length;i+=1){var s=u[i];if((s.width>=v||s.height>=m)&&o(s,u[i+1])){a=i;break}}return a},M(g,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var u=1;if(!this.hls.config.ignoreDevicePixelRatio)try{u=self.devicePixelRatio}catch(v){}return u}}]),g}();const f=A},"./src/controller/cmcd-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>m});var C=L("./src/events.ts"),P=L("./src/types/cmcd.ts"),M=L("./src/utils/buffer-helper.ts"),e=L("./src/utils/logger.ts");function I(o,a){for(var i=0;i<a.length;i++){var s=a[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,f(s.key),s)}}function A(o,a,i){return a&&I(o.prototype,a),i&&I(o,i),Object.defineProperty(o,"prototype",{writable:!1}),o}function f(o){var a=g(o,"string");return typeof a=="symbol"?a:String(a)}function g(o,a){if(typeof o!="object"||o===null)return o;var i=o[Symbol.toPrimitive];if(i!==void 0){var s=i.call(o,a||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}function h(o,a){var i=typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(i)return(i=i.call(o)).next.bind(i);if(Array.isArray(o)||(i=p(o))||a&&o&&typeof o.length=="number"){i&&(o=i);var s=0;return function(){return s>=o.length?{done:!0}:{done:!1,value:o[s++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p(o,a){if(o){if(typeof o=="string")return u(o,a);var i=Object.prototype.toString.call(o).slice(8,-1);if(i==="Object"&&o.constructor&&(i=o.constructor.name),i==="Map"||i==="Set")return Array.from(o);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return u(o,a)}}function u(o,a){(a==null||a>o.length)&&(a=o.length);for(var i=0,s=new Array(a);i<a;i++)s[i]=o[i];return s}function v(){return v=Object.assign?Object.assign.bind():function(o){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(o[s]=i[s])}return o},v.apply(this,arguments)}var m=function(){function o(i){var s=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){s.initialized&&(s.starved=!0),s.buffering=!0},this.onPlaying=function(){s.initialized||(s.initialized=!0),s.buffering=!1},this.applyPlaylistData=function(d){try{s.apply(d,{ot:P.CMCDObjectType.MANIFEST,su:!s.initialized})}catch(T){e.logger.warn("Could not generate manifest CMCD data.",T)}},this.applyFragmentData=function(d){try{var T=d.frag,R=s.hls.levels[T.level],S=s.getObjectType(T),w={d:T.duration*1e3,ot:S};(S===P.CMCDObjectType.VIDEO||S===P.CMCDObjectType.AUDIO||S==P.CMCDObjectType.MUXED)&&(w.br=R.bitrate/1e3,w.tb=s.getTopBandwidth(S)/1e3,w.bl=s.getBufferLength(S)),s.apply(d,w)}catch(r){e.logger.warn("Could not generate segment CMCD data.",r)}},this.hls=i;var E=this.config=i.config,b=E.cmcd;b!=null&&(E.pLoader=this.createPlaylistLoader(),E.fLoader=this.createFragmentLoader(),this.sid=b.sessionId||o.uuid(),this.cid=b.contentId,this.useHeaders=b.useHeaders===!0,this.registerListeners())}var a=o.prototype;return a.registerListeners=function(){var s=this.hls;s.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(C.Events.MEDIA_DETACHED,this.onMediaDetached,this),s.on(C.Events.BUFFER_CREATED,this.onBufferCreated,this)},a.unregisterListeners=function(){var s=this.hls;s.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(C.Events.MEDIA_DETACHED,this.onMediaDetached,this),s.off(C.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},a.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},a.onMediaAttached=function(s,E){this.media=E.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},a.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},a.onBufferCreated=function(s,E){var b,d;this.audioBuffer=(b=E.tracks.audio)===null||b===void 0?void 0:b.buffer,this.videoBuffer=(d=E.tracks.video)===null||d===void 0?void 0:d.buffer},a.createData=function(){var s;return{v:P.CMCDVersion,sf:P.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(s=this.media)===null||s===void 0?void 0:s.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},a.apply=function(s,E){E===void 0&&(E={}),v(E,this.createData());var b=E.ot===P.CMCDObjectType.INIT||E.ot===P.CMCDObjectType.VIDEO||E.ot===P.CMCDObjectType.MUXED;if(this.starved&&b&&(E.bs=!0,E.su=!0,this.starved=!1),E.su==null&&(E.su=this.buffering),this.useHeaders){var d=o.toHeaders(E);if(!Object.keys(d).length)return;s.headers||(s.headers={}),v(s.headers,d)}else{var T=o.toQuery(E);if(!T)return;s.url=o.appendQueryToUri(s.url,T)}},a.getObjectType=function(s){var E=s.type;if(E==="subtitle")return P.CMCDObjectType.TIMED_TEXT;if(s.sn==="initSegment")return P.CMCDObjectType.INIT;if(E==="audio")return P.CMCDObjectType.AUDIO;if(E==="main")return this.hls.audioTracks.length?P.CMCDObjectType.VIDEO:P.CMCDObjectType.MUXED},a.getTopBandwidth=function(s){var E=0,b,d=this.hls;if(s===P.CMCDObjectType.AUDIO)b=d.audioTracks;else{var T=d.maxAutoLevel,R=T>-1?T+1:d.levels.length;b=d.levels.slice(0,R)}for(var S=h(b),w;!(w=S()).done;){var r=w.value;r.bitrate>E&&(E=r.bitrate)}return E>0?E:NaN},a.getBufferLength=function(s){var E=this.hls.media,b=s===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!b||!E)return NaN;var d=M.BufferHelper.bufferInfo(b,E.currentTime,this.config.maxBufferHole);return d.len*1e3},a.createPlaylistLoader=function(){var s=this.config.pLoader,E=this.applyPlaylistData,b=s||this.config.loader;return function(){function d(R){this.loader=void 0,this.loader=new b(R)}var T=d.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(S,w,r){E(S),this.loader.load(S,w,r)},A(d,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),d}()},a.createFragmentLoader=function(){var s=this.config.fLoader,E=this.applyFragmentData,b=s||this.config.loader;return function(){function d(R){this.loader=void 0,this.loader=new b(R)}var T=d.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(S,w,r){E(S),this.loader.load(S,w,r)},A(d,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),d}()},o.uuid=function(){var s=URL.createObjectURL(new Blob),E=s.toString();return URL.revokeObjectURL(s),E.slice(E.lastIndexOf("/")+1)},o.serialize=function(s){for(var E=[],b=function(D){return!Number.isNaN(D)&&D!=null&&D!==""&&D!==!1},d=function(D){return Math.round(D)},T=function(D){return d(D/100)*100},R=function(D){return encodeURIComponent(D)},S={br:d,d,bl:T,dl:T,mtp:T,nor:R,rtp:T,tb:d},w=Object.keys(s||{}).sort(),r=h(w),n;!(n=r()).done;){var t=n.value,l=s[t];if(b(l)&&!(t==="v"&&l===1)&&!(t=="pr"&&l===1)){var x=S[t];x&&(l=x(l));var y=typeof l,c=void 0;t==="ot"||t==="sf"||t==="st"?c=t+"="+l:y==="boolean"?c=t:y==="number"?c=t+"="+l:c=t+"="+JSON.stringify(l),E.push(c)}}return E.join(",")},o.toHeaders=function(s){for(var E=Object.keys(s),b={},d=["Object","Request","Session","Status"],T=[{},{},{},{}],R={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},S=0,w=E;S<w.length;S++){var r=w[S],n=R[r]!=null?R[r]:1;T[n][r]=s[r]}for(var t=0;t<T.length;t++){var l=o.serialize(T[t]);l&&(b["CMCD-"+d[t]]=l)}return b},o.toQuery=function(s){return"CMCD="+encodeURIComponent(o.serialize(s))},o.appendQueryToUri=function(s,E){if(!E)return s;var b=s.includes("?")?"&":"?";return""+s+b+E},o}()},"./src/controller/eme-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>S});var C=L("./src/events.ts"),P=L("./src/errors.ts"),M=L("./src/utils/logger.ts"),e=L("./src/utils/mediakeys-helper.ts"),I=L("./src/utils/keysystem-util.ts"),A=L("./src/utils/numeric-encoding-utils.ts"),f=L("./src/loader/level-key.ts"),g=L("./src/utils/hex.ts"),h=L("./src/utils/mp4-tools.ts"),p=L("./node_modules/eventemitter3/index.js"),u=L.n(p);function v(w,r){w.prototype=Object.create(r.prototype),w.prototype.constructor=w,s(w,r)}function m(w){var r=typeof Map=="function"?new Map:void 0;return m=function(t){if(t===null||!i(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r!="undefined"){if(r.has(t))return r.get(t);r.set(t,l)}function l(){return o(t,arguments,E(this).constructor)}return l.prototype=Object.create(t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),s(l,t)},m(w)}function o(w,r,n){return a()?o=Reflect.construct.bind():o=function(l,x,y){var c=[null];c.push.apply(c,x);var _=Function.bind.apply(l,c),D=new _;return y&&s(D,y.prototype),D},o.apply(null,arguments)}function a(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(w){return!1}}function i(w){return Function.toString.call(w).indexOf("[native code]")!==-1}function s(w,r){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,l){return t.__proto__=l,t},s(w,r)}function E(w){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},E(w)}var b=3,d="[eme]",T=function(){function w(n){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=w.CDMCleanupPromise?[w.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=M.logger.debug.bind(M.logger,d),this.log=M.logger.log.bind(M.logger,d),this.warn=M.logger.warn.bind(M.logger,d),this.error=M.logger.error.bind(M.logger,d),this.hls=n,this.config=n.config,this.registerListeners()}var r=w.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null},r.registerListeners=function(){this.hls.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(C.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},r.unregisterListeners=function(){this.hls.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(C.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},r.getLicenseServerUrl=function(t){var l=this.config,x=l.drmSystems,y=l.widevineLicenseUrl,c=x[t];if(c)return c.licenseUrl;if(t===e.KeySystems.WIDEVINE&&y)return y;throw new Error('no license server URL configured for key-system "'+t+'"')},r.getServerCertificateUrl=function(t){var l=this.config.drmSystems,x=l[t];if(x)return x.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+t+'"]')},r.attemptKeySystemAccess=function(t){var l=this,x=this.hls.levels,y=function(O,k,F){return!!O&&F.indexOf(O)===k},c=x.map(function(D){return D.audioCodec}).filter(y),_=x.map(function(D){return D.videoCodec}).filter(y);return c.length+_.length===0&&_.push("avc1.42e01e"),new Promise(function(D,O){var k=function F(G){var H=G.shift();l.getMediaKeysPromise(H,c,_).then(function(j){return D({keySystem:H,mediaKeys:j})}).catch(function(j){G.length?F(G):j instanceof R?O(j):O(new R({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,error:j,fatal:!0},j.message))})};k(t)})},r.requestMediaKeySystemAccess=function(t,l){var x=this.config.requestMediaKeySystemAccessFunc;if(typeof x!="function"){var y="Configured requestMediaKeySystemAccess is not a function "+x;return e.requestMediaKeySystemAccess===null&&self.location.protocol==="http:"&&(y="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(y))}return x(t,l)},r.getMediaKeysPromise=function(t,l,x){var y=this,c=(0,e.getSupportedMediaKeySystemConfigurations)(t,l,x,this.config.drmSystemOptions),_=this.keySystemAccessPromises[t],D=_==null?void 0:_.keySystemAccess;if(!D){this.log('Requesting encrypted media "'+t+'" key-system access with config: '+JSON.stringify(c)),D=this.requestMediaKeySystemAccess(t,c);var O=this.keySystemAccessPromises[t]={keySystemAccess:D};return D.catch(function(k){y.log('Failed to obtain access to key-system "'+t+'": '+k)}),D.then(function(k){y.log('Access for key-system "'+k.keySystem+'" obtained');var F=y.fetchServerCertificate(t);return y.log('Create media-keys for "'+t+'"'),O.mediaKeys=k.createMediaKeys().then(function(G){return y.log('Media-keys created for "'+t+'"'),F.then(function(H){return H?y.setMediaKeysServerCertificate(G,t,H):G})}),O.mediaKeys.catch(function(G){y.error('Failed to create media-keys for "'+t+'"}: '+G)}),O.mediaKeys})}return D.then(function(){return _.mediaKeys})},r.createMediaKeySessionContext=function(t){var l=t.decryptdata,x=t.keySystem,y=t.mediaKeys;console.assert(!!y,"mediaKeys is defined"),this.log('Creating key-system session "'+x+'" keyId: '+g.default.hexDump(l.keyId||[]));var c=y.createSession(),_={decryptdata:l,keySystem:x,mediaKeys:y,mediaKeysSession:c,keyStatus:"status-pending"};return this.mediaKeySessions.push(_),_},r.renewKeySession=function(t){var l=t.decryptdata;if(l.pssh){var x=this.createMediaKeySessionContext(t),y=this.getKeyIdString(l),c="cenc";this.keyIdToKeySessionPromise[y]=this.generateRequestWithPreferredKeySession(x,c,l.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(t)},r.getKeyIdString=function(t){if(!t)throw new Error("Could not read keyId of undefined decryptdata");if(t.keyId===null)throw new Error("keyId is null");return g.default.hexDump(t.keyId)},r.updateKeySession=function(t,l){var x,y=t.mediaKeysSession;return this.log('Updating key-session "'+y.sessionId+'" for keyID '+g.default.hexDump(((x=t.decryptdata)===null||x===void 0?void 0:x.keyId)||[])+`
} (data length: `+(l&&l.byteLength)+")"),y.update(l)},r.selectKeySystemFormat=function(t){var l=Object.keys(t.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+t.sn+" "+t.type+": "+t.level+") key formats "+l.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(l)),this.keyFormatPromise},r.getKeyFormatPromise=function(t){var l=this;return new Promise(function(x,y){var c=(0,e.getKeySystemsForConfig)(l.config),_=t.map(e.keySystemFormatToKeySystemDomain).filter(function(D){return!!D&&c.indexOf(D)!==-1});return l.getKeySystemSelectionPromise(_).then(function(D){var O=D.keySystem,k=(0,e.keySystemDomainToKeySystemFormat)(O);k?x(k):y(new Error('Unable to find format for key-system "'+O+'"'))}).catch(y)})},r.loadKey=function(t){var l=this,x=t.keyInfo.decryptdata,y=this.getKeyIdString(x),c="(keyId: "+y+' format: "'+x.keyFormat+'" method: '+x.method+" uri: "+x.uri+")";this.log("Starting session for key "+c);var _=this.keyIdToKeySessionPromise[y];return _||(_=this.keyIdToKeySessionPromise[y]=this.getKeySystemForKeyPromise(x).then(function(D){var O=D.keySystem,k=D.mediaKeys;return l.throwIfDestroyed(),l.log("Handle encrypted media sn: "+t.frag.sn+" "+t.frag.type+": "+t.frag.level+" using key "+c),l.attemptSetMediaKeys(O,k).then(function(){l.throwIfDestroyed();var F=l.createMediaKeySessionContext({keySystem:O,mediaKeys:k,decryptdata:x}),G="cenc";return l.generateRequestWithPreferredKeySession(F,G,x.pssh,"playlist-key")})}),_.catch(function(D){return l.handleError(D)})),_},r.throwIfDestroyed=function(t){if(t===void 0&&(t="Invalid state"),!this.hls)throw new Error("invalid state")},r.handleError=function(t){this.hls&&(this.error(t.message),t instanceof R?this.hls.trigger(C.Events.ERROR,t.data):this.hls.trigger(C.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,error:t,fatal:!0}))},r.getKeySystemForKeyPromise=function(t){var l=this.getKeyIdString(t),x=this.keyIdToKeySessionPromise[l];if(!x){var y=(0,e.keySystemFormatToKeySystemDomain)(t.keyFormat),c=y?[y]:(0,e.getKeySystemsForConfig)(this.config);return this.attemptKeySystemAccess(c)}return x},r.getKeySystemSelectionPromise=function(t){if(t.length||(t=(0,e.getKeySystemsForConfig)(this.config)),t.length===0)throw new R({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(t)},r._onMediaEncrypted=function(t){var l=this,x=t.initDataType,y=t.initData;if(this.debug('"'+t.type+'" event: init data type: "'+x+'"'),y!==null){var c,_;if(x==="sinf"&&this.config.drmSystems[e.KeySystems.FAIRPLAY]){var D=(0,h.bin2str)(new Uint8Array(y));try{var O=(0,A.base64Decode)(JSON.parse(D).sinf),k=(0,h.parseSinf)(new Uint8Array(O));if(!k)return;c=k.subarray(8,24),_=e.KeySystems.FAIRPLAY}catch(le){this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{var F=(0,h.parsePssh)(y);if(F===null)return;F.version===0&&F.systemId===e.KeySystemIds.WIDEVINE&&F.data&&(c=F.data.subarray(8,24)),_=(0,e.keySystemIdToKeySystemDomain)(F.systemId)}if(!(!_||!c)){for(var G=g.default.hexDump(c),H=this.keyIdToKeySessionPromise,j=this.mediaKeySessions,Q=H[G],ee=function(xe){var Re=j[xe],Ee=Re.decryptdata;if(Ee.pssh||!Ee.keyId)return"continue";var he=g.default.hexDump(Ee.keyId);if(G===he||Ee.uri.replace(/-/g,"").indexOf(G)!==-1)return Q=H[he],delete H[he],Ee.pssh=new Uint8Array(y),Ee.keyId=c,Q=H[G]=Q.then(function(){return l.generateRequestWithPreferredKeySession(Re,x,y,"encrypted-event-key-match")}),"break"},ie=0;ie<j.length;ie++){var se=ee(ie);if(se!=="continue"&&se==="break")break}Q||(Q=H[G]=this.getKeySystemSelectionPromise([_]).then(function(le){var xe,Re=le.keySystem,Ee=le.mediaKeys;l.throwIfDestroyed();var he=new f.LevelKey("ISO-23001-7",G,(xe=(0,e.keySystemDomainToKeySystemFormat)(Re))!=null?xe:"");return he.pssh=new Uint8Array(y),he.keyId=c,l.attemptSetMediaKeys(Re,Ee).then(function(){l.throwIfDestroyed();var be=l.createMediaKeySessionContext({decryptdata:he,keySystem:Re,mediaKeys:Ee});return l.generateRequestWithPreferredKeySession(be,x,y,"encrypted-event-no-match")})})),Q.catch(function(le){return l.handleError(le)})}}},r._onWaitingForKey=function(t){this.log('"'+t.type+'" event')},r.attemptSetMediaKeys=function(t,l){var x=this,y=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'+t+'"');var c=Promise.all(y).then(function(){if(!x.media)throw new Error("Attempted to set mediaKeys without media element attached");return x.media.setMediaKeys(l)});return this.setMediaKeysQueue.push(c),c.then(function(){x.log('Media-keys set for "'+t+'"'),y.push(c),x.setMediaKeysQueue=x.setMediaKeysQueue.filter(function(_){return y.indexOf(_)===-1})})},r.generateRequestWithPreferredKeySession=function(t,l,x,y){var c,_,D=this,O=(c=this.config.drmSystems)===null||c===void 0||(_=c[t.keySystem])===null||_===void 0?void 0:_.generateRequest;if(O)try{var k=O.call(this.hls,l,x,t);if(!k)throw new Error("Invalid response from configured generateRequest filter");l=k.initDataType,x=t.decryptdata.pssh=k.initData?new Uint8Array(k.initData):null}catch(Q){var F;if(this.warn(Q.message),(F=this.hls)!==null&&F!==void 0&&F.config.debug)throw Q}if(x===null)return this.log('Skipping key-session request for "'+y+'" (no initData)'),Promise.resolve(t);var G=this.getKeyIdString(t.decryptdata);this.log('Generating key-session request for "'+y+'": '+G+" (init data type: "+l+" length: "+(x?x.byteLength:null)+")");var H=new(u());t.mediaKeysSession.onmessage=function(Q){var ee=t.mediaKeysSession;if(!ee){H.emit("error",new Error("invalid state"));return}var ie=Q.messageType,se=Q.message;D.log('"'+ie+'" message event for session "'+ee.sessionId+'" message size: '+se.byteLength),ie==="license-request"||ie==="license-renewal"?D.renewLicense(t,se).catch(function(le){D.handleError(le),H.emit("error",le)}):ie==="license-release"?t.keySystem===e.KeySystems.FAIRPLAY&&(D.updateKeySession(t,(0,I.strToUtf8array)("acknowledged")),D.removeSession(t)):D.warn('unhandled media key message type "'+ie+'"')},t.mediaKeysSession.onkeystatuseschange=function(Q){var ee=t.mediaKeysSession;if(!ee){H.emit("error",new Error("invalid state"));return}D.onKeyStatusChange(t);var ie=t.keyStatus;H.emit("keyStatus",ie),ie==="expired"&&(D.warn(t.keySystem+" expired for key "+G),D.renewKeySession(t))};var j=new Promise(function(Q,ee){H.on("error",ee),H.on("keyStatus",function(ie){ie.startsWith("usable")?Q():ie==="output-restricted"?ee(new R({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):ie==="internal-error"?ee(new R({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},'key status changed to "'+ie+'"')):ie==="expired"?ee(new Error("key expired while generating request")):D.warn('unhandled key status change "'+ie+'"')})});return t.mediaKeysSession.generateRequest(l,x).then(function(){var Q;D.log('Request generated for key-session "'+((Q=t.mediaKeysSession)===null||Q===void 0?void 0:Q.sessionId)+'" keyId: '+G)}).catch(function(Q){throw new R({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,error:Q,fatal:!1},"Error generating key-session request: "+Q)}).then(function(){return j}).catch(function(Q){throw H.removeAllListeners(),D.removeSession(t),Q}).then(function(){return H.removeAllListeners(),t})},r.onKeyStatusChange=function(t){var l=this;t.mediaKeysSession.keyStatuses.forEach(function(x,y){l.log('key status change "'+x+'" for keyStatuses keyId: '+g.default.hexDump("buffer"in y?new Uint8Array(y.buffer,y.byteOffset,y.byteLength):new Uint8Array(y))+" session keyId: "+g.default.hexDump(new Uint8Array(t.decryptdata.keyId||[]))+" uri: "+t.decryptdata.uri),t.keyStatus=x})},r.fetchServerCertificate=function(t){var l=this;return new Promise(function(x,y){var c=l.getServerCertificateUrl(t);if(!c)return x();l.log('Fetching serverCertificate for "'+t+'"');var _=new XMLHttpRequest;_.open("GET",c,!0),_.responseType="arraybuffer",_.onreadystatechange=function(){_.readyState===XMLHttpRequest.DONE&&(_.status===200?x(_.response):y(new R({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:_},'"'+t+'" certificate request XHR failed ('+c+"). Status: "+_.status+" ("+_.statusText+")")))},_.send()})},r.setMediaKeysServerCertificate=function(t,l,x){var y=this;return new Promise(function(c,_){t.setServerCertificate(x).then(function(D){y.log("setServerCertificate "+(D?"success":"not supported by CDM")+" ("+(x==null?void 0:x.byteLength)+') on "'+l+'"'),c(t)}).catch(function(D){_(new R({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:D,fatal:!0},D.message))})})},r.renewLicense=function(t,l){var x=this;return this.requestLicense(t,new Uint8Array(l)).then(function(y){return x.updateKeySession(t,new Uint8Array(y)).catch(function(c){throw new R({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:c,fatal:!0},c.message)})})},r.setupLicenseXHR=function(t,l,x,y){var c=this,_=this.config.licenseXhrSetup;return _?Promise.resolve().then(function(){if(!x.decryptdata)throw new Error("Key removed");return _.call(c.hls,t,l,x,y)}).catch(function(D){if(!x.decryptdata)throw D;return t.open("POST",l,!0),_.call(c.hls,t,l,x,y)}).then(function(D){t.readyState||t.open("POST",l,!0);var O=D||y;return{xhr:t,licenseChallenge:O}}):(t.open("POST",l,!0),Promise.resolve({xhr:t,licenseChallenge:y}))},r.requestLicense=function(t,l){var x=this;return new Promise(function(y,c){var _=x.getLicenseServerUrl(t.keySystem);x.log("Sending license request to URL: "+_);var D=new XMLHttpRequest;D.responseType="arraybuffer",D.onreadystatechange=function(){if(!x.hls||!t.mediaKeysSession)return c(new Error("invalid state"));if(D.readyState===4)if(D.status===200){x._requestLicenseFailureCount=0;var O=D.response;x.log("License received "+(O instanceof ArrayBuffer?O.byteLength:O));var k=x.config.licenseResponseCallback;if(k)try{O=k.call(x.hls,D,_,t)}catch(G){x.error(G)}y(O)}else if(x._requestLicenseFailureCount++,x._requestLicenseFailureCount>b||D.status>=400&&D.status<500)c(new R({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:D},"License Request XHR failed ("+_+"). Status: "+D.status+" ("+D.statusText+")"));else{var F=b-x._requestLicenseFailureCount+1;x.warn("Retrying license request, "+F+" attempts left"),x.requestLicense(t,l).then(y,c)}},t.licenseXhr&&t.licenseXhr.readyState!==XMLHttpRequest.DONE&&t.licenseXhr.abort(),t.licenseXhr=D,x.setupLicenseXHR(D,_,t,l).then(function(O){var k=O.xhr,F=O.licenseChallenge;k.send(F)})})},r.onMediaAttached=function(t,l){if(this.config.emeEnabled){var x=l.media;this.media=x,x.addEventListener("encrypted",this.onMediaEncrypted),x.addEventListener("waitingforkey",this.onWaitingForKey)}},r.onMediaDetached=function(){var t=this,l=this.media,x=this.mediaKeySessions;l&&(l.removeEventListener("encrypted",this.onMediaEncrypted),l.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},f.LevelKey.clearKeyUriToKeyIdMap();var y=x.length;w.CDMCleanupPromise=Promise.all(x.map(function(c){return t.removeSession(c)}).concat(l==null?void 0:l.setMediaKeys(null).catch(function(c){t.log("Could not clear media keys: "+c+". media.src: "+(l==null?void 0:l.src))}))).then(function(){y&&(t.log("finished closing key sessions and clearing media keys"),x.length=0)}).catch(function(c){t.log("Could not close sessions and clear media keys: "+c+". media.src: "+(l==null?void 0:l.src))})},r.onManifestLoaded=function(t,l){var x=l.sessionKeys;if(!(!x||!this.config.emeEnabled)&&!this.keyFormatPromise){var y=x.reduce(function(c,_){return c.indexOf(_.keyFormat)===-1&&c.push(_.keyFormat),c},[]);this.log("Selecting key-system from session-keys "+y.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(y)}},r.removeSession=function(t){var l=this,x=t.mediaKeysSession,y=t.licenseXhr;if(x){this.log("Remove licenses and keys and close session "+x.sessionId),x.onmessage=null,x.onkeystatuseschange=null,y&&y.readyState!==XMLHttpRequest.DONE&&y.abort(),t.mediaKeysSession=t.decryptdata=t.licenseXhr=void 0;var c=this.mediaKeySessions.indexOf(t);return c>-1&&this.mediaKeySessions.splice(c,1),x.remove().catch(function(_){l.log("Could not remove session: "+_)}).then(function(){return x.close()}).catch(function(_){l.log("Could not close session: "+_)})}},w}();T.CDMCleanupPromise=void 0;var R=function(w){v(r,w);function r(n,t){var l;return l=w.call(this,t)||this,l.data=void 0,l.data=n,n.err=n.error,l}return r}(m(Error));const S=T},"./src/controller/fps-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>e});var C=L("./src/events.ts"),P=L("./src/utils/logger.ts"),M=function(){function I(f){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=f,this.registerListeners()}var A=I.prototype;return A.setStreamController=function(g){this.streamController=g},A.registerListeners=function(){this.hls.on(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},A.unregisterListeners=function(){this.hls.off(C.Events.MEDIA_ATTACHING,this.onMediaAttaching)},A.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},A.onMediaAttaching=function(g,h){var p=this.hls.config;if(p.capLevelOnFPSDrop){var u=h.media instanceof self.HTMLVideoElement?h.media:null;this.media=u,u&&typeof u.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),p.fpsDroppedMonitoringPeriod)}},A.checkFPS=function(g,h,p){var u=performance.now();if(h){if(this.lastTime){var v=u-this.lastTime,m=p-this.lastDroppedFrames,o=h-this.lastDecodedFrames,a=1e3*m/v,i=this.hls;if(i.trigger(C.Events.FPS_DROP,{currentDropped:m,currentDecoded:o,totalDroppedFrames:p}),a>0&&m>i.config.fpsDroppedMonitoringThreshold*o){var s=i.currentLevel;P.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=s)&&(s=s-1,i.trigger(C.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:i.currentLevel}),i.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=p,this.lastDecodedFrames=h}},A.checkFPSInterval=function(){var g=this.media;if(g)if(this.isVideoPlaybackQualityAvailable){var h=g.getVideoPlaybackQuality();this.checkFPS(g,h.totalVideoFrames,h.droppedVideoFrames)}else this.checkFPS(g,g.webkitDecodedFrameCount,g.webkitDroppedFrameCount)},I}();const e=M},"./src/controller/fragment-finders.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{findFragWithCC:()=>f,findFragmentByPDT:()=>M,findFragmentByPTS:()=>e,fragmentWithinToleranceTest:()=>I,pdtWithinToleranceTest:()=>A});var C=L("./src/polyfills/number.ts"),P=L("./src/utils/binary-search.ts");function M(g,h,p){if(h===null||!Array.isArray(g)||!g.length||!(0,C.isFiniteNumber)(h))return null;var u=g[0].programDateTime;if(h<(u||0))return null;var v=g[g.length-1].endProgramDateTime;if(h>=(v||0))return null;p=p||0;for(var m=0;m<g.length;++m){var o=g[m];if(A(h,p,o))return o}return null}function e(g,h,p,u){p===void 0&&(p=0),u===void 0&&(u=0);var v=null;if(g?v=h[g.sn-h[0].sn+1]||null:p===0&&h[0].start===0&&(v=h[0]),v&&I(p,u,v)===0)return v;var m=P.default.search(h,I.bind(null,p,u));return m&&(m!==g||!v)?m:v}function I(g,h,p){if(g===void 0&&(g=0),h===void 0&&(h=0),p.start<=g&&p.start+p.duration>g)return 0;var u=Math.min(h,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-u<=g?1:p.start-u>g&&p.start?-1:0}function A(g,h,p){var u=Math.min(h,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,v=p.endProgramDateTime||0;return v-u>g}function f(g,h){return P.default.search(g,function(p){return p.cc<h?1:p.cc>h?-1:0})}},"./src/controller/fragment-tracker.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{FragmentState:()=>M,FragmentTracker:()=>e});var C=L("./src/events.ts"),P=L("./src/types/loader.ts"),M;(function(f){f.NOT_LOADED="NOT_LOADED",f.APPENDING="APPENDING",f.PARTIAL="PARTIAL",f.OK="OK"})(M||(M={}));var e=function(){function f(h){this.activeFragment=null,this.activeParts=null,this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=h,this._registerListeners()}var g=f.prototype;return g._registerListeners=function(){var p=this.hls;p.on(C.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(C.Events.FRAG_LOADED,this.onFragLoaded,this)},g._unregisterListeners=function(){var p=this.hls;p.off(C.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(C.Events.FRAG_LOADED,this.onFragLoaded,this)},g.destroy=function(){this._unregisterListeners(),this.fragments=this.endListFragments=this.timeRanges=this.activeFragment=this.activeParts=null},g.getAppendedFrag=function(p,u){if(u===P.PlaylistLevelType.MAIN){var v=this.activeFragment,m=this.activeParts;if(!v)return null;if(m)for(var o=m.length;o--;){var a=m[o],i=a?a.end:v.appendedPTS;if(a.start<=p&&i!==void 0&&p<=i)return o>9&&(this.activeParts=m.slice(o-9)),a}else if(v.start<=p&&v.appendedPTS!==void 0&&p<=v.appendedPTS)return v}return this.getBufferedFrag(p,u)},g.getBufferedFrag=function(p,u){for(var v=this.fragments,m=Object.keys(v),o=m.length;o--;){var a=v[m[o]];if((a==null?void 0:a.body.type)===u&&a.buffered){var i=a.body;if(i.start<=p&&p<=i.end)return i}}return null},g.detectEvictedFragments=function(p,u,v){var m=this;this.timeRanges&&(this.timeRanges[p]=u),Object.keys(this.fragments).forEach(function(o){var a=m.fragments[o];if(a){if(!a.buffered&&!a.loaded){a.body.type===v&&m.removeFragment(a.body);return}var i=a.range[p];i&&i.time.some(function(s){var E=!m.isTimeBuffered(s.startPTS,s.endPTS,u);return E&&m.removeFragment(a.body),E})}})},g.detectPartialFragments=function(p){var u=this,v=this.timeRanges,m=p.frag,o=p.part;if(!(!v||m.sn==="initSegment")){var a=A(m),i=this.fragments[a];i&&(Object.keys(v).forEach(function(s){var E=m.elementaryStreams[s];if(E){var b=v[s],d=o!==null||E.partial===!0;i.range[s]=u.getBufferedTimes(m,o,d,b)}}),i.loaded=null,Object.keys(i.range).length?(i.buffered=!0,i.body.endList&&(this.endListFragments[i.body.type]=i)):this.removeFragment(i.body))}},g.fragBuffered=function(p){var u=A(p),v=this.fragments[u];v&&(v.loaded=null,v.buffered=!0)},g.getBufferedTimes=function(p,u,v,m){for(var o={time:[],partial:v},a=u?u.start:p.start,i=u?u.end:p.end,s=p.minEndPTS||i,E=p.maxStartPTS||a,b=0;b<m.length;b++){var d=m.start(b)-this.bufferPadding,T=m.end(b)+this.bufferPadding;if(E>=d&&s<=T){o.time.push({startPTS:Math.max(a,m.start(b)),endPTS:Math.min(i,m.end(b))});break}else if(a<T&&i>d)o.partial=!0,o.time.push({startPTS:Math.max(a,m.start(b)),endPTS:Math.min(i,m.end(b))});else if(i<=d)break}return o},g.getPartialFragment=function(p){var u=null,v,m,o,a=0,i=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach(function(E){var b=s[E];b&&I(b)&&(m=b.body.start-i,o=b.body.end+i,p>=m&&p<=o&&(v=Math.min(p-m,o-p),a<=v&&(u=b.body,a=v)))}),u},g.isEndListAppended=function(p){var u=this.endListFragments[p];return u!==void 0&&(u.buffered||I(u))},g.getState=function(p){var u=A(p),v=this.fragments[u];return v?v.buffered?I(v)?M.PARTIAL:M.OK:M.APPENDING:M.NOT_LOADED},g.isTimeBuffered=function(p,u,v){for(var m,o,a=0;a<v.length;a++){if(m=v.start(a)-this.bufferPadding,o=v.end(a)+this.bufferPadding,p>=m&&u<=o)return!0;if(u<=m)return!1}return!1},g.onFragLoaded=function(p,u){var v=u.frag,m=u.part;if(!(v.sn==="initSegment"||v.bitrateTest||m)){var o=A(v);this.fragments[o]={body:v,loaded:u,buffered:!1,range:Object.create(null)}}},g.onBufferAppended=function(p,u){var v=this,m=u.frag,o=u.part,a=u.timeRanges;if(m.type===P.PlaylistLevelType.MAIN)if(this.activeFragment!==m&&(this.activeFragment=m,m.appendedPTS=void 0),o){var i=this.activeParts;i||(this.activeParts=i=[]),i.push(o)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(s){var E=a[s];if(v.detectEvictedFragments(s,E),!o&&m.type===P.PlaylistLevelType.MAIN){var b=m.elementaryStreams[s];if(!b)return;for(var d=0;d<E.length;d++){var T=E.end(d);T<=b.endPTS&&T>b.startPTS?m.appendedPTS=Math.max(T,m.appendedPTS||0):m.appendedPTS=b.endPTS}}})},g.onFragBuffered=function(p,u){this.detectPartialFragments(u)},g.hasFragment=function(p){var u=A(p);return!!this.fragments[u]},g.removeFragmentsInRange=function(p,u,v){var m=this;Object.keys(this.fragments).forEach(function(o){var a=m.fragments[o];if(a&&a.buffered){var i=a.body;i.type===v&&i.start<u&&i.end>p&&m.removeFragment(i)}})},g.removeFragment=function(p){var u=A(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),p.appendedPTS=void 0,delete this.fragments[u],p.endList&&delete this.endListFragments[p.type]},g.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activeFragment=null,this.activeParts=null},f}();function I(f){var g,h;return f.buffered&&(((g=f.range.video)===null||g===void 0?void 0:g.partial)||((h=f.range.audio)===null||h===void 0?void 0:h.partial))}function A(f){return f.type+"_"+f.level+"_"+f.urlId+"_"+f.sn}},"./src/controller/gap-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{MAX_START_GAP_JUMP:()=>A,SKIP_BUFFER_HOLE_STEP_SECONDS:()=>f,SKIP_BUFFER_RANGE_START:()=>g,STALL_MINIMUM_DURATION_MS:()=>I,default:()=>h});var C=L("./src/utils/buffer-helper.ts"),P=L("./src/errors.ts"),M=L("./src/events.ts"),e=L("./src/utils/logger.ts"),I=250,A=2,f=.1,g=.05,h=function(){function p(v,m,o,a){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=v,this.media=m,this.fragmentTracker=o,this.hls=a}var u=p.prototype;return u.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},u.poll=function(m,o){var a=this.config,i=this.media,s=this.stalled;if(i!==null){var E=i.currentTime,b=i.seeking,d=this.seeking&&!b,T=!this.seeking&&b;if(this.seeking=b,E!==m){if(this.moved=!0,s!==null){if(this.stallReported){var R=self.performance.now()-s;e.logger.warn("playback not stuck anymore @"+E+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((T||d)&&(this.stalled=null),!(i.paused&&!b||i.ended||i.playbackRate===0||!C.BufferHelper.getBuffered(i).length)){var S=C.BufferHelper.bufferInfo(i,E,0),w=S.len>0,r=S.nextStart||0;if(!(!w&&!r)){if(b){var n=S.len>A,t=!r||o&&o.start<=E||r-E>A&&!this.fragmentTracker.getPartialFragment(E);if(n||t)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var l,x=Math.max(r,S.start||0)-E,y=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,c=y==null||(l=y.details)===null||l===void 0?void 0:l.live,_=c?y.details.targetduration*2:A;if(x>0&&x<=_){this._trySkipBufferHole(null);return}}var D=self.performance.now();if(s===null){this.stalled=D;return}var O=D-s;if(!(!b&&O>=I&&(this._reportStall(S),!this.media))){var k=C.BufferHelper.bufferInfo(i,E,a.maxBufferHole);this._tryFixBufferStall(k,O)}}}}},u._tryFixBufferStall=function(m,o){var a=this.config,i=this.fragmentTracker,s=this.media;if(s!==null){var E=s.currentTime,b=i.getPartialFragment(E);if(b){var d=this._trySkipBufferHole(b);if(d||!this.media)return}m.len>a.maxBufferHole&&o>a.highBufferWatchdogPeriod*1e3&&(e.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},u._reportStall=function(m){var o=this.hls,a=this.media,i=this.stallReported;!i&&a&&(this.stallReported=!0,e.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer ("+JSON.stringify(m)+")"),o.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:m.len}))},u._trySkipBufferHole=function(m){var o=this.config,a=this.hls,i=this.media;if(i===null)return 0;for(var s=i.currentTime,E=0,b=C.BufferHelper.getBuffered(i),d=0;d<b.length;d++){var T=b.start(d);if(s+o.maxBufferHole>=E&&s<T){var R=Math.max(T+g,i.currentTime+f);return e.logger.warn("skipping hole, adjusting currentTime from "+s+" to "+R),this.moved=!0,this.stalled=null,i.currentTime=R,m&&a.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+s+" to "+R,frag:m}),R}E=b.end(d)}return 0},u._tryNudgeBuffer=function(){var m=this.config,o=this.hls,a=this.media,i=this.nudgeRetry;if(a!==null){var s=a.currentTime;if(this.nudgeRetry++,i<m.nudgeMaxRetry){var E=s+(i+1)*m.nudgeOffset;e.logger.warn("Nudging 'currentTime' from "+s+" to "+E),a.currentTime=E,o.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else e.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+m.nudgeMaxRetry+" nudges"),o.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})}},p}()},"./src/controller/id3-track-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>m});var C=L("./src/polyfills/number.ts"),P=L("./src/events.ts"),M=L("./src/utils/texttrack-utils.ts"),e=L("./src/demux/id3.ts"),I=L("./src/loader/date-range.ts"),A=L("./src/types/demuxer.ts"),f=.25;function g(){return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var h=function(){var o=g();try{new o(0,Number.POSITIVE_INFINITY,"")}catch(a){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function p(o,a){return o.getTime()/1e3-a}function u(o){return Uint8Array.from(o.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}var v=function(){function o(i){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=i,this._registerListeners()}var a=o.prototype;return a.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},a._registerListeners=function(){var s=this.hls;s.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),s.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},a._unregisterListeners=function(){var s=this.hls;s.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),s.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},a.onMediaAttached=function(s,E){this.media=E.media},a.onMediaDetaching=function(){this.id3Track&&((0,M.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},a.onManifestLoading=function(){this.dateRangeCuesAppended={}},a.createTrack=function(s){var E=this.getID3Track(s.textTracks);return E.mode="hidden",E},a.getID3Track=function(s){if(this.media){for(var E=0;E<s.length;E++){var b=s[E];if(b.kind==="metadata"&&b.label==="id3")return(0,M.sendAddTrackEvent)(b,this.media),b}return this.media.addTextTrack("metadata","id3")}},a.onFragParsingMetadata=function(s,E){if(this.media){var b=this.hls.config,d=b.enableEmsgMetadataCues,T=b.enableID3MetadataCues;if(!(!d&&!T)){var R=E.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var S=g(),w=0;w<R.length;w++){var r=R[w].type;if(!(r===A.MetadataSchema.emsg&&!d||!T)){var n=e.getID3Frames(R[w].data);if(n){var t=R[w].pts,l=t+R[w].duration;l>h&&(l=h);var x=l-t;x<=0&&(l=t+f);for(var y=0;y<n.length;y++){var c=n[y];if(!e.isTimeStampFrame(c)){this.updateId3CueEnds(t);var _=new S(t,l,"");_.value=c,r&&(_.type=r),this.id3Track.addCue(_)}}}}}}}},a.updateId3CueEnds=function(s){var E,b=(E=this.id3Track)===null||E===void 0?void 0:E.cues;if(b)for(var d=b.length;d--;){var T=b[d];T.startTime<s&&T.endTime===h&&(T.endTime=s)}},a.onBufferFlushing=function(s,E){var b=E.startOffset,d=E.endOffset,T=E.type,R=this.id3Track,S=this.hls;if(S){var w=S.config,r=w.enableEmsgMetadataCues,n=w.enableID3MetadataCues;if(R&&(r||n)){var t;T==="audio"?t=function(x){return x.type===A.MetadataSchema.audioId3&&n}:T==="video"?t=function(x){return x.type===A.MetadataSchema.emsg&&r}:t=function(x){return x.type===A.MetadataSchema.audioId3&&n||x.type===A.MetadataSchema.emsg&&r},(0,M.removeCuesInRange)(R,b,d,t)}}},a.onLevelUpdated=function(s,E){var b=this,d=E.details;if(!(!this.media||!d.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)){var T=this.dateRangeCuesAppended,R=this.id3Track,S=d.dateRanges,w=Object.keys(S);if(R)for(var r=Object.keys(T).filter(function(D){return!w.includes(D)}),n=function(O){var k=r[O];Object.keys(T[k].cues).forEach(function(F){R.removeCue(T[k].cues[F])}),delete T[k]},t=r.length;t--;)n(t);var l=d.fragments[d.fragments.length-1];if(!(w.length===0||!(0,C.isFiniteNumber)(l==null?void 0:l.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var x=l.programDateTime/1e3-l.start,y=g(),c=function(O){var k=w[O],F=S[k],G=T[k],H=(G==null?void 0:G.cues)||{},j=(G==null?void 0:G.durationKnown)||!1,Q=p(F.startDate,x),ee=h,ie=F.endDate;if(ie)ee=p(ie,x),j=!0;else if(F.endOnNext&&!j){var se=w.reduce(function(be,Ce){var Ue=S[Ce];return Ue.class===F.class&&Ue.id!==Ce&&Ue.startDate>F.startDate&&be.push(Ue),be},[]).sort(function(be,Ce){return be.startDate.getTime()-Ce.startDate.getTime()})[0];se&&(ee=p(se.startDate,x),j=!0)}for(var le=Object.keys(F.attr),xe=0;xe<le.length;xe++){var Re=le[xe];if(!(Re===I.DateRangeAttribute.ID||Re===I.DateRangeAttribute.CLASS||Re===I.DateRangeAttribute.START_DATE||Re===I.DateRangeAttribute.DURATION||Re===I.DateRangeAttribute.END_DATE||Re===I.DateRangeAttribute.END_ON_NEXT)){var Ee=H[Re];if(Ee)j&&!G.durationKnown&&(Ee.endTime=ee);else{var he=F.attr[Re];Ee=new y(Q,ee,""),(Re===I.DateRangeAttribute.SCTE35_OUT||Re===I.DateRangeAttribute.SCTE35_IN)&&(he=u(he)),Ee.value={key:Re,data:he},Ee.type=A.MetadataSchema.dateRange,b.id3Track.addCue(Ee),H[Re]=Ee}}}T[k]={cues:H,dateRange:F,durationKnown:j}},_=0;_<w.length;_++)c(_)}}},o}();const m=v},"./src/controller/latency-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>g});var C=L("./src/errors.ts"),P=L("./src/events.ts"),M=L("./src/utils/logger.ts");function e(h,p){for(var u=0;u<p.length;u++){var v=p[u];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(h,A(v.key),v)}}function I(h,p,u){return p&&e(h.prototype,p),u&&e(h,u),Object.defineProperty(h,"prototype",{writable:!1}),h}function A(h){var p=f(h,"string");return typeof p=="symbol"?p:String(p)}function f(h,p){if(typeof h!="object"||h===null)return h;var u=h[Symbol.toPrimitive];if(u!==void 0){var v=u.call(h,p||"default");if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(h)}var g=function(){function h(u){var v=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return v.timeupdate()},this.hls=u,this.config=u.config,this.registerListeners()}var p=h.prototype;return p.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},p.registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(P.Events.ERROR,this.onError,this)},p.unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(P.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(P.Events.ERROR,this.onError)},p.onMediaAttached=function(v,m){this.media=m.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},p.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},p.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},p.onLevelUpdated=function(v,m){var o=m.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},p.onError=function(v,m){m.details===C.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,M.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},p.timeupdate=function(){var v=this.media,m=this.levelDetails;if(!(!v||!m)){this.currentTime=v.currentTime;var o=this.computeLatency();if(o!==null){this._latency=o;var a=this.config,i=a.lowLatencyMode,s=a.maxLiveSyncPlaybackRate;if(!(!i||s===1)){var E=this.targetLatency;if(E!==null){var b=o-E,d=Math.min(this.maxLatency,E+m.targetduration),T=b<d;if(m.live&&T&&b>.05&&this.forwardBufferLength>1){var R=Math.min(2,Math.max(1,s)),S=Math.round(2/(1+Math.exp(-.75*b-this.edgeStalled))*20)/20;v.playbackRate=Math.min(R,Math.max(1,S))}else v.playbackRate!==1&&v.playbackRate!==0&&(v.playbackRate=1)}}}}},p.estimateLiveEdge=function(){var v=this.levelDetails;return v===null?null:v.edge+v.age},p.computeLatency=function(){var v=this.estimateLiveEdge();return v===null?null:v-this.currentTime},I(h,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var v=this.config,m=this.levelDetails;return v.liveMaxLatencyDuration!==void 0?v.liveMaxLatencyDuration:m?v.liveMaxLatencyDurationCount*m.targetduration:0}},{key:"targetLatency",get:function(){var v=this.levelDetails;if(v===null)return null;var m=v.holdBack,o=v.partHoldBack,a=v.targetduration,i=this.config,s=i.liveSyncDuration,E=i.liveSyncDurationCount,b=i.lowLatencyMode,d=this.hls.userConfig,T=b&&o||m;(d.liveSyncDuration||d.liveSyncDurationCount||T===0)&&(T=s!==void 0?s:E*a);var R=a,S=1;return T+Math.min(this.stallCount*S,R)}},{key:"liveSyncPosition",get:function(){var v=this.estimateLiveEdge(),m=this.targetLatency,o=this.levelDetails;if(v===null||m===null||o===null)return null;var a=o.edge,i=v-m-this.edgeStalled,s=a-o.totalduration,E=a-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(s,i),E)}},{key:"drift",get:function(){var v=this.levelDetails;return v===null?1:v.drift}},{key:"edgeStalled",get:function(){var v=this.levelDetails;if(v===null)return 0;var m=(this.config.lowLatencyMode&&v.partTarget||v.targetduration)*3;return Math.max(v.age-m,0)}},{key:"forwardBufferLength",get:function(){var v=this.media,m=this.levelDetails;if(!v||!m)return 0;var o=v.buffered.length;return(o?v.buffered.end(o-1):m.edge)-this.currentTime}}]),h}()},"./src/controller/level-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>i});var C=L("./src/types/level.ts"),P=L("./src/events.ts"),M=L("./src/errors.ts"),e=L("./src/utils/codecs.ts"),I=L("./src/controller/level-helper.ts"),A=L("./src/controller/base-playlist-controller.ts"),f=L("./src/types/loader.ts");function g(){return g=Object.assign?Object.assign.bind():function(s){for(var E=1;E<arguments.length;E++){var b=arguments[E];for(var d in b)Object.prototype.hasOwnProperty.call(b,d)&&(s[d]=b[d])}return s},g.apply(this,arguments)}function h(s,E){for(var b=0;b<E.length;b++){var d=E[b];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(s,u(d.key),d)}}function p(s,E,b){return E&&h(s.prototype,E),b&&h(s,b),Object.defineProperty(s,"prototype",{writable:!1}),s}function u(s){var E=v(s,"string");return typeof E=="symbol"?E:String(E)}function v(s,E){if(typeof s!="object"||s===null)return s;var b=s[Symbol.toPrimitive];if(b!==void 0){var d=b.call(s,E||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(s)}function m(s,E){s.prototype=Object.create(E.prototype),s.prototype.constructor=s,o(s,E)}function o(s,E){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,T){return d.__proto__=T,d},o(s,E)}var a=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),i=function(s){m(E,s);function E(d){var T;return T=s.call(this,d,"[level-controller]")||this,T._levels=[],T._firstLevel=-1,T._startLevel=void 0,T.currentLevelIndex=-1,T.manualLevelIndex=-1,T.onParsedComplete=void 0,T._registerListeners(),T}var b=E.prototype;return b._registerListeners=function(){var T=this.hls;T.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.on(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),T.on(P.Events.ERROR,this.onError,this)},b._unregisterListeners=function(){var T=this.hls;T.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.off(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),T.off(P.Events.ERROR,this.onError,this)},b.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,s.prototype.destroy.call(this)},b.startLoad=function(){var T=this._levels;T.forEach(function(R){R.loadError=0}),s.prototype.startLoad.call(this)},b.onManifestLoaded=function(T,R){var S=[],w=[],r=[],n,t={},l,x=!1,y=!1,c=!1;if(R.levels.forEach(function(k){var F=k.attrs;x=x||!!(k.width&&k.height),y=y||!!k.videoCodec,c=c||!!k.audioCodec,a&&k.audioCodec&&k.audioCodec.indexOf("mp4a.40.34")!==-1&&(k.audioCodec=void 0);var G=k.bitrate+"-"+k.attrs.RESOLUTION+"-"+k.attrs.CODECS;l=t[G],l?l.url.push(k.url):(l=new C.Level(k),t[G]=l,S.push(l)),F&&(F.AUDIO&&(0,I.addGroupId)(l,"audio",F.AUDIO),F.SUBTITLES&&(0,I.addGroupId)(l,"text",F.SUBTITLES))}),(x||y)&&c&&(S=S.filter(function(k){var F=k.videoCodec,G=k.width,H=k.height;return!!F||!!(G&&H)})),S=S.filter(function(k){var F=k.audioCodec,G=k.videoCodec;return(!F||(0,e.isCodecSupportedInMp4)(F,"audio"))&&(!G||(0,e.isCodecSupportedInMp4)(G,"video"))}),R.audioTracks&&(w=R.audioTracks.filter(function(k){return!k.audioCodec||(0,e.isCodecSupportedInMp4)(k.audioCodec,"audio")}),(0,I.assignTrackIdsByGroup)(w)),R.subtitles&&(r=R.subtitles,(0,I.assignTrackIdsByGroup)(r)),S.length>0){n=S[0].bitrate,S.sort(function(k,F){return k.attrs["HDCP-LEVEL"]!==F.attrs["HDCP-LEVEL"]?(k.attrs["HDCP-LEVEL"]||"")>(F.attrs["HDCP-LEVEL"]||"")?1:-1:k.bitrate!==F.bitrate?k.bitrate-F.bitrate:k.attrs.SCORE!==F.attrs.SCORE?k.attrs.decimalFloatingPoint("SCORE")-F.attrs.decimalFloatingPoint("SCORE"):x&&k.height!==F.height?k.height-F.height:0}),this._levels=S;for(var _=0;_<S.length;_++)if(S[_].bitrate===n){this._firstLevel=_,this.log("manifest loaded, "+S.length+" level(s) found, first bitrate: "+n);break}var D=c&&!y,O={levels:S,audioTracks:w,subtitleTracks:r,sessionData:R.sessionData,sessionKeys:R.sessionKeys,firstLevel:this._firstLevel,stats:R.stats,audio:c,video:y,altAudio:!D&&w.some(function(k){return!!k.url})};this.hls.trigger(P.Events.MANIFEST_PARSED,O),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(P.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:R.url,reason:"no level with compatible codecs found in manifest"})},b.onError=function(T,R){var S,w;if(s.prototype.onError.call(this,T,R),!R.fatal){var r=R.context,n=this._levels[this.currentLevelIndex];if(r&&(r.type===f.PlaylistContextType.AUDIO_TRACK&&n.audioGroupIds&&r.groupId===n.audioGroupIds[n.urlId]||r.type===f.PlaylistContextType.SUBTITLE_TRACK&&n.textGroupIds&&r.groupId===n.textGroupIds[n.urlId])){this.redundantFailover(this.currentLevelIndex);return}var t=!1,l=!0,x;switch(R.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:case M.ErrorDetails.KEY_LOAD_ERROR:case M.ErrorDetails.KEY_LOAD_TIMEOUT:if(R.frag){var y=R.frag.type===f.PlaylistLevelType.MAIN?R.frag.level:this.currentLevelIndex,c=this._levels[y];c?(c.fragmentError++,c.fragmentError>this.hls.config.fragLoadingMaxRetry&&(x=y)):x=y}break;case M.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{var _=n.attrs["HDCP-LEVEL"];_&&(this.hls.maxHdcpLevel=C.HdcpLevels[C.HdcpLevels.indexOf(_)-1],this.warn('Restricting playback to HDCP-LEVEL of "'+this.hls.maxHdcpLevel+'" or lower'))}case M.ErrorDetails.FRAG_PARSING_ERROR:case M.ErrorDetails.KEY_SYSTEM_NO_SESSION:x=((S=R.frag)===null||S===void 0?void 0:S.type)===f.PlaylistLevelType.MAIN?R.frag.level:this.currentLevelIndex,R.levelRetry=!1;break;case M.ErrorDetails.LEVEL_LOAD_ERROR:case M.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),x=r.level),t=!0;break;case M.ErrorDetails.REMUX_ALLOC_ERROR:x=(w=R.level)!=null?w:this.currentLevelIndex,t=!0;break}x!==void 0&&this.recoverLevel(R,x,t,l)}},b.recoverLevel=function(T,R,S,w){var r=T.details,n=this._levels[R];if(n.loadError++,S){var t=this.retryLoadingOrFail(T);if(t)T.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(w){var l=n.url.length;if(l>1&&n.loadError<l)T.levelRetry=!0,this.redundantFailover(R);else if(this.manualLevelIndex===-1){for(var x=-1,y=this._levels,c=y.length;c--;){var _=(c+this.currentLevelIndex)%y.length;if(_!==this.currentLevelIndex&&y[_].loadError===0){x=_;break}}x>-1&&this.currentLevelIndex!==x?(this.warn(r+": switch to "+x),T.levelRetry=!0,this.hls.nextAutoLevel=x):T.levelRetry===!1&&(T.fatal=!0)}}},b.redundantFailover=function(T){var R=this._levels[T],S=R.url.length;if(S>1){var w=(R.urlId+1)%S;this.warn("Switching to redundant URL-id "+w),this._levels.forEach(function(r){r.urlId=w}),this.level=T}},b.onFragLoaded=function(T,R){var S=R.frag;if(S!==void 0&&S.type===f.PlaylistLevelType.MAIN){var w=this._levels[S.level];w!==void 0&&(w.fragmentError=0,w.loadError=0)}},b.onLevelLoaded=function(T,R){var S,w=R.level,r=R.details,n=this._levels[w];if(!n){var t;this.warn("Invalid level index "+w),(t=R.deliveryDirectives)!==null&&t!==void 0&&t.skip&&(r.deltaUpdateFailed=!0);return}w===this.currentLevelIndex?(n.fragmentError===0&&(n.loadError=0,this.retryCount=0),this.playlistLoaded(w,R,n.details)):(S=R.deliveryDirectives)!==null&&S!==void 0&&S.skip&&(r.deltaUpdateFailed=!0)},b.onAudioTrackSwitched=function(T,R){var S=this.hls.levels[this.currentLevelIndex];if(S&&S.audioGroupIds){for(var w=-1,r=this.hls.audioTracks[R.id].groupId,n=0;n<S.audioGroupIds.length;n++)if(S.audioGroupIds[n]===r){w=n;break}w!==S.urlId&&(S.urlId=w,this.startLoad())}},b.loadPlaylist=function(T){s.prototype.loadPlaylist.call(this);var R=this.currentLevelIndex,S=this._levels[R];if(this.canLoad&&S&&S.url.length>0){var w=S.urlId,r=S.url[w];if(T)try{r=T.addDirectives(r)}catch(n){this.warn("Could not construct new URL with HLS Delivery Directives: "+n)}this.log("Attempt loading level index "+R+((T==null?void 0:T.msn)!==void 0?" at sn "+T.msn+" part "+T.part:"")+" with URL-id "+w+" "+r),this.clearTimer(),this.hls.trigger(P.Events.LEVEL_LOADING,{url:r,level:R,id:w,deliveryDirectives:T||null})}},b.removeLevel=function(T,R){var S=function(n,t){return t!==R},w=this._levels.filter(function(r,n){return n!==T?!0:r.url.length>1&&R!==void 0?(r.url=r.url.filter(S),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(S)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(S)),r.urlId=0,!0):!1}).map(function(r,n){var t=r.details;return t!=null&&t.fragments&&t.fragments.forEach(function(l){l.level=n}),r});this._levels=w,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:w})},p(E,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(T){var R,S=this._levels;if(S.length!==0&&!(this.currentLevelIndex===T&&(R=S[T])!==null&&R!==void 0&&R.details)){if(T<0||T>=S.length){var w=T<0;if(this.hls.trigger(P.Events.ERROR,{type:M.ErrorTypes.OTHER_ERROR,details:M.ErrorDetails.LEVEL_SWITCH_ERROR,level:T,fatal:w,reason:"invalid level idx"}),w)return;T=Math.min(T,S.length-1)}this.clearTimer();var r=this.currentLevelIndex,n=S[r],t=S[T];this.log("switching to level "+T+" from "+r),this.currentLevelIndex=T;var l=g({},t,{level:T,maxBitrate:t.maxBitrate,uri:t.uri,urlId:t.urlId});delete l._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,l);var x=t.details;if(!x||x.live){var y=this.switchParams(t.uri,n==null?void 0:n.details);this.loadPlaylist(y)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(T){this.manualLevelIndex=T,this._startLevel===void 0&&(this._startLevel=T),T!==-1&&(this.level=T)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(T){this._firstLevel=T}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var T=this.hls.config.startLevel;return T!==void 0?T:this._firstLevel}else return this._startLevel},set:function(T){this._startLevel=T}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(T){this.level=T,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=T)}}]),E}(A.default)},"./src/controller/level-helper.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{addGroupId:()=>I,addSliding:()=>a,adjustSliding:()=>o,assignTrackIdsByGroup:()=>A,computeReloadInterval:()=>i,getFragmentWithSN:()=>s,getPartWith:()=>E,mapFragmentIntersection:()=>m,mapPartIntersection:()=>v,mergeDetails:()=>p,updateFragPTSDTS:()=>h,updatePTS:()=>f});var C=L("./src/polyfills/number.ts"),P=L("./src/utils/logger.ts"),M=L("./src/loader/date-range.ts");function e(){return e=Object.assign?Object.assign.bind():function(b){for(var d=1;d<arguments.length;d++){var T=arguments[d];for(var R in T)Object.prototype.hasOwnProperty.call(T,R)&&(b[R]=T[R])}return b},e.apply(this,arguments)}function I(b,d,T){switch(d){case"audio":b.audioGroupIds||(b.audioGroupIds=[]),b.audioGroupIds.push(T);break;case"text":b.textGroupIds||(b.textGroupIds=[]),b.textGroupIds.push(T);break}}function A(b){var d={};b.forEach(function(T){var R=T.groupId||"";T.id=d[R]=d[R]||0,d[R]++})}function f(b,d,T){var R=b[d],S=b[T];g(R,S)}function g(b,d){var T=d.startPTS;if((0,C.isFiniteNumber)(T)){var R=0,S;d.sn>b.sn?(R=T-b.start,S=b):(R=b.start-T,S=d),S.duration!==R&&(S.duration=R)}else if(d.sn>b.sn){var w=b.cc===d.cc;w&&b.minEndPTS?d.start=b.start+(b.minEndPTS-b.start):d.start=b.start+b.duration}else d.start=Math.max(b.start-d.duration,0)}function h(b,d,T,R,S,w){var r=R-T;r<=0&&(P.logger.warn("Fragment should have a positive duration",d),R=T+d.duration,w=S+d.duration);var n=T,t=R,l=d.startPTS,x=d.endPTS;if((0,C.isFiniteNumber)(l)){var y=Math.abs(l-T);(0,C.isFiniteNumber)(d.deltaPTS)?d.deltaPTS=Math.max(y,d.deltaPTS):d.deltaPTS=y,n=Math.max(T,l),T=Math.min(T,l),S=Math.min(S,d.startDTS),t=Math.min(R,x),R=Math.max(R,x),w=Math.max(w,d.endDTS)}d.duration=R-T;var c=T-d.start;d.start=d.startPTS=T,d.maxStartPTS=n,d.startDTS=S,d.endPTS=R,d.minEndPTS=t,d.endDTS=w;var _=d.sn;if(!b||_<b.startSN||_>b.endSN)return 0;var D,O=_-b.startSN,k=b.fragments;for(k[O]=d,D=O;D>0;D--)g(k[D],k[D-1]);for(D=O;D<k.length-1;D++)g(k[D],k[D+1]);return b.fragmentHint&&g(k[k.length-1],b.fragmentHint),b.PTSKnown=b.alignedSliding=!0,c}function p(b,d){for(var T=null,R=b.fragments,S=R.length-1;S>=0;S--){var w=R[S].initSegment;if(w){T=w;break}}b.fragmentHint&&delete b.fragmentHint.endPTS;var r=0,n;if(m(b,d,function(D,O){D.relurl&&(r=D.cc-O.cc),(0,C.isFiniteNumber)(D.startPTS)&&(0,C.isFiniteNumber)(D.endPTS)&&(O.start=O.startPTS=D.startPTS,O.startDTS=D.startDTS,O.appendedPTS=D.appendedPTS,O.maxStartPTS=D.maxStartPTS,O.endPTS=D.endPTS,O.endDTS=D.endDTS,O.minEndPTS=D.minEndPTS,O.duration=D.endPTS-D.startPTS,O.duration&&(n=O),d.PTSKnown=d.alignedSliding=!0),O.elementaryStreams=D.elementaryStreams,O.loader=D.loader,O.stats=D.stats,O.urlId=D.urlId,D.initSegment&&(O.initSegment=D.initSegment,T=D.initSegment)}),T){var t=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments;t.forEach(function(D){var O;(!D.initSegment||D.initSegment.relurl===((O=T)===null||O===void 0?void 0:O.relurl))&&(D.initSegment=T)})}if(d.skippedSegments)if(d.deltaUpdateFailed=d.fragments.some(function(D){return!D}),d.deltaUpdateFailed){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var l=d.skippedSegments;l--;)d.fragments.shift();d.startSN=d.fragments[0].sn,d.startCC=d.fragments[0].cc}else d.canSkipDateRanges&&(d.dateRanges=u(b.dateRanges,d.dateRanges,d.recentlyRemovedDateranges));var x=d.fragments;if(r){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var y=0;y<x.length;y++)x[y].cc+=r}d.skippedSegments&&(d.startCC=d.fragments[0].cc),v(b.partList,d.partList,function(D,O){O.elementaryStreams=D.elementaryStreams,O.stats=D.stats}),n?h(d,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):o(b,d),x.length&&(d.totalduration=d.edge-x[0].start),d.driftStartTime=b.driftStartTime,d.driftStart=b.driftStart;var c=d.advancedDateTime;if(d.advanced&&c){var _=d.edge;d.driftStart||(d.driftStartTime=c,d.driftStart=_),d.driftEndTime=c,d.driftEnd=_}else d.driftEndTime=b.driftEndTime,d.driftEnd=b.driftEnd,d.advancedDateTime=b.advancedDateTime}function u(b,d,T){var R=e({},b);return T&&T.forEach(function(S){delete R[S]}),Object.keys(d).forEach(function(S){var w=new M.DateRange(d[S].attr,R[S]);w.isValid?R[S]=w:P.logger.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(d[S].attr)+'"')}),R}function v(b,d,T){if(b&&d)for(var R=0,S=0,w=b.length;S<=w;S++){var r=b[S],n=d[S+R];r&&n&&r.index===n.index&&r.fragment.sn===n.fragment.sn?T(r,n):R--}}function m(b,d,T){for(var R=d.skippedSegments,S=Math.max(b.startSN,d.startSN)-d.startSN,w=(b.fragmentHint?1:0)+(R?d.endSN:Math.min(b.endSN,d.endSN))-d.startSN,r=d.startSN-b.startSN,n=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,t=b.fragmentHint?b.fragments.concat(b.fragmentHint):b.fragments,l=S;l<=w;l++){var x=t[r+l],y=n[l];R&&!y&&l<R&&(y=d.fragments[l]=x),x&&y&&T(x,y)}}function o(b,d){var T=d.startSN+d.skippedSegments-b.startSN,R=b.fragments;T<0||T>=R.length||a(d,R[T].start)}function a(b,d){if(d){for(var T=b.fragments,R=b.skippedSegments;R<T.length;R++)T[R].start+=d;b.fragmentHint&&(b.fragmentHint.start+=d)}}function i(b,d){d===void 0&&(d=1/0);var T=1e3*b.targetduration;if(b.updated){var R=b.fragments,S=4;if(R.length&&T*S>d){var w=R[R.length-1].duration*1e3;w<T&&(T=w)}}else T/=2;return Math.round(T)}function s(b,d,T){if(!b||!b.details)return null;var R=b.details,S=R.fragments[d-R.startSN];return S||(S=R.fragmentHint,S&&S.sn===d)?S:d<R.startSN&&T&&T.sn===d?T:null}function E(b,d,T){if(!b||!b.details)return null;var R=b.details.partList;if(R)for(var S=R.length;S--;){var w=R[S];if(w.index===T&&w.fragment.sn===d)return w}return null}},"./src/controller/stream-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>d});var C=L("./src/polyfills/number.ts"),P=L("./src/controller/base-stream-controller.ts"),M=L("./src/is-supported.ts"),e=L("./src/events.ts"),I=L("./src/utils/buffer-helper.ts"),A=L("./src/controller/fragment-tracker.ts"),f=L("./src/types/loader.ts"),g=L("./src/loader/fragment.ts"),h=L("./src/demux/transmuxer-interface.ts"),p=L("./src/types/transmuxer.ts"),u=L("./src/controller/gap-controller.ts"),v=L("./src/errors.ts");function m(T,R){for(var S=0;S<R.length;S++){var w=R[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(T,a(w.key),w)}}function o(T,R,S){return R&&m(T.prototype,R),S&&m(T,S),Object.defineProperty(T,"prototype",{writable:!1}),T}function a(T){var R=i(T,"string");return typeof R=="symbol"?R:String(R)}function i(T,R){if(typeof T!="object"||T===null)return T;var S=T[Symbol.toPrimitive];if(S!==void 0){var w=S.call(T,R||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(T)}function s(T,R){T.prototype=Object.create(R.prototype),T.prototype.constructor=T,E(T,R)}function E(T,R){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,r){return w.__proto__=r,w},E(T,R)}var b=100,d=function(T){s(R,T);function R(w,r,n){var t;return t=T.call(this,w,r,n,"[stream-controller]")||this,t.audioCodecSwap=!1,t.gapController=null,t.level=-1,t._forceStartLoad=!1,t.altAudio=!1,t.audioOnly=!1,t.fragPlaying=null,t.onvplaying=null,t.onvseeked=null,t.fragLastKbps=0,t.couldBacktrack=!1,t.backtrackFragment=null,t.audioCodecSwitch=!1,t.videoBuffer=null,t._registerListeners(),t}var S=R.prototype;return S._registerListeners=function(){var r=this.hls;r.on(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(e.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(e.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(e.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(e.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.on(e.Events.ERROR,this.onError,this),r.on(e.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(e.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.on(e.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(e.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(e.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.on(e.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S._unregisterListeners=function(){var r=this.hls;r.off(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(e.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(e.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(e.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.off(e.Events.ERROR,this.onError,this),r.off(e.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(e.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.off(e.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(e.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(e.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.off(e.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},S.startLoad=function(r){if(this.levels){var n=this.lastCurrentTime,t=this.hls;if(this.stopLoad(),this.setInterval(b),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var l=t.startLevel;l===-1&&(t.config.testBandwidth&&this.levels.length>1?(l=0,this.bitrateTest=!0):l=t.nextAutoLevel),this.level=t.nextLoadLevel=l,this.loadedmetadata=!1}n>0&&r===-1&&(this.log("Override startPosition with lastCurrentTime @"+n.toFixed(3)),r=n),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()}else this._forceStartLoad=!0,this.state=P.State.STOPPED},S.stopLoad=function(){this._forceStartLoad=!1,T.prototype.stopLoad.call(this)},S.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_LEVEL:{var r,n=this.levels,t=this.level,l=n==null||(r=n[t])===null||r===void 0?void 0:r.details;if(l&&(!l.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(l))break;this.state=P.State.IDLE;break}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var x,y=self.performance.now(),c=this.retryDate;(!c||y>=c||(x=this.media)!==null&&x!==void 0&&x.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.level),this.state=P.State.IDLE)}break;default:break}this.onTickEnd()},S.onTickEnd=function(){T.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},S.doTickIdle=function(){var r=this.hls,n=this.levelLastLoaded,t=this.levels,l=this.media,x=r.config,y=r.nextLoadLevel;if(!(n===null||!l&&(this.startFragRequested||!x.startFragPrefetch))&&!(this.altAudio&&this.audioOnly)&&!(!t||!t[y])){var c=t[y],_=this.getMainFwdBufferInfo();if(_!==null){var D=this.getLevelDetails();if(D&&this._streamEnded(_,D)){var O={};this.altAudio&&(O.type="video"),this.hls.trigger(e.Events.BUFFER_EOS,O),this.state=P.State.ENDED;return}this.level=r.nextLoadLevel=y;var k=c.details;if(!k||this.state===P.State.WAITING_LEVEL||k.live&&this.levelLastLoaded!==y){this.level=y,this.state=P.State.WAITING_LEVEL;return}var F=_.len,G=this.getMaxBufferLength(c.maxBitrate);if(!(F>=G)){this.backtrackFragment&&this.backtrackFragment.start>_.end&&(this.backtrackFragment=null);var H=this.backtrackFragment?this.backtrackFragment.start:_.end,j=this.getNextFragment(H,k);if(this.couldBacktrack&&!this.fragPrevious&&j&&j.sn!=="initSegment"&&this.fragmentTracker.getState(j)!==A.FragmentState.OK){var Q,ee=((Q=this.backtrackFragment)!=null?Q:j).sn,ie=ee-k.startSN,se=k.fragments[ie-1];se&&j.cc===se.cc&&(j=se,this.fragmentTracker.removeFragment(se))}else this.backtrackFragment&&_.len&&(this.backtrackFragment=null);if(j&&this.fragmentTracker.getState(j)===A.FragmentState.OK&&this.nextLoadPosition>H){var le=this.audioOnly&&!this.altAudio?g.ElementaryStreamTypes.AUDIO:g.ElementaryStreamTypes.VIDEO,xe=(le===g.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;xe&&this.afterBufferFlushed(xe,le,f.PlaylistLevelType.MAIN),j=this.getNextFragment(this.nextLoadPosition,k)}j&&(j.initSegment&&!j.initSegment.data&&!this.bitrateTest&&(j=j.initSegment),this.loadFragment(j,k,H))}}}},S.loadFragment=function(r,n,t){var l,x=this.fragmentTracker.getState(r);this.fragCurrent=r,x===A.FragmentState.NOT_LOADED?r.sn==="initSegment"?this._loadInitSegment(r,n):this.bitrateTest?(this.log("Fragment "+r.sn+" of level "+r.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(r,n)):(this.startFragRequested=!0,T.prototype.loadFragment.call(this,r,n,t)):x===A.FragmentState.APPENDING?this.reduceMaxBufferLength(r.duration)&&this.fragmentTracker.removeFragment(r):((l=this.media)===null||l===void 0?void 0:l.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},S.getAppendedFrag=function(r){var n=this.fragmentTracker.getAppendedFrag(r,f.PlaylistLevelType.MAIN);return n&&"fragment"in n?n.fragment:n},S.getBufferedFrag=function(r){return this.fragmentTracker.getBufferedFrag(r,f.PlaylistLevelType.MAIN)},S.followingBufferedFrag=function(r){return r?this.getBufferedFrag(r.end+.5):null},S.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},S.nextLevelSwitch=function(){var r=this.levels,n=this.media;if(n!=null&&n.readyState){var t,l=this.getAppendedFrag(n.currentTime);if(l&&l.start>1&&this.flushMainBuffer(0,l.start-1),!n.paused&&r){var x=this.hls.nextLoadLevel,y=r[x],c=this.fragLastKbps;c&&this.fragCurrent?t=this.fragCurrent.duration*y.maxBitrate/(1e3*c)+1:t=0}else t=0;var _=this.getBufferedFrag(n.currentTime+t);if(_){var D=this.followingBufferedFrag(_);if(D){this.abortCurrentFrag();var O=D.maxStartPTS?D.maxStartPTS:D.start,k=D.duration,F=Math.max(_.end,O+Math.min(Math.max(k-this.config.maxFragLookUpTolerance,k*.5),k*.75));this.flushMainBuffer(F,Number.POSITIVE_INFINITY)}}}},S.abortCurrentFrag=function(){var r=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,r&&r.abortRequests(),this.state){case P.State.KEY_LOADING:case P.State.FRAG_LOADING:case P.State.FRAG_LOADING_WAITING_RETRY:case P.State.PARSING:case P.State.PARSED:this.state=P.State.IDLE;break}this.nextLoadPosition=this.getLoadPosition()},S.flushMainBuffer=function(r,n){T.prototype.flushMainBuffer.call(this,r,n,this.altAudio?"video":null)},S.onMediaAttached=function(r,n){T.prototype.onMediaAttached.call(this,r,n);var t=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),t.addEventListener("playing",this.onvplaying),t.addEventListener("seeked",this.onvseeked),this.gapController=new u.default(this.config,t,this.fragmentTracker,this.hls)},S.onMediaDetaching=function(){var r=this.media;r&&this.onvplaying&&this.onvseeked&&(r.removeEventListener("playing",this.onvplaying),r.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),T.prototype.onMediaDetaching.call(this)},S.onMediaPlaying=function(){this.tick()},S.onMediaSeeked=function(){var r=this.media,n=r?r.currentTime:null;(0,C.isFiniteNumber)(n)&&this.log("Media seeked to "+n.toFixed(3)),this.tick()},S.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(e.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null,this.backtrackFragment=null},S.onManifestParsed=function(r,n){var t=!1,l=!1,x;n.levels.forEach(function(y){x=y.audioCodec,x&&(x.indexOf("mp4a.40.2")!==-1&&(t=!0),x.indexOf("mp4a.40.5")!==-1&&(l=!0))}),this.audioCodecSwitch=t&&l&&!(0,M.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=n.levels,this.startFragRequested=!1},S.onLevelLoading=function(r,n){var t=this.levels;if(!(!t||this.state!==P.State.IDLE)){var l=t[n.level];(!l.details||l.details.live&&this.levelLastLoaded!==n.level||this.waitForCdnTuneIn(l.details))&&(this.state=P.State.WAITING_LEVEL)}},S.onLevelLoaded=function(r,n){var t,l=this.levels,x=n.level,y=n.details,c=y.totalduration;if(!l){this.warn("Levels were reset while loading level "+x);return}this.log("Level "+x+" loaded ["+y.startSN+","+y.endSN+"], cc ["+y.startCC+", "+y.endCC+"] duration:"+c);var _=this.fragCurrent;_&&(this.state===P.State.FRAG_LOADING||this.state===P.State.FRAG_LOADING_WAITING_RETRY)&&_.level!==n.level&&_.loader&&(this.state=P.State.IDLE,this.backtrackFragment=null,_.abortRequests());var D=l[x],O=0;if(y.live||(t=D.details)!==null&&t!==void 0&&t.live){if(y.fragments[0]||(y.deltaUpdateFailed=!0),y.deltaUpdateFailed)return;O=this.alignPlaylists(y,D.details)}if(D.details=y,this.levelLastLoaded=x,this.hls.trigger(e.Events.LEVEL_UPDATED,{details:y,level:x}),this.state===P.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(y))return;this.state=P.State.IDLE}this.startFragRequested?y.live&&this.synchronizeToLiveEdge(y):this.setStartPosition(y,O),this.tick()},S._handleFragmentLoadProgress=function(r){var n,t=r.frag,l=r.part,x=r.payload,y=this.levels;if(!y){this.warn("Levels were reset while fragment load was in progress. Fragment "+t.sn+" of level "+t.level+" will not be buffered");return}var c=y[t.level],_=c.details;if(!_){this.warn("Dropping fragment "+t.sn+" of level "+t.level+" after level details were reset");return}var D=c.videoCodec,O=_.PTSKnown||!_.live,k=(n=t.initSegment)===null||n===void 0?void 0:n.data,F=this._getAudioCodec(c),G=this.transmuxer=this.transmuxer||new h.default(this.hls,f.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),H=l?l.index:-1,j=H!==-1,Q=new p.ChunkMetadata(t.level,t.sn,t.stats.chunkCount,x.byteLength,H,j),ee=this.initPTS[t.cc];G.push(x,k,F,D,t,l,_.totalduration,O,Q,ee)},S.onAudioTrackSwitching=function(r,n){var t=this.altAudio,l=!!n.url,x=n.id;if(!l){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var y=this.fragCurrent;y&&(this.log("Switching to main audio track, cancel main fragment load"),y.abortRequests()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var c=this.hls;t&&c.trigger(e.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),c.trigger(e.Events.AUDIO_TRACK_SWITCHED,{id:x})}},S.onAudioTrackSwitched=function(r,n){var t=n.id,l=!!this.hls.audioTracks[t].url;if(l){var x=this.videoBuffer;x&&this.mediaBuffer!==x&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=x)}this.altAudio=l,this.tick()},S.onBufferCreated=function(r,n){var t=n.tracks,l,x,y=!1;for(var c in t){var _=t[c];if(_.id==="main"){if(x=c,l=_,c==="video"){var D=t[c];D&&(this.videoBuffer=D.buffer)}}else y=!0}y&&l?(this.log("Alternate track found, use "+x+".buffered to schedule main fragment loading"),this.mediaBuffer=l.buffer):this.mediaBuffer=this.media},S.onFragBuffered=function(r,n){var t=n.frag,l=n.part;if(!(t&&t.type!==f.PlaylistLevelType.MAIN)){if(this.fragContextChanged(t)){this.warn("Fragment "+t.sn+(l?" p: "+l.index:"")+" of level "+t.level+" finished buffering, but was aborted. state: "+this.state),this.state===P.State.PARSED&&(this.state=P.State.IDLE);return}var x=l?l.stats:t.stats;this.fragLastKbps=Math.round(8*x.total/(x.buffering.end-x.loading.first)),t.sn!=="initSegment"&&(this.fragPrevious=t),this.fragBufferedComplete(t,l)}},S.onError=function(r,n){if(n.type===v.ErrorTypes.KEY_SYSTEM_ERROR){this.onFragmentOrKeyLoadError(f.PlaylistLevelType.MAIN,n);return}switch(n.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:case v.ErrorDetails.FRAG_PARSING_ERROR:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(f.PlaylistLevelType.MAIN,n);break;case v.ErrorDetails.LEVEL_LOAD_ERROR:case v.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(n.fatal?(this.warn(""+n.details),this.state=P.State.ERROR):!n.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case v.ErrorDetails.BUFFER_FULL_ERROR:if(n.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var t=!0,l=this.getFwdBufferInfo(this.media,f.PlaylistLevelType.MAIN);l&&l.len>.5&&(t=!this.reduceMaxBufferLength(l.len)),t&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},S.checkBuffer=function(){var r=this.media,n=this.gapController;if(!(!r||!n||!r.readyState)){if(this.loadedmetadata||!I.BufferHelper.getBuffered(r).length){var t=this.state!==P.State.IDLE?this.fragCurrent:null;n.poll(this.lastCurrentTime,t)}this.lastCurrentTime=r.currentTime}},S.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},S.onBufferFlushed=function(r,n){var t=n.type;if(t!==g.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var l=(t===g.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(l,t,f.PlaylistLevelType.MAIN)}},S.onLevelsUpdated=function(r,n){this.levels=n.levels},S.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},S.seekToStartPos=function(){var r=this.media;if(r){var n=r.currentTime,t=this.startPosition;if(t>=0&&n<t){if(r.seeking){this.log("could not seek to "+t+", already seeking at "+n);return}var l=I.BufferHelper.getBuffered(r),x=l.length?l.start(0):0,y=x-t;y>0&&(y<this.config.maxBufferHole||y<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+y+" to match buffer start"),t+=y,this.startPosition=t),this.log("seek to target start position "+t+" from current time "+n),r.currentTime=t}}},S._getAudioCodec=function(r){var n=this.config.defaultAudioCodec||r.audioCodec;return this.audioCodecSwap&&n&&(this.log("Swapping audio codec"),n.indexOf("mp4a.40.5")!==-1?n="mp4a.40.2":n="mp4a.40.5"),n},S._loadBitrateTestFrag=function(r,n){var t=this;r.bitrateTest=!0,this._doFragLoad(r,n).then(function(l){var x=t.hls;if(!(!l||t.fragContextChanged(r))){t.fragLoadError=0,t.state=P.State.IDLE,t.startFragRequested=!1,t.bitrateTest=!1;var y=r.stats;y.parsing.start=y.parsing.end=y.buffering.start=y.buffering.end=self.performance.now(),x.trigger(e.Events.FRAG_LOADED,l),r.bitrateTest=!1}})},S._handleTransmuxComplete=function(r){var n,t="main",l=this.hls,x=r.remuxResult,y=r.chunkMeta,c=this.getCurrentContext(y);if(!c){this.warn("The loading context changed while buffering fragment "+y.sn+" of level "+y.level+". This chunk will not be buffered."),this.resetStartWhenNotLoaded(y.level);return}var _=c.frag,D=c.part,O=c.level,k=x.video,F=x.text,G=x.id3,H=x.initSegment,j=O.details,Q=this.altAudio?void 0:x.audio;if(!this.fragContextChanged(_)){if(this.state=P.State.PARSING,H){H.tracks&&(this._bufferInitSegment(O,H.tracks,_,y),l.trigger(e.Events.FRAG_PARSING_INIT_SEGMENT,{frag:_,id:t,tracks:H.tracks}));var ee=H.initPTS,ie=H.timescale;(0,C.isFiniteNumber)(ee)&&(this.initPTS[_.cc]=ee,l.trigger(e.Events.INIT_PTS_FOUND,{frag:_,id:t,initPTS:ee,timescale:ie}))}if(k&&x.independent!==!1){if(j){var se=k.startPTS,le=k.endPTS,xe=k.startDTS,Re=k.endDTS;if(D)D.elementaryStreams[k.type]={startPTS:se,endPTS:le,startDTS:xe,endDTS:Re};else if(k.firstKeyFrame&&k.independent&&y.id===1&&(this.couldBacktrack=!0),k.dropped&&k.independent){var Ee=this.getMainFwdBufferInfo(),he=(Ee?Ee.end:this.getLoadPosition())+this.config.maxBufferHole,be=k.firstKeyFramePTS?k.firstKeyFramePTS:se;if(he<be-this.config.maxBufferHole){this.backtrack(_);return}_.setElementaryStreamInfo(k.type,_.start,le,_.start,Re,!0)}_.setElementaryStreamInfo(k.type,se,le,xe,Re),this.backtrackFragment&&(this.backtrackFragment=_),this.bufferFragmentData(k,_,D,y)}}else if(x.independent===!1){this.backtrack(_);return}if(Q){var Ce=Q.startPTS,Ue=Q.endPTS,$e=Q.startDTS,z=Q.endDTS;D&&(D.elementaryStreams[g.ElementaryStreamTypes.AUDIO]={startPTS:Ce,endPTS:Ue,startDTS:$e,endDTS:z}),_.setElementaryStreamInfo(g.ElementaryStreamTypes.AUDIO,Ce,Ue,$e,z),this.bufferFragmentData(Q,_,D,y)}if(j&&G!==null&&G!==void 0&&(n=G.samples)!==null&&n!==void 0&&n.length){var ne={id:t,frag:_,details:j,samples:G.samples};l.trigger(e.Events.FRAG_PARSING_METADATA,ne)}if(j&&F){var de={id:t,frag:_,details:j,samples:F.samples};l.trigger(e.Events.FRAG_PARSING_USERDATA,de)}}},S._bufferInitSegment=function(r,n,t,l){var x=this;if(this.state===P.State.PARSING){this.audioOnly=!!n.audio&&!n.video,this.altAudio&&!this.audioOnly&&delete n.audio;var y=n.audio,c=n.video,_=n.audiovideo;if(y){var D=r.audioCodec,O=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(D&&(D.indexOf("mp4a.40.5")!==-1?D="mp4a.40.2":D="mp4a.40.5"),y.metadata.channelCount!==1&&O.indexOf("firefox")===-1&&(D="mp4a.40.5")),O.indexOf("android")!==-1&&y.container!=="audio/mpeg"&&(D="mp4a.40.2",this.log("Android: force audio codec to "+D)),r.audioCodec&&r.audioCodec!==D&&this.log('Swapping manifest audio codec "'+r.audioCodec+'" for "'+D+'"'),y.levelCodec=D,y.id="main",this.log("Init audio buffer, container:"+y.container+", codecs[selected/level/parsed]=["+(D||"")+"/"+(r.audioCodec||"")+"/"+y.codec+"]")}c&&(c.levelCodec=r.videoCodec,c.id="main",this.log("Init video buffer, container:"+c.container+", codecs[level/parsed]=["+(r.videoCodec||"")+"/"+c.codec+"]")),_&&this.log("Init audiovideo buffer, container:"+_.container+", codecs[level/parsed]=["+(r.attrs.CODECS||"")+"/"+_.codec+"]"),this.hls.trigger(e.Events.BUFFER_CODECS,n),Object.keys(n).forEach(function(k){var F=n[k],G=F.initSegment;G!=null&&G.byteLength&&x.hls.trigger(e.Events.BUFFER_APPENDING,{type:k,data:G,frag:t,part:null,chunkMeta:l,parent:t.type})}),this.tick()}},S.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,f.PlaylistLevelType.MAIN)},S.backtrack=function(r){this.couldBacktrack=!0,this.backtrackFragment=r,this.resetTransmuxer(),this.flushBufferGap(r),this.fragmentTracker.removeFragment(r),this.fragPrevious=null,this.nextLoadPosition=r.start,this.state=P.State.IDLE},S.checkFragmentChanged=function(){var r=this.media,n=null;if(r&&r.readyState>1&&r.seeking===!1){var t=r.currentTime;if(I.BufferHelper.isBuffered(r,t)?n=this.getAppendedFrag(t):I.BufferHelper.isBuffered(r,t+.1)&&(n=this.getAppendedFrag(t+.1)),n){this.backtrackFragment=null;var l=this.fragPlaying,x=n.level;(!l||n.sn!==l.sn||l.level!==x||n.urlId!==l.urlId)&&(this.fragPlaying=n,this.hls.trigger(e.Events.FRAG_CHANGED,{frag:n}),(!l||l.level!==x)&&this.hls.trigger(e.Events.LEVEL_SWITCHED,{level:x}))}}},o(R,[{key:"nextLevel",get:function(){var r=this.nextBufferedFrag;return r?r.level:-1}},{key:"currentFrag",get:function(){var r=this.media;return r?this.fragPlaying||this.getAppendedFrag(r.currentTime):null}},{key:"currentProgramDateTime",get:function(){var r=this.media;if(r){var n=r.currentTime,t=this.currentFrag;if(t&&(0,C.isFiniteNumber)(n)&&(0,C.isFiniteNumber)(t.programDateTime)){var l=t.programDateTime+(n-t.start)*1e3;return new Date(l)}}return null}},{key:"currentLevel",get:function(){var r=this.currentFrag;return r?r.level:-1}},{key:"nextBufferedFrag",get:function(){var r=this.currentFrag;return r?this.followingBufferedFrag(r):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(P.default)},"./src/controller/subtitle-stream-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{SubtitleStreamController:()=>s});var C=L("./src/events.ts"),P=L("./src/utils/buffer-helper.ts"),M=L("./src/controller/fragment-finders.ts"),e=L("./src/utils/discontinuities.ts"),I=L("./src/controller/level-helper.ts"),A=L("./src/controller/fragment-tracker.ts"),f=L("./src/controller/base-stream-controller.ts"),g=L("./src/types/loader.ts"),h=L("./src/types/level.ts");function p(b,d){for(var T=0;T<d.length;T++){var R=d[T];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(b,v(R.key),R)}}function u(b,d,T){return d&&p(b.prototype,d),T&&p(b,T),Object.defineProperty(b,"prototype",{writable:!1}),b}function v(b){var d=m(b,"string");return typeof d=="symbol"?d:String(d)}function m(b,d){if(typeof b!="object"||b===null)return b;var T=b[Symbol.toPrimitive];if(T!==void 0){var R=T.call(b,d||"default");if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(b)}function o(b,d){b.prototype=Object.create(d.prototype),b.prototype.constructor=b,a(b,d)}function a(b,d){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,S){return R.__proto__=S,R},a(b,d)}var i=500,s=function(b){o(d,b);function d(R,S,w){var r;return r=b.call(this,R,S,w,"[subtitle-stream-controller]")||this,r.levels=[],r.currentTrackId=-1,r.tracksBuffered=[],r.mainDetails=null,r._registerListeners(),r}var T=d.prototype;return T.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},T._registerListeners=function(){var S=this.hls;S.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),S.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.on(C.Events.ERROR,this.onError,this),S.on(C.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),S.on(C.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),S.on(C.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),S.on(C.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),S.on(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),S.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},T._unregisterListeners=function(){var S=this.hls;S.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),S.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.off(C.Events.ERROR,this.onError,this),S.off(C.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),S.off(C.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),S.off(C.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),S.off(C.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),S.off(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),S.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},T.startLoad=function(S){this.stopLoad(),this.state=f.State.IDLE,this.setInterval(i),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=S,this.tick()},T.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},T.onLevelLoaded=function(S,w){this.mainDetails=w.details},T.onSubtitleFragProcessed=function(S,w){var r=w.frag,n=w.success;if(this.fragPrevious=r,this.state=f.State.IDLE,!!n){var t=this.tracksBuffered[this.currentTrackId];if(t){for(var l,x=r.start,y=0;y<t.length;y++)if(x>=t[y].start&&x<=t[y].end){l=t[y];break}var c=r.start+r.duration;l?l.end=c:(l={start:x,end:c},t.push(l)),this.fragmentTracker.fragBuffered(r)}}},T.onBufferFlushing=function(S,w){var r=w.startOffset,n=w.endOffset;if(r===0&&n!==Number.POSITIVE_INFINITY){var t=this.currentTrackId,l=this.levels;if(!l.length||!l[t]||!l[t].details)return;var x=l[t].details,y=x.targetduration,c=n-y;if(c<=0)return;w.endOffsetSubtitles=Math.max(0,c),this.tracksBuffered.forEach(function(_){for(var D=0;D<_.length;){if(_[D].end<=c){_.shift();continue}else if(_[D].start<c)_[D].start=c;else break;D++}}),this.fragmentTracker.removeFragmentsInRange(r,c,g.PlaylistLevelType.SUBTITLE)}},T.onFragBuffered=function(S,w){if(!this.loadedmetadata&&w.frag.type===g.PlaylistLevelType.MAIN){var r;(r=this.media)!==null&&r!==void 0&&r.buffered.length&&(this.loadedmetadata=!0)}},T.onError=function(S,w){var r=w.frag;!r||r.type!==g.PlaylistLevelType.SUBTITLE||(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state=f.State.IDLE)},T.onSubtitleTracksUpdated=function(S,w){var r=this,n=w.subtitleTracks;this.tracksBuffered=[],this.levels=n.map(function(t){return new h.Level(t)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(t){r.tracksBuffered[t.id]=[]}),this.mediaBuffer=null},T.onSubtitleTrackSwitch=function(S,w){if(this.currentTrackId=w.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var r=this.levels[this.currentTrackId];r!=null&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.setInterval(i)},T.onSubtitleTrackLoaded=function(S,w){var r,n=w.details,t=w.id,l=this.currentTrackId,x=this.levels;if(x.length){var y=x[l];if(!(t>=x.length||t!==l||!y)){this.mediaBuffer=this.mediaBufferTimeRanges;var c=0;if(n.live||(r=y.details)!==null&&r!==void 0&&r.live){var _=this.mainDetails;if(n.deltaUpdateFailed||!_)return;var D=_.fragments[0];y.details?(c=this.alignPlaylists(n,y.details),c===0&&D&&(c=D.start,(0,I.addSliding)(n,c))):n.hasProgramDateTime&&_.hasProgramDateTime?((0,e.alignMediaPlaylistByPDT)(n,_),c=n.fragments[0].start):D&&(c=D.start,(0,I.addSliding)(n,c))}if(y.details=n,this.levelLastLoaded=t,!this.startFragRequested&&(this.mainDetails||!n.live)&&this.setStartPosition(y.details,c),this.tick(),n.live&&!this.fragCurrent&&this.media&&this.state===f.State.IDLE){var O=(0,M.findFragmentByPTS)(null,n.fragments,this.media.currentTime,0);O||(this.warn("Subtitle playlist not aligned with playback"),y.details=void 0)}}}},T._handleFragmentLoadComplete=function(S){var w=this,r=S.frag,n=S.payload,t=r.decryptdata,l=this.hls;if(!this.fragContextChanged(r)&&n&&n.byteLength>0&&t&&t.key&&t.iv&&t.method==="AES-128"){var x=performance.now();this.decrypter.decrypt(new Uint8Array(n),t.key.buffer,t.iv.buffer).then(function(y){var c=performance.now();l.trigger(C.Events.FRAG_DECRYPTED,{frag:r,payload:y,stats:{tstart:x,tdecrypt:c}})}).catch(function(y){w.warn(y.name+": "+y.message),w.state=f.State.IDLE})}},T.doTick=function(){if(!this.media){this.state=f.State.IDLE;return}if(this.state===f.State.IDLE){var S=this.currentTrackId,w=this.levels;if(!w.length||!w[S]||!w[S].details)return;var r=w[S].details,n=r.targetduration,t=this.config,l=this.getLoadPosition(),x=P.BufferHelper.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],l-n,t.maxBufferHole),y=x.end,c=x.len,_=this.getFwdBufferInfo(this.media,g.PlaylistLevelType.MAIN),D=this.getMaxBufferLength(_==null?void 0:_.len)+n;if(c>D)return;console.assert(r,"Subtitle track details are defined on idle subtitle stream controller tick");var O=r.fragments,k=O.length,F=r.edge,G=null,H=this.fragPrevious;if(y<F){var j=t.maxFragLookUpTolerance;G=(0,M.findFragmentByPTS)(H,O,Math.max(O[0].start,y),j),!G&&H&&H.start<O[0].start&&(G=O[0])}else G=O[k-1];if(!G)return;G=this.mapToInitFragWhenRequired(G),this.fragmentTracker.getState(G)===A.FragmentState.NOT_LOADED&&this.loadFragment(G,r,y)}},T.getMaxBufferLength=function(S){var w=b.prototype.getMaxBufferLength.call(this);return S?Math.max(w,S):w},T.loadFragment=function(S,w,r){this.fragCurrent=S,S.sn==="initSegment"?this._loadInitSegment(S,w):(this.startFragRequested=!0,b.prototype.loadFragment.call(this,S,w,r))},u(d,[{key:"mediaBufferTimeRanges",get:function(){return new E(this.tracksBuffered[this.currentTrackId]||[])}}]),d}(f.default),E=function(d){this.buffered=void 0;var T=function(S,w,r){if(w=w>>>0,w>r-1)throw new DOMException("Failed to execute '"+S+"' on 'TimeRanges': The index provided ("+w+") is greater than the maximum bound ("+r+")");return d[w][S]};this.buffered={get length(){return d.length},end:function(S){return T("end",S,d.length)},start:function(S){return T("start",S,d.length)}}}},"./src/controller/subtitle-track-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>m});var C=L("./src/events.ts"),P=L("./src/utils/texttrack-utils.ts"),M=L("./src/controller/base-playlist-controller.ts"),e=L("./src/types/loader.ts");function I(o,a){for(var i=0;i<a.length;i++){var s=a[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,f(s.key),s)}}function A(o,a,i){return a&&I(o.prototype,a),i&&I(o,i),Object.defineProperty(o,"prototype",{writable:!1}),o}function f(o){var a=g(o,"string");return typeof a=="symbol"?a:String(a)}function g(o,a){if(typeof o!="object"||o===null)return o;var i=o[Symbol.toPrimitive];if(i!==void 0){var s=i.call(o,a||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}function h(o,a){o.prototype=Object.create(a.prototype),o.prototype.constructor=o,p(o,a)}function p(o,a){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,E){return s.__proto__=E,s},p(o,a)}var u=function(o){h(a,o);function a(s){var E;return E=o.call(this,s,"[subtitle-track-controller]")||this,E.media=null,E.tracks=[],E.groupId=null,E.tracksInGroup=[],E.trackId=-1,E.selectDefaultTrack=!0,E.queuedDefaultTrack=-1,E.trackChangeListener=function(){return E.onTextTracksChanged()},E.asyncPollTrackChange=function(){return E.pollTrackChange(0)},E.useTextTrackPolling=!1,E.subtitlePollingInterval=-1,E._subtitleDisplay=!0,E.registerListeners(),E}var i=a.prototype;return i.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,o.prototype.destroy.call(this)},i.registerListeners=function(){var E=this.hls;E.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(C.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(C.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),E.on(C.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),E.on(C.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var E=this.hls;E.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(C.Events.LEVEL_LOADING,this.onLevelLoading,this),E.off(C.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),E.off(C.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),E.off(C.Events.ERROR,this.onError,this)},i.onMediaAttached=function(E,b){this.media=b.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},i.pollTrackChange=function(E){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,E)},i.onMediaDetaching=function(){if(this.media){self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var E=v(this.media.textTracks);E.forEach(function(b){(0,P.clearCurrentCues)(b)}),this.subtitleTrack=-1,this.media=null}},i.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},i.onManifestParsed=function(E,b){this.tracks=b.subtitleTracks},i.onSubtitleTrackLoaded=function(E,b){var d=b.id,T=b.details,R=this.trackId,S=this.tracksInGroup[R];if(!S){this.warn("Invalid subtitle track id "+d);return}var w=S.details;S.details=b.details,this.log("subtitle track "+d+" loaded ["+T.startSN+"-"+T.endSN+"]"),d===this.trackId&&(this.retryCount=0,this.playlistLoaded(d,b,w))},i.onLevelLoading=function(E,b){this.switchLevel(b.level)},i.onLevelSwitching=function(E,b){this.switchLevel(b.level)},i.switchLevel=function(E){var b=this.hls.levels[E];if(b!=null&&b.textGroupIds){var d=b.textGroupIds[b.urlId];if(this.groupId!==d){var T=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,R=this.tracks.filter(function(r){return!d||r.groupId===d});this.tracksInGroup=R;var S=this.findTrackId(T==null?void 0:T.name)||this.findTrackId();this.groupId=d;var w={subtitleTracks:R};this.log("Updating subtitle tracks, "+R.length+' track(s) found in "'+d+'" group-id'),this.hls.trigger(C.Events.SUBTITLE_TRACKS_UPDATED,w),S!==-1&&this.setSubtitleTrack(S,T)}}},i.findTrackId=function(E){for(var b=this.tracksInGroup,d=0;d<b.length;d++){var T=b[d];if((!this.selectDefaultTrack||T.default)&&(!E||E===T.name))return T.id}return-1},i.onError=function(E,b){o.prototype.onError.call(this,E,b),!(b.fatal||!b.context)&&b.context.type===e.PlaylistContextType.SUBTITLE_TRACK&&b.context.id===this.trackId&&b.context.groupId===this.groupId&&this.retryLoadingOrFail(b)},i.loadPlaylist=function(E){o.prototype.loadPlaylist.call(this);var b=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(b)){var d=b.id,T=b.groupId,R=b.url;if(E)try{R=E.addDirectives(R)}catch(S){this.warn("Could not construct new URL with HLS Delivery Directives: "+S)}this.log("Loading subtitle playlist for id "+d),this.hls.trigger(C.Events.SUBTITLE_TRACK_LOADING,{url:R,id:d,groupId:T,deliveryDirectives:E||null})}},i.toggleTrackModes=function(E){var b=this,d=this.media,T=this.trackId;if(d){var R=v(d.textTracks),S=R.filter(function(n){return n.groupId===b.groupId});if(E===-1)[].slice.call(R).forEach(function(n){n.mode="disabled"});else{var w=S[T];w&&(w.mode="disabled")}var r=S[E];r&&(r.mode=this.subtitleDisplay?"showing":"hidden")}},i.setSubtitleTrack=function(E,b){var d,T=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=E;return}if(this.trackId!==E&&this.toggleTrackModes(E),!(this.trackId===E&&(E===-1||(d=T[E])!==null&&d!==void 0&&d.details)||E<-1||E>=T.length)){this.clearTimer();var R=T[E];if(this.log("Switching to subtitle track "+E),this.trackId=E,R){var S=R.id,w=R.groupId,r=w===void 0?"":w,n=R.name,t=R.type,l=R.url;this.hls.trigger(C.Events.SUBTITLE_TRACK_SWITCH,{id:S,groupId:r,name:n,type:t,url:l});var x=this.switchParams(R.url,b==null?void 0:b.details);this.loadPlaylist(x)}else this.hls.trigger(C.Events.SUBTITLE_TRACK_SWITCH,{id:E})}},i.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!(!this.media||!this.hls.config.renderTextTracksNatively)){for(var E=-1,b=v(this.media.textTracks),d=0;d<b.length;d++)if(b[d].mode==="hidden")E=d;else if(b[d].mode==="showing"){E=d;break}this.subtitleTrack!==E&&(this.subtitleTrack=E)}},A(a,[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(E){this._subtitleDisplay=E,this.trackId>-1&&this.toggleTrackModes(this.trackId)}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(E){this.selectDefaultTrack=!1;var b=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(E,b)}}]),a}(M.default);function v(o){for(var a=[],i=0;i<o.length;i++){var s=o[i];(s.kind==="subtitles"||s.kind==="captions")&&s.label&&a.push(o[i])}return a}const m=u},"./src/controller/timeline-controller.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{TimelineController:()=>u});var C=L("./src/polyfills/number.ts"),P=L("./src/events.ts"),M=L("./src/utils/cea-608-parser.ts"),e=L("./src/utils/output-filter.ts"),I=L("./src/utils/webvtt-parser.ts"),A=L("./src/utils/texttrack-utils.ts"),f=L("./src/utils/imsc1-ttml-parser.ts"),g=L("./src/utils/mp4-tools.ts"),h=L("./src/types/loader.ts"),p=L("./src/utils/logger.ts"),u=function(){function a(s){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=o(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var E=new e.default(this,"textTrack1"),b=new e.default(this,"textTrack2"),d=new e.default(this,"textTrack3"),T=new e.default(this,"textTrack4");this.cea608Parser1=new M.default(1,E,b),this.cea608Parser2=new M.default(3,d,T)}s.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(P.Events.FRAG_LOADING,this.onFragLoading,this),s.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=a.prototype;return i.destroy=function(){var E=this.hls;E.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),E.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),E.off(P.Events.FRAG_LOADING,this.onFragLoading,this),E.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),E.off(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),E.off(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),E.off(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.off(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),E.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(E,b,d,T,R){for(var S=!1,w=R.length;w--;){var r=R[w],n=m(r[0],r[1],b,d);if(n>=0&&(r[0]=Math.min(r[0],b),r[1]=Math.max(r[1],d),S=!0,n/(d-b)>.5))return}if(S||R.push([b,d]),this.config.renderTextTracksNatively){var t=this.captionsTracks[E];this.Cues.newCue(t,b,d,T)}else{var l=this.Cues.newCue(null,b,d,T);this.hls.trigger(P.Events.CUES_PARSED,{type:"captions",cues:l,track:E})}},i.onInitPtsFound=function(E,b){var d=this,T=b.frag,R=b.id,S=b.initPTS,w=b.timescale,r=this.unparsedVttFrags;R==="main"&&(this.initPTS[T.cc]=S,this.timescale[T.cc]=w),r.length&&(this.unparsedVttFrags=[],r.forEach(function(n){d.onFragLoaded(P.Events.FRAG_LOADED,n)}))},i.getExistingTrack=function(E){var b=this.media;if(b)for(var d=0;d<b.textTracks.length;d++){var T=b.textTracks[d];if(T[E])return T}return null},i.createCaptionsTrack=function(E){this.config.renderTextTracksNatively?this.createNativeTrack(E):this.createNonNativeTrack(E)},i.createNativeTrack=function(E){if(!this.captionsTracks[E]){var b=this.captionsProperties,d=this.captionsTracks,T=this.media,R=b[E],S=R.label,w=R.languageCode,r=this.getExistingTrack(E);if(r)d[E]=r,(0,A.clearCurrentCues)(d[E]),(0,A.sendAddTrackEvent)(d[E],T);else{var n=this.createTextTrack("captions",S,w);n&&(n[E]=!0,d[E]=n)}}},i.createNonNativeTrack=function(E){if(!this.nonNativeCaptionsTracks[E]){var b=this.captionsProperties[E];if(b){var d=b.label,T={_id:E,label:d,kind:"captions",default:b.media?!!b.media.default:!1,closedCaptions:b.media};this.nonNativeCaptionsTracks[E]=T,this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[T]})}}},i.createTextTrack=function(E,b,d){var T=this.media;if(T)return T.addTextTrack(E,b,d)},i.onMediaAttaching=function(E,b){this.media=b.media,this._cleanTracks()},i.onMediaDetaching=function(){var E=this.captionsTracks;Object.keys(E).forEach(function(b){(0,A.clearCurrentCues)(E[b]),delete E[b]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=o(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},i._cleanTracks=function(){var E=this.media;if(E){var b=E.textTracks;if(b)for(var d=0;d<b.length;d++)(0,A.clearCurrentCues)(b[d])}},i.onSubtitleTracksUpdated=function(E,b){var d=this;this.textTracks=[];var T=b.subtitleTracks||[],R=T.some(function(n){return n.textCodec===f.IMSC1_CODEC});if(this.config.enableWebVTT||R&&this.config.enableIMSC1){var S=this.tracks&&T&&this.tracks.length===T.length;if(this.tracks=T||[],this.config.renderTextTracksNatively){var w=this.media?this.media.textTracks:[];this.tracks.forEach(function(n,t){var l;if(t<w.length){for(var x=null,y=0;y<w.length;y++)if(v(w[y],n)){x=w[y];break}x&&(l=x)}if(l)(0,A.clearCurrentCues)(l);else{var c=d._captionsOrSubtitlesFromCharacteristics(n);l=d.createTextTrack(c,n.name,n.lang),l&&(l.mode="disabled")}l&&(l.groupId=n.groupId,d.textTracks.push(l))})}else if(!S&&this.tracks&&this.tracks.length){var r=this.tracks.map(function(n){return{label:n.name,kind:n.type.toLowerCase(),default:n.default,subtitleTrack:n}});this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:r})}}},i._captionsOrSubtitlesFromCharacteristics=function(E){var b;if((b=E.attrs)!==null&&b!==void 0&&b.CHARACTERISTICS){var d=/transcribes-spoken-dialog/gi.test(E.attrs.CHARACTERISTICS),T=/describes-music-and-sound/gi.test(E.attrs.CHARACTERISTICS);if(d&&T)return"captions"}return"subtitles"},i.onManifestLoaded=function(E,b){var d=this;this.config.enableCEA708Captions&&b.captions&&b.captions.forEach(function(T){var R=/(?:CC|SERVICE)([1-4])/.exec(T.instreamId);if(R){var S="textTrack"+R[1],w=d.captionsProperties[S];w&&(w.label=T.name,T.lang&&(w.languageCode=T.lang),w.media=T)}})},i.closedCaptionsForLevel=function(E){var b=this.hls.levels[E.level];return b==null?void 0:b.attrs["CLOSED-CAPTIONS"]},i.onFragLoading=function(E,b){var d=this.cea608Parser1,T=this.cea608Parser2,R=this.lastSn,S=this.lastPartIndex;if(!(!this.enabled||!(d&&T))&&b.frag.type===h.PlaylistLevelType.MAIN){var w,r,n=b.frag.sn,t=(w=b==null||(r=b.part)===null||r===void 0?void 0:r.index)!=null?w:-1;n===R+1||n===R&&t===S+1||(d.reset(),T.reset()),this.lastSn=n,this.lastPartIndex=t}},i.onFragLoaded=function(E,b){var d=b.frag,T=b.payload,R=this.initPTS,S=this.unparsedVttFrags;if(d.type===h.PlaylistLevelType.SUBTITLE)if(T.byteLength){if(!(0,C.isFiniteNumber)(R[d.cc])){S.push(b),R.length&&this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:new Error("Missing initial subtitle PTS")});return}var w=d.decryptdata,r="stats"in b;if(w==null||!w.encrypted||r){var n=this.tracks[d.level],t=this.vttCCs;t[d.cc]||(t[d.cc]={start:d.start,prevCC:this.prevCC,new:!0},this.prevCC=d.cc),n&&n.textCodec===f.IMSC1_CODEC?this._parseIMSC1(d,T):this._parseVTTs(d,T,t)}}else this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(E,b){var d=this,T=this.hls;(0,f.parseIMSC1)(b,this.initPTS[E.cc],this.timescale[E.cc],function(R){d._appendCues(R,E.level),T.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:E})},function(R){p.logger.log("Failed to parse IMSC1: "+R),T.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:R})})},i._parseVTTs=function(E,b,d){var T,R=this,S=this.hls,w=(T=E.initSegment)!==null&&T!==void 0&&T.data?(0,g.appendUint8Array)(E.initSegment.data,new Uint8Array(b)):b;(0,I.parseWebVTT)(w,this.initPTS[E.cc],this.timescale[E.cc],d,E.cc,E.start,function(r){R._appendCues(r,E.level),S.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:E})},function(r){R._fallbackToIMSC1(E,b),p.logger.log("Failed to parse VTT cue: "+r),S.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:r})})},i._fallbackToIMSC1=function(E,b){var d=this,T=this.tracks[E.level];T.textCodec||(0,f.parseIMSC1)(b,this.initPTS[E.cc],this.timescale[E.cc],function(){T.textCodec=f.IMSC1_CODEC,d._parseIMSC1(E,b)},function(){T.textCodec="wvtt"})},i._appendCues=function(E,b){var d=this.hls;if(this.config.renderTextTracksNatively){var T=this.textTracks[b];if(!T||T.mode==="disabled")return;E.forEach(function(w){return(0,A.addCueToTrack)(T,w)})}else{var R=this.tracks[b];if(!R)return;var S=R.default?"default":"subtitles"+b;d.trigger(P.Events.CUES_PARSED,{type:"subtitles",cues:E,track:S})}},i.onFragDecrypted=function(E,b){var d=b.frag;if(d.type===h.PlaylistLevelType.SUBTITLE){if(!(0,C.isFiniteNumber)(this.initPTS[d.cc])){this.unparsedVttFrags.push(b);return}this.onFragLoaded(P.Events.FRAG_LOADED,b)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(E,b){var d=this.cea608Parser1,T=this.cea608Parser2;if(!(!this.enabled||!(d&&T))){var R=b.frag,S=b.samples;if(!(R.type===h.PlaylistLevelType.MAIN&&this.closedCaptionsForLevel(R)==="NONE"))for(var w=0;w<S.length;w++){var r=S[w].bytes;if(r){var n=this.extractCea608Data(r);d.addData(S[w].pts,n[0]),T.addData(S[w].pts,n[1])}}}},i.onBufferFlushing=function(E,b){var d=b.startOffset,T=b.endOffset,R=b.endOffsetSubtitles,S=b.type,w=this.media;if(!(!w||w.currentTime<T)){if(!S||S==="video"){var r=this.captionsTracks;Object.keys(r).forEach(function(t){return(0,A.removeCuesInRange)(r[t],d,T)})}if(this.config.renderTextTracksNatively&&d===0&&R!==void 0){var n=this.textTracks;Object.keys(n).forEach(function(t){return(0,A.removeCuesInRange)(n[t],d,R)})}}},i.extractCea608Data=function(E){for(var b=[[],[]],d=E[0]&31,T=2,R=0;R<d;R++){var S=E[T++],w=127&E[T++],r=127&E[T++];if(!(w===0&&r===0)){var n=(4&S)!==0;if(n){var t=3&S;(t===0||t===1)&&(b[t].push(w),b[t].push(r))}}}return b},a}();function v(a,i){return a&&a.label===i.name&&!(a.textTrack1||a.textTrack2)}function m(a,i,s,E){return Math.min(i,E)-Math.max(a,s)}function o(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}},"./src/crypt/aes-crypto.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>C});var C=function(){function P(e,I){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=I}var M=P.prototype;return M.decrypt=function(I,A){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},A,I)},P}()},"./src/crypt/aes-decryptor.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>M,removePadding:()=>P});var C=L("./src/utils/typed-array.ts");function P(e){var I=e.byteLength,A=I&&new DataView(e.buffer).getUint8(I-1);return A?(0,C.sliceUint8)(e,0,I-A):e}var M=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var I=e.prototype;return I.uint8ArrayToUint32Array_=function(f){for(var g=new DataView(f),h=new Uint32Array(4),p=0;p<4;p++)h[p]=g.getUint32(p*4);return h},I.initTable=function(){var f=this.sBox,g=this.invSBox,h=this.subMix,p=h[0],u=h[1],v=h[2],m=h[3],o=this.invSubMix,a=o[0],i=o[1],s=o[2],E=o[3],b=new Uint32Array(256),d=0,T=0,R=0;for(R=0;R<256;R++)R<128?b[R]=R<<1:b[R]=R<<1^283;for(R=0;R<256;R++){var S=T^T<<1^T<<2^T<<3^T<<4;S=S>>>8^S&255^99,f[d]=S,g[S]=d;var w=b[d],r=b[w],n=b[r],t=b[S]*257^S*16843008;p[d]=t<<24|t>>>8,u[d]=t<<16|t>>>16,v[d]=t<<8|t>>>24,m[d]=t,t=n*16843009^r*65537^w*257^d*16843008,a[S]=t<<24|t>>>8,i[S]=t<<16|t>>>16,s[S]=t<<8|t>>>24,E[S]=t,d?(d=w^b[b[b[n^w]]],T^=b[b[T]]):d=T=1}},I.expandKey=function(f){for(var g=this.uint8ArrayToUint32Array_(f),h=!0,p=0;p<g.length&&h;)h=g[p]===this.key[p],p++;if(!h){this.key=g;var u=this.keySize=g.length;if(u!==4&&u!==6&&u!==8)throw new Error("Invalid aes key size="+u);var v=this.ksRows=(u+6+1)*4,m,o,a=this.keySchedule=new Uint32Array(v),i=this.invKeySchedule=new Uint32Array(v),s=this.sBox,E=this.rcon,b=this.invSubMix,d=b[0],T=b[1],R=b[2],S=b[3],w,r;for(m=0;m<v;m++){if(m<u){w=a[m]=g[m];continue}r=w,m%u===0?(r=r<<8|r>>>24,r=s[r>>>24]<<24|s[r>>>16&255]<<16|s[r>>>8&255]<<8|s[r&255],r^=E[m/u|0]<<24):u>6&&m%u===4&&(r=s[r>>>24]<<24|s[r>>>16&255]<<16|s[r>>>8&255]<<8|s[r&255]),a[m]=w=(a[m-u]^r)>>>0}for(o=0;o<v;o++)m=v-o,o&3?r=a[m]:r=a[m-4],o<4||m<=4?i[o]=r:i[o]=d[s[r>>>24]]^T[s[r>>>16&255]]^R[s[r>>>8&255]]^S[s[r&255]],i[o]=i[o]>>>0}},I.networkToHostOrderSwap=function(f){return f<<24|(f&65280)<<8|(f&16711680)>>8|f>>>24},I.decrypt=function(f,g,h){for(var p=this.keySize+6,u=this.invKeySchedule,v=this.invSBox,m=this.invSubMix,o=m[0],a=m[1],i=m[2],s=m[3],E=this.uint8ArrayToUint32Array_(h),b=E[0],d=E[1],T=E[2],R=E[3],S=new Int32Array(f),w=new Int32Array(S.length),r,n,t,l,x,y,c,_,D,O,k,F,G,H,j=this.networkToHostOrderSwap;g<S.length;){for(D=j(S[g]),O=j(S[g+1]),k=j(S[g+2]),F=j(S[g+3]),x=D^u[0],y=F^u[1],c=k^u[2],_=O^u[3],G=4,H=1;H<p;H++)r=o[x>>>24]^a[y>>16&255]^i[c>>8&255]^s[_&255]^u[G],n=o[y>>>24]^a[c>>16&255]^i[_>>8&255]^s[x&255]^u[G+1],t=o[c>>>24]^a[_>>16&255]^i[x>>8&255]^s[y&255]^u[G+2],l=o[_>>>24]^a[x>>16&255]^i[y>>8&255]^s[c&255]^u[G+3],x=r,y=n,c=t,_=l,G=G+4;r=v[x>>>24]<<24^v[y>>16&255]<<16^v[c>>8&255]<<8^v[_&255]^u[G],n=v[y>>>24]<<24^v[c>>16&255]<<16^v[_>>8&255]<<8^v[x&255]^u[G+1],t=v[c>>>24]<<24^v[_>>16&255]<<16^v[x>>8&255]<<8^v[y&255]^u[G+2],l=v[_>>>24]<<24^v[x>>16&255]<<16^v[y>>8&255]<<8^v[c&255]^u[G+3],w[g]=j(r^b),w[g+1]=j(l^d),w[g+2]=j(t^T),w[g+3]=j(n^R),b=D,d=O,T=k,R=F,g=g+4}return w.buffer},e}()},"./src/crypt/decrypter.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>g});var C=L("./src/crypt/aes-crypto.ts"),P=L("./src/crypt/fast-aes-key.ts"),M=L("./src/crypt/aes-decryptor.ts"),e=L("./src/utils/logger.ts"),I=L("./src/utils/mp4-tools.ts"),A=L("./src/utils/typed-array.ts"),f=16,g=function(){function h(u,v){var m=v===void 0?{}:v,o=m.removePKCS7Padding,a=o===void 0?!0:o;if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=u.enableSoftwareAES,this.removePKCS7Padding=a,a)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch(s){}this.subtle===null&&(this.useSoftware=!0)}var p=h.prototype;return p.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},p.isSync=function(){return this.useSoftware},p.flush=function(){var v=this.currentResult,m=this.remainderData;if(!v||m)return this.reset(),null;var o=new Uint8Array(v);return this.reset(),this.removePKCS7Padding?(0,M.removePadding)(o):o},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(v,m,o){var a=this;return this.useSoftware?new Promise(function(i,s){a.softwareDecrypt(new Uint8Array(v),m,o);var E=a.flush();E?i(E.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(v),m,o)},p.softwareDecrypt=function(v,m,o){var a=this.currentIV,i=this.currentResult,s=this.remainderData;this.logOnce("JS AES decrypt"),s&&(v=(0,I.appendUint8Array)(s,v),this.remainderData=null);var E=this.getValidChunk(v);if(!E.length)return null;a&&(o=a);var b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new M.default),b.expandKey(m);var d=i;return this.currentResult=b.decrypt(E.buffer,0,o),this.currentIV=(0,A.sliceUint8)(E,-16).buffer,d||null},p.webCryptoDecrypt=function(v,m,o){var a=this,i=this.subtle;return(this.key!==m||!this.fastAesKey)&&(this.key=m,this.fastAesKey=new P.default(i,m)),this.fastAesKey.expandKey().then(function(s){if(!i)return Promise.reject(new Error("web crypto not initialized"));a.logOnce("WebCrypto AES decrypt");var E=new C.default(i,new Uint8Array(o));return E.decrypt(v.buffer,s)}).catch(function(s){return e.logger.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+s.name+": "+s.message),a.onWebCryptoError(v,m,o)})},p.onWebCryptoError=function(v,m,o){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(v,m,o);var a=this.flush();if(a)return a.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},p.getValidChunk=function(v){var m=v,o=v.length-v.length%f;return o!==v.length&&(m=(0,A.sliceUint8)(v,0,o),this.remainderData=(0,A.sliceUint8)(v,o)),m},p.logOnce=function(v){this.logEnabled&&(e.logger.log("[decrypter]: "+v),this.logEnabled=!1)},h}()},"./src/crypt/fast-aes-key.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>C});var C=function(){function P(e,I){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=I}var M=P.prototype;return M.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},P}()},"./src/demux/aacdemuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>g});var C=L("./src/demux/base-audio-demuxer.ts"),P=L("./src/demux/adts.ts"),M=L("./src/utils/logger.ts"),e=L("./src/demux/id3.ts");function I(h,p){h.prototype=Object.create(p.prototype),h.prototype.constructor=h,A(h,p)}function A(h,p){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,m){return v.__proto__=m,v},A(h,p)}var f=function(h){I(p,h);function p(v,m){var o;return o=h.call(this)||this,o.observer=void 0,o.config=void 0,o.observer=v,o.config=m,o}var u=p.prototype;return u.resetInitSegment=function(m,o,a,i){h.prototype.resetInitSegment.call(this,m,o,a,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:o,duration:i,inputTimeScale:9e4,dropped:0}},p.probe=function(m){if(!m)return!1;for(var o=e.getID3Data(m,0)||[],a=o.length,i=m.length;a<i;a++)if(P.probe(m,a))return M.logger.log("ADTS sync word found !"),!0;return!1},u.canParse=function(m,o){return P.canParse(m,o)},u.appendFrame=function(m,o,a){P.initTrackConfig(m,this.observer,o,a,m.manifestCodec);var i=P.appendFrame(m,o,a,this.basePTS,this.frameIndex);if(i&&i.missing===0)return i},p}(C.default);const g=f},"./src/demux/adts.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{appendFrame:()=>a,canGetFrameLength:()=>g,canParse:()=>p,getAudioConfig:()=>e,getFrameDuration:()=>m,getFullFrameLength:()=>f,getHeaderLength:()=>A,initTrackConfig:()=>v,isHeader:()=>h,isHeaderPattern:()=>I,parseFrameHeader:()=>o,probe:()=>u});var C=L("./src/utils/logger.ts"),P=L("./src/errors.ts"),M=L("./src/events.ts");function e(i,s,E,b){var d,T,R,S,w=navigator.userAgent.toLowerCase(),r=b,n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];d=((s[E+2]&192)>>>6)+1;var t=(s[E+2]&60)>>>2;if(t>n.length-1){i.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+t});return}return R=(s[E+2]&1)<<2,R|=(s[E+3]&192)>>>6,C.logger.log("manifest codec:"+b+", ADTS type:"+d+", samplingIndex:"+t),/firefox/i.test(w)?t>=6?(d=5,S=new Array(4),T=t-3):(d=2,S=new Array(2),T=t):w.indexOf("android")!==-1?(d=2,S=new Array(2),T=t):(d=5,S=new Array(4),b&&(b.indexOf("mp4a.40.29")!==-1||b.indexOf("mp4a.40.5")!==-1)||!b&&t>=6?T=t-3:((b&&b.indexOf("mp4a.40.2")!==-1&&(t>=6&&R===1||/vivaldi/i.test(w))||!b&&R===1)&&(d=2,S=new Array(2)),T=t)),S[0]=d<<3,S[0]|=(t&14)>>1,S[1]|=(t&1)<<7,S[1]|=R<<3,d===5&&(S[1]|=(T&14)>>1,S[2]=(T&1)<<7,S[2]|=8,S[3]=0),{config:S,samplerate:n[t],channelCount:R,codec:"mp4a.40."+d,manifestCodec:r}}function I(i,s){return i[s]===255&&(i[s+1]&246)===240}function A(i,s){return i[s+1]&1?7:9}function f(i,s){return(i[s+3]&3)<<11|i[s+4]<<3|(i[s+5]&224)>>>5}function g(i,s){return s+5<i.length}function h(i,s){return s+1<i.length&&I(i,s)}function p(i,s){return g(i,s)&&I(i,s)&&f(i,s)<=i.length-s}function u(i,s){if(h(i,s)){var E=A(i,s);if(s+E>=i.length)return!1;var b=f(i,s);if(b<=E)return!1;var d=s+b;return d===i.length||h(i,d)}return!1}function v(i,s,E,b,d){if(!i.samplerate){var T=e(s,E,b,d);if(!T)return;i.config=T.config,i.samplerate=T.samplerate,i.channelCount=T.channelCount,i.codec=T.codec,i.manifestCodec=T.manifestCodec,C.logger.log("parsed codec:"+i.codec+", rate:"+T.samplerate+", channels:"+T.channelCount)}}function m(i){return 9216e4/i}function o(i,s){var E=A(i,s);if(s+E<=i.length){var b=f(i,s)-E;if(b>0)return{headerLength:E,frameLength:b}}}function a(i,s,E,b,d){var T=m(i.samplerate),R=b+d*T,S=o(s,E),w;if(S){var r=S.frameLength,n=S.headerLength,t=n+r,l=Math.max(0,E+t-s.length);l?(w=new Uint8Array(t-n),w.set(s.subarray(E+n,s.length),0)):w=s.subarray(E+n,E+t);var x={unit:w,pts:R};return l||i.samples.push(x),{sample:x,length:t,missing:l}}var y=s.length-E;w=new Uint8Array(y),w.set(s.subarray(E,s.length),0);var c={unit:w,pts:R};return{sample:c,length:y,missing:-1}}},"./src/demux/base-audio-demuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>h,initPTSFn:()=>g});var C=L("./src/polyfills/number.ts"),P=L("./src/demux/id3.ts"),M=L("./src/types/demuxer.ts"),e=L("./src/demux/dummy-demuxed-track.ts"),I=L("./src/utils/mp4-tools.ts"),A=L("./src/utils/typed-array.ts"),f=function(){function p(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var u=p.prototype;return u.resetInitSegment=function(m,o,a,i){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},u.resetTimeStamp=function(m){this.initPTS=m,this.resetContiguity()},u.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},u.canParse=function(m,o){return!1},u.appendFrame=function(m,o,a){},u.demux=function(m,o){this.cachedData&&(m=(0,I.appendUint8Array)(this.cachedData,m),this.cachedData=null);var a=P.getID3Data(m,0),i=a?a.length:0,s,E=this._audioTrack,b=this._id3Track,d=a?P.getTimeStamp(a):void 0,T=m.length;for((this.basePTS===null||this.frameIndex===0&&(0,C.isFiniteNumber)(d))&&(this.basePTS=g(d,o,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),a&&a.length>0&&b.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:a,type:M.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});i<T;){if(this.canParse(m,i)){var R=this.appendFrame(E,m,i);R?(this.frameIndex++,this.lastPTS=R.sample.pts,i+=R.length,s=i):i=T}else P.canParse(m,i)?(a=P.getID3Data(m,i),b.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:a,type:M.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY}),i+=a.length,s=i):i++;if(i===T&&s!==T){var S=(0,A.sliceUint8)(m,s);this.cachedData?this.cachedData=(0,I.appendUint8Array)(this.cachedData,S):this.cachedData=S}}return{audioTrack:E,videoTrack:(0,e.dummyTrack)(),id3Track:b,textTrack:(0,e.dummyTrack)()}},u.demuxSampleAes=function(m,o,a){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},u.flush=function(m){var o=this.cachedData;return o&&(this.cachedData=null,this.demux(o,0)),{audioTrack:this._audioTrack,videoTrack:(0,e.dummyTrack)(),id3Track:this._id3Track,textTrack:(0,e.dummyTrack)()}},u.destroy=function(){},p}(),g=function(u,v,m){return(0,C.isFiniteNumber)(u)?u*90:v*9e4+(m||0)};const h=f},"./src/demux/chunk-cache.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>C});var C=function(){function M(){this.chunks=[],this.dataLength=0}var e=M.prototype;return e.push=function(A){this.chunks.push(A),this.dataLength+=A.length},e.flush=function(){var A=this.chunks,f=this.dataLength,g;if(A.length)A.length===1?g=A[0]:g=P(A,f);else return new Uint8Array(0);return this.reset(),g},e.reset=function(){this.chunks.length=0,this.dataLength=0},M}();function P(M,e){for(var I=new Uint8Array(e),A=0,f=0;f<M.length;f++){var g=M[f];I.set(g,A),A+=g.length}return I}},"./src/demux/dummy-demuxed-track.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{dummyTrack:()=>C});function C(P,M){return P===void 0&&(P=""),M===void 0&&(M=9e4),{type:P,id:-1,pid:-1,inputTimeScale:M,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>M});var C=L("./src/utils/logger.ts"),P=function(){function e(A){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=A,this.bytesAvailable=A.byteLength,this.word=0,this.bitsAvailable=0}var I=e.prototype;return I.loadWord=function(){var f=this.data,g=this.bytesAvailable,h=f.byteLength-g,p=new Uint8Array(4),u=Math.min(4,g);if(u===0)throw new Error("no bytes available");p.set(f.subarray(h,h+u)),this.word=new DataView(p.buffer).getUint32(0),this.bitsAvailable=u*8,this.bytesAvailable-=u},I.skipBits=function(f){var g;f=Math.min(f,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>f?(this.word<<=f,this.bitsAvailable-=f):(f-=this.bitsAvailable,g=f>>3,f-=g<<3,this.bytesAvailable-=g,this.loadWord(),this.word<<=f,this.bitsAvailable-=f)},I.readBits=function(f){var g=Math.min(this.bitsAvailable,f),h=this.word>>>32-g;if(f>32&&C.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=g,this.bitsAvailable>0)this.word<<=g;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return g=f-g,g>0&&this.bitsAvailable?h<<g|this.readBits(g):h},I.skipLZ=function(){var f;for(f=0;f<this.bitsAvailable;++f)if(this.word&2147483648>>>f)return this.word<<=f,this.bitsAvailable-=f,f;return this.loadWord(),f+this.skipLZ()},I.skipUEG=function(){this.skipBits(1+this.skipLZ())},I.skipEG=function(){this.skipBits(1+this.skipLZ())},I.readUEG=function(){var f=this.skipLZ();return this.readBits(f+1)-1},I.readEG=function(){var f=this.readUEG();return 1&f?1+f>>>1:-1*(f>>>1)},I.readBoolean=function(){return this.readBits(1)===1},I.readUByte=function(){return this.readBits(8)},I.readUShort=function(){return this.readBits(16)},I.readUInt=function(){return this.readBits(32)},I.skipScalingList=function(f){for(var g=8,h=8,p,u=0;u<f;u++)h!==0&&(p=this.readEG(),h=(g+p+256)%256),g=h===0?g:h},I.readSPS=function(){var f=0,g=0,h=0,p=0,u,v,m,o=this.readUByte.bind(this),a=this.readBits.bind(this),i=this.readUEG.bind(this),s=this.readBoolean.bind(this),E=this.skipBits.bind(this),b=this.skipEG.bind(this),d=this.skipUEG.bind(this),T=this.skipScalingList.bind(this);o();var R=o();if(a(5),E(3),o(),d(),R===100||R===110||R===122||R===244||R===44||R===83||R===86||R===118||R===128){var S=i();if(S===3&&E(1),d(),d(),E(1),s())for(v=S!==3?8:12,m=0;m<v;m++)s()&&(m<6?T(16):T(64))}d();var w=i();if(w===0)i();else if(w===1)for(E(1),b(),b(),u=i(),m=0;m<u;m++)b();d(),E(1);var r=i(),n=i(),t=a(1);t===0&&E(1),E(1),s()&&(f=i(),g=i(),h=i(),p=i());var l=[1,1];if(s()&&s()){var x=o();switch(x){case 1:l=[1,1];break;case 2:l=[12,11];break;case 3:l=[10,11];break;case 4:l=[16,11];break;case 5:l=[40,33];break;case 6:l=[24,11];break;case 7:l=[20,11];break;case 8:l=[32,11];break;case 9:l=[80,33];break;case 10:l=[18,11];break;case 11:l=[15,11];break;case 12:l=[64,33];break;case 13:l=[160,99];break;case 14:l=[4,3];break;case 15:l=[3,2];break;case 16:l=[2,1];break;case 255:{l=[o()<<8|o(),o()<<8|o()];break}}}return{width:Math.ceil((r+1)*16-f*2-g*2),height:(2-t)*(n+1)*16-(t?2:4)*(h+p),pixelRatio:l}},I.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}();const M=P},"./src/demux/id3.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{canParse:()=>I,decodeFrame:()=>p,getID3Data:()=>M,getID3Frames:()=>h,getTimeStamp:()=>A,isFooter:()=>P,isHeader:()=>C,isTimeStampFrame:()=>f,testables:()=>i,utf8ArrayToStr:()=>a});var C=function(d,T){return T+10<=d.length&&d[T]===73&&d[T+1]===68&&d[T+2]===51&&d[T+3]<255&&d[T+4]<255&&d[T+6]<128&&d[T+7]<128&&d[T+8]<128&&d[T+9]<128},P=function(d,T){return T+10<=d.length&&d[T]===51&&d[T+1]===68&&d[T+2]===73&&d[T+3]<255&&d[T+4]<255&&d[T+6]<128&&d[T+7]<128&&d[T+8]<128&&d[T+9]<128},M=function(d,T){for(var R=T,S=0;C(d,T);){S+=10;var w=e(d,T+6);S+=w,P(d,T+10)&&(S+=10),T+=S}if(S>0)return d.subarray(R,R+S)},e=function(d,T){var R=0;return R=(d[T]&127)<<21,R|=(d[T+1]&127)<<14,R|=(d[T+2]&127)<<7,R|=d[T+3]&127,R},I=function(d,T){return C(d,T)&&e(d,T+6)+10<=d.length-T},A=function(d){for(var T=h(d),R=0;R<T.length;R++){var S=T[R];if(f(S))return o(S)}},f=function(d){return d&&d.key==="PRIV"&&d.info==="com.apple.streaming.transportStreamTimestamp"},g=function(d){var T=String.fromCharCode(d[0],d[1],d[2],d[3]),R=e(d,4),S=10;return{type:T,size:R,data:d.subarray(S,S+R)}},h=function(d){for(var T=0,R=[];C(d,T);){var S=e(d,T+6);T+=10;for(var w=T+S;T+8<w;){var r=g(d.subarray(T)),n=p(r);n&&R.push(n),T+=r.size+10}P(d,T)&&(T+=10)}return R},p=function(d){return d.type==="PRIV"?u(d):d.type[0]==="W"?m(d):v(d)},u=function(d){if(!(d.size<2)){var T=a(d.data,!0),R=new Uint8Array(d.data.subarray(T.length+1));return{key:d.type,info:T,data:R.buffer}}},v=function(d){if(!(d.size<2)){if(d.type==="TXXX"){var T=1,R=a(d.data.subarray(T),!0);T+=R.length+1;var S=a(d.data.subarray(T));return{key:d.type,info:R,data:S}}var w=a(d.data.subarray(1));return{key:d.type,data:w}}},m=function(d){if(d.type==="WXXX"){if(d.size<2)return;var T=1,R=a(d.data.subarray(T),!0);T+=R.length+1;var S=a(d.data.subarray(T));return{key:d.type,info:R,data:S}}var w=a(d.data);return{key:d.type,data:w}},o=function(d){if(d.data.byteLength===8){var T=new Uint8Array(d.data),R=T[3]&1,S=(T[4]<<23)+(T[5]<<15)+(T[6]<<7)+T[7];return S/=45,R&&(S+=4772185884e-2),Math.round(S)}},a=function(d,T){T===void 0&&(T=!1);var R=E();if(R){var S=R.decode(d);if(T){var w=S.indexOf("\0");return w!==-1?S.substring(0,w):S}return S.replace(/\0/g,"")}for(var r=d.length,n,t,l,x="",y=0;y<r;){if(n=d[y++],n===0&&T)return x;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:x+=String.fromCharCode(n);break;case 12:case 13:t=d[y++],x+=String.fromCharCode((n&31)<<6|t&63);break;case 14:t=d[y++],l=d[y++],x+=String.fromCharCode((n&15)<<12|(t&63)<<6|(l&63)<<0);break;default:}}return x},i={decodeTextFrame:v},s;function E(){return!s&&typeof self.TextDecoder!="undefined"&&(s=new self.TextDecoder("utf-8")),s}},"./src/demux/mp3demuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>g});var C=L("./src/demux/base-audio-demuxer.ts"),P=L("./src/demux/id3.ts"),M=L("./src/utils/logger.ts"),e=L("./src/demux/mpegaudio.ts");function I(h,p){h.prototype=Object.create(p.prototype),h.prototype.constructor=h,A(h,p)}function A(h,p){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,m){return v.__proto__=m,v},A(h,p)}var f=function(h){I(p,h);function p(){return h.apply(this,arguments)||this}var u=p.prototype;return u.resetInitSegment=function(m,o,a,i){h.prototype.resetInitSegment.call(this,m,o,a,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:o,duration:i,inputTimeScale:9e4,dropped:0}},p.probe=function(m){if(!m)return!1;for(var o=P.getID3Data(m,0)||[],a=o.length,i=m.length;a<i;a++)if(e.probe(m,a))return M.logger.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(m,o){return e.canParse(m,o)},u.appendFrame=function(m,o,a){if(this.basePTS!==null)return e.appendFrame(m,o,a,this.basePTS,this.frameIndex)},p}(C.default);const g=f},"./src/demux/mp4demuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>f});var C=L("./src/polyfills/number.ts"),P=L("./src/types/demuxer.ts"),M=L("./src/utils/mp4-tools.ts"),e=L("./src/demux/dummy-demuxed-track.ts"),I=/\/emsg[-/]ID3/i,A=function(){function g(p,u){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=u}var h=g.prototype;return h.resetTimeStamp=function(){},h.resetInitSegment=function(u,v,m,o){var a=this.videoTrack=(0,e.dummyTrack)("video",1),i=this.audioTrack=(0,e.dummyTrack)("audio",1),s=this.txtTrack=(0,e.dummyTrack)("text",1);if(this.id3Track=(0,e.dummyTrack)("id3",1),this.timeOffset=0,!(!u||!u.byteLength)){var E=(0,M.parseInitSegment)(u);if(E.video){var b=E.video,d=b.id,T=b.timescale,R=b.codec;a.id=d,a.timescale=s.timescale=T,a.codec=R}if(E.audio){var S=E.audio,w=S.id,r=S.timescale,n=S.codec;i.id=w,i.timescale=r,i.codec=n}s.id=M.RemuxerTrackIdConfig.text,a.sampleDuration=0,a.duration=i.duration=o}},h.resetContiguity=function(){},g.probe=function(u){return u=u.length>16384?u.subarray(0,16384):u,(0,M.findBox)(u,["moof"]).length>0},h.demux=function(u,v){this.timeOffset=v;var m=u,o=this.videoTrack,a=this.txtTrack;if(this.config.progressive){this.remainderData&&(m=(0,M.appendUint8Array)(this.remainderData,u));var i=(0,M.segmentValidRange)(m);this.remainderData=i.remainder,o.samples=i.valid||new Uint8Array}else o.samples=m;var s=this.extractID3Track(o,v);return a.samples=(0,M.parseSamples)(v,o),{videoTrack:o,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}},h.flush=function(){var u=this.timeOffset,v=this.videoTrack,m=this.txtTrack;v.samples=this.remainderData||new Uint8Array,this.remainderData=null;var o=this.extractID3Track(v,this.timeOffset);return m.samples=(0,M.parseSamples)(u,v),{videoTrack:v,audioTrack:(0,e.dummyTrack)(),id3Track:o,textTrack:(0,e.dummyTrack)()}},h.extractID3Track=function(u,v){var m=this.id3Track;if(u.samples.length){var o=(0,M.findBox)(u.samples,["emsg"]);o&&o.forEach(function(a){var i=(0,M.parseEmsg)(a);if(I.test(i.schemeIdUri)){var s=(0,C.isFiniteNumber)(i.presentationTime)?i.presentationTime/i.timeScale:v+i.presentationTimeDelta/i.timeScale,E=i.eventDuration===4294967295?Number.POSITIVE_INFINITY:i.eventDuration/i.timeScale;E<=.001&&(E=Number.POSITIVE_INFINITY);var b=i.payload;m.samples.push({data:b,len:b.byteLength,dts:s,pts:s,type:P.MetadataSchema.emsg,duration:E})}})}return m},h.demuxSampleAes=function(u,v,m){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},h.destroy=function(){},g}();const f=A},"./src/demux/mpegaudio.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{appendFrame:()=>A,canParse:()=>p,isHeader:()=>h,isHeaderPattern:()=>g,parseHeader:()=>f,probe:()=>u});var C=null,P=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],M=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],e=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],I=[0,1,1,4];function A(v,m,o,a,i){if(!(o+24>m.length)){var s=f(m,o);if(s&&o+s.frameLength<=m.length){var E=s.samplesPerFrame*9e4/s.sampleRate,b=a+i*E,d={unit:m.subarray(o,o+s.frameLength),pts:b,dts:b};return v.config=[],v.channelCount=s.channelCount,v.samplerate=s.sampleRate,v.samples.push(d),{sample:d,length:s.frameLength,missing:0}}}}function f(v,m){var o=v[m+1]>>3&3,a=v[m+1]>>1&3,i=v[m+2]>>4&15,s=v[m+2]>>2&3;if(o!==1&&i!==0&&i!==15&&s!==3){var E=v[m+2]>>1&1,b=v[m+3]>>6,d=o===3?3-a:a===3?3:4,T=P[d*14+i-1]*1e3,R=o===3?0:o===2?1:2,S=M[R*3+s],w=b===3?1:2,r=e[o][a],n=I[a],t=r*8*n,l=Math.floor(r*T/S+E)*n;if(C===null){var x=navigator.userAgent||"",y=x.match(/Chrome\/(\d+)/i);C=y?parseInt(y[1]):0}var c=!!C&&C<=87;return c&&a===2&&T>=224e3&&b===0&&(v[m+3]=v[m+3]|128),{sampleRate:S,channelCount:w,frameLength:l,samplesPerFrame:t}}}function g(v,m){return v[m]===255&&(v[m+1]&224)===224&&(v[m+1]&6)!==0}function h(v,m){return m+1<v.length&&g(v,m)}function p(v,m){var o=4;return g(v,m)&&o<=v.length-m}function u(v,m){if(m+1<v.length&&g(v,m)){var o=4,a=f(v,m),i=o;a!=null&&a.frameLength&&(i=a.frameLength);var s=m+i;return s===v.length||h(v,s)}return!1}},"./src/demux/sample-aes.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>e});var C=L("./src/crypt/decrypter.ts"),P=L("./src/utils/mp4-tools.ts"),M=function(){function I(f,g,h){this.keyData=void 0,this.decrypter=void 0,this.keyData=h,this.decrypter=new C.default(g,{removePKCS7Padding:!1})}var A=I.prototype;return A.decryptBuffer=function(g){return this.decrypter.decrypt(g,this.keyData.key.buffer,this.keyData.iv.buffer)},A.decryptAacSample=function(g,h,p){var u=this,v=g[h].unit;if(!(v.length<=16)){var m=v.subarray(16,v.length-v.length%16),o=m.buffer.slice(m.byteOffset,m.byteOffset+m.length);this.decryptBuffer(o).then(function(a){var i=new Uint8Array(a);v.set(i,16),u.decrypter.isSync()||u.decryptAacSamples(g,h+1,p)})}},A.decryptAacSamples=function(g,h,p){for(;;h++){if(h>=g.length){p();return}if(!(g[h].unit.length<32)&&(this.decryptAacSample(g,h,p),!this.decrypter.isSync()))return}},A.getAvcEncryptedData=function(g){for(var h=Math.floor((g.length-48)/160)*16+16,p=new Int8Array(h),u=0,v=32;v<g.length-16;v+=160,u+=16)p.set(g.subarray(v,v+16),u);return p},A.getAvcDecryptedUnit=function(g,h){for(var p=new Uint8Array(h),u=0,v=32;v<g.length-16;v+=160,u+=16)g.set(p.subarray(u,u+16),v);return g},A.decryptAvcSample=function(g,h,p,u,v){var m=this,o=(0,P.discardEPB)(v.data),a=this.getAvcEncryptedData(o);this.decryptBuffer(a.buffer).then(function(i){v.data=m.getAvcDecryptedUnit(o,i),m.decrypter.isSync()||m.decryptAvcSamples(g,h,p+1,u)})},A.decryptAvcSamples=function(g,h,p,u){if(g instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;h++,p=0){if(h>=g.length){u();return}for(var v=g[h].units;!(p>=v.length);p++){var m=v[p];if(!(m.data.length<=48||m.type!==1&&m.type!==5)&&(this.decryptAvcSample(g,h,p,u,m),!this.decrypter.isSync()))return}}},I}();const e=M},"./src/demux/transmuxer-interface.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>p});var C=L("./src/demux/webworkify-webpack.js"),P=L("./src/events.ts"),M=L("./src/demux/transmuxer.ts"),e=L("./src/utils/logger.ts"),I=L("./src/errors.ts"),A=L("./src/utils/mediasource-helper.ts"),f=L("./node_modules/eventemitter3/index.js"),g=L.n(f),h=(0,A.getMediaSource)()||{isTypeSupported:function(){return!1}},p=function(){function u(m,o,a,i){var s=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;var E=m.config;this.hls=m,this.id=o,this.useWorker=!!E.enableWorker,this.onTransmuxComplete=a,this.onFlush=i;var b=function(w,r){r=r||{},r.frag=s.frag,r.id=s.id,s.hls.trigger(w,r)};this.observer=new f.EventEmitter,this.observer.on(P.Events.FRAG_DECRYPTED,b),this.observer.on(P.Events.ERROR,b);var d={mp4:h.isTypeSupported("video/mp4"),mpeg:h.isTypeSupported("audio/mpeg"),mp3:h.isTypeSupported('audio/mp4; codecs="mp3"')},T=navigator.vendor;if(this.useWorker&&typeof Worker!="undefined"){e.logger.log("demuxing in webworker");var R;try{R=this.worker=(0,C.default)("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),R.addEventListener("message",this.onwmsg),R.onerror=function(S){s.useWorker=!1,e.logger.warn("Exception in webworker, fallback to inline"),s.hls.trigger(P.Events.ERROR,{type:I.ErrorTypes.OTHER_ERROR,details:I.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:new Error(S.message+" ("+S.filename+":"+S.lineno+")")})},R.postMessage({cmd:"init",typeSupported:d,vendor:T,id:o,config:JSON.stringify(E)})}catch(S){e.logger.warn("Error in worker:",S),e.logger.error("Error while initializing DemuxerWorker, fallback to inline"),R&&self.URL.revokeObjectURL(R.objectURL),this.transmuxer=new M.default(this.observer,d,E,T,o),this.worker=null}}else this.transmuxer=new M.default(this.observer,d,E,T,o)}var v=u.prototype;return v.destroy=function(){var o=this.worker;if(o)o.removeEventListener("message",this.onwmsg),o.terminate(),this.worker=null,this.onwmsg=void 0;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var i=this.observer;i&&i.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},v.push=function(o,a,i,s,E,b,d,T,R,S){var w,r,n=this;R.transmuxing.start=self.performance.now();var t=this.transmuxer,l=this.worker,x=b?b.start:E.start,y=E.decryptdata,c=this.frag,_=!(c&&E.cc===c.cc),D=!(c&&R.level===c.level),O=c?R.sn-c.sn:-1,k=this.part?R.part-this.part.index:-1,F=O===0&&R.id>1&&R.id===(c==null?void 0:c.stats.chunkCount),G=!D&&(O===1||O===0&&(k===1||F&&k<=0)),H=self.performance.now();(D||O||E.stats.parsing.start===0)&&(E.stats.parsing.start=H),b&&(k||!G)&&(b.stats.parsing.start=H);var j=!(c&&((w=E.initSegment)===null||w===void 0?void 0:w.url)===((r=c.initSegment)===null||r===void 0?void 0:r.url)),Q=new M.TransmuxState(_,G,T,D,x,j);if(!G||_||j){e.logger.log("[transmuxer-interface, "+E.type+"]: Starting new transmux session for sn: "+R.sn+" p: "+R.part+" level: "+R.level+" id: "+R.id+`
discontinuity: `+_+`
trackSwitch: `+D+`
contiguous: `+G+`
accurateTimeOffset: `+T+`
timeOffset: `+x+`
initSegmentChange: `+j);var ee=new M.TransmuxConfig(i,s,a,d,S);this.configureTransmuxer(ee)}if(this.frag=E,this.part=b,l)l.postMessage({cmd:"demux",data:o,decryptdata:y,chunkMeta:R,state:Q},o instanceof ArrayBuffer?[o]:[]);else if(t){var ie=t.push(o,y,R,Q);(0,M.isPromise)(ie)?(t.async=!0,ie.then(function(se){n.handleTransmuxComplete(se)}).catch(function(se){n.transmuxerError(se,R,"transmuxer-interface push error")})):(t.async=!1,this.handleTransmuxComplete(ie))}},v.flush=function(o){var a=this;o.transmuxing.start=self.performance.now();var i=this.transmuxer,s=this.worker;if(s)s.postMessage({cmd:"flush",chunkMeta:o});else if(i){var E=i.flush(o),b=(0,M.isPromise)(E);b||i.async?((0,M.isPromise)(E)||(E=Promise.resolve(E)),E.then(function(d){a.handleFlushResult(d,o)}).catch(function(d){a.transmuxerError(d,o,"transmuxer-interface flush error")})):this.handleFlushResult(E,o)}},v.transmuxerError=function(o,a,i){this.hls&&this.hls.trigger(P.Events.ERROR,{type:I.ErrorTypes.MEDIA_ERROR,details:I.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:a,fatal:!1,error:o,err:o,reason:i})},v.handleFlushResult=function(o,a){var i=this;o.forEach(function(s){i.handleTransmuxComplete(s)}),this.onFlush(a)},v.onWorkerMessage=function(o){var a=o.data,i=this.hls;switch(a.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(a.data);break}case"flush":{this.onFlush(a.data);break}case"workerLog":e.logger[a.data.logType]&&e.logger[a.data.logType](a.data.message);break;default:{a.data=a.data||{},a.data.frag=this.frag,a.data.id=this.id,i.trigger(a.event,a.data);break}}},v.configureTransmuxer=function(o){var a=this.worker,i=this.transmuxer;a?a.postMessage({cmd:"configure",config:o}):i&&i.configure(o)},v.handleTransmuxComplete=function(o){o.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(o)},u}()},"./src/demux/transmuxer-worker.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>f});var C=L("./src/demux/transmuxer.ts"),P=L("./src/events.ts"),M=L("./src/utils/logger.ts"),e=L("./node_modules/eventemitter3/index.js"),I=L.n(e),A=L("./src/errors.ts");function f(v){var m=new e.EventEmitter,o=function(s,E){v.postMessage({event:s,data:E})};m.on(P.Events.FRAG_DECRYPTED,o),m.on(P.Events.ERROR,o);var a=function(){var s=function(d){var T=function(S){o("workerLog",{logType:d,message:S})};M.logger[d]=T};for(var E in M.logger)s(E)};v.addEventListener("message",function(i){var s=i.data;switch(s.cmd){case"init":{var E=JSON.parse(s.config);v.transmuxer=new C.default(m,s.typeSupported,E,s.vendor,s.id),(0,M.enableLogs)(E.debug,s.id),a(),o("init",null);break}case"configure":{v.transmuxer.configure(s.config);break}case"demux":{var b=v.transmuxer.push(s.data,s.decryptdata,s.chunkMeta,s.state);(0,C.isPromise)(b)?(v.transmuxer.async=!0,b.then(function(S){g(v,S)}).catch(function(S){o(P.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:s.chunkMeta,fatal:!1,error:S,err:S,reason:"transmuxer-worker push error"})})):(v.transmuxer.async=!1,g(v,b));break}case"flush":{var d=s.chunkMeta,T=v.transmuxer.flush(d),R=(0,C.isPromise)(T);R||v.transmuxer.async?((0,C.isPromise)(T)||(T=Promise.resolve(T)),T.then(function(S){p(v,S,d)}).catch(function(S){o(P.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:s.chunkMeta,fatal:!1,error:S,err:S,reason:"transmuxer-worker flush error"})})):p(v,T,d);break}default:break}})}function g(v,m){if(u(m.remuxResult))return!1;var o=[],a=m.remuxResult,i=a.audio,s=a.video;return i&&h(o,i),s&&h(o,s),v.postMessage({event:"transmuxComplete",data:m},o),!0}function h(v,m){m.data1&&v.push(m.data1.buffer),m.data2&&v.push(m.data2.buffer)}function p(v,m,o){var a=m.reduce(function(i,s){return g(v,s)||i},!1);a||v.postMessage({event:"transmuxComplete",data:m[0]}),v.postMessage({event:"flush",data:o})}function u(v){return!v.audio&&!v.video&&!v.text&&!v.id3&&!v.initSegment}},"./src/demux/transmuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{TransmuxConfig:()=>s,TransmuxState:()=>E,default:()=>m,isPromise:()=>i});var C=L("./src/events.ts"),P=L("./src/errors.ts"),M=L("./src/crypt/decrypter.ts"),e=L("./src/demux/aacdemuxer.ts"),I=L("./src/demux/mp4demuxer.ts"),A=L("./src/demux/tsdemuxer.ts"),f=L("./src/demux/mp3demuxer.ts"),g=L("./src/remux/mp4-remuxer.ts"),h=L("./src/remux/passthrough-remuxer.ts"),p=L("./src/utils/logger.ts"),u;try{u=self.performance.now.bind(self.performance)}catch(b){p.logger.debug("Unable to use Performance API on this environment"),u=self.Date.now}var v=[{demux:I.default,remux:h.default},{demux:A.default,remux:g.default},{demux:e.default,remux:g.default},{demux:f.default,remux:g.default}],m=function(){function b(T,R,S,w,r){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=T,this.typeSupported=R,this.config=S,this.vendor=w,this.id=r}var d=b.prototype;return d.configure=function(R){this.transmuxConfig=R,this.decrypter&&this.decrypter.reset()},d.push=function(R,S,w,r){var n=this,t=w.transmuxing;t.executeStart=u();var l=new Uint8Array(R),x=this.currentTransmuxState,y=this.transmuxConfig;r&&(this.currentTransmuxState=r);var c=r||x,_=c.contiguous,D=c.discontinuity,O=c.trackSwitch,k=c.accurateTimeOffset,F=c.timeOffset,G=c.initSegmentChange,H=y.audioCodec,j=y.videoCodec,Q=y.defaultInitPts,ee=y.duration,ie=y.initSegmentData,se=o(l,S);if(se&&se.method==="AES-128"){var le=this.getDecrypter();if(le.isSync()){var xe=le.softwareDecrypt(l,se.key.buffer,se.iv.buffer),Re=w.part>-1;if(Re&&(xe=le.flush()),!xe)return t.executeEnd=u(),a(w);l=new Uint8Array(xe)}else return this.decryptionPromise=le.webCryptoDecrypt(l,se.key.buffer,se.iv.buffer).then(function(Ce){var Ue=n.push(Ce,null,w);return n.decryptionPromise=null,Ue}),this.decryptionPromise}var Ee=this.needsProbing(D,O);Ee&&this.configureTransmuxer(l),(D||O||G||Ee)&&this.resetInitSegment(ie,H,j,ee,S),(D||G||Ee)&&this.resetInitialTimestamp(Q),_||this.resetContiguity();var he=this.transmux(l,se,F,k,w),be=this.currentTransmuxState;return be.contiguous=!0,be.discontinuity=!1,be.trackSwitch=!1,t.executeEnd=u(),he},d.flush=function(R){var S=this,w=R.transmuxing;w.executeStart=u();var r=this.decrypter,n=this.currentTransmuxState,t=this.decryptionPromise;if(t)return t.then(function(){return S.flush(R)});var l=[],x=n.timeOffset;if(r){var y=r.flush();y&&l.push(this.push(y,null,R))}var c=this.demuxer,_=this.remuxer;if(!c||!_)return this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),w.executeEnd=u(),[a(R)];var D=c.flush(x);return i(D)?D.then(function(O){return S.flushRemux(l,O,R),l}):(this.flushRemux(l,D,R),l)},d.flushRemux=function(R,S,w){var r=S.audioTrack,n=S.videoTrack,t=S.id3Track,l=S.textTrack,x=this.currentTransmuxState,y=x.accurateTimeOffset,c=x.timeOffset;p.logger.log("[transmuxer.ts]: Flushed fragment "+w.sn+(w.part>-1?" p: "+w.part:"")+" of level "+w.level);var _=this.remuxer.remux(r,n,t,l,c,y,!0,this.id);R.push({remuxResult:_,chunkMeta:w}),w.transmuxing.executeEnd=u()},d.resetInitialTimestamp=function(R){var S=this.demuxer,w=this.remuxer;!S||!w||(S.resetTimeStamp(R),w.resetTimeStamp(R))},d.resetContiguity=function(){var R=this.demuxer,S=this.remuxer;!R||!S||(R.resetContiguity(),S.resetNextTimestamp())},d.resetInitSegment=function(R,S,w,r,n){var t=this.demuxer,l=this.remuxer;!t||!l||(t.resetInitSegment(R,S,w,r),l.resetInitSegment(R,S,w,n))},d.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},d.transmux=function(R,S,w,r,n){var t;return S&&S.method==="SAMPLE-AES"?t=this.transmuxSampleAes(R,S,w,r,n):t=this.transmuxUnencrypted(R,w,r,n),t},d.transmuxUnencrypted=function(R,S,w,r){var n=this.demuxer.demux(R,S,!1,!this.config.progressive),t=n.audioTrack,l=n.videoTrack,x=n.id3Track,y=n.textTrack,c=this.remuxer.remux(t,l,x,y,S,w,!1,this.id);return{remuxResult:c,chunkMeta:r}},d.transmuxSampleAes=function(R,S,w,r,n){var t=this;return this.demuxer.demuxSampleAes(R,S,w).then(function(l){var x=t.remuxer.remux(l.audioTrack,l.videoTrack,l.id3Track,l.textTrack,w,r,!1,t.id);return{remuxResult:x,chunkMeta:n}})},d.configureTransmuxer=function(R){for(var S=this.config,w=this.observer,r=this.typeSupported,n=this.vendor,t,l=0,x=v.length;l<x;l++)if(v[l].demux.probe(R)){t=v[l];break}t||(p.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),t={demux:I.default,remux:h.default});var y=this.demuxer,c=this.remuxer,_=t.remux,D=t.demux;(!c||!(c instanceof _))&&(this.remuxer=new _(w,S,r,n)),(!y||!(y instanceof D))&&(this.demuxer=new D(w,S,r),this.probe=D.probe)},d.needsProbing=function(R,S){return!this.demuxer||!this.remuxer||R||S},d.getDecrypter=function(){var R=this.decrypter;return R||(R=this.decrypter=new M.default(this.config)),R},b}();function o(b,d){var T=null;return b.byteLength>0&&d!=null&&d.key!=null&&d.iv!==null&&d.method!=null&&(T=d),T}var a=function(d){return{remuxResult:{},chunkMeta:d}};function i(b){return"then"in b&&b.then instanceof Function}var s=function(d,T,R,S,w){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=d,this.videoCodec=T,this.initSegmentData=R,this.duration=S,this.defaultInitPts=w},E=function(d,T,R,S,w,r){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=d,this.contiguous=T,this.accurateTimeOffset=R,this.trackSwitch=S,this.timeOffset=w,this.initSegmentChange=r}},"./src/demux/tsdemuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>b});var C=L("./src/demux/adts.ts"),P=L("./src/demux/mpegaudio.ts"),M=L("./src/demux/exp-golomb.ts"),e=L("./src/demux/sample-aes.ts"),I=L("./src/events.ts"),A=L("./src/utils/mp4-tools.ts"),f=L("./src/utils/logger.ts"),g=L("./src/errors.ts"),h=L("./src/types/demuxer.ts");function p(){return p=Object.assign?Object.assign.bind():function(d){for(var T=1;T<arguments.length;T++){var R=arguments[T];for(var S in R)Object.prototype.hasOwnProperty.call(R,S)&&(d[S]=R[S])}return d},p.apply(this,arguments)}var u=188,v=function(){function d(R,S,w){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=R,this.config=S,this.typeSupported=w}d.probe=function(S){var w=d.syncOffset(S);return w>0&&f.logger.warn("MPEG2-TS detected but first sync word found @ offset "+w),w!==-1},d.syncOffset=function(S){for(var w=S.length,r=Math.min(u*5,S.length-u)+1,n=0;n<r;){for(var t=!1,l=n;l<w&&S[l]===71;l+=u)if(!t&&o(S,l)===0&&(t=!0),t&&l+u>r)return n;n++}return-1},d.createTrack=function(S,w){return{container:S==="video"||S==="audio"?"video/mp2t":void 0,type:S,id:A.RemuxerTrackIdConfig[S],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:S==="audio"?w:void 0}};var T=d.prototype;return T.resetInitSegment=function(S,w,r,n){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=d.createTrack("video"),this._audioTrack=d.createTrack("audio",n),this._id3Track=d.createTrack("id3"),this._txtTrack=d.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=w,this.videoCodec=r,this._duration=n},T.resetTimeStamp=function(){},T.resetContiguity=function(){var S=this._audioTrack,w=this._avcTrack,r=this._id3Track;S&&(S.pesData=null),w&&(w.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},T.demux=function(S,w,r,n){r===void 0&&(r=!1),n===void 0&&(n=!1),r||(this.sampleAes=null);var t,l=this._avcTrack,x=this._audioTrack,y=this._id3Track,c=this._txtTrack,_=l.pid,D=l.pesData,O=x.pid,k=y.pid,F=x.pesData,G=y.pesData,H=null,j=this.pmtParsed,Q=this._pmtId,ee=S.length;if(this.remainderData&&(S=(0,A.appendUint8Array)(this.remainderData,S),ee=S.length,this.remainderData=null),ee<u&&!n)return this.remainderData=S,{audioTrack:x,videoTrack:l,id3Track:y,textTrack:c};var ie=Math.max(0,d.syncOffset(S));ee-=(ee-ie)%u,ee<S.byteLength&&!n&&(this.remainderData=new Uint8Array(S.buffer,ee,S.buffer.byteLength-ee));for(var se=0,le=ie;le<ee;le+=u)if(S[le]===71){var xe=!!(S[le+1]&64),Re=o(S,le),Ee=(S[le+3]&48)>>4,he=void 0;if(Ee>1){if(he=le+5+S[le+4],he===le+u)continue}else he=le+4;switch(Re){case _:xe&&(D&&(t=s(D))&&this.parseAVCPES(l,c,t,!1),D={data:[],size:0}),D&&(D.data.push(S.subarray(he,le+u)),D.size+=le+u-he);break;case O:if(xe){if(F&&(t=s(F)))switch(x.segmentCodec){case"aac":this.parseAACPES(x,t);break;case"mp3":this.parseMPEGPES(x,t);break}F={data:[],size:0}}F&&(F.data.push(S.subarray(he,le+u)),F.size+=le+u-he);break;case k:xe&&(G&&(t=s(G))&&this.parseID3PES(y,t),G={data:[],size:0}),G&&(G.data.push(S.subarray(he,le+u)),G.size+=le+u-he);break;case 0:xe&&(he+=S[he]+1),Q=this._pmtId=a(S,he);break;case Q:{xe&&(he+=S[he]+1);var be=i(S,he,this.typeSupported,r);_=be.avc,_>0&&(l.pid=_),O=be.audio,O>0&&(x.pid=O,x.segmentCodec=be.segmentCodec),k=be.id3,k>0&&(y.pid=k),H!==null&&!j&&(f.logger.warn("MPEG-TS PMT found at "+le+" after unknown PID '"+H+"'. Backtracking to sync byte @"+ie+" to parse all TS packets."),H=null,le=ie-188),j=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=Re;break}}else se++;se>0&&this.observer.emit(I.Events.ERROR,I.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"Found "+se+" TS packet/s that do not start with 0x47"}),l.pesData=D,x.pesData=F,y.pesData=G;var Ce={audioTrack:x,videoTrack:l,id3Track:y,textTrack:c};return n&&this.extractRemainingSamples(Ce),Ce},T.flush=function(){var S=this.remainderData;this.remainderData=null;var w;return S?w=this.demux(S,-1,!1,!0):w={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(w),this.sampleAes?this.decrypt(w,this.sampleAes):w},T.extractRemainingSamples=function(S){var w=S.audioTrack,r=S.videoTrack,n=S.id3Track,t=S.textTrack,l=r.pesData,x=w.pesData,y=n.pesData,c;if(l&&(c=s(l))?(this.parseAVCPES(r,t,c,!0),r.pesData=null):r.pesData=l,x&&(c=s(x))){switch(w.segmentCodec){case"aac":this.parseAACPES(w,c);break;case"mp3":this.parseMPEGPES(w,c);break}w.pesData=null}else x!=null&&x.size&&f.logger.log("last AAC PES packet truncated,might overlap between fragments"),w.pesData=x;y&&(c=s(y))?(this.parseID3PES(n,c),n.pesData=null):n.pesData=y},T.demuxSampleAes=function(S,w,r){var n=this.demux(S,r,!0,!this.config.progressive),t=this.sampleAes=new e.default(this.observer,this.config,w);return this.decrypt(n,t)},T.decrypt=function(S,w){return new Promise(function(r){var n=S.audioTrack,t=S.videoTrack;n.samples&&n.segmentCodec==="aac"?w.decryptAacSamples(n.samples,0,function(){t.samples?w.decryptAvcSamples(t.samples,0,0,function(){r(S)}):r(S)}):t.samples&&w.decryptAvcSamples(t.samples,0,0,function(){r(S)})})},T.destroy=function(){this._duration=0},T.parseAVCPES=function(S,w,r,n){var t=this,l=this.parseAVCNALu(S,r.data),x=!1,y=this.avcSample,c,_=!1;r.data=null,y&&l.length&&!S.audFound&&(E(y,S),y=this.avcSample=m(!1,r.pts,r.dts,"")),l.forEach(function(D){switch(D.type){case 1:{c=!0,y||(y=t.avcSample=m(!0,r.pts,r.dts,"")),x&&(y.debug+="NDR "),y.frame=!0;var O=D.data;if(_&&O.length>4){var k=new M.default(O).readSliceType();(k===2||k===4||k===7||k===9)&&(y.key=!0)}break}case 5:c=!0,y||(y=t.avcSample=m(!0,r.pts,r.dts,"")),x&&(y.debug+="IDR "),y.key=!0,y.frame=!0;break;case 6:{c=!0,x&&y&&(y.debug+="SEI "),(0,A.parseSEIMessageFromNALu)(D.data,1,r.pts,w.samples);break}case 7:if(c=!0,_=!0,x&&y&&(y.debug+="SPS "),!S.sps){var F=new M.default(D.data),G=F.readSPS();S.width=G.width,S.height=G.height,S.pixelRatio=G.pixelRatio,S.sps=[D.data],S.duration=t._duration;for(var H=D.data.subarray(1,4),j="avc1.",Q=0;Q<3;Q++){var ee=H[Q].toString(16);ee.length<2&&(ee="0"+ee),j+=ee}S.codec=j}break;case 8:c=!0,x&&y&&(y.debug+="PPS "),S.pps||(S.pps=[D.data]);break;case 9:c=!1,S.audFound=!0,y&&E(y,S),y=t.avcSample=m(!1,r.pts,r.dts,x?"AUD ":"");break;case 12:c=!0;break;default:c=!1,y&&(y.debug+="unknown NAL "+D.type+" ");break}if(y&&c){var ie=y.units;ie.push(D)}}),n&&y&&(E(y,S),this.avcSample=null)},T.getLastNalUnit=function(S){var w,r=this.avcSample,n;if((!r||r.units.length===0)&&(r=S[S.length-1]),(w=r)!==null&&w!==void 0&&w.units){var t=r.units;n=t[t.length-1]}return n},T.parseAVCNALu=function(S,w){var r=w.byteLength,n=S.naluState||0,t=n,l=[],x=0,y,c,_,D=-1,O=0;for(n===-1&&(D=0,O=w[0]&31,n=0,x=1);x<r;){if(y=w[x++],!n){n=y?0:1;continue}if(n===1){n=y?0:2;continue}if(!y)n=3;else if(y===1){if(D>=0){var k={data:w.subarray(D,x-n-1),type:O};l.push(k)}else{var F=this.getLastNalUnit(S.samples);if(F&&(t&&x<=4-t&&F.state&&(F.data=F.data.subarray(0,F.data.byteLength-t)),c=x-n-1,c>0)){var G=new Uint8Array(F.data.byteLength+c);G.set(F.data,0),G.set(w.subarray(0,c),F.data.byteLength),F.data=G,F.state=0}}x<r?(_=w[x]&31,D=x,O=_,n=0):n=-1}else n=0}if(D>=0&&n>=0){var H={data:w.subarray(D,r),type:O,state:n};l.push(H)}if(l.length===0){var j=this.getLastNalUnit(S.samples);if(j){var Q=new Uint8Array(j.data.byteLength+w.byteLength);Q.set(j.data,0),Q.set(w,j.data.byteLength),j.data=Q}}return S.naluState=n,l},T.parseAACPES=function(S,w){var r=0,n=this.aacOverFlow,t=w.data;if(n){this.aacOverFlow=null;var l=n.missing,x=n.sample.unit.byteLength;if(l===-1){var y=new Uint8Array(x+t.byteLength);y.set(n.sample.unit,0),y.set(t,x),t=y}else{var c=x-l;n.sample.unit.set(t.subarray(0,l),c),S.samples.push(n.sample),r=n.missing}}var _,D;for(_=r,D=t.length;_<D-1&&!C.isHeader(t,_);_++);if(_!==r){var O,k;if(_<D-1?(O="AAC PES did not start with ADTS header,offset:"+_,k=!1):(O="no ADTS header found in AAC PES",k=!0),f.logger.warn("parsing error:"+O),this.observer.emit(I.Events.ERROR,I.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.FRAG_PARSING_ERROR,fatal:k,reason:O}),k)return}C.initTrackConfig(S,this.observer,t,_,this.audioCodec);var F;if(w.pts!==void 0)F=w.pts;else if(n){var G=C.getFrameDuration(S.samplerate);F=n.sample.pts+G}else{f.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var H=0,j;_<D;)if(j=C.appendFrame(S,t,_,F,H),_+=j.length,j.missing){this.aacOverFlow=j;break}else for(H++;_<D-1&&!C.isHeader(t,_);_++);},T.parseMPEGPES=function(S,w){var r=w.data,n=r.length,t=0,l=0,x=w.pts;if(x===void 0){f.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;l<n;)if(P.isHeader(r,l)){var y=P.appendFrame(S,r,l,x,t);if(y)l+=y.length,t++;else break}else l++},T.parseID3PES=function(S,w){if(w.pts===void 0){f.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}var r=p({},w,{type:this._avcTrack?h.MetadataSchema.emsg:h.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});S.samples.push(r)},d}();function m(d,T,R,S){return{key:d,frame:!1,pts:T,dts:R,units:[],debug:S,length:0}}function o(d,T){return((d[T+1]&31)<<8)+d[T+2]}function a(d,T){return(d[T+10]&31)<<8|d[T+11]}function i(d,T,R,S){var w={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},r=(d[T+1]&15)<<8|d[T+2],n=T+3+r-4,t=(d[T+10]&15)<<8|d[T+11];for(T+=12+t;T<n;){var l=o(d,T);switch(d[T]){case 207:if(!S){f.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:w.audio===-1&&(w.audio=l);break;case 21:w.id3===-1&&(w.id3=l);break;case 219:if(!S){f.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:w.avc===-1&&(w.avc=l);break;case 3:case 4:R.mpeg!==!0&&R.mp3!==!0?f.logger.log("MPEG audio found, not supported in this browser"):w.audio===-1&&(w.audio=l,w.segmentCodec="mp3");break;case 36:f.logger.warn("Unsupported HEVC stream type found");break;default:break}T+=((d[T+3]&15)<<8|d[T+4])+5}return w}function s(d){var T=0,R,S,w,r,n,t=d.data;if(!d||d.size===0)return null;for(;t[0].length<19&&t.length>1;){var l=new Uint8Array(t[0].length+t[1].length);l.set(t[0]),l.set(t[1],t[0].length),t[0]=l,t.splice(1,1)}R=t[0];var x=(R[0]<<16)+(R[1]<<8)+R[2];if(x===1){if(S=(R[4]<<8)+R[5],S&&S>d.size-6)return null;var y=R[7];y&192&&(r=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,y&64?(n=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,r-n>54e5&&(f.logger.warn(Math.round((r-n)/9e4)+"s delta between PTS and DTS, align them"),r=n)):n=r),w=R[8];var c=w+9;if(d.size<=c)return null;d.size-=c;for(var _=new Uint8Array(d.size),D=0,O=t.length;D<O;D++){R=t[D];var k=R.byteLength;if(c)if(c>k){c-=k;continue}else R=R.subarray(c),k-=c,c=0;_.set(R,T),T+=k}return S&&(S-=w+3),{data:_,pts:r,dts:n,len:S}}return null}function E(d,T){if(d.units.length&&d.frame){if(d.pts===void 0){var R=T.samples,S=R.length;if(S){var w=R[S-1];d.pts=w.pts,d.dts=w.dts}else{T.dropped++;return}}T.samples.push(d)}d.debug.length&&f.logger.log(d.pts+"/"+d.dts+":"+d.debug)}const b=v},"./src/demux/webworkify-webpack.js":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>u});var C=function(){var m=ENTRY_MODULE,o={},a=function s(E){var b=o[E];if(b!==void 0)return b.exports;var d=o[E]={exports:{}};return m[E].call(d.exports,d,d.exports,s),d.exports};a.m=m,function(){a.n=function(s){var E=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(E,{a:E}),E}}(),function(){a.d=function(s,E){for(var b in E)a.o(E,b)&&!a.o(s,b)&&Object.defineProperty(s,b,{enumerable:!0,get:E[b]})}}(),function(){a.o=function(s,E){return Object.prototype.hasOwnProperty.call(s,E)}}(),function(){a.r=function(s){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})}}();var i=a(ENTRY_MODULE);return i.default||i},P=C.toString().split("ENTRY_MODULE"),M="[\\.|\\-|\\+|\\w|/|@]+",e="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+M+").*?\\)";function I(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function A(v){return!isNaN(1*v)}function f(v,m,o){var a={};a[o]=[];var i=m.toString().replace(/^"[^"]+"/,"function"),s=i.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||i.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!s)return a;for(var E=s[1],b=new RegExp("(\\\\n|\\W)"+I(E)+e,"g"),d;d=b.exec(i);)d[3]!=="dll-reference"&&a[o].push(d[3]);for(b=new RegExp("\\("+I(E)+'\\("(dll-reference\\s('+M+'))"\\)\\)'+e,"g");d=b.exec(i);)v[d[2]]||(a[o].push(d[1]),v[d[2]]=L(d[1]).m),a[d[2]]=a[d[2]]||[],a[d[2]].push(d[4]);for(var T=Object.keys(a),R=0;R<T.length;R++)for(var S=0;S<a[T[R]].length;S++)A(a[T[R]][S])&&(a[T[R]][S]=1*a[T[R]][S]);return a}function g(v){var m=Object.keys(v);return m.reduce(function(o,a){return o||v[a].length>0},!1)}function h(v,m){for(var o={main:[m]},a={main:[]},i={main:{}};g(o);)for(var s=Object.keys(o),E=0;E<s.length;E++){var b=s[E],d=o[b],T=d.pop();if(i[b]=i[b]||{},!(i[b][T]||!v[b][T])){i[b][T]=!0,a[b]=a[b]||[],a[b].push(T);for(var R=f(v,v[b][T],b),S=Object.keys(R),w=0;w<S.length;w++)o[S[w]]=o[S[w]]||[],o[S[w]]=o[S[w]].concat(R[S[w]])}}return a}function p(v,m,o,a){var i=v[a].map(function(s){return'"'+s+'": '+m[a][s].toString().replace(/^"[^"]+"/,"function")}).join(",");return P[0]+"{"+i+"}"+P[1]+'"'+o+'"'+P[2]}function u(v,m){m=m||{};var o={main:L.m},a=m.all?{main:Object.keys(o.main)}:h(o,v),i="";Object.keys(a).filter(function(T){return T!=="main"}).forEach(function(T){for(var R=0;a[T][R];)R++;a[T].push(R),o[T][R]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",i=i+("var "+T+" = ("+p(a,o,R,modules)+`)();
`)}),i=i+("new (("+p(a,o,v,"main")+")())(self);");var s=new window.Blob([i],{type:"text/javascript"}),E=window.URL||window.webkitURL||window.mozURL||window.msURL,b=E.createObjectURL(s),d=new window.Worker(b);return d.objectURL=b,d}},"./src/errors.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{ErrorDetails:()=>P,ErrorTypes:()=>C});var C;(function(M){M.NETWORK_ERROR="networkError",M.MEDIA_ERROR="mediaError",M.KEY_SYSTEM_ERROR="keySystemError",M.MUX_ERROR="muxError",M.OTHER_ERROR="otherError"})(C||(C={}));var P;(function(M){M.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",M.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",M.KEY_SYSTEM_NO_SESSION="keySystemNoSession",M.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",M.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",M.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",M.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",M.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",M.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",M.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",M.MANIFEST_LOAD_ERROR="manifestLoadError",M.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",M.MANIFEST_PARSING_ERROR="manifestParsingError",M.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",M.LEVEL_EMPTY_ERROR="levelEmptyError",M.LEVEL_LOAD_ERROR="levelLoadError",M.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",M.LEVEL_SWITCH_ERROR="levelSwitchError",M.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",M.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",M.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",M.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",M.FRAG_LOAD_ERROR="fragLoadError",M.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",M.FRAG_DECRYPT_ERROR="fragDecryptError",M.FRAG_PARSING_ERROR="fragParsingError",M.REMUX_ALLOC_ERROR="remuxAllocError",M.KEY_LOAD_ERROR="keyLoadError",M.KEY_LOAD_TIMEOUT="keyLoadTimeOut",M.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",M.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",M.BUFFER_APPEND_ERROR="bufferAppendError",M.BUFFER_APPENDING_ERROR="bufferAppendingError",M.BUFFER_STALLED_ERROR="bufferStalledError",M.BUFFER_FULL_ERROR="bufferFullError",M.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",M.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",M.INTERNAL_EXCEPTION="internalException",M.INTERNAL_ABORTED="aborted",M.UNKNOWN="unknown"})(P||(P={}))},"./src/events.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{Events:()=>C});var C;(function(P){P.MEDIA_ATTACHING="hlsMediaAttaching",P.MEDIA_ATTACHED="hlsMediaAttached",P.MEDIA_DETACHING="hlsMediaDetaching",P.MEDIA_DETACHED="hlsMediaDetached",P.BUFFER_RESET="hlsBufferReset",P.BUFFER_CODECS="hlsBufferCodecs",P.BUFFER_CREATED="hlsBufferCreated",P.BUFFER_APPENDING="hlsBufferAppending",P.BUFFER_APPENDED="hlsBufferAppended",P.BUFFER_EOS="hlsBufferEos",P.BUFFER_FLUSHING="hlsBufferFlushing",P.BUFFER_FLUSHED="hlsBufferFlushed",P.MANIFEST_LOADING="hlsManifestLoading",P.MANIFEST_LOADED="hlsManifestLoaded",P.MANIFEST_PARSED="hlsManifestParsed",P.LEVEL_SWITCHING="hlsLevelSwitching",P.LEVEL_SWITCHED="hlsLevelSwitched",P.LEVEL_LOADING="hlsLevelLoading",P.LEVEL_LOADED="hlsLevelLoaded",P.LEVEL_UPDATED="hlsLevelUpdated",P.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",P.LEVELS_UPDATED="hlsLevelsUpdated",P.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",P.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",P.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",P.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",P.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",P.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",P.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",P.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",P.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",P.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",P.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",P.CUES_PARSED="hlsCuesParsed",P.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",P.INIT_PTS_FOUND="hlsInitPtsFound",P.FRAG_LOADING="hlsFragLoading",P.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",P.FRAG_LOADED="hlsFragLoaded",P.FRAG_DECRYPTED="hlsFragDecrypted",P.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",P.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",P.FRAG_PARSING_METADATA="hlsFragParsingMetadata",P.FRAG_PARSED="hlsFragParsed",P.FRAG_BUFFERED="hlsFragBuffered",P.FRAG_CHANGED="hlsFragChanged",P.FPS_DROP="hlsFpsDrop",P.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",P.ERROR="hlsError",P.DESTROYING="hlsDestroying",P.KEY_LOADING="hlsKeyLoading",P.KEY_LOADED="hlsKeyLoaded",P.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",P.BACK_BUFFER_REACHED="hlsBackBufferReached"})(C||(C={}))},"./src/hls.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>R});var C=L("./node_modules/url-toolkit/src/url-toolkit.js"),P=L.n(C),M=L("./src/loader/playlist-loader.ts"),e=L("./src/controller/id3-track-controller.ts"),I=L("./src/controller/latency-controller.ts"),A=L("./src/controller/level-controller.ts"),f=L("./src/controller/fragment-tracker.ts"),g=L("./src/loader/key-loader.ts"),h=L("./src/controller/stream-controller.ts"),p=L("./src/is-supported.ts"),u=L("./src/utils/logger.ts"),v=L("./src/config.ts"),m=L("./node_modules/eventemitter3/index.js"),o=L.n(m),a=L("./src/events.ts"),i=L("./src/errors.ts"),s=L("./src/types/level.ts");function E(S,w){for(var r=0;r<w.length;r++){var n=w[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(S,d(n.key),n)}}function b(S,w,r){return w&&E(S.prototype,w),r&&E(S,r),Object.defineProperty(S,"prototype",{writable:!1}),S}function d(S){var w=T(S,"string");return typeof w=="symbol"?w:String(w)}function T(S,w){if(typeof S!="object"||S===null)return S;var r=S[Symbol.toPrimitive];if(r!==void 0){var n=r.call(S,w||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(S)}var R=function(){S.isSupported=function(){return(0,p.isSupported)()};function S(r){r===void 0&&(r={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new m.EventEmitter,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var n=this.config=(0,v.mergeConfig)(S.DefaultConfig,r);this.userConfig=r,(0,u.enableLogs)(n.debug,"Hls instance"),this._autoLevelCapping=-1,n.progressive&&(0,v.enableStreamingMode)(n);var t=n.abrController,l=n.bufferController,x=n.capLevelController,y=n.fpsController,c=this.abrController=new t(this),_=this.bufferController=new l(this),D=this.capLevelController=new x(this),O=new y(this),k=new M.default(this),F=new e.default(this),G=this.levelController=new A.default(this),H=new f.FragmentTracker(this),j=new g.default(this.config),Q=this.streamController=new h.default(this,H,j);D.setStreamController(Q),O.setStreamController(Q);var ee=[k,G,Q];this.networkControllers=ee;var ie=[c,_,D,O,F,H];this.audioTrackController=this.createController(n.audioTrackController,ee);var se=n.audioStreamController;se&&ee.push(new se(this,H,j)),this.subtitleTrackController=this.createController(n.subtitleTrackController,ee);var le=n.subtitleStreamController;le&&ee.push(new le(this,H,j)),this.createController(n.timelineController,ie),j.emeController=this.emeController=this.createController(n.emeController,ie),this.cmcdController=this.createController(n.cmcdController,ie),this.latencyController=this.createController(I.default,ie),this.coreComponents=ie}var w=S.prototype;return w.createController=function(n,t){if(n){var l=new n(this);return t&&t.push(l),l}return null},w.on=function(n,t,l){l===void 0&&(l=this),this._emitter.on(n,t,l)},w.once=function(n,t,l){l===void 0&&(l=this),this._emitter.once(n,t,l)},w.removeAllListeners=function(n){this._emitter.removeAllListeners(n)},w.off=function(n,t,l,x){l===void 0&&(l=this),this._emitter.off(n,t,l,x)},w.listeners=function(n){return this._emitter.listeners(n)},w.emit=function(n,t,l){return this._emitter.emit(n,t,l)},w.trigger=function(n,t){if(this.config.debug)return this.emit(n,n,t);try{return this.emit(n,n,t)}catch(l){u.logger.error("An internal error happened while handling event "+n+'. Error message: "'+l.message+'". Here is a stacktrace:',l),this.trigger(a.Events.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:n,error:l})}return!1},w.listenerCount=function(n){return this._emitter.listenerCount(n)},w.destroy=function(){u.logger.log("destroy"),this.trigger(a.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(n){return n.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(n){return n.destroy()}),this.coreComponents.length=0},w.attachMedia=function(n){u.logger.log("attachMedia"),this._media=n,this.trigger(a.Events.MEDIA_ATTACHING,{media:n})},w.detachMedia=function(){u.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},w.loadSource=function(n){this.stopLoad();var t=this.media,l=this.url,x=this.url=C.buildAbsoluteURL(self.location.href,n,{alwaysNormalize:!0});u.logger.log("loadSource:"+x),t&&l&&l!==x&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(t)),this.trigger(a.Events.MANIFEST_LOADING,{url:n})},w.startLoad=function(n){n===void 0&&(n=-1),u.logger.log("startLoad("+n+")"),this.networkControllers.forEach(function(t){t.startLoad(n)})},w.stopLoad=function(){u.logger.log("stopLoad"),this.networkControllers.forEach(function(n){n.stopLoad()})},w.swapAudioCodec=function(){u.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},w.recoverMediaError=function(){u.logger.log("recoverMediaError");var n=this._media;this.detachMedia(),n&&this.attachMedia(n)},w.removeLevel=function(n,t){t===void 0&&(t=0),this.levelController.removeLevel(n,t)},b(S,[{key:"levels",get:function(){var n=this.levelController.levels;return n||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(n){u.logger.log("set currentLevel:"+n),this.loadLevel=n,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(n){u.logger.log("set nextLevel:"+n),this.levelController.manualLevel=n,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(n){u.logger.log("set loadLevel:"+n),this.levelController.manualLevel=n}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(n){this.levelController.nextLoadLevel=n}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(n){u.logger.log("set firstLevel:"+n),this.levelController.firstLevel=n}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(n){u.logger.log("set startLevel:"+n),n!==-1&&(n=Math.max(n,this.minAutoLevel)),this.levelController.startLevel=n}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(n){var t=!!n;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(n){this._autoLevelCapping!==n&&(u.logger.log("set autoLevelCapping:"+n),this._autoLevelCapping=n)}},{key:"bandwidthEstimate",get:function(){var n=this.abrController.bwEstimator;return n?n.getEstimate():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(n){s.HdcpLevels.indexOf(n)>-1&&(this._maxHdcpLevel=n)}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var n=this.levels,t=this.config.minAutoBitrate;if(!n)return 0;for(var l=n.length,x=0;x<l;x++)if(n[x].maxBitrate>=t)return x;return 0}},{key:"maxAutoLevel",get:function(){var n=this.levels,t=this.autoLevelCapping,l=this.maxHdcpLevel,x;if(t===-1&&n&&n.length?x=n.length-1:x=t,l)for(var y=x;y--;){var c=n[y].attrs["HDCP-LEVEL"];if(c&&c<=l)return y}return x}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(n){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,n)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var n=this.audioTrackController;return n?n.audioTracks:[]}},{key:"audioTrack",get:function(){var n=this.audioTrackController;return n?n.audioTrack:-1},set:function(n){var t=this.audioTrackController;t&&(t.audioTrack=n)}},{key:"subtitleTracks",get:function(){var n=this.subtitleTrackController;return n?n.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var n=this.subtitleTrackController;return n?n.subtitleTrack:-1},set:function(n){var t=this.subtitleTrackController;t&&(t.subtitleTrack=n)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var n=this.subtitleTrackController;return n?n.subtitleDisplay:!1},set:function(n){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=n)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(n){this.config.lowLatencyMode=n}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.3.5"}},{key:"Events",get:function(){return a.Events}},{key:"ErrorTypes",get:function(){return i.ErrorTypes}},{key:"ErrorDetails",get:function(){return i.ErrorDetails}},{key:"DefaultConfig",get:function(){return S.defaultConfig?S.defaultConfig:v.hlsDefaultConfig},set:function(n){S.defaultConfig=n}}]),S}();R.defaultConfig=void 0},"./src/is-supported.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{changeTypeSupported:()=>e,isSupported:()=>M});var C=L("./src/utils/mediasource-helper.ts");function P(){return self.SourceBuffer||self.WebKitSourceBuffer}function M(){var I=(0,C.getMediaSource)();if(!I)return!1;var A=P(),f=I&&typeof I.isTypeSupported=="function"&&I.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),g=!A||A.prototype&&typeof A.prototype.appendBuffer=="function"&&typeof A.prototype.remove=="function";return!!f&&!!g}function e(){var I,A=P();return typeof(A==null||(I=A.prototype)===null||I===void 0?void 0:I.changeType)=="function"}},"./src/loader/date-range.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{DateRange:()=>p,DateRangeAttribute:()=>h});var C=L("./src/polyfills/number.ts"),P=L("./src/utils/attr-list.ts"),M=L("./src/utils/logger.ts");function e(){return e=Object.assign?Object.assign.bind():function(u){for(var v=1;v<arguments.length;v++){var m=arguments[v];for(var o in m)Object.prototype.hasOwnProperty.call(m,o)&&(u[o]=m[o])}return u},e.apply(this,arguments)}function I(u,v){for(var m=0;m<v.length;m++){var o=v[m];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,f(o.key),o)}}function A(u,v,m){return v&&I(u.prototype,v),m&&I(u,m),Object.defineProperty(u,"prototype",{writable:!1}),u}function f(u){var v=g(u,"string");return typeof v=="symbol"?v:String(v)}function g(u,v){if(typeof u!="object"||u===null)return u;var m=u[Symbol.toPrimitive];if(m!==void 0){var o=m.call(u,v||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(u)}var h;(function(u){u.ID="ID",u.CLASS="CLASS",u.START_DATE="START-DATE",u.DURATION="DURATION",u.END_DATE="END-DATE",u.END_ON_NEXT="END-ON-NEXT",u.PLANNED_DURATION="PLANNED-DURATION",u.SCTE35_OUT="SCTE35-OUT",u.SCTE35_IN="SCTE35-IN"})(h||(h={}));var p=function(){function u(v,m){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,m){var o=m.attr;for(var a in o)if(Object.prototype.hasOwnProperty.call(v,a)&&v[a]!==o[a]){M.logger.warn('DATERANGE tag attribute: "'+a+'" does not match for tags with ID: "'+v.ID+'"'),this._badValueForSameId=a;break}v=e(new P.AttrList({}),o,v)}if(this.attr=v,this._startDate=new Date(v[h.START_DATE]),h.END_DATE in this.attr){var i=new Date(this.attr[h.END_DATE]);(0,C.isFiniteNumber)(i.getTime())&&(this._endDate=i)}}return A(u,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var m=this.duration;return m!==null?new Date(this._startDate.getTime()+m*1e3):null}},{key:"duration",get:function(){if(h.DURATION in this.attr){var m=this.attr.decimalFloatingPoint(h.DURATION);if((0,C.isFiniteNumber)(m))return m}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return h.PLANNED_DURATION in this.attr?this.attr.decimalFloatingPoint(h.PLANNED_DURATION):null}},{key:"endOnNext",get:function(){return this.attr.bool(h.END_ON_NEXT)}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&(0,C.isFiniteNumber)(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}]),u}()},"./src/loader/fragment-loader.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{LoadError:()=>m,default:()=>u});var C=L("./src/polyfills/number.ts"),P=L("./src/errors.ts");function M(o,a){o.prototype=Object.create(a.prototype),o.prototype.constructor=o,g(o,a)}function e(o){var a=typeof Map=="function"?new Map:void 0;return e=function(s){if(s===null||!f(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(s))return a.get(s);a.set(s,E)}function E(){return I(s,arguments,h(this).constructor)}return E.prototype=Object.create(s.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),g(E,s)},e(o)}function I(o,a,i){return A()?I=Reflect.construct.bind():I=function(E,b,d){var T=[null];T.push.apply(T,b);var R=Function.bind.apply(E,T),S=new R;return d&&g(S,d.prototype),S},I.apply(null,arguments)}function A(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(o){return!1}}function f(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function g(o,a){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,E){return s.__proto__=E,s},g(o,a)}function h(o){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},h(o)}var p=Math.pow(2,17),u=function(){function o(i){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=i}var a=o.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(s,E){var b=this,d=s.url;if(!d)return Promise.reject(new m({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,networkDetails:null},"Fragment does not have a "+(d?"part list":"url")));this.abort();var T=this.config,R=T.fLoader,S=T.loader;return new Promise(function(w,r){b.loader&&b.loader.destroy();var n=b.loader=s.loader=R?new R(T):new S(T),t=v(s),l={timeout:T.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:T.fragLoadingMaxRetryTimeout,highWaterMark:s.sn==="initSegment"?1/0:p};s.stats=n.stats,n.load(t,l,{onSuccess:function(y,c,_,D){b.resetLoader(s,n);var O=y.data;_.resetIV&&s.decryptdata&&(s.decryptdata.iv=new Uint8Array(O.slice(0,16)),O=O.slice(16)),w({frag:s,part:null,payload:O,networkDetails:D})},onError:function(y,c,_){b.resetLoader(s,n),r(new m({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,response:y,networkDetails:_}))},onAbort:function(y,c,_){b.resetLoader(s,n),r(new m({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,networkDetails:_}))},onTimeout:function(y,c,_){b.resetLoader(s,n),r(new m({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,networkDetails:_}))},onProgress:function(y,c,_,D){E&&E({frag:s,part:null,payload:_,networkDetails:D})}})})},a.loadPart=function(s,E,b){var d=this;this.abort();var T=this.config,R=T.fLoader,S=T.loader;return new Promise(function(w,r){d.loader&&d.loader.destroy();var n=d.loader=s.loader=R?new R(T):new S(T),t=v(s,E),l={timeout:T.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:T.fragLoadingMaxRetryTimeout,highWaterMark:p};E.stats=n.stats,n.load(t,l,{onSuccess:function(y,c,_,D){d.resetLoader(s,n),d.updateStatsFromPart(s,E);var O={frag:s,part:E,payload:y.data,networkDetails:D};b(O),w(O)},onError:function(y,c,_){d.resetLoader(s,n),r(new m({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,part:E,response:y,networkDetails:_}))},onAbort:function(y,c,_){s.stats.aborted=E.stats.aborted,d.resetLoader(s,n),r(new m({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,part:E,networkDetails:_}))},onTimeout:function(y,c,_){d.resetLoader(s,n),r(new m({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,part:E,networkDetails:_}))}})})},a.updateStatsFromPart=function(s,E){var b=s.stats,d=E.stats,T=d.total;if(b.loaded+=d.loaded,T){var R=Math.round(s.duration/E.duration),S=Math.min(Math.round(b.loaded/T),R),w=R-S,r=w*Math.round(b.loaded/S);b.total=b.loaded+r}else b.total=Math.max(b.loaded,b.total);var n=b.loading,t=d.loading;n.start?n.first+=t.first-t.start:(n.start=t.start,n.first=t.first),n.end=t.end},a.resetLoader=function(s,E){s.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},o}();function v(o,a){a===void 0&&(a=null);var i=a||o,s={frag:o,part:a,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},E=i.byteRangeStartOffset,b=i.byteRangeEndOffset;if((0,C.isFiniteNumber)(E)&&(0,C.isFiniteNumber)(b)){var d,T=E,R=b;if(o.sn==="initSegment"&&((d=o.decryptdata)===null||d===void 0?void 0:d.method)==="AES-128"){var S=b-E;S%16&&(R=b+(16-S%16)),E!==0&&(s.resetIV=!0,T=E-16)}s.rangeStart=T,s.rangeEnd=R}return s}var m=function(o){M(a,o);function a(i){for(var s,E=arguments.length,b=new Array(E>1?E-1:0),d=1;d<E;d++)b[d-1]=arguments[d];return s=o.call.apply(o,[this].concat(b))||this,s.data=void 0,s.data=i,s}return a}(e(Error))},"./src/loader/fragment.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{BaseSegment:()=>v,ElementaryStreamTypes:()=>u,Fragment:()=>m,Part:()=>o});var C=L("./src/polyfills/number.ts"),P=L("./node_modules/url-toolkit/src/url-toolkit.js"),M=L.n(P),e=L("./src/loader/load-stats.ts");function I(a,i){a.prototype=Object.create(i.prototype),a.prototype.constructor=a,A(a,i)}function A(a,i){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,b){return E.__proto__=b,E},A(a,i)}function f(a,i){for(var s=0;s<i.length;s++){var E=i[s];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(a,h(E.key),E)}}function g(a,i,s){return i&&f(a.prototype,i),s&&f(a,s),Object.defineProperty(a,"prototype",{writable:!1}),a}function h(a){var i=p(a,"string");return typeof i=="symbol"?i:String(i)}function p(a,i){if(typeof a!="object"||a===null)return a;var s=a[Symbol.toPrimitive];if(s!==void 0){var E=s.call(a,i||"default");if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(a)}var u;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(u||(u={}));var v=function(){function a(s){var E;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(E={},E[u.AUDIO]=null,E[u.VIDEO]=null,E[u.AUDIOVIDEO]=null,E),this.baseurl=s}var i=a.prototype;return i.setByteRange=function(E,b){var d=E.split("@",2),T=[];d.length===1?T[0]=b?b.byteRangeEndOffset:0:T[0]=parseInt(d[1]),T[1]=parseInt(d[0])+T[0],this._byteRange=T},g(a,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=(0,P.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(E){this._url=E}}]),a}(),m=function(a){I(i,a);function i(E,b){var d;return d=a.call(this,b)||this,d._decryptdata=null,d.rawProgramDateTime=null,d.programDateTime=null,d.tagList=[],d.duration=0,d.sn=0,d.levelkeys=void 0,d.type=void 0,d.loader=null,d.keyLoader=null,d.level=-1,d.cc=0,d.startPTS=void 0,d.endPTS=void 0,d.appendedPTS=void 0,d.startDTS=void 0,d.endDTS=void 0,d.start=0,d.deltaPTS=void 0,d.maxStartPTS=void 0,d.minEndPTS=void 0,d.stats=new e.LoadStats,d.urlId=0,d.data=void 0,d.bitrateTest=!1,d.title=null,d.initSegment=null,d.endList=void 0,d.type=E,d}var s=i.prototype;return s.setKeyFormat=function(b){if(this.levelkeys){var d=this.levelkeys[b];d&&!this._decryptdata&&(this._decryptdata=d.getDecryptData(this.sn))}},s.abortRequests=function(){var b,d;(b=this.loader)===null||b===void 0||b.abort(),(d=this.keyLoader)===null||d===void 0||d.abort()},s.setElementaryStreamInfo=function(b,d,T,R,S,w){w===void 0&&(w=!1);var r=this.elementaryStreams,n=r[b];if(!n){r[b]={startPTS:d,endPTS:T,startDTS:R,endDTS:S,partial:w};return}n.startPTS=Math.min(n.startPTS,d),n.endPTS=Math.max(n.endPTS,T),n.startDTS=Math.min(n.startDTS,R),n.endDTS=Math.max(n.endDTS,S)},s.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[u.AUDIO]=null,b[u.VIDEO]=null,b[u.AUDIOVIDEO]=null},g(i,[{key:"decryptdata",get:function(){var b=this.levelkeys;if(!b&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var d=this.levelkeys.identity;if(d)this._decryptdata=d.getDecryptData(this.sn);else{var T=Object.keys(this.levelkeys);if(T.length===1)return this._decryptdata=this.levelkeys[T[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!(0,C.isFiniteNumber)(this.programDateTime))return null;var b=(0,C.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+b*1e3}},{key:"encrypted",get:function(){var b;if((b=this._decryptdata)!==null&&b!==void 0&&b.encrypted)return!0;if(this.levelkeys){var d=Object.keys(this.levelkeys),T=d.length;if(T>1||T===1&&this.levelkeys[d[0]].encrypted)return!0}return!1}}]),i}(v),o=function(a){I(i,a);function i(s,E,b,d,T){var R;R=a.call(this,b)||this,R.fragOffset=0,R.duration=0,R.gap=!1,R.independent=!1,R.relurl=void 0,R.fragment=void 0,R.index=void 0,R.stats=new e.LoadStats,R.duration=s.decimalFloatingPoint("DURATION"),R.gap=s.bool("GAP"),R.independent=s.bool("INDEPENDENT"),R.relurl=s.enumeratedString("URI"),R.fragment=E,R.index=d;var S=s.enumeratedString("BYTERANGE");return S&&R.setByteRange(S,T),T&&(R.fragOffset=T.fragOffset+T.duration),R}return g(i,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),i}(v)},"./src/loader/key-loader.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>M});var C=L("./src/errors.ts"),P=L("./src/loader/fragment-loader.ts"),M=function(){function e(A){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=A}var I=e.prototype;return I.abort=function(){for(var f in this.keyUriToKeyInfo){var g=this.keyUriToKeyInfo[f].loader;g&&g.abort()}},I.detach=function(){for(var f in this.keyUriToKeyInfo){var g=this.keyUriToKeyInfo[f];(g.mediaKeySessionContext||g.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[f]}},I.destroy=function(){this.detach();for(var f in this.keyUriToKeyInfo){var g=this.keyUriToKeyInfo[f].loader;g&&g.destroy()}this.keyUriToKeyInfo={}},I.createKeyLoadError=function(f,g,h,p){return g===void 0&&(g=C.ErrorDetails.KEY_LOAD_ERROR),new P.LoadError({type:C.ErrorTypes.NETWORK_ERROR,details:g,fatal:!1,frag:f,networkDetails:h})},I.loadClear=function(f,g){var h=this;if(this.emeController&&this.config.emeEnabled)for(var p=f.sn,u=f.cc,v=function(i){var s=g[i];if(u<=s.cc&&(p==="initSegment"||p<s.sn))return h.emeController.selectKeySystemFormat(s).then(function(E){s.setKeyFormat(E)}),"break"},m=0;m<g.length;m++){var o=v(m);if(o==="break")break}},I.load=function(f){var g=this;return!f.decryptdata&&f.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(f).then(function(h){return g.loadInternal(f,h)}):this.loadInternal(f)},I.loadInternal=function(f,g){var h,p;g&&f.setKeyFormat(g);var u=f.decryptdata;if(!u){var v=g?"Expected frag.decryptdata to be defined after setting format "+g:"Missing decryption data on fragment in onKeyLoading";return Promise.reject(this.createKeyLoadError(f,C.ErrorDetails.KEY_LOAD_ERROR,null,v))}var m=u.uri;if(!m)return Promise.reject(this.createKeyLoadError(f,C.ErrorDetails.KEY_LOAD_ERROR,null,'Invalid key URI: "'+m+'"'));var o=this.keyUriToKeyInfo[m];if((h=o)!==null&&h!==void 0&&h.decryptdata.key)return u.key=o.decryptdata.key,Promise.resolve({frag:f,keyInfo:o});if((p=o)!==null&&p!==void 0&&p.keyLoadPromise){var a;switch((a=o.mediaKeySessionContext)===null||a===void 0?void 0:a.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then(function(i){return u.key=i.keyInfo.decryptdata.key,{frag:f,keyInfo:o}})}}switch(o=this.keyUriToKeyInfo[m]={decryptdata:u,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},u.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return u.keyFormat==="identity"?this.loadKeyHTTP(o,f):this.loadKeyEME(o,f);case"AES-128":return this.loadKeyHTTP(o,f);default:return Promise.reject(this.createKeyLoadError(f,C.ErrorDetails.KEY_LOAD_ERROR,null,'Key supplied with unsupported METHOD: "'+u.method+'"'))}},I.loadKeyEME=function(f,g){var h={frag:g,keyInfo:f};if(this.emeController&&this.config.emeEnabled){var p=this.emeController.loadKey(h);if(p)return(f.keyLoadPromise=p.then(function(u){return f.mediaKeySessionContext=u,h})).catch(function(u){throw f.keyLoadPromise=null,u})}return Promise.resolve(h)},I.loadKeyHTTP=function(f,g){var h=this,p=this.config,u=p.loader,v=new u(p);return g.keyLoader=f.loader=v,f.keyLoadPromise=new Promise(function(m,o){var a={keyInfo:f,frag:g,responseType:"arraybuffer",url:f.decryptdata.uri},i={timeout:p.fragLoadingTimeOut,maxRetry:0,retryDelay:p.fragLoadingRetryDelay,maxRetryDelay:p.fragLoadingMaxRetryTimeout,highWaterMark:0},s={onSuccess:function(b,d,T,R){var S=T.frag,w=T.keyInfo,r=T.url;if(!S.decryptdata||w!==h.keyUriToKeyInfo[r])return o(h.createKeyLoadError(S,C.ErrorDetails.KEY_LOAD_ERROR,R,"after key load, decryptdata unset or changed"));w.decryptdata.key=S.decryptdata.key=new Uint8Array(b.data),S.keyLoader=null,w.loader=null,m({frag:S,keyInfo:w})},onError:function(b,d,T){h.resetLoader(d),o(h.createKeyLoadError(g,C.ErrorDetails.KEY_LOAD_ERROR,T))},onTimeout:function(b,d,T){h.resetLoader(d),o(h.createKeyLoadError(g,C.ErrorDetails.KEY_LOAD_TIMEOUT,T))},onAbort:function(b,d,T){h.resetLoader(d),o(h.createKeyLoadError(g,C.ErrorDetails.INTERNAL_ABORTED,T))}};v.load(a,i,s)})},I.resetLoader=function(f){var g=f.frag,h=f.keyInfo,p=f.url,u=h.loader;g.keyLoader===u&&(g.keyLoader=null,h.loader=null),delete this.keyUriToKeyInfo[p],u&&u.destroy()},e}()},"./src/loader/level-details.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{LevelDetails:()=>f});var C=L("./src/polyfills/number.ts");function P(g,h){for(var p=0;p<h.length;p++){var u=h[p];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,e(u.key),u)}}function M(g,h,p){return h&&P(g.prototype,h),p&&P(g,p),Object.defineProperty(g,"prototype",{writable:!1}),g}function e(g){var h=I(g,"string");return typeof h=="symbol"?h:String(h)}function I(g,h){if(typeof g!="object"||g===null)return g;var p=g[Symbol.toPrimitive];if(p!==void 0){var u=p.call(g,h||"default");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(g)}var A=10,f=function(){function g(p){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=p}var h=g.prototype;return h.reloaded=function(u){if(!u){this.advanced=!0,this.updated=!0;return}var v=this.lastPartSn-u.lastPartSn,m=this.lastPartIndex-u.lastPartIndex;this.updated=this.endSN!==u.endSN||!!m||!!v,this.advanced=this.endSN>u.endSN||v>0||v===0&&m>0,this.updated||this.advanced?this.misses=Math.floor(u.misses*.6):this.misses=u.misses+1,this.availabilityDelay=u.availabilityDelay},M(g,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?(0,C.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||A}},{key:"drift",get:function(){var u=this.driftEndTime-this.driftStartTime;if(u>0){var v=this.driftEnd-this.driftStart;return v*1e3/u}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var u;return(u=this.fragments)!==null&&u!==void 0&&u.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),g}()},"./src/loader/level-key.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{LevelKey:()=>f});var C=L("./src/utils/keysystem-util.ts"),P=L("./src/utils/mediakeys-helper.ts"),M=L("./src/utils/mp4-tools.ts"),e=L("./src/utils/logger.ts"),I=L("./src/utils/numeric-encoding-utils.ts"),A={},f=function(){h.clearKeyUriToKeyIdMap=function(){A={}};function h(u,v,m,o,a){o===void 0&&(o=[1]),a===void 0&&(a=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=u,this.uri=v,this.keyFormat=m,this.keyFormatVersions=o,this.iv=a,this.encrypted=u?u!=="NONE":!1,this.isCommonEncryption=this.encrypted&&u!=="AES-128"}var p=h.prototype;return p.isSupported=function(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;switch(this.keyFormat){case"identity":return this.method==="SAMPLE-AES";case P.KeySystemFormats.FAIRPLAY:case P.KeySystemFormats.WIDEVINE:case P.KeySystemFormats.PLAYREADY:case P.KeySystemFormats.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1},p.getDecryptData=function(v){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof v!="number"&&(this.method==="AES-128"&&!this.iv&&e.logger.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),v=0);var m=g(v),o=new h(this.method,this.uri,"identity",this.keyFormatVersions,m);return o}var a=(0,C.convertDataUriToArrayBytes)(this.uri);if(a)switch(this.keyFormat){case P.KeySystemFormats.WIDEVINE:this.pssh=a,a.length>=22&&(this.keyId=a.subarray(a.length-22,a.length-6));break;case P.KeySystemFormats.PLAYREADY:{var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=(0,M.mp4pssh)(i,null,a);var s=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),E=String.fromCharCode.apply(null,Array.from(s)),b=E.substring(E.indexOf("<"),E.length),d=new DOMParser,T=d.parseFromString(b,"text/xml"),R=T.getElementsByTagName("KID")[0];if(R){var S=R.childNodes[0]?R.childNodes[0].nodeValue:R.getAttribute("VALUE");if(S){var w=(0,I.base64Decode)(S).subarray(0,16);(0,C.changeEndianness)(w),this.keyId=w}}break}default:{var r=a.subarray(0,16);if(r.length!==16){var n=new Uint8Array(16);n.set(r,16-r.length),r=n}this.keyId=r;break}}if(!this.keyId||this.keyId.byteLength!==16){var t=A[this.uri];if(!t){var l=Object.keys(A).length%Number.MAX_SAFE_INTEGER;t=new Uint8Array(16);var x=new DataView(t.buffer,12,4);x.setUint32(0,l),A[this.uri]=t}this.keyId=t}return this},h}();function g(h){for(var p=new Uint8Array(16),u=12;u<16;u++)p[u]=h>>8*(15-u)&255;return p}},"./src/loader/load-stats.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{LoadStats:()=>C});var C=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>i});var C=L("./src/polyfills/number.ts"),P=L("./node_modules/url-toolkit/src/url-toolkit.js"),M=L.n(P),e=L("./src/loader/date-range.ts"),I=L("./src/loader/fragment.ts"),A=L("./src/loader/level-details.ts"),f=L("./src/loader/level-key.ts"),g=L("./src/utils/attr-list.ts"),h=L("./src/utils/logger.ts"),p=L("./src/utils/codecs.ts");function u(){return u=Object.assign?Object.assign.bind():function(w){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(w[t]=n[t])}return w},u.apply(this,arguments)}var v=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+|#EXT-X-SESSION-KEY:([^\n\r]*)[\r\n]+/g,m=/#EXT-X-MEDIA:(.*)/g,o=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),a=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),i=function(){function w(){}return w.findGroup=function(n,t){for(var l=0;l<n.length;l++){var x=n[l];if(x.id===t)return x}},w.convertAVC1ToAVCOTI=function(n){var t=n.split(".");if(t.length>2){var l=t.shift()+".";return l+=parseInt(t.shift()).toString(16),l+=("000"+parseInt(t.shift()).toString(16)).slice(-4),l}return n},w.resolve=function(n,t){return(0,P.buildAbsoluteURL)(t,n,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(n,t){var l=[],x=[],y={},c=[],_=!1;v.lastIndex=0;for(var D;(D=v.exec(n))!=null;)if(D[1]){var O,k=new g.AttrList(D[1]),F={attrs:k,bitrate:k.decimalInteger("AVERAGE-BANDWIDTH")||k.decimalInteger("BANDWIDTH"),name:k.NAME,url:w.resolve(D[2],t)},G=k.decimalResolution("RESOLUTION");G&&(F.width=G.width,F.height=G.height),E((k.CODECS||"").split(/[ ,]+/).filter(function(ie){return ie}),F),F.videoCodec&&F.videoCodec.indexOf("avc1")!==-1&&(F.videoCodec=w.convertAVC1ToAVCOTI(F.videoCodec)),(O=F.unknownCodecs)!==null&&O!==void 0&&O.length||x.push(F),l.push(F)}else if(D[3]){var H=new g.AttrList(D[3]);H["DATA-ID"]&&(_=!0,y[H["DATA-ID"]]=H)}else if(D[4]){var j=D[4],Q=s(j,t);Q.encrypted&&Q.isSupported()?c.push(Q):h.logger.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+j+'"')}var ee=x.length>0&&x.length<l.length;return{levels:ee?x:l,sessionData:_?y:null,sessionKeys:c.length?c:null}},w.parseMasterPlaylistMedia=function(n,t,l,x){x===void 0&&(x=[]);var y,c=[],_=0;for(m.lastIndex=0;(y=m.exec(n))!==null;){var D=new g.AttrList(y[1]);if(D.TYPE===l){var O={attrs:D,bitrate:0,id:_++,groupId:D["GROUP-ID"],instreamId:D["INSTREAM-ID"],name:D.NAME||D.LANGUAGE||"",type:l,default:D.bool("DEFAULT"),autoselect:D.bool("AUTOSELECT"),forced:D.bool("FORCED"),lang:D.LANGUAGE,url:D.URI?w.resolve(D.URI,t):""};if(x.length){var k=w.findGroup(x,O.groupId)||x[0];b(O,k,"audioCodec"),b(O,k,"textCodec")}c.push(O)}}return c},w.parseLevelPlaylist=function(n,t,l,x,y){var c=new A.LevelDetails(t),_=c.fragments,D=null,O=0,k=0,F=0,G=0,H=null,j=new I.Fragment(x,t),Q,ee,ie,se=-1,le=!1;for(o.lastIndex=0,c.m3u8=n;(Q=o.exec(n))!==null;){le&&(le=!1,j=new I.Fragment(x,t),j.start=F,j.sn=O,j.cc=G,j.level=l,D&&(j.initSegment=D,j.rawProgramDateTime=D.rawProgramDateTime,D.rawProgramDateTime=null));var xe=Q[1];if(xe){j.duration=parseFloat(xe);var Re=(" "+Q[2]).slice(1);j.title=Re||null,j.tagList.push(Re?["INF",xe,Re]:["INF",xe])}else if(Q[3])(0,C.isFiniteNumber)(j.duration)&&(j.start=F,ie&&S(j,ie,c),j.sn=O,j.level=l,j.cc=G,j.urlId=y,_.push(j),j.relurl=(" "+Q[3]).slice(1),T(j,H),H=j,F+=j.duration,O++,k=0,le=!0);else if(Q[4]){var Ee=(" "+Q[4]).slice(1);H?j.setByteRange(Ee,H):j.setByteRange(Ee)}else if(Q[5])j.rawProgramDateTime=(" "+Q[5]).slice(1),j.tagList.push(["PROGRAM-DATE-TIME",j.rawProgramDateTime]),se===-1&&(se=_.length);else{if(Q=Q[0].match(a),!Q){h.logger.warn("No matches on slow regex match for level playlist!");continue}for(ee=1;ee<Q.length&&typeof Q[ee]=="undefined";ee++);var he=(" "+Q[ee]).slice(1),be=(" "+Q[ee+1]).slice(1),Ce=Q[ee+2]?(" "+Q[ee+2]).slice(1):"";switch(he){case"PLAYLIST-TYPE":c.type=be.toUpperCase();break;case"MEDIA-SEQUENCE":O=c.startSN=parseInt(be);break;case"SKIP":{var Ue=new g.AttrList(be),$e=Ue.decimalInteger("SKIPPED-SEGMENTS");if((0,C.isFiniteNumber)($e)){c.skippedSegments=$e;for(var z=$e;z--;)_.unshift(null);O+=$e}var ne=Ue.enumeratedString("RECENTLY-REMOVED-DATERANGES");ne&&(c.recentlyRemovedDateranges=ne.split(" "));break}case"TARGETDURATION":c.targetduration=parseFloat(be);break;case"VERSION":c.version=parseInt(be);break;case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"#":(be||Ce)&&j.tagList.push(Ce?[be,Ce]:[be]);break;case"DISCONTINUITY":G++,j.tagList.push(["DIS"]);break;case"GAP":j.tagList.push([he]);break;case"BITRATE":j.tagList.push([he,be]);break;case"DATERANGE":{var de=new g.AttrList(be),ge=new e.DateRange(de,c.dateRanges[de.ID]);ge.isValid||c.skippedSegments?c.dateRanges[ge.id]=ge:h.logger.warn('Ignoring invalid DATERANGE tag: "'+be+'"'),j.tagList.push(["EXT-X-DATERANGE",be]);break}case"DISCONTINUITY-SEQUENCE":G=parseInt(be);break;case"KEY":{var Ae=s(be,t);if(Ae.isSupported()){if(Ae.method==="NONE"){ie=void 0;break}ie||(ie={}),ie[Ae.keyFormat]&&(ie=u({},ie)),ie[Ae.keyFormat]=Ae}else h.logger.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+be+'"');break}case"START":{var Ve=new g.AttrList(be),xt=Ve.decimalFloatingPoint("TIME-OFFSET");(0,C.isFiniteNumber)(xt)&&(c.startTimeOffset=xt);break}case"MAP":{var Je=new g.AttrList(be);if(j.duration){var pt=new I.Fragment(x,t);R(pt,Je,l,ie),D=pt,j.initSegment=D,D.rawProgramDateTime&&!j.rawProgramDateTime&&(j.rawProgramDateTime=D.rawProgramDateTime)}else R(j,Je,l,ie),D=j,le=!0;break}case"SERVER-CONTROL":{var St=new g.AttrList(be);c.canBlockReload=St.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=St.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&St.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=St.optionalFloat("PART-HOLD-BACK",0),c.holdBack=St.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var er=new g.AttrList(be);c.partTarget=er.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ne=c.partList;Ne||(Ne=c.partList=[]);var Fe=k>0?Ne[Ne.length-1]:void 0,We=k++,Be=new I.Part(new g.AttrList(be),j,t,We,Fe);Ne.push(Be),j.duration+=Be.duration;break}case"PRELOAD-HINT":{var _e=new g.AttrList(be);c.preloadHint=_e;break}case"RENDITION-REPORT":{var ht=new g.AttrList(be);c.renditionReports=c.renditionReports||[],c.renditionReports.push(ht);break}default:h.logger.warn("line parsed but not handled: "+Q);break}}}H&&!H.relurl?(_.pop(),F-=H.duration,c.partList&&(c.fragmentHint=H)):c.partList&&(T(j,H),j.cc=G,c.fragmentHint=j,ie&&S(j,ie,c));var Ze=_.length,At=_[0],yt=_[Ze-1];if(F+=c.skippedSegments*c.targetduration,F>0&&Ze&&yt){c.averagetargetduration=F/Ze;var tt=yt.sn;c.endSN=tt!=="initSegment"?tt:0,c.live||(yt.endList=!0),At&&(c.startCC=At.cc)}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(F+=c.fragmentHint.duration),c.totalduration=F,c.endCC=G,se>0&&d(_,se),c},w}();function s(w,r){var n,t,l=new g.AttrList(w),x=(n=l.enumeratedString("METHOD"))!=null?n:"",y=l.URI,c=l.hexadecimalInteger("IV"),_=l.enumeratedString("KEYFORMATVERSIONS"),D=(t=l.enumeratedString("KEYFORMAT"))!=null?t:"identity";y&&l.IV&&!c&&h.logger.error("Invalid IV: "+l.IV);var O=y?i.resolve(y,r):"",k=(_||"1").split("/").map(Number).filter(Number.isFinite);return new f.LevelKey(x,O,D,k,c)}function E(w,r){["video","audio","text"].forEach(function(n){var t=w.filter(function(x){return(0,p.isCodecType)(x,n)});if(t.length){var l=t.filter(function(x){return x.lastIndexOf("avc1",0)===0||x.lastIndexOf("mp4a",0)===0});r[n+"Codec"]=l.length>0?l[0]:t[0],w=w.filter(function(x){return t.indexOf(x)===-1})}}),r.unknownCodecs=w}function b(w,r,n){var t=r[n];t&&(w[n]=t)}function d(w,r){for(var n=w[r],t=r;t--;){var l=w[t];if(!l)return;l.programDateTime=n.programDateTime-l.duration*1e3,n=l}}function T(w,r){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):r!=null&&r.programDateTime&&(w.programDateTime=r.endProgramDateTime),(0,C.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}function R(w,r,n,t){w.relurl=r.URI,r.BYTERANGE&&w.setByteRange(r.BYTERANGE),w.level=n,w.sn="initSegment",t&&(w.levelkeys=t),w.initSegment=null}function S(w,r,n){w.levelkeys=r;var t=n.encryptedFragments;(!t.length||t[t.length-1].levelkeys!==r)&&Object.keys(r).some(function(l){return r[l].isCommonEncryption})&&t.push(w)}},"./src/loader/playlist-loader.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>u});var C=L("./src/polyfills/number.ts"),P=L("./src/events.ts"),M=L("./src/errors.ts"),e=L("./src/utils/logger.ts"),I=L("./src/loader/m3u8-parser.ts"),A=L("./src/types/loader.ts"),f=L("./src/utils/attr-list.ts");function g(v){var m=v.type;switch(m){case A.PlaylistContextType.AUDIO_TRACK:return A.PlaylistLevelType.AUDIO;case A.PlaylistContextType.SUBTITLE_TRACK:return A.PlaylistLevelType.SUBTITLE;default:return A.PlaylistLevelType.MAIN}}function h(v,m){var o=v.url;return(o===void 0||o.indexOf("data:")===0)&&(o=m.url),o}var p=function(){function v(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var m=v.prototype;return m.startLoad=function(a){},m.stopLoad=function(){this.destroyInternalLoaders()},m.registerListeners=function(){var a=this.hls;a.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},m.unregisterListeners=function(){var a=this.hls;a.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},m.createInternalLoader=function(a){var i=this.hls.config,s=i.pLoader,E=i.loader,b=s||E,d=new b(i);return a.loader=d,this.loaders[a.type]=d,d},m.getInternalLoader=function(a){return this.loaders[a.type]},m.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},m.destroyInternalLoaders=function(){for(var a in this.loaders){var i=this.loaders[a];i&&i.destroy(),this.resetInternalLoader(a)}},m.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},m.onManifestLoading=function(a,i){var s=i.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:A.PlaylistContextType.MANIFEST,url:s,deliveryDirectives:null})},m.onLevelLoading=function(a,i){var s=i.id,E=i.level,b=i.url,d=i.deliveryDirectives;this.load({id:s,groupId:null,level:E,responseType:"text",type:A.PlaylistContextType.LEVEL,url:b,deliveryDirectives:d})},m.onAudioTrackLoading=function(a,i){var s=i.id,E=i.groupId,b=i.url,d=i.deliveryDirectives;this.load({id:s,groupId:E,level:null,responseType:"text",type:A.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:d})},m.onSubtitleTrackLoading=function(a,i){var s=i.id,E=i.groupId,b=i.url,d=i.deliveryDirectives;this.load({id:s,groupId:E,level:null,responseType:"text",type:A.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:d})},m.load=function(a){var i,s=this.hls.config,E=this.getInternalLoader(a);if(E){var b=E.context;if(b&&b.url===a.url){e.logger.trace("[playlist-loader]: playlist request ongoing");return}e.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),E.abort()}var d,T,R,S;switch(a.type){case A.PlaylistContextType.MANIFEST:d=s.manifestLoadingMaxRetry,T=s.manifestLoadingTimeOut,R=s.manifestLoadingRetryDelay,S=s.manifestLoadingMaxRetryTimeout;break;case A.PlaylistContextType.LEVEL:case A.PlaylistContextType.AUDIO_TRACK:case A.PlaylistContextType.SUBTITLE_TRACK:d=0,T=s.levelLoadingTimeOut;break;default:d=s.levelLoadingMaxRetry,T=s.levelLoadingTimeOut,R=s.levelLoadingRetryDelay,S=s.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(a),(i=a.deliveryDirectives)!==null&&i!==void 0&&i.part){var w;if(a.type===A.PlaylistContextType.LEVEL&&a.level!==null?w=this.hls.levels[a.level].details:a.type===A.PlaylistContextType.AUDIO_TRACK&&a.id!==null?w=this.hls.audioTracks[a.id].details:a.type===A.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(w=this.hls.subtitleTracks[a.id].details),w){var r=w.partTarget,n=w.targetduration;r&&n&&(T=Math.min(Math.max(r*3,n*.8)*1e3,T))}}var t={timeout:T,maxRetry:d,retryDelay:R,maxRetryDelay:S,highWaterMark:0},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(a,t,l)},m.loadsuccess=function(a,i,s,E){E===void 0&&(E=null),this.resetInternalLoader(s.type);var b=a.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,s,"no EXTM3U delimiter",E);return}i.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,i,s,E):this.handleMasterPlaylist(a,i,s,E)},m.loaderror=function(a,i,s){s===void 0&&(s=null),this.handleNetworkError(i,s,!1,a)},m.loadtimeout=function(a,i,s){s===void 0&&(s=null),this.handleNetworkError(i,s,!0)},m.handleMasterPlaylist=function(a,i,s,E){var b=this.hls,d=a.data,T=h(a,s),R=I.default.parseMasterPlaylist(d,T),S=R.levels,w=R.sessionData,r=R.sessionKeys;if(!S.length){this.handleManifestParsingError(a,s,"no level found in manifest",E);return}var n=S.map(function(_){return{id:_.attrs.AUDIO,audioCodec:_.audioCodec}}),t=S.map(function(_){return{id:_.attrs.SUBTITLES,textCodec:_.textCodec}}),l=I.default.parseMasterPlaylistMedia(d,T,"AUDIO",n),x=I.default.parseMasterPlaylistMedia(d,T,"SUBTITLES",t),y=I.default.parseMasterPlaylistMedia(d,T,"CLOSED-CAPTIONS");if(l.length){var c=l.some(function(_){return!_.url});!c&&S[0].audioCodec&&!S[0].attrs.AUDIO&&(e.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),l.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new f.AttrList({}),bitrate:0,url:""}))}b.trigger(P.Events.MANIFEST_LOADED,{levels:S,audioTracks:l,subtitles:x,captions:y,url:T,stats:i,networkDetails:E,sessionData:w,sessionKeys:r})},m.handleTrackOrLevelPlaylist=function(a,i,s,E){var b=this.hls,d=s.id,T=s.level,R=s.type,S=h(a,s),w=(0,C.isFiniteNumber)(d)?d:0,r=(0,C.isFiniteNumber)(T)?T:w,n=g(s),t=I.default.parseLevelPlaylist(a.data,S,r,n,w);if(!t.fragments.length){b.trigger(P.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:S,reason:"no fragments found in level",level:typeof s.level=="number"?s.level:void 0});return}if(R===A.PlaylistContextType.MANIFEST){var l={attrs:new f.AttrList({}),bitrate:0,details:t,name:"",url:S};b.trigger(P.Events.MANIFEST_LOADED,{levels:[l],audioTracks:[],url:S,stats:i,networkDetails:E,sessionData:null,sessionKeys:null})}i.parsing.end=performance.now(),s.levelDetails=t,this.handlePlaylistLoaded(a,i,s,E)},m.handleManifestParsingError=function(a,i,s,E){this.hls.trigger(P.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:i.type===A.PlaylistContextType.MANIFEST,url:a.url,reason:s,response:a,context:i,networkDetails:E})},m.handleNetworkError=function(a,i,s,E){s===void 0&&(s=!1),e.logger.warn("[playlist-loader]: A network "+(s?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var b=M.ErrorDetails.UNKNOWN,d=!1,T=this.getInternalLoader(a);switch(a.type){case A.PlaylistContextType.MANIFEST:b=s?M.ErrorDetails.MANIFEST_LOAD_TIMEOUT:M.ErrorDetails.MANIFEST_LOAD_ERROR,d=!0;break;case A.PlaylistContextType.LEVEL:b=s?M.ErrorDetails.LEVEL_LOAD_TIMEOUT:M.ErrorDetails.LEVEL_LOAD_ERROR,d=!1;break;case A.PlaylistContextType.AUDIO_TRACK:b=s?M.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:M.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,d=!1;break;case A.PlaylistContextType.SUBTITLE_TRACK:b=s?M.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:M.ErrorDetails.SUBTITLE_LOAD_ERROR,d=!1;break}T&&this.resetInternalLoader(a.type);var R={type:M.ErrorTypes.NETWORK_ERROR,details:b,fatal:d,url:a.url,loader:T,context:a,networkDetails:i};E&&(R.response=E),this.hls.trigger(P.Events.ERROR,R)},m.handlePlaylistLoaded=function(a,i,s,E){var b=s.type,d=s.level,T=s.id,R=s.groupId,S=s.loader,w=s.levelDetails,r=s.deliveryDirectives;if(!(w!=null&&w.targetduration)){this.handleManifestParsingError(a,s,"invalid target duration",E);return}if(S)switch(w.live&&(S.getCacheAge&&(w.ageHeader=S.getCacheAge()||0),(!S.getCacheAge||isNaN(w.ageHeader))&&(w.ageHeader=0)),b){case A.PlaylistContextType.MANIFEST:case A.PlaylistContextType.LEVEL:this.hls.trigger(P.Events.LEVEL_LOADED,{details:w,level:d||0,id:T||0,stats:i,networkDetails:E,deliveryDirectives:r});break;case A.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:w,id:T||0,groupId:R||"",stats:i,networkDetails:E,deliveryDirectives:r});break;case A.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:w,id:T||0,groupId:R||"",stats:i,networkDetails:E,deliveryDirectives:r});break}},v}();const u=p},"./src/polyfills/number.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{MAX_SAFE_INTEGER:()=>P,isFiniteNumber:()=>C});var C=Number.isFinite||function(M){return typeof M=="number"&&isFinite(M)},P=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>P});var C=function(){function M(){}return M.getSilentFrame=function(I,A){switch(I){case"mp4a.40.2":if(A===1)return new Uint8Array([0,200,0,128,35,128]);if(A===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(A===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(A===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(A===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(A===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(A===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(A===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(A===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}},M}();const P=C},"./src/remux/mp4-generator.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>M});var C=Math.pow(2,32)-1,P=function(){function e(){}return e.init=function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var A;for(A in e.types)e.types.hasOwnProperty(A)&&(e.types[A]=[A.charCodeAt(0),A.charCodeAt(1),A.charCodeAt(2),A.charCodeAt(3)]);var f=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),g=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:f,audio:g};var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),p=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=p,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),v=new Uint8Array([97,118,99,49]),m=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,u,m,u,v),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,h))},e.box=function(A){for(var f=8,g=arguments.length,h=new Array(g>1?g-1:0),p=1;p<g;p++)h[p-1]=arguments[p];for(var u=h.length,v=u;u--;)f+=h[u].byteLength;var m=new Uint8Array(f);for(m[0]=f>>24&255,m[1]=f>>16&255,m[2]=f>>8&255,m[3]=f&255,m.set(A,4),u=0,f=8;u<v;u++)m.set(h[u],f),f+=h[u].byteLength;return m},e.hdlr=function(A){return e.box(e.types.hdlr,e.HDLR_TYPES[A])},e.mdat=function(A){return e.box(e.types.mdat,A)},e.mdhd=function(A,f){f*=A;var g=Math.floor(f/(C+1)),h=Math.floor(f%(C+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,A>>24&255,A>>16&255,A>>8&255,A&255,g>>24,g>>16&255,g>>8&255,g&255,h>>24,h>>16&255,h>>8&255,h&255,85,196,0,0]))},e.mdia=function(A){return e.box(e.types.mdia,e.mdhd(A.timescale,A.duration),e.hdlr(A.type),e.minf(A))},e.mfhd=function(A){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,A>>24,A>>16&255,A>>8&255,A&255]))},e.minf=function(A){return A.type==="audio"?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(A)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(A))},e.moof=function(A,f,g){return e.box(e.types.moof,e.mfhd(A),e.traf(g,f))},e.moov=function(A){for(var f=A.length,g=[];f--;)g[f]=e.trak(A[f]);return e.box.apply(null,[e.types.moov,e.mvhd(A[0].timescale,A[0].duration)].concat(g).concat(e.mvex(A)))},e.mvex=function(A){for(var f=A.length,g=[];f--;)g[f]=e.trex(A[f]);return e.box.apply(null,[e.types.mvex].concat(g))},e.mvhd=function(A,f){f*=A;var g=Math.floor(f/(C+1)),h=Math.floor(f%(C+1)),p=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,A>>24&255,A>>16&255,A>>8&255,A&255,g>>24,g>>16&255,g>>8&255,g&255,h>>24,h>>16&255,h>>8&255,h&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,p)},e.sdtp=function(A){var f=A.samples||[],g=new Uint8Array(4+f.length),h,p;for(h=0;h<f.length;h++)p=f[h].flags,g[h+4]=p.dependsOn<<4|p.isDependedOn<<2|p.hasRedundancy;return e.box(e.types.sdtp,g)},e.stbl=function(A){return e.box(e.types.stbl,e.stsd(A),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(A){var f=[],g=[],h,p,u;for(h=0;h<A.sps.length;h++)p=A.sps[h],u=p.byteLength,f.push(u>>>8&255),f.push(u&255),f=f.concat(Array.prototype.slice.call(p));for(h=0;h<A.pps.length;h++)p=A.pps[h],u=p.byteLength,g.push(u>>>8&255),g.push(u&255),g=g.concat(Array.prototype.slice.call(p));var v=e.box(e.types.avcC,new Uint8Array([1,f[3],f[4],f[5],255,224|A.sps.length].concat(f).concat([A.pps.length]).concat(g))),m=A.width,o=A.height,a=A.pixelRatio[0],i=A.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,m>>8&255,m&255,o>>8&255,o&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),v,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([a>>24,a>>16&255,a>>8&255,a&255,i>>24,i>>16&255,i>>8&255,i&255])))},e.esds=function(A){var f=A.config.length;return new Uint8Array([0,0,0,0,3,23+f,0,1,0,4,15+f,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([f]).concat(A.config).concat([6,1,2]))},e.mp4a=function(A){var f=A.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,A.channelCount,0,16,0,0,0,0,f>>8&255,f&255,0,0]),e.box(e.types.esds,e.esds(A)))},e.mp3=function(A){var f=A.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,A.channelCount,0,16,0,0,0,0,f>>8&255,f&255,0,0]))},e.stsd=function(A){return A.type==="audio"?A.segmentCodec==="mp3"&&A.codec==="mp3"?e.box(e.types.stsd,e.STSD,e.mp3(A)):e.box(e.types.stsd,e.STSD,e.mp4a(A)):e.box(e.types.stsd,e.STSD,e.avc1(A))},e.tkhd=function(A){var f=A.id,g=A.duration*A.timescale,h=A.width,p=A.height,u=Math.floor(g/(C+1)),v=Math.floor(g%(C+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,f>>24&255,f>>16&255,f>>8&255,f&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,v>>24,v>>16&255,v>>8&255,v&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,h>>8&255,h&255,0,0,p>>8&255,p&255,0,0]))},e.traf=function(A,f){var g=e.sdtp(A),h=A.id,p=Math.floor(f/(C+1)),u=Math.floor(f%(C+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,u>>24,u>>16&255,u>>8&255,u&255])),e.trun(A,g.length+16+20+8+16+8+8),g)},e.trak=function(A){return A.duration=A.duration||4294967295,e.box(e.types.trak,e.tkhd(A),e.mdia(A))},e.trex=function(A){var f=A.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(A,f){var g=A.samples||[],h=g.length,p=12+16*h,u=new Uint8Array(p),v,m,o,a,i,s;for(f+=8+p,u.set([A.type==="video"?1:0,0,15,1,h>>>24&255,h>>>16&255,h>>>8&255,h&255,f>>>24&255,f>>>16&255,f>>>8&255,f&255],0),v=0;v<h;v++)m=g[v],o=m.duration,a=m.size,i=m.flags,s=m.cts,u.set([o>>>24&255,o>>>16&255,o>>>8&255,o&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&61440,i.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*v);return e.box(e.types.trun,u)},e.initSegment=function(A){e.types||e.init();var f=e.moov(A),g=new Uint8Array(e.FTYP.byteLength+f.byteLength);return g.set(e.FTYP),g.set(f,e.FTYP.byteLength),g},e}();P.types=void 0,P.HDLR_TYPES=void 0,P.STTS=void 0,P.STSC=void 0,P.STCO=void 0,P.STSZ=void 0,P.VMHD=void 0,P.SMHD=void 0,P.STSD=void 0,P.FTYP=void 0,P.DINF=void 0;const M=P},"./src/remux/mp4-remuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>a,flushTextTrackMetadataCueSamples:()=>E,flushTextTrackUserdataCueSamples:()=>b,normalizePts:()=>i});var C=L("./src/polyfills/number.ts"),P=L("./src/remux/aac-helper.ts"),M=L("./src/remux/mp4-generator.ts"),e=L("./src/events.ts"),I=L("./src/errors.ts"),A=L("./src/utils/logger.ts"),f=L("./src/types/loader.ts"),g=L("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign?Object.assign.bind():function(R){for(var S=1;S<arguments.length;S++){var w=arguments[S];for(var r in w)Object.prototype.hasOwnProperty.call(w,r)&&(R[r]=w[r])}return R},h.apply(this,arguments)}var p=10*1e3,u=1024,v=1152,m=null,o=null,a=function(){function R(w,r,n,t){if(t===void 0&&(t=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=w,this.config=r,this.typeSupported=n,this.ISGenerated=!1,m===null){var l=navigator.userAgent||"",x=l.match(/Chrome\/(\d+)/i);m=x?parseInt(x[1]):0}if(o===null){var y=navigator.userAgent.match(/Safari\/(\d+)/i);o=y?parseInt(y[1]):0}}var S=R.prototype;return S.destroy=function(){},S.resetTimeStamp=function(r){A.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=r},S.resetNextTimestamp=function(){A.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},S.resetInitSegment=function(){A.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},S.getVideoStartPts=function(r){var n=!1,t=r.reduce(function(l,x){var y=x.pts-l;return y<-4294967296?(n=!0,i(l,x.pts)):y>0?l:x.pts},r[0].pts);return n&&A.logger.debug("PTS rollover detected"),t},S.remux=function(r,n,t,l,x,y,c,_){var D,O,k,F,G,H,j=x,Q=x,ee=r.pid>-1,ie=n.pid>-1,se=n.samples.length,le=r.samples.length>0,xe=c&&se>0||se>1,Re=(!ee||le)&&(!ie||xe)||this.ISGenerated||c;if(Re){this.ISGenerated||(k=this.generateIS(r,n,x));var Ee=this.isVideoContiguous,he=-1,be;if(xe&&(he=s(n.samples),!Ee&&this.config.forceKeyFrameOnDiscontinuity))if(H=!0,he>0){A.logger.warn("[mp4-remuxer]: Dropped "+he+" out of "+se+" video samples due to a missing keyframe");var Ce=this.getVideoStartPts(n.samples);n.samples=n.samples.slice(he),n.dropped+=he,Q+=(n.samples[0].pts-Ce)/n.inputTimeScale,be=Q}else he===-1&&(A.logger.warn("[mp4-remuxer]: No keyframe found out of "+se+" video samples"),H=!1);if(this.ISGenerated){if(le&&xe){var Ue=this.getVideoStartPts(n.samples),$e=i(r.samples[0].pts,Ue)-Ue,z=$e/n.inputTimeScale;j+=Math.max(0,z),Q+=Math.max(0,-z)}if(le){if(r.samplerate||(A.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),k=this.generateIS(r,n,x)),O=this.remuxAudio(r,j,this.isAudioContiguous,y,ie||xe||_===f.PlaylistLevelType.AUDIO?Q:void 0),xe){var ne=O?O.endPTS-O.startPTS:0;n.inputTimeScale||(A.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),k=this.generateIS(r,n,x)),D=this.remuxVideo(n,Q,Ee,ne)}}else xe&&(D=this.remuxVideo(n,Q,Ee,0));D&&(D.firstKeyFrame=he,D.independent=he!==-1,D.firstKeyFramePTS=be)}}return this.ISGenerated&&(t.samples.length&&(G=E(t,x,this._initPTS,this._initDTS)),l.samples.length&&(F=b(l,x,this._initPTS))),{audio:O,video:D,initSegment:k,independent:H,text:F,id3:G}},S.generateIS=function(r,n,t){var l=r.samples,x=n.samples,y=this.typeSupported,c={},_=!(0,C.isFiniteNumber)(this._initPTS),D="audio/mp4",O,k,F;if(_&&(O=k=1/0),r.config&&l.length){switch(r.timescale=r.samplerate,r.segmentCodec){case"mp3":y.mpeg?(D="audio/mpeg",r.codec=""):y.mp3&&(r.codec="mp3");break}c.audio={id:"audio",container:D,codec:r.codec,initSegment:r.segmentCodec==="mp3"&&y.mpeg?new Uint8Array(0):M.default.initSegment([r]),metadata:{channelCount:r.channelCount}},_&&(F=r.inputTimeScale,O=k=l[0].pts-Math.round(F*t))}if(n.sps&&n.pps&&x.length&&(n.timescale=n.inputTimeScale,c.video={id:"main",container:"video/mp4",codec:n.codec,initSegment:M.default.initSegment([n]),metadata:{width:n.width,height:n.height}},_)){F=n.inputTimeScale;var G=this.getVideoStartPts(x),H=Math.round(F*t);k=Math.min(k,i(x[0].dts,G)-H),O=Math.min(O,G-H)}if(Object.keys(c).length)return this.ISGenerated=!0,_&&(this._initPTS=O,this._initDTS=k),{tracks:c,initPTS:O,timescale:F}},S.remuxVideo=function(r,n,t,l){var x=r.inputTimeScale,y=r.samples,c=[],_=y.length,D=this._initPTS,O=this.nextAvcDts,k=8,F=this.videoSampleDuration,G,H,j=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY,ee=!1;if(!t||O===null){var ie=n*x,se=y[0].pts-i(y[0].dts,y[0].pts);O=ie-se}for(var le=0;le<_;le++){var xe=y[le];xe.pts=i(xe.pts-D,O),xe.dts=i(xe.dts-D,O),xe.dts<y[le>0?le-1:le].dts&&(ee=!0)}ee&&y.sort(function(_n,Vr){var Wr=_n.dts-Vr.dts,xn=_n.pts-Vr.pts;return Wr||xn}),G=y[0].dts,H=y[y.length-1].dts;var Re=H-G,Ee=Re?Math.round(Re/(_-1)):F||r.inputTimeScale/30;if(t){var he=G-O,be=he>Ee,Ce=he<-1;if((be||Ce)&&(be?A.logger.warn("AVC: "+(0,g.toMsFromMpegTsClock)(he,!0)+" ms ("+he+"dts) hole between fragments detected, filling it"):A.logger.warn("AVC: "+(0,g.toMsFromMpegTsClock)(-he,!0)+" ms ("+he+"dts) overlapping between fragments detected"),!Ce||O>y[0].pts)){G=O;var Ue=y[0].pts-he;y[0].dts=G,y[0].pts=Ue,A.logger.log("Video: First PTS/DTS adjusted: "+(0,g.toMsFromMpegTsClock)(Ue,!0)+"/"+(0,g.toMsFromMpegTsClock)(G,!0)+", delta: "+(0,g.toMsFromMpegTsClock)(he,!0)+" ms")}}G=Math.max(0,G);for(var $e=0,z=0,ne=0;ne<_;ne++){for(var de=y[ne],ge=de.units,Ae=ge.length,Ve=0,xt=0;xt<Ae;xt++)Ve+=ge[xt].data.length;z+=Ve,$e+=Ae,de.length=Ve,de.dts=Math.max(de.dts,G),j=Math.min(de.pts,j),Q=Math.max(de.pts,Q)}H=y[_-1].dts;var Je=z+4*$e+8,pt;try{pt=new Uint8Array(Je)}catch(_n){this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:I.ErrorTypes.MUX_ERROR,details:I.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Je,reason:"fail allocating video mdat "+Je});return}var St=new DataView(pt.buffer);St.setUint32(0,Je),pt.set(M.default.types.mdat,4);for(var er=!1,Ne=Number.POSITIVE_INFINITY,Fe=Number.POSITIVE_INFINITY,We=Number.NEGATIVE_INFINITY,Be=Number.NEGATIVE_INFINITY,_e=0;_e<_;_e++){for(var ht=y[_e],Ze=ht.units,At=0,yt=0,tt=Ze.length;yt<tt;yt++){var bt=Ze[yt],Ye=bt.data,je=bt.data.byteLength;St.setUint32(k,je),k+=4,pt.set(Ye,k),k+=je,At+=4+je}var it=void 0;if(_e<_-1)F=y[_e+1].dts-ht.dts,it=y[_e+1].pts-ht.pts;else{var Vt=this.config,tr=_e>0?ht.dts-y[_e-1].dts:Ee;if(it=_e>0?ht.pts-y[_e-1].pts:Ee,Vt.stretchShortVideoTrack&&this.nextAudioPts!==null){var or=Math.floor(Vt.maxBufferHole*x),Dr=(l?j+l*x:this.nextAudioPts)-ht.pts;Dr>or?(F=Dr-tr,F<0?F=tr:er=!0,A.logger.log("[mp4-remuxer]: It is approximately "+Dr/90+" ms to the next segment; using duration "+F/90+" ms for the last video frame.")):F=tr}else F=tr}var Yr=Math.round(ht.pts-ht.dts);Ne=Math.min(Ne,F),We=Math.max(We,F),Fe=Math.min(Fe,it),Be=Math.max(Be,it),c.push(new d(ht.key,F,At,Yr))}if(c.length){if(m){if(m<70){var ur=c[0].flags;ur.dependsOn=2,ur.isNonSync=0}}else if(o&&Be-Fe<We-Ne&&Ee/We<.025&&c[0].cts===0){A.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var qr=G,cr=0,Hr=c.length;cr<Hr;cr++){var mn=qr+c[cr].duration,En=qr+c[cr].cts;if(cr<Hr-1){var Tn=mn+c[cr+1].cts;c[cr].duration=Tn-En}else c[cr].duration=cr?c[cr-1].duration:Ee;c[cr].cts=0,qr=mn}}}console.assert(F!==null,"mp4SampleDuration must be computed"),F=er||!F?Ee:F,this.nextAvcDts=O=H+F,this.videoSampleDuration=F,this.isVideoContiguous=!0;var Cr=M.default.moof(r.sequenceNumber++,G,h({},r,{samples:c})),Ke="video",Kr={data1:Cr,data2:pt,startPTS:j/x,endPTS:(Q+F)/x,startDTS:G/x,endDTS:O/x,type:Ke,hasAudio:!1,hasVideo:!0,nb:c.length,dropped:r.dropped};return r.samples=[],r.dropped=0,console.assert(pt.length,"MDAT length must not be zero"),Kr},S.remuxAudio=function(r,n,t,l,x){var y=r.inputTimeScale,c=r.samplerate?r.samplerate:y,_=y/c,D=r.segmentCodec==="aac"?u:v,O=D*_,k=this._initPTS,F=r.segmentCodec==="mp3"&&this.typeSupported.mpeg,G=[],H=x!==void 0,j=r.samples,Q=F?0:8,ee=this.nextAudioPts||-1,ie=n*y;if(this.isAudioContiguous=t=t||j.length&&ee>0&&(l&&Math.abs(ie-ee)<9e3||Math.abs(i(j[0].pts-k,ie)-ee)<20*O),j.forEach(function(bt){bt.pts=i(bt.pts-k,ie)}),!t||ee<0){if(j=j.filter(function(bt){return bt.pts>=0}),!j.length)return;x===0?ee=0:l&&!H?ee=Math.max(0,ie):ee=j[0].pts}if(r.segmentCodec==="aac")for(var se=this.config.maxAudioFramesDrift,le=0,xe=ee;le<j.length;le++){var Re=j[le],Ee=Re.pts,he=Ee-xe,be=Math.abs(1e3*he/y);if(he<=-se*O&&H)le===0&&(A.logger.warn("Audio frame @ "+(Ee/y).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*he/y)+" ms."),this.nextAudioPts=ee=xe=Ee);else if(he>=se*O&&be<p&&H){var Ce=Math.round(he/O);xe=Ee-Ce*O,xe<0&&(Ce--,xe+=O),le===0&&(this.nextAudioPts=ee=xe),A.logger.warn("[mp4-remuxer]: Injecting "+Ce+" audio frame @ "+(xe/y).toFixed(3)+"s due to "+Math.round(1e3*he/y)+" ms gap.");for(var Ue=0;Ue<Ce;Ue++){var $e=Math.max(xe,0),z=P.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);z||(A.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),z=Re.unit.subarray()),j.splice(le,0,{unit:z,pts:$e}),xe+=O,le++}}Re.pts=xe,xe+=O}for(var ne=null,de=null,ge,Ae=0,Ve=j.length;Ve--;)Ae+=j[Ve].unit.byteLength;for(var xt=0,Je=j.length;xt<Je;xt++){var pt=j[xt],St=pt.unit,er=pt.pts;if(de!==null){var Ne=G[xt-1];Ne.duration=Math.round((er-de)/_)}else if(t&&r.segmentCodec==="aac"&&(er=ee),ne=er,Ae>0){Ae+=Q;try{ge=new Uint8Array(Ae)}catch(bt){this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:I.ErrorTypes.MUX_ERROR,details:I.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ae,reason:"fail allocating audio mdat "+Ae});return}if(!F){var Fe=new DataView(ge.buffer);Fe.setUint32(0,Ae),ge.set(M.default.types.mdat,4)}}else return;ge.set(St,Q);var We=St.byteLength;Q+=We,G.push(new d(!0,D,We,0)),de=er}var Be=G.length;if(Be){var _e=G[G.length-1];this.nextAudioPts=ee=de+_*_e.duration;var ht=F?new Uint8Array(0):M.default.moof(r.sequenceNumber++,ne/_,h({},r,{samples:G}));r.samples=[];var Ze=ne/y,At=ee/y,yt="audio",tt={data1:ht,data2:ge,startPTS:Ze,endPTS:At,startDTS:Ze,endDTS:At,type:yt,hasAudio:!0,hasVideo:!1,nb:Be};return this.isAudioContiguous=!0,console.assert(ge.length,"MDAT length must not be zero"),tt}},S.remuxEmptyAudio=function(r,n,t,l){var x=r.inputTimeScale,y=r.samplerate?r.samplerate:x,c=x/y,_=this.nextAudioPts,D=(_!==null?_:l.startDTS*x)+this._initDTS,O=l.endDTS*x+this._initDTS,k=c*u,F=Math.ceil((O-D)/k),G=P.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);if(A.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){A.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var H=[],j=0;j<F;j++){var Q=D+j*k;H.push({unit:G,pts:Q,dts:Q})}return r.samples=H,this.remuxAudio(r,n,t,!1)},R}();function i(R,S){var w;if(S===null)return R;for(S<R?w=-8589934592:w=8589934592;Math.abs(R-S)>4294967296;)R+=w;return R}function s(R){for(var S=0;S<R.length;S++)if(R[S].key)return S;return-1}function E(R,S,w,r){var n=R.samples.length;if(n){for(var t=R.inputTimeScale,l=0;l<n;l++){var x=R.samples[l];x.pts=i(x.pts-w,S*t)/t,x.dts=i(x.dts-r,S*t)/t}var y=R.samples;return R.samples=[],{samples:y}}}function b(R,S,w){var r=R.samples.length;if(r){for(var n=R.inputTimeScale,t=0;t<r;t++){var l=R.samples[t];l.pts=i(l.pts-w,S*n)/n}R.samples.sort(function(y,c){return y.pts-c.pts});var x=R.samples;return R.samples=[],{samples:x}}}var d=function(S,w,r,n){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=w,this.size=r,this.cts=n,this.flags=new T(S)},T=function(S){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=S?2:1,this.isNonSync=S?0:1}},"./src/remux/passthrough-remuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>g});var C=L("./src/polyfills/number.ts"),P=L("./src/remux/mp4-remuxer.ts"),M=L("./src/utils/mp4-tools.ts"),e=L("./src/loader/fragment.ts"),I=L("./src/utils/logger.ts"),A=function(){function h(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndTime=null}var p=h.prototype;return p.destroy=function(){},p.resetTimeStamp=function(v){this.initPTS=v,this.lastEndTime=null},p.resetNextTimestamp=function(){this.lastEndTime=null},p.resetInitSegment=function(v,m,o,a){this.audioCodec=m,this.videoCodec=o,this.generateInitSegment((0,M.patchEncyptionData)(v,a)),this.emitInitSegment=!0},p.generateInitSegment=function(v){var m=this.audioCodec,o=this.videoCodec;if(!v||!v.byteLength){this.initTracks=void 0,this.initData=void 0;return}var a=this.initData=(0,M.parseInitSegment)(v);m||(m=f(a.audio,e.ElementaryStreamTypes.AUDIO)),o||(o=f(a.video,e.ElementaryStreamTypes.VIDEO));var i={};a.audio&&a.video?i.audiovideo={container:"video/mp4",codec:m+","+o,initSegment:v,id:"main"}:a.audio?i.audio={container:"audio/mp4",codec:m,initSegment:v,id:"audio"}:a.video?i.video={container:"video/mp4",codec:o,initSegment:v,id:"main"}:I.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},p.remux=function(v,m,o,a,i){var s,E=this.initPTS,b=this.lastEndTime,d={audio:void 0,video:void 0,text:a,id3:o,initSegment:void 0};(0,C.isFiniteNumber)(b)||(b=this.lastEndTime=i||0);var T=m.samples;if(!T||!T.length)return d;var R={initPTS:void 0,timescale:1},S=this.initData;if((!S||!S.length)&&(this.generateInitSegment(T),S=this.initData),!S||!S.length)return I.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(R.tracks=this.initTracks,this.emitInitSegment=!1);var w=(0,M.getStartDTS)(S,T);(0,C.isFiniteNumber)(E)||(this.initPTS=R.initPTS=E=w-i);var r=(0,M.getDuration)(T,S),n=v?w-E:b,t=n+r;(0,M.offsetStartDTS)(S,T,E),r>0?this.lastEndTime=t:(I.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var l=!!S.audio,x=!!S.video,y="";l&&(y+="audio"),x&&(y+="video");var c={data1:T,startPTS:n,startDTS:n,endPTS:t,endDTS:t,type:y,hasAudio:l,hasVideo:x,nb:1,dropped:0};d.audio=c.type==="audio"?c:void 0,d.video=c.type!=="audio"?c:void 0,d.initSegment=R;var _=(s=this.initPTS)!=null?s:0;return d.id3=(0,P.flushTextTrackMetadataCueSamples)(o,i,_,_),a.samples.length&&(d.text=(0,P.flushTextTrackUserdataCueSamples)(a,i,_)),d},h}();function f(h,p){var u=h==null?void 0:h.codec;return u&&u.length>4?u:u==="hvc1"||u==="hev1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||p===e.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}const g=A},"./src/task-loop.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>C});var C=function(){function P(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var M=P.prototype;return M.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},M.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},M.onHandlerDestroyed=function(){},M.hasInterval=function(){return!!this._tickInterval},M.hasNextTick=function(){return!!this._tickTimer},M.setInterval=function(I){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,I),!0)},M.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},M.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},M.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},M.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},M.doTick=function(){},P}()},"./src/types/cmcd.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{CMCDObjectType:()=>P,CMCDStreamType:()=>e,CMCDStreamingFormat:()=>M,CMCDVersion:()=>C});var C=1,P;(function(I){I.MANIFEST="m",I.AUDIO="a",I.VIDEO="v",I.MUXED="av",I.INIT="i",I.CAPTION="c",I.TIMED_TEXT="tt",I.KEY="k",I.OTHER="o"})(P||(P={}));var M;(function(I){I.DASH="d",I.HLS="h",I.SMOOTH="s",I.OTHER="o"})(M||(M={}));var e;(function(I){I.VOD="v",I.LIVE="l"})(e||(e={}))},"./src/types/demuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{MetadataSchema:()=>C});var C;(function(P){P.audioId3="org.id3",P.dateRange="com.apple.quicktime.HLS",P.emsg="https://aomedia.org/emsg/ID3"})(C||(C={}))},"./src/types/level.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{HdcpLevels:()=>I,HlsSkip:()=>A,HlsUrlParameters:()=>g,Level:()=>h,getSkipValue:()=>f});function C(p,u){for(var v=0;v<u.length;v++){var m=u[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,M(m.key),m)}}function P(p,u,v){return u&&C(p.prototype,u),v&&C(p,v),Object.defineProperty(p,"prototype",{writable:!1}),p}function M(p){var u=e(p,"string");return typeof u=="symbol"?u:String(u)}function e(p,u){if(typeof p!="object"||p===null)return p;var v=p[Symbol.toPrimitive];if(v!==void 0){var m=v.call(p,u||"default");if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(p)}var I=["NONE","TYPE-0","TYPE-1","TYPE-2",null],A;(function(p){p.No="",p.Yes="YES",p.v2="v2"})(A||(A={}));function f(p,u){var v=p.canSkipUntil,m=p.canSkipDateRanges,o=p.endSN,a=u!==void 0?u-o:0;return v&&a<v?m?A.v2:A.Yes:A.No}var g=function(){function p(v,m,o){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=v,this.part=m,this.skip=o}var u=p.prototype;return u.addDirectives=function(m){var o=new self.URL(m);return this.msn!==void 0&&o.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&o.searchParams.set("_HLS_part",this.part.toString()),this.skip&&o.searchParams.set("_HLS_skip",this.skip),o.href},p}(),h=function(){function p(u){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[u.url],this.attrs=u.attrs,this.bitrate=u.bitrate,u.details&&(this.details=u.details),this.id=u.id||0,this.name=u.name,this.width=u.width||0,this.height=u.height||0,this.audioCodec=u.audioCodec,this.videoCodec=u.videoCodec,this.unknownCodecs=u.unknownCodecs,this.codecSet=[u.videoCodec,u.audioCodec].filter(function(v){return v}).join(",").replace(/\.[^.,]+/g,"")}return P(p,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(v){var m=v%this.url.length;this._urlId!==m&&(this.details=void 0,this._urlId=m)}}]),p}()},"./src/types/loader.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{PlaylistContextType:()=>C,PlaylistLevelType:()=>P});var C;(function(M){M.MANIFEST="manifest",M.LEVEL="level",M.AUDIO_TRACK="audioTrack",M.SUBTITLE_TRACK="subtitleTrack"})(C||(C={}));var P;(function(M){M.MAIN="main",M.AUDIO="audio",M.SUBTITLE="subtitle"})(P||(P={}))},"./src/types/transmuxer.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{ChunkMetadata:()=>C});var C=function(e,I,A,f,g,h){f===void 0&&(f=0),g===void 0&&(g=-1),h===void 0&&(h=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=P(),this.buffering={audio:P(),video:P(),audiovideo:P()},this.level=e,this.sn=I,this.id=A,this.size=f,this.part=g,this.partial=h};function P(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{AttrList:()=>M});var C=/^(\d+)x(\d+)$/,P=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,M=function(){function e(A){typeof A=="string"&&(A=e.parseAttrList(A));for(var f in A)A.hasOwnProperty(f)&&(this[f]=A[f])}var I=e.prototype;return I.decimalInteger=function(f){var g=parseInt(this[f],10);return g>Number.MAX_SAFE_INTEGER?1/0:g},I.hexadecimalInteger=function(f){if(this[f]){var g=(this[f]||"0x").slice(2);g=(g.length&1?"0":"")+g;for(var h=new Uint8Array(g.length/2),p=0;p<g.length/2;p++)h[p]=parseInt(g.slice(p*2,p*2+2),16);return h}else return null},I.hexadecimalIntegerAsNumber=function(f){var g=parseInt(this[f],16);return g>Number.MAX_SAFE_INTEGER?1/0:g},I.decimalFloatingPoint=function(f){return parseFloat(this[f])},I.optionalFloat=function(f,g){var h=this[f];return h?parseFloat(h):g},I.enumeratedString=function(f){return this[f]},I.bool=function(f){return this[f]==="YES"},I.decimalResolution=function(f){var g=C.exec(this[f]);if(g!==null)return{width:parseInt(g[1],10),height:parseInt(g[2],10)}},e.parseAttrList=function(f){var g,h={},p='"';for(P.lastIndex=0;(g=P.exec(f))!==null;){var u=g[2];u.indexOf(p)===0&&u.lastIndexOf(p)===u.length-1&&(u=u.slice(1,-1)),h[g[1]]=u}return h},e}()},"./src/utils/binary-search.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>P});var C={search:function(e,I){for(var A=0,f=e.length-1,g=null,h=null;A<=f;){g=(A+f)/2|0,h=e[g];var p=I(h);if(p>0)A=g+1;else if(p<0)f=g-1;else return h}return null}};const P=C},"./src/utils/buffer-helper.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{BufferHelper:()=>M});var C=L("./src/utils/logger.ts"),P={length:0,start:function(){return 0},end:function(){return 0}},M=function(){function e(){}return e.isBuffered=function(A,f){try{if(A){for(var g=e.getBuffered(A),h=0;h<g.length;h++)if(f>=g.start(h)&&f<=g.end(h))return!0}}catch(p){}return!1},e.bufferInfo=function(A,f,g){try{if(A){var h=e.getBuffered(A),p=[],u;for(u=0;u<h.length;u++)p.push({start:h.start(u),end:h.end(u)});return this.bufferedInfo(p,f,g)}}catch(v){}return{len:0,start:f,end:f,nextStart:void 0}},e.bufferedInfo=function(A,f,g){f=Math.max(0,f),A.sort(function(d,T){var R=d.start-T.start;return R||T.end-d.end});var h=[];if(g)for(var p=0;p<A.length;p++){var u=h.length;if(u){var v=h[u-1].end;A[p].start-v<g?A[p].end>v&&(h[u-1].end=A[p].end):h.push(A[p])}else h.push(A[p])}else h=A;for(var m=0,o,a=f,i=f,s=0;s<h.length;s++){var E=h[s].start,b=h[s].end;if(f+g>=E&&f<b)a=E,i=b,m=i-f;else if(f+g<E){o=E;break}}return{len:m,start:a||0,end:i||0,nextStart:o}},e.getBuffered=function(A){try{return A.buffered}catch(f){return C.logger.log("failed to get media.buffered",f),P}},e}()},"./src/utils/cea-608-parser.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{CaptionScreen:()=>s,Row:()=>i,default:()=>S});var C=L("./src/utils/logger.ts"),P={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},M=function(r){var n=r;return P.hasOwnProperty(r)&&(n=P[r]),String.fromCharCode(n)},e=15,I=100,A={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},f={17:2,18:4,21:6,22:8,23:10,19:13,20:15},g={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],u;(function(w){w[w.ERROR=0]="ERROR",w[w.TEXT=1]="TEXT",w[w.WARNING=2]="WARNING",w[w.INFO=2]="INFO",w[w.DEBUG=3]="DEBUG",w[w.DATA=3]="DATA"})(u||(u={}));var v=function(){function w(){this.time=null,this.verboseLevel=u.ERROR}var r=w.prototype;return r.log=function(t,l){if(this.verboseLevel>=t){var x=typeof l=="function"?l():l;C.logger.log(this.time+" ["+t+"] "+x)}},w}(),m=function(r){for(var n=[],t=0;t<r.length;t++)n.push(r[t].toString(16));return n},o=function(){function w(n,t,l,x,y){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=n||"white",this.underline=t||!1,this.italics=l||!1,this.background=x||"black",this.flash=y||!1}var r=w.prototype;return r.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},r.setStyles=function(t){for(var l=["foreground","underline","italics","background","flash"],x=0;x<l.length;x++){var y=l[x];t.hasOwnProperty(y)&&(this[y]=t[y])}},r.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},r.equals=function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash},r.copy=function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash},r.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},w}(),a=function(){function w(n,t,l,x,y,c){this.uchar=void 0,this.penState=void 0,this.uchar=n||" ",this.penState=new o(t,l,x,y,c)}var r=w.prototype;return r.reset=function(){this.uchar=" ",this.penState.reset()},r.setChar=function(t,l){this.uchar=t,this.penState.copy(l)},r.setPenState=function(t){this.penState.copy(t)},r.equals=function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)},r.copy=function(t){this.uchar=t.uchar,this.penState.copy(t.penState)},r.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},w}(),i=function(){function w(n){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var t=0;t<I;t++)this.chars.push(new a);this.logger=n,this.pos=0,this.currPenState=new o}var r=w.prototype;return r.equals=function(t){for(var l=!0,x=0;x<I;x++)if(!this.chars[x].equals(t.chars[x])){l=!1;break}return l},r.copy=function(t){for(var l=0;l<I;l++)this.chars[l].copy(t.chars[l])},r.isEmpty=function(){for(var t=!0,l=0;l<I;l++)if(!this.chars[l].isEmpty()){t=!1;break}return t},r.setCursor=function(t){this.pos!==t&&(this.pos=t),this.pos<0?(this.logger.log(u.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>I&&(this.logger.log(u.DEBUG,"Too large cursor position "+this.pos),this.pos=I)},r.moveCursor=function(t){var l=this.pos+t;if(t>1)for(var x=this.pos+1;x<l+1;x++)this.chars[x].setPenState(this.currPenState);this.setCursor(l)},r.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},r.insertChar=function(t){var l=this;t>=144&&this.backSpace();var x=M(t);if(this.pos>=I){this.logger.log(u.ERROR,function(){return"Cannot insert "+t.toString(16)+" ("+x+") at position "+l.pos+". Skipping it!"});return}this.chars[this.pos].setChar(x,this.currPenState),this.moveCursor(1)},r.clearFromPos=function(t){var l;for(l=t;l<I;l++)this.chars[l].reset()},r.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},r.clearToEndOfRow=function(){this.clearFromPos(this.pos)},r.getTextString=function(){for(var t=[],l=!0,x=0;x<I;x++){var y=this.chars[x].uchar;y!==" "&&(l=!1),t.push(y)}return l?"":t.join("")},r.setPenStyles=function(t){this.currPenState.setStyles(t);var l=this.chars[this.pos];l.setPenState(this.currPenState)},w}(),s=function(){function w(n){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<e;t++)this.rows.push(new i(n));this.logger=n,this.currRow=e-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var r=w.prototype;return r.reset=function(){for(var t=0;t<e;t++)this.rows[t].clear();this.currRow=e-1},r.equals=function(t){for(var l=!0,x=0;x<e;x++)if(!this.rows[x].equals(t.rows[x])){l=!1;break}return l},r.copy=function(t){for(var l=0;l<e;l++)this.rows[l].copy(t.rows[l])},r.isEmpty=function(){for(var t=!0,l=0;l<e;l++)if(!this.rows[l].isEmpty()){t=!1;break}return t},r.backSpace=function(){var t=this.rows[this.currRow];t.backSpace()},r.clearToEndOfRow=function(){var t=this.rows[this.currRow];t.clearToEndOfRow()},r.insertChar=function(t){var l=this.rows[this.currRow];l.insertChar(t)},r.setPen=function(t){var l=this.rows[this.currRow];l.setPenStyles(t)},r.moveCursor=function(t){var l=this.rows[this.currRow];l.moveCursor(t)},r.setCursor=function(t){this.logger.log(u.INFO,"setCursor: "+t);var l=this.rows[this.currRow];l.setCursor(t)},r.setPAC=function(t){this.logger.log(u.INFO,function(){return"pacData = "+JSON.stringify(t)});var l=t.row-1;if(this.nrRollUpRows&&l<this.nrRollUpRows-1&&(l=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==l){for(var x=0;x<e;x++)this.rows[x].clear();var y=this.currRow+1-this.nrRollUpRows,c=this.lastOutputScreen;if(c){var _=c.rows[y].cueStartTime,D=this.logger.time;if(_&&D!==null&&_<D)for(var O=0;O<this.nrRollUpRows;O++)this.rows[l-this.nrRollUpRows+O+1].copy(c.rows[y+O])}}this.currRow=l;var k=this.rows[this.currRow];if(t.indent!==null){var F=t.indent,G=Math.max(F-1,0);k.setCursor(t.indent),t.color=k.chars[G].penState.foreground}var H={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(H)},r.setBkgData=function(t){this.logger.log(u.INFO,function(){return"bkgData = "+JSON.stringify(t)}),this.backSpace(),this.setPen(t),this.insertChar(32)},r.setRollUpRows=function(t){this.nrRollUpRows=t},r.rollUp=function(){var t=this;if(this.nrRollUpRows===null){this.logger.log(u.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(u.TEXT,function(){return t.getDisplayText()});var l=this.currRow+1-this.nrRollUpRows,x=this.rows.splice(l,1)[0];x.clear(),this.rows.splice(this.currRow,0,x),this.logger.log(u.INFO,"Rolling up")},r.getDisplayText=function(t){t=t||!1;for(var l=[],x="",y=-1,c=0;c<e;c++){var _=this.rows[c].getTextString();_&&(y=c+1,t?l.push("Row "+y+": '"+_+"'"):l.push(_.trim()))}return l.length>0&&(t?x="["+l.join(" | ")+"]":x=l.join(`
`)),x},r.getTextAndFormat=function(){return this.rows},w}(),E=function(){function w(n,t,l){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=n,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new s(l),this.nonDisplayedMemory=new s(l),this.lastOutputScreen=new s(l),this.currRollUpRow=this.displayedMemory.rows[e-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=l}var r=w.prototype;return r.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[e-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},r.getHandler=function(){return this.outputFilter},r.setHandler=function(t){this.outputFilter=t},r.setPAC=function(t){this.writeScreen.setPAC(t)},r.setBkgData=function(t){this.writeScreen.setBkgData(t)},r.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(u.INFO,function(){return"MODE="+t}),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},r.insertChars=function(t){for(var l=this,x=0;x<t.length;x++)this.writeScreen.insertChar(t[x]);var y=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(u.INFO,function(){return y+": "+l.writeScreen.getDisplayText(!0)}),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(u.TEXT,function(){return"DISPLAYED: "+l.displayedMemory.getDisplayText(!0)}),this.outputDataUpdate())},r.ccRCL=function(){this.logger.log(u.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},r.ccBS=function(){this.logger.log(u.INFO,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},r.ccAOF=function(){},r.ccAON=function(){},r.ccDER=function(){this.logger.log(u.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},r.ccRU=function(t){this.logger.log(u.INFO,"RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)},r.ccFON=function(){this.logger.log(u.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},r.ccRDC=function(){this.logger.log(u.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},r.ccTR=function(){this.logger.log(u.INFO,"TR"),this.setMode("MODE_TEXT")},r.ccRTD=function(){this.logger.log(u.INFO,"RTD"),this.setMode("MODE_TEXT")},r.ccEDM=function(){this.logger.log(u.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},r.ccCR=function(){this.logger.log(u.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},r.ccENM=function(){this.logger.log(u.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},r.ccEOC=function(){var t=this;if(this.logger.log(u.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var l=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=l,this.writeScreen=this.nonDisplayedMemory,this.logger.log(u.TEXT,function(){return"DISP: "+t.displayedMemory.getDisplayText()})}this.outputDataUpdate(!0)},r.ccTO=function(t){this.logger.log(u.INFO,"TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)},r.ccMIDROW=function(t){var l={flash:!1};if(l.underline=t%2===1,l.italics=t>=46,l.italics)l.foreground="white";else{var x=Math.floor(t/2)-16,y=["white","green","blue","cyan","red","yellow","magenta"];l.foreground=y[x]}this.logger.log(u.INFO,"MIDROW: "+JSON.stringify(l)),this.writeScreen.setPen(l)},r.outputDataUpdate=function(t){t===void 0&&(t=!1);var l=this.logger.time;l!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=l:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,l,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:l),this.lastOutputScreen.copy(this.displayedMemory))},r.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},w}(),b=function(){function w(n,t,l){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var x=new v;this.channels=[null,new E(n,t,x),new E(n+1,l,x)],this.cmdHistory=R(),this.logger=x}var r=w.prototype;return r.getHandler=function(t){return this.channels[t].getHandler()},r.setHandler=function(t,l){this.channels[t].setHandler(l)},r.addData=function(t,l){var x,y,c,_=!1;this.logger.time=t;for(var D=0;D<l.length;D+=2)if(y=l[D]&127,c=l[D+1]&127,!(y===0&&c===0)){if(this.logger.log(u.DATA,"["+m([l[D],l[D+1]])+"] -> ("+m([y,c])+")"),x=this.parseCmd(y,c),x||(x=this.parseMidrow(y,c)),x||(x=this.parsePAC(y,c)),x||(x=this.parseBackgroundAttributes(y,c)),!x&&(_=this.parseChars(y,c),_)){var O=this.currentChannel;if(O&&O>0){var k=this.channels[O];k.insertChars(_)}else this.logger.log(u.WARNING,"No channel found yet. TEXT-MODE?")}!x&&!_&&this.logger.log(u.WARNING,"Couldn't parse cleaned data "+m([y,c])+" orig: "+m([l[D],l[D+1]]))}},r.parseCmd=function(t,l){var x=this.cmdHistory,y=(t===20||t===28||t===21||t===29)&&l>=32&&l<=47,c=(t===23||t===31)&&l>=33&&l<=35;if(!(y||c))return!1;if(T(t,l,x))return d(null,null,x),this.logger.log(u.DEBUG,"Repeated command ("+m([t,l])+") is dropped"),!0;var _=t===20||t===21||t===23?1:2,D=this.channels[_];return t===20||t===21||t===28||t===29?l===32?D.ccRCL():l===33?D.ccBS():l===34?D.ccAOF():l===35?D.ccAON():l===36?D.ccDER():l===37?D.ccRU(2):l===38?D.ccRU(3):l===39?D.ccRU(4):l===40?D.ccFON():l===41?D.ccRDC():l===42?D.ccTR():l===43?D.ccRTD():l===44?D.ccEDM():l===45?D.ccCR():l===46?D.ccENM():l===47&&D.ccEOC():D.ccTO(l-32),d(t,l,x),this.currentChannel=_,!0},r.parseMidrow=function(t,l){var x=0;if((t===17||t===25)&&l>=32&&l<=47){if(t===17?x=1:x=2,x!==this.currentChannel)return this.logger.log(u.ERROR,"Mismatch channel in midrow parsing"),!1;var y=this.channels[x];return y?(y.ccMIDROW(l),this.logger.log(u.DEBUG,"MIDROW ("+m([t,l])+")"),!0):!1}return!1},r.parsePAC=function(t,l){var x,y=this.cmdHistory,c=(t>=17&&t<=23||t>=25&&t<=31)&&l>=64&&l<=127,_=(t===16||t===24)&&l>=64&&l<=95;if(!(c||_))return!1;if(T(t,l,y))return d(null,null,y),!0;var D=t<=23?1:2;l>=64&&l<=95?x=D===1?A[t]:g[t]:x=D===1?f[t]:h[t];var O=this.channels[D];return O?(O.setPAC(this.interpretPAC(x,l)),d(t,l,y),this.currentChannel=D,!0):!1},r.interpretPAC=function(t,l){var x,y={color:null,italics:!1,indent:null,underline:!1,row:t};return l>95?x=l-96:x=l-64,y.underline=(x&1)===1,x<=13?y.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(x/2)]:x<=15?(y.italics=!0,y.color="white"):y.indent=Math.floor((x-16)/2)*4,y},r.parseChars=function(t,l){var x,y=null,c=null;if(t>=25?(x=2,c=t-8):(x=1,c=t),c>=17&&c<=19){var _;c===17?_=l+80:c===18?_=l+112:_=l+144,this.logger.log(u.INFO,"Special char '"+M(_)+"' in channel "+x),y=[_]}else t>=32&&t<=127&&(y=l===0?[t]:[t,l]);if(y){var D=m(y);this.logger.log(u.DEBUG,"Char codes = "+D.join(",")),d(t,l,this.cmdHistory)}return y},r.parseBackgroundAttributes=function(t,l){var x=(t===16||t===24)&&l>=32&&l<=47,y=(t===23||t===31)&&l>=45&&l<=47;if(!(x||y))return!1;var c,_={};t===16||t===24?(c=Math.floor((l-32)/2),_.background=p[c],l%2===1&&(_.background=_.background+"_semi")):l===45?_.background="transparent":(_.foreground="black",l===47&&(_.underline=!0));var D=t<=23?1:2,O=this.channels[D];return O.setBkgData(_),d(t,l,this.cmdHistory),!0},r.reset=function(){for(var t=0;t<Object.keys(this.channels).length;t++){var l=this.channels[t];l&&l.reset()}this.cmdHistory=R()},r.cueSplitAtTime=function(t){for(var l=0;l<this.channels.length;l++){var x=this.channels[l];x&&x.cueSplitAtTime(t)}},w}();function d(w,r,n){n.a=w,n.b=r}function T(w,r,n){return n.a===w&&n.b===r}function R(){return{a:null,b:null}}const S=b},"./src/utils/codecs.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{isCodecSupportedInMp4:()=>M,isCodecType:()=>P});var C={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,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,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!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},text:{stpp:!0,wvtt:!0}};function P(e,I){var A=C[I];return!!A&&A[e.slice(0,4)]===!0}function M(e,I){return MediaSource.isTypeSupported((I||"video")+'/mp4;codecs="'+e+'"')}},"./src/utils/cues.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>A});var C=L("./src/utils/vttparser.ts"),P=L("./src/utils/webvtt-parser.ts"),M=L("./src/utils/texttrack-utils.ts"),e=/\s/,I={newCue:function(g,h,p,u){for(var v=[],m,o,a,i,s,E=self.VTTCue||self.TextTrackCue,b=0;b<u.rows.length;b++)if(m=u.rows[b],a=!0,i=0,s="",!m.isEmpty()){for(var d=0;d<m.chars.length;d++)e.test(m.chars[d].uchar)&&a?i++:(s+=m.chars[d].uchar,a=!1);m.cueStartTime=h,h===p&&(p+=1e-4),i>=16?i--:i++;var T=(0,C.fixLineBreaks)(s.trim()),R=(0,P.generateCueId)(h,p,T);(!g||!g.cues||!g.cues.getCueById(R))&&(o=new E(h,p,T),o.id=R,o.line=b+1,o.align="left",o.position=10+Math.min(80,Math.floor(i*8/32)*10),v.push(o))}return g&&v.length&&(v.sort(function(S,w){return S.line==="auto"||w.line==="auto"?0:S.line>8&&w.line>8?w.line-S.line:S.line-w.line}),v.forEach(function(S){return(0,M.addCueToTrack)(g,S)})),v}};const A=I},"./src/utils/discontinuities.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{adjustSlidingStart:()=>g,alignMediaPlaylistByPDT:()=>v,alignPDT:()=>u,alignStream:()=>h,findDiscontinuousReferenceFrag:()=>A,findFirstFragWithCC:()=>e,shouldAlignOnDiscontinuities:()=>I});var C=L("./src/polyfills/number.ts"),P=L("./src/utils/logger.ts"),M=L("./src/controller/level-helper.ts");function e(m,o){for(var a=null,i=0,s=m.length;i<s;i++){var E=m[i];if(E&&E.cc===o){a=E;break}}return a}function I(m,o,a){return!!(o.details&&(a.endCC>a.startCC||m&&m.cc<a.startCC))}function A(m,o,a){a===void 0&&(a=0);var i=m.fragments,s=o.fragments;if(!s.length||!i.length){P.logger.log("No fragments to align");return}var E=e(i,s[0].cc);if(!E||E&&!E.startPTS){P.logger.log("No frag in previous level to align on");return}return E}function f(m,o){if(m){var a=m.start+o;m.start=m.startPTS=a,m.endPTS=a+m.duration}}function g(m,o){for(var a=o.fragments,i=0,s=a.length;i<s;i++)f(a[i],m);o.fragmentHint&&f(o.fragmentHint,m),o.alignedSliding=!0}function h(m,o,a){o&&(p(m,a,o),!a.alignedSliding&&o.details&&u(a,o.details),!a.alignedSliding&&o.details&&!a.skippedSegments&&(0,M.adjustSliding)(o.details,a))}function p(m,o,a){if(I(m,a,o)){var i=A(a.details,o);i&&(0,C.isFiniteNumber)(i.start)&&(P.logger.log("Adjusting PTS using last level due to CC increase within current level "+o.url),g(i.start,o))}}function u(m,o){if(!(!o.fragments.length||!m.hasProgramDateTime||!o.hasProgramDateTime)){var a=o.fragments[0].programDateTime,i=m.fragments[0].programDateTime,s=(i-a)/1e3+o.fragments[0].start;s&&(0,C.isFiniteNumber)(s)&&(P.logger.log("Adjusting PTS using programDateTime delta "+(i-a)+"ms, sliding:"+s.toFixed(3)+" "+m.url+" "),g(s,m))}}function v(m,o){if(!(!m.hasProgramDateTime||!o.hasProgramDateTime)){var a=m.fragments,i=o.fragments;if(!(!a.length||!i.length)){var s=Math.round(i.length/2)-1,E=i[s],b=e(a,E.cc)||a[Math.round(a.length/2)-1],d=E.programDateTime,T=b.programDateTime;if(!(d===null||T===null)){var R=(T-d)/1e3-(b.start-E.start);g(R,m)}}}}},"./src/utils/ewma-bandwidth-estimator.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>M});var C=L("./src/utils/ewma.ts"),P=function(){function e(A,f,g){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=g,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new C.default(A),this.fast_=new C.default(f)}var I=e.prototype;return I.update=function(f,g){var h=this.slow_,p=this.fast_;this.slow_.halfLife!==f&&(this.slow_=new C.default(f,h.getEstimate(),h.getTotalWeight())),this.fast_.halfLife!==g&&(this.fast_=new C.default(g,p.getEstimate(),p.getTotalWeight()))},I.sample=function(f,g){f=Math.max(f,this.minDelayMs_);var h=8*g,p=f/1e3,u=h/p;this.fast_.sample(p,u),this.slow_.sample(p,u)},I.canEstimate=function(){var f=this.fast_;return f&&f.getTotalWeight()>=this.minWeight_},I.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},I.destroy=function(){},e}();const M=P},"./src/utils/ewma.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>P});var C=function(){function M(I,A,f){A===void 0&&(A=0),f===void 0&&(f=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=I,this.alpha_=I?Math.exp(Math.log(.5)/I):0,this.estimate_=A,this.totalWeight_=f}var e=M.prototype;return e.sample=function(A,f){var g=Math.pow(this.alpha_,A);this.estimate_=f*(1-g)+g*this.estimate_,this.totalWeight_+=A},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var A=1-Math.pow(this.alpha_,this.totalWeight_);if(A)return this.estimate_/A}return this.estimate_},M}();const P=C},"./src/utils/fetch-loader.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>s,fetchSupported:()=>v});var C=L("./src/polyfills/number.ts"),P=L("./src/loader/load-stats.ts"),M=L("./src/demux/chunk-cache.ts");function e(E,b){E.prototype=Object.create(b.prototype),E.prototype.constructor=E,h(E,b)}function I(E){var b=typeof Map=="function"?new Map:void 0;return I=function(T){if(T===null||!g(T))return T;if(typeof T!="function")throw new TypeError("Super expression must either be null or a function");if(typeof b!="undefined"){if(b.has(T))return b.get(T);b.set(T,R)}function R(){return A(T,arguments,p(this).constructor)}return R.prototype=Object.create(T.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),h(R,T)},I(E)}function A(E,b,d){return f()?A=Reflect.construct.bind():A=function(R,S,w){var r=[null];r.push.apply(r,S);var n=Function.bind.apply(R,r),t=new n;return w&&h(t,w.prototype),t},A.apply(null,arguments)}function f(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(E){return!1}}function g(E){return Function.toString.call(E).indexOf("[native code]")!==-1}function h(E,b){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,R){return T.__proto__=R,T},h(E,b)}function p(E){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d)},p(E)}function u(){return u=Object.assign?Object.assign.bind():function(E){for(var b=1;b<arguments.length;b++){var d=arguments[b];for(var T in d)Object.prototype.hasOwnProperty.call(d,T)&&(E[T]=d[T])}return E},u.apply(this,arguments)}function v(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(E){}return!1}var m=function(){function E(d){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=d.fetchSetup||a,this.controller=new self.AbortController,this.stats=new P.LoadStats}var b=E.prototype;return b.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},b.abortInternal=function(){var T=this.response;(!T||!T.ok)&&(this.stats.aborted=!0,this.controller.abort())},b.abort=function(){var T;this.abortInternal(),(T=this.callbacks)!==null&&T!==void 0&&T.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},b.load=function(T,R,S){var w=this,r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();var n=o(T,this.controller.signal),t=S.onProgress,l=T.responseType==="arraybuffer",x=l?"byteLength":"length";this.context=T,this.config=R,this.callbacks=S,this.request=this.fetchSetup(T,n),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){w.abortInternal(),S.onTimeout(r,T,w.response)},R.timeout),self.fetch(this.request).then(function(y){if(w.response=w.loader=y,!y.ok){var c=y.status,_=y.statusText;throw new i(_||"fetch, bad network response",c,y)}return r.loading.first=Math.max(self.performance.now(),r.loading.start),r.total=parseInt(y.headers.get("Content-Length")||"0"),t&&(0,C.isFiniteNumber)(R.highWaterMark)?w.loadProgressively(y,r,T,R.highWaterMark,t):l?y.arrayBuffer():y.text()}).then(function(y){var c=w.response;self.clearTimeout(w.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);var _=y[x];_&&(r.loaded=r.total=_);var D={url:c.url,data:y};t&&!(0,C.isFiniteNumber)(R.highWaterMark)&&t(r,T,y,c),S.onSuccess(D,r,T,c)}).catch(function(y){if(self.clearTimeout(w.requestTimeout),!r.aborted){var c=y&&y.code||0,_=y?y.message:null;S.onError({code:c,text:_},T,y?y.details:null)}})},b.getCacheAge=function(){var T=null;if(this.response){var R=this.response.headers.get("age");T=R?parseFloat(R):null}return T},b.loadProgressively=function(T,R,S,w,r){w===void 0&&(w=0);var n=new M.default,t=T.body.getReader(),l=function x(){return t.read().then(function(y){if(y.done)return n.dataLength&&r(R,S,n.flush(),T),Promise.resolve(new ArrayBuffer(0));var c=y.value,_=c.length;return R.loaded+=_,_<w||n.dataLength?(n.push(c),n.dataLength>=w&&r(R,S,n.flush(),T)):r(R,S,c,T),x()}).catch(function(){return Promise.reject()})};return l()},E}();function o(E,b){var d={method:"GET",mode:"cors",credentials:"same-origin",signal:b,headers:new self.Headers(u({},E.headers))};return E.rangeEnd&&d.headers.set("Range","bytes="+E.rangeStart+"-"+String(E.rangeEnd-1)),d}function a(E,b){return new self.Request(E.url,b)}var i=function(E){e(b,E);function b(d,T,R){var S;return S=E.call(this,d)||this,S.code=void 0,S.details=void 0,S.code=T,S.details=R,S}return b}(I(Error));const s=m},"./src/utils/hex.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>P});var C={hexDump:function(e){for(var I="",A=0;A<e.length;A++){var f=e[A].toString(16);f.length<2&&(f="0"+f),I+=f}return I}};const P=C},"./src/utils/imsc1-ttml-parser.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{IMSC1_CODEC:()=>g,parseIMSC1:()=>v});var C=L("./src/utils/mp4-tools.ts"),P=L("./src/utils/vttparser.ts"),M=L("./src/utils/vttcue.ts"),e=L("./src/demux/id3.ts"),I=L("./src/utils/timescale-conversion.ts"),A=L("./src/utils/webvtt-parser.ts");function f(){return f=Object.assign?Object.assign.bind():function(S){for(var w=1;w<arguments.length;w++){var r=arguments[w];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(S[n]=r[n])}return S},f.apply(this,arguments)}var g="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,p=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,u={left:"start",center:"center",right:"end",start:"start",end:"end"};function v(S,w,r,n,t){var l=(0,C.findBox)(new Uint8Array(S),["mdat"]);if(l.length===0){t(new Error("Could not parse IMSC1 mdat"));return}var x=l.map(function(c){return(0,e.utf8ArrayToStr)(c)}),y=(0,I.toTimescaleFromScale)(w,1,r);try{x.forEach(function(c){return n(m(c,y))})}catch(c){t(c)}}function m(S,w){var r=new DOMParser,n=r.parseFromString(S,"text/xml"),t=n.getElementsByTagName("tt")[0];if(!t)throw new Error("Invalid ttml");var l={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},x=Object.keys(l).reduce(function(O,k){return O[k]=t.getAttribute("ttp:"+k)||l[k],O},{}),y=t.getAttribute("xml:space")!=="preserve",c=a(o(t,"styling","style")),_=a(o(t,"layout","region")),D=o(t,"body","[begin]");return[].map.call(D,function(O){var k=i(O,y);if(!k||!O.hasAttribute("begin"))return null;var F=d(O.getAttribute("begin"),x),G=d(O.getAttribute("dur"),x),H=d(O.getAttribute("end"),x);if(F===null)throw b(O);if(H===null){if(G===null)throw b(O);H=F+G}var j=new M.default(F-w,H-w,k);j.id=(0,A.generateCueId)(j.startTime,j.endTime,j.text);var Q=_[O.getAttribute("region")],ee=c[O.getAttribute("style")],ie=s(Q,ee,c),se=ie.textAlign;if(se){var le=u[se];le&&(j.lineAlign=le),j.align=se}return f(j,ie),j}).filter(function(O){return O!==null})}function o(S,w,r){var n=S.getElementsByTagName(w)[0];return n?[].slice.call(n.querySelectorAll(r)):[]}function a(S){return S.reduce(function(w,r){var n=r.getAttribute("xml:id");return n&&(w[n]=r),w},{})}function i(S,w){return[].slice.call(S.childNodes).reduce(function(r,n,t){var l;return n.nodeName==="br"&&t?r+`
`:(l=n.childNodes)!==null&&l!==void 0&&l.length?i(n,w):w?r+n.textContent.trim().replace(/\s+/g," "):r+n.textContent},"")}function s(S,w,r){var n="http://www.w3.org/ns/ttml#styling",t=null,l=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],x=S!=null&&S.hasAttribute("style")?S.getAttribute("style"):null;return x&&r.hasOwnProperty(x)&&(t=r[x]),l.reduce(function(y,c){var _=E(w,n,c)||E(S,n,c)||E(t,n,c);return _&&(y[c]=_),y},{})}function E(S,w,r){return S&&S.hasAttributeNS(w,r)?S.getAttributeNS(w,r):null}function b(S){return new Error("Could not parse ttml timestamp "+S)}function d(S,w){if(!S)return null;var r=(0,P.parseTimeStamp)(S);return r===null&&(h.test(S)?r=T(S,w):p.test(S)&&(r=R(S,w))),r}function T(S,w){var r=h.exec(S),n=(r[4]|0)+(r[5]|0)/w.subFrameRate;return(r[1]|0)*3600+(r[2]|0)*60+(r[3]|0)+n/w.frameRate}function R(S,w){var r=p.exec(S),n=Number(r[1]),t=r[2];switch(t){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/w.frameRate;case"t":return n/w.tickRate}return n}},"./src/utils/keysystem-util.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{changeEndianness:()=>M,convertDataUriToArrayBytes:()=>e,strToUtf8array:()=>I});var C=L("./src/utils/numeric-encoding-utils.ts");function P(A){var f=I(A).subarray(0,16),g=new Uint8Array(16);return g.set(f,16-f.length),g}function M(A){var f=function(h,p,u){var v=h[p];h[p]=h[u],h[u]=v};f(A,0,3),f(A,1,2),f(A,4,5),f(A,6,7)}function e(A){var f=A.split(":"),g=null;if(f[0]==="data"&&f.length===2){var h=f[1].split(";"),p=h[h.length-1].split(",");if(p.length===2){var u=p[0]==="base64",v=p[1];u?(h.splice(-1,1),g=(0,C.base64Decode)(v)):g=P(v)}}return g}function I(A){return Uint8Array.from(unescape(encodeURIComponent(A)),function(f){return f.charCodeAt(0)})}},"./src/utils/logger.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{enableLogs:()=>A,logger:()=>f});var C=function(){},P={trace:C,debug:C,log:C,warn:C,info:C,error:C},M=P;function e(g){var h=self.console[g];return h?h.bind(self.console,"["+g+"] >"):C}function I(g){for(var h=arguments.length,p=new Array(h>1?h-1:0),u=1;u<h;u++)p[u-1]=arguments[u];p.forEach(function(v){M[v]=g[v]?g[v].bind(g):e(v)})}function A(g,h){if(self.console&&g===!0||typeof g=="object"){I(g,"debug","log","info","warn","error");try{M.log('Debug logs enabled for "'+h+'"')}catch(p){M=P}}else M=P}var f=M},"./src/utils/mediakeys-helper.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{KeySystemFormats:()=>P,KeySystemIds:()=>e,KeySystems:()=>C,getKeySystemsForConfig:()=>f,getSupportedMediaKeySystemConfigurations:()=>h,keySystemDomainToKeySystemFormat:()=>A,keySystemFormatToKeySystemDomain:()=>M,keySystemIdToKeySystemDomain:()=>I,requestMediaKeySystemAccess:()=>g});var C;(function(u){u.CLEARKEY="org.w3.clearkey",u.FAIRPLAY="com.apple.fps",u.PLAYREADY="com.microsoft.playready",u.WIDEVINE="com.widevine.alpha"})(C||(C={}));var P;(function(u){u.CLEARKEY="org.w3.clearkey",u.FAIRPLAY="com.apple.streamingkeydelivery",u.PLAYREADY="com.microsoft.playready",u.WIDEVINE="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"})(P||(P={}));function M(u){switch(u){case P.FAIRPLAY:return C.FAIRPLAY;case P.PLAYREADY:return C.PLAYREADY;case P.WIDEVINE:return C.WIDEVINE;case P.CLEARKEY:return C.CLEARKEY}}var e;(function(u){u.WIDEVINE="edef8ba979d64acea3c827dcd51d21ed"})(e||(e={}));function I(u){if(u===e.WIDEVINE)return C.WIDEVINE}function A(u){switch(u){case C.FAIRPLAY:return P.FAIRPLAY;case C.PLAYREADY:return P.PLAYREADY;case C.WIDEVINE:return P.WIDEVINE;case C.CLEARKEY:return P.CLEARKEY}}function f(u){var v=u.drmSystems,m=u.widevineLicenseUrl,o=v?[C.FAIRPLAY,C.WIDEVINE,C.PLAYREADY,C.CLEARKEY].filter(function(a){return!!v[a]}):[];return!o[C.WIDEVINE]&&m&&o.push(C.WIDEVINE),o}var g=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function h(u,v,m,o){var a;switch(u){case C.FAIRPLAY:a=["cenc","sinf"];break;case C.WIDEVINE:case C.PLAYREADY:a=["cenc"];break;case C.CLEARKEY:a=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+u)}return p(a,v,m,o)}function p(u,v,m,o){var a={initDataTypes:u,persistentState:o.persistentState||"not-allowed",distinctiveIdentifier:o.distinctiveIdentifier||"not-allowed",sessionTypes:o.sessionTypes||[o.sessionType||"temporary"],audioCapabilities:v.map(function(i){return{contentType:'audio/mp4; codecs="'+i+'"',robustness:o.audioRobustness||"",encryptionScheme:o.audioEncryptionScheme||null}}),videoCapabilities:m.map(function(i){return{contentType:'video/mp4; codecs="'+i+'"',robustness:o.videoRobustness||"",encryptionScheme:o.videoEncryptionScheme||null}})};return[a]}},"./src/utils/mediasource-helper.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{getMediaSource:()=>C});function C(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{RemuxerTrackIdConfig:()=>g,appendUint8Array:()=>w,bin2str:()=>h,computeRawDurationFromSamples:()=>T,discardEPB:()=>x,findBox:()=>o,getDuration:()=>d,getStartDTS:()=>b,mp4Box:()=>c,mp4pssh:()=>_,offsetStartDTS:()=>R,parseEmsg:()=>y,parseInitSegment:()=>i,parsePssh:()=>D,parseSEIMessageFromNALu:()=>l,parseSamples:()=>r,parseSegmentIndex:()=>a,parseSinf:()=>E,patchEncyptionData:()=>s,readSint32:()=>v,readUint16:()=>p,readUint32:()=>u,segmentValidRange:()=>S,writeUint32:()=>m});var C=L("./src/loader/fragment.ts"),P=L("./src/utils/typed-array.ts"),M=L("./src/demux/id3.ts"),e=L("./src/utils/logger.ts"),I=L("./src/utils/hex.ts"),A=Math.pow(2,32)-1,f=[].push,g={video:1,audio:2,id3:3,text:4};function h(O){return String.fromCharCode.apply(null,O)}function p(O,k){var F=O[k]<<8|O[k+1];return F<0?65536+F:F}function u(O,k){var F=v(O,k);return F<0?4294967296+F:F}function v(O,k){return O[k]<<24|O[k+1]<<16|O[k+2]<<8|O[k+3]}function m(O,k,F){O[k]=F>>24,O[k+1]=F>>16&255,O[k+2]=F>>8&255,O[k+3]=F&255}function o(O,k){var F=[];if(!k.length)return F;for(var G=O.byteLength,H=0;H<G;){var j=u(O,H),Q=h(O.subarray(H+4,H+8)),ee=j>1?H+j:G;if(Q===k[0])if(k.length===1)F.push(O.subarray(H+8,ee));else{var ie=o(O.subarray(H+8,ee),k.slice(1));ie.length&&f.apply(F,ie)}H=ee}return F}function a(O){var k=[],F=O[0],G=8,H=u(O,G);G+=4;var j=0,Q=0;F===0?G+=8:G+=16,G+=2;var ee=O.length+Q,ie=p(O,G);G+=2;for(var se=0;se<ie;se++){var le=G,xe=u(O,le);le+=4;var Re=xe&2147483647,Ee=(xe&2147483648)>>>31;if(Ee===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var he=u(O,le);le+=4,k.push({referenceSize:Re,subsegmentDuration:he,info:{duration:he/H,start:ee,end:ee+Re-1}}),ee+=Re,le+=4,G=le}return{earliestPresentationTime:j,timescale:H,version:F,referencesCount:ie,references:k}}function i(O){for(var k=[],F=o(O,["moov","trak"]),G=0;G<F.length;G++){var H=F[G],j=o(H,["tkhd"])[0];if(j){var Q=j[0],ee=Q===0?12:20,ie=u(j,ee),se=o(H,["mdia","mdhd"])[0];if(se){Q=se[0],ee=Q===0?12:20;var le=u(se,ee),xe=o(H,["mdia","hdlr"])[0];if(xe){var Re=h(xe.subarray(8,12)),Ee={soun:C.ElementaryStreamTypes.AUDIO,vide:C.ElementaryStreamTypes.VIDEO}[Re];if(Ee){var he=o(H,["mdia","minf","stbl","stsd"])[0],be=void 0;he&&(be=h(he.subarray(12,16))),k[ie]={timescale:le,type:Ee},k[Ee]={timescale:le,id:ie,codec:be}}}}}}var Ce=o(O,["moov","mvex","trex"]);return Ce.forEach(function(Ue){var $e=u(Ue,4),z=k[$e];z&&(z.default={duration:u(Ue,12),flags:u(Ue,20)})}),k}function s(O,k){if(!O||!k)return O;var F=k.keyId;if(F&&k.isCommonEncryption){var G=o(O,["moov","trak"]);G.forEach(function(H){var j=o(H,["mdia","minf","stbl","stsd"])[0],Q=j.subarray(8),ee=o(Q,["enca"]),ie=ee.length>0;ie||(ee=o(Q,["encv"])),ee.forEach(function(se){var le=ie?se.subarray(28):se.subarray(78),xe=o(le,["sinf"]);xe.forEach(function(Re){var Ee=E(Re);if(Ee){var he=Ee.subarray(8,24);he.some(function(be){return be!==0})||(e.logger.log("[eme] Patching keyId in 'enc"+(ie?"a":"v")+">sinf>>tenc' box: "+I.default.hexDump(he)+" -> "+I.default.hexDump(F)),Ee.set(F,8))}})})})}return O}function E(O){var k=o(O,["schm"])[0];if(k){var F=h(k.subarray(4,8));if(F==="cbcs"||F==="cenc")return o(O,["schi","tenc"])[0]}return e.logger.error("[eme] missing 'schm' box"),null}function b(O,k){return o(k,["moof","traf"]).reduce(function(F,G){var H=o(G,["tfdt"])[0],j=H[0],Q=o(G,["tfhd"]).reduce(function(ee,ie){var se=u(ie,4),le=O[se];if(le){var xe=u(H,4);j===1&&(xe*=Math.pow(2,32),xe+=u(H,8));var Re=le.timescale||9e4,Ee=xe/Re;if(isFinite(Ee)&&(ee===null||Ee<ee))return Ee}return ee},null);return Q!==null&&isFinite(Q)&&(F===null||Q<F)?Q:F},null)||0}function d(O,k){for(var F=0,G=0,H=0,j=o(O,["moof","traf"]),Q=0;Q<j.length;Q++){var ee=j[Q],ie=o(ee,["tfhd"])[0],se=u(ie,4),le=k[se];if(le){var xe=le.default,Re=u(ie,0)|(xe==null?void 0:xe.flags),Ee=xe==null?void 0:xe.duration;Re&8&&(Re&2?Ee=u(ie,12):Ee=u(ie,8));for(var he=le.timescale||9e4,be=o(ee,["trun"]),Ce=0;Ce<be.length;Ce++){if(F=T(be[Ce]),!F&&Ee){var Ue=u(be[Ce],4);F=Ee*Ue}le.type===C.ElementaryStreamTypes.VIDEO?G+=F/he:le.type===C.ElementaryStreamTypes.AUDIO&&(H+=F/he)}}}if(G===0&&H===0){for(var $e=0,z=o(O,["sidx"]),ne=0;ne<z.length;ne++){var de=a(z[ne]);de!=null&&de.references&&($e+=de.references.reduce(function(ge,Ae){return ge+Ae.info.duration||0},0))}return $e}return G||H}function T(O){var k=u(O,0),F=8;k&1&&(F+=4),k&4&&(F+=4);for(var G=0,H=u(O,4),j=0;j<H;j++){if(k&256){var Q=u(O,F);G+=Q,F+=4}k&512&&(F+=4),k&1024&&(F+=4),k&2048&&(F+=4)}return G}function R(O,k,F){o(k,["moof","traf"]).forEach(function(G){o(G,["tfhd"]).forEach(function(H){var j=u(H,4),Q=O[j];if(Q){var ee=Q.timescale||9e4;o(G,["tfdt"]).forEach(function(ie){var se=ie[0],le=u(ie,4);if(se===0)le-=F*ee,le=Math.max(le,0),m(ie,4,le);else{le*=Math.pow(2,32),le+=u(ie,8),le-=F*ee,le=Math.max(le,0);var xe=Math.floor(le/(A+1)),Re=Math.floor(le%(A+1));m(ie,4,xe),m(ie,8,Re)}})}})})}function S(O){var k={valid:null,remainder:null},F=o(O,["moof"]);if(F){if(F.length<2)return k.remainder=O,k}else return k;var G=F[F.length-1];return k.valid=(0,P.sliceUint8)(O,0,G.byteOffset-8),k.remainder=(0,P.sliceUint8)(O,G.byteOffset-8),k}function w(O,k){var F=new Uint8Array(O.length+k.length);return F.set(O),F.set(k,O.length),F}function r(O,k){var F=[],G=k.samples,H=k.timescale,j=k.id,Q=!1,ee=o(G,["moof"]);return ee.map(function(ie){var se=ie.byteOffset-8,le=o(ie,["traf"]);le.map(function(xe){var Re=o(xe,["tfdt"]).map(function(Ee){var he=Ee[0],be=u(Ee,4);return he===1&&(be*=Math.pow(2,32),be+=u(Ee,8)),be/H})[0];return Re!==void 0&&(O=Re),o(xe,["tfhd"]).map(function(Ee){var he=u(Ee,4),be=u(Ee,0)&16777215,Ce=(be&1)!==0,Ue=(be&2)!==0,$e=(be&8)!==0,z=0,ne=(be&16)!==0,de=0,ge=(be&32)!==0,Ae=8;he===j&&(Ce&&(Ae+=8),Ue&&(Ae+=4),$e&&(z=u(Ee,Ae),Ae+=4),ne&&(de=u(Ee,Ae),Ae+=4),ge&&(Ae+=4),k.type==="video"&&(Q=n(k.codec)),o(xe,["trun"]).map(function(Ve){var xt=Ve[0],Je=u(Ve,0)&16777215,pt=(Je&1)!==0,St=0,er=(Je&4)!==0,Ne=(Je&256)!==0,Fe=0,We=(Je&512)!==0,Be=0,_e=(Je&1024)!==0,ht=(Je&2048)!==0,Ze=0,At=u(Ve,4),yt=8;pt&&(St=u(Ve,yt),yt+=4),er&&(yt+=4);for(var tt=St+se,bt=0;bt<At;bt++){if(Ne?(Fe=u(Ve,yt),yt+=4):Fe=z,We?(Be=u(Ve,yt),yt+=4):Be=de,_e&&(yt+=4),ht&&(xt===0?Ze=u(Ve,yt):Ze=v(Ve,yt),yt+=4),k.type===C.ElementaryStreamTypes.VIDEO)for(var Ye=0;Ye<Be;){var je=u(G,tt);if(tt+=4,t(Q,G[tt])){var it=G.subarray(tt,tt+je);l(it,Q?2:1,O+Ze/H,F)}tt+=je,Ye+=je+4}O+=Fe/H}}))})})}),F}function n(O){if(!O)return!1;var k=O.indexOf("."),F=k<0?O:O.substring(0,k);return F==="hvc1"||F==="hev1"||F==="dvh1"||F==="dvhe"}function t(O,k){if(O){var F=k>>1&63;return F===39||F===40}else{var G=k&31;return G===6}}function l(O,k,F,G){var H=x(O),j=0;j+=k;for(var Q=0,ee=0,ie=!1,se=0;j<H.length;){Q=0;do{if(j>=H.length)break;se=H[j++],Q+=se}while(se===255);ee=0;do{if(j>=H.length)break;se=H[j++],ee+=se}while(se===255);var le=H.length-j;if(!ie&&Q===4&&j<H.length){ie=!0;var xe=H[j++];if(xe===181){var Re=p(H,j);if(j+=2,Re===49){var Ee=u(H,j);if(j+=4,Ee===1195456820){var he=H[j++];if(he===3){var be=H[j++],Ce=31&be,Ue=64&be,$e=Ue?2+Ce*3:0,z=new Uint8Array($e);if(Ue){z[0]=be;for(var ne=1;ne<$e;ne++)z[ne]=H[j++]}G.push({type:he,payloadType:Q,pts:F,bytes:z})}}}}}else if(Q===5&&ee<le){if(ie=!0,ee>16){for(var de=[],ge=0;ge<16;ge++){var Ae=H[j++].toString(16);de.push(Ae.length==1?"0"+Ae:Ae),(ge===3||ge===5||ge===7||ge===9)&&de.push("-")}for(var Ve=ee-16,xt=new Uint8Array(Ve),Je=0;Je<Ve;Je++)xt[Je]=H[j++];G.push({payloadType:Q,pts:F,uuid:de.join(""),userData:(0,M.utf8ArrayToStr)(xt),userDataBytes:xt})}}else if(ee<le)j+=ee;else if(ee>le)break}}function x(O){for(var k=O.byteLength,F=[],G=1;G<k-2;)O[G]===0&&O[G+1]===0&&O[G+2]===3?(F.push(G+2),G+=2):G++;if(F.length===0)return O;var H=k-F.length,j=new Uint8Array(H),Q=0;for(G=0;G<H;Q++,G++)Q===F[0]&&(Q++,F.shift()),j[G]=O[Q];return j}function y(O){var k=O[0],F="",G="",H=0,j=0,Q=0,ee=0,ie=0,se=0;if(k===0){for(;h(O.subarray(se,se+1))!=="\0";)F+=h(O.subarray(se,se+1)),se+=1;for(F+=h(O.subarray(se,se+1)),se+=1;h(O.subarray(se,se+1))!=="\0";)G+=h(O.subarray(se,se+1)),se+=1;G+=h(O.subarray(se,se+1)),se+=1,H=u(O,12),j=u(O,16),ee=u(O,20),ie=u(O,24),se=28}else if(k===1){se+=4,H=u(O,se),se+=4;var le=u(O,se);se+=4;var xe=u(O,se);for(se+=4,Q=Math.pow(2,32)*le+xe,Number.isSafeInteger(Q)||(Q=Number.MAX_SAFE_INTEGER,console.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),ee=u(O,se),se+=4,ie=u(O,se),se+=4;h(O.subarray(se,se+1))!=="\0";)F+=h(O.subarray(se,se+1)),se+=1;for(F+=h(O.subarray(se,se+1)),se+=1;h(O.subarray(se,se+1))!=="\0";)G+=h(O.subarray(se,se+1)),se+=1;G+=h(O.subarray(se,se+1)),se+=1}var Re=O.subarray(se,O.byteLength);return{schemeIdUri:F,value:G,timeScale:H,presentationTime:Q,presentationTimeDelta:j,eventDuration:ee,id:ie,payload:Re}}function c(O){for(var k=arguments.length,F=new Array(k>1?k-1:0),G=1;G<k;G++)F[G-1]=arguments[G];for(var H=F.length,j=8,Q=H;Q--;)j+=F[Q].byteLength;var ee=new Uint8Array(j);for(ee[0]=j>>24&255,ee[1]=j>>16&255,ee[2]=j>>8&255,ee[3]=j&255,ee.set(O,4),Q=0,j=8;Q<H;Q++)ee.set(F[Q],j),j+=F[Q].byteLength;return ee}function _(O,k,F){if(O.byteLength!==16)throw new RangeError("Invalid system id");var G,H;if(k){G=1,H=new Uint8Array(k.length*16);for(var j=0;j<k.length;j++){var Q=k[j];if(Q.byteLength!==16)throw new RangeError("Invalid key");H.set(Q,j*16)}}else G=0,H=new Uint8Array;var ee;G>0?(ee=new Uint8Array(4),k.length>0&&new DataView(ee.buffer).setUint32(0,k.length,!1)):ee=new Uint8Array;var ie=new Uint8Array(4);return F&&F.byteLength>0&&new DataView(ie.buffer).setUint32(0,F.byteLength,!1),c([112,115,115,104],new Uint8Array([G,0,0,0]),O,ee,H,ie,F||new Uint8Array)}function D(O){if(!(O instanceof ArrayBuffer)||O.byteLength<32)return null;var k={version:0,systemId:"",kids:null,data:null},F=new DataView(O),G=F.getUint32(0);if(O.byteLength!==G&&G>44)return null;var H=F.getUint32(4);if(H!==1886614376||(k.version=F.getUint32(8)>>>24,k.version>1))return null;k.systemId=I.default.hexDump(new Uint8Array(O,12,16));var j=F.getUint32(28);if(k.version===0){if(G-32<j)return null;k.data=new Uint8Array(O,32,j)}else if(k.version===1){k.kids=[];for(var Q=0;Q<j;Q++)k.kids.push(new Uint8Array(O,32+Q*16,16))}return k}},"./src/utils/numeric-encoding-utils.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{base64Decode:()=>A,base64DecodeToStr:()=>M,base64Encode:()=>e,base64ToBase64Url:()=>C,base64UrlEncode:()=>I,strToBase64Encode:()=>P});function C(f){return f.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function P(f){return btoa(f)}function M(f){return atob(f)}function e(f){return btoa(String.fromCharCode.apply(String,f))}function I(f){return C(e(f))}function A(f){return Uint8Array.from(atob(f),function(g){return g.charCodeAt(0)})}},"./src/utils/output-filter.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>C});var C=function(){function P(e,I){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=I}var M=P.prototype;return M.dispatchCue=function(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},M.newCue=function(I,A,f){(this.startTime===null||this.startTime>I)&&(this.startTime=I),this.endTime=A,this.screen=f,this.timelineController.createCaptionsTrack(this.trackName)},M.reset=function(){this.cueRanges=[],this.startTime=null},P}()},"./src/utils/texttrack-utils.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{addCueToTrack:()=>M,clearCurrentCues:()=>e,getCuesInRange:()=>f,removeCuesInRange:()=>I,sendAddTrackEvent:()=>P});var C=L("./src/utils/logger.ts");function P(g,h){var p;try{p=new Event("addtrack")}catch(u){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=g,h.dispatchEvent(p)}function M(g,h){var p=g.mode;if(p==="disabled"&&(g.mode="hidden"),g.cues&&!g.cues.getCueById(h.id))try{if(g.addCue(h),!g.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(v){C.logger.debug("[texttrack-utils]: "+v);var u=new self.TextTrackCue(h.startTime,h.endTime,h.text);u.id=h.id,g.addCue(u)}p==="disabled"&&(g.mode=p)}function e(g){var h=g.mode;if(h==="disabled"&&(g.mode="hidden"),g.cues)for(var p=g.cues.length;p--;)g.removeCue(g.cues[p]);h==="disabled"&&(g.mode=h)}function I(g,h,p,u){var v=g.mode;if(v==="disabled"&&(g.mode="hidden"),g.cues&&g.cues.length>0)for(var m=f(g.cues,h,p),o=0;o<m.length;o++)(!u||u(m[o]))&&g.removeCue(m[o]);v==="disabled"&&(g.mode=v)}function A(g,h){if(h<g[0].startTime)return 0;var p=g.length-1;if(h>g[p].endTime)return-1;for(var u=0,v=p;u<=v;){var m=Math.floor((v+u)/2);if(h<g[m].startTime)v=m-1;else if(h>g[m].startTime&&u<p)u=m+1;else return m}return g[u].startTime-h<h-g[v].startTime?u:v}function f(g,h,p){var u=[],v=A(g,h);if(v>-1)for(var m=v,o=g.length;m<o;m++){var a=g[m];if(a.startTime>=h&&a.endTime<=p)u.push(a);else if(a.startTime>p)return u}return u}},"./src/utils/time-ranges.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>P});var C={toString:function(e){for(var I="",A=e.length,f=0;f<A;f++)I+="["+e.start(f).toFixed(3)+"-"+e.end(f).toFixed(3)+"]";return I}};const P=C},"./src/utils/timescale-conversion.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{toMpegTsClockFromTimescale:()=>I,toMsFromMpegTsClock:()=>e,toTimescaleFromBase:()=>P,toTimescaleFromScale:()=>M});var C=9e4;function P(A,f,g,h){g===void 0&&(g=1),h===void 0&&(h=!1);var p=A*f*g;return h?Math.round(p):p}function M(A,f,g,h){return g===void 0&&(g=1),h===void 0&&(h=!1),P(A,f,1/g,h)}function e(A,f){return f===void 0&&(f=!1),P(A,1e3,1/C,f)}function I(A,f){return f===void 0&&(f=1),P(A,C,1/f)}},"./src/utils/typed-array.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{sliceUint8:()=>C});function C(P,M,e){return Uint8Array.prototype.slice?P.slice(M,e):new Uint8Array(Array.prototype.slice.call(P,M,e))}},"./src/utils/vttcue.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>C});const C=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var P=["","lr","rl"],M=["start","middle","end","left","right"];function e(h,p){if(typeof p!="string"||!Array.isArray(h))return!1;var u=p.toLowerCase();return~h.indexOf(u)?u:!1}function I(h){return e(P,h)}function A(h){return e(M,h)}function f(h){for(var p=arguments.length,u=new Array(p>1?p-1:0),v=1;v<p;v++)u[v-1]=arguments[v];for(var m=1;m<arguments.length;m++){var o=arguments[m];for(var a in o)h[a]=o[a]}return h}function g(h,p,u){var v=this,m={enumerable:!0};v.hasBeenReset=!1;var o="",a=!1,i=h,s=p,E=u,b=null,d="",T=!0,R="auto",S="start",w=50,r="middle",n=50,t="middle";Object.defineProperty(v,"id",f({},m,{get:function(){return o},set:function(x){o=""+x}})),Object.defineProperty(v,"pauseOnExit",f({},m,{get:function(){return a},set:function(x){a=!!x}})),Object.defineProperty(v,"startTime",f({},m,{get:function(){return i},set:function(x){if(typeof x!="number")throw new TypeError("Start time must be set to a number.");i=x,this.hasBeenReset=!0}})),Object.defineProperty(v,"endTime",f({},m,{get:function(){return s},set:function(x){if(typeof x!="number")throw new TypeError("End time must be set to a number.");s=x,this.hasBeenReset=!0}})),Object.defineProperty(v,"text",f({},m,{get:function(){return E},set:function(x){E=""+x,this.hasBeenReset=!0}})),Object.defineProperty(v,"region",f({},m,{get:function(){return b},set:function(x){b=x,this.hasBeenReset=!0}})),Object.defineProperty(v,"vertical",f({},m,{get:function(){return d},set:function(x){var y=I(x);if(y===!1)throw new SyntaxError("An invalid or illegal string was specified.");d=y,this.hasBeenReset=!0}})),Object.defineProperty(v,"snapToLines",f({},m,{get:function(){return T},set:function(x){T=!!x,this.hasBeenReset=!0}})),Object.defineProperty(v,"line",f({},m,{get:function(){return R},set:function(x){if(typeof x!="number"&&x!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");R=x,this.hasBeenReset=!0}})),Object.defineProperty(v,"lineAlign",f({},m,{get:function(){return S},set:function(x){var y=A(x);if(!y)throw new SyntaxError("An invalid or illegal string was specified.");S=y,this.hasBeenReset=!0}})),Object.defineProperty(v,"position",f({},m,{get:function(){return w},set:function(x){if(x<0||x>100)throw new Error("Position must be between 0 and 100.");w=x,this.hasBeenReset=!0}})),Object.defineProperty(v,"positionAlign",f({},m,{get:function(){return r},set:function(x){var y=A(x);if(!y)throw new SyntaxError("An invalid or illegal string was specified.");r=y,this.hasBeenReset=!0}})),Object.defineProperty(v,"size",f({},m,{get:function(){return n},set:function(x){if(x<0||x>100)throw new Error("Size must be between 0 and 100.");n=x,this.hasBeenReset=!0}})),Object.defineProperty(v,"align",f({},m,{get:function(){return t},set:function(x){var y=A(x);if(!y)throw new SyntaxError("An invalid or illegal string was specified.");t=y,this.hasBeenReset=!0}})),v.displayState=void 0}return g.prototype.getCueAsHTML=function(){var h=self.WebVTT;return h.convertCueToDOMTree(self,this.text)},g}()},"./src/utils/vttparser.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{VTTParser:()=>p,fixLineBreaks:()=>h,parseTimeStamp:()=>M});var C=L("./src/utils/vttcue.ts"),P=function(){function u(){}var v=u.prototype;return v.decode=function(o,a){if(!o)return"";if(typeof o!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(o))},u}();function M(u){function v(o,a,i,s){return(o|0)*3600+(a|0)*60+(i|0)+parseFloat(s||0)}var m=u.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return m?parseFloat(m[2])>59?v(m[2],m[3],0,m[4]):v(m[1],m[2],m[3],m[4]):null}var e=function(){function u(){this.values=Object.create(null)}var v=u.prototype;return v.set=function(o,a){!this.get(o)&&a!==""&&(this.values[o]=a)},v.get=function(o,a,i){return i?this.has(o)?this.values[o]:a[i]:this.has(o)?this.values[o]:a},v.has=function(o){return o in this.values},v.alt=function(o,a,i){for(var s=0;s<i.length;++s)if(a===i[s]){this.set(o,a);break}},v.integer=function(o,a){/^-?\d+$/.test(a)&&this.set(o,parseInt(a,10))},v.percent=function(o,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var i=parseFloat(a);if(i>=0&&i<=100)return this.set(o,i),!0}return!1},u}();function I(u,v,m,o){var a=o?u.split(o):[u];for(var i in a)if(typeof a[i]=="string"){var s=a[i].split(m);if(s.length===2){var E=s[0],b=s[1];v(E,b)}}}var A=new C.default(0,0,""),f=A.align==="middle"?"middle":"center";function g(u,v,m){var o=u;function a(){var E=M(u);if(E===null)throw new Error("Malformed timestamp: "+o);return u=u.replace(/^[^\sa-zA-Z-]+/,""),E}function i(E,b){var d=new e;I(E,function(S,w){var r;switch(S){case"region":for(var n=m.length-1;n>=0;n--)if(m[n].id===w){d.set(S,m[n].region);break}break;case"vertical":d.alt(S,w,["rl","lr"]);break;case"line":r=w.split(","),d.integer(S,r[0]),d.percent(S,r[0])&&d.set("snapToLines",!1),d.alt(S,r[0],["auto"]),r.length===2&&d.alt("lineAlign",r[1],["start",f,"end"]);break;case"position":r=w.split(","),d.percent(S,r[0]),r.length===2&&d.alt("positionAlign",r[1],["start",f,"end","line-left","line-right","auto"]);break;case"size":d.percent(S,w);break;case"align":d.alt(S,w,["start",f,"end","left","right"]);break}},/:/,/\s/),b.region=d.get("region",null),b.vertical=d.get("vertical","");var T=d.get("line","auto");T==="auto"&&A.line===-1&&(T=-1),b.line=T,b.lineAlign=d.get("lineAlign","start"),b.snapToLines=d.get("snapToLines",!0),b.size=d.get("size",100),b.align=d.get("align",f);var R=d.get("position","auto");R==="auto"&&A.position===50&&(R=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=R}function s(){u=u.replace(/^\s+/,"")}if(s(),v.startTime=a(),s(),u.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);u=u.slice(3),s(),v.endTime=a(),s(),i(u,v)}function h(u){return u.replace(/<br(?: \/)?>/gi,`
`)}var p=function(){function u(){this.state="INITIAL",this.buffer="",this.decoder=new P,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var v=u.prototype;return v.parse=function(o){var a=this;o&&(a.buffer+=a.decoder.decode(o,{stream:!0}));function i(){var R=a.buffer,S=0;for(R=h(R);S<R.length&&R[S]!=="\r"&&R[S]!==`
`;)++S;var w=R.slice(0,S);return R[S]==="\r"&&++S,R[S]===`
`&&++S,a.buffer=R.slice(S),w}function s(R){I(R,function(S,w){},/:/)}try{var E="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;E=i();var b=E.match(/^()?WEBVTT([ \t].*)?$/);if(!b||!b[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var d=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;switch(d?d=!1:E=i(),a.state){case"HEADER":/:/.test(E)?s(E):E||(a.state="ID");continue;case"NOTE":E||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(E)){a.state="NOTE";break}if(!E)continue;if(a.cue=new C.default(0,0,""),a.state="CUE",E.indexOf("-->")===-1){a.cue.id=E;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{g(E,a.cue,a.regionList)}catch(R){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var T=E.indexOf("-->")!==-1;if(!E||T&&(d=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
`),a.cue.text+=E}continue;case"BADCUE":E||(a.state="ID")}}}catch(R){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},v.flush=function(){var o=this;try{if((o.cue||o.state==="HEADER")&&(o.buffer+=`
`,o.parse()),o.state==="INITIAL"||o.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){o.onparsingerror&&o.onparsingerror(a)}return o.onflush&&o.onflush(),this},u}()},"./src/utils/webvtt-parser.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{generateCueId:()=>p,parseWebVTT:()=>v});var C=L("./src/polyfills/number.ts"),P=L("./src/utils/vttparser.ts"),M=L("./src/demux/id3.ts"),e=L("./src/utils/timescale-conversion.ts"),I=L("./src/remux/mp4-remuxer.ts"),A=/\r\n|\n\r|\n|\r/g,f=function(o,a,i){return i===void 0&&(i=0),o.slice(i,i+a.length)===a},g=function(o){var a=parseInt(o.slice(-3)),i=parseInt(o.slice(-6,-4)),s=parseInt(o.slice(-9,-7)),E=o.length>9?parseInt(o.substring(0,o.indexOf(":"))):0;if(!(0,C.isFiniteNumber)(a)||!(0,C.isFiniteNumber)(i)||!(0,C.isFiniteNumber)(s)||!(0,C.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+o);return a+=1e3*i,a+=60*1e3*s,a+=60*60*1e3*E,a},h=function(o){for(var a=5381,i=o.length;i;)a=a*33^o.charCodeAt(--i);return(a>>>0).toString()};function p(m,o,a){return h(m.toString())+h(o.toString())+h(a)}var u=function(o,a,i){var s=o[a],E=o[s.prevCC];if(!E||!E.new&&s.new){o.ccOffset=o.presentationOffset=s.start,s.new=!1;return}for(;(b=E)!==null&&b!==void 0&&b.new;){var b;o.ccOffset+=s.start-E.start,s.new=!1,s=E,E=o[s.prevCC]}o.presentationOffset=i};function v(m,o,a,i,s,E,b,d){var T=new P.VTTParser,R=(0,M.utf8ArrayToStr)(new Uint8Array(m)).trim().replace(A,`
`).split(`
`),S=[],w=(0,e.toMpegTsClockFromTimescale)(o,a),r="00:00.000",n=0,t=0,l,x=!0;T.oncue=function(y){var c=i[s],_=i.ccOffset,D=(n-w)/9e4;c!=null&&c.new&&(t!==void 0?_=i.ccOffset=c.start:u(i,s,D)),D&&(_=D-i.presentationOffset);var O=y.endTime-y.startTime,k=(0,I.normalizePts)((y.startTime+_-t)*9e4,E*9e4)/9e4;y.startTime=Math.max(k,0),y.endTime=Math.max(k+O,0);var F=y.text.trim();y.text=decodeURIComponent(encodeURIComponent(F)),y.id||(y.id=p(y.startTime,y.endTime,F)),y.endTime>0&&S.push(y)},T.onparsingerror=function(y){l=y},T.onflush=function(){if(l){d(l);return}b(S)},R.forEach(function(y){if(x)if(f(y,"X-TIMESTAMP-MAP=")){x=!1,y.slice(16).split(",").forEach(function(c){f(c,"LOCAL:")?r=c.slice(6):f(c,"MPEGTS:")&&(n=parseInt(c.slice(7)))});try{t=g(r)/1e3}catch(c){l=c}return}else y===""&&(x=!1);T.parse(y+`
`)}),T.flush()}},"./src/utils/xhr-loader.ts":(V,N,L)=>{"use strict";L.r(N),L.d(N,{default:()=>I});var C=L("./src/utils/logger.ts"),P=L("./src/loader/load-stats.ts"),M=/^age:\s*[\d.]+\s*$/m,e=function(){function A(g){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=g?g.xhrSetup:null,this.stats=new P.LoadStats,this.retryDelay=0}var f=A.prototype;return f.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},f.abortInternal=function(){var h=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),h&&(h.onreadystatechange=null,h.onprogress=null,h.readyState!==4&&(this.stats.aborted=!0,h.abort()))},f.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},f.load=function(h,p,u){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=h,this.config=p,this.callbacks=u,this.retryDelay=p.retryDelay,this.loadInternal()},f.loadInternal=function(){var h=this.config,p=this.context;if(h){var u=this.loader=new self.XMLHttpRequest,v=this.stats;v.loading.first=0,v.loaded=0;var m=this.xhrSetup;try{if(m)try{m(u,p.url)}catch(i){u.open("GET",p.url,!0),m(u,p.url)}u.readyState||u.open("GET",p.url,!0);var o=this.context.headers;if(o)for(var a in o)u.setRequestHeader(a,o[a])}catch(i){this.callbacks.onError({code:u.status,text:i.message},p,u);return}p.rangeEnd&&u.setRequestHeader("Range","bytes="+p.rangeStart+"-"+(p.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=p.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout),u.send()}},f.readystatechange=function(){var h=this.context,p=this.loader,u=this.stats;if(!(!h||!p)){var v=p.readyState,m=this.config;if(!u.aborted&&v>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),v===4){p.onreadystatechange=null,p.onprogress=null;var o=p.status,a=p.responseType==="arraybuffer";if(o>=200&&o<300&&(a&&p.response||p.responseText!==null)){u.loading.end=Math.max(self.performance.now(),u.loading.first);var i,s;if(a?(i=p.response,s=i.byteLength):(i=p.responseText,s=i.length),u.loaded=u.total=s,!this.callbacks)return;var E=this.callbacks.onProgress;if(E&&E(u,h,i,p),!this.callbacks)return;var b={url:p.responseURL,data:i};this.callbacks.onSuccess(b,u,h,p)}else u.retry>=m.maxRetry||o>=400&&o<499?(C.logger.error(o+" while loading "+h.url),this.callbacks.onError({code:o,text:p.statusText},h,p)):(C.logger.warn(o+" while loading "+h.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,m.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),m.timeout)}},f.loadtimeout=function(){C.logger.warn("timeout while loading "+this.context.url);var h=this.callbacks;h&&(this.abortInternal(),h.onTimeout(this.stats,this.context,this.loader))},f.loadprogress=function(h){var p=this.stats;p.loaded=h.loaded,h.lengthComputable&&(p.total=h.total)},f.getCacheAge=function(){var h=null;if(this.loader&&M.test(this.loader.getAllResponseHeaders())){var p=this.loader.getResponseHeader("age");h=p?parseFloat(p):null}return h},A}();const I=e},"./node_modules/eventemitter3/index.js":V=>{"use strict";var N=Object.prototype.hasOwnProperty,L="~";function C(){}Object.create&&(C.prototype=Object.create(null),new C().__proto__||(L=!1));function P(A,f,g){this.fn=A,this.context=f,this.once=g||!1}function M(A,f,g,h,p){if(typeof g!="function")throw new TypeError("The listener must be a function");var u=new P(g,h||A,p),v=L?L+f:f;return A._events[v]?A._events[v].fn?A._events[v]=[A._events[v],u]:A._events[v].push(u):(A._events[v]=u,A._eventsCount++),A}function e(A,f){--A._eventsCount===0?A._events=new C:delete A._events[f]}function I(){this._events=new C,this._eventsCount=0}I.prototype.eventNames=function(){var f=[],g,h;if(this._eventsCount===0)return f;for(h in g=this._events)N.call(g,h)&&f.push(L?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(g)):f},I.prototype.listeners=function(f){var g=L?L+f:f,h=this._events[g];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,u=h.length,v=new Array(u);p<u;p++)v[p]=h[p].fn;return v},I.prototype.listenerCount=function(f){var g=L?L+f:f,h=this._events[g];return h?h.fn?1:h.length:0},I.prototype.emit=function(f,g,h,p,u,v){var m=L?L+f:f;if(!this._events[m])return!1;var o=this._events[m],a=arguments.length,i,s;if(o.fn){switch(o.once&&this.removeListener(f,o.fn,void 0,!0),a){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,g),!0;case 3:return o.fn.call(o.context,g,h),!0;case 4:return o.fn.call(o.context,g,h,p),!0;case 5:return o.fn.call(o.context,g,h,p,u),!0;case 6:return o.fn.call(o.context,g,h,p,u,v),!0}for(s=1,i=new Array(a-1);s<a;s++)i[s-1]=arguments[s];o.fn.apply(o.context,i)}else{var E=o.length,b;for(s=0;s<E;s++)switch(o[s].once&&this.removeListener(f,o[s].fn,void 0,!0),a){case 1:o[s].fn.call(o[s].context);break;case 2:o[s].fn.call(o[s].context,g);break;case 3:o[s].fn.call(o[s].context,g,h);break;case 4:o[s].fn.call(o[s].context,g,h,p);break;default:if(!i)for(b=1,i=new Array(a-1);b<a;b++)i[b-1]=arguments[b];o[s].fn.apply(o[s].context,i)}}return!0},I.prototype.on=function(f,g,h){return M(this,f,g,h,!1)},I.prototype.once=function(f,g,h){return M(this,f,g,h,!0)},I.prototype.removeListener=function(f,g,h,p){var u=L?L+f:f;if(!this._events[u])return this;if(!g)return e(this,u),this;var v=this._events[u];if(v.fn)v.fn===g&&(!p||v.once)&&(!h||v.context===h)&&e(this,u);else{for(var m=0,o=[],a=v.length;m<a;m++)(v[m].fn!==g||p&&!v[m].once||h&&v[m].context!==h)&&o.push(v[m]);o.length?this._events[u]=o.length===1?o[0]:o:e(this,u)}return this},I.prototype.removeAllListeners=function(f){var g;return f?(g=L?L+f:f,this._events[g]&&e(this,g)):(this._events=new C,this._eventsCount=0),this},I.prototype.off=I.prototype.removeListener,I.prototype.addListener=I.prototype.on,I.prefixed=L,I.EventEmitter=I,V.exports=I},"./node_modules/url-toolkit/src/url-toolkit.js":function(V){(function(N){var L=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,C=/^(?=([^\/?#]*))\1([^]*)$/,P=/(?:\/|^)\.(?=\/)/g,M=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(I,A,f){if(f=f||{},I=I.trim(),A=A.trim(),!A){if(!f.alwaysNormalize)return I;var g=e.parseURL(I);if(!g)throw new Error("Error trying to parse base URL.");return g.path=e.normalizePath(g.path),e.buildURLFromParts(g)}var h=e.parseURL(A);if(!h)throw new Error("Error trying to parse relative URL.");if(h.scheme)return f.alwaysNormalize?(h.path=e.normalizePath(h.path),e.buildURLFromParts(h)):A;var p=e.parseURL(I);if(!p)throw new Error("Error trying to parse base URL.");if(!p.netLoc&&p.path&&p.path[0]!=="/"){var u=C.exec(p.path);p.netLoc=u[1],p.path=u[2]}p.netLoc&&!p.path&&(p.path="/");var v={scheme:p.scheme,netLoc:h.netLoc,path:null,params:h.params,query:h.query,fragment:h.fragment};if(!h.netLoc&&(v.netLoc=p.netLoc,h.path[0]!=="/"))if(!h.path)v.path=p.path,h.params||(v.params=p.params,h.query||(v.query=p.query));else{var m=p.path,o=m.substring(0,m.lastIndexOf("/")+1)+h.path;v.path=e.normalizePath(o)}return v.path===null&&(v.path=f.alwaysNormalize?e.normalizePath(h.path):h.path),e.buildURLFromParts(v)},parseURL:function(I){var A=L.exec(I);return A?{scheme:A[1]||"",netLoc:A[2]||"",path:A[3]||"",params:A[4]||"",query:A[5]||"",fragment:A[6]||""}:null},normalizePath:function(I){for(I=I.split("").reverse().join("").replace(P,"");I.length!==(I=I.replace(M,"")).length;);return I.split("").reverse().join("")},buildURLFromParts:function(I){return I.scheme+I.netLoc+I.path+I.params+I.query+I.fragment}};V.exports=e})(this)}},K={};function Z(V){var N=K[V];if(N!==void 0)return N.exports;var L=K[V]={exports:{}};return ye[V].call(L.exports,L,L.exports,Z),L.exports}Z.m=ye,Z.n=V=>{var N=V&&V.__esModule?()=>V.default:()=>V;return Z.d(N,{a:N}),N},Z.d=(V,N)=>{for(var L in N)Z.o(N,L)&&!Z.o(V,L)&&Object.defineProperty(V,L,{enumerable:!0,get:N[L]})},Z.o=(V,N)=>Object.prototype.hasOwnProperty.call(V,N),Z.r=V=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})};var J=Z("./src/hls.ts");return J=J.default,J})())},84204:function(He,ye,K){"use strict";var Z,J;function V(N,L,C){var P=function(M,e){return N.js_beautify(M,e)};return P.js=N.js_beautify,P.css=L.css_beautify,P.html=C.html_beautify,P.js_beautify=N.js_beautify,P.css_beautify=L.css_beautify,P.html_beautify=C.html_beautify,P}Z=[K(77937),K(85040),K(3566)],J=function(N,L,C){return V(N,L,C)}.apply(ye,Z),J!==void 0&&(He.exports=J)},85040:function(He,ye){var K,Z;(function(){var J;(function(){"use strict";var N=[,,function(M){function e(f){this.__parent=f,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}e.prototype.clone_empty=function(){var f=new e(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f},e.prototype.item=function(f){return f<0?this.__items[this.__items.length+f]:this.__items[f]},e.prototype.has_match=function(f){for(var g=this.__items.length-1;g>=0;g--)if(this.__items[g].match(f))return!0;return!1},e.prototype.set_indent=function(f,g){this.is_empty()&&(this.__indent_count=f||0,this.__alignment_count=g||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;return f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" "&&(f.__items.splice(0,1),f.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return this.__items.length===0},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(f){this.__items.push(f);var g=f.lastIndexOf(`
`);g!==-1?this.__character_count=f.length-g:this.__character_count+=f.length},e.prototype.pop=function(){var f=null;return this.is_empty()||(f=this.__items.pop(),this.__character_count-=f.length),f},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var f="";return this.is_empty()?this.__parent.indent_empty_lines&&(f=this.__parent.get_indent_string(this.__indent_count)):(f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("")),f};function I(f,g){this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,f.indent_with_tabs||(this.__indent_string=new Array(f.indent_size+1).join(f.indent_char)),g=g||"",f.indent_level>0&&(g=new Array(f.indent_level+1).join(this.__indent_string)),this.__base_string=g,this.__base_string_length=g.length}I.prototype.get_indent_size=function(f,g){var h=this.__base_string_length;return g=g||0,f<0&&(h=0),h+=f*this.__indent_size,h+=g,h},I.prototype.get_indent_string=function(f,g){var h=this.__base_string;return g=g||0,f<0&&(f=0,h=""),g+=f*this.__indent_size,this.__ensure_cache(g),h+=this.__cache[g],h},I.prototype.__ensure_cache=function(f){for(;f>=this.__cache.length;)this.__add_column()},I.prototype.__add_column=function(){var f=this.__cache.length,g=0,h="";this.__indent_size&&f>=this.__indent_size&&(g=Math.floor(f/this.__indent_size),f-=g*this.__indent_size,h=new Array(g+1).join(this.__indent_string)),f&&(h+=new Array(f+1).join(" ")),this.__cache.push(h)};function A(f,g){this.__indent_cache=new I(f,g),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}A.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},A.prototype.get_line_number=function(){return this.__lines.length},A.prototype.get_indent_string=function(f,g){return this.__indent_cache.get_indent_string(f,g)},A.prototype.get_indent_size=function(f,g){return this.__indent_cache.get_indent_size(f,g)},A.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},A.prototype.add_new_line=function(f){return this.is_empty()||!f&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},A.prototype.get_code=function(f){this.trim(!0);var g=this.current_line.pop();g&&(g[g.length-1]===`
`&&(g=g.replace(/\n+$/g,"")),this.current_line.push(g)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(`
`);return f!==`
`&&(h=h.replace(/[\n]/g,f)),h},A.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},A.prototype.set_indent=function(f,g){return f=f||0,g=g||0,this.next_line.set_indent(f,g),this.__lines.length>1?(this.current_line.set_indent(f,g),!0):(this.current_line.set_indent(),!1)},A.prototype.add_raw_token=function(f){for(var g=0;g<f.newlines;g++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(f.whitespace_before),this.current_line.push(f.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},A.prototype.add_token=function(f){this.__add_space_before_token(),this.current_line.push(f),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},A.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},A.prototype.remove_indent=function(f){for(var g=this.__lines.length;f<g;)this.__lines[f]._remove_indent(),f++;this.current_line._remove_wrap_indent()},A.prototype.trim=function(f){for(f=f===void 0?!1:f,this.current_line.trim();f&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},A.prototype.just_added_newline=function(){return this.current_line.is_empty()},A.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},A.prototype.ensure_empty_line_above=function(f,g){for(var h=this.__lines.length-2;h>=0;){var p=this.__lines[h];if(p.is_empty())break;if(p.item(0).indexOf(f)!==0&&p.item(-1)!==g){this.__lines.splice(h+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},M.exports.Output=A},,,,function(M){function e(f,g){this.raw_options=I(f,g),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}e.prototype._get_array=function(f,g){var h=this.raw_options[f],p=g||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(p=h.concat()):typeof h=="string"&&(p=h.split(/[^a-zA-Z0-9_\/\-]+/)),p},e.prototype._get_boolean=function(f,g){var h=this.raw_options[f],p=h===void 0?!!g:!!h;return p},e.prototype._get_characters=function(f,g){var h=this.raw_options[f],p=g||"";return typeof h=="string"&&(p=h.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),p},e.prototype._get_number=function(f,g){var h=this.raw_options[f];g=parseInt(g,10),isNaN(g)&&(g=0);var p=parseInt(h,10);return isNaN(p)&&(p=g),p},e.prototype._get_selection=function(f,g,h){var p=this._get_selection_list(f,g,h);if(p.length!==1)throw new Error("Invalid Option Value: The option '"+f+`' can only be one of the following values:
`+g+`
You passed in: '`+this.raw_options[f]+"'");return p[0]},e.prototype._get_selection_list=function(f,g,h){if(!g||g.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[g[0]],!this._is_valid_selection(h,g))throw new Error("Invalid Default Value!");var p=this._get_array(f,h);if(!this._is_valid_selection(p,g))throw new Error("Invalid Option Value: The option '"+f+`' can contain only the following values:
`+g+`
You passed in: '`+this.raw_options[f]+"'");return p},e.prototype._is_valid_selection=function(f,g){return f.length&&g.length&&!f.some(function(h){return g.indexOf(h)===-1})};function I(f,g){var h={};f=A(f);var p;for(p in f)p!==g&&(h[p]=f[p]);if(g&&f[g])for(p in f[g])h[p]=f[g][p];return h}function A(f){var g={},h;for(h in f){var p=h.replace(/-/g,"_");g[p]=f[h]}return g}M.exports.Options=e,M.exports.normalizeOpts=A,M.exports.mergeOpts=I},,function(M){var e=RegExp.prototype.hasOwnProperty("sticky");function I(A){this.__input=A||"",this.__input_length=this.__input.length,this.__position=0}I.prototype.restart=function(){this.__position=0},I.prototype.back=function(){this.__position>0&&(this.__position-=1)},I.prototype.hasNext=function(){return this.__position<this.__input_length},I.prototype.next=function(){var A=null;return this.hasNext()&&(A=this.__input.charAt(this.__position),this.__position+=1),A},I.prototype.peek=function(A){var f=null;return A=A||0,A+=this.__position,A>=0&&A<this.__input_length&&(f=this.__input.charAt(A)),f},I.prototype.__match=function(A,f){A.lastIndex=f;var g=A.exec(this.__input);return g&&!(e&&A.sticky)&&g.index!==f&&(g=null),g},I.prototype.test=function(A,f){return f=f||0,f+=this.__position,f>=0&&f<this.__input_length?!!this.__match(A,f):!1},I.prototype.testChar=function(A,f){var g=this.peek(f);return A.lastIndex=0,g!==null&&A.test(g)},I.prototype.match=function(A){var f=this.__match(A,this.__position);return f?this.__position+=f[0].length:f=null,f},I.prototype.read=function(A,f,g){var h="",p;return A&&(p=this.match(A),p&&(h+=p[0])),f&&(p||!A)&&(h+=this.readUntil(f,g)),h},I.prototype.readUntil=function(A,f){var g="",h=this.__position;A.lastIndex=this.__position;var p=A.exec(this.__input);return p?(h=p.index,f&&(h+=p[0].length)):h=this.__input_length,g=this.__input.substring(this.__position,h),this.__position=h,g},I.prototype.readUntilAfter=function(A){return this.readUntil(A,!0)},I.prototype.get_regexp=function(A,f){var g=null,h="g";return f&&e&&(h="y"),typeof A=="string"&&A!==""?g=new RegExp(A,h):A&&(g=new RegExp(A.source,h)),g},I.prototype.get_literal_regexp=function(A){return RegExp(A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},I.prototype.peekUntilAfter=function(A){var f=this.__position,g=this.readUntilAfter(A);return this.__position=f,g},I.prototype.lookBack=function(A){var f=this.__position-1;return f>=A.length&&this.__input.substring(f-A.length,f).toLowerCase()===A},M.exports.InputScanner=I},,,,,function(M){function e(I,A){I=typeof I=="string"?I:I.source,A=typeof A=="string"?A:A.source,this.__directives_block_pattern=new RegExp(I+/ beautify( \w+[:]\w+)+ /.source+A,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(I+/\sbeautify\signore:end\s/.source+A,"g")}e.prototype.get_directives=function(I){if(!I.match(this.__directives_block_pattern))return null;var A={};this.__directive_pattern.lastIndex=0;for(var f=this.__directive_pattern.exec(I);f;)A[f[1]]=f[2],f=this.__directive_pattern.exec(I);return A},e.prototype.readIgnored=function(I){return I.readUntilAfter(this.__directives_end_ignore_pattern)},M.exports.Directives=e},,function(M,e,I){var A=I(16).Beautifier,f=I(17).Options;function g(h,p){var u=new A(h,p);return u.beautify()}M.exports=g,M.exports.defaultOptions=function(){return new f}},function(M,e,I){var A=I(17).Options,f=I(2).Output,g=I(8).InputScanner,h=I(13).Directives,p=new h(/\/\*/,/\*\//),u=/\r\n|[\r\n]/,v=/\r\n|[\r\n]/g,m=/\s/,o=/(?:\s|\n)+/g,a=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,i=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function s(E,b){this._source_text=E||"",this._options=new A(b),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}s.prototype.eatString=function(E){var b="";for(this._ch=this._input.next();this._ch;){if(b+=this._ch,this._ch==="\\")b+=this._input.next();else if(E.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return b},s.prototype.eatWhitespace=function(E){for(var b=m.test(this._input.peek()),d=0;m.test(this._input.peek());)this._ch=this._input.next(),E&&this._ch===`
`&&(d===0||d<this._options.max_preserve_newlines)&&(d++,this._output.add_new_line(!0));return b},s.prototype.foundNestedPseudoClass=function(){for(var E=0,b=1,d=this._input.peek(b);d;){if(d==="{")return!0;if(d==="(")E+=1;else if(d===")"){if(E===0)return!1;E-=1}else if(d===";"||d==="}")return!1;b++,d=this._input.peek(b)}return!1},s.prototype.print_string=function(E){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(E)},s.prototype.preserveSingleSpace=function(E){E&&(this._output.space_before_token=!0)},s.prototype.indent=function(){this._indentLevel++},s.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},s.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E=this._source_text,b=this._options.eol;b==="auto"&&(b=`
`,E&&u.test(E||"")&&(b=E.match(u)[0])),E=E.replace(v,`
`);var d=E.match(/^[\t ]*/)[0];this._output=new f(this._options,d),this._input=new g(E),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var T=0,R=!1,S=!1,w=!1,r=!1,n=!1,t=!1,l=this._ch,x=!1,y,c,_;y=this._input.read(o),c=y!=="",_=l,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),l=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var D=this._input.read(a),O=p.get_directives(D);O&&O.ignore==="start"&&(D+=p.readIgnored(this._input)),this.print_string(D),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(i)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(c),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var k=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);k.match(/[ :]$/)&&(k=this.eatString(": ").replace(/\s$/,""),this.print_string(k),this._output.space_before_token=!0),k=k.replace(/\s$/,""),k==="extend"?r=!0:k==="import"&&(n=!0),k in this.NESTED_AT_RULE?(this._nestedLevel+=1,k in this.CONDITIONAL_GROUP_RULE&&(w=!0)):!R&&T===0&&k.indexOf(":")!==-1&&(S=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(c),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")S&&(S=!1,this.outdent()),w?(w=!1,R=this._indentLevel>=this._nestedLevel):R=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&R&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(_==="("?this._output.space_before_token=!1:_!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),_==="{"&&this._output.trim(!0),n=!1,r=!1,S&&(this.outdent(),S=!1),this.print_string(this._ch),R=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var F=0;F<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;F++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[F])){x=!0;break}(R||w)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!r&&T===0?(this.print_string(":"),S||(S=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var G=_==='"'||_==="'";this.preserveSingleSpace(G||c),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")x=!1,T===0?(S&&(this.outdent(),S=!1),r=!1,n=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),T++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),T&&(T--,this.outdent()));else{var H=!1;this._input.lookBack("with")&&(H=!0),this.preserveSingleSpace(c||H),this.print_string(this._ch),S&&_==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),t=!0):(this.eatWhitespace(),T++,this.indent())}else if(this._ch===")")T&&(T--,this.outdent()),t&&this._input.peek()===";"&&this._options.selector_separator_newline&&(t=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!S||t)&&T===0&&!n&&!r?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!S&&T===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&m.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(c),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),m.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var j=_==='"'||_==="'";this.preserveSingleSpace(j||c),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&x&&this._output.add_new_line()}var Q=this._output.get_code(b);return Q},M.exports.Beautifier=s},function(M,e,I){var A=I(6).Options;function f(g){A.call(this,g,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var p=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var u=0;u<p.length;u++)p[u]!=="expand"?this.brace_style="collapse":this.brace_style=p[u]}f.prototype=new A,M.exports.Options=f}],L={};function C(M){var e=L[M];if(e!==void 0)return e.exports;var I=L[M]={exports:{}};return N[M](I,I.exports,C),I.exports}var P=C(15);J=P})();var V=J;K=[],Z=function(){return{css_beautify:V}}.apply(ye,K),Z!==void 0&&(He.exports=Z)})()},3566:function(He,ye,K){var Z,J;(function(){var V;(function(){"use strict";var P=[,,function(A){function f(p){this.__parent=p,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}f.prototype.clone_empty=function(){var p=new f(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},f.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},f.prototype.has_match=function(p){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(p))return!0;return!1},f.prototype.set_indent=function(p,u){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},f.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},f.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.prototype.push=function(p){this.__items.push(p);var u=p.lastIndexOf(`
`);u!==-1?this.__character_count=p.length-u:this.__character_count+=p.length},f.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function g(p,u){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),u=u||"",p.indent_level>0&&(u=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}g.prototype.get_indent_size=function(p,u){var v=this.__base_string_length;return u=u||0,p<0&&(v=0),v+=p*this.__indent_size,v+=u,v},g.prototype.get_indent_string=function(p,u){var v=this.__base_string;return u=u||0,p<0&&(p=0,v=""),u+=p*this.__indent_size,this.__ensure_cache(u),v+=this.__cache[u],v},g.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var p=this.__cache.length,u=0,v="";this.__indent_size&&p>=this.__indent_size&&(u=Math.floor(p/this.__indent_size),p-=u*this.__indent_size,v=new Array(u+1).join(this.__indent_string)),p&&(v+=new Array(p+1).join(" ")),this.__cache.push(v)};function h(p,u){this.__indent_cache=new g(p,u),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new f(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}h.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},h.prototype.get_line_number=function(){return this.__lines.length},h.prototype.get_indent_string=function(p,u){return this.__indent_cache.get_indent_string(p,u)},h.prototype.get_indent_size=function(p,u){return this.__indent_cache.get_indent_size(p,u)},h.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},h.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},h.prototype.get_code=function(p){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var v=this.__lines.join(`
`);return p!==`
`&&(v=v.replace(/[\n]/g,p)),v},h.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},h.prototype.set_indent=function(p,u){return p=p||0,u=u||0,this.next_line.set_indent(p,u),this.__lines.length>1?(this.current_line.set_indent(p,u),!0):(this.current_line.set_indent(),!1)},h.prototype.add_raw_token=function(p){for(var u=0;u<p.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},h.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},h.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},h.prototype.remove_indent=function(p){for(var u=this.__lines.length;p<u;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},h.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},h.prototype.just_added_newline=function(){return this.current_line.is_empty()},h.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},h.prototype.ensure_empty_line_above=function(p,u){for(var v=this.__lines.length-2;v>=0;){var m=this.__lines[v];if(m.is_empty())break;if(m.item(0).indexOf(p)!==0&&m.item(-1)!==u){this.__lines.splice(v+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}v--}},A.exports.Output=h},function(A){function f(g,h,p,u){this.type=g,this.text=h,this.comments_before=null,this.newlines=p||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}A.exports.Token=f},,,function(A){function f(p,u){this.raw_options=g(p,u),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}f.prototype._get_array=function(p,u){var v=this.raw_options[p],m=u||[];return typeof v=="object"?v!==null&&typeof v.concat=="function"&&(m=v.concat()):typeof v=="string"&&(m=v.split(/[^a-zA-Z0-9_\/\-]+/)),m},f.prototype._get_boolean=function(p,u){var v=this.raw_options[p],m=v===void 0?!!u:!!v;return m},f.prototype._get_characters=function(p,u){var v=this.raw_options[p],m=u||"";return typeof v=="string"&&(m=v.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),m},f.prototype._get_number=function(p,u){var v=this.raw_options[p];u=parseInt(u,10),isNaN(u)&&(u=0);var m=parseInt(v,10);return isNaN(m)&&(m=u),m},f.prototype._get_selection=function(p,u,v){var m=this._get_selection_list(p,u,v);if(m.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
`+u+`
You passed in: '`+this.raw_options[p]+"'");return m[0]},f.prototype._get_selection_list=function(p,u,v){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(v=v||[u[0]],!this._is_valid_selection(v,u))throw new Error("Invalid Default Value!");var m=this._get_array(p,v);if(!this._is_valid_selection(m,u))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
`+u+`
You passed in: '`+this.raw_options[p]+"'");return m},f.prototype._is_valid_selection=function(p,u){return p.length&&u.length&&!p.some(function(v){return u.indexOf(v)===-1})};function g(p,u){var v={};p=h(p);var m;for(m in p)m!==u&&(v[m]=p[m]);if(u&&p[u])for(m in p[u])v[m]=p[u][m];return v}function h(p){var u={},v;for(v in p){var m=v.replace(/-/g,"_");u[m]=p[v]}return u}A.exports.Options=f,A.exports.normalizeOpts=h,A.exports.mergeOpts=g},,function(A){var f=RegExp.prototype.hasOwnProperty("sticky");function g(h){this.__input=h||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var h=null;return this.hasNext()&&(h=this.__input.charAt(this.__position),this.__position+=1),h},g.prototype.peek=function(h){var p=null;return h=h||0,h+=this.__position,h>=0&&h<this.__input_length&&(p=this.__input.charAt(h)),p},g.prototype.__match=function(h,p){h.lastIndex=p;var u=h.exec(this.__input);return u&&!(f&&h.sticky)&&u.index!==p&&(u=null),u},g.prototype.test=function(h,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(h,p):!1},g.prototype.testChar=function(h,p){var u=this.peek(p);return h.lastIndex=0,u!==null&&h.test(u)},g.prototype.match=function(h){var p=this.__match(h,this.__position);return p?this.__position+=p[0].length:p=null,p},g.prototype.read=function(h,p,u){var v="",m;return h&&(m=this.match(h),m&&(v+=m[0])),p&&(m||!h)&&(v+=this.readUntil(p,u)),v},g.prototype.readUntil=function(h,p){var u="",v=this.__position;h.lastIndex=this.__position;var m=h.exec(this.__input);return m?(v=m.index,p&&(v+=m[0].length)):v=this.__input_length,u=this.__input.substring(this.__position,v),this.__position=v,u},g.prototype.readUntilAfter=function(h){return this.readUntil(h,!0)},g.prototype.get_regexp=function(h,p){var u=null,v="g";return p&&f&&(v="y"),typeof h=="string"&&h!==""?u=new RegExp(h,v):h&&(u=new RegExp(h.source,v)),u},g.prototype.get_literal_regexp=function(h){return RegExp(h.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(h){var p=this.__position,u=this.readUntilAfter(h);return this.__position=p,u},g.prototype.lookBack=function(h){var p=this.__position-1;return p>=h.length&&this.__input.substring(p-h.length,p).toLowerCase()===h},A.exports.InputScanner=g},function(A,f,g){var h=g(8).InputScanner,p=g(3).Token,u=g(10).TokenStream,v=g(11).WhitespacePattern,m={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(a,i){this._input=new h(a),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new v(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var a,i=new p(m.START,""),s=null,E=[],b=new u;i.type!==m.EOF;){for(a=this._get_next_token(i,s);this._is_comment(a);)b.add(a),a=this._get_next_token(i,s);b.isEmpty()||(a.comments_before=b,b=new u),a.parent=s,this._is_opening(a)?(E.push(s),s=a):s&&this._is_closing(a,s)&&(a.opened=s,s.closed=a,s=E.pop(),a.parent=s),a.previous=i,i.next=a,this.__tokens.add(a),i=a}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(a,i){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(m.RAW,s):this._create_token(m.EOF,"")},o.prototype._is_comment=function(a){return!1},o.prototype._is_opening=function(a){return!1},o.prototype._is_closing=function(a,i){return!1},o.prototype._create_token=function(a,i){var s=new p(a,i,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},A.exports.Tokenizer=o,A.exports.TOKEN=m},function(A){function f(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}f.prototype.restart=function(){this.__position=0},f.prototype.isEmpty=function(){return this.__tokens_length===0},f.prototype.hasNext=function(){return this.__position<this.__tokens_length},f.prototype.next=function(){var g=null;return this.hasNext()&&(g=this.__tokens[this.__position],this.__position+=1),g},f.prototype.peek=function(g){var h=null;return g=g||0,g+=this.__position,g>=0&&g<this.__tokens_length&&(h=this.__tokens[g]),h},f.prototype.add=function(g){this.__parent_token&&(g.parent=this.__parent_token),this.__tokens.push(g),this.__tokens_length+=1},A.exports.TokenStream=f},function(A,f,g){var h=g(12).Pattern;function p(u,v){h.call(this,u,v),v?this._line_regexp=this._input.get_regexp(v._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}p.prototype=new h,p.prototype.__set_whitespace_patterns=function(u,v){u+="\\t ",v+="\\n\\r",this._match_pattern=this._input.get_regexp("["+u+v+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+v+"]")},p.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var u=this._input.read(this._match_pattern);if(u===" ")this.whitespace_before_token=" ";else if(u){var v=this.__split(this._newline_regexp,u);this.newline_count=v.length-1,this.whitespace_before_token=v[this.newline_count]}return u},p.prototype.matching=function(u,v){var m=this._create();return m.__set_whitespace_patterns(u,v),m._update(),m},p.prototype._create=function(){return new p(this._input,this)},p.prototype.__split=function(u,v){u.lastIndex=0;for(var m=0,o=[],a=u.exec(v);a;)o.push(v.substring(m,a.index)),m=a.index+a[0].length,a=u.exec(v);return m<v.length?o.push(v.substring(m,v.length)):o.push(""),o},A.exports.WhitespacePattern=p},function(A){function f(g,h){this._input=g,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,h&&(this._starting_pattern=this._input.get_regexp(h._starting_pattern,!0),this._match_pattern=this._input.get_regexp(h._match_pattern,!0),this._until_pattern=this._input.get_regexp(h._until_pattern),this._until_after=h._until_after)}f.prototype.read=function(){var g=this._input.read(this._starting_pattern);return(!this._starting_pattern||g)&&(g+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),g},f.prototype.read_match=function(){return this._input.match(this._match_pattern)},f.prototype.until_after=function(g){var h=this._create();return h._until_after=!0,h._until_pattern=this._input.get_regexp(g),h._update(),h},f.prototype.until=function(g){var h=this._create();return h._until_after=!1,h._until_pattern=this._input.get_regexp(g),h._update(),h},f.prototype.starting_with=function(g){var h=this._create();return h._starting_pattern=this._input.get_regexp(g,!0),h._update(),h},f.prototype.matching=function(g){var h=this._create();return h._match_pattern=this._input.get_regexp(g,!0),h._update(),h},f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){},A.exports.Pattern=f},function(A){function f(g,h){g=typeof g=="string"?g:g.source,h=typeof h=="string"?h:h.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+h,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+h,"g")}f.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var h={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(g);p;)h[p[1]]=p[2],p=this.__directive_pattern.exec(g);return h},f.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},A.exports.Directives=f},function(A,f,g){var h=g(12).Pattern,p={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function u(v,m){h.call(this,v,m),this.__template_pattern=null,this._disabled=Object.assign({},p),this._excluded=Object.assign({},p),m&&(this.__template_pattern=this._input.get_regexp(m.__template_pattern),this._excluded=Object.assign(this._excluded,m._excluded),this._disabled=Object.assign(this._disabled,m._disabled));var o=new h(v);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}u.prototype=new h,u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){this.__set_templated_pattern()},u.prototype.disable=function(v){var m=this._create();return m._disabled[v]=!0,m._update(),m},u.prototype.read_options=function(v){var m=this._create();for(var o in p)m._disabled[o]=v.templating.indexOf(o)===-1;return m._update(),m},u.prototype.exclude=function(v){var m=this._create();return m._excluded[v]=!0,m._update(),m},u.prototype.read=function(){var v="";this._match_pattern?v=this._input.read(this._starting_pattern):v=this._input.read(this._starting_pattern,this.__template_pattern);for(var m=this._read_template();m;)this._match_pattern?m+=this._input.read(this._match_pattern):m+=this._input.readUntil(this.__template_pattern),v+=m,m=this._read_template();return this._until_after&&(v+=this._input.readUntilAfter(this._until_pattern)),v},u.prototype.__set_templated_pattern=function(){var v=[];this._disabled.php||v.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||v.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||v.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(v.push(this.__patterns.django._starting_pattern.source),v.push(this.__patterns.django_value._starting_pattern.source),v.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||v.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&v.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+v.join("|")+")")},u.prototype._read_template=function(){var v="",m=this._input.peek();if(m==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(v=v||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(v=v||this.__patterns.erb.read())}else m==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(v=v||this.__patterns.handlebars_comment.read(),v=v||this.__patterns.handlebars_unescaped.read(),v=v||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(v=v||this.__patterns.django_value.read()),this._excluded.django||(v=v||this.__patterns.django_comment.read(),v=v||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(v=v||this.__patterns.smarty_comment.read(),v=v||this.__patterns.smarty_literal.read(),v=v||this.__patterns.smarty.read()));return v},A.exports.TemplatablePattern=u},,,,function(A,f,g){var h=g(19).Beautifier,p=g(20).Options;function u(v,m,o,a){var i=new h(v,m,o,a);return i.beautify()}A.exports=u,A.exports.defaultOptions=function(){return new p}},function(A,f,g){var h=g(20).Options,p=g(2).Output,u=g(21).Tokenizer,v=g(21).TOKEN,m=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=function(r,n){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=r.max_preserve_newlines,this.preserve_newlines=r.preserve_newlines,this._output=new p(r,n)};a.prototype.current_line_has_match=function(r){return this._output.current_line.has_match(r)},a.prototype.set_space_before_token=function(r,n){this._output.space_before_token=r,this._output.non_breaking_space=n},a.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},a.prototype.add_raw_token=function(r){this._output.add_raw_token(r)},a.prototype.print_preserved_newlines=function(r){var n=0;r.type!==v.TEXT&&r.previous.type!==v.TEXT&&(n=r.newlines?1:0),this.preserve_newlines&&(n=r.newlines<this.max_preserve_newlines+1?r.newlines:this.max_preserve_newlines+1);for(var t=0;t<n;t++)this.print_newline(t>0);return n!==0},a.prototype.traverse_whitespace=function(r){return r.whitespace_before||r.newlines?(this.print_preserved_newlines(r)||(this._output.space_before_token=!0),!0):!1},a.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},a.prototype.print_newline=function(r){this._output.add_new_line(r)},a.prototype.print_token=function(r){r.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(r.text))},a.prototype.indent=function(){this.indent_level++},a.prototype.get_full_indent=function(r){return r=this.indent_level+(r||0),r<1?"":this._output.get_indent_string(r)};var i=function(r){for(var n=null,t=r.next;t.type!==v.EOF&&r.closed!==t;){if(t.type===v.ATTRIBUTE&&t.text==="type"){t.next&&t.next.type===v.EQUALS&&t.next.next&&t.next.next.type===v.VALUE&&(n=t.next.next.text);break}t=t.next}return n},s=function(r,n){var t=null,l=null;return n.closed?(r==="script"?t="text/javascript":r==="style"&&(t="text/css"),t=i(n)||t,t.search("text/css")>-1?l="css":t.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?l="javascript":t.search(/(text|application|dojo)\/(x-)?(html)/)>-1?l="html":t.search(/test\/null/)>-1&&(l="null"),l):null};function E(r,n){return n.indexOf(r)!==-1}function b(r,n,t){this.parent=r||null,this.tag=n?n.tag_name:"",this.indent_level=t||0,this.parser_token=n||null}function d(r){this._printer=r,this._current_frame=null}d.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},d.prototype.record_tag=function(r){var n=new b(this._current_frame,r,this._printer.indent_level);this._current_frame=n},d.prototype._try_pop_frame=function(r){var n=null;return r&&(n=r.parser_token,this._printer.indent_level=r.indent_level,this._current_frame=r.parent),n},d.prototype._get_frame=function(r,n){for(var t=this._current_frame;t&&r.indexOf(t.tag)===-1;){if(n&&n.indexOf(t.tag)!==-1){t=null;break}t=t.parent}return t},d.prototype.try_pop=function(r,n){var t=this._get_frame([r],n);return this._try_pop_frame(t)},d.prototype.indent_to_tag=function(r){var n=this._get_frame(r);n&&(this._printer.indent_level=n.indent_level)};function T(r,n,t,l){this._source_text=r||"",n=n||{},this._js_beautify=t,this._css_beautify=l,this._tag_stack=null;var x=new h(n,"html");this._options=x,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}T.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var r=this._source_text,n=this._options.eol;this._options.eol==="auto"&&(n=`
`,r&&m.test(r)&&(n=r.match(m)[0])),r=r.replace(o,`
`);var t=r.match(/^[\t ]*/)[0],l={text:"",type:""},x=new R,y=new a(this._options,t),c=new u(r,this._options).tokenize();this._tag_stack=new d(y);for(var _=null,D=c.next();D.type!==v.EOF;)D.type===v.TAG_OPEN||D.type===v.COMMENT?(_=this._handle_tag_open(y,D,x,l),x=_):D.type===v.ATTRIBUTE||D.type===v.EQUALS||D.type===v.VALUE||D.type===v.TEXT&&!x.tag_complete?_=this._handle_inside_tag(y,D,x,c):D.type===v.TAG_CLOSE?_=this._handle_tag_close(y,D,x):D.type===v.TEXT?_=this._handle_text(y,D,x):y.add_raw_token(D),l=_,D=c.next();var O=y._output.get_code(n);return O},T.prototype._handle_tag_close=function(r,n,t){var l={text:n.text,type:n.type};return r.alignment_size=0,t.tag_complete=!0,r.set_space_before_token(n.newlines||n.whitespace_before!=="",!0),t.is_unformatted?r.add_raw_token(n):(t.tag_start_char==="<"&&(r.set_space_before_token(n.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&t.has_wrapped_attrs&&r.print_newline(!1)),r.print_token(n)),t.indent_content&&!(t.is_unformatted||t.is_content_unformatted)&&(r.indent(),t.indent_content=!1),!t.is_inline_element&&!(t.is_unformatted||t.is_content_unformatted)&&r.set_wrap_point(),l},T.prototype._handle_inside_tag=function(r,n,t,l){var x=t.has_wrapped_attrs,y={text:n.text,type:n.type};if(r.set_space_before_token(n.newlines||n.whitespace_before!=="",!0),t.is_unformatted)r.add_raw_token(n);else if(t.tag_start_char==="{"&&n.type===v.TEXT)r.print_preserved_newlines(n)?(n.newlines=0,r.add_raw_token(n)):r.print_token(n);else{if(n.type===v.ATTRIBUTE?(r.set_space_before_token(!0),t.attr_count+=1):(n.type===v.EQUALS||n.type===v.VALUE&&n.previous.type===v.EQUALS)&&r.set_space_before_token(!1),n.type===v.ATTRIBUTE&&t.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(r.traverse_whitespace(n),x=x||n.newlines!==0),this._is_wrap_attributes_force)){var c=t.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&t.attr_count===1){var _=!0,D=0,O;do{if(O=l.peek(D),O.type===v.ATTRIBUTE){_=!1;break}D+=1}while(D<4&&O.type!==v.EOF&&O.type!==v.TAG_CLOSE);c=!_}c&&(r.print_newline(!1),x=!0)}r.print_token(n),x=x||r.previous_token_wrapped(),t.has_wrapped_attrs=x}return y},T.prototype._handle_text=function(r,n,t){var l={text:n.text,type:"TK_CONTENT"};return t.custom_beautifier_name?this._print_custom_beatifier_text(r,n,t):t.is_unformatted||t.is_content_unformatted?r.add_raw_token(n):(r.traverse_whitespace(n),r.print_token(n)),l},T.prototype._print_custom_beatifier_text=function(r,n,t){var l=this;if(n.text!==""){var x=n.text,y,c=1,_="",D="";t.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?y=this._js_beautify:t.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?y=this._css_beautify:t.custom_beautifier_name==="html"&&(y=function(j,Q){var ee=new T(j,Q,l._js_beautify,l._css_beautify);return ee.beautify()}),this._options.indent_scripts==="keep"?c=0:this._options.indent_scripts==="separate"&&(c=-r.indent_level);var O=r.get_full_indent(c);if(x=x.replace(/\n[ \t]*$/,""),t.custom_beautifier_name!=="html"&&x[0]==="<"&&x.match(/^(<!--|<!\[CDATA\[)/)){var k=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(x);if(!k){r.add_raw_token(n);return}_=O+k[1]+`
`,x=k[4],k[5]&&(D=O+k[5]),x=x.replace(/\n[ \t]*$/,""),(k[2]||k[3].indexOf(`
`)!==-1)&&(k=k[3].match(/[ \t]+$/),k&&(n.whitespace_before=k[0]))}if(x)if(y){var F=function(){this.eol=`
`};F.prototype=this._options.raw_options;var G=new F;x=y(O+x,G)}else{var H=n.whitespace_before;H&&(x=x.replace(new RegExp(`
(`+H+")?","g"),`
`)),x=O+x.replace(/\n/g,`
`+O)}_&&(x?x=_+x+`
`+D:x=_+D),r.print_newline(!1),x&&(n.text=x,n.whitespace_before="",n.newlines=0,r.add_raw_token(n),r.print_newline(!0))}},T.prototype._handle_tag_open=function(r,n,t,l){var x=this._get_tag_open_token(n);return(t.is_unformatted||t.is_content_unformatted)&&!t.is_empty_element&&n.type===v.TAG_OPEN&&n.text.indexOf("</")===0?(r.add_raw_token(n),x.start_tag_token=this._tag_stack.try_pop(x.tag_name)):(r.traverse_whitespace(n),this._set_tag_position(r,n,x,t,l),x.is_inline_element||r.set_wrap_point(),r.print_token(n)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(x.alignment_size=n.text.length+1),!x.tag_complete&&!x.is_unformatted&&(r.alignment_size=x.alignment_size),x};var R=function(r,n){if(this.parent=r||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!n)this.tag_complete=!0;else{var t;this.tag_start_char=n.text[0],this.text=n.text,this.tag_start_char==="<"?(t=n.text.match(/^<([^\s>]*)/),this.tag_check=t?t[1]:""):(t=n.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=t?t[1]:"",(n.text.startsWith("{{#>")||n.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&n.next!==null?this.tag_check=n.next.text.split(" ")[0]:this.tag_check=n.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),n.type===v.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||n.closed&&n.closed.text==="/>";var l=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(l=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(l)))}};T.prototype._get_tag_open_token=function(r){var n=new R(this._tag_stack.get_parser_token(),r);return n.alignment_size=this._options.wrap_attributes_indent_size,n.is_end_tag=n.is_end_tag||E(n.tag_check,this._options.void_elements),n.is_empty_element=n.tag_complete||n.is_start_tag&&n.is_end_tag,n.is_unformatted=!n.tag_complete&&E(n.tag_check,this._options.unformatted),n.is_content_unformatted=!n.is_empty_element&&E(n.tag_check,this._options.content_unformatted),n.is_inline_element=E(n.tag_name,this._options.inline)||n.tag_name.includes("-")||n.tag_start_char==="{",n},T.prototype._set_tag_position=function(r,n,t,l,x){if(t.is_empty_element||(t.is_end_tag?t.start_tag_token=this._tag_stack.try_pop(t.tag_name):(this._do_optional_end_element(t)&&(t.is_inline_element||r.print_newline(!1)),this._tag_stack.record_tag(t),(t.tag_name==="script"||t.tag_name==="style")&&!(t.is_unformatted||t.is_content_unformatted)&&(t.custom_beautifier_name=s(t.tag_check,n)))),E(t.tag_check,this._options.extra_liners)&&(r.print_newline(!1),r._output.just_added_blankline()||r.print_newline(!0)),t.is_empty_element){if(t.tag_start_char==="{"&&t.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),t.indent_content=!0;var y=r.current_line_has_match(/{{#if/);y||r.print_newline(!1)}t.tag_name==="!--"&&x.type===v.TAG_CLOSE&&l.is_end_tag&&t.text.indexOf(`
`)===-1||(t.is_inline_element||t.is_unformatted||r.print_newline(!1),this._calcluate_parent_multiline(r,t))}else if(t.is_end_tag){var c=!1;c=t.start_tag_token&&t.start_tag_token.multiline_content,c=c||!t.is_inline_element&&!(l.is_inline_element||l.is_unformatted)&&!(x.type===v.TAG_CLOSE&&t.start_tag_token===l)&&x.type!=="TK_CONTENT",(t.is_content_unformatted||t.is_unformatted)&&(c=!1),c&&r.print_newline(!1)}else t.indent_content=!t.custom_beautifier_name,t.tag_start_char==="<"&&(t.tag_name==="html"?t.indent_content=this._options.indent_inner_html:t.tag_name==="head"?t.indent_content=this._options.indent_head_inner_html:t.tag_name==="body"&&(t.indent_content=this._options.indent_body_inner_html)),!(t.is_inline_element||t.is_unformatted)&&(x.type!=="TK_CONTENT"||t.is_content_unformatted)&&r.print_newline(!1),this._calcluate_parent_multiline(r,t)},T.prototype._calcluate_parent_multiline=function(r,n){n.parent&&r._output.just_added_newline()&&!((n.is_inline_element||n.is_unformatted)&&n.parent.is_inline_element)&&(n.parent.multiline_content=!0)};var S=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],w=["a","audio","del","ins","map","noscript","video"];T.prototype._do_optional_end_element=function(r){var n=null;if(!(r.is_empty_element||!r.is_start_tag||!r.parent)){if(r.tag_name==="body")n=n||this._tag_stack.try_pop("head");else if(r.tag_name==="li")n=n||this._tag_stack.try_pop("li",["ol","ul"]);else if(r.tag_name==="dd"||r.tag_name==="dt")n=n||this._tag_stack.try_pop("dt",["dl"]),n=n||this._tag_stack.try_pop("dd",["dl"]);else if(r.parent.tag_name==="p"&&S.indexOf(r.tag_name)!==-1){var t=r.parent.parent;(!t||w.indexOf(t.tag_name)===-1)&&(n=n||this._tag_stack.try_pop("p"))}else r.tag_name==="rp"||r.tag_name==="rt"?(n=n||this._tag_stack.try_pop("rt",["ruby","rtc"]),n=n||this._tag_stack.try_pop("rp",["ruby","rtc"])):r.tag_name==="optgroup"?n=n||this._tag_stack.try_pop("optgroup",["select"]):r.tag_name==="option"?n=n||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):r.tag_name==="colgroup"?n=n||this._tag_stack.try_pop("caption",["table"]):r.tag_name==="thead"?(n=n||this._tag_stack.try_pop("caption",["table"]),n=n||this._tag_stack.try_pop("colgroup",["table"])):r.tag_name==="tbody"||r.tag_name==="tfoot"?(n=n||this._tag_stack.try_pop("caption",["table"]),n=n||this._tag_stack.try_pop("colgroup",["table"]),n=n||this._tag_stack.try_pop("thead",["table"]),n=n||this._tag_stack.try_pop("tbody",["table"])):r.tag_name==="tr"?(n=n||this._tag_stack.try_pop("caption",["table"]),n=n||this._tag_stack.try_pop("colgroup",["table"]),n=n||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(r.tag_name==="th"||r.tag_name==="td")&&(n=n||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),n=n||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return r.parent=this._tag_stack.get_parser_token(),n}},A.exports.Beautifier=T},function(A,f,g){var h=g(6).Options;function p(u){h.call(this,u,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}p.prototype=new h,A.exports.Options=p},function(A,f,g){var h=g(9).Tokenizer,p=g(9).TOKEN,u=g(13).Directives,v=g(14).TemplatablePattern,m=g(12).Pattern,o={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:p.START,RAW:p.RAW,EOF:p.EOF},a=new u(/<\!--/,/-->/),i=function(s,E){h.call(this,s,E),this._current_tag_name="";var b=new v(this._input).read_options(this._options),d=new m(this._input);if(this.__patterns={word:b.until(/[\n\r\t <]/),single_quote:b.until_after(/'/),double_quote:b.until_after(/"/),attribute:b.until(/[\n\r\t =>]|\/>/),element_name:b.until(/[\n\r\t >\/]/),handlebars_comment:d.starting_with(/{{!--/).until_after(/--}}/),handlebars:d.starting_with(/{{/).until_after(/}}/),handlebars_open:d.until(/[\n\r\t }]/),handlebars_raw_close:d.until(/}}/),comment:d.starting_with(/<!--/).until_after(/-->/),cdata:d.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:d.starting_with(/<!\[/).until_after(/]>/),processing:d.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var T=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=d.matching(T).until_after(T)}};i.prototype=new h,i.prototype._is_comment=function(s){return!1},i.prototype._is_opening=function(s){return s.type===o.TAG_OPEN},i.prototype._is_closing=function(s,E){return s.type===o.TAG_CLOSE&&E&&((s.text===">"||s.text==="/>")&&E.text[0]==="<"||s.text==="}}"&&E.text[0]==="{"&&E.text[1]==="{")},i.prototype._reset=function(){this._current_tag_name=""},i.prototype._get_next_token=function(s,E){var b=null;this._readWhitespace();var d=this._input.peek();return d===null?this._create_token(o.EOF,""):(b=b||this._read_open_handlebars(d,E),b=b||this._read_attribute(d,s,E),b=b||this._read_close(d,E),b=b||this._read_raw_content(d,s,E),b=b||this._read_content_word(d),b=b||this._read_comment_or_cdata(d),b=b||this._read_processing(d),b=b||this._read_open(d,E),b=b||this._create_token(o.UNKNOWN,this._input.next()),b)},i.prototype._read_comment_or_cdata=function(s){var E=null,b=null,d=null;if(s==="<"){var T=this._input.peek(1);T==="!"&&(b=this.__patterns.comment.read(),b?(d=a.get_directives(b),d&&d.ignore==="start"&&(b+=a.readIgnored(this._input))):b=this.__patterns.cdata.read()),b&&(E=this._create_token(o.COMMENT,b),E.directives=d)}return E},i.prototype._read_processing=function(s){var E=null,b=null,d=null;if(s==="<"){var T=this._input.peek(1);(T==="!"||T==="?")&&(b=this.__patterns.conditional_comment.read(),b=b||this.__patterns.processing.read()),b&&(E=this._create_token(o.COMMENT,b),E.directives=d)}return E},i.prototype._read_open=function(s,E){var b=null,d=null;return E||s==="<"&&(b=this._input.next(),this._input.peek()==="/"&&(b+=this._input.next()),b+=this.__patterns.element_name.read(),d=this._create_token(o.TAG_OPEN,b)),d},i.prototype._read_open_handlebars=function(s,E){var b=null,d=null;return E||this._options.indent_handlebars&&s==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(b=this.__patterns.handlebars_comment.read(),b=b||this.__patterns.handlebars.read(),d=this._create_token(o.COMMENT,b)):(b=this.__patterns.handlebars_open.read(),d=this._create_token(o.TAG_OPEN,b))),d},i.prototype._read_close=function(s,E){var b=null,d=null;return E&&(E.text[0]==="<"&&(s===">"||s==="/"&&this._input.peek(1)===">")?(b=this._input.next(),s==="/"&&(b+=this._input.next()),d=this._create_token(o.TAG_CLOSE,b)):E.text[0]==="{"&&s==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),d=this._create_token(o.TAG_CLOSE,"}}"))),d},i.prototype._read_attribute=function(s,E,b){var d=null,T="";if(b&&b.text[0]==="<")if(s==="=")d=this._create_token(o.EQUALS,this._input.next());else if(s==='"'||s==="'"){var R=this._input.next();s==='"'?R+=this.__patterns.double_quote.read():R+=this.__patterns.single_quote.read(),d=this._create_token(o.VALUE,R)}else T=this.__patterns.attribute.read(),T&&(E.type===o.EQUALS?d=this._create_token(o.VALUE,T):d=this._create_token(o.ATTRIBUTE,T));return d},i.prototype._is_content_unformatted=function(s){return this._options.void_elements.indexOf(s)===-1&&(this._options.content_unformatted.indexOf(s)!==-1||this._options.unformatted.indexOf(s)!==-1)},i.prototype._read_raw_content=function(s,E,b){var d="";if(b&&b.text[0]==="{")d=this.__patterns.handlebars_raw_close.read();else if(E.type===o.TAG_CLOSE&&E.opened.text[0]==="<"&&E.text[0]!=="/"){var T=E.opened.text.substr(1).toLowerCase();if(T==="script"||T==="style"){var R=this._read_comment_or_cdata(s);if(R)return R.type=o.TEXT,R;d=this._input.readUntil(new RegExp("</"+T+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(T)&&(d=this._input.readUntil(new RegExp("</"+T+"[\\n\\r\\t ]*?>","ig")))}return d?this._create_token(o.TEXT,d):null},i.prototype._read_content_word=function(s){var E="";if(this._options.unformatted_content_delimiter&&s===this._options.unformatted_content_delimiter[0]&&(E=this.__patterns.unformatted_content_delimiter.read()),E||(E=this.__patterns.word.read()),E)return this._create_token(o.TEXT,E)},A.exports.Tokenizer=i,A.exports.TOKEN=o}],M={};function e(A){var f=M[A];if(f!==void 0)return f.exports;var g=M[A]={exports:{}};return P[A](g,g.exports,e),g.exports}var I=e(18);V=I})();var N=V;if(1)Z=[K,K(77937),K(85040)],J=function(P){var M=K(77937),e=K(85040);return{html_beautify:function(I,A){return N(I,A,M.js_beautify,e.css_beautify)}}}.apply(ye,Z),J!==void 0&&(He.exports=J);else var L,C})()},77937:function(He,ye){var K,Z;(function(){var J;(function(){"use strict";var N=[function(M,e,I){var A=I(1).Beautifier,f=I(5).Options;function g(h,p){var u=new A(h,p);return u.beautify()}M.exports=g,M.exports.defaultOptions=function(){return new f}},function(M,e,I){var A=I(2).Output,f=I(3).Token,g=I(4),h=I(5).Options,p=I(7).Tokenizer,u=I(7).line_starters,v=I(7).positionable_operators,m=I(7).TOKEN;function o(_,D){return D.indexOf(_)!==-1}function a(_){return _.replace(/^\s+/g,"")}function i(_){for(var D={},O=0;O<_.length;O++)D[_[O].replace(/-/g,"_")]=_[O];return D}function s(_,D){return _&&_.type===m.RESERVED&&_.text===D}function E(_,D){return _&&_.type===m.RESERVED&&o(_.text,D)}var b=["case","return","do","if","throw","else","await","break","continue","async"],d=["before-newline","after-newline","preserve-newline"],T=i(d),R=[T.before_newline,T.preserve_newline],S={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function w(_,D){D.multiline_frame||D.mode===S.ForInitializer||D.mode===S.Conditional||_.remove_indent(D.start_line_index)}function r(_){_=_.replace(g.allLineBreaks,`
`);for(var D=[],O=_.indexOf(`
`);O!==-1;)D.push(_.substring(0,O)),_=_.substring(O+1),O=_.indexOf(`
`);return _.length&&D.push(_),D}function n(_){return _===S.ArrayLiteral}function t(_){return o(_,[S.Expression,S.ForInitializer,S.Conditional])}function l(_,D){for(var O=0;O<_.length;O++){var k=_[O].trim();if(k.charAt(0)!==D)return!1}return!0}function x(_,D){for(var O=0,k=_.length,F;O<k;O++)if(F=_[O],F&&F.indexOf(D)!==0)return!1;return!0}function y(_,D){D=D||{},this._source_text=_||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new h(D)}y.prototype.create_flags=function(_,D){var O=0;_&&(O=_.indentation_level,!this._output.just_added_newline()&&_.line_indent_level>O&&(O=_.line_indent_level));var k={mode:D,parent:_,last_token:_?_.last_token:new f(m.START_BLOCK,""),last_word:_?_.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:O,alignment:0,line_indent_level:_?_.line_indent_level:O,start_line_index:this._output.get_line_number(),ternary_depth:0};return k},y.prototype._reset=function(_){var D=_.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new A(this._options,D),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(S.BlockStatement);var O=new p(_,this._options);return this._tokens=O.tokenize(),_},y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _,D=this._reset(this._source_text),O=this._options.eol;this._options.eol==="auto"&&(O=`
`,D&&g.lineBreak.test(D||"")&&(O=D.match(g.lineBreak)[0]));for(var k=this._tokens.next();k;)this.handle_token(k),this._last_last_text=this._flags.last_token.text,this._flags.last_token=k,k=this._tokens.next();return _=this._output.get_code(O),_},y.prototype.handle_token=function(_,D){_.type===m.START_EXPR?this.handle_start_expr(_):_.type===m.END_EXPR?this.handle_end_expr(_):_.type===m.START_BLOCK?this.handle_start_block(_):_.type===m.END_BLOCK?this.handle_end_block(_):_.type===m.WORD?this.handle_word(_):_.type===m.RESERVED?this.handle_word(_):_.type===m.SEMICOLON?this.handle_semicolon(_):_.type===m.STRING?this.handle_string(_):_.type===m.EQUALS?this.handle_equals(_):_.type===m.OPERATOR?this.handle_operator(_):_.type===m.COMMA?this.handle_comma(_):_.type===m.BLOCK_COMMENT?this.handle_block_comment(_,D):_.type===m.COMMENT?this.handle_comment(_,D):_.type===m.DOT?this.handle_dot(_):_.type===m.EOF?this.handle_eof(_):_.type===m.UNKNOWN?this.handle_unknown(_,D):this.handle_unknown(_,D)},y.prototype.handle_whitespace_and_comments=function(_,D){var O=_.newlines,k=this._options.keep_array_indentation&&n(this._flags.mode);if(_.comments_before)for(var F=_.comments_before.next();F;)this.handle_whitespace_and_comments(F,D),this.handle_token(F,D),F=_.comments_before.next();if(k)for(var G=0;G<O;G+=1)this.print_newline(G>0,D);else if(this._options.max_preserve_newlines&&O>this._options.max_preserve_newlines&&(O=this._options.max_preserve_newlines),this._options.preserve_newlines&&O>1){this.print_newline(!1,D);for(var H=1;H<O;H+=1)this.print_newline(!0,D)}};var c=["async","break","continue","return","throw","yield"];y.prototype.allow_wrap_or_preserved_newline=function(_,D){if(D=D===void 0?!1:D,!this._output.just_added_newline()){var O=this._options.preserve_newlines&&_.newlines||D,k=o(this._flags.last_token.text,v)||o(_.text,v);if(k){var F=o(this._flags.last_token.text,v)&&o(this._options.operator_position,R)||o(_.text,v);O=O&&F}if(O)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(E(this._flags.last_token,c))return;this._output.set_wrap_point()}}},y.prototype.print_newline=function(_,D){if(!D&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==m.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var O=this._tokens.peek();this._flags.mode===S.Statement&&!(this._flags.if_block&&s(O,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(_)&&(this._flags.multiline_frame=!0)},y.prototype.print_token_line_indentation=function(_){this._output.just_added_newline()&&(this._options.keep_array_indentation&&_.newlines&&(_.text==="["||n(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(_.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},y.prototype.print_token=function(_){if(this._output.raw){this._output.add_raw_token(_);return}if(this._options.comma_first&&_.previous&&_.previous.type===m.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var D=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(D),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(_),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(_),this._output.non_breaking_space=!0,this._output.add_token(_.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},y.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},y.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},y.prototype.set_mode=function(_){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,_),this._flags=this.create_flags(this._previous_flags,_),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},y.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===S.Statement&&w(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},y.prototype.start_of_object_property=function(){return this._flags.parent.mode===S.ObjectLiteral&&this._flags.mode===S.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||E(this._flags.last_token,["get","set"]))},y.prototype.start_of_statement=function(_){var D=!1;return D=D||E(this._flags.last_token,["var","let","const"])&&_.type===m.WORD,D=D||s(this._flags.last_token,"do"),D=D||!(this._flags.parent.mode===S.ObjectLiteral&&this._flags.mode===S.Statement)&&E(this._flags.last_token,c)&&!_.newlines,D=D||s(this._flags.last_token,"else")&&!(s(_,"if")&&!_.comments_before),D=D||this._flags.last_token.type===m.END_EXPR&&(this._previous_flags.mode===S.ForInitializer||this._previous_flags.mode===S.Conditional),D=D||this._flags.last_token.type===m.WORD&&this._flags.mode===S.BlockStatement&&!this._flags.in_case&&!(_.text==="--"||_.text==="++")&&this._last_last_text!=="function"&&_.type!==m.WORD&&_.type!==m.RESERVED,D=D||this._flags.mode===S.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||E(this._flags.last_token,["get","set"])),D?(this.set_mode(S.Statement),this.indent(),this.handle_whitespace_and_comments(_,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_,E(_,["do","for","if","while"])),!0):!1},y.prototype.handle_start_expr=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_);var D=S.Expression;if(_.text==="["){if(this._flags.last_token.type===m.WORD||this._flags.last_token.text===")"){E(this._flags.last_token,u)&&(this._output.space_before_token=!0),this.print_token(_),this.set_mode(D),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}D=S.ArrayLiteral,n(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),o(this._flags.last_token.type,[m.START_EXPR,m.END_EXPR,m.WORD,m.OPERATOR,m.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===m.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,D=S.ForInitializer):o(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,D=S.Conditional):o(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&_.whitespace_before===""?this._output.space_before_token=!1:(o(this._flags.last_token.text,u)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===m.EQUALS||this._flags.last_token.type===m.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_);else if(this._flags.last_token.type===m.WORD){this._output.space_before_token=!1;var O=this._tokens.peek(-3);if(this._options.space_after_named_function&&O){var k=this._tokens.peek(-4);E(O,["async","function"])||O.text==="*"&&E(k,["async","function"])?this._output.space_before_token=!0:this._flags.mode===S.ObjectLiteral?(O.text==="{"||O.text===","||O.text==="*"&&(k.text==="{"||k.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(_);(this._flags.last_token.type===m.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(o(this._last_last_text,["function","yield"])||this._flags.mode===S.ObjectLiteral&&o(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===m.START_BLOCK?this.print_newline():(this._flags.last_token.type===m.END_EXPR||this._flags.last_token.type===m.START_EXPR||this._flags.last_token.type===m.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===m.COMMA)&&this.allow_wrap_or_preserved_newline(_,_.newlines),this.print_token(_),this.set_mode(D),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},y.prototype.handle_end_expr=function(_){for(;this._flags.mode===S.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(_,_.text==="]"&&n(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===m.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(_),this.restore_mode(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===S.Conditional&&(this._previous_flags.mode=S.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},y.prototype.handle_start_block=function(_){this.handle_whitespace_and_comments(_);var D=this._tokens.peek(),O=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===m.END_EXPR?(this.set_mode(S.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(S.BlockStatement):O&&(o(O.text,[":",","])&&o(D.type,[m.STRING,m.WORD,m.RESERVED])||o(D.text,["get","set","..."])&&o(O.type,[m.WORD,m.RESERVED]))?o(this._last_last_text,["class","interface"])&&!o(O.text,[":",","])?this.set_mode(S.BlockStatement):this.set_mode(S.ObjectLiteral):this._flags.last_token.type===m.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(S.BlockStatement):o(this._flags.last_token.type,[m.EQUALS,m.START_EXPR,m.COMMA,m.OPERATOR])||E(this._flags.last_token,["return","throw","import","default"])?this.set_mode(S.ObjectLiteral):this.set_mode(S.BlockStatement),this._flags.last_token&&E(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var k=!D.comments_before&&D.text==="}",F=k&&this._flags.last_word==="function"&&this._flags.last_token.type===m.END_EXPR;if(this._options.brace_preserve_inline){var G=0,H=null;this._flags.inline_frame=!0;do if(G+=1,H=this._tokens.peek(G-1),H.newlines){this._flags.inline_frame=!1;break}while(H.type!==m.EOF&&!(H.type===m.END_BLOCK&&H.opened===_))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==m.OPERATOR&&(F||this._flags.last_token.type===m.EQUALS||E(this._flags.last_token,b)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(n(this._previous_flags.mode)&&(this._flags.last_token.type===m.START_EXPR||this._flags.last_token.type===m.COMMA)&&((this._flags.last_token.type===m.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===m.COMMA||this._flags.last_token.type===m.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(_),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==m.OPERATOR&&this._flags.last_token.type!==m.START_EXPR&&(this._flags.last_token.type===m.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(_),this.indent(),!k&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},y.prototype.handle_end_block=function(_){for(this.handle_whitespace_and_comments(_);this._flags.mode===S.Statement;)this.restore_mode();var D=this._flags.last_token.type===m.START_BLOCK;this._flags.inline_frame&&!D?this._output.space_before_token=!0:this._options.brace_style==="expand"?D||this.print_newline():D||(n(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(_)},y.prototype.handle_word=function(_){if(_.type===m.RESERVED){if(o(_.text,["set","get"])&&this._flags.mode!==S.ObjectLiteral)_.type=m.WORD;else if(_.text==="import"&&o(this._tokens.peek().text,["(","."]))_.type=m.WORD;else if(o(_.text,["as","from"])&&!this._flags.import_block)_.type=m.WORD;else if(this._flags.mode===S.ObjectLiteral){var D=this._tokens.peek();D.text===":"&&(_.type=m.WORD)}}if(this.start_of_statement(_)?E(this._flags.last_token,["var","let","const"])&&_.type===m.WORD&&(this._flags.declaration_statement=!0):_.newlines&&!t(this._flags.mode)&&(this._flags.last_token.type!==m.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==m.EQUALS&&(this._options.preserve_newlines||!E(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(_),this.print_newline()):this.handle_whitespace_and_comments(_),this._flags.do_block&&!this._flags.do_while)if(s(_,"while")){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&s(_,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===S.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&E(_,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(_),this._flags.in_case=!0;return}if((this._flags.last_token.type===m.COMMA||this._flags.last_token.type===m.START_EXPR||this._flags.last_token.type===m.EQUALS||this._flags.last_token.type===m.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_)),s(_,"function")){(o(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(o(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===m.OPERATOR))&&!this._output.just_added_blankline()&&!_.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===m.RESERVED||this._flags.last_token.type===m.WORD?E(this._flags.last_token,["get","set","new","export"])||E(this._flags.last_token,c)?this._output.space_before_token=!0:s(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===m.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(t(this._flags.mode)||n(this._flags.mode))||this.print_newline(),this.print_token(_),this._flags.last_word=_.text;return}var O="NONE";if(this._flags.last_token.type===m.END_BLOCK?this._previous_flags.inline_frame?O="SPACE":E(_,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines?O="NEWLINE":(O="SPACE",this._output.space_before_token=!0):O="NEWLINE":this._flags.last_token.type===m.SEMICOLON&&this._flags.mode===S.BlockStatement?O="NEWLINE":this._flags.last_token.type===m.SEMICOLON&&t(this._flags.mode)?O="SPACE":this._flags.last_token.type===m.STRING?O="NEWLINE":this._flags.last_token.type===m.RESERVED||this._flags.last_token.type===m.WORD||this._flags.last_token.text==="*"&&(o(this._last_last_text,["function","yield"])||this._flags.mode===S.ObjectLiteral&&o(this._last_last_text,["{",","]))?O="SPACE":this._flags.last_token.type===m.START_BLOCK?this._flags.inline_frame?O="SPACE":O="NEWLINE":this._flags.last_token.type===m.END_EXPR&&(this._output.space_before_token=!0,O="NEWLINE"),E(_,u)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?O="SPACE":O="NEWLINE"),E(_,["else","catch","finally"]))if((!(this._flags.last_token.type===m.END_BLOCK&&this._previous_flags.mode===S.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var k=this._output.current_line;k.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else O==="NEWLINE"?E(this._flags.last_token,b)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&E(_,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==m.END_EXPR?(this._flags.last_token.type!==m.START_EXPR||!E(_,["var","let","const"]))&&this._flags.last_token.text!==":"&&(s(_,"if")&&s(_.previous,"else")?this._output.space_before_token=!0:this.print_newline()):E(_,u)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&n(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():O==="SPACE"&&(this._output.space_before_token=!0);_.previous&&(_.previous.type===m.WORD||_.previous.type===m.RESERVED)&&(this._output.space_before_token=!0),this.print_token(_),this._flags.last_word=_.text,_.type===m.RESERVED&&(_.text==="do"?this._flags.do_block=!0:_.text==="if"?this._flags.if_block=!0:_.text==="import"?this._flags.import_block=!0:this._flags.import_block&&s(_,"from")&&(this._flags.import_block=!1))},y.prototype.handle_semicolon=function(_){this.start_of_statement(_)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(_);for(var D=this._tokens.peek();this._flags.mode===S.Statement&&!(this._flags.if_block&&s(D,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(_)},y.prototype.handle_string=function(_){_.text.startsWith("`")&&_.newlines===0&&_.whitespace_before===""&&(_.previous.text===")"||this._flags.last_token.type===m.WORD)||(this.start_of_statement(_)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(_),this._flags.last_token.type===m.RESERVED||this._flags.last_token.type===m.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===m.COMMA||this._flags.last_token.type===m.START_EXPR||this._flags.last_token.type===m.EQUALS||this._flags.last_token.type===m.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_):_.text.startsWith("`")&&this._flags.last_token.type===m.END_EXPR&&(_.previous.text==="]"||_.previous.text===")")&&_.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(_)},y.prototype.handle_equals=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0},y.prototype.handle_comma=function(_){this.handle_whitespace_and_comments(_,!0),this.print_token(_),this._output.space_before_token=!0,this._flags.declaration_statement?(t(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)):this._flags.mode===S.ObjectLiteral||this._flags.mode===S.Statement&&this._flags.parent.mode===S.ObjectLiteral?(this._flags.mode===S.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)},y.prototype.handle_operator=function(_){var D=_.text==="*"&&(E(this._flags.last_token,["function","yield"])||o(this._flags.last_token.type,[m.START_BLOCK,m.COMMA,m.END_BLOCK,m.SEMICOLON])),O=o(_.text,["-","+"])&&(o(this._flags.last_token.type,[m.START_BLOCK,m.START_EXPR,m.EQUALS,m.OPERATOR])||o(this._flags.last_token.text,u)||this._flags.last_token.text===",");if(!this.start_of_statement(_)){var k=!D;this.handle_whitespace_and_comments(_,k)}if(_.text==="*"&&this._flags.last_token.type===m.DOT){this.print_token(_);return}if(_.text==="::"){this.print_token(_);return}if(this._flags.last_token.type===m.OPERATOR&&o(this._options.operator_position,R)&&this.allow_wrap_or_preserved_newline(_),_.text===":"&&this._flags.in_case){this.print_token(_),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==m.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var F=!0,G=!0,H=!1;if(_.text===":"?this._flags.ternary_depth===0?F=!1:(this._flags.ternary_depth-=1,H=!0):_.text==="?"&&(this._flags.ternary_depth+=1),!O&&!D&&this._options.preserve_newlines&&o(_.text,v)){var j=_.text===":",Q=j&&H,ee=j&&!H;switch(this._options.operator_position){case T.before_newline:this._output.space_before_token=!ee,this.print_token(_),(!j||Q)&&this.allow_wrap_or_preserved_newline(_),this._output.space_before_token=!0;return;case T.after_newline:this._output.space_before_token=!0,!j||Q?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(_):this._output.space_before_token=!1,this.print_token(_),this._output.space_before_token=!0;return;case T.preserve_newline:ee||this.allow_wrap_or_preserved_newline(_),F=!(this._output.just_added_newline()||ee),this._output.space_before_token=F,this.print_token(_),this._output.space_before_token=!0;return}}if(D){this.allow_wrap_or_preserved_newline(_),F=!1;var ie=this._tokens.peek();G=ie&&o(ie.type,[m.WORD,m.RESERVED])}else if(_.text==="...")this.allow_wrap_or_preserved_newline(_),F=this._flags.last_token.type===m.START_BLOCK,G=!1;else if(o(_.text,["--","++","!","~"])||O){if((this._flags.last_token.type===m.COMMA||this._flags.last_token.type===m.START_EXPR)&&this.allow_wrap_or_preserved_newline(_),F=!1,G=!1,_.newlines&&(_.text==="--"||_.text==="++"||_.text==="~")){var se=E(this._flags.last_token,b)&&_.newlines;se&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(se,!0)}this._flags.last_token.text===";"&&t(this._flags.mode)&&(F=!0),this._flags.last_token.type===m.RESERVED?F=!0:this._flags.last_token.type===m.END_EXPR?F=!(this._flags.last_token.text==="]"&&(_.text==="--"||_.text==="++")):this._flags.last_token.type===m.OPERATOR&&(F=o(_.text,["--","-","++","+"])&&o(this._flags.last_token.text,["--","-","++","+"]),o(_.text,["+","-"])&&o(this._flags.last_token.text,["--","++"])&&(G=!0)),(this._flags.mode===S.BlockStatement&&!this._flags.inline_frame||this._flags.mode===S.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||F,this.print_token(_),this._output.space_before_token=G},y.prototype.handle_block_comment=function(_,D){if(this._output.raw){this._output.add_raw_token(_),_.directives&&_.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(_.directives){this.print_newline(!1,D),this.print_token(_),_.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!g.newline.test(_.text)&&!_.newlines){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0;return}else this.print_block_commment(_,D)},y.prototype.print_block_commment=function(_,D){var O=r(_.text),k,F=!1,G=!1,H=_.whitespace_before,j=H.length;if(this.print_newline(!1,D),this.print_token_line_indentation(_),this._output.add_token(O[0]),this.print_newline(!1,D),O.length>1){for(O=O.slice(1),F=l(O,"*"),G=x(O,H),F&&(this._flags.alignment=1),k=0;k<O.length;k++)F?(this.print_token_line_indentation(_),this._output.add_token(a(O[k]))):G&&O[k]?(this.print_token_line_indentation(_),this._output.add_token(O[k].substring(j))):(this._output.current_line.set_indent(-1),this._output.add_token(O[k])),this.print_newline(!1,D);this._flags.alignment=0}},y.prototype.handle_comment=function(_,D){_.newlines?this.print_newline(!1,D):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(_),this.print_newline(!1,D)},y.prototype.handle_dot=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),E(this._flags.last_token,b)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(_,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(_)},y.prototype.handle_unknown=function(_,D){this.print_token(_),_.text[_.text.length-1]===`
`&&this.print_newline(!1,D)},y.prototype.handle_eof=function(_){for(;this._flags.mode===S.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_)},M.exports.Beautifier=y},function(M){function e(f){this.__parent=f,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}e.prototype.clone_empty=function(){var f=new e(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f},e.prototype.item=function(f){return f<0?this.__items[this.__items.length+f]:this.__items[f]},e.prototype.has_match=function(f){for(var g=this.__items.length-1;g>=0;g--)if(this.__items[g].match(f))return!0;return!1},e.prototype.set_indent=function(f,g){this.is_empty()&&(this.__indent_count=f||0,this.__alignment_count=g||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;return f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" "&&(f.__items.splice(0,1),f.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return this.__items.length===0},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(f){this.__items.push(f);var g=f.lastIndexOf(`
`);g!==-1?this.__character_count=f.length-g:this.__character_count+=f.length},e.prototype.pop=function(){var f=null;return this.is_empty()||(f=this.__items.pop(),this.__character_count-=f.length),f},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var f="";return this.is_empty()?this.__parent.indent_empty_lines&&(f=this.__parent.get_indent_string(this.__indent_count)):(f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("")),f};function I(f,g){this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,f.indent_with_tabs||(this.__indent_string=new Array(f.indent_size+1).join(f.indent_char)),g=g||"",f.indent_level>0&&(g=new Array(f.indent_level+1).join(this.__indent_string)),this.__base_string=g,this.__base_string_length=g.length}I.prototype.get_indent_size=function(f,g){var h=this.__base_string_length;return g=g||0,f<0&&(h=0),h+=f*this.__indent_size,h+=g,h},I.prototype.get_indent_string=function(f,g){var h=this.__base_string;return g=g||0,f<0&&(f=0,h=""),g+=f*this.__indent_size,this.__ensure_cache(g),h+=this.__cache[g],h},I.prototype.__ensure_cache=function(f){for(;f>=this.__cache.length;)this.__add_column()},I.prototype.__add_column=function(){var f=this.__cache.length,g=0,h="";this.__indent_size&&f>=this.__indent_size&&(g=Math.floor(f/this.__indent_size),f-=g*this.__indent_size,h=new Array(g+1).join(this.__indent_string)),f&&(h+=new Array(f+1).join(" ")),this.__cache.push(h)};function A(f,g){this.__indent_cache=new I(f,g),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}A.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},A.prototype.get_line_number=function(){return this.__lines.length},A.prototype.get_indent_string=function(f,g){return this.__indent_cache.get_indent_string(f,g)},A.prototype.get_indent_size=function(f,g){return this.__indent_cache.get_indent_size(f,g)},A.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},A.prototype.add_new_line=function(f){return this.is_empty()||!f&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},A.prototype.get_code=function(f){this.trim(!0);var g=this.current_line.pop();g&&(g[g.length-1]===`
`&&(g=g.replace(/\n+$/g,"")),this.current_line.push(g)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(`
`);return f!==`
`&&(h=h.replace(/[\n]/g,f)),h},A.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},A.prototype.set_indent=function(f,g){return f=f||0,g=g||0,this.next_line.set_indent(f,g),this.__lines.length>1?(this.current_line.set_indent(f,g),!0):(this.current_line.set_indent(),!1)},A.prototype.add_raw_token=function(f){for(var g=0;g<f.newlines;g++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(f.whitespace_before),this.current_line.push(f.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},A.prototype.add_token=function(f){this.__add_space_before_token(),this.current_line.push(f),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},A.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},A.prototype.remove_indent=function(f){for(var g=this.__lines.length;f<g;)this.__lines[f]._remove_indent(),f++;this.current_line._remove_wrap_indent()},A.prototype.trim=function(f){for(f=f===void 0?!1:f,this.current_line.trim();f&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},A.prototype.just_added_newline=function(){return this.current_line.is_empty()},A.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},A.prototype.ensure_empty_line_above=function(f,g){for(var h=this.__lines.length-2;h>=0;){var p=this.__lines[h];if(p.is_empty())break;if(p.item(0).indexOf(f)!==0&&p.item(-1)!==g){this.__lines.splice(h+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},M.exports.Output=A},function(M){function e(I,A,f,g){this.type=I,this.text=A,this.comments_before=null,this.newlines=f||0,this.whitespace_before=g||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}M.exports.Token=e},function(M,e){var I="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",A="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",g="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",h="(?:\\\\u[0-9a-fA-F]{4}|["+I+f+"])",p="(?:\\\\u[0-9a-fA-F]{4}|["+A+f+g+"])*";e.identifier=new RegExp(h+p,"g"),e.identifierStart=new RegExp(h),e.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+A+f+g+"])+");var u=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp(`\r
|`+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")},function(M,e,I){var A=I(6).Options,f=["before-newline","after-newline","preserve-newline"];function g(h){A.call(this,h,"js");var p=this.raw_options.brace_style||null;p==="expand-strict"?this.raw_options.brace_style="expand":p==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var v=0;v<u.length;v++)u[v]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=u[v];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",f),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}g.prototype=new A,M.exports.Options=g},function(M){function e(f,g){this.raw_options=I(f,g),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}e.prototype._get_array=function(f,g){var h=this.raw_options[f],p=g||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(p=h.concat()):typeof h=="string"&&(p=h.split(/[^a-zA-Z0-9_\/\-]+/)),p},e.prototype._get_boolean=function(f,g){var h=this.raw_options[f],p=h===void 0?!!g:!!h;return p},e.prototype._get_characters=function(f,g){var h=this.raw_options[f],p=g||"";return typeof h=="string"&&(p=h.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),p},e.prototype._get_number=function(f,g){var h=this.raw_options[f];g=parseInt(g,10),isNaN(g)&&(g=0);var p=parseInt(h,10);return isNaN(p)&&(p=g),p},e.prototype._get_selection=function(f,g,h){var p=this._get_selection_list(f,g,h);if(p.length!==1)throw new Error("Invalid Option Value: The option '"+f+`' can only be one of the following values:
`+g+`
You passed in: '`+this.raw_options[f]+"'");return p[0]},e.prototype._get_selection_list=function(f,g,h){if(!g||g.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[g[0]],!this._is_valid_selection(h,g))throw new Error("Invalid Default Value!");var p=this._get_array(f,h);if(!this._is_valid_selection(p,g))throw new Error("Invalid Option Value: The option '"+f+`' can contain only the following values:
`+g+`
You passed in: '`+this.raw_options[f]+"'");return p},e.prototype._is_valid_selection=function(f,g){return f.length&&g.length&&!f.some(function(h){return g.indexOf(h)===-1})};function I(f,g){var h={};f=A(f);var p;for(p in f)p!==g&&(h[p]=f[p]);if(g&&f[g])for(p in f[g])h[p]=f[g][p];return h}function A(f){var g={},h;for(h in f){var p=h.replace(/-/g,"_");g[p]=f[h]}return g}M.exports.Options=e,M.exports.normalizeOpts=A,M.exports.mergeOpts=I},function(M,e,I){var A=I(8).InputScanner,f=I(9).Tokenizer,g=I(9).TOKEN,h=I(13).Directives,p=I(4),u=I(12).Pattern,v=I(14).TemplatablePattern;function m(l,x){return x.indexOf(l)!==-1}var o={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:g.START,RAW:g.RAW,EOF:g.EOF},a=new h(/\/\*/,/\*\//),i=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,s=/[0-9]/,E=/[^\d\.]/,b=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),d=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";d=d.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d="\\?\\.(?!\\d) "+d,d=d.replace(/ /g,"|");var T=new RegExp(d),R="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),S=R.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),w=new RegExp("^(?:"+S.join("|")+")$"),r,n=function(l,x){f.call(this,l,x),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var y=new u(this._input),c=new v(this._input).read_options(this._options);this.__patterns={template:c,identifier:c.starting_with(p.identifier).matching(p.identifierMatch),number:y.matching(i),punct:y.matching(T),comment:y.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:y.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:y.matching(/<!--/),html_comment_end:y.matching(/-->/),include:y.starting_with(/#include/).until_after(p.lineBreak),shebang:y.starting_with(/#!/).until_after(p.lineBreak),xml:y.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:c.until(/['\\\n\r\u2028\u2029]/),double_quote:c.until(/["\\\n\r\u2028\u2029]/),template_text:c.until(/[`\\$]/),template_expression:c.until(/[`}\\]/)}};n.prototype=new f,n.prototype._is_comment=function(l){return l.type===o.COMMENT||l.type===o.BLOCK_COMMENT||l.type===o.UNKNOWN},n.prototype._is_opening=function(l){return l.type===o.START_BLOCK||l.type===o.START_EXPR},n.prototype._is_closing=function(l,x){return(l.type===o.END_BLOCK||l.type===o.END_EXPR)&&x&&(l.text==="]"&&x.text==="["||l.text===")"&&x.text==="("||l.text==="}"&&x.text==="{")},n.prototype._reset=function(){r=!1},n.prototype._get_next_token=function(l,x){var y=null;this._readWhitespace();var c=this._input.peek();return c===null?this._create_token(o.EOF,""):(y=y||this._read_non_javascript(c),y=y||this._read_string(c),y=y||this._read_word(l),y=y||this._read_singles(c),y=y||this._read_comment(c),y=y||this._read_regexp(c,l),y=y||this._read_xml(c,l),y=y||this._read_punctuation(),y=y||this._create_token(o.UNKNOWN,this._input.next()),y)},n.prototype._read_word=function(l){var x;if(x=this.__patterns.identifier.read(),x!=="")return x=x.replace(p.allLineBreaks,`
`),!(l.type===o.DOT||l.type===o.RESERVED&&(l.text==="set"||l.text==="get"))&&w.test(x)?(x==="in"||x==="of")&&(l.type===o.WORD||l.type===o.STRING)?this._create_token(o.OPERATOR,x):this._create_token(o.RESERVED,x):this._create_token(o.WORD,x);if(x=this.__patterns.number.read(),x!=="")return this._create_token(o.WORD,x)},n.prototype._read_singles=function(l){var x=null;return l==="("||l==="["?x=this._create_token(o.START_EXPR,l):l===")"||l==="]"?x=this._create_token(o.END_EXPR,l):l==="{"?x=this._create_token(o.START_BLOCK,l):l==="}"?x=this._create_token(o.END_BLOCK,l):l===";"?x=this._create_token(o.SEMICOLON,l):l==="."&&E.test(this._input.peek(1))?x=this._create_token(o.DOT,l):l===","&&(x=this._create_token(o.COMMA,l)),x&&this._input.next(),x},n.prototype._read_punctuation=function(){var l=this.__patterns.punct.read();if(l!=="")return l==="="?this._create_token(o.EQUALS,l):l==="?."?this._create_token(o.DOT,l):this._create_token(o.OPERATOR,l)},n.prototype._read_non_javascript=function(l){var x="";if(l==="#"){if(this._is_first_token()&&(x=this.__patterns.shebang.read(),x))return this._create_token(o.UNKNOWN,x.trim()+`
`);if(x=this.__patterns.include.read(),x)return this._create_token(o.UNKNOWN,x.trim()+`
`);l=this._input.next();var y="#";if(this._input.hasNext()&&this._input.testChar(s)){do l=this._input.next(),y+=l;while(this._input.hasNext()&&l!=="#"&&l!=="=");return l==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(y+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(y+="{}",this._input.next(),this._input.next())),this._create_token(o.WORD,y)}this._input.back()}else if(l==="<"&&this._is_first_token()){if(x=this.__patterns.html_comment_start.read(),x){for(;this._input.hasNext()&&!this._input.testChar(p.newline);)x+=this._input.next();return r=!0,this._create_token(o.COMMENT,x)}}else if(r&&l==="-"&&(x=this.__patterns.html_comment_end.read(),x))return r=!1,this._create_token(o.COMMENT,x);return null},n.prototype._read_comment=function(l){var x=null;if(l==="/"){var y="";if(this._input.peek(1)==="*"){y=this.__patterns.block_comment.read();var c=a.get_directives(y);c&&c.ignore==="start"&&(y+=a.readIgnored(this._input)),y=y.replace(p.allLineBreaks,`
`),x=this._create_token(o.BLOCK_COMMENT,y),x.directives=c}else this._input.peek(1)==="/"&&(y=this.__patterns.comment.read(),x=this._create_token(o.COMMENT,y))}return x},n.prototype._read_string=function(l){if(l==="`"||l==="'"||l==='"'){var x=this._input.next();return this.has_char_escapes=!1,l==="`"?x+=this._read_string_recursive("`",!0,"${"):x+=this._read_string_recursive(l),this.has_char_escapes&&this._options.unescape_strings&&(x=t(x)),this._input.peek()===l&&(x+=this._input.next()),x=x.replace(p.allLineBreaks,`
`),this._create_token(o.STRING,x)}return null},n.prototype._allow_regexp_or_xml=function(l){return l.type===o.RESERVED&&m(l.text,["return","case","throw","else","do","typeof","yield"])||l.type===o.END_EXPR&&l.text===")"&&l.opened.previous.type===o.RESERVED&&m(l.opened.previous.text,["if","while","for"])||m(l.type,[o.COMMENT,o.START_EXPR,o.START_BLOCK,o.START,o.END_BLOCK,o.OPERATOR,o.EQUALS,o.EOF,o.SEMICOLON,o.COMMA])},n.prototype._read_regexp=function(l,x){if(l==="/"&&this._allow_regexp_or_xml(x)){for(var y=this._input.next(),c=!1,_=!1;this._input.hasNext()&&(c||_||this._input.peek()!==l)&&!this._input.testChar(p.newline);)y+=this._input.peek(),c?c=!1:(c=this._input.peek()==="\\",this._input.peek()==="["?_=!0:this._input.peek()==="]"&&(_=!1)),this._input.next();return this._input.peek()===l&&(y+=this._input.next(),y+=this._input.read(p.identifier)),this._create_token(o.STRING,y)}return null},n.prototype._read_xml=function(l,x){if(this._options.e4x&&l==="<"&&this._allow_regexp_or_xml(x)){var y="",c=this.__patterns.xml.read_match();if(c){for(var _=c[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),D=_.indexOf("{")===0,O=0;c;){var k=!!c[1],F=c[2],G=!!c[c.length-1]||F.slice(0,8)==="![CDATA[";if(!G&&(F===_||D&&F.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(k?--O:++O),y+=c[0],O<=0)break;c=this.__patterns.xml.read_match()}return c||(y+=this._input.match(/[\s\S]*/g)[0]),y=y.replace(p.allLineBreaks,`
`),this._create_token(o.STRING,y)}}return null};function t(l){for(var x="",y=0,c=new A(l),_=null;c.hasNext();)if(_=c.match(/([\s]|[^\\]|\\\\)+/g),_&&(x+=_[0]),c.peek()==="\\"){if(c.next(),c.peek()==="x")_=c.match(/x([0-9A-Fa-f]{2})/g);else if(c.peek()==="u")_=c.match(/u([0-9A-Fa-f]{4})/g);else{x+="\\",c.hasNext()&&(x+=c.next());continue}if(!_||(y=parseInt(_[1],16),y>126&&y<=255&&_[0].indexOf("x")===0))return l;if(y>=0&&y<32){x+="\\"+_[0];continue}else y===34||y===39||y===92?x+="\\"+String.fromCharCode(y):x+=String.fromCharCode(y)}return x}n.prototype._read_string_recursive=function(l,x,y){var c,_;l==="'"?_=this.__patterns.single_quote:l==='"'?_=this.__patterns.double_quote:l==="`"?_=this.__patterns.template_text:l==="}"&&(_=this.__patterns.template_expression);for(var D=_.read(),O="";this._input.hasNext();){if(O=this._input.next(),O===l||!x&&p.newline.test(O)){this._input.back();break}else O==="\\"&&this._input.hasNext()?(c=this._input.peek(),c==="x"||c==="u"?this.has_char_escapes=!0:c==="\r"&&this._input.peek(1)===`
`&&this._input.next(),O+=this._input.next()):y&&(y==="${"&&O==="$"&&this._input.peek()==="{"&&(O+=this._input.next()),y===O&&(l==="`"?O+=this._read_string_recursive("}",x,"`"):O+=this._read_string_recursive("`",x,"${"),this._input.hasNext()&&(O+=this._input.next())));O+=_.read(),D+=O}return D},M.exports.Tokenizer=n,M.exports.TOKEN=o,M.exports.positionable_operators=b.slice(),M.exports.line_starters=R.slice()},function(M){var e=RegExp.prototype.hasOwnProperty("sticky");function I(A){this.__input=A||"",this.__input_length=this.__input.length,this.__position=0}I.prototype.restart=function(){this.__position=0},I.prototype.back=function(){this.__position>0&&(this.__position-=1)},I.prototype.hasNext=function(){return this.__position<this.__input_length},I.prototype.next=function(){var A=null;return this.hasNext()&&(A=this.__input.charAt(this.__position),this.__position+=1),A},I.prototype.peek=function(A){var f=null;return A=A||0,A+=this.__position,A>=0&&A<this.__input_length&&(f=this.__input.charAt(A)),f},I.prototype.__match=function(A,f){A.lastIndex=f;var g=A.exec(this.__input);return g&&!(e&&A.sticky)&&g.index!==f&&(g=null),g},I.prototype.test=function(A,f){return f=f||0,f+=this.__position,f>=0&&f<this.__input_length?!!this.__match(A,f):!1},I.prototype.testChar=function(A,f){var g=this.peek(f);return A.lastIndex=0,g!==null&&A.test(g)},I.prototype.match=function(A){var f=this.__match(A,this.__position);return f?this.__position+=f[0].length:f=null,f},I.prototype.read=function(A,f,g){var h="",p;return A&&(p=this.match(A),p&&(h+=p[0])),f&&(p||!A)&&(h+=this.readUntil(f,g)),h},I.prototype.readUntil=function(A,f){var g="",h=this.__position;A.lastIndex=this.__position;var p=A.exec(this.__input);return p?(h=p.index,f&&(h+=p[0].length)):h=this.__input_length,g=this.__input.substring(this.__position,h),this.__position=h,g},I.prototype.readUntilAfter=function(A){return this.readUntil(A,!0)},I.prototype.get_regexp=function(A,f){var g=null,h="g";return f&&e&&(h="y"),typeof A=="string"&&A!==""?g=new RegExp(A,h):A&&(g=new RegExp(A.source,h)),g},I.prototype.get_literal_regexp=function(A){return RegExp(A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},I.prototype.peekUntilAfter=function(A){var f=this.__position,g=this.readUntilAfter(A);return this.__position=f,g},I.prototype.lookBack=function(A){var f=this.__position-1;return f>=A.length&&this.__input.substring(f-A.length,f).toLowerCase()===A},M.exports.InputScanner=I},function(M,e,I){var A=I(8).InputScanner,f=I(3).Token,g=I(10).TokenStream,h=I(11).WhitespacePattern,p={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(v,m){this._input=new A(v),this._options=m||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new h(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new g,this._reset();for(var v,m=new f(p.START,""),o=null,a=[],i=new g;m.type!==p.EOF;){for(v=this._get_next_token(m,o);this._is_comment(v);)i.add(v),v=this._get_next_token(m,o);i.isEmpty()||(v.comments_before=i,i=new g),v.parent=o,this._is_opening(v)?(a.push(o),o=v):o&&this._is_closing(v,o)&&(v.opened=o,o.closed=v,o=a.pop(),v.parent=o),v.previous=m,m.next=v,this.__tokens.add(v),m=v}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(v,m){this._readWhitespace();var o=this._input.read(/.+/g);return o?this._create_token(p.RAW,o):this._create_token(p.EOF,"")},u.prototype._is_comment=function(v){return!1},u.prototype._is_opening=function(v){return!1},u.prototype._is_closing=function(v,m){return!1},u.prototype._create_token=function(v,m){var o=new f(v,m,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return o},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},M.exports.Tokenizer=u,M.exports.TOKEN=p},function(M){function e(I){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=I}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return this.__tokens_length===0},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var I=null;return this.hasNext()&&(I=this.__tokens[this.__position],this.__position+=1),I},e.prototype.peek=function(I){var A=null;return I=I||0,I+=this.__position,I>=0&&I<this.__tokens_length&&(A=this.__tokens[I]),A},e.prototype.add=function(I){this.__parent_token&&(I.parent=this.__parent_token),this.__tokens.push(I),this.__tokens_length+=1},M.exports.TokenStream=e},function(M,e,I){var A=I(12).Pattern;function f(g,h){A.call(this,g,h),h?this._line_regexp=this._input.get_regexp(h._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}f.prototype=new A,f.prototype.__set_whitespace_patterns=function(g,h){g+="\\t ",h+="\\n\\r",this._match_pattern=this._input.get_regexp("["+g+h+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+h+"]")},f.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var g=this._input.read(this._match_pattern);if(g===" ")this.whitespace_before_token=" ";else if(g){var h=this.__split(this._newline_regexp,g);this.newline_count=h.length-1,this.whitespace_before_token=h[this.newline_count]}return g},f.prototype.matching=function(g,h){var p=this._create();return p.__set_whitespace_patterns(g,h),p._update(),p},f.prototype._create=function(){return new f(this._input,this)},f.prototype.__split=function(g,h){g.lastIndex=0;for(var p=0,u=[],v=g.exec(h);v;)u.push(h.substring(p,v.index)),p=v.index+v[0].length,v=g.exec(h);return p<h.length?u.push(h.substring(p,h.length)):u.push(""),u},M.exports.WhitespacePattern=f},function(M){function e(I,A){this._input=I,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,A&&(this._starting_pattern=this._input.get_regexp(A._starting_pattern,!0),this._match_pattern=this._input.get_regexp(A._match_pattern,!0),this._until_pattern=this._input.get_regexp(A._until_pattern),this._until_after=A._until_after)}e.prototype.read=function(){var I=this._input.read(this._starting_pattern);return(!this._starting_pattern||I)&&(I+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),I},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(I){var A=this._create();return A._until_after=!0,A._until_pattern=this._input.get_regexp(I),A._update(),A},e.prototype.until=function(I){var A=this._create();return A._until_after=!1,A._until_pattern=this._input.get_regexp(I),A._update(),A},e.prototype.starting_with=function(I){var A=this._create();return A._starting_pattern=this._input.get_regexp(I,!0),A._update(),A},e.prototype.matching=function(I){var A=this._create();return A._match_pattern=this._input.get_regexp(I,!0),A._update(),A},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},M.exports.Pattern=e},function(M){function e(I,A){I=typeof I=="string"?I:I.source,A=typeof A=="string"?A:A.source,this.__directives_block_pattern=new RegExp(I+/ beautify( \w+[:]\w+)+ /.source+A,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(I+/\sbeautify\signore:end\s/.source+A,"g")}e.prototype.get_directives=function(I){if(!I.match(this.__directives_block_pattern))return null;var A={};this.__directive_pattern.lastIndex=0;for(var f=this.__directive_pattern.exec(I);f;)A[f[1]]=f[2],f=this.__directive_pattern.exec(I);return A},e.prototype.readIgnored=function(I){return I.readUntilAfter(this.__directives_end_ignore_pattern)},M.exports.Directives=e},function(M,e,I){var A=I(12).Pattern,f={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function g(h,p){A.call(this,h,p),this.__template_pattern=null,this._disabled=Object.assign({},f),this._excluded=Object.assign({},f),p&&(this.__template_pattern=this._input.get_regexp(p.__template_pattern),this._excluded=Object.assign(this._excluded,p._excluded),this._disabled=Object.assign(this._disabled,p._disabled));var u=new A(h);this.__patterns={handlebars_comment:u.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:u.starting_with(/{{{/).until_after(/}}}/),handlebars:u.starting_with(/{{/).until_after(/}}/),php:u.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}g.prototype=new A,g.prototype._create=function(){return new g(this._input,this)},g.prototype._update=function(){this.__set_templated_pattern()},g.prototype.disable=function(h){var p=this._create();return p._disabled[h]=!0,p._update(),p},g.prototype.read_options=function(h){var p=this._create();for(var u in f)p._disabled[u]=h.templating.indexOf(u)===-1;return p._update(),p},g.prototype.exclude=function(h){var p=this._create();return p._excluded[h]=!0,p._update(),p},g.prototype.read=function(){var h="";this._match_pattern?h=this._input.read(this._starting_pattern):h=this._input.read(this._starting_pattern,this.__template_pattern);for(var p=this._read_template();p;)this._match_pattern?p+=this._input.read(this._match_pattern):p+=this._input.readUntil(this.__template_pattern),h+=p,p=this._read_template();return this._until_after&&(h+=this._input.readUntilAfter(this._until_pattern)),h},g.prototype.__set_templated_pattern=function(){var h=[];this._disabled.php||h.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||h.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||h.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(h.push(this.__patterns.django._starting_pattern.source),h.push(this.__patterns.django_value._starting_pattern.source),h.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||h.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&h.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+h.join("|")+")")},g.prototype._read_template=function(){var h="",p=this._input.peek();if(p==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(h=h||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(h=h||this.__patterns.erb.read())}else p==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(h=h||this.__patterns.handlebars_comment.read(),h=h||this.__patterns.handlebars_unescaped.read(),h=h||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(h=h||this.__patterns.django_value.read()),this._excluded.django||(h=h||this.__patterns.django_comment.read(),h=h||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(h=h||this.__patterns.smarty_comment.read(),h=h||this.__patterns.smarty_literal.read(),h=h||this.__patterns.smarty.read()));return h},M.exports.TemplatablePattern=g}],L={};function C(M){var e=L[M];if(e!==void 0)return e.exports;var I=L[M]={exports:{}};return N[M](I,I.exports,C),I.exports}var P=C(0);J=P})();var V=J;K=[],Z=function(){return{js_beautify:V}}.apply(ye,K),Z!==void 0&&(He.exports=Z)})()},74741:function(He,ye,K){"use strict";K.d(ye,{Wi:function(){return C},Z0:function(){return P},aU:function(){return L},eZ:function(){return e},wY:function(){return M}});var Z=K(4669),J=K(9917),V=K(63580),N=function(I,A,f,g){function h(p){return p instanceof f?p:new f(function(u){u(p)})}return new(f||(f=Promise))(function(p,u){function v(a){try{o(g.next(a))}catch(i){u(i)}}function m(a){try{o(g.throw(a))}catch(i){u(i)}}function o(a){a.done?p(a.value):h(a.value).then(v,m)}o((g=g.apply(I,A||[])).next())})};class L extends J.JT{constructor(A,f="",g="",h=!0,p){super(),this._onDidChange=this._register(new Z.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=A,this._label=f,this._cssClass=g,this._enabled=h,this._actionCallback=p}get id(){return this._id}get label(){return this._label}set label(A){this._setLabel(A)}_setLabel(A){this._label!==A&&(this._label=A,this._onDidChange.fire({label:A}))}get tooltip(){return this._tooltip||""}set tooltip(A){this._setTooltip(A)}_setTooltip(A){this._tooltip!==A&&(this._tooltip=A,this._onDidChange.fire({tooltip:A}))}get class(){return this._cssClass}set class(A){this._setClass(A)}_setClass(A){this._cssClass!==A&&(this._cssClass=A,this._onDidChange.fire({class:A}))}get enabled(){return this._enabled}set enabled(A){this._setEnabled(A)}_setEnabled(A){this._enabled!==A&&(this._enabled=A,this._onDidChange.fire({enabled:A}))}get checked(){return this._checked}set checked(A){this._setChecked(A)}_setChecked(A){this._checked!==A&&(this._checked=A,this._onDidChange.fire({checked:A}))}run(A,f){return N(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(A))})}}class C extends J.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new Z.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Z.Q5),this.onDidRun=this._onDidRun.event}run(A,f){return N(this,void 0,void 0,function*(){if(!A.enabled)return;this._onBeforeRun.fire({action:A});let g;try{yield this.runAction(A,f)}catch(h){g=h}this._onDidRun.fire({action:A,error:g})})}runAction(A,f){return N(this,void 0,void 0,function*(){yield A.run(f)})}}class P extends L{constructor(A){super(P.ID,A,A?"separator text":"separator"),this.checked=!1,this.enabled=!1}}P.ID="vs.actions.separator";class M{constructor(A,f,g,h){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=A,this.label=f,this.class=h,this._actions=g}get actions(){return this._actions}dispose(){}run(){return N(this,void 0,void 0,function*(){})}}class e extends L{constructor(){super(e.ID,V.N("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},35146:function(He,ye,K){"use strict";K.d(ye,{ok:function(){return Z}});function Z(J,V){if(!J)throw new Error(V?`Assertion failed (${V})`:"Assertion Failed")}},73046:function(He,ye,K){"use strict";K.d(ye,{CM:function(){return L},JL:function(){return C},dT:function(){return M},fK:function(){return N},lA:function(){return P}});var Z=K(4669);class J{constructor(){this._icons=new Map,this._onDidRegister=new Z.Q5}add(I){const A=this._icons.get(I.id);A?I.description?A.description=I.description:console.error(`Duplicate registration of codicon ${I.id}`):(this._icons.set(I.id,I),this._onDidRegister.fire(I))}get(I){return this._icons.get(I)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const V=new J,N=V;function L(e,I){return new P(e,I)}function C(e){return e?e.replace(/\$\((.*?)\)/g,(I,A)=>` ${A} `).trim():""}class P{constructor(I,A,f){this.id=I,this.definition=A,this.description=f,V.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var M;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const I=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function A(h){if(h instanceof P)return["codicon","codicon-"+h.id];const p=I.exec(h.id);if(!p)return A(P.error);let[,u,v]=p;const m=["codicon","codicon-"+u];return v&&m.push("codicon-modifier-"+v.substr(1)),m}e.asClassNameArray=A;function f(h){return A(h).join(" ")}e.asClassName=f;function g(h){return"."+A(h).join(".")}e.asCSSSelector=g})(M||(M={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(P||(P={}))},17301:function(He,ye,K){"use strict";K.d(ye,{B8:function(){return A},Cp:function(){return N},F0:function(){return M},L6:function(){return I},VV:function(){return P},b1:function(){return e},dL:function(){return V},ri:function(){return L}});class Z{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(g){setTimeout(()=>{throw g.stack?new Error(g.message+`
`+g.stack):g},0)}}emit(g){this.listeners.forEach(h=>{h(g)})}onUnexpectedError(g){this.unexpectedErrorHandler(g),this.emit(g)}onUnexpectedExternalError(g){this.unexpectedErrorHandler(g)}}const J=new Z;function V(f){P(f)||J.onUnexpectedError(f)}function N(f){P(f)||J.onUnexpectedExternalError(f)}function L(f){if(f instanceof Error){let{name:g,message:h}=f;const p=f.stacktrace||f.stack;return{$isError:!0,name:g,message:h,stack:p}}return f}const C="Canceled";function P(f){return f instanceof Error&&f.name===C&&f.message===C}function M(){const f=new Error(C);return f.name=f.message,f}function e(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function I(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}class A extends Error{constructor(g){super("NotSupported"),g&&(this.message=g)}}},4669:function(He,ye,K){"use strict";K.d(ye,{D0:function(){return A},E7:function(){return f},K3:function(){return I},Q5:function(){return e},ZD:function(){return g},ju:function(){return L}});var Z=K(17301),J=K(9917),V=K(91741),N=K(84013),L;(function(h){h.None=()=>J.JT.None;function p(t){return(l,x=null,y)=>{let c=!1,_;return _=t(D=>{if(!c)return _?_.dispose():c=!0,l.call(x,D)},null,y),c&&_.dispose(),_}}h.once=p;function u(t,l){return s((x,y=null,c)=>t(_=>x.call(y,l(_)),null,c))}h.map=u;function v(t,l){return s((x,y=null,c)=>t(_=>{l(_),x.call(y,_)},null,c))}h.forEach=v;function m(t,l){return s((x,y=null,c)=>t(_=>l(_)&&x.call(y,_),null,c))}h.filter=m;function o(t){return t}h.signal=o;function a(...t){return(l,x=null,y)=>(0,J.F8)(...t.map(c=>c(_=>l.call(x,_),null,y)))}h.any=a;function i(t,l,x){let y=x;return u(t,c=>(y=l(y,c),y))}h.reduce=i;function s(t){let l;const x=new e({onFirstListenerAdd(){l=t(x.fire,x)},onLastListenerRemove(){l.dispose()}});return x.event}function E(t,l,x=100,y=!1,c){let _,D,O,k=0;const F=new e({leakWarningThreshold:c,onFirstListenerAdd(){_=t(G=>{k++,D=l(D,G),y&&!O&&(F.fire(D),D=void 0),clearTimeout(O),O=setTimeout(()=>{const H=D;D=void 0,O=void 0,(!y||k>1)&&F.fire(H),k=0},x)})},onLastListenerRemove(){_.dispose()}});return F.event}h.debounce=E;function b(t,l=(x,y)=>x===y){let x=!0,y;return m(t,c=>{const _=x||!l(c,y);return x=!1,y=c,_})}h.latch=b;function d(t,l){return[h.filter(t,l),h.filter(t,x=>!l(x))]}h.split=d;function T(t,l=!1,x=[]){let y=x.slice(),c=t(O=>{y?y.push(O):D.fire(O)});const _=()=>{y&&y.forEach(O=>D.fire(O)),y=null},D=new e({onFirstListenerAdd(){c||(c=t(O=>D.fire(O)))},onFirstListenerDidAdd(){y&&(l?setTimeout(_):_())},onLastListenerRemove(){c&&c.dispose(),c=null}});return D.event}h.buffer=T;class R{constructor(l){this.event=l}map(l){return new R(u(this.event,l))}forEach(l){return new R(v(this.event,l))}filter(l){return new R(m(this.event,l))}reduce(l,x){return new R(i(this.event,l,x))}latch(){return new R(b(this.event))}debounce(l,x=100,y=!1,c){return new R(E(this.event,l,x,y,c))}on(l,x,y){return this.event(l,x,y)}once(l,x,y){return p(this.event)(l,x,y)}}function S(t){return new R(t)}h.chain=S;function w(t,l,x=y=>y){const y=(...O)=>D.fire(x(...O)),c=()=>t.on(l,y),_=()=>t.removeListener(l,y),D=new e({onFirstListenerAdd:c,onLastListenerRemove:_});return D.event}h.fromNodeEventEmitter=w;function r(t,l,x=y=>y){const y=(...O)=>D.fire(x(...O)),c=()=>t.addEventListener(l,y),_=()=>t.removeEventListener(l,y),D=new e({onFirstListenerAdd:c,onLastListenerRemove:_});return D.event}h.fromDOMEventEmitter=r;function n(t){return new Promise(l=>p(t)(l))}h.toPromise=n})(L||(L={}));class C{constructor(p){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${p}_${C._idPool++}`}start(p){this._stopWatch=new N.G(!0),this._listenerCount=p}stop(){if(this._stopWatch){const p=this._stopWatch.elapsed();this._elapsedOverall+=p,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${p.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}C._idPool=0;let P=-1;class M{constructor(p,u=Math.random().toString(18).slice(2,5)){this.customThreshold=p,this.name=u,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(p){let u=P;if(typeof this.customThreshold=="number"&&(u=this.customThreshold),u<=0||p<u)return;this._stacks||(this._stacks=new Map);const v=new Error().stack.split(`
`).slice(3).join(`
`),m=this._stacks.get(v)||0;if(this._stacks.set(v,m+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=u*.5;let o,a=0;for(const[i,s]of this._stacks)(!o||a<s)&&(o=i,a=s);console.warn(`[${this.name}] potential listener LEAK detected, having ${p} listeners already. MOST frequent listener (${a}):`),console.warn(o)}return()=>{const o=this._stacks.get(v)||0;this._stacks.set(v,o-1)}}}class e{constructor(p){var u;this._disposed=!1,this._options=p,this._leakageMon=P>0?new M(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((u=this._options)===null||u===void 0)&&u._profName?new C(this._options._profName):void 0}get event(){return this._event||(this._event=(p,u,v)=>{var m;this._listeners||(this._listeners=new V.S);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(u?[p,u]:p);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,p,u);const i=(m=this._leakageMon)===null||m===void 0?void 0:m.check(this._listeners.size),s=(0,J.OF)(()=>{i&&i(),this._disposed||(a(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return v instanceof J.SL?v.add(s):Array.isArray(v)&&v.push(s),s}),this._event}fire(p){var u,v;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new V.S);for(let m of this._listeners)this._deliveryQueue.push([m,p]);for((u=this._perfMon)===null||u===void 0||u.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[m,o]=this._deliveryQueue.shift();try{typeof m=="function"?m.call(void 0,o):m[0].call(m[1],o)}catch(a){(0,Z.dL)(a)}}(v=this._perfMon)===null||v===void 0||v.stop()}}dispose(){var p,u,v,m,o;this._disposed||(this._disposed=!0,(p=this._listeners)===null||p===void 0||p.clear(),(u=this._deliveryQueue)===null||u===void 0||u.clear(),(m=(v=this._options)===null||v===void 0?void 0:v.onLastListenerRemove)===null||m===void 0||m.call(v),(o=this._leakageMon)===null||o===void 0||o.dispose())}}class I extends e{constructor(p){super(p),this._isPaused=0,this._eventQueue=new V.S,this._mergeFn=p==null?void 0:p.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const p=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(p))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(p){this._listeners&&(this._isPaused!==0?this._eventQueue.push(p):super.fire(p))}}class A extends I{constructor(p){var u;super(p),this._delay=(u=p.delay)!==null&&u!==void 0?u:100}fire(p){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(p)}}class f{constructor(){this.buffers=[]}wrapEvent(p){return(u,v,m)=>p(o=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>u.call(v,o)):u.call(v,o)},void 0,m)}bufferEvents(p){const u=[];this.buffers.push(u);const v=p();return this.buffers.pop(),u.forEach(m=>m()),v}}class g{constructor(){this.listening=!1,this.inputEvent=L.None,this.inputEventListener=J.JT.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(p){this.inputEvent=p,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=p(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},88289:function(He,ye,K){"use strict";K.d(ye,{I:function(){return Z}});function Z(J){const V=this;let N=!1,L;return function(){return N||(N=!0,L=J.apply(V,arguments)),L}}},53725:function(He,ye,K){"use strict";K.d(ye,{$:function(){return Z}});var Z;(function(J){function V(a){return a&&typeof a=="object"&&typeof a[Symbol.iterator]=="function"}J.is=V;const N=Object.freeze([]);function L(){return N}J.empty=L;function*C(a){yield a}J.single=C;function P(a){return a||N}J.from=P;function M(a){return!a||a[Symbol.iterator]().next().done===!0}J.isEmpty=M;function e(a){return a[Symbol.iterator]().next().value}J.first=e;function I(a,i){for(const s of a)if(i(s))return!0;return!1}J.some=I;function A(a,i){for(const s of a)if(i(s))return s}J.find=A;function*f(a,i){for(const s of a)i(s)&&(yield s)}J.filter=f;function*g(a,i){let s=0;for(const E of a)yield i(E,s++)}J.map=g;function*h(...a){for(const i of a)for(const s of i)yield s}J.concat=h;function*p(a){for(const i of a)for(const s of i)yield s}J.concatNested=p;function u(a,i,s){let E=s;for(const b of a)E=i(E,b);return E}J.reduce=u;function*v(a,i,s=a.length){for(i<0&&(i+=a.length),s<0?s+=a.length:s>a.length&&(s=a.length);i<s;i++)yield a[i]}J.slice=v;function m(a,i=Number.POSITIVE_INFINITY){const s=[];if(i===0)return[s,a];const E=a[Symbol.iterator]();for(let b=0;b<i;b++){const d=E.next();if(d.done)return[s,J.empty()];s.push(d.value)}return[s,{[Symbol.iterator](){return E}}]}J.consume=m;function o(a,i,s=(E,b)=>E===b){const E=a[Symbol.iterator](),b=i[Symbol.iterator]();for(;;){const d=E.next(),T=b.next();if(d.done!==T.done)return!1;if(d.done)return!0;if(!s(d.value,T.value))return!1}}J.equals=o})(Z||(Z={}))},9917:function(He,ye,K){"use strict";K.d(ye,{B9:function(){return g},F8:function(){return h},JT:function(){return v},Jz:function(){return o},OF:function(){return p},SL:function(){return u},Wf:function(){return f},XK:function(){return m},dk:function(){return I}});var Z=K(88289),J=K(53725);const V=!1;let N=null;function L(a){N=a}if(V){const a="__is_disposable_tracked__";L(new class{trackDisposable(i){const s=new Error("Potentially leaked disposable").stack;setTimeout(()=>{i[a]||console.log(s)},3e3)}setParent(i,s){if(i&&i!==v.None)try{i[a]=!0}catch(E){}}markAsDisposed(i){if(i&&i!==v.None)try{i[a]=!0}catch(s){}}markAsSingleton(i){}})}function C(a){return N==null||N.trackDisposable(a),a}function P(a){N==null||N.markAsDisposed(a)}function M(a,i){N==null||N.setParent(a,i)}function e(a,i){if(N)for(const s of a)N.setParent(s,i)}function I(a){return N==null||N.markAsSingleton(a),a}class A extends Error{constructor(i){super(`Encountered errors while disposing of store. Errors: [${i.join(", ")}]`),this.errors=i}}function f(a){return typeof a.dispose=="function"&&a.dispose.length===0}function g(a){if(J.$.is(a)){let i=[];for(const s of a)if(s)try{s.dispose()}catch(E){i.push(E)}if(i.length===1)throw i[0];if(i.length>1)throw new A(i);return Array.isArray(a)?[]:a}else if(a)return a.dispose(),a}function h(...a){const i=p(()=>g(a));return e(a,i),i}function p(a){const i=C({dispose:(0,Z.I)(()=>{P(i),a()})});return i}class u{constructor(){this._toDispose=new Set,this._isDisposed=!1,C(this)}dispose(){this._isDisposed||(P(this),this._isDisposed=!0,this.clear())}clear(){try{g(this._toDispose.values())}finally{this._toDispose.clear()}}add(i){if(!i)return i;if(i===this)throw new Error("Cannot register a disposable on itself!");return M(i,this),this._isDisposed?u.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(i),i}}u.DISABLE_DISPOSED_WARNING=!1;class v{constructor(){this._store=new u,C(this),M(this._store,this)}dispose(){P(this),this._store.dispose()}_register(i){if(i===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(i)}}v.None=Object.freeze({dispose(){}});class m{constructor(){this._isDisposed=!1,C(this)}get value(){return this._isDisposed?void 0:this._value}set value(i){var s;this._isDisposed||i===this._value||((s=this._value)===null||s===void 0||s.dispose(),i&&M(i,this),this._value=i)}clear(){this.value=void 0}dispose(){var i;this._isDisposed=!0,P(this),(i=this._value)===null||i===void 0||i.dispose(),this._value=void 0}clearAndLeak(){const i=this._value;return this._value=void 0,i&&M(i,null),i}}class o{constructor(i){this.object=i}dispose(){}}},91741:function(He,ye,K){"use strict";K.d(ye,{S:function(){return J}});class Z{constructor(N){this.element=N,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class J{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let N=this._first;for(;N!==Z.Undefined;){const L=N.next;N.prev=Z.Undefined,N.next=Z.Undefined,N=L}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(N){return this._insert(N,!1)}push(N){return this._insert(N,!0)}_insert(N,L){const C=new Z(N);if(this._first===Z.Undefined)this._first=C,this._last=C;else if(L){const M=this._last;this._last=C,C.prev=M,M.next=C}else{const M=this._first;this._first=C,C.next=M,M.prev=C}this._size+=1;let P=!1;return()=>{P||(P=!0,this._remove(C))}}shift(){if(this._first!==Z.Undefined){const N=this._first.element;return this._remove(this._first),N}}pop(){if(this._last!==Z.Undefined){const N=this._last.element;return this._remove(this._last),N}}_remove(N){if(N.prev!==Z.Undefined&&N.next!==Z.Undefined){const L=N.prev;L.next=N.next,N.next.prev=L}else N.prev===Z.Undefined&&N.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):N.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):N.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let N=this._first;for(;N!==Z.Undefined;)yield N.element,N=N.next}}},1432:function(He,ye,K){"use strict";K.d(ye,{$L:function(){return E},ED:function(){return o},IJ:function(){return i},OS:function(){return R},WE:function(){return d},dz:function(){return a},gn:function(){return b},li:function(){return p},r:function(){return r},tY:function(){return s},xS:function(){return T}});var Z=K(34155),J;const V="en";let N=!1,L=!1,C=!1,P=!1,M=!1,e=!1,I=!1,A,f=null,g=null,h;const p=typeof self=="object"?self:typeof K.g=="object"?K.g:{};let u;typeof p.vscode!="undefined"&&typeof p.vscode.process!="undefined"?u=p.vscode.process:typeof Z!="undefined"&&(u=Z);const v=typeof((J=u==null?void 0:u.versions)===null||J===void 0?void 0:J.electron)=="string"&&u.type==="renderer";if(typeof navigator=="object"&&!v)h=navigator.userAgent,N=h.indexOf("Windows")>=0,L=h.indexOf("Macintosh")>=0,I=(h.indexOf("Macintosh")>=0||h.indexOf("iPad")>=0||h.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,C=h.indexOf("Linux")>=0,e=!0,A=navigator.language,f=A;else if(typeof u=="object"){N=u.platform==="win32",L=u.platform==="darwin",C=u.platform==="linux",P=C&&!!u.env.SNAP&&!!u.env.SNAP_REVISION,A=V,f=V;const n=u.env.VSCODE_NLS_CONFIG;if(n)try{const t=JSON.parse(n),l=t.availableLanguages["*"];A=t.locale,f=l||V,g=t._translationsConfigFile}catch(t){}M=!0}else console.error("Unable to resolve platform.");let m=0;L?m=1:N?m=3:C&&(m=2);const o=N,a=L,i=C,s=M,E=e,b=I,d=h,T=function(){if(p.setImmediate)return p.setImmediate.bind(p);if(typeof p.postMessage=="function"&&!p.importScripts){let l=[];p.addEventListener("message",y=>{if(y.data&&y.data.vscodeSetImmediateId)for(let c=0,_=l.length;c<_;c++){const D=l[c];if(D.id===y.data.vscodeSetImmediateId){l.splice(c,1),D.callback();return}}});let x=0;return y=>{const c=++x;l.push({id:c,callback:y}),p.postMessage({vscodeSetImmediateId:c},"*")}}if(typeof(u==null?void 0:u.nextTick)=="function")return u.nextTick.bind(u);const t=Promise.resolve();return l=>t.then(l)}(),R=L||I?2:N?1:3;let S=!0,w=!1;function r(){if(!w){w=!0;const n=new Uint8Array(2);n[0]=1,n[1]=2,S=new Uint16Array(n.buffer)[0]===513}return S}},84013:function(He,ye,K){"use strict";K.d(ye,{G:function(){return V}});var Z=K(1432);const J=Z.li.performance&&typeof Z.li.performance.now=="function";class V{constructor(L){this._highResolution=J&&L,this._startTime=this._now(),this._stopTime=-1}static create(L=!0){return new V(L)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Z.li.performance.now():Date.now()}}},97295:function(He,ye,K){"use strict";K.d(ye,{$i:function(){return k},C8:function(){return Q},GF:function(){return A},HO:function(){return x},IO:function(){return f},K7:function(){return j},Kw:function(){return se},LC:function(){return p},Mh:function(){return T},P1:function(){return R},PJ:function(){return le},Qe:function(){return F},R1:function(){return I},RP:function(){return D},S6:function(){return xe},TT:function(){return o},Ut:function(){return c},V8:function(){return u},WU:function(){return V},YK:function(){return w},YU:function(){return N},ZG:function(){return S},ZH:function(){return n},ab:function(){return G},c1:function(){return ee},df:function(){return E},ec:function(){return L},fi:function(){return Re},fy:function(){return C},j3:function(){return P},j_:function(){return i},m5:function(){return Z},mK:function(){return s},mr:function(){return g},oH:function(){return be},oL:function(){return M},ok:function(){return d},ow:function(){return v},qq:function(){return b},qu:function(){return m},rL:function(){return r},uS:function(){return ie},un:function(){return e},uq:function(){return h},vH:function(){return l},xe:function(){return H},zY:function(){return a}});function Z(z){return!z||typeof z!="string"?!0:z.trim().length===0}const J=/{(\d+)}/g;function V(z,...ne){return ne.length===0?z:z.replace(J,function(de,ge){const Ae=parseInt(ge,10);return isNaN(Ae)||Ae<0||Ae>=ne.length?de:ne[Ae]})}function N(z){return z.replace(/[<>&]/g,function(ne){switch(ne){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ne}})}function L(z){return z.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function C(z,ne=" "){const de=P(z,ne);return M(de,ne)}function P(z,ne){if(!z||!ne)return z;const de=ne.length;if(de===0||z.length===0)return z;let ge=0;for(;z.indexOf(ne,ge)===ge;)ge=ge+de;return z.substring(ge)}function M(z,ne){if(!z||!ne)return z;const de=ne.length,ge=z.length;if(de===0||ge===0)return z;let Ae=ge,Ve=-1;for(;Ve=z.lastIndexOf(ne,Ae-1),!(Ve===-1||Ve+de!==Ae);){if(Ve===0)return"";Ae=Ve}return z.substring(0,Ae)}function e(z){return z.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function I(z){return z.replace(/\*/g,"")}function A(z,ne,de={}){if(!z)throw new Error("Cannot create regex from empty string");ne||(z=L(z)),de.wholeWord&&(/\B/.test(z.charAt(0))||(z="\\b"+z),/\B/.test(z.charAt(z.length-1))||(z=z+"\\b"));let ge="";return de.global&&(ge+="g"),de.matchCase||(ge+="i"),de.multiline&&(ge+="m"),de.unicode&&(ge+="u"),new RegExp(z,ge)}function f(z){return z.source==="^"||z.source==="^$"||z.source==="$"||z.source==="^\\s*$"?!1:!!(z.exec("")&&z.lastIndex===0)}function g(z){return(z.global?"g":"")+(z.ignoreCase?"i":"")+(z.multiline?"m":"")+(z.unicode?"u":"")}function h(z){return z.split(/\r\n|\r|\n/)}function p(z){for(let ne=0,de=z.length;ne<de;ne++){const ge=z.charCodeAt(ne);if(ge!==32&&ge!==9)return ne}return-1}function u(z,ne=0,de=z.length){for(let ge=ne;ge<de;ge++){const Ae=z.charCodeAt(ge);if(Ae!==32&&Ae!==9)return z.substring(ne,ge)}return z.substring(ne,de)}function v(z,ne=z.length-1){for(let de=ne;de>=0;de--){const ge=z.charCodeAt(de);if(ge!==32&&ge!==9)return de}return-1}function m(z,ne){return z<ne?-1:z>ne?1:0}function o(z,ne,de=0,ge=z.length,Ae=0,Ve=ne.length){for(;de<ge&&Ae<Ve;de++,Ae++){let pt=z.charCodeAt(de),St=ne.charCodeAt(Ae);if(pt<St)return-1;if(pt>St)return 1}const xt=ge-de,Je=Ve-Ae;return xt<Je?-1:xt>Je?1:0}function a(z,ne){return i(z,ne,0,z.length,0,ne.length)}function i(z,ne,de=0,ge=z.length,Ae=0,Ve=ne.length){for(;de<ge&&Ae<Ve;de++,Ae++){let pt=z.charCodeAt(de),St=ne.charCodeAt(Ae);if(pt===St)continue;if(pt>=128||St>=128)return o(z.toLowerCase(),ne.toLowerCase(),de,ge,Ae,Ve);s(pt)&&(pt-=32),s(St)&&(St-=32);const er=pt-St;if(er!==0)return er}const xt=ge-de,Je=Ve-Ae;return xt<Je?-1:xt>Je?1:0}function s(z){return z>=97&&z<=122}function E(z){return z>=65&&z<=90}function b(z,ne){return z.length===ne.length&&i(z,ne)===0}function d(z,ne){const de=ne.length;return ne.length>z.length?!1:i(z,ne,0,de)===0}function T(z,ne){let de,ge=Math.min(z.length,ne.length);for(de=0;de<ge;de++)if(z.charCodeAt(de)!==ne.charCodeAt(de))return de;return ge}function R(z,ne){let de,ge=Math.min(z.length,ne.length);const Ae=z.length-1,Ve=ne.length-1;for(de=0;de<ge;de++)if(z.charCodeAt(Ae-de)!==ne.charCodeAt(Ve-de))return de;return ge}function S(z){return 55296<=z&&z<=56319}function w(z){return 56320<=z&&z<=57343}function r(z,ne){return(z-55296<<10)+(ne-56320)+65536}function n(z,ne,de){const ge=z.charCodeAt(de);if(S(ge)&&de+1<ne){const Ae=z.charCodeAt(de+1);if(w(Ae))return r(ge,Ae)}return ge}function t(z,ne){const de=z.charCodeAt(ne-1);if(w(de)&&ne>1){const ge=z.charCodeAt(ne-2);if(S(ge))return r(ge,de)}return de}function l(z,ne){const de=Ee.getInstance(),ge=ne,Ae=z.length,Ve=n(z,Ae,ne);ne+=Ve>=65536?2:1;let xt=de.getGraphemeBreakType(Ve);for(;ne<Ae;){const Je=n(z,Ae,ne),pt=de.getGraphemeBreakType(Je);if(Re(xt,pt))break;ne+=Je>=65536?2:1,xt=pt}return ne-ge}function x(z,ne){const de=Ee.getInstance(),ge=ne,Ae=t(z,ne);ne-=Ae>=65536?2:1;let Ve=de.getGraphemeBreakType(Ae);for(;ne>0;){const xt=t(z,ne),Je=de.getGraphemeBreakType(xt);if(Re(Je,Ve))break;ne-=xt>=65536?2:1,Ve=Je}return ge-ne}const y=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function c(z){return y.test(z)}const _=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function D(z){return _.test(z)}const O=/^[\t\n\r\x20-\x7E]*$/;function k(z){return O.test(z)}const F=/[\u2028\u2029]/;function G(z){return F.test(z)}function H(z){for(let ne=0,de=z.length;ne<de;ne++)if(j(z.charCodeAt(ne)))return!0;return!1}function j(z){return z=+z,z>=11904&&z<=55215||z>=63744&&z<=64255||z>=65281&&z<=65374}function Q(z){return z>=127462&&z<=127487||z===8986||z===8987||z===9200||z===9203||z>=9728&&z<=10175||z===11088||z===11093||z>=127744&&z<=128591||z>=128640&&z<=128764||z>=128992&&z<=129003||z>=129280&&z<=129535||z>=129648&&z<=129750}const ee="\uFEFF";function ie(z){return!!(z&&z.length>0&&z.charCodeAt(0)===65279)}function se(z,ne=!1){return z?(ne&&(z=z.replace(/\\./g,"")),z.toLowerCase()!==z):!1}function le(z){return z=z%(2*26),z<26?String.fromCharCode(97+z):String.fromCharCode(65+z-26)}function xe(z){return Ee.getInstance().getGraphemeBreakType(z)}function Re(z,ne){return z===0?ne!==5&&ne!==7:z===2&&ne===3?!1:z===4||z===2||z===3||ne===4||ne===2||ne===3?!0:!(z===8&&(ne===8||ne===9||ne===11||ne===12)||(z===11||z===9)&&(ne===9||ne===10)||(z===12||z===10)&&ne===10||ne===5||ne===13||ne===7||z===1||z===13&&ne===14||z===6&&ne===6)}class Ee{constructor(){this._data=he()}static getInstance(){return Ee._INSTANCE||(Ee._INSTANCE=new Ee),Ee._INSTANCE}getGraphemeBreakType(ne){if(ne<32)return ne===10?3:ne===13?2:4;if(ne<127)return 0;const de=this._data,ge=de.length/3;let Ae=1;for(;Ae<=ge;)if(ne<de[3*Ae])Ae=2*Ae;else if(ne>de[3*Ae+1])Ae=2*Ae+1;else return de[3*Ae+2];return 0}}Ee._INSTANCE=null;function he(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function be(z,ne){if(z===0)return 0;const de=Ce(z,ne);if(de!==void 0)return de;const ge=t(ne,z);return z-=Ue(ge),z}function Ce(z,ne){let de=t(ne,z);for(z-=Ue(de);$e(de)||de===65039||de===8419;){if(z===0)return;de=t(ne,z),z-=Ue(de)}if(Q(de)){if(z>=0){const ge=t(ne,z);ge===8205&&(z-=Ue(ge))}return z}}function Ue(z){return z>=65536?2:1}function $e(z){return 127995<=z&&z<=127999}},98401:function(He,ye,K){"use strict";K.d(ye,{$E:function(){return p},$K:function(){return P},D8:function(){return f},HD:function(){return J},IU:function(){return u},Jp:function(){return M},Kn:function(){return V},cW:function(){return I},f6:function(){return v},hj:function(){return N},jn:function(){return L},kJ:function(){return Z},mf:function(){return A},o8:function(){return C},p_:function(){return e},vE:function(){return m}});function Z(o){return Array.isArray(o)}function J(o){return typeof o=="string"}function V(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function N(o){return typeof o=="number"&&!isNaN(o)}function L(o){return o===!0||o===!1}function C(o){return typeof o=="undefined"}function P(o){return!M(o)}function M(o){return C(o)||o===null}function e(o,a){if(!o)throw new Error(a?`Unexpected type, expected '${a}'`:"Unexpected type")}function I(o){if(M(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function A(o){return typeof o=="function"}function f(o,a){const i=Math.min(o.length,a.length);for(let s=0;s<i;s++)g(o[s],a[s])}function g(o,a){if(J(a)){if(typeof o!==a)throw new Error(`argument does not match constraint: typeof ${a}`)}else if(A(a)){try{if(o instanceof a)return}catch(i){}if(!M(o)&&o.constructor===a||a.length===1&&a.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function h(o){let a=[],i=Object.getPrototypeOf(o);for(;Object.prototype!==i;)a=a.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return a}function p(o){const a=[];for(const i of h(o))typeof o[i]=="function"&&a.push(i);return a}function u(o,a){const i=E=>function(){const b=Array.prototype.slice.call(arguments,0);return a(E,b)};let s={};for(const E of o)s[E]=i(E);return s}function v(o){return o===null?void 0:o}function m(o,a="Unreachable"){throw new Error(a)}},63580:function(He,ye,K){"use strict";K.d(ye,{N:function(){return J}});function Z(V,N){let L;return N.length===0?L=V:L=V.replace(/\{(\d+)\}/g,function(C,P){const M=P[0];return typeof N[M]!="undefined"?N[M]:C}),L}function J(V,N,...L){return Z(N,L)}},84144:function(He,ye,K){"use strict";K.d(ye,{BH:function(){return u},NZ:function(){return v},U8:function(){return m},co:function(){return p},eH:function(){return h},vr:function(){return g}});var Z=K(74741),J=K(73046),V=K(4669),N=K(53725),L=K(9917),C=K(91741),P=K(94565),M=K(38819),e=K(72065),I=K(97781),A=function(o,a,i,s){var E=arguments.length,b=E<3?a:s===null?s=Object.getOwnPropertyDescriptor(a,i):s,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,a,i,s);else for(var T=o.length-1;T>=0;T--)(d=o[T])&&(b=(E<3?d(b):E>3?d(a,i,b):d(a,i))||b);return E>3&&b&&Object.defineProperty(a,i,b),b},f=function(o,a){return function(i,s){a(i,s,o)}};function g(o){return o.command!==void 0}class h{constructor(a){this.id=h._idPool++,this._debugName=a}}h._idPool=0,h.CommandPalette=new h("CommandPalette"),h.EditorContext=new h("EditorContext"),h.SimpleEditorContext=new h("SimpleEditorContext"),h.EditorContextCopy=new h("EditorContextCopy"),h.EditorContextPeek=new h("EditorContextPeek"),h.MenubarEditMenu=new h("MenubarEditMenu"),h.MenubarCopy=new h("MenubarCopy"),h.MenubarGoMenu=new h("MenubarGoMenu"),h.MenubarSelectionMenu=new h("MenubarSelectionMenu"),h.InlineCompletionsActions=new h("InlineCompletionsActions");const p=(0,e.yh)("menuService"),u=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new V.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:o=>o===h.CommandPalette}}addCommand(o){return this.addCommands(N.$.single(o))}addCommands(o){for(const a of o)this._commands.set(a.id,a);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,L.OF)(()=>{let a=!1;for(const i of o)a=this._commands.delete(i.id)||a;a&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((a,i)=>o.set(i,a)),o}appendMenuItem(o,a){return this.appendMenuItems(N.$.single({id:o,item:a}))}appendMenuItems(o){const a=new Set,i=new C.S;for(const{id:s,item:E}of o){let b=this._menuItems.get(s);b||(b=new C.S,this._menuItems.set(s,b)),i.push(b.push(E)),a.add(s)}return this._onDidChangeMenu.fire(a),(0,L.OF)(()=>{if(i.size>0){for(let s of i)s();this._onDidChangeMenu.fire(a),i.clear()}})}getMenuItems(o){let a;return this._menuItems.has(o)?a=[...this._menuItems.get(o)]:a=[],o===h.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(o){const a=new Set;for(const i of o)g(i)&&(a.add(i.command.id),i.alt&&a.add(i.alt.id));this._commands.forEach((i,s)=>{a.has(s)||o.push({command:i})})}};class v extends Z.wY{constructor(a,i,s,E){super(`submenuitem.${a.submenu.id}`,typeof a.title=="string"?a.title:a.title.value,[],"submenu"),this.item=a,this._menuService=i,this._contextKeyService=s,this._options=E}get actions(){const a=[],i=this._menuService.createMenu(this.item.submenu,this._contextKeyService),s=i.getActions(this._options);i.dispose();for(const[,E]of s)E.length>0&&(a.push(...E),a.push(new Z.Z0));return a.length&&a.pop(),a}}let m=class ca{constructor(a,i,s,E,b){var d,T;if(this._commandService=b,this.id=a.id,this.label=s!=null&&s.renderShortTitle&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value,this.tooltip=(T=typeof a.tooltip=="string"?a.tooltip:(d=a.tooltip)===null||d===void 0?void 0:d.value)!==null&&T!==void 0?T:"",this.enabled=!a.precondition||E.contextMatchesRules(a.precondition),this.checked=void 0,a.toggled){const R=a.toggled.condition?a.toggled:{condition:a.toggled};this.checked=E.contextMatchesRules(R.condition),this.checked&&R.tooltip&&(this.tooltip=typeof R.tooltip=="string"?R.tooltip:R.tooltip.value),R.title&&(this.label=typeof R.title=="string"?R.title:R.title.value)}this.item=a,this.alt=i?new ca(i,void 0,s,E,b):void 0,this._options=s,I.kS.isThemeIcon(a.icon)&&(this.class=J.dT.asClassName(a.icon))}dispose(){}run(...a){var i,s;let E=[];return!((i=this._options)===null||i===void 0)&&i.arg&&(E=[...E,this._options.arg]),!((s=this._options)===null||s===void 0)&&s.shouldForwardArgs&&(E=[...E,...a]),this._commandService.executeCommand(this.id,...E)}};m=A([f(3,M.i6),f(4,P.H)],m)},94565:function(He,ye,K){"use strict";K.d(ye,{H:function(){return P},P:function(){return M}});var Z=K(4669),J=K(53725),V=K(9917),N=K(91741),L=K(98401),C=K(72065);const P=(0,C.yh)("commandService"),M=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Z.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,I){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!I)throw new Error("invalid command");return this.registerCommand({id:e,handler:I})}if(e.description){const p=[];for(let v of e.description.args)p.push(v.constraint);const u=e.handler;e.handler=function(v,...m){return(0,L.D8)(m,p),u(v,...m)}}const{id:A}=e;let f=this._commands.get(A);f||(f=new N.S,this._commands.set(A,f));let g=f.unshift(e),h=(0,V.OF)(()=>{g();const p=this._commands.get(A);p!=null&&p.isEmpty()&&this._commands.delete(A)});return this._onDidRegisterCommand.fire(A),h}registerCommandAlias(e,I){return M.registerCommand(e,(A,...f)=>A.get(P).executeCommand(I,...f))}getCommand(e){const I=this._commands.get(e);if(!(!I||I.isEmpty()))return J.$.first(I)}getCommands(){const e=new Map;for(const I of this._commands.keys()){const A=this.getCommand(I);A&&e.set(I,A)}return e}};M.registerCommand("noop",()=>{})},38819:function(He,ye,K){"use strict";K.d(ye,{Ao:function(){return P},Eq:function(){return r},Fb:function(){return M},K8:function(){return l},i6:function(){return w},uy:function(){return S}});var Z=K(1432),J=K(97295),V=K(72065);let N=Z.WE||"";const L=new Map;L.set("false",!1),L.set("true",!0),L.set("isMac",Z.dz),L.set("isLinux",Z.IJ),L.set("isWindows",Z.ED),L.set("isWeb",Z.$L),L.set("isMacNative",Z.dz&&!Z.$L),L.set("isEdge",N.indexOf("Edg/")>=0),L.set("isFirefox",N.indexOf("Firefox")>=0),L.set("isChrome",N.indexOf("Chrome")>=0),L.set("isSafari",N.indexOf("Safari")>=0);const C=Object.prototype.hasOwnProperty;class P{static has(c){return f.create(c)}static equals(c,_){return g.create(c,_)}static regex(c,_){return E.create(c,_)}static not(c){return v.create(c)}static and(...c){return T.create(c,null)}static or(...c){return R.create(c,null,!0)}static deserialize(c,_=!1){if(c)return this._deserializeOrExpression(c,_)}static _deserializeOrExpression(c,_){let D=c.split("||");return R.create(D.map(O=>this._deserializeAndExpression(O,_)),null,!0)}static _deserializeAndExpression(c,_){let D=c.split("&&");return T.create(D.map(O=>this._deserializeOne(O,_)),null)}static _deserializeOne(c,_){if(c=c.trim(),c.indexOf("!=")>=0){let D=c.split("!=");return u.create(D[0].trim(),this._deserializeValue(D[1],_))}if(c.indexOf("==")>=0){let D=c.split("==");return g.create(D[0].trim(),this._deserializeValue(D[1],_))}if(c.indexOf("=~")>=0){let D=c.split("=~");return E.create(D[0].trim(),this._deserializeRegexValue(D[1],_))}if(c.indexOf(" in ")>=0){let D=c.split(" in ");return h.create(D[0].trim(),D[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(c)){const D=c.split(">=");return a.create(D[0].trim(),D[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(c)){const D=c.split(">");return o.create(D[0].trim(),D[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(c)){const D=c.split("<=");return s.create(D[0].trim(),D[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(c)){const D=c.split("<");return i.create(D[0].trim(),D[1].trim())}return/^\!\s*/.test(c)?v.create(c.substr(1).trim()):f.create(c)}static _deserializeValue(c,_){if(c=c.trim(),c==="true")return!0;if(c==="false")return!1;let D=/^'([^']*)'$/.exec(c);return D?D[1].trim():c}static _deserializeRegexValue(c,_){if((0,J.m5)(c)){if(_)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let D=c.indexOf("/"),O=c.lastIndexOf("/");if(D===O||D<0){if(_)throw new Error(`bad regexp-value '${c}', missing /-enclosure`);return console.warn(`bad regexp-value '${c}', missing /-enclosure`),null}let k=c.slice(D+1,O),F=c[O+1]==="i"?"i":"";try{return new RegExp(k,F)}catch(G){if(_)throw new Error(`bad regexp-value '${c}', parse error: ${G}`);return console.warn(`bad regexp-value '${c}', parse error: ${G}`),null}}}function M(y,c){const _=y?y.substituteConstants():void 0,D=c?c.substituteConstants():void 0;return!_&&!D?!0:!_||!D?!1:_.equals(D)}function e(y,c){return y.cmp(c)}class I{constructor(){this.type=0}cmp(c){return this.type-c.type}equals(c){return c.type===this.type}substituteConstants(){return this}evaluate(c){return!1}serialize(){return"false"}keys(){return[]}negate(){return A.INSTANCE}}I.INSTANCE=new I;class A{constructor(){this.type=1}cmp(c){return this.type-c.type}equals(c){return c.type===this.type}substituteConstants(){return this}evaluate(c){return!0}serialize(){return"true"}keys(){return[]}negate(){return I.INSTANCE}}A.INSTANCE=new A;class f{constructor(c,_){this.key=c,this.negated=_,this.type=2}static create(c,_=null){const D=L.get(c);return typeof D=="boolean"?D?A.INSTANCE:I.INSTANCE:new f(c,_)}cmp(c){return c.type!==this.type?this.type-c.type:n(this.key,c.key)}equals(c){return c.type===this.type?this.key===c.key:!1}substituteConstants(){const c=L.get(this.key);return typeof c=="boolean"?c?A.INSTANCE:I.INSTANCE:this}evaluate(c){return!!c.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this)),this.negated}}class g{constructor(c,_,D){this.key=c,this.value=_,this.negated=D,this.type=4}static create(c,_,D=null){if(typeof _=="boolean")return _?f.create(c,D):v.create(c,D);const O=L.get(c);return typeof O=="boolean"?_===(O?"true":"false")?A.INSTANCE:I.INSTANCE:new g(c,_,D)}cmp(c){return c.type!==this.type?this.type-c.type:t(this.key,this.value,c.key,c.value)}equals(c){return c.type===this.type?this.key===c.key&&this.value===c.value:!1}substituteConstants(){const c=L.get(this.key);if(typeof c=="boolean"){const _=c?"true":"false";return this.value===_?A.INSTANCE:I.INSTANCE}return this}evaluate(c){return c.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}class h{constructor(c,_){this.key=c,this.valueKey=_,this.type=10,this.negated=null}static create(c,_){return new h(c,_)}cmp(c){return c.type!==this.type?this.type-c.type:t(this.key,this.valueKey,c.key,c.valueKey)}equals(c){return c.type===this.type?this.key===c.key&&this.valueKey===c.valueKey:!1}substituteConstants(){return this}evaluate(c){const _=c.getValue(this.valueKey),D=c.getValue(this.key);return Array.isArray(_)?_.indexOf(D)>=0:typeof D=="string"&&typeof _=="object"&&_!==null?C.call(_,D):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=p.create(this)),this.negated}}class p{constructor(c){this._actual=c,this.type=11}static create(c){return new p(c)}cmp(c){return c.type!==this.type?this.type-c.type:this._actual.cmp(c._actual)}equals(c){return c.type===this.type?this._actual.equals(c._actual):!1}substituteConstants(){return this}evaluate(c){return!this._actual.evaluate(c)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class u{constructor(c,_,D){this.key=c,this.value=_,this.negated=D,this.type=5}static create(c,_,D=null){if(typeof _=="boolean")return _?v.create(c,D):f.create(c,D);const O=L.get(c);return typeof O=="boolean"?_===(O?"true":"false")?I.INSTANCE:A.INSTANCE:new u(c,_,D)}cmp(c){return c.type!==this.type?this.type-c.type:t(this.key,this.value,c.key,c.value)}equals(c){return c.type===this.type?this.key===c.key&&this.value===c.value:!1}substituteConstants(){const c=L.get(this.key);if(typeof c=="boolean"){const _=c?"true":"false";return this.value===_?I.INSTANCE:A.INSTANCE}return this}evaluate(c){return c.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=g.create(this.key,this.value,this)),this.negated}}class v{constructor(c,_){this.key=c,this.negated=_,this.type=3}static create(c,_=null){const D=L.get(c);return typeof D=="boolean"?D?I.INSTANCE:A.INSTANCE:new v(c,_)}cmp(c){return c.type!==this.type?this.type-c.type:n(this.key,c.key)}equals(c){return c.type===this.type?this.key===c.key:!1}substituteConstants(){const c=L.get(this.key);return typeof c=="boolean"?c?I.INSTANCE:A.INSTANCE:this}evaluate(c){return!c.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}function m(y,c){if(typeof y=="string"){const _=parseFloat(y);isNaN(_)||(y=_)}return typeof y=="string"||typeof y=="number"?c(y):I.INSTANCE}class o{constructor(c,_,D){this.key=c,this.value=_,this.negated=D,this.type=12}static create(c,_,D=null){return m(_,O=>new o(c,O,D))}cmp(c){return c.type!==this.type?this.type-c.type:t(this.key,this.value,c.key,c.value)}equals(c){return c.type===this.type?this.key===c.key&&this.value===c.value:!1}substituteConstants(){return this}evaluate(c){return typeof this.value=="string"?!1:parseFloat(c.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class a{constructor(c,_,D){this.key=c,this.value=_,this.negated=D,this.type=13}static create(c,_,D=null){return m(_,O=>new a(c,O,D))}cmp(c){return c.type!==this.type?this.type-c.type:t(this.key,this.value,c.key,c.value)}equals(c){return c.type===this.type?this.key===c.key&&this.value===c.value:!1}substituteConstants(){return this}evaluate(c){return typeof this.value=="string"?!1:parseFloat(c.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}class i{constructor(c,_,D){this.key=c,this.value=_,this.negated=D,this.type=14}static create(c,_,D=null){return m(_,O=>new i(c,O,D))}cmp(c){return c.type!==this.type?this.type-c.type:t(this.key,this.value,c.key,c.value)}equals(c){return c.type===this.type?this.key===c.key&&this.value===c.value:!1}substituteConstants(){return this}evaluate(c){return typeof this.value=="string"?!1:parseFloat(c.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class s{constructor(c,_,D){this.key=c,this.value=_,this.negated=D,this.type=15}static create(c,_,D=null){return m(_,O=>new s(c,O,D))}cmp(c){return c.type!==this.type?this.type-c.type:t(this.key,this.value,c.key,c.value)}equals(c){return c.type===this.type?this.key===c.key&&this.value===c.value:!1}substituteConstants(){return this}evaluate(c){return typeof this.value=="string"?!1:parseFloat(c.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class E{constructor(c,_){this.key=c,this.regexp=_,this.type=7,this.negated=null}static create(c,_){return new E(c,_)}cmp(c){if(c.type!==this.type)return this.type-c.type;if(this.key<c.key)return-1;if(this.key>c.key)return 1;const _=this.regexp?this.regexp.source:"",D=c.regexp?c.regexp.source:"";return _<D?-1:_>D?1:0}equals(c){if(c.type===this.type){const _=this.regexp?this.regexp.source:"",D=c.regexp?c.regexp.source:"";return this.key===c.key&&_===D}return!1}substituteConstants(){return this}evaluate(c){let _=c.getValue(this.key);return this.regexp?this.regexp.test(_):!1}serialize(){const c=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${c}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this)),this.negated}}class b{constructor(c){this._actual=c,this.type=8}static create(c){return new b(c)}cmp(c){return c.type!==this.type?this.type-c.type:this._actual.cmp(c._actual)}equals(c){return c.type===this.type?this._actual.equals(c._actual):!1}substituteConstants(){return this}evaluate(c){return!this._actual.evaluate(c)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function d(y){let c=null;for(let _=0,D=y.length;_<D;_++){const O=y[_].substituteConstants();if(y[_]!==O&&c===null){c=[];for(let k=0;k<_;k++)c[k]=y[k]}c!==null&&(c[_]=O)}return c===null?y:c}class T{constructor(c,_){this.expr=c,this.negated=_,this.type=6}static create(c,_){return T._normalizeArr(c,_)}cmp(c){if(c.type!==this.type)return this.type-c.type;if(this.expr.length<c.expr.length)return-1;if(this.expr.length>c.expr.length)return 1;for(let _=0,D=this.expr.length;_<D;_++){const O=e(this.expr[_],c.expr[_]);if(O!==0)return O}return 0}equals(c){if(c.type===this.type){if(this.expr.length!==c.expr.length)return!1;for(let _=0,D=this.expr.length;_<D;_++)if(!this.expr[_].equals(c.expr[_]))return!1;return!0}return!1}substituteConstants(){const c=d(this.expr);return c===this.expr?this:T.create(c,this.negated)}evaluate(c){for(let _=0,D=this.expr.length;_<D;_++)if(!this.expr[_].evaluate(c))return!1;return!0}static _normalizeArr(c,_){const D=[];let O=!1;for(const k of c)if(k){if(k.type===1){O=!0;continue}if(k.type===0)return I.INSTANCE;if(k.type===6){D.push(...k.expr);continue}D.push(k)}if(D.length===0&&O)return A.INSTANCE;if(D.length!==0){if(D.length===1)return D[0];D.sort(e);for(let k=1;k<D.length;k++)D[k-1].equals(D[k])&&(D.splice(k,1),k--);if(D.length===1)return D[0];for(;D.length>1;){const k=D[D.length-1];if(k.type!==9)break;D.pop();const F=D.pop(),G=D.length===0,H=R.create(k.expr.map(j=>T.create([j,F],null)),null,G);H&&(D.push(H),D.sort(e))}return D.length===1?D[0]:new T(D,_)}}serialize(){return this.expr.map(c=>c.serialize()).join(" && ")}keys(){const c=[];for(let _ of this.expr)c.push(..._.keys());return c}negate(){if(!this.negated){const c=[];for(let _ of this.expr)c.push(_.negate());this.negated=R.create(c,this,!0)}return this.negated}}class R{constructor(c,_){this.expr=c,this.negated=_,this.type=9}static create(c,_,D){return R._normalizeArr(c,_,D)}cmp(c){if(c.type!==this.type)return this.type-c.type;if(this.expr.length<c.expr.length)return-1;if(this.expr.length>c.expr.length)return 1;for(let _=0,D=this.expr.length;_<D;_++){const O=e(this.expr[_],c.expr[_]);if(O!==0)return O}return 0}equals(c){if(c.type===this.type){if(this.expr.length!==c.expr.length)return!1;for(let _=0,D=this.expr.length;_<D;_++)if(!this.expr[_].equals(c.expr[_]))return!1;return!0}return!1}substituteConstants(){const c=d(this.expr);return c===this.expr?this:R.create(c,this.negated,!1)}evaluate(c){for(let _=0,D=this.expr.length;_<D;_++)if(this.expr[_].evaluate(c))return!0;return!1}static _normalizeArr(c,_,D){let O=[],k=!1;if(c){for(let F=0,G=c.length;F<G;F++){const H=c[F];if(H){if(H.type===0){k=!0;continue}if(H.type===1)return A.INSTANCE;if(H.type===9){O=O.concat(H.expr);continue}O.push(H)}}if(O.length===0&&k)return I.INSTANCE;O.sort(e)}if(O.length!==0){if(O.length===1)return O[0];for(let F=1;F<O.length;F++)O[F-1].equals(O[F])&&(O.splice(F,1),F--);if(O.length===1)return O[0];if(D){for(let F=0;F<O.length;F++)for(let G=F+1;G<O.length;G++)l(O[F],O[G])&&(O.splice(G,1),G--);if(O.length===1)return O[0]}return new R(O,_)}}serialize(){return this.expr.map(c=>c.serialize()).join(" || ")}keys(){const c=[];for(let _ of this.expr)c.push(..._.keys());return c}negate(){if(!this.negated){let c=[];for(let _ of this.expr)c.push(_.negate());for(;c.length>1;){const _=c.shift(),D=c.shift(),O=[];for(const F of x(_))for(const G of x(D))O.push(T.create([F,G],null));const k=c.length===0;c.unshift(R.create(O,null,k))}this.negated=c[0]}return this.negated}}class S extends f{constructor(c,_,D){super(c,null),this._defaultValue=_,typeof D=="object"?S._info.push(Object.assign(Object.assign({},D),{key:c})):D!==!0&&S._info.push({key:c,description:D,type:_!=null?typeof _:void 0})}static all(){return S._info.values()}bindTo(c){return c.createKey(this.key,this._defaultValue)}getValue(c){return c.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(c){return g.create(this.key,c)}}S._info=[];const w=(0,V.yh)("contextKeyService"),r="setContext";function n(y,c){return y<c?-1:y>c?1:0}function t(y,c,_,D){return y<_?-1:y>_?1:c<D?-1:c>D?1:0}function l(y,c){if(c.type===6&&y.type!==9&&y.type!==6){for(const O of c.expr)if(y.equals(O))return!0}const _=y.negate(),D=x(_).concat(x(c));D.sort(e);for(let O=0;O<D.length;O++){const F=D[O].negate();for(let G=O+1;G<D.length;G++){const H=D[G];if(F.equals(H))return!0}}return!1}function x(y){return y.type===9?y.expr:[y]}},72065:function(He,ye,K){"use strict";K.d(ye,{I8:function(){return Z},TG:function(){return J},jt:function(){return L},yh:function(){return N}});var Z;(function(C){C.serviceIds=new Map,C.DI_TARGET="$di$target",C.DI_DEPENDENCIES="$di$dependencies";function P(M){return M[C.DI_DEPENDENCIES]||[]}C.getServiceDependencies=P})(Z||(Z={}));const J=N("instantiationService");function V(C,P,M,e){P[Z.DI_TARGET]===P?P[Z.DI_DEPENDENCIES].push({id:C,index:M,optional:e}):(P[Z.DI_DEPENDENCIES]=[{id:C,index:M,optional:e}],P[Z.DI_TARGET]=P)}function N(C){if(Z.serviceIds.has(C))return Z.serviceIds.get(C);const P=function(M,e,I){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");V(P,M,I,!1)};return P.toString=()=>C,Z.serviceIds.set(C,P),P}function L(C){return function(P,M,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");V(C,P,e,!0)}}},89872:function(He,ye,K){"use strict";K.d(ye,{B:function(){return N}});var Z=K(35146),J=K(98401);class V{constructor(){this.data=new Map}add(C,P){Z.ok(J.HD(C)),Z.ok(J.Kn(P)),Z.ok(!this.data.has(C),"There is already an extension with this id"),this.data.set(C,P)}as(C){return this.data.get(C)||null}}const N=new V},92321:function(He,ye,K){"use strict";K.d(ye,{e:function(){return Z}});var Z;(function(J){J.DARK="dark",J.LIGHT="light",J.HIGH_CONTRAST="hc"})(Z||(Z={}))},97781:function(He,ye,K){"use strict";K.d(ye,{EN:function(){return e},IP:function(){return f},Ic:function(){return p},XE:function(){return P},bB:function(){return u},kS:function(){return I},m6:function(){return A}});var Z=K(73046),J=K(4669),V=K(9917),N=K(72065),L=K(89872),C=K(92321);const P=(0,N.yh)("themeService");var M;(function(v){function m(o){return o&&typeof o=="object"&&typeof o.id=="string"}v.isThemeColor=m})(M||(M={}));function e(v){return{id:v}}var I;(function(v){function m(b){return b&&typeof b=="object"&&typeof b.id=="string"&&(typeof b.color=="undefined"||M.isThemeColor(b.color))}v.isThemeIcon=m;const o=new RegExp(`^\\$\\((${Z.dT.iconNameExpression}(?:${Z.dT.iconModifierExpression})?)\\)$`);function a(b){const d=o.exec(b);if(!d)return;let[,T]=d;return{id:T}}v.fromString=a;function i(b,d){let T=b.id;const R=T.lastIndexOf("~");return R!==-1&&(T=T.substring(0,R)),d&&(T=`${T}~${d}`),{id:T}}v.modify=i;function s(b,d){var T,R;return b.id===d.id&&((T=b.color)===null||T===void 0?void 0:T.id)===((R=d.color)===null||R===void 0?void 0:R.id)}v.isEqual=s;function E(b,d){return{id:b.id,color:d?e(d):void 0}}v.asThemeIcon=E,v.asClassNameArray=Z.dT.asClassNameArray,v.asClassName=Z.dT.asClassName,v.asCSSSelector=Z.dT.asCSSSelector})(I||(I={}));function A(v){switch(v){case C.e.DARK:return"vs-dark";case C.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const f={ThemingContribution:"base.contributions.theming"};class g{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new J.Q5}onColorThemeChange(m){return this.themingParticipants.push(m),this.onThemingParticipantAddedEmitter.fire(m),(0,V.OF)(()=>{const o=this.themingParticipants.indexOf(m);this.themingParticipants.splice(o,1)})}getThemingParticipants(){return this.themingParticipants}}let h=new g;L.B.add(f.ThemingContribution,h);function p(v){return h.onColorThemeChange(v)}class u extends V.JT{constructor(m){super(),this.themeService=m,this.theme=m.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(o=>this.onThemeChange(o)))}onThemeChange(m){this.theme=m,this.updateStyles()}updateStyles(){}}},95860:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return a}});var Z=K(87462),J=K(1413),V=K(4942),N=K(97685),L=K(45987),C=K(94184),P=K.n(C),M=K(67294);function e(i){var s=M.useRef();s.current=i;var E=M.useCallback(function(){for(var b,d=arguments.length,T=new Array(d),R=0;R<d;R++)T[R]=arguments[R];return(b=s.current)===null||b===void 0?void 0:b.call.apply(b,[s].concat(T))},[]);return E}function I(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var A=I()?M.useLayoutEffect:M.useEffect,f=function(s,E){var b=M.useRef(!0);A(function(){return s(b.current)},E),A(function(){return b.current=!1,function(){b.current=!0}},[])},g=function(s,E){f(function(b){if(!b)return s()},E)},h=null;function p(i){var s=M.useRef(!1),E=M.useState(i),b=(0,N.Z)(E,2),d=b[0],T=b[1];M.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]);function R(S,w){w&&s.current||T(S)}return[d,R]}function u(i){return i!==void 0}function v(i,s){var E=s||{},b=E.defaultValue,d=E.value,T=E.onChange,R=E.postState,S=p(function(){return u(d)?d:u(b)?typeof b=="function"?b():b:typeof i=="function"?i():i}),w=(0,N.Z)(S,2),r=w[0],n=w[1],t=d!==void 0?d:r,l=R?R(t):t,x=e(T),y=p([t]),c=(0,N.Z)(y,2),_=c[0],D=c[1];g(function(){var k=_[0];r!==k&&x(r,k)},[_]),g(function(){u(d)||n(d)},[d]);var O=e(function(k,F){n(k,F),D([t],F)});return[l,O]}var m=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],o=(0,M.forwardRef)(function(i,s){var E=i.prefixCls,b=E===void 0?"rc-checkbox":E,d=i.className,T=i.style,R=i.checked,S=i.disabled,w=i.defaultChecked,r=w===void 0?!1:w,n=i.type,t=n===void 0?"checkbox":n,l=i.title,x=i.onChange,y=(0,L.Z)(i,m),c=(0,M.useRef)(null),_=(0,M.useRef)(null),D=v(r,{value:R}),O=(0,N.Z)(D,2),k=O[0],F=O[1];(0,M.useImperativeHandle)(s,function(){return{focus:function(Q){var ee;(ee=c.current)===null||ee===void 0||ee.focus(Q)},blur:function(){var Q;(Q=c.current)===null||Q===void 0||Q.blur()},input:c.current,nativeElement:_.current}});var G=P()(b,d,(0,V.Z)((0,V.Z)({},"".concat(b,"-checked"),k),"".concat(b,"-disabled"),S)),H=function(Q){S||("checked"in i||F(Q.target.checked),x==null||x({target:(0,J.Z)((0,J.Z)({},i),{},{type:t,checked:Q.target.checked}),stopPropagation:function(){Q.stopPropagation()},preventDefault:function(){Q.preventDefault()},nativeEvent:Q.nativeEvent}))};return M.createElement("span",{className:G,title:l,style:T,ref:_},M.createElement("input",(0,Z.Z)({},y,{className:"".concat(b,"-input"),ref:c,onChange:H,disabled:S,checked:!!k,type:t})),M.createElement("span",{className:"".concat(b,"-inner")}))}),a=o},82234:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return P}});var Z=K(45987),J=K(1413),V=K(71002),N=K(67294),L=["show"];function C(M,e){if(!e.max)return!0;var I=e.strategy(M);return I<=e.max}function P(M,e){return N.useMemo(function(){var I={};e&&(I.show=(0,V.Z)(e)==="object"&&e.formatter?e.formatter:!!e),I=(0,J.Z)((0,J.Z)({},I),M);var A=I,f=A.show,g=(0,Z.Z)(A,L);return(0,J.Z)((0,J.Z)({},g),{},{show:!!f,showFormatter:typeof f=="function"?f:void 0,strategy:g.strategy||function(h){return h.length}})},[M,e])}},67656:function(He,ye,K){"use strict";K.r(ye),K.d(ye,{BaseInput:function(){return I},default:function(){return a}});var Z=K(1413),J=K(87462),V=K(4942),N=K(71002),L=K(94184),C=K.n(L),P=K(67294),M=K(87887),e=P.forwardRef(function(i,s){var E,b,d,T=i.inputElement,R=i.children,S=i.prefixCls,w=i.prefix,r=i.suffix,n=i.addonBefore,t=i.addonAfter,l=i.className,x=i.style,y=i.disabled,c=i.readOnly,_=i.focused,D=i.triggerFocus,O=i.allowClear,k=i.value,F=i.handleReset,G=i.hidden,H=i.classes,j=i.classNames,Q=i.dataAttrs,ee=i.styles,ie=i.components,se=i.onClear,le=R!=null?R:T,xe=(ie==null?void 0:ie.affixWrapper)||"span",Re=(ie==null?void 0:ie.groupWrapper)||"span",Ee=(ie==null?void 0:ie.wrapper)||"span",he=(ie==null?void 0:ie.groupAddon)||"span",be=(0,P.useRef)(null),Ce=function(Be){var _e;(_e=be.current)!==null&&_e!==void 0&&_e.contains(Be.target)&&(D==null||D())},Ue=(0,M.X3)(i),$e=(0,P.cloneElement)(le,{value:k,className:C()((E=le.props)===null||E===void 0?void 0:E.className,!Ue&&(j==null?void 0:j.variant))||null}),z=(0,P.useRef)(null);if(P.useImperativeHandle(s,function(){return{nativeElement:z.current||be.current}}),Ue){var ne=null;if(O){var de=!y&&!c&&k,ge="".concat(S,"-clear-icon"),Ae=(0,N.Z)(O)==="object"&&O!==null&&O!==void 0&&O.clearIcon?O.clearIcon:"\u2716";ne=P.createElement("button",{type:"button",tabIndex:-1,onClick:function(Be){F==null||F(Be),se==null||se()},onMouseDown:function(Be){return Be.preventDefault()},className:C()(ge,(0,V.Z)((0,V.Z)({},"".concat(ge,"-hidden"),!de),"".concat(ge,"-has-suffix"),!!r))},Ae)}var Ve="".concat(S,"-affix-wrapper"),xt=C()(Ve,(0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)({},"".concat(S,"-disabled"),y),"".concat(Ve,"-disabled"),y),"".concat(Ve,"-focused"),_),"".concat(Ve,"-readonly"),c),"".concat(Ve,"-input-with-clear-btn"),r&&O&&k),H==null?void 0:H.affixWrapper,j==null?void 0:j.affixWrapper,j==null?void 0:j.variant),Je=(r||O)&&P.createElement("span",{className:C()("".concat(S,"-suffix"),j==null?void 0:j.suffix),style:ee==null?void 0:ee.suffix},ne,r);$e=P.createElement(xe,(0,J.Z)({className:xt,style:ee==null?void 0:ee.affixWrapper,onClick:Ce},Q==null?void 0:Q.affixWrapper,{ref:be}),w&&P.createElement("span",{className:C()("".concat(S,"-prefix"),j==null?void 0:j.prefix),style:ee==null?void 0:ee.prefix},w),$e,Je)}if((0,M.He)(i)){var pt="".concat(S,"-group"),St="".concat(pt,"-addon"),er="".concat(pt,"-wrapper"),Ne=C()("".concat(S,"-wrapper"),pt,H==null?void 0:H.wrapper,j==null?void 0:j.wrapper),Fe=C()(er,(0,V.Z)({},"".concat(er,"-disabled"),y),H==null?void 0:H.group,j==null?void 0:j.groupWrapper);$e=P.createElement(Re,{className:Fe,ref:z},P.createElement(Ee,{className:Ne},n&&P.createElement(he,{className:St},n),$e,t&&P.createElement(he,{className:St},t)))}return P.cloneElement($e,{className:C()((b=$e.props)===null||b===void 0?void 0:b.className,l)||null,style:(0,Z.Z)((0,Z.Z)({},(d=$e.props)===null||d===void 0?void 0:d.style),x),hidden:G})}),I=e,A=K(74902),f=K(97685),g=K(45987),h=K(21770),p=K(98423),u=K(82234),v=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],m=(0,P.forwardRef)(function(i,s){var E=i.autoComplete,b=i.onChange,d=i.onFocus,T=i.onBlur,R=i.onPressEnter,S=i.onKeyDown,w=i.onKeyUp,r=i.prefixCls,n=r===void 0?"rc-input":r,t=i.disabled,l=i.htmlSize,x=i.className,y=i.maxLength,c=i.suffix,_=i.showCount,D=i.count,O=i.type,k=O===void 0?"text":O,F=i.classes,G=i.classNames,H=i.styles,j=i.onCompositionStart,Q=i.onCompositionEnd,ee=(0,g.Z)(i,v),ie=(0,P.useState)(!1),se=(0,f.Z)(ie,2),le=se[0],xe=se[1],Re=(0,P.useRef)(!1),Ee=(0,P.useRef)(!1),he=(0,P.useRef)(null),be=(0,P.useRef)(null),Ce=function(je){he.current&&(0,M.nH)(he.current,je)},Ue=(0,h.Z)(i.defaultValue,{value:i.value}),$e=(0,f.Z)(Ue,2),z=$e[0],ne=$e[1],de=z==null?"":String(z),ge=(0,P.useState)(null),Ae=(0,f.Z)(ge,2),Ve=Ae[0],xt=Ae[1],Je=(0,u.Z)(D,_),pt=Je.max||y,St=Je.strategy(de),er=!!pt&&St>pt;(0,P.useImperativeHandle)(s,function(){var Ye;return{focus:Ce,blur:function(){var it;(it=he.current)===null||it===void 0||it.blur()},setSelectionRange:function(it,Vt,tr){var or;(or=he.current)===null||or===void 0||or.setSelectionRange(it,Vt,tr)},select:function(){var it;(it=he.current)===null||it===void 0||it.select()},input:he.current,nativeElement:((Ye=be.current)===null||Ye===void 0?void 0:Ye.nativeElement)||he.current}}),(0,P.useEffect)(function(){Ee.current&&(Ee.current=!1),xe(function(Ye){return Ye&&t?!1:Ye})},[t]);var Ne=function(je,it,Vt){var tr=it;if(!Re.current&&Je.exceedFormatter&&Je.max&&Je.strategy(it)>Je.max){if(tr=Je.exceedFormatter(it,{max:Je.max}),it!==tr){var or,Dr;xt([((or=he.current)===null||or===void 0?void 0:or.selectionStart)||0,((Dr=he.current)===null||Dr===void 0?void 0:Dr.selectionEnd)||0])}}else if(Vt.source==="compositionEnd")return;ne(tr),he.current&&(0,M.rJ)(he.current,je,b,tr)};(0,P.useEffect)(function(){if(Ve){var Ye;(Ye=he.current)===null||Ye===void 0||Ye.setSelectionRange.apply(Ye,(0,A.Z)(Ve))}},[Ve]);var Fe=function(je){Ne(je,je.target.value,{source:"change"})},We=function(je){Re.current=!1,Ne(je,je.currentTarget.value,{source:"compositionEnd"}),Q==null||Q(je)},Be=function(je){R&&je.key==="Enter"&&!Ee.current&&(Ee.current=!0,R(je)),S==null||S(je)},_e=function(je){je.key==="Enter"&&(Ee.current=!1),w==null||w(je)},ht=function(je){xe(!0),d==null||d(je)},Ze=function(je){Ee.current&&(Ee.current=!1),xe(!1),T==null||T(je)},At=function(je){ne(""),Ce(),he.current&&(0,M.rJ)(he.current,je,b)},yt=er&&"".concat(n,"-out-of-range"),tt=function(){var je=(0,p.Z)(i,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return P.createElement("input",(0,J.Z)({autoComplete:E},je,{onChange:Fe,onFocus:ht,onBlur:Ze,onKeyDown:Be,onKeyUp:_e,className:C()(n,(0,V.Z)({},"".concat(n,"-disabled"),t),G==null?void 0:G.input),style:H==null?void 0:H.input,ref:he,size:l,type:k,onCompositionStart:function(Vt){Re.current=!0,j==null||j(Vt)},onCompositionEnd:We}))},bt=function(){var je=Number(pt)>0;if(c||Je.show){var it=Je.showFormatter?Je.showFormatter({value:de,count:St,maxLength:pt}):"".concat(St).concat(je?" / ".concat(pt):"");return P.createElement(P.Fragment,null,Je.show&&P.createElement("span",{className:C()("".concat(n,"-show-count-suffix"),(0,V.Z)({},"".concat(n,"-show-count-has-suffix"),!!c),G==null?void 0:G.count),style:(0,Z.Z)({},H==null?void 0:H.count)},it),c)}return null};return P.createElement(I,(0,J.Z)({},ee,{prefixCls:n,className:C()(x,yt),handleReset:At,value:de,focused:le,triggerFocus:Ce,suffix:bt(),disabled:t,classes:F,classNames:G,styles:H}),tt())}),o=m,a=o},87887:function(He,ye,K){"use strict";K.d(ye,{He:function(){return Z},X3:function(){return J},nH:function(){return L},rJ:function(){return N}});function Z(C){return!!(C.addonBefore||C.addonAfter)}function J(C){return!!(C.prefix||C.suffix||C.allowClear)}function V(C,P,M){var e=P.cloneNode(!0),I=Object.create(C,{target:{value:e},currentTarget:{value:e}});return e.value=M,typeof P.selectionStart=="number"&&typeof P.selectionEnd=="number"&&(e.selectionStart=P.selectionStart,e.selectionEnd=P.selectionEnd),e.setSelectionRange=function(){P.setSelectionRange.apply(P,arguments)},I}function N(C,P,M,e){if(M){var I=P;if(P.type==="click"){I=V(P,C,""),M(I);return}if(C.type!=="file"&&e!==void 0){I=V(P,C,e),M(I);return}M(I)}}function L(C,P){if(C){C.focus(P);var M=P||{},e=M.cursor;if(e){var I=C.value.length;switch(e){case"start":C.setSelectionRange(0,0);break;case"end":C.setSelectionRange(I,I);break;default:C.setSelectionRange(0,I)}}}}},78595:function(He,ye,K){"use strict";K.d(ye,{iz:function(){return _t},ck:function(){return wn},BW:function(){return Yt},sN:function(){return wn},Wd:function(){return ze},ZP:function(){return Gr},Xl:function(){return Ve}});var Z=K(87462),J=K(4942),V=K(1413),N=K(74902),L=K(97685),C=K(45987),P=K(94184),M=K.n(P),e=K(67294),I=K(48555);function A(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var f=A()?e.useLayoutEffect:e.useEffect,g=function(re,oe){var te=e.useRef(!0);f(function(){return re(te.current)},oe),f(function(){return te.current=!1,function(){te.current=!0}},[])},h=function(re,oe){g(function(te){if(!te)return re()},oe)},p=g,u=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],v=void 0;function m(Y,re){var oe=Y.prefixCls,te=Y.invalidate,fe=Y.item,ce=Y.renderItem,ve=Y.responsive,Pe=Y.responsiveDisabled,Qe=Y.registerSize,Ge=Y.itemKey,vt=Y.className,lt=Y.style,Et=Y.children,wt=Y.display,gt=Y.order,rt=Y.component,ot=rt===void 0?"div":rt,U=(0,C.Z)(Y,u),W=ve&&!wt;function B(Me){Qe(Ge,Me)}e.useEffect(function(){return function(){B(null)}},[]);var X=ce&&fe!==v?ce(fe):Et,ae;te||(ae={opacity:W?0:1,height:W?0:v,overflowY:W?"hidden":v,order:ve?gt:v,pointerEvents:W?"none":v,position:W?"absolute":v});var me={};W&&(me["aria-hidden"]=!0);var Te=e.createElement(ot,(0,Z.Z)({className:M()(!te&&oe,vt),style:(0,V.Z)((0,V.Z)({},ae),lt)},me,U,{ref:re}),X);return ve&&(Te=e.createElement(I.Z,{onResize:function(Ie){var ke=Ie.offsetWidth;B(ke)},disabled:Pe},Te)),Te}var o=e.forwardRef(m);o.displayName="Item";var a=o;function i(Y){var re=e.useRef();re.current=Y;var oe=e.useCallback(function(){for(var te,fe=arguments.length,ce=new Array(fe),ve=0;ve<fe;ve++)ce[ve]=arguments[ve];return(te=re.current)===null||te===void 0?void 0:te.call.apply(te,[re].concat(ce))},[]);return oe}var s=K(73935),E=function(re){return+setTimeout(re,16)},b=function(re){return clearTimeout(re)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(E=function(re){return window.requestAnimationFrame(re)},b=function(re){return window.cancelAnimationFrame(re)});var d=0,T=new Map;function R(Y){T.delete(Y)}var S=function(re){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d+=1;var te=d;function fe(ce){if(ce===0)R(te),re();else{var ve=E(function(){fe(ce-1)});T.set(te,ve)}}return fe(oe),te};S.cancel=function(Y){var re=T.get(Y);return R(re),b(re)};var w=S;function r(Y){if(typeof MessageChannel=="undefined")w(Y);else{var re=new MessageChannel;re.port1.onmessage=function(){return Y()},re.port2.postMessage(void 0)}}function n(){var Y=e.useRef(null),re=function(te){Y.current||(Y.current=[],r(function(){(0,s.unstable_batchedUpdates)(function(){Y.current.forEach(function(fe){fe()}),Y.current=null})})),Y.current.push(te)};return re}function t(Y,re){var oe=e.useState(re),te=(0,L.Z)(oe,2),fe=te[0],ce=te[1],ve=i(function(Pe){Y(function(){ce(Pe)})});return[fe,ve]}var l=e.createContext(null),x=["component"],y=["className"],c=["className"],_=function(re,oe){var te=e.useContext(l);if(!te){var fe=re.component,ce=fe===void 0?"div":fe,ve=(0,C.Z)(re,x);return e.createElement(ce,(0,Z.Z)({},ve,{ref:oe}))}var Pe=te.className,Qe=(0,C.Z)(te,y),Ge=re.className,vt=(0,C.Z)(re,c);return e.createElement(l.Provider,{value:null},e.createElement(a,(0,Z.Z)({ref:oe,className:M()(Pe,Ge)},Qe,vt)))},D=e.forwardRef(_);D.displayName="RawItem";var O=D,k=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],F="responsive",G="invalidate";function H(Y){return"+ ".concat(Y.length," ...")}function j(Y,re){var oe=Y.prefixCls,te=oe===void 0?"rc-overflow":oe,fe=Y.data,ce=fe===void 0?[]:fe,ve=Y.renderItem,Pe=Y.renderRawItem,Qe=Y.itemKey,Ge=Y.itemWidth,vt=Ge===void 0?10:Ge,lt=Y.ssr,Et=Y.style,wt=Y.className,gt=Y.maxCount,rt=Y.renderRest,ot=Y.renderRawRest,U=Y.suffix,W=Y.component,B=W===void 0?"div":W,X=Y.itemComponent,ae=Y.onVisibleChange,me=(0,C.Z)(Y,k),Te=lt==="full",Me=n(),Ie=t(Me,null),ke=(0,L.Z)(Ie,2),at=ke[0],st=ke[1],dt=at||0,nt=t(Me,new Map),mt=(0,L.Z)(nt,2),kt=mt[0],Dt=mt[1],Bt=t(Me,0),Nt=(0,L.Z)(Bt,2),Mt=Nt[0],Qt=Nt[1],Ot=t(Me,0),ft=(0,L.Z)(Ot,2),Xt=ft[0],Ht=ft[1],nr=t(Me,0),Fr=(0,L.Z)(nr,2),br=Fr[0],Tr=Fr[1],$t=(0,e.useState)(null),dr=(0,L.Z)($t,2),vr=dr[0],Rr=dr[1],tn=(0,e.useState)(null),ir=(0,L.Z)(tn,2),xr=ir[0],Wt=ir[1],Qr=e.useMemo(function(){return xr===null&&Te?Number.MAX_SAFE_INTEGER:xr||0},[xr,at]),Xr=(0,e.useState)(!1),pr=(0,L.Z)(Xr,2),Ft=pr[0],Lr=pr[1],hn="".concat(te,"-item"),dn=Math.max(Mt,Xt),Sr=gt===F,ar=ce.length&&Sr,Pr=gt===G,$r=ar||typeof gt=="number"&&ce.length>gt,gr=(0,e.useMemo)(function(){var we=ce;return ar?at===null&&Te?we=ce:we=ce.slice(0,Math.min(ce.length,dt/vt)):typeof gt=="number"&&(we=ce.slice(0,gt)),we},[ce,vt,at,gt,ar]),Ir=(0,e.useMemo)(function(){return ar?ce.slice(Qr+1):ce.slice(gr.length)},[ce,gr,ar,Qr]),Ar=(0,e.useCallback)(function(we,et){var ct;return typeof Qe=="function"?Qe(we):(ct=Qe&&(we==null?void 0:we[Qe]))!==null&&ct!==void 0?ct:et},[Qe]),mr=(0,e.useCallback)(ve||function(we){return we},[ve]);function jr(we,et,ct){xr===we&&(et===void 0||et===vr)||(Wt(we),ct||(Lr(we<ce.length-1),ae==null||ae(we)),et!==void 0&&Rr(et))}function un(we,et){st(et.clientWidth)}function Ur(we,et){Dt(function(ct){var Gt=new Map(ct);return et===null?Gt.delete(we):Gt.set(we,et),Gt})}function Jt(we,et){Ht(et),Qt(Xt)}function Or(we,et){Tr(et)}function Mr(we){return kt.get(Ar(gr[we],we))}p(function(){if(dt&&typeof dn=="number"&&gr){var we=br,et=gr.length,ct=et-1;if(!et){jr(0,null);return}for(var Gt=0;Gt<et;Gt+=1){var Ut=Mr(Gt);if(Te&&(Ut=Ut||0),Ut===void 0){jr(Gt-1,void 0,!0);break}if(we+=Ut,ct===0&&we<=dt||Gt===ct-1&&we+Mr(ct)<=dt){jr(ct,null);break}else if(we+dn>dt){jr(Gt-1,we-Ut-br+Xt);break}}U&&Mr(0)+br>dt&&Rr(null)}},[dt,kt,Xt,br,Ar,gr]);var Xn=Ft&&!!Ir.length,zt={};vr!==null&&ar&&(zt={position:"absolute",left:vr,top:0});var ln={prefixCls:hn,responsive:ar,component:X,invalidate:Pr},bn=Pe?function(we,et){var ct=Ar(we,et);return e.createElement(l.Provider,{key:ct,value:(0,V.Z)((0,V.Z)({},ln),{},{order:et,item:we,itemKey:ct,registerSize:Ur,display:et<=Qr})},Pe(we,et))}:function(we,et){var ct=Ar(we,et);return e.createElement(a,(0,Z.Z)({},ln,{order:et,key:ct,item:we,renderItem:mr,itemKey:ct,registerSize:Ur,display:et<=Qr}))},_r,yn={order:Xn?Qr:Number.MAX_SAFE_INTEGER,className:"".concat(hn,"-rest"),registerSize:Jt,display:Xn};if(ot)ot&&(_r=e.createElement(l.Provider,{value:(0,V.Z)((0,V.Z)({},ln),yn)},ot(Ir)));else{var rn=rt||H;_r=e.createElement(a,(0,Z.Z)({},ln,yn),typeof rn=="function"?rn(Ir):rn)}var Ct=e.createElement(B,(0,Z.Z)({className:M()(!Pr&&te,wt),style:Et,ref:re},me),gr.map(bn),$r?_r:null,U&&e.createElement(a,(0,Z.Z)({},ln,{responsive:Sr,responsiveDisabled:!ar,order:Qr,className:"".concat(hn,"-suffix"),registerSize:Or,display:!0,style:zt}),U));return Sr&&(Ct=e.createElement(I.Z,{onResize:un,disabled:!ar},Ct)),Ct}var Q=e.forwardRef(j);Q.displayName="Overflow",Q.Item=O,Q.RESPONSIVE=F,Q.INVALIDATE=G;var ee=Q,ie=ee,se=K(21770),le=K(91881),xe=K(80334),Re=e.createContext(null);function Ee(Y,re){return Y===void 0?null:"".concat(Y,"-").concat(re)}function he(Y){var re=e.useContext(Re);return Ee(re,Y)}var be=K(56982),Ce=["children","locked"],Ue=e.createContext(null);function $e(Y,re){var oe=(0,V.Z)({},Y);return Object.keys(re).forEach(function(te){var fe=re[te];fe!==void 0&&(oe[te]=fe)}),oe}function z(Y){var re=Y.children,oe=Y.locked,te=(0,C.Z)(Y,Ce),fe=e.useContext(Ue),ce=(0,be.Z)(function(){return $e(fe,te)},[fe,te],function(ve,Pe){return!oe&&(ve[0]!==Pe[0]||!(0,le.Z)(ve[1],Pe[1],!0))});return e.createElement(Ue.Provider,{value:ce},re)}var ne=[],de=e.createContext(null);function ge(){return e.useContext(de)}var Ae=e.createContext(ne);function Ve(Y){var re=e.useContext(Ae);return e.useMemo(function(){return Y!==void 0?[].concat((0,N.Z)(re),[Y]):re},[re,Y])}var xt=e.createContext(null),Je=e.createContext({}),pt=Je,St=function(Y){if(!Y)return!1;if(Y instanceof Element){if(Y.offsetParent)return!0;if(Y.getBBox){var re=Y.getBBox(),oe=re.width,te=re.height;if(oe||te)return!0}if(Y.getBoundingClientRect){var fe=Y.getBoundingClientRect(),ce=fe.width,ve=fe.height;if(ce||ve)return!0}}return!1};function er(Y){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(St(Y)){var oe=Y.nodeName.toLowerCase(),te=["input","select","textarea","button"].includes(oe)||Y.isContentEditable||oe==="a"&&!!Y.getAttribute("href"),fe=Y.getAttribute("tabindex"),ce=Number(fe),ve=null;return fe&&!Number.isNaN(ce)?ve=ce:te&&ve===null&&(ve=0),te&&Y.disabled&&(ve=null),ve!==null&&(ve>=0||re&&ve<0)}return!1}function Ne(Y){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,oe=(0,N.Z)(Y.querySelectorAll("*")).filter(function(te){return er(te,re)});return er(Y,re)&&oe.unshift(Y),oe}var Fe=null;function We(){Fe=document.activeElement}function Be(){Fe=null}function _e(){if(Fe)try{Fe.focus()}catch(Y){}}function ht(Y,re){if(re.keyCode===9){var oe=Ne(Y),te=oe[re.shiftKey?0:oe.length-1],fe=te===document.activeElement||Y===document.activeElement;if(fe){var ce=oe[re.shiftKey?oe.length-1:0];ce.focus(),re.preventDefault()}}}var Ze=K(15105),At=K(75164),yt=Ze.Z.LEFT,tt=Ze.Z.RIGHT,bt=Ze.Z.UP,Ye=Ze.Z.DOWN,je=Ze.Z.ENTER,it=Ze.Z.ESC,Vt=Ze.Z.HOME,tr=Ze.Z.END,or=[bt,Ye,yt,tt];function Dr(Y,re,oe,te){var fe,ce="prev",ve="next",Pe="children",Qe="parent";if(Y==="inline"&&te===je)return{inlineTrigger:!0};var Ge=(0,J.Z)((0,J.Z)({},bt,ce),Ye,ve),vt=(0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)({},yt,oe?ve:ce),tt,oe?ce:ve),Ye,Pe),je,Pe),lt=(0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)({},bt,ce),Ye,ve),je,Pe),it,Qe),yt,oe?Pe:Qe),tt,oe?Qe:Pe),Et={inline:Ge,horizontal:vt,vertical:lt,inlineSub:Ge,horizontalSub:lt,verticalSub:lt},wt=(fe=Et["".concat(Y).concat(re?"":"Sub")])===null||fe===void 0?void 0:fe[te];switch(wt){case ce:return{offset:-1,sibling:!0};case ve:return{offset:1,sibling:!0};case Qe:return{offset:-1,sibling:!1};case Pe:return{offset:1,sibling:!1};default:return null}}function Yr(Y){for(var re=Y;re;){if(re.getAttribute("data-menu-list"))return re;re=re.parentElement}return null}function ur(Y,re){for(var oe=Y||document.activeElement;oe;){if(re.has(oe))return oe;oe=oe.parentElement}return null}function qr(Y,re){var oe=Ne(Y,!0);return oe.filter(function(te){return re.has(te)})}function cr(Y,re,oe){var te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Y)return null;var fe=qr(Y,re),ce=fe.length,ve=fe.findIndex(function(Pe){return oe===Pe});return te<0?ve===-1?ve=ce-1:ve-=1:te>0&&(ve+=1),ve=(ve+ce)%ce,fe[ve]}var Hr=function(re,oe){var te=new Set,fe=new Map,ce=new Map;return re.forEach(function(ve){var Pe=document.querySelector("[data-menu-id='".concat(Ee(oe,ve),"']"));Pe&&(te.add(Pe),ce.set(Pe,ve),fe.set(ve,Pe))}),{elements:te,key2element:fe,element2key:ce}};function mn(Y,re,oe,te,fe,ce,ve,Pe,Qe,Ge){var vt=e.useRef(),lt=e.useRef();lt.current=re;var Et=function(){At.Z.cancel(vt.current)};return e.useEffect(function(){return function(){Et()}},[]),function(wt){var gt=wt.which;if([].concat(or,[je,it,Vt,tr]).includes(gt)){var rt=ce(),ot=Hr(rt,te),U=ot,W=U.elements,B=U.key2element,X=U.element2key,ae=B.get(re),me=ur(ae,W),Te=X.get(me),Me=Dr(Y,ve(Te,!0).length===1,oe,gt);if(!Me&&gt!==Vt&&gt!==tr)return;(or.includes(gt)||[Vt,tr].includes(gt))&&wt.preventDefault();var Ie=function(Dt){if(Dt){var Bt=Dt,Nt=Dt.querySelector("a");Nt!=null&&Nt.getAttribute("href")&&(Bt=Nt);var Mt=X.get(Dt);Pe(Mt),Et(),vt.current=(0,At.Z)(function(){lt.current===Mt&&Bt.focus()})}};if([Vt,tr].includes(gt)||Me.sibling||!me){var ke;!me||Y==="inline"?ke=fe.current:ke=Yr(me);var at,st=qr(ke,W);gt===Vt?at=st[0]:gt===tr?at=st[st.length-1]:at=cr(ke,W,me,Me.offset),Ie(at)}else if(Me.inlineTrigger)Qe(Te);else if(Me.offset>0)Qe(Te,!0),Et(),vt.current=(0,At.Z)(function(){ot=Hr(rt,te);var kt=me.getAttribute("aria-controls"),Dt=document.getElementById(kt),Bt=cr(Dt,ot.elements);Ie(Bt)},5);else if(Me.offset<0){var dt=ve(Te,!0),nt=dt[dt.length-2],mt=B.get(nt);Qe(nt,!1),Ie(mt)}}Ge==null||Ge(wt)}}function En(Y){Promise.resolve().then(Y)}var Tn="__RC_UTIL_PATH_SPLIT__",Cr=function(re){return re.join(Tn)},Ke=function(re){return re.split(Tn)},Kr="rc-menu-more";function _n(){var Y=e.useState({}),re=(0,L.Z)(Y,2),oe=re[1],te=(0,e.useRef)(new Map),fe=(0,e.useRef)(new Map),ce=e.useState([]),ve=(0,L.Z)(ce,2),Pe=ve[0],Qe=ve[1],Ge=(0,e.useRef)(0),vt=(0,e.useRef)(!1),lt=function(){vt.current||oe({})},Et=(0,e.useCallback)(function(B,X){var ae=Cr(X);fe.current.set(ae,B),te.current.set(B,ae),Ge.current+=1;var me=Ge.current;En(function(){me===Ge.current&&lt()})},[]),wt=(0,e.useCallback)(function(B,X){var ae=Cr(X);fe.current.delete(ae),te.current.delete(B)},[]),gt=(0,e.useCallback)(function(B){Qe(B)},[]),rt=(0,e.useCallback)(function(B,X){var ae=te.current.get(B)||"",me=Ke(ae);return X&&Pe.includes(me[0])&&me.unshift(Kr),me},[Pe]),ot=(0,e.useCallback)(function(B,X){return B.filter(function(ae){return ae!==void 0}).some(function(ae){var me=rt(ae,!0);return me.includes(X)})},[rt]),U=function(){var X=(0,N.Z)(te.current.keys());return Pe.length&&X.push(Kr),X},W=(0,e.useCallback)(function(B){var X="".concat(te.current.get(B)).concat(Tn),ae=new Set;return(0,N.Z)(fe.current.keys()).forEach(function(me){me.startsWith(X)&&ae.add(fe.current.get(me))}),ae},[]);return e.useEffect(function(){return function(){vt.current=!0}},[]),{registerPath:Et,unregisterPath:wt,refreshOverflowKeys:gt,isSubPathKey:ot,getKeyPath:rt,getKeys:U,getSubPathKeys:W}}function Vr(Y){var re=e.useRef(Y);re.current=Y;var oe=e.useCallback(function(){for(var te,fe=arguments.length,ce=new Array(fe),ve=0;ve<fe;ve++)ce[ve]=arguments[ve];return(te=re.current)===null||te===void 0?void 0:te.call.apply(te,[re].concat(ce))},[]);return Y?oe:void 0}var Wr=Math.random().toFixed(5).toString().slice(2),xn=0;function In(Y){var re=(0,se.Z)(Y,{value:Y}),oe=(0,L.Z)(re,2),te=oe[0],fe=oe[1];return e.useEffect(function(){xn+=1;var ce="".concat(Wr,"-").concat(xn);fe("rc-menu-uuid-".concat(ce))},[]),te}var On=K(15671),Wn=K(43144),oi=K(60136),zn=K(29388),Mn=K(98423),Cn=K(42550);function ui(Y,re,oe,te){var fe=e.useContext(Ue),ce=fe.activeKey,ve=fe.onActive,Pe=fe.onInactive,Qe={active:ce===Y};return re||(Qe.onMouseEnter=function(Ge){oe==null||oe({key:Y,domEvent:Ge}),ve(Y)},Qe.onMouseLeave=function(Ge){te==null||te({key:Y,domEvent:Ge}),Pe(Y)}),Qe}function on(Y){var re=e.useContext(Ue),oe=re.mode,te=re.rtl,fe=re.inlineIndent;if(oe!=="inline")return null;var ce=Y;return te?{paddingRight:ce*fe}:{paddingLeft:ce*fe}}function li(Y){var re=Y.icon,oe=Y.props,te=Y.children,fe;return re===null||re===!1?null:(typeof re=="function"?fe=e.createElement(re,(0,V.Z)({},oe)):typeof re!="boolean"&&(fe=re),fe||te||null)}var Yn=["item"];function Gn(Y){var re=Y.item,oe=(0,C.Z)(Y,Yn);return Object.defineProperty(oe,"item",{get:function(){return(0,xe.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),re}}),oe}var An=["title","attribute","elementRef"],_i=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],fi=["active"],ii=function(Y){(0,oi.Z)(oe,Y);var re=(0,zn.Z)(oe);function oe(){return(0,On.Z)(this,oe),re.apply(this,arguments)}return(0,Wn.Z)(oe,[{key:"render",value:function(){var fe=this.props,ce=fe.title,ve=fe.attribute,Pe=fe.elementRef,Qe=(0,C.Z)(fe,An),Ge=(0,Mn.Z)(Qe,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,xe.ZP)(!ve,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),e.createElement(ie.Item,(0,Z.Z)({},ve,{title:typeof ce=="string"?ce:void 0},Ge,{ref:Pe}))}}]),oe}(e.Component),kn=e.forwardRef(function(Y,re){var oe=Y.style,te=Y.className,fe=Y.eventKey,ce=Y.warnKey,ve=Y.disabled,Pe=Y.itemIcon,Qe=Y.children,Ge=Y.role,vt=Y.onMouseEnter,lt=Y.onMouseLeave,Et=Y.onClick,wt=Y.onKeyDown,gt=Y.onFocus,rt=(0,C.Z)(Y,_i),ot=he(fe),U=e.useContext(Ue),W=U.prefixCls,B=U.onItemClick,X=U.disabled,ae=U.overflowDisabled,me=U.itemIcon,Te=U.selectedKeys,Me=U.onActive,Ie=e.useContext(pt),ke=Ie._internalRenderMenuItem,at="".concat(W,"-item"),st=e.useRef(),dt=e.useRef(),nt=X||ve,mt=(0,Cn.x1)(re,dt),kt=Ve(fe),Dt=function($t){return{key:fe,keyPath:(0,N.Z)(kt).reverse(),item:st.current,domEvent:$t}},Bt=Pe||me,Nt=ui(fe,nt,vt,lt),Mt=Nt.active,Qt=(0,C.Z)(Nt,fi),Ot=Te.includes(fe),ft=on(kt.length),Xt=function($t){if(!nt){var dr=Dt($t);Et==null||Et(Gn(dr)),B(dr)}},Ht=function($t){if(wt==null||wt($t),$t.which===Ze.Z.ENTER){var dr=Dt($t);Et==null||Et(Gn(dr)),B(dr)}},nr=function($t){Me(fe),gt==null||gt($t)},Fr={};Y.role==="option"&&(Fr["aria-selected"]=Ot);var br=e.createElement(ii,(0,Z.Z)({ref:st,elementRef:mt,role:Ge===null?"none":Ge||"menuitem",tabIndex:ve?null:-1,"data-menu-id":ae&&ot?null:ot},(0,Mn.Z)(rt,["extra"]),Qt,Fr,{component:"li","aria-disabled":ve,style:(0,V.Z)((0,V.Z)({},ft),oe),className:M()(at,(0,J.Z)((0,J.Z)((0,J.Z)({},"".concat(at,"-active"),Mt),"".concat(at,"-selected"),Ot),"".concat(at,"-disabled"),nt),te),onClick:Xt,onKeyDown:Ht,onFocus:nr}),Qe,e.createElement(li,{props:(0,V.Z)((0,V.Z)({},Y),{},{isSelected:Ot}),icon:Bt}));return ke&&(br=ke(br,Y,{selected:Ot})),br});function yi(Y,re){var oe=Y.eventKey,te=ge(),fe=Ve(oe);return e.useEffect(function(){if(te)return te.registerPath(oe,fe),function(){te.unregisterPath(oe,fe)}},[fe]),te?null:e.createElement(kn,(0,Z.Z)({},Y,{ref:re}))}var wn=e.forwardRef(yi),Qn=["className","children"],yr=function(re,oe){var te=re.className,fe=re.children,ce=(0,C.Z)(re,Qn),ve=e.useContext(Ue),Pe=ve.prefixCls,Qe=ve.mode,Ge=ve.rtl;return e.createElement("ul",(0,Z.Z)({className:M()(Pe,Ge&&"".concat(Pe,"-rtl"),"".concat(Pe,"-sub"),"".concat(Pe,"-").concat(Qe==="inline"?"inline":"vertical"),te),role:"menu"},ce,{"data-menu-list":!0,ref:oe}),fe)},hr=e.forwardRef(yr);hr.displayName="SubMenuList";var kr=hr,Nn=K(50344);function ki(Y,re){return(0,Nn.Z)(Y).map(function(oe,te){if(e.isValidElement(oe)){var fe,ce,ve=oe.key,Pe=(fe=(ce=oe.props)===null||ce===void 0?void 0:ce.eventKey)!==null&&fe!==void 0?fe:ve,Qe=Pe==null;Qe&&(Pe="tmp_key-".concat([].concat((0,N.Z)(re),[te]).join("-")));var Ge={key:Pe,eventKey:Pe};return e.cloneElement(oe,Ge)}return oe})}var Ni=K(98280),en={adjustX:1,adjustY:1},Ri={topLeft:{points:["bl","tl"],overflow:en},topRight:{points:["br","tr"],overflow:en},bottomLeft:{points:["tl","bl"],overflow:en},bottomRight:{points:["tr","br"],overflow:en},leftTop:{points:["tr","tl"],overflow:en},leftBottom:{points:["br","bl"],overflow:en},rightTop:{points:["tl","tr"],overflow:en},rightBottom:{points:["bl","br"],overflow:en}},Fi={topLeft:{points:["bl","tl"],overflow:en},topRight:{points:["br","tr"],overflow:en},bottomLeft:{points:["tl","bl"],overflow:en},bottomRight:{points:["tr","br"],overflow:en},rightTop:{points:["tr","tl"],overflow:en},rightBottom:{points:["br","bl"],overflow:en},leftTop:{points:["tl","tr"],overflow:en},leftBottom:{points:["bl","br"],overflow:en}},Gi=null;function Li(Y,re,oe){if(re)return re;if(oe)return oe[Y]||oe.other}var $={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function q(Y){var re=Y.prefixCls,oe=Y.visible,te=Y.children,fe=Y.popup,ce=Y.popupStyle,ve=Y.popupClassName,Pe=Y.popupOffset,Qe=Y.disabled,Ge=Y.mode,vt=Y.onVisibleChange,lt=e.useContext(Ue),Et=lt.getPopupContainer,wt=lt.rtl,gt=lt.subMenuOpenDelay,rt=lt.subMenuCloseDelay,ot=lt.builtinPlacements,U=lt.triggerSubMenuAction,W=lt.forceSubMenuRender,B=lt.rootClassName,X=lt.motion,ae=lt.defaultMotions,me=e.useState(!1),Te=(0,L.Z)(me,2),Me=Te[0],Ie=Te[1],ke=wt?(0,V.Z)((0,V.Z)({},Fi),ot):(0,V.Z)((0,V.Z)({},Ri),ot),at=$[Ge],st=Li(Ge,X,ae),dt=e.useRef(st);Ge!=="inline"&&(dt.current=st);var nt=(0,V.Z)((0,V.Z)({},dt.current),{},{leavedClassName:"".concat(re,"-hidden"),removeOnLeave:!1,motionAppear:!0}),mt=e.useRef();return e.useEffect(function(){return mt.current=(0,At.Z)(function(){Ie(oe)}),function(){At.Z.cancel(mt.current)}},[oe]),e.createElement(Ni.Z,{prefixCls:re,popupClassName:M()("".concat(re,"-popup"),(0,J.Z)({},"".concat(re,"-rtl"),wt),ve,B),stretch:Ge==="horizontal"?"minWidth":null,getPopupContainer:Et,builtinPlacements:ke,popupPlacement:at,popupVisible:Me,popup:fe,popupStyle:ce,popupAlign:Pe&&{offset:Pe},action:Qe?[]:[U],mouseEnterDelay:gt,mouseLeaveDelay:rt,onPopupVisibleChange:vt,forceRender:W,popupMotion:nt,fresh:!0},te)}var ue=K(62874);function pe(Y){var re=Y.id,oe=Y.open,te=Y.keyPath,fe=Y.children,ce="inline",ve=e.useContext(Ue),Pe=ve.prefixCls,Qe=ve.forceSubMenuRender,Ge=ve.motion,vt=ve.defaultMotions,lt=ve.mode,Et=e.useRef(!1);Et.current=lt===ce;var wt=e.useState(!Et.current),gt=(0,L.Z)(wt,2),rt=gt[0],ot=gt[1],U=Et.current?oe:!1;e.useEffect(function(){Et.current&&ot(!1)},[lt]);var W=(0,V.Z)({},Li(ce,Ge,vt));te.length>1&&(W.motionAppear=!1);var B=W.onVisibleChanged;return W.onVisibleChanged=function(X){return!Et.current&&!X&&ot(!0),B==null?void 0:B(X)},rt?null:e.createElement(z,{mode:ce,locked:!Et.current},e.createElement(ue.Z,(0,Z.Z)({visible:U},W,{forceRender:Qe,removeOnLeave:!1,leavedClassName:"".concat(Pe,"-hidden")}),function(X){var ae=X.className,me=X.style;return e.createElement(kr,{id:re,className:ae,style:me},fe)}))}var Se=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],De=["active"],Le=e.forwardRef(function(Y,re){var oe=Y.style,te=Y.className,fe=Y.title,ce=Y.eventKey,ve=Y.warnKey,Pe=Y.disabled,Qe=Y.internalPopupClose,Ge=Y.children,vt=Y.itemIcon,lt=Y.expandIcon,Et=Y.popupClassName,wt=Y.popupOffset,gt=Y.popupStyle,rt=Y.onClick,ot=Y.onMouseEnter,U=Y.onMouseLeave,W=Y.onTitleClick,B=Y.onTitleMouseEnter,X=Y.onTitleMouseLeave,ae=(0,C.Z)(Y,Se),me=he(ce),Te=e.useContext(Ue),Me=Te.prefixCls,Ie=Te.mode,ke=Te.openKeys,at=Te.disabled,st=Te.overflowDisabled,dt=Te.activeKey,nt=Te.selectedKeys,mt=Te.itemIcon,kt=Te.expandIcon,Dt=Te.onItemClick,Bt=Te.onOpenChange,Nt=Te.onActive,Mt=e.useContext(pt),Qt=Mt._internalRenderSubMenuItem,Ot=e.useContext(xt),ft=Ot.isSubPathKey,Xt=Ve(),Ht="".concat(Me,"-submenu"),nr=at||Pe,Fr=e.useRef(),br=e.useRef(),Tr=vt!=null?vt:mt,$t=lt!=null?lt:kt,dr=ke.includes(ce),vr=!st&&dr,Rr=ft(nt,ce),tn=ui(ce,nr,B,X),ir=tn.active,xr=(0,C.Z)(tn,De),Wt=e.useState(!1),Qr=(0,L.Z)(Wt,2),Xr=Qr[0],pr=Qr[1],Ft=function(Or){nr||pr(Or)},Lr=function(Or){Ft(!0),ot==null||ot({key:ce,domEvent:Or})},hn=function(Or){Ft(!1),U==null||U({key:ce,domEvent:Or})},dn=e.useMemo(function(){return ir||(Ie!=="inline"?Xr||ft([dt],ce):!1)},[Ie,ir,dt,Xr,ce,ft]),Sr=on(Xt.length),ar=function(Or){nr||(W==null||W({key:ce,domEvent:Or}),Ie==="inline"&&Bt(ce,!dr))},Pr=Vr(function(Jt){rt==null||rt(Gn(Jt)),Dt(Jt)}),$r=function(Or){Ie!=="inline"&&Bt(ce,Or)},gr=function(){Nt(ce)},Ir=me&&"".concat(me,"-popup"),Ar=e.useMemo(function(){return e.createElement(li,{icon:Ie!=="horizontal"?$t:void 0,props:(0,V.Z)((0,V.Z)({},Y),{},{isOpen:vr,isSubMenu:!0})},e.createElement("i",{className:"".concat(Ht,"-arrow")}))},[Ie,$t,Y,vr,Ht]),mr=e.createElement("div",(0,Z.Z)({role:"menuitem",style:Sr,className:"".concat(Ht,"-title"),tabIndex:nr?null:-1,ref:Fr,title:typeof fe=="string"?fe:null,"data-menu-id":st&&me?null:me,"aria-expanded":vr,"aria-haspopup":!0,"aria-controls":Ir,"aria-disabled":nr,onClick:ar,onFocus:gr},xr),fe,Ar),jr=e.useRef(Ie);if(Ie!=="inline"&&Xt.length>1?jr.current="vertical":jr.current=Ie,!st){var un=jr.current;mr=e.createElement(q,{mode:un,prefixCls:Ht,visible:!Qe&&vr&&Ie!=="inline",popupClassName:Et,popupOffset:wt,popupStyle:gt,popup:e.createElement(z,{mode:un==="horizontal"?"vertical":un},e.createElement(kr,{id:Ir,ref:br},Ge)),disabled:nr,onVisibleChange:$r},mr)}var Ur=e.createElement(ie.Item,(0,Z.Z)({ref:re,role:"none"},ae,{component:"li",style:oe,className:M()(Ht,"".concat(Ht,"-").concat(Ie),te,(0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)({},"".concat(Ht,"-open"),vr),"".concat(Ht,"-active"),dn),"".concat(Ht,"-selected"),Rr),"".concat(Ht,"-disabled"),nr)),onMouseEnter:Lr,onMouseLeave:hn}),mr,!st&&e.createElement(pe,{id:Ir,open:vr,keyPath:Xt},Ge));return Qt&&(Ur=Qt(Ur,Y,{selected:Rr,active:dn,open:vr,disabled:nr})),e.createElement(z,{onItemClick:Pr,mode:Ie==="horizontal"?"vertical":Ie,itemIcon:Tr,expandIcon:$t},Ur)}),Oe=e.forwardRef(function(Y,re){var oe=Y.eventKey,te=Y.children,fe=Ve(oe),ce=ki(te,fe),ve=ge();e.useEffect(function(){if(ve)return ve.registerPath(oe,fe),function(){ve.unregisterPath(oe,fe)}},[fe]);var Pe;return ve?Pe=ce:Pe=e.createElement(Le,(0,Z.Z)({ref:re},Y),ce),e.createElement(Ae.Provider,{value:fe},Pe)}),ze=Oe,ut=K(71002);function _t(Y){var re=Y.className,oe=Y.style,te=e.useContext(Ue),fe=te.prefixCls,ce=ge();return ce?null:e.createElement("li",{role:"separator",className:M()("".concat(fe,"-item-divider"),re),style:oe})}var qe=["className","title","eventKey","children"],Rt=e.forwardRef(function(Y,re){var oe=Y.className,te=Y.title,fe=Y.eventKey,ce=Y.children,ve=(0,C.Z)(Y,qe),Pe=e.useContext(Ue),Qe=Pe.prefixCls,Ge="".concat(Qe,"-item-group");return e.createElement("li",(0,Z.Z)({ref:re,role:"presentation"},ve,{onClick:function(lt){return lt.stopPropagation()},className:M()(Ge,oe)}),e.createElement("div",{role:"presentation",className:"".concat(Ge,"-title"),title:typeof te=="string"?te:void 0},te),e.createElement("ul",{role:"group",className:"".concat(Ge,"-list")},ce))}),jt=e.forwardRef(function(Y,re){var oe=Y.eventKey,te=Y.children,fe=Ve(oe),ce=ki(te,fe),ve=ge();return ve?ce:e.createElement(Rt,(0,Z.Z)({ref:re},(0,Mn.Z)(Y,["warnKey"])),ce)}),Yt=jt,Kt=["label","children","key","type","extra"];function rr(Y,re,oe){var te=re.item,fe=re.group,ce=re.submenu,ve=re.divider;return(Y||[]).map(function(Pe,Qe){if(Pe&&(0,ut.Z)(Pe)==="object"){var Ge=Pe,vt=Ge.label,lt=Ge.children,Et=Ge.key,wt=Ge.type,gt=Ge.extra,rt=(0,C.Z)(Ge,Kt),ot=Et!=null?Et:"tmp-".concat(Qe);return lt||wt==="group"?wt==="group"?e.createElement(fe,(0,Z.Z)({key:ot},rt,{title:vt}),rr(lt,re,oe)):e.createElement(ce,(0,Z.Z)({key:ot},rt,{title:vt}),rr(lt,re,oe)):wt==="divider"?e.createElement(ve,(0,Z.Z)({key:ot},rt)):e.createElement(te,(0,Z.Z)({key:ot},rt,{extra:gt}),vt,(!!gt||gt===0)&&e.createElement("span",{className:"".concat(oe,"-item-extra")},gt))}return null}).filter(function(Pe){return Pe})}function Pt(Y,re,oe,te,fe){var ce=Y,ve=(0,V.Z)({divider:_t,item:wn,group:Yt,submenu:ze},te);return re&&(ce=rr(re,ve,fe)),ki(ce,oe)}var It=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Lt=[],Zt=e.forwardRef(function(Y,re){var oe,te=Y,fe=te.prefixCls,ce=fe===void 0?"rc-menu":fe,ve=te.rootClassName,Pe=te.style,Qe=te.className,Ge=te.tabIndex,vt=Ge===void 0?0:Ge,lt=te.items,Et=te.children,wt=te.direction,gt=te.id,rt=te.mode,ot=rt===void 0?"vertical":rt,U=te.inlineCollapsed,W=te.disabled,B=te.disabledOverflow,X=te.subMenuOpenDelay,ae=X===void 0?.1:X,me=te.subMenuCloseDelay,Te=me===void 0?.1:me,Me=te.forceSubMenuRender,Ie=te.defaultOpenKeys,ke=te.openKeys,at=te.activeKey,st=te.defaultActiveFirst,dt=te.selectable,nt=dt===void 0?!0:dt,mt=te.multiple,kt=mt===void 0?!1:mt,Dt=te.defaultSelectedKeys,Bt=te.selectedKeys,Nt=te.onSelect,Mt=te.onDeselect,Qt=te.inlineIndent,Ot=Qt===void 0?24:Qt,ft=te.motion,Xt=te.defaultMotions,Ht=te.triggerSubMenuAction,nr=Ht===void 0?"hover":Ht,Fr=te.builtinPlacements,br=te.itemIcon,Tr=te.expandIcon,$t=te.overflowedIndicator,dr=$t===void 0?"...":$t,vr=te.overflowedIndicatorPopupClassName,Rr=te.getPopupContainer,tn=te.onClick,ir=te.onOpenChange,xr=te.onKeyDown,Wt=te.openAnimation,Qr=te.openTransitionName,Xr=te._internalRenderMenuItem,pr=te._internalRenderSubMenuItem,Ft=te._internalComponents,Lr=(0,C.Z)(te,It),hn=e.useMemo(function(){return[Pt(Et,lt,Lt,Ft,ce),Pt(Et,lt,Lt,{},ce)]},[Et,lt,Ft]),dn=(0,L.Z)(hn,2),Sr=dn[0],ar=dn[1],Pr=e.useState(!1),$r=(0,L.Z)(Pr,2),gr=$r[0],Ir=$r[1],Ar=e.useRef(),mr=In(gt),jr=wt==="rtl",un=(0,se.Z)(Ie,{value:ke,postState:function(qt){return qt||Lt}}),Ur=(0,L.Z)(un,2),Jt=Ur[0],Or=Ur[1],Mr=function(qt){var sr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Jr(){Or(qt),ir==null||ir(qt)}sr?(0,s.flushSync)(Jr):Jr()},Xn=e.useState(Jt),zt=(0,L.Z)(Xn,2),ln=zt[0],bn=zt[1],_r=e.useRef(!1),yn=e.useMemo(function(){return(ot==="inline"||ot==="vertical")&&U?["vertical",U]:[ot,!1]},[ot,U]),rn=(0,L.Z)(yn,2),Ct=rn[0],we=rn[1],et=Ct==="inline",ct=e.useState(Ct),Gt=(0,L.Z)(ct,2),Ut=Gt[0],Fn=Gt[1],Zr=e.useState(we),nn=(0,L.Z)(Zr,2),vn=nn[0],Ei=nn[1];e.useEffect(function(){Fn(Ct),Ei(we),_r.current&&(et?Or(ln):Mr(Lt))},[Ct,we]);var ci=e.useState(0),hi=(0,L.Z)(ci,2),$n=hi[0],Un=hi[1],pn=$n>=Sr.length-1||Ut!=="horizontal"||B;e.useEffect(function(){et&&bn(Jt)},[Jt]),e.useEffect(function(){return _r.current=!0,function(){_r.current=!1}},[]);var Dn=_n(),fn=Dn.registerPath,jn=Dn.unregisterPath,lr=Dn.refreshOverflowKeys,fr=Dn.isSubPathKey,Rn=Dn.getKeyPath,Jn=Dn.getKeys,bi=Dn.getSubPathKeys,Sn=e.useMemo(function(){return{registerPath:fn,unregisterPath:jn}},[fn,jn]),Pi=e.useMemo(function(){return{isSubPathKey:fr}},[fr]);e.useEffect(function(){lr(pn?Lt:Sr.slice($n+1).map(function(wr){return wr.key}))},[$n,pn]);var Ti=(0,se.Z)(at||st&&((oe=Sr[0])===null||oe===void 0?void 0:oe.key),{value:at}),Hn=(0,L.Z)(Ti,2),qn=Hn[0],xi=Hn[1],Si=Vr(function(wr){xi(wr)}),di=Vr(function(){xi(void 0)});(0,e.useImperativeHandle)(re,function(){return{list:Ar.current,focus:function(qt){var sr,Jr=Jn(),cn=Hr(Jr,mr),Zn=cn.elements,Ln=cn.key2element,Mi=cn.element2key,Di=qr(Ar.current,Zn),Pn=qn!=null?qn:Di[0]?Mi.get(Di[0]):(sr=Sr.find(function(pi){return!pi.props.disabled}))===null||sr===void 0?void 0:sr.key,gn=Ln.get(Pn);if(Pn&&gn){var ti;gn==null||(ti=gn.focus)===null||ti===void 0||ti.call(gn,qt)}}}});var Ai=(0,se.Z)(Dt||[],{value:Bt,postState:function(qt){return Array.isArray(qt)?qt:qt==null?Lt:[qt]}}),ei=(0,L.Z)(Ai,2),Bn=ei[0],Vn=ei[1],vi=function(qt){if(nt){var sr=qt.key,Jr=Bn.includes(sr),cn;kt?Jr?cn=Bn.filter(function(Ln){return Ln!==sr}):cn=[].concat((0,N.Z)(Bn),[sr]):cn=[sr],Vn(cn);var Zn=(0,V.Z)((0,V.Z)({},qt),{},{selectedKeys:cn});Jr?Mt==null||Mt(Zn):Nt==null||Nt(Zn)}!kt&&Jt.length&&Ut!=="inline"&&Mr(Lt)},ai=Vr(function(wr){tn==null||tn(Gn(wr)),vi(wr)}),wi=Vr(function(wr,qt){var sr=Jt.filter(function(cn){return cn!==wr});if(qt)sr.push(wr);else if(Ut!=="inline"){var Jr=bi(wr);sr=sr.filter(function(cn){return!Jr.has(cn)})}(0,le.Z)(Jt,sr,!0)||Mr(sr,!0)}),an=function(qt,sr){var Jr=sr!=null?sr:!Jt.includes(qt);wi(qt,Jr)},Ii=mn(Ut,qn,jr,mr,Ar,Jn,Rn,xi,an,xr);e.useEffect(function(){Ir(!0)},[]);var Ui=e.useMemo(function(){return{_internalRenderMenuItem:Xr,_internalRenderSubMenuItem:pr}},[Xr,pr]),si=Ut!=="horizontal"||B?Sr:Sr.map(function(wr,qt){return e.createElement(z,{key:wr.key,overflowDisabled:qt>$n},wr)}),Oi=e.createElement(ie,(0,Z.Z)({id:gt,ref:Ar,prefixCls:"".concat(ce,"-overflow"),component:"ul",itemComponent:wn,className:M()(ce,"".concat(ce,"-root"),"".concat(ce,"-").concat(Ut),Qe,(0,J.Z)((0,J.Z)({},"".concat(ce,"-inline-collapsed"),vn),"".concat(ce,"-rtl"),jr),ve),dir:wt,style:Pe,role:"menu",tabIndex:vt,data:si,renderRawItem:function(qt){return qt},renderRawRest:function(qt){var sr=qt.length,Jr=sr?Sr.slice(-sr):null;return e.createElement(ze,{eventKey:Kr,title:dr,disabled:pn,internalPopupClose:sr===0,popupClassName:vr},Jr)},maxCount:Ut!=="horizontal"||B?ie.INVALIDATE:ie.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(qt){Un(qt)},onKeyDown:Ii},Lr));return e.createElement(pt.Provider,{value:Ui},e.createElement(Re.Provider,{value:mr},e.createElement(z,{prefixCls:ce,rootClassName:ve,mode:Ut,openKeys:Jt,rtl:jr,disabled:W,motion:gr?ft:null,defaultMotions:gr?Xt:null,activeKey:qn,onActive:Si,onInactive:di,selectedKeys:Bn,inlineIndent:Ot,subMenuOpenDelay:ae,subMenuCloseDelay:Te,forceSubMenuRender:Me,builtinPlacements:Fr,triggerSubMenuAction:nr,getPopupContainer:Rr,itemIcon:br,expandIcon:Tr,onItemClick:ai,onOpenChange:wi},e.createElement(xt.Provider,{value:Pi},Oi),e.createElement("div",{style:{display:"none"},"aria-hidden":!0},e.createElement(de.Provider,{value:Sn},ar)))))}),Nr=Zt,Er=Nr;Er.Item=wn,Er.SubMenu=ze,Er.ItemGroup=Yt,Er.Divider=_t;var Gr=Er},62874:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return er}});var Z=K(4942),J=K(1413),V=K(97685),N=K(71002),L=K(67294),C=K(34203),P=K(42550),M=K(94184),e=K.n(M),I=K(98924);function A(Ne,Fe){var We={};return We[Ne.toLowerCase()]=Fe.toLowerCase(),We["Webkit".concat(Ne)]="webkit".concat(Fe),We["Moz".concat(Ne)]="moz".concat(Fe),We["ms".concat(Ne)]="MS".concat(Fe),We["O".concat(Ne)]="o".concat(Fe.toLowerCase()),We}function f(Ne,Fe){var We={animationend:A("Animation","AnimationEnd"),transitionend:A("Transition","TransitionEnd")};return Ne&&("AnimationEvent"in Fe||delete We.animationend.animation,"TransitionEvent"in Fe||delete We.transitionend.transition),We}var g=f((0,I.Z)(),typeof window!="undefined"?window:{}),h={};if((0,I.Z)()){var p=document.createElement("div");h=p.style}var u={};function v(Ne){if(u[Ne])return u[Ne];var Fe=g[Ne];if(Fe)for(var We=Object.keys(Fe),Be=We.length,_e=0;_e<Be;_e+=1){var ht=We[_e];if(Object.prototype.hasOwnProperty.call(Fe,ht)&&ht in h)return u[Ne]=Fe[ht],u[Ne]}return""}var m=v("animationend"),o=v("transitionend"),a=!!(m&&o),i=m||"animationend",s=o||"transitionend";function E(Ne,Fe){if(!Ne)return null;if((0,N.Z)(Ne)==="object"){var We=Fe.replace(/-\w/g,function(Be){return Be[1].toUpperCase()});return Ne[We]}return"".concat(Ne,"-").concat(Fe)}var b="none",d="appear",T="enter",R="leave",S="none",w="prepare",r="start",n="active",t="end",l=K(63896),x=K(75164),y=function(){var Ne=L.useRef(null);function Fe(){x.Z.cancel(Ne.current)}function We(Be){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Fe();var ht=(0,x.Z)(function(){_e<=1?Be({isCanceled:function(){return ht!==Ne.current}}):We(Be,_e-1)});Ne.current=ht}return L.useEffect(function(){return function(){Fe()}},[]),[We,Fe]},c=(0,I.Z)()?L.useLayoutEffect:L.useEffect,_=c,D=[w,r,n,t],O=!1,k=!0;function F(Ne){return Ne===n||Ne===t}var G=function(Ne,Fe){var We=(0,l.Z)(S),Be=(0,V.Z)(We,2),_e=Be[0],ht=Be[1],Ze=y(),At=(0,V.Z)(Ze,2),yt=At[0],tt=At[1];function bt(){ht(w,!0)}return _(function(){if(_e!==S&&_e!==t){var Ye=D.indexOf(_e),je=D[Ye+1],it=Fe(_e);it===O?ht(je,!0):yt(function(Vt){function tr(){Vt.isCanceled()||ht(je,!0)}it===!0?tr():Promise.resolve(it).then(tr)})}},[Ne,_e]),L.useEffect(function(){return function(){tt()}},[]),[bt,_e]},H=function(Ne){var Fe=(0,L.useRef)(),We=(0,L.useRef)(Ne);We.current=Ne;var Be=L.useCallback(function(Ze){We.current(Ze)},[]);function _e(Ze){Ze&&(Ze.removeEventListener(s,Be),Ze.removeEventListener(i,Be))}function ht(Ze){Fe.current&&Fe.current!==Ze&&_e(Fe.current),Ze&&Ze!==Fe.current&&(Ze.addEventListener(s,Be),Ze.addEventListener(i,Be),Fe.current=Ze)}return L.useEffect(function(){return function(){_e(Fe.current)}},[]),[ht,_e]};function j(Ne,Fe,We,Be){var _e=Be.motionEnter,ht=_e===void 0?!0:_e,Ze=Be.motionAppear,At=Ze===void 0?!0:Ze,yt=Be.motionLeave,tt=yt===void 0?!0:yt,bt=Be.motionDeadline,Ye=Be.motionLeaveImmediately,je=Be.onAppearPrepare,it=Be.onEnterPrepare,Vt=Be.onLeavePrepare,tr=Be.onAppearStart,or=Be.onEnterStart,Dr=Be.onLeaveStart,Yr=Be.onAppearActive,ur=Be.onEnterActive,qr=Be.onLeaveActive,cr=Be.onAppearEnd,Hr=Be.onEnterEnd,mn=Be.onLeaveEnd,En=Be.onVisibleChanged,Tn=(0,l.Z)(),Cr=(0,V.Z)(Tn,2),Ke=Cr[0],Kr=Cr[1],_n=(0,l.Z)(b),Vr=(0,V.Z)(_n,2),Wr=Vr[0],xn=Vr[1],In=(0,l.Z)(null),On=(0,V.Z)(In,2),Wn=On[0],oi=On[1],zn=(0,L.useRef)(!1),Mn=(0,L.useRef)(null);function Cn(){return We()}var ui=(0,L.useRef)(!1);function on(yr){var hr=Cn();if(!(yr&&!yr.deadline&&yr.target!==hr)){var kr=ui.current,Nn;Wr===d&&kr?Nn=cr==null?void 0:cr(hr,yr):Wr===T&&kr?Nn=Hr==null?void 0:Hr(hr,yr):Wr===R&&kr&&(Nn=mn==null?void 0:mn(hr,yr)),Wr!==b&&kr&&Nn!==!1&&(xn(b,!0),oi(null,!0))}}var li=H(on),Yn=(0,V.Z)(li,1),Gn=Yn[0],An=L.useMemo(function(){var yr,hr,kr;switch(Wr){case d:return yr={},(0,Z.Z)(yr,w,je),(0,Z.Z)(yr,r,tr),(0,Z.Z)(yr,n,Yr),yr;case T:return hr={},(0,Z.Z)(hr,w,it),(0,Z.Z)(hr,r,or),(0,Z.Z)(hr,n,ur),hr;case R:return kr={},(0,Z.Z)(kr,w,Vt),(0,Z.Z)(kr,r,Dr),(0,Z.Z)(kr,n,qr),kr;default:return{}}},[Wr]),_i=G(Wr,function(yr){if(yr===w){var hr=An[w];return hr?hr(Cn()):O}if(kn in An){var kr;oi(((kr=An[kn])===null||kr===void 0?void 0:kr.call(An,Cn(),null))||null)}return kn===n&&(Gn(Cn()),bt>0&&(clearTimeout(Mn.current),Mn.current=setTimeout(function(){on({deadline:!0})},bt))),k}),fi=(0,V.Z)(_i,2),ii=fi[0],kn=fi[1],yi=F(kn);ui.current=yi,_(function(){Kr(Fe);var yr=zn.current;if(zn.current=!0,!!Ne){var hr;!yr&&Fe&&At&&(hr=d),yr&&Fe&&ht&&(hr=T),(yr&&!Fe&&tt||!yr&&Ye&&!Fe&&tt)&&(hr=R),hr&&(xn(hr),ii())}},[Fe]),(0,L.useEffect)(function(){(Wr===d&&!At||Wr===T&&!ht||Wr===R&&!tt)&&xn(b)},[At,ht,tt]),(0,L.useEffect)(function(){return function(){zn.current=!1,clearTimeout(Mn.current)}},[]);var wn=L.useRef(!1);(0,L.useEffect)(function(){Ke&&(wn.current=!0),Ke!==void 0&&Wr===b&&((wn.current||Ke)&&(En==null||En(Ke)),wn.current=!0)},[Ke,Wr]);var Qn=Wn;return An[w]&&kn===r&&(Qn=(0,J.Z)({transition:"none"},Qn)),[Wr,kn,Qn,Ke!=null?Ke:Fe]}var Q=K(15671),ee=K(43144),ie=K(60136),se=K(29388),le=function(Ne){(0,ie.Z)(We,Ne);var Fe=(0,se.Z)(We);function We(){return(0,Q.Z)(this,We),Fe.apply(this,arguments)}return(0,ee.Z)(We,[{key:"render",value:function(){return this.props.children}}]),We}(L.Component),xe=le;function Re(Ne){var Fe=Ne;(0,N.Z)(Ne)==="object"&&(Fe=Ne.transitionSupport);function We(_e){return!!(_e.motionName&&Fe)}var Be=L.forwardRef(function(_e,ht){var Ze=_e.visible,At=Ze===void 0?!0:Ze,yt=_e.removeOnLeave,tt=yt===void 0?!0:yt,bt=_e.forceRender,Ye=_e.children,je=_e.motionName,it=_e.leavedClassName,Vt=_e.eventProps,tr=We(_e),or=(0,L.useRef)(),Dr=(0,L.useRef)();function Yr(){try{return or.current instanceof HTMLElement?or.current:(0,C.Z)(Dr.current)}catch(In){return null}}var ur=j(tr,At,Yr,_e),qr=(0,V.Z)(ur,4),cr=qr[0],Hr=qr[1],mn=qr[2],En=qr[3],Tn=L.useRef(En);En&&(Tn.current=!0);var Cr=L.useCallback(function(In){or.current=In,(0,P.mH)(ht,In)},[ht]),Ke,Kr=(0,J.Z)((0,J.Z)({},Vt),{},{visible:At});if(!Ye)Ke=null;else if(cr===b||!We(_e))En?Ke=Ye((0,J.Z)({},Kr),Cr):!tt&&Tn.current&&it?Ke=Ye((0,J.Z)((0,J.Z)({},Kr),{},{className:it}),Cr):bt||!tt&&!it?Ke=Ye((0,J.Z)((0,J.Z)({},Kr),{},{style:{display:"none"}}),Cr):Ke=null;else{var _n,Vr;Hr===w?Vr="prepare":F(Hr)?Vr="active":Hr===r&&(Vr="start"),Ke=Ye((0,J.Z)((0,J.Z)({},Kr),{},{className:e()(E(je,cr),(_n={},(0,Z.Z)(_n,E(je,"".concat(cr,"-").concat(Vr)),Vr),(0,Z.Z)(_n,je,typeof je=="string"),_n)),style:mn}),Cr)}if(L.isValidElement(Ke)&&(0,P.Yr)(Ke)){var Wr=Ke,xn=Wr.ref;xn||(Ke=L.cloneElement(Ke,{ref:Cr}))}return L.createElement(xe,{ref:Dr},Ke)});return Be.displayName="CSSMotion",Be}var Ee=Re(a),he=K(87462),be=K(45987),Ce=K(97326),Ue="add",$e="keep",z="remove",ne="removed";function de(Ne){var Fe;return Ne&&(0,N.Z)(Ne)==="object"&&"key"in Ne?Fe=Ne:Fe={key:Ne},(0,J.Z)((0,J.Z)({},Fe),{},{key:String(Fe.key)})}function ge(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Ne.map(de)}function Ae(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],We=[],Be=0,_e=Fe.length,ht=ge(Ne),Ze=ge(Fe);ht.forEach(function(tt){for(var bt=!1,Ye=Be;Ye<_e;Ye+=1){var je=Ze[Ye];if(je.key===tt.key){Be<Ye&&(We=We.concat(Ze.slice(Be,Ye).map(function(it){return(0,J.Z)((0,J.Z)({},it),{},{status:Ue})})),Be=Ye),We.push((0,J.Z)((0,J.Z)({},je),{},{status:$e})),Be+=1,bt=!0;break}}bt||We.push((0,J.Z)((0,J.Z)({},tt),{},{status:z}))}),Be<_e&&(We=We.concat(Ze.slice(Be).map(function(tt){return(0,J.Z)((0,J.Z)({},tt),{},{status:Ue})})));var At={};We.forEach(function(tt){var bt=tt.key;At[bt]=(At[bt]||0)+1});var yt=Object.keys(At).filter(function(tt){return At[tt]>1});return yt.forEach(function(tt){We=We.filter(function(bt){var Ye=bt.key,je=bt.status;return Ye!==tt||je!==z}),We.forEach(function(bt){bt.key===tt&&(bt.status=$e)})}),We}var Ve=["component","children","onVisibleChanged","onAllRemoved"],xt=["status"],Je=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function pt(Ne){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ee,We=function(Be){(0,ie.Z)(ht,Be);var _e=(0,se.Z)(ht);function ht(){var Ze;(0,Q.Z)(this,ht);for(var At=arguments.length,yt=new Array(At),tt=0;tt<At;tt++)yt[tt]=arguments[tt];return Ze=_e.call.apply(_e,[this].concat(yt)),(0,Z.Z)((0,Ce.Z)(Ze),"state",{keyEntities:[]}),(0,Z.Z)((0,Ce.Z)(Ze),"removeKey",function(bt){var Ye=Ze.state.keyEntities,je=Ye.map(function(it){return it.key!==bt?it:(0,J.Z)((0,J.Z)({},it),{},{status:ne})});return Ze.setState({keyEntities:je}),je.filter(function(it){var Vt=it.status;return Vt!==ne}).length}),Ze}return(0,ee.Z)(ht,[{key:"render",value:function(){var At=this,yt=this.state.keyEntities,tt=this.props,bt=tt.component,Ye=tt.children,je=tt.onVisibleChanged,it=tt.onAllRemoved,Vt=(0,be.Z)(tt,Ve),tr=bt||L.Fragment,or={};return Je.forEach(function(Dr){or[Dr]=Vt[Dr],delete Vt[Dr]}),delete Vt.keys,L.createElement(tr,Vt,yt.map(function(Dr){var Yr=Dr.status,ur=(0,be.Z)(Dr,xt),qr=Yr===Ue||Yr===$e;return L.createElement(Fe,(0,he.Z)({},or,{key:ur.key,visible:qr,eventProps:ur,onVisibleChanged:function(Hr){if(je==null||je(Hr,{key:ur.key}),!Hr){var mn=At.removeKey(ur.key);mn===0&&it&&it()}}}),Ye)}))}}],[{key:"getDerivedStateFromProps",value:function(At,yt){var tt=At.keys,bt=yt.keyEntities,Ye=ge(tt),je=Ae(bt,Ye);return{keyEntities:je.filter(function(it){var Vt=bt.find(function(tr){var or=tr.key;return it.key===or});return!(Vt&&Vt.status===ne&&it.status===z)})}}}]),ht}(L.Component);return(0,Z.Z)(We,"defaultProps",{component:"div"}),We}var St=pt(a),er=Ee},48555:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return w}});var Z=K(87462),J=K(67294),V=K(50344),N=K(80334),L=K(1413),C=K(42550),P=K(34203),M=K(91033),e=new Map;function I(r){r.forEach(function(n){var t,l=n.target;(t=e.get(l))===null||t===void 0||t.forEach(function(x){return x(l)})})}var A=new M.Z(I),f=null,g=null;function h(r,n){e.has(r)||(e.set(r,new Set),A.observe(r)),e.get(r).add(n)}function p(r,n){e.has(r)&&(e.get(r).delete(n),e.get(r).size||(A.unobserve(r),e.delete(r)))}var u=K(15671),v=K(43144),m=K(60136),o=K(29388),a=function(r){(0,m.Z)(t,r);var n=(0,o.Z)(t);function t(){return(0,u.Z)(this,t),n.apply(this,arguments)}return(0,v.Z)(t,[{key:"render",value:function(){return this.props.children}}]),t}(J.Component),i=J.createContext(null);function s(r){var n=r.children,t=r.onBatchResize,l=J.useRef(0),x=J.useRef([]),y=J.useContext(i),c=J.useCallback(function(_,D,O){l.current+=1;var k=l.current;x.current.push({size:_,element:D,data:O}),Promise.resolve().then(function(){k===l.current&&(t==null||t(x.current),x.current=[])}),y==null||y(_,D,O)},[t,y]);return J.createElement(i.Provider,{value:c},n)}function E(r,n){var t=r.children,l=r.disabled,x=J.useRef(null),y=J.useRef(null),c=J.useContext(i),_=typeof t=="function",D=_?t(x):t,O=J.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),k=!_&&J.isValidElement(D)&&(0,C.Yr)(D),F=k?D.ref:null,G=J.useMemo(function(){return(0,C.sQ)(F,x)},[F,x]),H=function(){return(0,P.Z)(x.current)||(0,P.Z)(y.current)};J.useImperativeHandle(n,function(){return H()});var j=J.useRef(r);j.current=r;var Q=J.useCallback(function(ee){var ie=j.current,se=ie.onResize,le=ie.data,xe=ee.getBoundingClientRect(),Re=xe.width,Ee=xe.height,he=ee.offsetWidth,be=ee.offsetHeight,Ce=Math.floor(Re),Ue=Math.floor(Ee);if(O.current.width!==Ce||O.current.height!==Ue||O.current.offsetWidth!==he||O.current.offsetHeight!==be){var $e={width:Ce,height:Ue,offsetWidth:he,offsetHeight:be};O.current=$e;var z=he===Math.round(Re)?Re:he,ne=be===Math.round(Ee)?Ee:be,de=(0,L.Z)((0,L.Z)({},$e),{},{offsetWidth:z,offsetHeight:ne});c==null||c(de,ee,le),se&&Promise.resolve().then(function(){se(de,ee)})}},[]);return J.useEffect(function(){var ee=H();return ee&&!l&&h(ee,Q),function(){return p(ee,Q)}},[x.current,l]),J.createElement(a,{ref:y},k?J.cloneElement(D,{ref:G}):D)}var b=J.forwardRef(E),d=b,T="rc-observer-key";function R(r,n){var t=r.children,l=typeof t=="function"?[t]:(0,V.Z)(t);return l.map(function(x,y){var c=(x==null?void 0:x.key)||"".concat(T,"-").concat(y);return J.createElement(d,(0,Z.Z)({},r,{key:c,ref:y===0?n:void 0}),x)})}var S=J.forwardRef(R);S.Collection=s;var w=S},88068:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return Li}});var Z=K(87462),J=K(4942),V=K(1413),N=K(97685),L=K(71002),C=K(45987),P=K(94184),M=K.n(P),e=K(67294);function I($){var q=e.useRef();q.current=$;var ue=e.useCallback(function(){for(var pe,Se=arguments.length,De=new Array(Se),Le=0;Le<Se;Le++)De[Le]=arguments[Le];return(pe=q.current)===null||pe===void 0?void 0:pe.call.apply(pe,[q].concat(De))},[]);return ue}function A(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var f=A()?e.useLayoutEffect:e.useEffect,g=function(q,ue){var pe=e.useRef(!0);f(function(){return q(pe.current)},ue),f(function(){return pe.current=!1,function(){pe.current=!0}},[])},h=function(q,ue){g(function(pe){if(!pe)return q()},ue)},p=null;function u($){var q=e.useRef(!1),ue=e.useState($),pe=(0,N.Z)(ue,2),Se=pe[0],De=pe[1];e.useEffect(function(){return q.current=!1,function(){q.current=!0}},[]);function Le(Oe,ze){ze&&q.current||De(Oe)}return[Se,Le]}function v($){return $!==void 0}function m($,q){var ue=q||{},pe=ue.defaultValue,Se=ue.value,De=ue.onChange,Le=ue.postState,Oe=u(function(){return v(Se)?Se:v(pe)?typeof pe=="function"?pe():pe:typeof $=="function"?$():$}),ze=(0,N.Z)(Oe,2),ut=ze[0],_t=ze[1],qe=Se!==void 0?Se:ut,Rt=Le?Le(qe):qe,jt=I(De),Yt=u([qe]),Kt=(0,N.Z)(Yt,2),rr=Kt[0],Pt=Kt[1];h(function(){var Lt=rr[0];ut!==Lt&&jt(ut,Lt)},[rr]),h(function(){v(Se)||_t(Se)},[Se]);var It=I(function(Lt,Zt){_t(Lt,Zt),Pt([qe],Zt)});return[Rt,It]}var o=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var $=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test($)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test($==null?void 0:$.substr(0,4))},a=(0,e.createContext)(null),i=K(74902),s=K(48555),E=K(59864);function b($,q,ue){var pe=e.useRef({});return(!("value"in pe.current)||ue(pe.current.condition,q))&&(pe.current.value=$(),pe.current.condition=q),pe.current.value}function d($,q){typeof $=="function"?$(q):(0,L.Z)($)==="object"&&$&&"current"in $&&($.current=q)}function T(){for(var $=arguments.length,q=new Array($),ue=0;ue<$;ue++)q[ue]=arguments[ue];var pe=q.filter(function(Se){return Se});return pe.length<=1?pe[0]:function(Se){q.forEach(function(De){d(De,Se)})}}function R(){for(var $=arguments.length,q=new Array($),ue=0;ue<$;ue++)q[ue]=arguments[ue];return b(function(){return T.apply(void 0,q)},q,function(pe,Se){return pe.length===Se.length&&pe.every(function(De,Le){return De===Se[Le]})})}function S($){var q,ue,pe=isMemo($)?$.type.type:$.type;return!(typeof pe=="function"&&!((q=pe.prototype)!==null&&q!==void 0&&q.render)||typeof $=="function"&&!((ue=$.prototype)!==null&&ue!==void 0&&ue.render))}var w=function(q){return+setTimeout(q,16)},r=function(q){return clearTimeout(q)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(w=function(q){return window.requestAnimationFrame(q)},r=function(q){return window.cancelAnimationFrame(q)});var n=0,t=new Map;function l($){t.delete($)}var x=function(q){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;n+=1;var pe=n;function Se(De){if(De===0)l(pe),q();else{var Le=w(function(){Se(De-1)});t.set(pe,Le)}}return Se(ue),pe};x.cancel=function($){var q=t.get($);return l(q),r(q)};var y=x,c=function(q){var ue=q.activeTabOffset,pe=q.horizontal,Se=q.rtl,De=q.indicator,Le=De===void 0?{}:De,Oe=Le.size,ze=Le.align,ut=ze===void 0?"center":ze,_t=(0,e.useState)(),qe=(0,N.Z)(_t,2),Rt=qe[0],jt=qe[1],Yt=(0,e.useRef)(),Kt=e.useCallback(function(Pt){return typeof Oe=="function"?Oe(Pt):typeof Oe=="number"?Oe:Pt},[Oe]);function rr(){y.cancel(Yt.current)}return(0,e.useEffect)(function(){var Pt={};if(ue)if(pe){Pt.width=Kt(ue.width);var It=Se?"right":"left";ut==="start"&&(Pt[It]=ue[It]),ut==="center"&&(Pt[It]=ue[It]+ue.width/2,Pt.transform=Se?"translateX(50%)":"translateX(-50%)"),ut==="end"&&(Pt[It]=ue[It]+ue.width,Pt.transform="translateX(-100%)")}else Pt.height=Kt(ue.height),ut==="start"&&(Pt.top=ue.top),ut==="center"&&(Pt.top=ue.top+ue.height/2,Pt.transform="translateY(-50%)"),ut==="end"&&(Pt.top=ue.top+ue.height,Pt.transform="translateY(-100%)");return rr(),Yt.current=y(function(){jt(Pt)}),rr},[ue,pe,Se,ut,Kt]),{style:Rt}},_=c,D={width:0,height:0,left:0,top:0};function O($,q,ue){return(0,e.useMemo)(function(){for(var pe,Se=new Map,De=q.get((pe=$[0])===null||pe===void 0?void 0:pe.key)||D,Le=De.left+De.width,Oe=0;Oe<$.length;Oe+=1){var ze=$[Oe].key,ut=q.get(ze);if(!ut){var _t;ut=q.get((_t=$[Oe-1])===null||_t===void 0?void 0:_t.key)||D}var qe=Se.get(ze)||(0,V.Z)({},ut);qe.right=Le-qe.left-qe.width,Se.set(ze,qe)}return Se},[$.map(function(pe){return pe.key}).join("_"),q,ue])}function k($,q){var ue=e.useRef($),pe=e.useState({}),Se=(0,N.Z)(pe,2),De=Se[1];function Le(Oe){var ze=typeof Oe=="function"?Oe(ue.current):Oe;ze!==ue.current&&q(ze,ue.current),ue.current=ze,De({})}return[ue.current,Le]}var F=.1,G=.01,H=20,j=Math.pow(.995,H);function Q($,q){var ue=(0,e.useState)(),pe=(0,N.Z)(ue,2),Se=pe[0],De=pe[1],Le=(0,e.useState)(0),Oe=(0,N.Z)(Le,2),ze=Oe[0],ut=Oe[1],_t=(0,e.useState)(0),qe=(0,N.Z)(_t,2),Rt=qe[0],jt=qe[1],Yt=(0,e.useState)(),Kt=(0,N.Z)(Yt,2),rr=Kt[0],Pt=Kt[1],It=(0,e.useRef)();function Lt(re){var oe=re.touches[0],te=oe.screenX,fe=oe.screenY;De({x:te,y:fe}),window.clearInterval(It.current)}function Zt(re){if(Se){var oe=re.touches[0],te=oe.screenX,fe=oe.screenY;De({x:te,y:fe});var ce=te-Se.x,ve=fe-Se.y;q(ce,ve);var Pe=Date.now();ut(Pe),jt(Pe-ze),Pt({x:ce,y:ve})}}function Nr(){if(Se&&(De(null),Pt(null),rr)){var re=rr.x/Rt,oe=rr.y/Rt,te=Math.abs(re),fe=Math.abs(oe);if(Math.max(te,fe)<F)return;var ce=re,ve=oe;It.current=window.setInterval(function(){if(Math.abs(ce)<G&&Math.abs(ve)<G){window.clearInterval(It.current);return}ce*=j,ve*=j,q(ce*H,ve*H)},H)}}var Er=(0,e.useRef)();function Gr(re){var oe=re.deltaX,te=re.deltaY,fe=0,ce=Math.abs(oe),ve=Math.abs(te);ce===ve?fe=Er.current==="x"?oe:te:ce>ve?(fe=oe,Er.current="x"):(fe=te,Er.current="y"),q(-fe,-fe)&&re.preventDefault()}var Y=(0,e.useRef)(null);Y.current={onTouchStart:Lt,onTouchMove:Zt,onTouchEnd:Nr,onWheel:Gr},e.useEffect(function(){function re(ce){Y.current.onTouchStart(ce)}function oe(ce){Y.current.onTouchMove(ce)}function te(ce){Y.current.onTouchEnd(ce)}function fe(ce){Y.current.onWheel(ce)}return document.addEventListener("touchmove",oe,{passive:!1}),document.addEventListener("touchend",te,{passive:!0}),$.current.addEventListener("touchstart",re,{passive:!0}),$.current.addEventListener("wheel",fe,{passive:!1}),function(){document.removeEventListener("touchmove",oe),document.removeEventListener("touchend",te)}},[])}function ee($){var q=(0,e.useState)(0),ue=(0,N.Z)(q,2),pe=ue[0],Se=ue[1],De=(0,e.useRef)(0),Le=(0,e.useRef)();return Le.current=$,h(function(){var Oe;(Oe=Le.current)===null||Oe===void 0||Oe.call(Le)},[pe]),function(){De.current===pe&&(De.current+=1,Se(De.current))}}function ie($){var q=(0,e.useRef)([]),ue=(0,e.useState)({}),pe=(0,N.Z)(ue,2),Se=pe[1],De=(0,e.useRef)(typeof $=="function"?$():$),Le=ee(function(){var ze=De.current;q.current.forEach(function(ut){ze=ut(ze)}),q.current=[],De.current=ze,Se({})});function Oe(ze){q.current.push(ze),Le()}return[De.current,Oe]}var se={width:0,height:0,left:0,top:0,right:0};function le($,q,ue,pe,Se,De,Le){var Oe=Le.tabs,ze=Le.tabPosition,ut=Le.rtl,_t,qe,Rt;return["top","bottom"].includes(ze)?(_t="width",qe=ut?"right":"left",Rt=Math.abs(ue)):(_t="height",qe="top",Rt=-ue),(0,e.useMemo)(function(){if(!Oe.length)return[0,0];for(var jt=Oe.length,Yt=jt,Kt=0;Kt<jt;Kt+=1){var rr=$.get(Oe[Kt].key)||se;if(Math.floor(rr[qe]+rr[_t])>Math.floor(Rt+q)){Yt=Kt-1;break}}for(var Pt=0,It=jt-1;It>=0;It-=1){var Lt=$.get(Oe[It].key)||se;if(Lt[qe]<Rt){Pt=It+1;break}}return Pt>=Yt?[0,0]:[Pt,Yt]},[$,q,pe,Se,De,Rt,ze,Oe.map(function(jt){return jt.key}).join("_"),ut])}function xe($){var q;return $ instanceof Map?(q={},$.forEach(function(ue,pe){q[pe]=ue})):q=$,JSON.stringify(q)}var Re="TABS_DQ";function Ee($){return String($).replace(/"/g,Re)}function he($,q,ue,pe){return!(!ue||pe||$===!1||$===void 0&&(q===!1||q===null))}var be=e.forwardRef(function($,q){var ue=$.prefixCls,pe=$.editable,Se=$.locale,De=$.style;return!pe||pe.showAdd===!1?null:e.createElement("button",{ref:q,type:"button",className:"".concat(ue,"-nav-add"),style:De,"aria-label":(Se==null?void 0:Se.addAriaLabel)||"Add tab",onClick:function(Oe){pe.onEdit("add",{event:Oe})}},pe.addIcon||"+")}),Ce=be,Ue=e.forwardRef(function($,q){var ue=$.position,pe=$.prefixCls,Se=$.extra;if(!Se)return null;var De,Le={};return(0,L.Z)(Se)==="object"&&!e.isValidElement(Se)?Le=Se:Le.right=Se,ue==="right"&&(De=Le.right),ue==="left"&&(De=Le.left),De?e.createElement("div",{className:"".concat(pe,"-extra-content"),ref:q},De):null}),$e=Ue,z=K(98280),ne=K(39607);function de($,q,ue){var pe=React.useRef({});return(!("value"in pe.current)||ue(pe.current.condition,q))&&(pe.current.value=$(),pe.current.condition=q),pe.current.value}var ge=Symbol.for("react.element"),Ae=Symbol.for("react.transitional.element"),Ve=Symbol.for("react.fragment");function xt($){return $&&(0,L.Z)($)==="object"&&($.$$typeof===ge||$.$$typeof===Ae)&&$.type===Ve}var Je=Number(e.version.split(".")[0]),pt=function(q,ue){typeof q=="function"?q(ue):(0,L.Z)(q)==="object"&&q&&"current"in q&&(q.current=ue)},St=function(){for(var q=arguments.length,ue=new Array(q),pe=0;pe<q;pe++)ue[pe]=arguments[pe];var Se=ue.filter(Boolean);return Se.length<=1?Se[0]:function(De){ue.forEach(function(Le){pt(Le,De)})}},er=function(){for(var q=arguments.length,ue=new Array(q),pe=0;pe<q;pe++)ue[pe]=arguments[pe];return useMemo(function(){return St.apply(void 0,ue)},ue,function(Se,De){return Se.length!==De.length||Se.every(function(Le,Oe){return Le!==De[Oe]})})},Ne=function(q){var ue,pe;if(!q)return!1;if(Fe(q)&&Je>=19)return!0;var Se=(0,ne.isMemo)(q)?q.type.type:q.type;return!(typeof Se=="function"&&!((ue=Se.prototype)!==null&&ue!==void 0&&ue.render)&&Se.$$typeof!==ne.ForwardRef||typeof q=="function"&&!((pe=q.prototype)!==null&&pe!==void 0&&pe.render)&&q.$$typeof!==ne.ForwardRef)};function Fe($){return(0,e.isValidElement)($)&&!xt($)}var We=function(q){return Fe(q)&&Ne(q)},Be=function(q){if(q&&Fe(q)){var ue=q;return ue.props.propertyIsEnumerable("ref")?ue.props.ref:ue.ref}return null},_e={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(q){var ue=q.keyCode;if(q.altKey&&!q.ctrlKey||q.metaKey||ue>=_e.F1&&ue<=_e.F12)return!1;switch(ue){case _e.ALT:case _e.CAPS_LOCK:case _e.CONTEXT_MENU:case _e.CTRL:case _e.DOWN:case _e.END:case _e.ESC:case _e.HOME:case _e.INSERT:case _e.LEFT:case _e.MAC_FF_META:case _e.META:case _e.NUMLOCK:case _e.NUM_CENTER:case _e.PAGE_DOWN:case _e.PAGE_UP:case _e.PAUSE:case _e.PRINT_SCREEN:case _e.RIGHT:case _e.SHIFT:case _e.UP:case _e.WIN_KEY:case _e.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(q){if(q>=_e.ZERO&&q<=_e.NINE||q>=_e.NUM_ZERO&&q<=_e.NUM_MULTIPLY||q>=_e.A&&q<=_e.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&q===0)return!0;switch(q){case _e.SPACE:case _e.QUESTION_MARK:case _e.NUM_PLUS:case _e.NUM_MINUS:case _e.NUM_PERIOD:case _e.NUM_DIVISION:case _e.SEMICOLON:case _e.DASH:case _e.EQUALS:case _e.COMMA:case _e.PERIOD:case _e.SLASH:case _e.APOSTROPHE:case _e.SINGLE_QUOTE:case _e.OPEN_SQUARE_BRACKET:case _e.BACKSLASH:case _e.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ht=_e,Ze=function(q){return+setTimeout(q,16)},At=function(q){return clearTimeout(q)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ze=function(q){return window.requestAnimationFrame(q)},At=function(q){return window.cancelAnimationFrame(q)});var yt=0,tt=new Map;function bt($){tt.delete($)}var Ye=function(q){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;yt+=1;var pe=yt;function Se(De){if(De===0)bt(pe),q();else{var Le=Ze(function(){Se(De-1)});tt.set(pe,Le)}}return Se(ue),pe};Ye.cancel=function($){var q=tt.get($);return bt($),At(q)};var je=Ye,it=ht.ESC,Vt=ht.TAB;function tr($){var q=$.visible,ue=$.triggerRef,pe=$.onVisibleChange,Se=$.autoFocus,De=$.overlayRef,Le=e.useRef(!1),Oe=function(){if(q){var qe,Rt;(qe=ue.current)===null||qe===void 0||(Rt=qe.focus)===null||Rt===void 0||Rt.call(qe),pe==null||pe(!1)}},ze=function(){var qe;return(qe=De.current)!==null&&qe!==void 0&&qe.focus?(De.current.focus(),Le.current=!0,!0):!1},ut=function(qe){switch(qe.keyCode){case it:Oe();break;case Vt:{var Rt=!1;Le.current||(Rt=ze()),Rt?qe.preventDefault():Oe();break}}};e.useEffect(function(){return q?(window.addEventListener("keydown",ut),Se&&je(ze,3),function(){window.removeEventListener("keydown",ut),Le.current=!1}):function(){Le.current=!1}},[q])}var or=(0,e.forwardRef)(function($,q){var ue=$.overlay,pe=$.arrow,Se=$.prefixCls,De=(0,e.useMemo)(function(){var Oe;return typeof ue=="function"?Oe=ue():Oe=ue,Oe},[ue]),Le=St(q,Be(De));return e.createElement(e.Fragment,null,pe&&e.createElement("div",{className:"".concat(Se,"-arrow")}),e.cloneElement(De,{ref:Ne(De)?Le:void 0}))}),Dr=or,Yr={adjustX:1,adjustY:1},ur=[0,0],qr={topLeft:{points:["bl","tl"],overflow:Yr,offset:[0,-4],targetOffset:ur},top:{points:["bc","tc"],overflow:Yr,offset:[0,-4],targetOffset:ur},topRight:{points:["br","tr"],overflow:Yr,offset:[0,-4],targetOffset:ur},bottomLeft:{points:["tl","bl"],overflow:Yr,offset:[0,4],targetOffset:ur},bottom:{points:["tc","bc"],overflow:Yr,offset:[0,4],targetOffset:ur},bottomRight:{points:["tr","br"],overflow:Yr,offset:[0,4],targetOffset:ur}},cr=qr,Hr=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function mn($,q){var ue,pe=$.arrow,Se=pe===void 0?!1:pe,De=$.prefixCls,Le=De===void 0?"rc-dropdown":De,Oe=$.transitionName,ze=$.animation,ut=$.align,_t=$.placement,qe=_t===void 0?"bottomLeft":_t,Rt=$.placements,jt=Rt===void 0?cr:Rt,Yt=$.getPopupContainer,Kt=$.showAction,rr=$.hideAction,Pt=$.overlayClassName,It=$.overlayStyle,Lt=$.visible,Zt=$.trigger,Nr=Zt===void 0?["hover"]:Zt,Er=$.autoFocus,Gr=$.overlay,Y=$.children,re=$.onVisibleChange,oe=(0,C.Z)($,Hr),te=e.useState(),fe=(0,N.Z)(te,2),ce=fe[0],ve=fe[1],Pe="visible"in $?Lt:ce,Qe=e.useRef(null),Ge=e.useRef(null),vt=e.useRef(null);e.useImperativeHandle(q,function(){return Qe.current});var lt=function(X){ve(X),re==null||re(X)};tr({visible:Pe,triggerRef:vt,onVisibleChange:lt,autoFocus:Er,overlayRef:Ge});var Et=function(X){var ae=$.onOverlayClick;ve(!1),ae&&ae(X)},wt=function(){return e.createElement(Dr,{ref:Ge,overlay:Gr,prefixCls:Le,arrow:Se})},gt=function(){return typeof Gr=="function"?wt:wt()},rt=function(){var X=$.minOverlayWidthMatchTrigger,ae=$.alignPoint;return"minOverlayWidthMatchTrigger"in $?X:!ae},ot=function(){var X=$.openClassName;return X!==void 0?X:"".concat(Le,"-open")},U=e.cloneElement(Y,{className:M()((ue=Y.props)===null||ue===void 0?void 0:ue.className,Pe&&ot()),ref:Ne(Y)?St(vt,Be(Y)):void 0}),W=rr;return!W&&Nr.indexOf("contextMenu")!==-1&&(W=["click"]),e.createElement(z.Z,(0,Z.Z)({builtinPlacements:jt},oe,{prefixCls:Le,ref:Qe,popupClassName:M()(Pt,(0,J.Z)({},"".concat(Le,"-show-arrow"),Se)),popupStyle:It,action:Nr,showAction:Kt,hideAction:W,popupPlacement:qe,popupAlign:ut,popupTransitionName:Oe,popupAnimation:ze,popupVisible:Pe,stretch:rt()?"minWidth":"",popup:gt(),onPopupVisibleChange:lt,onPopupClick:Et,getPopupContainer:Yt}),U)}var En=e.forwardRef(mn),Tn=En,Cr=K(78595),Ke={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(q){var ue=q.keyCode;if(q.altKey&&!q.ctrlKey||q.metaKey||ue>=Ke.F1&&ue<=Ke.F12)return!1;switch(ue){case Ke.ALT:case Ke.CAPS_LOCK:case Ke.CONTEXT_MENU:case Ke.CTRL:case Ke.DOWN:case Ke.END:case Ke.ESC:case Ke.HOME:case Ke.INSERT:case Ke.LEFT:case Ke.MAC_FF_META:case Ke.META:case Ke.NUMLOCK:case Ke.NUM_CENTER:case Ke.PAGE_DOWN:case Ke.PAGE_UP:case Ke.PAUSE:case Ke.PRINT_SCREEN:case Ke.RIGHT:case Ke.SHIFT:case Ke.UP:case Ke.WIN_KEY:case Ke.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(q){if(q>=Ke.ZERO&&q<=Ke.NINE||q>=Ke.NUM_ZERO&&q<=Ke.NUM_MULTIPLY||q>=Ke.A&&q<=Ke.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&q===0)return!0;switch(q){case Ke.SPACE:case Ke.QUESTION_MARK:case Ke.NUM_PLUS:case Ke.NUM_MINUS:case Ke.NUM_PERIOD:case Ke.NUM_DIVISION:case Ke.SEMICOLON:case Ke.DASH:case Ke.EQUALS:case Ke.COMMA:case Ke.PERIOD:case Ke.SLASH:case Ke.APOSTROPHE:case Ke.SINGLE_QUOTE:case Ke.OPEN_SQUARE_BRACKET:case Ke.BACKSLASH:case Ke.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Kr=Ke,_n=e.forwardRef(function($,q){var ue=$.prefixCls,pe=$.id,Se=$.tabs,De=$.locale,Le=$.mobile,Oe=$.more,ze=Oe===void 0?{}:Oe,ut=$.style,_t=$.className,qe=$.editable,Rt=$.tabBarGutter,jt=$.rtl,Yt=$.removeAriaLabel,Kt=$.onTabClick,rr=$.getPopupContainer,Pt=$.popupClassName,It=(0,e.useState)(!1),Lt=(0,N.Z)(It,2),Zt=Lt[0],Nr=Lt[1],Er=(0,e.useState)(null),Gr=(0,N.Z)(Er,2),Y=Gr[0],re=Gr[1],oe=ze.icon,te=oe===void 0?"More":oe,fe="".concat(pe,"-more-popup"),ce="".concat(ue,"-dropdown"),ve=Y!==null?"".concat(fe,"-").concat(Y):null,Pe=De==null?void 0:De.dropdownAriaLabel;function Qe(rt,ot){rt.preventDefault(),rt.stopPropagation(),qe.onEdit("remove",{key:ot,event:rt})}var Ge=e.createElement(Cr.ZP,{onClick:function(ot){var U=ot.key,W=ot.domEvent;Kt(U,W),Nr(!1)},prefixCls:"".concat(ce,"-menu"),id:fe,tabIndex:-1,role:"listbox","aria-activedescendant":ve,selectedKeys:[Y],"aria-label":Pe!==void 0?Pe:"expanded dropdown"},Se.map(function(rt){var ot=rt.closable,U=rt.disabled,W=rt.closeIcon,B=rt.key,X=rt.label,ae=he(ot,W,qe,U);return e.createElement(Cr.sN,{key:B,id:"".concat(fe,"-").concat(B),role:"option","aria-controls":pe&&"".concat(pe,"-panel-").concat(B),disabled:U},e.createElement("span",null,X),ae&&e.createElement("button",{type:"button","aria-label":Yt||"remove",tabIndex:0,className:"".concat(ce,"-menu-item-remove"),onClick:function(Te){Te.stopPropagation(),Qe(Te,B)}},W||qe.removeIcon||"\xD7"))}));function vt(rt){for(var ot=Se.filter(function(ae){return!ae.disabled}),U=ot.findIndex(function(ae){return ae.key===Y})||0,W=ot.length,B=0;B<W;B+=1){U=(U+rt+W)%W;var X=ot[U];if(!X.disabled){re(X.key);return}}}function lt(rt){var ot=rt.which;if(!Zt){[Kr.DOWN,Kr.SPACE,Kr.ENTER].includes(ot)&&(Nr(!0),rt.preventDefault());return}switch(ot){case Kr.UP:vt(-1),rt.preventDefault();break;case Kr.DOWN:vt(1),rt.preventDefault();break;case Kr.ESC:Nr(!1);break;case Kr.SPACE:case Kr.ENTER:Y!==null&&Kt(Y,rt);break}}(0,e.useEffect)(function(){var rt=document.getElementById(ve);rt&&rt.scrollIntoView&&rt.scrollIntoView(!1)},[Y]),(0,e.useEffect)(function(){Zt||re(null)},[Zt]);var Et=(0,J.Z)({},jt?"marginRight":"marginLeft",Rt);Se.length||(Et.visibility="hidden",Et.order=1);var wt=M()((0,J.Z)({},"".concat(ce,"-rtl"),jt)),gt=Le?null:e.createElement(Tn,(0,Z.Z)({prefixCls:ce,overlay:Ge,visible:Se.length?Zt:!1,onVisibleChange:Nr,overlayClassName:M()(wt,Pt),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:rr},ze),e.createElement("button",{type:"button",className:"".concat(ue,"-nav-more"),style:Et,"aria-haspopup":"listbox","aria-controls":fe,id:"".concat(pe,"-more"),"aria-expanded":Zt,onKeyDown:lt},te));return e.createElement("div",{className:M()("".concat(ue,"-nav-operations"),_t),style:ut,ref:q},gt,e.createElement(Ce,{prefixCls:ue,locale:De,editable:qe}))}),Vr=e.memo(_n,function($,q){return q.tabMoving}),Wr=function(q){var ue=q.prefixCls,pe=q.id,Se=q.active,De=q.focus,Le=q.tab,Oe=Le.key,ze=Le.label,ut=Le.disabled,_t=Le.closeIcon,qe=Le.icon,Rt=q.closable,jt=q.renderWrapper,Yt=q.removeAriaLabel,Kt=q.editable,rr=q.onClick,Pt=q.onFocus,It=q.onBlur,Lt=q.onKeyDown,Zt=q.onMouseDown,Nr=q.onMouseUp,Er=q.style,Gr=q.tabCount,Y=q.currentPosition,re="".concat(ue,"-tab"),oe=he(Rt,_t,Kt,ut);function te(Qe){ut||rr(Qe)}function fe(Qe){Qe.preventDefault(),Qe.stopPropagation(),Kt.onEdit("remove",{key:Oe,event:Qe})}var ce=e.useMemo(function(){return qe&&typeof ze=="string"?e.createElement("span",null,ze):ze},[ze,qe]),ve=e.useRef(null);e.useEffect(function(){De&&ve.current&&ve.current.focus()},[De]);var Pe=e.createElement("div",{key:Oe,"data-node-key":Ee(Oe),className:M()(re,(0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)({},"".concat(re,"-with-remove"),oe),"".concat(re,"-active"),Se),"".concat(re,"-disabled"),ut),"".concat(re,"-focus"),De)),style:Er,onClick:te},e.createElement("div",{ref:ve,role:"tab","aria-selected":Se,id:pe&&"".concat(pe,"-tab-").concat(Oe),className:"".concat(re,"-btn"),"aria-controls":pe&&"".concat(pe,"-panel-").concat(Oe),"aria-disabled":ut,tabIndex:ut?null:Se?0:-1,onClick:function(Ge){Ge.stopPropagation(),te(Ge)},onKeyDown:Lt,onMouseDown:Zt,onMouseUp:Nr,onFocus:Pt,onBlur:It},De&&e.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(Y," of ").concat(Gr)),qe&&e.createElement("span",{className:"".concat(re,"-icon")},qe),ze&&ce),oe&&e.createElement("button",{type:"button",role:"tab","aria-label":Yt||"remove",tabIndex:Se?0:-1,className:"".concat(re,"-remove"),onClick:function(Ge){Ge.stopPropagation(),fe(Ge)}},_t||Kt.removeIcon||"\xD7"));return jt?jt(Pe):Pe},xn=Wr,In=function(q,ue){var pe=q.offsetWidth,Se=q.offsetHeight,De=q.offsetTop,Le=q.offsetLeft,Oe=q.getBoundingClientRect(),ze=Oe.width,ut=Oe.height,_t=Oe.left,qe=Oe.top;return Math.abs(ze-pe)<1?[ze,ut,_t-ue.left,qe-ue.top]:[pe,Se,Le,De]},On=function(q){var ue=q.current||{},pe=ue.offsetWidth,Se=pe===void 0?0:pe,De=ue.offsetHeight,Le=De===void 0?0:De;if(q.current){var Oe=q.current.getBoundingClientRect(),ze=Oe.width,ut=Oe.height;if(Math.abs(ze-Se)<1)return[ze,ut]}return[Se,Le]},Wn=function(q,ue){return q[ue?0:1]},oi=e.forwardRef(function($,q){var ue=$.className,pe=$.style,Se=$.id,De=$.animated,Le=$.activeKey,Oe=$.rtl,ze=$.extra,ut=$.editable,_t=$.locale,qe=$.tabPosition,Rt=$.tabBarGutter,jt=$.children,Yt=$.onTabClick,Kt=$.onTabScroll,rr=$.indicator,Pt=e.useContext(a),It=Pt.prefixCls,Lt=Pt.tabs,Zt=(0,e.useRef)(null),Nr=(0,e.useRef)(null),Er=(0,e.useRef)(null),Gr=(0,e.useRef)(null),Y=(0,e.useRef)(null),re=(0,e.useRef)(null),oe=(0,e.useRef)(null),te=qe==="top"||qe==="bottom",fe=k(0,function(Ct,we){te&&Kt&&Kt({direction:Ct>we?"left":"right"})}),ce=(0,N.Z)(fe,2),ve=ce[0],Pe=ce[1],Qe=k(0,function(Ct,we){!te&&Kt&&Kt({direction:Ct>we?"top":"bottom"})}),Ge=(0,N.Z)(Qe,2),vt=Ge[0],lt=Ge[1],Et=(0,e.useState)([0,0]),wt=(0,N.Z)(Et,2),gt=wt[0],rt=wt[1],ot=(0,e.useState)([0,0]),U=(0,N.Z)(ot,2),W=U[0],B=U[1],X=(0,e.useState)([0,0]),ae=(0,N.Z)(X,2),me=ae[0],Te=ae[1],Me=(0,e.useState)([0,0]),Ie=(0,N.Z)(Me,2),ke=Ie[0],at=Ie[1],st=ie(new Map),dt=(0,N.Z)(st,2),nt=dt[0],mt=dt[1],kt=O(Lt,nt,W[0]),Dt=Wn(gt,te),Bt=Wn(W,te),Nt=Wn(me,te),Mt=Wn(ke,te),Qt=Math.floor(Dt)<Math.floor(Bt+Nt),Ot=Qt?Dt-Mt:Dt-Nt,ft="".concat(It,"-nav-operations-hidden"),Xt=0,Ht=0;te&&Oe?(Xt=0,Ht=Math.max(0,Bt-Ot)):(Xt=Math.min(0,Ot-Bt),Ht=0);function nr(Ct){return Ct<Xt?Xt:Ct>Ht?Ht:Ct}var Fr=(0,e.useRef)(null),br=(0,e.useState)(),Tr=(0,N.Z)(br,2),$t=Tr[0],dr=Tr[1];function vr(){dr(Date.now())}function Rr(){Fr.current&&clearTimeout(Fr.current)}Q(Gr,function(Ct,we){function et(ct,Gt){ct(function(Ut){var Fn=nr(Ut+Gt);return Fn})}return Qt?(te?et(Pe,Ct):et(lt,we),Rr(),vr(),!0):!1}),(0,e.useEffect)(function(){return Rr(),$t&&(Fr.current=setTimeout(function(){dr(0)},100)),Rr},[$t]);var tn=le(kt,Ot,te?ve:vt,Bt,Nt,Mt,(0,V.Z)((0,V.Z)({},$),{},{tabs:Lt})),ir=(0,N.Z)(tn,2),xr=ir[0],Wt=ir[1],Qr=I(function(){var Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Le,we=kt.get(Ct)||{width:0,height:0,left:0,right:0,top:0};if(te){var et=ve;Oe?we.right<ve?et=we.right:we.right+we.width>ve+Ot&&(et=we.right+we.width-Ot):we.left<-ve?et=-we.left:we.left+we.width>-ve+Ot&&(et=-(we.left+we.width-Ot)),lt(0),Pe(nr(et))}else{var ct=vt;we.top<-vt?ct=-we.top:we.top+we.height>-vt+Ot&&(ct=-(we.top+we.height-Ot)),Pe(0),lt(nr(ct))}}),Xr=(0,e.useState)(),pr=(0,N.Z)(Xr,2),Ft=pr[0],Lr=pr[1],hn=(0,e.useState)(!1),dn=(0,N.Z)(hn,2),Sr=dn[0],ar=dn[1],Pr=Lt.filter(function(Ct){return!Ct.disabled}).map(function(Ct){return Ct.key}),$r=function(we){var et=Pr.indexOf(Ft||Le),ct=Pr.length,Gt=(et+we+ct)%ct,Ut=Pr[Gt];Lr(Ut)},gr=function(we){var et=we.code,ct=Oe&&te,Gt=Pr[0],Ut=Pr[Pr.length-1];switch(et){case"ArrowLeft":{te&&$r(ct?1:-1);break}case"ArrowRight":{te&&$r(ct?-1:1);break}case"ArrowUp":{we.preventDefault(),te||$r(-1);break}case"ArrowDown":{we.preventDefault(),te||$r(1);break}case"Home":{we.preventDefault(),Lr(Gt);break}case"End":{we.preventDefault(),Lr(Ut);break}case"Enter":case"Space":{we.preventDefault(),Yt(Le,we);break}case"Backspace":case"Delete":{var Fn=Pr.indexOf(Ft),Zr=Lt.find(function(vn){return vn.key===Ft}),nn=he(Zr==null?void 0:Zr.closable,Zr==null?void 0:Zr.closeIcon,ut,Zr==null?void 0:Zr.disabled);nn&&(we.preventDefault(),we.stopPropagation(),ut.onEdit("remove",{key:Ft,event:we}),Fn===Pr.length-1?$r(-1):$r(1));break}}},Ir={};te?Ir[Oe?"marginRight":"marginLeft"]=Rt:Ir.marginTop=Rt;var Ar=Lt.map(function(Ct,we){var et=Ct.key;return e.createElement(xn,{id:Se,prefixCls:It,key:et,tab:Ct,style:we===0?void 0:Ir,closable:Ct.closable,editable:ut,active:et===Le,focus:et===Ft,renderWrapper:jt,removeAriaLabel:_t==null?void 0:_t.removeAriaLabel,tabCount:Pr.length,currentPosition:we+1,onClick:function(Gt){Yt(et,Gt)},onKeyDown:gr,onFocus:function(){Sr||Lr(et),Qr(et),vr(),Gr.current&&(Oe||(Gr.current.scrollLeft=0),Gr.current.scrollTop=0)},onBlur:function(){Lr(void 0)},onMouseDown:function(){ar(!0)},onMouseUp:function(){ar(!1)}})}),mr=function(){return mt(function(){var we,et=new Map,ct=(we=Y.current)===null||we===void 0?void 0:we.getBoundingClientRect();return Lt.forEach(function(Gt){var Ut,Fn=Gt.key,Zr=(Ut=Y.current)===null||Ut===void 0?void 0:Ut.querySelector('[data-node-key="'.concat(Ee(Fn),'"]'));if(Zr){var nn=In(Zr,ct),vn=(0,N.Z)(nn,4),Ei=vn[0],ci=vn[1],hi=vn[2],$n=vn[3];et.set(Fn,{width:Ei,height:ci,left:hi,top:$n})}}),et})};(0,e.useEffect)(function(){mr()},[Lt.map(function(Ct){return Ct.key}).join("_")]);var jr=ee(function(){var Ct=On(Zt),we=On(Nr),et=On(Er);rt([Ct[0]-we[0]-et[0],Ct[1]-we[1]-et[1]]);var ct=On(oe);Te(ct);var Gt=On(re);at(Gt);var Ut=On(Y);B([Ut[0]-ct[0],Ut[1]-ct[1]]),mr()}),un=Lt.slice(0,xr),Ur=Lt.slice(Wt+1),Jt=[].concat((0,i.Z)(un),(0,i.Z)(Ur)),Or=kt.get(Le),Mr=_({activeTabOffset:Or,horizontal:te,indicator:rr,rtl:Oe}),Xn=Mr.style;(0,e.useEffect)(function(){Qr()},[Le,Xt,Ht,xe(Or),xe(kt),te]),(0,e.useEffect)(function(){jr()},[Oe]);var zt=!!Jt.length,ln="".concat(It,"-nav-wrap"),bn,_r,yn,rn;return te?Oe?(_r=ve>0,bn=ve!==Ht):(bn=ve<0,_r=ve!==Xt):(yn=vt<0,rn=vt!==Xt),e.createElement(s.Z,{onResize:jr},e.createElement("div",{ref:R(q,Zt),role:"tablist","aria-orientation":te?"horizontal":"vertical",className:M()("".concat(It,"-nav"),ue),style:pe,onKeyDown:function(){vr()}},e.createElement($e,{ref:Nr,position:"left",extra:ze,prefixCls:It}),e.createElement(s.Z,{onResize:jr},e.createElement("div",{className:M()(ln,(0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)({},"".concat(ln,"-ping-left"),bn),"".concat(ln,"-ping-right"),_r),"".concat(ln,"-ping-top"),yn),"".concat(ln,"-ping-bottom"),rn)),ref:Gr},e.createElement(s.Z,{onResize:jr},e.createElement("div",{ref:Y,className:"".concat(It,"-nav-list"),style:{transform:"translate(".concat(ve,"px, ").concat(vt,"px)"),transition:$t?"none":void 0}},Ar,e.createElement(Ce,{ref:oe,prefixCls:It,locale:_t,editable:ut,style:(0,V.Z)((0,V.Z)({},Ar.length===0?void 0:Ir),{},{visibility:zt?"hidden":null})}),e.createElement("div",{className:M()("".concat(It,"-ink-bar"),(0,J.Z)({},"".concat(It,"-ink-bar-animated"),De.inkBar)),style:Xn}))))),e.createElement(Vr,(0,Z.Z)({},$,{removeAriaLabel:_t==null?void 0:_t.removeAriaLabel,ref:re,prefixCls:It,tabs:Jt,className:!zt&&ft,tabMoving:!!$t})),e.createElement($e,{ref:Er,position:"right",extra:ze,prefixCls:It})))}),zn=oi,Mn=e.forwardRef(function($,q){var ue=$.prefixCls,pe=$.className,Se=$.style,De=$.id,Le=$.active,Oe=$.tabKey,ze=$.children;return e.createElement("div",{id:De&&"".concat(De,"-panel-").concat(Oe),role:"tabpanel",tabIndex:Le?0:-1,"aria-labelledby":De&&"".concat(De,"-tab-").concat(Oe),"aria-hidden":!Le,style:Se,className:M()(ue,Le&&"".concat(ue,"-active"),pe),ref:q},ze)}),Cn=Mn,ui=["renderTabBar"],on=["label","key"],li=function(q){var ue=q.renderTabBar,pe=(0,C.Z)(q,ui),Se=e.useContext(a),De=Se.tabs;if(ue){var Le=(0,V.Z)((0,V.Z)({},pe),{},{panes:De.map(function(Oe){var ze=Oe.label,ut=Oe.key,_t=(0,C.Z)(Oe,on);return e.createElement(Cn,(0,Z.Z)({tab:ze,key:ut,tabKey:ut},_t))})});return ue(Le,zn)}return e.createElement(zn,pe)},Yn=li,Gn=K(62874),An=["key","forceRender","style","className","destroyInactiveTabPane"],_i=function(q){var ue=q.id,pe=q.activeKey,Se=q.animated,De=q.tabPosition,Le=q.destroyInactiveTabPane,Oe=e.useContext(a),ze=Oe.prefixCls,ut=Oe.tabs,_t=Se.tabPane,qe="".concat(ze,"-tabpane");return e.createElement("div",{className:M()("".concat(ze,"-content-holder"))},e.createElement("div",{className:M()("".concat(ze,"-content"),"".concat(ze,"-content-").concat(De),(0,J.Z)({},"".concat(ze,"-content-animated"),_t))},ut.map(function(Rt){var jt=Rt.key,Yt=Rt.forceRender,Kt=Rt.style,rr=Rt.className,Pt=Rt.destroyInactiveTabPane,It=(0,C.Z)(Rt,An),Lt=jt===pe;return e.createElement(Gn.Z,(0,Z.Z)({key:jt,visible:Lt,forceRender:Yt,removeOnLeave:!!(Le||Pt),leavedClassName:"".concat(qe,"-hidden")},Se.tabPaneMotion),function(Zt,Nr){var Er=Zt.style,Gr=Zt.className;return e.createElement(Cn,(0,Z.Z)({},It,{prefixCls:qe,id:ue,tabKey:jt,animated:_t,active:Lt,style:(0,V.Z)((0,V.Z)({},Kt),Er),className:M()(rr,Gr),ref:Nr}))})})))},fi=_i,ii={},kn=[],yi=function(q){kn.push(q)};function wn($,q){if(0)var ue}function Qn($,q){if(0)var ue}function yr(){ii={}}function hr($,q,ue){!q&&!ii[ue]&&($(!1,ue),ii[ue]=!0)}function kr($,q){hr(wn,$,q)}function Nn($,q){hr(Qn,$,q)}kr.preMessage=yi,kr.resetWarned=yr,kr.noteOnce=Nn;var ki=null;function Ni(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},q;return $===!1?q={inkBar:!1,tabPane:!1}:$===!0?q={inkBar:!0,tabPane:!1}:q=(0,V.Z)({inkBar:!0},(0,L.Z)($)==="object"?$:{}),q.tabPaneMotion&&q.tabPane===void 0&&(q.tabPane=!0),!q.tabPaneMotion&&q.tabPane&&(q.tabPane=!1),q}var en=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],Ri=0,Fi=e.forwardRef(function($,q){var ue=$.id,pe=$.prefixCls,Se=pe===void 0?"rc-tabs":pe,De=$.className,Le=$.items,Oe=$.direction,ze=$.activeKey,ut=$.defaultActiveKey,_t=$.editable,qe=$.animated,Rt=$.tabPosition,jt=Rt===void 0?"top":Rt,Yt=$.tabBarGutter,Kt=$.tabBarStyle,rr=$.tabBarExtraContent,Pt=$.locale,It=$.more,Lt=$.destroyInactiveTabPane,Zt=$.renderTabBar,Nr=$.onChange,Er=$.onTabClick,Gr=$.onTabScroll,Y=$.getPopupContainer,re=$.popupClassName,oe=$.indicator,te=(0,C.Z)($,en),fe=e.useMemo(function(){return(Le||[]).filter(function(ke){return ke&&(0,L.Z)(ke)==="object"&&"key"in ke})},[Le]),ce=Oe==="rtl",ve=Ni(qe),Pe=(0,e.useState)(!1),Qe=(0,N.Z)(Pe,2),Ge=Qe[0],vt=Qe[1];(0,e.useEffect)(function(){vt(o())},[]);var lt=m(function(){var ke;return(ke=fe[0])===null||ke===void 0?void 0:ke.key},{value:ze,defaultValue:ut}),Et=(0,N.Z)(lt,2),wt=Et[0],gt=Et[1],rt=(0,e.useState)(function(){return fe.findIndex(function(ke){return ke.key===wt})}),ot=(0,N.Z)(rt,2),U=ot[0],W=ot[1];(0,e.useEffect)(function(){var ke=fe.findIndex(function(st){return st.key===wt});if(ke===-1){var at;ke=Math.max(0,Math.min(U,fe.length-1)),gt((at=fe[ke])===null||at===void 0?void 0:at.key)}W(ke)},[fe.map(function(ke){return ke.key}).join("_"),wt,U]);var B=m(null,{value:ue}),X=(0,N.Z)(B,2),ae=X[0],me=X[1];(0,e.useEffect)(function(){ue||(me("rc-tabs-".concat(Ri)),Ri+=1)},[]);function Te(ke,at){Er==null||Er(ke,at);var st=ke!==wt;gt(ke),st&&(Nr==null||Nr(ke))}var Me={id:ae,activeKey:wt,animated:ve,tabPosition:jt,rtl:ce,mobile:Ge},Ie=(0,V.Z)((0,V.Z)({},Me),{},{editable:_t,locale:Pt,more:It,tabBarGutter:Yt,onTabClick:Te,onTabScroll:Gr,extra:rr,style:Kt,panes:null,getPopupContainer:Y,popupClassName:re,indicator:oe});return e.createElement(a.Provider,{value:{tabs:fe,prefixCls:Se}},e.createElement("div",(0,Z.Z)({ref:q,id:ue,className:M()(Se,"".concat(Se,"-").concat(jt),(0,J.Z)((0,J.Z)((0,J.Z)({},"".concat(Se,"-mobile"),Ge),"".concat(Se,"-editable"),_t),"".concat(Se,"-rtl"),ce),De)},te),e.createElement(Yn,(0,Z.Z)({},Ie,{renderTabBar:Zt})),e.createElement(fi,(0,Z.Z)({destroyInactiveTabPane:Lt},Me,{animated:ve}))))}),Gi=Fi,Li=Gi},64681:function(He,ye){"use strict";var K;var Z=Symbol.for("react.element"),J=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),P=Symbol.for("react.context"),M=Symbol.for("react.server_context"),e=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),p;p=Symbol.for("react.module.reference");function u(v){if(typeof v=="object"&&v!==null){var m=v.$$typeof;switch(m){case Z:switch(v=v.type,v){case V:case L:case N:case I:case A:return v;default:switch(v=v&&v.$$typeof,v){case M:case P:case e:case g:case f:case C:return v;default:return m}}case J:return m}}}K=P,K=C,K=Z,ye.ForwardRef=e,K=V,K=g,K=f,K=J,K=L,K=N,K=I,K=A,K=function(){return!1},K=function(){return!1},K=function(v){return u(v)===P},K=function(v){return u(v)===C},K=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===Z},K=function(v){return u(v)===e},K=function(v){return u(v)===V},K=function(v){return u(v)===g},ye.isMemo=function(v){return u(v)===f},K=function(v){return u(v)===J},K=function(v){return u(v)===L},K=function(v){return u(v)===N},K=function(v){return u(v)===I},K=function(v){return u(v)===A},K=function(v){return typeof v=="string"||typeof v=="function"||v===V||v===L||v===N||v===I||v===A||v===h||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===f||v.$$typeof===C||v.$$typeof===P||v.$$typeof===e||v.$$typeof===p||v.getModuleId!==void 0)},K=u},39607:function(He,ye,K){"use strict";He.exports=K(64681)},36697:function(He,ye,K){"use strict";K.d(ye,{G:function(){return L},Z:function(){return b}});var Z=K(94184),J=K.n(Z),V=K(67294),N=K.t(V,2);function L(d){var T=d.children,R=d.prefixCls,S=d.id,w=d.overlayInnerStyle,r=d.bodyClassName,n=d.className,t=d.style;return V.createElement("div",{className:J()("".concat(R,"-content"),n),style:t},V.createElement("div",{className:J()("".concat(R,"-inner"),r),id:S,role:"tooltip",style:w},typeof T=="function"?T():T))}var C=K(87462),P=K(1413),M=K(45987),e=K(98280),I={shiftX:64,adjustY:1},A={adjustX:1,shiftY:!0},f=[0,0],g={left:{points:["cr","cl"],overflow:A,offset:[-4,0],targetOffset:f},right:{points:["cl","cr"],overflow:A,offset:[4,0],targetOffset:f},top:{points:["bc","tc"],overflow:I,offset:[0,-4],targetOffset:f},bottom:{points:["tc","bc"],overflow:I,offset:[0,4],targetOffset:f},topLeft:{points:["bl","tl"],overflow:I,offset:[0,-4],targetOffset:f},leftTop:{points:["tr","tl"],overflow:A,offset:[-4,0],targetOffset:f},topRight:{points:["br","tr"],overflow:I,offset:[0,-4],targetOffset:f},rightTop:{points:["tl","tr"],overflow:A,offset:[4,0],targetOffset:f},bottomRight:{points:["tr","br"],overflow:I,offset:[0,4],targetOffset:f},rightBottom:{points:["bl","br"],overflow:A,offset:[4,0],targetOffset:f},bottomLeft:{points:["tl","bl"],overflow:I,offset:[0,4],targetOffset:f},leftBottom:{points:["br","bl"],overflow:A,offset:[-4,0],targetOffset:f}},h=null,p=K(97685);function u(){var d=(0,P.Z)({},N);return d.useId}var v=0;function m(){}var o=u(),a=o?function(T){var R=o();return T||R}:function(T){var R=V.useState("ssr-id"),S=(0,p.Z)(R,2),w=S[0],r=S[1];return V.useEffect(function(){var n=v;v+=1,r("rc_unique_".concat(n))},[]),T||w},i=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],s=function(T,R){var S=T.overlayClassName,w=T.trigger,r=w===void 0?["hover"]:w,n=T.mouseEnterDelay,t=n===void 0?0:n,l=T.mouseLeaveDelay,x=l===void 0?.1:l,y=T.overlayStyle,c=T.prefixCls,_=c===void 0?"rc-tooltip":c,D=T.children,O=T.onVisibleChange,k=T.afterVisibleChange,F=T.transitionName,G=T.animation,H=T.motion,j=T.placement,Q=j===void 0?"right":j,ee=T.align,ie=ee===void 0?{}:ee,se=T.destroyTooltipOnHide,le=se===void 0?!1:se,xe=T.defaultVisible,Re=T.getTooltipContainer,Ee=T.overlayInnerStyle,he=T.arrowContent,be=T.overlay,Ce=T.id,Ue=T.showArrow,$e=Ue===void 0?!0:Ue,z=T.classNames,ne=T.styles,de=(0,M.Z)(T,i),ge=a(Ce),Ae=(0,V.useRef)(null);(0,V.useImperativeHandle)(R,function(){return Ae.current});var Ve=(0,P.Z)({},de);"visible"in T&&(Ve.popupVisible=T.visible);var xt=function(){return V.createElement(L,{key:"content",prefixCls:_,id:ge,bodyClassName:z==null?void 0:z.body,overlayInnerStyle:(0,P.Z)((0,P.Z)({},Ee),ne==null?void 0:ne.body)},be)},Je=function(){var St=V.Children.only(D),er=(St==null?void 0:St.props)||{},Ne=(0,P.Z)((0,P.Z)({},er),{},{"aria-describedby":be?ge:null});return V.cloneElement(D,Ne)};return V.createElement(e.Z,(0,C.Z)({popupClassName:J()(S,z==null?void 0:z.root),prefixCls:_,popup:xt,action:r,builtinPlacements:g,popupPlacement:Q,ref:Ae,popupAlign:ie,getPopupContainer:Re,onPopupVisibleChange:O,afterPopupVisibleChange:k,popupTransitionName:F,popupAnimation:G,popupMotion:H,defaultPopupVisible:xe,autoDestroy:le,mouseLeaveDelay:x,popupStyle:(0,P.Z)((0,P.Z)({},y),ne==null?void 0:ne.root),mouseEnterDelay:t,arrow:$e},Ve),Je())},E=(0,V.forwardRef)(s),b=E},50344:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return V}});var Z=K(67294),J=K(59864);function V(N){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=[];return Z.Children.forEach(N,function(P){P==null&&!L.keepEmpty||(Array.isArray(P)?C=C.concat(V(P)):(0,J.isFragment)(P)&&P.props?C=C.concat(V(P.props.children,L)):C.push(P))}),C}},66680:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return J}});var Z=K(67294);function J(V){var N=Z.useRef();N.current=V;var L=Z.useCallback(function(){for(var C,P=arguments.length,M=new Array(P),e=0;e<P;e++)M[e]=arguments[e];return(C=N.current)===null||C===void 0?void 0:C.call.apply(C,[N].concat(M))},[]);return L}},21770:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return C}});var Z=K(97685),J=K(66680),V=K(8410),N=K(63896);function L(P){return P!==void 0}function C(P,M){var e=M||{},I=e.defaultValue,A=e.value,f=e.onChange,g=e.postState,h=(0,N.Z)(function(){return L(A)?A:L(I)?typeof I=="function"?I():I:typeof P=="function"?P():P}),p=(0,Z.Z)(h,2),u=p[0],v=p[1],m=A!==void 0?A:u,o=g?g(m):m,a=(0,J.Z)(f),i=(0,N.Z)([m]),s=(0,Z.Z)(i,2),E=s[0],b=s[1];(0,V.o)(function(){var T=E[0];u!==T&&a(u,T)},[E]),(0,V.o)(function(){L(A)||v(A)},[A]);var d=(0,J.Z)(function(T,R){v(T,R),b([m],R)});return[o,d]}},91881:function(He,ye,K){"use strict";var Z=K(71002),J=K(80334);function V(N,L){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,P=new Set;function M(e,I){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=P.has(e);if((0,J.ZP)(!f,"Warning: There may be circular references"),f)return!1;if(e===I)return!0;if(C&&A>1)return!1;P.add(e);var g=A+1;if(Array.isArray(e)){if(!Array.isArray(I)||e.length!==I.length)return!1;for(var h=0;h<e.length;h++)if(!M(e[h],I[h],g))return!1;return!0}if(e&&I&&(0,Z.Z)(e)==="object"&&(0,Z.Z)(I)==="object"){var p=Object.keys(e);return p.length!==Object.keys(I).length?!1:p.every(function(u){return M(e[u],I[u],g)})}return!1}return M(N,L)}ye.Z=V},98423:function(He,ye,K){"use strict";K.d(ye,{Z:function(){return J}});var Z=K(1413);function J(V,N){var L=(0,Z.Z)({},V);return Array.isArray(N)&&N.forEach(function(C){delete L[C]}),L}},80334:function(He,ye,K){"use strict";var Z={};function J(M,e){}function V(M,e){}function N(){Z={}}function L(M,e,I){!e&&!Z[I]&&(M(!1,I),Z[I]=!0)}function C(M,e){L(J,M,e)}function P(M,e){L(V,M,e)}ye.ZP=C},74300:function(He,ye,K){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.CopyToClipboard=void 0;var Z=V(K(67294)),J=V(K(20640));function V(o){return o&&o.__esModule?o:{default:o}}function N(o){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?N=function(i){return typeof i}:N=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},N(o)}function L(o,a){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(o);a&&(s=s.filter(function(E){return Object.getOwnPropertyDescriptor(o,E).enumerable})),i.push.apply(i,s)}return i}function C(o){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?L(i,!0).forEach(function(s){v(o,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):L(i).forEach(function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(i,s))})}return o}function P(o,a){if(o==null)return{};var i=M(o,a),s,E;if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(o);for(E=0;E<b.length;E++)s=b[E],!(a.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(o,s)&&(i[s]=o[s])}return i}function M(o,a){if(o==null)return{};var i={},s=Object.keys(o),E,b;for(b=0;b<s.length;b++)E=s[b],!(a.indexOf(E)>=0)&&(i[E]=o[E]);return i}function e(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function I(o,a){for(var i=0;i<a.length;i++){var s=a[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function A(o,a,i){return a&&I(o.prototype,a),i&&I(o,i),o}function f(o,a){return a&&(N(a)==="object"||typeof a=="function")?a:h(o)}function g(o){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},g(o)}function h(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function p(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&u(o,a)}function u(o,a){return u=Object.setPrototypeOf||function(s,E){return s.__proto__=E,s},u(o,a)}function v(o,a,i){return a in o?Object.defineProperty(o,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[a]=i,o}var m=function(o){p(a,o);function a(){var i,s;e(this,a);for(var E=arguments.length,b=new Array(E),d=0;d<E;d++)b[d]=arguments[d];return s=f(this,(i=g(a)).call.apply(i,[this].concat(b))),v(h(s),"onClick",function(T){var R=s.props,S=R.text,w=R.onCopy,r=R.children,n=R.options,t=Z.default.Children.only(r),l=(0,J.default)(S,n);w&&w(S,l),t&&t.props&&typeof t.props.onClick=="function"&&t.props.onClick(T)}),s}return A(a,[{key:"render",value:function(){var s=this.props,E=s.text,b=s.onCopy,d=s.options,T=s.children,R=P(s,["text","onCopy","options","children"]),S=Z.default.Children.only(T);return Z.default.cloneElement(S,C({},R,{onClick:this.onClick}))}}]),a}(Z.default.PureComponent);ye.CopyToClipboard=m,v(m,"defaultProps",{onCopy:void 0,options:void 0})},74855:function(He,ye,K){"use strict";var Z=K(74300),J=Z.CopyToClipboard;J.CopyToClipboard=J,He.exports=J},91033:function(He,ye,K){"use strict";var Z=function(){if(typeof Map!="undefined")return Map;function r(n,t){var l=-1;return n.some(function(x,y){return x[0]===t?(l=y,!0):!1}),l}return function(){function n(){this.__entries__=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),n.prototype.get=function(t){var l=r(this.__entries__,t),x=this.__entries__[l];return x&&x[1]},n.prototype.set=function(t,l){var x=r(this.__entries__,t);~x?this.__entries__[x][1]=l:this.__entries__.push([t,l])},n.prototype.delete=function(t){var l=this.__entries__,x=r(l,t);~x&&l.splice(x,1)},n.prototype.has=function(t){return!!~r(this.__entries__,t)},n.prototype.clear=function(){this.__entries__.splice(0)},n.prototype.forEach=function(t,l){l===void 0&&(l=null);for(var x=0,y=this.__entries__;x<y.length;x++){var c=y[x];t.call(l,c[1],c[0])}},n}()}(),J=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,V=function(){return typeof K.g!="undefined"&&K.g.Math===Math?K.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),N=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(V):function(r){return setTimeout(function(){return r(Date.now())},1e3/60)}}(),L=2;function C(r,n){var t=!1,l=!1,x=0;function y(){t&&(t=!1,r()),l&&_()}function c(){N(y)}function _(){var D=Date.now();if(t){if(D-x<L)return;l=!0}else t=!0,l=!1,setTimeout(c,n);x=D}return _}var P=20,M=["top","right","bottom","left","width","height","size","weight"],e=typeof MutationObserver!="undefined",I=function(){function r(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=C(this.refresh.bind(this),P)}return r.prototype.addObserver=function(n){~this.observers_.indexOf(n)||this.observers_.push(n),this.connected_||this.connect_()},r.prototype.removeObserver=function(n){var t=this.observers_,l=t.indexOf(n);~l&&t.splice(l,1),!t.length&&this.connected_&&this.disconnect_()},r.prototype.refresh=function(){var n=this.updateObservers_();n&&this.refresh()},r.prototype.updateObservers_=function(){var n=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return n.forEach(function(t){return t.broadcastActive()}),n.length>0},r.prototype.connect_=function(){!J||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),e?(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)},r.prototype.disconnect_=function(){!J||!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)},r.prototype.onTransitionEnd_=function(n){var t=n.propertyName,l=t===void 0?"":t,x=M.some(function(y){return!!~l.indexOf(y)});x&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r}(),A=function(r,n){for(var t=0,l=Object.keys(n);t<l.length;t++){var x=l[t];Object.defineProperty(r,x,{value:n[x],enumerable:!1,writable:!1,configurable:!0})}return r},f=function(r){var n=r&&r.ownerDocument&&r.ownerDocument.defaultView;return n||V},g=E(0,0,0,0);function h(r){return parseFloat(r)||0}function p(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return n.reduce(function(l,x){var y=r["border-"+x+"-width"];return l+h(y)},0)}function u(r){for(var n=["top","right","bottom","left"],t={},l=0,x=n;l<x.length;l++){var y=x[l],c=r["padding-"+y];t[y]=h(c)}return t}function v(r){var n=r.getBBox();return E(0,0,n.width,n.height)}function m(r){var n=r.clientWidth,t=r.clientHeight;if(!n&&!t)return g;var l=f(r).getComputedStyle(r),x=u(l),y=x.left+x.right,c=x.top+x.bottom,_=h(l.width),D=h(l.height);if(l.boxSizing==="border-box"&&(Math.round(_+y)!==n&&(_-=p(l,"left","right")+y),Math.round(D+c)!==t&&(D-=p(l,"top","bottom")+c)),!a(r)){var O=Math.round(_+y)-n,k=Math.round(D+c)-t;Math.abs(O)!==1&&(_-=O),Math.abs(k)!==1&&(D-=k)}return E(x.left,x.top,_,D)}var o=function(){return typeof SVGGraphicsElement!="undefined"?function(r){return r instanceof f(r).SVGGraphicsElement}:function(r){return r instanceof f(r).SVGElement&&typeof r.getBBox=="function"}}();function a(r){return r===f(r).document.documentElement}function i(r){return J?o(r)?v(r):m(r):g}function s(r){var n=r.x,t=r.y,l=r.width,x=r.height,y=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,c=Object.create(y.prototype);return A(c,{x:n,y:t,width:l,height:x,top:t,right:n+l,bottom:x+t,left:n}),c}function E(r,n,t,l){return{x:r,y:n,width:t,height:l}}var b=function(){function r(n){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=E(0,0,0,0),this.target=n}return r.prototype.isActive=function(){var n=i(this.target);return this.contentRect_=n,n.width!==this.broadcastWidth||n.height!==this.broadcastHeight},r.prototype.broadcastRect=function(){var n=this.contentRect_;return this.broadcastWidth=n.width,this.broadcastHeight=n.height,n},r}(),d=function(){function r(n,t){var l=s(t);A(this,{target:n,contentRect:l})}return r}(),T=function(){function r(n,t,l){if(this.activeObservations_=[],this.observations_=new Z,typeof n!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=n,this.controller_=t,this.callbackCtx_=l}return r.prototype.observe=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(n instanceof f(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(n)||(t.set(n,new b(n)),this.controller_.addObserver(this),this.controller_.refresh())}},r.prototype.unobserve=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(n instanceof f(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(n)&&(t.delete(n),t.size||this.controller_.removeObserver(this))}},r.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},r.prototype.gatherActive=function(){var n=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&n.activeObservations_.push(t)})},r.prototype.broadcastActive=function(){if(this.hasActive()){var n=this.callbackCtx_,t=this.activeObservations_.map(function(l){return new d(l.target,l.broadcastRect())});this.callback_.call(n,t,n),this.clearActive()}},r.prototype.clearActive=function(){this.activeObservations_.splice(0)},r.prototype.hasActive=function(){return this.activeObservations_.length>0},r}(),R=typeof WeakMap!="undefined"?new WeakMap:new Z,S=function(){function r(n){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=I.getInstance(),l=new T(n,t,this);R.set(this,l)}return r}();["observe","unobserve","disconnect"].forEach(function(r){S.prototype[r]=function(){var n;return(n=R.get(this))[r].apply(n,arguments)}});var w=function(){return typeof V.ResizeObserver!="undefined"?V.ResizeObserver:S}();ye.Z=w},11742:function(He){He.exports=function(){var ye=document.getSelection();if(!ye.rangeCount)return function(){};for(var K=document.activeElement,Z=[],J=0;J<ye.rangeCount;J++)Z.push(ye.getRangeAt(J));switch(K.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":K.blur();break;default:K=null;break}return ye.removeAllRanges(),function(){ye.type==="Caret"&&ye.removeAllRanges(),ye.rangeCount||Z.forEach(function(V){ye.addRange(V)}),K&&K.focus()}}},18645:function(He,ye,K){"use strict";He.exports=K.p+"static/detailbg1.e67ff29c.png"},76296:function(He){"use strict";He.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABMCAYAAADZXmGYAAAAAXNSR0IArs4c6QAAHBJJREFUeF7NfAl4HcWV7l/V2719Fy2WLMnyChiMjU2MMeAAIcALMCwBMoEBEhiWB4nDkgmZlwQSiF54IYTAgJkAIQnwWEISEwgEwhAY9h2zGIPB4AULG1myduluvVW971R3X13JMpaMMa/59Mm6t7uqzl//+c85VdUwfI6XlFIHUO0A1SWguwroZ4yJz2NIbGd3KqWkPlMA6jygGoAWj0ECrg902UAXY8zbmWPbaUBIKU0ANS4wgXlIbsNIYRjoQQhIfmcA8pkCEc1+2gEmcg9ZAHycRknDAAHRAWDgs3SbzwQImv1CAXW6jgnMhIntJDk9ZkTISQnX99Fl25+N2+wwIKSUNNtVDjAhmv1y29uJw6jkMYAgMNCb2MFu86mBkFImikCd5qLWZ+UJHKcHbNftMhDIB0V0LFmCgZaWTxdttgsIKSUpfbXrop6ZsD0P29XOdpk/ykPkNvDQmUqhe3ujzbgMkFKmikVM0HXUeADlAP9fXRIItNBtOhljhfEMbptAUNKTy6EGJuo5QwL4fGd/jMbJQDj5oGh1VFerJE1u67lRgahIeurzHqpYRdKzrQZ35PfeGMONAcinuwozujzMrDW13LyqxPI6XeY9GFwz4KSBTkC5jb+18Q0DgsJePo9aw1DCt62kZ1w2j9WocTUKYG2uZN+8rvCDrMWPnpHS+aSkAQHWYTH88vAG82nPC3MXchvLMHr6NqFr0qQt3UYBQeLnANOD7Uh6PisDxwIIMeH4ZzsuTyfZ8buldexZZWJmyoIrJVbmvGKDzs8+qjG5enhbhuQCuYyFdsbYQPxdDITZVfDm0oe2EaYwn6eBYwHB84AHNuYaLl/R8+Be9YbeZOuYlTExM2PCERLvDrhoHfAf/fXeTZf6FRmtAQ9kog1DwMBbcbZaBmJTwZtLjYdghIDsHDAMSTPrweODPvS8E9iarouEkMVM0vAlIH1F78o8Mxznt57dsP9/dRRv3G2igRpLw8SEholJDYGQ+Ljg46NBtvqZL6b/xTdTnKbXMAyV6ERzHQBY8YlAxDNi2/SgR2BtU3VHzmIM6ghaVvxJM2PI+1p793yn4B3tCTafIZhmcW7onCGp84KlaWszXL46J209snfG3liEN6xW+T8v9+x+04rue7INBrJJjqTOkOAMgQT6HAHhstfW/tOEb8G2uW0YI20YOxDxqA0DLHQZTw4ZGFcBYyHy0D3EsiQg7mrNz32+v3gx55ib1RjPGAxpgyOlcVgag8GZitO+ZCgJuEyI5+ZXJZbMzRgbieqG4clrH+2ZcdX9m++EYDb/sg1NZ2AMEAHgOwzHNFs/ffiYqX/fygjHD8QQIAYzDY/pniHIoO2pIXyAXbq8++zNvn9OtQ6zytKQNbgCIa3Tj2IDTMagkVESKAmJQU+g32f99Qb/xdET7CdOPL/1a28O5M4XOZliWaMg9+MZmAzqR+dyRpXxt+Vfa7wym0ySwaNd2w9EKKKAbRssBVCWIgqj+8BWaXLmyx0/zgtxYl2CocrUkIlBMDiyOkdG50jpXFFc5xTRoMQv7wv0uAIdThA8trSw5vVf5/fQJ6PjyCOTPz/hjNpVv3pq82mbIfZKJNjglxqNR+4+avLT5HqfwNdPB0Rlw8wAtxmYrhuBF7rNVjNVCu8nPdOxuMMNzp1oM1RbIQvIFeh3VmeoMjRUmxrSGoetM+jEc4RA5HyBPi9ARynAxryHF+4pvnb517P/fsS+VXkTBk+iINDfDRhJCbuqrIg7BYiYISYDtw1wqSPwvC2FlaLCZW/1LnyoLXdjU5prExIcGZMjGRlMLlFlcNSYIRDEDGKFwUKVLgUS+SAEotMJsLkUIOez/sVTEqd9oTq7Gcb4xRzAjmPESLQDBs02wHQJ4QLlRdjBYlE77Mnu3+m6mNeQ0hQbSAdI5W2NKW0gNyEgak2OKl1DSmcwGAuBII3wBQb9AE4g4Qig2xHQwO/733Nqr9zO+mf7gEjqCIq+p7W73CbBm2xq+aREUGRDi69lhhjgJoOmSwSugeAHL3Qt/MvG/M0NacbqbQ1ZkyOhMZhaCATNPgFRS6ywNMUOcpkQCAm3Yl27EAh0uwHaiwE2FfzSuVNSJy5qylItMd5rfEAkDUO83luqfaRj4JuBpn8po8kJaYNxS9d6zCB4eW42cceuSaODjahKKRHiDFpVEmyfv264vM0NjqmzOWqToVuYnMHUoUJlWgsjR7XJUU16YWiwI8G0NXIhBk9IDPgC/V4QukhJoK0oMNWUV105v+ne7WDF2IEgEK5e1XHIulJwWbXJa2tNhjpLxwSTBsrgg6HLCQYtqV197MTkIyPBiLJUOeOe1gcTKUyuTXFYBlPGmxqUGFoa6QFDKooaISAaGhOa6ofuIbEsBgK5QGDAFQqQHidARzGAzoxH75nNf4Kqus+GESRwSz7oX/Bq3rmhPoEECdgES8OkpI6mhK4EjTK4LjfAunzgJ5i49IxpVf8dpsND1/Pt+ezpj7X/DTZPT6zS0JzWYBKIgkgP5R7kJjTzVSbHFFtXfVAkoTyCwiexIRbMvB9FEEeoCJJh2rt/mmtc4FXX9RkhK7e5xhKNbmyMaM/55rnLu+5tTMlm2wjje31CwzTbQHPSUDQmIDodH60FD6sGg74zpqROnJO0BvRIxalaue3dnqbvPzv4ANKakU5xVCeYco3qBFdZoBtIJHSGJgLYJpHksMhtOIcW5REEBP0Ug5AZBV9iml/AqYleNKcT0k7ZeTC2Brq5xKtuXkGZ8BjosW0giA2LX+38yvuuf1VDEsqf0wZDXULH1KSO5pSOqogRFM42FDysy/noXufdbTztrNyQkbUDnpjo5mRdYLBU167iYGQ0Tbc1VCW5KuqoniA2NKU0BbByFc4UCJRek1DyKHwGgpL7EAyKGPP8PnzXaIORrgIyNUA6G8bZwa6CEPJiPn32sjEwY9tAkDbs//cPf6ZZOLbaCjM8ivmk6A2J8IeoS4zoJQUv+WgvBFj2nIvumzxgTwfQKe8UQMCBg3WgRgPSGpIJhpRJbTJwDkxJ66hNcPU35Q0aC7/TSXCico+CBrkSlaJCCNzgvYnmTBJIpIDsBCBdEzoEJVTdG1Z78w49bRtZJRFm20AQI/a8r/XmVBXbL22GvkoCRwJJfkyhjpQ8gETek+h3A/Q4Ah+878r8zz2fVUmPZXifLnlnfcpYt+kId1FgyUakOViSI2EyWDoD14ApqRAIMppAIBZQf/R3yG9GC0cqKSHgm908bpUvg5HxhgWkqgA7EzKiMAB0bgic5jknWDP32rQN99g2EMSIOX9Yt6SYEgdnE2EVqBGVGZQ/J+KsjwGOHwrZIKl5P9ZcXpO96NCF6d66tO4ZBqRueHLBjRsu2TDgn4QUB2wOWAwGJUwEREZHEhK97Q4apiRhmtRf7BayDAYVX7TOsIvTh7v8Z4GqGkDTAd0CDNpWpcEUgf7N0p2xz4nm7P037hAgDvjDmgs+lOLsVIYp0VLDo8JOFXdD/ksDJN/NOxL1gfHA6ydN/1nRG75ucPlz3XPueLX3dliSKyASTO3lMZ1hckbH5mU9cDZ4qJuSxdRDU6qai8oMZQtNtvIyqkT7Sni+dB/q6zMhI4hWsQ85JSA30Okf8+0T9Eyt86mBoAZufK1vxtVv9vwR1dC1aJZoVZxFI4xjpIBEEABBgclTp6XPu+rAuje3HICHvW/cuKSv5B4IiwSHfI3AYDDyHrx3BoBuHfUHZFE/1wotp58oahDYjivQ+UEO+XVFXNywCtfu+j6QygB6tL0S+EB+UKJ26jXeVxf/KQqln4TFtl2DnqZqce5vW1s6PO+ryISDDnlasWClpoqKAaAG+nPLz2j63tC27dAYSHOueKFr1s3P9d4KXSYUCAQICerKHPkXmJvA5JOrFPsqeyF36G8tYfDtAqTvAw0G9Ck2fmm+0Xcxe90EZ7YakpA51E25Df988Z1jCJ1jE8u4oQ+6S8kT/9y2JCflPrAlELmiAoNAIEwdIBXwD353XMPiA5vt/tEGQUXYW4OD9dcsy7WUpFiUSHD4LvDBKw7aXxkEkgESh2RgT9dVNkZuSMdJ3H4PubdzEGsIbR04wFJAcMlKZ81K/9vvd+lbK1Yt25P6FLP2fVdOnd07BibEQxwbI+K7P8z55tn3bjrvwx73ZGkwGxo5MPXMwHzpNGbNh35z7MT/XNhs5UZbj/AZ+DWre76Vlzi1xmQ2FVZUYVImSRV760YHtz/ci82764oNFFKlK+GvyUN86AIDGrCLBcy2ACbABXNO3C1z2V8Or34Shj3GyR/1tvEBEbqJIe5+q7PhwXfy+63p96dLxtiMlL7hiL1SyxbvU7WxOCKtjrslEH74dtfPGJdHZQ2oGoLS84ZEmJDFKXZrzsOVr/Tgo14feM8D1pdCZZxgAKQZdNAoULnMpjPmpFt+c9DE1+Ol6E+BxPiBiDsjX08anlr+KnoGHXLa+oqURHDh291ndwv/QgKB1hyoVplqG5ic1NXaAzVEUajPF3i+vYAll2+C/7EAJgBYYAANmgKEcz4wc4L1t1v/R+1tB05MDewAEManEeNFW5XeAO8UYkGbG5zT8mb3/KwpdUqlaZU6BmKKbURASFVdUjW5Lu/irr/24OMNDjBTQ21ax5w6C4dMT+G4Xau6Giz5f5OcP5zQddKh8gG08Y6x4v7tZ8TWOiUABIO+2fMP6xPy1EIQzHu1o4R71+dQZ4e1A2WiyjWSYXVJGSoxIsE58kGAtqKPtpyPn8ytU9llTDVVTjKAMw5D49065AMZrt1naWgH5SvRbs12ALLjgNANQxQDP7nRcY/qD+TpRSGmB0IoIx5Ym8OLXQ6qLEq+KKUO3aPG5Ki1wiqTgKD1B0rVe0oCq3pdLNlvolqfCP8Lo3VcW6s0nKpSxgom8Jil4c6MEOthGOM9pLZjXEOTCHJBUPuRECf2+uJfikLUi0CEoU/NHnD/qhye6CypspuSMNICtTRH65RGWGpTiKwzaaYZcp7A2l4fvz+oQYFTZkKcZEcUiUEhcHWNewbnLyWluDMDsRzh8v1YSvDtB4KEUhqQ3Y5oWldyT+n35XHFQFTTykmcDlOxRCYQEE+0FnDP+zmkM1yBQMMLK0soV1GJk2RosDlSBlPFW29OYOnhTaquUWl2xAi6ldosl2GRqSHw1BaXlsbfMILgzzWW/gwVq2MAZPyuQQxoC/xd1jvB6T1ucJQT0B6tAKeaIzo8SQAwVZOEg+4pBrj0H12QVRy6onpEcVLTiDn0Ca1HZEyG7oLA/CoLV+wXLrnFXB/pHsSE8jJUBUsUQziXOmOtJsRdWY5/6LpOx4e25jZjA4IEkBLJ1W4wd33JOavXZ4uKnmdSvaGMl+HMEx04fUa/IxAUKzhw20t9eLm9BKSj2jpOnsnvZbhUV5/S1cJP72CAu7/SiBkZo1yCK3ArNEJxovz3iO8q7tM1Wt/gnQZwf4aJv1i63jVKpPlkIOIQ+F7JWbS+JL7R4/oLHS+IbA47D6vRcFAaDVaGLCCGKI1QvTJVml/9aBe6fREWWlQfxR5MAiElDItD+MB5c7I4Z3ZVNNthO7HhsQsMY0kFKPH3ZeeJQKHJMXVtwIB8JM21pUkN62NibnVhpqvg7VXyoS8bKB32kSv+tcf193D8gNgeGhnNeAhAyAYV5uLfMjReUTeqUun7wZLALU/04KNufzgYVFK6QCLBcN6iGpyyR7Zc6qv1D2VMNOsVs13pGuUQW6EZ9P0WgHCuDlgkdO2phBB3Zk3t3ai+HX4+4rW2NttJVP/0pe7Sae1OMNn3gyFDozAWGx4CE/qpmgkSvshp4/ivyTD4xStNkkss/8jBsg8K2NjtQ/oSls0xd4qF0/apwuxaS+16V4bJeHEm1JzQ7VQojWc7npAogajUEvpIMbWyYI6oYOpaYDL+VgL+rVnDuIUxpnbL1fNH/6Ft2scFb83xC1PCTsJoL/qMBlae9YpOyyyo0IPRWBK7TSimIUsoGqg2o8+o9wZLVztfQ6IbMqFSD8psjKJSWScq9GK0JCwWXRWMo3sNzuRmx5ev9JYKX8gEkw6qrx8sA3HsHR9PffidfCvTpNxvr4T/tQVpXhCB1uvSssuQyoczPKTaZZbEA4zAiWeTBDPWDCWuEaDqsyh6NCZ0tbtVbjdyNbp/OENCgGIgY/esZMJIcY11jAylVfGcL+TLvUWs6CuxwQC5Xy1oamyMXoNQ7Sgg3i60qt0UWnZIQB4yPym+Mtdmfb7PB9wwV4hDY4y+GkycRMXiWQYl+o4MjilN4loGJGQK7WXQFl8ZsApKD2NPrHKRdgwBEjNuSMBjd6LfpM8lKeUbPSW82ldCrxOoxRQGnrt+/0mjALEiAqIiac9kmTxioS0X7ppgmx2P0U50bHjljITARLoRUz8S2LKWxAIbsUQJomRoTOpqsyhOmCqBjTVI3VuW+y2Zolwn6jcW2HBPhMl3+ovsxW5HdhQ9FtBER27HGcvdtKh5OBBH/37dtEdWyvWq6FdvGtEVPyRRXcfl1w9KY/pEjW12fLW/MERzAiccSMiaCkDKoMSJ11AUiO+n9YlqYoRaKa+Y1YiBKhJVRg9qU/U/PLGK71HZLWNYm3PxbGdRrs+7jMYbWxXPM9d4/tZFzQ3DXOOkpVL724q133GL/FLpy0a1ELnFoRuJ5im6PP6LKUysYayzFKjlyljkyou6XFYo9ghQKrUkijgERE3kGirsRkIaa4jSjjIow0Nque8IFNKBj51APtmRx5oBl7mk+JWpC/1bU+ez1mUN9uM/7T/pz/E57WFAnfdQ26x3OsRDL650mhDIlNKMkRcDZu9hyiP3TTDaaKKdrjChimYoDq2x6EUjiWes7PcRKI12JJaVIW+E+IbsidsfcpMwZ6HzYww0Mc91FeWK3hKjvdGRDCDKJjXuzrT1Jy29dOr182f0VZqm7r9tTWGKL73/yZmoTev6Td/+Y1dxsIddETjyZAQBZdrDL6KaDrlgnokjFyZYCUKdcYoHGydhauhRdl12pWiG4ohDaxO0lRjPnHKzOFdRj5NRFTtgkZtQuwRA0ZN4vrOAl7uL6uRdePeQW9Pfmq7nMkzcvqg+8fM90taXXcmODnzxYO3M6odPZsxVfV//Xs+lAcP+lskuumCXmtZKi6sv27h3Ludf6TvsSAh/xKoQRRim9lj239fEl75gIS8CFCJBjQW0EoDKpIymkmahWQFRUXZX7JuEoIQ5SCimoTbQDhll7S91lvBcR0FtN0qi5ZD9YQ2kaW6GY2mTxloeOHzq2ti2p6TU3/+g94iiZCcGMnje1Nlf2Q2rV1sDpeqzfIF5lqlffcmeNZSPly+a/OxlHx1U6AuuDRy+LxAMAR7fJYGEDXz5QBMLZpno9QN4gsYSR5mhKnWI4mGhphhhauVVqcowPYxhKlMNQXmj28HjmwroKPhlKYudWOUOnMuUwf8xSZOXPH7EjOVb+nf4yc9f75gXJK1rMkxeWXalq1fmGrvdwoV+gEHDLN5y1bxpvcMaWCo185XWU7yidol0xRzIUV7YlRLV9QyHHmhh9xka+lwBClnlkDssPQ+NarbDsxZbyyPKm8MSeH/Aw399nMf6QU8tcof1a5yHKgRgm/yViQZalh01/R/hUdAtr0tfW99U4PaFFjBQI/Sbf7Rvbf8WmnLx8s3z8yWxWABPfmX/hntPjnLxuLlJLW12d5//baeIH8BHQwhIxMmYnhJomsJx5CEm6uqZAiTWADXjcdUKYJKto7YcNUIBKafbLFzv3JD38fcNebzT64AigYpQysSoX07HlvmHdSZa9t6l+Kd758xRfj/yOvOpDxN6InGWzvhe1RquvWphw7r4ni2AUM1Lyc58sf1o15cn6zy46a6Dp7wystFsy4baUrf8vluQ30VAOw9kLDVXuVomMXUXjqMOs5BMQy3HVaa9ZM9kYoTFo9wgig60w8gZuooEQAGvdTrqWOEwh40qMJOzrjqLXbVnOv2bx45sHP2tYSnZN15oPyoQ8tSUod1y66KGF0baMyoQ8U0tr7XZb/aKb/mMNdsWbrj34OaPRjYw8Serd+3tTlzileQ3EQRW+H1FUkYJmiYxd56OAw8woCUlSpThRCl5ZdSgZIhyATow9vjHeby0qYQ8ic0Wl4oEg2lN/nZWKvurV45voDeFR71OeGrjF3yfnWNw/sbefNVdLYceOurrTJ8IRNzySU90NXc7hX93Jd9gd3ff8tgZe2+BvH3x+vnOoP7LoCQPgxwZYUKi6Caw7wE69ltgwOFCvRGvXEMdRmHqeNAzbUU8s6GAwdKIs+Sx9+mGa2ny/km2dvm6r+864u2cISyOe6itrlcT/2Zw5jb53f95z7HzhmveCNjGBET8zKEPty7o93GBxvhDx7w5+YEtXjqVYInvth7m5XBV4Mh9txDUyHMowiw6yMS8vQ213E+HTl/d7OC/1+UxUNjK+2dcE5auPd1o4n+1nj7zja0x4KSlK83VeupcjfPZjbq89u/HTivrwNaeqeTwJ90z7LsWKfm997ee4gbyoGTg3bHi1N230I8vt0j9hc3rv+kX9B9Jx99j1PdeBFBVx7Df4TreyhewuZ8OLavFzOFaQ6vUprYsa2hX9Jy528Of9OrinkvXHyMYOy6lyaVvfG36k2M2qsKZx/OMuverD67KrMhb57sCNTUmrlt58oz2kY3MaVmZXtOWXOzmtR9KX0wYVsMQO8j9Z3hAU/zmRyy2qigA13lrysIVDcV1d6+56OitnoDZ/fb3Z+V143sm56/ua+Tvuvfk0aPGDmXEyMZm37F2anvAvs9l0LoX1296+qwZpZH3TPp+W11Xr/sDNy/PRyDtMkNISKe7QGPkDooMnNL33kSCX5X0+n7Tc9EB5TfxRrY76473JnQE1vcMLoNJcuC65WfNH1Y/jGd2x6URn9Rw/a1rDyp57HRTike7Fu/2QBzpK5+p/96G3Xp62GVBwTsFQpgq0k71gIZIGDUtb5n8dxMziV9tOGdq29b6+6dHVlsvfijPZJo+J2nzmzedMf298Rg92r07DAhqfMEtrxmrRe0prht8qVrD9e0XzFw5Wqf2d9YudAa0XwRFeRgmOwxNzNN09lBNVruk67xdP9iaUZTuVy9Ze5jPcJqliT/3fGfm41GF9Wlx2LJa/dQtAtjthtXZtoB9VwTMrjbFf7RfNHPL1wikZKlvrz/SzQZnJqdp1w1cMGML0a0cS+b6dXt4rrjY0OWrDTruXnPRzG2dmhuXKTuUESN7zlz73u6ua5yvSblqYpN++/pR9GNbo538Hxtquxz3QjDBq238elRQt9XIGL7/TIGI+0//Ys1hviu/KXXtj86Pd3l8DOPCgluksapj9Td8pn/RMPl1uR9+eh34TKPGWIyie+YsXWmufdc6LQj4Isvk1+cu27ph6ZZ1X3IDnGPo7J7cT2c8NprwjrXfsd63UxgxzNeveb/O6dHPh+AskdBvGGiZQv+bJXVlWtbu7jp8MWSwdrd9dv3typPD1aOdce10IIaM/nBWKccu1ph8sSoVPNKb088FY+malHVdR0vj5p1hfGUfnxsQ8SCsH310BEo4wbBxU+7Kqe/sbADi/v4f+lz97xYENYMAAAAASUVORK5CYII="},30757:function(He){"use strict";He.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABMCAYAAADUQBHfAAAAAXNSR0IArs4c6QAAH5JJREFUeF7FfAl0nUeV5q2qf3/7k2QtlmzLTkxsZbdJCAFis44hhGZJSJpu0j0zjc+wZBrmsHRPM4hzukP3YQ8wEGAG0jTQOExDSA8hIZAQZ2FJIAlxdjveLUuy3v7+terO3Prfk2XHi+Qoye9jS++9f6n71b3f/e6tembwIh+IyG/dWy9yjJylI73TY4xFL+aQ2Iv58Jsen8qVc5lSS8VWCCGYAWJPv1u9IJerMsbkizG2FwWQO555xlFGrgfQcLpGhwBQAIAAABzDTmq2U9lUhgZjDF9IYF5QQO64A41oTbNsRDIHNgCP2LOeXw8BshYiIRVxK7TRPfTyEea/UKC8IICMjyO/5OpqnjNW8gUT9gKsU0QyMmrlVvQdWs9YvIBLT+nU5x2QWycw48lKDze4OXeEUcSYZeFxw+HozxMflC9Y7Q3DeeIXdUrWzuOi5w2QbdvQOuBOloSbd6OwxizbPiEXcLISjw/QrC1SJWCVqxuXQAtg8fll0QHZgijK+xpFmyUZzlwWhQGDDnVa6GhQIhYc97l0zok+p+vpHBk1I4m9lY2jjHh40Y5FAwQR2S1Pz+QyHhQU5+JYI1wsQLr3VgjIQbRy+3O19esXh18WBZB796Drw6EyN8QRPLFo03aSG2UsW7bqYeNXK4r18efIL88JkC3btlkrR9bmVey7R4+Z8uSz3pwnQse7tvv+0Z93X3OFCcRebf2QTtOnpF9OCRDKhA/urObDfDFrMJ/P087n/TQdQkHAQmEGtcZE7Y2nn056b0HHwgBBZA8dBK8h2gUUzDhVD1jQCE/x5BYCmu24ddFwvraQMmDegJDcdr0VBcP0F6KrTtGcxbmM4kYokApb9du/0tsaHz+5fjkpINfff7957up1eRb7Hg2TMzjpNYtjzuLdhYCxExUlYaZ2sjLguMaNI/JLK5BL0M9xALbYQFC8k8kFFxS0U+Np4IwBC5+H59H96ZlBJINXDmRJ7R6zDDgGIMju33/ABbNQSDgTxBM0QLvD2mEAzHZSY+ayPZ1DpWr3s+PNr61QPdmK7S2P1If31uJlu+q4gmGSAyHw/AGzVbLZrpGsufOVq0p7CoaKBGfHJO3umOaO52Q+1b2m1W5jf6an+cDt0LziiiPbDEcAcv/9aGYGGnnHypnYmcGTPWQ+n3se4FS7xa75+cEzt01HlycIGxWDYUR0BeO65OUcYKzXBlMwNDjzBce9BUv8fLTIf/wfVxf+qLwM8vbihqv0QOVa0B4YYK2uHUcA8je/2dtzXjY21/eu0B5A7jsfg090jlSgNv9i+9hvD0QfTgA2Gpw5HHD2xpylrlewOawsWsRRYHCuATIFOYcKbMFuO73X/exfrnIfDznjHmSe07BoglpUCWWA7azOGPBUeWLjRpZom+femQCRtaZdcBw8d8TDNZ6HjGVOCRTysN9Mzljv/+X0f2nF8v2CQU57glZMqNGm3wkAsns0b4NjMDAEgMHoJwPOEEw6gTEwBTSyFvvyX53Z+5UBy01OdbK6nj8hfKNSDw2JiLndpf3HByRupmm1DTBYdvC1I8sVzcdCBkAP/cYf9xU+/0DtOgX89YZQjOKCalkCQb/QfsEgZzHo9wS4hgBySEGAcNCAGJyB0B7D6EK0OEPB4NZNQ4VrLh7ONxYyJvKK6XaLhYzxQ1FoVBqRIDAylq0O3L7jwObN6zXJPttDuoAQJm2AvOPg6T0eru/tw+w8Qgg9wG/8el/hCw/UvyURXk52k5Gck1ek/iiUBEvF0JP3oNVsQT7raVdRiYKenAtZm4EfIOQ8RpkBQpl6Ut7mBAi6Fr/7dcvz/+ni3vmBQhPkM2DTsW/ur9d04ek4DkAQQGzZqlLZcWDz+nkAMhtObQAKowuHXdWfyQD9IW4QXE+4TmeUlunnPU/tdzbfW/taomCTDhHNEQgMEeLpvVAo5cG2bWj7AfT1FKHaiqDgmcCQQSuWMFxyYefuGKZ3JLD0XAtGe02YaktyEBjOm/DwzoNwweoBzNri1uVO8L41vW44Wiyr1Y4nm3N0UndMxJZS+Ma+etVoNTjv9gpyeRspK1YhgOiuffvm5SFHM5ehHCw6Hr5hmas8zCK57NHZ6GX/+sR/qwTqI6iUzh9cxhAf2Al8aCUAKii4hg4JSeFiIkSKQ8YAoJtNVBIo5QW0Awb1qoQlAwYMZATo+zAAz+TQjhX0ZQwouEIpFX95fz385mOTqpixzOgdp+cnN5+daQJkoc2AyahttAQzEh6mQAQAU2HISEfkLMQAHLBswOmZ7fsX5iFzkWkDRErhBUt71FifhwRM9+P/fNv2M+/ZH9+UEVHOkCHUqk1IvB6ARAFYJlgCIe8AuAaAYMQXXBNolEgwDQHTLQU5l8Pe6QRQIZQLBki/CetGe8ExOTBAiBWAYzJ6TeFTO6NgvrVXmE997f6DSx+ZSFbmXVb/xw3Dj5y3ErF1jL4MARNUKWYCaDc4dwwpp7fu339KHnIELm2AZcWyOr8XcXnfErVrCvhlNz72TYXqUvPQNDR2NoAv80Dl+zR3cEOALQCKDoGhUsIUHKJYwXQthP6yA4lkkDU57JyO4PRBF3IWh0QqKLoCHINrLyF2pyA0BEPKQBzUz8Y3LL862wS44emKe+1t+ze0fez/2Jt7/v01y5gPxBVHHRqUgP4GoNDB5tbtzx2Q7jMi5eBYyVVfuK9+7hOHkh8rmTi8WYdkfx1gpAxge8B0Ck0zRsYC8AylDa3MtKDck4NQcSi7DDwjVSghAizPmZCxuXauhh/B3pkWnLu8DIpSFTKNi2Uw5Bzay3P8sj9fU3w0EdyYDIC/46u7NvntePRf3rPs+qV5VNExkkEaQgHM+IhDBwf3nTztzkP6UOhMNhzrN7uavbur7IOKiXdRpsC6BIgRwGYAWZ4yK6T6QnAGDouAcQ5BAlDyOFiCQDJ0GM20IihlTBjtcbq6BNsRsihRGgTyFETSJqhBtgVXrgnf/Miryp9shsyg5/zyyab9N9+ZGB/pt2++6X29dzdDLo4Jis4yBZV70p2HDjkJIF5sq399stH3zAQMD/fB5O66+d1YypdoeUGBTgsFNDxi0I6nEyxKSoBaHdzeAsl0yFsMbJPCgYHNOUy3E1hasGAob+qw4hxQKcpgCL/ffhBWD5XBc8xU0QqtZtEQ/Kkrx7KbBnKWVpuUYTZ9fudl7RqsuWO8/x85uCwOGZ/bvO42sxNlK+O5AmIohT94hA1t3x2ctXal9TvbEe4j+9TWBJUu+1LJNVfmdAojvw1AbVdkwG0BSzIURggWhRTnYHEG1XYCy8oulD1Dcw7TAkYxpQBm2jINO1uASY6XCjjkAP4ZJf6mt68b3h4Gvk7/7/76rgue2pu846d/O/QRz3WZjYBhELDkqGLRULZKngsgBMa/PZT0Pv4Mu/T0VfYt71prTnz7cX/D/hr7nlRKz2SX+AiW2aUWUliNOkAml4YQZ5C1GBTtdM2J6pYwUVCrtGHN8jLkLANcM+UdMlwqBD9G2DfTAIMhrBoopumYA5oMVH+eb77q7J5bDQZcoY+bPjf5lnZdrX3wn0b/oRGAFmO6L4KAcRjybgglCpUxVNq/kR2vlpmjVI8VNcQb190k/9LLwuPXbMrcY3GfXbcV/rQRi886QoHJEfwENT9oQMhf4iiVvXaOUgwwi3iAOAWg1yOjFXDOIIhTfdKfNSBvpZnFNlJGJFAoEg+1KSUrGMhZnVSsvUT1uvzjm88v35BwEA/siMz3fmvPtX095s9+9bFlt3UBORYohkL16IGFKtUOMiTMvn9/a+SZp+MP/cnr7I+tzrDIyFvy+ntb10gw/9YVqA0lr6iECJFE7SzYoFARALaVFkU8rWtsjpC304KOmKZSaYKdcaGcNcEWAhzBwDZEWssQNxA9JQoafgBRuw1jK5akzia4Knns7z988fD11cDnb/3MrjdNVJO3/dPV/e/fdHo2CI/KMnM9RTk2Prrj0QVK9y4ghiW/8KP2ZaGP5378ne4n25gYhmHJH/whel+sxMcTKdMQQQCf3D9EwOp06hmGCRT43SKPvIIAtATXmYdMrrZjyLoGFByuq1wChTyDsg95UFoFcy3xW+0ARvtymmeE4Cpv499/9JLer13+P3ev3/Zk8omz17h/952rhx6J06L6WUcXFD/wQT1ZPnBKadcwYvnFH7KrohiWX3uF86kpTAyMpbr5SeNdvhSfQSV1rBNdKKWgESloT04B5Ht0tunWNgaXOlzmpmJkCPV6AD1FD3I2B1fQ+WnI6VYAZxokQwiIpYJQKrBUAkNlDzjjqi/D/vstdzWe2TOR/N3AMvszt75/5BfHA2MuOi3fx1MHRCn86u1wfmVSvvfdb7LeM1BCJJK96QljQyth31VSaTNpwHTUqxUIjZzOvKYgl0+LPNkpgGjGtWATDOJEQlirw+BQjzbc4rwTKgiCc32ObgWw1KMQFdz3y6fhwktGoZCx1IOPBVsP7I57Viw3/uGm9624ez5g0BifEyB0g4f3oPWzrfFXMwX2vf/6lsxtEHF+185o2YEWuxMBnUSSDlAQxRKm9uyG4tJhHSaEFAGRUE7sgEI+QMbqYk9RycOg6AK4ptCGUzqmcwmAFBDqkaSedrCdwHQzBgcEVCakUk38+YaXZcc/e1n/3vmCsSiAkCD7yp3++VMHkmuLS2D8vZdm7ztQU9avdqifc4CXkMEKGLSCEBoRp91AOvYpHZOHaEAUQqK9BNMij3OQQQCYxNCrBZtuI4GjwyZVpAQIhY1NfRNgsGMqhsndkQZrdIXz9AdfV9j00oFsuNDVgefsIYQqxrb6X7c3XjlzEP6HlYEfrz/P/fZ0pD6kFH+vUqir15m9k5AZ6NHG0iyTWNOhQn0RSTyjNNdo0zkDSZIfAMoZEmSpUKPOmkPhonuNAEEEMFNVUJlM9+P1DxkwOmjjUJZff91rln1iZ+RbC10yWRRANCiWrW66qzXy1FPwEUzUardXPNGz1HirYTBjcucUtJ+ahsK6EXBzrt7Woj0ElQaFgJCKAEnTNBkeBwEI04RyhmR52lOlQk9GDGo1Bf6MgjhCcAscBpYa0F8wtbI1BEQXDGWuvGb1kq1Vs21GjPFGCMKd5zrrogFCoJBIC4Qlg332VTsOJdf+7rG2GxARCAkYtcEYzEE2JzQX6MqdQoZSMwNIJJEreY0CVAziWg1otdgxXYgDBUmLgaSSVCC4eQ65EoOekgDPot4rZfDUg84fsvB968u7FPLPWUr9KEhUHHMmaE1pPuGTICj/4d9MbNy48Thd95Mo1W7KCgNLXrzUW3JaT/avXcO4HFDmHpkO4f0/OQjTBxPQ/byOJiHhrImV/knb7mkYETLaXTrFD1WwFgczg2BlATIeB5dSsME119D9SIdQiFFsWIaAT7yqB4bzFt1SKcDfcRSfiiPr1zwDrBX6pl5oO0EvOAXEPcEyxEkAacZSjTie85rRnqsyhvEBBBykFEjzT2P+3qMNuOGhOkSSZDwZzHTvw49SMiXjCSdFupOnRMsFg2hmCkTGg1w+C5YGQIHOQuRdjGvVmmYlkvFkIYMrz8zD29bkdGgR/1ABCIyFqNRPODc+HfjhLt8UFtU3xxJn9N4pA0LhkQQBu/LMVRvKtvlRBDhLKZVi32na0O8UBtfeewju3x9oLiCeoPfiJM0qdG7KHenPSKGW44EvQVgCsnaqMyjMBE+zkPaKOVmHPOT8IRc+9vJefe7ctYMuJzHGp6SU3xCMfaseybaKmHGsHTwLBoTql1ak1GtWlc5YnrE+agj+WoWKljr1QFJuSEv+tOTg0E4S+ORd0/DoVJoWI+0VqGdQZxoiVECotWII2/ShVinAohCs3pz2BvISahyR15FXhAmDICJ9o+DsIQeuf/OwbjqnR3cER/oB7YJGgMfjGD8bg3Mr1btHa5QFcQjxxFlDXt/63vxmy+BXKyVz+vEsldTaPQ43P2ZnioxoRwo+/etD8Lt9qaeQ8NLCTKbeUWvH0K5FaRlLdh2sAsw0AVYPUh4GYXEQujuGIClNU7gBg1etysDn37SU1miAI2mS9P10B3j6uuu03X3SjLEEAbZGMXy6geqPGQDW5ZWTA1Jr2k1TqmW5ovXqkdzlOcv6a6nUcCoaUp448fatdMlAx6dC+MGjNfjho039O/VHCRjqe0zOBGk3Xgc/pR0EaCUAeVNnltmJp6IHqXXI4D0XleEDL+vr1Dg0nJQcCGiaJL0SrDtm3YWA7jpc2qMRwFoxqh9FkfqiZOwAtQpOCMgH791TxqRhX7py5OLhrPgoAlunFK2YHL0V4GgXTV/PZpKO5+qlSwawoxLBP/+xBvfvCyFMEJpBApUqfQuk014jkglIv1PTVAEYnVU++tVkcPGqDHz4kn44Z4k7WweloZp6BAFBeNI4iXNSEQhpV6gz+lQU6uVR5AwnY4lfr0Txd0MQjfiR304eM+3+Ymf1/IG89QnO2SZUSL2+jnroREPHO+jGqfEpN6RDO2phtGOrLt0767pPV0K4dXsLfvpEA5454Ovw0Uc3RZCnMATDABgomPCq1Tm46pwynNPvzGbwY2WLudOjJ6HTbzmaX7qOo7N/h1/8WH1G7nf+ZWws/Z5Ox6fGOYyvNe76q9f+JG9br7I4d5DWFjXZdW7b+fXZ31/oPvYwr3SletrHONIEeunHEnbWIth+KIBnZmKoByREELKWgBUlA1b12LCqaEPeMfWKHo0j5awOf3VKgdQbUuXbbRXMjrjbeOkQbpfqusFEgCQKwwMtf8qPog2vXd6/owMIsos+d6MzFQxkv/zusZstwdYbwOOSbXKDcxMVdSpQ5/5nHZ276/qTiohOBu6Sfrqw1HECqmES2gGndOmuQZNKG6wr2o5GSwVbmpHoUtIhGccC17a6fqhvSCGQ7pSg6w/zBvEKXUc8ku4y6DDeEWuuKKf8qD3RDM0EsG0hv+hNq/qe1IBsGB83JqxXFKQwl3zuyrXfzVrGeRQIElFmOI9ztk2ikMZ75KEx6JLsYefsgqFnpJOESJBFcdLZSYsaFOISSseRlu7pA6hVyFDp2KduPCUOAiyWEmzTgCWFDDWDnj0xs6CnH3VDVL848jNshHG4r+FDW6KFoLhgbEbMAoKMXT6+xdpRWNkz06qNfPHPzv561ubn0MgpvGkyGWBUtm2Vtw2bJqVLrzQPR4fD7EiP2EPMIEySTtqkrKJ0E7oRIfhSdkgybREQAASKwQU4XIFBswxMg0bzXPAc6Mt6aYh03JH4THYJvRNaGocuEGmhjL6UyUQ9kNUwMRkgZRcg3wfGZhjwl79lZd8TMI5cA7K73LdkoslGvvSuM7+etfiZ1P7TPEfNHr3AjMrmPBrOutw2uKkOe2MnHrpTcThSZ7mGEkgitRjT7osIrVhBM5TQVmRKil5XcBJ12YKDzRRYnZvEmg1podyGwUIWEqV0yu0eBBD1V+igLE2hQmmeDgWYTLeiuBokhkRlxLSA3Fkfph0ynPFKEMFFV5xxFCDVJi6/9PzB17/6jL6/cG22TEtt/SCK93RdBBQkeceMhrKOJRjTCwSHs0unWNPYHHaR7rXk9mlGUlpoBVTfJLS0kHKGXqWjMEQAU9cxlE4praZjoOp2pJTTPVWtazspPZ2KNP0Sb6QcoiW0qvhRNNGKWCyVpf1hTtuBQFGMVabb0fW/373nU19648vq4+PjnI2Nb7GcwkBP3U+WcRD9+ZzR886XLn3d2sHcpYxhjgZDKlErRWSQUDZHjJdmPdXnWVanx9OZrHTW5pYXNBn6UqpbEqlnV2+hUVL3XqkNS+5Li08ax85Mdxe46K2MY0JPxk2bTXMYpFNIzb7XyUIYShlPNEPViqUpEQRxmL5Oz6kGLp5uRvfd8eT0db/ZMXNP6PiVp695YwgECGy4wzjrDa0cOrmBOMIBDliQCTgvWZoffPv6gbf15uwLk0Tqr33QbOp4pcYNonIED1flMzzvGPRlMe2Ix0vL3ZmkDBMrpZvKFJq65dgJgbQeShOoSTximbq/St2zuV+26qbYuSUMZUGqPw+1o3gmiA1ENOl+JIYJhFQkMmyGyTNbd1S//aM/7LmHmTjRx70Jux7W7xynfohO8sBOu+4pq2DXclGj0RsjKykJRY7cA4b2hjN6xzas6XmnY/KVUXepck4oRRKTgYwdnVHOmQZjWswdwamzvjPHe2bDP9UQdAF1v7ppMg2VVK12SpS0s3ZE0XD4FWdMNcI4mm5HPJTK7F6m70Gkq8cLlccONn/03d/uvflQzZ90M0bFFGzaSYzmfR96ObWi9LC7XMzGtjxqOjv2u6FZyINSpVCGRcF5HmPlOS7PvPm8wUvOHM5dxpkqEZ8QiaWd8tQZBYd4TSmnhnIOaZduNaK9qbsXtdt9PzpvkrG07JCaeGRQ6JLgONUT5aUYVXioFUIzlhY5WHflsLOzjVw22lsNtv7wwYnv/H5n/RnPlTVHmBWJSb1Y2xncOf4XtMF59qFHyovLUQyN/bs9mB30IuHnYwklJbHIOGRRSndZOdf3xvN739qfty5WqKxQN91SEUShROFZtI34rHIOSq5lSUS9z2yuZO7G8iwoHWupm34szzoM3mFYtPACiBthEjWi2EZEQ7ckOyfTeAzOVcVPnvrF45Ub/u3hvb8zuVk1XVbxuFGV5qS/snRpeONR27rneMiRc7Zh/A5jqm/KYdayTNxqF1nMyyB5HjhkpUrsdaM9q1+xunRFxhZnkNFafaZJVRsfSSWX5d3o7L6CYRvCILVLMrvrwt2dibNJmjKL9pDUP+YWbR0u1Hfv5DTVljJohrGhEE2pUO84ID+iLh3dJUSc/v2exo3fv3fvTxuJmjY8XrWSpOZElWZQXBo8sHldcrxvdB5Djx+eu7HxLWb2tGWOP+Pn49AqJjIp0zIql8w1hHA3nrPkFS8ZzPyJIbCPshDdjAiz01lHg0Fybl8heUmZ9vzNDaNuQyntqNF1h3VFmjp1iuyk0c6IMFYqaoRSRUraqNSsZKWwJf6RCOH2Q/7W798/ccND+6q7Miavcdua4dJuDooD/i0zv41hfPyE3/k9ESDpOMaRb1h+pxVWbK8l40KUyLJSUGTCyCJKp7/glV53du9l/SV7o1LSoVSqW6edJYZEIfY4ZviywTL0Z2xb6c5yenSDQNcsc9LTbF3WRQIwrodJ7EtlccZILTOpl03TliQwoab9+NGbH5r85588ePAB0+U1y1YzDnPqItrVvu8+iODGK+b1nyucHJDOoLphJPhSj7VVsa2ghFFcNAyRkQrtsRXFVReuyr0z6xprk5hmTyvctIuVFmtytOhFFw2WhGdya26FSo/QDek5R4dPpJ9gGEppxEqZSqKu5RjnKpGJXtwIE5y8b1ftB9ffvetnfhLPeLZZccGo+uVaszzy+vDOzqb+o4n8eK/nDUh6A2Rj4zeaYXmZk2NJNghYWWJcAmA5Q2LGEMy9cG3PhacPZt4mGA50dwLQLNJmFwkMDUB5wWApPLsv53BgtKNE88ZcQMi5EsQoJN2jiCcU1yt+HTnOOSPpEj451b7tG3fv3fLEZGOX52DdM+xKYhuNWjgZPP2BTVGnrzhfLGa9dkEX6JMv3yJWjPWZmXzoWVYuF4ZJWSZYBFR5jswpZJ3SxWt7Ni0pWq9FJT0Sp1qid4RoggqLtog2jPTiioJnKYW8sykGJUISKkX4mSReycXCWOpqO9ZCnsmpZvTwD39/4IafPHzwIdcWddPFiozNWh7Av69+UQjz+G7dInnIUbfZgmJd5QFbhe2MillJh1GiCgZClkTd6EBudN1p+be7pjhHAgpdDzFqGqfNjigBuarkRq9Z3idKtiECqWKJKBjxxGFBQlmMsGGNMDlw5/aZ733z7t2/DKJoxvWgKnhxJhI13zFy4Ymyx3xnfYEhc8zbsrHxbWZY3uX0s4FsJW6XZKKKCFhgyDyB4Jx3enHd6IB3ucFhaVpJd0WdSsOIQ3zVGUPRQMbJEGRUXXdaz5p7pcLgoYnmT794x/Ybdx1s7c+4rCYcc4a3/NYSLw5uuWZTtFj/McJiANLJRuN8BSy3cktOc402z4dxUlbAC4iK9ItTcEV+3Rk9ry9njf/AQOVoI25HtVNWkn+6ZigcyXmebgkCUINKV4H7a8Efvv3rvf/7lm2Tjxser3kKqlKk4fGG/x8e8/nq6Xy9o5v5FnL+yc/dskWsq7i2OlTIsIJRaPpRicLJBFptTeyBcm5obDTzDs+GlypEQ5fhCuSfrR0Ol2Ztj0ASnONMEO3+v9smv/P1rbvvVoaa8UynylhUlaHfLresMC3GFv9YPA85cmxs3fXXG83qgGNkBzPgB+UkSkrIeZ4xzAgw7TXLvLOWD3pXCAErpET152PD4XDW8RLA+m931W7+3B07/s/eWnAw77EqMF5te9Aw9uwPt41fHi9WeBwLzucLkCPCqFg412FyptBKrKKKk5JhshyCcjOumTlrtPjqct5847vXDpkK2YNf2rr723c+NrkjY0PV4qqCgteKRQju3LUhei7ZY76+9PwC0h3F5VvE0JhrZ7NZz7JUIU54SfmsxIXyQDGzXPJ61i0t5W7bdvBBAFmzMuaMCbLOba+VO9CInq/weOE95KgwgvE7xFgfOCoSOUPKgh9AUdiWh1HIkJnNfE7UILFqTj5oBokTPLB5PfHEiYvg+U79PM97YTzkiMEgO+26W6ysdF1mFLzAb2QswRkmSdvEpJHrN8I7d/0qOlkRNk/7FnzaiwBIZ4zj43xT+QJz94xrQh9A3xQkfWun4huvmF8RtmBL53nB/wMjwfnDaT4WWAAAAABJRU5ErkJggg=="}}]);