mediacms/static/video_js/video-js.js
Yiannis Christodoulou 09454774ac build assets
2025-10-03 11:24:35 +03:00

830 lines
1.2 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){"use strict";var Of=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Db(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var i=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var o=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(i,r,o.get?o:{enumerable:!0,get:function(){return s[r]}})}),i}var Cb={exports:{}},Xc={},Ab={exports:{}},Wc={exports:{}};/**
* @license React
* react.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/Wc.exports;var wb;function IA(){return wb||(wb=1,function(s,e){(function(){function i(A,Q){Object.defineProperty(l.prototype,A,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Q[0],Q[1])}})}function r(A){return A===null||typeof A!="object"?null:(A=ye&&A[ye]||A["@@iterator"],typeof A=="function"?A:null)}function o(A,Q){A=(A=A.constructor)&&(A.displayName||A.name)||"ReactClass";var be=A+"."+Q;xe[be]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Q,A),xe[be]=!0)}function l(A,Q,be){this.props=A,this.context=Q,this.refs=$e,this.updater=be||Pe}function c(){}function f(A,Q,be){this.props=A,this.context=Q,this.refs=$e,this.updater=be||Pe}function p(A){return""+A}function v(A){try{p(A);var Q=!1}catch{Q=!0}if(Q){Q=console;var be=Q.error,Ce=typeof Symbol=="function"&&Symbol.toStringTag&&A[Symbol.toStringTag]||A.constructor.name||"Object";return be.call(Q,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Ce),p(A)}}function S(A){if(A==null)return null;if(typeof A=="function")return A.$$typeof===Oi?null:A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case se:return"Fragment";case we:return"Profiler";case Oe:return"StrictMode";case He:return"Suspense";case Fe:return"SuspenseList";case Si:return"Activity"}if(typeof A=="object")switch(typeof A.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),A.$$typeof){case Ue:return"Portal";case We:return(A.displayName||"Context")+".Provider";case qe:return(A._context.displayName||"Context")+".Consumer";case Ze:var Q=A.render;return A=A.displayName,A||(A=Q.displayName||Q.name||"",A=A!==""?"ForwardRef("+A+")":"ForwardRef"),A;case dt:return Q=A.displayName||null,Q!==null?Q:S(A.type)||"Memo";case Ht:Q=A._payload,A=A._init;try{return S(A(Q))}catch{}}return null}function x(A){if(A===se)return"<>";if(typeof A=="object"&&A!==null&&A.$$typeof===Ht)return"<...>";try{var Q=S(A);return Q?"<"+Q+">":"<...>"}catch{return"<...>"}}function D(){var A=De.A;return A===null?null:A.getOwner()}function k(){return Error("react-stack-top-frame")}function I(A){if(Ot.call(A,"key")){var Q=Object.getOwnPropertyDescriptor(A,"key").get;if(Q&&Q.isReactWarning)return!1}return A.key!==void 0}function C(A,Q){function be(){li||(li=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Q))}be.isReactWarning=!0,Object.defineProperty(A,"key",{get:be,configurable:!0})}function P(){var A=S(this.type);return gi[A]||(gi[A]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),A=this.props.ref,A!==void 0?A:null}function U(A,Q,be,Ce,je,at,et,gt){return be=at.ref,A={$$typeof:pe,type:A,key:Q,props:at,_owner:je},(be!==void 0?be:null)!==null?Object.defineProperty(A,"ref",{enumerable:!1,get:P}):Object.defineProperty(A,"ref",{enumerable:!1,value:null}),A._store={},Object.defineProperty(A._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(A,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(A,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:et}),Object.defineProperty(A,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:gt}),Object.freeze&&(Object.freeze(A.props),Object.freeze(A)),A}function Y(A,Q){return Q=U(A.type,Q,void 0,void 0,A._owner,A.props,A._debugStack,A._debugTask),A._store&&(Q._store.validated=A._store.validated),Q}function $(A){return typeof A=="object"&&A!==null&&A.$$typeof===pe}function G(A){var Q={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(be){return Q[be]})}function W(A,Q){return typeof A=="object"&&A!==null&&A.key!=null?(v(A.key),G(""+A.key)):Q.toString(36)}function oe(){}function K(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(oe,oe):(A.status="pending",A.then(function(Q){A.status==="pending"&&(A.status="fulfilled",A.value=Q)},function(Q){A.status==="pending"&&(A.status="rejected",A.reason=Q)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function de(A,Q,be,Ce,je){var at=typeof A;(at==="undefined"||at==="boolean")&&(A=null);var et=!1;if(A===null)et=!0;else switch(at){case"bigint":case"string":case"number":et=!0;break;case"object":switch(A.$$typeof){case pe:case Ue:et=!0;break;case Ht:return et=A._init,de(et(A._payload),Q,be,Ce,je)}}if(et){et=A,je=je(et);var gt=Ce===""?"."+W(et,0):Ce;return Je(je)?(be="",gt!=null&&(be=gt.replace(ks,"$&/")+"/"),de(je,Q,be,"",function(ci){return ci})):je!=null&&($(je)&&(je.key!=null&&(et&&et.key===je.key||v(je.key)),be=Y(je,be+(je.key==null||et&&et.key===je.key?"":(""+je.key).replace(ks,"$&/")+"/")+gt),Ce!==""&&et!=null&&$(et)&&et.key==null&&et._store&&!et._store.validated&&(be._store.validated=2),je=be),Q.push(je)),1}if(et=0,gt=Ce===""?".":Ce+":",Je(A))for(var tt=0;tt<A.length;tt++)Ce=A[tt],at=gt+W(Ce,tt),et+=de(Ce,Q,be,at,je);else if(tt=r(A),typeof tt=="function")for(tt===A.entries&&(ui||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ui=!0),A=tt.call(A),tt=0;!(Ce=A.next()).done;)Ce=Ce.value,at=gt+W(Ce,tt++),et+=de(Ce,Q,be,at,je);else if(at==="object"){if(typeof A.then=="function")return de(K(A),Q,be,Ce,je);throw Q=String(A),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return et}function fe(A,Q,be){if(A==null)return A;var Ce=[],je=0;return de(A,Ce,"","",function(at){return Q.call(be,at,je++)}),Ce}function me(A){if(A._status===-1){var Q=A._result;Q=Q(),Q.then(function(be){(A._status===0||A._status===-1)&&(A._status=1,A._result=be)},function(be){(A._status===0||A._status===-1)&&(A._status=2,A._result=be)}),A._status===-1&&(A._status=0,A._result=Q)}if(A._status===1)return Q=A._result,Q===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
Your code should look like:
const MyComponent = lazy(() => import('./MyComponent'))
Did you accidentally put curly braces around the import?`,Q),"default"in Q||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
Your code should look like:
const MyComponent = lazy(() => import('./MyComponent'))`,Q),Q.default;throw A._result}function le(){var A=De.H;return A===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),A}function _e(){}function he(A){if(vt===null)try{var Q=("require"+Math.random()).slice(0,7);vt=(s&&s[Q]).call(s,"timers").setImmediate}catch{vt=function(Ce){Ua===!1&&(Ua=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var je=new MessageChannel;je.port1.onmessage=Ce,je.port2.postMessage(void 0)}}return vt(A)}function ge(A){return 1<A.length&&typeof AggregateError=="function"?new AggregateError(A):A[0]}function Ae(A,Q){Q!==ar-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ar=Q}function ne(A,Q,be){var Ce=De.actQueue;if(Ce!==null)if(Ce.length!==0)try{Se(Ce),he(function(){return ne(A,Q,be)});return}catch(je){De.thrownErrors.push(je)}else De.actQueue=null;0<De.thrownErrors.length?(Ce=ge(De.thrownErrors),De.thrownErrors.length=0,be(Ce)):Q(A)}function Se(A){if(!Vn){Vn=!0;var Q=0;try{for(;Q<A.length;Q++){var be=A[Q];do{De.didUsePromise=!1;var Ce=be(!1);if(Ce!==null){if(De.didUsePromise){A[Q]=be,A.splice(0,Q);return}be=Ce}else break}while(1)}A.length=0}catch(je){A.splice(0,Q+1),De.thrownErrors.push(je)}finally{Vn=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var pe=Symbol.for("react.transitional.element"),Ue=Symbol.for("react.portal"),se=Symbol.for("react.fragment"),Oe=Symbol.for("react.strict_mode"),we=Symbol.for("react.profiler"),qe=Symbol.for("react.consumer"),We=Symbol.for("react.context"),Ze=Symbol.for("react.forward_ref"),He=Symbol.for("react.suspense"),Fe=Symbol.for("react.suspense_list"),dt=Symbol.for("react.memo"),Ht=Symbol.for("react.lazy"),Si=Symbol.for("react.activity"),ye=Symbol.iterator,xe={},Pe={isMounted:function(){return!1},enqueueForceUpdate:function(A){o(A,"forceUpdate")},enqueueReplaceState:function(A){o(A,"replaceState")},enqueueSetState:function(A){o(A,"setState")}},Xe=Object.assign,$e={};Object.freeze($e),l.prototype.isReactComponent={},l.prototype.setState=function(A,Q){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,Q,"setState")},l.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};var ze={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Tt;for(Tt in ze)ze.hasOwnProperty(Tt)&&i(Tt,ze[Tt]);c.prototype=l.prototype,ze=f.prototype=new c,ze.constructor=f,Xe(ze,l.prototype),ze.isPureReactComponent=!0;var Je=Array.isArray,Oi=Symbol.for("react.client.reference"),De={H:null,A:null,T:null,S:null,V:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Ot=Object.prototype.hasOwnProperty,At=console.createTask?console.createTask:function(){return null};ze={"react-stack-bottom-frame":function(A){return A()}};var li,Ut,gi={},Zt=ze["react-stack-bottom-frame"].bind(ze,k)(),xt=At(x(k)),ui=!1,ks=/\/+/g,An=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},Ua=!1,vt=null,ar=0,tn=!1,Vn=!1,or=typeof queueMicrotask=="function"?function(A){queueMicrotask(function(){return queueMicrotask(A)})}:he;ze=Object.freeze({__proto__:null,c:function(A){return le().useMemoCache(A)}}),e.Children={map:fe,forEach:function(A,Q,be){fe(A,function(){Q.apply(this,arguments)},be)},count:function(A){var Q=0;return fe(A,function(){Q++}),Q},toArray:function(A){return fe(A,function(Q){return Q})||[]},only:function(A){if(!$(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},e.Component=l,e.Fragment=se,e.Profiler=we,e.PureComponent=f,e.StrictMode=Oe,e.Suspense=He,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=De,e.__COMPILER_RUNTIME=ze,e.act=function(A){var Q=De.actQueue,be=ar;ar++;var Ce=De.actQueue=Q!==null?Q:[],je=!1;try{var at=A()}catch(tt){De.thrownErrors.push(tt)}if(0<De.thrownErrors.length)throw Ae(Q,be),A=ge(De.thrownErrors),De.thrownErrors.length=0,A;if(at!==null&&typeof at=="object"&&typeof at.then=="function"){var et=at;return or(function(){je||tn||(tn=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(tt,ci){je=!0,et.then(function(Os){if(Ae(Q,be),be===0){try{Se(Ce),he(function(){return ne(Os,tt,ci)})}catch(Ud){De.thrownErrors.push(Ud)}if(0<De.thrownErrors.length){var zd=ge(De.thrownErrors);De.thrownErrors.length=0,ci(zd)}}else tt(Os)},function(Os){Ae(Q,be),0<De.thrownErrors.length&&(Os=ge(De.thrownErrors),De.thrownErrors.length=0),ci(Os)})}}}var gt=at;if(Ae(Q,be),be===0&&(Se(Ce),Ce.length!==0&&or(function(){je||tn||(tn=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),De.actQueue=null),0<De.thrownErrors.length)throw A=ge(De.thrownErrors),De.thrownErrors.length=0,A;return{then:function(tt,ci){je=!0,be===0?(De.actQueue=Ce,he(function(){return ne(gt,tt,ci)})):tt(gt)}}},e.cache=function(A){return function(){return A.apply(null,arguments)}},e.captureOwnerStack=function(){var A=De.getCurrentStack;return A===null?null:A()},e.cloneElement=function(A,Q,be){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var Ce=Xe({},A.props),je=A.key,at=A._owner;if(Q!=null){var et;e:{if(Ot.call(Q,"ref")&&(et=Object.getOwnPropertyDescriptor(Q,"ref").get)&&et.isReactWarning){et=!1;break e}et=Q.ref!==void 0}et&&(at=D()),I(Q)&&(v(Q.key),je=""+Q.key);for(gt in Q)!Ot.call(Q,gt)||gt==="key"||gt==="__self"||gt==="__source"||gt==="ref"&&Q.ref===void 0||(Ce[gt]=Q[gt])}var gt=arguments.length-2;if(gt===1)Ce.children=be;else if(1<gt){et=Array(gt);for(var tt=0;tt<gt;tt++)et[tt]=arguments[tt+2];Ce.children=et}for(Ce=U(A.type,je,void 0,void 0,at,Ce,A._debugStack,A._debugTask),je=2;je<arguments.length;je++)at=arguments[je],$(at)&&at._store&&(at._store.validated=1);return Ce},e.createContext=function(A){return A={$$typeof:We,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:qe,_context:A},A._currentRenderer=null,A._currentRenderer2=null,A},e.createElement=function(A,Q,be){for(var Ce=2;Ce<arguments.length;Ce++){var je=arguments[Ce];$(je)&&je._store&&(je._store.validated=1)}if(Ce={},je=null,Q!=null)for(tt in Ut||!("__self"in Q)||"key"in Q||(Ut=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),I(Q)&&(v(Q.key),je=""+Q.key),Q)Ot.call(Q,tt)&&tt!=="key"&&tt!=="__self"&&tt!=="__source"&&(Ce[tt]=Q[tt]);var at=arguments.length-2;if(at===1)Ce.children=be;else if(1<at){for(var et=Array(at),gt=0;gt<at;gt++)et[gt]=arguments[gt+2];Object.freeze&&Object.freeze(et),Ce.children=et}if(A&&A.defaultProps)for(tt in at=A.defaultProps,at)Ce[tt]===void 0&&(Ce[tt]=at[tt]);je&&C(Ce,typeof A=="function"?A.displayName||A.name||"Unknown":A);var tt=1e4>De.recentlyCreatedOwnerStacks++;return U(A,je,void 0,void 0,D(),Ce,tt?Error("react-stack-top-frame"):Zt,tt?At(x(A)):xt)},e.createRef=function(){var A={current:null};return Object.seal(A),A},e.forwardRef=function(A){A!=null&&A.$$typeof===dt?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof A!="function"?console.error("forwardRef requires a render function but was given %s.",A===null?"null":typeof A):A.length!==0&&A.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",A.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),A!=null&&A.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var Q={$$typeof:Ze,render:A},be;return Object.defineProperty(Q,"displayName",{enumerable:!1,configurable:!0,get:function(){return be},set:function(Ce){be=Ce,A.name||A.displayName||(Object.defineProperty(A,"name",{value:Ce}),A.displayName=Ce)}}),Q},e.isValidElement=$,e.lazy=function(A){return{$$typeof:Ht,_payload:{_status:-1,_result:A},_init:me}},e.memo=function(A,Q){A==null&&console.error("memo: The first argument must be a component. Instead received: %s",A===null?"null":typeof A),Q={$$typeof:dt,type:A,compare:Q===void 0?null:Q};var be;return Object.defineProperty(Q,"displayName",{enumerable:!1,configurable:!0,get:function(){return be},set:function(Ce){be=Ce,A.name||A.displayName||(Object.defineProperty(A,"name",{value:Ce}),A.displayName=Ce)}}),Q},e.startTransition=function(A){var Q=De.T,be={};De.T=be,be._updatedFibers=new Set;try{var Ce=A(),je=De.S;je!==null&&je(be,Ce),typeof Ce=="object"&&Ce!==null&&typeof Ce.then=="function"&&Ce.then(_e,An)}catch(at){An(at)}finally{Q===null&&be._updatedFibers&&(A=be._updatedFibers.size,be._updatedFibers.clear(),10<A&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),De.T=Q}},e.unstable_useCacheRefresh=function(){return le().useCacheRefresh()},e.use=function(A){return le().use(A)},e.useActionState=function(A,Q,be){return le().useActionState(A,Q,be)},e.useCallback=function(A,Q){return le().useCallback(A,Q)},e.useContext=function(A){var Q=le();return A.$$typeof===qe&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),Q.useContext(A)},e.useDebugValue=function(A,Q){return le().useDebugValue(A,Q)},e.useDeferredValue=function(A,Q){return le().useDeferredValue(A,Q)},e.useEffect=function(A,Q,be){A==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var Ce=le();if(typeof be=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Ce.useEffect(A,Q)},e.useId=function(){return le().useId()},e.useImperativeHandle=function(A,Q,be){return le().useImperativeHandle(A,Q,be)},e.useInsertionEffect=function(A,Q){return A==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),le().useInsertionEffect(A,Q)},e.useLayoutEffect=function(A,Q){return A==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),le().useLayoutEffect(A,Q)},e.useMemo=function(A,Q){return le().useMemo(A,Q)},e.useOptimistic=function(A,Q){return le().useOptimistic(A,Q)},e.useReducer=function(A,Q,be){return le().useReducer(A,Q,be)},e.useRef=function(A){return le().useRef(A)},e.useState=function(A){return le().useState(A)},e.useSyncExternalStore=function(A,Q,be){return le().useSyncExternalStore(A,Q,be)},e.useTransition=function(){return le().useTransition()},e.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Wc,Wc.exports)),Wc.exports}Ab.exports=IA();var _i=Ab.exports;/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Nb;function LA(){return Nb||(Nb=1,function(){function s(se){if(se==null)return null;if(typeof se=="function")return se.$$typeof===me?null:se.displayName||se.name||null;if(typeof se=="string")return se;switch(se){case C:return"Fragment";case U:return"Profiler";case P:return"StrictMode";case W:return"Suspense";case oe:return"SuspenseList";case fe:return"Activity"}if(typeof se=="object")switch(typeof se.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),se.$$typeof){case I:return"Portal";case $:return(se.displayName||"Context")+".Provider";case Y:return(se._context.displayName||"Context")+".Consumer";case G:var Oe=se.render;return se=se.displayName,se||(se=Oe.displayName||Oe.name||"",se=se!==""?"ForwardRef("+se+")":"ForwardRef"),se;case K:return Oe=se.displayName||null,Oe!==null?Oe:s(se.type)||"Memo";case de:Oe=se._payload,se=se._init;try{return s(se(Oe))}catch{}}return null}function e(se){return""+se}function i(se){try{e(se);var Oe=!1}catch{Oe=!0}if(Oe){Oe=console;var we=Oe.error,qe=typeof Symbol=="function"&&Symbol.toStringTag&&se[Symbol.toStringTag]||se.constructor.name||"Object";return we.call(Oe,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",qe),e(se)}}function r(se){if(se===C)return"<>";if(typeof se=="object"&&se!==null&&se.$$typeof===de)return"<...>";try{var Oe=s(se);return Oe?"<"+Oe+">":"<...>"}catch{return"<...>"}}function o(){var se=le.A;return se===null?null:se.getOwner()}function l(){return Error("react-stack-top-frame")}function c(se){if(_e.call(se,"key")){var Oe=Object.getOwnPropertyDescriptor(se,"key").get;if(Oe&&Oe.isReactWarning)return!1}return se.key!==void 0}function f(se,Oe){function we(){Ae||(Ae=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Oe))}we.isReactWarning=!0,Object.defineProperty(se,"key",{get:we,configurable:!0})}function p(){var se=s(this.type);return ne[se]||(ne[se]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),se=this.props.ref,se!==void 0?se:null}function v(se,Oe,we,qe,We,Ze,He,Fe){return we=Ze.ref,se={$$typeof:k,type:se,key:Oe,props:Ze,_owner:We},(we!==void 0?we:null)!==null?Object.defineProperty(se,"ref",{enumerable:!1,get:p}):Object.defineProperty(se,"ref",{enumerable:!1,value:null}),se._store={},Object.defineProperty(se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(se,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(se,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:He}),Object.defineProperty(se,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Fe}),Object.freeze&&(Object.freeze(se.props),Object.freeze(se)),se}function S(se,Oe,we,qe,We,Ze,He,Fe){var dt=Oe.children;if(dt!==void 0)if(qe)if(he(dt)){for(qe=0;qe<dt.length;qe++)x(dt[qe]);Object.freeze&&Object.freeze(dt)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(dt);if(_e.call(Oe,"key")){dt=s(se);var Ht=Object.keys(Oe).filter(function(ye){return ye!=="key"});qe=0<Ht.length?"{key: someKey, "+Ht.join(": ..., ")+": ...}":"{key: someKey}",Ue[dt+qe]||(Ht=0<Ht.length?"{"+Ht.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,qe,dt,Ht,dt),Ue[dt+qe]=!0)}if(dt=null,we!==void 0&&(i(we),dt=""+we),c(Oe)&&(i(Oe.key),dt=""+Oe.key),"key"in Oe){we={};for(var Si in Oe)Si!=="key"&&(we[Si]=Oe[Si])}else we=Oe;return dt&&f(we,typeof se=="function"?se.displayName||se.name||"Unknown":se),v(se,dt,Ze,We,o(),we,He,Fe)}function x(se){typeof se=="object"&&se!==null&&se.$$typeof===k&&se._store&&(se._store.validated=1)}var D=_i,k=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),$=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),de=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),me=Symbol.for("react.client.reference"),le=D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_e=Object.prototype.hasOwnProperty,he=Array.isArray,ge=console.createTask?console.createTask:function(){return null};D={"react-stack-bottom-frame":function(se){return se()}};var Ae,ne={},Se=D["react-stack-bottom-frame"].bind(D,l)(),pe=ge(r(l)),Ue={};Xc.Fragment=C,Xc.jsx=function(se,Oe,we,qe,We){var Ze=1e4>le.recentlyCreatedOwnerStacks++;return S(se,Oe,we,!1,qe,We,Ze?Error("react-stack-top-frame"):Se,Ze?ge(r(se)):pe)},Xc.jsxs=function(se,Oe,we,qe,We){var Ze=1e4>le.recentlyCreatedOwnerStacks++;return S(se,Oe,we,!0,qe,We,Ze?Error("react-stack-top-frame"):Se,Ze?ge(r(se)):pe)}}()),Xc}Cb.exports=LA();var Bl=Cb.exports,kb={exports:{}},Rg={exports:{}},jg={};/**
* @license React
* scheduler.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ob;function RA(){return Ob||(Ob=1,function(s){(function(){function e(){if(W=!1,fe){var ne=s.unstable_now();_e=ne;var Se=!0;try{e:{$=!1,G&&(G=!1,K(me),me=-1),Y=!0;var pe=U;try{t:{for(c(ne),P=r(k);P!==null&&!(P.expirationTime>ne&&p());){var Ue=P.callback;if(typeof Ue=="function"){P.callback=null,U=P.priorityLevel;var se=Ue(P.expirationTime<=ne);if(ne=s.unstable_now(),typeof se=="function"){P.callback=se,c(ne),Se=!0;break t}P===r(k)&&o(k),c(ne)}else o(k);P=r(k)}if(P!==null)Se=!0;else{var Oe=r(I);Oe!==null&&v(f,Oe.startTime-ne),Se=!1}}break e}finally{P=null,U=pe,Y=!1}Se=void 0}}finally{Se?he():fe=!1}}}function i(ne,Se){var pe=ne.length;ne.push(Se);e:for(;0<pe;){var Ue=pe-1>>>1,se=ne[Ue];if(0<l(se,Se))ne[Ue]=Se,ne[pe]=se,pe=Ue;else break e}}function r(ne){return ne.length===0?null:ne[0]}function o(ne){if(ne.length===0)return null;var Se=ne[0],pe=ne.pop();if(pe!==Se){ne[0]=pe;e:for(var Ue=0,se=ne.length,Oe=se>>>1;Ue<Oe;){var we=2*(Ue+1)-1,qe=ne[we],We=we+1,Ze=ne[We];if(0>l(qe,pe))We<se&&0>l(Ze,qe)?(ne[Ue]=Ze,ne[We]=pe,Ue=We):(ne[Ue]=qe,ne[we]=pe,Ue=we);else if(We<se&&0>l(Ze,pe))ne[Ue]=Ze,ne[We]=pe,Ue=We;else break e}}return Se}function l(ne,Se){var pe=ne.sortIndex-Se.sortIndex;return pe!==0?pe:ne.id-Se.id}function c(ne){for(var Se=r(I);Se!==null;){if(Se.callback===null)o(I);else if(Se.startTime<=ne)o(I),Se.sortIndex=Se.expirationTime,i(k,Se);else break;Se=r(I)}}function f(ne){if(G=!1,c(ne),!$)if(r(k)!==null)$=!0,fe||(fe=!0,he());else{var Se=r(I);Se!==null&&v(f,Se.startTime-ne)}}function p(){return W?!0:!(s.unstable_now()-_e<le)}function v(ne,Se){me=oe(function(){ne(s.unstable_now())},Se)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var S=performance;s.unstable_now=function(){return S.now()}}else{var x=Date,D=x.now();s.unstable_now=function(){return x.now()-D}}var k=[],I=[],C=1,P=null,U=3,Y=!1,$=!1,G=!1,W=!1,oe=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,de=typeof setImmediate<"u"?setImmediate:null,fe=!1,me=-1,le=5,_e=-1;if(typeof de=="function")var he=function(){de(e)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,Ae=ge.port2;ge.port1.onmessage=e,he=function(){Ae.postMessage(null)}}else he=function(){oe(e,0)};s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(ne){ne.callback=null},s.unstable_forceFrameRate=function(ne){0>ne||125<ne?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<ne?Math.floor(1e3/ne):5},s.unstable_getCurrentPriorityLevel=function(){return U},s.unstable_next=function(ne){switch(U){case 1:case 2:case 3:var Se=3;break;default:Se=U}var pe=U;U=Se;try{return ne()}finally{U=pe}},s.unstable_requestPaint=function(){W=!0},s.unstable_runWithPriority=function(ne,Se){switch(ne){case 1:case 2:case 3:case 4:case 5:break;default:ne=3}var pe=U;U=ne;try{return Se()}finally{U=pe}},s.unstable_scheduleCallback=function(ne,Se,pe){var Ue=s.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?Ue+pe:Ue):pe=Ue,ne){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=pe+se,ne={id:C++,callback:Se,priorityLevel:ne,startTime:pe,expirationTime:se,sortIndex:-1},pe>Ue?(ne.sortIndex=pe,i(I,ne),r(k)===null&&ne===r(I)&&(G?(K(me),me=-1):G=!0,v(f,pe-Ue))):(ne.sortIndex=se,i(k,ne),$||Y||($=!0,fe||(fe=!0,he()))),ne},s.unstable_shouldYield=p,s.unstable_wrapCallback=function(ne){var Se=U;return function(){var pe=U;U=Se;try{return ne.apply(this,arguments)}finally{U=pe}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(jg)),jg}var Ib;function jA(){return Ib||(Ib=1,Rg.exports=RA()),Rg.exports}var zg={exports:{}},Wi={};/**
* @license React
* react-dom.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Lb;function zA(){return Lb||(Lb=1,function(){function s(){}function e(x){return""+x}function i(x,D,k){var I=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{e(I);var C=!1}catch{C=!0}return C&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&I[Symbol.toStringTag]||I.constructor.name||"Object"),e(I)),{$$typeof:v,key:I==null?null:""+I,children:x,containerInfo:D,implementation:k}}function r(x,D){if(x==="font")return"";if(typeof D=="string")return D==="use-credentials"?D:""}function o(x){return x===null?"`null`":x===void 0?"`undefined`":x===""?"an empty string":'something with type "'+typeof x+'"'}function l(x){return x===null?"`null`":x===void 0?"`undefined`":x===""?"an empty string":typeof x=="string"?JSON.stringify(x):typeof x=="number"?"`"+x+"`":'something with type "'+typeof x+'"'}function c(){var x=S.H;return x===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),x}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var f=_i,p={d:{f:s,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},v=Symbol.for("react.portal"),S=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Wi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=p,Wi.createPortal=function(x,D){var k=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!D||D.nodeType!==1&&D.nodeType!==9&&D.nodeType!==11)throw Error("Target container is not a DOM element.");return i(x,D,null,k)},Wi.flushSync=function(x){var D=S.T,k=p.p;try{if(S.T=null,p.p=2,x)return x()}finally{S.T=D,p.p=k,p.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},Wi.preconnect=function(x,D){typeof x=="string"&&x?D!=null&&typeof D!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",l(D)):D!=null&&typeof D.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",o(D.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(x)),typeof x=="string"&&(D?(D=D.crossOrigin,D=typeof D=="string"?D==="use-credentials"?D:"":void 0):D=null,p.d.C(x,D))},Wi.prefetchDNS=function(x){if(typeof x!="string"||!x)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(x));else if(1<arguments.length){var D=arguments[1];typeof D=="object"&&D.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",l(D)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",l(D))}typeof x=="string"&&p.d.D(x)},Wi.preinit=function(x,D){if(typeof x=="string"&&x?D==null||typeof D!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",l(D)):D.as!=="style"&&D.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',l(D.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(x)),typeof x=="string"&&D&&typeof D.as=="string"){var k=D.as,I=r(k,D.crossOrigin),C=typeof D.integrity=="string"?D.integrity:void 0,P=typeof D.fetchPriority=="string"?D.fetchPriority:void 0;k==="style"?p.d.S(x,typeof D.precedence=="string"?D.precedence:void 0,{crossOrigin:I,integrity:C,fetchPriority:P}):k==="script"&&p.d.X(x,{crossOrigin:I,integrity:C,fetchPriority:P,nonce:typeof D.nonce=="string"?D.nonce:void 0})}},Wi.preinitModule=function(x,D){var k="";if(typeof x=="string"&&x||(k+=" The `href` argument encountered was "+o(x)+"."),D!==void 0&&typeof D!="object"?k+=" The `options` argument encountered was "+o(D)+".":D&&"as"in D&&D.as!=="script"&&(k+=" The `as` option encountered was "+l(D.as)+"."),k)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",k);else switch(k=D&&typeof D.as=="string"?D.as:"script",k){case"script":break;default:k=l(k),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',k,x)}typeof x=="string"&&(typeof D=="object"&&D!==null?(D.as==null||D.as==="script")&&(k=r(D.as,D.crossOrigin),p.d.M(x,{crossOrigin:k,integrity:typeof D.integrity=="string"?D.integrity:void 0,nonce:typeof D.nonce=="string"?D.nonce:void 0})):D==null&&p.d.M(x))},Wi.preload=function(x,D){var k="";if(typeof x=="string"&&x||(k+=" The `href` argument encountered was "+o(x)+"."),D==null||typeof D!="object"?k+=" The `options` argument encountered was "+o(D)+".":typeof D.as=="string"&&D.as||(k+=" The `as` option encountered was "+o(D.as)+"."),k&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',k),typeof x=="string"&&typeof D=="object"&&D!==null&&typeof D.as=="string"){k=D.as;var I=r(k,D.crossOrigin);p.d.L(x,k,{crossOrigin:I,integrity:typeof D.integrity=="string"?D.integrity:void 0,nonce:typeof D.nonce=="string"?D.nonce:void 0,type:typeof D.type=="string"?D.type:void 0,fetchPriority:typeof D.fetchPriority=="string"?D.fetchPriority:void 0,referrerPolicy:typeof D.referrerPolicy=="string"?D.referrerPolicy:void 0,imageSrcSet:typeof D.imageSrcSet=="string"?D.imageSrcSet:void 0,imageSizes:typeof D.imageSizes=="string"?D.imageSizes:void 0,media:typeof D.media=="string"?D.media:void 0})}},Wi.preloadModule=function(x,D){var k="";typeof x=="string"&&x||(k+=" The `href` argument encountered was "+o(x)+"."),D!==void 0&&typeof D!="object"?k+=" The `options` argument encountered was "+o(D)+".":D&&"as"in D&&typeof D.as!="string"&&(k+=" The `as` option encountered was "+o(D.as)+"."),k&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',k),typeof x=="string"&&(D?(k=r(D.as,D.crossOrigin),p.d.m(x,{as:typeof D.as=="string"&&D.as!=="script"?D.as:void 0,crossOrigin:k,integrity:typeof D.integrity=="string"?D.integrity:void 0})):p.d.m(x))},Wi.requestFormReset=function(x){p.d.r(x)},Wi.unstable_batchedUpdates=function(x,D){return x(D)},Wi.useFormState=function(x,D,k){return c().useFormState(x,D,k)},Wi.useFormStatus=function(){return c().useHostTransitionStatus()},Wi.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Wi}var Rb;function UA(){return Rb||(Rb=1,zg.exports=zA()),zg.exports}var Kc={};/**
* @license React
* react-dom-client.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var jb;function PA(){return jb||(jb=1,function(){function s(t,n){for(t=t.memoizedState;t!==null&&0<n;)t=t.next,n--;return t}function e(t,n,a,u){if(a>=n.length)return u;var d=n[a],m=Yi(t)?t.slice():ut({},t);return m[d]=e(t[d],n,a+1,u),m}function i(t,n,a){if(n.length!==a.length)console.warn("copyWithRename() expects paths of the same length");else{for(var u=0;u<a.length-1;u++)if(n[u]!==a[u]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return r(t,n,a,0)}}function r(t,n,a,u){var d=n[u],m=Yi(t)?t.slice():ut({},t);return u+1===n.length?(m[a[u]]=m[d],Yi(m)?m.splice(d,1):delete m[d]):m[d]=r(t[d],n,a,u+1),m}function o(t,n,a){var u=n[a],d=Yi(t)?t.slice():ut({},t);return a+1===n.length?(Yi(d)?d.splice(u,1):delete d[u],d):(d[u]=o(t[u],n,a+1),d)}function l(){return!1}function c(){return null}function f(){}function p(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function v(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function S(){}function x(t){var n=[];return t.forEach(function(a){n.push(a)}),n.sort().join(", ")}function D(t,n,a,u){return new Jy(t,n,a,u)}function k(t,n){t.context===ho&&(ZT(t.current,2,n,t,null,null),sc())}function I(t,n){if(ys!==null){var a=n.staleFamilies;n=n.updatedFamilies,Lh(),Gd(t.current,n,a),sc()}}function C(t){ys=t}function P(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function U(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,n.flags&4098&&(a=n.return),t=n.return;while(t)}return n.tag===3?a:null}function Y(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function $(t){if(U(t)!==t)throw Error("Unable to find node on an unmounted component.")}function G(t){var n=t.alternate;if(!n){if(n=U(t),n===null)throw Error("Unable to find node on an unmounted component.");return n!==t?null:t}for(var a=t,u=n;;){var d=a.return;if(d===null)break;var m=d.alternate;if(m===null){if(u=d.return,u!==null){a=u;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===a)return $(d),t;if(m===u)return $(d),n;m=m.sibling}throw Error("Unable to find node on an unmounted component.")}if(a.return!==u.return)a=d,u=m;else{for(var _=!1,M=d.child;M;){if(M===a){_=!0,a=d,u=m;break}if(M===u){_=!0,u=d,a=m;break}M=M.sibling}if(!_){for(M=m.child;M;){if(M===a){_=!0,a=m,u=d;break}if(M===u){_=!0,u=m,a=d;break}M=M.sibling}if(!_)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(a.alternate!==u)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(a.tag!==3)throw Error("Unable to find node on an unmounted component.");return a.stateNode.current===a?t:n}function W(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=W(t),n!==null)return n;t=t.sibling}return null}function oe(t){return t===null||typeof t!="object"?null:(t=tD&&t[tD]||t["@@iterator"],typeof t=="function"?t:null)}function K(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===l5?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case dc:return"Fragment";case rv:return"Profiler";case qm:return"StrictMode";case ov:return"Suspense";case lv:return"SuspenseList";case uv:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case cc:return"Portal";case Cr:return(t.displayName||"Context")+".Provider";case av:return(t._context.displayName||"Context")+".Consumer";case Hh:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Fm:return n=t.displayName||null,n!==null?n:K(t.type)||"Memo";case Jn:n=t._payload,t=t._init;try{return K(t(n))}catch{}}return null}function de(t){return typeof t.tag=="number"?fe(t):typeof t.name=="string"?t.name:null}function fe(t){var n=t.type;switch(t.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(n._context.displayName||"Context")+".Consumer";case 10:return(n.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=n.render,t=t.displayName||t.name||"",n.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return K(n);case 8:return n===qm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break;case 29:if(n=t._debugInfo,n!=null){for(var a=n.length-1;0<=a;a--)if(typeof n[a].name=="string")return n[a].name}if(t.return!==null)return fe(t.return)}return null}function me(t){return{current:t}}function le(t,n){0>ha?console.error("Unexpected pop."):(n!==dv[ha]&&console.error("Unexpected Fiber popped."),t.current=cv[ha],cv[ha]=null,dv[ha]=null,ha--)}function _e(t,n,a){ha++,cv[ha]=t.current,dv[ha]=a,t.current=n}function he(t){return t===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),t}function ge(t,n){_e(oo,n,t),_e(Vh,t,t),_e(ao,null,t);var a=n.nodeType;switch(a){case 9:case 11:a=a===9?"#document":"#fragment",n=(n=n.documentElement)&&(n=n.namespaceURI)?wM(n):Ea;break;default:if(a=n.tagName,n=n.namespaceURI)n=wM(n),n=NM(n,a);else switch(a){case"svg":n=Yc;break;case"math":n=Ag;break;default:n=Ea}}a=a.toLowerCase(),a=Nn(null,a),a={context:n,ancestorInfo:a},le(ao,t),_e(ao,a,t)}function Ae(t){le(ao,t),le(Vh,t),le(oo,t)}function ne(){return he(ao.current)}function Se(t){t.memoizedState!==null&&_e(Hm,t,t);var n=he(ao.current),a=t.type,u=NM(n.context,a);a=Nn(n.ancestorInfo,a),u={context:u,ancestorInfo:a},n!==u&&(_e(Vh,t,t),_e(ao,u,t))}function pe(t){Vh.current===t&&(le(ao,t),le(Vh,t)),Hm.current===t&&(le(Hm,t),wf._currentValue=Pl)}function Ue(t){return typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}function se(t){try{return Oe(t),!1}catch{return!0}}function Oe(t){return""+t}function we(t,n){if(se(t))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",n,Ue(t)),Oe(t)}function qe(t,n){if(se(t))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",n,Ue(t)),Oe(t)}function We(t){if(se(t))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",Ue(t)),Oe(t)}function Ze(t){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled)return!0;if(!n.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{fc=n.inject(t),sn=n}catch(a){console.error("React instrumentation encountered an error: %s.",a)}return!!n.checkDCE}function He(t){if(typeof m5=="function"&&g5(t),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(fc,t)}catch(n){wr||(wr=!0,console.error("React instrumentation encountered an error: %s",n))}}function Fe(t){Ne=t}function dt(){Ne!==null&&typeof Ne.markCommitStopped=="function"&&Ne.markCommitStopped()}function Ht(t){Ne!==null&&typeof Ne.markComponentRenderStarted=="function"&&Ne.markComponentRenderStarted(t)}function Si(){Ne!==null&&typeof Ne.markComponentRenderStopped=="function"&&Ne.markComponentRenderStopped()}function ye(t){Ne!==null&&typeof Ne.markRenderStarted=="function"&&Ne.markRenderStarted(t)}function xe(){Ne!==null&&typeof Ne.markRenderStopped=="function"&&Ne.markRenderStopped()}function Pe(t,n){Ne!==null&&typeof Ne.markStateUpdateScheduled=="function"&&Ne.markStateUpdateScheduled(t,n)}function Xe(t){return t>>>=0,t===0?32:31-(y5(t)/T5|0)|0}function $e(t){if(t&1)return"SyncHydrationLane";if(t&2)return"Sync";if(t&4)return"InputContinuousHydration";if(t&8)return"InputContinuous";if(t&16)return"DefaultHydration";if(t&32)return"Default";if(t&128)return"TransitionHydration";if(t&4194048)return"Transition";if(t&62914560)return"Retry";if(t&67108864)return"SelectiveHydration";if(t&134217728)return"IdleHydration";if(t&268435456)return"Idle";if(t&536870912)return"Offscreen";if(t&1073741824)return"Deferred"}function ze(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),t}}function Tt(t,n,a){var u=t.pendingLanes;if(u===0)return 0;var d=0,m=t.suspendedLanes,_=t.pingedLanes;t=t.warmLanes;var M=u&134217727;return M!==0?(u=M&~m,u!==0?d=ze(u):(_&=M,_!==0?d=ze(_):a||(a=M&~t,a!==0&&(d=ze(a))))):(M=u&~m,M!==0?d=ze(M):_!==0?d=ze(_):a||(a=u&~t,a!==0&&(d=ze(a)))),d===0?0:n!==0&&n!==d&&!(n&m)&&(m=d&-d,a=n&-n,m>=a||m===32&&(a&4194048)!==0)?n:d}function Je(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Oi(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function De(){var t=Vm;return Vm<<=1,!(Vm&4194048)&&(Vm=256),t}function Ot(){var t=$m;return $m<<=1,!($m&62914560)&&($m=4194304),t}function At(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function li(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ut(t,n,a,u,d,m){var _=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var M=t.entanglements,N=t.expirationTimes,L=t.hiddenUpdates;for(a=_&~a;0<a;){var Z=31-pn(a),ie=1<<Z;M[Z]=0,N[Z]=-1;var X=L[Z];if(X!==null)for(L[Z]=null,Z=0;Z<X.length;Z++){var re=X[Z];re!==null&&(re.lane&=-536870913)}a&=~ie}u!==0&&gi(t,u,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(_&~n))}function gi(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var u=31-pn(n);t.entangledLanes|=n,t.entanglements[u]=t.entanglements[u]|1073741824|a&4194090}function Zt(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var u=31-pn(a),d=1<<u;d&n|t[u]&n&&(t[u]|=n),a&=~d}}function xt(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ui(t,n,a){if(Fs)for(t=t.pendingUpdatersLaneMap;0<a;){var u=31-pn(a),d=1<<u;t[u].add(n),a&=~d}}function ks(t,n){if(Fs)for(var a=t.pendingUpdatersLaneMap,u=t.memoizedUpdaters;0<n;){var d=31-pn(n);t=1<<d,d=a[d],0<d.size&&(d.forEach(function(m){var _=m.alternate;_!==null&&u.has(_)||u.add(m)}),d.clear()),n&=~t}}function An(t){return t&=-t,ms<t?Nr<t?t&134217727?pa:Ym:Nr:ms}function Ua(){var t=Et.p;return t!==0?t:(t=window.event,t===void 0?pa:XM(t.type))}function vt(t,n){var a=Et.p;try{return Et.p=t,n()}finally{Et.p=a}}function ar(t){delete t[rn],delete t[Ln],delete t[gv],delete t[v5],delete t[b5]}function tn(t){var n=t[rn];if(n)return n;for(var a=t.parentNode;a;){if(n=a[uo]||a[rn]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=jM(t);t!==null;){if(a=t[rn])return a;t=jM(t)}return n}t=a,a=t.parentNode}return null}function Vn(t){if(t=t[rn]||t[uo]){var n=t.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return t}return null}function or(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function A(t){var n=t[iD];return n||(n=t[iD]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Q(t){t[$h]=!0}function be(t,n){Ce(t,n),Ce(t+"Capture",n)}function Ce(t,n){bl[t]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",t),bl[t]=n;var a=t.toLowerCase();for(yv[a]=t,t==="onDoubleClick"&&(yv.ondblclick=t),t=0;t<n.length;t++)nD.add(n[t])}function je(t,n){_5[n.type]||n.onChange||n.onInput||n.readOnly||n.disabled||n.value==null||console.error(t==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),n.onChange||n.readOnly||n.disabled||n.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function at(t){return fa.call(rD,t)?!0:fa.call(sD,t)?!1:S5.test(t)?rD[t]=!0:(sD[t]=!0,console.error("Invalid attribute name: `%s`",t),!1)}function et(t,n,a){if(at(n)){if(!t.hasAttribute(n)){switch(typeof a){case"symbol":case"object":return a;case"function":return a;case"boolean":if(a===!1)return a}return a===void 0?void 0:null}return t=t.getAttribute(n),t===""&&a===!0?!0:(we(a,n),t===""+a?a:t)}}function gt(t,n,a){if(at(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(n);return}}we(a,n),t.setAttribute(n,""+a)}}function tt(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}we(a,n),t.setAttribute(n,""+a)}}function ci(t,n,a,u){if(u===null)t.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}we(u,a),t.setAttributeNS(n,a,""+u)}}function Os(){}function zd(){if(Yh===0){aD=console.log,oD=console.info,lD=console.warn,uD=console.error,cD=console.group,dD=console.groupCollapsed,hD=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Os,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}Yh++}function Ud(){if(Yh--,Yh===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ut({},t,{value:aD}),info:ut({},t,{value:oD}),warn:ut({},t,{value:lD}),error:ut({},t,{value:uD}),group:ut({},t,{value:cD}),groupCollapsed:ut({},t,{value:dD}),groupEnd:ut({},t,{value:hD})})}0>Yh&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function wn(t){if(Tv===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Tv=n&&n[1]||"",fD=-1<a.stack.indexOf(`
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Tv+t+fD}function Pd(t,n){if(!t||vv)return"";var a=bv.get(t);if(a!==void 0)return a;vv=!0,a=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var u=null;u=te.H,te.H=null,zd();try{var d={DetermineComponentFrameRoot:function(){try{if(n){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(Ie){var re=Ie}Reflect.construct(t,[],X)}else{try{X.call()}catch(Ie){re=Ie}t.call(X.prototype)}}else{try{throw Error()}catch(Ie){re=Ie}(X=t())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(Ie){if(Ie&&re&&typeof Ie.stack=="string")return[Ie.stack,re.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=d.DetermineComponentFrameRoot(),M=_[0],N=_[1];if(M&&N){var L=M.split(`
`),Z=N.split(`
`);for(_=m=0;m<L.length&&!L[m].includes("DetermineComponentFrameRoot");)m++;for(;_<Z.length&&!Z[_].includes("DetermineComponentFrameRoot");)_++;if(m===L.length||_===Z.length)for(m=L.length-1,_=Z.length-1;1<=m&&0<=_&&L[m]!==Z[_];)_--;for(;1<=m&&0<=_;m--,_--)if(L[m]!==Z[_]){if(m!==1||_!==1)do if(m--,_--,0>_||L[m]!==Z[_]){var ie=`
`+L[m].replace(" at new "," at ");return t.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",t.displayName)),typeof t=="function"&&bv.set(t,ie),ie}while(1<=m&&0<=_);break}}}finally{vv=!1,te.H=u,Ud(),Error.prepareStackTrace=a}return L=(L=t?t.displayName||t.name:"")?wn(L):"",typeof t=="function"&&bv.set(t,L),L}function Bd(t){var n=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,t=t.stack,Error.prepareStackTrace=n,t.startsWith(`Error: react-stack-top-frame
`)&&(t=t.slice(29)),n=t.indexOf(`
`),n!==-1&&(t=t.slice(n+1)),n=t.indexOf("react-stack-bottom-frame"),n!==-1&&(n=t.lastIndexOf(`
`,n)),n!==-1)t=t.slice(0,n);else return"";return t}function qd(t){switch(t.tag){case 26:case 27:case 5:return wn(t.type);case 16:return wn("Lazy");case 13:return wn("Suspense");case 19:return wn("SuspenseList");case 0:case 15:return Pd(t.type,!1);case 11:return Pd(t.type.render,!1);case 1:return Pd(t.type,!0);case 31:return wn("Activity");default:return""}}function Bo(t){try{var n="";do{n+=qd(t);var a=t._debugInfo;if(a)for(var u=a.length-1;0<=u;u--){var d=a[u];if(typeof d.name=="string"){var m=n,_=d.env,M=wn(d.name+(_?" ["+_+"]":""));n=m+M}}t=t.return}while(t);return n}catch(N){return`
Error generating stack: `+N.message+`
`+N.stack}}function Pi(t){return(t=t?t.displayName||t.name:"")?wn(t):""}function Cu(){if(es===null)return null;var t=es._debugOwner;return t!=null?de(t):null}function qy(){if(es===null)return"";var t=es;try{var n="";switch(t.tag===6&&(t=t.return),t.tag){case 26:case 27:case 5:n+=wn(t.type);break;case 13:n+=wn("Suspense");break;case 19:n+=wn("SuspenseList");break;case 31:n+=wn("Activity");break;case 30:case 0:case 15:case 1:t._debugOwner||n!==""||(n+=Pi(t.type));break;case 11:t._debugOwner||n!==""||(n+=Pi(t.type.render))}for(;t;)if(typeof t.tag=="number"){var a=t;t=a._debugOwner;var u=a._debugStack;t&&u&&(typeof u!="string"&&(a._debugStack=u=Bd(u)),u!==""&&(n+=`
`+u))}else if(t.debugStack!=null){var d=t.debugStack;(t=t.owner)&&d&&(n+=`
`+Bd(d))}else break;var m=n}catch(_){m=`
Error generating stack: `+_.message+`
`+_.stack}return m}function Re(t,n,a,u,d,m,_){var M=es;$n(t);try{return t!==null&&t._debugTask?t._debugTask.run(n.bind(null,a,u,d,m,_)):n(a,u,d,m,_)}finally{$n(M)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function $n(t){te.getCurrentStack=t===null?null:qy,kr=!1,es=t}function Bi(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return We(t),t;default:return""}}function wt(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Fy(t){var n=wt(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);We(t[n]);var u=""+t[n];if(!t.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,m=a.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(_){We(_),u=""+_,m.call(this,_)}}),Object.defineProperty(t,n,{enumerable:a.enumerable}),{getValue:function(){return u},setValue:function(_){We(_),u=""+_},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Yr(t){t._valueTracker||(t._valueTracker=Fy(t))}function qo(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return t&&(u=wt(t)?t.checked?"true":"false":t.value),t=u,t!==a?(n.setValue(t),!0):!1}function Au(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function yi(t){return t.replace(x5,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Pt(t,n){n.checked===void 0||n.defaultChecked===void 0||mD||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Cu()||"A component",n.type),mD=!0),n.value===void 0||n.defaultValue===void 0||pD||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Cu()||"A component",n.type),pD=!0)}function wu(t,n,a,u,d,m,_,M){t.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?(we(_,"type"),t.type=_):t.removeAttribute("type"),n!=null?_==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Bi(n)):t.value!==""+Bi(n)&&(t.value=""+Bi(n)):_!=="submit"&&_!=="reset"||t.removeAttribute("value"),n!=null?Fd(t,_,Bi(n)):a!=null?Fd(t,_,Bi(a)):u!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?(we(M,"name"),t.name=""+Bi(M)):t.removeAttribute("name")}function Fo(t,n,a,u,d,m,_,M){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(we(m,"type"),t.type=m),n!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||n!=null))return;a=a!=null?""+Bi(a):"",n=n!=null?""+Bi(n):a,M||n===t.value||(t.value=n),t.defaultValue=n}u=u??d,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=M?t.checked:!!u,t.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(we(_,"name"),t.name=_)}function Fd(t,n,a){n==="number"&&Au(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Bp(t,n){n.value==null&&(typeof n.children=="object"&&n.children!==null?sv.Children.forEach(n.children,function(a){a==null||typeof a=="string"||typeof a=="number"||typeof a=="bigint"||yD||(yD=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):n.dangerouslySetInnerHTML==null||TD||(TD=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||gD||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),gD=!0)}function qp(){var t=Cu();return t?`
Check the render method of \``+t+"`.":""}function Qr(t,n,a,u){if(t=t.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=n.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&u&&(t[a].defaultSelected=!0)}else{for(a=""+Bi(a),n=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,u&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function Nu(t,n){for(t=0;t<bD.length;t++){var a=bD[t];if(n[a]!=null){var u=Yi(n[a]);n.multiple&&!u?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",a,qp()):!n.multiple&&u&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",a,qp())}}n.value===void 0||n.defaultValue===void 0||vD||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),vD=!0)}function ku(t,n){n.value===void 0||n.defaultValue===void 0||_D||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",Cu()||"A component"),_D=!0),n.children!=null&&n.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function Hd(t,n,a){if(n!=null&&(n=""+Bi(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Bi(a):""}function Fp(t,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Yi(u)){if(1<u.length)throw Error("<textarea> can only have at most one child.");u=u[0]}a=u}a==null&&(a=""),n=a}a=Bi(n),t.defaultValue=a,u=t.textContent,u===a&&u!==""&&u!==null&&(t.value=u)}function Hp(t,n){return t.serverProps===void 0&&t.serverTail.length===0&&t.children.length===1&&3<t.distanceFromLeaf&&t.distanceFromLeaf>15-n?Hp(t.children[0],n):t}function Ii(t){return" "+" ".repeat(t)}function Is(t){return"+ "+" ".repeat(t)}function lr(t){return"- "+" ".repeat(t)}function Pa(t){switch(t.tag){case 26:case 27:case 5:return t.type;case 16:return"Lazy";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return t=t.type,t.displayName||t.name||null;case 11:return t=t.type.render,t.displayName||t.name||null;case 1:return t=t.type,t.displayName||t.name||null;default:return null}}function Ls(t,n){return SD.test(t)?(t=JSON.stringify(t),t.length>n-2?8>n?'{"..."}':"{"+t.slice(0,n-7)+'..."}':"{"+t+"}"):t.length>n?5>n?'{"..."}':t.slice(0,n-3)+"...":t}function ur(t,n,a){var u=120-2*a;if(n===null)return Is(a)+Ls(t,u)+`
`;if(typeof n=="string"){for(var d=0;d<n.length&&d<t.length&&n.charCodeAt(d)===t.charCodeAt(d);d++);return d>u-8&&10<d&&(t="..."+t.slice(d-8),n="..."+n.slice(d-8)),Is(a)+Ls(t,u)+`
`+lr(a)+Ls(n,u)+`
`}return Ii(a)+Ls(t,u)+`
`}function Gr(t){return Object.prototype.toString.call(t).replace(/^\[object (.*)\]$/,function(n,a){return a})}function Ho(t,n){switch(typeof t){case"string":return t=JSON.stringify(t),t.length>n?5>n?'"..."':t.slice(0,n-4)+'..."':t;case"object":if(t===null)return"null";if(Yi(t))return"[...]";if(t.$$typeof===ro)return(n=K(t.type))?"<"+n+">":"<...>";var a=Gr(t);if(a==="Object"){a="",n-=2;for(var u in t)if(t.hasOwnProperty(u)){var d=JSON.stringify(u);if(d!=='"'+u+'"'&&(u=d),n-=u.length-2,d=Ho(t[u],15>n?n:15),n-=d.length,0>n){a+=a===""?"...":", ...";break}a+=(a===""?"":",")+u+":"+d}return"{"+a+"}"}return a;case"function":return(n=t.displayName||t.name)?"function "+n:"function";default:return String(t)}}function Xr(t,n){return typeof t!="string"||SD.test(t)?"{"+Ho(t,n-2)+"}":t.length>n-2?5>n?'"..."':'"'+t.slice(0,n-5)+'..."':'"'+t+'"'}function Vd(t,n,a){var u=120-a.length-t.length,d=[],m;for(m in n)if(n.hasOwnProperty(m)&&m!=="children"){var _=Xr(n[m],120-a.length-m.length-1);u-=m.length+_.length+2,d.push(m+"="+_)}return d.length===0?a+"<"+t+`>
`:0<u?a+"<"+t+" "+d.join(" ")+`>
`:a+"<"+t+`
`+a+" "+d.join(`
`+a+" ")+`
`+a+`>
`}function Hy(t,n,a){var u="",d=ut({},n),m;for(m in t)if(t.hasOwnProperty(m)){delete d[m];var _=120-2*a-m.length-2,M=Ho(t[m],_);n.hasOwnProperty(m)?(_=Ho(n[m],_),u+=Is(a)+m+": "+M+`
`,u+=lr(a)+m+": "+_+`
`):u+=Is(a)+m+": "+M+`
`}for(var N in d)d.hasOwnProperty(N)&&(t=Ho(d[N],120-2*a-N.length-2),u+=lr(a)+N+": "+t+`
`);return u}function cr(t,n,a,u){var d="",m=new Map;for(L in a)a.hasOwnProperty(L)&&m.set(L.toLowerCase(),L);if(m.size===1&&m.has("children"))d+=Vd(t,n,Ii(u));else{for(var _ in n)if(n.hasOwnProperty(_)&&_!=="children"){var M=120-2*(u+1)-_.length-1,N=m.get(_.toLowerCase());if(N!==void 0){m.delete(_.toLowerCase());var L=n[_];N=a[N];var Z=Xr(L,M);M=Xr(N,M),typeof L=="object"&&L!==null&&typeof N=="object"&&N!==null&&Gr(L)==="Object"&&Gr(N)==="Object"&&(2<Object.keys(L).length||2<Object.keys(N).length||-1<Z.indexOf("...")||-1<M.indexOf("..."))?d+=Ii(u+1)+_+`={{
`+Hy(L,N,u+2)+Ii(u+1)+`}}
`:(d+=Is(u+1)+_+"="+Z+`
`,d+=lr(u+1)+_+"="+M+`
`)}else d+=Ii(u+1)+_+"="+Xr(n[_],M)+`
`}m.forEach(function(ie){if(ie!=="children"){var X=120-2*(u+1)-ie.length-1;d+=lr(u+1)+ie+"="+Xr(a[ie],X)+`
`}}),d=d===""?Ii(u)+"<"+t+`>
`:Ii(u)+"<"+t+`
`+d+Ii(u)+`>
`}return t=a.children,n=n.children,typeof t=="string"||typeof t=="number"||typeof t=="bigint"?(m="",(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(m=""+n),d+=ur(m,""+t,u+1)):(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(d=t==null?d+ur(""+n,null,u+1):d+ur(""+n,void 0,u+1)),d}function Vo(t,n){var a=Pa(t);if(a===null){for(a="",t=t.child;t;)a+=Vo(t,n),t=t.sibling;return a}return Ii(n)+"<"+a+`>
`}function $d(t,n){var a=Hp(t,n);if(a!==t&&(t.children.length!==1||t.children[0]!==a))return Ii(n)+`...
`+$d(a,n+1);a="";var u=t.fiber._debugInfo;if(u)for(var d=0;d<u.length;d++){var m=u[d].name;typeof m=="string"&&(a+=Ii(n)+"<"+m+`>
`,n++)}if(u="",d=t.fiber.pendingProps,t.fiber.tag===6)u=ur(d,t.serverProps,n),n++;else if(m=Pa(t.fiber),m!==null)if(t.serverProps===void 0){u=n;var _=120-2*u-m.length-2,M="";for(L in d)if(d.hasOwnProperty(L)&&L!=="children"){var N=Xr(d[L],15);if(_-=L.length+N.length+2,0>_){M+=" ...";break}M+=" "+L+"="+N}u=Ii(u)+"<"+m+M+`>
`,n++}else t.serverProps===null?(u=Vd(m,d,Is(n)),n++):typeof t.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(u=cr(m,d,t.serverProps,n),n++);var L="";for(d=t.fiber.child,m=0;d&&m<t.children.length;)_=t.children[m],_.fiber===d?(L+=$d(_,n),m++):L+=Vo(d,n),d=d.sibling;for(d&&0<t.children.length&&(L+=Ii(n)+`...
`),d=t.serverTail,t.serverProps===null&&n--,t=0;t<d.length;t++)m=d[t],L=typeof m=="string"?L+(lr(n)+Ls(m,120-2*n)+`
`):L+Vd(m.type,m.props,lr(n));return a+u+L}function $o(t){try{return`
`+$d(t,0)}catch{return""}}function Ou(t,n,a){for(var u=n,d=null,m=0;u;)u===t&&(m=0),d={fiber:u,children:d!==null?[d]:[],serverProps:u===n?a:u===t?null:void 0,serverTail:[],distanceFromLeaf:m},m++,u=u.return;return d!==null?$o(d).replaceAll(/^[+-]/gm,">"):""}function Nn(t,n){var a=ut({},t||ED),u={tag:n};return xD.indexOf(n)!==-1&&(a.aTagInScope=null,a.buttonTagInScope=null,a.nobrTagInScope=null),M5.indexOf(n)!==-1&&(a.pTagInButtonScope=null),E5.indexOf(n)!==-1&&n!=="address"&&n!=="div"&&n!=="p"&&(a.listItemTagAutoclosing=null,a.dlItemTagAutoclosing=null),a.current=u,n==="form"&&(a.formTag=u),n==="a"&&(a.aTagInScope=u),n==="button"&&(a.buttonTagInScope=u),n==="nobr"&&(a.nobrTagInScope=u),n==="p"&&(a.pTagInButtonScope=u),n==="li"&&(a.listItemTagAutoclosing=u),(n==="dd"||n==="dt")&&(a.dlItemTagAutoclosing=u),n==="#document"||n==="html"?a.containerTagInScope=null:a.containerTagInScope||(a.containerTagInScope=u),t!==null||n!=="#document"&&n!=="html"&&n!=="body"?a.implicitRootScope===!0&&(a.implicitRootScope=!1):a.implicitRootScope=!0,a}function Vp(t,n,a){switch(n){case"select":return t==="hr"||t==="option"||t==="optgroup"||t==="script"||t==="template"||t==="#text";case"optgroup":return t==="option"||t==="#text";case"option":return t==="#text";case"tr":return t==="th"||t==="td"||t==="style"||t==="script"||t==="template";case"tbody":case"thead":case"tfoot":return t==="tr"||t==="style"||t==="script"||t==="template";case"colgroup":return t==="col"||t==="template";case"table":return t==="caption"||t==="colgroup"||t==="tbody"||t==="tfoot"||t==="thead"||t==="style"||t==="script"||t==="template";case"head":return t==="base"||t==="basefont"||t==="bgsound"||t==="link"||t==="meta"||t==="title"||t==="noscript"||t==="noframes"||t==="style"||t==="script"||t==="template";case"html":if(a)break;return t==="head"||t==="body"||t==="frameset";case"frameset":return t==="frame";case"#document":if(!a)return t==="html"}switch(t){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n!=="h1"&&n!=="h2"&&n!=="h3"&&n!=="h4"&&n!=="h5"&&n!=="h6";case"rp":case"rt":return D5.indexOf(n)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return n==null;case"head":return a||n===null;case"html":return a&&n==="#document"||n===null;case"body":return a&&(n==="#document"||n==="html")||n===null}return!0}function Iu(t,n){switch(t){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n.pTagInButtonScope;case"form":return n.formTag||n.pTagInButtonScope;case"li":return n.listItemTagAutoclosing;case"dd":case"dt":return n.dlItemTagAutoclosing;case"button":return n.buttonTagInScope;case"a":return n.aTagInScope;case"nobr":return n.nobrTagInScope}return null}function Ba(t,n){for(;t;){switch(t.tag){case 5:case 26:case 27:if(t.type===n)return t}t=t.return}return null}function qa(t,n){n=n||ED;var a=n.current;if(n=(a=Vp(t,a&&a.tag,n.implicitRootScope)?null:a)?null:Iu(t,n),n=a||n,!n)return!0;var u=n.tag;if(n=String(!!a)+"|"+t+"|"+u,Qm[n])return!1;Qm[n]=!0;var d=(n=es)?Ba(n.return,u):null,m=n!==null&&d!==null?Ou(d,n,null):"",_="<"+t+">";return a?(a="",u==="table"&&t==="tr"&&(a+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
This will cause a hydration error.%s`,_,u,a,m)):console.error(`In HTML, %s cannot be a descendant of <%s>.
This will cause a hydration error.%s`,_,u,m),n&&(t=n.return,d===null||t===null||d===t&&t._debugOwner===n._debugOwner||Re(d,function(){console.error(`<%s> cannot contain a nested %s.
See this log for the ancestor stack trace.`,u,_)})),!1}function Rs(t,n,a){if(a||Vp("#text",n,!1))return!0;if(a="#text|"+n,Qm[a])return!1;Qm[a]=!0;var u=(a=es)?Ba(a,n):null;return a=a!==null&&u!==null?Ou(u,a,a.tag!==6?{children:null}:null):"",/\S/.test(t)?console.error(`In HTML, text nodes cannot be a child of <%s>.
This will cause a hydration error.%s`,n,a):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
This will cause a hydration error.%s`,n,a),!1}function Wr(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}function $p(t){return t.replace(w5,function(n,a){return a.toUpperCase()})}function Lu(t,n,a){var u=n.indexOf("--")===0;u||(-1<n.indexOf("-")?pc.hasOwnProperty(n)&&pc[n]||(pc[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,$p(n.replace(A5,"ms-")))):C5.test(n)?pc.hasOwnProperty(n)&&pc[n]||(pc[n]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1))):!CD.test(a)||Sv.hasOwnProperty(a)&&Sv[a]||(Sv[a]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,a.replace(CD,""))),typeof a=="number"&&(isNaN(a)?AD||(AD=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(a)||wD||(wD=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",n)))),a==null||typeof a=="boolean"||a===""?u?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":u?t.setProperty(n,a):typeof a!="number"||a===0||ND.has(n)?n==="float"?t.cssFloat=a:(qe(a,n),t[n]=(""+a).trim()):t[n]=a+"px"}function Yp(t,n,a){if(n!=null&&typeof n!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(n&&Object.freeze(n),t=t.style,a!=null){if(n){var u={};if(a){for(var d in a)if(a.hasOwnProperty(d)&&!n.hasOwnProperty(d))for(var m=_v[d]||[d],_=0;_<m.length;_++)u[m[_]]=d}for(var M in n)if(n.hasOwnProperty(M)&&(!a||a[M]!==n[M]))for(d=_v[M]||[M],m=0;m<d.length;m++)u[d[m]]=M;M={};for(var N in n)for(d=_v[N]||[N],m=0;m<d.length;m++)M[d[m]]=N;N={};for(var L in u)if(d=u[L],(m=M[L])&&d!==m&&(_=d+","+m,!N[_])){N[_]=!0,_=console;var Z=n[d];_.error.call(_,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",Z==null||typeof Z=="boolean"||Z===""?"Removing":"Updating",d,m)}}for(var ie in a)!a.hasOwnProperty(ie)||n!=null&&n.hasOwnProperty(ie)||(ie.indexOf("--")===0?t.setProperty(ie,""):ie==="float"?t.cssFloat="":t[ie]="");for(var X in n)L=n[X],n.hasOwnProperty(X)&&a[X]!==L&&Lu(t,X,L)}else for(u in n)n.hasOwnProperty(u)&&Lu(t,u,n[u])}function Yo(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Qp(t){return N5.get(t)||t}function Ru(t,n){if(fa.call(gc,n)&&gc[n])return!0;if(O5.test(n)){if(t="aria-"+n.slice(4).toLowerCase(),t=kD.hasOwnProperty(t)?t:null,t==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),gc[n]=!0;if(n!==t)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,t),gc[n]=!0}if(k5.test(n)){if(t=n.toLowerCase(),t=kD.hasOwnProperty(t)?t:null,t==null)return gc[n]=!0,!1;n!==t&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,t),gc[n]=!0)}return!0}function Gp(t,n){var a=[],u;for(u in n)Ru(t,u)||a.push(u);n=a.map(function(d){return"`"+d+"`"}).join(", "),a.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,t):1<a.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,t)}function Vy(t,n,a,u){if(fa.call(mn,n)&&mn[n])return!0;var d=n.toLowerCase();if(d==="onfocusin"||d==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),mn[n]=!0;if(typeof a=="function"&&(t==="form"&&n==="action"||t==="input"&&n==="formAction"||t==="button"&&n==="formAction"))return!0;if(u!=null){if(t=u.possibleRegistrationNames,u.registrationNameDependencies.hasOwnProperty(n))return!0;if(u=t.hasOwnProperty(d)?t[d]:null,u!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",n,u),mn[n]=!0;if(ID.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),mn[n]=!0}else if(ID.test(n))return I5.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),mn[n]=!0;if(L5.test(n)||R5.test(n))return!0;if(d==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),mn[n]=!0;if(d==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),mn[n]=!0;if(d==="is"&&a!==null&&a!==void 0&&typeof a!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof a),mn[n]=!0;if(typeof a=="number"&&isNaN(a))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",n),mn[n]=!0;if(Xm.hasOwnProperty(d)){if(d=Xm[d],d!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,d),mn[n]=!0}else if(n!==d)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",n,d),mn[n]=!0;switch(n){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof a){case"boolean":switch(n){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return d=n.toLowerCase().slice(0,5),d==="data-"||d==="aria-"?!0:(a?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',a,n,n,a,n):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',a,n,n,a,n,n,n),mn[n]=!0)}case"function":case"symbol":return mn[n]=!0,!1;case"string":if(a==="false"||a==="true"){switch(n){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",a,n,a==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',n,a),mn[n]=!0}}return!0}function Xp(t,n,a){var u=[],d;for(d in n)Vy(t,d,n[d],a)||u.push(d);n=u.map(function(m){return"`"+m+"`"}).join(", "),u.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,t):1<u.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,t)}function Qo(t){return j5.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ju(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}function Wp(t){var n=Vn(t);if(n&&(t=n.stateNode)){var a=t[Ln]||null;e:switch(t=n.stateNode,n.type){case"input":if(wu(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(we(n,"name"),a=a.querySelectorAll('input[name="'+yi(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var u=a[n];if(u!==t&&u.form===t.form){var d=u[Ln]||null;if(!d)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");wu(u,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)u=a[n],u.form===t.form&&qo(u)}break e;case"textarea":Hd(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Qr(t,!!a.multiple,n,!1)}}}function Go(t,n,a){if(xv)return t(n,a);xv=!0;try{var u=t(n);return u}finally{if(xv=!1,(yc!==null||Tc!==null)&&(sc(),yc&&(n=yc,t=Tc,Tc=yc=null,Wp(n),t)))for(n=0;n<t.length;n++)Wp(t[n])}}function js(t,n){var a=t.stateNode;if(a===null)return null;var u=a[Ln]||null;if(u===null)return null;a=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof a+"` type.");return a}function Yd(){if(Wm)return Wm;var t,n=Mv,a=n.length,u,d="value"in co?co.value:co.textContent,m=d.length;for(t=0;t<a&&n[t]===d[t];t++);var _=a-t;for(u=1;u<=_&&n[a-u]===d[m-u];u++);return Wm=d.slice(t,1<u?1-u:void 0)}function zu(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function Uu(){return!0}function Qd(){return!1}function qi(t){function n(a,u,d,m,_){this._reactName=a,this._targetInst=d,this.type=u,this.nativeEvent=m,this.target=_,this.currentTarget=null;for(var M in t)t.hasOwnProperty(M)&&(a=t[M],this[M]=a?a(m):m[M]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Uu:Qd,this.isPropagationStopped=Qd,this}return ut(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Uu)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Uu)},persist:function(){},isPersistent:Uu}),n}function $y(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=X5[t])?!!n[t]:!1}function Pu(){return $y}function Kp(t,n){switch(t){case"keyup":return oR.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==zD;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}function Yy(t,n){switch(t){case"compositionend":return Zp(n);case"keypress":return n.which!==PD?null:(qD=!0,BD);case"textInput":return t=n.data,t===BD&&qD?null:t;default:return null}}function Qy(t,n){if(vc)return t==="compositionend"||!wv&&Kp(t,n)?(t=Yd(),Wm=Mv=co=null,vc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return UD&&n.locale!=="ko"?null:n.data;default:return null}}function Jp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!uR[t.type]:n==="textarea"}function Gy(t){if(!Or)return!1;t="on"+t;var n=t in document;return n||(n=document.createElement("div"),n.setAttribute(t,"return;"),n=typeof n[t]=="function"),n}function Bu(t,n,a,u){yc?Tc?Tc.push(u):Tc=[u]:yc=u,n=km(n,"onChange"),0<n.length&&(a=new Km("onChange","change",null,a,u),t.push({event:a,listeners:n}))}function Xy(t){vM(t,0)}function Xo(t){var n=or(t);if(qo(n))return t}function Wo(t,n){if(t==="change")return n}function em(){Zh&&(Zh.detachEvent("onpropertychange",tm),Jh=Zh=null)}function tm(t){if(t.propertyName==="value"&&Xo(Jh)){var n=[];Bu(n,Jh,t,ju(t)),Go(Xy,n)}}function Wy(t,n,a){t==="focusin"?(em(),Zh=n,Jh=a,Zh.attachEvent("onpropertychange",tm)):t==="focusout"&&em()}function Ky(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Xo(Jh)}function Zy(t,n){if(t==="click")return Xo(n)}function qu(t,n){if(t==="input"||t==="change")return Xo(n)}function Ko(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}function zs(t,n){if(gn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),u=Object.keys(n);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var d=a[u];if(!fa.call(n,d)||!gn(t[d],n[d]))return!1}return!0}function Zo(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function kn(t,n){var a=Zo(t);t=0;for(var u;a;){if(a.nodeType===3){if(u=t+a.textContent.length,t<=n&&u>=n)return{node:a,offset:n-t};t=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zo(a)}}function us(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?us(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Jo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Au(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=Au(t.document)}return n}function Fu(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}function im(t,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;kv||bc==null||bc!==Au(u)||(u=bc,"selectionStart"in u&&Fu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ef&&zs(ef,u)||(ef=u,u=km(Nv,"onSelect"),0<u.length&&(n=new Km("onSelect","select",null,n,a),t.push({event:n,listeners:u}),n.target=bc)))}function Kr(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}function Zr(t){if(Ov[t])return Ov[t];if(!_c[t])return t;var n=_c[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in HD)return Ov[t]=n[a];return t}function Yn(t,n){GD.set(t,n),be(n,[t])}function Fi(t,n){if(typeof t=="object"&&t!==null){var a=Lv.get(t);return a!==void 0?a:(n={value:t,source:n,stack:Bo(n)},Lv.set(t,n),n)}return{value:t,source:n,stack:Bo(n)}}function Fa(){for(var t=Sc,n=Rv=Sc=0;n<t;){var a=gs[n];gs[n++]=null;var u=gs[n];gs[n++]=null;var d=gs[n];gs[n++]=null;var m=gs[n];if(gs[n++]=null,u!==null&&d!==null){var _=u.pending;_===null?d.next=d:(d.next=_.next,_.next=d),u.pending=d}m!==0&&fr(a,d,m)}}function dr(t,n,a,u){gs[Sc++]=t,gs[Sc++]=n,gs[Sc++]=a,gs[Sc++]=u,Rv|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function hr(t,n,a,u){return dr(t,n,a,u),Hu(t)}function xi(t,n){return dr(t,null,null,n),Hu(t)}function fr(t,n,a){t.lanes|=a;var u=t.alternate;u!==null&&(u.lanes|=a);for(var d=!1,m=t.return;m!==null;)m.childLanes|=a,u=m.alternate,u!==null&&(u.childLanes|=a),m.tag===22&&(t=m.stateNode,t===null||t._visibility&Jm||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&n!==null&&(d=31-pn(a),t=m.hiddenUpdates,u=t[d],u===null?t[d]=[n]:u.push(n),n.lane=a|536870912),m):null}function Hu(t){if(xf>OR)throw Ll=xf=0,Ef=db=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Ll>IR&&(Ll=0,Ef=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),t.alternate===null&&t.flags&4098&&hM(t);for(var n=t,a=n.return;a!==null;)n.alternate===null&&n.flags&4098&&hM(t),n=a,a=n.return;return n.tag===3?n.stateNode:null}function pr(t){if(ys===null)return t;var n=ys(t);return n===void 0?t:n.current}function Vu(t){if(ys===null)return t;var n=ys(t);return n===void 0?t!=null&&typeof t.render=="function"&&(n=pr(t.render),t.render!==n)?(n={$$typeof:Hh,render:n},t.displayName!==void 0&&(n.displayName=t.displayName),n):t:n.current}function $u(t,n){if(ys===null)return!1;var a=t.elementType;n=n.type;var u=!1,d=typeof n=="object"&&n!==null?n.$$typeof:null;switch(t.tag){case 1:typeof n=="function"&&(u=!0);break;case 0:(typeof n=="function"||d===Jn)&&(u=!0);break;case 11:(d===Hh||d===Jn)&&(u=!0);break;case 14:case 15:(d===Fm||d===Jn)&&(u=!0);break;default:return!1}return!!(u&&(t=ys(a),t!==void 0&&t===ys(n)))}function nm(t){ys!==null&&typeof WeakSet=="function"&&(xc===null&&(xc=new WeakSet),xc.add(t))}function Gd(t,n,a){var u=t.alternate,d=t.child,m=t.sibling,_=t.tag,M=t.type,N=null;switch(_){case 0:case 15:case 1:N=M;break;case 11:N=M.render}if(ys===null)throw Error("Expected resolveFamily to be set during hot reload.");var L=!1;M=!1,N!==null&&(N=ys(N),N!==void 0&&(a.has(N)?M=!0:n.has(N)&&(_===1?M=!0:L=!0))),xc!==null&&(xc.has(t)||u!==null&&xc.has(u))&&(M=!0),M&&(t._debugNeedsRemount=!0),(M||L)&&(u=xi(t,2),u!==null&&hi(u,t,2)),d===null||M||Gd(d,n,a),m!==null&&Gd(m,n,a)}function Jy(t,n,a,u){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,WD||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function Ha(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Us(t,n){var a=t.alternate;switch(a===null?(a=D(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a._debugOwner=t._debugOwner,a._debugStack=t._debugStack,a._debugTask=t._debugTask,a._debugHookTypes=t._debugHookTypes,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null,a.actualDuration=-0,a.actualStartTime=-1.1),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a.selfBaseDuration=t.selfBaseDuration,a.treeBaseDuration=t.treeBaseDuration,a._debugInfo=t._debugInfo,a._debugNeedsRemount=t._debugNeedsRemount,a.tag){case 0:case 15:a.type=pr(t.type);break;case 1:a.type=pr(t.type);break;case 11:a.type=Vu(t.type)}return a}function Yu(t,n){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null,t.selfBaseDuration=0,t.treeBaseDuration=0):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},t.selfBaseDuration=a.selfBaseDuration,t.treeBaseDuration=a.treeBaseDuration),t}function Xd(t,n,a,u,d,m){var _=0,M=t;if(typeof t=="function")Ha(t)&&(_=1),M=pr(M);else if(typeof t=="string")_=ne(),_=YL(t,a,_)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case uv:return n=D(31,a,n,d),n.elementType=uv,n.lanes=m,n;case dc:return mr(a.children,d,m,n);case qm:_=8,d|=an,d|=Hs;break;case rv:return t=a,u=d,typeof t.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof t.id),n=D(12,t,n,u|Qi),n.elementType=rv,n.lanes=m,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case ov:return n=D(13,a,n,d),n.elementType=ov,n.lanes=m,n;case lv:return n=D(19,a,n,d),n.elementType=lv,n.lanes=m,n;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case a5:case Cr:_=10;break e;case av:_=9;break e;case Hh:_=11,M=Vu(M);break e;case Fm:_=14;break e;case Jn:_=16,M=null;break e}M="",(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(M+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),t===null?a="null":Yi(t)?a="array":t!==void 0&&t.$$typeof===ro?(a="<"+(K(t.type)||"Unknown")+" />",M=" Did you accidentally export a JSX literal instead of a component?"):a=typeof t,(_=u?de(u):null)&&(M+=`
Check the render method of \``+_+"`."),_=29,a=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(a+"."+M)),M=null}return n=D(_,a,n,d),n.elementType=t,n.type=M,n.lanes=m,n._debugOwner=u,n}function Qu(t,n,a){return n=Xd(t.type,t.key,t.props,t._owner,n,a),n._debugOwner=t._owner,n._debugStack=t._debugStack,n._debugTask=t._debugTask,n}function mr(t,n,a,u){return t=D(7,t,u,n),t.lanes=a,t}function Va(t,n,a){return t=D(6,t,null,n),t.lanes=a,t}function Wd(t,n,a){return n=D(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}function Jr(t,n){Ps(),Ec[Mc++]=tg,Ec[Mc++]=eg,eg=t,tg=n}function sm(t,n,a){Ps(),Ts[vs++]=ga,Ts[vs++]=ya,Ts[vs++]=Sl,Sl=t;var u=ga;t=ya;var d=32-pn(u)-1;u&=~(1<<d),a+=1;var m=32-pn(n)+d;if(30<m){var _=d-d%5;m=(u&(1<<_)-1).toString(32),u>>=_,d-=_,ga=1<<32-pn(n)+d|a<<d|u,ya=m+t}else ga=1<<m|a<<d|u,ya=t}function el(t){Ps(),t.return!==null&&(Jr(t,1),sm(t,1,0))}function Kd(t){for(;t===eg;)eg=Ec[--Mc],Ec[Mc]=null,tg=Ec[--Mc],Ec[Mc]=null;for(;t===Sl;)Sl=Ts[--vs],Ts[vs]=null,ya=Ts[--vs],Ts[vs]=null,ga=Ts[--vs],Ts[vs]=null}function Ps(){yt||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function gr(t,n){if(t.return===null){if(bs===null)bs={fiber:t,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(bs.fiber!==t)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");bs.distanceFromLeaf>n&&(bs.distanceFromLeaf=n)}return bs}var a=gr(t.return,n+1).children;return 0<a.length&&a[a.length-1].fiber===t?(a=a[a.length-1],a.distanceFromLeaf>n&&(a.distanceFromLeaf=n),a):(n={fiber:t,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n},a.push(n),n)}function Zd(t,n){Ta||(t=gr(t,0),t.serverProps=null,n!==null&&(n=IM(n),t.serverTail.push(n)))}function ea(t){var n="",a=bs;throw a!==null&&(bs=null,n=$o(a)),il(Fi(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
- A server/client branch \`if (typeof window !== 'undefined')\`.
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
https://react.dev/link/hydration-mismatch`+n),t)),jv}function rm(t){var n=t.stateNode,a=t.type,u=t.memoizedProps;switch(n[rn]=t,n[Ln]=u,qT(a,u),a){case"dialog":pt("cancel",n),pt("close",n);break;case"iframe":case"object":case"embed":pt("load",n);break;case"video":case"audio":for(a=0;a<Mf.length;a++)pt(Mf[a],n);break;case"source":pt("error",n);break;case"img":case"image":case"link":pt("error",n),pt("load",n);break;case"details":pt("toggle",n);break;case"input":je("input",u),pt("invalid",n),Pt(n,u),Fo(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Yr(n);break;case"option":Bp(n,u);break;case"select":je("select",u),pt("invalid",n),Nu(n,u);break;case"textarea":je("textarea",u),pt("invalid",n),ku(n,u),Fp(n,u.value,u.defaultValue,u.children),Yr(n)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||u.suppressHydrationWarning===!0||xM(n.textContent,a)?(u.popover!=null&&(pt("beforetoggle",n),pt("toggle",n)),u.onScroll!=null&&pt("scroll",n),u.onScrollEnd!=null&&pt("scrollend",n),u.onClick!=null&&(n.onclick=Om),n=!0):n=!1,n||ea(t)}function am(t){for(yn=t.return;yn;)switch(yn.tag){case 5:case 13:Ir=!1;return;case 27:case 3:Ir=!0;return;default:yn=yn.return}}function $a(t){if(t!==yn)return!1;if(!yt)return am(t),yt=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||YT(t.type,t.memoizedProps)),a=!a),a&&si){for(a=si;a;){var u=gr(t,0),d=IM(a);u.serverTail.push(d),a=d.type==="Suspense"?RM(a):ps(a.nextSibling)}ea(t)}if(am(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");si=RM(t)}else n===27?(n=si,so(t.type)?(t=xb,xb=null,si=t):si=n):si=yn?ps(t.stateNode.nextSibling):null;return!0}function tl(){si=yn=null,Ta=yt=!1}function Jd(){var t=xl;return t!==null&&(bn===null?bn=t:bn.push.apply(bn,t),xl=null),t}function il(t){xl===null?xl=[t]:xl.push(t)}function eh(){var t=bs;if(t!==null){bs=null;for(var n=$o(t);0<t.children.length;)t=t.children[0];Re(t.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
- A server/client branch \`if (typeof window !== 'undefined')\`.
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
%s%s`,"https://react.dev/link/hydration-mismatch",n)})}}function di(){Dc=ig=null,Cc=!1}function cs(t,n,a){_e(zv,n._currentValue,t),n._currentValue=a,_e(Uv,n._currentRenderer,t),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==eC&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=eC}function ii(t,n){t._currentValue=zv.current;var a=Uv.current;le(Uv,n),t._currentRenderer=a,le(zv,n)}function ta(t,n,a){for(;t!==null;){var u=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),t===a)break;t=t.return}t!==a&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function th(t,n,a,u){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var _=d.child;m=m.firstContext;e:for(;m!==null;){var M=m;m=d;for(var N=0;N<n.length;N++)if(M.context===n[N]){m.lanes|=a,M=m.alternate,M!==null&&(M.lanes|=a),ta(m.return,a,t),u||(_=null);break e}m=M.next}}else if(d.tag===18){if(_=d.return,_===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");_.lanes|=a,m=_.alternate,m!==null&&(m.lanes|=a),ta(_,a,t),_=null}else _=d.child;if(_!==null)_.return=d;else for(_=d;_!==null;){if(_===t){_=null;break}if(d=_.sibling,d!==null){d.return=_.return,_=d;break}_=_.return}d=_}}function nl(t,n,a,u){t=null;for(var d=n,m=!1;d!==null;){if(!m){if(d.flags&524288)m=!0;else if(d.flags&262144)break}if(d.tag===10){var _=d.alternate;if(_===null)throw Error("Should have a current fiber. This is a bug in React.");if(_=_.memoizedProps,_!==null){var M=d.type;gn(d.pendingProps.value,_.value)||(t!==null?t.push(M):t=[M])}}else if(d===Hm.current){if(_=d.alternate,_===null)throw Error("Should have a current fiber. This is a bug in React.");_.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(wf):t=[wf])}d=d.return}t!==null&&th(n,t,a,u),n.flags|=262144}function Qn(t){for(t=t.firstContext;t!==null;){if(!gn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function yr(t){ig=t,Dc=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Vt(t){return Cc&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),sl(ig,t)}function Gu(t,n){return ig===null&&yr(t),sl(t,n)}function sl(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Dc===null){if(t===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Dc=n,t.dependencies={lanes:0,firstContext:n,_debugThenableState:null},t.flags|=524288}else Dc=Dc.next=n;return a}function ih(){return{controller:new yR,data:new Map,refCount:0}}function ia(t){t.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),t.refCount++}function rl(t){t.refCount--,0>t.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),t.refCount===0&&TR(vR,function(){t.controller.abort()})}function Bs(){var t=El;return El=0,t}function al(t){var n=El;return El=t,n}function ol(t){var n=El;return El+=t,n}function na(t){Rn=Ac(),0>t.actualStartTime&&(t.actualStartTime=Rn)}function Xu(t){if(0<=Rn){var n=Ac()-Rn;t.actualDuration+=n,t.selfBaseDuration=n,Rn=-1}}function ll(t){if(0<=Rn){var n=Ac()-Rn;t.actualDuration+=n,Rn=-1}}function nn(){if(0<=Rn){var t=Ac()-Rn;Rn=-1,El+=t}}function bt(){Rn=Ac()}function qs(t){for(var n=t.child;n;)t.actualDuration+=n.actualDuration,n=n.sibling}function nh(t,n){if(tf===null){var a=tf=[];Pv=0,Ml=zT(),wc={status:"pending",value:void 0,then:function(u){a.push(u)}}}return Pv++,n.then(om,om),n}function om(){if(--Pv===0&&tf!==null){wc!==null&&(wc.status="fulfilled");var t=tf;tf=null,Ml=0,wc=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function eT(t,n){var a=[],u={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){u.status="fulfilled",u.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(u.status="rejected",u.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),u}function sh(){var t=Dl.current;return t!==null?t:Bt.pooledCache}function Wu(t,n){n===null?_e(Dl,Dl.current,t):_e(Dl,n.pool,t)}function rh(){var t=sh();return t===null?null:{parent:Mi._currentValue,pool:t}}function ah(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function oh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ul(){}function lh(t,n,a){te.actQueue!==null&&(te.didUsePromise=!0);var u=t.thenables;switch(a=u[a],a===void 0?u.push(n):a!==n&&(t.didWarnAboutUncachedPromise||(t.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),n.then(ul,ul),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,uh(t),t;default:if(typeof n.status=="string")n.then(ul,ul);else{if(t=Bt,t!==null&&100<t.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");t=n,t.status="pending",t.then(function(d){if(n.status==="pending"){var m=n;m.status="fulfilled",m.value=d}},function(d){if(n.status==="pending"){var m=n;m.status="rejected",m.reason=d}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,uh(t),t}throw cf=n,lg=!0,uf}}function Ku(){if(cf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var t=cf;return cf=null,lg=!1,t}function uh(t){if(t===uf||t===og)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function cl(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ch(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function On(t){return{lane:t,tag:rC,payload:null,callback:null,next:null}}function Tr(t,n,a){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,Fv===u&&!lC){var d=fe(t);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
Please update the following component: %s`,d),lC=!0}return(Mt&vn)!==ts?(d=u.pending,d===null?n.next=n:(n.next=d.next,d.next=n),u.pending=n,n=Hu(t),fr(t,null,a),n):(dr(t,u,n,a),Hu(t))}function Ya(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var u=n.lanes;u&=t.pendingLanes,a|=u,n.lanes=a,Zt(t,a)}}function dl(t,n){var a=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var d=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var _={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?d=m=_:m=m.next=_,a=a.next}while(a!==null);m===null?d=m=n:m=m.next=n}else d=m=n;a={baseState:u.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}function hl(){if(Hv){var t=wc;if(t!==null)throw t}}function fl(t,n,a,u){Hv=!1;var d=t.updateQueue;fo=!1,Fv=d.shared;var m=d.firstBaseUpdate,_=d.lastBaseUpdate,M=d.shared.pending;if(M!==null){d.shared.pending=null;var N=M,L=N.next;N.next=null,_===null?m=L:_.next=L,_=N;var Z=t.alternate;Z!==null&&(Z=Z.updateQueue,M=Z.lastBaseUpdate,M!==_&&(M===null?Z.firstBaseUpdate=L:M.next=L,Z.lastBaseUpdate=N))}if(m!==null){var ie=d.baseState;_=0,Z=L=N=null,M=m;do{var X=M.lane&-536870913,re=X!==M.lane;if(re?(ft&X)===X:(u&X)===X){X!==0&&X===Ml&&(Hv=!0),Z!==null&&(Z=Z.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{X=t;var Ie=M,Ge=n,qt=a;switch(Ie.tag){case aC:if(Ie=Ie.payload,typeof Ie=="function"){Cc=!0;var mt=Ie.call(qt,ie,Ge);if(X.mode&an){He(!0);try{Ie.call(qt,ie,Ge)}finally{He(!1)}}Cc=!1,ie=mt;break e}ie=Ie;break e;case qv:X.flags=X.flags&-65537|128;case rC:if(mt=Ie.payload,typeof mt=="function"){if(Cc=!0,Ie=mt.call(qt,ie,Ge),X.mode&an){He(!0);try{mt.call(qt,ie,Ge)}finally{He(!1)}}Cc=!1}else Ie=mt;if(Ie==null)break e;ie=ut({},ie,Ie);break e;case oC:fo=!0}}X=M.callback,X!==null&&(t.flags|=64,re&&(t.flags|=8192),re=d.callbacks,re===null?d.callbacks=[X]:re.push(X))}else re={lane:X,tag:M.tag,payload:M.payload,callback:M.callback,next:null},Z===null?(L=Z=re,N=ie):Z=Z.next=re,_|=X;if(M=M.next,M===null){if(M=d.shared.pending,M===null)break;re=M,M=re.next,re.next=null,d.lastBaseUpdate=re,d.shared.pending=null}}while(1);Z===null&&(N=ie),d.baseState=N,d.firstBaseUpdate=L,d.lastBaseUpdate=Z,m===null&&(d.shared.lanes=0),yo|=_,t.lanes=_,t.memoizedState=ie}Fv=null}function dh(t,n){if(typeof t!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+t);t.call(n)}function tT(t,n){var a=t.shared.hiddenCallbacks;if(a!==null)for(t.shared.hiddenCallbacks=null,t=0;t<a.length;t++)dh(a[t],n)}function lm(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)dh(a[t],n)}function Zu(t,n){var a=jr;_e(ug,a,t),_e(Nc,n,t),jr=a|n.baseLanes}function hh(t){_e(ug,jr,t),_e(Nc,Nc.current,t)}function fh(t){jr=ug.current,le(Nc,t),le(ug,t)}function lt(){var t=ee;xs===null?xs=[t]:xs.push(t)}function Te(){var t=ee;if(xs!==null&&(ba++,xs[ba]!==t)){var n=fe(Ke);if(!uC.has(n)&&(uC.add(n),xs!==null)){for(var a="",u=0;u<=ba;u++){var d=xs[u],m=u===ba?t:d;for(d=u+1+". "+d;30>d.length;)d+=" ";d+=m+`
`,a+=d}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
Previous render Next render
------------------------------------------------------
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`,n,a)}}}function Qa(t){t==null||Yi(t)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",ee,typeof t)}function Ju(){var t=fe(Ke);dC.has(t)||(dC.add(t),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",t))}function Jt(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function ph(t,n){if(hf)return!1;if(n===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",ee),!1;t.length!==n.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
Previous: %s
Incoming: %s`,ee,"["+n.join(", ")+"]","["+t.join(", ")+"]");for(var a=0;a<n.length&&a<t.length;a++)if(!gn(t[a],n[a]))return!1;return!0}function mh(t,n,a,u,d,m){po=m,Ke=n,xs=t!==null?t._debugHookTypes:null,ba=-1,hf=t!==null&&t.type!==n.type,(Object.prototype.toString.call(a)==="[object AsyncFunction]"||Object.prototype.toString.call(a)==="[object AsyncGeneratorFunction]")&&(m=fe(Ke),Vv.has(m)||(Vv.add(m),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",m===null?"An unknown Component":"<"+m+">"))),n.memoizedState=null,n.updateQueue=null,n.lanes=0,te.H=t!==null&&t.memoizedState!==null?Yv:xs!==null?hC:$v,Al=m=(n.mode&an)!==$t;var _=Qv(a,u,d);if(Al=!1,Oc&&(_=gh(n,a,u,d)),m){He(!0);try{_=gh(n,a,u,d)}finally{He(!1)}}return um(t,n),_}function um(t,n){n._debugHookTypes=xs,n.dependencies===null?va!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:va}):n.dependencies._debugThenableState=va,te.H=hg;var a=zt!==null&&zt.next!==null;if(po=0,xs=ee=vi=zt=Ke=null,ba=-1,t!==null&&(t.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),cg=!1,df=0,va=null,a)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");t===null||ji||(t=t.dependencies,t!==null&&Qn(t)&&(ji=!0)),lg?(lg=!1,t=!0):t=!1,t&&(n=fe(n)||"Unknown",cC.has(n)||Vv.has(n)||(cC.add(n),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function gh(t,n,a,u){Ke=t;var d=0;do{if(Oc&&(va=null),df=0,Oc=!1,d>=_R)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(d+=1,hf=!1,vi=zt=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}ba=-1,te.H=fC,m=Qv(n,a,u)}while(Oc);return m}function vr(){var t=te.H,n=t.useState()[0];return n=typeof n.then=="function"?Ga(n):n,t=t.useState()[0],(zt!==null?zt.memoizedState:null)!==t&&(Ke.flags|=1024),n}function yh(){var t=dg!==0;return dg=0,t}function Th(t,n,a){n.updateQueue=t.updateQueue,n.flags=(n.mode&Hs)!==$t?n.flags&-402655237:n.flags&-2053,t.lanes&=~a}function vh(t){if(cg){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}cg=!1}po=0,xs=vi=zt=Ke=null,ba=-1,ee=null,Oc=!1,df=dg=0,va=null}function hn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vi===null?Ke.memoizedState=vi=t:vi=vi.next=t,vi}function _t(){if(zt===null){var t=Ke.alternate;t=t!==null?t.memoizedState:null}else t=zt.next;var n=vi===null?Ke.memoizedState:vi.next;if(n!==null)vi=n,zt=t;else{if(t===null)throw Ke.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");zt=t,t={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},vi===null?Ke.memoizedState=vi=t:vi=vi.next=t}return vi}function pl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ga(t){var n=df;return df+=1,va===null&&(va=ah()),t=lh(va,t,n),n=Ke,(vi===null?n.memoizedState:vi.next)===null&&(n=n.alternate,te.H=n!==null&&n.memoizedState!==null?Yv:$v),t}function Gn(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ga(t);if(t.$$typeof===Cr)return Vt(t)}throw Error("An unsupported type was passed to use(): "+String(t))}function ds(t){var n=null,a=Ke.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var u=Ke.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=pl(),Ke.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0||hf)for(a=n.data[n.index]=Array(t),u=0;u<t;u++)a[u]=o5;else a.length!==t&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",a.length,t);return n.index++,a}function Xn(t,n){return typeof n=="function"?n(t):n}function bh(t,n,a){var u=hn();if(a!==void 0){var d=a(n);if(Al){He(!0);try{a(n)}finally{He(!1)}}}else d=n;return u.memoizedState=u.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},u.queue=t,t=t.dispatch=eL.bind(null,Ke,t),[u.memoizedState,t]}function Xa(t){var n=_t();return _h(n,zt,t)}function _h(t,n,a){var u=t.queue;if(u===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");u.lastRenderedReducer=a;var d=t.baseQueue,m=u.pending;if(m!==null){if(d!==null){var _=d.next;d.next=m.next,m.next=_}n.baseQueue!==d&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),n.baseQueue=d=m,u.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{n=d.next;var M=_=null,N=null,L=n,Z=!1;do{var ie=L.lane&-536870913;if(ie!==L.lane?(ft&ie)===ie:(po&ie)===ie){var X=L.revertLane;if(X===0)N!==null&&(N=N.next={lane:0,revertLane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),ie===Ml&&(Z=!0);else if((po&X)===X){L=L.next,X===Ml&&(Z=!0);continue}else ie={lane:0,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},N===null?(M=N=ie,_=m):N=N.next=ie,Ke.lanes|=X,yo|=X;ie=L.action,Al&&a(m,ie),m=L.hasEagerState?L.eagerState:a(m,ie)}else X={lane:ie,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},N===null?(M=N=X,_=m):N=N.next=X,Ke.lanes|=ie,yo|=ie;L=L.next}while(L!==null&&L!==n);if(N===null?_=m:N.next=M,!gn(m,t.memoizedState)&&(ji=!0,Z&&(a=wc,a!==null)))throw a;t.memoizedState=m,t.baseState=_,t.baseQueue=N,u.lastRenderedState=m}return d===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function ml(t){var n=_t(),a=n.queue;if(a===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");a.lastRenderedReducer=t;var u=a.dispatch,d=a.pending,m=n.memoizedState;if(d!==null){a.pending=null;var _=d=d.next;do m=t(m,_.action),_=_.next;while(_!==d);gn(m,n.memoizedState)||(ji=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),a.lastRenderedState=m}return[m,u]}function gl(t,n,a){var u=Ke,d=hn();if(yt){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var m=a();kc||m===a()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),kc=!0)}else{if(m=n(),kc||(a=n(),gn(m,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),kc=!0)),Bt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");ft&124||cm(u,n,m)}return d.memoizedState=m,a={value:m,getSnapshot:n},d.queue=a,J(sa.bind(null,u,a,t),[t]),u.flags|=2048,w(Ss|Di,O(),Sh.bind(null,u,a,m,n),null),m}function ec(t,n,a){var u=Ke,d=_t(),m=yt;if(m){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");a=a()}else if(a=n(),!kc){var _=n();gn(a,_)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),kc=!0)}(_=!gn((zt||d).memoizedState,a))&&(d.memoizedState=a,ji=!0),d=d.queue;var M=sa.bind(null,u,d,t);if(H(2048,Di,M,[t]),d.getSnapshot!==n||_||vi!==null&&vi.memoizedState.tag&Ss){if(u.flags|=2048,w(Ss|Di,O(),Sh.bind(null,u,d,a,n),null),Bt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");m||po&124||cm(u,n,a)}return a}function cm(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=Ke.updateQueue,n===null?(n=pl(),Ke.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function Sh(t,n,a,u){n.value=a,n.getSnapshot=u,St(n)&&br(t)}function sa(t,n,a){return a(function(){St(n)&&br(t)})}function St(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!gn(t,a)}catch{return!0}}function br(t){var n=xi(t,2);n!==null&&hi(n,t,2)}function Ei(t){var n=hn();if(typeof t=="function"){var a=t;if(t=a(),Al){He(!0);try{a()}finally{He(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:t},n}function In(t){t=Ei(t);var n=t.queue,a=Zx.bind(null,Ke,n);return n.dispatch=a,[t.memoizedState,a]}function xh(t){var n=hn();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=aT.bind(null,Ke,!0,a),a.dispatch=n,[t,n]}function Eh(t,n){var a=_t();return dm(a,zt,t,n)}function dm(t,n,a,u){return t.baseState=a,_h(t,zt,typeof u=="function"?u:Xn)}function hm(t,n){var a=_t();return zt!==null?dm(a,zt,t,n):(a.baseState=t,[t,a.queue.dispatch])}function iT(t,n,a,u,d){if(gm(t))throw Error("Cannot update form state while rendering.");if(t=n.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){m.listeners.push(_)}};te.T!==null?a(!0):m.isTransition=!1,u(m),a=n.pending,a===null?(m.next=n.pending=m,fm(n,m)):(m.next=a.next,n.pending=a.next=m)}}function fm(t,n){var a=n.action,u=n.payload,d=t.state;if(n.isTransition){var m=te.T,_={};te.T=_,te.T._updatedFibers=new Set;try{var M=a(d,u),N=te.S;N!==null&&N(_,M),pm(t,n,M)}catch(L){Mh(t,n,L)}finally{te.T=m,m===null&&_._updatedFibers&&(t=_._updatedFibers.size,_._updatedFibers.clear(),10<t&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{_=a(d,u),pm(t,n,_)}catch(L){Mh(t,n,L)}}function pm(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?(a.then(function(u){mm(t,n,u)},function(u){return Mh(t,n,u)}),n.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):mm(t,n,a)}function mm(t,n,a){n.status="fulfilled",n.value=a,Dh(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,fm(t,a)))}function Mh(t,n,a){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,Dh(n),n=n.next;while(n!==u)}t.action=null}function Dh(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function h(t,n){return n}function g(t,n){if(yt){var a=Bt.formState;if(a!==null){e:{var u=Ke;if(yt){if(si){t:{for(var d=si,m=Ir;d.nodeType!==8;){if(!m){d=null;break t}if(d=ps(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m===vb||m===dA?d:null}if(d){si=ps(d.nextSibling),u=d.data===vb;break e}}ea(u)}u=!1}u&&(n=a[0])}}return a=hn(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:n},a.queue=u,a=Zx.bind(null,Ke,u),u.dispatch=a,u=Ei(!1),m=aT.bind(null,Ke,!1,u.queue),u=hn(),d={state:n,dispatch:null,action:t,pending:null},u.queue=d,a=iT.bind(null,Ke,d,m,a),d.dispatch=a,u.memoizedState=t,[n,a,!1]}function y(t){var n=_t();return T(n,zt,t)}function T(t,n,a){if(n=_h(t,n,h)[0],t=Xa(Xn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Ga(n)}catch(_){throw _===uf?og:_}else u=n;n=_t();var d=n.queue,m=d.dispatch;return a!==n.memoizedState&&(Ke.flags|=2048,w(Ss|Di,O(),b.bind(null,d,a),null)),[u,m,t]}function b(t,n){t.action=n}function E(t){var n=_t(),a=zt;if(a!==null)return T(n,a,t);_t(),n=n.memoizedState,a=_t();var u=a.queue.dispatch;return a.memoizedState=t,[n,u,!1]}function w(t,n,a,u){return t={tag:t,create:a,deps:u,inst:n,next:null},n=Ke.updateQueue,n===null&&(n=pl(),Ke.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(u=a.next,a.next=t,t.next=u,n.lastEffect=t),t}function O(){return{destroy:void 0,resource:void 0}}function R(t){var n=hn();return t={current:t},n.memoizedState=t}function j(t,n,a,u){var d=hn();u=u===void 0?null:u,Ke.flags|=t,d.memoizedState=w(Ss|n,O(),a,u)}function H(t,n,a,u){var d=_t();u=u===void 0?null:u;var m=d.memoizedState.inst;zt!==null&&u!==null&&ph(u,zt.memoizedState.deps)?d.memoizedState=w(n,m,a,u):(Ke.flags|=t,d.memoizedState=w(Ss|n,m,a,u))}function J(t,n){(Ke.mode&Hs)!==$t&&(Ke.mode&XD)===$t?j(276826112,Di,t,n):j(8390656,Di,t,n)}function Ee(t,n){var a=4194308;return(Ke.mode&Hs)!==$t&&(a|=134217728),j(a,Gi,t,n)}function ue(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return n.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(n).join(", ")+"}"),t=t(),n.current=t,function(){n.current=null}}function Be(t,n,a){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),a=a!=null?a.concat([t]):null;var u=4194308;(Ke.mode&Hs)!==$t&&(u|=134217728),j(u,Gi,ue.bind(null,n,t),a)}function Ye(t,n,a){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),a=a!=null?a.concat([t]):null,H(4,Gi,ue.bind(null,n,t),a)}function ni(t,n){return hn().memoizedState=[t,n===void 0?null:n],t}function Li(t,n){var a=_t();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&ph(n,u[1])?u[0]:(a.memoizedState=[t,n],t)}function hs(t,n){var a=hn();n=n===void 0?null:n;var u=t();if(Al){He(!0);try{t()}finally{He(!1)}}return a.memoizedState=[u,n],u}function _r(t,n){var a=_t();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&ph(n,u[1]))return u[0];if(u=t(),Al){He(!0);try{t()}finally{He(!1)}}return a.memoizedState=[u,n],u}function ra(t,n){var a=hn();return Za(a,t,n)}function Wa(t,n){var a=_t();return Lt(a,zt.memoizedState,t,n)}function Ka(t,n){var a=_t();return zt===null?Za(a,t,n):Lt(a,zt.memoizedState,t,n)}function Za(t,n,a){return a===void 0||po&1073741824?t.memoizedState=n:(t.memoizedState=a,t=QE(),Ke.lanes|=t,yo|=t,a)}function Lt(t,n,a,u){return gn(a,n)?a:Nc.current!==null?(t=Za(t,a,u),gn(t,n)||(ji=!0),t):po&42?(t=QE(),Ke.lanes|=t,yo|=t,n):(ji=!0,t.memoizedState=a)}function Ja(t,n,a,u,d){var m=Et.p;Et.p=m!==0&&m<Nr?m:Nr;var _=te.T,M={};te.T=M,aT(t,!1,n,a),M._updatedFibers=new Set;try{var N=d(),L=te.S;if(L!==null&&L(M,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var Z=eT(N,u);Ch(t,n,Z,Zn(t))}else Ch(t,n,u,Zn(t))}catch(ie){Ch(t,n,{then:function(){},status:"rejected",reason:ie},Zn(t))}finally{Et.p=m,te.T=_,_===null&&M._updatedFibers&&(t=M._updatedFibers.size,M._updatedFibers.clear(),10<t&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function fn(t,n,a,u){if(t.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var d=Gx(t).queue;Ja(t,d,n,Pl,a===null?S:function(){return Xx(t),a(u)})}function Gx(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Pl,baseState:Pl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:Pl},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Xx(t){te.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var n=Gx(t).next.queue;Ch(t,n,{},Zn(t))}function nT(){var t=Ei(!1);return t=Ja.bind(null,Ke,t.queue,!0,!1),hn().memoizedState=t,[!1,t]}function Wx(){var t=Xa(Xn)[0],n=_t().memoizedState;return[typeof t=="boolean"?t:Ga(t),n]}function Kx(){var t=ml(Xn)[0],n=_t().memoizedState;return[typeof t=="boolean"?t:Ga(t),n]}function yl(){return Vt(wf)}function sT(){var t=hn(),n=Bt.identifierPrefix;if(yt){var a=ya,u=ga;a=(u&~(1<<32-pn(u)-1)).toString(32)+a,n="«"+n+"R"+a,a=dg++,0<a&&(n+="H"+a.toString(32)),n+="»"}else a=bR++,n="«"+n+"r"+a.toString(32)+"»";return t.memoizedState=n}function rT(){return hn().memoizedState=J3.bind(null,Ke)}function J3(t,n){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var u=Zn(a);t=On(u);var d=Tr(a,t,u);d!==null&&(hi(d,a,u),Ya(d,a,u)),a=ih(),n!=null&&d!==null&&console.error("The seed argument is not enabled outside experimental channels."),t.payload={cache:a};return}a=a.return}}function eL(t,n,a){var u=arguments;typeof u[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),u=Zn(t);var d={lane:u,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};gm(t)?Jx(n,d):(d=hr(t,n,d,u),d!==null&&(hi(d,t,u),eE(d,n,u))),Pe(t,u)}function Zx(t,n,a){var u=arguments;typeof u[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),u=Zn(t),Ch(t,n,a,u),Pe(t,u)}function Ch(t,n,a,u){var d={lane:u,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(gm(t))Jx(n,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null)){var _=te.H;te.H=$s;try{var M=n.lastRenderedState,N=m(M,a);if(d.hasEagerState=!0,d.eagerState=N,gn(N,M))return dr(t,n,d,0),Bt===null&&Fa(),!1}catch{}finally{te.H=_}}if(a=hr(t,n,d,u),a!==null)return hi(a,t,u),eE(a,n,u),!0}return!1}function aT(t,n,a,u){if(te.T===null&&Ml===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),u={lane:2,revertLane:zT(),action:u,hasEagerState:!1,eagerState:null,next:null},gm(t)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=hr(t,a,u,2),n!==null&&hi(n,t,2);Pe(t,2)}function gm(t){var n=t.alternate;return t===Ke||n!==null&&n===Ke}function Jx(t,n){Oc=cg=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function eE(t,n,a){if(a&4194048){var u=n.lanes;u&=t.pendingLanes,a|=u,n.lanes=a,Zt(t,a)}}function Hi(t){var n=ot;return t!=null&&(ot=n===null?t:n.concat(t)),n}function ym(t,n,a){for(var u=Object.keys(t.props),d=0;d<u.length;d++){var m=u[d];if(m!=="children"&&m!=="key"){n===null&&(n=Qu(t,a.mode,0),n._debugInfo=ot,n.return=a),Re(n,function(_){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",_)},m);break}}}function Tm(t){var n=ff;return ff+=1,Ic===null&&(Ic=ah()),lh(Ic,t,n)}function Ah(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function vm(t,n){throw n.$$typeof===r5?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
- Multiple copies of the "react" package is used.
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
- A compiler tries to "inline" JSX instead of using the runtime.`):(t=Object.prototype.toString.call(n),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead."))}function bm(t,n){var a=fe(t)||"Component";AC[a]||(AC[a]=!0,n=n.displayName||n.name||"Component",t.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
root.render(%s)`,n,n,n):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
<%s>{%s}</%s>`,n,n,a,n,a))}function _m(t,n){var a=fe(t)||"Component";wC[a]||(wC[a]=!0,n=String(n),t.tag===3?console.error(`Symbols are not valid as a React child.
root.render(%s)`,n):console.error(`Symbols are not valid as a React child.
<%s>%s</%s>`,a,n,a))}function tE(t){function n(B,q){if(t){var V=B.deletions;V===null?(B.deletions=[q],B.flags|=16):V.push(q)}}function a(B,q){if(!t)return null;for(;q!==null;)n(B,q),q=q.sibling;return null}function u(B){for(var q=new Map;B!==null;)B.key!==null?q.set(B.key,B):q.set(B.index,B),B=B.sibling;return q}function d(B,q){return B=Us(B,q),B.index=0,B.sibling=null,B}function m(B,q,V){return B.index=V,t?(V=B.alternate,V!==null?(V=V.index,V<q?(B.flags|=67108866,q):V):(B.flags|=67108866,q)):(B.flags|=1048576,q)}function _(B){return t&&B.alternate===null&&(B.flags|=67108866),B}function M(B,q,V,ae){return q===null||q.tag!==6?(q=Va(V,B.mode,ae),q.return=B,q._debugOwner=B,q._debugTask=B._debugTask,q._debugInfo=ot,q):(q=d(q,V),q.return=B,q._debugInfo=ot,q)}function N(B,q,V,ae){var Me=V.type;return Me===dc?(q=Z(B,q,V.props.children,ae,V.key),ym(V,q,B),q):q!==null&&(q.elementType===Me||$u(q,V)||typeof Me=="object"&&Me!==null&&Me.$$typeof===Jn&&mo(Me)===q.type)?(q=d(q,V.props),Ah(q,V),q.return=B,q._debugOwner=V._owner,q._debugInfo=ot,q):(q=Qu(V,B.mode,ae),Ah(q,V),q.return=B,q._debugInfo=ot,q)}function L(B,q,V,ae){return q===null||q.tag!==4||q.stateNode.containerInfo!==V.containerInfo||q.stateNode.implementation!==V.implementation?(q=Wd(V,B.mode,ae),q.return=B,q._debugInfo=ot,q):(q=d(q,V.children||[]),q.return=B,q._debugInfo=ot,q)}function Z(B,q,V,ae,Me){return q===null||q.tag!==7?(q=mr(V,B.mode,ae,Me),q.return=B,q._debugOwner=B,q._debugTask=B._debugTask,q._debugInfo=ot,q):(q=d(q,V),q.return=B,q._debugInfo=ot,q)}function ie(B,q,V){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=Va(""+q,B.mode,V),q.return=B,q._debugOwner=B,q._debugTask=B._debugTask,q._debugInfo=ot,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case ro:return V=Qu(q,B.mode,V),Ah(V,q),V.return=B,B=Hi(q._debugInfo),V._debugInfo=ot,ot=B,V;case cc:return q=Wd(q,B.mode,V),q.return=B,q._debugInfo=ot,q;case Jn:var ae=Hi(q._debugInfo);return q=mo(q),B=ie(B,q,V),ot=ae,B}if(Yi(q)||oe(q))return V=mr(q,B.mode,V,null),V.return=B,V._debugOwner=B,V._debugTask=B._debugTask,B=Hi(q._debugInfo),V._debugInfo=ot,ot=B,V;if(typeof q.then=="function")return ae=Hi(q._debugInfo),B=ie(B,Tm(q),V),ot=ae,B;if(q.$$typeof===Cr)return ie(B,Gu(B,q),V);vm(B,q)}return typeof q=="function"&&bm(B,q),typeof q=="symbol"&&_m(B,q),null}function X(B,q,V,ae){var Me=q!==null?q.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Me!==null?null:M(B,q,""+V,ae);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case ro:return V.key===Me?(Me=Hi(V._debugInfo),B=N(B,q,V,ae),ot=Me,B):null;case cc:return V.key===Me?L(B,q,V,ae):null;case Jn:return Me=Hi(V._debugInfo),V=mo(V),B=X(B,q,V,ae),ot=Me,B}if(Yi(V)||oe(V))return Me!==null?null:(Me=Hi(V._debugInfo),B=Z(B,q,V,ae,null),ot=Me,B);if(typeof V.then=="function")return Me=Hi(V._debugInfo),B=X(B,q,Tm(V),ae),ot=Me,B;if(V.$$typeof===Cr)return X(B,q,Gu(B,V),ae);vm(B,V)}return typeof V=="function"&&bm(B,V),typeof V=="symbol"&&_m(B,V),null}function re(B,q,V,ae,Me){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return B=B.get(V)||null,M(q,B,""+ae,Me);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case ro:return V=B.get(ae.key===null?V:ae.key)||null,B=Hi(ae._debugInfo),q=N(q,V,ae,Me),ot=B,q;case cc:return B=B.get(ae.key===null?V:ae.key)||null,L(q,B,ae,Me);case Jn:var it=Hi(ae._debugInfo);return ae=mo(ae),q=re(B,q,V,ae,Me),ot=it,q}if(Yi(ae)||oe(ae))return V=B.get(V)||null,B=Hi(ae._debugInfo),q=Z(q,V,ae,Me,null),ot=B,q;if(typeof ae.then=="function")return it=Hi(ae._debugInfo),q=re(B,q,V,Tm(ae),Me),ot=it,q;if(ae.$$typeof===Cr)return re(B,q,V,Gu(q,ae),Me);vm(q,ae)}return typeof ae=="function"&&bm(q,ae),typeof ae=="symbol"&&_m(q,ae),null}function Ie(B,q,V,ae){if(typeof V!="object"||V===null)return ae;switch(V.$$typeof){case ro:case cc:f(B,q,V);var Me=V.key;if(typeof Me!="string")break;if(ae===null){ae=new Set,ae.add(Me);break}if(!ae.has(Me)){ae.add(Me);break}Re(q,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Me)});break;case Jn:V=mo(V),Ie(B,q,V,ae)}return ae}function Ge(B,q,V,ae){for(var Me=null,it=null,Le=null,nt=q,rt=q=0,Yt=null;nt!==null&&rt<V.length;rt++){nt.index>rt?(Yt=nt,nt=null):Yt=nt.sibling;var pi=X(B,nt,V[rt],ae);if(pi===null){nt===null&&(nt=Yt);break}Me=Ie(B,pi,V[rt],Me),t&&nt&&pi.alternate===null&&n(B,nt),q=m(pi,q,rt),Le===null?it=pi:Le.sibling=pi,Le=pi,nt=Yt}if(rt===V.length)return a(B,nt),yt&&Jr(B,rt),it;if(nt===null){for(;rt<V.length;rt++)nt=ie(B,V[rt],ae),nt!==null&&(Me=Ie(B,nt,V[rt],Me),q=m(nt,q,rt),Le===null?it=nt:Le.sibling=nt,Le=nt);return yt&&Jr(B,rt),it}for(nt=u(nt);rt<V.length;rt++)Yt=re(nt,B,rt,V[rt],ae),Yt!==null&&(Me=Ie(B,Yt,V[rt],Me),t&&Yt.alternate!==null&&nt.delete(Yt.key===null?rt:Yt.key),q=m(Yt,q,rt),Le===null?it=Yt:Le.sibling=Yt,Le=Yt);return t&&nt.forEach(function(Da){return n(B,Da)}),yt&&Jr(B,rt),it}function qt(B,q,V,ae){if(V==null)throw Error("An iterable object provided no iterator.");for(var Me=null,it=null,Le=q,nt=q=0,rt=null,Yt=null,pi=V.next();Le!==null&&!pi.done;nt++,pi=V.next()){Le.index>nt?(rt=Le,Le=null):rt=Le.sibling;var Da=X(B,Le,pi.value,ae);if(Da===null){Le===null&&(Le=rt);break}Yt=Ie(B,Da,pi.value,Yt),t&&Le&&Da.alternate===null&&n(B,Le),q=m(Da,q,nt),it===null?Me=Da:it.sibling=Da,it=Da,Le=rt}if(pi.done)return a(B,Le),yt&&Jr(B,nt),Me;if(Le===null){for(;!pi.done;nt++,pi=V.next())Le=ie(B,pi.value,ae),Le!==null&&(Yt=Ie(B,Le,pi.value,Yt),q=m(Le,q,nt),it===null?Me=Le:it.sibling=Le,it=Le);return yt&&Jr(B,nt),Me}for(Le=u(Le);!pi.done;nt++,pi=V.next())rt=re(Le,B,nt,pi.value,ae),rt!==null&&(Yt=Ie(B,rt,pi.value,Yt),t&&rt.alternate!==null&&Le.delete(rt.key===null?nt:rt.key),q=m(rt,q,nt),it===null?Me=rt:it.sibling=rt,it=rt);return t&&Le.forEach(function(QR){return n(B,QR)}),yt&&Jr(B,nt),Me}function mt(B,q,V,ae){if(typeof V=="object"&&V!==null&&V.type===dc&&V.key===null&&(ym(V,null,B),V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case ro:var Me=Hi(V._debugInfo);e:{for(var it=V.key;q!==null;){if(q.key===it){if(it=V.type,it===dc){if(q.tag===7){a(B,q.sibling),ae=d(q,V.props.children),ae.return=B,ae._debugOwner=V._owner,ae._debugInfo=ot,ym(V,ae,B),B=ae;break e}}else if(q.elementType===it||$u(q,V)||typeof it=="object"&&it!==null&&it.$$typeof===Jn&&mo(it)===q.type){a(B,q.sibling),ae=d(q,V.props),Ah(ae,V),ae.return=B,ae._debugOwner=V._owner,ae._debugInfo=ot,B=ae;break e}a(B,q);break}else n(B,q);q=q.sibling}V.type===dc?(ae=mr(V.props.children,B.mode,ae,V.key),ae.return=B,ae._debugOwner=B,ae._debugTask=B._debugTask,ae._debugInfo=ot,ym(V,ae,B),B=ae):(ae=Qu(V,B.mode,ae),Ah(ae,V),ae.return=B,ae._debugInfo=ot,B=ae)}return B=_(B),ot=Me,B;case cc:e:{for(Me=V,V=Me.key;q!==null;){if(q.key===V)if(q.tag===4&&q.stateNode.containerInfo===Me.containerInfo&&q.stateNode.implementation===Me.implementation){a(B,q.sibling),ae=d(q,Me.children||[]),ae.return=B,B=ae;break e}else{a(B,q);break}else n(B,q);q=q.sibling}ae=Wd(Me,B.mode,ae),ae.return=B,B=ae}return _(B);case Jn:return Me=Hi(V._debugInfo),V=mo(V),B=mt(B,q,V,ae),ot=Me,B}if(Yi(V))return Me=Hi(V._debugInfo),B=Ge(B,q,V,ae),ot=Me,B;if(oe(V)){if(Me=Hi(V._debugInfo),it=oe(V),typeof it!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Le=it.call(V);return Le===V?(B.tag!==0||Object.prototype.toString.call(B.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Le)!=="[object Generator]")&&(DC||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),DC=!0):V.entries!==it||Xv||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Xv=!0),B=qt(B,q,Le,ae),ot=Me,B}if(typeof V.then=="function")return Me=Hi(V._debugInfo),B=mt(B,q,Tm(V),ae),ot=Me,B;if(V.$$typeof===Cr)return mt(B,q,Gu(B,V),ae);vm(B,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(Me=""+V,q!==null&&q.tag===6?(a(B,q.sibling),ae=d(q,Me),ae.return=B,B=ae):(a(B,q),ae=Va(Me,B.mode,ae),ae.return=B,ae._debugOwner=B,ae._debugTask=B._debugTask,ae._debugInfo=ot,B=ae),_(B)):(typeof V=="function"&&bm(B,V),typeof V=="symbol"&&_m(B,V),a(B,q))}return function(B,q,V,ae){var Me=ot;ot=null;try{ff=0;var it=mt(B,q,V,ae);return Ic=null,it}catch(Yt){if(Yt===uf||Yt===og)throw Yt;var Le=D(29,Yt,null,B.mode);Le.lanes=ae,Le.return=B;var nt=Le._debugInfo=ot;if(Le._debugOwner=B._debugOwner,Le._debugTask=B._debugTask,nt!=null){for(var rt=nt.length-1;0<=rt;rt--)if(typeof nt[rt].stack=="string"){Le._debugOwner=nt[rt],Le._debugTask=nt[rt].debugTask;break}}return Le}finally{ot=Me}}}function eo(t){var n=t.alternate;_e(Ci,Ci.current&Rc,t),_e(Es,t,t),Rr===null&&(n===null||Nc.current!==null||n.memoizedState!==null)&&(Rr=t)}function iE(t){if(t.tag===22){if(_e(Ci,Ci.current,t),_e(Es,t,t),Rr===null){var n=t.alternate;n!==null&&n.memoizedState!==null&&(Rr=t)}}else to(t)}function to(t){_e(Ci,Ci.current,t),_e(Es,Es.current,t)}function aa(t){le(Es,t),Rr===t&&(Rr=null),le(Ci,t)}function Sm(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data===xa||GT(a)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function oT(t){if(t!==null&&typeof t!="function"){var n=String(t);qC.has(n)||(qC.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",t))}}function lT(t,n,a,u){var d=t.memoizedState,m=a(u,d);if(t.mode&an){He(!0);try{m=a(u,d)}finally{He(!1)}}m===void 0&&(n=K(n)||"Component",zC.has(n)||(zC.add(n),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))),d=m==null?d:ut({},d,m),t.memoizedState=d,t.lanes===0&&(t.updateQueue.baseState=d)}function nE(t,n,a,u,d,m,_){var M=t.stateNode;if(typeof M.shouldComponentUpdate=="function"){if(a=M.shouldComponentUpdate(u,m,_),t.mode&an){He(!0);try{a=M.shouldComponentUpdate(u,m,_)}finally{He(!1)}}return a===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",K(n)||"Component"),a}return n.prototype&&n.prototype.isPureReactComponent?!zs(a,u)||!zs(d,m):!0}function sE(t,n,a,u){var d=n.state;typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,u),n.state!==d&&(t=fe(t)||"Component",OC.has(t)||(OC.add(t),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",t)),Wv.enqueueReplaceState(n,n.state,null))}function Tl(t,n){var a=n;if("ref"in n){a={};for(var u in n)u!=="ref"&&(a[u]=n[u])}if(t=t.defaultProps){a===n&&(a=ut({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function rE(t){Kv(t),console.warn(`%s
%s
`,jc?"An error occurred in the <"+jc+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function aE(t){var n=jc?"The above error occurred in the <"+jc+"> component.":"The above error occurred in one of your React components.",a="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Zv||"Anonymous")+".");if(typeof t=="object"&&t!==null&&typeof t.environmentName=="string"){var u=t.environmentName;t=[`%o
%s
%s
`,t,n,a].slice(0),typeof t[0]=="string"?t.splice(0,1,vA+t[0],bA,kg+u+kg,_A):t.splice(0,0,vA,bA,kg+u+kg,_A),t.unshift(console),u=$R.apply(console.error,t),u()}else console.error(`%o
%s
%s
`,t,n,a)}function oE(t){Kv(t)}function xm(t,n){try{jc=n.source?fe(n.source):null,Zv=null;var a=n.value;if(te.actQueue!==null)te.thrownErrors.push(a);else{var u=t.onUncaughtError;u(a,{componentStack:n.stack})}}catch(d){setTimeout(function(){throw d})}}function lE(t,n,a){try{jc=a.source?fe(a.source):null,Zv=fe(n);var u=t.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function uT(t,n,a){return a=On(a),a.tag=qv,a.payload={element:null},a.callback=function(){Re(n.source,xm,t,n)},a}function cT(t){return t=On(t),t.tag=qv,t}function dT(t,n,a,u){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var m=u.value;t.payload=function(){return d(m)},t.callback=function(){nm(a),Re(u.source,lE,n,a,u)}}var _=a.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(t.callback=function(){nm(a),Re(u.source,lE,n,a,u),typeof d!="function"&&(vo===null?vo=new Set([this]):vo.add(this)),SR(this,u),typeof d=="function"||!(a.lanes&2)&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",fe(a)||"Unknown")})}function tL(t,n,a,u,d){if(a.flags|=32768,Fs&&Rh(t,d),u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=a.alternate,n!==null&&nl(n,a,d,!0),yt&&(Ta=!0),a=Es.current,a!==null){switch(a.tag){case 13:return Rr===null?NT():a.alternate===null&&ri===Sa&&(ri=ib),a.flags&=-257,a.flags|=65536,a.lanes=d,u===Bv?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),IT(t,u,d)),!1;case 22:return a.flags|=65536,u===Bv?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([u]):a.add(u)),IT(t,u,d)),!1}throw Error("Unexpected Suspense handler tag ("+a.tag+"). This is a bug in React.")}return IT(t,u,d),NT(),!1}if(yt)return Ta=!0,n=Es.current,n!==null?(!(n.flags&65536)&&(n.flags|=256),n.flags|=65536,n.lanes=d,u!==jv&&il(Fi(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:u}),a))):(u!==jv&&il(Fi(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:u}),a)),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,u=Fi(u,a),d=uT(t.stateNode,u,d),dl(t,d),ri!==wl&&(ri=Bc)),!1;var m=Fi(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:u}),a);if(_f===null?_f=[m]:_f.push(m),ri!==wl&&(ri=Bc),n===null)return!0;u=Fi(u,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=uT(a.stateNode,u,t),dl(a,t),!1;case 1:if(n=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(vo===null||!vo.has(m))))return a.flags|=65536,d&=-d,a.lanes|=d,d=cT(d),dT(d,t,a,u),dl(a,d),!1}a=a.return}while(a!==null);return!1}function Vi(t,n,a,u){n.child=t===null?NC(n,null,a,u):Lc(n,t.child,a,u)}function uE(t,n,a,u,d){a=a.render;var m=n.ref;if("ref"in u){var _={};for(var M in u)M!=="ref"&&(_[M]=u[M])}else _=u;return yr(n),Ht(n),u=mh(t,n,a,_,m,d),M=yh(),Si(),t!==null&&!ji?(Th(t,n,d),oa(t,n,d)):(yt&&M&&el(n),n.flags|=1,Vi(t,n,u,d),n.child)}function cE(t,n,a,u,d){if(t===null){var m=a.type;return typeof m=="function"&&!Ha(m)&&m.defaultProps===void 0&&a.compare===null?(a=pr(m),n.tag=15,n.type=a,fT(n,m),dE(t,n,a,u,d)):(t=Xd(a.type,null,u,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(m=t.child,!vT(t,d)){var _=m.memoizedProps;if(a=a.compare,a=a!==null?a:zs,a(_,u)&&t.ref===n.ref)return oa(t,n,d)}return n.flags|=1,t=Us(m,u),t.ref=n.ref,t.return=n,n.child=t}function dE(t,n,a,u,d){if(t!==null){var m=t.memoizedProps;if(zs(m,u)&&t.ref===n.ref&&n.type===t.type)if(ji=!1,n.pendingProps=u=m,vT(t,d))t.flags&131072&&(ji=!0);else return n.lanes=t.lanes,oa(t,n,d)}return hT(t,n,a,u,d)}function hE(t,n,a){var u=n.pendingProps,d=u.children,m=t!==null?t.memoizedState:null;if(u.mode==="hidden"){if(n.flags&128){if(u=m!==null?m.baseLanes|a:a,t!==null){for(d=n.child=t.child,m=0;d!==null;)m=m|d.lanes|d.childLanes,d=d.sibling;n.childLanes=m&~u}else n.childLanes=0,n.child=null;return fE(t,n,u,a)}if(a&536870912)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Wu(n,m!==null?m.cachePool:null),m!==null?Zu(n,m):hh(n),iE(n);else return n.lanes=n.childLanes=536870912,fE(t,n,m!==null?m.baseLanes|a:a,a)}else m!==null?(Wu(n,m.cachePool),Zu(n,m),to(n),n.memoizedState=null):(t!==null&&Wu(n,null),hh(n),to(n));return Vi(t,n,d,a),n.child}function fE(t,n,a,u){var d=sh();return d=d===null?null:{parent:Mi._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},t!==null&&Wu(n,null),hh(n),iE(n),t!==null&&nl(t,n,u,!0),null}function Em(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(t===null||t.ref!==a)&&(n.flags|=4194816)}}function hT(t,n,a,u,d){if(a.prototype&&typeof a.prototype.render=="function"){var m=K(a)||"Unknown";HC[m]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",m,m),HC[m]=!0)}return n.mode&an&&Vs.recordLegacyContextWarning(n,null),t===null&&(fT(n,n.type),a.contextTypes&&(m=K(a)||"Unknown",$C[m]||($C[m]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",m)))),yr(n),Ht(n),a=mh(t,n,a,u,void 0,d),u=yh(),Si(),t!==null&&!ji?(Th(t,n,d),oa(t,n,d)):(yt&&u&&el(n),n.flags|=1,Vi(t,n,a,d),n.child)}function pE(t,n,a,u,d,m){return yr(n),Ht(n),ba=-1,hf=t!==null&&t.type!==n.type,n.updateQueue=null,a=gh(n,u,a,d),um(t,n),u=yh(),Si(),t!==null&&!ji?(Th(t,n,m),oa(t,n,m)):(yt&&u&&el(n),n.flags|=1,Vi(t,n,a,m),n.child)}function mE(t,n,a,u,d){switch(c(n)){case!1:var m=n.stateNode,_=new n.type(n.memoizedProps,m.context).state;m.updater.enqueueSetState(m,_,null);break;case!0:n.flags|=128,n.flags|=65536,m=Error("Simulated error coming from DevTools");var M=d&-d;if(n.lanes|=M,_=Bt,_===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");M=cT(M),dT(M,_,n,Fi(m,n)),dl(n,M)}if(yr(n),n.stateNode===null){if(_=ho,m=a.contextType,"contextType"in a&&m!==null&&(m===void 0||m.$$typeof!==Cr)&&!BC.has(a)&&(BC.add(a),M=m===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof m!="object"?" However, it is set to a "+typeof m+".":m.$$typeof===av?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(m).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",K(a)||"Component",M)),typeof m=="object"&&m!==null&&(_=Vt(m)),m=new a(u,_),n.mode&an){He(!0);try{m=new a(u,_)}finally{He(!1)}}if(_=n.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Wv,n.stateNode=m,m._reactInternals=n,m._reactInternalInstance=kC,typeof a.getDerivedStateFromProps=="function"&&_===null&&(_=K(a)||"Component",IC.has(_)||(IC.add(_),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",_,m.state===null?"null":"undefined",_))),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"){var N=M=_=null;if(typeof m.componentWillMount=="function"&&m.componentWillMount.__suppressDeprecationWarning!==!0?_="componentWillMount":typeof m.UNSAFE_componentWillMount=="function"&&(_="UNSAFE_componentWillMount"),typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps.__suppressDeprecationWarning!==!0?M="componentWillReceiveProps":typeof m.UNSAFE_componentWillReceiveProps=="function"&&(M="UNSAFE_componentWillReceiveProps"),typeof m.componentWillUpdate=="function"&&m.componentWillUpdate.__suppressDeprecationWarning!==!0?N="componentWillUpdate":typeof m.UNSAFE_componentWillUpdate=="function"&&(N="UNSAFE_componentWillUpdate"),_!==null||M!==null||N!==null){m=K(a)||"Component";var L=typeof a.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";RC.has(m)||(RC.add(m),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
%s uses %s but also contains the following legacy lifecycles:%s%s%s
The above lifecycles should be removed. Learn more about this warning here:
https://react.dev/link/unsafe-component-lifecycles`,m,L,_!==null?`
`+_:"",M!==null?`
`+M:"",N!==null?`
`+N:""))}}m=n.stateNode,_=K(a)||"Component",m.render||(a.prototype&&typeof a.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",_):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",_)),!m.getInitialState||m.getInitialState.isReactClassApproved||m.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",_),m.getDefaultProps&&!m.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",_),m.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",_),a.childContextTypes&&!PC.has(a)&&(PC.add(a),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",_)),a.contextTypes&&!UC.has(a)&&(UC.add(a),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",_)),typeof m.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",_),a.prototype&&a.prototype.isPureReactComponent&&typeof m.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",K(a)||"A pure component"),typeof m.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",_),typeof m.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",_),typeof m.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",_),typeof m.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",_),M=m.props!==u,m.props!==void 0&&M&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",_),m.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",_,_),typeof m.getSnapshotBeforeUpdate!="function"||typeof m.componentDidUpdate=="function"||LC.has(a)||(LC.add(a),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",K(a))),typeof m.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",_),typeof m.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",_),typeof a.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",_),(M=m.state)&&(typeof M!="object"||Yi(M))&&console.error("%s.state: must be set to an object or null",_),typeof m.getChildContext=="function"&&typeof a.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",_),m=n.stateNode,m.props=u,m.state=n.memoizedState,m.refs={},cl(n),_=a.contextType,m.context=typeof _=="object"&&_!==null?Vt(_):ho,m.state===u&&(_=K(a)||"Component",jC.has(_)||(jC.add(_),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",_))),n.mode&an&&Vs.recordLegacyContextWarning(n,m),Vs.recordUnsafeLifecycleWarnings(n,m),m.state=n.memoizedState,_=a.getDerivedStateFromProps,typeof _=="function"&&(lT(n,a,_,u),m.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(_=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),_!==m.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",fe(n)||"Component"),Wv.enqueueReplaceState(m,m.state,null)),fl(n,u,m,d),hl(),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Hs)!==$t&&(n.flags|=134217728),m=!0}else if(t===null){m=n.stateNode;var Z=n.memoizedProps;M=Tl(a,Z),m.props=M;var ie=m.context;N=a.contextType,_=ho,typeof N=="object"&&N!==null&&(_=Vt(N)),L=a.getDerivedStateFromProps,N=typeof L=="function"||typeof m.getSnapshotBeforeUpdate=="function",Z=n.pendingProps!==Z,N||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(Z||ie!==_)&&sE(n,m,u,_),fo=!1;var X=n.memoizedState;m.state=X,fl(n,u,m,d),hl(),ie=n.memoizedState,Z||X!==ie||fo?(typeof L=="function"&&(lT(n,a,L,u),ie=n.memoizedState),(M=fo||nE(n,a,M,u,X,ie,_))?(N||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Hs)!==$t&&(n.flags|=134217728)):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Hs)!==$t&&(n.flags|=134217728),n.memoizedProps=u,n.memoizedState=ie),m.props=u,m.state=ie,m.context=_,m=M):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Hs)!==$t&&(n.flags|=134217728),m=!1)}else{m=n.stateNode,ch(t,n),_=n.memoizedProps,N=Tl(a,_),m.props=N,L=n.pendingProps,X=m.context,ie=a.contextType,M=ho,typeof ie=="object"&&ie!==null&&(M=Vt(ie)),Z=a.getDerivedStateFromProps,(ie=typeof Z=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==L||X!==M)&&sE(n,m,u,M),fo=!1,X=n.memoizedState,m.state=X,fl(n,u,m,d),hl();var re=n.memoizedState;_!==L||X!==re||fo||t!==null&&t.dependencies!==null&&Qn(t.dependencies)?(typeof Z=="function"&&(lT(n,a,Z,u),re=n.memoizedState),(N=fo||nE(n,a,N,u,X,re,M)||t!==null&&t.dependencies!==null&&Qn(t.dependencies))?(ie||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,re,M),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,re,M)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=re),m.props=u,m.state=re,m.context=M,m=N):(typeof m.componentDidUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(n.flags|=1024),m=!1)}if(M=m,Em(t,n),_=(n.flags&128)!==0,M||_){if(M=n.stateNode,$n(n),_&&typeof a.getDerivedStateFromError!="function")a=null,Rn=-1;else{if(Ht(n),a=gC(M),n.mode&an){He(!0);try{gC(M)}finally{He(!1)}}Si()}n.flags|=1,t!==null&&_?(n.child=Lc(n,t.child,null,d),n.child=Lc(n,null,a,d)):Vi(t,n,a,d),n.memoizedState=M.state,t=n.child}else t=oa(t,n,d);return d=n.stateNode,m&&d.props!==u&&(zc||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",fe(n)||"a component"),zc=!0),t}function gE(t,n,a,u){return tl(),n.flags|=256,Vi(t,n,a,u),n.child}function fT(t,n){n&&n.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
%s.childContextTypes = ...`,n.displayName||n.name||"Component"),typeof n.getDerivedStateFromProps=="function"&&(t=K(n)||"Unknown",YC[t]||(console.error("%s: Function components do not support getDerivedStateFromProps.",t),YC[t]=!0)),typeof n.contextType=="object"&&n.contextType!==null&&(n=K(n)||"Unknown",VC[n]||(console.error("%s: Function components do not support contextType.",n),VC[n]=!0))}function pT(t){return{baseLanes:t,cachePool:rh()}}function mT(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=ns),t}function yE(t,n,a){var u,d=n.pendingProps;l(n)&&(n.flags|=128);var m=!1,_=(n.flags&128)!==0;if((u=_)||(u=t!==null&&t.memoizedState===null?!1:(Ci.current&pf)!==0),u&&(m=!0,n.flags&=-129),u=(n.flags&32)!==0,n.flags&=-33,t===null){if(yt){if(m?eo(n):to(n),yt){var M=si,N;if(!(N=!M)){e:{var L=M;for(N=Ir;L.nodeType!==8;){if(!N){N=null;break e}if(L=ps(L.nextSibling),L===null){N=null;break e}}N=L}N!==null?(Ps(),n.memoizedState={dehydrated:N,treeContext:Sl!==null?{id:ga,overflow:ya}:null,retryLane:536870912,hydrationErrors:null},L=D(18,null,null,$t),L.stateNode=N,L.return=n,n.child=L,yn=n,si=null,N=!0):N=!1,N=!N}N&&(Zd(n,M),ea(n))}if(M=n.memoizedState,M!==null&&(M=M.dehydrated,M!==null))return GT(M)?n.lanes=32:n.lanes=536870912,null;aa(n)}return M=d.children,d=d.fallback,m?(to(n),m=n.mode,M=Mm({mode:"hidden",children:M},m),d=mr(d,m,a,null),M.return=n,d.return=n,M.sibling=d,n.child=M,m=n.child,m.memoizedState=pT(a),m.childLanes=mT(t,u,a),n.memoizedState=eb,d):(eo(n),gT(n,M))}var Z=t.memoizedState;if(Z!==null&&(M=Z.dehydrated,M!==null)){if(_)n.flags&256?(eo(n),n.flags&=-257,n=yT(t,n,a)):n.memoizedState!==null?(to(n),n.child=t.child,n.flags|=128,n=null):(to(n),m=d.fallback,M=n.mode,d=Mm({mode:"visible",children:d.children},M),m=mr(m,M,a,null),m.flags|=2,d.return=n,m.return=n,d.sibling=m,n.child=d,Lc(n,t.child,null,a),d=n.child,d.memoizedState=pT(a),d.childLanes=mT(t,u,a),n.memoizedState=eb,n=m);else if(eo(n),yt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),GT(M)){if(u=M.nextSibling&&M.nextSibling.dataset,u){N=u.dgst;var ie=u.msg;L=u.stck;var X=u.cstck}M=ie,u=N,d=L,N=m=X,m=Error(M||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),m.stack=d||"",m.digest=u,u=N===void 0?null:N,d={value:m,source:null,stack:u},typeof u=="string"&&Lv.set(m,d),il(d),n=yT(t,n,a)}else if(ji||nl(t,n,a,!1),u=(a&t.childLanes)!==0,ji||u){if(u=Bt,u!==null&&(d=a&-a,d=d&42?1:xt(d),d=d&(u.suspendedLanes|a)?0:d,d!==0&&d!==Z.retryLane))throw Z.retryLane=d,xi(t,d),hi(u,t,d),FC;M.data===xa||NT(),n=yT(t,n,a)}else M.data===xa?(n.flags|=192,n.child=t.child,n=null):(t=Z.treeContext,si=ps(M.nextSibling),yn=n,yt=!0,xl=null,Ta=!1,bs=null,Ir=!1,t!==null&&(Ps(),Ts[vs++]=ga,Ts[vs++]=ya,Ts[vs++]=Sl,ga=t.id,ya=t.overflow,Sl=n),n=gT(n,d.children),n.flags|=4096);return n}return m?(to(n),m=d.fallback,M=n.mode,N=t.child,L=N.sibling,d=Us(N,{mode:"hidden",children:d.children}),d.subtreeFlags=N.subtreeFlags&65011712,L!==null?m=Us(L,m):(m=mr(m,M,a,null),m.flags|=2),m.return=n,d.return=n,d.sibling=m,n.child=d,d=m,m=n.child,M=t.child.memoizedState,M===null?M=pT(a):(N=M.cachePool,N!==null?(L=Mi._currentValue,N=N.parent!==L?{parent:L,pool:L}:N):N=rh(),M={baseLanes:M.baseLanes|a,cachePool:N}),m.memoizedState=M,m.childLanes=mT(t,u,a),n.memoizedState=eb,d):(eo(n),a=t.child,t=a.sibling,a=Us(a,{mode:"visible",children:d.children}),a.return=n,a.sibling=null,t!==null&&(u=n.deletions,u===null?(n.deletions=[t],n.flags|=16):u.push(t)),n.child=a,n.memoizedState=null,a)}function gT(t,n){return n=Mm({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Mm(t,n){return t=D(22,t,null,n),t.lanes=0,t.stateNode={_visibility:Jm,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function yT(t,n,a){return Lc(n,t.child,null,a),t=gT(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function TE(t,n,a){t.lanes|=n;var u=t.alternate;u!==null&&(u.lanes|=n),ta(t.return,n,a)}function vE(t,n){var a=Yi(t);return t=!a&&typeof oe(t)=="function",a||t?(a=a?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",a,n,a),!1):!0}function TT(t,n,a,u,d){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:d}:(m.isBackwards=n,m.rendering=null,m.renderingStartTime=0,m.last=u,m.tail=a,m.tailMode=d)}function bE(t,n,a){var u=n.pendingProps,d=u.revealOrder,m=u.tail;if(u=u.children,d!==void 0&&d!=="forwards"&&d!=="backwards"&&d!=="together"&&!QC[d])if(QC[d]=!0,typeof d=="string")switch(d.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',d,d.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',d,d.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d);m===void 0||Jv[m]||(m!=="collapsed"&&m!=="hidden"?(Jv[m]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',m)):d!=="forwards"&&d!=="backwards"&&(Jv[m]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',m)));e:if((d==="forwards"||d==="backwards")&&u!==void 0&&u!==null&&u!==!1)if(Yi(u)){for(var _=0;_<u.length;_++)if(!vE(u[_],_))break e}else if(_=oe(u),typeof _=="function"){if(_=_.call(u))for(var M=_.next(),N=0;!M.done;M=_.next()){if(!vE(M.value,N))break e;N++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',d);if(Vi(t,n,u,a),u=Ci.current,u&pf)u=u&Rc|pf,n.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&TE(t,a,n);else if(t.tag===19)TE(t,a,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=Rc}switch(_e(Ci,u,n),d){case"forwards":for(a=n.child,d=null;a!==null;)t=a.alternate,t!==null&&Sm(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),TT(n,!1,d,a,m);break;case"backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&Sm(t)===null){n.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}TT(n,!0,a,null,m);break;case"together":TT(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function oa(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),Rn=-1,yo|=n.lanes,!(a&n.childLanes))if(t!==null){if(nl(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error("Resuming work not yet implemented.");if(n.child!==null){for(t=n.child,a=Us(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=Us(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function vT(t,n){return t.lanes&n?!0:(t=t.dependencies,!!(t!==null&&Qn(t)))}function iL(t,n,a){switch(n.tag){case 3:ge(n,n.stateNode.containerInfo),cs(n,Mi,t.memoizedState.cache),tl();break;case 27:case 5:Se(n);break;case 4:ge(n,n.stateNode.containerInfo);break;case 10:cs(n,n.type,n.memoizedProps.value);break;case 12:a&n.childLanes&&(n.flags|=4),n.flags|=2048;var u=n.stateNode;u.effectDuration=-0,u.passiveEffectDuration=-0;break;case 13:if(u=n.memoizedState,u!==null)return u.dehydrated!==null?(eo(n),n.flags|=128,null):a&n.child.childLanes?yE(t,n,a):(eo(n),t=oa(t,n,a),t!==null?t.sibling:null);eo(n);break;case 19:var d=(t.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(nl(t,n,a,!1),u=(a&n.childLanes)!==0),d){if(u)return bE(t,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),_e(Ci,Ci.current,n),u)break;return null;case 22:case 23:return n.lanes=0,hE(t,n,a);case 24:cs(n,Mi,t.memoizedState.cache)}return oa(t,n,a)}function bT(t,n,a){if(n._debugNeedsRemount&&t!==null){a=Xd(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes),a._debugStack=n._debugStack,a._debugTask=n._debugTask;var u=n.return;if(u===null)throw Error("Cannot swap the root fiber.");if(t.alternate=null,n.alternate=null,a.index=n.index,a.sibling=n.sibling,a.return=n.return,a.ref=n.ref,a._debugInfo=n._debugInfo,n===u.child)u.child=a;else{var d=u.child;if(d===null)throw Error("Expected parent to have a child.");for(;d.sibling!==n;)if(d=d.sibling,d===null)throw Error("Expected to find the previous sibling.");d.sibling=a}return n=u.deletions,n===null?(u.deletions=[t],u.flags|=16):n.push(t),a.flags|=2,a}if(t!==null)if(t.memoizedProps!==n.pendingProps||n.type!==t.type)ji=!0;else{if(!vT(t,a)&&!(n.flags&128))return ji=!1,iL(t,n,a);ji=!!(t.flags&131072)}else ji=!1,(u=yt)&&(Ps(),u=(n.flags&1048576)!==0),u&&(u=n.index,Ps(),sm(n,tg,u));switch(n.lanes=0,n.tag){case 16:e:if(u=n.pendingProps,t=mo(n.elementType),n.type=t,typeof t=="function")Ha(t)?(u=Tl(t,u),n.tag=1,n.type=t=pr(t),n=mE(null,n,t,u,a)):(n.tag=0,fT(n,t),n.type=t=pr(t),n=hT(null,n,t,u,a));else{if(t!=null){if(d=t.$$typeof,d===Hh){n.tag=11,n.type=t=Vu(t),n=uE(null,n,t,u,a);break e}else if(d===Fm){n.tag=14,n=cE(null,n,t,u,a);break e}}throw n="",t!==null&&typeof t=="object"&&t.$$typeof===Jn&&(n=" Did you wrap a component in React.lazy() more than once?"),t=K(t)||t,Error("Element type is invalid. Received a promise that resolves to: "+t+". Lazy element type must resolve to a class or function."+n)}return n;case 0:return hT(t,n,n.type,n.pendingProps,a);case 1:return u=n.type,d=Tl(u,n.pendingProps),mE(t,n,u,d,a);case 3:e:{if(ge(n,n.stateNode.containerInfo),t===null)throw Error("Should have a current fiber. This is a bug in React.");u=n.pendingProps;var m=n.memoizedState;d=m.element,ch(t,n),fl(n,u,null,a);var _=n.memoizedState;if(u=_.cache,cs(n,Mi,u),u!==m.cache&&th(n,[Mi],a,!0),hl(),u=_.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:_.cache},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){n=gE(t,n,u,a);break e}else if(u!==d){d=Fi(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),il(d),n=gE(t,n,u,a);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(si=ps(t.firstChild),yn=n,yt=!0,xl=null,Ta=!1,bs=null,Ir=!0,t=NC(n,null,u,a),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling}else{if(tl(),u===d){n=oa(t,n,a);break e}Vi(t,n,u,a)}n=n.child}return n;case 26:return Em(t,n),t===null?(t=PM(n.type,null,n.pendingProps,null))?n.memoizedState=t:yt||(t=n.type,a=n.pendingProps,u=he(oo.current),u=Im(u).createElement(t),u[rn]=n,u[Ln]=a,$i(u,t,a),Q(u),n.stateNode=u):n.memoizedState=PM(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Se(n),t===null&&yt&&(u=he(oo.current),d=ne(),u=n.stateNode=zM(n.type,n.pendingProps,u,d,!1),Ta||(d=AM(u,n.type,n.pendingProps,d),d!==null&&(gr(n,0).serverProps=d)),yn=n,Ir=!0,d=si,so(n.type)?(xb=d,si=ps(u.firstChild)):si=d),Vi(t,n,n.pendingProps.children,a),Em(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&yt&&(m=ne(),u=qa(n.type,m.ancestorInfo),d=si,(_=!d)||(_=PL(d,n.type,n.pendingProps,Ir),_!==null?(n.stateNode=_,Ta||(m=AM(_,n.type,n.pendingProps,m),m!==null&&(gr(n,0).serverProps=m)),yn=n,si=ps(_.firstChild),Ir=!1,m=!0):m=!1,_=!m),_&&(u&&Zd(n,d),ea(n))),Se(n),d=n.type,m=n.pendingProps,_=t!==null?t.memoizedProps:null,u=m.children,YT(d,m)?u=null:_!==null&&YT(d,_)&&(n.flags|=32),n.memoizedState!==null&&(d=mh(t,n,vr,null,null,a),wf._currentValue=d),Em(t,n),Vi(t,n,u,a),n.child;case 6:return t===null&&yt&&(t=n.pendingProps,a=ne(),u=a.ancestorInfo.current,t=u!=null?Rs(t,u.tag,a.ancestorInfo.implicitRootScope):!0,a=si,(u=!a)||(u=BL(a,n.pendingProps,Ir),u!==null?(n.stateNode=u,yn=n,si=null,u=!0):u=!1,u=!u),u&&(t&&Zd(n,a),ea(n))),null;case 13:return yE(t,n,a);case 4:return ge(n,n.stateNode.containerInfo),u=n.pendingProps,t===null?n.child=Lc(n,null,u,a):Vi(t,n,u,a),n.child;case 11:return uE(t,n,n.type,n.pendingProps,a);case 7:return Vi(t,n,n.pendingProps,a),n.child;case 8:return Vi(t,n,n.pendingProps.children,a),n.child;case 12:return n.flags|=4,n.flags|=2048,u=n.stateNode,u.effectDuration=-0,u.passiveEffectDuration=-0,Vi(t,n,n.pendingProps.children,a),n.child;case 10:return u=n.type,d=n.pendingProps,m=d.value,"value"in d||GC||(GC=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),cs(n,u,m),Vi(t,n,d.children,a),n.child;case 9:return d=n.type._context,u=n.pendingProps.children,typeof u!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),yr(n),d=Vt(d),Ht(n),u=Qv(u,d,void 0),Si(),n.flags|=1,Vi(t,n,u,a),n.child;case 14:return cE(t,n,n.type,n.pendingProps,a);case 15:return dE(t,n,n.type,n.pendingProps,a);case 19:return bE(t,n,a);case 31:return u=n.pendingProps,a=n.mode,u={mode:u.mode,children:u.children},t===null?(t=Mm(u,a),t.ref=n.ref,n.child=t,t.return=n,n=t):(t=Us(t.child,u),t.ref=n.ref,n.child=t,t.return=n,n=t),n;case 22:return hE(t,n,a);case 24:return yr(n),u=Vt(Mi),t===null?(d=sh(),d===null&&(d=Bt,m=ih(),d.pooledCache=m,ia(m),m!==null&&(d.pooledCacheLanes|=a),d=m),n.memoizedState={parent:u,cache:d},cl(n),cs(n,Mi,d)):(t.lanes&a&&(ch(t,n),fl(n,null,null,a),hl()),d=t.memoizedState,m=n.memoizedState,d.parent!==u?(d={parent:u,cache:u},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),cs(n,Mi,u)):(u=m.cache,cs(n,Mi,u),u!==d.cache&&th(n,[Mi],a,!0))),Vi(t,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function la(t){t.flags|=4}function _E(t,n){if(n.type!=="stylesheet"||(n.state.loading&Ms)!==Ul)t.flags&=-16777217;else if(t.flags|=16777216,!VM(n)){if(n=Es.current,n!==null&&((ft&4194048)===ft?Rr!==null:(ft&62914560)!==ft&&!(ft&536870912)||n!==Rr))throw cf=Bv,sC;t.flags|=8192}}function Dm(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Ot():536870912,t.lanes|=n,Ol|=n)}function wh(t,n){if(!yt)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function Xt(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,u=0;if(n)if((t.mode&Qi)!==$t){for(var d=t.selfBaseDuration,m=t.child;m!==null;)a|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,d+=m.treeBaseDuration,m=m.sibling;t.treeBaseDuration=d}else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,u|=d.subtreeFlags&65011712,u|=d.flags&65011712,d.return=t,d=d.sibling;else if((t.mode&Qi)!==$t){d=t.actualDuration,m=t.selfBaseDuration;for(var _=t.child;_!==null;)a|=_.lanes|_.childLanes,u|=_.subtreeFlags,u|=_.flags,d+=_.actualDuration,m+=_.treeBaseDuration,_=_.sibling;t.actualDuration=d,t.treeBaseDuration=m}else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,u|=d.subtreeFlags,u|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=u,t.childLanes=a,n}function nL(t,n,a){var u=n.pendingProps;switch(Kd(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(n),null;case 1:return Xt(n),null;case 3:return a=n.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),ii(Mi,n),Ae(n),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&($a(n)?(eh(),la(n)):t===null||t.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Jd())),Xt(n),null;case 26:return a=n.memoizedState,t===null?(la(n),a!==null?(Xt(n),_E(n,a)):(Xt(n),n.flags&=-16777217)):a?a!==t.memoizedState?(la(n),Xt(n),_E(n,a)):(Xt(n),n.flags&=-16777217):(t.memoizedProps!==u&&la(n),Xt(n),n.flags&=-16777217),null;case 27:pe(n),a=he(oo.current);var d=n.type;if(t!==null&&n.stateNode!=null)t.memoizedProps!==u&&la(n);else{if(!u){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Xt(n),null}t=ne(),$a(n)?rm(n):(t=zM(d,u,a,t,!0),n.stateNode=t,la(n))}return Xt(n),null;case 5:if(pe(n),a=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==u&&la(n);else{if(!u){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Xt(n),null}if(d=ne(),$a(n))rm(n);else{switch(t=he(oo.current),qa(a,d.ancestorInfo),d=d.context,t=Im(t),d){case Yc:t=t.createElementNS(mc,a);break;case Ag:t=t.createElementNS(Gm,a);break;default:switch(a){case"svg":t=t.createElementNS(mc,a);break;case"math":t=t.createElementNS(Gm,a);break;case"script":t=t.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof u.is=="string"?t.createElement("select",{is:u.is}):t.createElement("select"),u.multiple?t.multiple=!0:u.size&&(t.size=u.size);break;default:t=typeof u.is=="string"?t.createElement(a,{is:u.is}):t.createElement(a),a.indexOf("-")===-1&&(a!==a.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",a),Object.prototype.toString.call(t)!=="[object HTMLUnknownElement]"||fa.call(fA,a)||(fA[a]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",a)))}}t[rn]=n,t[Ln]=u;e:for(d=n.child;d!==null;){if(d.tag===5||d.tag===6)t.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===n)break e;for(;d.sibling===null;){if(d.return===null||d.return===n)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}n.stateNode=t;e:switch($i(t,a,u),a){case"button":case"input":case"select":case"textarea":t=!!u.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&la(n)}}return Xt(n),n.flags&=-16777217,null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==u&&la(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(t=he(oo.current),a=ne(),$a(n)){t=n.stateNode,a=n.memoizedProps,d=!Ta,u=null;var m=yn;if(m!==null)switch(m.tag){case 3:d&&(d=LM(t,a,u),d!==null&&(gr(n,0).serverProps=d));break;case 27:case 5:u=m.memoizedProps,d&&(d=LM(t,a,u),d!==null&&(gr(n,0).serverProps=d))}t[rn]=n,t=!!(t.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||xM(t.nodeValue,a)),t||ea(n)}else d=a.ancestorInfo.current,d!=null&&Rs(u,d.tag,a.ancestorInfo.implicitRootScope),t=Im(t).createTextNode(u),t[rn]=n,n.stateNode=t}return Xt(n),null;case 13:if(u=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=$a(n),u!==null&&u.dehydrated!==null){if(t===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");d[rn]=n,Xt(n),(n.mode&Qi)!==$t&&u!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration))}else eh(),tl(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4,Xt(n),(n.mode&Qi)!==$t&&u!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration));d=!1}else d=Jd(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(aa(n),n):(aa(n),null)}return aa(n),n.flags&128?(n.lanes=a,(n.mode&Qi)!==$t&&qs(n),n):(a=u!==null,t=t!==null&&t.memoizedState!==null,a&&(u=n.child,d=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(d=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==d&&(u.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Dm(n,n.updateQueue),Xt(n),(n.mode&Qi)!==$t&&a&&(t=n.child,t!==null&&(n.treeBaseDuration-=t.treeBaseDuration)),null);case 4:return Ae(n),t===null&&PT(n.stateNode.containerInfo),Xt(n),null;case 10:return ii(n.type,n),Xt(n),null;case 19:if(le(Ci,n),d=n.memoizedState,d===null)return Xt(n),null;if(u=(n.flags&128)!==0,m=d.rendering,m===null)if(u)wh(d,!1);else{if(ri!==Sa||t!==null&&t.flags&128)for(t=n.child;t!==null;){if(m=Sm(t),m!==null){for(n.flags|=128,wh(d,!1),t=m.updateQueue,n.updateQueue=t,Dm(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)Yu(a,t),a=a.sibling;return _e(Ci,Ci.current&Rc|pf,n),n.child}t=t.sibling}d.tail!==null&&Ar()>gg&&(n.flags|=128,u=!0,wh(d,!1),n.lanes=4194304)}else{if(!u)if(t=Sm(m),t!==null){if(n.flags|=128,u=!0,t=t.updateQueue,n.updateQueue=t,Dm(n,t),wh(d,!0),d.tail===null&&d.tailMode==="hidden"&&!m.alternate&&!yt)return Xt(n),null}else 2*Ar()-d.renderingStartTime>gg&&a!==536870912&&(n.flags|=128,u=!0,wh(d,!1),n.lanes=4194304);d.isBackwards?(m.sibling=n.child,n.child=m):(t=d.last,t!==null?t.sibling=m:n.child=m,d.last=m)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=Ar(),t.sibling=null,a=Ci.current,a=u?a&Rc|pf:a&Rc,_e(Ci,a,n),t):(Xt(n),null);case 22:case 23:return aa(n),fh(n),u=n.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?a&536870912&&!(n.flags&128)&&(Xt(n),n.subtreeFlags&6&&(n.flags|=8192)):Xt(n),a=n.updateQueue,a!==null&&Dm(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048),t!==null&&le(Dl,n),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ii(Mi,n),Xt(n),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function sL(t,n){switch(Kd(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&Qi)!==$t&&qs(n),n):null;case 3:return ii(Mi,n),Ae(n),t=n.flags,t&65536&&!(t&128)?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return pe(n),null;case 13:if(aa(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");tl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&Qi)!==$t&&qs(n),n):null;case 19:return le(Ci,n),null;case 4:return Ae(n),null;case 10:return ii(n.type,n),null;case 22:case 23:return aa(n),fh(n),t!==null&&le(Dl,n),t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&Qi)!==$t&&qs(n),n):null;case 24:return ii(Mi,n),null;case 25:return null;default:return null}}function SE(t,n){switch(Kd(n),n.tag){case 3:ii(Mi,n),Ae(n);break;case 26:case 27:case 5:pe(n);break;case 4:Ae(n);break;case 13:aa(n);break;case 19:le(Ci,n);break;case 10:ii(n.type,n);break;case 22:case 23:aa(n),fh(n),t!==null&&le(Dl,n);break;case 24:ii(Mi,n)}}function Sr(t){return(t.mode&Qi)!==$t}function xE(t,n){Sr(t)?(bt(),Nh(n,t),nn()):Nh(n,t)}function _T(t,n,a){Sr(t)?(bt(),tc(a,t,n),nn()):tc(a,t,n)}function Nh(t,n){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var d=u.next;a=d;do{if((a.tag&t)===t&&((t&Di)!==_s?Ne!==null&&typeof Ne.markComponentPassiveEffectMountStarted=="function"&&Ne.markComponentPassiveEffectMountStarted(n):(t&Gi)!==_s&&Ne!==null&&typeof Ne.markComponentLayoutEffectMountStarted=="function"&&Ne.markComponentLayoutEffectMountStarted(n),u=void 0,(t&Tn)!==_s&&(Vc=!0),u=Re(n,xR,a),(t&Tn)!==_s&&(Vc=!1),(t&Di)!==_s?Ne!==null&&typeof Ne.markComponentPassiveEffectMountStopped=="function"&&Ne.markComponentPassiveEffectMountStopped():(t&Gi)!==_s&&Ne!==null&&typeof Ne.markComponentLayoutEffectMountStopped=="function"&&Ne.markComponentLayoutEffectMountStopped(),u!==void 0&&typeof u!="function")){var m=void 0;m=a.tag&Gi?"useLayoutEffect":a.tag&Tn?"useInsertionEffect":"useEffect";var _=void 0;_=u===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof u.then=="function"?`
It looks like you wrote `+m+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
`+m+`(() => {
async function fetchData() {
// You can await here
const response = await MyAPI.getData(someId);
// ...
}
fetchData();
}, [someId]); // Or [] if effect doesn't need props or state
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+u,Re(n,function(M,N){console.error("%s must not return anything besides a function, which is used for clean-up.%s",M,N)},m,_)}a=a.next}while(a!==d)}}catch(M){Rt(n,n.return,M)}}function tc(t,n,a){try{var u=n.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var m=d.next;u=m;do{if((u.tag&t)===t){var _=u.inst,M=_.destroy;M!==void 0&&(_.destroy=void 0,(t&Di)!==_s?Ne!==null&&typeof Ne.markComponentPassiveEffectUnmountStarted=="function"&&Ne.markComponentPassiveEffectUnmountStarted(n):(t&Gi)!==_s&&Ne!==null&&typeof Ne.markComponentLayoutEffectUnmountStarted=="function"&&Ne.markComponentLayoutEffectUnmountStarted(n),(t&Tn)!==_s&&(Vc=!0),d=n,Re(d,ER,d,a,M),(t&Tn)!==_s&&(Vc=!1),(t&Di)!==_s?Ne!==null&&typeof Ne.markComponentPassiveEffectUnmountStopped=="function"&&Ne.markComponentPassiveEffectUnmountStopped():(t&Gi)!==_s&&Ne!==null&&typeof Ne.markComponentLayoutEffectUnmountStopped=="function"&&Ne.markComponentLayoutEffectUnmountStopped())}u=u.next}while(u!==m)}}catch(N){Rt(n,n.return,N)}}function EE(t,n){Sr(t)?(bt(),Nh(n,t),nn()):Nh(n,t)}function ST(t,n,a){Sr(t)?(bt(),tc(a,t,n),nn()):tc(a,t,n)}function ME(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;t.type.defaultProps||"ref"in t.memoizedProps||zc||(a.props!==t.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",fe(t)||"instance"),a.state!==t.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",fe(t)||"instance"));try{Re(t,lm,n,a)}catch(u){Rt(t,t.return,u)}}}function rL(t,n,a){return t.getSnapshotBeforeUpdate(n,a)}function aL(t,n){var a=n.memoizedProps,u=n.memoizedState;n=t.stateNode,t.type.defaultProps||"ref"in t.memoizedProps||zc||(n.props!==t.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",fe(t)||"instance"),n.state!==t.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",fe(t)||"instance"));try{var d=Tl(t.type,a,t.elementType===t.type),m=Re(t,rL,n,d,u);a=XC,m!==void 0||a.has(t.type)||(a.add(t.type),Re(t,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",fe(t))})),n.__reactInternalSnapshotBeforeUpdate=m}catch(_){Rt(t,t.return,_)}}function DE(t,n,a){a.props=Tl(t.type,t.memoizedProps),a.state=t.memoizedState,Sr(t)?(bt(),Re(t,SC,t,n,a),nn()):Re(t,SC,t,n,a)}function oL(t){var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}if(typeof n=="function")if(Sr(t))try{bt(),t.refCleanup=n(a)}finally{nn()}else t.refCleanup=n(a);else typeof n=="string"?console.error("String refs are no longer supported."):n.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",fe(t)),n.current=a}}function kh(t,n){try{Re(t,oL,t)}catch(a){Rt(t,n,a)}}function xr(t,n){var a=t.ref,u=t.refCleanup;if(a!==null)if(typeof u=="function")try{if(Sr(t))try{bt(),Re(t,u)}finally{nn(t)}else Re(t,u)}catch(d){Rt(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{if(Sr(t))try{bt(),Re(t,a,null)}finally{nn(t)}else Re(t,a,null)}catch(d){Rt(t,n,d)}else a.current=null}function CE(t,n,a,u){var d=t.memoizedProps,m=d.id,_=d.onCommit;d=d.onRender,n=n===null?"mount":"update",sg&&(n="nested-update"),typeof d=="function"&&d(m,n,t.actualDuration,t.treeBaseDuration,t.actualStartTime,a),typeof _=="function"&&_(t.memoizedProps.id,n,u,a)}function lL(t,n,a,u){var d=t.memoizedProps;t=d.id,d=d.onPostCommit,n=n===null?"mount":"update",sg&&(n="nested-update"),typeof d=="function"&&d(t,n,u,a)}function AE(t){var n=t.type,a=t.memoizedProps,u=t.stateNode;try{Re(t,NL,u,n,a,t)}catch(d){Rt(t,t.return,d)}}function xT(t,n,a){try{Re(t,kL,t.stateNode,t.type,a,n,t)}catch(u){Rt(t,t.return,u)}}function wE(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&so(t.type)||t.tag===4}function ET(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||wE(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&so(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function MT(t,n,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Om));else if(u!==4&&(u===27&&so(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(MT(t,n,a),t=t.sibling;t!==null;)MT(t,n,a),t=t.sibling}function Cm(t,n,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(u!==4&&(u===27&&so(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Cm(t,n,a),t=t.sibling;t!==null;)Cm(t,n,a),t=t.sibling}function uL(t){for(var n,a=t.return;a!==null;){if(wE(a)){n=a;break}a=a.return}if(n==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(n.tag){case 27:n=n.stateNode,a=ET(t),Cm(t,a,n);break;case 5:a=n.stateNode,n.flags&32&&(kM(a),n.flags&=-33),n=ET(t),Cm(t,n,a);break;case 3:case 4:n=n.stateNode.containerInfo,a=ET(t),MT(t,a,n);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function NE(t){var n=t.stateNode,a=t.memoizedProps;try{Re(t,VL,t.type,a,n,t)}catch(u){Rt(t,t.return,u)}}function cL(t,n){if(t=t.containerInfo,bb=Og,t=Jo(t),Fu(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var d=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var _=0,M=-1,N=-1,L=0,Z=0,ie=t,X=null;t:for(;;){for(var re;ie!==a||d!==0&&ie.nodeType!==3||(M=_+d),ie!==m||u!==0&&ie.nodeType!==3||(N=_+u),ie.nodeType===3&&(_+=ie.nodeValue.length),(re=ie.firstChild)!==null;)X=ie,ie=re;for(;;){if(ie===t)break t;if(X===a&&++L===d&&(M=_),X===m&&++Z===u&&(N=_),(re=ie.nextSibling)!==null)break;ie=X,X=ie.parentNode}ie=re}a=M===-1||N===-1?null:{start:M,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(_b={focusedElem:t,selectionRange:a},Og=!1,zi=n;zi!==null;)if(n=zi,t=n.child,(n.subtreeFlags&1024)!==0&&t!==null)t.return=n,zi=t;else for(;zi!==null;){switch(t=n=zi,a=t.alternate,d=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:d&1024&&a!==null&&aL(t,a);break;case 3:if(d&1024){if(t=t.stateNode.containerInfo,a=t.nodeType,a===9)QT(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":QT(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(d&1024)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(t=n.sibling,t!==null){t.return=n.return,zi=t;break}zi=n.return}}function kE(t,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:ca(t,a),u&4&&xE(a,Gi|Ss);break;case 1:if(ca(t,a),u&4)if(t=a.stateNode,n===null)a.type.defaultProps||"ref"in a.memoizedProps||zc||(t.props!==a.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",fe(a)||"instance"),t.state!==a.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",fe(a)||"instance")),Sr(a)?(bt(),Re(a,Gv,a,t),nn()):Re(a,Gv,a,t);else{var d=Tl(a.type,n.memoizedProps);n=n.memoizedState,a.type.defaultProps||"ref"in a.memoizedProps||zc||(t.props!==a.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",fe(a)||"instance"),t.state!==a.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",fe(a)||"instance")),Sr(a)?(bt(),Re(a,vC,a,t,d,n,t.__reactInternalSnapshotBeforeUpdate),nn()):Re(a,vC,a,t,d,n,t.__reactInternalSnapshotBeforeUpdate)}u&64&&ME(a),u&512&&kh(a,a.return);break;case 3:if(n=Bs(),ca(t,a),u&64&&(u=a.updateQueue,u!==null)){if(d=null,a.child!==null)switch(a.child.tag){case 27:case 5:d=a.child.stateNode;break;case 1:d=a.child.stateNode}try{Re(a,lm,u,d)}catch(_){Rt(a,a.return,_)}}t.effectDuration+=al(n);break;case 27:n===null&&u&4&&NE(a);case 26:case 5:ca(t,a),n===null&&u&4&&AE(a),u&512&&kh(a,a.return);break;case 12:if(u&4){u=Bs(),ca(t,a),t=a.stateNode,t.effectDuration+=ol(u);try{Re(a,CE,a,n,ng,t.effectDuration)}catch(_){Rt(a,a.return,_)}}else ca(t,a);break;case 13:ca(t,a),u&4&&LE(t,a),u&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=vL.bind(null,a),qL(t,a))));break;case 22:if(u=a.memoizedState!==null||_a,!u){n=n!==null&&n.memoizedState!==null||fi,d=_a;var m=fi;_a=u,(fi=n)&&!m?da(t,a,(a.subtreeFlags&8772)!==0):ca(t,a),_a=d,fi=m}break;case 30:break;default:ca(t,a)}}function OE(t){var n=t.alternate;n!==null&&(t.alternate=null,OE(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&ar(n)),t.stateNode=null,t._debugOwner=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function ua(t,n,a){for(a=a.child;a!==null;)IE(t,n,a),a=a.sibling}function IE(t,n,a){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(fc,a)}catch(m){wr||(wr=!0,console.error("React instrumentation encountered an error: %s",m))}switch(a.tag){case 26:fi||xr(a,n),ua(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:fi||xr(a,n);var u=bi,d=jn;so(a.type)&&(bi=a.stateNode,jn=!1),ua(t,n,a),Re(a,Uh,a.stateNode),bi=u,jn=d;break;case 5:fi||xr(a,n);case 6:if(u=bi,d=jn,bi=null,ua(t,n,a),bi=u,jn=d,bi!==null)if(jn)try{Re(a,LL,bi,a.stateNode)}catch(m){Rt(a,n,m)}else try{Re(a,IL,bi,a.stateNode)}catch(m){Rt(a,n,m)}break;case 18:bi!==null&&(jn?(t=bi,OM(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Fh(t)):OM(bi,a.stateNode));break;case 4:u=bi,d=jn,bi=a.stateNode.containerInfo,jn=!0,ua(t,n,a),bi=u,jn=d;break;case 0:case 11:case 14:case 15:fi||tc(Tn,a,n),fi||_T(a,n,Gi),ua(t,n,a);break;case 1:fi||(xr(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&DE(a,n,u)),ua(t,n,a);break;case 21:ua(t,n,a);break;case 22:fi=(u=fi)||a.memoizedState!==null,ua(t,n,a),fi=u;break;default:ua(t,n,a)}}function LE(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Re(n,HL,t)}catch(a){Rt(n,n.return,a)}}function dL(t){switch(t.tag){case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new WC),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new WC),n;default:throw Error("Unexpected Suspense handler tag ("+t.tag+"). This is a bug in React.")}}function DT(t,n){var a=dL(t);n.forEach(function(u){var d=bL.bind(null,t,u);if(!a.has(u)){if(a.add(u),Fs)if(Uc!==null&&Pc!==null)Rh(Pc,Uc);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");u.then(d,d)}})}function Wn(t,n){var a=n.deletions;if(a!==null)for(var u=0;u<a.length;u++){var d=t,m=n,_=a[u],M=m;e:for(;M!==null;){switch(M.tag){case 27:if(so(M.type)){bi=M.stateNode,jn=!1;break e}break;case 5:bi=M.stateNode,jn=!1;break e;case 3:case 4:bi=M.stateNode.containerInfo,jn=!0;break e}M=M.return}if(bi===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");IE(d,m,_),bi=null,jn=!1,d=_,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)RE(n,t),n=n.sibling}function RE(t,n){var a=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Wn(n,t),Kn(t),u&4&&(tc(Tn|Ss,t,t.return),Nh(Tn|Ss,t),_T(t,t.return,Gi|Ss));break;case 1:Wn(n,t),Kn(t),u&512&&(fi||a===null||xr(a,a.return)),u&64&&_a&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var d=Ys;if(Wn(n,t),Kn(t),u&512&&(fi||a===null||xr(a,a.return)),u&4)if(n=a!==null?a.memoizedState:null,u=t.memoizedState,a===null)if(u===null)if(t.stateNode===null){e:{u=t.type,a=t.memoizedProps,n=d.ownerDocument||d;t:switch(u){case"title":d=n.getElementsByTagName("title")[0],(!d||d[$h]||d[rn]||d.namespaceURI===mc||d.hasAttribute("itemprop"))&&(d=n.createElement(u),n.head.insertBefore(d,n.querySelector("head > title"))),$i(d,u,a),d[rn]=t,Q(d),u=d;break e;case"link":var m=FM("link","href",n).get(u+(a.href||""));if(m){for(var _=0;_<m.length;_++)if(d=m[_],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){m.splice(_,1);break t}}d=n.createElement(u),$i(d,u,a),n.head.appendChild(d);break;case"meta":if(m=FM("meta","content",n).get(u+(a.content||""))){for(_=0;_<m.length;_++)if(d=m[_],we(a.content,"content"),d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){m.splice(_,1);break t}}d=n.createElement(u),$i(d,u,a),n.head.appendChild(d);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+u+'". This is a bug in React.')}d[rn]=t,Q(d),u=d}t.stateNode=u}else HM(d,t.type,t.stateNode);else t.stateNode=qM(d,u,t.memoizedProps);else n!==u?(n===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):n.count--,u===null?HM(d,t.type,t.stateNode):qM(d,u,t.memoizedProps)):u===null&&t.stateNode!==null&&xT(t,t.memoizedProps,a.memoizedProps);break;case 27:Wn(n,t),Kn(t),u&512&&(fi||a===null||xr(a,a.return)),a!==null&&u&4&&xT(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Wn(n,t),Kn(t),u&512&&(fi||a===null||xr(a,a.return)),t.flags&32){n=t.stateNode;try{Re(t,kM,n)}catch(Z){Rt(t,t.return,Z)}}u&4&&t.stateNode!=null&&(n=t.memoizedProps,xT(t,n,a!==null?a.memoizedProps:n)),u&1024&&(tb=!0,t.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Wn(n,t),Kn(t),u&4){if(t.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");u=t.memoizedProps,a=a!==null?a.memoizedProps:u,n=t.stateNode;try{Re(t,OL,n,a,u)}catch(Z){Rt(t,t.return,Z)}}break;case 3:if(d=Bs(),wg=null,m=Ys,Ys=Lm(n.containerInfo),Wn(n,t),Ys=m,Kn(t),u&4&&a!==null&&a.memoizedState.isDehydrated)try{Re(t,FL,n.containerInfo)}catch(Z){Rt(t,t.return,Z)}tb&&(tb=!1,jE(t)),n.effectDuration+=al(d);break;case 4:u=Ys,Ys=Lm(t.stateNode.containerInfo),Wn(n,t),Kn(t),Ys=u;break;case 12:u=Bs(),Wn(n,t),Kn(t),t.stateNode.effectDuration+=ol(u);break;case 13:Wn(n,t),Kn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ob=Ar()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,DT(t,u)));break;case 22:d=t.memoizedState!==null;var M=a!==null&&a.memoizedState!==null,N=_a,L=fi;if(_a=N||d,fi=L||M,Wn(n,t),fi=L,_a=N,Kn(t),u&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&~Jm:n._visibility|Jm,d&&(a===null||M||_a||fi||vl(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){M=a=n;try{m=M.stateNode,d?Re(M,RL,m):Re(M,zL,M.stateNode,M.memoizedProps)}catch(Z){Rt(M,M.return,Z)}}}else if(n.tag===6){if(a===null){M=n;try{_=M.stateNode,d?Re(M,jL,_):Re(M,UL,_,M.memoizedProps)}catch(Z){Rt(M,M.return,Z)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=t.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,DT(t,a))));break;case 19:Wn(n,t),Kn(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,DT(t,u)));break;case 30:break;case 21:break;default:Wn(n,t),Kn(t)}}function Kn(t){var n=t.flags;if(n&2){try{Re(t,uL,t)}catch(a){Rt(t,t.return,a)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function jE(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;jE(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function ca(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)kE(t,n.alternate,n),n=n.sibling}function zE(t){switch(t.tag){case 0:case 11:case 14:case 15:_T(t,t.return,Gi),vl(t);break;case 1:xr(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&DE(t,t.return,n),vl(t);break;case 27:Re(t,Uh,t.stateNode);case 26:case 5:xr(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}}function vl(t){for(t=t.child;t!==null;)zE(t),t=t.sibling}function UE(t,n,a,u){var d=a.flags;switch(a.tag){case 0:case 11:case 15:da(t,a,u),xE(a,Gi);break;case 1:if(da(t,a,u),n=a.stateNode,typeof n.componentDidMount=="function"&&Re(a,Gv,a,n),n=a.updateQueue,n!==null){t=a.stateNode;try{Re(a,tT,n,t)}catch(m){Rt(a,a.return,m)}}u&&d&64&&ME(a),kh(a,a.return);break;case 27:NE(a);case 26:case 5:da(t,a,u),u&&n===null&&d&4&&AE(a),kh(a,a.return);break;case 12:if(u&&d&4){d=Bs(),da(t,a,u),u=a.stateNode,u.effectDuration+=ol(d);try{Re(a,CE,a,n,ng,u.effectDuration)}catch(m){Rt(a,a.return,m)}}else da(t,a,u);break;case 13:da(t,a,u),u&&d&4&&LE(t,a);break;case 22:a.memoizedState===null&&da(t,a,u),kh(a,a.return);break;case 30:break;default:da(t,a,u)}}function da(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;)UE(t,n.alternate,n,a),n=n.sibling}function CT(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&ia(t),a!=null&&rl(a))}function AT(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(ia(n),t!=null&&rl(t))}function Er(t,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)PE(t,n,a,u),n=n.sibling}function PE(t,n,a,u){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Er(t,n,a,u),d&2048&&EE(n,Di|Ss);break;case 1:Er(t,n,a,u);break;case 3:var m=Bs();Er(t,n,a,u),d&2048&&(a=null,n.alternate!==null&&(a=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==a&&(ia(n),a!=null&&rl(a))),t.passiveEffectDuration+=al(m);break;case 12:if(d&2048){d=Bs(),Er(t,n,a,u),t=n.stateNode,t.passiveEffectDuration+=ol(d);try{Re(n,lL,n,n.alternate,ng,t.passiveEffectDuration)}catch(M){Rt(n,n.return,M)}}else Er(t,n,a,u);break;case 13:Er(t,n,a,u);break;case 23:break;case 22:m=n.stateNode;var _=n.alternate;n.memoizedState!==null?m._visibility&ma?Er(t,n,a,u):Oh(t,n):m._visibility&ma?Er(t,n,a,u):(m._visibility|=ma,ic(t,n,a,u,(n.subtreeFlags&10256)!==0)),d&2048&&CT(_,n);break;case 24:Er(t,n,a,u),d&2048&&AT(n.alternate,n);break;default:Er(t,n,a,u)}}function ic(t,n,a,u,d){for(d=d&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;)BE(t,n,a,u,d),n=n.sibling}function BE(t,n,a,u,d){var m=n.flags;switch(n.tag){case 0:case 11:case 15:ic(t,n,a,u,d),EE(n,Di);break;case 23:break;case 22:var _=n.stateNode;n.memoizedState!==null?_._visibility&ma?ic(t,n,a,u,d):Oh(t,n):(_._visibility|=ma,ic(t,n,a,u,d)),d&&m&2048&&CT(n.alternate,n);break;case 24:ic(t,n,a,u,d),d&&m&2048&&AT(n.alternate,n);break;default:ic(t,n,a,u,d)}}function Oh(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,u=n,d=u.flags;switch(u.tag){case 22:Oh(a,u),d&2048&&CT(u.alternate,u);break;case 24:Oh(a,u),d&2048&&AT(u.alternate,u);break;default:Oh(a,u)}n=n.sibling}}function nc(t){if(t.subtreeFlags&mf)for(t=t.child;t!==null;)qE(t),t=t.sibling}function qE(t){switch(t.tag){case 26:nc(t),t.flags&mf&&t.memoizedState!==null&&GL(Ys,t.memoizedState,t.memoizedProps);break;case 5:nc(t);break;case 3:case 4:var n=Ys;Ys=Lm(t.stateNode.containerInfo),nc(t),Ys=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=mf,mf=16777216,nc(t),mf=n):nc(t));break;default:nc(t)}}function FE(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function Ih(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];zi=u,$E(u,t)}FE(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)HE(t),t=t.sibling}function HE(t){switch(t.tag){case 0:case 11:case 15:Ih(t),t.flags&2048&&ST(t,t.return,Di|Ss);break;case 3:var n=Bs();Ih(t),t.stateNode.passiveEffectDuration+=al(n);break;case 12:n=Bs(),Ih(t),t.stateNode.passiveEffectDuration+=ol(n);break;case 22:n=t.stateNode,t.memoizedState!==null&&n._visibility&ma&&(t.return===null||t.return.tag!==13)?(n._visibility&=~ma,Am(t)):Ih(t);break;default:Ih(t)}}function Am(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];zi=u,$E(u,t)}FE(t)}for(t=t.child;t!==null;)VE(t),t=t.sibling}function VE(t){switch(t.tag){case 0:case 11:case 15:ST(t,t.return,Di),Am(t);break;case 22:var n=t.stateNode;n._visibility&ma&&(n._visibility&=~ma,Am(t));break;default:Am(t)}}function $E(t,n){for(;zi!==null;){var a=zi,u=a;switch(u.tag){case 0:case 11:case 15:ST(u,n,Di);break;case 23:case 22:u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(u=u.memoizedState.cachePool.pool,u!=null&&ia(u));break;case 24:rl(u.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,zi=u;else e:for(a=t;zi!==null;){u=zi;var d=u.sibling,m=u.return;if(OE(u),u===a){zi=null;break e}if(d!==null){d.return=m,zi=d;break e}zi=m}}}function hL(){DR.forEach(function(t){return t()})}function YE(){var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return t||te.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),t}function Zn(t){if((Mt&vn)!==ts&&ft!==0)return ft&-ft;var n=te.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(t),t=Ml,t!==0?t:zT()):Ua()}function QE(){ns===0&&(ns=!(ft&536870912)||yt?De():536870912);var t=Es.current;return t!==null&&(t.flags|=32),ns}function hi(t,n,a){if(Vc&&console.error("useInsertionEffect must not schedule updates."),hb&&(yg=!0),(t===Bt&&(Nt===Nl||Nt===kl)||t.cancelPendingCommit!==null)&&(rc(t,0),io(t,ft,ns,!1)),li(t,a),Mt&vn&&t===Bt){if(kr)switch(n.tag){case 0:case 11:case 15:t=ht&&fe(ht)||"Unknown",aA.has(t)||(aA.add(t),n=fe(n)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",n,t,t));break;case 1:rA||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),rA=!0)}}else Fs&&ui(t,n,a),SL(n),t===Bt&&((Mt&vn)===ts&&(To|=a),ri===wl&&io(t,ft,ns,!1)),Mr(t)}function GE(t,n,a){if((Mt&(vn|Qs))!==ts)throw Error("Should not already be working.");var u=!a&&(n&124)===0&&(n&t.expiredLanes)===0||Je(t,n),d=u?pL(t,n):kT(t,n,!0),m=u;do{if(d===Sa){Fc&&!u&&io(t,n,0,!1);break}else{if(a=t.current.alternate,m&&!fL(a)){d=kT(t,n,!1),m=!1;continue}if(d===Bc){if(m=n,t.errorRecoveryDisabledLanes&m)var _=0;else _=t.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){n=_;e:{d=t;var M=_;_=_f;var N=d.current.memoizedState.isDehydrated;if(N&&(rc(d,M).flags|=256),M=kT(d,M,!1),M!==Bc){if(rb&&!N){d.errorRecoveryDisabledLanes|=m,To|=m,d=wl;break e}d=bn,bn=_,d!==null&&(bn===null?bn=d:bn.push.apply(bn,d))}d=M}if(m=!1,d!==Bc)continue}}if(d===yf){rc(t,0),io(t,n,0,!0);break}e:{switch(u=t,d){case Sa:case yf:throw Error("Root did not complete. This is a bug in React.");case wl:if((n&4194048)!==n)break;case pg:io(u,n,ns,!go);break e;case Bc:bn=null;break;case ib:case KC:break;default:throw Error("Unknown root exit status.")}if(te.actQueue!==null)OT(u,a,n,bn,Sf,mg,ns,To,Ol);else{if((n&62914560)===n&&(m=ob+JC-Ar(),10<m)){if(io(u,n,ns,!go),Tt(u,0,!0)!==0)break e;u.timeoutHandle=pA(XE.bind(null,u,a,bn,Sf,mg,n,ns,To,Ol,go,d,NR,tC,0),m);break e}XE(u,a,bn,Sf,mg,n,ns,To,Ol,go,d,AR,tC,0)}}}break}while(1);Mr(t)}function XE(t,n,a,u,d,m,_,M,N,L,Z,ie,X,re){if(t.timeoutHandle=zl,ie=n.subtreeFlags,(ie&8192||(ie&16785408)===16785408)&&(Af={stylesheets:null,count:0,unsuspend:QL},qE(n),ie=XL(),ie!==null)){t.cancelPendingCommit=ie(OT.bind(null,t,n,m,a,u,d,_,M,N,Z,wR,X,re)),io(t,m,_,!L);return}OT(t,n,m,a,u,d,_,M,N)}function fL(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var d=a[u],m=d.getSnapshot;d=d.value;try{if(!gn(m(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function io(t,n,a,u){n&=~ab,n&=~To,t.suspendedLanes|=n,t.pingedLanes&=~n,u&&(t.warmLanes|=n),u=t.expirationTimes;for(var d=n;0<d;){var m=31-pn(d),_=1<<m;u[m]=-1,d&=~_}a!==0&&gi(t,a,n)}function sc(){return(Mt&(vn|Qs))===ts?(jh(0,!1),!1):!0}function wT(){if(ht!==null){if(Nt===zn)var t=ht.return;else t=ht,di(),vh(t),Ic=null,ff=0,t=ht;for(;t!==null;)SE(t.alternate,t),t=t.return;ht=null}}function rc(t,n){var a=t.timeoutHandle;a!==zl&&(t.timeoutHandle=zl,HR(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),wT(),Bt=t,ht=a=Us(t.current,null),ft=n,Nt=zn,is=null,go=!1,Fc=Je(t,n),rb=!1,ri=Sa,Ol=ns=ab=To=yo=0,bn=_f=null,mg=!1,n&8&&(n|=n&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=n;0<u;){var d=31-pn(u),m=1<<d;n|=t[d],u&=~m}return jr=n,Fa(),n=JD(),1e3<n-ZD&&(te.recentlyCreatedOwnerStacks=0,ZD=n),Vs.discardPendingWarnings(),a}function WE(t,n){Ke=null,te.H=hg,te.getCurrentStack=null,kr=!1,es=null,n===uf||n===og?(n=Ku(),Nt=vf):n===sC?(n=Ku(),Nt=ZC):Nt=n===FC?sb:n!==null&&typeof n=="object"&&typeof n.then=="function"?qc:Tf,is=n;var a=ht;if(a===null)ri=yf,xm(t,Fi(n,t.current));else switch(a.mode&Qi&&Xu(a),Si(),Nt){case Tf:Ne!==null&&typeof Ne.markComponentErrored=="function"&&Ne.markComponentErrored(a,n,ft);break;case Nl:case kl:case vf:case qc:case bf:Ne!==null&&typeof Ne.markComponentSuspended=="function"&&Ne.markComponentSuspended(a,n,ft)}}function KE(){var t=te.H;return te.H=hg,t===null?hg:t}function ZE(){var t=te.A;return te.A=MR,t}function NT(){ri=wl,go||(ft&4194048)!==ft&&Es.current!==null||(Fc=!0),!(yo&134217727)&&!(To&134217727)||Bt===null||io(Bt,ft,ns,!1)}function kT(t,n,a){var u=Mt;Mt|=vn;var d=KE(),m=ZE();if(Bt!==t||ft!==n){if(Fs){var _=t.memoizedUpdaters;0<_.size&&(Rh(t,ft),_.clear()),ks(t,n)}Sf=null,rc(t,n)}ye(n),n=!1,_=ri;e:do try{if(Nt!==zn&&ht!==null){var M=ht,N=is;switch(Nt){case sb:wT(),_=pg;break e;case vf:case Nl:case kl:case qc:Es.current===null&&(n=!0);var L=Nt;if(Nt=zn,is=null,ac(t,M,N,L),a&&Fc){_=Sa;break e}break;default:L=Nt,Nt=zn,is=null,ac(t,M,N,L)}}JE(),_=ri;break}catch(Z){WE(t,Z)}while(1);return n&&t.shellSuspendCounter++,di(),Mt=u,te.H=d,te.A=m,xe(),ht===null&&(Bt=null,ft=0,Fa()),_}function JE(){for(;ht!==null;)eM(ht)}function pL(t,n){var a=Mt;Mt|=vn;var u=KE(),d=ZE();if(Bt!==t||ft!==n){if(Fs){var m=t.memoizedUpdaters;0<m.size&&(Rh(t,ft),m.clear()),ks(t,n)}Sf=null,gg=Ar()+eA,rc(t,n)}else Fc=Je(t,n);ye(n);e:do try{if(Nt!==zn&&ht!==null)t:switch(n=ht,m=is,Nt){case Tf:Nt=zn,is=null,ac(t,n,m,Tf);break;case Nl:case kl:if(oh(m)){Nt=zn,is=null,tM(n);break}n=function(){Nt!==Nl&&Nt!==kl||Bt!==t||(Nt=bf),Mr(t)},m.then(n,n);break e;case vf:Nt=bf;break e;case ZC:Nt=nb;break e;case bf:oh(m)?(Nt=zn,is=null,tM(n)):(Nt=zn,is=null,ac(t,n,m,bf));break;case nb:var _=null;switch(ht.tag){case 26:_=ht.memoizedState;case 5:case 27:var M=ht;if(!_||VM(_)){Nt=zn,is=null;var N=M.sibling;if(N!==null)ht=N;else{var L=M.return;L!==null?(ht=L,wm(L)):ht=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Nt=zn,is=null,ac(t,n,m,nb);break;case qc:Nt=zn,is=null,ac(t,n,m,qc);break;case sb:wT(),ri=pg;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}te.actQueue!==null?JE():mL();break}catch(Z){WE(t,Z)}while(1);return di(),te.H=u,te.A=d,Mt=a,ht!==null?(Ne!==null&&typeof Ne.markRenderYielded=="function"&&Ne.markRenderYielded(),Sa):(xe(),Bt=null,ft=0,Fa(),ri)}function mL(){for(;ht!==null&&!d5();)eM(ht)}function eM(t){var n=t.alternate;(t.mode&Qi)!==$t?(na(t),n=Re(t,bT,n,t,jr),Xu(t)):n=Re(t,bT,n,t,jr),t.memoizedProps=t.pendingProps,n===null?wm(t):ht=n}function tM(t){var n=Re(t,gL,t);t.memoizedProps=t.pendingProps,n===null?wm(t):ht=n}function gL(t){var n=t.alternate,a=(t.mode&Qi)!==$t;switch(a&&na(t),t.tag){case 15:case 0:n=pE(n,t,t.pendingProps,t.type,void 0,ft);break;case 11:n=pE(n,t,t.pendingProps,t.type.render,t.ref,ft);break;case 5:vh(t);default:SE(n,t),t=ht=Yu(t,jr),n=bT(n,t,jr)}return a&&Xu(t),n}function ac(t,n,a,u){di(),vh(n),Ic=null,ff=0;var d=n.return;try{if(tL(t,d,n,a,ft)){ri=yf,xm(t,Fi(a,t.current)),ht=null;return}}catch(m){if(d!==null)throw ht=d,m;ri=yf,xm(t,Fi(a,t.current)),ht=null;return}n.flags&32768?(yt||u===Tf?t=!0:Fc||ft&536870912?t=!1:(go=t=!0,(u===Nl||u===kl||u===vf||u===qc)&&(u=Es.current,u!==null&&u.tag===13&&(u.flags|=16384))),iM(n,t)):wm(n)}function wm(t){var n=t;do{if(n.flags&32768){iM(n,go);return}var a=n.alternate;if(t=n.return,na(n),a=Re(n,nL,a,n,jr),(n.mode&Qi)!==$t&&ll(n),a!==null){ht=a;return}if(n=n.sibling,n!==null){ht=n;return}ht=n=t}while(n!==null);ri===Sa&&(ri=KC)}function iM(t,n){do{var a=sL(t.alternate,t);if(a!==null){a.flags&=32767,ht=a;return}if((t.mode&Qi)!==$t){ll(t),a=t.actualDuration;for(var u=t.child;u!==null;)a+=u.actualDuration,u=u.sibling;t.actualDuration=a}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){ht=t;return}ht=t=a}while(t!==null);ri=pg,ht=null}function OT(t,n,a,u,d,m,_,M,N){t.cancelPendingCommit=null;do Lh();while(Xi!==Il);if(Vs.flushLegacyContextWarning(),Vs.flushPendingUnsafeLifecycleWarnings(),(Mt&(vn|Qs))!==ts)throw Error("Should not already be working.");if(Ne!==null&&typeof Ne.markCommitStarted=="function"&&Ne.markCommitStarted(a),n===null)dt();else{if(a===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),n===t.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(m=n.lanes|n.childLanes,m|=Rv,Ut(t,a,m,_,M,N),t===Bt&&(ht=Bt=null,ft=0),Hc=n,bo=t,_o=a,ub=m,cb=d,sA=u,n.subtreeFlags&10256||n.flags&10256?(t.callbackNode=null,t.callbackPriority=0,_L(hc,function(){return oM(),null})):(t.callbackNode=null,t.callbackPriority=0),ng=Ac(),u=(n.flags&13878)!==0,n.subtreeFlags&13878||u){u=te.T,te.T=null,d=Et.p,Et.p=ms,_=Mt,Mt|=Qs;try{cL(t,n,a)}finally{Mt=_,Et.p=d,te.T=u}}Xi=tA,nM(),sM(),rM()}}function nM(){if(Xi===tA){Xi=Il;var t=bo,n=Hc,a=_o,u=(n.flags&13878)!==0;if(n.subtreeFlags&13878||u){u=te.T,te.T=null;var d=Et.p;Et.p=ms;var m=Mt;Mt|=Qs;try{Uc=a,Pc=t,RE(n,t),Pc=Uc=null,a=_b;var _=Jo(t.containerInfo),M=a.focusedElem,N=a.selectionRange;if(_!==M&&M&&M.ownerDocument&&us(M.ownerDocument.documentElement,M)){if(N!==null&&Fu(M)){var L=N.start,Z=N.end;if(Z===void 0&&(Z=L),"selectionStart"in M)M.selectionStart=L,M.selectionEnd=Math.min(Z,M.value.length);else{var ie=M.ownerDocument||document,X=ie&&ie.defaultView||window;if(X.getSelection){var re=X.getSelection(),Ie=M.textContent.length,Ge=Math.min(N.start,Ie),qt=N.end===void 0?Ge:Math.min(N.end,Ie);!re.extend&&Ge>qt&&(_=qt,qt=Ge,Ge=_);var mt=kn(M,Ge),B=kn(M,qt);if(mt&&B&&(re.rangeCount!==1||re.anchorNode!==mt.node||re.anchorOffset!==mt.offset||re.focusNode!==B.node||re.focusOffset!==B.offset)){var q=ie.createRange();q.setStart(mt.node,mt.offset),re.removeAllRanges(),Ge>qt?(re.addRange(q),re.extend(B.node,B.offset)):(q.setEnd(B.node,B.offset),re.addRange(q))}}}}for(ie=[],re=M;re=re.parentNode;)re.nodeType===1&&ie.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<ie.length;M++){var V=ie[M];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Og=!!bb,_b=bb=null}finally{Mt=m,Et.p=d,te.T=u}}t.current=n,Xi=iA}}function sM(){if(Xi===iA){Xi=Il;var t=bo,n=Hc,a=_o,u=(n.flags&8772)!==0;if(n.subtreeFlags&8772||u){u=te.T,te.T=null;var d=Et.p;Et.p=ms;var m=Mt;Mt|=Qs;try{Ne!==null&&typeof Ne.markLayoutEffectsStarted=="function"&&Ne.markLayoutEffectsStarted(a),Uc=a,Pc=t,kE(t,n.alternate,n),Pc=Uc=null,Ne!==null&&typeof Ne.markLayoutEffectsStopped=="function"&&Ne.markLayoutEffectsStopped()}finally{Mt=m,Et.p=d,te.T=u}}Xi=nA}}function rM(){if(Xi===kR||Xi===nA){Xi=Il,h5();var t=bo,n=Hc,a=_o,u=sA,d=(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;d?Xi=lb:(Xi=Il,Hc=bo=null,aM(t,t.pendingLanes),Ll=0,Ef=null);var m=t.pendingLanes;if(m===0&&(vo=null),d||dM(t),d=An(a),n=n.stateNode,sn&&typeof sn.onCommitFiberRoot=="function")try{var _=(n.current.flags&128)===128;switch(d){case ms:var M=fv;break;case Nr:M=pv;break;case pa:M=hc;break;case Ym:M=mv;break;default:M=hc}sn.onCommitFiberRoot(fc,n,M,_)}catch(ie){wr||(wr=!0,console.error("React instrumentation encountered an error: %s",ie))}if(Fs&&t.memoizedUpdaters.clear(),hL(),u!==null){_=te.T,M=Et.p,Et.p=ms,te.T=null;try{var N=t.onRecoverableError;for(n=0;n<u.length;n++){var L=u[n],Z=yL(L.stack);Re(L.source,N,L.value,Z)}}finally{te.T=_,Et.p=M}}_o&3&&Lh(),Mr(t),m=t.pendingLanes,a&4194090&&m&42?(rg=!0,t===db?xf++:(xf=0,db=t)):xf=0,jh(0,!1),dt()}}function yL(t){return t={componentStack:t},Object.defineProperty(t,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),t}function aM(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,rl(n)))}function Lh(t){return nM(),sM(),rM(),oM()}function oM(){if(Xi!==lb)return!1;var t=bo,n=ub;ub=0;var a=An(_o),u=pa>a?pa:a;a=te.T;var d=Et.p;try{Et.p=u,te.T=null,u=cb,cb=null;var m=bo,_=_o;if(Xi=Il,Hc=bo=null,_o=0,(Mt&(vn|Qs))!==ts)throw Error("Cannot flush passive effects while already rendering.");hb=!0,yg=!1,Ne!==null&&typeof Ne.markPassiveEffectsStarted=="function"&&Ne.markPassiveEffectsStarted(_);var M=Mt;if(Mt|=Qs,HE(m.current),PE(m,m.current,_,u),Ne!==null&&typeof Ne.markPassiveEffectsStopped=="function"&&Ne.markPassiveEffectsStopped(),dM(m),Mt=M,jh(0,!1),yg?m===Ef?Ll++:(Ll=0,Ef=m):Ll=0,yg=hb=!1,sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(fc,m)}catch(L){wr||(wr=!0,console.error("React instrumentation encountered an error: %s",L))}var N=m.current.stateNode;return N.effectDuration=0,N.passiveEffectDuration=0,!0}finally{Et.p=d,te.T=a,aM(t,n)}}function lM(t,n,a){n=Fi(a,n),n=uT(t.stateNode,n,2),t=Tr(t,n,2),t!==null&&(li(t,2),Mr(t))}function Rt(t,n,a){if(Vc=!1,t.tag===3)lM(t,t,a);else{for(;n!==null;){if(n.tag===3){lM(n,t,a);return}if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(vo===null||!vo.has(u))){t=Fi(a,t),a=cT(2),u=Tr(n,a,2),u!==null&&(dT(a,u,n,t),li(u,2),Mr(u));return}}n=n.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
Error message:
%s`,a)}}function IT(t,n,a){var u=t.pingCache;if(u===null){u=t.pingCache=new CR;var d=new Set;u.set(n,d)}else d=u.get(n),d===void 0&&(d=new Set,u.set(n,d));d.has(a)||(rb=!0,d.add(a),u=TL.bind(null,t,n,a),Fs&&Rh(t,a),n.then(u,u))}function TL(t,n,a){var u=t.pingCache;u!==null&&u.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,YE()&&te.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
When testing, code that resolves suspended data should be wrapped into act(...):
act(() => {
/* finish loading suspended data */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),Bt===t&&(ft&a)===a&&(ri===wl||ri===ib&&(ft&62914560)===ft&&Ar()-ob<JC?(Mt&vn)===ts&&rc(t,0):ab|=a,Ol===ft&&(Ol=0)),Mr(t)}function uM(t,n){n===0&&(n=Ot()),t=xi(t,n),t!==null&&(li(t,n),Mr(t))}function vL(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),uM(t,a)}function bL(t,n){var a=0;switch(t.tag){case 13:var u=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}u!==null&&u.delete(n),uM(t,a)}function LT(t,n,a){if(n.subtreeFlags&67117056)for(n=n.child;n!==null;){var u=t,d=n,m=d.type===qm;m=a||m,d.tag!==22?d.flags&67108864?m&&Re(d,cM,u,d,(d.mode&XD)===$t):LT(u,d,m):d.memoizedState===null&&(m&&d.flags&8192?Re(d,cM,u,d):d.subtreeFlags&67108864&&Re(d,LT,u,d,m)),n=n.sibling}}function cM(t,n){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;He(!0);try{zE(n),a&&VE(n),UE(t,n.alternate,n,!1),a&&BE(t,n,0,null,!1,0)}finally{He(!1)}}function dM(t){var n=!0;t.current.mode&(an|Hs)||(n=!1),LT(t,t.current,n)}function hM(t){if((Mt&vn)===ts){var n=t.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=fe(t)||"ReactComponent",Tg!==null){if(Tg.has(n))return;Tg.add(n)}else Tg=new Set([n]);Re(t,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function Rh(t,n){Fs&&t.memoizedUpdaters.forEach(function(a){ui(t,a,n)})}function _L(t,n){var a=te.actQueue;return a!==null?(a.push(n),LR):hv(t,n)}function SL(t){YE()&&te.actQueue===null&&Re(t,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,fe(t))})}function Mr(t){t!==$c&&t.next===null&&($c===null?vg=$c=t:$c=$c.next=t),bg=!0,te.actQueue!==null?pb||(pb=!0,gM()):fb||(fb=!0,gM())}function jh(t,n){if(!mb&&bg){mb=!0;do for(var a=!1,u=vg;u!==null;){if(!n)if(t!==0){var d=u.pendingLanes;if(d===0)var m=0;else{var _=u.suspendedLanes,M=u.pingedLanes;m=(1<<31-pn(42|t)+1)-1,m&=d&~(_&~M),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,mM(u,m))}else m=ft,m=Tt(u,u===Bt?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==zl),!(m&3)||Je(u,m)||(a=!0,mM(u,m));u=u.next}while(a);mb=!1}}function xL(){RT()}function RT(){bg=pb=fb=!1;var t=0;Rl!==0&&(AL()&&(t=Rl),Rl=0);for(var n=Ar(),a=null,u=vg;u!==null;){var d=u.next,m=fM(u,n);m===0?(u.next=null,a===null?vg=d:a.next=d,d===null&&($c=a)):(a=u,(t!==0||m&3)&&(bg=!0)),u=d}jh(t,!1)}function fM(t,n){for(var a=t.suspendedLanes,u=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var _=31-pn(m),M=1<<_,N=d[_];N===-1?(!(M&a)||M&u)&&(d[_]=Oi(M,n)):N<=n&&(t.expiredLanes|=M),m&=~M}if(n=Bt,a=ft,a=Tt(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==zl),u=t.callbackNode,a===0||t===n&&(Nt===Nl||Nt===kl)||t.cancelPendingCommit!==null)return u!==null&&jT(u),t.callbackNode=null,t.callbackPriority=0;if(!(a&3)||Je(t,a)){if(n=a&-a,n!==t.callbackPriority||te.actQueue!==null&&u!==gb)jT(u);else return n;switch(An(a)){case ms:case Nr:a=pv;break;case pa:a=hc;break;case Ym:a=mv;break;default:a=hc}return u=pM.bind(null,t),te.actQueue!==null?(te.actQueue.push(u),a=gb):a=hv(a,u),t.callbackPriority=n,t.callbackNode=a,n}return u!==null&&jT(u),t.callbackPriority=2,t.callbackNode=null,2}function pM(t,n){if(rg=sg=!1,Xi!==Il&&Xi!==lb)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Lh()&&t.callbackNode!==a)return null;var u=ft;return u=Tt(t,t===Bt?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==zl),u===0?null:(GE(t,u,n),fM(t,Ar()),t.callbackNode!=null&&t.callbackNode===a?pM.bind(null,t):null)}function mM(t,n){if(Lh())return null;sg=rg,rg=!1,GE(t,n,!0)}function jT(t){t!==gb&&t!==null&&c5(t)}function gM(){te.actQueue!==null&&te.actQueue.push(function(){return RT(),null}),VR(function(){(Mt&(vn|Qs))!==ts?hv(fv,xL):RT()})}function zT(){return Rl===0&&(Rl=De()),Rl}function yM(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:(we(t,"action"),Qo(""+t))}function TM(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function EL(t,n,a,u,d){if(n==="submit"&&a&&a.stateNode===d){var m=yM((d[Ln]||null).action),_=u.submitter;_&&(n=(n=_[Ln]||null)?yM(n.formAction):_.getAttribute("formAction"),n!==null&&(m=n,_=null));var M=new Km("action","action",null,u,d);t.push({event:M,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Rl!==0){var N=_?TM(d,_):new FormData(d),L={pending:!0,data:N,method:d.method,action:m};Object.freeze(L),fn(a,L,null,N)}}else typeof m=="function"&&(M.preventDefault(),N=_?TM(d,_):new FormData(d),L={pending:!0,data:N,method:d.method,action:m},Object.freeze(L),fn(a,L,m,N))},currentTarget:d}]})}}function Nm(t,n,a){t.currentTarget=a;try{n(t)}catch(u){Kv(u)}t.currentTarget=null}function vM(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var u=t[a];e:{var d=void 0,m=u.event;if(u=u.listeners,n)for(var _=u.length-1;0<=_;_--){var M=u[_],N=M.instance,L=M.currentTarget;if(M=M.listener,N!==d&&m.isPropagationStopped())break e;N!==null?Re(N,Nm,m,M,L):Nm(m,M,L),d=N}else for(_=0;_<u.length;_++){if(M=u[_],N=M.instance,L=M.currentTarget,M=M.listener,N!==d&&m.isPropagationStopped())break e;N!==null?Re(N,Nm,m,M,L):Nm(m,M,L),d=N}}}}function pt(t,n){yb.has(t)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',t);var a=n[gv];a===void 0&&(a=n[gv]=new Set);var u=t+"__bubble";a.has(u)||(bM(n,t,2,!1),a.add(u))}function UT(t,n,a){yb.has(t)&&!n&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',t);var u=0;n&&(u|=4),bM(a,t,u,n)}function PT(t){if(!t[_g]){t[_g]=!0,nD.forEach(function(a){a!=="selectionchange"&&(yb.has(a)||UT(a,!1,t),UT(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[_g]||(n[_g]=!0,UT("selectionchange",!1,n))}}function bM(t,n,a,u){switch(XM(n)){case ms:var d=e5;break;case Nr:d=t5;break;default:d=ev}a=d.bind(null,n,a,t),d=void 0,!Ev||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),u?d!==void 0?t.addEventListener(n,a,{capture:!0,passive:d}):t.addEventListener(n,a,!0):d!==void 0?t.addEventListener(n,a,{passive:d}):t.addEventListener(n,a,!1)}function BT(t,n,a,u,d){var m=u;if(!(n&1)&&!(n&2)&&u!==null)e:for(;;){if(u===null)return;var _=u.tag;if(_===3||_===4){var M=u.stateNode.containerInfo;if(M===d)break;if(_===4)for(_=u.return;_!==null;){var N=_.tag;if((N===3||N===4)&&_.stateNode.containerInfo===d)return;_=_.return}for(;M!==null;){if(_=tn(M),_===null)return;if(N=_.tag,N===5||N===6||N===26||N===27){u=m=_;continue e}M=M.parentNode}}u=u.return}Go(function(){var L=m,Z=ju(a),ie=[];e:{var X=GD.get(t);if(X!==void 0){var re=Km,Ie=t;switch(t){case"keypress":if(zu(a)===0)break e;case"keydown":case"keyup":re=K5;break;case"focusin":Ie="focus",re=Av;break;case"focusout":Ie="blur",re=Av;break;case"beforeblur":case"afterblur":re=Av;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=LD;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=P5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=eR;break;case VD:case $D:case YD:re=F5;break;case QD:re=iR;break;case"scroll":case"scrollend":re=z5;break;case"wheel":re=sR;break;case"copy":case"cut":case"paste":re=V5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=jD;break;case"toggle":case"beforetoggle":re=aR}var Ge=(n&4)!==0,qt=!Ge&&(t==="scroll"||t==="scrollend"),mt=Ge?X!==null?X+"Capture":null:X;Ge=[];for(var B=L,q;B!==null;){var V=B;if(q=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||q===null||mt===null||(V=js(B,mt),V!=null&&Ge.push(zh(B,V,q))),qt)break;B=B.return}0<Ge.length&&(X=new re(X,Ie,null,a,Z),ie.push({event:X,listeners:Ge}))}}if(!(n&7)){e:{if(X=t==="mouseover"||t==="pointerover",re=t==="mouseout"||t==="pointerout",X&&a!==Qh&&(Ie=a.relatedTarget||a.fromElement)&&(tn(Ie)||Ie[uo]))break e;if((re||X)&&(X=Z.window===Z?Z:(X=Z.ownerDocument)?X.defaultView||X.parentWindow:window,re?(Ie=a.relatedTarget||a.toElement,re=L,Ie=Ie?tn(Ie):null,Ie!==null&&(qt=U(Ie),Ge=Ie.tag,Ie!==qt||Ge!==5&&Ge!==27&&Ge!==6)&&(Ie=null)):(re=null,Ie=L),re!==Ie)){if(Ge=LD,V="onMouseLeave",mt="onMouseEnter",B="mouse",(t==="pointerout"||t==="pointerover")&&(Ge=jD,V="onPointerLeave",mt="onPointerEnter",B="pointer"),qt=re==null?X:or(re),q=Ie==null?X:or(Ie),X=new Ge(V,B+"leave",re,a,Z),X.target=qt,X.relatedTarget=q,V=null,tn(Z)===L&&(Ge=new Ge(mt,B+"enter",Ie,a,Z),Ge.target=q,Ge.relatedTarget=qt,V=Ge),qt=V,re&&Ie)t:{for(Ge=re,mt=Ie,B=0,q=Ge;q;q=oc(q))B++;for(q=0,V=mt;V;V=oc(V))q++;for(;0<B-q;)Ge=oc(Ge),B--;for(;0<q-B;)mt=oc(mt),q--;for(;B--;){if(Ge===mt||mt!==null&&Ge===mt.alternate)break t;Ge=oc(Ge),mt=oc(mt)}Ge=null}else Ge=null;re!==null&&_M(ie,X,re,Ge,!1),Ie!==null&&qt!==null&&_M(ie,qt,Ie,Ge,!0)}}e:{if(X=L?or(L):window,re=X.nodeName&&X.nodeName.toLowerCase(),re==="select"||re==="input"&&X.type==="file")var ae=Wo;else if(Jp(X))if(FD)ae=qu;else{ae=Ky;var Me=Wy}else re=X.nodeName,!re||re.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?L&&Yo(L.elementType)&&(ae=Wo):ae=Zy;if(ae&&(ae=ae(t,L))){Bu(ie,ae,a,Z);break e}Me&&Me(t,X,L),t==="focusout"&&L&&X.type==="number"&&L.memoizedProps.value!=null&&Fd(X,"number",X.value)}switch(Me=L?or(L):window,t){case"focusin":(Jp(Me)||Me.contentEditable==="true")&&(bc=Me,Nv=L,ef=null);break;case"focusout":ef=Nv=bc=null;break;case"mousedown":kv=!0;break;case"contextmenu":case"mouseup":case"dragend":kv=!1,im(ie,a,Z);break;case"selectionchange":if(cR)break;case"keydown":case"keyup":im(ie,a,Z)}var it;if(wv)e:{switch(t){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else vc?Kp(t,a)&&(Le="onCompositionEnd"):t==="keydown"&&a.keyCode===zD&&(Le="onCompositionStart");Le&&(UD&&a.locale!=="ko"&&(vc||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&vc&&(it=Yd()):(co=Z,Mv="value"in co?co.value:co.textContent,vc=!0)),Me=km(L,Le),0<Me.length&&(Le=new RD(Le,t,null,a,Z),ie.push({event:Le,listeners:Me}),it?Le.data=it:(it=Zp(a),it!==null&&(Le.data=it)))),(it=lR?Yy(t,a):Qy(t,a))&&(Le=km(L,"onBeforeInput"),0<Le.length&&(Me=new Y5("onBeforeInput","beforeinput",null,a,Z),ie.push({event:Me,listeners:Le}),Me.data=it)),EL(ie,t,L,a,Z)}vM(ie,n)})}function zh(t,n,a){return{instance:t,listener:n,currentTarget:a}}function km(t,n){for(var a=n+"Capture",u=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=js(t,a),d!=null&&u.unshift(zh(t,d,m)),d=js(t,n),d!=null&&u.push(zh(t,d,m))),t.tag===3)return u;t=t.return}return[]}function oc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function _M(t,n,a,u,d){for(var m=n._reactName,_=[];a!==null&&a!==u;){var M=a,N=M.alternate,L=M.stateNode;if(M=M.tag,N!==null&&N===u)break;M!==5&&M!==26&&M!==27||L===null||(N=L,d?(L=js(a,m),L!=null&&_.unshift(zh(a,L,N))):d||(L=js(a,m),L!=null&&_.push(zh(a,L,N)))),a=a.return}_.length!==0&&t.push({event:n,listeners:_})}function qT(t,n){Gp(t,n),t!=="input"&&t!=="textarea"&&t!=="select"||n==null||n.value!==null||OD||(OD=!0,t==="select"&&n.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",t):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",t));var a={registrationNameDependencies:bl,possibleRegistrationNames:yv};Yo(t)||typeof n.is=="string"||Xp(t,n,a),n.contentEditable&&!n.suppressContentEditableWarning&&n.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function Ri(t,n,a,u){n!==a&&(a=no(a),no(n)!==a&&(u[t]=n))}function ML(t,n,a){n.forEach(function(u){a[EM(u)]=u==="style"?HT(t):t.getAttribute(u)})}function Dr(t,n){n===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",t,t,t):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",t,typeof n)}function SM(t,n){return t=t.namespaceURI===Gm||t.namespaceURI===mc?t.ownerDocument.createElementNS(t.namespaceURI,t.tagName):t.ownerDocument.createElement(t.tagName),t.innerHTML=n,t.innerHTML}function no(t){return se(t)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",Ue(t)),Oe(t)),(typeof t=="string"?t:""+t).replace(RR,`
`).replace(jR,"")}function xM(t,n){return n=no(n),no(t)===n}function Om(){}function jt(t,n,a,u,d,m){switch(a){case"children":typeof u=="string"?(Rs(u,n,!1),n==="body"||n==="textarea"&&u===""||Wr(t,u)):(typeof u=="number"||typeof u=="bigint")&&(Rs(""+u,n,!1),n!=="body"&&Wr(t,""+u));break;case"className":tt(t,"class",u);break;case"tabIndex":tt(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":tt(t,a,u);break;case"style":Yp(t,u,m);break;case"data":if(n!=="object"){tt(t,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||a!=="href")){console.error(a==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',a,a),t.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}we(u,a),u=Qo(""+u),t.setAttribute(a,u);break;case"action":case"formAction":if(u!=null&&(n==="form"?a==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof u=="function"&&(d.encType==null&&d.method==null||Eg||(Eg=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),d.target==null||xg||(xg=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):n==="input"||n==="button"?a==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):n!=="input"||d.type==="submit"||d.type==="image"||Sg?n!=="button"||d.type==null||d.type==="submit"||Sg?typeof u=="function"&&(d.name==null||uA||(uA=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),d.formEncType==null&&d.formMethod==null||Eg||(Eg=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),d.formTarget==null||xg||(xg=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Sg=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Sg=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(a==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof u=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(a==="formAction"?(n!=="input"&&jt(t,n,"name",d.name,d,null),jt(t,n,"formEncType",d.formEncType,d,null),jt(t,n,"formMethod",d.formMethod,d,null),jt(t,n,"formTarget",d.formTarget,d,null)):(jt(t,n,"encType",d.encType,d,null),jt(t,n,"method",d.method,d,null),jt(t,n,"target",d.target,d,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}we(u,a),u=Qo(""+u),t.setAttribute(a,u);break;case"onClick":u!=null&&(typeof u!="function"&&Dr(a,u),t.onclick=Om);break;case"onScroll":u!=null&&(typeof u!="function"&&Dr(a,u),pt("scroll",t));break;case"onScrollEnd":u!=null&&(typeof u!="function"&&Dr(a,u),pt("scrollend",t));break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=u.__html,a!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");t.innerHTML=a}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}we(u,a),a=Qo(""+u),t.setAttributeNS(jl,"xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?(we(u,a),t.setAttribute(a,""+u)):t.removeAttribute(a);break;case"inert":u!==""||Mg[a]||(Mg[a]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",a));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":u===!0?t.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?(we(u,a),t.setAttribute(a,u)):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?(we(u,a),t.setAttribute(a,u)):t.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(a):(we(u,a),t.setAttribute(a,u));break;case"popover":pt("beforetoggle",t),pt("toggle",t),gt(t,"popover",u);break;case"xlinkActuate":ci(t,jl,"xlink:actuate",u);break;case"xlinkArcrole":ci(t,jl,"xlink:arcrole",u);break;case"xlinkRole":ci(t,jl,"xlink:role",u);break;case"xlinkShow":ci(t,jl,"xlink:show",u);break;case"xlinkTitle":ci(t,jl,"xlink:title",u);break;case"xlinkType":ci(t,jl,"xlink:type",u);break;case"xmlBase":ci(t,Tb,"xml:base",u);break;case"xmlLang":ci(t,Tb,"xml:lang",u);break;case"xmlSpace":ci(t,Tb,"xml:space",u);break;case"is":m!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),gt(t,"is",u);break;case"innerText":case"textContent":break;case"popoverTarget":cA||u==null||typeof u!="object"||(cA=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",u));default:!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N"?(a=Qp(a),gt(t,a,u)):bl.hasOwnProperty(a)&&u!=null&&typeof u!="function"&&Dr(a,u)}}function FT(t,n,a,u,d,m){switch(a){case"style":Yp(t,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=u.__html,a!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");t.innerHTML=a}}break;case"children":typeof u=="string"?Wr(t,u):(typeof u=="number"||typeof u=="bigint")&&Wr(t,""+u);break;case"onScroll":u!=null&&(typeof u!="function"&&Dr(a,u),pt("scroll",t));break;case"onScrollEnd":u!=null&&(typeof u!="function"&&Dr(a,u),pt("scrollend",t));break;case"onClick":u!=null&&(typeof u!="function"&&Dr(a,u),t.onclick=Om);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(bl.hasOwnProperty(a))u!=null&&typeof u!="function"&&Dr(a,u);else e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),m=t[Ln]||null,m=m!=null?m[a]:null,typeof m=="function"&&t.removeEventListener(n,m,d),typeof u=="function")){typeof m!="function"&&m!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,u,d);break e}a in t?t[a]=u:u===!0?t.setAttribute(a,""):gt(t,a,u)}}}function $i(t,n,a){switch(qT(n,a),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pt("error",t),pt("load",t);var u=!1,d=!1,m;for(m in a)if(a.hasOwnProperty(m)){var _=a[m];if(_!=null)switch(m){case"src":u=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:jt(t,n,m,_,a,null)}}d&&jt(t,n,"srcSet",a.srcSet,a,null),u&&jt(t,n,"src",a.src,a,null);return;case"input":je("input",a),pt("invalid",t);var M=m=_=d=null,N=null,L=null;for(u in a)if(a.hasOwnProperty(u)){var Z=a[u];if(Z!=null)switch(u){case"name":d=Z;break;case"type":_=Z;break;case"checked":N=Z;break;case"defaultChecked":L=Z;break;case"value":m=Z;break;case"defaultValue":M=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:jt(t,n,u,Z,a,null)}}Pt(t,a),Fo(t,m,M,N,L,_,d,!1),Yr(t);return;case"select":je("select",a),pt("invalid",t),u=_=m=null;for(d in a)if(a.hasOwnProperty(d)&&(M=a[d],M!=null))switch(d){case"value":m=M;break;case"defaultValue":_=M;break;case"multiple":u=M;default:jt(t,n,d,M,a,null)}Nu(t,a),n=m,a=_,t.multiple=!!u,n!=null?Qr(t,!!u,n,!1):a!=null&&Qr(t,!!u,a,!0);return;case"textarea":je("textarea",a),pt("invalid",t),m=d=u=null;for(_ in a)if(a.hasOwnProperty(_)&&(M=a[_],M!=null))switch(_){case"value":u=M;break;case"defaultValue":d=M;break;case"children":m=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:jt(t,n,_,M,a,null)}ku(t,a),Fp(t,u,d,m),Yr(t);return;case"option":Bp(t,a);for(N in a)if(a.hasOwnProperty(N)&&(u=a[N],u!=null))switch(N){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:jt(t,n,N,u,a,null)}return;case"dialog":pt("beforetoggle",t),pt("toggle",t),pt("cancel",t),pt("close",t);break;case"iframe":case"object":pt("load",t);break;case"video":case"audio":for(u=0;u<Mf.length;u++)pt(Mf[u],t);break;case"image":pt("error",t),pt("load",t);break;case"details":pt("toggle",t);break;case"embed":case"source":case"link":pt("error",t),pt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in a)if(a.hasOwnProperty(L)&&(u=a[L],u!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:jt(t,n,L,u,a,null)}return;default:if(Yo(n)){for(Z in a)a.hasOwnProperty(Z)&&(u=a[Z],u!==void 0&&FT(t,n,Z,u,a,void 0));return}}for(M in a)a.hasOwnProperty(M)&&(u=a[M],u!=null&&jt(t,n,M,u,a,null))}function DL(t,n,a,u){switch(qT(n,u),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,_=null,M=null,N=null,L=null,Z=null;for(re in a){var ie=a[re];if(a.hasOwnProperty(re)&&ie!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":N=ie;default:u.hasOwnProperty(re)||jt(t,n,re,null,u,ie)}}for(var X in u){var re=u[X];if(ie=a[X],u.hasOwnProperty(X)&&(re!=null||ie!=null))switch(X){case"type":m=re;break;case"name":d=re;break;case"checked":L=re;break;case"defaultChecked":Z=re;break;case"value":_=re;break;case"defaultValue":M=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:re!==ie&&jt(t,n,X,re,u,ie)}}n=a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null,u=u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null,n||!u||lA||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),lA=!0),!n||u||oA||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),oA=!0),wu(t,_,M,N,L,Z,m,d);return;case"select":re=_=M=X=null;for(m in a)if(N=a[m],a.hasOwnProperty(m)&&N!=null)switch(m){case"value":break;case"multiple":re=N;default:u.hasOwnProperty(m)||jt(t,n,m,null,u,N)}for(d in u)if(m=u[d],N=a[d],u.hasOwnProperty(d)&&(m!=null||N!=null))switch(d){case"value":X=m;break;case"defaultValue":M=m;break;case"multiple":_=m;default:m!==N&&jt(t,n,d,m,u,N)}u=M,n=_,a=re,X!=null?Qr(t,!!n,X,!1):!!a!=!!n&&(u!=null?Qr(t,!!n,u,!0):Qr(t,!!n,n?[]:"",!1));return;case"textarea":re=X=null;for(M in a)if(d=a[M],a.hasOwnProperty(M)&&d!=null&&!u.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:jt(t,n,M,null,u,d)}for(_ in u)if(d=u[_],m=a[_],u.hasOwnProperty(_)&&(d!=null||m!=null))switch(_){case"value":X=d;break;case"defaultValue":re=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:d!==m&&jt(t,n,_,d,u,m)}Hd(t,X,re);return;case"option":for(var Ie in a)if(X=a[Ie],a.hasOwnProperty(Ie)&&X!=null&&!u.hasOwnProperty(Ie))switch(Ie){case"selected":t.selected=!1;break;default:jt(t,n,Ie,null,u,X)}for(N in u)if(X=u[N],re=a[N],u.hasOwnProperty(N)&&X!==re&&(X!=null||re!=null))switch(N){case"selected":t.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:jt(t,n,N,X,u,re)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ge in a)X=a[Ge],a.hasOwnProperty(Ge)&&X!=null&&!u.hasOwnProperty(Ge)&&jt(t,n,Ge,null,u,X);for(L in u)if(X=u[L],re=a[L],u.hasOwnProperty(L)&&X!==re&&(X!=null||re!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:jt(t,n,L,X,u,re)}return;default:if(Yo(n)){for(var qt in a)X=a[qt],a.hasOwnProperty(qt)&&X!==void 0&&!u.hasOwnProperty(qt)&&FT(t,n,qt,void 0,u,X);for(Z in u)X=u[Z],re=a[Z],!u.hasOwnProperty(Z)||X===re||X===void 0&&re===void 0||FT(t,n,Z,X,u,re);return}}for(var mt in a)X=a[mt],a.hasOwnProperty(mt)&&X!=null&&!u.hasOwnProperty(mt)&&jt(t,n,mt,null,u,X);for(ie in u)X=u[ie],re=a[ie],!u.hasOwnProperty(ie)||X===re||X==null&&re==null||jt(t,n,ie,X,u,re)}function EM(t){switch(t){case"class":return"className";case"for":return"htmlFor";default:return t}}function HT(t){var n={};t=t.style;for(var a=0;a<t.length;a++){var u=t[a];n[u]=t.getPropertyValue(u)}return n}function MM(t,n,a){if(n!=null&&typeof n!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var u,d=u="",m;for(m in n)if(n.hasOwnProperty(m)){var _=n[m];_!=null&&typeof _!="boolean"&&_!==""&&(m.indexOf("--")===0?(qe(_,m),u+=d+m+":"+(""+_).trim()):typeof _!="number"||_===0||ND.has(m)?(qe(_,m),u+=d+m.replace(MD,"-$1").toLowerCase().replace(DD,"-ms-")+":"+(""+_).trim()):u+=d+m.replace(MD,"-$1").toLowerCase().replace(DD,"-ms-")+":"+_+"px",d=";")}u=u||null,n=t.getAttribute("style"),n!==u&&(u=no(u),no(n)!==u&&(a.style=HT(t)))}}function fs(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":return}else if(u!=null)switch(typeof u){case"function":case"symbol":case"boolean":break;default:if(we(u,n),t===""+u)return}Ri(n,t,u,m)}function DM(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null){switch(typeof u){case"function":case"symbol":return}if(!u)return}else switch(typeof u){case"function":case"symbol":break;default:if(u)return}Ri(n,t,u,m)}function VT(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof u){case"undefined":case"function":case"symbol":return}else if(u!=null)switch(typeof u){case"function":case"symbol":break;default:if(we(u,a),t===""+u)return}Ri(n,t,u,m)}function CM(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(u))return}else if(u!=null)switch(typeof u){case"function":case"symbol":case"boolean":break;default:if(!isNaN(u)&&(we(u,n),t===""+u))return}Ri(n,t,u,m)}function $T(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":return}else if(u!=null)switch(typeof u){case"function":case"symbol":case"boolean":break;default:if(we(u,n),a=Qo(""+u),t===a)return}Ri(n,t,u,m)}function AM(t,n,a,u){for(var d={},m=new Set,_=t.attributes,M=0;M<_.length;M++)switch(_[M].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:m.add(_[M].name)}if(Yo(n)){for(var N in a)if(a.hasOwnProperty(N)){var L=a[N];if(L!=null){if(bl.hasOwnProperty(N))typeof L!="function"&&Dr(N,L);else if(a.suppressHydrationWarning!==!0)switch(N){case"children":typeof L!="string"&&typeof L!="number"||Ri("children",t.textContent,L,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":_=t.innerHTML,L=L?L.__html:void 0,L!=null&&(L=SM(t,L),Ri(N,_,L,d));continue;case"style":m.delete(N),MM(t,L,d);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":m.delete(N.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",N);continue;case"className":m.delete("class"),_=et(t,"class",L),Ri("className",_,L,d);continue;default:u.context===Ea&&n!=="svg"&&n!=="math"?m.delete(N.toLowerCase()):m.delete(N),_=et(t,N,L),Ri(N,_,L,d)}}}}else for(L in a)if(a.hasOwnProperty(L)&&(N=a[L],N!=null)){if(bl.hasOwnProperty(L))typeof N!="function"&&Dr(L,N);else if(a.suppressHydrationWarning!==!0)switch(L){case"children":typeof N!="string"&&typeof N!="number"||Ri("children",t.textContent,N,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":_=t.innerHTML,N=N?N.__html:void 0,N!=null&&(N=SM(t,N),_!==N&&(d[L]={__html:_}));continue;case"className":fs(t,L,"class",N,m,d);continue;case"tabIndex":fs(t,L,"tabindex",N,m,d);continue;case"style":m.delete(L),MM(t,N,d);continue;case"multiple":m.delete(L),Ri(L,t.multiple,N,d);continue;case"muted":m.delete(L),Ri(L,t.muted,N,d);continue;case"autoFocus":m.delete("autofocus"),Ri(L,t.autofocus,N,d);continue;case"data":if(n!=="object"){m.delete(L),_=t.getAttribute("data"),Ri(L,_,N,d);continue}case"src":case"href":if(!(N!==""||n==="a"&&L==="href"||n==="object"&&L==="data")){console.error(L==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',L,L);continue}$T(t,L,L,N,m,d);continue;case"action":case"formAction":if(_=t.getAttribute(L),typeof N=="function"){m.delete(L.toLowerCase()),L==="formAction"?(m.delete("name"),m.delete("formenctype"),m.delete("formmethod"),m.delete("formtarget")):(m.delete("enctype"),m.delete("method"),m.delete("target"));continue}else if(_===zR){m.delete(L.toLowerCase()),Ri(L,"function",N,d);continue}$T(t,L,L.toLowerCase(),N,m,d);continue;case"xlinkHref":$T(t,L,"xlink:href",N,m,d);continue;case"contentEditable":VT(t,L,"contenteditable",N,m,d);continue;case"spellCheck":VT(t,L,"spellcheck",N,m,d);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":VT(t,L,L,N,m,d);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":DM(t,L,L.toLowerCase(),N,m,d);continue;case"capture":case"download":e:{M=t;var Z=_=L,ie=d;if(m.delete(Z),M=M.getAttribute(Z),M===null)switch(typeof N){case"undefined":case"function":case"symbol":break e;default:if(N===!1)break e}else if(N!=null)switch(typeof N){case"function":case"symbol":break;case"boolean":if(N===!0&&M==="")break e;break;default:if(we(N,_),M===""+N)break e}Ri(_,M,N,ie)}continue;case"cols":case"rows":case"size":case"span":e:{if(M=t,Z=_=L,ie=d,m.delete(Z),M=M.getAttribute(Z),M===null)switch(typeof N){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(N)||1>N)break e}else if(N!=null)switch(typeof N){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(N)||1>N)&&(we(N,_),M===""+N))break e}Ri(_,M,N,ie)}continue;case"rowSpan":CM(t,L,"rowspan",N,m,d);continue;case"start":CM(t,L,L,N,m,d);continue;case"xHeight":fs(t,L,"x-height",N,m,d);continue;case"xlinkActuate":fs(t,L,"xlink:actuate",N,m,d);continue;case"xlinkArcrole":fs(t,L,"xlink:arcrole",N,m,d);continue;case"xlinkRole":fs(t,L,"xlink:role",N,m,d);continue;case"xlinkShow":fs(t,L,"xlink:show",N,m,d);continue;case"xlinkTitle":fs(t,L,"xlink:title",N,m,d);continue;case"xlinkType":fs(t,L,"xlink:type",N,m,d);continue;case"xmlBase":fs(t,L,"xml:base",N,m,d);continue;case"xmlLang":fs(t,L,"xml:lang",N,m,d);continue;case"xmlSpace":fs(t,L,"xml:space",N,m,d);continue;case"inert":N!==""||Mg[L]||(Mg[L]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",L)),DM(t,L,L,N,m,d);continue;default:if(!(2<L.length)||L[0]!=="o"&&L[0]!=="O"||L[1]!=="n"&&L[1]!=="N"){M=Qp(L),_=!1,u.context===Ea&&n!=="svg"&&n!=="math"?m.delete(M.toLowerCase()):(Z=L.toLowerCase(),Z=Xm.hasOwnProperty(Z)&&Xm[Z]||null,Z!==null&&Z!==L&&(_=!0,m.delete(Z)),m.delete(M));e:if(Z=t,ie=M,M=N,at(ie))if(Z.hasAttribute(ie))Z=Z.getAttribute(ie),we(M,ie),M=Z===""+M?M:Z;else{switch(typeof M){case"function":case"symbol":break e;case"boolean":if(Z=ie.toLowerCase().slice(0,5),Z!=="data-"&&Z!=="aria-")break e}M=M===void 0?void 0:null}else M=void 0;_||Ri(L,M,N,d)}}}return 0<m.size&&a.suppressHydrationWarning!==!0&&ML(t,m,d),Object.keys(d).length===0?null:d}function CL(t,n){switch(t.length){case 0:return"";case 1:return t[0];case 2:return t[0]+" "+n+" "+t[1];default:return t.slice(0,-1).join(", ")+", "+n+" "+t[t.length-1]}}function Im(t){return t.nodeType===9?t:t.ownerDocument}function wM(t){switch(t){case mc:return Yc;case Gm:return Ag;default:return Ea}}function NM(t,n){if(t===Ea)switch(n){case"svg":return Yc;case"math":return Ag;default:return Ea}return t===Yc&&n==="foreignObject"?Ea:t}function YT(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}function AL(){var t=window.event;return t&&t.type==="popstate"?t===Sb?!1:(Sb=t,!0):(Sb=null,!1)}function wL(t){setTimeout(function(){throw t})}function NL(t,n,a){switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&t.focus();break;case"img":a.src?t.src=a.src:a.srcSet&&(t.srcset=a.srcSet)}}function kL(t,n,a,u){DL(t,n,a,u),t[Ln]=u}function kM(t){Wr(t,"")}function OL(t,n,a){t.nodeValue=a}function so(t){return t==="head"}function IL(t,n){t.removeChild(n)}function LL(t,n){(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).removeChild(n)}function OM(t,n){var a=n,u=0,d=0;do{var m=a.nextSibling;if(t.removeChild(a),m&&m.nodeType===8)if(a=m.data,a===Cg){if(0<u&&8>u){a=u;var _=t.ownerDocument;if(a&PR&&Uh(_.documentElement),a&BR&&Uh(_.body),a&qR)for(a=_.head,Uh(a),_=a.firstChild;_;){var M=_.nextSibling,N=_.nodeName;_[$h]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&_.rel.toLowerCase()==="stylesheet"||a.removeChild(_),_=M}}if(d===0){t.removeChild(m),Fh(n);return}d--}else a===Dg||a===xa||a===Df?d++:u=a.charCodeAt(0)-48;else u=0;a=m}while(a);Fh(n)}function RL(t){t=t.style,typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function jL(t){t.nodeValue=""}function zL(t,n){n=n[FR],n=n!=null&&n.hasOwnProperty("display")?n.display:null,t.style.display=n==null||typeof n=="boolean"?"":(""+n).trim()}function UL(t,n){t.nodeValue=n}function QT(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":QT(a),ar(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function PL(t,n,a,u){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[$h])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){we(d.name,"name");var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=ps(t.nextSibling),t===null)break}return null}function BL(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=ps(t.nextSibling),t===null))return null;return t}function GT(t){return t.data===Df||t.data===xa&&t.ownerDocument.readyState===hA}function qL(t,n){var a=t.ownerDocument;if(t.data!==xa||a.readyState===hA)n();else{var u=function(){n(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function ps(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n===Dg||n===Df||n===xa||n===vb||n===dA)break;if(n===Cg)return null}}return t}function IM(t){if(t.nodeType===1){for(var n=t.nodeName.toLowerCase(),a={},u=t.attributes,d=0;d<u.length;d++){var m=u[d];a[EM(m.name)]=m.name.toLowerCase()==="style"?HT(t):m.value}return{type:n,props:a}}return t.nodeType===8?{type:"Suspense",props:{}}:t.nodeValue}function LM(t,n,a){return a===null||a[UR]!==!0?(t.nodeValue===n?t=null:(n=no(n),t=no(t.nodeValue)===n?null:t.nodeValue),t):null}function RM(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a===Cg){if(n===0)return ps(t.nextSibling);n--}else a!==Dg&&a!==Df&&a!==xa||n++}t=t.nextSibling}return null}function jM(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a===Dg||a===Df||a===xa){if(n===0)return t;n--}else a===Cg&&n++}t=t.previousSibling}return null}function FL(t){Fh(t)}function HL(t){Fh(t)}function zM(t,n,a,u,d){switch(d&&qa(t,u.ancestorInfo),n=Im(a),t){case"html":if(t=n.documentElement,!t)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return t;case"head":if(t=n.head,!t)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return t;case"body":if(t=n.body,!t)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return t;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function VL(t,n,a,u){if(!a[uo]&&Vn(a)){var d=a.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",d,d,d)}switch(t){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(d=a.attributes;d.length;)a.removeAttributeNode(d[0]);$i(a,t,n),a[rn]=u,a[Ln]=n}function Uh(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);ar(t)}function Lm(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}function UM(t,n,a){var u=Qc;if(u&&typeof n=="string"&&n){var d=yi(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),TA.has(d)||(TA.add(d),t={rel:t,crossOrigin:a,href:n},u.querySelector(d)===null&&(n=u.createElement("link"),$i(n,"link",t),Q(n),u.head.appendChild(n)))}}function PM(t,n,a,u){var d=(d=oo.current)?Lm(d):null;if(!d)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=lc(a.href),n=A(d).hoistableStyles,u=n.get(a),u||(u={type:"style",instance:null,count:0,state:null},n.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=lc(a.href);var m=A(d).hoistableStyles,_=m.get(t);if(!_&&(d=d.ownerDocument||d,_={type:"stylesheet",instance:null,count:0,state:{loading:Ul,preload:null}},m.set(t,_),(m=d.querySelector(Ph(t)))&&!m._p&&(_.instance=m,_.state.loading=Cf|Ms),!Ds.has(t))){var M={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy};Ds.set(t,M),m||$L(d,t,M,_.state)}if(n&&u===null)throw a=`
- `+Rm(n)+`
+ `+Rm(a),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+a);return _}if(n&&u!==null)throw a=`
- `+Rm(n)+`
+ `+Rm(a),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+a);return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(a=uc(a),n=A(d).hoistableScripts,u=n.get(a),u||(u={type:"script",instance:null,count:0,state:null},n.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+t+'". this is a bug in React.')}}function Rm(t){var n=0,a="<link";return typeof t.rel=="string"?(n++,a+=' rel="'+t.rel+'"'):fa.call(t,"rel")&&(n++,a+=' rel="'+(t.rel===null?"null":"invalid type "+typeof t.rel)+'"'),typeof t.href=="string"?(n++,a+=' href="'+t.href+'"'):fa.call(t,"href")&&(n++,a+=' href="'+(t.href===null?"null":"invalid type "+typeof t.href)+'"'),typeof t.precedence=="string"?(n++,a+=' precedence="'+t.precedence+'"'):fa.call(t,"precedence")&&(n++,a+=" precedence={"+(t.precedence===null?"null":"invalid type "+typeof t.precedence)+"}"),Object.getOwnPropertyNames(t).length>n&&(a+=" ..."),a+" />"}function lc(t){return'href="'+yi(t)+'"'}function Ph(t){return'link[rel="stylesheet"]['+t+"]"}function BM(t){return ut({},t,{"data-precedence":t.precedence,precedence:null})}function $L(t,n,a,u){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=Cf:(n=t.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=Cf}),n.addEventListener("error",function(){return u.loading|=gA}),$i(n,"link",a),Q(n),t.head.appendChild(n))}function uc(t){return'[src="'+yi(t)+'"]'}function Bh(t){return"script[async]"+t}function qM(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var u=t.querySelector('style[data-href~="'+yi(a.href)+'"]');if(u)return n.instance=u,Q(u),u;var d=ut({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),Q(u),$i(u,"style",d),jm(u,a.precedence,t),n.instance=u;case"stylesheet":d=lc(a.href);var m=t.querySelector(Ph(d));if(m)return n.state.loading|=Ms,n.instance=m,Q(m),m;u=BM(a),(d=Ds.get(d))&&XT(u,d),m=(t.ownerDocument||t).createElement("link"),Q(m);var _=m;return _._p=new Promise(function(M,N){_.onload=M,_.onerror=N}),$i(m,"link",u),n.state.loading|=Ms,jm(m,a.precedence,t),n.instance=m;case"script":return m=uc(a.src),(d=t.querySelector(Bh(m)))?(n.instance=d,Q(d),d):(u=a,(d=Ds.get(m))&&(u=ut({},a),WT(u,d)),t=t.ownerDocument||t,d=t.createElement("script"),Q(d),$i(d,"link",u),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+n.type+'". this is a bug in React.')}else n.type==="stylesheet"&&(n.state.loading&Ms)===Ul&&(u=n.instance,n.state.loading|=Ms,jm(u,a.precedence,t));return n.instance}function jm(t,n,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=u.length?u[u.length-1]:null,m=d,_=0;_<u.length;_++){var M=u[_];if(M.dataset.precedence===n)m=M;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function XT(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function WT(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}function FM(t,n,a){if(wg===null){var u=new Map,d=wg=new Map;d.set(a,u)}else d=wg,u=d.get(a),u||(u=new Map,d.set(a,u));if(u.has(t))return u;for(u.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var m=a[d];if(!(m[$h]||m[rn]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!==mc){var _=m.getAttribute(n)||"";_=t+_;var M=u.get(_);M?M.push(m):u.set(_,[m])}}return u}function HM(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function YL(t,n,a){var u=!a.ancestorInfo.containerTagInScope;if(a.context===Yc||n.itemProp!=null)return!u||n.itemProp==null||t!=="meta"&&t!=="title"&&t!=="style"&&t!=="link"&&t!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",t,t),!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href===""){u&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError){if(n.rel==="stylesheet"&&typeof n.precedence=="string"){t=n.href;var d=n.onError,m=n.disabled;a=[],n.onLoad&&a.push("`onLoad`"),d&&a.push("`onError`"),m!=null&&a.push("`disabled`"),d=CL(a,"and"),d+=a.length===1?" prop":" props",m=a.length===1?"an "+d:"the "+d,a.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',t,m,d)}u&&(typeof n.rel!="string"||typeof n.href!="string"||n.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(n.onError||n.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(n.rel){case"stylesheet":return t=n.precedence,n=n.disabled,typeof t!="string"&&u&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof t=="string"&&n==null;default:return!0}case"script":if(t=n.async&&typeof n.async!="function"&&typeof n.async!="symbol",!t||n.onLoad||n.onError||!n.src||typeof n.src!="string"){u&&(t?n.onLoad||n.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":u&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",t)}return!1}function VM(t){return!(t.type==="stylesheet"&&(t.state.loading&yA)===Ul)}function QL(){}function GL(t,n,a){if(Af===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var u=Af;if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&Ms)===Ul){if(n.instance===null){var d=lc(a.href),m=t.querySelector(Ph(d));if(m){t=m._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(u.count++,u=zm.bind(u),t.then(u,u)),n.state.loading|=Ms,n.instance=m,Q(m);return}m=t.ownerDocument||t,a=BM(a),(d=Ds.get(d))&&XT(a,d),m=m.createElement("link"),Q(m);var _=m;_._p=new Promise(function(M,N){_.onload=M,_.onerror=N}),$i(m,"link",a),n.instance=m}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&yA)===Ul&&(u.count++,n=zm.bind(u),t.addEventListener("load",n),t.addEventListener("error",n))}}function XL(){if(Af===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var t=Af;return t.stylesheets&&t.count===0&&KT(t,t.stylesheets),0<t.count?function(n){var a=setTimeout(function(){if(t.stylesheets&&KT(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(a)}}:null}function zm(){if(this.count--,this.count===0){if(this.stylesheets)KT(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}function KT(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ng=new Map,n.forEach(WL,t),Ng=null,zm.call(t))}function WL(t,n){if(!(n.state.loading&Ms)){var a=Ng.get(t);if(a)var u=a.get(Eb);else{a=new Map,Ng.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var _=d[m];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(a.set(_.dataset.precedence,_),u=_)}u&&a.set(Eb,u)}d=n.instance,_=d.getAttribute("data-precedence"),m=a.get(_)||u,m===u&&a.set(Eb,d),a.set(_,d),this.count++,u=zm.bind(this),d.addEventListener("load",u),d.addEventListener("error",u),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=Ms}}function KL(t,n,a,u,d,m,_,M){for(this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=zl,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=At(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=At(0),this.hiddenUpdates=At(null),this.identifierPrefix=u,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,t=this.pendingUpdatersLaneMap=[],n=0;31>n;n++)t.push(new Set);this._debugRootType=a?"hydrateRoot()":"createRoot()"}function $M(t,n,a,u,d,m,_,M,N,L,Z,ie){return t=new KL(t,n,a,_,M,N,L,ie),n=pR,m===!0&&(n|=an|Hs),Fs&&(n|=Qi),m=D(3,null,null,n),t.current=m,m.stateNode=t,n=ih(),ia(n),t.pooledCache=n,ia(n),m.memoizedState={element:u,isDehydrated:a,cache:n},cl(m),t}function YM(t){return t?(t=ho,t):ho}function ZT(t,n,a,u,d,m){if(sn&&typeof sn.onScheduleFiberRoot=="function")try{sn.onScheduleFiberRoot(fc,u,a)}catch(_){wr||(wr=!0,console.error("React instrumentation encountered an error: %s",_))}Ne!==null&&typeof Ne.markRenderScheduled=="function"&&Ne.markRenderScheduled(n),d=YM(d),u.context===null?u.context=d:u.pendingContext=d,kr&&es!==null&&!SA&&(SA=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
Check the render method of %s.`,fe(es)||"Unknown")),u=On(n),u.payload={element:a},m=m===void 0?null:m,m!==null&&(typeof m!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",m),u.callback=m),a=Tr(t,u,n),a!==null&&(hi(a,t,n),Ya(a,t,n))}function QM(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function JT(t,n){QM(t,n),(t=t.alternate)&&QM(t,n)}function GM(t){if(t.tag===13){var n=xi(t,67108864);n!==null&&hi(n,t,67108864),JT(t,67108864)}}function ZL(){return es}function JL(){for(var t=new Map,n=1,a=0;31>a;a++){var u=$e(n);t.set(n,u),n*=2}return t}function e5(t,n,a,u){var d=te.T;te.T=null;var m=Et.p;try{Et.p=ms,ev(t,n,a,u)}finally{Et.p=m,te.T=d}}function t5(t,n,a,u){var d=te.T;te.T=null;var m=Et.p;try{Et.p=Nr,ev(t,n,a,u)}finally{Et.p=m,te.T=d}}function ev(t,n,a,u){if(Og){var d=tv(u);if(d===null)BT(t,n,u,Ig,a),WM(t,u);else if(i5(d,t,n,a,u))u.stopPropagation();else if(WM(t,u),n&4&&-1<YR.indexOf(t)){for(;d!==null;){var m=Vn(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=ze(m.pendingLanes);if(_!==0){var M=m;for(M.pendingLanes|=2,M.entangledLanes|=2;_;){var N=1<<31-pn(_);M.entanglements[1]|=N,_&=~N}Mr(m),(Mt&(vn|Qs))===ts&&(gg=Ar()+eA,jh(0,!1))}}break;case 13:M=xi(m,2),M!==null&&hi(M,m,2),sc(),JT(m,2)}if(m=tv(u),m===null&&BT(t,n,u,Ig,a),m===d)break;d=m}d!==null&&u.stopPropagation()}else BT(t,n,u,null,a)}}function tv(t){return t=ju(t),iv(t)}function iv(t){if(Ig=null,t=tn(t),t!==null){var n=U(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=Y(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Ig=t,null}function XM(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return ms;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return Nr;case"message":switch(f5()){case fv:return ms;case pv:return Nr;case hc:case p5:return pa;case mv:return Ym;default:return pa}default:return pa}}function WM(t,n){switch(t){case"focusin":case"focusout":So=null;break;case"dragenter":case"dragleave":xo=null;break;case"mouseover":case"mouseout":Eo=null;break;case"pointerover":case"pointerout":Nf.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":kf.delete(n.pointerId)}}function qh(t,n,a,u,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:n,domEventName:a,eventSystemFlags:u,nativeEvent:m,targetContainers:[d]},n!==null&&(n=Vn(n),n!==null&&GM(n)),t):(t.eventSystemFlags|=u,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function i5(t,n,a,u,d){switch(n){case"focusin":return So=qh(So,t,n,a,u,d),!0;case"dragenter":return xo=qh(xo,t,n,a,u,d),!0;case"mouseover":return Eo=qh(Eo,t,n,a,u,d),!0;case"pointerover":var m=d.pointerId;return Nf.set(m,qh(Nf.get(m)||null,t,n,a,u,d)),!0;case"gotpointercapture":return m=d.pointerId,kf.set(m,qh(kf.get(m)||null,t,n,a,u,d)),!0}return!1}function KM(t){var n=tn(t.target);if(n!==null){var a=U(n);if(a!==null){if(n=a.tag,n===13){if(n=Y(a),n!==null){t.blockedOn=n,vt(t.priority,function(){if(a.tag===13){var u=Zn(a);u=xt(u);var d=xi(a,u);d!==null&&hi(d,a,u),JT(a,u)}});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Um(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=tv(t.nativeEvent);if(a===null){a=t.nativeEvent;var u=new a.constructor(a.type,a),d=u;Qh!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Qh=d,a.target.dispatchEvent(u),Qh===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),Qh=null}else return n=Vn(a),n!==null&&GM(n),t.blockedOn=a,!1;n.shift()}return!0}function ZM(t,n,a){Um(t)&&a.delete(n)}function n5(){Mb=!1,So!==null&&Um(So)&&(So=null),xo!==null&&Um(xo)&&(xo=null),Eo!==null&&Um(Eo)&&(Eo=null),Nf.forEach(ZM),kf.forEach(ZM)}function Pm(t,n){t.blockedOn===n&&(t.blockedOn=null,Mb||(Mb=!0,Ti.unstable_scheduleCallback(Ti.unstable_NormalPriority,n5)))}function JM(t){Lg!==t&&(Lg=t,Ti.unstable_scheduleCallback(Ti.unstable_NormalPriority,function(){Lg===t&&(Lg=null);for(var n=0;n<t.length;n+=3){var a=t[n],u=t[n+1],d=t[n+2];if(typeof u!="function"){if(iv(u||a)===null)continue;break}var m=Vn(a);m!==null&&(t.splice(n,3),n-=3,a={pending:!0,data:d,method:a.method,action:u},Object.freeze(a),fn(m,a,u,d))}}))}function Fh(t){function n(N){return Pm(N,t)}So!==null&&Pm(So,t),xo!==null&&Pm(xo,t),Eo!==null&&Pm(Eo,t),Nf.forEach(n),kf.forEach(n);for(var a=0;a<Mo.length;a++){var u=Mo[a];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Mo.length&&(a=Mo[0],a.blockedOn===null);)KM(a),a.blockedOn===null&&Mo.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var d=a[u],m=a[u+1],_=d[Ln]||null;if(typeof m=="function")_||JM(a);else if(_){var M=null;if(m&&m.hasAttribute("formAction")){if(d=m,_=m[Ln]||null)M=_.formAction;else if(iv(d)!==null)continue}else M=_.action;typeof M=="function"?a[u+1]=M:(a.splice(u,3),u-=3),JM(a)}}}function nv(t){this._internalRoot=t}function Bm(t){this._internalRoot=t}function eD(t){t[uo]&&(t._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Ti=jA(),sv=_i,s5=UA(),ut=Object.assign,r5=Symbol.for("react.element"),ro=Symbol.for("react.transitional.element"),cc=Symbol.for("react.portal"),dc=Symbol.for("react.fragment"),qm=Symbol.for("react.strict_mode"),rv=Symbol.for("react.profiler"),a5=Symbol.for("react.provider"),av=Symbol.for("react.consumer"),Cr=Symbol.for("react.context"),Hh=Symbol.for("react.forward_ref"),ov=Symbol.for("react.suspense"),lv=Symbol.for("react.suspense_list"),Fm=Symbol.for("react.memo"),Jn=Symbol.for("react.lazy"),uv=Symbol.for("react.activity"),o5=Symbol.for("react.memo_cache_sentinel"),tD=Symbol.iterator,l5=Symbol.for("react.client.reference"),Yi=Array.isArray,te=sv.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Et=s5.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,u5=Object.freeze({pending:!1,data:null,method:null,action:null}),cv=[],dv=[],ha=-1,ao=me(null),Vh=me(null),oo=me(null),Hm=me(null),fa=Object.prototype.hasOwnProperty,hv=Ti.unstable_scheduleCallback,c5=Ti.unstable_cancelCallback,d5=Ti.unstable_shouldYield,h5=Ti.unstable_requestPaint,Ar=Ti.unstable_now,f5=Ti.unstable_getCurrentPriorityLevel,fv=Ti.unstable_ImmediatePriority,pv=Ti.unstable_UserBlockingPriority,hc=Ti.unstable_NormalPriority,p5=Ti.unstable_LowPriority,mv=Ti.unstable_IdlePriority,m5=Ti.log,g5=Ti.unstable_setDisableYieldValue,fc=null,sn=null,Ne=null,wr=!1,Fs=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",pn=Math.clz32?Math.clz32:Xe,y5=Math.log,T5=Math.LN2,Vm=256,$m=4194304,ms=2,Nr=8,pa=32,Ym=268435456,lo=Math.random().toString(36).slice(2),rn="__reactFiber$"+lo,Ln="__reactProps$"+lo,uo="__reactContainer$"+lo,gv="__reactEvents$"+lo,v5="__reactListeners$"+lo,b5="__reactHandles$"+lo,iD="__reactResources$"+lo,$h="__reactMarker$"+lo,nD=new Set,bl={},yv={},_5={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},S5=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),sD={},rD={},Yh=0,aD,oD,lD,uD,cD,dD,hD;Os.__reactDisabledLog=!0;var Tv,fD,vv=!1,bv=new(typeof WeakMap=="function"?WeakMap:Map),es=null,kr=!1,x5=/[\n"\\]/g,pD=!1,mD=!1,gD=!1,yD=!1,TD=!1,vD=!1,bD=["value","defaultValue"],_D=!1,SD=/["'&<>\n\t]|^\s|\s$/,E5="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),xD="applet caption html table td th marquee object template foreignObject desc title".split(" "),M5=xD.concat(["button"]),D5="dd dt li option optgroup p rp rt".split(" "),ED={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Qm={},_v={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},MD=/([A-Z])/g,DD=/^ms-/,C5=/^(?:webkit|moz|o)[A-Z]/,A5=/^-ms-/,w5=/-(.)/g,CD=/;\s*$/,pc={},Sv={},AD=!1,wD=!1,ND=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Gm="http://www.w3.org/1998/Math/MathML",mc="http://www.w3.org/2000/svg",N5=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Xm={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},kD={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},gc={},k5=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),O5=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),OD=!1,mn={},ID=/^on./,I5=/^on[^A-Z]/,L5=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),R5=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),j5=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,Qh=null,yc=null,Tc=null,xv=!1,Or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ev=!1;if(Or)try{var Gh={};Object.defineProperty(Gh,"passive",{get:function(){Ev=!0}}),window.addEventListener("test",Gh,Gh),window.removeEventListener("test",Gh,Gh)}catch{Ev=!1}var co=null,Mv=null,Wm=null,_l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Km=qi(_l),Xh=ut({},_l,{view:0,detail:0}),z5=qi(Xh),Dv,Cv,Wh,Zm=ut({},Xh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Wh&&(Wh&&t.type==="mousemove"?(Dv=t.screenX-Wh.screenX,Cv=t.screenY-Wh.screenY):Cv=Dv=0,Wh=t),Dv)},movementY:function(t){return"movementY"in t?t.movementY:Cv}}),LD=qi(Zm),U5=ut({},Zm,{dataTransfer:0}),P5=qi(U5),B5=ut({},Xh,{relatedTarget:0}),Av=qi(B5),q5=ut({},_l,{animationName:0,elapsedTime:0,pseudoElement:0}),F5=qi(q5),H5=ut({},_l,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),V5=qi(H5),$5=ut({},_l,{data:0}),RD=qi($5),Y5=RD,Q5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},G5={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},X5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},W5=ut({},Xh,{key:function(t){if(t.key){var n=Q5[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=zu(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?G5[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pu,charCode:function(t){return t.type==="keypress"?zu(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?zu(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),K5=qi(W5),Z5=ut({},Zm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jD=qi(Z5),J5=ut({},Xh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pu}),eR=qi(J5),tR=ut({},_l,{propertyName:0,elapsedTime:0,pseudoElement:0}),iR=qi(tR),nR=ut({},Zm,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),sR=qi(nR),rR=ut({},_l,{newState:0,oldState:0}),aR=qi(rR),oR=[9,13,27,32],zD=229,wv=Or&&"CompositionEvent"in window,Kh=null;Or&&"documentMode"in document&&(Kh=document.documentMode);var lR=Or&&"TextEvent"in window&&!Kh,UD=Or&&(!wv||Kh&&8<Kh&&11>=Kh),PD=32,BD=String.fromCharCode(PD),qD=!1,vc=!1,uR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Zh=null,Jh=null,FD=!1;Or&&(FD=Gy("input")&&(!document.documentMode||9<document.documentMode));var gn=typeof Object.is=="function"?Object.is:Ko,cR=Or&&"documentMode"in document&&11>=document.documentMode,bc=null,Nv=null,ef=null,kv=!1,_c={animationend:Kr("Animation","AnimationEnd"),animationiteration:Kr("Animation","AnimationIteration"),animationstart:Kr("Animation","AnimationStart"),transitionrun:Kr("Transition","TransitionRun"),transitionstart:Kr("Transition","TransitionStart"),transitioncancel:Kr("Transition","TransitionCancel"),transitionend:Kr("Transition","TransitionEnd")},Ov={},HD={};Or&&(HD=document.createElement("div").style,"AnimationEvent"in window||(delete _c.animationend.animation,delete _c.animationiteration.animation,delete _c.animationstart.animation),"TransitionEvent"in window||delete _c.transitionend.transition);var VD=Zr("animationend"),$D=Zr("animationiteration"),YD=Zr("animationstart"),dR=Zr("transitionrun"),hR=Zr("transitionstart"),fR=Zr("transitioncancel"),QD=Zr("transitionend"),GD=new Map,Iv="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Iv.push("scrollEnd");var Lv=new WeakMap,Jm=1,ma=2,gs=[],Sc=0,Rv=0,ho={};Object.freeze(ho);var ys=null,xc=null,$t=0,pR=1,Qi=2,an=8,Hs=16,XD=64,WD=!1;try{var KD=Object.preventExtensions({})}catch{WD=!0}var Ec=[],Mc=0,eg=null,tg=0,Ts=[],vs=0,Sl=null,ga=1,ya="",yn=null,si=null,yt=!1,Ta=!1,bs=null,xl=null,Ir=!1,jv=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),ZD=0;if(typeof performance=="object"&&typeof performance.now=="function")var mR=performance,JD=function(){return mR.now()};else{var gR=Date;JD=function(){return gR.now()}}var zv=me(null),Uv=me(null),eC={},ig=null,Dc=null,Cc=!1,yR=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,u){t.push(u)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},TR=Ti.unstable_scheduleCallback,vR=Ti.unstable_NormalPriority,Mi={$$typeof:Cr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Ac=Ti.unstable_now,tC=-0,ng=-0,Rn=-1.1,El=-0,sg=!1,rg=!1,tf=null,Pv=0,Ml=0,wc=null,iC=te.S;te.S=function(t,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&nh(t,n),iC!==null&&iC(t,n)};var Dl=me(null),Vs={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},nf=[],sf=[],rf=[],af=[],of=[],lf=[],Cl=new Set;Vs.recordUnsafeLifecycleWarnings=function(t,n){Cl.has(t.type)||(typeof n.componentWillMount=="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&nf.push(t),t.mode&an&&typeof n.UNSAFE_componentWillMount=="function"&&sf.push(t),typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&rf.push(t),t.mode&an&&typeof n.UNSAFE_componentWillReceiveProps=="function"&&af.push(t),typeof n.componentWillUpdate=="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&of.push(t),t.mode&an&&typeof n.UNSAFE_componentWillUpdate=="function"&&lf.push(t))},Vs.flushPendingUnsafeLifecycleWarnings=function(){var t=new Set;0<nf.length&&(nf.forEach(function(M){t.add(fe(M)||"Component"),Cl.add(M.type)}),nf=[]);var n=new Set;0<sf.length&&(sf.forEach(function(M){n.add(fe(M)||"Component"),Cl.add(M.type)}),sf=[]);var a=new Set;0<rf.length&&(rf.forEach(function(M){a.add(fe(M)||"Component"),Cl.add(M.type)}),rf=[]);var u=new Set;0<af.length&&(af.forEach(function(M){u.add(fe(M)||"Component"),Cl.add(M.type)}),af=[]);var d=new Set;0<of.length&&(of.forEach(function(M){d.add(fe(M)||"Component"),Cl.add(M.type)}),of=[]);var m=new Set;if(0<lf.length&&(lf.forEach(function(M){m.add(fe(M)||"Component"),Cl.add(M.type)}),lf=[]),0<n.size){var _=x(n);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move code with side effects to componentDidMount, and set initial state in the constructor.
Please update the following components: %s`,_)}0<u.size&&(_=x(u),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
Please update the following components: %s`,_)),0<m.size&&(_=x(m),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
Please update the following components: %s`,_)),0<t.size&&(_=x(t),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
Please update the following components: %s`,_)),0<a.size&&(_=x(a),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
Please update the following components: %s`,_)),0<d.size&&(_=x(d),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
Please update the following components: %s`,_))};var ag=new Map,nC=new Set;Vs.recordLegacyContextWarning=function(t,n){for(var a=null,u=t;u!==null;)u.mode&an&&(a=u),u=u.return;a===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!nC.has(t.type)&&(u=ag.get(a),t.type.contextTypes!=null||t.type.childContextTypes!=null||n!==null&&typeof n.getChildContext=="function")&&(u===void 0&&(u=[],ag.set(a,u)),u.push(t))},Vs.flushLegacyContextWarning=function(){ag.forEach(function(t){if(t.length!==0){var n=t[0],a=new Set;t.forEach(function(d){a.add(fe(d)||"Component"),nC.add(d.type)});var u=x(a);Re(n,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
Please update the following components: %s
Learn more about this warning here: https://react.dev/link/legacy-context`,u)})}})},Vs.discardPendingWarnings=function(){nf=[],sf=[],rf=[],af=[],of=[],lf=[],ag=new Map};var uf=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),sC=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),og=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),Bv={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},cf=null,lg=!1,_s=0,Ss=1,Tn=2,Gi=4,Di=8,rC=0,aC=1,oC=2,qv=3,fo=!1,lC=!1,Fv=null,Hv=!1,Nc=me(null),ug=me(0),kc,uC=new Set,cC=new Set,Vv=new Set,dC=new Set,po=0,Ke=null,zt=null,vi=null,cg=!1,Oc=!1,Al=!1,dg=0,df=0,va=null,bR=0,_R=25,ee=null,xs=null,ba=-1,hf=!1,hg={readContext:Vt,use:Gn,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt},$v=null,hC=null,Yv=null,fC=null,Lr=null,$s=null,fg=null;$v={readContext:function(t){return Vt(t)},use:Gn,useCallback:function(t,n){return ee="useCallback",lt(),Qa(n),ni(t,n)},useContext:function(t){return ee="useContext",lt(),Vt(t)},useEffect:function(t,n){return ee="useEffect",lt(),Qa(n),J(t,n)},useImperativeHandle:function(t,n,a){return ee="useImperativeHandle",lt(),Qa(a),Be(t,n,a)},useInsertionEffect:function(t,n){ee="useInsertionEffect",lt(),Qa(n),j(4,Tn,t,n)},useLayoutEffect:function(t,n){return ee="useLayoutEffect",lt(),Qa(n),Ee(t,n)},useMemo:function(t,n){ee="useMemo",lt(),Qa(n);var a=te.H;te.H=Lr;try{return hs(t,n)}finally{te.H=a}},useReducer:function(t,n,a){ee="useReducer",lt();var u=te.H;te.H=Lr;try{return bh(t,n,a)}finally{te.H=u}},useRef:function(t){return ee="useRef",lt(),R(t)},useState:function(t){ee="useState",lt();var n=te.H;te.H=Lr;try{return In(t)}finally{te.H=n}},useDebugValue:function(){ee="useDebugValue",lt()},useDeferredValue:function(t,n){return ee="useDeferredValue",lt(),ra(t,n)},useTransition:function(){return ee="useTransition",lt(),nT()},useSyncExternalStore:function(t,n,a){return ee="useSyncExternalStore",lt(),gl(t,n,a)},useId:function(){return ee="useId",lt(),sT()},useFormState:function(t,n){return ee="useFormState",lt(),Ju(),g(t,n)},useActionState:function(t,n){return ee="useActionState",lt(),g(t,n)},useOptimistic:function(t){return ee="useOptimistic",lt(),xh(t)},useHostTransitionStatus:yl,useMemoCache:ds,useCacheRefresh:function(){return ee="useCacheRefresh",lt(),rT()}},hC={readContext:function(t){return Vt(t)},use:Gn,useCallback:function(t,n){return ee="useCallback",Te(),ni(t,n)},useContext:function(t){return ee="useContext",Te(),Vt(t)},useEffect:function(t,n){return ee="useEffect",Te(),J(t,n)},useImperativeHandle:function(t,n,a){return ee="useImperativeHandle",Te(),Be(t,n,a)},useInsertionEffect:function(t,n){ee="useInsertionEffect",Te(),j(4,Tn,t,n)},useLayoutEffect:function(t,n){return ee="useLayoutEffect",Te(),Ee(t,n)},useMemo:function(t,n){ee="useMemo",Te();var a=te.H;te.H=Lr;try{return hs(t,n)}finally{te.H=a}},useReducer:function(t,n,a){ee="useReducer",Te();var u=te.H;te.H=Lr;try{return bh(t,n,a)}finally{te.H=u}},useRef:function(t){return ee="useRef",Te(),R(t)},useState:function(t){ee="useState",Te();var n=te.H;te.H=Lr;try{return In(t)}finally{te.H=n}},useDebugValue:function(){ee="useDebugValue",Te()},useDeferredValue:function(t,n){return ee="useDeferredValue",Te(),ra(t,n)},useTransition:function(){return ee="useTransition",Te(),nT()},useSyncExternalStore:function(t,n,a){return ee="useSyncExternalStore",Te(),gl(t,n,a)},useId:function(){return ee="useId",Te(),sT()},useActionState:function(t,n){return ee="useActionState",Te(),g(t,n)},useFormState:function(t,n){return ee="useFormState",Te(),Ju(),g(t,n)},useOptimistic:function(t){return ee="useOptimistic",Te(),xh(t)},useHostTransitionStatus:yl,useMemoCache:ds,useCacheRefresh:function(){return ee="useCacheRefresh",Te(),rT()}},Yv={readContext:function(t){return Vt(t)},use:Gn,useCallback:function(t,n){return ee="useCallback",Te(),Li(t,n)},useContext:function(t){return ee="useContext",Te(),Vt(t)},useEffect:function(t,n){ee="useEffect",Te(),H(2048,Di,t,n)},useImperativeHandle:function(t,n,a){return ee="useImperativeHandle",Te(),Ye(t,n,a)},useInsertionEffect:function(t,n){return ee="useInsertionEffect",Te(),H(4,Tn,t,n)},useLayoutEffect:function(t,n){return ee="useLayoutEffect",Te(),H(4,Gi,t,n)},useMemo:function(t,n){ee="useMemo",Te();var a=te.H;te.H=$s;try{return _r(t,n)}finally{te.H=a}},useReducer:function(t,n,a){ee="useReducer",Te();var u=te.H;te.H=$s;try{return Xa(t,n,a)}finally{te.H=u}},useRef:function(){return ee="useRef",Te(),_t().memoizedState},useState:function(){ee="useState",Te();var t=te.H;te.H=$s;try{return Xa(Xn)}finally{te.H=t}},useDebugValue:function(){ee="useDebugValue",Te()},useDeferredValue:function(t,n){return ee="useDeferredValue",Te(),Wa(t,n)},useTransition:function(){return ee="useTransition",Te(),Wx()},useSyncExternalStore:function(t,n,a){return ee="useSyncExternalStore",Te(),ec(t,n,a)},useId:function(){return ee="useId",Te(),_t().memoizedState},useFormState:function(t){return ee="useFormState",Te(),Ju(),y(t)},useActionState:function(t){return ee="useActionState",Te(),y(t)},useOptimistic:function(t,n){return ee="useOptimistic",Te(),Eh(t,n)},useHostTransitionStatus:yl,useMemoCache:ds,useCacheRefresh:function(){return ee="useCacheRefresh",Te(),_t().memoizedState}},fC={readContext:function(t){return Vt(t)},use:Gn,useCallback:function(t,n){return ee="useCallback",Te(),Li(t,n)},useContext:function(t){return ee="useContext",Te(),Vt(t)},useEffect:function(t,n){ee="useEffect",Te(),H(2048,Di,t,n)},useImperativeHandle:function(t,n,a){return ee="useImperativeHandle",Te(),Ye(t,n,a)},useInsertionEffect:function(t,n){return ee="useInsertionEffect",Te(),H(4,Tn,t,n)},useLayoutEffect:function(t,n){return ee="useLayoutEffect",Te(),H(4,Gi,t,n)},useMemo:function(t,n){ee="useMemo",Te();var a=te.H;te.H=fg;try{return _r(t,n)}finally{te.H=a}},useReducer:function(t,n,a){ee="useReducer",Te();var u=te.H;te.H=fg;try{return ml(t,n,a)}finally{te.H=u}},useRef:function(){return ee="useRef",Te(),_t().memoizedState},useState:function(){ee="useState",Te();var t=te.H;te.H=fg;try{return ml(Xn)}finally{te.H=t}},useDebugValue:function(){ee="useDebugValue",Te()},useDeferredValue:function(t,n){return ee="useDeferredValue",Te(),Ka(t,n)},useTransition:function(){return ee="useTransition",Te(),Kx()},useSyncExternalStore:function(t,n,a){return ee="useSyncExternalStore",Te(),ec(t,n,a)},useId:function(){return ee="useId",Te(),_t().memoizedState},useFormState:function(t){return ee="useFormState",Te(),Ju(),E(t)},useActionState:function(t){return ee="useActionState",Te(),E(t)},useOptimistic:function(t,n){return ee="useOptimistic",Te(),hm(t,n)},useHostTransitionStatus:yl,useMemoCache:ds,useCacheRefresh:function(){return ee="useCacheRefresh",Te(),_t().memoizedState}},Lr={readContext:function(t){return v(),Vt(t)},use:function(t){return p(),Gn(t)},useCallback:function(t,n){return ee="useCallback",p(),lt(),ni(t,n)},useContext:function(t){return ee="useContext",p(),lt(),Vt(t)},useEffect:function(t,n){return ee="useEffect",p(),lt(),J(t,n)},useImperativeHandle:function(t,n,a){return ee="useImperativeHandle",p(),lt(),Be(t,n,a)},useInsertionEffect:function(t,n){ee="useInsertionEffect",p(),lt(),j(4,Tn,t,n)},useLayoutEffect:function(t,n){return ee="useLayoutEffect",p(),lt(),Ee(t,n)},useMemo:function(t,n){ee="useMemo",p(),lt();var a=te.H;te.H=Lr;try{return hs(t,n)}finally{te.H=a}},useReducer:function(t,n,a){ee="useReducer",p(),lt();var u=te.H;te.H=Lr;try{return bh(t,n,a)}finally{te.H=u}},useRef:function(t){return ee="useRef",p(),lt(),R(t)},useState:function(t){ee="useState",p(),lt();var n=te.H;te.H=Lr;try{return In(t)}finally{te.H=n}},useDebugValue:function(){ee="useDebugValue",p(),lt()},useDeferredValue:function(t,n){return ee="useDeferredValue",p(),lt(),ra(t,n)},useTransition:function(){return ee="useTransition",p(),lt(),nT()},useSyncExternalStore:function(t,n,a){return ee="useSyncExternalStore",p(),lt(),gl(t,n,a)},useId:function(){return ee="useId",p(),lt(),sT()},useFormState:function(t,n){return ee="useFormState",p(),lt(),g(t,n)},useActionState:function(t,n){return ee="useActionState",p(),lt(),g(t,n)},useOptimistic:function(t){return ee="useOptimistic",p(),lt(),xh(t)},useMemoCache:function(t){return p(),ds(t)},useHostTransitionStatus:yl,useCacheRefresh:function(){return ee="useCacheRefresh",lt(),rT()}},$s={readContext:function(t){return v(),Vt(t)},use:function(t){return p(),Gn(t)},useCallback:function(t,n){return ee="useCallback",p(),Te(),Li(t,n)},useContext:function(t){return ee="useContext",p(),Te(),Vt(t)},useEffect:function(t,n){ee="useEffect",p(),Te(),H(2048,Di,t,n)},useImperativeHandle:function(t,n,a){return ee="useImperativeHandle",p(),Te(),Ye(t,n,a)},useInsertionEffect:function(t,n){return ee="useInsertionEffect",p(),Te(),H(4,Tn,t,n)},useLayoutEffect:function(t,n){return ee="useLayoutEffect",p(),Te(),H(4,Gi,t,n)},useMemo:function(t,n){ee="useMemo",p(),Te();var a=te.H;te.H=$s;try{return _r(t,n)}finally{te.H=a}},useReducer:function(t,n,a){ee="useReducer",p(),Te();var u=te.H;te.H=$s;try{return Xa(t,n,a)}finally{te.H=u}},useRef:function(){return ee="useRef",p(),Te(),_t().memoizedState},useState:function(){ee="useState",p(),Te();var t=te.H;te.H=$s;try{return Xa(Xn)}finally{te.H=t}},useDebugValue:function(){ee="useDebugValue",p(),Te()},useDeferredValue:function(t,n){return ee="useDeferredValue",p(),Te(),Wa(t,n)},useTransition:function(){return ee="useTransition",p(),Te(),Wx()},useSyncExternalStore:function(t,n,a){return ee="useSyncExternalStore",p(),Te(),ec(t,n,a)},useId:function(){return ee="useId",p(),Te(),_t().memoizedState},useFormState:function(t){return ee="useFormState",p(),Te(),y(t)},useActionState:function(t){return ee="useActionState",p(),Te(),y(t)},useOptimistic:function(t,n){return ee="useOptimistic",p(),Te(),Eh(t,n)},useMemoCache:function(t){return p(),ds(t)},useHostTransitionStatus:yl,useCacheRefresh:function(){return ee="useCacheRefresh",Te(),_t().memoizedState}},fg={readContext:function(t){return v(),Vt(t)},use:function(t){return p(),Gn(t)},useCallback:function(t,n){return ee="useCallback",p(),Te(),Li(t,n)},useContext:function(t){return ee="useContext",p(),Te(),Vt(t)},useEffect:function(t,n){ee="useEffect",p(),Te(),H(2048,Di,t,n)},useImperativeHandle:function(t,n,a){return ee="useImperativeHandle",p(),Te(),Ye(t,n,a)},useInsertionEffect:function(t,n){return ee="useInsertionEffect",p(),Te(),H(4,Tn,t,n)},useLayoutEffect:function(t,n){return ee="useLayoutEffect",p(),Te(),H(4,Gi,t,n)},useMemo:function(t,n){ee="useMemo",p(),Te();var a=te.H;te.H=$s;try{return _r(t,n)}finally{te.H=a}},useReducer:function(t,n,a){ee="useReducer",p(),Te();var u=te.H;te.H=$s;try{return ml(t,n,a)}finally{te.H=u}},useRef:function(){return ee="useRef",p(),Te(),_t().memoizedState},useState:function(){ee="useState",p(),Te();var t=te.H;te.H=$s;try{return ml(Xn)}finally{te.H=t}},useDebugValue:function(){ee="useDebugValue",p(),Te()},useDeferredValue:function(t,n){return ee="useDeferredValue",p(),Te(),Ka(t,n)},useTransition:function(){return ee="useTransition",p(),Te(),Kx()},useSyncExternalStore:function(t,n,a){return ee="useSyncExternalStore",p(),Te(),ec(t,n,a)},useId:function(){return ee="useId",p(),Te(),_t().memoizedState},useFormState:function(t){return ee="useFormState",p(),Te(),E(t)},useActionState:function(t){return ee="useActionState",p(),Te(),E(t)},useOptimistic:function(t,n){return ee="useOptimistic",p(),Te(),hm(t,n)},useMemoCache:function(t){return p(),ds(t)},useHostTransitionStatus:yl,useCacheRefresh:function(){return ee="useCacheRefresh",Te(),_t().memoizedState}};var pC={"react-stack-bottom-frame":function(t,n,a){var u=kr;kr=!0;try{return t(n,a)}finally{kr=u}}},Qv=pC["react-stack-bottom-frame"].bind(pC),mC={"react-stack-bottom-frame":function(t){var n=kr;kr=!0;try{return t.render()}finally{kr=n}}},gC=mC["react-stack-bottom-frame"].bind(mC),yC={"react-stack-bottom-frame":function(t,n){try{n.componentDidMount()}catch(a){Rt(t,t.return,a)}}},Gv=yC["react-stack-bottom-frame"].bind(yC),TC={"react-stack-bottom-frame":function(t,n,a,u,d){try{n.componentDidUpdate(a,u,d)}catch(m){Rt(t,t.return,m)}}},vC=TC["react-stack-bottom-frame"].bind(TC),bC={"react-stack-bottom-frame":function(t,n){var a=n.stack;t.componentDidCatch(n.value,{componentStack:a!==null?a:""})}},SR=bC["react-stack-bottom-frame"].bind(bC),_C={"react-stack-bottom-frame":function(t,n,a){try{a.componentWillUnmount()}catch(u){Rt(t,n,u)}}},SC=_C["react-stack-bottom-frame"].bind(_C),xC={"react-stack-bottom-frame":function(t){t.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",t.resourceKind);var n=t.create;return t=t.inst,n=n(),t.destroy=n}},xR=xC["react-stack-bottom-frame"].bind(xC),EC={"react-stack-bottom-frame":function(t,n,a){try{a()}catch(u){Rt(t,n,u)}}},ER=EC["react-stack-bottom-frame"].bind(EC),MC={"react-stack-bottom-frame":function(t){var n=t._init;return n(t._payload)}},mo=MC["react-stack-bottom-frame"].bind(MC),Ic=null,ff=0,ot=null,Xv,DC=Xv=!1,CC={},AC={},wC={};f=function(t,n,a){if(a!==null&&typeof a=="object"&&a._store&&(!a._store.validated&&a.key==null||a._store.validated===2)){if(typeof a._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");a._store.validated=1;var u=fe(t),d=u||"null";if(!CC[d]){CC[d]=!0,a=a._owner,t=t._debugOwner;var m="";t&&typeof t.tag=="number"&&(d=fe(t))&&(m=`
Check the render method of \``+d+"`."),m||u&&(m=`
Check the top-level render call using <`+u+">.");var _="";a!=null&&t!==a&&(u=null,typeof a.tag=="number"?u=fe(a):typeof a.name=="string"&&(u=a.name),u&&(_=" It was passed a child from "+u+".")),Re(n,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',m,_)})}}};var Lc=tE(!0),NC=tE(!1),Es=me(null),Rr=null,Rc=1,pf=2,Ci=me(0),kC={},OC=new Set,IC=new Set,LC=new Set,RC=new Set,jC=new Set,zC=new Set,UC=new Set,PC=new Set,BC=new Set,qC=new Set;Object.freeze(kC);var Wv={enqueueSetState:function(t,n,a){t=t._reactInternals;var u=Zn(t),d=On(u);d.payload=n,a!=null&&(oT(a),d.callback=a),n=Tr(t,d,u),n!==null&&(hi(n,t,u),Ya(n,t,u)),Pe(t,u)},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var u=Zn(t),d=On(u);d.tag=aC,d.payload=n,a!=null&&(oT(a),d.callback=a),n=Tr(t,d,u),n!==null&&(hi(n,t,u),Ya(n,t,u)),Pe(t,u)},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=Zn(t),u=On(a);u.tag=oC,n!=null&&(oT(n),u.callback=n),n=Tr(t,u,a),n!==null&&(hi(n,t,a),Ya(n,t,a)),Ne!==null&&typeof Ne.markForceUpdateScheduled=="function"&&Ne.markForceUpdateScheduled(t,a)}},Kv=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},jc=null,Zv=null,FC=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),ji=!1,HC={},VC={},$C={},YC={},zc=!1,QC={},Jv={},eb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},GC=!1,XC=null;XC=new Set;var _a=!1,fi=!1,tb=!1,WC=typeof WeakSet=="function"?WeakSet:Set,zi=null,Uc=null,Pc=null,bi=null,jn=!1,Ys=null,mf=8192,MR={getCacheForType:function(t){var n=Vt(Mi),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},getOwner:function(){return es}};if(typeof Symbol=="function"&&Symbol.for){var gf=Symbol.for;gf("selector.component"),gf("selector.has_pseudo_class"),gf("selector.role"),gf("selector.test_id"),gf("selector.text")}var DR=[],CR=typeof WeakMap=="function"?WeakMap:Map,ts=0,vn=2,Qs=4,Sa=0,yf=1,Bc=2,ib=3,wl=4,pg=6,KC=5,Mt=ts,Bt=null,ht=null,ft=0,zn=0,Tf=1,Nl=2,vf=3,ZC=4,nb=5,qc=6,bf=7,sb=8,kl=9,Nt=zn,is=null,go=!1,Fc=!1,rb=!1,jr=0,ri=Sa,yo=0,To=0,ab=0,ns=0,Ol=0,_f=null,bn=null,mg=!1,ob=0,JC=300,gg=1/0,eA=500,Sf=null,vo=null,AR=0,wR=1,NR=2,Il=0,tA=1,iA=2,nA=3,kR=4,lb=5,Xi=0,bo=null,Hc=null,_o=0,ub=0,cb=null,sA=null,OR=50,xf=0,db=null,hb=!1,yg=!1,IR=50,Ll=0,Ef=null,Vc=!1,Tg=null,rA=!1,aA=new Set,LR={},vg=null,$c=null,fb=!1,pb=!1,bg=!1,mb=!1,Rl=0,gb={};(function(){for(var t=0;t<Iv.length;t++){var n=Iv[t],a=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),Yn(a,"on"+n)}Yn(VD,"onAnimationEnd"),Yn($D,"onAnimationIteration"),Yn(YD,"onAnimationStart"),Yn("dblclick","onDoubleClick"),Yn("focusin","onFocus"),Yn("focusout","onBlur"),Yn(dR,"onTransitionRun"),Yn(hR,"onTransitionStart"),Yn(fR,"onTransitionCancel"),Yn(QD,"onTransitionEnd")})(),Ce("onMouseEnter",["mouseout","mouseover"]),Ce("onMouseLeave",["mouseout","mouseover"]),Ce("onPointerEnter",["pointerout","pointerover"]),Ce("onPointerLeave",["pointerout","pointerover"]),be("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),be("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),be("onBeforeInput",["compositionend","keypress","textInput","paste"]),be("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),be("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),be("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),yb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mf)),_g="_reactListening"+Math.random().toString(36).slice(2),oA=!1,lA=!1,Sg=!1,uA=!1,xg=!1,Eg=!1,cA=!1,Mg={},RR=/\r\n?/g,jR=/\u0000|\uFFFD/g,jl="http://www.w3.org/1999/xlink",Tb="http://www.w3.org/XML/1998/namespace",zR="javascript:throw new Error('React form unexpectedly submitted.')",UR="suppressHydrationWarning",Dg="$",Cg="/$",xa="$?",Df="$!",PR=1,BR=2,qR=4,vb="F!",dA="F",hA="complete",FR="style",Ea=0,Yc=1,Ag=2,bb=null,_b=null,fA={dialog:!0,webview:!0},Sb=null,pA=typeof setTimeout=="function"?setTimeout:void 0,HR=typeof clearTimeout=="function"?clearTimeout:void 0,zl=-1,mA=typeof Promise=="function"?Promise:void 0,VR=typeof queueMicrotask=="function"?queueMicrotask:typeof mA<"u"?function(t){return mA.resolve(null).then(t).catch(wL)}:pA,xb=null,Ul=0,Cf=1,gA=2,yA=3,Ms=4,Ds=new Map,TA=new Set,Ma=Et.d;Et.d={f:function(){var t=Ma.f(),n=sc();return t||n},r:function(t){var n=Vn(t);n!==null&&n.tag===5&&n.type==="form"?Xx(n):Ma.r(t)},D:function(t){Ma.D(t),UM("dns-prefetch",t,null)},C:function(t,n){Ma.C(t,n),UM("preconnect",t,n)},L:function(t,n,a){Ma.L(t,n,a);var u=Qc;if(u&&t&&n){var d='link[rel="preload"][as="'+yi(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+yi(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+yi(a.imageSizes)+'"]')):d+='[href="'+yi(t)+'"]';var m=d;switch(n){case"style":m=lc(t);break;case"script":m=uc(t)}Ds.has(m)||(t=ut({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),Ds.set(m,t),u.querySelector(d)!==null||n==="style"&&u.querySelector(Ph(m))||n==="script"&&u.querySelector(Bh(m))||(n=u.createElement("link"),$i(n,"link",t),Q(n),u.head.appendChild(n)))}},m:function(t,n){Ma.m(t,n);var a=Qc;if(a&&t){var u=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+yi(u)+'"][href="'+yi(t)+'"]',m=d;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=uc(t)}if(!Ds.has(m)&&(t=ut({rel:"modulepreload",href:t},n),Ds.set(m,t),a.querySelector(d)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Bh(m)))return}u=a.createElement("link"),$i(u,"link",t),Q(u),a.head.appendChild(u)}}},X:function(t,n){Ma.X(t,n);var a=Qc;if(a&&t){var u=A(a).hoistableScripts,d=uc(t),m=u.get(d);m||(m=a.querySelector(Bh(d)),m||(t=ut({src:t,async:!0},n),(n=Ds.get(d))&&WT(t,n),m=a.createElement("script"),Q(m),$i(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(d,m))}},S:function(t,n,a){Ma.S(t,n,a);var u=Qc;if(u&&t){var d=A(u).hoistableStyles,m=lc(t);n=n||"default";var _=d.get(m);if(!_){var M={loading:Ul,preload:null};if(_=u.querySelector(Ph(m)))M.loading=Cf|Ms;else{t=ut({rel:"stylesheet",href:t,"data-precedence":n},a),(a=Ds.get(m))&&XT(t,a);var N=_=u.createElement("link");Q(N),$i(N,"link",t),N._p=new Promise(function(L,Z){N.onload=L,N.onerror=Z}),N.addEventListener("load",function(){M.loading|=Cf}),N.addEventListener("error",function(){M.loading|=gA}),M.loading|=Ms,jm(_,n,u)}_={type:"stylesheet",instance:_,count:1,state:M},d.set(m,_)}}},M:function(t,n){Ma.M(t,n);var a=Qc;if(a&&t){var u=A(a).hoistableScripts,d=uc(t),m=u.get(d);m||(m=a.querySelector(Bh(d)),m||(t=ut({src:t,async:!0,type:"module"},n),(n=Ds.get(d))&&WT(t,n),m=a.createElement("script"),Q(m),$i(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(d,m))}}};var Qc=typeof document>"u"?null:document,wg=null,Af=null,Eb=null,Ng=null,Pl=u5,wf={$$typeof:Cr,Provider:null,Consumer:null,_currentValue:Pl,_currentValue2:Pl,_threadCount:0},vA="%c%s%c ",bA="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",_A="",kg=" ",$R=Function.prototype.bind,SA=!1,xA=null,EA=null,MA=null,DA=null,CA=null,AA=null,wA=null,NA=null,kA=null;xA=function(t,n,a,u){n=s(t,n),n!==null&&(a=e(n.memoizedState,a,0,u),n.memoizedState=a,n.baseState=a,t.memoizedProps=ut({},t.memoizedProps),a=xi(t,2),a!==null&&hi(a,t,2))},EA=function(t,n,a){n=s(t,n),n!==null&&(a=o(n.memoizedState,a,0),n.memoizedState=a,n.baseState=a,t.memoizedProps=ut({},t.memoizedProps),a=xi(t,2),a!==null&&hi(a,t,2))},MA=function(t,n,a,u){n=s(t,n),n!==null&&(a=i(n.memoizedState,a,u),n.memoizedState=a,n.baseState=a,t.memoizedProps=ut({},t.memoizedProps),a=xi(t,2),a!==null&&hi(a,t,2))},DA=function(t,n,a){t.pendingProps=e(t.memoizedProps,n,0,a),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=xi(t,2),n!==null&&hi(n,t,2)},CA=function(t,n){t.pendingProps=o(t.memoizedProps,n,0),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=xi(t,2),n!==null&&hi(n,t,2)},AA=function(t,n,a){t.pendingProps=i(t.memoizedProps,n,a),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=xi(t,2),n!==null&&hi(n,t,2)},wA=function(t){var n=xi(t,2);n!==null&&hi(n,t,2)},NA=function(t){c=t},kA=function(t){l=t};var Og=!0,Ig=null,Mb=!1,So=null,xo=null,Eo=null,Nf=new Map,kf=new Map,Mo=[],YR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),Lg=null;if(Bm.prototype.render=nv.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error("Cannot update an unmounted root.");var a=arguments;typeof a[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):P(a[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof a[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),a=t;var u=n.current,d=Zn(u);ZT(u,d,a,n,null,null)},Bm.prototype.unmount=nv.prototype.unmount=function(){var t=arguments;if(typeof t[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),t=this._internalRoot,t!==null){this._internalRoot=null;var n=t.containerInfo;(Mt&(vn|Qs))!==ts&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),ZT(t.current,2,null,t,null,null),sc(),n[uo]=null}},Bm.prototype.unstable_scheduleHydration=function(t){if(t){var n=Ua();t={blockedOn:null,target:t,priority:n};for(var a=0;a<Mo.length&&n!==0&&n<Mo[a].priority;a++);Mo.splice(a,0,t),a===0&&KM(t)}},function(){var t=sv.version;if(t!=="19.1.0")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
- react: `+(t+`
- react-dom: 19.1.0
Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),Et.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error("Unable to find node on an unmounted component."):(t=Object.keys(t).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+t));return t=G(n),t=t!==null?W(t):null,t=t===null?null:t.stateNode,t},!function(){var t={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:te,reconcilerVersion:"19.1.0"};return t.overrideHookState=xA,t.overrideHookStateDeletePath=EA,t.overrideHookStateRenamePath=MA,t.overrideProps=DA,t.overridePropsDeletePath=CA,t.overridePropsRenamePath=AA,t.scheduleUpdate=wA,t.setErrorHandler=NA,t.setSuspenseHandler=kA,t.scheduleRefresh=I,t.scheduleRoot=k,t.setRefreshHandler=C,t.getCurrentFiber=ZL,t.getLaneLabelMap=JL,t.injectProfilingHooks=Fe,Ze(t)}()&&Or&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var OA=window.location.protocol;/^(https?|file):$/.test(OA)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(OA==="file:"?`
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Kc.createRoot=function(t,n){if(!P(t))throw Error("Target container is not a DOM element.");eD(t);var a=!1,u="",d=rE,m=aE,_=oE,M=null;return n!=null&&(n.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof n=="object"&&n!==null&&n.$$typeof===ro&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
let root = createRoot(domContainer);
root.render(<App />);`),n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(_=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(M=n.unstable_transitionCallbacks)),n=$M(t,1,!1,null,null,a,u,d,m,_,M,null),t[uo]=n.current,PT(t),new nv(n)},Kc.hydrateRoot=function(t,n,a){if(!P(t))throw Error("Target container is not a DOM element.");eD(t),n===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var u=!1,d="",m=rE,_=aE,M=oE,N=null,L=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(_=a.onCaughtError),a.onRecoverableError!==void 0&&(M=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(N=a.unstable_transitionCallbacks),a.formState!==void 0&&(L=a.formState)),n=$M(t,1,!0,n,a??null,u,d,m,_,M,N,L),n.context=YM(null),a=n.current,u=Zn(a),u=xt(u),d=On(u),d.callback=null,Tr(a,d,u),a=u,n.current.lanes=a,li(n,a),Mr(n),t[uo]=n.current,PT(t),new Bm(n)},Kc.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Kc}kb.exports=PA();var zb=kb.exports;const GR="";var Zc;typeof window<"u"?Zc=window:typeof Of<"u"?Zc=Of:typeof self<"u"?Zc=self:Zc={};var If=Zc;const z=Gc(If),BA=Db(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ub=typeof Of<"u"?Of:typeof window<"u"?window:{},qA=BA,Jc;typeof document<"u"?Jc=document:(Jc=Ub["__GLOBAL_DOCUMENT_CACHE@4"],Jc||(Jc=Ub["__GLOBAL_DOCUMENT_CACHE@4"]=qA));var Pb=Jc;const ve=Gc(Pb);var Ug={exports:{}};function ei(){return ei=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)({}).hasOwnProperty.call(i,r)&&(s[r]=i[r])}return s},ei.apply(null,arguments)}const FA=Db(Object.freeze(Object.defineProperty({__proto__:null,get default(){return ei}},Symbol.toStringTag,{value:"Module"})));var HA=$A,VA=Object.prototype.toString;function $A(s){if(!s)return!1;var e=VA.call(s);return e==="[object Function]"||typeof s=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(s===window.setTimeout||s===window.alert||s===window.confirm||s===window.prompt)}function YA(s,e){var i=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(i)return(i=i.call(s)).next.bind(i);if(Array.isArray(s)||(i=QA(s))||e&&s&&typeof s.length=="number"){i&&(s=i);var r=0;return function(){return r>=s.length?{done:!0}:{done:!1,value:s[r++]}}}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 QA(s,e){if(s){if(typeof s=="string")return Bb(s,e);var i=Object.prototype.toString.call(s).slice(8,-1);if(i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set")return Array.from(s);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Bb(s,e)}}function Bb(s,e){(e==null||e>s.length)&&(e=s.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=s[i];return r}var GA=function(){function s(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var e=s.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},e.addInterceptor=function(r,o){this.typeToInterceptorsMap_.has(r)||this.typeToInterceptorsMap_.set(r,new Set);var l=this.typeToInterceptorsMap_.get(r);return l.has(o)?!1:(l.add(o),!0)},e.removeInterceptor=function(r,o){var l=this.typeToInterceptorsMap_.get(r);return l&&l.has(o)?(l.delete(o),!0):!1},e.clearInterceptorsByType=function(r){var o=this.typeToInterceptorsMap_.get(r);return o?(this.typeToInterceptorsMap_.delete(r),this.typeToInterceptorsMap_.set(r,new Set),!0):!1},e.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},e.getForType=function(r){return this.typeToInterceptorsMap_.get(r)||new Set},e.execute=function(r,o){for(var l=this.getForType(r),c=YA(l),f;!(f=c()).done;){var p=f.value;try{o=p(o)}catch{}}return o},s}(),XA=GA,WA=function(){function s(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var e=s.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},e.getMaxAttempts=function(){return this.maxAttempts_},e.setMaxAttempts=function(r){this.maxAttempts_=r},e.getDelayFactor=function(){return this.delayFactor_},e.setDelayFactor=function(r){this.delayFactor_=r},e.getFuzzFactor=function(){return this.fuzzFactor_},e.setFuzzFactor=function(r){this.fuzzFactor_=r},e.getInitialDelay=function(){return this.initialDelay_},e.setInitialDelay=function(r){this.initialDelay_=r},e.createRetry=function(r){var o=r===void 0?{}:r,l=o.maxAttempts,c=o.delayFactor,f=o.fuzzFactor,p=o.initialDelay;return new KA({maxAttempts:l||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:f||this.fuzzFactor_,initialDelay:p||this.initialDelay_})},s}(),KA=function(){function s(i){this.maxAttempts_=i.maxAttempts,this.delayFactor_=i.delayFactor,this.fuzzFactor_=i.fuzzFactor,this.currentDelay_=i.initialDelay,this.currentAttempt_=1}var e=s.prototype;return e.moveToNextAttempt=function(){this.currentAttempt_++;var r=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+r},e.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},e.getCurrentDelay=function(){return this.currentDelay_},e.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},e.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},e.getCurrentFuzzedDelay=function(){var r=this.getCurrentMinPossibleDelay(),o=this.getCurrentMaxPossibleDelay();return r+Math.random()*(o-r)},s}(),ZA=WA,JA=If,ew=function(e,i){return i===void 0&&(i=!1),function(r,o,l){if(r){e(r);return}if(o.statusCode>=400&&o.statusCode<=599){var c=l;if(i)if(JA.TextDecoder){var f=tw(o.headers&&o.headers["content-type"]);try{c=new TextDecoder(f).decode(l)}catch{}}else c=String.fromCharCode.apply(null,new Uint8Array(l));e({cause:c});return}e(null,l)}};function tw(s){return s===void 0&&(s=""),s.toLowerCase().split(";").reduce(function(e,i){var r=i.split("="),o=r[0],l=r[1];return o.trim()==="charset"?l.trim():e},"utf-8")}var iw=ew,qb=If,nw=FA,sw=HA,Fb=XA,rw=ZA;ai.httpHandler=iw,ai.requestInterceptorsStorage=new Fb,ai.responseInterceptorsStorage=new Fb,ai.retryManager=new rw;/**
* @license
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
* Copyright (c) 2014 David Björklund
* Available under the MIT license
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
*/var aw=function(e){var i={};return e&&e.trim().split(`
`).forEach(function(r){var o=r.indexOf(":"),l=r.slice(0,o).trim().toLowerCase(),c=r.slice(o+1).trim();typeof i[l]>"u"?i[l]=c:Array.isArray(i[l])?i[l].push(c):i[l]=[i[l],c]}),i};Ug.exports=ai,Ug.exports.default=ai,ai.XMLHttpRequest=qb.XMLHttpRequest||cw,ai.XDomainRequest="withCredentials"in new ai.XMLHttpRequest?ai.XMLHttpRequest:qb.XDomainRequest,ow(["get","put","post","patch","head","delete"],function(s){ai[s==="delete"?"del":s]=function(e,i,r){return i=Hb(e,i,r),i.method=s.toUpperCase(),Pg(i)}});function ow(s,e){for(var i=0;i<s.length;i++)e(s[i])}function lw(s){for(var e in s)if(s.hasOwnProperty(e))return!1;return!0}function Hb(s,e,i){var r=s;return sw(e)?(i=e,typeof s=="string"&&(r={uri:s})):r=nw({},e,{uri:s}),r.callback=i,r}function ai(s,e,i){return e=Hb(s,e,i),Pg(e)}function Pg(s){if(typeof s.callback>"u")throw new Error("callback argument missing");if(s.requestType&&ai.requestInterceptorsStorage.getIsEnabled()){var e={uri:s.uri||s.url,headers:s.headers||{},body:s.body,metadata:s.metadata||{},retry:s.retry,timeout:s.timeout},i=ai.requestInterceptorsStorage.execute(s.requestType,e);s.uri=i.uri,s.headers=i.headers,s.body=i.body,s.metadata=i.metadata,s.retry=i.retry,s.timeout=i.timeout}var r=!1,o=function(W,oe,K){r||(r=!0,s.callback(W,oe,K))};function l(){v.readyState===4&&!ai.responseInterceptorsStorage.getIsEnabled()&&setTimeout(p,0)}function c(){var G=void 0;if(v.response?G=v.response:G=v.responseText||uw(v),U)try{G=JSON.parse(G)}catch{}return G}function f(G){if(clearTimeout(Y),clearTimeout(s.retryTimeout),G instanceof Error||(G=new Error(""+(G||"Unknown XMLHttpRequest Error"))),G.statusCode=0,!x&&ai.retryManager.getIsEnabled()&&s.retry&&s.retry.shouldRetry()){s.retryTimeout=setTimeout(function(){s.retry.moveToNextAttempt(),s.xhr=v,Pg(s)},s.retry.getCurrentFuzzedDelay());return}if(s.requestType&&ai.responseInterceptorsStorage.getIsEnabled()){var W={headers:$.headers||{},body:$.body,responseUrl:v.responseURL,responseType:v.responseType},oe=ai.responseInterceptorsStorage.execute(s.requestType,W);$.body=oe.body,$.headers=oe.headers}return o(G,$)}function p(){if(!x){var G;clearTimeout(Y),clearTimeout(s.retryTimeout),s.useXDR&&v.status===void 0?G=200:G=v.status===1223?204:v.status;var W=$,oe=null;if(G!==0?(W={body:c(),statusCode:G,method:k,headers:{},url:D,rawRequest:v},v.getAllResponseHeaders&&(W.headers=aw(v.getAllResponseHeaders()))):oe=new Error("Internal XMLHttpRequest Error"),s.requestType&&ai.responseInterceptorsStorage.getIsEnabled()){var K={headers:W.headers||{},body:W.body,responseUrl:v.responseURL,responseType:v.responseType},de=ai.responseInterceptorsStorage.execute(s.requestType,K);W.body=de.body,W.headers=de.headers}return o(oe,W,W.body)}}var v=s.xhr||null;v||(s.cors||s.useXDR?v=new ai.XDomainRequest:v=new ai.XMLHttpRequest);var S,x,D=v.url=s.uri||s.url,k=v.method=s.method||"GET",I=s.body||s.data,C=v.headers=s.headers||{},P=!!s.sync,U=!1,Y,$={body:void 0,headers:{},statusCode:0,method:k,url:D,rawRequest:v};if("json"in s&&s.json!==!1&&(U=!0,C.accept||C.Accept||(C.Accept="application/json"),k!=="GET"&&k!=="HEAD"&&(C["content-type"]||C["Content-Type"]||(C["Content-Type"]="application/json"),I=JSON.stringify(s.json===!0?I:s.json))),v.onreadystatechange=l,v.onload=p,v.onerror=f,v.onprogress=function(){},v.onabort=function(){x=!0,clearTimeout(s.retryTimeout)},v.ontimeout=f,v.open(k,D,!P,s.username,s.password),P||(v.withCredentials=!!s.withCredentials),!P&&s.timeout>0&&(Y=setTimeout(function(){if(!x){x=!0,v.abort("timeout");var G=new Error("XMLHttpRequest timeout");G.code="ETIMEDOUT",f(G)}},s.timeout)),v.setRequestHeader)for(S in C)C.hasOwnProperty(S)&&v.setRequestHeader(S,C[S]);else if(s.headers&&!lw(s.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in s&&(v.responseType=s.responseType),"beforeSend"in s&&typeof s.beforeSend=="function"&&s.beforeSend(v),v.send(I||null),v}function uw(s){try{if(s.responseType==="document")return s.responseXML;var e=s.responseXML&&s.responseXML.documentElement.nodeName==="parsererror";if(s.responseType===""&&!e)return s.responseXML}catch{}return null}function cw(){}var dw=Ug.exports;const Vb=Gc(dw);var $b={exports:{}},Yb=Pb,Bg=Object.create||function(){function s(){}return function(e){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return s.prototype=e,new s}}();function Pn(s,e){this.name="ParsingError",this.code=s.code,this.message=e||s.message}Pn.prototype=Bg(Error.prototype),Pn.prototype.constructor=Pn,Pn.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function qg(s){function e(r,o,l,c){return(r|0)*3600+(o|0)*60+(l|0)+(c|0)/1e3}var i=s.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}function ed(){this.values=Bg(null)}ed.prototype={set:function(s,e){!this.get(s)&&e!==""&&(this.values[s]=e)},get:function(s,e,i){return i?this.has(s)?this.values[s]:e[i]:this.has(s)?this.values[s]:e},has:function(s){return s in this.values},alt:function(s,e,i){for(var r=0;r<i.length;++r)if(e===i[r]){this.set(s,e);break}},integer:function(s,e){/^-?\d+$/.test(e)&&this.set(s,parseInt(e,10))},percent:function(s,e){return e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e),e>=0&&e<=100)?(this.set(s,e),!0):!1}};function td(s,e,i,r){var o=r?s.split(r):[s];for(var l in o)if(typeof o[l]=="string"){var c=o[l].split(i);if(c.length===2){var f=c[0].trim(),p=c[1].trim();e(f,p)}}}function hw(s,e,i){var r=s;function o(){var f=qg(s);if(f===null)throw new Pn(Pn.Errors.BadTimeStamp,"Malformed timestamp: "+r);return s=s.replace(/^[^\sa-zA-Z-]+/,""),f}function l(f,p){var v=new ed;td(f,function(S,x){switch(S){case"region":for(var D=i.length-1;D>=0;D--)if(i[D].id===x){v.set(S,i[D].region);break}break;case"vertical":v.alt(S,x,["rl","lr"]);break;case"line":var k=x.split(","),I=k[0];v.integer(S,I),v.percent(S,I)&&v.set("snapToLines",!1),v.alt(S,I,["auto"]),k.length===2&&v.alt("lineAlign",k[1],["start","center","end"]);break;case"position":k=x.split(","),v.percent(S,k[0]),k.length===2&&v.alt("positionAlign",k[1],["start","center","end"]);break;case"size":v.percent(S,x);break;case"align":v.alt(S,x,["start","center","end","left","right"]);break}},/:/,/\s/),p.region=v.get("region",null),p.vertical=v.get("vertical","");try{p.line=v.get("line","auto")}catch{}p.lineAlign=v.get("lineAlign","start"),p.snapToLines=v.get("snapToLines",!0),p.size=v.get("size",100);try{p.align=v.get("align","center")}catch{p.align=v.get("align","middle")}try{p.position=v.get("position","auto")}catch{p.position=v.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},p.align)}p.positionAlign=v.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},p.align)}function c(){s=s.replace(/^\s+/,"")}if(c(),e.startTime=o(),c(),s.substr(0,3)!=="-->")throw new Pn(Pn.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+r);s=s.substr(3),c(),e.endTime=o(),c(),l(s,e)}var Fg=Yb.createElement&&Yb.createElement("textarea"),fw={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Qb={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},pw={v:"title",lang:"lang"},Gb={rt:"ruby"};function Xb(s,e){function i(){if(!e)return null;function I(P){return e=e.substr(P.length),P}var C=e.match(/^([^<]*)(<[^>]*>?)?/);return I(C[1]?C[1]:C[2])}function r(I){return Fg.innerHTML=I,I=Fg.textContent,Fg.textContent="",I}function o(I,C){return!Gb[C.localName]||Gb[C.localName]===I.localName}function l(I,C){var P=fw[I];if(!P)return null;var U=s.document.createElement(P),Y=pw[I];return Y&&C&&(U[Y]=C.trim()),U}for(var c=s.document.createElement("div"),f=c,p,v=[];(p=i())!==null;){if(p[0]==="<"){if(p[1]==="/"){v.length&&v[v.length-1]===p.substr(2).replace(">","")&&(v.pop(),f=f.parentNode);continue}var S=qg(p.substr(1,p.length-2)),x;if(S){x=s.document.createProcessingInstruction("timestamp",S),f.appendChild(x);continue}var D=p.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!D||(x=l(D[1],D[3]),!x)||!o(f,x))continue;if(D[2]){var k=D[2].split(".");k.forEach(function(I){var C=/^bg_/.test(I),P=C?I.slice(3):I;if(Qb.hasOwnProperty(P)){var U=C?"background-color":"color",Y=Qb[P];x.style[U]=Y}}),x.className=k.join(" ")}v.push(D[1]),f.appendChild(x),f=x;continue}f.appendChild(s.document.createTextNode(r(p)))}return c}var Wb=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function mw(s){for(var e=0;e<Wb.length;e++){var i=Wb[e];if(s>=i[0]&&s<=i[1])return!0}return!1}function gw(s){var e=[],i="",r;if(!s||!s.childNodes)return"ltr";function o(f,p){for(var v=p.childNodes.length-1;v>=0;v--)f.push(p.childNodes[v])}function l(f){if(!f||!f.length)return null;var p=f.pop(),v=p.textContent||p.innerText;if(v){var S=v.match(/^.*(\n|\r)/);return S?(f.length=0,S[0]):v}if(p.tagName==="ruby")return l(f);if(p.childNodes)return o(f,p),l(f)}for(o(e,s);i=l(e);)for(var c=0;c<i.length;c++)if(r=i.charCodeAt(c),mw(r))return"rtl";return"ltr"}function yw(s){if(typeof s.line=="number"&&(s.snapToLines||s.line>=0&&s.line<=100))return s.line;if(!s.track||!s.track.textTrackList||!s.track.textTrackList.mediaElement)return-1;for(var e=s.track,i=e.textTrackList,r=0,o=0;o<i.length&&i[o]!==e;o++)i[o].mode==="showing"&&r++;return++r*-1}function Lf(){}Lf.prototype.applyStyles=function(s,e){e=e||this.div;for(var i in s)s.hasOwnProperty(i)&&(e.style[i]=s[i])},Lf.prototype.formatStyle=function(s,e){return s===0?0:s+e};function Rf(s,e,i){Lf.call(this),this.cue=e,this.cueDiv=Xb(s,e.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=s.document.createElement("div"),r={direction:gw(this.cueDiv),writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:e.align==="middle"?"center":e.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var o=0;switch(e.positionAlign){case"start":case"line-left":o=e.position;break;case"center":o=e.position-e.size/2;break;case"end":case"line-right":o=e.position-e.size;break}e.vertical===""?this.applyStyles({left:this.formatStyle(o,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(o,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(l){this.applyStyles({top:this.formatStyle(l.top,"px"),bottom:this.formatStyle(l.bottom,"px"),left:this.formatStyle(l.left,"px"),right:this.formatStyle(l.right,"px"),height:this.formatStyle(l.height,"px"),width:this.formatStyle(l.width,"px")})}}Rf.prototype=Bg(Lf.prototype),Rf.prototype.constructor=Rf;function on(s){var e,i,r,o;if(s.div){i=s.div.offsetHeight,r=s.div.offsetWidth,o=s.div.offsetTop;var l=(l=s.div.childNodes)&&(l=l[0])&&l.getClientRects&&l.getClientRects();s=s.div.getBoundingClientRect(),e=l?Math.max(l[0]&&l[0].height||0,s.height/l.length):0}this.left=s.left,this.right=s.right,this.top=s.top||o,this.height=s.height||i,this.bottom=s.bottom||o+(s.height||i),this.width=s.width||r,this.lineHeight=e!==void 0?e:s.lineHeight}on.prototype.move=function(s,e){switch(e=e!==void 0?e:this.lineHeight,s){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e;break}},on.prototype.overlaps=function(s){return this.left<s.right&&this.right>s.left&&this.top<s.bottom&&this.bottom>s.top},on.prototype.overlapsAny=function(s){for(var e=0;e<s.length;e++)if(this.overlaps(s[e]))return!0;return!1},on.prototype.within=function(s){return this.top>=s.top&&this.bottom<=s.bottom&&this.left>=s.left&&this.right<=s.right},on.prototype.overlapsOppositeAxis=function(s,e){switch(e){case"+x":return this.left<s.left;case"-x":return this.right>s.right;case"+y":return this.top<s.top;case"-y":return this.bottom>s.bottom}},on.prototype.intersectPercentage=function(s){var e=Math.max(0,Math.min(this.right,s.right)-Math.max(this.left,s.left)),i=Math.max(0,Math.min(this.bottom,s.bottom)-Math.max(this.top,s.top)),r=e*i;return r/(this.height*this.width)},on.prototype.toCSSCompatValues=function(s){return{top:this.top-s.top,bottom:s.bottom-this.bottom,left:this.left-s.left,right:s.right-this.right,height:this.height,width:this.width}},on.getSimpleBoxPosition=function(s){var e=s.div?s.div.offsetHeight:s.tagName?s.offsetHeight:0,i=s.div?s.div.offsetWidth:s.tagName?s.offsetWidth:0,r=s.div?s.div.offsetTop:s.tagName?s.offsetTop:0;s=s.div?s.div.getBoundingClientRect():s.tagName?s.getBoundingClientRect():s;var o={left:s.left,right:s.right,top:s.top||r,height:s.height||e,bottom:s.bottom||r+(s.height||e),width:s.width||i};return o};function Tw(s,e,i,r){function o(P,U){for(var Y,$=new on(P),G=1,W=0;W<U.length;W++){for(;P.overlapsOppositeAxis(i,U[W])||P.within(i)&&P.overlapsAny(r);)P.move(U[W]);if(P.within(i))return P;var oe=P.intersectPercentage(i);G>oe&&(Y=new on(P),G=oe),P=new on($)}return Y||$}var l=new on(e),c=e.cue,f=yw(c),p=[];if(c.snapToLines){var v;switch(c.vertical){case"":p=["+y","-y"],v="height";break;case"rl":p=["+x","-x"],v="width";break;case"lr":p=["-x","+x"],v="width";break}var S=l.lineHeight,x=S*Math.round(f),D=i[v]+S,k=p[0];Math.abs(x)>D&&(x=x<0?-1:1,x*=Math.ceil(D/S)*S),f<0&&(x+=c.vertical===""?i.height:i.width,p=p.reverse()),l.move(k,x)}else{var I=l.lineHeight/i.height*100;switch(c.lineAlign){case"center":f-=I/2;break;case"end":f-=I;break}switch(c.vertical){case"":e.applyStyles({top:e.formatStyle(f,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(f,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(f,"%")});break}p=["+y","-x","+x","-y"],l=new on(e)}var C=o(l,p);e.move(C.toCSSCompatValues(i))}function ql(){}ql.StringDecoder=function(){return{decode:function(s){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))}}},ql.convertCueToDOMTree=function(s,e){return!s||!e?null:Xb(s,e)};var vw=.05,bw="sans-serif",_w="1.5%";ql.processCues=function(s,e,i){if(!s||!e||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var r=s.document.createElement("div");r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin=_w,i.appendChild(r);function o(S){for(var x=0;x<S.length;x++)if(S[x].hasBeenReset||!S[x].displayState)return!0;return!1}if(!o(e)){for(var l=0;l<e.length;l++)r.appendChild(e[l].displayState);return}var c=[],f=on.getSimpleBoxPosition(r),p=Math.round(f.height*vw*100)/100,v={font:p+"px "+bw};(function(){for(var S,x,D=0;D<e.length;D++)x=e[D],S=new Rf(s,x,v),r.appendChild(S.div),Tw(s,S,f,c),x.displayState=S.div,c.push(on.getSimpleBoxPosition(S))})()},ql.Parser=function(s,e,i){i||(i=e,e={}),e||(e={}),this.window=s,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},ql.Parser.prototype={reportOrThrowError:function(s){if(s instanceof Pn)this.onparsingerror&&this.onparsingerror(s);else throw s},parse:function(s){var e=this;s&&(e.buffer+=e.decoder.decode(s,{stream:!0}));function i(){for(var S=e.buffer,x=0;x<S.length&&S[x]!=="\r"&&S[x]!==`
`;)++x;var D=S.substr(0,x);return S[x]==="\r"&&++x,S[x]===`
`&&++x,e.buffer=S.substr(x),D}function r(S){var x=new ed;if(td(S,function(k,I){switch(k){case"id":x.set(k,I);break;case"width":x.percent(k,I);break;case"lines":x.integer(k,I);break;case"regionanchor":case"viewportanchor":var C=I.split(",");if(C.length!==2)break;var P=new ed;if(P.percent("x",C[0]),P.percent("y",C[1]),!P.has("x")||!P.has("y"))break;x.set(k+"X",P.get("x")),x.set(k+"Y",P.get("y"));break;case"scroll":x.alt(k,I,["up"]);break}},/=/,/\s/),x.has("id")){var D=new(e.vttjs.VTTRegion||e.window.VTTRegion);D.width=x.get("width",100),D.lines=x.get("lines",3),D.regionAnchorX=x.get("regionanchorX",0),D.regionAnchorY=x.get("regionanchorY",100),D.viewportAnchorX=x.get("viewportanchorX",0),D.viewportAnchorY=x.get("viewportanchorY",100),D.scroll=x.get("scroll",""),e.onregion&&e.onregion(D),e.regionList.push({id:x.get("id"),region:D})}}function o(S){var x=new ed;td(S,function(D,k){switch(D){case"MPEGT":x.integer(D+"S",k);break;case"LOCA":x.set(D+"L",qg(k));break}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:x.get("MPEGTS"),LOCAL:x.get("LOCAL")})}function l(S){S.match(/X-TIMESTAMP-MAP/)?td(S,function(x,D){switch(x){case"X-TIMESTAMP-MAP":o(D);break}},/=/):td(S,function(x,D){switch(x){case"Region":r(D);break}},/:/)}try{var c;if(e.state==="INITIAL"){if(!/\r\n|\n/.test(e.buffer))return this;c=i();var f=c.match(/^WEBVTT([ \t].*)?$/);if(!f||!f[0])throw new Pn(Pn.Errors.BadSignature);e.state="HEADER"}for(var p=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(p?p=!1:c=i(),e.state){case"HEADER":/:/.test(c)?l(c):c||(e.state="ID");continue;case"NOTE":c||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(c)){e.state="NOTE";break}if(!c)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch{e.cue.align="middle"}if(e.state="CUE",c.indexOf("-->")===-1){e.cue.id=c;continue}case"CUE":try{hw(c,e.cue,e.regionList)}catch(S){e.reportOrThrowError(S),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var v=c.indexOf("-->")!==-1;if(!c||v&&(p=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+=`
`),e.cue.text+=c.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":c||(e.state="ID");continue}}}catch(S){e.reportOrThrowError(S),e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var s=this;try{if(s.buffer+=s.decoder.decode(),(s.cue||s.state==="HEADER")&&(s.buffer+=`
`,s.parse()),s.state==="INITIAL")throw new Pn(Pn.Errors.BadSignature)}catch(e){s.reportOrThrowError(e)}return s.onflush&&s.onflush(),this}};var Sw=ql,xw="auto",Ew={"":1,lr:1,rl:1},Mw={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function Dw(s){if(typeof s!="string")return!1;var e=Ew[s.toLowerCase()];return e?s.toLowerCase():!1}function Hg(s){if(typeof s!="string")return!1;var e=Mw[s.toLowerCase()];return e?s.toLowerCase():!1}function Kb(s,e,i){this.hasBeenReset=!1;var r="",o=!1,l=s,c=e,f=i,p=null,v="",S=!0,x="auto",D="start",k="auto",I="auto",C=100,P="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(U){r=""+U}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(U){o=!!U}},startTime:{enumerable:!0,get:function(){return l},set:function(U){if(typeof U!="number")throw new TypeError("Start time must be set to a number.");l=U,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return c},set:function(U){if(typeof U!="number")throw new TypeError("End time must be set to a number.");c=U,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return f},set:function(U){f=""+U,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return p},set:function(U){p=U,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return v},set:function(U){var Y=Dw(U);if(Y===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");v=Y,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return S},set:function(U){S=!!U,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return x},set:function(U){if(typeof U!="number"&&U!==xw)throw new SyntaxError("Line: an invalid number or illegal string was specified.");x=U,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return D},set:function(U){var Y=Hg(U);Y?(D=Y,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return k},set:function(U){if(U<0||U>100)throw new Error("Position must be between 0 and 100.");k=U,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return I},set:function(U){var Y=Hg(U);Y?(I=Y,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return C},set:function(U){if(U<0||U>100)throw new Error("Size must be between 0 and 100.");C=U,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return P},set:function(U){var Y=Hg(U);if(!Y)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");P=Y,this.hasBeenReset=!0}}}),this.displayState=void 0}Kb.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Cw=Kb,Aw={"":!0,up:!0};function ww(s){if(typeof s!="string")return!1;var e=Aw[s.toLowerCase()];return e?s.toLowerCase():!1}function id(s){return typeof s=="number"&&s>=0&&s<=100}function Nw(){var s=100,e=3,i=0,r=100,o=0,l=100,c="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(f){if(!id(f))throw new Error("Width must be between 0 and 100.");s=f}},lines:{enumerable:!0,get:function(){return e},set:function(f){if(typeof f!="number")throw new TypeError("Lines must be set to a number.");e=f}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(f){if(!id(f))throw new Error("RegionAnchorX must be between 0 and 100.");r=f}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(f){if(!id(f))throw new Error("RegionAnchorY must be between 0 and 100.");i=f}},viewportAnchorY:{enumerable:!0,get:function(){return l},set:function(f){if(!id(f))throw new Error("ViewportAnchorY must be between 0 and 100.");l=f}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(f){if(!id(f))throw new Error("ViewportAnchorX must be between 0 and 100.");o=f}},scroll:{enumerable:!0,get:function(){return c},set:function(f){var p=ww(f);p===!1?console.warn("Scroll: an invalid or illegal string was specified."):c=p}}})}var kw=Nw,zr=If,Do=$b.exports={WebVTT:Sw,VTTCue:Cw,VTTRegion:kw};zr.vttjs=Do,zr.WebVTT=Do.WebVTT;var Ow=Do.VTTCue,Iw=Do.VTTRegion,Lw=zr.VTTCue,Rw=zr.VTTRegion;Do.shim=function(){zr.VTTCue=Ow,zr.VTTRegion=Iw},Do.restore=function(){zr.VTTCue=Lw,zr.VTTRegion=Rw},zr.VTTCue||Do.shim();var jw=$b.exports;const Zb=Gc(jw);var Jb="https://example.com",jf=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=z.location&&z.location.href||"");var r=/^\/\//.test(e),o=!z.location&&!/\/\//i.test(e);e=new z.URL(e,z.location||Jb);var l=new URL(i,e);return o?l.href.slice(Jb.length):r?l.href.slice(l.protocol.length):l.href},Vg=function(){function s(){this.listeners={}}var e=s.prototype;return e.on=function(r,o){this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push(o)},e.off=function(r,o){if(!this.listeners[r])return!1;var l=this.listeners[r].indexOf(o);return this.listeners[r]=this.listeners[r].slice(0),this.listeners[r].splice(l,1),l>-1},e.trigger=function(r){var o=this.listeners[r];if(o)if(arguments.length===2)for(var l=o.length,c=0;c<l;++c)o[c].call(this,arguments[1]);else for(var f=Array.prototype.slice.call(arguments,1),p=o.length,v=0;v<p;++v)o[v].apply(this,f)},e.dispose=function(){this.listeners={}},e.pipe=function(r){this.on("data",function(o){r.push(o)})},s}(),zw=function(e){return z.atob?z.atob(e):Buffer.from(e,"base64").toString("binary")};function e1(s){for(var e=zw(s),i=new Uint8Array(e.length),r=0;r<e.length;r++)i[r]=e.charCodeAt(r);return i}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Uw extends Vg{constructor(){super(),this.buffer=""}push(e){let i;for(this.buffer+=e,i=this.buffer.indexOf(`
`);i>-1;i=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1)}}const Pw=String.fromCharCode(9),$g=function(s){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(s||""),i={};return e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),i},Bw=function(){const s="[^=]*",e='"[^"]*"|[^,]*',i="(?:"+s+")=(?:"+e+")";return new RegExp("(?:^|,)("+i+")")},ln=function(s){const e={};if(!s)return e;const i=s.split(Bw());let r=i.length,o;for(;r--;)i[r]!==""&&(o=/([^=]*)=(.*)/.exec(i[r]).slice(1),o[0]=o[0].replace(/^\s+|\s+$/g,""),o[1]=o[1].replace(/^\s+|\s+$/g,""),o[1]=o[1].replace(/^['"](.*)['"]$/g,"$1"),e[o[0]]=o[1]);return e},t1=s=>{const e=s.split("x"),i={};return e[0]&&(i.width=parseInt(e[0],10)),e[1]&&(i.height=parseInt(e[1],10)),i};class qw extends Vg{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let i,r;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((l,c)=>{const f=c(e);return f===e?l:l.concat([f])},[e]).forEach(l=>{for(let c=0;c<this.customParsers.length;c++)if(this.customParsers[c].call(this,l))return;if(l.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:l.slice(1)});return}if(l=l.replace("\r",""),i=/^#EXTM3U/.exec(l),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(l),i){r={type:"tag",tagType:"inf"},i[1]&&(r.duration=parseFloat(i[1])),i[2]&&(r.title=i[2]),this.trigger("data",r);return}if(i=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(l),i){r={type:"tag",tagType:"targetduration"},i[1]&&(r.duration=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-VERSION:([0-9.]*)?/.exec(l),i){r={type:"tag",tagType:"version"},i[1]&&(r.version=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(l),i){r={type:"tag",tagType:"media-sequence"},i[1]&&(r.number=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(l),i){r={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(r.number=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(l),i){r={type:"tag",tagType:"playlist-type"},i[1]&&(r.playlistType=i[1]),this.trigger("data",r);return}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(l),i){r=ei($g(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",r);return}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(l),i){r={type:"tag",tagType:"allow-cache"},i[1]&&(r.allowed=!/NO/.test(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-MAP:(.*)$/.exec(l),i){if(r={type:"tag",tagType:"map"},i[1]){const c=ln(i[1]);c.URI&&(r.uri=c.URI),c.BYTERANGE&&(r.byterange=$g(c.BYTERANGE))}this.trigger("data",r);return}if(i=/^#EXT-X-STREAM-INF:(.*)$/.exec(l),i){r={type:"tag",tagType:"stream-inf"},i[1]&&(r.attributes=ln(i[1]),r.attributes.RESOLUTION&&(r.attributes.RESOLUTION=t1(r.attributes.RESOLUTION)),r.attributes.BANDWIDTH&&(r.attributes.BANDWIDTH=parseInt(r.attributes.BANDWIDTH,10)),r.attributes["FRAME-RATE"]&&(r.attributes["FRAME-RATE"]=parseFloat(r.attributes["FRAME-RATE"])),r.attributes["PROGRAM-ID"]&&(r.attributes["PROGRAM-ID"]=parseInt(r.attributes["PROGRAM-ID"],10))),this.trigger("data",r);return}if(i=/^#EXT-X-MEDIA:(.*)$/.exec(l),i){r={type:"tag",tagType:"media"},i[1]&&(r.attributes=ln(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-ENDLIST/.exec(l),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(l),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(l),i){r={type:"tag",tagType:"program-date-time"},i[1]&&(r.dateTimeString=i[1],r.dateTimeObject=new Date(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-KEY:(.*)$/.exec(l),i){r={type:"tag",tagType:"key"},i[1]&&(r.attributes=ln(i[1]),r.attributes.IV&&(r.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(r.attributes.IV=r.attributes.IV.substring(2)),r.attributes.IV=r.attributes.IV.match(/.{8}/g),r.attributes.IV[0]=parseInt(r.attributes.IV[0],16),r.attributes.IV[1]=parseInt(r.attributes.IV[1],16),r.attributes.IV[2]=parseInt(r.attributes.IV[2],16),r.attributes.IV[3]=parseInt(r.attributes.IV[3],16),r.attributes.IV=new Uint32Array(r.attributes.IV))),this.trigger("data",r);return}if(i=/^#EXT-X-START:(.*)$/.exec(l),i){r={type:"tag",tagType:"start"},i[1]&&(r.attributes=ln(i[1]),r.attributes["TIME-OFFSET"]=parseFloat(r.attributes["TIME-OFFSET"]),r.attributes.PRECISE=/YES/.test(r.attributes.PRECISE)),this.trigger("data",r);return}if(i=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(l),i){r={type:"tag",tagType:"cue-out-cont"},i[1]?r.data=i[1]:r.data="",this.trigger("data",r);return}if(i=/^#EXT-X-CUE-OUT:(.*)?$/.exec(l),i){r={type:"tag",tagType:"cue-out"},i[1]?r.data=i[1]:r.data="",this.trigger("data",r);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(l),i){r={type:"tag",tagType:"cue-in"},i[1]?r.data=i[1]:r.data="",this.trigger("data",r);return}if(i=/^#EXT-X-SKIP:(.*)$/.exec(l),i&&i[1]){r={type:"tag",tagType:"skip"},r.attributes=ln(i[1]),r.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(r.attributes["SKIPPED-SEGMENTS"]=parseInt(r.attributes["SKIPPED-SEGMENTS"],10)),r.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(r.attributes["RECENTLY-REMOVED-DATERANGES"]=r.attributes["RECENTLY-REMOVED-DATERANGES"].split(Pw)),this.trigger("data",r);return}if(i=/^#EXT-X-PART:(.*)$/.exec(l),i&&i[1]){r={type:"tag",tagType:"part"},r.attributes=ln(i[1]),["DURATION"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=parseFloat(r.attributes[c]))}),["INDEPENDENT","GAP"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=/YES/.test(r.attributes[c]))}),r.attributes.hasOwnProperty("BYTERANGE")&&(r.attributes.byterange=$g(r.attributes.BYTERANGE)),this.trigger("data",r);return}if(i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(l),i&&i[1]){r={type:"tag",tagType:"server-control"},r.attributes=ln(i[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=parseFloat(r.attributes[c]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=/YES/.test(r.attributes[c]))}),this.trigger("data",r);return}if(i=/^#EXT-X-PART-INF:(.*)$/.exec(l),i&&i[1]){r={type:"tag",tagType:"part-inf"},r.attributes=ln(i[1]),["PART-TARGET"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=parseFloat(r.attributes[c]))}),this.trigger("data",r);return}if(i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(l),i&&i[1]){r={type:"tag",tagType:"preload-hint"},r.attributes=ln(i[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(c){if(r.attributes.hasOwnProperty(c)){r.attributes[c]=parseInt(r.attributes[c],10);const f=c==="BYTERANGE-LENGTH"?"length":"offset";r.attributes.byterange=r.attributes.byterange||{},r.attributes.byterange[f]=r.attributes[c],delete r.attributes[c]}}),this.trigger("data",r);return}if(i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(l),i&&i[1]){r={type:"tag",tagType:"rendition-report"},r.attributes=ln(i[1]),["LAST-MSN","LAST-PART"].forEach(function(c){r.attributes.hasOwnProperty(c)&&(r.attributes[c]=parseInt(r.attributes[c],10))}),this.trigger("data",r);return}if(i=/^#EXT-X-DATERANGE:(.*)$/.exec(l),i&&i[1]){r={type:"tag",tagType:"daterange"},r.attributes=ln(i[1]),["ID","CLASS"].forEach(function(f){r.attributes.hasOwnProperty(f)&&(r.attributes[f]=String(r.attributes[f]))}),["START-DATE","END-DATE"].forEach(function(f){r.attributes.hasOwnProperty(f)&&(r.attributes[f]=new Date(r.attributes[f]))}),["DURATION","PLANNED-DURATION"].forEach(function(f){r.attributes.hasOwnProperty(f)&&(r.attributes[f]=parseFloat(r.attributes[f]))}),["END-ON-NEXT"].forEach(function(f){r.attributes.hasOwnProperty(f)&&(r.attributes[f]=/YES/i.test(r.attributes[f]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(f){r.attributes.hasOwnProperty(f)&&(r.attributes[f]=r.attributes[f].toString(16))});const c=/^X-([A-Z]+-)+[A-Z]+$/;for(const f in r.attributes){if(!c.test(f))continue;const p=/[0-9A-Fa-f]{6}/g.test(r.attributes[f]),v=/^\d+(\.\d+)?$/.test(r.attributes[f]);r.attributes[f]=p?r.attributes[f].toString(16):v?parseFloat(r.attributes[f]):String(r.attributes[f])}this.trigger("data",r);return}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(l),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(l),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(l),i){r={type:"tag",tagType:"content-steering"},r.attributes=ln(i[1]),this.trigger("data",r);return}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(l),i){r={type:"tag",tagType:"i-frame-playlist"},r.attributes=ln(i[1]),r.attributes.URI&&(r.uri=r.attributes.URI),r.attributes.BANDWIDTH&&(r.attributes.BANDWIDTH=parseInt(r.attributes.BANDWIDTH,10)),r.attributes.RESOLUTION&&(r.attributes.RESOLUTION=t1(r.attributes.RESOLUTION)),r.attributes["AVERAGE-BANDWIDTH"]&&(r.attributes["AVERAGE-BANDWIDTH"]=parseInt(r.attributes["AVERAGE-BANDWIDTH"],10)),r.attributes["FRAME-RATE"]&&(r.attributes["FRAME-RATE"]=parseFloat(r.attributes["FRAME-RATE"])),this.trigger("data",r);return}if(i=/^#EXT-X-DEFINE:(.*)$/.exec(l),i){r={type:"tag",tagType:"define"},r.attributes=ln(i[1]),this.trigger("data",r);return}this.trigger("data",{type:"tag",data:l.slice(4)})})}addParser({expression:e,customType:i,dataParser:r,segment:o}){typeof r!="function"&&(r=l=>l),this.customParsers.push(l=>{if(e.exec(l))return this.trigger("data",{type:"custom",data:r(l),customType:i,segment:o}),!0})}addTagMapper({expression:e,map:i}){const r=o=>e.test(o)?i(o):o;this.tagMappers.push(r)}}const Fw=s=>s.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),Ca=function(s){const e={};return Object.keys(s).forEach(function(i){e[Fw(i)]=s[i]}),e},Yg=function(s){const{serverControl:e,targetDuration:i,partTargetDuration:r}=s;if(!e)return;const o="#EXT-X-SERVER-CONTROL",l="holdBack",c="partHoldBack",f=i&&i*3,p=r&&r*2;i&&!e.hasOwnProperty(l)&&(e[l]=f,this.trigger("info",{message:`${o} defaulting HOLD-BACK to targetDuration * 3 (${f}).`})),f&&e[l]<f&&(this.trigger("warn",{message:`${o} clamping HOLD-BACK (${e[l]}) to targetDuration * 3 (${f})`}),e[l]=f),r&&!e.hasOwnProperty(c)&&(e[c]=r*3,this.trigger("info",{message:`${o} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[c]}).`})),r&&e[c]<p&&(this.trigger("warn",{message:`${o} clamping PART-HOLD-BACK (${e[c]}) to partTargetDuration * 2 (${p}).`}),e[c]=p)};class Hw extends Vg{constructor(e={}){super(),this.lineStream=new Uw,this.parseStream=new qw,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const i=this,r=[];let o={},l,c,f=!1;const p=function(){},v={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},S="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let x=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let D=0,k=0;const I={};this.on("end",()=>{o.uri||!o.parts&&!o.preloadHints||(!o.map&&l&&(o.map=l),!o.key&&c&&(o.key=c),!o.timeline&&typeof x=="number"&&(o.timeline=x),this.manifest.preloadSegment=o)}),this.parseStream.on("data",function(C){let P,U;if(i.manifest.definitions){for(const Y in i.manifest.definitions)if(C.uri&&(C.uri=C.uri.replace(`{$${Y}}`,i.manifest.definitions[Y])),C.attributes)for(const $ in C.attributes)typeof C.attributes[$]=="string"&&(C.attributes[$]=C.attributes[$].replace(`{$${Y}}`,i.manifest.definitions[Y]))}({tag(){({version(){C.version&&(this.manifest.version=C.version)},"allow-cache"(){this.manifest.allowCache=C.allowed,"allowed"in C||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const Y={};"length"in C&&(o.byterange=Y,Y.length=C.length,"offset"in C||(C.offset=D)),"offset"in C&&(o.byterange=Y,Y.offset=C.offset),D=Y.offset+Y.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),C.title&&(o.title=C.title),C.duration>0&&(o.duration=C.duration),C.duration===0&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key(){if(!C.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(C.attributes.METHOD==="NONE"){c=null;return}if(!C.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(C.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:C.attributes};return}if(C.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:C.attributes.URI};return}if(C.attributes.KEYFORMAT===S){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(C.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(C.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),C.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(C.attributes.KEYID&&C.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:C.attributes.KEYFORMAT,keyId:C.attributes.KEYID.substring(2)},pssh:e1(C.attributes.URI.split(",")[1])};return}C.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),c={method:C.attributes.METHOD||"AES-128",uri:C.attributes.URI},typeof C.attributes.IV<"u"&&(c.iv=C.attributes.IV)},"media-sequence"(){if(!isFinite(C.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+C.number});return}this.manifest.mediaSequence=C.number},"discontinuity-sequence"(){if(!isFinite(C.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+C.number});return}this.manifest.discontinuitySequence=C.number,x=C.number},"playlist-type"(){if(!/VOD|EVENT/.test(C.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+C.playlist});return}this.manifest.playlistType=C.playlistType},map(){l={},C.uri&&(l.uri=C.uri),C.byterange&&(l.byterange=C.byterange),c&&(l.key=c)},"stream-inf"(){if(this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||v,!C.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}o.attributes||(o.attributes={}),ei(o.attributes,C.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||v,!(C.attributes&&C.attributes.TYPE&&C.attributes["GROUP-ID"]&&C.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const Y=this.manifest.mediaGroups[C.attributes.TYPE];Y[C.attributes["GROUP-ID"]]=Y[C.attributes["GROUP-ID"]]||{},P=Y[C.attributes["GROUP-ID"]],U={default:/yes/i.test(C.attributes.DEFAULT)},U.default?U.autoselect=!0:U.autoselect=/yes/i.test(C.attributes.AUTOSELECT),C.attributes.LANGUAGE&&(U.language=C.attributes.LANGUAGE),C.attributes.URI&&(U.uri=C.attributes.URI),C.attributes["INSTREAM-ID"]&&(U.instreamId=C.attributes["INSTREAM-ID"]),C.attributes.CHARACTERISTICS&&(U.characteristics=C.attributes.CHARACTERISTICS),C.attributes.FORCED&&(U.forced=/yes/i.test(C.attributes.FORCED)),P[C.attributes.NAME]=U},discontinuity(){x+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=C.dateTimeString,this.manifest.dateTimeObject=C.dateTimeObject),o.dateTimeString=C.dateTimeString,o.dateTimeObject=C.dateTimeObject;const{lastProgramDateTime:Y}=this;this.lastProgramDateTime=new Date(C.dateTimeString).getTime(),Y===null&&this.manifest.segments.reduceRight(($,G)=>(G.programDateTime=$-G.duration*1e3,G.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(C.duration)||C.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+C.duration});return}this.manifest.targetDuration=C.duration,Yg.call(this,this.manifest)},start(){if(!C.attributes||isNaN(C.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:C.attributes["TIME-OFFSET"],precise:C.attributes.PRECISE}},"cue-out"(){o.cueOut=C.data},"cue-out-cont"(){o.cueOutCont=C.data},"cue-in"(){o.cueIn=C.data},skip(){this.manifest.skip=Ca(C.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",C.attributes,["SKIPPED-SEGMENTS"])},part(){f=!0;const Y=this.manifest.segments.length,$=Ca(C.attributes);o.parts=o.parts||[],o.parts.push($),$.byterange&&($.byterange.hasOwnProperty("offset")||($.byterange.offset=k),k=$.byterange.offset+$.byterange.length);const G=o.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${G} for segment #${Y}`,C.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((W,oe)=>{W.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${oe} lacks required attribute(s): LAST-PART`})})},"server-control"(){const Y=this.manifest.serverControl=Ca(C.attributes);Y.hasOwnProperty("canBlockReload")||(Y.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Yg.call(this,this.manifest),Y.canSkipDateranges&&!Y.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const Y=this.manifest.segments.length,$=Ca(C.attributes),G=$.type&&$.type==="PART";o.preloadHints=o.preloadHints||[],o.preloadHints.push($),$.byterange&&($.byterange.hasOwnProperty("offset")||($.byterange.offset=G?k:0,G&&(k=$.byterange.offset+$.byterange.length)));const W=o.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${W} for segment #${Y}`,C.attributes,["TYPE","URI"]),!!$.type)for(let oe=0;oe<o.preloadHints.length-1;oe++){const K=o.preloadHints[oe];K.type&&K.type===$.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${W} for segment #${Y} has the same TYPE ${$.type} as preload hint #${oe}`})}},"rendition-report"(){const Y=Ca(C.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(Y);const $=this.manifest.renditionReports.length-1,G=["LAST-MSN","URI"];f&&G.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${$}`,C.attributes,G)},"part-inf"(){this.manifest.partInf=Ca(C.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",C.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Yg.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(Ca(C.attributes));const Y=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${Y}`,C.attributes,["ID","START-DATE"]);const $=this.manifest.dateRanges[Y];$.endDate&&$.startDate&&new Date($.endDate)<new Date($.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),$.duration&&$.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),$.plannedDuration&&$.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const G=!!$.endOnNext;if(G&&!$.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),G&&($.duration||$.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),$.duration&&$.endDate){const oe=$.startDate.getTime()+$.duration*1e3;this.manifest.dateRanges[Y].endDate=new Date(oe)}if(!I[$.id])I[$.id]=$;else{for(const oe in I[$.id])if($[oe]&&JSON.stringify(I[$.id][oe])!==JSON.stringify($[oe])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const W=this.manifest.dateRanges.findIndex(oe=>oe.id===$.id);this.manifest.dateRanges[W]=ei(this.manifest.dateRanges[W],$),I[$.id]=ei(I[$.id],$),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=Ca(C.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",C.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const Y=($,G)=>{if($ in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${$}`});return}this.manifest.definitions[$]=G};if("QUERYPARAM"in C.attributes){if("NAME"in C.attributes||"IMPORT"in C.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const $=this.params.get(C.attributes.QUERYPARAM);if(!$){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${C.attributes.QUERYPARAM}`});return}Y(C.attributes.QUERYPARAM,decodeURIComponent($));return}if("NAME"in C.attributes){if("IMPORT"in C.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in C.attributes)||typeof C.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${C.attributes.NAME}`});return}Y(C.attributes.NAME,C.attributes.VALUE);return}if("IMPORT"in C.attributes){if(!this.mainDefinitions[C.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${C.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}Y(C.attributes.IMPORT,this.mainDefinitions[C.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:C.attributes,uri:C.uri,timeline:x}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",C.attributes,["BANDWIDTH","URI"])}}[C.tagType]||p).call(i)},uri(){o.uri=C.uri,r.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),c&&(o.key=c),o.timeline=x,l&&(o.map=l),k=0,this.lastProgramDateTime!==null&&(o.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=o.duration*1e3),o={}},comment(){},custom(){C.segment?(o.custom=o.custom||{},o.custom[C.customType]=C.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[C.customType]=C.data)}})[C.type].call(i)})}requiredCompatibilityversion(e,i){(e<i||!e)&&this.trigger("warn",{message:`manifest must be at least version ${i}`})}warnOnMissingAttributes_(e,i,r){const o=[];r.forEach(function(l){i.hasOwnProperty(l)||o.push(l)}),o.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${o.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(`
`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var Co={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},Vw=["video","audio","text"],i1=["Video","Audio","Text"],n1=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,r,o){var l=("00"+Number(r).toString(16)).slice(-2),c=("00"+Number(o).toString(16)).slice(-2);return"avc1."+l+"00"+c})},Gs=function(e){e===void 0&&(e="");var i=e.split(","),r=[];return i.forEach(function(o){o=o.trim();var l;Vw.forEach(function(c){var f=Co[c].exec(o.toLowerCase());if(!(!f||f.length<=1)){l=c;var p=o.substring(0,f[1].length),v=o.replace(p,"");r.push({type:p,details:v,mediaType:c})}}),l||r.push({type:o,details:"",mediaType:"unknown"})}),r},$w=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var r=e.mediaGroups.AUDIO[i];if(!r)return null;for(var o in r){var l=r[o];if(l.default&&l.playlists)return Gs(l.playlists[0].attributes.CODECS)}return null},s1=function(e){return e===void 0&&(e=""),Co.audio.test(e.trim().toLowerCase())},Yw=function(e){return e===void 0&&(e=""),Co.text.test(e.trim().toLowerCase())},Fl=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(l){return n1(l.trim())}),r="video";i.length===1&&s1(i[0])?r="audio":i.length===1&&Yw(i[0])&&(r="application");var o="mp4";return i.every(function(l){return Co.mp4.test(l)})?o="mp4":i.every(function(l){return Co.webm.test(l)})?o="webm":i.every(function(l){return Co.ogg.test(l)})&&(o="ogg"),r+"/"+o+';codecs="'+e+'"'}},nd=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),z.MediaSource&&z.MediaSource.isTypeSupported&&z.MediaSource.isTypeSupported(Fl(e))||i&&z.ManagedMediaSource&&z.ManagedMediaSource.isTypeSupported&&z.ManagedMediaSource.isTypeSupported(Fl(e))||!1},Qg=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var r=0;r<i1.length;r++){var o=i1[r];if(Co["muxer"+o].test(i))return!0}return!1})},r1="mp4a.40.2",Qw="avc1.4d400d",Gw=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,Xw=/^application\/dash\+xml/i,a1=function(e){return Gw.test(e)?"hls":Xw.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},Ww=function(e){return e.toString(2).length},Kw=function(e){return Math.ceil(Ww(e)/8)},o1=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Zw=function(e){return o1(e)},Ve=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!Zw(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Ui=z.BigInt||Number,Gg=[Ui("0x1"),Ui("0x100"),Ui("0x10000"),Ui("0x1000000"),Ui("0x100000000"),Ui("0x10000000000"),Ui("0x1000000000000"),Ui("0x100000000000000"),Ui("0x10000000000000000")];(function(){var s=new Uint16Array([65484]),e=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var Jw=function(e,i){var r=i===void 0?{}:i,o=r.signed,l=o===void 0?!1:o,c=r.le,f=c===void 0?!1:c;e=Ve(e);var p=f?"reduce":"reduceRight",v=e[p]?e[p]:Array.prototype[p],S=v.call(e,function(D,k,I){var C=f?I:Math.abs(I+1-e.length);return D+Ui(k)*Gg[C]},Ui(0));if(l){var x=Gg[e.length]/Ui(2)-Ui(1);S=Ui(S),S>x&&(S-=x,S-=x,S-=Ui(2))}return Number(S)},e4=function(e,i){var r=i===void 0?{}:i,o=r.le,l=o===void 0?!1:o;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Ui(e);for(var c=Kw(e),f=new Uint8Array(new ArrayBuffer(c)),p=0;p<c;p++){var v=l?p:Math.abs(p+1-f.length);f[v]=Number(e/Gg[p]&Ui(255)),e<0&&(f[v]=Math.abs(~f[v]),f[v]-=p===0?1:2)}return f},l1=function(e,i){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;i||(e=unescape(encodeURIComponent(e)));for(var r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);return r},t4=function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];if(i=i.filter(function(f){return f&&(f.byteLength||f.length)&&typeof f!="string"}),i.length<=1)return Ve(i[0]);var o=i.reduce(function(f,p,v){return f+(p.byteLength||p.length)},0),l=new Uint8Array(o),c=0;return i.forEach(function(f){f=Ve(f),l.set(f,c),c+=f.byteLength}),l},Qt=function(e,i,r){var o=r===void 0?{}:r,l=o.offset,c=l===void 0?0:l,f=o.mask,p=f===void 0?[]:f;e=Ve(e),i=Ve(i);var v=i.every?i.every:Array.prototype.every;return i.length&&e.length-c>=i.length&&v.call(i,function(S,x){var D=p[x]?p[x]&e[c+x]:e[c+x];return S===D})},i4=function(e,i,r){i.forEach(function(o){for(var l in e.mediaGroups[o])for(var c in e.mediaGroups[o][l]){var f=e.mediaGroups[o][l][c];r(f,o,l,c)}})},Aa={},Ur={};function n4(s,e,i){if(i===void 0&&(i=Array.prototype),s&&typeof i.find=="function")return i.find.call(s,e);for(var r=0;r<s.length;r++)if(Object.prototype.hasOwnProperty.call(s,r)){var o=s[r];if(e.call(void 0,o,r,s))return o}}function Xg(s,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(s):s}function s4(s,e){if(s===null||typeof s!="object")throw new TypeError("target is not an object");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(s[i]=e[i]);return s}var u1=Xg({HTML:"text/html",isHTML:function(s){return s===u1.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),c1=Xg({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(s){return s===c1.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Ur.assign=s4,Ur.find=n4,Ur.freeze=Xg,Ur.MIME_TYPE=u1,Ur.NAMESPACE=c1;var d1=Ur,Xs=d1.find,sd=d1.NAMESPACE;function r4(s){return s!==""}function a4(s){return s?s.split(/[\t\n\f\r ]+/).filter(r4):[]}function o4(s,e){return s.hasOwnProperty(e)||(s[e]=!0),s}function h1(s){if(!s)return[];var e=a4(s);return Object.keys(e.reduce(o4,{}))}function l4(s){return function(e){return s&&s.indexOf(e)!==-1}}function rd(s,e){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}function _n(s,e){var i=s.prototype;if(!(i instanceof e)){let r=function(){};r.prototype=e.prototype,r=new r,rd(i,r),s.prototype=i=r}i.constructor!=s&&(typeof s!="function"&&console.error("unknown Class:"+s),i.constructor=s)}var Sn={},Cs=Sn.ELEMENT_NODE=1,Hl=Sn.ATTRIBUTE_NODE=2,zf=Sn.TEXT_NODE=3,f1=Sn.CDATA_SECTION_NODE=4,p1=Sn.ENTITY_REFERENCE_NODE=5,u4=Sn.ENTITY_NODE=6,m1=Sn.PROCESSING_INSTRUCTION_NODE=7,g1=Sn.COMMENT_NODE=8,y1=Sn.DOCUMENT_NODE=9,T1=Sn.DOCUMENT_TYPE_NODE=10,Pr=Sn.DOCUMENT_FRAGMENT_NODE=11,c4=Sn.NOTATION_NODE=12,Ki={},Ai={};Ki.INDEX_SIZE_ERR=(Ai[1]="Index size error",1),Ki.DOMSTRING_SIZE_ERR=(Ai[2]="DOMString size error",2);var xn=Ki.HIERARCHY_REQUEST_ERR=(Ai[3]="Hierarchy request error",3);Ki.WRONG_DOCUMENT_ERR=(Ai[4]="Wrong document",4),Ki.INVALID_CHARACTER_ERR=(Ai[5]="Invalid character",5),Ki.NO_DATA_ALLOWED_ERR=(Ai[6]="No data allowed",6),Ki.NO_MODIFICATION_ALLOWED_ERR=(Ai[7]="No modification allowed",7);var v1=Ki.NOT_FOUND_ERR=(Ai[8]="Not found",8);Ki.NOT_SUPPORTED_ERR=(Ai[9]="Not supported",9);var b1=Ki.INUSE_ATTRIBUTE_ERR=(Ai[10]="Attribute in use",10);Ki.INVALID_STATE_ERR=(Ai[11]="Invalid state",11),Ki.SYNTAX_ERR=(Ai[12]="Syntax error",12),Ki.INVALID_MODIFICATION_ERR=(Ai[13]="Invalid modification",13),Ki.NAMESPACE_ERR=(Ai[14]="Invalid namespace",14),Ki.INVALID_ACCESS_ERR=(Ai[15]="Invalid access",15);function oi(s,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,Ai[s]),this.message=Ai[s],Error.captureStackTrace&&Error.captureStackTrace(this,oi);return i.code=s,e&&(this.message=this.message+": "+e),i}oi.prototype=Error.prototype,rd(Ki,oi);function Br(){}Br.prototype={length:0,item:function(s){return s>=0&&s<this.length?this[s]:null},toString:function(s,e){for(var i=[],r=0;r<this.length;r++)$l(this[r],i,s,e);return i.join("")},filter:function(s){return Array.prototype.filter.call(this,s)},indexOf:function(s){return Array.prototype.indexOf.call(this,s)}};function Vl(s,e){this._node=s,this._refresh=e,Wg(this)}function Wg(s){var e=s._node._inc||s._node.ownerDocument._inc;if(s._inc!==e){var i=s._refresh(s._node);if(z1(s,"length",i.length),!s.$$length||i.length<s.$$length)for(var r=i.length;r in s;r++)Object.prototype.hasOwnProperty.call(s,r)&&delete s[r];rd(i,s),s._inc=e}}Vl.prototype.item=function(s){return Wg(this),this[s]||null},_n(Vl,Br);function Uf(){}function _1(s,e){for(var i=s.length;i--;)if(s[i]===e)return i}function S1(s,e,i,r){if(r?e[_1(e,r)]=i:e[e.length++]=i,s){i.ownerElement=s;var o=s.ownerDocument;o&&(r&&D1(o,s,r),d4(o,s,i))}}function x1(s,e,i){var r=_1(e,i);if(r>=0){for(var o=e.length-1;r<o;)e[r]=e[++r];if(e.length=o,s){var l=s.ownerDocument;l&&(D1(l,s,i),i.ownerElement=null)}}else throw new oi(v1,new Error(s.tagName+"@"+i))}Uf.prototype={length:0,item:Br.prototype.item,getNamedItem:function(s){for(var e=this.length;e--;){var i=this[e];if(i.nodeName==s)return i}},setNamedItem:function(s){var e=s.ownerElement;if(e&&e!=this._ownerElement)throw new oi(b1);var i=this.getNamedItem(s.nodeName);return S1(this._ownerElement,this,s,i),i},setNamedItemNS:function(s){var e=s.ownerElement,i;if(e&&e!=this._ownerElement)throw new oi(b1);return i=this.getNamedItemNS(s.namespaceURI,s.localName),S1(this._ownerElement,this,s,i),i},removeNamedItem:function(s){var e=this.getNamedItem(s);return x1(this._ownerElement,this,e),e},removeNamedItemNS:function(s,e){var i=this.getNamedItemNS(s,e);return x1(this._ownerElement,this,i),i},getNamedItemNS:function(s,e){for(var i=this.length;i--;){var r=this[i];if(r.localName==e&&r.namespaceURI==s)return r}return null}};function E1(){}E1.prototype={hasFeature:function(s,e){return!0},createDocument:function(s,e,i){var r=new od;if(r.implementation=this,r.childNodes=new Br,r.doctype=i||null,i&&r.appendChild(i),e){var o=r.createElementNS(s,e);r.appendChild(o)}return r},createDocumentType:function(s,e,i){var r=new qf;return r.name=s,r.nodeName=s,r.publicId=e||"",r.systemId=i||"",r}};function kt(){}kt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(s,e){return Pf(this,s,e)},replaceChild:function(s,e){Pf(this,s,e,N1),e&&this.removeChild(e)},removeChild:function(s){return C1(this,s)},appendChild:function(s){return this.insertBefore(s,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(s){return r0(this.ownerDocument||this,this,s)},normalize:function(){for(var s=this.firstChild;s;){var e=s.nextSibling;e&&e.nodeType==zf&&s.nodeType==zf?(this.removeChild(e),s.appendData(e.data)):(s.normalize(),s=e)}},isSupported:function(s,e){return this.ownerDocument.implementation.hasFeature(s,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(s){for(var e=this;e;){var i=e._nsMap;if(i){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)&&i[r]===s)return r}e=e.nodeType==Hl?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(s){for(var e=this;e;){var i=e._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s];e=e.nodeType==Hl?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(s){var e=this.lookupPrefix(s);return e==null}};function M1(s){return s=="<"&&"&lt;"||s==">"&&"&gt;"||s=="&"&&"&amp;"||s=='"'&&"&quot;"||"&#"+s.charCodeAt()+";"}rd(Sn,kt),rd(Sn,kt.prototype);function ad(s,e){if(e(s))return!0;if(s=s.firstChild)do if(ad(s,e))return!0;while(s=s.nextSibling)}function od(){this.ownerDocument=this}function d4(s,e,i){s&&s._inc++;var r=i.namespaceURI;r===sd.XMLNS&&(e._nsMap[i.prefix?i.localName:""]=i.value)}function D1(s,e,i,r){s&&s._inc++;var o=i.namespaceURI;o===sd.XMLNS&&delete e._nsMap[i.prefix?i.localName:""]}function Kg(s,e,i){if(s&&s._inc){s._inc++;var r=e.childNodes;if(i)r[r.length++]=i;else{for(var o=e.firstChild,l=0;o;)r[l++]=o,o=o.nextSibling;r.length=l,delete r[r.length]}}}function C1(s,e){var i=e.previousSibling,r=e.nextSibling;return i?i.nextSibling=r:s.firstChild=r,r?r.previousSibling=i:s.lastChild=i,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,Kg(s.ownerDocument,s),e}function h4(s){return s&&(s.nodeType===kt.DOCUMENT_NODE||s.nodeType===kt.DOCUMENT_FRAGMENT_NODE||s.nodeType===kt.ELEMENT_NODE)}function f4(s){return s&&(Ws(s)||Zg(s)||qr(s)||s.nodeType===kt.DOCUMENT_FRAGMENT_NODE||s.nodeType===kt.COMMENT_NODE||s.nodeType===kt.PROCESSING_INSTRUCTION_NODE)}function qr(s){return s&&s.nodeType===kt.DOCUMENT_TYPE_NODE}function Ws(s){return s&&s.nodeType===kt.ELEMENT_NODE}function Zg(s){return s&&s.nodeType===kt.TEXT_NODE}function A1(s,e){var i=s.childNodes||[];if(Xs(i,Ws)||qr(e))return!1;var r=Xs(i,qr);return!(e&&r&&i.indexOf(r)>i.indexOf(e))}function w1(s,e){var i=s.childNodes||[];function r(l){return Ws(l)&&l!==e}if(Xs(i,r))return!1;var o=Xs(i,qr);return!(e&&o&&i.indexOf(o)>i.indexOf(e))}function p4(s,e,i){if(!h4(s))throw new oi(xn,"Unexpected parent node type "+s.nodeType);if(i&&i.parentNode!==s)throw new oi(v1,"child not in parent");if(!f4(e)||qr(e)&&s.nodeType!==kt.DOCUMENT_NODE)throw new oi(xn,"Unexpected node type "+e.nodeType+" for parent node type "+s.nodeType)}function m4(s,e,i){var r=s.childNodes||[],o=e.childNodes||[];if(e.nodeType===kt.DOCUMENT_FRAGMENT_NODE){var l=o.filter(Ws);if(l.length>1||Xs(o,Zg))throw new oi(xn,"More than one element or text in fragment");if(l.length===1&&!A1(s,i))throw new oi(xn,"Element in fragment can not be inserted before doctype")}if(Ws(e)&&!A1(s,i))throw new oi(xn,"Only one element can be added and only after doctype");if(qr(e)){if(Xs(r,qr))throw new oi(xn,"Only one doctype is allowed");var c=Xs(r,Ws);if(i&&r.indexOf(c)<r.indexOf(i))throw new oi(xn,"Doctype can only be inserted before an element");if(!i&&c)throw new oi(xn,"Doctype can not be appended since element is present")}}function N1(s,e,i){var r=s.childNodes||[],o=e.childNodes||[];if(e.nodeType===kt.DOCUMENT_FRAGMENT_NODE){var l=o.filter(Ws);if(l.length>1||Xs(o,Zg))throw new oi(xn,"More than one element or text in fragment");if(l.length===1&&!w1(s,i))throw new oi(xn,"Element in fragment can not be inserted before doctype")}if(Ws(e)&&!w1(s,i))throw new oi(xn,"Only one element can be added and only after doctype");if(qr(e)){if(Xs(r,function(p){return qr(p)&&p!==i}))throw new oi(xn,"Only one doctype is allowed");var c=Xs(r,Ws);if(i&&r.indexOf(c)<r.indexOf(i))throw new oi(xn,"Doctype can only be inserted before an element")}}function Pf(s,e,i,r){p4(s,e,i),s.nodeType===kt.DOCUMENT_NODE&&(r||m4)(s,e,i);var o=e.parentNode;if(o&&o.removeChild(e),e.nodeType===Pr){var l=e.firstChild;if(l==null)return e;var c=e.lastChild}else l=c=e;var f=i?i.previousSibling:s.lastChild;l.previousSibling=f,c.nextSibling=i,f?f.nextSibling=l:s.firstChild=l,i==null?s.lastChild=c:i.previousSibling=c;do l.parentNode=s;while(l!==c&&(l=l.nextSibling));return Kg(s.ownerDocument||s,s),e.nodeType==Pr&&(e.firstChild=e.lastChild=null),e}function g4(s,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=s,e.previousSibling=s.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,s.lastChild=e,Kg(s.ownerDocument,s,e),e}od.prototype={nodeName:"#document",nodeType:y1,doctype:null,documentElement:null,_inc:1,insertBefore:function(s,e){if(s.nodeType==Pr){for(var i=s.firstChild;i;){var r=i.nextSibling;this.insertBefore(i,e),i=r}return s}return Pf(this,s,e),s.ownerDocument=this,this.documentElement===null&&s.nodeType===Cs&&(this.documentElement=s),s},removeChild:function(s){return this.documentElement==s&&(this.documentElement=null),C1(this,s)},replaceChild:function(s,e){Pf(this,s,e,N1),s.ownerDocument=this,e&&this.removeChild(e),Ws(s)&&(this.documentElement=s)},importNode:function(s,e){return j1(this,s,e)},getElementById:function(s){var e=null;return ad(this.documentElement,function(i){if(i.nodeType==Cs&&i.getAttribute("id")==s)return e=i,!0}),e},getElementsByClassName:function(s){var e=h1(s);return new Vl(this,function(i){var r=[];return e.length>0&&ad(i.documentElement,function(o){if(o!==i&&o.nodeType===Cs){var l=o.getAttribute("class");if(l){var c=s===l;if(!c){var f=h1(l);c=e.every(l4(f))}c&&r.push(o)}}}),r})},createElement:function(s){var e=new Ao;e.ownerDocument=this,e.nodeName=s,e.tagName=s,e.localName=s,e.childNodes=new Br;var i=e.attributes=new Uf;return i._ownerElement=e,e},createDocumentFragment:function(){var s=new Ff;return s.ownerDocument=this,s.childNodes=new Br,s},createTextNode:function(s){var e=new Jg;return e.ownerDocument=this,e.appendData(s),e},createComment:function(s){var e=new e0;return e.ownerDocument=this,e.appendData(s),e},createCDATASection:function(s){var e=new t0;return e.ownerDocument=this,e.appendData(s),e},createProcessingInstruction:function(s,e){var i=new n0;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=s,i.nodeValue=i.data=e,i},createAttribute:function(s){var e=new Bf;return e.ownerDocument=this,e.name=s,e.nodeName=s,e.localName=s,e.specified=!0,e},createEntityReference:function(s){var e=new i0;return e.ownerDocument=this,e.nodeName=s,e},createElementNS:function(s,e){var i=new Ao,r=e.split(":"),o=i.attributes=new Uf;return i.childNodes=new Br,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=s,r.length==2?(i.prefix=r[0],i.localName=r[1]):i.localName=e,o._ownerElement=i,i},createAttributeNS:function(s,e){var i=new Bf,r=e.split(":");return i.ownerDocument=this,i.nodeName=e,i.name=e,i.namespaceURI=s,i.specified=!0,r.length==2?(i.prefix=r[0],i.localName=r[1]):i.localName=e,i}},_n(od,kt);function Ao(){this._nsMap={}}Ao.prototype={nodeType:Cs,hasAttribute:function(s){return this.getAttributeNode(s)!=null},getAttribute:function(s){var e=this.getAttributeNode(s);return e&&e.value||""},getAttributeNode:function(s){return this.attributes.getNamedItem(s)},setAttribute:function(s,e){var i=this.ownerDocument.createAttribute(s);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},removeAttribute:function(s){var e=this.getAttributeNode(s);e&&this.removeAttributeNode(e)},appendChild:function(s){return s.nodeType===Pr?this.insertBefore(s,null):g4(this,s)},setAttributeNode:function(s){return this.attributes.setNamedItem(s)},setAttributeNodeNS:function(s){return this.attributes.setNamedItemNS(s)},removeAttributeNode:function(s){return this.attributes.removeNamedItem(s.nodeName)},removeAttributeNS:function(s,e){var i=this.getAttributeNodeNS(s,e);i&&this.removeAttributeNode(i)},hasAttributeNS:function(s,e){return this.getAttributeNodeNS(s,e)!=null},getAttributeNS:function(s,e){var i=this.getAttributeNodeNS(s,e);return i&&i.value||""},setAttributeNS:function(s,e,i){var r=this.ownerDocument.createAttributeNS(s,e);r.value=r.nodeValue=""+i,this.setAttributeNode(r)},getAttributeNodeNS:function(s,e){return this.attributes.getNamedItemNS(s,e)},getElementsByTagName:function(s){return new Vl(this,function(e){var i=[];return ad(e,function(r){r!==e&&r.nodeType==Cs&&(s==="*"||r.tagName==s)&&i.push(r)}),i})},getElementsByTagNameNS:function(s,e){return new Vl(this,function(i){var r=[];return ad(i,function(o){o!==i&&o.nodeType===Cs&&(s==="*"||o.namespaceURI===s)&&(e==="*"||o.localName==e)&&r.push(o)}),r})}},od.prototype.getElementsByTagName=Ao.prototype.getElementsByTagName,od.prototype.getElementsByTagNameNS=Ao.prototype.getElementsByTagNameNS,_n(Ao,kt);function Bf(){}Bf.prototype.nodeType=Hl,_n(Bf,kt);function ld(){}ld.prototype={data:"",substringData:function(s,e){return this.data.substring(s,s+e)},appendData:function(s){s=this.data+s,this.nodeValue=this.data=s,this.length=s.length},insertData:function(s,e){this.replaceData(s,0,e)},appendChild:function(s){throw new Error(Ai[xn])},deleteData:function(s,e){this.replaceData(s,e,"")},replaceData:function(s,e,i){var r=this.data.substring(0,s),o=this.data.substring(s+e);i=r+i+o,this.nodeValue=this.data=i,this.length=i.length}},_n(ld,kt);function Jg(){}Jg.prototype={nodeName:"#text",nodeType:zf,splitText:function(s){var e=this.data,i=e.substring(s);e=e.substring(0,s),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},_n(Jg,ld);function e0(){}e0.prototype={nodeName:"#comment",nodeType:g1},_n(e0,ld);function t0(){}t0.prototype={nodeName:"#cdata-section",nodeType:f1},_n(t0,ld);function qf(){}qf.prototype.nodeType=T1,_n(qf,kt);function k1(){}k1.prototype.nodeType=c4,_n(k1,kt);function O1(){}O1.prototype.nodeType=u4,_n(O1,kt);function i0(){}i0.prototype.nodeType=p1,_n(i0,kt);function Ff(){}Ff.prototype.nodeName="#document-fragment",Ff.prototype.nodeType=Pr,_n(Ff,kt);function n0(){}n0.prototype.nodeType=m1,_n(n0,kt);function I1(){}I1.prototype.serializeToString=function(s,e,i){return L1.call(s,e,i)},kt.prototype.toString=L1;function L1(s,e){var i=[],r=this.nodeType==9&&this.documentElement||this,o=r.prefix,l=r.namespaceURI;if(l&&o==null){var o=r.lookupPrefix(l);if(o==null)var c=[{namespace:l,prefix:null}]}return $l(this,i,s,e,c),i.join("")}function R1(s,e,i){var r=s.prefix||"",o=s.namespaceURI;if(!o||r==="xml"&&o===sd.XML||o===sd.XMLNS)return!1;for(var l=i.length;l--;){var c=i[l];if(c.prefix===r)return c.namespace!==o}return!0}function s0(s,e,i){s.push(" ",e,'="',i.replace(/[<>&"\t\n\r]/g,M1),'"')}function $l(s,e,i,r,o){if(o||(o=[]),r)if(s=r(s),s){if(typeof s=="string"){e.push(s);return}}else return;switch(s.nodeType){case Cs:var l=s.attributes,c=l.length,U=s.firstChild,f=s.tagName;i=sd.isHTML(s.namespaceURI)||i;var p=f;if(!i&&!s.prefix&&s.namespaceURI){for(var v,S=0;S<l.length;S++)if(l.item(S).name==="xmlns"){v=l.item(S).value;break}if(!v)for(var x=o.length-1;x>=0;x--){var D=o[x];if(D.prefix===""&&D.namespace===s.namespaceURI){v=D.namespace;break}}if(v!==s.namespaceURI)for(var x=o.length-1;x>=0;x--){var D=o[x];if(D.namespace===s.namespaceURI){D.prefix&&(p=D.prefix+":"+f);break}}}e.push("<",p);for(var k=0;k<c;k++){var I=l.item(k);I.prefix=="xmlns"?o.push({prefix:I.localName,namespace:I.value}):I.nodeName=="xmlns"&&o.push({prefix:"",namespace:I.value})}for(var k=0;k<c;k++){var I=l.item(k);if(R1(I,i,o)){var C=I.prefix||"",P=I.namespaceURI;s0(e,C?"xmlns:"+C:"xmlns",P),o.push({prefix:C,namespace:P})}$l(I,e,i,r,o)}if(f===p&&R1(s,i,o)){var C=s.prefix||"",P=s.namespaceURI;s0(e,C?"xmlns:"+C:"xmlns",P),o.push({prefix:C,namespace:P})}if(U||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(f)){if(e.push(">"),i&&/^script$/i.test(f))for(;U;)U.data?e.push(U.data):$l(U,e,i,r,o.slice()),U=U.nextSibling;else for(;U;)$l(U,e,i,r,o.slice()),U=U.nextSibling;e.push("</",p,">")}else e.push("/>");return;case y1:case Pr:for(var U=s.firstChild;U;)$l(U,e,i,r,o.slice()),U=U.nextSibling;return;case Hl:return s0(e,s.name,s.value);case zf:return e.push(s.data.replace(/[<&>]/g,M1));case f1:return e.push("<![CDATA[",s.data,"]]>");case g1:return e.push("<!--",s.data,"-->");case T1:var Y=s.publicId,$=s.systemId;if(e.push("<!DOCTYPE ",s.name),Y)e.push(" PUBLIC ",Y),$&&$!="."&&e.push(" ",$),e.push(">");else if($&&$!=".")e.push(" SYSTEM ",$,">");else{var G=s.internalSubset;G&&e.push(" [",G,"]"),e.push(">")}return;case m1:return e.push("<?",s.target," ",s.data,"?>");case p1:return e.push("&",s.nodeName,";");default:e.push("??",s.nodeName)}}function j1(s,e,i){var r;switch(e.nodeType){case Cs:r=e.cloneNode(!1),r.ownerDocument=s;case Pr:break;case Hl:i=!0;break}if(r||(r=e.cloneNode(!1)),r.ownerDocument=s,r.parentNode=null,i)for(var o=e.firstChild;o;)r.appendChild(j1(s,o,i)),o=o.nextSibling;return r}function r0(s,e,i){var r=new e.constructor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var l=e[o];typeof l!="object"&&l!=r[o]&&(r[o]=l)}switch(e.childNodes&&(r.childNodes=new Br),r.ownerDocument=s,r.nodeType){case Cs:var c=e.attributes,f=r.attributes=new Uf,p=c.length;f._ownerElement=r;for(var v=0;v<p;v++)r.setAttributeNode(r0(s,c.item(v),!0));break;case Hl:i=!0}if(i)for(var S=e.firstChild;S;)r.appendChild(r0(s,S,i)),S=S.nextSibling;return r}function z1(s,e,i){s[e]=i}try{if(Object.defineProperty){let s=function(e){switch(e.nodeType){case Cs:case Pr:var i=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&i.push(s(e)),e=e.nextSibling;return i.join("");default:return e.nodeValue}};Object.defineProperty(Vl.prototype,"length",{get:function(){return Wg(this),this.$$length}}),Object.defineProperty(kt.prototype,"textContent",{get:function(){return s(this)},set:function(e){switch(this.nodeType){case Cs:case Pr:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),z1=function(e,i,r){e["$$"+i]=r}}}catch{}Aa.DocumentType=qf,Aa.DOMException=oi,Aa.DOMImplementation=E1,Aa.Element=Ao,Aa.Node=kt,Aa.NodeList=Br,Aa.XMLSerializer=I1;var Hf={},U1={};(function(s){var e=Ur.freeze;s.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),s.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"",dd:"",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:"",emsp13:"",emsp14:"",ENG:"Ŋ",eng:"ŋ",ensp:"",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"",escr:"",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"",ExponentialE:"",exponentiale:"",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"",frown:"⌢",Fscr:"",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:"",half:"½",hamilt:"",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"",hfr:"𝔥",HilbertSpace:"",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"",hyphen:"",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"",Imacr:"Ī",imacr:"ī",image:"",ImaginaryI:"",imagline:"",imagpart:"",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"",Lscr:"",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"",lsquor:"",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"",Mellintrf:"",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"",midast:"*",midcir:"⫰",middot:"·",minus:"",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:"",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"",operp:"⦹",oplus:"⊕",Or:"⩔",or:"",orarr:"↻",ord:"⩝",order:"",orderof:"",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"",pointint:"⨕",Popf:"",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"",primes:"",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:"",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"",rationals:"",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"",real:"",realine:"",realpart:"",reals:"",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"",Rscr:"",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"",rsquor:"",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"",setmn:"",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"",smashp:"⨳",smeparsl:"⧤",smid:"",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"",ThickSpace:"",thinsp:"",ThinSpace:"",thkap:"≈",thksim:"",THORN:"Þ",thorn:"þ",Tilde:"",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"",vee:"",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:"",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),s.entityMap=s.HTML_ENTITIES})(U1);var a0={},ud=Ur.NAMESPACE,o0=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,P1=new RegExp("[\\-\\.0-9"+o0.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),B1=new RegExp("^"+o0.source+P1.source+"*(?::"+o0.source+P1.source+"*)?$"),cd=0,wa=1,Yl=2,dd=3,Ql=4,Gl=5,hd=6,Vf=7;function Xl(s,e){this.message=s,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Xl)}Xl.prototype=new Error,Xl.prototype.name=Xl.name;function q1(){}q1.prototype={parse:function(s,e,i){var r=this.domBuilder;r.startDocument(),V1(e,e={}),y4(s,e,i,r,this.errorHandler),r.endDocument()}};function y4(s,e,i,r,o){function l(ne){if(ne>65535){ne-=65536;var Se=55296+(ne>>10),pe=56320+(ne&1023);return String.fromCharCode(Se,pe)}else return String.fromCharCode(ne)}function c(ne){var Se=ne.slice(1,-1);return Object.hasOwnProperty.call(i,Se)?i[Se]:Se.charAt(0)==="#"?l(parseInt(Se.substr(1).replace("x","0x"))):(o.error("entity not found:"+ne),ne)}function f(ne){if(ne>C){var Se=s.substring(C,ne).replace(/&#?\w+;/g,c);D&&p(C),r.characters(Se,0,ne-C),C=ne}}function p(ne,Se){for(;ne>=S&&(Se=x.exec(s));)v=Se.index,S=v+Se[0].length,D.lineNumber++;D.columnNumber=ne-v+1}for(var v=0,S=0,x=/.*(?:\r\n?|\n)|.*$/g,D=r.locator,k=[{currentNSMap:e}],I={},C=0;;){try{var P=s.indexOf("<",C);if(P<0){if(!s.substr(C).match(/^\s*$/)){var U=r.doc,Y=U.createTextNode(s.substr(C));U.appendChild(Y),r.currentElement=Y}return}switch(P>C&&f(P),s.charAt(P+1)){case"/":var le=s.indexOf(">",P+3),$=s.substring(P+2,le).replace(/[ \t\n\r]+$/g,""),G=k.pop();le<0?($=s.substring(P+2).replace(/[\s<].*/,""),o.error("end tag name: "+$+" is not complete:"+G.tagName),le=P+1+$.length):$.match(/\s</)&&($=$.replace(/[\s<].*/,""),o.error("end tag name: "+$+" maybe not complete"),le=P+1+$.length);var W=G.localNSMap,oe=G.tagName==$,K=oe||G.tagName&&G.tagName.toLowerCase()==$.toLowerCase();if(K){if(r.endElement(G.uri,G.localName,$),W)for(var de in W)Object.prototype.hasOwnProperty.call(W,de)&&r.endPrefixMapping(de);oe||o.fatalError("end tag name: "+$+" is not match the current start tagName:"+G.tagName)}else k.push(G);le++;break;case"?":D&&p(P),le=S4(s,P,r);break;case"!":D&&p(P),le=_4(s,P,r,o);break;default:D&&p(P);var fe=new $1,me=k[k.length-1].currentNSMap,le=T4(s,P,fe,me,c,o),_e=fe.length;if(!fe.closed&&b4(s,le,fe.tagName,I)&&(fe.closed=!0,i.nbsp||o.warning("unclosed xml attribute")),D&&_e){for(var he=F1(D,{}),ge=0;ge<_e;ge++){var Ae=fe[ge];p(Ae.offset),Ae.locator=F1(D,{})}r.locator=he,H1(fe,r,me)&&k.push(fe),r.locator=D}else H1(fe,r,me)&&k.push(fe);ud.isHTML(fe.uri)&&!fe.closed?le=v4(s,le,fe.tagName,c,r):le++}}catch(ne){if(ne instanceof Xl)throw ne;o.error("element parse error: "+ne),le=-1}le>C?C=le:f(Math.max(P,C)+1)}}function F1(s,e){return e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber,e}function T4(s,e,i,r,o,l){function c(D,k,I){i.attributeNames.hasOwnProperty(D)&&l.fatalError("Attribute "+D+" redefined"),i.addValue(D,k.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,o),I)}for(var f,p,v=++e,S=cd;;){var x=s.charAt(v);switch(x){case"=":if(S===wa)f=s.slice(e,v),S=dd;else if(S===Yl)S=dd;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(S===dd||S===wa)if(S===wa&&(l.warning('attribute value must after "="'),f=s.slice(e,v)),e=v+1,v=s.indexOf(x,e),v>0)p=s.slice(e,v),c(f,p,e-1),S=Gl;else throw new Error("attribute value no end '"+x+"' match");else if(S==Ql)p=s.slice(e,v),c(f,p,e),l.warning('attribute "'+f+'" missed start quot('+x+")!!"),e=v+1,S=Gl;else throw new Error('attribute value must after "="');break;case"/":switch(S){case cd:i.setTagName(s.slice(e,v));case Gl:case hd:case Vf:S=Vf,i.closed=!0;case Ql:case wa:break;case Yl:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return l.error("unexpected end of input"),S==cd&&i.setTagName(s.slice(e,v)),v;case">":switch(S){case cd:i.setTagName(s.slice(e,v));case Gl:case hd:case Vf:break;case Ql:case wa:p=s.slice(e,v),p.slice(-1)==="/"&&(i.closed=!0,p=p.slice(0,-1));case Yl:S===Yl&&(p=f),S==Ql?(l.warning('attribute "'+p+'" missed quot(")!'),c(f,p,e)):((!ud.isHTML(r[""])||!p.match(/^(?:disabled|checked|selected)$/i))&&l.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),c(p,p,e));break;case dd:throw new Error("attribute value missed!!")}return v;case"€":x=" ";default:if(x<=" ")switch(S){case cd:i.setTagName(s.slice(e,v)),S=hd;break;case wa:f=s.slice(e,v),S=Yl;break;case Ql:var p=s.slice(e,v);l.warning('attribute "'+p+'" missed quot(")!!'),c(f,p,e);case Gl:S=hd;break}else switch(S){case Yl:i.tagName,(!ud.isHTML(r[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&l.warning('attribute "'+f+'" missed value!! "'+f+'" instead2!!'),c(f,f,e),e=v,S=wa;break;case Gl:l.warning('attribute space is required"'+f+'"!!');case hd:S=wa,e=v;break;case dd:S=Ql,e=v;break;case Vf:throw new Error("elements closed character '/' and '>' must be connected to")}}v++}}function H1(s,e,i){for(var r=s.tagName,o=null,x=s.length;x--;){var l=s[x],c=l.qName,f=l.value,D=c.indexOf(":");if(D>0)var p=l.prefix=c.slice(0,D),v=c.slice(D+1),S=p==="xmlns"&&v;else v=c,p=null,S=c==="xmlns"&&"";l.localName=v,S!==!1&&(o==null&&(o={},V1(i,i={})),i[S]=o[S]=f,l.uri=ud.XMLNS,e.startPrefixMapping(S,f))}for(var x=s.length;x--;){l=s[x];var p=l.prefix;p&&(p==="xml"&&(l.uri=ud.XML),p!=="xmlns"&&(l.uri=i[p||""]))}var D=r.indexOf(":");D>0?(p=s.prefix=r.slice(0,D),v=s.localName=r.slice(D+1)):(p=null,v=s.localName=r);var k=s.uri=i[p||""];if(e.startElement(k,v,r,s),s.closed){if(e.endElement(k,v,r),o)for(p in o)Object.prototype.hasOwnProperty.call(o,p)&&e.endPrefixMapping(p)}else return s.currentNSMap=i,s.localNSMap=o,!0}function v4(s,e,i,r,o){if(/^(?:script|textarea)$/i.test(i)){var l=s.indexOf("</"+i+">",e),c=s.substring(e+1,l);if(/[&<]/.test(c))return/^script$/i.test(i)?(o.characters(c,0,c.length),l):(c=c.replace(/&#?\w+;/g,r),o.characters(c,0,c.length),l)}return e+1}function b4(s,e,i,r){var o=r[i];return o==null&&(o=s.lastIndexOf("</"+i+">"),o<e&&(o=s.lastIndexOf("</"+i)),r[i]=o),o<e}function V1(s,e){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}function _4(s,e,i,r){var o=s.charAt(e+2);switch(o){case"-":if(s.charAt(e+3)==="-"){var l=s.indexOf("-->",e+4);return l>e?(i.comment(s,e+4,l-e-4),l+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(s.substr(e+3,6)=="CDATA["){var l=s.indexOf("]]>",e+9);return i.startCDATA(),i.characters(s,e+9,l-e-9),i.endCDATA(),l+3}var c=x4(s,e),f=c.length;if(f>1&&/!doctype/i.test(c[0][0])){var p=c[1][0],v=!1,S=!1;f>3&&(/^public$/i.test(c[2][0])?(v=c[3][0],S=f>4&&c[4][0]):/^system$/i.test(c[2][0])&&(S=c[3][0]));var x=c[f-1];return i.startDTD(p,v,S),i.endDTD(),x.index+x[0].length}}return-1}function S4(s,e,i){var r=s.indexOf("?>",e);if(r){var o=s.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,i.processingInstruction(o[1],o[2]),r+2):-1}return-1}function $1(){this.attributeNames={}}$1.prototype={setTagName:function(s){if(!B1.test(s))throw new Error("invalid tagName:"+s);this.tagName=s},addValue:function(s,e,i){if(!B1.test(s))throw new Error("invalid attribute:"+s);this.attributeNames[s]=this.length,this[this.length++]={qName:s,value:e,offset:i}},length:0,getLocalName:function(s){return this[s].localName},getLocator:function(s){return this[s].locator},getQName:function(s){return this[s].qName},getURI:function(s){return this[s].uri},getValue:function(s){return this[s].value}};function x4(s,e){var i,r=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(o.lastIndex=e,o.exec(s);i=o.exec(s);)if(r.push(i),i[1])return r}a0.XMLReader=q1,a0.ParseError=Xl;var E4=Ur,M4=Aa,Y1=U1,Q1=a0,D4=M4.DOMImplementation,G1=E4.NAMESPACE,C4=Q1.ParseError,A4=Q1.XMLReader;function X1(s){return s.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function W1(s){this.options=s||{locator:{}}}W1.prototype.parseFromString=function(s,e){var i=this.options,r=new A4,o=i.domBuilder||new fd,l=i.errorHandler,c=i.locator,f=i.xmlns||{},p=/\/x?html?$/.test(e),v=p?Y1.HTML_ENTITIES:Y1.XML_ENTITIES;c&&o.setDocumentLocator(c),r.errorHandler=w4(l,o,c),r.domBuilder=i.domBuilder||o,p&&(f[""]=G1.HTML),f.xml=f.xml||G1.XML;var S=i.normalizeLineEndings||X1;return s&&typeof s=="string"?r.parse(S(s),f,v):r.errorHandler.error("invalid doc source"),o.doc};function w4(s,e,i){if(!s){if(e instanceof fd)return e;s=e}var r={},o=s instanceof Function;i=i||{};function l(c){var f=s[c];!f&&o&&(f=s.length==2?function(p){s(c,p)}:s),r[c]=f&&function(p){f("[xmldom "+c+"] "+p+l0(i))}||function(){}}return l("warning"),l("error"),l("fatalError"),r}function fd(){this.cdata=!1}function Wl(s,e){e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber}fd.prototype={startDocument:function(){this.doc=new D4().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(s,e,i,r){var o=this.doc,l=o.createElementNS(s,i||e),c=r.length;$f(this,l),this.currentElement=l,this.locator&&Wl(this.locator,l);for(var f=0;f<c;f++){var s=r.getURI(f),p=r.getValue(f),i=r.getQName(f),v=o.createAttributeNS(s,i);this.locator&&Wl(r.getLocator(f),v),v.value=v.nodeValue=p,l.setAttributeNode(v)}},endElement:function(s,e,i){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(s,e){},endPrefixMapping:function(s){},processingInstruction:function(s,e){var i=this.doc.createProcessingInstruction(s,e);this.locator&&Wl(this.locator,i),$f(this,i)},ignorableWhitespace:function(s,e,i){},characters:function(s,e,i){if(s=K1.apply(this,arguments),s){if(this.cdata)var r=this.doc.createCDATASection(s);else var r=this.doc.createTextNode(s);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(s)&&this.doc.appendChild(r),this.locator&&Wl(this.locator,r)}},skippedEntity:function(s){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(s){(this.locator=s)&&(s.lineNumber=0)},comment:function(s,e,i){s=K1.apply(this,arguments);var r=this.doc.createComment(s);this.locator&&Wl(this.locator,r),$f(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(s,e,i){var r=this.doc.implementation;if(r&&r.createDocumentType){var o=r.createDocumentType(s,e,i);this.locator&&Wl(this.locator,o),$f(this,o),this.doc.doctype=o}},warning:function(s){console.warn("[xmldom warning] "+s,l0(this.locator))},error:function(s){console.error("[xmldom error] "+s,l0(this.locator))},fatalError:function(s){throw new C4(s,this.locator)}};function l0(s){if(s)return`
@`+(s.systemId||"")+"#[line:"+s.lineNumber+",col:"+s.columnNumber+"]"}function K1(s,e,i){return typeof s=="string"?s.substr(e,i):s.length>=e+i||e?new java.lang.String(s,e,i)+"":s}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(s){fd.prototype[s]=function(){return null}});function $f(s,e){s.currentElement?s.currentElement.appendChild(e):s.doc.appendChild(e)}Hf.__DOMHandler=fd,Hf.normalizeLineEndings=X1,Hf.DOMParser=W1;var N4=Hf.DOMParser;/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const Z1=s=>!!s&&typeof s=="object",wi=(...s)=>s.reduce((e,i)=>(typeof i!="object"||Object.keys(i).forEach(r=>{Array.isArray(e[r])&&Array.isArray(i[r])?e[r]=e[r].concat(i[r]):Z1(e[r])&&Z1(i[r])?e[r]=wi(e[r],i[r]):e[r]=i[r]}),e),{}),J1=s=>Object.keys(s).map(e=>s[e]),k4=(s,e)=>{const i=[];for(let r=s;r<e;r++)i.push(r);return i},Kl=s=>s.reduce((e,i)=>e.concat(i),[]),e_=s=>{if(!s.length)return[];const e=[];for(let i=0;i<s.length;i++)e.push(s[i]);return e},O4=(s,e)=>s.reduce((i,r,o)=>(r[e]&&i.push(o),i),[]),I4=(s,e)=>J1(s.reduce((i,r)=>(r.forEach(o=>{i[e(o)]=o}),i),{}));var Zl={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const pd=({baseUrl:s="",source:e="",range:i="",indexRange:r=""})=>{const o={uri:e,resolvedUri:jf(s||"",e)};if(i||r){const c=(i||r).split("-");let f=z.BigInt?z.BigInt(c[0]):parseInt(c[0],10),p=z.BigInt?z.BigInt(c[1]):parseInt(c[1],10);f<Number.MAX_SAFE_INTEGER&&typeof f=="bigint"&&(f=Number(f)),p<Number.MAX_SAFE_INTEGER&&typeof p=="bigint"&&(p=Number(p));let v;typeof p=="bigint"||typeof f=="bigint"?v=z.BigInt(p)-z.BigInt(f)+z.BigInt(1):v=p-f+1,typeof v=="bigint"&&v<Number.MAX_SAFE_INTEGER&&(v=Number(v)),o.byterange={length:v,offset:f}}return o},L4=s=>{let e;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=z.BigInt(s.offset)+z.BigInt(s.length)-z.BigInt(1):e=s.offset+s.length-1,`${s.offset}-${e}`},t_=s=>(s&&typeof s!="number"&&(s=parseInt(s,10)),isNaN(s)?null:s),R4={static(s){const{duration:e,timescale:i=1,sourceDuration:r,periodDuration:o}=s,l=t_(s.endNumber),c=e/i;return typeof l=="number"?{start:0,end:l}:typeof o=="number"?{start:0,end:o/c}:{start:0,end:r/c}},dynamic(s){const{NOW:e,clientOffset:i,availabilityStartTime:r,timescale:o=1,duration:l,periodStart:c=0,minimumUpdatePeriod:f=0,timeShiftBufferDepth:p=1/0}=s,v=t_(s.endNumber),S=(e+i)/1e3,x=r+c,k=S+f-x,I=Math.ceil(k*o/l),C=Math.floor((S-x-p)*o/l),P=Math.floor((S-x)*o/l);return{start:Math.max(0,C),end:typeof v=="number"?v:Math.min(I,P)}}},j4=s=>e=>{const{duration:i,timescale:r=1,periodStart:o,startNumber:l=1}=s;return{number:l+e,duration:i/r,timeline:o,time:e*i}},u0=s=>{const{type:e,duration:i,timescale:r=1,periodDuration:o,sourceDuration:l}=s,{start:c,end:f}=R4[e](s),p=k4(c,f).map(j4(s));if(e==="static"){const v=p.length-1,S=typeof o=="number"?o:l;p[v].duration=S-i/r*v}return p},i_=s=>{const{baseUrl:e,initialization:i={},sourceDuration:r,indexRange:o="",periodStart:l,presentationTime:c,number:f=0,duration:p}=s;if(!e)throw new Error(Zl.NO_BASE_URL);const v=pd({baseUrl:e,source:i.sourceURL,range:i.range}),S=pd({baseUrl:e,source:e,indexRange:o});if(S.map=v,p){const x=u0(s);x.length&&(S.duration=x[0].duration,S.timeline=x[0].timeline)}else r&&(S.duration=r,S.timeline=l);return S.presentationTime=c||l,S.number=f,[S]},c0=(s,e,i)=>{const r=s.sidx.map?s.sidx.map:null,o=s.sidx.duration,l=s.timeline||0,c=s.sidx.byterange,f=c.offset+c.length,p=e.timescale,v=e.references.filter(P=>P.referenceType!==1),S=[],x=s.endList?"static":"dynamic",D=s.sidx.timeline;let k=D,I=s.mediaSequence||0,C;typeof e.firstOffset=="bigint"?C=z.BigInt(f)+e.firstOffset:C=f+e.firstOffset;for(let P=0;P<v.length;P++){const U=e.references[P],Y=U.referencedSize,$=U.subsegmentDuration;let G;typeof C=="bigint"?G=C+z.BigInt(Y)-z.BigInt(1):G=C+Y-1;const W=`${C}-${G}`,K=i_({baseUrl:i,timescale:p,timeline:l,periodStart:D,presentationTime:k,number:I,duration:$,sourceDuration:o,indexRange:W,type:x})[0];r&&(K.map=r),S.push(K),typeof C=="bigint"?C+=z.BigInt(Y):C+=Y,k+=$/p,I++}return s.segments=S,s},z4=["AUDIO","SUBTITLES"],U4=1/60,n_=s=>I4(s,({timeline:e})=>e).sort((e,i)=>e.timeline>i.timeline?1:-1),P4=(s,e)=>{for(let i=0;i<s.length;i++)if(s[i].attributes.NAME===e)return s[i];return null},s_=s=>{let e=[];return i4(s,z4,(i,r,o,l)=>{e=e.concat(i.playlists||[])}),e},r_=({playlist:s,mediaSequence:e})=>{s.mediaSequence=e,s.segments.forEach((i,r)=>{i.number=s.mediaSequence+r})},B4=({oldPlaylists:s,newPlaylists:e,timelineStarts:i})=>{e.forEach(r=>{r.discontinuitySequence=i.findIndex(function({timeline:p}){return p===r.timeline});const o=P4(s,r.attributes.NAME);if(!o||r.sidx)return;const l=r.segments[0],c=o.segments.findIndex(function(p){return Math.abs(p.presentationTime-l.presentationTime)<U4});if(c===-1){r_({playlist:r,mediaSequence:o.mediaSequence+o.segments.length}),r.segments[0].discontinuity=!0,r.discontinuityStarts.unshift(0),(!o.segments.length&&r.timeline>o.timeline||o.segments.length&&r.timeline>o.segments[o.segments.length-1].timeline)&&r.discontinuitySequence--;return}o.segments[c].discontinuity&&!l.discontinuity&&(l.discontinuity=!0,r.discontinuityStarts.unshift(0),r.discontinuitySequence--),r_({playlist:r,mediaSequence:o.segments[c].number})})},q4=({oldManifest:s,newManifest:e})=>{const i=s.playlists.concat(s_(s)),r=e.playlists.concat(s_(e));return e.timelineStarts=n_([s.timelineStarts,e.timelineStarts]),B4({oldPlaylists:i,newPlaylists:r,timelineStarts:e.timelineStarts}),e},Yf=s=>s&&s.uri+"-"+L4(s.byterange),d0=s=>{const e=s.reduce(function(r,o){return r[o.attributes.baseUrl]||(r[o.attributes.baseUrl]=[]),r[o.attributes.baseUrl].push(o),r},{});let i=[];return Object.values(e).forEach(r=>{const o=J1(r.reduce((l,c)=>{const f=c.attributes.id+(c.attributes.lang||"");return l[f]?(c.segments&&(c.segments[0]&&(c.segments[0].discontinuity=!0),l[f].segments.push(...c.segments)),c.attributes.contentProtection&&(l[f].attributes.contentProtection=c.attributes.contentProtection)):(l[f]=c,l[f].attributes.timelineStarts=[]),l[f].attributes.timelineStarts.push({start:c.attributes.periodStart,timeline:c.attributes.periodStart}),l},{}));i=i.concat(o)}),i.map(r=>(r.discontinuityStarts=O4(r.segments||[],"discontinuity"),r))},h0=(s,e)=>{const i=Yf(s.sidx),r=i&&e[i]&&e[i].sidx;return r&&c0(s,r,s.sidx.resolvedUri),s},F4=(s,e={})=>{if(!Object.keys(e).length)return s;for(const i in s)s[i]=h0(s[i],e);return s},H4=({attributes:s,segments:e,sidx:i,mediaSequence:r,discontinuitySequence:o,discontinuityStarts:l},c)=>{const f={attributes:{NAME:s.id,BANDWIDTH:s.bandwidth,CODECS:s.codecs,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuitySequence:o,discontinuityStarts:l,timelineStarts:s.timelineStarts,mediaSequence:r,segments:e};return s.contentProtection&&(f.contentProtection=s.contentProtection),s.serviceLocation&&(f.attributes.serviceLocation=s.serviceLocation),i&&(f.sidx=i),c&&(f.attributes.AUDIO="audio",f.attributes.SUBTITLES="subs"),f},V4=({attributes:s,segments:e,mediaSequence:i,discontinuityStarts:r,discontinuitySequence:o})=>{typeof e>"u"&&(e=[{uri:s.baseUrl,timeline:s.periodStart,resolvedUri:s.baseUrl||"",duration:s.sourceDuration,number:0}],s.duration=s.sourceDuration);const l={NAME:s.id,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1};s.codecs&&(l.CODECS=s.codecs);const c={attributes:l,uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,timelineStarts:s.timelineStarts,discontinuityStarts:r,discontinuitySequence:o,mediaSequence:i,segments:e};return s.serviceLocation&&(c.attributes.serviceLocation=s.serviceLocation),c},$4=(s,e={},i=!1)=>{let r;const o=s.reduce((l,c)=>{const f=c.attributes.role&&c.attributes.role.value||"",p=c.attributes.lang||"";let v=c.attributes.label||"main";if(p&&!c.attributes.label){const x=f?` (${f})`:"";v=`${c.attributes.lang}${x}`}l[v]||(l[v]={language:p,autoselect:!0,default:f==="main",playlists:[],uri:""});const S=h0(H4(c,i),e);return l[v].playlists.push(S),typeof r>"u"&&f==="main"&&(r=c,r.default=!0),l},{});if(!r){const l=Object.keys(o)[0];o[l].default=!0}return o},Y4=(s,e={})=>s.reduce((i,r)=>{const o=r.attributes.label||r.attributes.lang||"text",l=r.attributes.lang||"und";return i[o]||(i[o]={language:l,default:!1,autoselect:!1,playlists:[],uri:""}),i[o].playlists.push(h0(V4(r),e)),i},{}),Q4=s=>s.reduce((e,i)=>(i&&i.forEach(r=>{const{channel:o,language:l}=r;e[l]={autoselect:!1,default:!1,instreamId:o,language:l},r.hasOwnProperty("aspectRatio")&&(e[l].aspectRatio=r.aspectRatio),r.hasOwnProperty("easyReader")&&(e[l].easyReader=r.easyReader),r.hasOwnProperty("3D")&&(e[l]["3D"]=r["3D"])}),e),{}),G4=({attributes:s,segments:e,sidx:i,discontinuityStarts:r})=>{const o={attributes:{NAME:s.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:s.width,height:s.height},CODECS:s.codecs,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuityStarts:r,timelineStarts:s.timelineStarts,segments:e};return s.frameRate&&(o.attributes["FRAME-RATE"]=s.frameRate),s.contentProtection&&(o.contentProtection=s.contentProtection),s.serviceLocation&&(o.attributes.serviceLocation=s.serviceLocation),i&&(o.sidx=i),o},X4=({attributes:s})=>s.mimeType==="video/mp4"||s.mimeType==="video/webm"||s.contentType==="video",W4=({attributes:s})=>s.mimeType==="audio/mp4"||s.mimeType==="audio/webm"||s.contentType==="audio",K4=({attributes:s})=>s.mimeType==="text/vtt"||s.contentType==="text",Z4=(s,e)=>{s.forEach(i=>{i.mediaSequence=0,i.discontinuitySequence=e.findIndex(function({timeline:r}){return r===i.timeline}),i.segments&&i.segments.forEach((r,o)=>{r.number=o})})},a_=s=>s?Object.keys(s).reduce((e,i)=>{const r=s[i];return e.concat(r.playlists)},[]):[],J4=({dashPlaylists:s,locations:e,contentSteering:i,sidxMapping:r={},previousManifest:o,eventStream:l})=>{if(!s.length)return{};const{sourceDuration:c,type:f,suggestedPresentationDelay:p,minimumUpdatePeriod:v}=s[0].attributes,S=d0(s.filter(X4)).map(G4),x=d0(s.filter(W4)),D=d0(s.filter(K4)),k=s.map(G=>G.attributes.captionServices).filter(Boolean),I={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:c,playlists:F4(S,r)};v>=0&&(I.minimumUpdatePeriod=v*1e3),e&&(I.locations=e),i&&(I.contentSteering=i),f==="dynamic"&&(I.suggestedPresentationDelay=p),l&&l.length>0&&(I.eventStream=l);const C=I.playlists.length===0,P=x.length?$4(x,r,C):null,U=D.length?Y4(D,r):null,Y=S.concat(a_(P),a_(U)),$=Y.map(({timelineStarts:G})=>G);return I.timelineStarts=n_($),Z4(Y,I.timelineStarts),P&&(I.mediaGroups.AUDIO.audio=P),U&&(I.mediaGroups.SUBTITLES.subs=U),k.length&&(I.mediaGroups["CLOSED-CAPTIONS"].cc=Q4(k)),o?q4({oldManifest:o,newManifest:I}):I},eN=(s,e,i)=>{const{NOW:r,clientOffset:o,availabilityStartTime:l,timescale:c=1,periodStart:f=0,minimumUpdatePeriod:p=0}=s,v=(r+o)/1e3,S=l+f,D=v+p-S;return Math.ceil((D*c-e)/i)},o_=(s,e)=>{const{type:i,minimumUpdatePeriod:r=0,media:o="",sourceDuration:l,timescale:c=1,startNumber:f=1,periodStart:p}=s,v=[];let S=-1;for(let x=0;x<e.length;x++){const D=e[x],k=D.d,I=D.r||0,C=D.t||0;S<0&&(S=C),C&&C>S&&(S=C);let P;if(I<0){const $=x+1;$===e.length?i==="dynamic"&&r>0&&o.indexOf("$Number$")>0?P=eN(s,S,k):P=(l*c-S)/k:P=(e[$].t-S)/k}else P=I+1;const U=f+v.length+P;let Y=f+v.length;for(;Y<U;)v.push({number:Y,duration:k/c,time:S,timeline:p}),S+=k,Y++}return v},tN=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,iN=s=>(e,i,r,o)=>{if(e==="$$")return"$";if(typeof s[i]>"u")return e;const l=""+s[i];return i==="RepresentationID"||(r?o=parseInt(o,10):o=1,l.length>=o)?l:`${new Array(o-l.length+1).join("0")}${l}`},l_=(s,e)=>s.replace(tN,iN(e)),nN=(s,e)=>!s.duration&&!e?[{number:s.startNumber||1,duration:s.sourceDuration,time:0,timeline:s.periodStart}]:s.duration?u0(s):o_(s,e),sN=(s,e)=>{const i={RepresentationID:s.id,Bandwidth:s.bandwidth||0},{initialization:r={sourceURL:"",range:""}}=s,o=pd({baseUrl:s.baseUrl,source:l_(r.sourceURL,i),range:r.range});return nN(s,e).map(c=>{i.Number=c.number,i.Time=c.time;const f=l_(s.media||"",i),p=s.timescale||1,v=s.presentationTimeOffset||0,S=s.periodStart+(c.time-v)/p;return{uri:f,timeline:c.timeline,duration:c.duration,resolvedUri:jf(s.baseUrl||"",f),map:o,number:c.number,presentationTime:S}})},rN=(s,e)=>{const{baseUrl:i,initialization:r={}}=s,o=pd({baseUrl:i,source:r.sourceURL,range:r.range}),l=pd({baseUrl:i,source:e.media,range:e.mediaRange});return l.map=o,l},aN=(s,e)=>{const{duration:i,segmentUrls:r=[],periodStart:o}=s;if(!i&&!e||i&&e)throw new Error(Zl.SEGMENT_TIME_UNSPECIFIED);const l=r.map(p=>rN(s,p));let c;return i&&(c=u0(s)),e&&(c=o_(s,e)),c.map((p,v)=>{if(l[v]){const S=l[v],x=s.timescale||1,D=s.presentationTimeOffset||0;return S.timeline=p.timeline,S.duration=p.duration,S.number=p.number,S.presentationTime=o+(p.time-D)/x,S}}).filter(p=>p)},oN=({attributes:s,segmentInfo:e})=>{let i,r;e.template?(r=sN,i=wi(s,e.template)):e.base?(r=i_,i=wi(s,e.base)):e.list&&(r=aN,i=wi(s,e.list));const o={attributes:s};if(!r)return o;const l=r(i,e.segmentTimeline);if(i.duration){const{duration:c,timescale:f=1}=i;i.duration=c/f}else l.length?i.duration=l.reduce((c,f)=>Math.max(c,Math.ceil(f.duration)),0):i.duration=0;return o.attributes=i,o.segments=l,e.base&&i.indexRange&&(o.sidx=l[0],o.segments=[]),o},lN=s=>s.map(oN),Gt=(s,e)=>e_(s.childNodes).filter(({tagName:i})=>i===e),md=s=>s.textContent.trim(),uN=s=>parseFloat(s.split("/").reduce((e,i)=>e/i)),Jl=s=>{const f=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(s);if(!f)return 0;const[p,v,S,x,D,k]=f.slice(1);return parseFloat(p||0)*31536e3+parseFloat(v||0)*2592e3+parseFloat(S||0)*86400+parseFloat(x||0)*3600+parseFloat(D||0)*60+parseFloat(k||0)},cN=s=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(s)&&(s+="Z"),Date.parse(s)),u_={mediaPresentationDuration(s){return Jl(s)},availabilityStartTime(s){return cN(s)/1e3},minimumUpdatePeriod(s){return Jl(s)},suggestedPresentationDelay(s){return Jl(s)},type(s){return s},timeShiftBufferDepth(s){return Jl(s)},start(s){return Jl(s)},width(s){return parseInt(s,10)},height(s){return parseInt(s,10)},bandwidth(s){return parseInt(s,10)},frameRate(s){return uN(s)},startNumber(s){return parseInt(s,10)},timescale(s){return parseInt(s,10)},presentationTimeOffset(s){return parseInt(s,10)},duration(s){const e=parseInt(s,10);return isNaN(e)?Jl(s):e},d(s){return parseInt(s,10)},t(s){return parseInt(s,10)},r(s){return parseInt(s,10)},presentationTime(s){return parseInt(s,10)},DEFAULT(s){return s}},mi=s=>s&&s.attributes?e_(s.attributes).reduce((e,i)=>{const r=u_[i.name]||u_.DEFAULT;return e[i.name]=r(i.value),e},{}):{},dN={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Qf=(s,e)=>e.length?Kl(s.map(function(i){return e.map(function(r){const o=md(r),l=jf(i.baseUrl,o),c=wi(mi(r),{baseUrl:l});return l!==o&&!c.serviceLocation&&i.serviceLocation&&(c.serviceLocation=i.serviceLocation),c})})):s,f0=s=>{const e=Gt(s,"SegmentTemplate")[0],i=Gt(s,"SegmentList")[0],r=i&&Gt(i,"SegmentURL").map(x=>wi({tag:"SegmentURL"},mi(x))),o=Gt(s,"SegmentBase")[0],l=i||e,c=l&&Gt(l,"SegmentTimeline")[0],f=i||o||e,p=f&&Gt(f,"Initialization")[0],v=e&&mi(e);v&&p?v.initialization=p&&mi(p):v&&v.initialization&&(v.initialization={sourceURL:v.initialization});const S={template:v,segmentTimeline:c&&Gt(c,"S").map(x=>mi(x)),list:i&&wi(mi(i),{segmentUrls:r,initialization:mi(p)}),base:o&&wi(mi(o),{initialization:mi(p)})};return Object.keys(S).forEach(x=>{S[x]||delete S[x]}),S},hN=(s,e,i)=>r=>{const o=Gt(r,"BaseURL"),l=Qf(e,o),c=wi(s,mi(r)),f=f0(r);return l.map(p=>({segmentInfo:wi(i,f),attributes:wi(c,p)}))},fN=s=>s.reduce((e,i)=>{const r=mi(i);r.schemeIdUri&&(r.schemeIdUri=r.schemeIdUri.toLowerCase());const o=dN[r.schemeIdUri];if(o){e[o]={attributes:r};const l=Gt(i,"cenc:pssh")[0];if(l){const c=md(l);e[o].pssh=c&&e1(c)}}return e},{}),pN=s=>{if(s.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(i=>{let r,o;return o=i,/^CC\d=/.test(i)?[r,o]=i.split("="):/^CC\d$/.test(i)&&(r=i),{channel:r,language:o}});if(s.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(i=>{const r={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(i)){const[o,l=""]=i.split("=");r.channel=o,r.language=i,l.split(",").forEach(c=>{const[f,p]=c.split(":");f==="lang"?r.language=p:f==="er"?r.easyReader=Number(p):f==="war"?r.aspectRatio=Number(p):f==="3D"&&(r["3D"]=Number(p))})}else r.language=i;return r.channel&&(r.channel="SERVICE"+r.channel),r})},mN=s=>Kl(Gt(s.node,"EventStream").map(e=>{const i=mi(e),r=i.schemeIdUri;return Gt(e,"Event").map(o=>{const l=mi(o),c=l.presentationTime||0,f=i.timescale||1,p=l.duration||0,v=c/f+s.attributes.start;return{schemeIdUri:r,value:i.value,id:l.id,start:v,end:v+p/f,messageData:md(o)||l.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),gN=(s,e,i)=>r=>{const o=mi(r),l=Qf(e,Gt(r,"BaseURL")),c=Gt(r,"Role")[0],f={role:mi(c)};let p=wi(s,o,f);const v=Gt(r,"Accessibility")[0],S=pN(mi(v));S&&(p=wi(p,{captionServices:S}));const x=Gt(r,"Label")[0];if(x&&x.childNodes.length){const P=x.childNodes[0].nodeValue.trim();p=wi(p,{label:P})}const D=fN(Gt(r,"ContentProtection"));Object.keys(D).length&&(p=wi(p,{contentProtection:D}));const k=f0(r),I=Gt(r,"Representation"),C=wi(i,k);return Kl(I.map(hN(p,l,C)))},yN=(s,e)=>(i,r)=>{const o=Qf(e,Gt(i.node,"BaseURL")),l=wi(s,{periodStart:i.attributes.start});typeof i.attributes.duration=="number"&&(l.periodDuration=i.attributes.duration);const c=Gt(i.node,"AdaptationSet"),f=f0(i.node);return Kl(c.map(gN(l,o,f)))},TN=(s,e)=>{if(s.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!s.length)return null;const i=wi({serverURL:md(s[0])},mi(s[0]));return i.queryBeforeStart=i.queryBeforeStart==="true",i},vN=({attributes:s,priorPeriodAttributes:e,mpdType:i})=>typeof s.start=="number"?s.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&i==="static"?0:null,bN=(s,e={})=>{const{manifestUri:i="",NOW:r=Date.now(),clientOffset:o=0,eventHandler:l=function(){}}=e,c=Gt(s,"Period");if(!c.length)throw new Error(Zl.INVALID_NUMBER_OF_PERIOD);const f=Gt(s,"Location"),p=mi(s),v=Qf([{baseUrl:i}],Gt(s,"BaseURL")),S=Gt(s,"ContentSteering");p.type=p.type||"static",p.sourceDuration=p.mediaPresentationDuration||0,p.NOW=r,p.clientOffset=o,f.length&&(p.locations=f.map(md));const x=[];return c.forEach((D,k)=>{const I=mi(D),C=x[k-1];I.start=vN({attributes:I,priorPeriodAttributes:C?C.attributes:null,mpdType:p.type}),x.push({node:D,attributes:I})}),{locations:p.locations,contentSteeringInfo:TN(S,l),representationInfo:Kl(x.map(yN(p,v))),eventStream:Kl(x.map(mN))}},c_=s=>{if(s==="")throw new Error(Zl.DASH_EMPTY_MANIFEST);const e=new N4;let i,r;try{i=e.parseFromString(s,"application/xml"),r=i&&i.documentElement.tagName==="MPD"?i.documentElement:null}catch{}if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(Zl.DASH_INVALID_XML);return r},_N=s=>{const e=Gt(s,"UTCTiming")[0];if(!e)return null;const i=mi(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Zl.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},SN=(s,e={})=>{const i=bN(c_(s),e),r=lN(i.representationInfo);return J4({dashPlaylists:r,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:i.eventStream})},xN=s=>_N(c_(s));var d_=Math.pow(2,32),EN=function(s){var e=new DataView(s.buffer,s.byteOffset,s.byteLength),i;return e.getBigUint64?(i=e.getBigUint64(0),i<Number.MAX_SAFE_INTEGER?Number(i):i):e.getUint32(0)*d_+e.getUint32(4)},MN={getUint64:EN,MAX_UINT32:d_},h_=MN.getUint64,DN=function(s){var e=new DataView(s.buffer,s.byteOffset,s.byteLength),i={version:s[0],flags:new Uint8Array(s.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},r=12;i.version===0?(i.earliestPresentationTime=e.getUint32(r),i.firstOffset=e.getUint32(r+4),r+=8):(i.earliestPresentationTime=h_(s.subarray(r)),i.firstOffset=h_(s.subarray(r+8)),r+=16),r+=2;var o=e.getUint16(r);for(r+=2;o>0;r+=12,o--)i.references.push({referenceType:(s[r]&128)>>>7,referencedSize:e.getUint32(r)&2147483647,subsegmentDuration:e.getUint32(r+4),startsWithSap:!!(s[r+8]&128),sapType:(s[r+8]&112)>>>4,sapDeltaTime:e.getUint32(r+8)&268435455});return i},CN=DN;const AN=Gc(CN);var wN=Ve([73,68,51]),NN=function(e,i){i===void 0&&(i=0),e=Ve(e);var r=e[i+5],o=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],l=(r&16)>>4;return l?o+20:o+10},gd=function s(e,i){return i===void 0&&(i=0),e=Ve(e),e.length-i<10||!Qt(e,wN,{offset:i})?i:(i+=NN(e,i),s(e,i))},f_=function(e){return typeof e=="string"?l1(e):e},kN=function(e){return Array.isArray(e)?e.map(function(i){return f_(i)}):[f_(e)]},ON=function s(e,i,r){r===void 0&&(r=!1),i=kN(i),e=Ve(e);var o=[];if(!i.length)return o;for(var l=0;l<e.length;){var c=(e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3])>>>0,f=e.subarray(l+4,l+8);if(c===0)break;var p=l+c;if(p>e.length){if(r)break;p=e.length}var v=e.subarray(l+8,p);Qt(f,i[0])&&(i.length===1?o.push(v):o.push.apply(o,s(v,i.slice(1),r))),l=p}return o},Gf={EBML:Ve([26,69,223,163]),DocType:Ve([66,130]),Segment:Ve([24,83,128,103]),SegmentInfo:Ve([21,73,169,102]),Tracks:Ve([22,84,174,107]),Track:Ve([174]),TrackNumber:Ve([215]),DefaultDuration:Ve([35,227,131]),TrackEntry:Ve([174]),TrackType:Ve([131]),FlagDefault:Ve([136]),CodecID:Ve([134]),CodecPrivate:Ve([99,162]),VideoTrack:Ve([224]),AudioTrack:Ve([225]),Cluster:Ve([31,67,182,117]),Timestamp:Ve([231]),TimestampScale:Ve([42,215,177]),BlockGroup:Ve([160]),BlockDuration:Ve([155]),Block:Ve([161]),SimpleBlock:Ve([163])},p0=[128,64,32,16,8,4,2,1],IN=function(e){for(var i=1,r=0;r<p0.length&&!(e&p0[r]);r++)i++;return i},Xf=function(e,i,r,o){r===void 0&&(r=!0),o===void 0&&(o=!1);var l=IN(e[i]),c=e.subarray(i,i+l);return r&&(c=Array.prototype.slice.call(e,i,i+l),c[0]^=p0[l-1]),{length:l,value:Jw(c,{signed:o}),bytes:c}},p_=function s(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return s(i)}):typeof e=="number"?e4(e):e},LN=function(e){return Array.isArray(e)?e.map(function(i){return p_(i)}):[p_(e)]},RN=function s(e,i,r){if(r>=i.length)return i.length;var o=Xf(i,r,!1);if(Qt(e.bytes,o.bytes))return r;var l=Xf(i,r+o.length);return s(e,i,r+l.length+l.value+o.length)},m_=function s(e,i){i=LN(i),e=Ve(e);var r=[];if(!i.length)return r;for(var o=0;o<e.length;){var l=Xf(e,o,!1),c=Xf(e,o+l.length),f=o+l.length+c.length;c.value===127&&(c.value=RN(l,e,f),c.value!==e.length&&(c.value-=f));var p=f+c.value>e.length?e.length:f+c.value,v=e.subarray(f,p);Qt(i[0],l.bytes)&&(i.length===1?r.push(v):r=r.concat(s(v,i.slice(1))));var S=l.length+c.length+v.length;o+=S}return r},jN=Ve([0,0,0,1]),zN=Ve([0,0,1]),UN=Ve([0,0,3]),PN=function(e){for(var i=[],r=1;r<e.length-2;)Qt(e.subarray(r,r+3),UN)&&(i.push(r+2),r++),r++;if(i.length===0)return e;var o=e.length-i.length,l=new Uint8Array(o),c=0;for(r=0;r<o;c++,r++)c===i[0]&&(c++,i.shift()),l[r]=e[c];return l},g_=function(e,i,r,o){o===void 0&&(o=1/0),e=Ve(e),r=[].concat(r);for(var l=0,c,f=0;l<e.length&&(f<o||c);){var p=void 0;if(Qt(e.subarray(l),jN)?p=4:Qt(e.subarray(l),zN)&&(p=3),!p){l++;continue}if(f++,c)return PN(e.subarray(c,l));var v=void 0;i==="h264"?v=e[l+p]&31:i==="h265"&&(v=e[l+p]>>1&63),r.indexOf(v)!==-1&&(c=l+p),l+=p+(i==="h264"?1:2)}return e.subarray(0,0)},BN=function(e,i,r){return g_(e,"h264",i,r)},qN=function(e,i,r){return g_(e,"h265",i,r)},un={webm:Ve([119,101,98,109]),matroska:Ve([109,97,116,114,111,115,107,97]),flac:Ve([102,76,97,67]),ogg:Ve([79,103,103,83]),ac3:Ve([11,119]),riff:Ve([82,73,70,70]),avi:Ve([65,86,73]),wav:Ve([87,65,86,69]),"3gp":Ve([102,116,121,112,51,103]),mp4:Ve([102,116,121,112]),fmp4:Ve([115,116,121,112]),mov:Ve([102,116,121,112,113,116]),moov:Ve([109,111,111,118]),moof:Ve([109,111,111,102])},eu={aac:function(e){var i=gd(e);return Qt(e,[255,16],{offset:i,mask:[255,22]})},mp3:function(e){var i=gd(e);return Qt(e,[255,2],{offset:i,mask:[255,6]})},webm:function(e){var i=m_(e,[Gf.EBML,Gf.DocType])[0];return Qt(i,un.webm)},mkv:function(e){var i=m_(e,[Gf.EBML,Gf.DocType])[0];return Qt(i,un.matroska)},mp4:function(e){if(eu["3gp"](e)||eu.mov(e))return!1;if(Qt(e,un.mp4,{offset:4})||Qt(e,un.fmp4,{offset:4})||Qt(e,un.moof,{offset:4})||Qt(e,un.moov,{offset:4}))return!0},mov:function(e){return Qt(e,un.mov,{offset:4})},"3gp":function(e){return Qt(e,un["3gp"],{offset:4})},ac3:function(e){var i=gd(e);return Qt(e,un.ac3,{offset:i})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var i=0;i+188<e.length&&i<188;){if(e[i]===71&&e[i+188]===71)return!0;i+=1}return!1},flac:function(e){var i=gd(e);return Qt(e,un.flac,{offset:i})},ogg:function(e){return Qt(e,un.ogg)},avi:function(e){return Qt(e,un.riff)&&Qt(e,un.avi,{offset:8})},wav:function(e){return Qt(e,un.riff)&&Qt(e,un.wav,{offset:8})},h264:function(e){return BN(e,7,3).length},h265:function(e){return qN(e,[32,33],3).length}},m0=Object.keys(eu).filter(function(s){return s!=="ts"&&s!=="h264"&&s!=="h265"}).concat(["ts","h264","h265"]);m0.forEach(function(s){var e=eu[s];eu[s]=function(i){return e(Ve(i))}});var FN=eu,g0=function(e){e=Ve(e);for(var i=0;i<m0.length;i++){var r=m0[i];if(FN[r](e))return r}return""},HN=function(e){return ON(e,["moof"]).length>0},y0=9e4,T0,v0,Wf,b0,y_,T_,v_;T0=function(s){return s*y0},v0=function(s,e){return s*e},Wf=function(s){return s/y0},b0=function(s,e){return s/e},y_=function(s,e){return T0(b0(s,e))},T_=function(s,e){return v0(Wf(s),e)},v_=function(s,e,i){return Wf(i?s:s-e)};var wo={ONE_SECOND_IN_TS:y0,secondsToVideoTs:T0,secondsToAudioTs:v0,videoTsToSeconds:Wf,audioTsToSeconds:b0,audioTsToVideoTs:y_,videoTsToAudioTs:T_,metadataTsToSeconds:v_};/**
* @license
* Video.js 8.23.3 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License Version 2.0
* <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
*/var _0="8.23.3";const Fr={},Na=function(s,e){return Fr[s]=Fr[s]||[],e&&(Fr[s]=Fr[s].concat(e)),Fr[s]},VN=function(s,e){Na(s,e)},b_=function(s,e){const i=Na(s).indexOf(e);return i<=-1?!1:(Fr[s]=Fr[s].slice(),Fr[s].splice(i,1),!0)},$N=function(s,e){Na(s,[].concat(e).map(i=>{const r=(...o)=>(b_(s,r),i(...o));return r}))},Kf={prefixed:!0},Zf=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],__=Zf[0];let yd;for(let s=0;s<Zf.length;s++)if(Zf[s][1]in ve){yd=Zf[s];break}if(yd){for(let s=0;s<yd.length;s++)Kf[__[s]]=yd[s];Kf.prefixed=yd[0]!==__[0]}let En=[];const YN=(s,e,i)=>(r,o,l)=>{const c=e.levels[o],f=new RegExp(`^(${c})$`);let p=s;if(r!=="log"&&l.unshift(r.toUpperCase()+":"),i&&(p=`%c${s}`,l.unshift(i)),l.unshift(p+":"),En){En.push([].concat(l));const S=En.length-1e3;En.splice(0,S>0?S:0)}if(!z.console)return;let v=z.console[r];!v&&r==="debug"&&(v=z.console.info||z.console.log),!(!v||!c||!f.test(r))&&v[Array.isArray(l)?"apply":"call"](z.console,l)};function S0(s,e=":",i=""){let r="info",o;function l(...c){o("log",r,c)}return o=YN(s,l,i),l.createLogger=(c,f,p)=>{const v=f!==void 0?f:e,S=p!==void 0?p:i,x=`${s} ${v} ${c}`;return S0(x,v,S)},l.createNewLogger=(c,f,p)=>S0(c,f,p),l.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},l.level=c=>{if(typeof c=="string"){if(!l.levels.hasOwnProperty(c))throw new Error(`"${c}" in not a valid log level`);r=c}return r},l.history=()=>En?[].concat(En):[],l.history.filter=c=>(En||[]).filter(f=>new RegExp(`.*${c}.*`).test(f[0])),l.history.clear=()=>{En&&(En.length=0)},l.history.disable=()=>{En!==null&&(En.length=0,En=null)},l.history.enable=()=>{En===null&&(En=[])},l.error=(...c)=>o("error",r,c),l.warn=(...c)=>o("warn",r,c),l.debug=(...c)=>o("debug",r,c),l}const ct=S0("VIDEOJS"),S_=ct.createLogger,QN=Object.prototype.toString,x_=function(s){return Ks(s)?Object.keys(s):[]};function tu(s,e){x_(s).forEach(i=>e(s[i],i))}function E_(s,e,i=0){return x_(s).reduce((r,o)=>e(r,s[o],o),i)}function Ks(s){return!!s&&typeof s=="object"}function iu(s){return Ks(s)&&QN.call(s)==="[object Object]"&&s.constructor===Object}function It(...s){const e={};return s.forEach(i=>{i&&tu(i,(r,o)=>{if(!iu(r)){e[o]=r;return}iu(e[o])||(e[o]={}),e[o]=It(e[o],r)})}),e}function M_(s={}){const e=[];for(const i in s)if(s.hasOwnProperty(i)){const r=s[i];e.push(r)}return e}function Jf(s,e,i,r=!0){const o=c=>Object.defineProperty(s,e,{value:c,enumerable:!0,writable:!0}),l={configurable:!0,enumerable:!0,get(){const c=i();return o(c),c}};return r&&(l.set=o),Object.defineProperty(s,e,l)}var GN=Object.freeze({__proto__:null,each:tu,reduce:E_,isObject:Ks,isPlain:iu,merge:It,values:M_,defineLazyProperty:Jf});let x0=!1,D_=null,As=!1,C_,A_=!1,nu=!1,su=!1,Zs=!1,E0=null,ep=null;const XN=!!(z.cast&&z.cast.framework&&z.cast.framework.CastReceiverContext);let w_=null,tp=!1,ip=!1,np=!1,sp=!1,rp=!1,ap=!1,op=!1;const Td=!!(ru()&&("ontouchstart"in z||z.navigator.maxTouchPoints||z.DocumentTouch&&z.document instanceof z.DocumentTouch)),ka=z.navigator&&z.navigator.userAgentData;if(ka&&ka.platform&&ka.brands&&(As=ka.platform==="Android",nu=!!ka.brands.find(s=>s.brand==="Microsoft Edge"),su=!!ka.brands.find(s=>s.brand==="Chromium"),Zs=!nu&&su,E0=ep=(ka.brands.find(s=>s.brand==="Chromium")||{}).version||null,ip=ka.platform==="Windows"),!su){const s=z.navigator&&z.navigator.userAgent||"";x0=/iPod/i.test(s),D_=function(){const e=s.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),As=/Android/i.test(s),C_=function(){const e=s.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const i=e[1]&&parseFloat(e[1]),r=e[2]&&parseFloat(e[2]);return i&&r?parseFloat(e[1]+"."+e[2]):i||null}(),A_=/Firefox/i.test(s),nu=/Edg/i.test(s),su=/Chrome/i.test(s)||/CriOS/i.test(s),Zs=!nu&&su,E0=ep=function(){const e=s.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),w_=function(){const e=/MSIE\s(\d+)\.\d/.exec(s);let i=e&&parseFloat(e[1]);return!i&&/Trident\/7.0/i.test(s)&&/rv:11.0/.test(s)&&(i=11),i}(),rp=/Tizen/i.test(s),ap=/Web0S/i.test(s),op=rp||ap,tp=/Safari/i.test(s)&&!Zs&&!As&&!nu&&!op,ip=/Windows/i.test(s),np=/iPad/i.test(s)||tp&&Td&&!/iPhone/i.test(s),sp=/iPhone/i.test(s)&&!np}const Zi=sp||np||x0,lp=(tp||Zi)&&!Zs;var N_=Object.freeze({__proto__:null,get IS_IPOD(){return x0},get IOS_VERSION(){return D_},get IS_ANDROID(){return As},get ANDROID_VERSION(){return C_},get IS_FIREFOX(){return A_},get IS_EDGE(){return nu},get IS_CHROMIUM(){return su},get IS_CHROME(){return Zs},get CHROMIUM_VERSION(){return E0},get CHROME_VERSION(){return ep},IS_CHROMECAST_RECEIVER:XN,get IE_VERSION(){return w_},get IS_SAFARI(){return tp},get IS_WINDOWS(){return ip},get IS_IPAD(){return np},get IS_IPHONE(){return sp},get IS_TIZEN(){return rp},get IS_WEBOS(){return ap},get IS_SMART_TV(){return op},TOUCH_ENABLED:Td,IS_IOS:Zi,IS_ANY_SAFARI:lp});function k_(s){return typeof s=="string"&&!!s.trim()}function WN(s){if(s.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function ru(){return ve===z.document}function au(s){return Ks(s)&&s.nodeType===1}function O_(){try{return z.parent!==z.self}catch{return!0}}function I_(s){return function(e,i){if(!k_(e))return ve[s](null);k_(i)&&(i=ve.querySelector(i));const r=au(i)?i:ve;return r[s]&&r[s](e)}}function Qe(s="div",e={},i={},r){const o=ve.createElement(s);return Object.getOwnPropertyNames(e).forEach(function(l){const c=e[l];l==="textContent"?Oa(o,c):(o[l]!==c||l==="tabIndex")&&(o[l]=c)}),Object.getOwnPropertyNames(i).forEach(function(l){o.setAttribute(l,i[l])}),r&&D0(o,r),o}function Oa(s,e){return typeof s.textContent>"u"?s.innerText=e:s.textContent=e,s}function M0(s,e){e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}function vd(s,e){return WN(e),s.classList.contains(e)}function No(s,...e){return s.classList.add(...e.reduce((i,r)=>i.concat(r.split(/\s+/)),[])),s}function up(s,...e){return s?(s.classList.remove(...e.reduce((i,r)=>i.concat(r.split(/\s+/)),[])),s):(ct.warn("removeClass was called with an element that doesn't exist"),null)}function L_(s,e,i){return typeof i=="function"&&(i=i(s,e)),typeof i!="boolean"&&(i=void 0),e.split(/\s+/).forEach(r=>s.classList.toggle(r,i)),s}function R_(s,e){Object.getOwnPropertyNames(e).forEach(function(i){const r=e[i];r===null||typeof r>"u"||r===!1?s.removeAttribute(i):s.setAttribute(i,r===!0?"":r)})}function Ia(s){const e={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(s&&s.attributes&&s.attributes.length>0){const r=s.attributes;for(let o=r.length-1;o>=0;o--){const l=r[o].name;let c=r[o].value;i.includes(l)&&(c=c!==null),e[l]=c}}return e}function j_(s,e){return s.getAttribute(e)}function ou(s,e,i){s.setAttribute(e,i)}function cp(s,e){s.removeAttribute(e)}function z_(){ve.body.focus(),ve.onselectstart=function(){return!1}}function U_(){ve.onselectstart=function(){return!0}}function lu(s){if(s&&s.getBoundingClientRect&&s.parentNode){const e=s.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(r=>{e[r]!==void 0&&(i[r]=e[r])}),i.height||(i.height=parseFloat(uu(s,"height"))),i.width||(i.width=parseFloat(uu(s,"width"))),i}}function bd(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};const e=s.offsetWidth,i=s.offsetHeight;let r=0,o=0;for(;s.offsetParent&&s!==ve[Kf.fullscreenElement];)r+=s.offsetLeft,o+=s.offsetTop,s=s.offsetParent;return{left:r,top:o,width:e,height:i}}function dp(s,e){const i={x:0,y:0};if(Zi){let S=s;for(;S&&S.nodeName.toLowerCase()!=="html";){const x=uu(S,"transform");if(/^matrix/.test(x)){const D=x.slice(7,-1).split(/,\s/).map(Number);i.x+=D[4],i.y+=D[5]}else if(/^matrix3d/.test(x)){const D=x.slice(9,-1).split(/,\s/).map(Number);i.x+=D[12],i.y+=D[13]}if(S.assignedSlot&&S.assignedSlot.parentElement&&z.WebKitCSSMatrix){const D=z.getComputedStyle(S.assignedSlot.parentElement).transform,k=new z.WebKitCSSMatrix(D);i.x+=k.m41,i.y+=k.m42}S=S.parentNode||S.host}}const r={},o=bd(e.target),l=bd(s),c=l.width,f=l.height;let p=e.offsetY-(l.top-o.top),v=e.offsetX-(l.left-o.left);return e.changedTouches&&(v=e.changedTouches[0].pageX-l.left,p=e.changedTouches[0].pageY+l.top,Zi&&(v-=i.x,p-=i.y)),r.y=1-Math.max(0,Math.min(1,p/f)),r.x=Math.max(0,Math.min(1,v/c)),r}function P_(s){return Ks(s)&&s.nodeType===3}function hp(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function B_(s){return typeof s=="function"&&(s=s()),(Array.isArray(s)?s:[s]).map(e=>{if(typeof e=="function"&&(e=e()),au(e)||P_(e))return e;if(typeof e=="string"&&/\S/.test(e))return ve.createTextNode(e)}).filter(e=>e)}function D0(s,e){return B_(e).forEach(i=>s.appendChild(i)),s}function q_(s,e){return D0(hp(s),e)}function _d(s){return s.button===void 0&&s.buttons===void 0||s.button===0&&s.buttons===void 0||s.type==="mouseup"&&s.button===0&&s.buttons===0||s.type==="mousedown"&&s.button===0&&s.buttons===0?!0:!(s.button!==0||s.buttons!==1)}const La=I_("querySelector"),F_=I_("querySelectorAll");function uu(s,e){if(!s||!e)return"";if(typeof z.getComputedStyle=="function"){let i;try{i=z.getComputedStyle(s)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}function H_(s){[...ve.styleSheets].forEach(e=>{try{const i=[...e.cssRules].map(o=>o.cssText).join(""),r=ve.createElement("style");r.textContent=i,s.document.head.appendChild(r)}catch{const r=ve.createElement("link");r.rel="stylesheet",r.type=e.type,r.media=e.media.mediaText,r.href=e.href,s.document.head.appendChild(r)}})}var V_=Object.freeze({__proto__:null,isReal:ru,isEl:au,isInFrame:O_,createEl:Qe,textContent:Oa,prependTo:M0,hasClass:vd,addClass:No,removeClass:up,toggleClass:L_,setAttributes:R_,getAttributes:Ia,getAttribute:j_,setAttribute:ou,removeAttribute:cp,blockTextSelection:z_,unblockTextSelection:U_,getBoundingClientRect:lu,findPosition:bd,getPointerPosition:dp,isTextNode:P_,emptyEl:hp,normalizeContent:B_,appendContent:D0,insertContent:q_,isSingleLeftClick:_d,$:La,$$:F_,computedStyle:uu,copyStyleSheetsToWindow:H_});let $_=!1,C0;const KN=function(){if(C0.options.autoSetup===!1)return;const s=Array.prototype.slice.call(ve.getElementsByTagName("video")),e=Array.prototype.slice.call(ve.getElementsByTagName("audio")),i=Array.prototype.slice.call(ve.getElementsByTagName("video-js")),r=s.concat(e,i);if(r&&r.length>0)for(let o=0,l=r.length;o<l;o++){const c=r[o];if(c&&c.getAttribute)c.player===void 0&&c.getAttribute("data-setup")!==null&&C0(c);else{A0(1);break}}else $_||A0(1)};function A0(s,e){ru()&&(e&&(C0=e),z.setTimeout(KN,s))}function w0(){$_=!0,z.removeEventListener("load",w0)}ru()&&(ve.readyState==="complete"?w0():z.addEventListener("load",w0));const Y_=function(s){const e=ve.createElement("style");return e.className=s,e},Q_=function(s,e){s.styleSheet?s.styleSheet.cssText=e:s.textContent=e};var cn=new WeakMap;let ZN=3;function ss(){return ZN++}function G_(s,e){if(!cn.has(s))return;const i=cn.get(s);i.handlers[e].length===0&&(delete i.handlers[e],s.removeEventListener?s.removeEventListener(e,i.dispatcher,!1):s.detachEvent&&s.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),Object.getOwnPropertyNames(i).length===0&&cn.delete(s)}function N0(s,e,i,r){i.forEach(function(o){s(e,o,r)})}function fp(s){if(s.fixed_)return s;function e(){return!0}function i(){return!1}if(!s||!s.isPropagationStopped||!s.isImmediatePropagationStopped){const r=s||z.event;s={};const o=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const l in r)o.includes(l)||l==="returnValue"&&r.preventDefault||(s[l]=r[l]);if(s.target||(s.target=s.srcElement||ve),s.relatedTarget||(s.relatedTarget=s.fromElement===s.target?s.toElement:s.fromElement),s.preventDefault=function(){r.preventDefault&&r.preventDefault(),s.returnValue=!1,r.returnValue=!1,s.defaultPrevented=!0},s.defaultPrevented=!1,s.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),s.cancelBubble=!0,r.cancelBubble=!0,s.isPropagationStopped=e},s.isPropagationStopped=i,s.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),s.isImmediatePropagationStopped=e,s.stopPropagation()},s.isImmediatePropagationStopped=i,s.clientX!==null&&s.clientX!==void 0){const l=ve.documentElement,c=ve.body;s.pageX=s.clientX+(l&&l.scrollLeft||c&&c.scrollLeft||0)-(l&&l.clientLeft||c&&c.clientLeft||0),s.pageY=s.clientY+(l&&l.scrollTop||c&&c.scrollTop||0)-(l&&l.clientTop||c&&c.clientTop||0)}s.which=s.charCode||s.keyCode,s.button!==null&&s.button!==void 0&&(s.button=s.button&1?0:s.button&4?1:s.button&2?2:0)}return s.fixed_=!0,s}let pp;const JN=function(){if(typeof pp!="boolean"){pp=!1;try{const s=Object.defineProperty({},"passive",{get(){pp=!0}});z.addEventListener("test",null,s),z.removeEventListener("test",null,s)}catch{}}return pp},ek=["touchstart","touchmove"];function Bn(s,e,i){if(Array.isArray(e))return N0(Bn,s,e,i);cn.has(s)||cn.set(s,{});const r=cn.get(s);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),i.guid||(i.guid=ss()),r.handlers[e].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(o,l){if(r.disabled)return;o=fp(o);const c=r.handlers[o.type];if(c){const f=c.slice(0);for(let p=0,v=f.length;p<v&&!o.isImmediatePropagationStopped();p++)try{f[p].call(s,o,l)}catch(S){ct.error(S)}}}),r.handlers[e].length===1)if(s.addEventListener){let o=!1;JN()&&ek.indexOf(e)>-1&&(o={passive:!0}),s.addEventListener(e,r.dispatcher,o)}else s.attachEvent&&s.attachEvent("on"+e,r.dispatcher)}function Ji(s,e,i){if(!cn.has(s))return;const r=cn.get(s);if(!r.handlers)return;if(Array.isArray(e))return N0(Ji,s,e,i);const o=function(c,f){r.handlers[f]=[],G_(c,f)};if(e===void 0){for(const c in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},c)&&o(s,c);return}const l=r.handlers[e];if(l){if(!i){o(s,e);return}if(i.guid)for(let c=0;c<l.length;c++)l[c].guid===i.guid&&l.splice(c--,1);G_(s,e)}}function cu(s,e,i){const r=cn.has(s)?cn.get(s):{},o=s.parentNode||s.ownerDocument;if(typeof e=="string"?e={type:e,target:s}:e.target||(e.target=s),e=fp(e),r.dispatcher&&r.dispatcher.call(s,e,i),o&&!e.isPropagationStopped()&&e.bubbles===!0)cu.call(null,o,e,i);else if(!o&&!e.defaultPrevented&&e.target&&e.target[e.type]){cn.has(e.target)||cn.set(e.target,{});const l=cn.get(e.target);e.target[e.type]&&(l.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),l.disabled=!1)}return!e.defaultPrevented}function mp(s,e,i){if(Array.isArray(e))return N0(mp,s,e,i);const r=function(){Ji(s,e,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||ss(),Bn(s,e,r)}function k0(s,e,i){const r=function(){Ji(s,e,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||ss(),Bn(s,e,r)}var tk=Object.freeze({__proto__:null,fixEvent:fp,on:Bn,off:Ji,trigger:cu,one:mp,any:k0});const rs=30,Ft=function(s,e,i){e.guid||(e.guid=ss());const r=e.bind(s);return r.guid=i?i+"_"+e.guid:e.guid,r},Js=function(s,e){let i=z.performance.now();return function(...o){const l=z.performance.now();l-i>=e&&(s(...o),i=l)}},X_=function(s,e,i,r=z){let o;const l=()=>{r.clearTimeout(o),o=null},c=function(){const f=this,p=arguments;let v=function(){o=null,v=null,i||s.apply(f,p)};!o&&i&&s.apply(f,p),r.clearTimeout(o),o=r.setTimeout(v,e)};return c.cancel=l,c};var ik=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:rs,bind_:Ft,throttle:Js,debounce:X_});let Sd;class qn{on(e,i){const r=this.addEventListener;this.addEventListener=()=>{},Bn(this,e,i),this.addEventListener=r}off(e,i){Ji(this,e,i)}one(e,i){const r=this.addEventListener;this.addEventListener=()=>{},mp(this,e,i),this.addEventListener=r}any(e,i){const r=this.addEventListener;this.addEventListener=()=>{},k0(this,e,i),this.addEventListener=r}trigger(e){const i=e.type||e;typeof e=="string"&&(e={type:i}),e=fp(e),this.allowedEvents_[i]&&this["on"+i]&&this["on"+i](e),cu(this,e)}queueTrigger(e){Sd||(Sd=new Map);const i=e.type||e;let r=Sd.get(this);r||(r=new Map,Sd.set(this,r));const o=r.get(i);r.delete(i),z.clearTimeout(o);const l=z.setTimeout(()=>{r.delete(i),r.size===0&&(r=null,Sd.delete(this)),this.trigger(e)},0);r.set(i,l)}}qn.prototype.allowedEvents_={},qn.prototype.addEventListener=qn.prototype.on,qn.prototype.removeEventListener=qn.prototype.off,qn.prototype.dispatchEvent=qn.prototype.trigger;const gp=s=>typeof s.name=="function"?s.name():typeof s.name=="string"?s.name:s.name_?s.name_:s.constructor&&s.constructor.name?s.constructor.name:typeof s,Hr=s=>s instanceof qn||!!s.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof s[e]=="function"),nk=(s,e)=>{Hr(s)?e():(s.eventedCallbacks||(s.eventedCallbacks=[]),s.eventedCallbacks.push(e))},O0=s=>typeof s=="string"&&/\S/.test(s)||Array.isArray(s)&&!!s.length,yp=(s,e,i)=>{if(!s||!s.nodeName&&!Hr(s))throw new Error(`Invalid target for ${gp(e)}#${i}; must be a DOM node or evented object.`)},W_=(s,e,i)=>{if(!O0(s))throw new Error(`Invalid event type for ${gp(e)}#${i}; must be a non-empty string or array.`)},K_=(s,e,i)=>{if(typeof s!="function")throw new Error(`Invalid listener for ${gp(e)}#${i}; must be a function.`)},I0=(s,e,i)=>{const r=e.length<3||e[0]===s||e[0]===s.eventBusEl_;let o,l,c;return r?(o=s.eventBusEl_,e.length>=3&&e.shift(),[l,c]=e):(o=e[0],l=e[1],c=e[2]),yp(o,s,i),W_(l,s,i),K_(c,s,i),c=Ft(s,c),{isTargetingSelf:r,target:o,type:l,listener:c}},ko=(s,e,i,r)=>{yp(s,s,e),s.nodeName?tk[e](s,i,r):s[e](i,r)},sk={on(...s){const{isTargetingSelf:e,target:i,type:r,listener:o}=I0(this,s,"on");if(ko(i,"on",r,o),!e){const l=()=>this.off(i,r,o);l.guid=o.guid;const c=()=>this.off("dispose",l);c.guid=o.guid,ko(this,"on","dispose",l),ko(i,"on","dispose",c)}},one(...s){const{isTargetingSelf:e,target:i,type:r,listener:o}=I0(this,s,"one");if(e)ko(i,"one",r,o);else{const l=(...c)=>{this.off(i,r,l),o.apply(null,c)};l.guid=o.guid,ko(i,"one",r,l)}},any(...s){const{isTargetingSelf:e,target:i,type:r,listener:o}=I0(this,s,"any");if(e)ko(i,"any",r,o);else{const l=(...c)=>{this.off(i,r,l),o.apply(null,c)};l.guid=o.guid,ko(i,"any",r,l)}},off(s,e,i){if(!s||O0(s))Ji(this.eventBusEl_,s,e);else{const r=s,o=e;yp(r,this,"off"),W_(o,this,"off"),K_(i,this,"off"),i=Ft(this,i),this.off("dispose",i),r.nodeName?(Ji(r,o,i),Ji(r,"dispose",i)):Hr(r)&&(r.off(o,i),r.off("dispose",i))}},trigger(s,e){yp(this.eventBusEl_,this,"trigger");const i=s&&typeof s!="string"?s.type:s;if(!O0(i))throw new Error(`Invalid event type for ${gp(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return cu(this.eventBusEl_,s,e)}};function L0(s,e={}){const{eventBusKey:i}=e;if(i){if(!s[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);s.eventBusEl_=s[i]}else s.eventBusEl_=Qe("span",{className:"vjs-event-bus"});return Object.assign(s,sk),s.eventedCallbacks&&s.eventedCallbacks.forEach(r=>{r()}),s.on("dispose",()=>{s.off(),[s,s.el_,s.eventBusEl_].forEach(function(r){r&&cn.has(r)&&cn.delete(r)}),z.setTimeout(()=>{s.eventBusEl_=null},0)}),s}const rk={state:{},setState(s){typeof s=="function"&&(s=s());let e;return tu(s,(i,r)=>{this.state[r]!==i&&(e=e||{},e[r]={from:this.state[r],to:i}),this.state[r]=i}),e&&Hr(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function Z_(s,e){return Object.assign(s,rk),s.state=Object.assign({},s.state,e),typeof s.handleStateChanged=="function"&&Hr(s)&&s.on("statechanged",s.handleStateChanged),s}const xd=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toLowerCase())},ti=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},J_=function(s,e){return ti(s)===ti(e)};var ak=Object.freeze({__proto__:null,toLowerCase:xd,toTitleCase:ti,titleCaseEquals:J_});let ce=class Un{constructor(e,i,r){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=It({},this.options_),i=this.options_=It(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){const o=e&&e.id&&e.id()||"no_player";this.id_=`${o}_component_${ss()}`}this.name_=i.name||null,i.el?this.el_=i.el:i.createEl!==!1&&(this.el_=this.createEl()),i.className&&this.el_&&i.className.split(" ").forEach(o=>this.addClass(o)),["on","off","one","any","trigger"].forEach(o=>{this[o]=void 0}),i.evented!==!1&&(L0(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Z_(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,i.initChildren!==!1&&this.initChildren(),this.ready(r),i.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=It(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,i,r){return Qe(e,i,r)}localize(e,i,r=e){const o=this.player_.language&&this.player_.language(),l=this.player_.languages&&this.player_.languages(),c=l&&l[o],f=o&&o.split("-")[0],p=l&&l[f];let v=r;return c&&c[e]?v=c[e]:p&&p[e]&&(v=p[e]),i&&(v=v.replace(/\{(\d+)\}/g,function(S,x){const D=i[x-1];let k=D;return typeof D>"u"&&(k=S),k})),v}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((r,o)=>r.concat(o),[]);let i=this;for(let r=0;r<e.length;r++)if(i=i.getChild(e[r]),!i||!i.getChild)return;return i}setIcon(e,i=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const r="http://www.w3.org/2000/svg",o=Qe("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),l=ve.createElementNS(r,"svg");l.setAttributeNS(null,"viewBox","0 0 512 512");const c=ve.createElementNS(r,"use");return l.appendChild(c),c.setAttributeNS(null,"href",`#vjs-icon-${e}`),o.appendChild(l),this.iconIsSet_?i.replaceChild(o,i.querySelector(".vjs-icon-placeholder")):i.appendChild(o),this.iconIsSet_=!0,o}addChild(e,i={},r=this.children_.length){let o,l;if(typeof e=="string"){l=ti(e);const c=i.componentClass||l;i.name=l;const f=Un.getComponent(c);if(!f)throw new Error(`Component ${c} does not exist`);if(typeof f!="function")return null;o=new f(this.player_||this,i)}else o=e;if(o.parentComponent_&&o.parentComponent_.removeChild(o),this.children_.splice(r,0,o),o.parentComponent_=this,typeof o.id=="function"&&(this.childIndex_[o.id()]=o),l=l||o.name&&ti(o.name()),l&&(this.childNameIndex_[l]=o,this.childNameIndex_[xd(l)]=o),typeof o.el=="function"&&o.el()){let c=null;this.children_[r+1]&&(this.children_[r+1].el_?c=this.children_[r+1].el_:au(this.children_[r+1])&&(c=this.children_[r+1])),this.contentEl().insertBefore(o.el(),c)}return o}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let i=!1;for(let o=this.children_.length-1;o>=0;o--)if(this.children_[o]===e){i=!0,this.children_.splice(o,1);break}if(!i)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[ti(e.name())]=null,this.childNameIndex_[xd(e.name())]=null;const r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const i=this.options_,r=c=>{const f=c.name;let p=c.opts;if(i[f]!==void 0&&(p=i[f]),p===!1)return;p===!0&&(p={}),p.playerOptions=this.options_.playerOptions;const v=this.addChild(f,p);v&&(this[f]=v)};let o;const l=Un.getComponent("Tech");Array.isArray(e)?o=e:o=Object.keys(e),o.concat(Object.keys(this.options_).filter(function(c){return!o.some(function(f){return typeof f=="string"?c===f:c===f.name})})).map(c=>{let f,p;return typeof c=="string"?(f=c,p=e[f]||this.options_[f]||{}):(f=c.name,p=c),{name:f,opts:p}}).filter(c=>{const f=Un.getComponent(c.opts.componentClass||ti(c.name));return f&&!l.isTech(f)}).forEach(r)}}buildCSSClass(){return""}ready(e,i=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}i?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(i){i.call(this)},this),this.trigger("ready")},1)}$(e,i){return La(e,i||this.contentEl())}$$(e,i){return F_(e,i||this.contentEl())}hasClass(e){return vd(this.el_,e)}addClass(...e){No(this.el_,...e)}removeClass(...e){up(this.el_,...e)}toggleClass(e,i){L_(this.el_,e,i)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return j_(this.el_,e)}setAttribute(e,i){ou(this.el_,e,i)}removeAttribute(e){cp(this.el_,e)}width(e,i){return this.dimension("width",e,i)}height(e,i){return this.dimension("height",e,i)}dimensions(e,i){this.width(e,!0),this.height(i)}dimension(e,i,r){if(i!==void 0){(i===null||i!==i)&&(i=0),(""+i).indexOf("%")!==-1||(""+i).indexOf("px")!==-1?this.el_.style[e]=i:i==="auto"?this.el_.style[e]="":this.el_.style[e]=i+"px",r||this.trigger("componentresize");return}if(!this.el_)return 0;const o=this.el_.style[e],l=o.indexOf("px");return parseInt(l!==-1?o.slice(0,l):this.el_["offset"+ti(e)],10)}currentDimension(e){let i=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(i=uu(this.el_,e),i=parseFloat(i),i===0||isNaN(i)){const r=`offset${ti(e)}`;i=this.el_[r]}return i}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect(),i={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},r={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:i,center:r}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,i=null;const r=10,o=200;let l;this.on("touchstart",function(f){f.touches.length===1&&(i={pageX:f.touches[0].pageX,pageY:f.touches[0].pageY},e=z.performance.now(),l=!0)}),this.on("touchmove",function(f){if(f.touches.length>1)l=!1;else if(i){const p=f.touches[0].pageX-i.pageX,v=f.touches[0].pageY-i.pageY;Math.sqrt(p*p+v*v)>r&&(l=!1)}});const c=function(){l=!1};this.on("touchleave",c),this.on("touchcancel",c),this.on("touchend",function(f){i=null,l===!0&&z.performance.now()-e<o&&(f.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Ft(this.player(),this.player().reportUserActivity);let i;this.on("touchstart",function(){e(),this.clearInterval(i),i=this.setInterval(e,250)});const r=function(o){e(),this.clearInterval(i)};this.on("touchmove",e),this.on("touchend",r),this.on("touchcancel",r)}setTimeout(e,i){var r;return e=Ft(this,e),this.clearTimersOnDispose_(),r=z.setTimeout(()=>{this.setTimeoutIds_.has(r)&&this.setTimeoutIds_.delete(r),e()},i),this.setTimeoutIds_.add(r),r}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),z.clearTimeout(e)),e}setInterval(e,i){e=Ft(this,e),this.clearTimersOnDispose_();const r=z.setInterval(e,i);return this.setIntervalIds_.add(r),r}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),z.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=Ft(this,e),i=z.requestAnimationFrame(()=>{this.rafIds_.has(i)&&this.rafIds_.delete(i),e()}),this.rafIds_.add(i),i}requestNamedAnimationFrame(e,i){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),i=Ft(this,i);const r=this.requestAnimationFrame(()=>{i(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,r),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),z.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,i])=>{this[e].forEach((r,o)=>this[i](o))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function i(l){const c=z.getComputedStyle(l,null),f=c.getPropertyValue("visibility");return c.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(f)}function r(l){return!(!i(l.parentElement)||!i(l)||l.style.opacity==="0"||z.getComputedStyle(l).height==="0px"||z.getComputedStyle(l).width==="0px")}function o(l){if(l.offsetWidth+l.offsetHeight+l.getBoundingClientRect().height+l.getBoundingClientRect().width===0)return!1;const c={x:l.getBoundingClientRect().left+l.offsetWidth/2,y:l.getBoundingClientRect().top+l.offsetHeight/2};if(c.x<0||c.x>(ve.documentElement.clientWidth||z.innerWidth)||c.y<0||c.y>(ve.documentElement.clientHeight||z.innerHeight))return!1;let f=ve.elementFromPoint(c.x,c.y);for(;f;){if(f===l)return!0;if(f.parentNode)f=f.parentNode;else return!1}}return e||(e=this.el()),!!(o(e)&&r(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,i){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const r=Un.getComponent("Tech"),o=r&&r.isTech(i),l=Un===i||Un.prototype.isPrototypeOf(i.prototype);if(o||!l){let f;throw o?f="techs must be registered using Tech.registerTech()":f="must be a Component subclass",new Error(`Illegal component, "${e}"; ${f}.`)}e=ti(e),Un.components_||(Un.components_={});const c=Un.getComponent("Player");if(e==="Player"&&c&&c.players){const f=c.players,p=Object.keys(f);if(f&&p.length>0){for(let v=0;v<p.length;v++)if(f[p[v]]!==null)throw new Error("Can not register Player component after player has been created.")}}return Un.components_[e]=i,Un.components_[xd(e)]=i,i}static getComponent(e){if(!(!e||!Un.components_))return Un.components_[e]}};ce.registerComponent("Component",ce);function ok(s,e,i){if(typeof e!="number"||e<0||e>i)throw new Error(`Failed to execute '${s}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${i}).`)}function e2(s,e,i,r){return ok(s,r,i.length-1),i[r][e]}function R0(s){let e;return s===void 0||s.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:s.length,start:e2.bind(null,"start",0,s),end:e2.bind(null,"end",1,s)},z.Symbol&&z.Symbol.iterator&&(e[z.Symbol.iterator]=()=>(s||[]).values()),e}function ws(s,e){return Array.isArray(s)?R0(s):s===void 0||e===void 0?R0():R0([[s,e]])}const t2=function(s,e){s=s<0?0:s;let i=Math.floor(s%60),r=Math.floor(s/60%60),o=Math.floor(s/3600);const l=Math.floor(e/60%60),c=Math.floor(e/3600);return(isNaN(s)||s===1/0)&&(o=r=i="-"),o=o>0||c>0?o+":":"",r=((o||l>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,o+r+i};let j0=t2;function i2(s){j0=s}function n2(){j0=t2}function Oo(s,e=s){return j0(s,e)}var lk=Object.freeze({__proto__:null,createTimeRanges:ws,createTimeRange:ws,setFormatTime:i2,resetFormatTime:n2,formatTime:Oo});function s2(s,e){let i=0,r,o;if(!e)return 0;(!s||!s.length)&&(s=ws(0,0));for(let l=0;l<s.length;l++)r=s.start(l),o=s.end(l),o>e&&(o=e),i+=o-r;return i/e}function Wt(s){if(s instanceof Wt)return s;typeof s=="number"?this.code=s:typeof s=="string"?this.message=s:Ks(s)&&(typeof s.code=="number"&&(this.code=s.code),Object.assign(this,s)),this.message||(this.message=Wt.defaultMessages[this.code]||"")}Wt.prototype.code=0,Wt.prototype.message="",Wt.prototype.status=null,Wt.prototype.metadata=null,Wt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Wt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},Wt.MEDIA_ERR_CUSTOM=0,Wt.prototype.MEDIA_ERR_CUSTOM=0,Wt.MEDIA_ERR_ABORTED=1,Wt.prototype.MEDIA_ERR_ABORTED=1,Wt.MEDIA_ERR_NETWORK=2,Wt.prototype.MEDIA_ERR_NETWORK=2,Wt.MEDIA_ERR_DECODE=3,Wt.prototype.MEDIA_ERR_DECODE=3,Wt.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Wt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Wt.MEDIA_ERR_ENCRYPTED=5,Wt.prototype.MEDIA_ERR_ENCRYPTED=5;function Ed(s){return s!=null&&typeof s.then=="function"}function er(s){Ed(s)&&s.then(null,e=>{})}const z0=function(s){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((i,r,o)=>(s[r]&&(i[r]=s[r]),i),{cues:s.cues&&Array.prototype.map.call(s.cues,function(i){return{startTime:i.startTime,endTime:i.endTime,text:i.text,id:i.id}})})};var U0={textTracksToJson:function(s){const e=s.$$("track"),i=Array.prototype.map.call(e,o=>o.track);return Array.prototype.map.call(e,function(o){const l=z0(o.track);return o.src&&(l.src=o.src),l}).concat(Array.prototype.filter.call(s.textTracks(),function(o){return i.indexOf(o)===-1}).map(z0))},jsonToTextTracks:function(s,e){return s.forEach(function(i){const r=e.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(o=>r.addCue(o))}),e.textTracks()},trackToJson:z0};const P0="vjs-modal-dialog";class du extends ce{constructor(e,i){super(e,i),this.handleKeyDown_=r=>this.handleKeyDown(r),this.close_=r=>this.close(r),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Qe("div",{className:`${P0}-content`},{role:"document"}),this.descEl_=Qe("p",{className:`${P0}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Oa(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${P0} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const i=this.closeable_=!!e;let r=this.getChild("closeButton");if(i&&!r){const o=this.contentEl_;this.contentEl_=this.el_,r=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=o,this.on(r,"close",this.close_)}!i&&r&&(this.off(r,"close",this.close_),this.removeChild(r),r.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const i=this.contentEl(),r=i.parentNode,o=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,r.removeChild(i),this.empty(),q_(i,e),this.trigger("modalfill"),o?r.insertBefore(i,o):r.appendChild(i);const l=this.getChild("closeButton");l&&r.appendChild(l.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),hp(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=ve.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null,(i.contains(e)||i===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;const i=this.focusableEls_(),r=this.el_.querySelector(":focus");let o;for(let l=0;l<i.length;l++)if(r===i[l]){o=l;break}ve.activeElement===this.el_&&(o=0),e.shiftKey&&o===0?(i[i.length-1].focus(),e.preventDefault()):!e.shiftKey&&o===i.length-1&&(i[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,i=>(i instanceof z.HTMLAnchorElement||i instanceof z.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof z.HTMLInputElement||i instanceof z.HTMLSelectElement||i instanceof z.HTMLTextAreaElement||i instanceof z.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof z.HTMLIFrameElement||i instanceof z.HTMLObjectElement||i instanceof z.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable"))}}du.prototype.options_={pauseOnOpen:!0,temporary:!0},ce.registerComponent("ModalDialog",du);class Io extends qn{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let i=0;i<e.length;i++)this.addTrack(e[i])}addTrack(e){const i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.tracks_[i]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Hr(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let i;for(let r=0,o=this.length;r<o;r++)if(this[r]===e){i=this[r],i.off&&i.off(),this.tracks_.splice(r,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})}getTrackById(e){let i=null;for(let r=0,o=this.length;r<o;r++){const l=this[r];if(l.id===e){i=l;break}}return i}}Io.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const s in Io.prototype.allowedEvents_)Io.prototype["on"+s]=null;const B0=function(s,e){for(let i=0;i<s.length;i++)!Object.keys(s[i]).length||e.id===s[i].id||(s[i].enabled=!1)};class r2 extends Io{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){B0(e,e[i]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&B0(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,B0(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const q0=function(s,e){for(let i=0;i<s.length;i++)!Object.keys(s[i]).length||e.id===s[i].id||(s[i].selected=!1)};class a2 extends Io{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){q0(e,e[i]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let i=0;i<this.length;i++)if(this[i].selected)return i;return-1},set(){}})}addTrack(e){e.selected&&q0(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,q0(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class F0 extends Io{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class uk{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let i=0,r=e.length;i<r;i++)this.addTrackElement_(e[i])}addTrackElement_(e){const i=this.trackElements_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.trackElements_[i]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let i;for(let r=0,o=this.trackElements_.length;r<o;r++)if(e===this.trackElements_[r].track){i=this.trackElements_[r];break}return i}removeTrackElement_(e){for(let i=0,r=this.trackElements_.length;i<r;i++)if(e===this.trackElements_[i]){this.trackElements_[i].track&&typeof this.trackElements_[i].track.off=="function"&&this.trackElements_[i].track.off(),typeof this.trackElements_[i].off=="function"&&this.trackElements_[i].off(),this.trackElements_.splice(i,1);break}}}class Tp{constructor(e){Tp.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const i=this.length||0;let r=0;const o=e.length;this.cues_=e,this.length_=e.length;const l=function(c){""+c in this||Object.defineProperty(this,""+c,{get(){return this.cues_[c]}})};if(i<o)for(r=i;r<o;r++)l.call(this,r)}getCueById(e){let i=null;for(let r=0,o=this.length;r<o;r++){const l=this[r];if(l.id===e){i=l;break}}return i}}const ck={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},dk={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},hk={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},o2={disabled:"disabled",hidden:"hidden",showing:"showing"};class H0 extends qn{constructor(e={}){super();const i={id:e.id||"vjs_track_"+ss(),kind:e.kind||"",language:e.language||""};let r=e.label||"";for(const o in i)Object.defineProperty(this,o,{get(){return i[o]},set(){}});Object.defineProperty(this,"label",{get(){return r},set(o){o!==r&&(r=o,this.trigger("labelchange"))}})}}const V0=function(s){return new URL(s,ve.baseURI)},l2=function(s){return new URL(s,ve.baseURI).href},$0=function(s){if(typeof s=="string"){const i=s.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():""}return""},vp=function(s,e=z.location){return V0(s).origin!==e.origin};var fk=Object.freeze({__proto__:null,parseUrl:V0,getAbsoluteURL:l2,getFileExtension:$0,isCrossOrigin:vp});const u2=function(s,e){const i=new z.WebVTT.Parser(z,z.vttjs,z.WebVTT.StringDecoder()),r=[];i.oncue=function(o){e.addCue(o)},i.onparsingerror=function(o){r.push(o)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(s),r.length>0&&(z.console&&z.console.groupCollapsed&&z.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),r.forEach(o=>ct.error(o)),z.console&&z.console.groupEnd&&z.console.groupEnd()),i.flush()},c2=function(s,e){const i={uri:s},r=vp(s);r&&(i.cors=r);const o=e.tech_.crossOrigin()==="use-credentials";o&&(i.withCredentials=o),Vb(i,Ft(this,function(l,c,f){if(l)return ct.error(l,c);e.loaded_=!0,typeof z.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],p=>{if(p.type==="vttjserror"){ct.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return u2(f,e)}):u2(f,e)}))};class Md extends H0{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const i=It(e,{kind:hk[e.kind]||"subtitles",language:e.language||e.srclang||""});let r=o2[i.mode]||"disabled";const o=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(r="hidden"),super(i),this.tech_=i.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const l=new Tp(this.cues_),c=new Tp(this.activeCues_);let f=!1;this.timeupdateHandler=Ft(this,function(v={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){v.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,f&&(this.trigger("cuechange"),f=!1),v.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const p=()=>{this.stopTracking()};this.tech_.one("dispose",p),r!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return o},set(){}},mode:{get(){return r},set(v){o2[v]&&r!==v&&(r=v,!this.preload_&&r!=="disabled"&&this.cues.length===0&&c2(this.src,this),this.stopTracking(),r!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?l:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return c;const v=this.tech_.currentTime(),S=[];for(let x=0,D=this.cues.length;x<D;x++){const k=this.cues[x];k.startTime<=v&&k.endTime>=v&&S.push(k)}if(f=!1,S.length!==this.activeCues_.length)f=!0;else for(let x=0;x<S.length;x++)this.activeCues_.indexOf(S[x])===-1&&(f=!0);return this.activeCues_=S,c.setCues_(this.activeCues_),c},set(){}}}),i.src?(this.src=i.src,this.preload_||(this.loaded_=!0),(this.preload_||i.kind!=="subtitles"&&i.kind!=="captions")&&c2(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let i=e;if(!("getCueAsHTML"in i)){i=new z.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const o in e)o in i||(i[o]=e[o]);i.id=e.id,i.originalCue_=e}const r=this.tech_.textTracks();for(let o=0;o<r.length;o++)r[o]!==this&&r[o].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_)}toJSON(){return U0.trackToJson(this)}removeCue(e){let i=this.cues_.length;for(;i--;){const r=this.cues_[i];if(r===e||r.originalCue_&&r.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}}}Md.prototype.allowedEvents_={cuechange:"cuechange"};class d2 extends H0{constructor(e={}){const i=It(e,{kind:dk[e.kind]||""});super(i);let r=!1;Object.defineProperty(this,"enabled",{get(){return r},set(o){typeof o!="boolean"||o===r||(r=o,this.trigger("enabledchange"))}}),i.enabled&&(this.enabled=i.enabled),this.loaded_=!0}}class h2 extends H0{constructor(e={}){const i=It(e,{kind:ck[e.kind]||""});super(i);let r=!1;Object.defineProperty(this,"selected",{get(){return r},set(o){typeof o!="boolean"||o===r||(r=o,this.trigger("selectedchange"))}}),i.selected&&(this.selected=i.selected)}}class Vr extends qn{constructor(e={}){super();let i;const r=new Md(e);this.kind=r.kind,this.src=r.src,this.srclang=r.language,this.label=r.label,this.default=r.default,Object.defineProperties(this,{readyState:{get(){return i}},track:{get(){return r}}}),i=Vr.NONE,r.addEventListener("loadeddata",()=>{i=Vr.LOADED,this.trigger({type:"load",target:this})})}}Vr.prototype.allowedEvents_={load:"load"},Vr.NONE=0,Vr.LOADING=1,Vr.LOADED=2,Vr.ERROR=3;const as={audio:{ListClass:r2,TrackClass:d2,capitalName:"Audio"},video:{ListClass:a2,TrackClass:h2,capitalName:"Video"},text:{ListClass:F0,TrackClass:Md,capitalName:"Text"}};Object.keys(as).forEach(function(s){as[s].getterName=`${s}Tracks`,as[s].privateName=`${s}Tracks_`});const hu={remoteText:{ListClass:F0,TrackClass:Md,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:uk,TrackClass:Vr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},dn=Object.assign({},as,hu);hu.names=Object.keys(hu),as.names=Object.keys(as),dn.names=[].concat(hu.names).concat(as.names);function pk(s,e,i,r,o={}){const l=s.textTracks();o.kind=e,i&&(o.label=i),r&&(o.language=r),o.tech=s;const c=new dn.text.TrackClass(o);return l.addTrack(c),c}class st extends ce{constructor(e={},i=function(){}){e.reportTouchActivity=!1,super(null,e,i),this.onDurationChange_=r=>this.onDurationChange(r),this.trackProgress_=r=>this.trackProgress(r),this.trackCurrentTime_=r=>this.trackCurrentTime(r),this.stopTrackingCurrentTime_=r=>this.stopTrackingCurrentTime(r),this.disposeSourceHandler_=r=>this.disposeSourceHandler(r),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),dn.names.forEach(r=>{const o=dn[r];e&&e[o.getterName]&&(this[o.privateName]=e[o.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(r=>{e[`native${r}Tracks`]===!1&&(this[`featuresNative${r}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new dn.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ft(this,function(){const i=this.bufferedPercent();this.bufferedPercent_!==i&&this.trigger("progress"),this.bufferedPercent_=i,i===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return ws(0,0)}bufferedPercent(){return s2(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(as.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(i=>{const r=this[`${i}Tracks`]()||[];let o=r.length;for(;o--;){const l=r[o];i==="text"&&this.removeRemoteTextTrack(l),r.removeTrack(l)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let i=e.length;for(;i--;){const r=e[i];this.removeRemoteTextTrack(r)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new Wt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?ws(0,0):ws()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){as.names.forEach(e=>{const i=as[e],r=()=>{this.trigger(`${e}trackchange`)},o=this[i.getterName]();o.addEventListener("removetrack",r),o.addEventListener("addtrack",r),this.on("dispose",()=>{o.removeEventListener("removetrack",r),o.removeEventListener("addtrack",r)})})}addWebVttScript_(){if(!z.WebVTT)if(ve.body.contains(this.el())){if(!this.options_["vtt.js"]&&iu(Zb)&&Object.keys(Zb).length>0){this.trigger("vttjsloaded");return}const e=ve.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),z.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),i=this.remoteTextTracks(),r=f=>e.addTrack(f.track),o=f=>e.removeTrack(f.track);i.on("addtrack",r),i.on("removetrack",o),this.addWebVttScript_();const l=()=>this.trigger("texttrackchange"),c=()=>{l();for(let f=0;f<e.length;f++){const p=e[f];p.removeEventListener("cuechange",l),p.mode==="showing"&&p.addEventListener("cuechange",l)}};c(),e.addEventListener("change",c),e.addEventListener("addtrack",c),e.addEventListener("removetrack",c),this.on("dispose",function(){i.off("addtrack",r),i.off("removetrack",o),e.removeEventListener("change",c),e.removeEventListener("addtrack",c),e.removeEventListener("removetrack",c);for(let f=0;f<e.length;f++)e[f].removeEventListener("cuechange",l)})}addTextTrack(e,i,r){if(!e)throw new Error("TextTrack kind is required but was not provided");return pk(this,e,i,r)}createRemoteTextTrack(e){const i=It(e,{tech:this});return new hu.remoteTextEl.TrackClass(i)}addRemoteTextTrack(e={},i){const r=this.createRemoteTextTrack(e);return typeof i!="boolean"&&(i=!1),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),i===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(r.track)),r}removeRemoteTextTrack(e){const i=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(i),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const i=ss();return!this.isReady_||this.paused()?(this.queuedHanders_.add(i),this.one("playing",()=>{this.queuedHanders_.has(i)&&(this.queuedHanders_.delete(i),e())})):this.requestNamedAnimationFrame(i,e),i}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,i){return st.canPlayType(e.type)}static isTech(e){return e.prototype instanceof st||e instanceof st||e===st}static registerTech(e,i){if(st.techs_||(st.techs_={}),!st.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!st.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!st.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=ti(e),st.techs_[e]=i,st.techs_[xd(e)]=i,e!=="Tech"&&st.defaultTechOrder_.push(e),i}static getTech(e){if(e){if(st.techs_&&st.techs_[e])return st.techs_[e];if(e=ti(e),z&&z.videojs&&z.videojs[e])return ct.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),z.videojs[e]}}}dn.names.forEach(function(s){const e=dn[s];st.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),st.prototype.featuresVolumeControl=!0,st.prototype.featuresMuteControl=!0,st.prototype.featuresFullscreenResize=!1,st.prototype.featuresPlaybackRate=!1,st.prototype.featuresProgressEvents=!1,st.prototype.featuresSourceset=!1,st.prototype.featuresTimeupdateEvents=!1,st.prototype.featuresNativeTextTracks=!1,st.prototype.featuresVideoFrameCallback=!1,st.withSourceHandlers=function(s){s.registerSourceHandler=function(i,r){let o=s.sourceHandlers;o||(o=s.sourceHandlers=[]),r===void 0&&(r=o.length),o.splice(r,0,i)},s.canPlayType=function(i){const r=s.sourceHandlers||[];let o;for(let l=0;l<r.length;l++)if(o=r[l].canPlayType(i),o)return o;return""},s.selectSourceHandler=function(i,r){const o=s.sourceHandlers||[];let l;for(let c=0;c<o.length;c++)if(l=o[c].canHandleSource(i,r),l)return o[c];return null},s.canPlaySource=function(i,r){const o=s.selectSourceHandler(i,r);return o?o.canHandleSource(i,r):""},["seekable","seeking","duration"].forEach(function(i){const r=this[i];typeof r=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):r.apply(this,arguments)})},s.prototype),s.prototype.setSource=function(i){let r=s.selectSourceHandler(i,this.options_);r||(s.nativeSourceHandler?r=s.nativeSourceHandler:ct.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),r!==s.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=r.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},s.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},ce.registerComponent("Tech",st),st.registerTech("Tech",st),st.defaultTechOrder_=[];const Lo={},bp={},_p={};function mk(s,e){Lo[s]=Lo[s]||[],Lo[s].push(e)}function gk(s,e,i){s.setTimeout(()=>Ro(e,Lo[e.type],i,s),1)}function yk(s,e){s.forEach(i=>i.setTech&&i.setTech(e))}function Tk(s,e,i){return s.reduceRight(Y0(i),e[i]())}function vk(s,e,i,r){return e[i](s.reduce(Y0(i),r))}function f2(s,e,i,r=null){const o="call"+ti(i),l=s.reduce(Y0(o),r),c=l===_p,f=c?null:e[i](l);return Sk(s,i,f,c),f}const bk={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},_k={setCurrentTime:1,setMuted:1,setVolume:1},p2={play:1,pause:1};function Y0(s){return(e,i)=>e===_p?_p:i[s]?i[s](e):e}function Sk(s,e,i,r){for(let o=s.length-1;o>=0;o--){const l=s[o];l[e]&&l[e](r,i)}}function xk(s){bp.hasOwnProperty(s.id())&&delete bp[s.id()]}function Ek(s,e){const i=bp[s.id()];let r=null;if(i==null)return r=e(s),bp[s.id()]=[[e,r]],r;for(let o=0;o<i.length;o++){const[l,c]=i[o];l===e&&(r=c)}return r===null&&(r=e(s),i.push([e,r])),r}function Ro(s={},e=[],i,r,o=[],l=!1){const[c,...f]=e;if(typeof c=="string")Ro(s,Lo[c],i,r,o,l);else if(c){const p=Ek(r,c);if(!p.setSource)return o.push(p),Ro(s,f,i,r,o,l);p.setSource(Object.assign({},s),function(v,S){if(v)return Ro(s,f,i,r,o,l);o.push(p),Ro(S,s.type===S.type?f:Lo[S.type],i,r,o,l)})}else f.length?Ro(s,f,i,r,o,l):l?i(s,o):Ro(s,Lo["*"],i,r,o,!0)}const Mk={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Sp=function(s=""){const e=$0(s);return Mk[e.toLowerCase()]||""},Dk=(s,e)=>{if(!e)return"";if(s.cache_.source.src===e&&s.cache_.source.type)return s.cache_.source.type;const i=s.cache_.sources.filter(o=>o.src===e);if(i.length)return i[0].type;const r=s.$$("source");for(let o=0;o<r.length;o++){const l=r[o];if(l.type&&l.src&&l.src===e)return l.type}return Sp(e)},m2=function(s){if(Array.isArray(s)){let e=[];s.forEach(function(i){i=m2(i),Array.isArray(i)?e=e.concat(i):Ks(i)&&e.push(i)}),s=e}else typeof s=="string"&&s.trim()?s=[g2({src:s})]:Ks(s)&&typeof s.src=="string"&&s.src&&s.src.trim()?s=[g2(s)]:s=[];return s};function g2(s){if(!s.type){const e=Sp(s.src);e&&(s.type=e)}return s}var Ck=`<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<symbol viewBox="0 0 48 48" id="vjs-icon-play">
<path d="M16 10v28l22-14z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-pause">
<path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-audio">
<path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-captions">
<path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
<path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
<path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
<path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
<path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
<path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
<path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
<path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
<path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
<path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
</symbol>
<symbol viewBox="0 0 24 24" id="vjs-icon-hd">
<path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
<path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
</symbol>
<symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
<path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
<path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
<path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
<path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-share">
<path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cog">
<path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-square">
<path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle">
<circle cx="24" cy="24" r="20"></circle>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
<path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-replay">
<path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
<path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
<path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
<path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
<path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
<path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
<path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
<path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
</symbol>
<symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
<g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
<path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
<path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
<path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cast">
<path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
<path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
</symbol>
<symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
<path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
<path fill="none" d="M-1-3h24v24H-1z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
<path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
<path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
</symbol>
<symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
<path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
<path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
</symbol>
</defs>
</svg>`;const y2=rp?10009:ap?461:8,fu={codes:{play:415,pause:19,ff:417,rw:412,back:y2},names:{415:"play",19:"pause",417:"ff",412:"rw",[y2]:"back"},isEventKey(s,e){return e=e.toLowerCase(),!!(this.names[s.keyCode]&&this.names[s.keyCode]===e)},getEventName(s){if(this.names[s.keyCode])return this.names[s.keyCode];if(this.codes[s.code]){const e=this.codes[s.code];return this.names[e]}return null}},T2=5;class Ak extends qn{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const i=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i.key)){if(this.isPaused_)return;i.preventDefault();const r=i.key.substring(5).toLowerCase();this.move(r)}else if(fu.isEventKey(i,"play")||fu.isEventKey(i,"pause")||fu.isEventKey(i,"ff")||fu.isEventKey(i,"rw")){i.preventDefault();const r=fu.getEventName(i);this.performMediaAction_(r)}else fu.isEventKey(i,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(i.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+T2);break;case"rw":this.userSeek_(this.player_.currentTime()-T2);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const i=e.relatedTarget;let r=null;const o=this.getCurrentComponent(e.target);i&&(r=!!i.closest(".video-js"),i.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!r||!i)&&(o&&o.name()==="CloseButton"?this.refocusComponent():(this.pause(),o&&o.el()&&(this.lastFocusedComponent_=o)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,i=[];function r(o){for(const l of o)l.hasOwnProperty("el_")&&l.getIsFocusable()&&l.getIsAvailableToBeFocused(l.el())&&i.push(l),l.hasOwnProperty("children_")&&l.children_.length>0&&r(l.children_)}return e.children_.forEach(o=>{if(o.hasOwnProperty("el_"))if(o.getIsFocusable&&o.getIsAvailableToBeFocused&&o.getIsFocusable()&&o.getIsAvailableToBeFocused(o.el())){i.push(o);return}else o.hasOwnProperty("children_")&&o.children_.length>0?r(o.children_):o.hasOwnProperty("items")&&o.items.length>0?r(o.items):this.findSuitableDOMChild(o)&&i.push(o);if(o.name_==="ErrorDisplay"&&o.opened_){const l=o.el_.querySelector(".vjs-errors-ok-button-container");l&&l.querySelectorAll("button").forEach((f,p)=>{i.push({name:()=>"ModalButton"+(p+1),el:()=>f,getPositions:()=>{const v=f.getBoundingClientRect(),S={x:v.x,y:v.y,width:v.width,height:v.height,top:v.top,right:v.right,bottom:v.bottom,left:v.left},x={x:v.left+v.width/2,y:v.top+v.height/2,width:0,height:0,top:v.top+v.height/2,right:v.left+v.width/2,bottom:v.top+v.height/2,left:v.left+v.width/2};return{boundingClientRect:S,center:x}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:v=>!0,focus:()=>f.focus()})})}}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){function i(r){if(e.getIsFocusable(r)&&e.getIsAvailableToBeFocused(r))return r;for(let o=0;o<r.children.length;o++){const l=r.children[o],c=i(l);if(c)return c}return null}return e.el()?i(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const i=e||document.activeElement;if(this.focusableComponents.length){for(const r of this.focusableComponents)if(r.el()===i)return r}}add(e){const i=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&i.push(e),this.focusableComponents=i,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let i=0;i<this.focusableComponents.length;i++)if(this.focusableComponents[i].name()===e.name()){this.focusableComponents.splice(i,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const i=this.getCurrentComponent();if(!i)return;const r=i.getPositions(),o=this.focusableComponents.filter(c=>c!==i&&this.isInDirection_(r.boundingClientRect,c.getPositions().boundingClientRect,e)),l=this.findBestCandidate_(r.center,o,e);l?this.focus(l):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:i})}findBestCandidate_(e,i,r){let o=1/0,l=null;for(const c of i){const f=c.getPositions().center,p=this.calculateDistance_(e,f,r);p<o&&(o=p,l=c)}return l}isInDirection_(e,i,r){switch(r){case"right":return i.left>=e.right;case"left":return i.right<=e.left;case"down":return i.top>=e.bottom;case"up":return i.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,i,r){const o=Math.abs(e.x-i.x),l=Math.abs(e.y-i.y);let c;switch(r){case"right":case"left":c=o+l*100;break;case"up":c=l*2+o*.5;break;case"down":c=l*5+o;break;default:c=o+l}return c}searchForTrackSelect_(){const e=this;for(const i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break}}}class wk extends ce{constructor(e,i,r){const o=It({createEl:!1},i);if(super(e,o,r),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let l=0,c=i.playerOptions.techOrder;l<c.length;l++){const f=ti(c[l]);let p=st.getTech(f);if(f||(p=ce.getComponent(f)),p&&p.isSupported()){e.loadTech_(f);break}}else e.src(i.playerOptions.sources)}}ce.registerComponent("MediaLoader",wk);class xp extends ce{constructor(e,i){super(e,i),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=r=>this.handleMouseOver(r),this.handleMouseOut_=r=>this.handleMouseOut(r),this.handleClick_=r=>this.handleClick(r),this.handleKeyDown_=r=>this.handleKeyDown(r),this.emitTapEvents(),this.enable()}createEl(e="div",i={},r={}){i=Object.assign({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&ct.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),r=Object.assign({role:"button"},r),this.tabIndex_=i.tabIndex;const o=Qe(e,i,r);return this.player_.options_.experimentalSvgIcons||o.appendChild(Qe("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Qe("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,i=this.el()){if(e===void 0)return this.controlText_||"Need Text";const r=this.localize(e);this.controlText_=e,Oa(this.controlTextEl_,r),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",r)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ce.registerComponent("ClickableComponent",xp);class Q0 extends xp{constructor(e,i){super(e,i),this.update(),this.update_=r=>this.update(r),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Qe("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const i=this.player().poster();this.setSrc(i),i?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Qe("picture",{className:"vjs-poster",tabIndex:-1},{},Qe("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?er(this.player_.play()):this.player_.pause())}}Q0.prototype.crossorigin=Q0.prototype.crossOrigin,ce.registerComponent("PosterImage",Q0);const os="#222",v2="#ccc",Nk={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function G0(s,e){let i;if(s.length===4)i=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else if(s.length===7)i=s.slice(1);else throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function tr(s,e,i){try{s.style[e]=i}catch{return}}function b2(s){return s?`${s}px`:""}class kk extends ce{constructor(e,i,r){super(e,i,r);const o=c=>this.updateDisplay(c),l=c=>{this.updateDisplayOverlay(),this.updateDisplay(c)};e.on("loadstart",c=>this.toggleDisplay(c)),e.on("useractive",o),e.on("userinactive",o),e.on("texttrackchange",o),e.on("loadedmetadata",c=>{this.updateDisplayOverlay(),this.preselectTrack(c)}),e.ready(Ft(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",l),e.on("playerresize",l);const c=z.screen.orientation||z,f=z.screen.orientation?"change":"orientationchange";c.addEventListener(f,l),e.on("dispose",()=>c.removeEventListener(f,l));const p=this.options_.playerOptions.tracks||[];for(let v=0;v<p.length;v++)this.player_.addRemoteTextTrack(p[v],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},i=this.player_.textTracks(),r=this.player_.cache_.selectedLanguage;let o,l,c;for(let f=0;f<i.length;f++){const p=i[f];r&&r.enabled&&r.language&&r.language===p.language&&p.kind in e?p.kind===r.kind?c=p:c||(c=p):r&&!r.enabled?(c=null,o=null,l=null):p.default&&(p.kind==="descriptions"&&!o?o=p:p.kind in e&&!l&&(l=p))}c?c.mode="showing":l?l.mode="showing":o&&(o.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof z.WebVTT=="function"&&z.WebVTT.processCues(z,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),i=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),i){const c=[];for(let f=0;f<e.length;++f){const p=e[f];p.mode==="showing"&&c.push(p)}this.updateForTrack(c);return}let r=null,o=null,l=e.length;for(;l--;){const c=e[l];c.mode==="showing"&&(c.kind==="descriptions"?r=c:o=c)}if(o?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(o)):r&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(r)),!z.CSS.supports("inset","10px")){const c=this.el_,f=c.querySelectorAll(".vjs-text-track-cue"),p=this.player_.controlBar.el_.getBoundingClientRect().height,v=this.player_.el_.getBoundingClientRect().height;c.style="",tr(c,"position","relative"),tr(c,"height",v-p+"px"),tr(c,"top","unset"),op?tr(c,"bottom",v+"px"):tr(c,"bottom","0px"),f.length>0&&f.forEach(S=>{if(S.style.inset){const x=S.style.inset.split(" ");x.length===3&&Object.assign(S.style,{top:x[0],right:x[1],bottom:x[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!z.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),i=this.player_.currentHeight(),r=e/i,o=this.player_.videoWidth()/this.player_.videoHeight();let l=0,c=0;Math.abs(r-o)>.1&&(r>o?l=Math.round((e-i*o)/2):c=Math.round((i-e/o)/2)),tr(this.el_,"insetInline",b2(l)),tr(this.el_,"insetBlock",b2(c))}updateDisplayState(e){const i=this.player_.textTrackSettings.getValues(),r=e.activeCues;let o=r.length;for(;o--;){const l=r[o];if(!l)continue;const c=l.displayState;if(i.color&&(c.firstChild.style.color=i.color),i.textOpacity&&tr(c.firstChild,"color",G0(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(c.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&tr(c.firstChild,"backgroundColor",G0(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?tr(c,"backgroundColor",G0(i.windowColor,i.windowOpacity)):c.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?c.firstChild.style.textShadow=`2px 2px 3px ${os}, 2px 2px 4px ${os}, 2px 2px 5px ${os}`:i.edgeStyle==="raised"?c.firstChild.style.textShadow=`1px 1px ${os}, 2px 2px ${os}, 3px 3px ${os}`:i.edgeStyle==="depressed"?c.firstChild.style.textShadow=`1px 1px ${v2}, 0 1px ${v2}, -1px -1px ${os}, 0 -1px ${os}`:i.edgeStyle==="uniform"&&(c.firstChild.style.textShadow=`0 0 4px ${os}, 0 0 4px ${os}, 0 0 4px ${os}, 0 0 4px ${os}`)),i.fontPercent&&i.fontPercent!==1){const f=z.parseFloat(c.style.fontSize);c.style.fontSize=f*i.fontPercent+"px",c.style.height="auto",c.style.top="auto"}i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?c.firstChild.style.fontVariant="small-caps":c.firstChild.style.fontFamily=Nk[i.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof z.WebVTT!="function"||e.every(r=>!r.activeCues))return;const i=[];for(let r=0;r<e.length;++r){const o=e[r];for(let l=0;l<o.activeCues.length;++l)i.push(o.activeCues[l])}z.WebVTT.processCues(z,i,this.el_);for(let r=0;r<e.length;++r){const o=e[r];for(let l=0;l<o.activeCues.length;++l){const c=o.activeCues[l].displayState;No(c,"vjs-text-track-cue","vjs-text-track-cue-"+(o.language?o.language:r)),o.language&&ou(c,"lang",o.language)}this.player_.textTrackSettings&&this.updateDisplayState(o)}}}ce.registerComponent("TextTrackDisplay",kk);class Ok extends ce{createEl(){const e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),r=Qe("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),o=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return o.appendChild(r),o}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}ce.registerComponent("LoadingSpinner",Ok);let en=class extends xp{createEl(e,i={},r={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),r=Object.assign({type:"button"},r);const o=Qe(e,i,r);return this.player_.options_.experimentalSvgIcons||o.appendChild(Qe("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}addChild(e,i={}){const r=this.constructor.name;return ct.warn(`Adding an actionable (user controllable) child to a Button (${r}) is not supported; use a ClickableComponent instead.`),ce.prototype.addChild.call(this,e,i)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}};ce.registerComponent("Button",en);class _2 extends en{constructor(e,i){super(e,i),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",r=>this.handleMouseDown(r))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const i=this.player_.play();if(e.type==="tap"||this.mouseused_&&"clientX"in e&&"clientY"in e){er(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const r=this.player_.getChild("controlBar"),o=r&&r.getChild("playToggle");if(!o){this.player_.tech(!0).focus();return}const l=()=>o.focus();Ed(i)?i.then(l,()=>{}):this.setTimeout(l,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}_2.prototype.controlText_="Play Video",ce.registerComponent("BigPlayButton",_2);class Ik extends en{constructor(e,i){super(e,i),this.setIcon("cancel"),this.controlText(i&&i.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ce.registerComponent("CloseButton",Ik);class S2 extends en{constructor(e,i={}){super(e,i),i.replay=i.replay===void 0||i.replay,this.setIcon("play"),this.on(e,"play",r=>this.handlePlay(r)),this.on(e,"pause",r=>this.handlePause(r)),i.replay&&this.on(e,"ended",r=>this.handleEnded(r))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?er(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",i=>this.handleSeeked(i))}}S2.prototype.controlText_="Play",ce.registerComponent("PlayToggle",S2);class pu extends ce{constructor(e,i){super(e,i),this.on(e,["timeupdate","ended","seeking"],r=>this.update(r)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),i=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),r=Qe("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return i.appendChild(r),this.contentEl_=Qe("span",{className:`${e}-display`},{role:"presentation"}),i.appendChild(this.contentEl_),i}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=Oo(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let i=this.textNode_;i&&this.contentEl_.firstChild!==i&&(i=null,ct.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=ve.createTextNode(this.formattedTime_),this.textNode_&&(i?this.contentEl_.replaceChild(this.textNode_,i):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}pu.prototype.labelText_="Time",pu.prototype.controlText_="Time",ce.registerComponent("TimeDisplay",pu);class X0 extends pu{buildCSSClass(){return"vjs-current-time"}updateContent(e){let i;this.player_.ended()?i=this.player_.duration():e&&e.target&&typeof e.target.pendingSeekTime=="function"?i=e.target.pendingSeekTime():i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i)}}X0.prototype.labelText_="Current Time",X0.prototype.controlText_="Current Time",ce.registerComponent("CurrentTimeDisplay",X0);class W0 extends pu{constructor(e,i){super(e,i);const r=o=>this.updateContent(o);this.on(e,"durationchange",r),this.on(e,"loadstart",r),this.on(e,"loadedmetadata",r)}buildCSSClass(){return"vjs-duration"}updateContent(e){const i=this.player_.duration();this.updateTextNode_(i)}}W0.prototype.labelText_="Duration",W0.prototype.controlText_="Duration",ce.registerComponent("DurationDisplay",W0);class Lk extends ce{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=super.createEl("div"),r=super.createEl("span",{textContent:"/"});return i.appendChild(r),e.appendChild(i),e}}ce.registerComponent("TimeDivider",Lk);class K0 extends pu{constructor(e,i){super(e,i),this.on(e,"durationchange",r=>this.updateContent(r))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Qe("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let i;this.player_.ended()?i=0:this.player_.remainingTimeDisplay?i=this.player_.remainingTimeDisplay():i=this.player_.remainingTime(),this.updateTextNode_(i)}}K0.prototype.labelText_="Remaining Time",K0.prototype.controlText_="Remaining Time",ce.registerComponent("RemainingTimeDisplay",K0);class Rk extends ce{constructor(e,i){super(e,i),this.updateShowing(),this.on(this.player(),"durationchange",r=>this.updateShowing(r))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Qe("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Qe("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(ve.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}ce.registerComponent("LiveDisplay",Rk);class x2 extends en{constructor(e,i){super(e,i),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=r=>this.updateLiveEdgeStatus(r),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Qe("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}x2.prototype.controlText_="Seek to live, currently playing live",ce.registerComponent("SeekToLive",x2);function Dd(s,e,i){return s=Number(s),Math.min(i,Math.max(e,isNaN(s)?e:s))}var jk=Object.freeze({__proto__:null,clamp:Dd});class Z0 extends ce{constructor(e,i){super(e,i),this.handleMouseDown_=r=>this.handleMouseDown(r),this.handleMouseUp_=r=>this.handleMouseUp(r),this.handleKeyDown_=r=>this.handleKeyDown(r),this.handleClick_=r=>this.handleClick(r),this.handleMouseMove_=r=>this.handleMouseMove(r),this.update_=r=>this.update(r),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,i={},r={}){return i.className=i.className+" vjs-slider",i=Object.assign({tabIndex:0},i),r=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},r),super.createEl(e,i,r)}handleMouseDown(e){const i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!Zs&&e.preventDefault(),z_(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove_),this.on(i,"mouseup",this.handleMouseUp_),this.on(i,"touchmove",this.handleMouseMove_),this.on(i,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const i=this.bar.el_.ownerDocument;U_(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(i,"mousemove",this.handleMouseMove_),this.off(i,"mouseup",this.handleMouseUp_),this.off(i,"touchmove",this.handleMouseMove_),this.off(i,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const i=this.vertical()?"height":"width";this.bar.el().style[i]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(Dd(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const i=dp(this.el_,e);return this.vertical()?i.y:i.x}handleKeyDown(e){const i=this.options_.playerOptions.spatialNavigation,r=i&&i.enabled,o=i&&i.horizontalSeek;r?o&&e.key==="ArrowLeft"||!o&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):o&&e.key==="ArrowRight"||!o&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}ce.registerComponent("Slider",Z0);const J0=(s,e)=>Dd(s/e*100,0,100).toFixed(2)+"%";class zk extends ce{constructor(e,i){super(e,i),this.partEls_=[],this.on(e,"progress",r=>this.update(r))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),i=Qe("span",{className:"vjs-control-text"}),r=Qe("span",{textContent:this.localize("Loaded")}),o=ve.createTextNode(": ");return this.percentageEl_=Qe("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(r),i.appendChild(o),i.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const i=this.player_.liveTracker,r=this.player_.buffered(),o=i&&i.isLive()?i.seekableEnd():this.player_.duration(),l=this.player_.bufferedEnd(),c=this.partEls_,f=J0(l,o);this.percent_!==f&&(this.el_.style.width=f,Oa(this.percentageEl_,f),this.percent_=f);for(let p=0;p<r.length;p++){const v=r.start(p),S=r.end(p);let x=c[p];x||(x=this.el_.appendChild(Qe()),c[p]=x),!(x.dataset.start===v&&x.dataset.end===S)&&(x.dataset.start=v,x.dataset.end=S,x.style.left=J0(v,l),x.style.width=J0(S-v,l))}for(let p=c.length;p>r.length;p--)this.el_.removeChild(c[p-1]);c.length=r.length})}}ce.registerComponent("LoadProgressBar",zk);class Uk extends ce{constructor(e,i){super(e,i),this.update=Js(Ft(this,this.update),rs)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,i,r){const o=bd(this.el_),l=lu(this.player_.el()),c=e.width*i;if(!l||!o)return;let f=e.left-l.left+c,p=e.width-c+(l.right-e.right);p||(p=e.width-c,f=c);let v=o.width/2;f<v?v+=v-f:p<v&&(v=p),v<0?v=0:v>o.width&&(v=o.width),v=Math.round(v),this.el_.style.right=`-${v}px`,this.write(r)}write(e){Oa(this.el_,e)}updateTime(e,i,r,o){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let l;const c=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const f=this.player_.liveTracker.liveWindow(),p=f-i*f;l=(p<1?"":"-")+Oo(p,f)}else l=Oo(r,c);this.update(e,i,l),o&&o()})}}ce.registerComponent("TimeTooltip",Uk);class ey extends ce{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=Js(Ft(this,this.update),rs)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,i,r){const o=this.getChild("timeTooltip");if(!o)return;const l=r&&r.target&&typeof r.target.pendingSeekTime=="function"?r.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();o.updateTime(e,i,l)}}ey.prototype.options_={children:[]},!Zi&&!As&&ey.prototype.options_.children.push("timeTooltip"),ce.registerComponent("PlayProgressBar",ey);class E2 extends ce{constructor(e,i){super(e,i),this.update=Js(Ft(this,this.update),rs)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i){const r=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,r,()=>{this.el_.style.left=`${e.width*i}px`})}}E2.prototype.options_={children:["timeTooltip"]},ce.registerComponent("MouseTimeDisplay",E2);class Ep extends Z0{constructor(e,i){i=It(Ep.prototype.options_,i),i.children=[...i.children];const r=e.options_.disableSeekWhileScrubbingOnMobile&&(Zi||As)||e.options_.disableSeekWhileScrubbingOnSTV;(!Zi&&!As||r)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=r,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Ft(this,this.update),this.update=Js(this.update_,rs),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in ve&&"visibilityState"in ve&&this.on(ve,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){ve.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,rs))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(ve.visibilityState==="hidden")return;const i=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const r=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),o=this.player_.liveTracker;let l=this.player_.duration();o&&o.isLive()&&(l=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==r||this.duration_!==l)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Oo(r,l),Oo(l,l)],"{1} of {2}")),this.currentTime_=r,this.duration_=l),this.bar&&this.bar.update(lu(this.el()),this.getProgress(),e)}),i}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(e!==void 0)if(e!==null){const i=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,i))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let i;const r=this.player_.liveTracker;return r&&r.isLive()?(i=(e-r.seekableStart())/r.liveWindow(),r.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i}handleMouseDown(e){_d(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,i=!1){if(!_d(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let r;const o=this.calculateDistance(e),l=this.player_.liveTracker;if(!l||!l.isLive())r=o*this.player_.duration(),r===this.player_.duration()&&(r=r-.1);else{if(o>=.99){l.seekToLiveEdge();return}const c=l.seekableStart(),f=l.liveCurrentTime();if(r=c+o*l.liveWindow(),r>=f&&(r=f),r<=c&&(r=c+.1),r===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(r):this.userSeek_(r),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?er(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const i=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(i+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const i=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const r=parseInt(e.key,10)*.1;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in ve&&"visibilityState"in ve&&this.off(ve,"visibilitychange",this.toggleVisibility_),super.dispose()}}Ep.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},ce.registerComponent("SeekBar",Ep);class M2 extends ce{constructor(e,i){super(e,i),this.handleMouseMove=Js(Ft(this,this.handleMouseMove),rs),this.throttledHandleMouseSeek=Js(Ft(this,this.handleMouseSeek),rs),this.handleMouseUpHandler_=r=>this.handleMouseUp(r),this.handleMouseDownHandler_=r=>this.handleMouseDown(r),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const i=this.getChild("seekBar");if(!i)return;const r=i.getChild("playProgressBar"),o=i.getChild("mouseTimeDisplay");if(!r&&!o)return;const l=i.el(),c=bd(l);let f=dp(l,e).x;f=Dd(f,0,1),o&&o.update(c,f),r&&r.update(c,i.getProgress())}handleMouseSeek(e){const i=this.getChild("seekBar");i&&i.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&er(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const i=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}M2.prototype.options_={children:["seekBar"]},ce.registerComponent("ProgressControl",M2);class D2 extends en{constructor(e,i){super(e,i),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],r=>this.handlePictureInPictureChange(r)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],r=>this.handlePictureInPictureEnabledChange(r)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){ve.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in z?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof ve.exitPictureInPicture=="function"&&super.show()}}D2.prototype.controlText_="Picture-in-Picture",ce.registerComponent("PictureInPictureToggle",D2);class C2 extends en{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",r=>this.handleFullscreenChange(r)),ve[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}C2.prototype.controlText_="Fullscreen",ce.registerComponent("FullscreenToggle",C2);const Pk=function(s,e){e.tech_&&!e.tech_.featuresVolumeControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class Bk extends ce{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}ce.registerComponent("VolumeLevel",Bk);class qk extends ce{constructor(e,i){super(e,i),this.update=Js(Ft(this,this.update),rs)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,i,r,o){if(!r){const l=lu(this.el_),c=lu(this.player_.el()),f=e.width*i;if(!c||!l)return;const p=e.left-c.left+f,v=e.width-f+(c.right-e.right);let S=l.width/2;p<S?S+=S-p:v<S&&(S=v),S<0?S=0:S>l.width&&(S=l.width),this.el_.style.right=`-${S}px`}this.write(`${o}%`)}write(e){Oa(this.el_,e)}updateVolume(e,i,r,o,l){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,r,o.toFixed(0)),l&&l()})}}ce.registerComponent("VolumeLevelTooltip",qk);class A2 extends ce{constructor(e,i){super(e,i),this.update=Js(Ft(this,this.update),rs)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i,r){const o=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,r,o,()=>{r?this.el_.style.bottom=`${e.height*i}px`:this.el_.style.left=`${e.width*i}px`})}}A2.prototype.options_={children:["volumeLevelTooltip"]},ce.registerComponent("MouseVolumeLevelDisplay",A2);class Mp extends Z0{constructor(e,i){super(e,i),this.on("slideractive",r=>this.updateLastVolume_(r)),this.on(e,"volumechange",r=>this.updateARIAAttributes(r)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){_d(e)&&super.handleMouseDown(e)}handleMouseMove(e){const i=this.getChild("mouseVolumeLevelDisplay");if(i){const r=this.el(),o=lu(r),l=this.vertical();let c=dp(r,e);c=l?c.y:c.x,c=Dd(c,0,1),i.update(o,c,l)}_d(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}Mp.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Zi&&!As&&Mp.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Mp.prototype.playerEvent="volumechange",ce.registerComponent("VolumeBar",Mp);class w2 extends ce{constructor(e,i={}){i.vertical=i.vertical||!1,(typeof i.volumeBar>"u"||iu(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),super(e,i),Pk(this,e),this.throttledHandleMouseMove=Js(Ft(this,this.handleMouseMove),rs),this.handleMouseUpHandler_=r=>this.handleMouseUp(r),this.on("mousedown",r=>this.handleMouseDown(r)),this.on("touchstart",r=>this.handleMouseDown(r)),this.on("mousemove",r=>this.handleMouseMove(r)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}w2.prototype.options_={children:["volumeBar"]},ce.registerComponent("VolumeControl",w2);const Fk=function(s,e){e.tech_&&!e.tech_.featuresMuteControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresMuteControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class N2 extends en{constructor(e,i){super(e,i),Fk(this,e),this.on(e,["loadstart","volumechange"],r=>this.update(r))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.volume(),r=this.player_.lastVolume_();if(i===0){const o=r<.1?.1:r;this.player_.volume(o),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let i=3;this.setIcon("volume-high"),Zi&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),i=0):e<.33?(this.setIcon("volume-low"),i=1):e<.67&&(this.setIcon("volume-medium"),i=2),up(this.el_,[0,1,2,3].reduce((r,o)=>r+`${o?" ":""}vjs-vol-${o}`,"")),No(this.el_,`vjs-vol-${i}`)}updateControlText_(){const i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)}}N2.prototype.controlText_="Mute",ce.registerComponent("MuteToggle",N2);class k2 extends ce{constructor(e,i={}){typeof i.inline<"u"?i.inline=i.inline:i.inline=!0,(typeof i.volumeControl>"u"||iu(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),super(e,i),this.handleKeyPressHandler_=r=>this.handleKeyPress(r),this.on(e,["loadstart"],r=>this.volumePanelState_(r)),this.on(this.muteToggle,"keyup",r=>this.handleKeyPress(r)),this.on(this.volumeControl,"keyup",r=>this.handleVolumeControlKeyUp(r)),this.on("keydown",r=>this.handleKeyPress(r)),this.on("mouseover",r=>this.handleMouseOver(r)),this.on("mouseout",r=>this.handleMouseOut(r)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),Bn(ve,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),Ji(ve,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}k2.prototype.options_={children:["muteToggle","volumeControl"]},ce.registerComponent("VolumePanel",k2);class O2 extends en{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const i=this.player_.currentTime(),r=this.player_.liveTracker,o=r&&r.isLive()?r.seekableEnd():this.player_.duration();let l;i+this.skipTime<=o?l=i+this.skipTime:l=o,this.player_.currentTime(l)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}O2.prototype.controlText_="Skip Forward",ce.registerComponent("SkipForward",O2);class I2 extends en{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.currentTime(),r=this.player_.liveTracker,o=r&&r.isLive()&&r.seekableStart();let l;o&&i-this.skipTime<=o?l=o:i>=this.skipTime?l=i-this.skipTime:l=0,this.player_.currentTime(l)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}I2.prototype.controlText_="Skip Backward",ce.registerComponent("SkipBackward",I2);class L2 extends ce{constructor(e,i){super(e,i),i&&(this.menuButton_=i.menuButton),this.focusedChild_=-1,this.on("keydown",r=>this.handleKeyDown(r)),this.boundHandleBlur_=r=>this.handleBlur(r),this.boundHandleTapClick_=r=>this.handleTapClick(r)}addEventListenerForItem(e){e instanceof ce&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof ce&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const i=this.addChild(e);i&&this.addEventListenerForItem(i)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Qe(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const i=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),Bn(i,"click",function(r){r.preventDefault(),r.stopImmediatePropagation()}),i}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const i=e.relatedTarget||ve.activeElement;if(!this.children().some(r=>r.el()===i)){const r=this.menuButton_;r&&r.buttonPressed_&&i!==r.el().firstChild&&r.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const i=this.children();if(!Array.isArray(i))return;const r=i.filter(o=>o.el()===e.target)[0];if(!r)return;r.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const i=this.children().slice();i.length&&i[0].hasClass("vjs-menu-title")&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus())}}ce.registerComponent("Menu",L2);class ty extends ce{constructor(e,i={}){super(e,i),this.menuButton_=new en(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const r=en.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+r,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const o=l=>this.handleClick(l);this.handleMenuKeyUp_=l=>this.handleMenuKeyUp(l),this.on(this.menuButton_,"tap",o),this.on(this.menuButton_,"click",o),this.on(this.menuButton_,"keydown",l=>this.handleKeyDown(l)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),Bn(ve,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",l=>this.handleMouseLeave(l)),this.on("keydown",l=>this.handleSubmenuKeyDown(l))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new L2(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=Qe("li",{className:"vjs-menu-title",textContent:ti(this.options_.title),tabIndex:-1}),r=new ce(this.player_,{el:i});e.addItem(r)}if(this.items=this.createItems(),this.items)for(let i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";const i=en.prototype.buildCSSClass();return`vjs-menu-button ${e} ${i} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,i=this.menuButton_.el()){return this.menuButton_.controlText(e,i)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),Ji(ve,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Escape"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Escape"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Escape"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Zi&&O_())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}ce.registerComponent("MenuButton",ty);class iy extends ty{constructor(e,i){const r=i.tracks;if(super(e,i),this.items.length<=1&&this.hide(),!r)return;const o=Ft(this,this.update);r.addEventListener("removetrack",o),r.addEventListener("addtrack",o),r.addEventListener("labelchange",o),this.player_.on("ready",o),this.player_.on("dispose",function(){r.removeEventListener("removetrack",o),r.removeEventListener("addtrack",o),r.removeEventListener("labelchange",o)})}}ce.registerComponent("TrackButton",iy);class Cd extends xp{constructor(e,i){super(e,i),this.selectable=i.selectable,this.isSelected_=i.selected||!1,this.multiSelectable=i.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,i,r){this.nonIconControl=!0;const o=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},i),r),l=Qe("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?o.appendChild(l):o.replaceChild(l,o.querySelector(".vjs-icon-placeholder")),o}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}ce.registerComponent("MenuItem",Cd);class Ad extends Cd{constructor(e,i){const r=i.track,o=e.textTracks();i.label=r.label||r.language||"Unknown",i.selected=r.mode==="showing",super(e,i),this.track=r,this.kinds=(i.kinds||[i.kind||this.track.kind]).filter(Boolean);const l=(...f)=>{this.handleTracksChange.apply(this,f)},c=(...f)=>{this.handleSelectedLanguageChange.apply(this,f)};if(e.on(["loadstart","texttrackchange"],l),o.addEventListener("change",l),o.addEventListener("selectedlanguagechange",c),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],l),o.removeEventListener("change",l),o.removeEventListener("selectedlanguagechange",c)}),o.onchange===void 0){let f;this.on(["tap","click"],function(){if(typeof z.Event!="object")try{f=new z.Event("change")}catch{}f||(f=ve.createEvent("Event"),f.initEvent("change",!0,!0)),o.dispatchEvent(f)})}this.handleTracksChange()}handleClick(e){const i=this.track,r=this.player_.textTracks();if(super.handleClick(e),!!r)for(let o=0;o<r.length;o++){const l=r[o];this.kinds.indexOf(l.kind)!==-1&&(l===i?l.mode!=="showing"&&(l.mode="showing"):l.mode!=="disabled"&&(l.mode="disabled"))}}handleTracksChange(e){const i=this.track.mode==="showing";i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const i=this.player_.cache_.selectedLanguage;if(i&&i.enabled&&i.language===this.track.language&&i.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}ce.registerComponent("TextTrackMenuItem",Ad);class R2 extends Ad{constructor(e,i){i.track={player:e,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,super(e,i)}handleTracksChange(e){const i=this.player().textTracks();let r=!0;for(let o=0,l=i.length;o<l;o++){const c=i[o];if(this.options_.kinds.indexOf(c.kind)>-1&&c.mode==="showing"){r=!1;break}}r!==this.isSelected_&&this.selected(r)}handleSelectedLanguageChange(e){const i=this.player().textTracks();let r=!0;for(let o=0,l=i.length;o<l;o++){const c=i[o];if(["captions","descriptions","subtitles"].indexOf(c.kind)>-1&&c.mode==="showing"){r=!1;break}}r&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}ce.registerComponent("OffTextTrackMenuItem",R2);class mu extends iy{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i)}createItems(e=[],i=Ad){let r;this.label_&&(r=`${this.label_} off`),e.push(new R2(this.player_,{kinds:this.kinds_,kind:this.kind_,label:r})),this.hideThreshold_+=1;const o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let l=0;l<o.length;l++){const c=o[l];if(this.kinds_.indexOf(c.kind)>-1){const f=new i(this.player_,{track:c,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});f.addClass(`vjs-${c.kind}-menu-item`),e.push(f)}}return e}}ce.registerComponent("TextTrackButton",mu);class j2 extends Cd{constructor(e,i){const r=i.track,o=i.cue,l=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=o.text,i.selected=o.startTime<=l&&l<o.endTime,super(e,i),this.track=r,this.cue=o}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}ce.registerComponent("ChaptersTrackMenuItem",j2);class ny extends mu{constructor(e,i,r){super(e,i,r),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(o=>{o.selected(this.track_.activeCues[0]===o.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const i=this.findChaptersTrack();i!==this.track_?(this.setTrack(i),super.update()):(!this.items||i&&i.cues&&i.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let i=e.length-1;i>=0;i--){const r=e[i];if(r.kind===this.kind_)return r}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(ti(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const i=this.track_.cues;if(!i)return e;for(let r=0,o=i.length;r<o;r++){const l=i[r],c=new j2(this.player_,{track:this.track_,cue:l});e.push(c)}return e}}ny.prototype.kind_="chapters",ny.prototype.controlText_="Chapters",ce.registerComponent("ChaptersButton",ny);class sy extends mu{constructor(e,i,r){super(e,i,r),this.setIcon("audio-description");const o=e.textTracks(),l=Ft(this,this.handleTracksChange);o.addEventListener("change",l),this.on("dispose",function(){o.removeEventListener("change",l)})}handleTracksChange(e){const i=this.player().textTracks();let r=!1;for(let o=0,l=i.length;o<l;o++){const c=i[o];if(c.kind!==this.kind_&&c.mode==="showing"){r=!0;break}}r?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}sy.prototype.kind_="descriptions",sy.prototype.controlText_="Descriptions",ce.registerComponent("DescriptionsButton",sy);let ry=class extends mu{constructor(e,i,r){super(e,i,r),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}};ry.prototype.kind_="subtitles",ry.prototype.controlText_="Subtitles",ce.registerComponent("SubtitlesButton",ry);class ay extends Ad{constructor(e,i){i.track={player:e,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",super(e,i),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+i.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}ce.registerComponent("CaptionSettingsMenuItem",ay);class oy extends mu{constructor(e,i,r){super(e,i,r),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new ay(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}oy.prototype.kind_="captions",oy.prototype.controlText_="Captions",ce.registerComponent("CaptionsButton",oy);class z2 extends Ad{createEl(e,i,r){const o=super.createEl(e,i,r),l=o.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",o):l.appendChild(Qe("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(Qe("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),o}}ce.registerComponent("SubsCapsMenuItem",z2);class ly extends mu{constructor(e,i={}){super(e,i),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(ti(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new ay(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,z2),e}}ly.prototype.kinds_=["captions","subtitles"],ly.prototype.controlText_="Subtitles",ce.registerComponent("SubsCapsButton",ly);class U2 extends Cd{constructor(e,i){const r=i.track,o=e.audioTracks();i.label=r.label||r.language||"Unknown",i.selected=r.enabled,super(e,i),this.track=r,this.addClass(`vjs-${r.kind}-menu-item`);const l=(...c)=>{this.handleTracksChange.apply(this,c)};o.addEventListener("change",l),this.on("dispose",()=>{o.removeEventListener("change",l)})}createEl(e,i,r){const o=super.createEl(e,i,r),l=o.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(l.appendChild(Qe("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(Qe("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),o}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const i=this.player_.audioTracks();for(let r=0;r<i.length;r++){const o=i[r];o!==this.track&&(o.enabled=o===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}ce.registerComponent("AudioTrackMenuItem",U2);class P2 extends iy{constructor(e,i={}){i.tracks=e.audioTracks(),super(e,i),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const i=this.player_.audioTracks();for(let r=0;r<i.length;r++){const o=i[r];e.push(new U2(this.player_,{track:o,selectable:!0,multiSelectable:!1}))}return e}}P2.prototype.controlText_="Audio Track",ce.registerComponent("AudioTrackButton",P2);class uy extends Cd{constructor(e,i){const r=i.rate,o=parseFloat(r,10);i.label=r,i.selected=o===e.playbackRate(),i.selectable=!0,i.multiSelectable=!1,super(e,i),this.label=r,this.rate=o,this.on(e,"ratechange",l=>this.update(l))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}uy.prototype.contentElType="button",ce.registerComponent("PlaybackRateMenuItem",uy);class B2 extends ty{constructor(e,i){super(e,i),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",r=>this.updateVisibility(r)),this.on(e,"ratechange",r=>this.updateLabel(r)),this.on(e,"playbackrateschange",r=>this.handlePlaybackRateschange(r))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Qe("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),i=[];for(let r=e.length-1;r>=0;r--)i.push(new uy(this.player(),{rate:e[r]+"x"}));return i}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}B2.prototype.controlText_="Playback Rate",ce.registerComponent("PlaybackRateMenuButton",B2);class q2 extends ce{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",i={},r={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,r)}}ce.registerComponent("Spacer",q2);class Hk extends q2{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}ce.registerComponent("CustomControlSpacer",Hk);class F2 extends ce{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}F2.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},ce.registerComponent("ControlBar",F2);class H2 extends du{constructor(e,i){super(e,i),this.on(e,"error",r=>{this.open(r)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}H2.prototype.options_=Object.assign({},du.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ce.registerComponent("ErrorDisplay",H2);class V2 extends ce{constructor(e,i={}){super(e,i),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Qe("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{const r=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${ss()}`)+"-"+i[1].replace(/\W+/g,""),o=Qe("option",{id:r,value:this.localize(i[0]),textContent:this.localize(i[1])});return o.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${r}`),o}))}}ce.registerComponent("TextTrackSelect",V2);class jo extends ce{constructor(e,i={}){super(e,i);const r=Qe("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(r);const o=this.options_.selects;for(const l of o){const c=this.options_.selectConfigs[l],f=c.className,p=c.id.replace("%s",this.options_.id_);let v=null;const S=`vjs_select_${ss()}`;if(this.options_.type==="colors"){v=Qe("span",{className:f});const D=Qe("label",{id:p,className:"vjs-label",textContent:this.localize(c.label)});D.setAttribute("for",S),v.appendChild(D)}const x=new V2(e,{SelectOptions:c.options,legendId:this.options_.legendId,id:S,labelId:p});this.addChild(x),this.options_.type==="colors"&&(v.appendChild(x.el()),this.el().appendChild(v))}}createEl(){return Qe("fieldset",{className:this.options_.className})}}ce.registerComponent("TextTrackFieldset",jo);class $2 extends ce{constructor(e,i={}){super(e,i);const r=this.options_.textTrackComponentid,o=new jo(e,{id_:r,legendId:`captions-text-legend-${r}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(o);const l=new jo(e,{id_:r,legendId:`captions-background-${r}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(l);const c=new jo(e,{id_:r,legendId:`captions-window-${r}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(c)}createEl(){return Qe("div",{className:"vjs-track-settings-colors"})}}ce.registerComponent("TextTrackSettingsColors",$2);class Y2 extends ce{constructor(e,i={}){super(e,i);const r=this.options_.textTrackComponentid,o=new jo(e,{id_:r,legendId:`captions-font-size-${r}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(o);const l=new jo(e,{id_:r,legendId:`captions-edge-style-${r}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(l);const c=new jo(e,{id_:r,legendId:`captions-font-family-${r}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(c)}createEl(){return Qe("div",{className:"vjs-track-settings-font"})}}ce.registerComponent("TextTrackSettingsFont",Y2);class Q2 extends ce{constructor(e,i={}){super(e,i);const r=new en(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});r.el().classList.remove("vjs-control","vjs-button"),r.el().textContent=this.localize("Reset"),this.addChild(r);const o=this.localize("Done"),l=new en(e,{controlText:o,className:"vjs-done-button"});l.el().classList.remove("vjs-control","vjs-button"),l.el().textContent=o,this.addChild(l)}createEl(){return Qe("div",{className:"vjs-track-settings-controls"})}}ce.registerComponent("TrackSettingsControls",Q2);const cy="vjs-text-track-settings",G2=["#000","Black"],X2=["#00F","Blue"],W2=["#0FF","Cyan"],K2=["#0F0","Green"],Z2=["#F0F","Magenta"],J2=["#F00","Red"],eS=["#FFF","White"],tS=["#FF0","Yellow"],dy=["1","Opaque"],hy=["0.5","Semi-Transparent"],iS=["0","Transparent"],Ra={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[G2,eS,J2,K2,X2,tS,Z2,W2],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[dy,hy,iS],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[eS,G2,J2,K2,X2,tS,Z2,W2],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:s=>s==="1.00"?null:Number(s)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[dy,hy],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[iS,hy,dy],className:"vjs-window-opacity vjs-opacity"}};Ra.windowColor.options=Ra.backgroundColor.options;function nS(s,e){if(e&&(s=e(s)),s&&s!=="none")return s}function Vk(s,e){const i=s.options[s.options.selectedIndex].value;return nS(i,e)}function $k(s,e,i){if(e){for(let r=0;r<s.options.length;r++)if(nS(s.options[r].value,i)===e){s.selectedIndex=r;break}}}class Yk extends du{constructor(e,i){i.temporary=!1,super(e,i),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Qe("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),i.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const i=new $2(e,{textTrackComponentid:this.id_,selectConfigs:Ra,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);const r=new Y2(e,{textTrackComponentid:this.id_,selectConfigs:Ra,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(r);const o=new Q2(e);this.addChild(o)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),tu(Ra,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return E_(Ra,(e,i,r)=>{const o=Vk(this.$(i.selector),i.parser);return o!==void 0&&(e[r]=o),e},{})}setValues(e){tu(Ra,(i,r)=>{$k(this.$(i.selector),e[r],i.parser)})}setDefaults(){tu(Ra,e=>{const i=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=i})}restoreSettings(){let e;try{e=JSON.parse(z.localStorage.getItem(cy))}catch(i){ct.warn(i)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?z.localStorage.setItem(cy,JSON.stringify(e)):z.localStorage.removeItem(cy)}catch(i){ct.warn(i)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}ce.registerComponent("TextTrackSettings",Yk);class Qk extends ce{constructor(e,i){let r=i.ResizeObserver||z.ResizeObserver;i.ResizeObserver===null&&(r=!1);const o=It({createEl:!r,reportTouchActivity:!1},i);super(e,o),this.ResizeObserver=i.ResizeObserver||z.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=X_(()=>{this.resizeHandler()},100,!1,this),r?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const l=this.debouncedHandler_;let c=this.unloadListener_=function(){Ji(this,"resize",l),Ji(this,"unload",c),c=null};Bn(this.el_.contentWindow,"unload",c),Bn(this.el_.contentWindow,"resize",l)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}ce.registerComponent("ResizeManager",Qk);const Gk={trackingThreshold:20,liveTolerance:15};class Xk extends ce{constructor(e,i){const r=It(Gk,i,{createEl:!1});super(e,r),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=o=>this.handlePlay(o),this.handleFirstTimeupdate_=o=>this.handleFirstTimeupdate(o),this.handleSeeked_=o=>this.handleSeeked(o),this.seekToLiveEdge_=o=>this.seekToLiveEdge(o),this.reset_(),this.on(this.player_,"durationchange",o=>this.handleDurationchange(o)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const i=Number(z.performance.now().toFixed(4)),r=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+r;const o=this.liveCurrentTime(),l=this.player_.currentTime();let c=this.player_.paused()||this.seekedBehindLive_||Math.abs(o-l)>this.options_.liveTolerance;(!this.timeupdateSeen_||o===1/0)&&(c=!1),c!==this.behindLiveEdge_&&(this.behindLiveEdge_=c,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,rs),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),i=[];let r=e?e.length:0;for(;r--;)i.push(e.end(r));return i.length?i.sort()[i.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),i=[];let r=e?e.length:0;for(;r--;)i.push(e.start(r));return i.length?i.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}ce.registerComponent("LiveTracker",Xk);class Wk extends ce{constructor(e,i){super(e,i),this.on("statechanged",r=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Qe("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${ss()}`}),description:Qe("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${ss()}`})},Qe("div",{className:"vjs-title-bar"},{},M_(this.els))}updateDom_(){const e=this.player_.tech_,i=e&&e.el_,r={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(o=>{const l=this.state[o],c=this.els[o],f=r[o];hp(c),l&&Oa(c,l),i&&(i.removeAttribute(f),l&&i.setAttribute(f,c.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,i=e&&e.el_;i&&(i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}ce.registerComponent("TitleBar",Wk);const Kk={initialDisplay:4e3,position:[],takeFocus:!1};class Zk extends en{constructor(e,i){i=It(Kk,i),super(e,i),this.controlText(i.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],r=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=Qe("button",{},{type:"button",class:this.buildCSSClass()},Qe("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}ce.registerComponent("TransientButton",Zk);const fy=s=>{const e=s.el();if(e.hasAttribute("src"))return s.triggerSourceset(e.src),!0;const i=s.$$("source"),r=[];let o="";if(!i.length)return!1;for(let l=0;l<i.length;l++){const c=i[l].src;c&&r.indexOf(c)===-1&&r.push(c)}return r.length?(r.length===1&&(o=r[0]),s.triggerSourceset(o),!0):!1},Jk=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(s){const e=ve.createElement(this.nodeName.toLowerCase());e.innerHTML=s;const i=ve.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",z.Element.prototype.appendChild.call(this,i),this.innerHTML}}),sS=(s,e)=>{let i={};for(let r=0;r<s.length&&(i=Object.getOwnPropertyDescriptor(s[r],e),!(i&&i.set&&i.get));r++);return i.enumerable=!0,i.configurable=!0,i},eO=s=>sS([s.el(),z.HTMLMediaElement.prototype,z.Element.prototype,Jk],"innerHTML"),rS=function(s){const e=s.el();if(e.resetSourceWatch_)return;const i={},r=eO(s),o=l=>(...c)=>{const f=l.apply(e,c);return fy(s),f};["append","appendChild","insertAdjacentHTML"].forEach(l=>{e[l]&&(i[l]=e[l],e[l]=o(i[l]))}),Object.defineProperty(e,"innerHTML",It(r,{set:o(r.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(i).forEach(l=>{e[l]=i[l]}),Object.defineProperty(e,"innerHTML",r)},s.one("sourceset",e.resetSourceWatch_)},tO=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?l2(z.Element.prototype.getAttribute.call(this,"src")):""},set(s){return z.Element.prototype.setAttribute.call(this,"src",s),s}}),iO=s=>sS([s.el(),z.HTMLMediaElement.prototype,tO],"src"),nO=function(s){if(!s.featuresSourceset)return;const e=s.el();if(e.resetSourceset_)return;const i=iO(s),r=e.setAttribute,o=e.load;Object.defineProperty(e,"src",It(i,{set:l=>{const c=i.set.call(e,l);return s.triggerSourceset(e.src),c}})),e.setAttribute=(l,c)=>{const f=r.call(e,l,c);return/src/i.test(l)&&s.triggerSourceset(e.src),f},e.load=()=>{const l=o.call(e);return fy(s)||(s.triggerSourceset(""),rS(s)),l},e.currentSrc?s.triggerSourceset(e.currentSrc):fy(s)||rS(s),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=o,e.setAttribute=r,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}};class ke extends st{constructor(e,i){super(e,i);const r=e.source;let o=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",r&&(this.el_.currentSrc!==r.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(r):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const l=this.el_.childNodes;let c=l.length;const f=[];for(;c--;){const p=l[c];p.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(p),this.remoteTextTracks().addTrack(p.track),this.textTracks().addTrack(p.track),!o&&!this.el_.hasAttribute("crossorigin")&&vp(p.src)&&(o=!0)):f.push(p))}for(let p=0;p<f.length;p++)this.el_.removeChild(f[p])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&o&&ct.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(Td||sp)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),ke.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){nO(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let i;const r=()=>{i=[];for(let l=0;l<e.length;l++){const c=e[l];c.kind==="metadata"&&i.push({track:c,storedMode:c.mode})}};r(),e.addEventListener("change",r),this.on("dispose",()=>e.removeEventListener("change",r));const o=()=>{for(let l=0;l<i.length;l++){const c=i[l];c.track.mode==="disabled"&&c.track.mode!==c.storedMode&&(c.track.mode=c.storedMode)}e.removeEventListener("change",o)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",r),e.removeEventListener("change",o),e.addEventListener("change",o)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",r),e.addEventListener("change",r),e.removeEventListener("change",o)})}overrideNative_(e,i){if(i!==this[`featuresNative${e}Tracks`])return;const r=e.toLowerCase();this[`${r}TracksListeners_`]&&Object.keys(this[`${r}TracksListeners_`]).forEach(o=>{this.el()[`${r}Tracks`].removeEventListener(o,this[`${r}TracksListeners_`][o])}),this[`featuresNative${e}Tracks`]=!i,this[`${r}TracksListeners_`]=null,this.proxyNativeTracksForType_(r)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const i=as[e],r=this.el()[i.getterName],o=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!r||!r.addEventListener)return;const l={change:f=>{const p={type:"change",target:o,currentTarget:o,srcElement:o};o.trigger(p),e==="text"&&this[hu.remoteText.getterName]().trigger(p)},addtrack(f){o.addTrack(f.track)},removetrack(f){o.removeTrack(f.track)}},c=function(){const f=[];for(let p=0;p<o.length;p++){let v=!1;for(let S=0;S<r.length;S++)if(r[S]===o[p]){v=!0;break}v||f.push(o[p])}for(;f.length;)o.removeTrack(f.shift())};this[i.getterName+"Listeners_"]=l,Object.keys(l).forEach(f=>{const p=l[f];r.addEventListener(f,p),this.on("dispose",v=>r.removeEventListener(f,p))}),this.on("loadstart",c),this.on("dispose",f=>this.off("loadstart",c))}proxyNativeTracks_(){as.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const r=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(r,e),ke.disposeMediaElement(e),e=r}else{e=ve.createElement("video");const r=this.options_.tag&&Ia(this.options_.tag),o=It({},r);(!Td||this.options_.nativeControlsForTouch!==!0)&&delete o.controls,R_(e,Object.assign(o,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&ou(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const i=["loop","muted","playsinline","autoplay"];for(let r=0;r<i.length;r++){const o=i[r],l=this.options_[o];typeof l<"u"&&(l?ou(e,o,o):cp(e,o),e[o]=l)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let r=!1;const o=function(){r=!0};this.on("loadstart",o);const l=function(){r||this.trigger("loadstart")};this.on("loadedmetadata",l),this.ready(function(){this.off("loadstart",o),this.off("loadedmetadata",l),r||this.trigger("loadstart")});return}const i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(r){this.trigger(r)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&lp?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){ct(i,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&As&&Zs&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},i=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",()=>{this.off("webkitbeginfullscreen",i),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)er(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},0);else try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}addSourceElement(e,i){if(!e)return ct.error("Invalid source URL."),!1;const r={src:e};i&&(r.type=i);const o=Qe("source",{},r);return this.el_.appendChild(o),!0}removeSourceElement(e){if(!e)return ct.error("Source URL is required to remove the source element."),!1;const i=this.el_.querySelectorAll("source");for(const r of i)if(r.src===e)return this.el_.removeChild(r),!0;return ct.warn(`No matching source element found with src: ${e}`),!1}reset(){ke.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,i,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,r):super.addTextTrack(e,i,r)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const i=ve.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i}addRemoteTextTrack(e,i){const r=super.addRemoteTextTrack(e,i);return this.featuresNativeTextTracks&&this.el().appendChild(r),r}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const i=this.$$("track");let r=i.length;for(;r--;)(e===i[r]||e===i[r].track)&&this.el().removeChild(i[r])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),z.performance&&(e.creationTime=z.performance.now()),e}}Jf(ke,"TEST_VID",function(){if(!ru())return;const s=ve.createElement("video"),e=ve.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",s.appendChild(e),s}),ke.isSupported=function(){try{ke.TEST_VID.volume=.5}catch{return!1}return!!(ke.TEST_VID&&ke.TEST_VID.canPlayType)},ke.canPlayType=function(s){return ke.TEST_VID.canPlayType(s)},ke.canPlaySource=function(s,e){return ke.canPlayType(s.type)},ke.canControlVolume=function(){try{const s=ke.TEST_VID.volume;ke.TEST_VID.volume=s/2+.1;const e=s!==ke.TEST_VID.volume;return e&&Zi?(z.setTimeout(()=>{ke&&ke.prototype&&(ke.prototype.featuresVolumeControl=s!==ke.TEST_VID.volume)}),!1):e}catch{return!1}},ke.canMuteVolume=function(){try{const s=ke.TEST_VID.muted;return ke.TEST_VID.muted=!s,ke.TEST_VID.muted?ou(ke.TEST_VID,"muted","muted"):cp(ke.TEST_VID,"muted","muted"),s!==ke.TEST_VID.muted}catch{return!1}},ke.canControlPlaybackRate=function(){if(As&&Zs&&ep<58)return!1;try{const s=ke.TEST_VID.playbackRate;return ke.TEST_VID.playbackRate=s/2+.1,s!==ke.TEST_VID.playbackRate}catch{return!1}},ke.canOverrideAttributes=function(){try{const s=()=>{};Object.defineProperty(ve.createElement("video"),"src",{get:s,set:s}),Object.defineProperty(ve.createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(ve.createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(ve.createElement("audio"),"innerHTML",{get:s,set:s})}catch{return!1}return!0},ke.supportsNativeTextTracks=function(){return lp||Zi&&Zs},ke.supportsNativeVideoTracks=function(){return!!(ke.TEST_VID&&ke.TEST_VID.videoTracks)},ke.supportsNativeAudioTracks=function(){return!!(ke.TEST_VID&&ke.TEST_VID.audioTracks)},ke.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([s,e]){Jf(ke.prototype,s,()=>ke[e](),!0)}),ke.prototype.featuresVolumeControl=ke.canControlVolume(),ke.prototype.movingMediaElementInDOM=!Zi,ke.prototype.featuresFullscreenResize=!0,ke.prototype.featuresProgressEvents=!0,ke.prototype.featuresTimeupdateEvents=!0,ke.prototype.featuresVideoFrameCallback=!!(ke.TEST_VID&&ke.TEST_VID.requestVideoFrameCallback),ke.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),typeof s.load=="function"&&function(){try{s.load()}catch{}}()}},ke.resetMediaElement=function(s){if(!s)return;const e=s.querySelectorAll("source");let i=e.length;for(;i--;)s.removeChild(e[i]);s.removeAttribute("src"),typeof s.load=="function"&&function(){try{s.load()}catch{}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){ke.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){ke.prototype["set"+ti(s)]=function(e){this.el_[s]=e,e?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){ke.prototype[s]=function(){return this.el_[s]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){ke.prototype["set"+ti(s)]=function(e){this.el_[s]=e}}),["pause","load","play"].forEach(function(s){ke.prototype[s]=function(){return this.el_[s]()}}),st.withSourceHandlers(ke),ke.nativeSourceHandler={},ke.nativeSourceHandler.canPlayType=function(s){try{return ke.TEST_VID.canPlayType(s)}catch{return""}},ke.nativeSourceHandler.canHandleSource=function(s,e){if(s.type)return ke.nativeSourceHandler.canPlayType(s.type);if(s.src){const i=$0(s.src);return ke.nativeSourceHandler.canPlayType(`video/${i}`)}return""},ke.nativeSourceHandler.handleSource=function(s,e,i){e.setSrc(s.src)},ke.nativeSourceHandler.dispose=function(){},ke.registerSourceHandler(ke.nativeSourceHandler),st.registerTech("Html5",ke);const aS=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],py={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},my=["tiny","xsmall","small","medium","large","xlarge","huge"],Dp={};my.forEach(s=>{const e=s.charAt(0)==="x"?`x-${s.substring(1)}`:s;Dp[s]=`vjs-layout-${e}`});const sO={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class Dt extends ce{constructor(e,i,r){if(e.id=e.id||i.id||`vjs_video_${ss()}`,i=Object.assign(Dt.getTagSettings(e),i),i.initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language){const c=e.closest("[lang]");c&&(i.language=c.getAttribute("lang"))}if(super(null,i,r),this.boundDocumentFullscreenChange_=c=>this.documentFullscreenChange_(c),this.boundFullWindowOnEscKey_=c=>this.fullWindowOnEscKey(c),this.boundUpdateStyleEl_=c=>this.updateStyleEl_(c),this.boundApplyInitTime_=c=>this.applyInitTime_(c),this.boundUpdateCurrentBreakpoint_=c=>this.updateCurrentBreakpoint_(c),this.boundHandleTechClick_=c=>this.handleTechClick_(c),this.boundHandleTechDoubleClick_=c=>this.handleTechDoubleClick_(c),this.boundHandleTechTouchStart_=c=>this.handleTechTouchStart_(c),this.boundHandleTechTouchMove_=c=>this.handleTechTouchMove_(c),this.boundHandleTechTouchEnd_=c=>this.handleTechTouchEnd_(c),this.boundHandleTechTap_=c=>this.handleTechTap_(c),this.boundUpdatePlayerHeightOnAudioOnlyMode_=c=>this.updatePlayerHeightOnAudioOnlyMode_(c),this.isFullscreen_=!1,this.log=S_(this.id_),this.fsApi_=Kf,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Ia(e),this.language(this.options_.language),i.languages){const c={};Object.getOwnPropertyNames(i.languages).forEach(function(f){c[f.toLowerCase()]=i.languages[f]}),this.languages_=c}else this.languages_=Dt.prototype.options_.languages;this.resetCache_(),this.poster_=i.poster||"",this.controls_=!!i.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(c=>{if(typeof this[c]!="function")throw new Error(`plugin "${c}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),L0(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(Bn(ve,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const o=It(this.options_);if(i.plugins&&Object.keys(i.plugins).forEach(c=>{this[c](i.plugins[c])}),i.debug&&this.debug(!0),this.options_.playerOptions=o,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons){const f=new z.DOMParser().parseFromString(Ck,"image/svg+xml");if(f.querySelector("parsererror"))ct.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const v=f.documentElement;v.style.display="none",this.el_.appendChild(v),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),i.spatialNavigation&&i.spatialNavigation.enabled&&(this.spatialNavigation=new Ak(this),this.addClass("vjs-spatial-navigation-enabled")),Td&&this.addClass("vjs-touch-enabled"),Zi||this.addClass("vjs-workinghover"),Dt.players[this.id_]=this;const l=_0.split(".")[0];this.addClass(`vjs-v${l}`),this.userActive(!0),this.reportUserActivity(),this.one("play",c=>this.listenForUserActivity_(c)),this.on("keydown",c=>this.handleKeyDown(c)),this.on("languagechange",c=>this.handleLanguagechange(c)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),Ji(ve,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ji(ve,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),Dt.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),xk(this),dn.names.forEach(e=>{const i=dn[e],r=this[i.getterName]();r&&r.off&&r.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,i,r=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const o=this.tag.tagName.toLowerCase()==="video-js";r?i=this.el_=e.parentNode:o||(i=this.el_=super.createEl("div"));const l=Ia(e);if(o){for(i=this.el_=e,e=this.tag=ve.createElement("video");i.children.length;)e.appendChild(i.firstChild);vd(i,"video-js")||No(i,"video-js"),i.appendChild(e),r=this.playerElIngest_=i,Object.keys(i).forEach(p=>{try{e[p]=i[p]}catch{}})}e.setAttribute("tabindex","-1"),l.tabindex="-1",Zs&&ip&&(e.setAttribute("role","application"),l.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in l&&delete l.width,"height"in l&&delete l.height,Object.getOwnPropertyNames(l).forEach(function(p){o&&p==="class"||i.setAttribute(p,l[p]),o&&e.setAttribute(p,l[p])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused");const c=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(p=>N_[p]).map(p=>"vjs-device-"+p.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...c),z.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=Y_("vjs-styles-dimensions");const p=La(".vjs-styles-defaults"),v=La("head");v.insertBefore(this.styleEl_,p?p.nextSibling:v.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const f=e.getElementsByTagName("a");for(let p=0;p<f.length;p++){const v=f.item(p);No(v,"vjs-hidden"),v.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!r&&e.parentNode.insertBefore(i,e),M0(e,i),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=i,i}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){ct.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,i){const r=e+"_";if(i===void 0)return this[r]||0;if(i===""||i==="auto"){this[r]=void 0,this.updateStyleEl_();return}const o=parseFloat(i);if(isNaN(o)){ct.error(`Improper value "${i}" supplied for for ${e}`);return}this[r]=o,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Hr(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),nk(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(z.VIDEOJS_NO_DYNAMIC_STYLE===!0){const f=typeof this.width_=="number"?this.width_:this.options_.width,p=typeof this.height_=="number"?this.height_:this.options_.height,v=this.tech_&&this.tech_.el();v&&(f>=0&&(v.width=f),p>=0&&(v.height=p));return}let e,i,r,o;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?r=this.aspectRatio_:this.videoWidth()>0?r=this.videoWidth()+":"+this.videoHeight():r="16:9";const l=r.split(":"),c=l[1]/l[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/c:e=this.videoWidth()||300,this.height_!==void 0?i=this.height_:i=e*c,/^[^a-zA-Z]/.test(this.id())?o="dimensions-"+this.id():o=this.id()+"-dimensions",this.addClass(o),Q_(this.styleEl_,`
.${o} {
width: ${e}px;
height: ${i}px;
}
.${o}.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: ${c*100}%;
}
`)}loadTech_(e,i){this.tech_&&this.unloadTech_();const r=ti(e),o=e.charAt(0).toLowerCase()+e.slice(1);r!=="Html5"&&this.tag&&(st.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;let l=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(l=!1);const c={source:i,autoplay:l,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${o}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};dn.names.forEach(p=>{const v=dn[p];c[v.getterName]=this[v.privateName]}),Object.assign(c,this.options_[r]),Object.assign(c,this.options_[o]),Object.assign(c,this.options_[e.toLowerCase()]),this.tag&&(c.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(c.startTime=this.cache_.currentTime);const f=st.getTech(e);if(!f)throw new Error(`No Tech named '${r}' exists! '${r}' should be registered using videojs.registerTech()'`);this.tech_=new f(c),this.tech_.ready(Ft(this,this.handleTechReady_),!0),U0.jsonToTextTracks(this.textTracksJson_||[],this.tech_),aS.forEach(p=>{this.on(this.tech_,p,v=>this[`handleTech${ti(p)}_`](v))}),Object.keys(py).forEach(p=>{this.on(this.tech_,p,v=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${py[p]}_`].bind(this),event:v});return}this[`handleTech${py[p]}_`](v)})}),this.on(this.tech_,"loadstart",p=>this.handleTechLoadStart_(p)),this.on(this.tech_,"sourceset",p=>this.handleTechSourceset_(p)),this.on(this.tech_,"waiting",p=>this.handleTechWaiting_(p)),this.on(this.tech_,"ended",p=>this.handleTechEnded_(p)),this.on(this.tech_,"seeking",p=>this.handleTechSeeking_(p)),this.on(this.tech_,"play",p=>this.handleTechPlay_(p)),this.on(this.tech_,"pause",p=>this.handleTechPause_(p)),this.on(this.tech_,"durationchange",p=>this.handleTechDurationChange_(p)),this.on(this.tech_,"fullscreenchange",(p,v)=>this.handleTechFullscreenChange_(p,v)),this.on(this.tech_,"fullscreenerror",(p,v)=>this.handleTechFullscreenError_(p,v)),this.on(this.tech_,"enterpictureinpicture",p=>this.handleTechEnterPictureInPicture_(p)),this.on(this.tech_,"leavepictureinpicture",p=>this.handleTechLeavePictureInPicture_(p)),this.on(this.tech_,"error",p=>this.handleTechError_(p)),this.on(this.tech_,"posterchange",p=>this.handleTechPosterChange_(p)),this.on(this.tech_,"textdata",p=>this.handleTechTextData_(p)),this.on(this.tech_,"ratechange",p=>this.handleTechRateChange_(p)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(r!=="Html5"||!this.tag)&&M0(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){dn.names.forEach(e=>{const i=dn[e];this[i.privateName]=this[i.getterName]()}),this.textTracksJson_=U0.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&ct.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
See https://github.com/videojs/video.js/issues/2617 for more info.
`),this.tech_}version(){return{"video.js":_0}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const i=()=>{const o=this.muted();this.muted(!0);const l=()=>{this.muted(o)};this.playTerminatedQueue_.push(l);const c=this.play();if(Ed(c))return c.catch(f=>{throw l(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${f||""}`)})};let r;if(e==="any"&&!this.muted()?(r=this.play(),Ed(r)&&(r=r.catch(i))):e==="muted"&&!this.muted()?r=i():r=this.play(),!!Ed(r))return r.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let i=e,r="";typeof i!="string"&&(i=e.src,r=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!r&&(r=Dk(this,i)),this.cache_.source=It({},e,{src:i,type:r});const o=this.cache_.sources.filter(p=>p.src&&p.src===i),l=[],c=this.$$("source"),f=[];for(let p=0;p<c.length;p++){const v=Ia(c[p]);l.push(v),v.src&&v.src===i&&f.push(v.src)}f.length&&!o.length?this.cache_.sources=l:o.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i}handleTechSourceset_(e){if(!this.changingSrc_){let i=l=>this.updateSourceCaches_(l);const r=this.currentSource().src,o=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(o)&&(!this.lastSource_||this.lastSource_.tech!==o&&this.lastSource_.player!==r)&&(i=()=>{}),i(o),e.src||this.tech_.any(["sourceset","loadstart"],l=>{if(l.type==="sourceset")return;const c=this.techGet_("currentSrc");this.lastSource_.tech=c,this.updateSourceCaches_(c)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),i=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",i))};this.on("timeupdate",i)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?er(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),r=>r.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!ve.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const i=e.target.player;if(i&&i!==this)return;const r=this.el();let o=ve[this.fsApi_.fullscreenElement]===r;!o&&r.matches&&(o=r.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(o)}handleTechFullscreenChange_(e,i){i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(i.isFullscreen))}handleTechFullscreenError_(e,i){this.trigger("fullscreenerror",i)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,i){this.ready(function(){if(e in _k)return vk(this.middleware_,this.tech_,e,i);if(e in p2)return f2(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(r){throw ct(r),r}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in bk)return Tk(this.middleware_,this.tech_,e);if(e in p2)return f2(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw this.tech_[e]===void 0?(ct(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(ct(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(ct(i),i)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=er){this.playCallbacks_.push(e);const i=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),r=!!(lp||Zi);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i){this.waitToPlay_=c=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!i&&r&&this.load();return}const o=this.techGet_("play");r&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),o===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(o)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i()})}runPlayCallbacks_(e){const i=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(r){r(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||ws(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=ws(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=ws(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return s2(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),i=this.duration();let r=e.end(e.length-1);return r>i&&(r=i),r}volume(e){let i;if(e!==void 0){i=Math.max(0,Math.min(1,e)),this.cache_.volume=i,this.techCall_("setVolume",i),i>0&&this.lastVolume_(i);return}return i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const i=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const i=this;return new Promise((r,o)=>{function l(){i.off("fullscreenerror",f),i.off("fullscreenchange",c)}function c(){l(),r()}function f(v,S){l(),o(S)}i.one("fullscreenchange",c),i.one("fullscreenerror",f);const p=i.requestFullscreenHelper_(e);p&&(p.then(l,l),p.then(r,o))})}requestFullscreenHelper_(e){let i;if(this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(i=e)),this.fsApi_.requestFullscreen){const r=this.el_[this.fsApi_.requestFullscreen](i);return r&&r.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),r}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((i,r)=>{function o(){e.off("fullscreenerror",c),e.off("fullscreenchange",l)}function l(){o(),i()}function c(p,v){o(),r(v)}e.one("fullscreenchange",l),e.one("fullscreenerror",c);const f=e.exitFullscreenHelper_();f&&(f.then(o,o),f.then(i,r))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=ve[this.fsApi_.exitFullscreen]();return e&&er(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=ve.documentElement.style.overflow,Bn(ve,"keydown",this.boundFullWindowOnEscKey_),ve.documentElement.style.overflow="hidden",No(ve.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,Ji(ve,"keydown",this.boundFullWindowOnEscKey_),ve.documentElement.style.overflow=this.docOrigOverflow,up(ve.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&z.documentPictureInPicture){const e=ve.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Qe("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),z.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(H_(i),this.el_.parentNode.insertBefore(e,this.el_),i.document.body.appendChild(this.el_),i.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:i}),i.addEventListener("pagehide",r=>{const o=r.target.querySelector(".video-js");e.parentNode.replaceChild(o,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),i))}return"pictureInPictureEnabled"in ve&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(z.documentPictureInPicture&&z.documentPictureInPicture.window)return z.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in ve)return ve.exitPictureInPicture()}handleKeyDown(e){const{userActions:i}=this.options_;!i||!i.hotkeys||(o=>{const l=o.tagName.toLowerCase();if(o.isContentEditable)return!0;const c=["button","checkbox","hidden","radio","reset","submit"];return l==="input"?c.indexOf(o.type)===-1:["textarea"].indexOf(l)!==-1})(this.el_.ownerDocument.activeElement)||(typeof i.hotkeys=="function"?i.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const i=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:r=c=>e.key.toLowerCase()==="f",muteKey:o=c=>e.key.toLowerCase()==="m",playPauseKey:l=c=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();const c=ce.getComponent("FullscreenToggle");ve[this.fsApi_.fullscreenEnabled]!==!1&&c.prototype.handleClick.call(this,e)}else o.call(this,e)?(e.preventDefault(),e.stopPropagation(),ce.getComponent("MuteToggle").prototype.handleClick.call(this,e)):l.call(this,e)&&(e.preventDefault(),e.stopPropagation(),ce.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let i;for(let r=0,o=this.options_.techOrder;r<o.length;r++){const l=o[r];let c=st.getTech(l);if(c||(c=ce.getComponent(l)),!c){ct.error(`The "${l}" tech is undefined. Skipped browser support check for that tech.`);continue}if(c.isSupported()&&(i=c.canPlayType(e),i))return i}return""}selectSource(e){const i=this.options_.techOrder.map(f=>[f,st.getTech(f)]).filter(([f,p])=>p?p.isSupported():(ct.error(`The "${f}" tech is undefined. Skipped browser support check for that tech.`),!1)),r=function(f,p,v){let S;return f.some(x=>p.some(D=>{if(S=v(x,D),S)return!0})),S};let o;const l=f=>(p,v)=>f(v,p),c=([f,p],v)=>{if(p.canPlaySource(v,this.options_[f.toLowerCase()]))return{source:v,tech:f}};return this.options_.sourceOrder?o=r(e,i,l(c)):o=r(i,e,c),o||!1}handleSrc_(e,i){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const r=m2(e);if(!r.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,i||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),gk(this,r[0],(o,l)=>{if(this.middleware_=l,i||(this.cache_.sources=r),this.updateSourceCaches_(o),this.src_(o)){if(r.length>1)return this.handleSrc_(r.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}yk(l,this.tech_)}),r.length>1){const o=()=>{this.error(null),this.handleSrc_(r.slice(1),!0)},l=()=>{this.off("error",o)};this.one("error",o),this.one("playing",l),this.resetRetryOnError_=()=>{this.off("error",o),this.off("playing",l)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const i=this.selectSource([e]);return i?J_(i.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,i){return this.tech_?this.tech_.addSourceElement(e,i):!1}removeSourceElement(e){return this.tech_?this.tech_.removeSourceElement(e):!1}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();er(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Hr(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:i,progressControl:r,remainingTimeDisplay:o}=this.controlBar||{},{seekBar:l}=r||{};e&&e.updateContent(),i&&i.updateContent(),o&&o.updateContent(),l&&(l.update(),l.loadProgressBar&&l.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),i=[];return Object.keys(e).length!==0&&i.push(e),this.cache_.sources||i}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let i;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),i=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,i=typeof i>"u"?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(Na("beforeerror").forEach(i=>{const r=i(this,e);if(!(Ks(r)&&!Array.isArray(r)||typeof r=="string"||typeof r=="number"||r===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=r}),this.options_.suppressNotSupportedError&&e&&e.code===4){const i=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],i),this.one("loadstart",function(){this.off(["click","touchstart"],i)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new Wt(e),this.addClass("vjs-error"),ct.error(`(CODE:${this.error_.code} ${Wt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),Na("error").forEach(i=>i(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,i,r;const o=Ft(this,this.reportUserActivity),l=function(x){(x.screenX!==i||x.screenY!==r)&&(i=x.screenX,r=x.screenY,o())},c=function(){o(),this.clearInterval(e),e=this.setInterval(o,250)},f=function(x){o(),this.clearInterval(e)};this.on("mousedown",c),this.on("mousemove",l),this.on("mouseup",f),this.on("mouseleave",f);const p=this.getChild("controlBar");p&&!Zi&&!As&&(p.on("mouseenter",function(x){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),p.on("mouseleave",function(x){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o);let v;const S=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(v);const x=this.options_.inactivityTimeout;x<=0||(v=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},x))};this.setInterval(S,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),i=this.getChild("ControlBar"),r=i&&i.currentHeight();e.forEach(o=>{o!==i&&o.el_&&!o.hasClass("vjs-hidden")&&(o.hide(),this.audioOnlyCache_.hiddenChildren.push(o))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=r,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(r),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const i=[];return this.isInPictureInPicture()&&i.push(this.exitPictureInPicture()),this.isFullscreen()&&i.push(this.exitFullscreen()),this.audioPosterMode()&&i.push(this.audioPosterMode(!1)),Promise.all(i).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,i,r){if(this.tech_)return this.tech_.addTextTrack(e,i,r)}addRemoteTextTrack(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i)}removeRemoteTextTrack(e={}){let{track:i}=e;if(i||(i=e),this.tech_)return this.tech_.removeRemoteTextTrack(i)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Hr(this)&&this.trigger("languagechange"))}languages(){return It(Dt.prototype.options_.languages,this.languages_)}toJSON(){const e=It(this.options_),i=e.tracks;e.tracks=[];for(let r=0;r<i.length;r++){let o=i[r];o=It(o),o.player=void 0,e.tracks[r]=o}return e}createModal(e,i){i=i||{},i.content=e||"";const r=new du(this,i);return this.addChild(r),r.on("dispose",()=>{this.removeChild(r)}),r.open(),r}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),i=this.currentWidth();for(let r=0;r<my.length;r++){const o=my[r],l=this.breakpoints_[o];if(i<=l){if(e===o)return;e&&this.removeClass(Dp[e]),this.addClass(Dp[o]),this.breakpoint_=o;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},sO,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const i=this.responsive_;if(e!==i)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Dp[this.breakpoint_]||""}loadMedia(e,i){if(!e||typeof e!="object")return;const r=this.crossOrigin();this.reset(),this.cache_.media=It(e);const{artist:o,artwork:l,description:c,poster:f,src:p,textTracks:v,title:S}=this.cache_.media;!l&&f&&(this.cache_.media.artwork=[{src:f,type:Sp(f)}]),r&&this.crossOrigin(r),p&&this.src(p),f&&this.poster(f),Array.isArray(v)&&v.forEach(x=>this.addRemoteTextTrack(x,!1)),this.titleBar&&this.titleBar.update({title:S,description:c||o||""}),this.ready(i)}getMedia(){if(!this.cache_.media){const e=this.poster(),i=this.currentSources(),r=Array.prototype.map.call(this.remoteTextTracks(),l=>({kind:l.kind,label:l.label,language:l.language,src:l.src})),o={src:i,textTracks:r};return e&&(o.poster=e,o.artwork=[{src:o.poster,type:Sp(o.poster)}]),o}return It(this.cache_.media)}static getTagSettings(e){const i={sources:[],tracks:[]},r=Ia(e),o=r["data-setup"];if(vd(e,"vjs-fill")&&(r.fill=!0),vd(e,"vjs-fluid")&&(r.fluid=!0),o!==null)try{Object.assign(r,JSON.parse(o||"{}"))}catch(l){ct.error("data-setup",l)}if(Object.assign(i,r),e.hasChildNodes()){const l=e.childNodes;for(let c=0,f=l.length;c<f;c++){const p=l[c],v=p.nodeName.toLowerCase();v==="source"?i.sources.push(Ia(p)):v==="track"&&i.tracks.push(Ia(p))}}return i}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(i=>typeof i=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}Dt.prototype.videoTracks=()=>{},Dt.prototype.audioTracks=()=>{},Dt.prototype.textTracks=()=>{},Dt.prototype.remoteTextTracks=()=>{},Dt.prototype.remoteTextTrackEls=()=>{},dn.names.forEach(function(s){const e=dn[s];Dt.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),Dt.prototype.crossorigin=Dt.prototype.crossOrigin,Dt.players={};const wd=z.navigator;Dt.prototype.options_={techOrder:st.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:wd&&(wd.languages&&wd.languages[0]||wd.userLanguage||wd.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},aS.forEach(function(s){Dt.prototype[`handleTech${ti(s)}_`]=function(){return this.trigger(s)}}),ce.registerComponent("Player",Dt);const Cp="plugin",gu="activePlugins_",yu={},Ap=s=>yu.hasOwnProperty(s),wp=s=>Ap(s)?yu[s]:void 0,oS=(s,e)=>{s[gu]=s[gu]||{},s[gu][e]=!0},Np=(s,e,i)=>{const r=(i?"before":"")+"pluginsetup";s.trigger(r,e),s.trigger(r+":"+e.name,e)},rO=function(s,e){const i=function(){Np(this,{name:s,plugin:e,instance:null},!0);const r=e.apply(this,arguments);return oS(this,s),Np(this,{name:s,plugin:e,instance:r}),r};return Object.keys(e).forEach(function(r){i[r]=e[r]}),i},lS=(s,e)=>(e.prototype.name=s,function(...i){Np(this,{name:s,plugin:e,instance:null},!0);const r=new e(this,...i);return this[s]=()=>r,Np(this,r.getEventHash()),r});class Mn{constructor(e){if(this.constructor===Mn)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),L0(this),delete this.trigger,Z_(this,this.constructor.defaultState),oS(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,i={}){return cu(this.eventBusEl_,e,this.getEventHash(i))}handleStateChanged(e){}dispose(){const{name:e,player:i}=this;this.trigger("dispose"),this.off(),i.off("dispose",this.dispose),i[gu][e]=!1,this.player=this.state=null,i[e]=lS(e,yu[e])}static isBasic(e){const i=typeof e=="string"?wp(e):e;return typeof i=="function"&&!Mn.prototype.isPrototypeOf(i.prototype)}static registerPlugin(e,i){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(Ap(e))ct.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(Dt.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof i!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof i}.`);return yu[e]=i,e!==Cp&&(Mn.isBasic(i)?Dt.prototype[e]=rO(e,i):Dt.prototype[e]=lS(e,i)),i}static deregisterPlugin(e){if(e===Cp)throw new Error("Cannot de-register base plugin.");Ap(e)&&(delete yu[e],delete Dt.prototype[e])}static getPlugins(e=Object.keys(yu)){let i;return e.forEach(r=>{const o=wp(r);o&&(i=i||{},i[r]=o)}),i}static getPluginVersion(e){const i=wp(e);return i&&i.VERSION||""}}Mn.getPlugin=wp,Mn.BASE_PLUGIN_NAME=Cp,Mn.registerPlugin(Cp,Mn),Dt.prototype.usingPlugin=function(s){return!!this[gu]&&this[gu][s]===!0},Dt.prototype.hasPlugin=function(s){return!!Ap(s)};function aO(s,e){let i=!1;return function(...r){return i||ct.warn(s),i=!0,e.apply(this,r)}}function Ns(s,e,i,r){return aO(`${e} is deprecated and will be removed in ${s}.0; please use ${i} instead.`,r)}var oO={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const uS=s=>s.indexOf("#")===0?s.slice(1):s;function F(s,e,i){let r=F.getPlayer(s);if(r)return e&&ct.warn(`Player "${s}" is already initialised. Options will not be applied.`),i&&r.ready(i),r;const o=typeof s=="string"?La("#"+uS(s)):s;if(!au(o))throw new TypeError("The element or ID supplied is not valid. (videojs)");const c=("getRootNode"in o?o.getRootNode()instanceof z.ShadowRoot:!1)?o.getRootNode():o.ownerDocument.body;(!o.ownerDocument.defaultView||!c.contains(o))&&ct.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(o.parentNode&&o.parentNode.hasAttribute&&o.parentNode.hasAttribute("data-vjs-player")?o.parentNode:o).cloneNode(!0)),Na("beforesetup").forEach(p=>{const v=p(o,It(e));if(!Ks(v)||Array.isArray(v)){ct.error("please return an object in beforesetup hooks");return}e=It(e,v)});const f=ce.getComponent("Player");return r=new f(o,e,i),Na("setup").forEach(p=>p(r)),r}if(F.hooks_=Fr,F.hooks=Na,F.hook=VN,F.hookOnce=$N,F.removeHook=b_,z.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&ru()){let s=La(".vjs-styles-defaults");if(!s){s=Y_("vjs-styles-defaults");const e=La("head");e&&e.insertBefore(s,e.firstChild),Q_(s,`
.video-js {
width: 300px;
height: 150px;
}
.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: 56.25%
}
`)}}A0(1,F),F.VERSION=_0,F.options=Dt.prototype.options_,F.getPlayers=()=>Dt.players,F.getPlayer=s=>{const e=Dt.players;let i;if(typeof s=="string"){const r=uS(s),o=e[r];if(o)return o;i=La("#"+r)}else i=s;if(au(i)){const{player:r,playerId:o}=i;if(r||e[o])return r||e[o]}},F.getAllPlayers=()=>Object.keys(Dt.players).map(s=>Dt.players[s]).filter(Boolean),F.players=Dt.players,F.getComponent=ce.getComponent,F.registerComponent=(s,e)=>(st.isTech(e)&&ct.warn(`The ${s} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),ce.registerComponent.call(ce,s,e)),F.getTech=st.getTech,F.registerTech=st.registerTech,F.use=mk,Object.defineProperty(F,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(F.middleware,"TERMINATOR",{value:_p,writeable:!1,enumerable:!0}),F.browser=N_,F.obj=GN,F.mergeOptions=Ns(9,"videojs.mergeOptions","videojs.obj.merge",It),F.defineLazyProperty=Ns(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Jf),F.bind=Ns(9,"videojs.bind","native Function.prototype.bind",Ft),F.registerPlugin=Mn.registerPlugin,F.deregisterPlugin=Mn.deregisterPlugin,F.plugin=(s,e)=>(ct.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Mn.registerPlugin(s,e)),F.getPlugins=Mn.getPlugins,F.getPlugin=Mn.getPlugin,F.getPluginVersion=Mn.getPluginVersion,F.addLanguage=function(s,e){return s=(""+s).toLowerCase(),F.options.languages=It(F.options.languages,{[s]:e}),F.options.languages[s]},F.log=ct,F.createLogger=S_,F.time=lk,F.createTimeRange=Ns(9,"videojs.createTimeRange","videojs.time.createTimeRanges",ws),F.createTimeRanges=Ns(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",ws),F.formatTime=Ns(9,"videojs.formatTime","videojs.time.formatTime",Oo),F.setFormatTime=Ns(9,"videojs.setFormatTime","videojs.time.setFormatTime",i2),F.resetFormatTime=Ns(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",n2),F.parseUrl=Ns(9,"videojs.parseUrl","videojs.url.parseUrl",V0),F.isCrossOrigin=Ns(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",vp),F.EventTarget=qn,F.any=k0,F.on=Bn,F.one=mp,F.off=Ji,F.trigger=cu,F.xhr=Vb,F.TrackList=Io,F.TextTrack=Md,F.TextTrackList=F0,F.AudioTrack=d2,F.AudioTrackList=r2,F.VideoTrack=h2,F.VideoTrackList=a2,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(s=>{F[s]=function(){return ct.warn(`videojs.${s}() is deprecated; use videojs.dom.${s}() instead`),V_[s].apply(null,arguments)}}),F.computedStyle=Ns(9,"videojs.computedStyle","videojs.dom.computedStyle",uu),F.dom=V_,F.fn=ik,F.num=jk,F.str=ak,F.url=fk,F.Error=oO;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class lO{constructor(e){let i=this;return i.id=e.id,i.label=i.id,i.width=e.width,i.height=e.height,i.bitrate=e.bandwidth,i.frameRate=e.frameRate,i.enabled_=e.enabled,Object.defineProperty(i,"enabled",{get(){return i.enabled_()},set(r){i.enabled_(r)}}),i}}class kp extends F.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let i=this.getQualityLevelById(e.id);if(i)return i;const r=this.levels_.length;return i=new lO(e),""+r in this||Object.defineProperty(this,r,{get(){return this.levels_[r]}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i}removeQualityLevel(e){let i=null;for(let r=0,o=this.length;r<o;r++)if(this[r]===e){i=this.levels_.splice(r,1)[0],this.selectedIndex_===r?this.selectedIndex_=-1:this.selectedIndex_>r&&this.selectedIndex_--;break}return i&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),i}getQualityLevelById(e){for(let i=0,r=this.length;i<r;i++){const o=this[i];if(o.id===e)return o}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}kp.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const s in kp.prototype.allowedEvents_)kp.prototype["on"+s]=null;var cS="4.1.0";const uO=function(s,e){const i=s.qualityLevels,r=new kp,o=function(){r.dispose(),s.qualityLevels=i,s.off("dispose",o)};return s.on("dispose",o),s.qualityLevels=()=>r,s.qualityLevels.VERSION=cS,r},dS=function(s){return uO(this,F.obj.merge({},s))};F.registerPlugin("qualityLevels",dS),dS.VERSION=cS;/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */const Dn=jf,Op=(s,e)=>e&&e.responseURL&&s!==e.responseURL?e.responseURL:s,ls=s=>F.log.debug?F.log.debug.bind(F,"VHS:",`${s} >`):function(){};function Ct(...s){const e=F.obj||F;return(e.merge||e.mergeOptions).apply(e,s)}function Ni(...s){const e=F.time||F;return(e.createTimeRanges||e.createTimeRanges).apply(e,s)}function cO(s){if(s.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
`;for(let i=0;i<s.length;i++){const r=s.start(i),o=s.end(i);e+=`${r} --> ${o}. Duration (${o-r})
`}return e}const ir=1/30,nr=ir*3,hS=function(s,e){const i=[];let r;if(s&&s.length)for(r=0;r<s.length;r++)e(s.start(r),s.end(r))&&i.push([s.start(r),s.end(r)]);return Ni(i)},Tu=function(s,e){return hS(s,function(i,r){return i-nr<=e&&r+nr>=e})},Ip=function(s,e){return hS(s,function(i){return i-ir>=e})},dO=function(s){if(s.length<2)return Ni();const e=[];for(let i=1;i<s.length;i++){const r=s.end(i-1),o=s.start(i);e.push([r,o])}return Ni(e)},hO=function(s,e){let i=null,r=null,o=0;const l=[],c=[];if(!s||!s.length||!e||!e.length)return Ni();let f=s.length;for(;f--;)l.push({time:s.start(f),type:"start"}),l.push({time:s.end(f),type:"end"});for(f=e.length;f--;)l.push({time:e.start(f),type:"start"}),l.push({time:e.end(f),type:"end"});for(l.sort(function(p,v){return p.time-v.time}),f=0;f<l.length;f++)l[f].type==="start"?(o++,o===2&&(i=l[f].time)):l[f].type==="end"&&(o--,o===1&&(r=l[f].time)),i!==null&&r!==null&&(c.push([i,r]),i=null,r=null);return Ni(c)},fS=s=>{const e=[];if(!s||!s.length)return"";for(let i=0;i<s.length;i++)e.push(s.start(i)+" => "+s.end(i));return e.join(", ")},fO=function(s,e,i=1){return((s.length?s.end(s.length-1):0)-e)/i},zo=s=>{const e=[];for(let i=0;i<s.length;i++)e.push({start:s.start(i),end:s.end(i)});return e},pO=function(s,e){if(s===e)return!1;if(!s&&e||!e&&s||s.length!==e.length)return!0;for(let i=0;i<s.length;i++)if(s.start(i)!==e.start(i)||s.end(i)!==e.end(i))return!0;return!1},gy=function(s){if(!(!s||!s.length||!s.end))return s.end(s.length-1)},yy=function(s,e){let i=0;if(!s||!s.length)return i;for(let r=0;r<s.length;r++){const o=s.start(r),l=s.end(r);if(!(e>l)){if(e>o&&e<=l){i+=l-e;continue}i+=l-o}}return i},Ty=(s,e)=>{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(r){i+=r.duration}),(e.preloadHints||[]).forEach(function(r){r.type==="PART"&&(i+=s.partTargetDuration)}),i},vy=s=>(s.segments||[]).reduce((e,i,r)=>(i.parts?i.parts.forEach(function(o,l){e.push({duration:o.duration,segmentIndex:r,partIndex:l,part:o,segment:i})}):e.push({duration:i.duration,segmentIndex:r,partIndex:null,segment:i,part:null}),e),[]),pS=s=>{const e=s.segments&&s.segments.length&&s.segments[s.segments.length-1];return e&&e.parts||[]},mS=({preloadSegment:s})=>{if(!s)return;const{parts:e,preloadHints:i}=s;let r=(i||[]).reduce((o,l)=>o+(l.type==="PART"?1:0),0);return r+=e&&e.length?e.length:0,r},gS=(s,e)=>{if(e.endList)return 0;if(s&&s.suggestedPresentationDelay)return s.suggestedPresentationDelay;const i=pS(e).length>0;return i&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:i&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},mO=function(s,e){let i=0,r=e-s.mediaSequence,o=s.segments[r];if(o){if(typeof o.start<"u")return{result:o.start,precise:!0};if(typeof o.end<"u")return{result:o.end-o.duration,precise:!0}}for(;r--;){if(o=s.segments[r],typeof o.end<"u")return{result:i+o.end,precise:!0};if(i+=Ty(s,o),typeof o.start<"u")return{result:i+o.start,precise:!0}}return{result:i,precise:!1}},gO=function(s,e){let i=0,r,o=e-s.mediaSequence;for(;o<s.segments.length;o++){if(r=s.segments[o],typeof r.start<"u")return{result:r.start-i,precise:!0};if(i+=Ty(s,r),typeof r.end<"u")return{result:r.end-i,precise:!0}}return{result:-1,precise:!1}},yS=function(s,e,i){if(typeof e>"u"&&(e=s.mediaSequence+s.segments.length),e<s.mediaSequence)return 0;const r=mO(s,e);if(r.precise)return r.result;const o=gO(s,e);return o.precise?o.result:r.result+i},TS=function(s,e,i){if(!s)return 0;if(typeof i!="number"&&(i=0),typeof e>"u"){if(s.totalDuration)return s.totalDuration;if(!s.endList)return z.Infinity}return yS(s,e,i)},Nd=function({defaultDuration:s,durationList:e,startIndex:i,endIndex:r}){let o=0;if(i>r&&([i,r]=[r,i]),i<0){for(let l=i;l<Math.min(0,r);l++)o+=s;i=0}for(let l=i;l<r;l++)o+=e[l].duration;return o},vS=function(s,e,i,r){if(!s||!s.segments)return null;if(s.endList)return TS(s);if(e===null)return null;e=e||0;let o=yS(s,s.mediaSequence+s.segments.length,e);return i&&(r=typeof r=="number"?r:gS(null,s),o-=r),Math.max(0,o)},yO=function(s,e,i){const o=e||0;let l=vS(s,e,!0,i);return l===null?Ni():(l<o&&(l=o),Ni(o,l))},TO=function({playlist:s,currentTime:e,startingSegmentIndex:i,startingPartIndex:r,startTime:o,exactManifestTimings:l}){let c=e-o;const f=vy(s);let p=0;for(let v=0;v<f.length;v++){const S=f[v];if(i===S.segmentIndex&&!(typeof r=="number"&&typeof S.partIndex=="number"&&r!==S.partIndex)){p=v;break}}if(c<0){if(p>0)for(let v=p-1;v>=0;v--){const S=f[v];if(c+=S.duration,l){if(c<0)continue}else if(c+ir<=0)continue;return{partIndex:S.partIndex,segmentIndex:S.segmentIndex,startTime:o-Nd({defaultDuration:s.targetDuration,durationList:f,startIndex:p,endIndex:v})}}return{partIndex:f[0]&&f[0].partIndex||null,segmentIndex:f[0]&&f[0].segmentIndex||0,startTime:e}}if(p<0){for(let v=p;v<0;v++)if(c-=s.targetDuration,c<0)return{partIndex:f[0]&&f[0].partIndex||null,segmentIndex:f[0]&&f[0].segmentIndex||0,startTime:e};p=0}for(let v=p;v<f.length;v++){const S=f[v];c-=S.duration;const x=S.duration>ir,D=c===0,k=x&&c+ir>=0;if(!((D||k)&&v!==f.length-1)){if(l){if(c>0)continue}else if(c-ir>=0)continue;return{partIndex:S.partIndex,segmentIndex:S.segmentIndex,startTime:o+Nd({defaultDuration:s.targetDuration,durationList:f,startIndex:p,endIndex:v})}}}return{segmentIndex:f[f.length-1].segmentIndex,partIndex:f[f.length-1].partIndex,startTime:e}},bS=function(s){return s.excludeUntil&&s.excludeUntil>Date.now()},by=function(s){return s.excludeUntil&&s.excludeUntil===1/0},Lp=function(s){const e=bS(s);return!s.disabled&&!e},vO=function(s){return s.disabled},bO=function(s){for(let e=0;e<s.segments.length;e++)if(s.segments[e].key)return!0;return!1},_S=function(s,e){return e.attributes&&e.attributes[s]},_O=function(s,e,i,r=0){return _S("BANDWIDTH",i)?(s*i.attributes.BANDWIDTH-r*8)/e:NaN},_y=(s,e)=>{if(s.playlists.length===1)return!0;const i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return s.playlists.filter(r=>Lp(r)?(r.attributes.BANDWIDTH||0)<i:!1).length===0},Sy=(s,e)=>!s&&!e||!s&&e||s&&!e?!1:!!(s===e||s.id&&e.id&&s.id===e.id||s.resolvedUri&&e.resolvedUri&&s.resolvedUri===e.resolvedUri||s.uri&&e.uri&&s.uri===e.uri),SS=function(s,e){const i=s&&s.mediaGroups&&s.mediaGroups.AUDIO||{};let r=!1;for(const o in i){for(const l in i[o])if(r=e(i[o][l]),r)break;if(r)break}return!!r},kd=s=>{if(!s||!s.playlists||!s.playlists.length)return SS(s,i=>i.playlists&&i.playlists.length||i.uri);for(let e=0;e<s.playlists.length;e++){const i=s.playlists[e],r=i.attributes&&i.attributes.CODECS;if(!(r&&r.split(",").every(l=>s1(l))||SS(s,l=>Sy(i,l))))return!1}return!0};var Cn={liveEdgeDelay:gS,duration:TS,seekable:yO,getMediaInfoForTime:TO,isEnabled:Lp,isDisabled:vO,isExcluded:bS,isIncompatible:by,playlistEnd:vS,isAes:bO,hasAttribute:_S,estimateSegmentRequestTime:_O,isLowestEnabledRendition:_y,isAudioOnly:kd,playlistMatch:Sy,segmentDurationWithParts:Ty};const{log:xS}=F,vu=(s,e)=>`${s}-${e}`,ES=(s,e,i)=>`placeholder-uri-${s}-${e}-${i}`,SO=({onwarn:s,oninfo:e,manifestString:i,customTagParsers:r=[],customTagMappers:o=[],llhls:l})=>{const c=new Hw;s&&c.on("warn",s),e&&c.on("info",e),r.forEach(v=>c.addParser(v)),o.forEach(v=>c.addTagMapper(v)),c.push(i),c.end();const f=c.manifest;if(l||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(v){f.hasOwnProperty(v)&&delete f[v]}),f.segments&&f.segments.forEach(function(v){["parts","preloadHints"].forEach(function(S){v.hasOwnProperty(S)&&delete v[S]})})),!f.targetDuration){let v=10;f.segments&&f.segments.length&&(v=f.segments.reduce((S,x)=>Math.max(S,x.duration),0)),s&&s({message:`manifest has no targetDuration defaulting to ${v}`}),f.targetDuration=v}const p=pS(f);if(p.length&&!f.partTargetDuration){const v=p.reduce((S,x)=>Math.max(S,x.duration),0);s&&(s({message:`manifest has no partTargetDuration defaulting to ${v}`}),xS.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),f.partTargetDuration=v}return f},bu=(s,e)=>{s.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(s.mediaGroups[i])for(const r in s.mediaGroups[i])for(const o in s.mediaGroups[i][r]){const l=s.mediaGroups[i][r][o];e(l,i,r,o)}})},MS=({playlist:s,uri:e,id:i})=>{s.id=i,s.playlistErrors_=0,e&&(s.uri=e),s.attributes=s.attributes||{}},xO=s=>{let e=s.playlists.length;for(;e--;){const i=s.playlists[e];MS({playlist:i,id:vu(e,i.uri)}),i.resolvedUri=Dn(s.uri,i.uri),s.playlists[i.id]=i,s.playlists[i.uri]=i,i.attributes.BANDWIDTH||xS.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},EO=s=>{bu(s,e=>{e.uri&&(e.resolvedUri=Dn(s.uri,e.uri))})},MO=(s,e)=>{const i=vu(0,e),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:z.location.href,resolvedUri:z.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return r.playlists[i]=r.playlists[0],r.playlists[e]=r.playlists[0],r},DS=(s,e,i=ES)=>{s.uri=e;for(let o=0;o<s.playlists.length;o++)if(!s.playlists[o].uri){const l=`placeholder-uri-${o}`;s.playlists[o].uri=l}const r=kd(s);bu(s,(o,l,c,f)=>{if(!o.playlists||!o.playlists.length){if(r&&l==="AUDIO"&&!o.uri)for(let p=0;p<s.playlists.length;p++){const v=s.playlists[p];if(v.attributes&&v.attributes.AUDIO&&v.attributes.AUDIO===c)return}o.playlists=[ei({},o)]}o.playlists.forEach(function(p,v){const S=i(l,c,f,p),x=vu(v,S);p.uri?p.resolvedUri=p.resolvedUri||Dn(s.uri,p.uri):(p.uri=v===0?S:x,p.resolvedUri=p.uri),p.id=p.id||x,p.attributes=p.attributes||{},s.playlists[p.id]=p,s.playlists[p.uri]=p})}),xO(s),EO(s)};class CS{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[i]=e;i.programDateTime!==void 0&&(this.offset_=i.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[i]=e,r=i.startDate.getTime();this.trimProcessedDateRanges_(r),this.pendingDateRanges_=e.reduce((o,l)=>(o.set(l.id,l),o),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},i=[];this.pendingDateRanges_.forEach((r,o)=>{if(!this.processedDateRanges_.has(o)&&(r.startTime=r.startDate.getTime()/1e3-this.offset_,r.processDateRange=()=>this.processDateRange(r),i.push(r),!!r.class))if(e[r.class]){const l=e[r.class].push(r);r.classListIndex=l-1}else e[r.class]=[r],r.classListIndex=0});for(const r of i){const o=e[r.class]||[];r.endDate?r.endTime=r.endDate.getTime()/1e3-this.offset_:r.endOnNext&&o[r.classListIndex+1]?r.endTime=o[r.classListIndex+1].startTime:r.duration?r.endTime=r.startTime+r.duration:r.plannedDuration?r.endTime=r.startTime+r.plannedDuration:r.endTime=r.startTime}return i}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((r,o)=>{r.startDate.getTime()<e&&this.processedDateRanges_.delete(o)})}}const AS=22,Uo=({requestType:s,request:e,error:i,parseFailure:r})=>{const o=e.status<200||e.status>299,l=e.status>=400&&e.status<=499,c={uri:e.uri,requestType:s},f=o&&!l||r;if(i&&l)c.error=ei({},i),c.errorType=F.Error.NetworkRequestFailed;else if(e.aborted)c.errorType=F.Error.NetworkRequestAborted;else if(e.timedout)c.erroType=F.Error.NetworkRequestTimeout;else if(f){const p=r?F.Error.NetworkBodyParserFailed:F.Error.NetworkBadStatus;c.errorType=p,c.status=e.status,c.headers=e.headers}return c},DO=ls("CodecUtils"),wS=function(s){const e=s.attributes||{};if(e.CODECS)return Gs(e.CODECS)},NS=(s,e)=>{const i=e.attributes||{};return s&&s.mediaGroups&&s.mediaGroups.AUDIO&&i.AUDIO&&s.mediaGroups.AUDIO[i.AUDIO]},CO=(s,e)=>{if(!NS(s,e))return!0;const i=e.attributes||{},r=s.mediaGroups.AUDIO[i.AUDIO];for(const o in r)if(!r[o].uri&&!r[o].playlists)return!0;return!1},Od=function(s){const e={};return s.forEach(({mediaType:i,type:r,details:o})=>{e[i]=e[i]||[],e[i].push(n1(`${r}${o}`))}),Object.keys(e).forEach(function(i){if(e[i].length>1){DO(`multiple ${i} codecs found as attributes: ${e[i].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[i]=null;return}e[i]=e[i][0]}),e},kS=function(s){let e=0;return s.audio&&e++,s.video&&e++,e},Id=function(s,e){const i=e.attributes||{},r=Od(wS(e)||[]);if(NS(s,e)&&!r.audio&&!CO(s,e)){const o=Od($w(s,i.AUDIO)||[]);o.audio&&(r.audio=o.audio)}return r},{EventTarget:AO}=F,wO=(s,e)=>{if(e.endList||!e.serverControl)return s;const i={};if(e.serverControl.canBlockReload){const{preloadSegment:r}=e;let o=e.mediaSequence+e.segments.length;if(r){const l=r.parts||[],c=mS(e)-1;c>-1&&c!==l.length-1&&(i._HLS_part=c),(c>-1||l.length)&&o--}i._HLS_msn=o}if(e.serverControl&&e.serverControl.canSkipUntil&&(i._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const r=new z.URL(s);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(o){i.hasOwnProperty(o)&&r.searchParams.set(o,i[o])}),s=r.toString()}return s},NO=(s,e)=>{if(!s)return e;const i=Ct(s,e);if(s.preloadHints&&!e.preloadHints&&delete i.preloadHints,s.parts&&!e.parts)delete i.parts;else if(s.parts&&e.parts)for(let r=0;r<e.parts.length;r++)s.parts&&s.parts[r]&&(i.parts[r]=Ct(s.parts[r],e.parts[r]));return!s.skipped&&e.skipped&&(i.skipped=!1),s.preload&&!e.preload&&(i.preload=!1),i},kO=(s,e,i)=>{const r=s.slice(),o=e.slice();i=i||0;const l=[];let c;for(let f=0;f<o.length;f++){const p=r[f+i],v=o[f];p?(c=p.map||c,l.push(NO(p,v))):(c&&!v.map&&(v.map=c),l.push(v))}return l},OS=(s,e)=>{!s.resolvedUri&&s.uri&&(s.resolvedUri=Dn(e,s.uri)),s.key&&!s.key.resolvedUri&&(s.key.resolvedUri=Dn(e,s.key.uri)),s.map&&!s.map.resolvedUri&&(s.map.resolvedUri=Dn(e,s.map.uri)),s.map&&s.map.key&&!s.map.key.resolvedUri&&(s.map.key.resolvedUri=Dn(e,s.map.key.uri)),s.parts&&s.parts.length&&s.parts.forEach(i=>{i.resolvedUri||(i.resolvedUri=Dn(e,i.uri))}),s.preloadHints&&s.preloadHints.length&&s.preloadHints.forEach(i=>{i.resolvedUri||(i.resolvedUri=Dn(e,i.uri))})},IS=function(s){const e=s.segments||[],i=s.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints){for(let r=0;r<i.preloadHints.length;r++)if(i.preloadHints[r].type==="MAP")return e}i.duration=s.targetDuration,i.preload=!0,e.push(i)}return e},LS=(s,e)=>s===e||s.segments&&e.segments&&s.segments.length===e.segments.length&&s.endList===e.endList&&s.mediaSequence===e.mediaSequence&&s.preloadSegment===e.preloadSegment,xy=(s,e,i=LS)=>{const r=Ct(s,{}),o=r.playlists[e.id];if(!o||i(o,e))return null;e.segments=IS(e);const l=Ct(o,e);if(l.preloadSegment&&!e.preloadSegment&&delete l.preloadSegment,o.segments){if(e.skip){e.segments=e.segments||[];for(let c=0;c<e.skip.skippedSegments;c++)e.segments.unshift({skipped:!0})}l.segments=kO(o.segments,e.segments,e.mediaSequence-o.mediaSequence)}l.segments.forEach(c=>{OS(c,l.resolvedUri)});for(let c=0;c<r.playlists.length;c++)r.playlists[c].id===e.id&&(r.playlists[c]=l);return r.playlists[e.id]=l,r.playlists[e.uri]=l,bu(s,(c,f,p,v)=>{if(c.playlists)for(let S=0;S<c.playlists.length;S++)e.id===c.playlists[S].id&&(c.playlists[S]=l)}),r},Ey=(s,e)=>{const i=s.segments||[],r=i[i.length-1],o=r&&r.parts&&r.parts[r.parts.length-1],l=o&&o.duration||r&&r.duration;return e&&l?l*1e3:(s.partTargetDuration||s.targetDuration||10)*500},RS=(s,e,i)=>{if(!s)return;const r=[];return s.forEach(o=>{if(!o.attributes)return;const{BANDWIDTH:l,RESOLUTION:c,CODECS:f}=o.attributes;r.push({id:o.id,bandwidth:l,resolution:c,codecs:f})}),{type:e,isLive:i,renditions:r}};class _u extends AO{constructor(e,i,r={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=ls("PlaylistLoader");const{withCredentials:o=!1}=r;this.src=e,this.vhs_=i,this.withCredentials=o,this.addDateRangesToTextTrack_=r.addDateRangesToTextTrack;const l=i.options_;this.customTagParsers=l&&l.customTagParsers||[],this.customTagMappers=l&&l.customTagMappers||[],this.llhls=l&&l.llhls,this.dateRangesStorage_=new CS,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const i=this.dateRangesStorage_.getDateRangesToProcess();!i.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(i)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let i=Dn(this.main.uri,e.uri);this.llhls&&(i=wO(i,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials,requestType:"hls-playlist"},(r,o)=>{if(this.request){if(r)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,i,r){const{uri:o,id:l}=i;this.request=null,r&&(this.state=r),this.error={playlist:this.main.playlists[l],status:e.status,message:`HLS playlist request error at URL: ${o}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Uo({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:i}){try{const r=SO({onwarn:({message:o})=>this.logger_(`m3u8-parser warn for ${e}: ${o}`),oninfo:({message:o})=>this.logger_(`m3u8-parser info for ${e}: ${o}`),manifestString:i,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!r.playlists||!r.playlists.length||this.excludeAudioOnlyVariants(r.playlists),r}catch(r){this.error=r,this.error.metadata={errorType:F.Error.StreamingHlsPlaylistParserError,error:r}}}excludeAudioOnlyVariants(e){const i=r=>{const o=r.attributes||{},{width:l,height:c}=o.RESOLUTION||{};if(l&&c)return!0;const f=wS(r)||[];return!!Od(f).video};e.some(i)&&e.forEach(r=>{i(r)||(r.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:i,url:r,id:o}){this.request=null,this.state="HAVE_METADATA";const l={playlistInfo:{type:"media",uri:r}};this.trigger({type:"playlistparsestart",metadata:l});const c=i||this.parseManifest_({url:r,manifestString:e});c.lastRequest=Date.now(),MS({playlist:c,uri:r,id:o});const f=xy(this.main,c);this.targetDuration=c.partTargetDuration||c.targetDuration,this.pendingMedia_=null,f?(this.main=f,this.media_=this.main.playlists[o]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Ey(this.media(),!!f)),l.parsedPlaylist=RS(this.main.playlists,l.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:l}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),z.clearTimeout(this.mediaUpdateTimeout),z.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new CS,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,i){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(z.clearTimeout(this.finalRenditionTimeout),i){const f=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=z.setTimeout(this.media.bind(this,e,!1),f);return}const r=this.state,o=!this.media_||e.id!==this.media_.id,l=this.main.playlists[e.id];if(l&&l.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,o&&(this.trigger("mediachanging"),r==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(Ey(e,!0)),!o)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const c={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:c}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(f,p)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=Op(e.resolvedUri,p),f)return this.playlistRequestError(this.request,e,r);this.trigger({type:"playlistrequestcomplete",metadata:c}),this.haveMetadata({playlistString:p.responseText,url:e.uri,id:e.id}),r==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(z.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(z.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const i=this.media();if(e){const r=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=z.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},r);return}if(!this.started){this.start();return}i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(z.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=z.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=z.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,r)=>{if(!this.request)return;if(this.request=null,i)return this.error={status:r.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:r.responseText,code:2,metadata:Uo({requestType:r.requestType,request:r,error:i})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=Op(this.src,r),this.trigger({type:"playlistparsestart",metadata:e});const o=this.parseManifest_({manifestString:r.responseText,url:this.src});e.parsedPlaylist=RS(o.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(o)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,DS(this.main,this.srcUri()),e.playlists.forEach(r=>{r.segments=IS(r),r.segments.forEach(o=>{OS(o,r.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const i=this.srcUri()||z.location.href;this.main=MO(e,i),this.haveMetadata({playlistObject:e,url:i,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,i){const r=this.main,o=e.ID;let l=r.playlists.length;for(;l--;){const c=r.playlists[l];if(c.attributes["PATHWAY-ID"]===o){const f=c.resolvedUri,p=c.id;if(i){const v=this.createCloneURI_(c.resolvedUri,e),S=vu(o,v),x=this.createCloneAttributes_(o,c.attributes),D=this.createClonePlaylist_(c,S,e,x);r.playlists[l]=D,r.playlists[S]=D,r.playlists[v]=D}else r.playlists.splice(l,1);delete r.playlists[p],delete r.playlists[f]}}this.updateOrDeleteCloneMedia(e,i)}updateOrDeleteCloneMedia(e,i){const r=this.main,o=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(l=>{if(!(!r.mediaGroups[l]||!r.mediaGroups[l][o])){for(const c in r.mediaGroups[l])if(c===o){for(const f in r.mediaGroups[l][c])r.mediaGroups[l][c][f].playlists.forEach((v,S)=>{const x=r.playlists[v.id],D=x.id,k=x.resolvedUri;delete r.playlists[D],delete r.playlists[k]});delete r.mediaGroups[l][c]}}}),i&&this.createClonedMediaGroups_(e)}addClonePathway(e,i={}){const r=this.main,o=r.playlists.length,l=this.createCloneURI_(i.resolvedUri,e),c=vu(e.ID,l),f=this.createCloneAttributes_(e.ID,i.attributes),p=this.createClonePlaylist_(i,c,e,f);r.playlists[o]=p,r.playlists[c]=p,r.playlists[l]=p,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const i=e.ID,r=e["BASE-ID"],o=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(l=>{if(!(!o.mediaGroups[l]||o.mediaGroups[l][i]))for(const c in o.mediaGroups[l]){if(c===r)o.mediaGroups[l][i]={};else continue;for(const f in o.mediaGroups[l][c]){const p=o.mediaGroups[l][c][f];o.mediaGroups[l][i][f]=ei({},p);const v=o.mediaGroups[l][i][f],S=this.createCloneURI_(p.resolvedUri,e);v.resolvedUri=S,v.uri=S,v.playlists=[],p.playlists.forEach((x,D)=>{const k=o.playlists[x.id],I=ES(l,i,f),C=vu(i,I);if(k&&!o.playlists[C]){const P=this.createClonePlaylist_(k,C,e),U=P.resolvedUri;o.playlists[C]=P,o.playlists[U]=P}v.playlists[D]=this.createClonePlaylist_(x,C,e)})}}})}createClonePlaylist_(e,i,r,o){const l=this.createCloneURI_(e.resolvedUri,r),c={resolvedUri:l,uri:l,id:i};return e.segments&&(c.segments=[]),o&&(c.attributes=o),Ct(e,c)}createCloneURI_(e,i){const r=new URL(e);r.hostname=i["URI-REPLACEMENT"].HOST;const o=i["URI-REPLACEMENT"].PARAMS;for(const l of Object.keys(o))r.searchParams.set(l,o[l]);return r.href}createCloneAttributes_(e,i){const r={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(o=>{i[o]&&(r[o]=e)}),r}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const r in e.contentProtection){const o=e.contentProtection[r].attributes.keyId;o&&i.add(o.toLowerCase())}return i}}}const My=function(s,e,i,r){const o=s.responseType==="arraybuffer"?s.response:s.responseText;!e&&o&&(s.responseTime=Date.now(),s.roundTripTime=s.responseTime-s.requestTime,s.bytesReceived=o.byteLength||o.length,s.bandwidth||(s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3))),i.headers&&(s.responseHeaders=i.headers),e&&e.code==="ETIMEDOUT"&&(s.timedout=!0),!e&&!s.aborted&&i.statusCode!==200&&i.statusCode!==206&&i.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(s&&(o||s.responseText)))),r(e,s)},OO=(s,e)=>{if(!s||!s.size)return;let i=e;return s.forEach(r=>{i=r(i)}),i},IO=(s,e,i,r)=>{!s||!s.size||s.forEach(o=>{o(e,i,r)})},jS=function(){const s=function e(i,r){i=Ct({timeout:45e3},i);const o=e.beforeRequest||F.Vhs.xhr.beforeRequest,l=e._requestCallbackSet||F.Vhs.xhr._requestCallbackSet||new Set,c=e._responseCallbackSet||F.Vhs.xhr._responseCallbackSet;o&&typeof o=="function"&&(F.log.warn("beforeRequest is deprecated, use onRequest instead."),l.add(o));const f=F.Vhs.xhr.original===!0?F.xhr:F.Vhs.xhr,p=OO(l,i);l.delete(o);const v=f(p||i,function(x,D){return IO(c,v,x,D),My(v,x,D,r)}),S=v.abort;return v.abort=function(){return v.aborted=!0,S.apply(v,arguments)},v.uri=i.uri,v.requestType=i.requestType,v.requestTime=Date.now(),v};return s.original=!0,s},LO=function(s){let e;const i=s.offset;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=z.BigInt(s.offset)+z.BigInt(s.length)-z.BigInt(1):e=s.offset+s.length-1,"bytes="+i+"-"+e},Dy=function(s){const e={};return s.byterange&&(e.Range=LO(s.byterange)),e},RO=function(s,e){return s.start(e)+"-"+s.end(e)},jO=function(s,e){const i=s.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},zO=function(s){return s>=32&&s<126?String.fromCharCode(s):"."},zS=function(s){const e={};return Object.keys(s).forEach(i=>{const r=s[i];o1(r)?e[i]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:e[i]=r}),e},Rp=function(s){const e=s.byterange||{length:1/0,offset:0};return[e.length,e.offset,s.resolvedUri].join(",")},US=function(s){return s.resolvedUri},PS=s=>{const e=Array.prototype.slice.call(s),i=16;let r="",o,l;for(let c=0;c<e.length/i;c++)o=e.slice(c*i,c*i+i).map(jO).join(""),l=e.slice(c*i,c*i+i).map(zO).join(""),r+=o+" "+l+`
`;return r};var UO=Object.freeze({__proto__:null,createTransferableMessage:zS,initSegmentId:Rp,segmentKeyId:US,hexDump:PS,tagDump:({bytes:s})=>PS(s),textRanges:s=>{let e="",i;for(i=0;i<s.length;i++)e+=RO(s,i)+" ";return e}});const BS=.25,PO=(s,e)=>{if(!e.dateTimeObject)return null;const i=e.videoTimingInfo.transmuxerPrependedSeconds,o=e.videoTimingInfo.transmuxedPresentationStart+i,l=s-o;return new Date(e.dateTimeObject.getTime()+l*1e3)},BO=s=>s.transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds,qO=(s,e)=>{let i;try{i=new Date(s)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let r=e.segments[0];if(i<new Date(r.dateTimeObject))return null;for(let p=0;p<e.segments.length-1;p++){r=e.segments[p];const v=new Date(e.segments[p+1].dateTimeObject);if(i<v)break}const o=e.segments[e.segments.length-1],l=o.dateTimeObject,c=o.videoTimingInfo?BO(o.videoTimingInfo):o.duration+o.duration*BS,f=new Date(l.getTime()+c*1e3);return i>f?null:(i>new Date(l)&&(r=o),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Cn.duration(e,e.mediaSequence+e.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})},FO=(s,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let i=0,r;for(let l=0;l<e.segments.length&&(r=e.segments[l],i=r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationEnd:i+r.duration,!(s<=i));l++);const o=e.segments[e.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<s)return null;if(s>i){if(s>i+o.duration*BS)return null;r=o}return{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:i-r.duration,type:r.videoTimingInfo?"accurate":"estimate"}},HO=(s,e)=>{let i,r;try{i=new Date(s),r=new Date(e)}catch{}const o=i.getTime();return(r.getTime()-o)/1e3},VO=s=>{if(!s.segments||s.segments.length===0)return!1;for(let e=0;e<s.segments.length;e++)if(!s.segments[e].dateTimeObject)return!1;return!0},$O=({playlist:s,time:e=void 0,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!s||e===void 0)return i({message:"getProgramTime: playlist and time must be provided"});const r=FO(e,s);if(!r)return i({message:"valid programTime was not found"});if(r.type==="estimate")return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:r.estimatedStart});const o={mediaSeconds:e},l=PO(e,r.segment);return l&&(o.programDateTime=l.toISOString()),i(null,o)},qS=({programTime:s,playlist:e,retryCount:i=2,seekTo:r,pauseAfterSeek:o=!0,tech:l,callback:c})=>{if(!c)throw new Error("seekToProgramTime: callback must be provided");if(typeof s>"u"||!e||!r)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!VO(e))return c({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const f=qO(s,e);if(!f)return c({message:`${s} was not found in the stream`});const p=f.segment,v=HO(p.dateTimeObject,s);if(f.type==="estimate"){if(i===0)return c({message:`${s} is not buffered yet. Try again`});r(f.estimatedStart+v),l.one("seeked",()=>{qS({programTime:s,playlist:e,retryCount:i-1,seekTo:r,pauseAfterSeek:o,tech:l,callback:c})});return}const S=p.start+v,x=()=>c(null,l.currentTime());l.one("seeked",x),o&&l.pause(),r(S)},Cy=(s,e)=>{if(s.readyState===4)return e()},YO=(s,e,i,r)=>{let o=[],l,c=!1;const f=function(x,D,k,I){return D.abort(),c=!0,i(x,D,k,I)},p=function(x,D){if(c)return;if(x)return x.metadata=Uo({requestType:r,request:D,error:x}),f(x,D,"",o);const k=D.responseText.substring(o&&o.byteLength||0,D.responseText.length);if(o=t4(o,l1(k,!0)),l=l||gd(o),o.length<10||l&&o.length<l+2)return Cy(D,()=>f(x,D,"",o));const I=g0(o);return I==="ts"&&o.length<188?Cy(D,()=>f(x,D,"",o)):!I&&o.length<376?Cy(D,()=>f(x,D,"",o)):f(null,D,I,o)},S=e({uri:s,beforeSend(x){x.overrideMimeType("text/plain; charset=x-user-defined"),x.addEventListener("progress",function({total:D,loaded:k}){return My(x,null,{statusCode:x.status},p)})}},function(x,D){return My(S,x,D,p)});return S},{EventTarget:QO}=F,FS=function(s,e){if(!LS(s,e)||s.sidx&&e.sidx&&(s.sidx.offset!==e.sidx.offset||s.sidx.length!==e.sidx.length))return!1;if(!s.sidx&&e.sidx||s.sidx&&!e.sidx||s.segments&&!e.segments||!s.segments&&e.segments)return!1;if(!s.segments&&!e.segments)return!0;for(let i=0;i<s.segments.length;i++){const r=s.segments[i],o=e.segments[i];if(r.uri!==o.uri)return!1;if(!r.byterange&&!o.byterange)continue;const l=r.byterange,c=o.byterange;if(l&&!c||!l&&c||l.offset!==c.offset||l.length!==c.length)return!1}return!0},GO=(s,e,i,r)=>{const o=r.attributes.NAME||i;return`placeholder-uri-${s}-${e}-${o}`},XO=({mainXml:s,srcUrl:e,clientOffset:i,sidxMapping:r,previousManifest:o})=>{const l=SN(s,{manifestUri:e,clientOffset:i,sidxMapping:r,previousManifest:o});return DS(l,e,GO),l},WO=(s,e)=>{bu(s,(i,r,o,l)=>{(!e.mediaGroups[r][o]||!(l in e.mediaGroups[r][o]))&&delete s.mediaGroups[r][o][l]})},KO=(s,e,i)=>{let r=!0,o=Ct(s,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let l=0;l<e.playlists.length;l++){const c=e.playlists[l];if(c.sidx){const p=Yf(c.sidx);i&&i[p]&&i[p].sidx&&c0(c,i[p].sidx,c.sidx.resolvedUri)}const f=xy(o,c,FS);f&&(o=f,r=!1)}return bu(e,(l,c,f,p)=>{if(l.playlists&&l.playlists.length){const v=l.playlists[0].id,S=xy(o,l.playlists[0],FS);S&&(o=S,p in o.mediaGroups[c][f]||(o.mediaGroups[c][f][p]=l),o.mediaGroups[c][f][p].playlists[0]=o.playlists[v],r=!1)}}),WO(o,e),e.minimumUpdatePeriod!==s.minimumUpdatePeriod&&(r=!1),r?null:o},ZO=(s,e)=>(!s.map&&!e.map||!!(s.map&&e.map&&s.map.byterange.offset===e.map.byterange.offset&&s.map.byterange.length===e.map.byterange.length))&&s.uri===e.uri&&s.byterange.offset===e.byterange.offset&&s.byterange.length===e.byterange.length,HS=(s,e)=>{const i={};for(const r in s){const l=s[r].sidx;if(l){const c=Yf(l);if(!e[c])break;const f=e[c].sidxInfo;ZO(f,l)&&(i[c]=e[c])}}return i},JO=(s,e)=>{let r=HS(s.playlists,e);return bu(s,(o,l,c,f)=>{if(o.playlists&&o.playlists.length){const p=o.playlists;r=Ct(r,HS(p,e))}}),r};class Ay extends QO{constructor(e,i,r={},o){super(),this.isPaused_=!0,this.mainPlaylistLoader_=o||this,o||(this.isMain_=!0);const{withCredentials:l=!1}=r;if(this.vhs_=i,this.withCredentials=l,this.addMetadataToTextTrack=r.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=ls("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,i,r){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:i.status,message:"DASH request error at URL: "+i.uri,response:i.response,code:2,metadata:e.metadata},r&&(this.state=r),this.trigger("error"),!0}addSidxSegments_(e,i,r){const o=e.sidx&&Yf(e.sidx);if(!e.sidx||!o||this.mainPlaylistLoader_.sidxMapping_[o]){z.clearTimeout(this.mediaRequest_),this.mediaRequest_=z.setTimeout(()=>r(!1),0);return}const l=Op(e.sidx.resolvedUri),c=(p,v)=>{if(this.requestErrored_(p,v,i))return;const S=this.mainPlaylistLoader_.sidxMapping_,{requestType:x}=v;let D;try{D=AN(Ve(v.response).subarray(8))}catch(k){k.metadata=Uo({requestType:x,request:v,parseFailure:!0}),this.requestErrored_(k,v,i);return}return S[o]={sidxInfo:e.sidx,sidx:D},c0(e,D,e.sidx.resolvedUri),r(!0)},f="dash-sidx";this.request=YO(l,this.vhs_.xhr,(p,v,S,x)=>{if(p)return c(p,v);if(!S||S!=="mp4"){const I=S||"unknown";return c({status:v.status,message:`Unsupported ${I} container type for sidx segment at URL: ${l}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},v)}const{offset:D,length:k}=e.sidx.byterange;if(x.length>=k+D)return c(p,{response:x.subarray(D,D+k),status:v.status,uri:v.uri});this.request=this.vhs_.xhr({uri:l,responseType:"arraybuffer",requestType:"dash-sidx",headers:Dy({byterange:e.sidx.byterange})},c)},f)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},z.clearTimeout(this.minimumUpdatePeriodTimeout_),z.clearTimeout(this.mediaRequest_),z.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const i=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,r&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,o=>{this.haveMetadata({startingState:i,playlist:e})}))}haveMetadata({startingState:e,playlist:i}){this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,z.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(i.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),z.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(z.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,z.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const i=this.media();if(e){const r=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=z.setTimeout(()=>this.load(),r);return}if(!this.started){this.start();return}i&&!i.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){z.clearTimeout(this.mediaRequest_),this.mediaRequest_=z.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,i)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(r,o)=>{if(r){const{requestType:c}=o;r.metadata=Uo({requestType:c,request:o,error:r})}if(this.requestErrored_(r,o)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:i});const l=o.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=o.responseText,o.responseHeaders&&o.responseHeaders.date?this.mainLoaded_=Date.parse(o.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Op(this.mainPlaylistLoader_.srcUrl,o),l){this.handleMain_(),this.syncClientServerClock_(()=>e(o,l));return}return e(o,l)})}syncClientServerClock_(e){const i=xN(this.mainPlaylistLoader_.mainXml_);if(i===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(i.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=i.value-Date.now(),e();this.request=this.vhs_.xhr({uri:Dn(this.mainPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(r,o)=>{if(!this.request)return;if(r){const{requestType:c}=o;return this.error.metadata=Uo({requestType:c,request:o,error:r}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let l;i.method==="HEAD"?!o.responseHeaders||!o.responseHeaders.date?l=this.mainLoaded_:l=Date.parse(o.responseHeaders.date):l=Date.parse(o.responseText),this.mainPlaylistLoader_.clientOffset_=l-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){z.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:i});let r;try{r=XO({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(l){this.error=l,this.error.metadata={errorType:F.Error.StreamingDashManifestParserError,error:l},this.trigger("error")}e&&(r=KO(e,r,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=r||e;const o=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(o&&o!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=o),(!e||r&&r.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(r),r){const{duration:l,endList:c}=r,f=[];r.playlists.forEach(v=>{f.push({id:v.id,bandwidth:v.attributes.BANDWIDTH,resolution:v.attributes.RESOLUTION,codecs:v.attributes.CODECS})});const p={duration:l,isLive:!c,renditions:f};i.parsedManifest=p,this.trigger({type:"manifestparsecomplete",metadata:i})}return!!r}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(z.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let i=e.main&&e.main.minimumUpdatePeriod;if(i===0&&(e.media()?i=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof i!="number"||i<=0){i<0&&this.logger_(`found invalid minimumUpdatePeriod of ${i}, not setting a timeout`);return}this.createMUPTimeout_(i)}createMUPTimeout_(e){const i=this.mainPlaylistLoader_;i.minimumUpdatePeriodTimeout_=z.setTimeout(()=>{i.minimumUpdatePeriodTimeout_=null,i.trigger("minimumUpdatePeriod"),i.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,i)=>{i&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=JO(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,r=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const i=this.mainPlaylistLoader_.main.playlists,r=!this.media_||this.media_!==i[e];if(r?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const o=()=>{this.media().endList||(this.mediaUpdateTimeout=z.setTimeout(()=>{this.trigger("mediaupdatetimeout"),o()},Ey(this.media(),!!r)))};o()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const i=this.mainPlaylistLoader_.main.eventStream.map(r=>({cueTime:r.start,frames:[{data:r.messageData}]}));this.addMetadataToTextTrack("EventStream",i,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const r in e.contentProtection){const o=e.contentProtection[r].attributes["cenc:default_KID"];o&&i.add(o.replace(/-/g,"").toLowerCase())}return i}}}var ki={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const eI=s=>{const e=new Uint8Array(new ArrayBuffer(s.length));for(let i=0;i<s.length;i++)e[i]=s.charCodeAt(i);return e.buffer},VS=function(s){return s.on=s.addEventListener,s.off=s.removeEventListener,s},tI=function(s){try{return URL.createObjectURL(new Blob([s],{type:"application/javascript"}))}catch{const i=new BlobBuilder;return i.append(s),URL.createObjectURL(i.getBlob())}},$S=function(s){return function(){const e=tI(s),i=VS(new Worker(e));i.objURL=e;const r=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(e),r.call(this)},i}},YS=function(s){return`var browserWorkerPolyFill = ${VS.toString()};
browserWorkerPolyFill(self);
`+s},QS=function(s){return s.toString().replace(/^function.+?{/,"").slice(0,-1)},iI=YS(QS(function(){var s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var h={};this.on=function(g,y){h[g]||(h[g]=[]),h[g]=h[g].concat(y)},this.off=function(g,y){var T;return h[g]?(T=h[g].indexOf(y),h[g]=h[g].slice(),h[g].splice(T,1),T>-1):!1},this.trigger=function(g){var y,T,b,E;if(y=h[g],!!y)if(arguments.length===2)for(b=y.length,T=0;T<b;++T)y[T].call(this,arguments[1]);else{for(E=[],T=arguments.length,T=1;T<arguments.length;++T)E.push(arguments[T]);for(b=y.length,T=0;T<b;++T)y[T].apply(this,E)}},this.dispose=function(){h={}}}};e.prototype.pipe=function(h){return this.on("data",function(g){h.push(g)}),this.on("done",function(g){h.flush(g)}),this.on("partialdone",function(g){h.partialFlush(g)}),this.on("endedtimeline",function(g){h.endTimeline(g)}),this.on("reset",function(g){h.reset(g)}),h},e.prototype.push=function(h){this.trigger("data",h)},e.prototype.flush=function(h){this.trigger("done",h)},e.prototype.partialFlush=function(h){this.trigger("partialdone",h)},e.prototype.endTimeline=function(h){this.trigger("endedtimeline",h)},e.prototype.reset=function(h){this.trigger("reset",h)};var i=e,r=Math.pow(2,32),o=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y;return g.getBigUint64?(y=g.getBigUint64(0),y<Number.MAX_SAFE_INTEGER?Number(y):y):g.getUint32(0)*r+g.getUint32(4)},l={getUint64:o,MAX_UINT32:r},c=l.MAX_UINT32,f,p,v,S,x,D,k,I,C,P,U,Y,$,G,W,oe,K,de,fe,me,le,_e,he,ge,Ae,ne,Se,pe,Ue,se,Oe,we,qe,We,Ze,He;(function(){var h;if(he={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(h in he)he.hasOwnProperty(h)&&(he[h]=[h.charCodeAt(0),h.charCodeAt(1),h.charCodeAt(2),h.charCodeAt(3)]);ge=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),ne=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),Ae=new Uint8Array([0,0,0,1]),Se=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]),pe=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]),Ue={video:Se,audio:pe},we=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Oe=new Uint8Array([0,0,0,0,0,0,0,0]),qe=new Uint8Array([0,0,0,0,0,0,0,0]),We=qe,Ze=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),He=qe,se=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),f=function(h){var g=[],y=0,T,b,E;for(T=1;T<arguments.length;T++)g.push(arguments[T]);for(T=g.length;T--;)y+=g[T].byteLength;for(b=new Uint8Array(y+8),E=new DataView(b.buffer,b.byteOffset,b.byteLength),E.setUint32(0,b.byteLength),b.set(h,4),T=0,y=8;T<g.length;T++)b.set(g[T],y),y+=g[T].byteLength;return b},p=function(){return f(he.dinf,f(he.dref,we))},v=function(h){return f(he.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,h.audioobjecttype<<3|h.samplingfrequencyindex>>>1,h.samplingfrequencyindex<<7|h.channelcount<<3,6,1,2]))},S=function(){return f(he.ftyp,ge,Ae,ge,ne)},oe=function(h){return f(he.hdlr,Ue[h])},x=function(h){return f(he.mdat,h)},W=function(h){var g=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,h.duration>>>24&255,h.duration>>>16&255,h.duration>>>8&255,h.duration&255,85,196,0,0]);return h.samplerate&&(g[12]=h.samplerate>>>24&255,g[13]=h.samplerate>>>16&255,g[14]=h.samplerate>>>8&255,g[15]=h.samplerate&255),f(he.mdhd,g)},G=function(h){return f(he.mdia,W(h),oe(h.type),k(h))},D=function(h){return f(he.mfhd,new Uint8Array([0,0,0,0,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255]))},k=function(h){return f(he.minf,h.type==="video"?f(he.vmhd,se):f(he.smhd,Oe),p(),de(h))},I=function(h,g){for(var y=[],T=g.length;T--;)y[T]=me(g[T]);return f.apply(null,[he.moof,D(h)].concat(y))},C=function(h){for(var g=h.length,y=[];g--;)y[g]=Y(h[g]);return f.apply(null,[he.moov,U(4294967295)].concat(y).concat(P(h)))},P=function(h){for(var g=h.length,y=[];g--;)y[g]=le(h[g]);return f.apply(null,[he.mvex].concat(y))},U=function(h){var g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,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 f(he.mvhd,g)},K=function(h){var g=h.samples||[],y=new Uint8Array(4+g.length),T,b;for(b=0;b<g.length;b++)T=g[b].flags,y[b+4]=T.dependsOn<<4|T.isDependedOn<<2|T.hasRedundancy;return f(he.sdtp,y)},de=function(h){return f(he.stbl,fe(h),f(he.stts,He),f(he.stsc,We),f(he.stsz,Ze),f(he.stco,qe))},function(){var h,g;fe=function(y){return f(he.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),y.type==="video"?h(y):g(y))},h=function(y){var T=y.sps||[],b=y.pps||[],E=[],w=[],O,R;for(O=0;O<T.length;O++)E.push((T[O].byteLength&65280)>>>8),E.push(T[O].byteLength&255),E=E.concat(Array.prototype.slice.call(T[O]));for(O=0;O<b.length;O++)w.push((b[O].byteLength&65280)>>>8),w.push(b[O].byteLength&255),w=w.concat(Array.prototype.slice.call(b[O]));if(R=[he.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,(y.width&65280)>>8,y.width&255,(y.height&65280)>>8,y.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),f(he.avcC,new Uint8Array([1,y.profileIdc,y.profileCompatibility,y.levelIdc,255].concat([T.length],E,[b.length],w))),f(he.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],y.sarRatio){var j=y.sarRatio[0],H=y.sarRatio[1];R.push(f(he.pasp,new Uint8Array([(j&4278190080)>>24,(j&16711680)>>16,(j&65280)>>8,j&255,(H&4278190080)>>24,(H&16711680)>>16,(H&65280)>>8,H&255])))}return f.apply(null,R)},g=function(y){return f(he.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(y.channelcount&65280)>>8,y.channelcount&255,(y.samplesize&65280)>>8,y.samplesize&255,0,0,0,0,(y.samplerate&65280)>>8,y.samplerate&255,0,0]),v(y))}}(),$=function(h){var g=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,0,(h.duration&4278190080)>>24,(h.duration&16711680)>>16,(h.duration&65280)>>8,h.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(h.width&65280)>>8,h.width&255,0,0,(h.height&65280)>>8,h.height&255,0,0]);return f(he.tkhd,g)},me=function(h){var g,y,T,b,E,w,O;return g=f(he.tfhd,new Uint8Array([0,0,0,58,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),w=Math.floor(h.baseMediaDecodeTime/c),O=Math.floor(h.baseMediaDecodeTime%c),y=f(he.tfdt,new Uint8Array([1,0,0,0,w>>>24&255,w>>>16&255,w>>>8&255,w&255,O>>>24&255,O>>>16&255,O>>>8&255,O&255])),E=32+20+8+16+8+8,h.type==="audio"?(T=_e(h,E),f(he.traf,g,y,T)):(b=K(h),T=_e(h,b.length+E),f(he.traf,g,y,T,b))},Y=function(h){return h.duration=h.duration||4294967295,f(he.trak,$(h),G(h))},le=function(h){var g=new Uint8Array([0,0,0,0,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return h.type!=="video"&&(g[g.length-1]=0),f(he.trex,g)},function(){var h,g,y;y=function(T,b){var E=0,w=0,O=0,R=0;return T.length&&(T[0].duration!==void 0&&(E=1),T[0].size!==void 0&&(w=2),T[0].flags!==void 0&&(O=4),T[0].compositionTimeOffset!==void 0&&(R=8)),[0,0,E|w|O|R,1,(T.length&4278190080)>>>24,(T.length&16711680)>>>16,(T.length&65280)>>>8,T.length&255,(b&4278190080)>>>24,(b&16711680)>>>16,(b&65280)>>>8,b&255]},g=function(T,b){var E,w,O,R,j,H;for(R=T.samples||[],b+=8+12+16*R.length,O=y(R,b),w=new Uint8Array(O.length+R.length*16),w.set(O),E=O.length,H=0;H<R.length;H++)j=R[H],w[E++]=(j.duration&4278190080)>>>24,w[E++]=(j.duration&16711680)>>>16,w[E++]=(j.duration&65280)>>>8,w[E++]=j.duration&255,w[E++]=(j.size&4278190080)>>>24,w[E++]=(j.size&16711680)>>>16,w[E++]=(j.size&65280)>>>8,w[E++]=j.size&255,w[E++]=j.flags.isLeading<<2|j.flags.dependsOn,w[E++]=j.flags.isDependedOn<<6|j.flags.hasRedundancy<<4|j.flags.paddingValue<<1|j.flags.isNonSyncSample,w[E++]=j.flags.degradationPriority&61440,w[E++]=j.flags.degradationPriority&15,w[E++]=(j.compositionTimeOffset&4278190080)>>>24,w[E++]=(j.compositionTimeOffset&16711680)>>>16,w[E++]=(j.compositionTimeOffset&65280)>>>8,w[E++]=j.compositionTimeOffset&255;return f(he.trun,w)},h=function(T,b){var E,w,O,R,j,H;for(R=T.samples||[],b+=8+12+8*R.length,O=y(R,b),E=new Uint8Array(O.length+R.length*8),E.set(O),w=O.length,H=0;H<R.length;H++)j=R[H],E[w++]=(j.duration&4278190080)>>>24,E[w++]=(j.duration&16711680)>>>16,E[w++]=(j.duration&65280)>>>8,E[w++]=j.duration&255,E[w++]=(j.size&4278190080)>>>24,E[w++]=(j.size&16711680)>>>16,E[w++]=(j.size&65280)>>>8,E[w++]=j.size&255;return f(he.trun,E)},_e=function(T,b){return T.type==="audio"?h(T,b):g(T,b)}}();var Fe={ftyp:S,mdat:x,moof:I,moov:C,initSegment:function(h){var g=S(),y=C(h),T;return T=new Uint8Array(g.byteLength+y.byteLength),T.set(g),T.set(y,g.byteLength),T}},dt=function(h){var g,y,T=[],b=[];for(b.byteLength=0,b.nalCount=0,b.duration=0,T.byteLength=0,g=0;g<h.length;g++)y=h[g],y.nalUnitType==="access_unit_delimiter_rbsp"?(T.length&&(T.duration=y.dts-T.dts,b.byteLength+=T.byteLength,b.nalCount+=T.length,b.duration+=T.duration,b.push(T)),T=[y],T.byteLength=y.data.byteLength,T.pts=y.pts,T.dts=y.dts):(y.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(T.keyFrame=!0),T.duration=y.dts-T.dts,T.byteLength+=y.data.byteLength,T.push(y));return b.length&&(!T.duration||T.duration<=0)&&(T.duration=b[b.length-1].duration),b.byteLength+=T.byteLength,b.nalCount+=T.length,b.duration+=T.duration,b.push(T),b},Ht=function(h){var g,y,T=[],b=[];for(T.byteLength=0,T.nalCount=0,T.duration=0,T.pts=h[0].pts,T.dts=h[0].dts,b.byteLength=0,b.nalCount=0,b.duration=0,b.pts=h[0].pts,b.dts=h[0].dts,g=0;g<h.length;g++)y=h[g],y.keyFrame?(T.length&&(b.push(T),b.byteLength+=T.byteLength,b.nalCount+=T.nalCount,b.duration+=T.duration),T=[y],T.nalCount=y.length,T.byteLength=y.byteLength,T.pts=y.pts,T.dts=y.dts,T.duration=y.duration):(T.duration+=y.duration,T.nalCount+=y.length,T.byteLength+=y.byteLength,T.push(y));return b.length&&T.duration<=0&&(T.duration=b[b.length-1].duration),b.byteLength+=T.byteLength,b.nalCount+=T.nalCount,b.duration+=T.duration,b.push(T),b},Si=function(h){var g;return!h[0][0].keyFrame&&h.length>1&&(g=h.shift(),h.byteLength-=g.byteLength,h.nalCount-=g.nalCount,h[0][0].dts=g.dts,h[0][0].pts=g.pts,h[0][0].duration+=g.duration),h},ye=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},xe=function(h,g){var y=ye();return y.dataOffset=g,y.compositionTimeOffset=h.pts-h.dts,y.duration=h.duration,y.size=4*h.length,y.size+=h.byteLength,h.keyFrame&&(y.flags.dependsOn=2,y.flags.isNonSyncSample=0),y},Pe=function(h,g){var y,T,b,E,w,O=g||0,R=[];for(y=0;y<h.length;y++)for(E=h[y],T=0;T<E.length;T++)w=E[T],b=xe(w,O),O+=b.size,R.push(b);return R},Xe=function(h){var g,y,T,b,E,w,O=0,R=h.byteLength,j=h.nalCount,H=R+4*j,J=new Uint8Array(H),Ee=new DataView(J.buffer);for(g=0;g<h.length;g++)for(b=h[g],y=0;y<b.length;y++)for(E=b[y],T=0;T<E.length;T++)w=E[T],Ee.setUint32(O,w.data.byteLength),O+=4,J.set(w.data,O),O+=w.data.byteLength;return J},$e=function(h,g){var y,T=g||0,b=[];return y=xe(h,T),b.push(y),b},ze=function(h){var g,y,T=0,b=h.byteLength,E=h.length,w=b+4*E,O=new Uint8Array(w),R=new DataView(O.buffer);for(g=0;g<h.length;g++)y=h[g],R.setUint32(T,y.data.byteLength),T+=4,O.set(y.data,T),T+=y.data.byteLength;return O},Tt={groupNalsIntoFrames:dt,groupFramesIntoGops:Ht,extendFirstKeyFrame:Si,generateSampleTable:Pe,concatenateNalData:Xe,generateSampleTableForFrame:$e,concatenateNalDataForFrame:ze},Je=[33,16,5,32,164,27],Oi=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],De=function(h){for(var g=[];h--;)g.push(0);return g},Ot=function(h){return Object.keys(h).reduce(function(g,y){return g[y]=new Uint8Array(h[y].reduce(function(T,b){return T.concat(b)},[])),g},{})},At,li=function(){if(!At){var h={96e3:[Je,[227,64],De(154),[56]],88200:[Je,[231],De(170),[56]],64e3:[Je,[248,192],De(240),[56]],48e3:[Je,[255,192],De(268),[55,148,128],De(54),[112]],44100:[Je,[255,192],De(268),[55,163,128],De(84),[112]],32e3:[Je,[255,192],De(268),[55,234],De(226),[112]],24e3:[Je,[255,192],De(268),[55,255,128],De(268),[111,112],De(126),[224]],16e3:[Je,[255,192],De(268),[55,255,128],De(268),[111,255],De(269),[223,108],De(195),[1,192]],12e3:[Oi,De(268),[3,127,248],De(268),[6,255,240],De(268),[13,255,224],De(268),[27,253,128],De(259),[56]],11025:[Oi,De(268),[3,127,248],De(268),[6,255,240],De(268),[13,255,224],De(268),[27,255,192],De(268),[55,175,128],De(108),[112]],8e3:[Oi,De(268),[3,121,16],De(47),[7]]};At=Ot(h)}return At},Ut=9e4,gi,Zt,xt,ui,ks,An,Ua;gi=function(h){return h*Ut},Zt=function(h,g){return h*g},xt=function(h){return h/Ut},ui=function(h,g){return h/g},ks=function(h,g){return gi(ui(h,g))},An=function(h,g){return Zt(xt(h),g)},Ua=function(h,g,y){return xt(y?h:h-g)};var vt={ONE_SECOND_IN_TS:Ut,secondsToVideoTs:gi,secondsToAudioTs:Zt,videoTsToSeconds:xt,audioTsToSeconds:ui,audioTsToVideoTs:ks,videoTsToAudioTs:An,metadataTsToSeconds:Ua},ar=li,tn=vt,Vn=function(h){var g,y,T=0;for(g=0;g<h.length;g++)y=h[g],T+=y.data.byteLength;return T},or=function(h,g,y,T){var b,E=0,w=0,O=0,R=0,j,H,J;if(g.length&&(b=tn.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),E=Math.ceil(tn.ONE_SECOND_IN_TS/(h.samplerate/1024)),y&&T&&(w=b-Math.max(y,T),O=Math.floor(w/E),R=O*E),!(O<1||R>tn.ONE_SECOND_IN_TS/2))){for(j=ar()[h.samplerate],j||(j=g[0].data),H=0;H<O;H++)J=g[0],g.splice(0,0,{data:j,dts:J.dts-E,pts:J.pts-E});return h.baseMediaDecodeTime-=Math.floor(tn.videoTsToAudioTs(R,h.samplerate)),R}},A=function(h,g,y){return g.minSegmentDts>=y?h:(g.minSegmentDts=1/0,h.filter(function(T){return T.dts>=y?(g.minSegmentDts=Math.min(g.minSegmentDts,T.dts),g.minSegmentPts=g.minSegmentDts,!0):!1}))},Q=function(h){var g,y,T=[];for(g=0;g<h.length;g++)y=h[g],T.push({size:y.data.byteLength,duration:1024});return T},be=function(h){var g,y,T=0,b=new Uint8Array(Vn(h));for(g=0;g<h.length;g++)y=h[g],b.set(y.data,T),T+=y.data.byteLength;return b},Ce={prefixWithSilence:or,trimAdtsFramesByEarliestDts:A,generateSampleTable:Q,concatenateFrameData:be},je=vt.ONE_SECOND_IN_TS,at=function(h,g){typeof g.pts=="number"&&(h.timelineStartInfo.pts===void 0&&(h.timelineStartInfo.pts=g.pts),h.minSegmentPts===void 0?h.minSegmentPts=g.pts:h.minSegmentPts=Math.min(h.minSegmentPts,g.pts),h.maxSegmentPts===void 0?h.maxSegmentPts=g.pts:h.maxSegmentPts=Math.max(h.maxSegmentPts,g.pts)),typeof g.dts=="number"&&(h.timelineStartInfo.dts===void 0&&(h.timelineStartInfo.dts=g.dts),h.minSegmentDts===void 0?h.minSegmentDts=g.dts:h.minSegmentDts=Math.min(h.minSegmentDts,g.dts),h.maxSegmentDts===void 0?h.maxSegmentDts=g.dts:h.maxSegmentDts=Math.max(h.maxSegmentDts,g.dts))},et=function(h){delete h.minSegmentDts,delete h.maxSegmentDts,delete h.minSegmentPts,delete h.maxSegmentPts},gt=function(h,g){var y,T,b=h.minSegmentDts;return g||(b-=h.timelineStartInfo.dts),y=h.timelineStartInfo.baseMediaDecodeTime,y+=b,y=Math.max(0,y),h.type==="audio"&&(T=h.samplerate/je,y*=T,y=Math.floor(y)),y},tt={clearDtsInfo:et,calculateTrackBaseMediaDecodeTime:gt,collectDtsInfo:at},ci=4,Os=128,zd=function(h){for(var g=0,y={payloadType:-1,payloadSize:0},T=0,b=0;g<h.byteLength&&h[g]!==Os;){for(;h[g]===255;)T+=255,g++;for(T+=h[g++];h[g]===255;)b+=255,g++;if(b+=h[g++],!y.payload&&T===ci){var E=String.fromCharCode(h[g+3],h[g+4],h[g+5],h[g+6]);if(E==="GA94"){y.payloadType=T,y.payloadSize=b,y.payload=h.subarray(g,g+b);break}else y.payload=void 0}g+=b,T=0,b=0}return y},Ud=function(h){return h.payload[0]!==181||(h.payload[1]<<8|h.payload[2])!==49||String.fromCharCode(h.payload[3],h.payload[4],h.payload[5],h.payload[6])!=="GA94"||h.payload[7]!==3?null:h.payload.subarray(8,h.payload.length-1)},wn=function(h,g){var y=[],T,b,E,w;if(!(g[0]&64))return y;for(b=g[0]&31,T=0;T<b;T++)E=T*3,w={type:g[E+2]&3,pts:h},g[E+2]&4&&(w.ccData=g[E+3]<<8|g[E+4],y.push(w));return y},Pd=function(h){for(var g=h.byteLength,y=[],T=1,b,E;T<g-2;)h[T]===0&&h[T+1]===0&&h[T+2]===3?(y.push(T+2),T+=2):T++;if(y.length===0)return h;b=g-y.length,E=new Uint8Array(b);var w=0;for(T=0;T<b;w++,T++)w===y[0]&&(w++,y.shift()),E[T]=h[w];return E},Bd={parseSei:zd,parseUserData:Ud,parseCaptionPackets:wn,discardEmulationPreventionBytes:Pd,USER_DATA_REGISTERED_ITU_T_T35:ci},qd=i,Bo=Bd,Pi=function(h){h=h||{},Pi.prototype.init.call(this),this.parse708captions_=typeof h.parse708captions=="boolean"?h.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Pt(0,0),new Pt(0,1),new Pt(1,0),new Pt(1,1)],this.parse708captions_&&(this.cc708Stream_=new wt({captionServices:h.captionServices})),this.reset(),this.ccStreams_.forEach(function(g){g.on("data",this.trigger.bind(this,"data")),g.on("partialdone",this.trigger.bind(this,"partialdone")),g.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Pi.prototype=new qd,Pi.prototype.push=function(h){var g,y,T;if(h.nalUnitType==="sei_rbsp"&&(g=Bo.parseSei(h.escapedRBSP),!!g.payload&&g.payloadType===Bo.USER_DATA_REGISTERED_ITU_T_T35&&(y=Bo.parseUserData(g),!!y))){if(h.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(h.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}T=Bo.parseCaptionPackets(h.pts,y),this.captionPackets_=this.captionPackets_.concat(T),this.latestDts_!==h.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=h.dts}},Pi.prototype.flushCCStreams=function(h){this.ccStreams_.forEach(function(g){return h==="flush"?g.flush():g.partialFlush()},this)},Pi.prototype.flushStream=function(h){if(!this.captionPackets_.length){this.flushCCStreams(h);return}this.captionPackets_.forEach(function(g,y){g.presortIndex=y}),this.captionPackets_.sort(function(g,y){return g.pts===y.pts?g.presortIndex-y.presortIndex:g.pts-y.pts}),this.captionPackets_.forEach(function(g){g.type<2?this.dispatchCea608Packet(g):this.dispatchCea708Packet(g)},this),this.captionPackets_.length=0,this.flushCCStreams(h)},Pi.prototype.flush=function(){return this.flushStream("flush")},Pi.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Pi.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(h){h.reset()})},Pi.prototype.dispatchCea608Packet=function(h){this.setsTextOrXDSActive(h)?this.activeCea608Channel_[h.type]=null:this.setsChannel1Active(h)?this.activeCea608Channel_[h.type]=0:this.setsChannel2Active(h)&&(this.activeCea608Channel_[h.type]=1),this.activeCea608Channel_[h.type]!==null&&this.ccStreams_[(h.type<<1)+this.activeCea608Channel_[h.type]].push(h)},Pi.prototype.setsChannel1Active=function(h){return(h.ccData&30720)===4096},Pi.prototype.setsChannel2Active=function(h){return(h.ccData&30720)===6144},Pi.prototype.setsTextOrXDSActive=function(h){return(h.ccData&28928)===256||(h.ccData&30974)===4138||(h.ccData&30974)===6186},Pi.prototype.dispatchCea708Packet=function(h){this.parse708captions_&&this.cc708Stream_.push(h)};var Cu={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},qy=function(h){var g=Cu[h]||h;return h&4096&&h===g?"":String.fromCharCode(g)},Re=function(h){return 32<=h&&h<=127||160<=h&&h<=255},$n=function(h){this.windowNum=h,this.reset()};$n.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},$n.prototype.getText=function(){return this.rows.join(`
`)},$n.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},$n.prototype.newLine=function(h){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(h),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},$n.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},$n.prototype.addText=function(h){this.rows[this.rowIdx]+=h},$n.prototype.backspace=function(){if(!this.isEmpty()){var h=this.rows[this.rowIdx];this.rows[this.rowIdx]=h.substr(0,h.length-1)}};var Bi=function(h,g,y){this.serviceNum=h,this.text="",this.currentWindow=new $n(-1),this.windows=[],this.stream=y,typeof g=="string"&&this.createTextDecoder(g)};Bi.prototype.init=function(h,g){this.startPts=h;for(var y=0;y<8;y++)this.windows[y]=new $n(y),typeof g=="function"&&(this.windows[y].beforeRowOverflow=g)},Bi.prototype.setCurrentWindow=function(h){this.currentWindow=this.windows[h]},Bi.prototype.createTextDecoder=function(h){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(h)}catch(g){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+h+" encoding. "+g})}};var wt=function(h){h=h||{},wt.prototype.init.call(this);var g=this,y=h.captionServices||{},T={},b;Object.keys(y).forEach(E=>{b=y[E],/^SERVICE/.test(E)&&(T[E]=b.encoding)}),this.serviceEncodings=T,this.current708Packet=null,this.services={},this.push=function(E){E.type===3?(g.new708Packet(),g.add708Bytes(E)):(g.current708Packet===null&&g.new708Packet(),g.add708Bytes(E))}};wt.prototype=new qd,wt.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},wt.prototype.add708Bytes=function(h){var g=h.ccData,y=g>>>8,T=g&255;this.current708Packet.ptsVals.push(h.pts),this.current708Packet.data.push(y),this.current708Packet.data.push(T)},wt.prototype.push708Packet=function(){var h=this.current708Packet,g=h.data,y=null,T=null,b=0,E=g[b++];for(h.seq=E>>6,h.sizeCode=E&63;b<g.length;b++)E=g[b++],y=E>>5,T=E&31,y===7&&T>0&&(E=g[b++],y=E),this.pushServiceBlock(y,b,T),T>0&&(b+=T-1)},wt.prototype.pushServiceBlock=function(h,g,y){var T,b=g,E=this.current708Packet.data,w=this.services[h];for(w||(w=this.initService(h,b));b<g+y&&b<E.length;b++)T=E[b],Re(T)?b=this.handleText(b,w):T===24?b=this.multiByteCharacter(b,w):T===16?b=this.extendedCommands(b,w):128<=T&&T<=135?b=this.setCurrentWindow(b,w):152<=T&&T<=159?b=this.defineWindow(b,w):T===136?b=this.clearWindows(b,w):T===140?b=this.deleteWindows(b,w):T===137?b=this.displayWindows(b,w):T===138?b=this.hideWindows(b,w):T===139?b=this.toggleWindows(b,w):T===151?b=this.setWindowAttributes(b,w):T===144?b=this.setPenAttributes(b,w):T===145?b=this.setPenColor(b,w):T===146?b=this.setPenLocation(b,w):T===143?w=this.reset(b,w):T===8?w.currentWindow.backspace():T===12?w.currentWindow.clearText():T===13?w.currentWindow.pendingNewLine=!0:T===14?w.currentWindow.clearText():T===141&&b++},wt.prototype.extendedCommands=function(h,g){var y=this.current708Packet.data,T=y[++h];return Re(T)&&(h=this.handleText(h,g,{isExtended:!0})),h},wt.prototype.getPts=function(h){return this.current708Packet.ptsVals[Math.floor(h/2)]},wt.prototype.initService=function(h,g){var T="SERVICE"+h,y=this,T,b;return T in this.serviceEncodings&&(b=this.serviceEncodings[T]),this.services[h]=new Bi(h,b,y),this.services[h].init(this.getPts(g),function(E){y.flushDisplayed(E,y.services[h])}),this.services[h]},wt.prototype.handleText=function(h,g,y){var T=y&&y.isExtended,b=y&&y.isMultiByte,E=this.current708Packet.data,w=T?4096:0,O=E[h],R=E[h+1],j=g.currentWindow,H,J;function Ee(ue){return ue.map(Be=>("0"+(Be&255).toString(16)).slice(-2)).join("")}if(b?(J=[O,R],h++):J=[O],g.textDecoder_&&!T)H=g.textDecoder_.decode(new Uint8Array(J));else if(b){const ue=Ee(J);H=String.fromCharCode(parseInt(ue,16))}else H=qy(w|O);return j.pendingNewLine&&!j.isEmpty()&&j.newLine(this.getPts(h)),j.pendingNewLine=!1,j.addText(H),h},wt.prototype.multiByteCharacter=function(h,g){var y=this.current708Packet.data,T=y[h+1],b=y[h+2];return Re(T)&&Re(b)&&(h=this.handleText(++h,g,{isMultiByte:!0})),h},wt.prototype.setCurrentWindow=function(h,g){var y=this.current708Packet.data,T=y[h],b=T&7;return g.setCurrentWindow(b),h},wt.prototype.defineWindow=function(h,g){var y=this.current708Packet.data,T=y[h],b=T&7;g.setCurrentWindow(b);var E=g.currentWindow;return T=y[++h],E.visible=(T&32)>>5,E.rowLock=(T&16)>>4,E.columnLock=(T&8)>>3,E.priority=T&7,T=y[++h],E.relativePositioning=(T&128)>>7,E.anchorVertical=T&127,T=y[++h],E.anchorHorizontal=T,T=y[++h],E.anchorPoint=(T&240)>>4,E.rowCount=T&15,T=y[++h],E.columnCount=T&63,T=y[++h],E.windowStyle=(T&56)>>3,E.penStyle=T&7,E.virtualRowCount=E.rowCount+1,h},wt.prototype.setWindowAttributes=function(h,g){var y=this.current708Packet.data,T=y[h],b=g.currentWindow.winAttr;return T=y[++h],b.fillOpacity=(T&192)>>6,b.fillRed=(T&48)>>4,b.fillGreen=(T&12)>>2,b.fillBlue=T&3,T=y[++h],b.borderType=(T&192)>>6,b.borderRed=(T&48)>>4,b.borderGreen=(T&12)>>2,b.borderBlue=T&3,T=y[++h],b.borderType+=(T&128)>>5,b.wordWrap=(T&64)>>6,b.printDirection=(T&48)>>4,b.scrollDirection=(T&12)>>2,b.justify=T&3,T=y[++h],b.effectSpeed=(T&240)>>4,b.effectDirection=(T&12)>>2,b.displayEffect=T&3,h},wt.prototype.flushDisplayed=function(h,g){for(var y=[],T=0;T<8;T++)g.windows[T].visible&&!g.windows[T].isEmpty()&&y.push(g.windows[T].getText());g.endPts=h,g.text=y.join(`
`),this.pushCaption(g),g.startPts=h},wt.prototype.pushCaption=function(h){h.text!==""&&(this.trigger("data",{startPts:h.startPts,endPts:h.endPts,text:h.text,stream:"cc708_"+h.serviceNum}),h.text="",h.startPts=h.endPts)},wt.prototype.displayWindows=function(h,g){var y=this.current708Packet.data,T=y[++h],b=this.getPts(h);this.flushDisplayed(b,g);for(var E=0;E<8;E++)T&1<<E&&(g.windows[E].visible=1);return h},wt.prototype.hideWindows=function(h,g){var y=this.current708Packet.data,T=y[++h],b=this.getPts(h);this.flushDisplayed(b,g);for(var E=0;E<8;E++)T&1<<E&&(g.windows[E].visible=0);return h},wt.prototype.toggleWindows=function(h,g){var y=this.current708Packet.data,T=y[++h],b=this.getPts(h);this.flushDisplayed(b,g);for(var E=0;E<8;E++)T&1<<E&&(g.windows[E].visible^=1);return h},wt.prototype.clearWindows=function(h,g){var y=this.current708Packet.data,T=y[++h],b=this.getPts(h);this.flushDisplayed(b,g);for(var E=0;E<8;E++)T&1<<E&&g.windows[E].clearText();return h},wt.prototype.deleteWindows=function(h,g){var y=this.current708Packet.data,T=y[++h],b=this.getPts(h);this.flushDisplayed(b,g);for(var E=0;E<8;E++)T&1<<E&&g.windows[E].reset();return h},wt.prototype.setPenAttributes=function(h,g){var y=this.current708Packet.data,T=y[h],b=g.currentWindow.penAttr;return T=y[++h],b.textTag=(T&240)>>4,b.offset=(T&12)>>2,b.penSize=T&3,T=y[++h],b.italics=(T&128)>>7,b.underline=(T&64)>>6,b.edgeType=(T&56)>>3,b.fontStyle=T&7,h},wt.prototype.setPenColor=function(h,g){var y=this.current708Packet.data,T=y[h],b=g.currentWindow.penColor;return T=y[++h],b.fgOpacity=(T&192)>>6,b.fgRed=(T&48)>>4,b.fgGreen=(T&12)>>2,b.fgBlue=T&3,T=y[++h],b.bgOpacity=(T&192)>>6,b.bgRed=(T&48)>>4,b.bgGreen=(T&12)>>2,b.bgBlue=T&3,T=y[++h],b.edgeRed=(T&48)>>4,b.edgeGreen=(T&12)>>2,b.edgeBlue=T&3,h},wt.prototype.setPenLocation=function(h,g){var y=this.current708Packet.data,T=y[h],b=g.currentWindow.penLoc;return g.currentWindow.pendingNewLine=!0,T=y[++h],b.row=T&15,T=y[++h],b.column=T&63,h},wt.prototype.reset=function(h,g){var y=this.getPts(h);return this.flushDisplayed(y,g),this.initService(g.serviceNum,h)};var Fy={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Yr=function(h){return h===null?"":(h=Fy[h]||h,String.fromCharCode(h))},qo=14,Au=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],yi=function(){for(var h=[],g=qo+1;g--;)h.push({text:"",indent:0,offset:0});return h},Pt=function(h,g){Pt.prototype.init.call(this),this.field_=h||0,this.dataChannel_=g||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(y){var T,b,E,w,O;if(T=y.ccData&32639,T===this.lastControlCode_){this.lastControlCode_=null;return}if((T&61440)===4096?this.lastControlCode_=T:T!==this.PADDING_&&(this.lastControlCode_=null),E=T>>>8,w=T&255,T!==this.PADDING_)if(T===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(T===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(y.pts),this.flushDisplayed(y.pts),b=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=b,this.startPts_=y.pts;else if(T===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(y.pts);else if(T===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(y.pts);else if(T===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(y.pts);else if(T===this.CARRIAGE_RETURN_)this.clearFormatting(y.pts),this.flushDisplayed(y.pts),this.shiftRowsUp_(),this.startPts_=y.pts;else if(T===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(T===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(y.pts),this.displayed_=yi();else if(T===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=yi();else if(T===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(y.pts),this.displayed_=yi()),this.mode_="paintOn",this.startPts_=y.pts;else if(this.isSpecialCharacter(E,w))E=(E&3)<<8,O=Yr(E|w),this[this.mode_](y.pts,O),this.column_++;else if(this.isExtCharacter(E,w))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),E=(E&3)<<8,O=Yr(E|w),this[this.mode_](y.pts,O),this.column_++;else if(this.isMidRowCode(E,w))this.clearFormatting(y.pts),this[this.mode_](y.pts," "),this.column_++,(w&14)===14&&this.addFormatting(y.pts,["i"]),(w&1)===1&&this.addFormatting(y.pts,["u"]);else if(this.isOffsetControlCode(E,w)){const j=w&3;this.nonDisplayed_[this.row_].offset=j,this.column_+=j}else if(this.isPAC(E,w)){var R=Au.indexOf(T&7968);if(this.mode_==="rollUp"&&(R-this.rollUpRows_+1<0&&(R=this.rollUpRows_-1),this.setRollUp(y.pts,R)),R!==this.row_&&R>=0&&R<=14&&(this.clearFormatting(y.pts),this.row_=R),w&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(y.pts,["u"]),(T&16)===16){const j=(T&14)>>1;this.column_=j*4,this.nonDisplayed_[this.row_].indent+=j}this.isColorPAC(w)&&(w&14)===14&&this.addFormatting(y.pts,["i"])}else this.isNormalChar(E)&&(w===0&&(w=null),O=Yr(E),O+=Yr(w),this[this.mode_](y.pts,O),this.column_+=O.length)}};Pt.prototype=new qd,Pt.prototype.flushDisplayed=function(h){const g=T=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+T+"."})},y=[];this.displayed_.forEach((T,b)=>{if(T&&T.text&&T.text.length){try{T.text=T.text.trim()}catch{g(b)}T.text.length&&y.push({text:T.text,line:b+1,position:10+Math.min(70,T.indent*10)+T.offset*2.5})}else T==null&&g(b)}),y.length&&this.trigger("data",{startPts:this.startPts_,endPts:h,content:y,stream:this.name_})},Pt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=yi(),this.nonDisplayed_=yi(),this.lastControlCode_=null,this.column_=0,this.row_=qo,this.rollUpRows_=2,this.formatting_=[]},Pt.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Pt.prototype.isSpecialCharacter=function(h,g){return h===this.EXT_&&g>=48&&g<=63},Pt.prototype.isExtCharacter=function(h,g){return(h===this.EXT_+1||h===this.EXT_+2)&&g>=32&&g<=63},Pt.prototype.isMidRowCode=function(h,g){return h===this.EXT_&&g>=32&&g<=47},Pt.prototype.isOffsetControlCode=function(h,g){return h===this.OFFSET_&&g>=33&&g<=35},Pt.prototype.isPAC=function(h,g){return h>=this.BASE_&&h<this.BASE_+8&&g>=64&&g<=127},Pt.prototype.isColorPAC=function(h){return h>=64&&h<=79||h>=96&&h<=127},Pt.prototype.isNormalChar=function(h){return h>=32&&h<=127},Pt.prototype.setRollUp=function(h,g){if(this.mode_!=="rollUp"&&(this.row_=qo,this.mode_="rollUp",this.flushDisplayed(h),this.nonDisplayed_=yi(),this.displayed_=yi()),g!==void 0&&g!==this.row_)for(var y=0;y<this.rollUpRows_;y++)this.displayed_[g-y]=this.displayed_[this.row_-y],this.displayed_[this.row_-y]={text:"",indent:0,offset:0};g===void 0&&(g=this.row_),this.topRow_=g-this.rollUpRows_+1},Pt.prototype.addFormatting=function(h,g){this.formatting_=this.formatting_.concat(g);var y=g.reduce(function(T,b){return T+"<"+b+">"},"");this[this.mode_](h,y)},Pt.prototype.clearFormatting=function(h){if(this.formatting_.length){var g=this.formatting_.reverse().reduce(function(y,T){return y+"</"+T+">"},"");this.formatting_=[],this[this.mode_](h,g)}},Pt.prototype.popOn=function(h,g){var y=this.nonDisplayed_[this.row_].text;y+=g,this.nonDisplayed_[this.row_].text=y},Pt.prototype.rollUp=function(h,g){var y=this.displayed_[this.row_].text;y+=g,this.displayed_[this.row_].text=y},Pt.prototype.shiftRowsUp_=function(){var h;for(h=0;h<this.topRow_;h++)this.displayed_[h]={text:"",indent:0,offset:0};for(h=this.row_+1;h<qo+1;h++)this.displayed_[h]={text:"",indent:0,offset:0};for(h=this.topRow_;h<this.row_;h++)this.displayed_[h]=this.displayed_[h+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Pt.prototype.paintOn=function(h,g){var y=this.displayed_[this.row_].text;y+=g,this.displayed_[this.row_].text=y};var wu={CaptionStream:Pi,Cea608Stream:Pt,Cea708Stream:wt},Fo={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Fd=i,Bp=8589934592,qp=4294967296,Qr="shared",Nu=function(h,g){var y=1;for(h>g&&(y=-1);Math.abs(g-h)>qp;)h+=y*Bp;return h},ku=function(h){var g,y;ku.prototype.init.call(this),this.type_=h||Qr,this.push=function(T){if(T.type==="metadata"){this.trigger("data",T);return}this.type_!==Qr&&T.type!==this.type_||(y===void 0&&(y=T.dts),T.dts=Nu(T.dts,y),T.pts=Nu(T.pts,y),g=T.dts,this.trigger("data",T))},this.flush=function(){y=g,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){y=void 0,g=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};ku.prototype=new Fd;var Hd={TimestampRolloverStream:ku,handleRollover:Nu},Fp=(h,g,y)=>{if(!h)return-1;for(var T=y;T<h.length;T++)if(h[T]===g)return T;return-1},Hp={typedArrayIndexOf:Fp},Ii=Hp.typedArrayIndexOf,Is={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},lr=function(h,g,y){var T,b="";for(T=g;T<y;T++)b+="%"+("00"+h[T].toString(16)).slice(-2);return b},Pa=function(h,g,y){return decodeURIComponent(lr(h,g,y))},Ls=function(h,g,y){return unescape(lr(h,g,y))},ur=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},Gr={APIC:function(h){var g=1,y,T,b="-->";h.data[0]===Is.Utf8&&(y=Ii(h.data,0,g),!(y<0)&&(h.mimeType=Ls(h.data,g,y),g=y+1,h.pictureType=h.data[g],g++,T=Ii(h.data,0,g),!(T<0)&&(h.description=Pa(h.data,g,T),g=T+1,h.mimeType===b?h.url=Ls(h.data,g,h.data.length):h.pictureData=h.data.subarray(g,h.data.length))))},"T*":function(h){h.data[0]===Is.Utf8&&(h.value=Pa(h.data,1,h.data.length).replace(/\0*$/,""),h.values=h.value.split("\0"))},TXXX:function(h){var g;h.data[0]===Is.Utf8&&(g=Ii(h.data,0,1),g!==-1&&(h.description=Pa(h.data,1,g),h.value=Pa(h.data,g+1,h.data.length).replace(/\0*$/,""),h.data=h.value))},"W*":function(h){h.url=Ls(h.data,0,h.data.length).replace(/\0.*$/,"")},WXXX:function(h){var g;h.data[0]===Is.Utf8&&(g=Ii(h.data,0,1),g!==-1&&(h.description=Pa(h.data,1,g),h.url=Ls(h.data,g+1,h.data.length).replace(/\0.*$/,"")))},PRIV:function(h){var g;for(g=0;g<h.data.length;g++)if(h.data[g]===0){h.owner=Ls(h.data,0,g);break}h.privateData=h.data.subarray(g+1),h.data=h.privateData}},Ho=function(h){var g,y,T=10,b=0,E=[];if(!(h.length<10||h[0]!=="I".charCodeAt(0)||h[1]!=="D".charCodeAt(0)||h[2]!=="3".charCodeAt(0))){b=ur(h.subarray(6,10)),b+=10;var w=h[5]&64;w&&(T+=4,T+=ur(h.subarray(10,14)),b-=ur(h.subarray(16,20)));do{if(g=ur(h.subarray(T+4,T+8)),g<1)break;y=String.fromCharCode(h[T],h[T+1],h[T+2],h[T+3]);var O={id:y,data:h.subarray(T+10,T+g+10)};O.key=O.id,Gr[O.id]?Gr[O.id](O):O.id[0]==="T"?Gr["T*"](O):O.id[0]==="W"&&Gr["W*"](O),E.push(O),T+=10,T+=g}while(T<b);return E}},Xr={parseId3Frames:Ho,parseSyncSafeInteger:ur,frameParsers:Gr},Vd=i,Hy=Fo,cr=Xr,Vo;Vo=function(h){var g={descriptor:h&&h.descriptor},y=0,T=[],b=0,E;if(Vo.prototype.init.call(this),this.dispatchType=Hy.METADATA_STREAM_TYPE.toString(16),g.descriptor)for(E=0;E<g.descriptor.length;E++)this.dispatchType+=("00"+g.descriptor[E].toString(16)).slice(-2);this.push=function(w){var O,R,j,H,J,Ee;if(w.type==="timed-metadata"){if(w.dataAlignmentIndicator&&(b=0,T.length=0),T.length===0&&(w.data.length<10||w.data[0]!=="I".charCodeAt(0)||w.data[1]!=="D".charCodeAt(0)||w.data[2]!=="3".charCodeAt(0))){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(T.push(w),b+=w.data.byteLength,T.length===1&&(y=cr.parseSyncSafeInteger(w.data.subarray(6,10)),y+=10),!(b<y)){for(O={data:new Uint8Array(y),frames:[],pts:T[0].pts,dts:T[0].dts},J=0;J<y;)O.data.set(T[0].data.subarray(0,y-J),J),J+=T[0].data.byteLength,b-=T[0].data.byteLength,T.shift();R=10,O.data[5]&64&&(R+=4,R+=cr.parseSyncSafeInteger(O.data.subarray(10,14)),y-=cr.parseSyncSafeInteger(O.data.subarray(16,20)));do{if(j=cr.parseSyncSafeInteger(O.data.subarray(R+4,R+8)),j<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(Ee=String.fromCharCode(O.data[R],O.data[R+1],O.data[R+2],O.data[R+3]),H={id:Ee,data:O.data.subarray(R+10,R+j+10)},H.key=H.id,cr.frameParsers[H.id]?cr.frameParsers[H.id](H):H.id[0]==="T"?cr.frameParsers["T*"](H):H.id[0]==="W"&&cr.frameParsers["W*"](H),H.owner==="com.apple.streaming.transportStreamTimestamp"){var ue=H.data,Be=(ue[3]&1)<<30|ue[4]<<22|ue[5]<<14|ue[6]<<6|ue[7]>>>2;Be*=4,Be+=ue[7]&3,H.timeStamp=Be,O.pts===void 0&&O.dts===void 0&&(O.pts=H.timeStamp,O.dts=H.timeStamp),this.trigger("timestamp",H)}O.frames.push(H),R+=10,R+=j}while(R<y);this.trigger("data",O)}}}},Vo.prototype=new Vd;var $d=Vo,$o=i,Ou=wu,Nn=Fo,Vp=Hd.TimestampRolloverStream,Iu,Ba,qa,Rs=188,Wr=71;Iu=function(){var h=new Uint8Array(Rs),g=0;Iu.prototype.init.call(this),this.push=function(y){var T=0,b=Rs,E;for(g?(E=new Uint8Array(y.byteLength+g),E.set(h.subarray(0,g)),E.set(y,g),g=0):E=y;b<E.byteLength;){if(E[T]===Wr&&E[b]===Wr){this.trigger("data",E.subarray(T,b)),T+=Rs,b+=Rs;continue}T++,b++}T<E.byteLength&&(h.set(E.subarray(T),0),g=E.byteLength-T)},this.flush=function(){g===Rs&&h[0]===Wr&&(this.trigger("data",h),g=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){g=0,this.trigger("reset")}},Iu.prototype=new $o,Ba=function(){var h,g,y,T;Ba.prototype.init.call(this),T=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,h=function(b,E){var w=0;E.payloadUnitStartIndicator&&(w+=b[w]+1),E.type==="pat"?g(b.subarray(w),E):y(b.subarray(w),E)},g=function(b,E){E.section_number=b[7],E.last_section_number=b[8],T.pmtPid=(b[10]&31)<<8|b[11],E.pmtPid=T.pmtPid},y=function(b,E){var w,O,R,j;if(b[5]&1){for(T.programMapTable={video:null,audio:null,"timed-metadata":{}},w=(b[1]&15)<<8|b[2],O=3+w-4,R=(b[10]&15)<<8|b[11],j=12+R;j<O;){var H=b[j],J=(b[j+1]&31)<<8|b[j+2];H===Nn.H264_STREAM_TYPE&&T.programMapTable.video===null?T.programMapTable.video=J:H===Nn.ADTS_STREAM_TYPE&&T.programMapTable.audio===null?T.programMapTable.audio=J:H===Nn.METADATA_STREAM_TYPE&&(T.programMapTable["timed-metadata"][J]=H),j+=((b[j+3]&15)<<8|b[j+4])+5}E.programMapTable=T.programMapTable}},this.push=function(b){var E={},w=4;if(E.payloadUnitStartIndicator=!!(b[1]&64),E.pid=b[1]&31,E.pid<<=8,E.pid|=b[2],(b[3]&48)>>>4>1&&(w+=b[w]+1),E.pid===0)E.type="pat",h(b.subarray(w),E),this.trigger("data",E);else if(E.pid===this.pmtPid)for(E.type="pmt",h(b.subarray(w),E),this.trigger("data",E);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([b,w,E]):this.processPes_(b,w,E)},this.processPes_=function(b,E,w){w.pid===this.programMapTable.video?w.streamType=Nn.H264_STREAM_TYPE:w.pid===this.programMapTable.audio?w.streamType=Nn.ADTS_STREAM_TYPE:w.streamType=this.programMapTable["timed-metadata"][w.pid],w.type="pes",w.data=b.subarray(E),this.trigger("data",w)}},Ba.prototype=new $o,Ba.STREAM_TYPES={h264:27,adts:15},qa=function(){var h=this,g=!1,y={data:[],size:0},T={data:[],size:0},b={data:[],size:0},E,w=function(R,j){var H;const J=R[0]<<16|R[1]<<8|R[2];j.data=new Uint8Array,J===1&&(j.packetLength=6+(R[4]<<8|R[5]),j.dataAlignmentIndicator=(R[6]&4)!==0,H=R[7],H&192&&(j.pts=(R[9]&14)<<27|(R[10]&255)<<20|(R[11]&254)<<12|(R[12]&255)<<5|(R[13]&254)>>>3,j.pts*=4,j.pts+=(R[13]&6)>>>1,j.dts=j.pts,H&64&&(j.dts=(R[14]&14)<<27|(R[15]&255)<<20|(R[16]&254)<<12|(R[17]&255)<<5|(R[18]&254)>>>3,j.dts*=4,j.dts+=(R[18]&6)>>>1)),j.data=R.subarray(9+R[8]))},O=function(R,j,H){var J=new Uint8Array(R.size),Ee={type:j},ue=0,Be=0,Ye=!1,ni;if(!(!R.data.length||R.size<9)){for(Ee.trackId=R.data[0].pid,ue=0;ue<R.data.length;ue++)ni=R.data[ue],J.set(ni.data,Be),Be+=ni.data.byteLength;w(J,Ee),Ye=j==="video"||Ee.packetLength<=R.size,(H||Ye)&&(R.size=0,R.data.length=0),Ye&&h.trigger("data",Ee)}};qa.prototype.init.call(this),this.push=function(R){({pat:function(){},pes:function(){var j,H;switch(R.streamType){case Nn.H264_STREAM_TYPE:j=y,H="video";break;case Nn.ADTS_STREAM_TYPE:j=T,H="audio";break;case Nn.METADATA_STREAM_TYPE:j=b,H="timed-metadata";break;default:return}R.payloadUnitStartIndicator&&O(j,H,!0),j.data.push(R),j.size+=R.data.byteLength},pmt:function(){var j={type:"metadata",tracks:[]};E=R.programMapTable,E.video!==null&&j.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.video,codec:"avc",type:"video"}),E.audio!==null&&j.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.audio,codec:"adts",type:"audio"}),g=!0,h.trigger("data",j)}})[R.type]()},this.reset=function(){y.size=0,y.data.length=0,T.size=0,T.data.length=0,this.trigger("reset")},this.flushStreams_=function(){O(y,"video"),O(T,"audio"),O(b,"timed-metadata")},this.flush=function(){if(!g&&E){var R={type:"metadata",tracks:[]};E.video!==null&&R.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.video,codec:"avc",type:"video"}),E.audio!==null&&R.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.audio,codec:"adts",type:"audio"}),h.trigger("data",R)}g=!1,this.flushStreams_(),this.trigger("done")}},qa.prototype=new $o;var $p={PAT_PID:0,MP2T_PACKET_LENGTH:Rs,TransportPacketStream:Iu,TransportParseStream:Ba,ElementaryStream:qa,TimestampRolloverStream:Vp,CaptionStream:Ou.CaptionStream,Cea608Stream:Ou.Cea608Stream,Cea708Stream:Ou.Cea708Stream,MetadataStream:$d};for(var Lu in Nn)Nn.hasOwnProperty(Lu)&&($p[Lu]=Nn[Lu]);var Yp=$p,Yo=i,Qp=vt.ONE_SECOND_IN_TS,Ru,Gp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Ru=function(h){var g,y=0;Ru.prototype.init.call(this),this.skipWarn_=function(T,b){this.trigger("log",{level:"warn",message:`adts skiping bytes ${T} to ${b} in frame ${y} outside syncword`})},this.push=function(T){var b=0,E,w,O,R,j;if(h||(y=0),T.type==="audio"){g&&g.length?(O=g,g=new Uint8Array(O.byteLength+T.data.byteLength),g.set(O),g.set(T.data,O.byteLength)):g=T.data;for(var H;b+7<g.length;){if(g[b]!==255||(g[b+1]&246)!==240){typeof H!="number"&&(H=b),b++;continue}if(typeof H=="number"&&(this.skipWarn_(H,b),H=null),w=(~g[b+1]&1)*2,E=(g[b+3]&3)<<11|g[b+4]<<3|(g[b+5]&224)>>5,R=((g[b+6]&3)+1)*1024,j=R*Qp/Gp[(g[b+2]&60)>>>2],g.byteLength-b<E)break;this.trigger("data",{pts:T.pts+y*j,dts:T.dts+y*j,sampleCount:R,audioobjecttype:(g[b+2]>>>6&3)+1,channelcount:(g[b+2]&1)<<2|(g[b+3]&192)>>>6,samplerate:Gp[(g[b+2]&60)>>>2],samplingfrequencyindex:(g[b+2]&60)>>>2,samplesize:16,data:g.subarray(b+7+w,b+E)}),y++,b+=E}typeof H=="number"&&(this.skipWarn_(H,b),H=null),g=g.subarray(b)}},this.flush=function(){y=0,this.trigger("done")},this.reset=function(){g=void 0,this.trigger("reset")},this.endTimeline=function(){g=void 0,this.trigger("endedtimeline")}},Ru.prototype=new Yo;var Vy=Ru,Xp;Xp=function(h){var g=h.byteLength,y=0,T=0;this.length=function(){return 8*g},this.bitsAvailable=function(){return 8*g+T},this.loadWord=function(){var b=h.byteLength-g,E=new Uint8Array(4),w=Math.min(4,g);if(w===0)throw new Error("no bytes available");E.set(h.subarray(b,b+w)),y=new DataView(E.buffer).getUint32(0),T=w*8,g-=w},this.skipBits=function(b){var E;T>b?(y<<=b,T-=b):(b-=T,E=Math.floor(b/8),b-=E*8,g-=E,this.loadWord(),y<<=b,T-=b)},this.readBits=function(b){var E=Math.min(T,b),w=y>>>32-E;return T-=E,T>0?y<<=E:g>0&&this.loadWord(),E=b-E,E>0?w<<E|this.readBits(E):w},this.skipLeadingZeros=function(){var b;for(b=0;b<T;++b)if(y&2147483648>>>b)return y<<=b,T-=b,b;return this.loadWord(),b+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var b=this.skipLeadingZeros();return this.readBits(b+1)-1},this.readExpGolomb=function(){var b=this.readUnsignedExpGolomb();return 1&b?1+b>>>1:-1*(b>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Qo=Xp,ju=i,Wp=Qo,Go,js,Yd;js=function(){var h=0,g,y;js.prototype.init.call(this),this.push=function(T){var b;y?(b=new Uint8Array(y.byteLength+T.data.byteLength),b.set(y),b.set(T.data,y.byteLength),y=b):y=T.data;for(var E=y.byteLength;h<E-3;h++)if(y[h+2]===1){g=h+5;break}for(;g<E;)switch(y[g]){case 0:if(y[g-1]!==0){g+=2;break}else if(y[g-2]!==0){g++;break}h+3!==g-2&&this.trigger("data",y.subarray(h+3,g-2));do g++;while(y[g]!==1&&g<E);h=g-2,g+=3;break;case 1:if(y[g-1]!==0||y[g-2]!==0){g+=3;break}this.trigger("data",y.subarray(h+3,g-2)),h=g-2,g+=3;break;default:g+=3;break}y=y.subarray(h),g-=h,h=0},this.reset=function(){y=null,h=0,this.trigger("reset")},this.flush=function(){y&&y.byteLength>3&&this.trigger("data",y.subarray(h+3)),y=null,h=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},js.prototype=new ju,Yd={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Go=function(){var h=new js,g,y,T,b,E,w,O;Go.prototype.init.call(this),g=this,this.push=function(R){R.type==="video"&&(y=R.trackId,T=R.pts,b=R.dts,h.push(R))},h.on("data",function(R){var j={trackId:y,pts:T,dts:b,data:R,nalUnitTypeCode:R[0]&31};switch(j.nalUnitTypeCode){case 5:j.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:j.nalUnitType="sei_rbsp",j.escapedRBSP=E(R.subarray(1));break;case 7:j.nalUnitType="seq_parameter_set_rbsp",j.escapedRBSP=E(R.subarray(1)),j.config=w(j.escapedRBSP);break;case 8:j.nalUnitType="pic_parameter_set_rbsp";break;case 9:j.nalUnitType="access_unit_delimiter_rbsp";break}g.trigger("data",j)}),h.on("done",function(){g.trigger("done")}),h.on("partialdone",function(){g.trigger("partialdone")}),h.on("reset",function(){g.trigger("reset")}),h.on("endedtimeline",function(){g.trigger("endedtimeline")}),this.flush=function(){h.flush()},this.partialFlush=function(){h.partialFlush()},this.reset=function(){h.reset()},this.endTimeline=function(){h.endTimeline()},O=function(R,j){var H=8,J=8,Ee,ue;for(Ee=0;Ee<R;Ee++)J!==0&&(ue=j.readExpGolomb(),J=(H+ue+256)%256),H=J===0?H:J},E=function(R){for(var j=R.byteLength,H=[],J=1,Ee,ue;J<j-2;)R[J]===0&&R[J+1]===0&&R[J+2]===3?(H.push(J+2),J+=2):J++;if(H.length===0)return R;Ee=j-H.length,ue=new Uint8Array(Ee);var Be=0;for(J=0;J<Ee;Be++,J++)Be===H[0]&&(Be++,H.shift()),ue[J]=R[Be];return ue},w=function(R){var j=0,H=0,J=0,Ee=0,ue,Be,Ye,ni,Li,hs,_r,ra,Wa,Ka,Za,Lt=[1,1],Ja,fn;if(ue=new Wp(R),Be=ue.readUnsignedByte(),ni=ue.readUnsignedByte(),Ye=ue.readUnsignedByte(),ue.skipUnsignedExpGolomb(),Yd[Be]&&(Li=ue.readUnsignedExpGolomb(),Li===3&&ue.skipBits(1),ue.skipUnsignedExpGolomb(),ue.skipUnsignedExpGolomb(),ue.skipBits(1),ue.readBoolean()))for(Za=Li!==3?8:12,fn=0;fn<Za;fn++)ue.readBoolean()&&(fn<6?O(16,ue):O(64,ue));if(ue.skipUnsignedExpGolomb(),hs=ue.readUnsignedExpGolomb(),hs===0)ue.readUnsignedExpGolomb();else if(hs===1)for(ue.skipBits(1),ue.skipExpGolomb(),ue.skipExpGolomb(),_r=ue.readUnsignedExpGolomb(),fn=0;fn<_r;fn++)ue.skipExpGolomb();if(ue.skipUnsignedExpGolomb(),ue.skipBits(1),ra=ue.readUnsignedExpGolomb(),Wa=ue.readUnsignedExpGolomb(),Ka=ue.readBits(1),Ka===0&&ue.skipBits(1),ue.skipBits(1),ue.readBoolean()&&(j=ue.readUnsignedExpGolomb(),H=ue.readUnsignedExpGolomb(),J=ue.readUnsignedExpGolomb(),Ee=ue.readUnsignedExpGolomb()),ue.readBoolean()&&ue.readBoolean()){switch(Ja=ue.readUnsignedByte(),Ja){case 1:Lt=[1,1];break;case 2:Lt=[12,11];break;case 3:Lt=[10,11];break;case 4:Lt=[16,11];break;case 5:Lt=[40,33];break;case 6:Lt=[24,11];break;case 7:Lt=[20,11];break;case 8:Lt=[32,11];break;case 9:Lt=[80,33];break;case 10:Lt=[18,11];break;case 11:Lt=[15,11];break;case 12:Lt=[64,33];break;case 13:Lt=[160,99];break;case 14:Lt=[4,3];break;case 15:Lt=[3,2];break;case 16:Lt=[2,1];break;case 255:{Lt=[ue.readUnsignedByte()<<8|ue.readUnsignedByte(),ue.readUnsignedByte()<<8|ue.readUnsignedByte()];break}}Lt&&Lt[0]/Lt[1]}return{profileIdc:Be,levelIdc:Ye,profileCompatibility:ni,width:(ra+1)*16-j*2-H*2,height:(2-Ka)*(Wa+1)*16-J*2-Ee*2,sarRatio:Lt}}},Go.prototype=new ju;var zu={H264Stream:Go,NalByteStream:js},Uu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Qd=function(h,g){var y=h[g+6]<<21|h[g+7]<<14|h[g+8]<<7|h[g+9],T=h[g+5],b=(T&16)>>4;return y=y>=0?y:0,b?y+20:y+10},qi=function(h,g){return h.length-g<10||h[g]!=="I".charCodeAt(0)||h[g+1]!=="D".charCodeAt(0)||h[g+2]!=="3".charCodeAt(0)?g:(g+=Qd(h,g),qi(h,g))},$y=function(h){var g=qi(h,0);return h.length>=g+2&&(h[g]&255)===255&&(h[g+1]&240)===240&&(h[g+1]&22)===16},Pu=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},Kp=function(h,g,y){var T,b="";for(T=g;T<y;T++)b+="%"+("00"+h[T].toString(16)).slice(-2);return b},Zp=function(h,g,y){return unescape(Kp(h,g,y))},Yy=function(h,g){var y=(h[g+5]&224)>>5,T=h[g+4]<<3,b=h[g+3]&6144;return b|T|y},Qy=function(h,g){return h[g]==="I".charCodeAt(0)&&h[g+1]==="D".charCodeAt(0)&&h[g+2]==="3".charCodeAt(0)?"timed-metadata":h[g]&!0&&(h[g+1]&240)===240?"audio":null},Jp=function(h){for(var g=0;g+5<h.length;){if(h[g]!==255||(h[g+1]&246)!==240){g++;continue}return Uu[(h[g+2]&60)>>>2]}return null},Gy=function(h){var g,y,T,b;g=10,h[5]&64&&(g+=4,g+=Pu(h.subarray(10,14)));do{if(y=Pu(h.subarray(g+4,g+8)),y<1)return null;if(b=String.fromCharCode(h[g],h[g+1],h[g+2],h[g+3]),b==="PRIV"){T=h.subarray(g+10,g+y+10);for(var E=0;E<T.byteLength;E++)if(T[E]===0){var w=Zp(T,0,E);if(w==="com.apple.streaming.transportStreamTimestamp"){var O=T.subarray(E+1),R=(O[3]&1)<<30|O[4]<<22|O[5]<<14|O[6]<<6|O[7]>>>2;return R*=4,R+=O[7]&3,R}break}}g+=10,g+=y}while(g<h.byteLength);return null},Bu={isLikelyAacData:$y,parseId3TagSize:Qd,parseAdtsSize:Yy,parseType:Qy,parseSampleRate:Jp,parseAacTimestamp:Gy},Xy=i,Xo=Bu,Wo;Wo=function(){var h=new Uint8Array,g=0;Wo.prototype.init.call(this),this.setTimestamp=function(y){g=y},this.push=function(y){var T=0,b=0,E,w,O,R;for(h.length?(R=h.length,h=new Uint8Array(y.byteLength+R),h.set(h.subarray(0,R)),h.set(y,R)):h=y;h.length-b>=3;){if(h[b]==="I".charCodeAt(0)&&h[b+1]==="D".charCodeAt(0)&&h[b+2]==="3".charCodeAt(0)){if(h.length-b<10||(T=Xo.parseId3TagSize(h,b),b+T>h.length))break;w={type:"timed-metadata",data:h.subarray(b,b+T)},this.trigger("data",w),b+=T;continue}else if((h[b]&255)===255&&(h[b+1]&240)===240){if(h.length-b<7||(T=Xo.parseAdtsSize(h,b),b+T>h.length))break;O={type:"audio",data:h.subarray(b,b+T),pts:g,dts:g},this.trigger("data",O),b+=T;continue}b++}E=h.length-b,E>0?h=h.subarray(b):h=new Uint8Array},this.reset=function(){h=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){h=new Uint8Array,this.trigger("endedtimeline")}},Wo.prototype=new Xy;var em=Wo,tm=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Wy=tm,Ky=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Zy=Ky,qu=i,Ko=Fe,zs=Tt,Zo=Ce,kn=tt,us=Yp,Jo=vt,Fu=Vy,im=zu.H264Stream,Kr=em,Zr=Bu.isLikelyAacData,Yn=vt.ONE_SECOND_IN_TS,Fi=Wy,Fa=Zy,dr,hr,xi,fr,Hu=function(h,g){g.stream=h,this.trigger("log",g)},pr=function(h,g){for(var y=Object.keys(g),T=0;T<y.length;T++){var b=y[T];b==="headOfPipeline"||!g[b].on||g[b].on("log",Hu.bind(h,b))}},Vu=function(h,g){var y;if(h.length!==g.length)return!1;for(y=0;y<h.length;y++)if(h[y]!==g[y])return!1;return!0},$u=function(h,g,y,T,b,E){var w=y-g,O=T-g,R=b-y;return{start:{dts:h,pts:h+w},end:{dts:h+O,pts:h+R},prependedContentDuration:E,baseMediaDecodeTime:h}};hr=function(h,g){var y=[],T,b=0,E=0,w=1/0;g=g||{},T=g.firstSequenceNumber||0,hr.prototype.init.call(this),this.push=function(O){kn.collectDtsInfo(h,O),h&&Fi.forEach(function(R){h[R]=O[R]}),y.push(O)},this.setEarliestDts=function(O){b=O},this.setVideoBaseMediaDecodeTime=function(O){w=O},this.setAudioAppendStart=function(O){E=O},this.flush=function(){var O,R,j,H,J,Ee,ue;if(y.length===0){this.trigger("done","AudioSegmentStream");return}O=Zo.trimAdtsFramesByEarliestDts(y,h,b),h.baseMediaDecodeTime=kn.calculateTrackBaseMediaDecodeTime(h,g.keepOriginalTimestamps),ue=Zo.prefixWithSilence(h,O,E,w),h.samples=Zo.generateSampleTable(O),j=Ko.mdat(Zo.concatenateFrameData(O)),y=[],R=Ko.moof(T,[h]),H=new Uint8Array(R.byteLength+j.byteLength),T++,H.set(R),H.set(j,R.byteLength),kn.clearDtsInfo(h),J=Math.ceil(Yn*1024/h.samplerate),O.length&&(Ee=O.length*J,this.trigger("segmentTimingInfo",$u(Jo.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),O[0].dts,O[0].pts,O[0].dts+Ee,O[0].pts+Ee,ue||0)),this.trigger("timingInfo",{start:O[0].pts,end:O[0].pts+Ee})),this.trigger("data",{track:h,boxes:H}),this.trigger("done","AudioSegmentStream")},this.reset=function(){kn.clearDtsInfo(h),y=[],this.trigger("reset")}},hr.prototype=new qu,dr=function(h,g){var y,T=[],b=[],E,w;g=g||{},y=g.firstSequenceNumber||0,dr.prototype.init.call(this),delete h.minPTS,this.gopCache_=[],this.push=function(O){kn.collectDtsInfo(h,O),O.nalUnitType==="seq_parameter_set_rbsp"&&!E&&(E=O.config,h.sps=[O.data],Fa.forEach(function(R){h[R]=E[R]},this)),O.nalUnitType==="pic_parameter_set_rbsp"&&!w&&(w=O.data,h.pps=[O.data]),T.push(O)},this.flush=function(){for(var O,R,j,H,J,Ee,ue=0,Be,Ye;T.length&&T[0].nalUnitType!=="access_unit_delimiter_rbsp";)T.shift();if(T.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(O=zs.groupNalsIntoFrames(T),j=zs.groupFramesIntoGops(O),j[0][0].keyFrame||(R=this.getGopForFusion_(T[0],h),R?(ue=R.duration,j.unshift(R),j.byteLength+=R.byteLength,j.nalCount+=R.nalCount,j.pts=R.pts,j.dts=R.dts,j.duration+=R.duration):j=zs.extendFirstKeyFrame(j)),b.length){var ni;if(g.alignGopsAtEnd?ni=this.alignGopsAtEnd_(j):ni=this.alignGopsAtStart_(j),!ni){this.gopCache_.unshift({gop:j.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),T=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}kn.clearDtsInfo(h),j=ni}kn.collectDtsInfo(h,j),h.samples=zs.generateSampleTable(j),J=Ko.mdat(zs.concatenateNalData(j)),h.baseMediaDecodeTime=kn.calculateTrackBaseMediaDecodeTime(h,g.keepOriginalTimestamps),this.trigger("processedGopsInfo",j.map(function(Li){return{pts:Li.pts,dts:Li.dts,byteLength:Li.byteLength}})),Be=j[0],Ye=j[j.length-1],this.trigger("segmentTimingInfo",$u(h.baseMediaDecodeTime,Be.dts,Be.pts,Ye.dts+Ye.duration,Ye.pts+Ye.duration,ue)),this.trigger("timingInfo",{start:j[0].pts,end:j[j.length-1].pts+j[j.length-1].duration}),this.gopCache_.unshift({gop:j.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),T=[],this.trigger("baseMediaDecodeTime",h.baseMediaDecodeTime),this.trigger("timelineStartInfo",h.timelineStartInfo),H=Ko.moof(y,[h]),Ee=new Uint8Array(H.byteLength+J.byteLength),y++,Ee.set(H),Ee.set(J,H.byteLength),this.trigger("data",{track:h,boxes:Ee}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),T=[],this.gopCache_.length=0,b.length=0,this.trigger("reset")},this.resetStream_=function(){kn.clearDtsInfo(h),E=void 0,w=void 0},this.getGopForFusion_=function(O){var R=45e3,j=1e4,H=1/0,J,Ee,ue,Be,Ye;for(Ye=0;Ye<this.gopCache_.length;Ye++)Be=this.gopCache_[Ye],ue=Be.gop,!(!(h.pps&&Vu(h.pps[0],Be.pps[0]))||!(h.sps&&Vu(h.sps[0],Be.sps[0])))&&(ue.dts<h.timelineStartInfo.dts||(J=O.dts-ue.dts-ue.duration,J>=-j&&J<=R&&(!Ee||H>J)&&(Ee=Be,H=J)));return Ee?Ee.gop:null},this.alignGopsAtStart_=function(O){var R,j,H,J,Ee,ue,Be,Ye;for(Ee=O.byteLength,ue=O.nalCount,Be=O.duration,R=j=0;R<b.length&&j<O.length&&(H=b[R],J=O[j],H.pts!==J.pts);){if(J.pts>H.pts){R++;continue}j++,Ee-=J.byteLength,ue-=J.nalCount,Be-=J.duration}return j===0?O:j===O.length?null:(Ye=O.slice(j),Ye.byteLength=Ee,Ye.duration=Be,Ye.nalCount=ue,Ye.pts=Ye[0].pts,Ye.dts=Ye[0].dts,Ye)},this.alignGopsAtEnd_=function(O){var R,j,H,J,Ee,ue;for(R=b.length-1,j=O.length-1,Ee=null,ue=!1;R>=0&&j>=0;){if(H=b[R],J=O[j],H.pts===J.pts){ue=!0;break}if(H.pts>J.pts){R--;continue}R===b.length-1&&(Ee=j),j--}if(!ue&&Ee===null)return null;var Be;if(ue?Be=j:Be=Ee,Be===0)return O;var Ye=O.slice(Be),ni=Ye.reduce(function(Li,hs){return Li.byteLength+=hs.byteLength,Li.duration+=hs.duration,Li.nalCount+=hs.nalCount,Li},{byteLength:0,duration:0,nalCount:0});return Ye.byteLength=ni.byteLength,Ye.duration=ni.duration,Ye.nalCount=ni.nalCount,Ye.pts=Ye[0].pts,Ye.dts=Ye[0].dts,Ye},this.alignGopsWith=function(O){b=O}},dr.prototype=new qu,fr=function(h,g){this.numberOfTracks=0,this.metadataStream=g,h=h||{},typeof h.remux<"u"?this.remuxTracks=!!h.remux:this.remuxTracks=!0,typeof h.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=h.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,fr.prototype.init.call(this),this.push=function(y){if(y.content||y.text)return this.pendingCaptions.push(y);if(y.frames)return this.pendingMetadata.push(y);this.pendingTracks.push(y.track),this.pendingBytes+=y.boxes.byteLength,y.track.type==="video"&&(this.videoTrack=y.track,this.pendingBoxes.push(y.boxes)),y.track.type==="audio"&&(this.audioTrack=y.track,this.pendingBoxes.unshift(y.boxes))}},fr.prototype=new qu,fr.prototype.flush=function(h){var g=0,y={captions:[],captionStreams:{},metadata:[],info:{}},T,b,E,w=0,O;if(this.pendingTracks.length<this.numberOfTracks){if(h!=="VideoSegmentStream"&&h!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(w=this.videoTrack.timelineStartInfo.pts,Fa.forEach(function(R){y.info[R]=this.videoTrack[R]},this)):this.audioTrack&&(w=this.audioTrack.timelineStartInfo.pts,Fi.forEach(function(R){y.info[R]=this.audioTrack[R]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?y.type=this.pendingTracks[0].type:y.type="combined",this.emittedTracks+=this.pendingTracks.length,E=Ko.initSegment(this.pendingTracks),y.initSegment=new Uint8Array(E.byteLength),y.initSegment.set(E),y.data=new Uint8Array(this.pendingBytes),O=0;O<this.pendingBoxes.length;O++)y.data.set(this.pendingBoxes[O],g),g+=this.pendingBoxes[O].byteLength;for(O=0;O<this.pendingCaptions.length;O++)T=this.pendingCaptions[O],T.startTime=Jo.metadataTsToSeconds(T.startPts,w,this.keepOriginalTimestamps),T.endTime=Jo.metadataTsToSeconds(T.endPts,w,this.keepOriginalTimestamps),y.captionStreams[T.stream]=!0,y.captions.push(T);for(O=0;O<this.pendingMetadata.length;O++)b=this.pendingMetadata[O],b.cueTime=Jo.metadataTsToSeconds(b.pts,w,this.keepOriginalTimestamps),y.metadata.push(b);for(y.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",y),O=0;O<y.captions.length;O++)T=y.captions[O],this.trigger("caption",T);for(O=0;O<y.metadata.length;O++)b=y.metadata[O],this.trigger("id3Frame",b)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},fr.prototype.setRemux=function(h){this.remuxTracks=h},xi=function(h){var g=this,y=!0,T,b;xi.prototype.init.call(this),h=h||{},this.baseMediaDecodeTime=h.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var E={};this.transmuxPipeline_=E,E.type="aac",E.metadataStream=new us.MetadataStream,E.aacStream=new Kr,E.audioTimestampRolloverStream=new us.TimestampRolloverStream("audio"),E.timedMetadataTimestampRolloverStream=new us.TimestampRolloverStream("timed-metadata"),E.adtsStream=new Fu,E.coalesceStream=new fr(h,E.metadataStream),E.headOfPipeline=E.aacStream,E.aacStream.pipe(E.audioTimestampRolloverStream).pipe(E.adtsStream),E.aacStream.pipe(E.timedMetadataTimestampRolloverStream).pipe(E.metadataStream).pipe(E.coalesceStream),E.metadataStream.on("timestamp",function(w){E.aacStream.setTimestamp(w.timeStamp)}),E.aacStream.on("data",function(w){w.type!=="timed-metadata"&&w.type!=="audio"||E.audioSegmentStream||(b=b||{timelineStartInfo:{baseMediaDecodeTime:g.baseMediaDecodeTime},codec:"adts",type:"audio"},E.coalesceStream.numberOfTracks++,E.audioSegmentStream=new hr(b,h),E.audioSegmentStream.on("log",g.getLogTrigger_("audioSegmentStream")),E.audioSegmentStream.on("timingInfo",g.trigger.bind(g,"audioTimingInfo")),E.adtsStream.pipe(E.audioSegmentStream).pipe(E.coalesceStream),g.trigger("trackinfo",{hasAudio:!!b,hasVideo:!!T}))}),E.coalesceStream.on("data",this.trigger.bind(this,"data")),E.coalesceStream.on("done",this.trigger.bind(this,"done")),pr(this,E)},this.setupTsPipeline=function(){var E={};this.transmuxPipeline_=E,E.type="ts",E.metadataStream=new us.MetadataStream,E.packetStream=new us.TransportPacketStream,E.parseStream=new us.TransportParseStream,E.elementaryStream=new us.ElementaryStream,E.timestampRolloverStream=new us.TimestampRolloverStream,E.adtsStream=new Fu,E.h264Stream=new im,E.captionStream=new us.CaptionStream(h),E.coalesceStream=new fr(h,E.metadataStream),E.headOfPipeline=E.packetStream,E.packetStream.pipe(E.parseStream).pipe(E.elementaryStream).pipe(E.timestampRolloverStream),E.timestampRolloverStream.pipe(E.h264Stream),E.timestampRolloverStream.pipe(E.adtsStream),E.timestampRolloverStream.pipe(E.metadataStream).pipe(E.coalesceStream),E.h264Stream.pipe(E.captionStream).pipe(E.coalesceStream),E.elementaryStream.on("data",function(w){var O;if(w.type==="metadata"){for(O=w.tracks.length;O--;)!T&&w.tracks[O].type==="video"?(T=w.tracks[O],T.timelineStartInfo.baseMediaDecodeTime=g.baseMediaDecodeTime):!b&&w.tracks[O].type==="audio"&&(b=w.tracks[O],b.timelineStartInfo.baseMediaDecodeTime=g.baseMediaDecodeTime);T&&!E.videoSegmentStream&&(E.coalesceStream.numberOfTracks++,E.videoSegmentStream=new dr(T,h),E.videoSegmentStream.on("log",g.getLogTrigger_("videoSegmentStream")),E.videoSegmentStream.on("timelineStartInfo",function(R){b&&!h.keepOriginalTimestamps&&(b.timelineStartInfo=R,E.audioSegmentStream.setEarliestDts(R.dts-g.baseMediaDecodeTime))}),E.videoSegmentStream.on("processedGopsInfo",g.trigger.bind(g,"gopInfo")),E.videoSegmentStream.on("segmentTimingInfo",g.trigger.bind(g,"videoSegmentTimingInfo")),E.videoSegmentStream.on("baseMediaDecodeTime",function(R){b&&E.audioSegmentStream.setVideoBaseMediaDecodeTime(R)}),E.videoSegmentStream.on("timingInfo",g.trigger.bind(g,"videoTimingInfo")),E.h264Stream.pipe(E.videoSegmentStream).pipe(E.coalesceStream)),b&&!E.audioSegmentStream&&(E.coalesceStream.numberOfTracks++,E.audioSegmentStream=new hr(b,h),E.audioSegmentStream.on("log",g.getLogTrigger_("audioSegmentStream")),E.audioSegmentStream.on("timingInfo",g.trigger.bind(g,"audioTimingInfo")),E.audioSegmentStream.on("segmentTimingInfo",g.trigger.bind(g,"audioSegmentTimingInfo")),E.adtsStream.pipe(E.audioSegmentStream).pipe(E.coalesceStream)),g.trigger("trackinfo",{hasAudio:!!b,hasVideo:!!T})}}),E.coalesceStream.on("data",this.trigger.bind(this,"data")),E.coalesceStream.on("id3Frame",function(w){w.dispatchType=E.metadataStream.dispatchType,g.trigger("id3Frame",w)}),E.coalesceStream.on("caption",this.trigger.bind(this,"caption")),E.coalesceStream.on("done",this.trigger.bind(this,"done")),pr(this,E)},this.setBaseMediaDecodeTime=function(E){var w=this.transmuxPipeline_;h.keepOriginalTimestamps||(this.baseMediaDecodeTime=E),b&&(b.timelineStartInfo.dts=void 0,b.timelineStartInfo.pts=void 0,kn.clearDtsInfo(b),w.audioTimestampRolloverStream&&w.audioTimestampRolloverStream.discontinuity()),T&&(w.videoSegmentStream&&(w.videoSegmentStream.gopCache_=[]),T.timelineStartInfo.dts=void 0,T.timelineStartInfo.pts=void 0,kn.clearDtsInfo(T),w.captionStream.reset()),w.timestampRolloverStream&&w.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(E){b&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(E)},this.setRemux=function(E){var w=this.transmuxPipeline_;h.remux=E,w&&w.coalesceStream&&w.coalesceStream.setRemux(E)},this.alignGopsWith=function(E){T&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(E)},this.getLogTrigger_=function(E){var w=this;return function(O){O.stream=E,w.trigger("log",O)}},this.push=function(E){if(y){var w=Zr(E);w&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!w&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),y=!1}this.transmuxPipeline_.headOfPipeline.push(E)},this.flush=function(){y=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},xi.prototype=new qu;var nm={Transmuxer:xi,VideoSegmentStream:dr,AudioSegmentStream:hr,AUDIO_PROPERTIES:Fi,VIDEO_PROPERTIES:Fa,generateSegmentTimingInfo:$u},Gd=function(h){return h>>>0},Jy=function(h){return("00"+h.toString(16)).slice(-2)},Ha={toUnsigned:Gd,toHexString:Jy},Us=function(h){var g="";return g+=String.fromCharCode(h[0]),g+=String.fromCharCode(h[1]),g+=String.fromCharCode(h[2]),g+=String.fromCharCode(h[3]),g},Yu=Us,Xd=Ha.toUnsigned,Qu=Yu,mr=function(h,g){var y=[],T,b,E,w,O;if(!g.length)return null;for(T=0;T<h.byteLength;)b=Xd(h[T]<<24|h[T+1]<<16|h[T+2]<<8|h[T+3]),E=Qu(h.subarray(T+4,T+8)),w=b>1?T+b:h.byteLength,E===g[0]&&(g.length===1?y.push(h.subarray(T+8,w)):(O=mr(h.subarray(T+8,w),g.slice(1)),O.length&&(y=y.concat(O)))),T=w;return y},Va=mr,Wd=Ha.toUnsigned,Jr=l.getUint64,sm=function(h){var g={version:h[0],flags:new Uint8Array(h.subarray(1,4))};return g.version===1?g.baseMediaDecodeTime=Jr(h.subarray(4)):g.baseMediaDecodeTime=Wd(h[4]<<24|h[5]<<16|h[6]<<8|h[7]),g},el=sm,Kd=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),trackId:g.getUint32(4)},T=y.flags[2]&1,b=y.flags[2]&2,E=y.flags[2]&8,w=y.flags[2]&16,O=y.flags[2]&32,R=y.flags[0]&65536,j=y.flags[0]&131072,H;return H=8,T&&(H+=4,y.baseDataOffset=g.getUint32(12),H+=4),b&&(y.sampleDescriptionIndex=g.getUint32(H),H+=4),E&&(y.defaultSampleDuration=g.getUint32(H),H+=4),w&&(y.defaultSampleSize=g.getUint32(H),H+=4),O&&(y.defaultSampleFlags=g.getUint32(H)),R&&(y.durationIsEmpty=!0),!T&&j&&(y.baseDataOffsetIsMoof=!0),y},Ps=Kd,gr=l.getUint64,Zd=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),references:[],referenceId:g.getUint32(4),timescale:g.getUint32(8)},T=12;y.version===0?(y.earliestPresentationTime=g.getUint32(T),y.firstOffset=g.getUint32(T+4),T+=8):(y.earliestPresentationTime=gr(h.subarray(T)),y.firstOffset=gr(h.subarray(T+8)),T+=16),T+=2;var b=g.getUint16(T);for(T+=2;b>0;T+=12,b--)y.references.push({referenceType:(h[T]&128)>>>7,referencedSize:g.getUint32(T)&2147483647,subsegmentDuration:g.getUint32(T+4),startsWithSap:!!(h[T+8]&128),sapType:(h[T+8]&112)>>>4,sapDeltaTime:g.getUint32(T+8)&268435455});return y},ea=Zd,rm=function(h){return{isLeading:(h[0]&12)>>>2,dependsOn:h[0]&3,isDependedOn:(h[1]&192)>>>6,hasRedundancy:(h[1]&48)>>>4,paddingValue:(h[1]&14)>>>1,isNonSyncSample:h[1]&1,degradationPriority:h[2]<<8|h[3]}},am=rm,$a=am,tl=function(h){var g={version:h[0],flags:new Uint8Array(h.subarray(1,4)),samples:[]},y=new DataView(h.buffer,h.byteOffset,h.byteLength),T=g.flags[2]&1,b=g.flags[2]&4,E=g.flags[1]&1,w=g.flags[1]&2,O=g.flags[1]&4,R=g.flags[1]&8,j=y.getUint32(4),H=8,J;for(T&&(g.dataOffset=y.getInt32(H),H+=4),b&&j&&(J={flags:$a(h.subarray(H,H+4))},H+=4,E&&(J.duration=y.getUint32(H),H+=4),w&&(J.size=y.getUint32(H),H+=4),R&&(g.version===1?J.compositionTimeOffset=y.getInt32(H):J.compositionTimeOffset=y.getUint32(H),H+=4),g.samples.push(J),j--);j--;)J={},E&&(J.duration=y.getUint32(H),H+=4),w&&(J.size=y.getUint32(H),H+=4),O&&(J.flags=$a(h.subarray(H,H+4)),H+=4),R&&(g.version===1?J.compositionTimeOffset=y.getInt32(H):J.compositionTimeOffset=y.getUint32(H),H+=4),g.samples.push(J);return g},Jd=tl,il=l,eh=il.getUint64,di,cs,ii=function(h){return new Date(h*1e3-20828448e5)},ta=Yu,th=Va,nl=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=[],T,b;for(T=0;T+4<h.length;T+=b){if(b=g.getUint32(T),T+=4,b<=0){y.push("<span style='color:red;'>MALFORMED DATA</span>");continue}switch(h[T]&31){case 1:y.push("slice_layer_without_partitioning_rbsp");break;case 5:y.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:y.push("sei_rbsp");break;case 7:y.push("seq_parameter_set_rbsp");break;case 8:y.push("pic_parameter_set_rbsp");break;case 9:y.push("access_unit_delimiter_rbsp");break;default:y.push("UNKNOWN NAL - "+h[T]&31);break}}return y},Qn={avc1:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{dataReferenceIndex:g.getUint16(6),width:g.getUint16(24),height:g.getUint16(26),horizresolution:g.getUint16(28)+g.getUint16(30)/16,vertresolution:g.getUint16(32)+g.getUint16(34)/16,frameCount:g.getUint16(40),depth:g.getUint16(74),config:di(h.subarray(78,h.byteLength))}},avcC:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={configurationVersion:h[0],avcProfileIndication:h[1],profileCompatibility:h[2],avcLevelIndication:h[3],lengthSizeMinusOne:h[4]&3,sps:[],pps:[]},T=h[5]&31,b,E,w,O;for(w=6,O=0;O<T;O++)E=g.getUint16(w),w+=2,y.sps.push(new Uint8Array(h.subarray(w,w+E))),w+=E;for(b=h[w],w++,O=0;O<b;O++)E=g.getUint16(w),w+=2,y.pps.push(new Uint8Array(h.subarray(w,w+E))),w+=E;return y},btrt:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{bufferSizeDB:g.getUint32(0),maxBitrate:g.getUint32(4),avgBitrate:g.getUint32(8)}},edts:function(g){return{boxes:di(g)}},elst:function(g){var y=new DataView(g.buffer,g.byteOffset,g.byteLength),T={version:y.getUint8(0),flags:new Uint8Array(g.subarray(1,4)),edits:[]},b=y.getUint32(4),E;for(E=8;b;b--)T.version===0?(T.edits.push({segmentDuration:y.getUint32(E),mediaTime:y.getInt32(E+4),mediaRate:y.getUint16(E+8)+y.getUint16(E+10)/(256*256)}),E+=12):(T.edits.push({segmentDuration:eh(g.subarray(E)),mediaTime:eh(g.subarray(E+8)),mediaRate:y.getUint16(E+16)+y.getUint16(E+18)/(256*256)}),E+=20);return T},esds:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),esId:h[6]<<8|h[7],streamPriority:h[8]&31,decoderConfig:{objectProfileIndication:h[11],streamType:h[12]>>>2&63,bufferSize:h[13]<<16|h[14]<<8|h[15],maxBitrate:h[16]<<24|h[17]<<16|h[18]<<8|h[19],avgBitrate:h[20]<<24|h[21]<<16|h[22]<<8|h[23],decoderConfigDescriptor:{tag:h[24],length:h[25],audioObjectType:h[26]>>>3&31,samplingFrequencyIndex:(h[26]&7)<<1|h[27]>>>7&1,channelConfiguration:h[27]>>>3&15}}}},ftyp:function(h){for(var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={majorBrand:ta(h.subarray(0,4)),minorVersion:g.getUint32(4),compatibleBrands:[]},T=8;T<h.byteLength;)y.compatibleBrands.push(ta(h.subarray(T,T+4))),T+=4;return y},dinf:function(h){return{boxes:di(h)}},dref:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),dataReferences:di(h.subarray(8))}},hdlr:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),handlerType:ta(h.subarray(8,12)),name:""},T=8;for(T=24;T<h.byteLength;T++){if(h[T]===0){T++;break}y.name+=String.fromCharCode(h[T])}return y.name=decodeURIComponent(escape(y.name)),y},mdat:function(h){return{byteLength:h.byteLength,nals:nl(h)}},mdhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,T,b={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),language:""};return b.version===1?(y+=4,b.creationTime=ii(g.getUint32(y)),y+=8,b.modificationTime=ii(g.getUint32(y)),y+=4,b.timescale=g.getUint32(y),y+=8,b.duration=g.getUint32(y)):(b.creationTime=ii(g.getUint32(y)),y+=4,b.modificationTime=ii(g.getUint32(y)),y+=4,b.timescale=g.getUint32(y),y+=4,b.duration=g.getUint32(y)),y+=4,T=g.getUint16(y),b.language+=String.fromCharCode((T>>10)+96),b.language+=String.fromCharCode(((T&992)>>5)+96),b.language+=String.fromCharCode((T&31)+96),b},mdia:function(h){return{boxes:di(h)}},mfhd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),sequenceNumber:h[4]<<24|h[5]<<16|h[6]<<8|h[7]}},minf:function(h){return{boxes:di(h)}},mp4a:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={dataReferenceIndex:g.getUint16(6),channelcount:g.getUint16(16),samplesize:g.getUint16(18),samplerate:g.getUint16(24)+g.getUint16(26)/65536};return h.byteLength>28&&(y.streamDescriptor=di(h.subarray(28))[0]),y},moof:function(h){return{boxes:di(h)}},moov:function(h){return{boxes:di(h)}},mvex:function(h){return{boxes:di(h)}},mvhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,T={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4))};return T.version===1?(y+=4,T.creationTime=ii(g.getUint32(y)),y+=8,T.modificationTime=ii(g.getUint32(y)),y+=4,T.timescale=g.getUint32(y),y+=8,T.duration=g.getUint32(y)):(T.creationTime=ii(g.getUint32(y)),y+=4,T.modificationTime=ii(g.getUint32(y)),y+=4,T.timescale=g.getUint32(y),y+=4,T.duration=g.getUint32(y)),y+=4,T.rate=g.getUint16(y)+g.getUint16(y+2)/16,y+=4,T.volume=g.getUint8(y)+g.getUint8(y+1)/8,y+=2,y+=2,y+=2*4,T.matrix=new Uint32Array(h.subarray(y,y+9*4)),y+=9*4,y+=6*4,T.nextTrackId=g.getUint32(y),T},pdin:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),rate:g.getUint32(4),initialDelay:g.getUint32(8)}},sdtp:function(h){var g={version:h[0],flags:new Uint8Array(h.subarray(1,4)),samples:[]},y;for(y=4;y<h.byteLength;y++)g.samples.push({dependsOn:(h[y]&48)>>4,isDependedOn:(h[y]&12)>>2,hasRedundancy:h[y]&3});return g},sidx:ea,smhd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),balance:h[4]+h[5]/256}},stbl:function(h){return{boxes:di(h)}},ctts:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),compositionOffsets:[]},T=g.getUint32(4),b;for(b=8;T;b+=8,T--)y.compositionOffsets.push({sampleCount:g.getUint32(b),sampleOffset:g[y.version===0?"getUint32":"getInt32"](b+4)});return y},stss:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),syncSamples:[]},T=g.getUint32(4),b;for(b=8;T;b+=4,T--)y.syncSamples.push(g.getUint32(b));return y},stco:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),chunkOffsets:[]},T=g.getUint32(4),b;for(b=8;T;b+=4,T--)y.chunkOffsets.push(g.getUint32(b));return y},stsc:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=g.getUint32(4),T={version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleToChunks:[]},b;for(b=8;y;b+=12,y--)T.sampleToChunks.push({firstChunk:g.getUint32(b),samplesPerChunk:g.getUint32(b+4),sampleDescriptionIndex:g.getUint32(b+8)});return T},stsd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleDescriptions:di(h.subarray(8))}},stsz:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleSize:g.getUint32(4),entries:[]},T;for(T=12;T<h.byteLength;T+=4)y.entries.push(g.getUint32(T));return y},stts:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),timeToSamples:[]},T=g.getUint32(4),b;for(b=8;T;b+=8,T--)y.timeToSamples.push({sampleCount:g.getUint32(b),sampleDelta:g.getUint32(b+4)});return y},styp:function(h){return Qn.ftyp(h)},tfdt:el,tfhd:Ps,tkhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,T={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4))};return T.version===1?(y+=4,T.creationTime=ii(g.getUint32(y)),y+=8,T.modificationTime=ii(g.getUint32(y)),y+=4,T.trackId=g.getUint32(y),y+=4,y+=8,T.duration=g.getUint32(y)):(T.creationTime=ii(g.getUint32(y)),y+=4,T.modificationTime=ii(g.getUint32(y)),y+=4,T.trackId=g.getUint32(y),y+=4,y+=4,T.duration=g.getUint32(y)),y+=4,y+=2*4,T.layer=g.getUint16(y),y+=2,T.alternateGroup=g.getUint16(y),y+=2,T.volume=g.getUint8(y)+g.getUint8(y+1)/8,y+=2,y+=2,T.matrix=new Uint32Array(h.subarray(y,y+9*4)),y+=9*4,T.width=g.getUint16(y)+g.getUint16(y+2)/65536,y+=4,T.height=g.getUint16(y)+g.getUint16(y+2)/65536,T},traf:function(h){return{boxes:di(h)}},trak:function(h){return{boxes:di(h)}},trex:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),trackId:g.getUint32(4),defaultSampleDescriptionIndex:g.getUint32(8),defaultSampleDuration:g.getUint32(12),defaultSampleSize:g.getUint32(16),sampleDependsOn:h[20]&3,sampleIsDependedOn:(h[21]&192)>>6,sampleHasRedundancy:(h[21]&48)>>4,samplePaddingValue:(h[21]&14)>>1,sampleIsDifferenceSample:!!(h[21]&1),sampleDegradationPriority:g.getUint16(22)}},trun:Jd,"url ":function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4))}},vmhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),graphicsmode:g.getUint16(4),opcolor:new Uint16Array([g.getUint16(6),g.getUint16(8),g.getUint16(10)])}}};di=function(h){for(var g=0,y=[],T,b,E,w,O,R=new ArrayBuffer(h.length),j=new Uint8Array(R),H=0;H<h.length;++H)j[H]=h[H];for(T=new DataView(R);g<h.byteLength;)b=T.getUint32(g),E=ta(h.subarray(g+4,g+8)),w=b>1?g+b:h.byteLength,O=(Qn[E]||function(J){return{data:J}})(h.subarray(g+8,w)),O.size=b,O.type=E,y.push(O),g=w;return y},cs=function(h,g){var y;return g=g||0,y=new Array(g*2+1).join(" "),h.map(function(T,b){return y+T.type+`
`+Object.keys(T).filter(function(E){return E!=="type"&&E!=="boxes"}).map(function(E){var w=y+" "+E+": ",O=T[E];if(O instanceof Uint8Array||O instanceof Uint32Array){var R=Array.prototype.slice.call(new Uint8Array(O.buffer,O.byteOffset,O.byteLength)).map(function(j){return" "+("00"+j.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return R?R.length===1?w+"<"+R.join("").slice(1)+">":w+`<
`+R.map(function(j){return y+" "+j}).join(`
`)+`
`+y+" >":w+"<>"}return w+JSON.stringify(O,null,2).split(`
`).map(function(j,H){return H===0?j:y+" "+j}).join(`
`)}).join(`
`)+(T.boxes?`
`+cs(T.boxes,g+1):"")}).join(`
`)};var yr={inspect:di,textify:cs,parseType:ta,findBox:th,parseTraf:Qn.traf,parseTfdt:Qn.tfdt,parseHdlr:Qn.hdlr,parseTfhd:Qn.tfhd,parseTrun:Qn.trun,parseSidx:Qn.sidx},Vt=function(h){for(var g=0,y=String.fromCharCode(h[g]),T="";y!=="\0";)T+=y,g++,y=String.fromCharCode(h[g]);return T+=y,T},Gu={uint8ToCString:Vt},sl=Gu.uint8ToCString,ih=l.getUint64,ia=function(h){var g=4,y=h[0],T,b,E,w,O,R,j,H;if(y===0){T=sl(h.subarray(g)),g+=T.length,b=sl(h.subarray(g)),g+=b.length;var J=new DataView(h.buffer);E=J.getUint32(g),g+=4,O=J.getUint32(g),g+=4,R=J.getUint32(g),g+=4,j=J.getUint32(g),g+=4}else if(y===1){var J=new DataView(h.buffer);E=J.getUint32(g),g+=4,w=ih(h.subarray(g)),g+=8,R=J.getUint32(g),g+=4,j=J.getUint32(g),g+=4,T=sl(h.subarray(g)),g+=T.length,b=sl(h.subarray(g)),g+=b.length}H=new Uint8Array(h.subarray(g,h.byteLength));var Ee={scheme_id_uri:T,value:b,timescale:E||1,presentation_time:w,presentation_time_delta:O,event_duration:R,id:j,message_data:H};return Bs(y,Ee)?Ee:void 0},rl=function(h,g,y,T){return h||h===0?h/g:T+y/g},Bs=function(h,g){var y=g.scheme_id_uri!=="\0",T=h===0&&al(g.presentation_time_delta)&&y,b=h===1&&al(g.presentation_time)&&y;return!(h>1)&&T||b},al=function(h){return h!==void 0||h!==null},ol={parseEmsgBox:ia,scaleTime:rl},na;typeof window<"u"?na=window:typeof s<"u"?na=s:typeof self<"u"?na=self:na={};var Xu=na,ll=Ha.toUnsigned,nn=Ha.toHexString,bt=Va,qs=Yu,nh=ol,om=Ps,eT=Jd,sh=el,Wu=l.getUint64,rh,ah,oh,ul,lh,Ku,uh,cl=Xu,ch=Xr.parseId3Frames;rh=function(h){var g={},y=bt(h,["moov","trak"]);return y.reduce(function(T,b){var E,w,O,R,j;return E=bt(b,["tkhd"])[0],!E||(w=E[0],O=w===0?12:20,R=ll(E[O]<<24|E[O+1]<<16|E[O+2]<<8|E[O+3]),j=bt(b,["mdia","mdhd"])[0],!j)?null:(w=j[0],O=w===0?12:20,T[R]=ll(j[O]<<24|j[O+1]<<16|j[O+2]<<8|j[O+3]),T)},g)},ah=function(h,g){var y;y=bt(g,["moof","traf"]);var T=y.reduce(function(b,E){var w=bt(E,["tfhd"])[0],O=ll(w[4]<<24|w[5]<<16|w[6]<<8|w[7]),R=h[O]||9e4,j=bt(E,["tfdt"])[0],H=new DataView(j.buffer,j.byteOffset,j.byteLength),J;j[0]===1?J=Wu(j.subarray(4,12)):J=H.getUint32(4);let Ee;return typeof J=="bigint"?Ee=J/cl.BigInt(R):typeof J=="number"&&!isNaN(J)&&(Ee=J/R),Ee<Number.MAX_SAFE_INTEGER&&(Ee=Number(Ee)),Ee<b&&(b=Ee),b},1/0);return typeof T=="bigint"||isFinite(T)?T:0},oh=function(h,g){var y=bt(g,["moof","traf"]),T=0,b=0,E;if(y&&y.length){var w=bt(y[0],["tfhd"])[0],O=bt(y[0],["trun"])[0],R=bt(y[0],["tfdt"])[0];if(w){var j=om(w);E=j.trackId}if(R){var H=sh(R);T=H.baseMediaDecodeTime}if(O){var J=eT(O);J.samples&&J.samples.length&&(b=J.samples[0].compositionTimeOffset||0)}}var Ee=h[E]||9e4;typeof T=="bigint"&&(b=cl.BigInt(b),Ee=cl.BigInt(Ee));var ue=(T+b)/Ee;return typeof ue=="bigint"&&ue<Number.MAX_SAFE_INTEGER&&(ue=Number(ue)),ue},ul=function(h){var g=bt(h,["moov","trak"]),y=[];return g.forEach(function(T){var b=bt(T,["mdia","hdlr"]),E=bt(T,["tkhd"]);b.forEach(function(w,O){var R=qs(w.subarray(8,12)),j=E[O],H,J,Ee;R==="vide"&&(H=new DataView(j.buffer,j.byteOffset,j.byteLength),J=H.getUint8(0),Ee=J===0?H.getUint32(12):H.getUint32(20),y.push(Ee))})}),y},Ku=function(h){var g=h[0],y=g===0?12:20;return ll(h[y]<<24|h[y+1]<<16|h[y+2]<<8|h[y+3])},lh=function(h){var g=bt(h,["moov","trak"]),y=[];return g.forEach(function(T){var b={},E=bt(T,["tkhd"])[0],w,O;E&&(w=new DataView(E.buffer,E.byteOffset,E.byteLength),O=w.getUint8(0),b.id=O===0?w.getUint32(12):w.getUint32(20));var R=bt(T,["mdia","hdlr"])[0];if(R){var j=qs(R.subarray(8,12));j==="vide"?b.type="video":j==="soun"?b.type="audio":b.type=j}var H=bt(T,["mdia","minf","stbl","stsd"])[0];if(H){var J=H.subarray(8);b.codec=qs(J.subarray(4,8));var Ee=bt(J,[b.codec])[0],ue,Be;Ee&&(/^[asm]vc[1-9]$/i.test(b.codec)?(ue=Ee.subarray(78),Be=qs(ue.subarray(4,8)),Be==="avcC"&&ue.length>11?(b.codec+=".",b.codec+=nn(ue[9]),b.codec+=nn(ue[10]),b.codec+=nn(ue[11])):b.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(b.codec)?(ue=Ee.subarray(28),Be=qs(ue.subarray(4,8)),Be==="esds"&&ue.length>20&&ue[19]!==0?(b.codec+="."+nn(ue[19]),b.codec+="."+nn(ue[20]>>>2&63).replace(/^0/,"")):b.codec="mp4a.40.2"):b.codec=b.codec.toLowerCase())}var Ye=bt(T,["mdia","mdhd"])[0];Ye&&(b.timescale=Ku(Ye)),y.push(b)}),y},uh=function(h,g=0){var y=bt(h,["emsg"]);return y.map(T=>{var b=nh.parseEmsgBox(new Uint8Array(T)),E=ch(b.message_data);return{cueTime:nh.scaleTime(b.presentation_time,b.timescale,b.presentation_time_delta,g),duration:nh.scaleTime(b.event_duration,b.timescale),frames:E}})};var On={findBox:bt,parseType:qs,timescale:rh,startTime:ah,compositionStartTime:oh,videoTrackIds:ul,tracks:lh,getTimescaleFromMediaHeader:Ku,getEmsgID3:uh};const{parseTrun:Tr}=yr,{findBox:Ya}=On;var dl=Xu,hl=function(h){var g=Ya(h,["moof","traf"]),y=Ya(h,["mdat"]),T=[];return y.forEach(function(b,E){var w=g[E];T.push({mdat:b,traf:w})}),T},fl=function(h,g,y){var T=g,b=y.defaultSampleDuration||0,E=y.defaultSampleSize||0,w=y.trackId,O=[];return h.forEach(function(R){var j=Tr(R),H=j.samples;H.forEach(function(J){J.duration===void 0&&(J.duration=b),J.size===void 0&&(J.size=E),J.trackId=w,J.dts=T,J.compositionTimeOffset===void 0&&(J.compositionTimeOffset=0),typeof T=="bigint"?(J.pts=T+dl.BigInt(J.compositionTimeOffset),T+=dl.BigInt(J.duration)):(J.pts=T+J.compositionTimeOffset,T+=J.duration)}),O=O.concat(H)}),O},dh={getMdatTrafPairs:hl,parseSamples:fl},tT=Bd.discardEmulationPreventionBytes,lm=wu.CaptionStream,Zu=Va,hh=el,fh=Ps,{getMdatTrafPairs:lt,parseSamples:Te}=dh,Qa=function(h,g){for(var y=h,T=0;T<g.length;T++){var b=g[T];if(y<b.size)return b;y-=b.size}return null},Ju=function(h,g,y){var T=new DataView(h.buffer,h.byteOffset,h.byteLength),b={logs:[],seiNals:[]},E,w,O,R;for(w=0;w+4<h.length;w+=O)if(O=T.getUint32(w),w+=4,!(O<=0))switch(h[w]&31){case 6:var j=h.subarray(w+1,w+1+O),H=Qa(w,g);if(E={nalUnitType:"sei_rbsp",size:O,data:j,escapedRBSP:tT(j),trackId:y},H)E.pts=H.pts,E.dts=H.dts,R=H;else if(R)E.pts=R.pts,E.dts=R.dts;else{b.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+w+" for trackId "+y+". See mux.js#223."});break}b.seiNals.push(E);break}return b},Jt=function(h,g){var y={},T=lt(h);return T.forEach(function(b){var E=b.mdat,w=b.traf,O=Zu(w,["tfhd"]),R=fh(O[0]),j=R.trackId,H=Zu(w,["tfdt"]),J=H.length>0?hh(H[0]).baseMediaDecodeTime:0,Ee=Zu(w,["trun"]),ue,Be;g===j&&Ee.length>0&&(ue=Te(Ee,J,R),Be=Ju(E,ue,j),y[j]||(y[j]={seiNals:[],logs:[]}),y[j].seiNals=y[j].seiNals.concat(Be.seiNals),y[j].logs=y[j].logs.concat(Be.logs))}),y},ph=function(h,g,y){var T;if(g===null)return null;T=Jt(h,g);var b=T[g]||{};return{seiNals:b.seiNals,logs:b.logs,timescale:y}},mh=function(){var h=!1,g,y,T,b,E,w;this.isInitialized=function(){return h},this.init=function(O){g=new lm,h=!0,w=O?O.isPartial:!1,g.on("data",function(R){R.startTime=R.startPts/b,R.endTime=R.endPts/b,E.captions.push(R),E.captionStreams[R.stream]=!0}),g.on("log",function(R){E.logs.push(R)})},this.isNewInit=function(O,R){return O&&O.length===0||R&&typeof R=="object"&&Object.keys(R).length===0?!1:T!==O[0]||b!==R[T]},this.parse=function(O,R,j){var H;if(this.isInitialized()){if(!R||!j)return null;if(this.isNewInit(R,j))T=R[0],b=j[T];else if(T===null||!b)return y.push(O),null}else return null;for(;y.length>0;){var J=y.shift();this.parse(J,R,j)}return H=ph(O,T,b),H&&H.logs&&(E.logs=E.logs.concat(H.logs)),H===null||!H.seiNals?E.logs.length?{logs:E.logs,captions:[],captionStreams:[]}:null:(this.pushNals(H.seiNals),this.flushStream(),E)},this.pushNals=function(O){if(!this.isInitialized()||!O||O.length===0)return null;O.forEach(function(R){g.push(R)})},this.flushStream=function(){if(!this.isInitialized())return null;w?g.partialFlush():g.flush()},this.clearParsedCaptions=function(){E.captions=[],E.captionStreams={},E.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;g.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){y=[],T=null,b=null,E?this.clearParsedCaptions():E={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},um=mh;const{parseTfdt:gh}=yr,vr=Va,{getTimescaleFromMediaHeader:yh}=On,{parseSamples:Th,getMdatTrafPairs:vh}=dh;var _t=function(){let h=9e4;this.init=function(g){const y=vr(g,["moov","trak","mdia","mdhd"])[0];y&&(h=yh(y))},this.parseSegment=function(g){const y=[],T=vh(g);let b=0;return T.forEach(function(E){const w=E.mdat,O=E.traf,R=vr(O,["tfdt"])[0],j=vr(O,["tfhd"])[0],H=vr(O,["trun"]);if(R&&(b=gh(R).baseMediaDecodeTime),H.length&&j){const J=Th(H,b,j);let Ee=0;J.forEach(function(ue){const Be="utf-8",Ye=new TextDecoder(Be),ni=w.slice(Ee,Ee+ue.size);if(vr(ni,["vtte"])[0]){Ee+=ue.size;return}vr(ni,["vttc"]).forEach(function(_r){const ra=vr(_r,["payl"])[0],Wa=vr(_r,["sttg"])[0],Ka=ue.pts/h,Za=(ue.pts+ue.duration)/h;let Lt,Ja;if(ra)try{Lt=Ye.decode(ra)}catch(fn){console.error(fn)}if(Wa)try{Ja=Ye.decode(Wa)}catch(fn){console.error(fn)}ue.duration&&Lt&&y.push({cueText:Lt,start:Ka,end:Za,settings:Ja})}),Ee+=ue.size})}}),y}},pl=Fo,Ga=function(h){var g=h[1]&31;return g<<=8,g|=h[2],g},Gn=function(h){return!!(h[1]&64)},ds=function(h){var g=0;return(h[3]&48)>>>4>1&&(g+=h[4]+1),g},Xn=function(h,g){var y=Ga(h);return y===0?"pat":y===g?"pmt":g?"pes":null},bh=function(h){var g=Gn(h),y=4+ds(h);return g&&(y+=h[y]+1),(h[y+10]&31)<<8|h[y+11]},Xa=function(h){var g={},y=Gn(h),T=4+ds(h);if(y&&(T+=h[T]+1),!!(h[T+5]&1)){var b,E,w;b=(h[T+1]&15)<<8|h[T+2],E=3+b-4,w=(h[T+10]&15)<<8|h[T+11];for(var O=12+w;O<E;){var R=T+O;g[(h[R+1]&31)<<8|h[R+2]]=h[R],O+=((h[R+3]&15)<<8|h[R+4])+5}return g}},_h=function(h,g){var y=Ga(h),T=g[y];switch(T){case pl.H264_STREAM_TYPE:return"video";case pl.ADTS_STREAM_TYPE:return"audio";case pl.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},ml=function(h){var g=Gn(h);if(!g)return null;var y=4+ds(h);if(y>=h.byteLength)return null;var T=null,b;return b=h[y+7],b&192&&(T={},T.pts=(h[y+9]&14)<<27|(h[y+10]&255)<<20|(h[y+11]&254)<<12|(h[y+12]&255)<<5|(h[y+13]&254)>>>3,T.pts*=4,T.pts+=(h[y+13]&6)>>>1,T.dts=T.pts,b&64&&(T.dts=(h[y+14]&14)<<27|(h[y+15]&255)<<20|(h[y+16]&254)<<12|(h[y+17]&255)<<5|(h[y+18]&254)>>>3,T.dts*=4,T.dts+=(h[y+18]&6)>>>1)),T},gl=function(h){switch(h){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},ec=function(h){for(var g=4+ds(h),y=h.subarray(g),T=0,b=0,E=!1,w;b<y.byteLength-3;b++)if(y[b+2]===1){T=b+5;break}for(;T<y.byteLength;)switch(y[T]){case 0:if(y[T-1]!==0){T+=2;break}else if(y[T-2]!==0){T++;break}b+3!==T-2&&(w=gl(y[b+3]&31),w==="slice_layer_without_partitioning_rbsp_idr"&&(E=!0));do T++;while(y[T]!==1&&T<y.length);b=T-2,T+=3;break;case 1:if(y[T-1]!==0||y[T-2]!==0){T+=3;break}w=gl(y[b+3]&31),w==="slice_layer_without_partitioning_rbsp_idr"&&(E=!0),b=T-2,T+=3;break;default:T+=3;break}return y=y.subarray(b),T-=b,b=0,y&&y.byteLength>3&&(w=gl(y[b+3]&31),w==="slice_layer_without_partitioning_rbsp_idr"&&(E=!0)),E},cm={parseType:Xn,parsePat:bh,parsePmt:Xa,parsePayloadUnitStartIndicator:Gn,parsePesType:_h,parsePesTime:ml,videoPacketContainsKeyFrame:ec},Sh=Fo,sa=Hd.handleRollover,St={};St.ts=cm,St.aac=Bu;var br=vt.ONE_SECOND_IN_TS,Ei=188,In=71,xh=function(h,g){for(var y=0,T=Ei,b,E;T<h.byteLength;){if(h[y]===In&&h[T]===In){switch(b=h.subarray(y,T),E=St.ts.parseType(b,g.pid),E){case"pat":g.pid=St.ts.parsePat(b);break;case"pmt":var w=St.ts.parsePmt(b);g.table=g.table||{},Object.keys(w).forEach(function(O){g.table[O]=w[O]});break}y+=Ei,T+=Ei;continue}y++,T++}},Eh=function(h,g,y){for(var T=0,b=Ei,E,w,O,R,j,H=!1;b<=h.byteLength;){if(h[T]===In&&(h[b]===In||b===h.byteLength)){switch(E=h.subarray(T,b),w=St.ts.parseType(E,g.pid),w){case"pes":O=St.ts.parsePesType(E,g.table),R=St.ts.parsePayloadUnitStartIndicator(E),O==="audio"&&R&&(j=St.ts.parsePesTime(E),j&&(j.type="audio",y.audio.push(j),H=!0));break}if(H)break;T+=Ei,b+=Ei;continue}T++,b++}for(b=h.byteLength,T=b-Ei,H=!1;T>=0;){if(h[T]===In&&(h[b]===In||b===h.byteLength)){switch(E=h.subarray(T,b),w=St.ts.parseType(E,g.pid),w){case"pes":O=St.ts.parsePesType(E,g.table),R=St.ts.parsePayloadUnitStartIndicator(E),O==="audio"&&R&&(j=St.ts.parsePesTime(E),j&&(j.type="audio",y.audio.push(j),H=!0));break}if(H)break;T-=Ei,b-=Ei;continue}T--,b--}},dm=function(h,g,y){for(var T=0,b=Ei,E,w,O,R,j,H,J,Ee,ue=!1,Be={data:[],size:0};b<h.byteLength;){if(h[T]===In&&h[b]===In){switch(E=h.subarray(T,b),w=St.ts.parseType(E,g.pid),w){case"pes":if(O=St.ts.parsePesType(E,g.table),R=St.ts.parsePayloadUnitStartIndicator(E),O==="video"&&(R&&!ue&&(j=St.ts.parsePesTime(E),j&&(j.type="video",y.video.push(j),ue=!0)),!y.firstKeyFrame)){if(R&&Be.size!==0){for(H=new Uint8Array(Be.size),J=0;Be.data.length;)Ee=Be.data.shift(),H.set(Ee,J),J+=Ee.byteLength;if(St.ts.videoPacketContainsKeyFrame(H)){var Ye=St.ts.parsePesTime(H);Ye?(y.firstKeyFrame=Ye,y.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Be.size=0}Be.data.push(E),Be.size+=E.byteLength}break}if(ue&&y.firstKeyFrame)break;T+=Ei,b+=Ei;continue}T++,b++}for(b=h.byteLength,T=b-Ei,ue=!1;T>=0;){if(h[T]===In&&h[b]===In){switch(E=h.subarray(T,b),w=St.ts.parseType(E,g.pid),w){case"pes":O=St.ts.parsePesType(E,g.table),R=St.ts.parsePayloadUnitStartIndicator(E),O==="video"&&R&&(j=St.ts.parsePesTime(E),j&&(j.type="video",y.video.push(j),ue=!0));break}if(ue)break;T-=Ei,b-=Ei;continue}T--,b--}},hm=function(h,g){if(h.audio&&h.audio.length){var y=g;(typeof y>"u"||isNaN(y))&&(y=h.audio[0].dts),h.audio.forEach(function(E){E.dts=sa(E.dts,y),E.pts=sa(E.pts,y),E.dtsTime=E.dts/br,E.ptsTime=E.pts/br})}if(h.video&&h.video.length){var T=g;if((typeof T>"u"||isNaN(T))&&(T=h.video[0].dts),h.video.forEach(function(E){E.dts=sa(E.dts,T),E.pts=sa(E.pts,T),E.dtsTime=E.dts/br,E.ptsTime=E.pts/br}),h.firstKeyFrame){var b=h.firstKeyFrame;b.dts=sa(b.dts,T),b.pts=sa(b.pts,T),b.dtsTime=b.dts/br,b.ptsTime=b.pts/br}}},iT=function(h){for(var g=!1,y=0,T=null,b=null,E=0,w=0,O;h.length-w>=3;){var R=St.aac.parseType(h,w);switch(R){case"timed-metadata":if(h.length-w<10){g=!0;break}if(E=St.aac.parseId3TagSize(h,w),E>h.length){g=!0;break}b===null&&(O=h.subarray(w,w+E),b=St.aac.parseAacTimestamp(O)),w+=E;break;case"audio":if(h.length-w<7){g=!0;break}if(E=St.aac.parseAdtsSize(h,w),E>h.length){g=!0;break}T===null&&(O=h.subarray(w,w+E),T=St.aac.parseSampleRate(O)),y++,w+=E;break;default:w++;break}if(g)return null}if(T===null||b===null)return null;var j=br/T,H={audio:[{type:"audio",dts:b,pts:b},{type:"audio",dts:b+y*1024*j,pts:b+y*1024*j}]};return H},fm=function(h){var g={pid:null,table:null},y={};xh(h,g);for(var T in g.table)if(g.table.hasOwnProperty(T)){var b=g.table[T];switch(b){case Sh.H264_STREAM_TYPE:y.video=[],dm(h,g,y),y.video.length===0&&delete y.video;break;case Sh.ADTS_STREAM_TYPE:y.audio=[],Eh(h,g,y),y.audio.length===0&&delete y.audio;break}}return y},pm=function(h,g){var y=St.aac.isLikelyAacData(h),T;return y?T=iT(h):T=fm(h),!T||!T.audio&&!T.video?null:(hm(T,g),T)},mm={inspect:pm,parseAudioPes_:Eh};const Mh=function(h,g){g.on("data",function(y){const T=y.initSegment;y.initSegment={data:T.buffer,byteOffset:T.byteOffset,byteLength:T.byteLength};const b=y.data;y.data=b.buffer,h.postMessage({action:"data",segment:y,byteOffset:b.byteOffset,byteLength:b.byteLength},[y.data])}),g.on("done",function(y){h.postMessage({action:"done"})}),g.on("gopInfo",function(y){h.postMessage({action:"gopInfo",gopInfo:y})}),g.on("videoSegmentTimingInfo",function(y){const T={start:{decode:vt.videoTsToSeconds(y.start.dts),presentation:vt.videoTsToSeconds(y.start.pts)},end:{decode:vt.videoTsToSeconds(y.end.dts),presentation:vt.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:vt.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(T.prependedContentDuration=vt.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:T})}),g.on("audioSegmentTimingInfo",function(y){const T={start:{decode:vt.videoTsToSeconds(y.start.dts),presentation:vt.videoTsToSeconds(y.start.pts)},end:{decode:vt.videoTsToSeconds(y.end.dts),presentation:vt.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:vt.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(T.prependedContentDuration=vt.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:T})}),g.on("id3Frame",function(y){h.postMessage({action:"id3Frame",id3Frame:y})}),g.on("caption",function(y){h.postMessage({action:"caption",caption:y})}),g.on("trackinfo",function(y){h.postMessage({action:"trackinfo",trackInfo:y})}),g.on("audioTimingInfo",function(y){h.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:vt.videoTsToSeconds(y.start),end:vt.videoTsToSeconds(y.end)}})}),g.on("videoTimingInfo",function(y){h.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:vt.videoTsToSeconds(y.start),end:vt.videoTsToSeconds(y.end)}})}),g.on("log",function(y){h.postMessage({action:"log",log:y})})};class Dh{constructor(g,y){this.options=y||{},this.self=g,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new nm.Transmuxer(this.options),Mh(this.self,this.transmuxer)}pushMp4Captions(g){this.captionParser||(this.captionParser=new um,this.captionParser.init());const y=new Uint8Array(g.data,g.byteOffset,g.byteLength),T=this.captionParser.parse(y,g.trackIds,g.timescales);this.self.postMessage({action:"mp4Captions",captions:T&&T.captions||[],logs:T&&T.logs||[],data:y.buffer},[y.buffer])}initMp4WebVttParser(g){this.webVttParser||(this.webVttParser=new _t);const y=new Uint8Array(g.data,g.byteOffset,g.byteLength);this.webVttParser.init(y)}getMp4WebVttText(g){this.webVttParser||(this.webVttParser=new _t);const y=new Uint8Array(g.data,g.byteOffset,g.byteLength),T=this.webVttParser.parseSegment(y);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:T||[],data:y.buffer},[y.buffer])}probeMp4StartTime({timescales:g,data:y}){const T=On.startTime(g,y);this.self.postMessage({action:"probeMp4StartTime",startTime:T,data:y},[y.buffer])}probeMp4Tracks({data:g}){const y=On.tracks(g);this.self.postMessage({action:"probeMp4Tracks",tracks:y,data:g},[g.buffer])}probeEmsgID3({data:g,offset:y}){const T=On.getEmsgID3(g,y);this.self.postMessage({action:"probeEmsgID3",id3Frames:T,emsgData:g},[g.buffer])}probeTs({data:g,baseStartTime:y}){const T=typeof y=="number"&&!isNaN(y)?y*vt.ONE_SECOND_IN_TS:void 0,b=mm.inspect(g,T);let E=null;b&&(E={hasVideo:b.video&&b.video.length===2||!1,hasAudio:b.audio&&b.audio.length===2||!1},E.hasVideo&&(E.videoStart=b.video[0].ptsTime),E.hasAudio&&(E.audioStart=b.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:E,data:g},[g.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(g){const y=new Uint8Array(g.data,g.byteOffset,g.byteLength);this.transmuxer.push(y)}reset(){this.transmuxer.reset()}setTimestampOffset(g){const y=g.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(vt.secondsToVideoTs(y)))}setAudioAppendStart(g){this.transmuxer.setAudioAppendStart(Math.ceil(vt.secondsToVideoTs(g.appendStart)))}setRemux(g){this.transmuxer.setRemux(g.remux)}flush(g){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(g){this.transmuxer.alignGopsWith(g.gopsToAlignWith.slice())}}self.onmessage=function(h){if(h.data.action==="init"&&h.data.options){this.messageHandlers=new Dh(self,h.data.options);return}this.messageHandlers||(this.messageHandlers=new Dh(self)),h.data&&h.data.action&&h.data.action!=="init"&&this.messageHandlers[h.data.action]&&this.messageHandlers[h.data.action](h.data)}}));var nI=$S(iI);const sI=(s,e,i)=>{const{type:r,initSegment:o,captions:l,captionStreams:c,metadata:f,videoFrameDtsTime:p,videoFramePtsTime:v}=s.data.segment;e.buffer.push({captions:l,captionStreams:c,metadata:f});const S=s.data.segment.boxes||{data:s.data.segment.data},x={type:r,data:new Uint8Array(S.data,S.data.byteOffset,S.data.byteLength),initSegment:new Uint8Array(o.data,o.byteOffset,o.byteLength)};typeof p<"u"&&(x.videoFrameDtsTime=p),typeof v<"u"&&(x.videoFramePtsTime=v),i(x)},rI=({transmuxedData:s,callback:e})=>{s.buffer=[],e(s)},aI=(s,e)=>{e.gopInfo=s.data.gopInfo},GS=s=>{const{transmuxer:e,bytes:i,audioAppendStart:r,gopsToAlignWith:o,remux:l,onData:c,onTrackInfo:f,onAudioTimingInfo:p,onVideoTimingInfo:v,onVideoSegmentTimingInfo:S,onAudioSegmentTimingInfo:x,onId3:D,onCaptions:k,onDone:I,onEndedTimeline:C,onTransmuxerLog:P,isEndOfTimeline:U,segment:Y,triggerSegmentEventFn:$}=s,G={buffer:[]};let W=U;const oe=de=>{e.currentTransmux===s&&(de.data.action==="data"&&sI(de,G,c),de.data.action==="trackinfo"&&f(de.data.trackInfo),de.data.action==="gopInfo"&&aI(de,G),de.data.action==="audioTimingInfo"&&p(de.data.audioTimingInfo),de.data.action==="videoTimingInfo"&&v(de.data.videoTimingInfo),de.data.action==="videoSegmentTimingInfo"&&S(de.data.videoSegmentTimingInfo),de.data.action==="audioSegmentTimingInfo"&&x(de.data.audioSegmentTimingInfo),de.data.action==="id3Frame"&&D([de.data.id3Frame],de.data.id3Frame.dispatchType),de.data.action==="caption"&&k(de.data.caption),de.data.action==="endedtimeline"&&(W=!1,C()),de.data.action==="log"&&P(de.data.log),de.data.type==="transmuxed"&&(W||(e.onmessage=null,rI({transmuxedData:G,callback:I}),XS(e))))},K=()=>{const de={message:"Received an error message from the transmuxer worker",metadata:{errorType:F.Error.StreamingFailedToTransmuxSegment,segmentInfo:Po({segment:Y})}};I(null,de)};if(e.onmessage=oe,e.onerror=K,r&&e.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(o)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:o}),typeof l<"u"&&e.postMessage({action:"setRemux",remux:l}),i.byteLength){const de=i instanceof ArrayBuffer?i:i.buffer,fe=i instanceof ArrayBuffer?0:i.byteOffset;$({type:"segmenttransmuxingstart",segment:Y}),e.postMessage({action:"push",data:de,byteOffset:fe,byteLength:i.byteLength},[de])}U&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},XS=s=>{s.currentTransmux=null,s.transmuxQueue.length&&(s.currentTransmux=s.transmuxQueue.shift(),typeof s.currentTransmux=="function"?s.currentTransmux():GS(s.currentTransmux))},WS=(s,e)=>{s.postMessage({action:e}),XS(s)},KS=(s,e)=>{if(!e.currentTransmux){e.currentTransmux=s,WS(e,s);return}e.transmuxQueue.push(WS.bind(null,e,s))},oI=s=>{KS("reset",s)},lI=s=>{KS("endTimeline",s)},ZS=s=>{if(!s.transmuxer.currentTransmux){s.transmuxer.currentTransmux=s,GS(s);return}s.transmuxer.transmuxQueue.push(s)};var wy={reset:oI,endTimeline:lI,transmux:ZS,createTransmuxer:s=>{const e=new nI;e.currentTransmux=null,e.transmuxQueue=[];const i=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,i.call(e)),e.postMessage({action:"init",options:s}),e}};const Su=function(s){const e=s.transmuxer,i=s.endAction||s.action,r=s.callback,o=ei({},s,{endAction:null,transmuxer:null,callback:null}),l=c=>{c.data.action===i&&(e.removeEventListener("message",l),c.data.data&&(c.data.data=new Uint8Array(c.data.data,s.byteOffset||0,s.byteLength||c.data.data.byteLength),s.data&&(s.data=c.data.data)),r(c.data))};if(e.addEventListener("message",l),s.data){const c=s.data instanceof ArrayBuffer;o.byteOffset=c?0:s.data.byteOffset,o.byteLength=s.data.byteLength;const f=[c?s.data:s.data.buffer];e.postMessage(o,f)}else e.postMessage(o)},sr={FAILURE:2,TIMEOUT:-101,ABORTED:-102},JS="wvtt",Ny=s=>{s.forEach(e=>{e.abort()})},uI=s=>({bandwidth:s.bandwidth,bytesReceived:s.bytesReceived||0,roundTripTime:s.roundTripTime||0}),cI=s=>{const e=s.target,r={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return r.bytesReceived=s.loaded,r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3),r},ky=(s,e)=>{const{requestType:i}=e,r=Uo({requestType:i,request:e,error:s});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:sr.TIMEOUT,xhr:e,metadata:r}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:sr.ABORTED,xhr:e,metadata:r}:s?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:sr.FAILURE,xhr:e,metadata:r}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:sr.FAILURE,xhr:e,metadata:r}:null},ex=(s,e,i,r)=>(o,l)=>{const c=l.response,f=ky(o,l);if(f)return i(f,s);if(c.byteLength!==16)return i({status:l.status,message:"Invalid HLS key at URL: "+l.uri,code:sr.FAILURE,xhr:l},s);const p=new DataView(c),v=new Uint32Array([p.getUint32(0),p.getUint32(4),p.getUint32(8),p.getUint32(12)]);for(let x=0;x<e.length;x++)e[x].bytes=v;const S={uri:l.uri};return r({type:"segmentkeyloadcomplete",segment:s,keyInfo:S}),i(null,s)},dI=(s,e)=>{e===JS&&s.transmuxer.postMessage({action:"initMp4WebVttParser",data:s.map.bytes})},hI=(s,e,i)=>{e===JS&&Su({action:"getMp4WebVttText",data:s.bytes,transmuxer:s.transmuxer,callback:({data:r,mp4VttCues:o})=>{s.bytes=r,i(null,s,{mp4VttCues:o})}})},tx=(s,e)=>{const i=g0(s.map.bytes);if(i!=="mp4"){const r=s.map.resolvedUri||s.map.uri,o=i||"unknown";return e({internal:!0,message:`Found unsupported ${o} container for initialization segment at URL: ${r}`,code:sr.FAILURE,metadata:{mediaType:o}})}Su({action:"probeMp4Tracks",data:s.map.bytes,transmuxer:s.transmuxer,callback:({tracks:r,data:o})=>(s.map.bytes=o,r.forEach(function(l){s.map.tracks=s.map.tracks||{},!s.map.tracks[l.type]&&(s.map.tracks[l.type]=l,typeof l.id=="number"&&l.timescale&&(s.map.timescales=s.map.timescales||{},s.map.timescales[l.id]=l.timescale),l.type==="text"&&dI(s,l.codec))}),e(null))})},fI=({segment:s,finishProcessingFn:e,triggerSegmentEventFn:i})=>(r,o)=>{const l=ky(r,o);if(l)return e(l,s);const c=new Uint8Array(o.response);if(i({type:"segmentloaded",segment:s}),s.map.key)return s.map.encryptedBytes=c,e(null,s);s.map.bytes=c,tx(s,function(f){if(f)return f.xhr=o,f.status=o.status,e(f,s);e(null,s)})},pI=({segment:s,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:r})=>(o,l)=>{const c=ky(o,l);if(c)return e(c,s);r({type:"segmentloaded",segment:s});const f=i==="arraybuffer"||!l.responseText?l.response:eI(l.responseText.substring(s.lastReachedChar||0));return s.stats=uI(l),s.key?s.encryptedBytes=new Uint8Array(f):s.bytes=new Uint8Array(f),e(null,s)},mI=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:v,dataFn:S,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:k})=>{const I=s.map&&s.map.tracks||{},C=!!(I.audio&&I.video);let P=r.bind(null,s,"audio","start");const U=r.bind(null,s,"audio","end");let Y=r.bind(null,s,"video","start");const $=r.bind(null,s,"video","end"),G=()=>ZS({bytes:e,transmuxer:s.transmuxer,audioAppendStart:s.audioAppendStart,gopsToAlignWith:s.gopsToAlignWith,remux:C,onData:W=>{W.type=W.type==="combined"?"video":W.type,S(s,W)},onTrackInfo:W=>{i&&(C&&(W.isMuxed=!0),i(s,W))},onAudioTimingInfo:W=>{P&&typeof W.start<"u"&&(P(W.start),P=null),U&&typeof W.end<"u"&&U(W.end)},onVideoTimingInfo:W=>{Y&&typeof W.start<"u"&&(Y(W.start),Y=null),$&&typeof W.end<"u"&&$(W.end)},onVideoSegmentTimingInfo:W=>{const oe={pts:{start:W.start.presentation,end:W.end.presentation},dts:{start:W.start.decode,end:W.end.decode}};k({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:oe}),o(W)},onAudioSegmentTimingInfo:W=>{const oe={pts:{start:W.start.pts,end:W.end.pts},dts:{start:W.start.dts,end:W.end.dts}};k({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:oe}),l(W)},onId3:(W,oe)=>{c(s,W,oe)},onCaptions:W=>{f(s,[W])},isEndOfTimeline:p,onEndedTimeline:()=>{v()},onTransmuxerLog:D,onDone:(W,oe)=>{x&&(W.type=W.type==="combined"?"video":W.type,k({type:"segmenttransmuxingcomplete",segment:s}),x(oe,s,W))},segment:s,triggerSegmentEventFn:k});Su({action:"probeTs",transmuxer:s.transmuxer,data:e,baseStartTime:s.baseStartTime,callback:W=>{s.bytes=e=W.data;const oe=W.result;oe&&(i(s,{hasAudio:oe.hasAudio,hasVideo:oe.hasVideo,isMuxed:C}),i=null),G()}})},ix=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:v,dataFn:S,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:k})=>{let I=new Uint8Array(e);if(HN(I)){s.isFmp4=!0;const{tracks:C}=s.map;if(C.text&&(!C.audio||!C.video)){S(s,{data:I,type:"text"}),hI(s,C.text.codec,x);return}const U={isFmp4:!0,hasVideo:!!C.video,hasAudio:!!C.audio};C.audio&&C.audio.codec&&C.audio.codec!=="enca"&&(U.audioCodec=C.audio.codec),C.video&&C.video.codec&&C.video.codec!=="encv"&&(U.videoCodec=C.video.codec),C.video&&C.audio&&(U.isMuxed=!0),i(s,U);const Y=($,G)=>{S(s,{data:I,type:U.hasAudio&&!U.isMuxed?"audio":"video"}),G&&G.length&&c(s,G),$&&$.length&&f(s,$),x(null,s,{})};Su({action:"probeMp4StartTime",timescales:s.map.timescales,data:I,transmuxer:s.transmuxer,callback:({data:$,startTime:G})=>{e=$.buffer,s.bytes=I=$,U.hasAudio&&!U.isMuxed&&r(s,"audio","start",G),U.hasVideo&&r(s,"video","start",G),Su({action:"probeEmsgID3",data:I,transmuxer:s.transmuxer,offset:G,callback:({emsgData:W,id3Frames:oe})=>{if(e=W.buffer,s.bytes=I=W,!C.video||!W.byteLength||!s.transmuxer){Y(void 0,oe);return}Su({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:s.transmuxer,data:I,timescales:s.map.timescales,trackIds:[C.video.id],callback:K=>{e=K.data.buffer,s.bytes=I=K.data,K.logs.forEach(function(de){D(Ct(de,{stream:"mp4CaptionParser"}))}),Y(K.captions,oe)}})}})}});return}if(!s.transmuxer){x(null,s,{});return}if(typeof s.container>"u"&&(s.container=g0(I)),s.container!=="ts"&&s.container!=="aac"){i(s,{hasAudio:!1,hasVideo:!1}),x(null,s,{});return}mI({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:v,dataFn:S,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:k})},nx=function({id:s,key:e,encryptedBytes:i,decryptionWorker:r,segment:o,doneFn:l},c){const f=v=>{if(v.data.source===s){r.removeEventListener("message",f);const S=v.data.decrypted;c(new Uint8Array(S.bytes,S.byteOffset,S.byteLength))}};r.onerror=()=>{const v="An error occurred in the decryption worker",S=Po({segment:o}),x={message:v,metadata:{error:new Error(v),errorType:F.Error.StreamingFailedToDecryptSegment,segmentInfo:S,keyInfo:{uri:o.key.resolvedUri||o.map.key.resolvedUri}}};l(x,o)},r.addEventListener("message",f);let p;e.bytes.slice?p=e.bytes.slice():p=new Uint32Array(Array.prototype.slice.call(e.bytes)),r.postMessage(zS({source:s,encrypted:i,key:p,iv:e.iv}),[i.buffer,p.buffer])},gI=({decryptionWorker:s,segment:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:v,dataFn:S,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:k})=>{k({type:"segmentdecryptionstart"}),nx({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:s,segment:e,doneFn:x},I=>{e.bytes=I,k({type:"segmentdecryptioncomplete",segment:e}),ix({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:v,dataFn:S,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:k})})},yI=({activeXhrs:s,decryptionWorker:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:v,dataFn:S,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:k})=>{let I=0,C=!1;return(P,U)=>{if(!C){if(P)return C=!0,Ny(s),x(P,U);if(I+=1,I===s.length){const Y=function(){if(U.encryptedBytes)return gI({decryptionWorker:e,segment:U,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:v,dataFn:S,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:k});ix({segment:U,bytes:U.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:v,dataFn:S,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:k})};if(U.endOfAllRequests=Date.now(),U.map&&U.map.encryptedBytes&&!U.map.bytes)return k({type:"segmentdecryptionstart",segment:U}),nx({decryptionWorker:e,id:U.requestId+"-init",encryptedBytes:U.map.encryptedBytes,key:U.map.key,segment:U,doneFn:x},$=>{U.map.bytes=$,k({type:"segmentdecryptioncomplete",segment:U}),tx(U,G=>{if(G)return Ny(s),x(G,U);Y()})});Y()}}}},TI=({loadendState:s,abortFn:e})=>i=>{i.target.aborted&&e&&!s.calledAbortFn&&(e(),s.calledAbortFn=!0)},vI=({segment:s,progressFn:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:v,dataFn:S})=>x=>{if(!x.target.aborted)return s.stats=Ct(s.stats,cI(x)),!s.stats.firstBytesReceivedAt&&s.stats.bytesReceived&&(s.stats.firstBytesReceivedAt=Date.now()),e(x,s)},bI=({xhr:s,xhrOptions:e,decryptionWorker:i,segment:r,abortFn:o,progressFn:l,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:v,id3Fn:S,captionsFn:x,isEndOfTimeline:D,endedTimelineFn:k,dataFn:I,doneFn:C,onTransmuxerLog:P,triggerSegmentEventFn:U})=>{const Y=[],$=yI({activeXhrs:Y,decryptionWorker:i,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:v,id3Fn:S,captionsFn:x,isEndOfTimeline:D,endedTimelineFn:k,dataFn:I,doneFn:C,onTransmuxerLog:P,triggerSegmentEventFn:U});if(r.key&&!r.key.bytes){const de=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&de.push(r.map.key);const fe=Ct(e,{uri:r.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),me=ex(r,de,$,U),le={uri:r.key.resolvedUri};U({type:"segmentkeyloadstart",segment:r,keyInfo:le});const _e=s(fe,me);Y.push(_e)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){const _e=Ct(e,{uri:r.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),he=ex(r,[r.map.key],$,U),ge={uri:r.map.key.resolvedUri};U({type:"segmentkeyloadstart",segment:r,keyInfo:ge});const Ae=s(_e,he);Y.push(Ae)}const fe=Ct(e,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Dy(r.map),requestType:"segment-media-initialization"}),me=fI({segment:r,finishProcessingFn:$,triggerSegmentEventFn:U});U({type:"segmentloadstart",segment:r});const le=s(fe,me);Y.push(le)}const G=Ct(e,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Dy(r),requestType:"segment"}),W=pI({segment:r,finishProcessingFn:$,responseType:G.responseType,triggerSegmentEventFn:U});U({type:"segmentloadstart",segment:r});const oe=s(G,W);oe.addEventListener("progress",vI({segment:r,progressFn:l,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:v,id3Fn:S,captionsFn:x,isEndOfTimeline:D,endedTimelineFn:k,dataFn:I})),Y.push(oe);const K={};return Y.forEach(de=>{de.addEventListener("loadend",TI({loadendState:K,abortFn:o}))}),()=>Ny(Y)},jp=ls("PlaylistSelector"),sx=function(s){if(!s||!s.playlist)return;const e=s.playlist;return JSON.stringify({id:e.id,bandwidth:s.bandwidth,width:s.width,height:s.height,codecs:e.attributes&&e.attributes.CODECS||""})},xu=function(s,e){if(!s)return"";const i=z.getComputedStyle(s);return i?i[e]:""},Eu=function(s,e){const i=s.slice();s.sort(function(r,o){const l=e(r,o);return l===0?i.indexOf(r)-i.indexOf(o):l})},Oy=function(s,e){let i,r;return s.attributes.BANDWIDTH&&(i=s.attributes.BANDWIDTH),i=i||z.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),r=r||z.Number.MAX_VALUE,i-r},_I=function(s,e){let i,r;return s.attributes.RESOLUTION&&s.attributes.RESOLUTION.width&&(i=s.attributes.RESOLUTION.width),i=i||z.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),r=r||z.Number.MAX_VALUE,i===r&&s.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?s.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-r};let rx=function(s){const{main:e,bandwidth:i,playerWidth:r,playerHeight:o,playerObjectFit:l,limitRenditionByPlayerDimensions:c,playlistController:f}=s;if(!e)return;const p={bandwidth:i,width:r,height:o,limitRenditionByPlayerDimensions:c};let v=e.playlists;Cn.isAudioOnly(e)&&(v=f.getAudioTrackPlaylists_(),p.audioOnly=!0);let S=v.map(K=>{let de;const fe=K.attributes&&K.attributes.RESOLUTION&&K.attributes.RESOLUTION.width,me=K.attributes&&K.attributes.RESOLUTION&&K.attributes.RESOLUTION.height;return de=K.attributes&&K.attributes.BANDWIDTH,de=de||z.Number.MAX_VALUE,{bandwidth:de,width:fe,height:me,playlist:K}});Eu(S,(K,de)=>K.bandwidth-de.bandwidth),S=S.filter(K=>!Cn.isIncompatible(K.playlist));let x=S.filter(K=>Cn.isEnabled(K.playlist));x.length||(x=S.filter(K=>!Cn.isDisabled(K.playlist)));const D=x.filter(K=>K.bandwidth*ki.BANDWIDTH_VARIANCE<i);let k=D[D.length-1];const I=D.filter(K=>K.bandwidth===k.bandwidth)[0];if(c===!1){const K=I||x[0]||S[0];if(K&&K.playlist){let de="sortedPlaylistReps";return I&&(de="bandwidthBestRep"),x[0]&&(de="enabledPlaylistReps"),jp(`choosing ${sx(K)} using ${de} with options`,p),K.playlist}return jp("could not choose a playlist with options",p),null}const C=D.filter(K=>K.width&&K.height);Eu(C,(K,de)=>K.width-de.width);const P=C.filter(K=>K.width===r&&K.height===o);k=P[P.length-1];const U=P.filter(K=>K.bandwidth===k.bandwidth)[0];let Y,$,G;U||(Y=C.filter(K=>l==="cover"?K.width>r&&K.height>o:K.width>r||K.height>o),$=Y.filter(K=>K.width===Y[0].width&&K.height===Y[0].height),k=$[$.length-1],G=$.filter(K=>K.bandwidth===k.bandwidth)[0]);let W;if(f.leastPixelDiffSelector){const K=C.map(de=>(de.pixelDiff=Math.abs(de.width-r)+Math.abs(de.height-o),de));Eu(K,(de,fe)=>de.pixelDiff===fe.pixelDiff?fe.bandwidth-de.bandwidth:de.pixelDiff-fe.pixelDiff),W=K[0]}const oe=W||G||U||I||x[0]||S[0];if(oe&&oe.playlist){let K="sortedPlaylistReps";return W?K="leastPixelDiffRep":G?K="resolutionPlusOneRep":U?K="resolutionBestRep":I?K="bandwidthBestRep":x[0]&&(K="enabledPlaylistReps"),jp(`choosing ${sx(oe)} using ${K} with options`,p),oe.playlist}return jp("could not choose a playlist with options",p),null};const ax=function(){let s=this.useDevicePixelRatio&&z.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),rx({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xu(this.tech_.el(),"width"),10)*s,playerHeight:parseInt(xu(this.tech_.el(),"height"),10)*s,playerObjectFit:this.usePlayerObjectFit?xu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},SI=function(s){let e=-1,i=-1;if(s<0||s>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let r=this.useDevicePixelRatio&&z.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),e<0&&(e=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(e=s*this.systemBandwidth+(1-s)*e,i=this.systemBandwidth),rx({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(xu(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(xu(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?xu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},xI=function(s){const{main:e,currentTime:i,bandwidth:r,duration:o,segmentDuration:l,timeUntilRebuffer:c,currentTimeline:f,syncController:p}=s,v=e.playlists.filter(I=>!Cn.isIncompatible(I));let S=v.filter(Cn.isEnabled);S.length||(S=v.filter(I=>!Cn.isDisabled(I)));const D=S.filter(Cn.hasAttribute.bind(null,"BANDWIDTH")).map(I=>{const P=p.getSyncPoint(I,o,f,i)?1:2,Y=Cn.estimateSegmentRequestTime(l,r,I)*P-c;return{playlist:I,rebufferingImpact:Y}}),k=D.filter(I=>I.rebufferingImpact<=0);return Eu(k,(I,C)=>Oy(C.playlist,I.playlist)),k.length?k[0]:(Eu(D,(I,C)=>I.rebufferingImpact-C.rebufferingImpact),D[0]||null)},EI=function(){const s=this.playlists.main.playlists.filter(Cn.isEnabled);return Eu(s,(i,r)=>Oy(i,r)),s.filter(i=>!!Id(this.playlists.main,i).video)[0]||null},MI=s=>{let e=0,i;return s.bytes&&(i=new Uint8Array(s.bytes),s.segments.forEach(r=>{i.set(r,e),e+=r.byteLength})),i};function ox(s){try{return new URL(s).pathname.split("/").slice(-2).join("/")}catch{return""}}const DI=function(s,e,i){if(!s[i]){e.trigger({type:"usage",name:"vhs-608"});let r=i;/^cc708_/.test(i)&&(r="SERVICE"+i.split("_")[1]);const o=e.textTracks().getTrackById(r);if(o)s[i]=o;else{const l=e.options_.vhs&&e.options_.vhs.captionServices||{};let c=i,f=i,p=!1;const v=l[r];v&&(c=v.label,f=v.language,p=v.default),s[i]=e.addRemoteTextTrack({kind:"captions",id:r,default:p,label:c,language:f},!1).track}}},CI=function({inbandTextTracks:s,captionArray:e,timestampOffset:i}){if(!e)return;const r=z.WebKitDataCue||z.VTTCue;e.forEach(o=>{const l=o.stream;o.content?o.content.forEach(c=>{const f=new r(o.startTime+i,o.endTime+i,c.text);f.line=c.line,f.align="left",f.position=c.position,f.positionAlign="line-left",s[l].addCue(f)}):s[l].addCue(new r(o.startTime+i,o.endTime+i,o.text))})},AI=function(s){Object.defineProperties(s.frame,{id:{get(){return F.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),s.value.key}},value:{get(){return F.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),s.value.data}},privateData:{get(){return F.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),s.value.data}}})},wI=({inbandTextTracks:s,metadataArray:e,timestampOffset:i,videoDuration:r})=>{if(!e)return;const o=z.WebKitDataCue||z.VTTCue,l=s.metadataTrack_;if(!l||(e.forEach(S=>{const x=S.cueTime+i;typeof x!="number"||z.isNaN(x)||x<0||!(x<1/0)||!S.frames||!S.frames.length||S.frames.forEach(D=>{const k=new o(x,x,D.value||D.url||D.data||"");k.frame=D,k.value=D,AI(k),l.addCue(k)})}),!l.cues||!l.cues.length))return;const c=l.cues,f=[];for(let S=0;S<c.length;S++)c[S]&&f.push(c[S]);const p=f.reduce((S,x)=>{const D=S[x.startTime]||[];return D.push(x),S[x.startTime]=D,S},{}),v=Object.keys(p).sort((S,x)=>Number(S)-Number(x));v.forEach((S,x)=>{const D=p[S],k=isFinite(r)?r:S,I=Number(v[x+1])||k;D.forEach(C=>{C.endTime=I})})},NI={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},kI=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),OI=({inbandTextTracks:s,dateRanges:e})=>{const i=s.metadataTrack_;if(!i)return;const r=z.WebKitDataCue||z.VTTCue;e.forEach(o=>{for(const l of Object.keys(o)){if(kI.has(l))continue;const c=new r(o.startTime,o.endTime,"");c.id=o.id,c.type="com.apple.quicktime.HLS",c.value={key:NI[l],data:o[l]},(l==="scte35Out"||l==="scte35In")&&(c.value.data=new Uint8Array(c.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(c)}o.processDateRange()})},lx=(s,e,i)=>{s.metadataTrack_||(s.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,F.browser.IS_ANY_SAFARI||(s.metadataTrack_.inBandMetadataTrackDispatchType=e))},Ld=function(s,e,i){let r,o;if(i&&i.cues)for(r=i.cues.length;r--;)o=i.cues[r],o.startTime>=s&&o.endTime<=e&&i.removeCue(o)},II=function(s){const e=s.cues;if(!e)return;const i={};for(let r=e.length-1;r>=0;r--){const o=e[r],l=`${o.startTime}-${o.endTime}-${o.text}`;i[l]?s.removeCue(o):i[l]=o}},LI=(s,e,i)=>{if(typeof e>"u"||e===null||!s.length)return[];const r=Math.ceil((e-i+3)*wo.ONE_SECOND_IN_TS);let o;for(o=0;o<s.length&&!(s[o].pts>r);o++);return s.slice(o)},RI=(s,e,i)=>{if(!e.length)return s;if(i)return e.slice();const r=e[0].pts;let o=0;for(o;o<s.length&&!(s[o].pts>=r);o++);return s.slice(0,o).concat(e)},jI=(s,e,i,r)=>{const o=Math.ceil((e-r)*wo.ONE_SECOND_IN_TS),l=Math.ceil((i-r)*wo.ONE_SECOND_IN_TS),c=s.slice();let f=s.length;for(;f--&&!(s[f].pts<=l););if(f===-1)return c;let p=f+1;for(;p--&&!(s[p].pts<=o););return p=Math.max(p,0),c.splice(p,f-p+1),c},zI=function(s,e){if(!s&&!e||!s&&e||s&&!e)return!1;if(s===e)return!0;const i=Object.keys(s).sort(),r=Object.keys(e).sort();if(i.length!==r.length)return!1;for(let o=0;o<i.length;o++){const l=i[o];if(l!==r[o]||s[l]!==e[l])return!1}return!0},UI=function(s,e,i){e=e||[];const r=[];let o=0;for(let l=0;l<e.length;l++){const c=e[l];if(s===c.timeline&&(r.push(l),o+=c.duration,o>i))return l}return r.length===0?0:r[r.length-1]},Rd=1,PI=500,ux=s=>typeof s=="number"&&isFinite(s),zp=1/60,BI=(s,e,i)=>s!=="main"||!e||!i?null:!i.hasAudio&&!i.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,qI=(s,e,i)=>{let r=e-ki.BACK_BUFFER_LENGTH;s.length&&(r=Math.max(r,s.start(0)));const o=e-i;return Math.min(o,r)},Mu=s=>{const{startOfSegment:e,duration:i,segment:r,part:o,playlist:{mediaSequence:l,id:c,segments:f=[]},mediaIndex:p,partIndex:v,timeline:S}=s,x=f.length-1;let D="mediaIndex/partIndex increment";s.getMediaInfoForTime?D=`getMediaInfoForTime (${s.getMediaInfoForTime})`:s.isSyncRequest&&(D="getSyncSegmentCandidate (isSyncRequest)"),s.independent&&(D+=` with independent ${s.independent}`);const k=typeof v=="number",I=s.segment.uri?"segment":"pre-segment",C=k?mS({preloadSegment:r})-1:0;return`${I} [${l+p}/${l+x}]`+(k?` part [${v}/${C}]`:"")+` segment start/end [${r.start} => ${r.end}]`+(k?` part start/end [${o.start} => ${o.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${S}] selected by [${D}] playlist [${c}]`},cx=s=>`${s}TimingInfo`,FI=({segmentTimeline:s,currentTimeline:e,startOfSegment:i,buffered:r,overrideCheck:o})=>!o&&s===e?null:s<e?i:r.length?r.end(r.length-1):i,Iy=({timelineChangeController:s,currentTimeline:e,segmentTimeline:i,loaderType:r,audioDisabled:o})=>{if(e===i)return!1;if(r==="audio"){const l=s.lastTimelineChange({type:"main"});return!l||l.to!==i}if(r==="main"&&o){const l=s.pendingTimelineChange({type:"audio"});return!(l&&l.to===i)}return!1},HI=s=>{if(!s)return!1;const e=s.pendingTimelineChange({type:"audio"}),i=s.pendingTimelineChange({type:"main"}),r=e&&i,o=r&&e.to!==i.to;return!!(r&&e.from!==-1&&i.from!==-1&&o)},VI=s=>{const e=s.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=s.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to},ja=s=>{const e=s.pendingSegment_;if(!e)return;if(Iy({timelineChangeController:s.timelineChangeController_,currentTimeline:s.currentTimeline_,segmentTimeline:e.timeline,loaderType:s.loaderType_,audioDisabled:s.audioDisabled_})&&HI(s.timelineChangeController_)){if(VI(s)){s.timelineChangeController_.trigger("audioTimelineBehind");return}s.timelineChangeController_.trigger("fixBadTimelineChange")}},$I=s=>{let e=0;return["video","audio"].forEach(function(i){const r=s[`${i}TimingInfo`];if(!r)return;const{start:o,end:l}=r;let c;typeof o=="bigint"||typeof l=="bigint"?c=z.BigInt(l)-z.BigInt(o):typeof o=="number"&&typeof l=="number"&&(c=l-o),typeof c<"u"&&c>e&&(e=c)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},dx=({segmentDuration:s,maxDuration:e})=>s?Math.round(s)>e+ir:!1,YI=(s,e)=>{if(e!=="hls")return null;const i=$I({audioTimingInfo:s.audioTimingInfo,videoTimingInfo:s.videoTimingInfo});if(!i)return null;const r=s.playlist.targetDuration,o=dx({segmentDuration:i,maxDuration:r*2}),l=dx({segmentDuration:i,maxDuration:r}),c=`Segment with index ${s.mediaIndex} from playlist ${s.playlist.id} has a duration of ${i} when the reported duration is ${s.duration} and the target duration is ${r}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return o||l?{severity:o?"warn":"info",message:c}:null},Po=({type:s,segment:e})=>{if(!e)return;const i=!!(e.key||e.map&&e.map.ke),r=!!(e.map&&!e.map.bytes),o=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:s||e.type,uri:e.resolvedUri||e.uri,start:o,duration:e.duration,isEncrypted:i,isMediaInitialization:r}};class Ly extends F.EventTarget{constructor(e,i={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=ls(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(r){r!==this.state_&&(this.logger_(`${this.state_} -> ${r}`),this.state_=r,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():ja(this)}),this.sourceUpdater_.on("codecschange",r=>{this.trigger(ei({type:"codecschange"},r))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():ja(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",r=>{this.trigger(ei({type:"timelinechange"},r)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():ja(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():ja(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return wy.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&z.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,z.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&wy.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Ni();if(this.loaderType_==="main"){const{hasAudio:i,hasVideo:r,isMuxed:o}=e;if(r&&i&&!this.audioDisabled_&&!o)return this.sourceUpdater_.buffered();if(r)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,i=!1){if(!e)return null;const r=Rp(e);let o=this.initSegments_[r];return i&&!o&&e.bytes&&(this.initSegments_[r]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),o||e}segmentKey(e,i=!1){if(!e)return null;const r=US(e);let o=this.keyCache_[r];this.cacheEncryptionKeys_&&i&&!o&&e.bytes&&(this.keyCache_[r]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});const l={resolvedUri:(o||e).resolvedUri};return o&&(l.bytes=o.bytes),l}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,i={}){if(!e||this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const r=this.playlist_,o=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let l=null;if(r&&(r.id?l=r.id:r.uri&&(l=r.uri)),this.logger_(`playlist update [${l} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
currentTime: ${this.currentTime_()}
bufferedEnd: ${gy(this.buffered_())}
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!r||r.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const c=e.mediaSequence-r.mediaSequence;if(this.logger_(`live window shift [${c}]`),this.mediaIndex!==null)if(this.mediaIndex-=c,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const f=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!f.parts||!f.parts.length||!f.parts[this.partIndex])){const p=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=p}}o&&(o.mediaIndex-=c,o.mediaIndex<0?(o.mediaIndex=null,o.partIndex=null):(o.mediaIndex>=0&&(o.segment=e.segments[o.mediaIndex]),o.partIndex>=0&&o.segment.parts&&(o.part=o.segment.parts[o.partIndex]))),this.syncController_.saveExpiredSegmentInfo(r,e)}pause(){this.checkBufferTimeout_&&(z.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&wy.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,i,r=()=>{},o=!1){if(i===1/0&&(i=this.duration_()),i<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let l=1;const c=()=>{l--,l===0&&r()};(o||!this.audioDisabled_)&&(l++,this.sourceUpdater_.removeAudio(e,i,c)),(o||this.loaderType_==="main")&&(this.gopBuffer_=jI(this.gopBuffer_,e,i,this.timeMapping_),l++,this.sourceUpdater_.removeVideo(e,i,c));for(const f in this.inbandTextTracks_)Ld(e,i,this.inbandTextTracks_[f]);Ld(e,i,this.segmentMetadataTrack_),c()}monitorBuffer_(){this.checkBufferTimeout_&&z.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=z.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&z.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=z.setTimeout(this.monitorBufferTick_.bind(this),PI)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const i={segmentInfo:Po({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:i}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,i=this.playlist_,r=this.partIndex){if(!i||!this.mediaSource_)return!1;const o=typeof e=="number"&&i.segments[e],l=e+1===i.segments.length,c=!o||!o.parts||r+1===o.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&l&&c}chooseNextRequest_(){const e=this.buffered_(),i=gy(e)||0,r=yy(e,this.currentTime_()),o=!this.hasPlayed_()&&r>=1,l=r>=this.goalBufferLength_(),c=this.playlist_.segments;if(!c.length||o||l)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const f={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(f.isSyncRequest)f.mediaIndex=UI(this.currentTimeline_,c,i),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${f.mediaIndex}`);else if(this.mediaIndex!==null){const D=c[this.mediaIndex],k=typeof this.partIndex=="number"?this.partIndex:-1;f.startOfSegment=D.end?D.end:i,D.parts&&D.parts[k+1]?(f.mediaIndex=this.mediaIndex,f.partIndex=k+1):f.mediaIndex=this.mediaIndex+1}else{let D,k,I;const C=this.fetchAtBuffer_?i:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
For TargetTime: ${C}.
CurrentTime: ${this.currentTime_()}
BufferedEnd: ${i}
Fetch At Buffer: ${this.fetchAtBuffer_}
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const P=this.getSyncInfoFromMediaSequenceSync_(C);if(!P){const U="No sync info found while using media sequence sync";return this.error({message:U,metadata:{errorType:F.Error.StreamingFailedToSelectNextSegment,error:new Error(U)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${P.start} --> ${P.end})`),D=P.segmentIndex,k=P.partIndex,I=P.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const P=Cn.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:C,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});D=P.segmentIndex,k=P.partIndex,I=P.startTime}f.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${C}`:`currentTime ${C}`,f.mediaIndex=D,f.startOfSegment=I,f.partIndex=k,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${f.mediaIndex} `)}const p=c[f.mediaIndex];let v=p&&typeof f.partIndex=="number"&&p.parts&&p.parts[f.partIndex];if(!p||typeof f.partIndex=="number"&&!v)return null;typeof f.partIndex!="number"&&p.parts&&(f.partIndex=0,v=p.parts[0]);const S=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!r&&v&&!S&&!v.independent)if(f.partIndex===0){const D=c[f.mediaIndex-1],k=D.parts&&D.parts.length&&D.parts[D.parts.length-1];k&&k.independent&&(f.mediaIndex-=1,f.partIndex=D.parts.length-1,f.independent="previous segment")}else p.parts[f.partIndex-1].independent&&(f.partIndex-=1,f.independent="previous part");const x=this.mediaSource_&&this.mediaSource_.readyState==="ended";return f.mediaIndex>=c.length-1&&x&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,f.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(f))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const i=Math.max(e,this.mediaSequenceSync_.start);e!==i&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${i}`);const r=this.mediaSequenceSync_.getSyncInfoForTime(i);if(!r)return null;if(!r.isAppended)return r;const o=this.mediaSequenceSync_.getSyncInfoForTime(r.end);return o?(o.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),o):null}generateSegmentInfo_(e){const{independent:i,playlist:r,mediaIndex:o,startOfSegment:l,isSyncRequest:c,partIndex:f,forceTimestampOffset:p,getMediaInfoForTime:v}=e,S=r.segments[o],x=typeof f=="number"&&S.parts[f],D={requestId:"segment-loader-"+Math.random(),uri:x&&x.resolvedUri||S.resolvedUri,mediaIndex:o,partIndex:x?f:null,isSyncRequest:c,startOfSegment:l,playlist:r,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:S.timeline,duration:x&&x.duration||S.duration,segment:S,part:x,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:v,independent:i},k=typeof p<"u"?p:this.isPendingTimestampOffset_;D.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:S.timeline,currentTimeline:this.currentTimeline_,startOfSegment:l,buffered:this.buffered_(),overrideCheck:k});const I=gy(this.sourceUpdater_.audioBuffered());return typeof I=="number"&&(D.audioAppendStart=I-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(D.gopsToAlignWith=LI(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),D}timestampOffsetForSegment_(e){return FI(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const i=this.currentTime_(),r=e.bandwidth,o=this.pendingSegment_.duration,l=Cn.estimateSegmentRequestTime(o,r,this.playlist_,e.bytesReceived),c=fO(this.buffered_(),i,this.vhs_.tech_.playbackRate())-1;if(l<=c)return;const f=xI({main:this.vhs_.playlists.main,currentTime:i,bandwidth:r,duration:this.duration_(),segmentDuration:o,timeUntilRebuffer:c,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!f)return;const v=l-c-f.rebufferingImpact;let S=.5;c<=ir&&(S=1),!(!f.playlist||f.playlist.uri===this.playlist_.uri||v<S)&&(this.bandwidth=f.playlist.attributes.BANDWIDTH*ki.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Mu(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,i){this.earlyAbortWhenNeeded_(i.stats),!this.checkForAbort_(i.requestId)&&this.trigger("progress")}handleTrackInfo_(e,i){const{hasAudio:r,hasVideo:o}=i,l={segmentInfo:Po({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:r,hasVideo:o}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:l}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(i)||(i=i||{},zI(this.currentMediaInfo_,i)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=i,this.currentMediaInfo_=i,this.logger_("trackinfo update",i),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=i,this.hasEnoughInfoToAppend_()?this.processCallQueue_():ja(this))))}handleTimingInfo_(e,i,r,o){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const l=this.pendingSegment_,c=cx(i);l[c]=l[c]||{},l[c][r]=o,this.logger_(`timinginfo: ${i} - ${r} - ${o}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():ja(this)}handleCaptions_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(i.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,i));return}const o=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),l={};i.forEach(c=>{l[c.stream]=l[c.stream]||{startTime:1/0,captions:[],endTime:0};const f=l[c.stream];f.startTime=Math.min(f.startTime,c.startTime+o),f.endTime=Math.max(f.endTime,c.endTime+o),f.captions.push(c)}),Object.keys(l).forEach(c=>{const{startTime:f,endTime:p,captions:v}=l[c],S=this.inbandTextTracks_;this.logger_(`adding cues from ${f} -> ${p} for ${c}`),DI(S,this.vhs_.tech_,c),Ld(f,p,S[c]),CI({captionArray:v,inbandTextTracks:S,timestampOffset:o})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,i,r){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,r));return}this.addMetadataToTextTrack(r,i,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(i=>i())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(i=>i())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!Iy({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,i=this.getCurrentMediaInfo_();if(!e||!i)return!1;const{hasAudio:r,hasVideo:o,isMuxed:l}=i;return!(o&&!e.videoTimingInfo||r&&!this.audioDisabled_&&!l&&!e.audioTimingInfo||Iy({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){ja(this),this.callQueue_.push(this.handleData_.bind(this,e,i));return}const r=this.pendingSegment_;if(this.setTimeMapping_(r.timeline),this.updateMediaSecondsLoaded_(r.part||r.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),r.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),r.isFmp4=e.isFmp4,r.timingInfo=r.timingInfo||{},r.isFmp4)this.trigger("fmp4"),r.timingInfo.start=r[cx(i.type)].start;else{const o=this.getCurrentMediaInfo_(),l=this.loaderType_==="main"&&o&&o.hasVideo;let c;l&&(c=r.videoTimingInfo.start),r.timingInfo.start=this.trueSegmentStart_({currentStart:r.timingInfo.start,playlist:r.playlist,mediaIndex:r.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:l,firstVideoFrameTimeForData:c,videoTimingInfo:r.videoTimingInfo,audioTimingInfo:r.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(r,i.type),this.updateSourceBufferTimestampOffset_(r),r.isSyncRequest){this.updateTimingInfoEnd_(r),this.syncController_.saveSegmentTimingInfo({segmentInfo:r,shouldSaveTimelineMapping:this.loaderType_==="main"});const o=this.chooseNextRequest_();if(o.mediaIndex!==r.mediaIndex||o.partIndex!==r.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}r.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(r,i)}}updateAppendInitSegmentStatus(e,i){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[i]!==e.playlist&&(this.appendInitSegment_[i]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:i,map:r,playlist:o}){if(r){const l=Rp(r);if(this.activeInitSegmentId_===l)return null;i=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=l}return i&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=o,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,i):null}handleQuotaExceededError_({segmentInfo:e,type:i,bytes:r},o){const l=this.sourceUpdater_.audioBuffered(),c=this.sourceUpdater_.videoBuffered();l.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+zo(l).join(", ")),c.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+zo(c).join(", "));const f=l.length?l.start(0):0,p=l.length?l.end(l.length-1):0,v=c.length?c.start(0):0,S=c.length?c.end(c.length-1):0;if(p-f<=Rd&&S-v<=Rd){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${r.byteLength}, audio buffer: ${zo(l).join(", ")}, video buffer: ${zo(c).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:i,bytes:r}));const D=this.currentTime_()-Rd;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${D}`),this.remove(0,D,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Rd}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=z.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Rd*1e3)},!0)}handleAppendError_({segmentInfo:e,type:i,bytes:r},o){if(o){if(o.code===AS){this.handleQuotaExceededError_({segmentInfo:e,type:i,bytes:r});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",o),this.error({message:`${i} append of ${r.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:F.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:r,data:o,bytes:l}){if(!l){const f=[o];let p=o.byteLength;r&&(f.unshift(r),p+=r.byteLength),l=MI({bytes:p,segments:f})}const c={segmentInfo:Po({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:c}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:i,bytes:l},this.handleAppendError_.bind(this,{segmentInfo:e,type:i,bytes:l}))}handleSegmentTimingInfo_(e,i,r){if(!this.pendingSegment_||i!==this.pendingSegment_.requestId)return;const o=this.pendingSegment_.segment,l=`${e}TimingInfo`;o[l]||(o[l]={}),o[l].transmuxerPrependedSeconds=r.prependedContentDuration||0,o[l].transmuxedPresentationStart=r.start.presentation,o[l].transmuxedDecodeStart=r.start.decode,o[l].transmuxedPresentationEnd=r.end.presentation,o[l].transmuxedDecodeEnd=r.end.decode,o[l].baseMediaDecodeTime=r.baseMediaDecodeTime}appendData_(e,i){const{type:r,data:o}=i;if(!o||!o.byteLength||r==="audio"&&this.audioDisabled_)return;const l=this.getInitSegmentAndUpdateState_({type:r,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:r,initSegment:l,data:o})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){ja(this),this.loadQueue_.push(()=>{const i=ei({},e,{forceTimestampOffset:!0});ei(e,this.generateSegmentInfo_(i)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const i=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),o=this.mediaIndex!==null,l=e.timeline!==this.currentTimeline_&&e.timeline>0,c=r||o&&l;this.logger_(`Requesting
${ox(e.uri)}
${Mu(e)}`),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=bI({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:c,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:f,level:p,stream:v})=>{this.logger_(`${Mu(e)} logged from transmuxer stream ${v} as a ${p}: ${f}`)},triggerSegmentEventFn:({type:f,segment:p,keyInfo:v,trackInfo:S,timingInfo:x})=>{const k={segmentInfo:Po({segment:p})};v&&(k.keyInfo=v),S&&(k.trackInfo=S),x&&(k.timingInfo=x),this.trigger({type:f,metadata:k})}})}trimBackBuffer_(e){const i=qI(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i)}createSimplifiedSegmentObj_(e){const i=e.segment,r=e.part,o=e.segment.key||e.segment.map&&e.segment.map.key,l=e.segment.map&&!e.segment.map.bytes,c={resolvedUri:r?r.resolvedUri:i.resolvedUri,byterange:r?r.byterange:i.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:o,isMediaInitialization:l},f=e.playlist.segments[e.mediaIndex-1];if(f&&f.timeline===i.timeline&&(f.videoTimingInfo?c.baseStartTime=f.videoTimingInfo.transmuxedDecodeEnd:f.audioTimingInfo&&(c.baseStartTime=f.audioTimingInfo.transmuxedDecodeEnd)),i.key){const p=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);c.key=this.segmentKey(i.key),c.key.iv=p}return i.map&&(c.map=this.initSegmentForMap(i.map)),c}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,i){if(this.pendingSegment_.byteLength=i.bytesReceived,e<zp){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${zp}`);return}const r={bandwidthInfo:{from:this.bandwidth,to:i.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:r}),this.bandwidth=i.bandwidth,this.roundTrip=i.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,i,r){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,i,r));return}if(this.saveTransferStats_(i.stats),!this.pendingSegment_||i.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===sr.ABORTED)return;if(this.pause(),e.code===sr.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const o=this.pendingSegment_;this.saveBandwidthRelatedStats_(o.duration,i.stats),o.endOfAllRequests=i.endOfAllRequests,r.gopInfo&&(this.gopBuffer_=RI(this.gopBuffer_,r.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(o)}setTimeMapping_(e){const i=this.syncController_.mappingForTimeline(e);i!==null&&(this.timeMapping_=i)}updateMediaSecondsLoaded_(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:e,playlist:i,mediaIndex:r,firstVideoFrameTimeForData:o,currentVideoTimestampOffset:l,useVideoTimingInfo:c,videoTimingInfo:f,audioTimingInfo:p}){if(typeof e<"u")return e;if(!c)return p.start;const v=i.segments[r-1];return r===0||!v||typeof v.start>"u"||v.end!==o+l?o:f.start}waitForAppendsToComplete_(e){const i=this.getCurrentMediaInfo_(e);if(!i){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}const{hasAudio:r,hasVideo:o,isMuxed:l}=i,c=this.loaderType_==="main"&&o,f=!this.audioDisabled_&&r&&!l;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}c&&e.waitingOnAppends++,f&&e.waitingOnAppends++,c&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),f&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const i=BI(this.loaderType_,this.getCurrentMediaInfo_(),e);return i?(this.error({message:i,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let i=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),i=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),i=!0),i&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:i,timingInfo:r}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:i&&typeof i.transmuxedDecodeStart=="number"?i.transmuxedDecodeStart:r.start:r.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const i=this.getMediaInfo_(),o=this.loaderType_==="main"&&i&&i.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;o&&(e.timingInfo.end=typeof o.end=="number"?o.end:o.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const p={segmentInfo:Po({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:p})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});const i=YI(e,this.sourceType_);if(i&&(i.severity==="warn"?F.log.warn(i.message):this.logger_(i.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${Mu(e)}`);return}this.logger_(`Appended ${Mu(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const r=e.segment,o=e.part,l=r.end&&this.currentTime_()-r.end>e.playlist.targetDuration*3,c=o&&o.end&&this.currentTime_()-o.end>e.playlist.partTargetDuration*3;if(l||c){this.logger_(`bad ${l?"segment":"part"} ${Mu(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<zp){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${zp}`);return}const i=this.throughput.rate,r=Date.now()-e.endOfAllRequests+1,o=Math.floor(e.byteLength/r*8*1e3);this.throughput.rate+=(o-i)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const i=e.segment,r=i.start,o=i.end;if(!ux(r)||!ux(o))return;Ld(r,o,this.segmentMetadataTrack_);const l=z.WebKitDataCue||z.VTTCue,c={custom:i.custom,dateTimeObject:i.dateTimeObject,dateTimeString:i.dateTimeString,programDateTime:i.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:r,end:o},f=JSON.stringify(c),p=new l(r,o,f);p.value=c,this.segmentMetadataTrack_.addCue(p)}}function $r(){}const hx=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},QI=["video","audio"],Ry=(s,e)=>{const i=e[`${s}Buffer`];return i&&i.updating||e.queuePending[s]},GI=(s,e)=>{for(let i=0;i<e.length;i++){const r=e[i];if(r.type==="mediaSource")return null;if(r.type===s)return i}return null},Du=(s,e)=>{if(e.queue.length===0)return;let i=0,r=e.queue[i];if(r.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),r.action(e),r.doneFn&&r.doneFn(),Du("audio",e),Du("video",e));return}if(s!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||Ry(s,e))){if(r.type!==s){if(i=GI(s,e.queue),i===null)return;r=e.queue[i]}if(e.queue.splice(i,1),e.queuePending[s]=r,r.action(s,e),!r.doneFn){e.queuePending[s]=null,Du(s,e);return}}},fx=(s,e)=>{const i=e[`${s}Buffer`],r=hx(s);i&&(i.removeEventListener("updateend",e[`on${r}UpdateEnd_`]),i.removeEventListener("error",e[`on${r}Error_`]),e.codecs[s]=null,e[`${s}Buffer`]=null)},rr=(s,e)=>s&&e&&Array.prototype.indexOf.call(s.sourceBuffers,e)!==-1,Fn={appendBuffer:(s,e,i)=>(r,o)=>{const l=o[`${r}Buffer`];if(rr(o.mediaSource,l)){o.logger_(`Appending segment ${e.mediaIndex}'s ${s.length} bytes to ${r}Buffer`);try{l.appendBuffer(s)}catch(c){o.logger_(`Error with code ${c.code} `+(c.code===AS?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${r}Buffer`),o.queuePending[r]=null,i(c)}}},remove:(s,e)=>(i,r)=>{const o=r[`${i}Buffer`];if(rr(r.mediaSource,o)){r.logger_(`Removing ${s} to ${e} from ${i}Buffer`);try{o.remove(s,e)}catch{r.logger_(`Remove ${s} to ${e} from ${i}Buffer failed`)}}},timestampOffset:s=>(e,i)=>{const r=i[`${e}Buffer`];rr(i.mediaSource,r)&&(i.logger_(`Setting ${e}timestampOffset to ${s}`),r.timestampOffset=s)},callback:s=>(e,i)=>{s()},endOfStream:s=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${s||""})`);try{e.mediaSource.endOfStream(s)}catch(i){F.log.warn("Failed to call media source endOfStream",i)}}},duration:s=>e=>{e.logger_(`Setting mediaSource duration to ${s}`);try{e.mediaSource.duration=s}catch(i){F.log.warn("Failed to set media source duration",i)}},abort:()=>(s,e)=>{if(e.mediaSource.readyState!=="open")return;const i=e[`${s}Buffer`];if(rr(e.mediaSource,i)){e.logger_(`calling abort on ${s}Buffer`);try{i.abort()}catch(r){F.log.warn(`Failed to abort on ${s}Buffer`,r)}}},addSourceBuffer:(s,e)=>i=>{const r=hx(s),o=Fl(e);i.logger_(`Adding ${s}Buffer with codec ${e} to mediaSource`);const l=i.mediaSource.addSourceBuffer(o);l.addEventListener("updateend",i[`on${r}UpdateEnd_`]),l.addEventListener("error",i[`on${r}Error_`]),i.codecs[s]=e,i[`${s}Buffer`]=l},removeSourceBuffer:s=>e=>{const i=e[`${s}Buffer`];if(fx(s,e),!!rr(e.mediaSource,i)){e.logger_(`Removing ${s}Buffer with codec ${e.codecs[s]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(i)}catch(r){F.log.warn(`Failed to removeSourceBuffer ${s}Buffer`,r)}}},changeType:s=>(e,i)=>{const r=i[`${e}Buffer`],o=Fl(s);if(!rr(i.mediaSource,r))return;const l=s.substring(0,s.indexOf(".")),c=i.codecs[e];if(c.substring(0,c.indexOf("."))===l)return;const p={codecsChangeInfo:{from:c,to:s}};i.trigger({type:"codecschange",metadata:p}),i.logger_(`changing ${e}Buffer codec from ${c} to ${s}`);try{r.changeType(o),i.codecs[e]=s}catch(v){p.errorType=F.Error.StreamingCodecsChangeError,p.error=v,v.metadata=p,i.error_=v,i.trigger("error"),F.log.warn(`Failed to changeType on ${e}Buffer`,v)}}},Hn=({type:s,sourceUpdater:e,action:i,doneFn:r,name:o})=>{e.queue.push({type:s,action:i,doneFn:r,name:o}),Du(s,e)},px=(s,e)=>i=>{const r=e[`${s}Buffered`](),o=cO(r);if(e.logger_(`received "updateend" event for ${s} Source Buffer: `,o),e.queuePending[s]){const l=e.queuePending[s].doneFn;e.queuePending[s]=null,l&&l(e[`${s}Error_`])}Du(s,e)};class mx extends F.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Du("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=ls("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=px("video",this),this.onAudioUpdateEnd_=px("audio",this),this.onVideoError_=i=>{this.videoError_=i},this.onAudioError_=i=>{this.audioError_=i},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,i){Hn({type:"mediaSource",sourceUpdater:this,action:Fn.addSourceBuffer(e,i),name:"addSourceBuffer"})}abort(e){Hn({type:e,sourceUpdater:this,action:Fn.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){F.log.error("removeSourceBuffer is not supported!");return}Hn({type:"mediaSource",sourceUpdater:this,action:Fn.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!F.browser.IS_FIREFOX&&z.MediaSource&&z.MediaSource.prototype&&typeof z.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return z.SourceBuffer&&z.SourceBuffer.prototype&&typeof z.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,i){if(!this.canChangeType()){F.log.error("changeType is not supported!");return}Hn({type:e,sourceUpdater:this,action:Fn.changeType(i),name:"changeType"})}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(i=>{const r=e[i];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(i,r);this.canChangeType()&&this.changeType(i,r)})}appendBuffer(e,i){const{segmentInfo:r,type:o,bytes:l}=e;if(this.processedAppend_=!0,o==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,i]),this.logger_(`delayed audio append of ${l.length} until video append`);return}const c=i;if(Hn({type:o,sourceUpdater:this,action:Fn.appendBuffer(l,r||{mediaIndex:-1},c),doneFn:i,name:"appendBuffer"}),o==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const f=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${f.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,f.forEach(p=>{this.appendBuffer.apply(this,p)})}}audioBuffered(){return rr(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Ni()}videoBuffered(){return rr(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Ni()}buffered(){const e=rr(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,i=rr(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return i&&!e?this.audioBuffered():e&&!i?this.videoBuffered():hO(this.audioBuffered(),this.videoBuffered())}setDuration(e,i=$r){Hn({type:"mediaSource",sourceUpdater:this,action:Fn.duration(e),name:"duration",doneFn:i})}endOfStream(e=null,i=$r){typeof e!="string"&&(e=void 0),Hn({type:"mediaSource",sourceUpdater:this,action:Fn.endOfStream(e),name:"endOfStream",doneFn:i})}removeAudio(e,i,r=$r){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){r();return}Hn({type:"audio",sourceUpdater:this,action:Fn.remove(e,i),doneFn:r,name:"remove"})}removeVideo(e,i,r=$r){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){r();return}Hn({type:"video",sourceUpdater:this,action:Fn.remove(e,i),doneFn:r,name:"remove"})}updating(){return!!(Ry("audio",this)||Ry("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Hn({type:"audio",sourceUpdater:this,action:Fn.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(Hn({type:"video",sourceUpdater:this,action:Fn.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&Hn({type:"audio",sourceUpdater:this,action:Fn.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&Hn({type:"video",sourceUpdater:this,action:Fn.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),QI.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>fx(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const gx=s=>decodeURIComponent(escape(String.fromCharCode.apply(null,s))),XI=s=>{const e=new Uint8Array(s);return Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("")},yx=new Uint8Array(`
`.split("").map(s=>s.charCodeAt(0)));class WI extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class KI extends Ly{constructor(e,i={}){super(e,i),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Ni();const e=this.subtitlesTrack_.cues,i=e[0].startTime,r=e[e.length-1].startTime;return Ni([[i,r]])}initSegmentForMap(e,i=!1){if(!e)return null;const r=Rp(e);let o=this.initSegments_[r];if(i&&!o&&e.bytes){const l=yx.byteLength+e.bytes.byteLength,c=new Uint8Array(l);c.set(e.bytes),c.set(yx,e.bytes.byteLength),this.initSegments_[r]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:c}}return o||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,i){Ld(e,i,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const i=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",i),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,i,r){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(i.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===sr.TIMEOUT&&this.handleTimeout_(),e.code===sr.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const o=this.pendingSegment_,l=r.mp4VttCues&&r.mp4VttCues.length;l&&(o.mp4VttCues=r.mp4VttCues),this.saveBandwidthRelatedStats_(o.duration,i.stats),i.key&&this.segmentKey(i.key,!0),this.state="APPENDING",this.trigger("appending");const c=o.segment;if(c.map&&(c.map.bytes=i.map.bytes),o.bytes=i.bytes,typeof z.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,i,r),()=>this.stopForError({message:"Error loading vtt.js"}));return}c.requested=!0;try{this.parseVTTCues_(o)}catch(f){this.stopForError({message:f.message,metadata:{errorType:F.Error.StreamingVttParserError,error:f}});return}if(l||this.updateTimeMapping_(o,this.syncController_.timelines[o.timeline],this.playlist_),o.cues.length?o.timingInfo={start:o.cues[0].startTime,end:o.cues[o.cues.length-1].endTime}:o.timingInfo={start:o.startOfSegment,end:o.startOfSegment+o.duration},o.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}o.byteLength=o.bytes.byteLength,this.mediaSecondsLoaded+=c.duration,o.cues.forEach(f=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new z.VTTCue(f.startTime,f.endTime,f.text):f)}),II(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,i){const r=e&&e.type==="vtt",o=i&&i.type==="text";r&&o&&super.handleData_(e,i)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const i=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(r=>{const o=r.start+i,l=r.end+i,c=new z.VTTCue(o,l,r.cueText);r.settings&&r.settings.split(" ").forEach(f=>{const p=f.split(":"),v=p[0],S=p[1];c[v]=isNaN(S)?S:Number(S)}),e.cues.push(c)})}parseVTTCues_(e){let i,r=!1;if(typeof z.WebVTT!="function")throw new WI;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof z.TextDecoder=="function"?i=new z.TextDecoder("utf8"):(i=z.WebVTT.StringDecoder(),r=!0);const o=new z.WebVTT.Parser(z,z.vttjs,i);if(o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=c=>{e.timestampmap=c},o.onparsingerror=c=>{F.log.warn("Error encountered when parsing cues: "+c.message)},e.segment.map){let c=e.segment.map.bytes;r&&(c=gx(c)),o.parse(c)}let l=e.bytes;r&&(l=gx(l)),o.parse(l),o.flush()}updateTimeMapping_(e,i,r){const o=e.segment;if(!i)return;if(!e.cues.length){o.empty=!0;return}const{MPEGTS:l,LOCAL:c}=e.timestampmap,p=l/wo.ONE_SECOND_IN_TS-c+i.mapping;if(e.cues.forEach(v=>{const S=v.endTime-v.startTime,x=this.handleRollover_(v.startTime+p,i.time);v.startTime=Math.max(x,0),v.endTime=Math.max(x+S,0)}),!r.syncInfo){const v=e.cues[0].startTime,S=e.cues[e.cues.length-1].startTime;r.syncInfo={mediaSequence:r.mediaSequence+e.mediaIndex,time:Math.min(v,S-o.duration)}}}handleRollover_(e,i){if(i===null)return e;let r=e*wo.ONE_SECOND_IN_TS;const o=i*wo.ONE_SECOND_IN_TS;let l;for(o<r?l=-8589934592:l=8589934592;Math.abs(r-o)>4294967296;)r+=l;return r/wo.ONE_SECOND_IN_TS}}const ZI=function(s,e){const i=s.cues;for(let r=0;r<i.length;r++){const o=i[r];if(e>=o.adStartTime&&e<=o.adEndTime)return o}return null},JI=function(s,e,i=0){if(!s.segments)return;let r=i,o;for(let l=0;l<s.segments.length;l++){const c=s.segments[l];if(o||(o=ZI(e,r+c.duration/2)),o){if("cueIn"in c){o.endTime=r,o.adEndTime=r,r+=c.duration,o=null;continue}if(r<o.endTime){r+=c.duration;continue}o.endTime+=c.duration}else if("cueOut"in c&&(o=new z.VTTCue(r,r+c.duration,c.cueOut),o.adStartTime=r,o.adEndTime=r+parseFloat(c.cueOut),e.addCue(o)),"cueOutCont"in c){const[f,p]=c.cueOutCont.split("/").map(parseFloat);o=new z.VTTCue(r,r+c.duration,""),o.adStartTime=r-f,o.adEndTime=o.adStartTime+p,e.addCue(o)}r+=c.duration}};class Tx{constructor({start:e,end:i,segmentIndex:r,partIndex:o=null,appended:l=!1}){this.start_=e,this.end_=i,this.segmentIndex_=r,this.partIndex_=o,this.appended_=l}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class e3{constructor(e,i=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=i}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class vx{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,i){const{mediaSequence:r,segments:o}=e;if(this.isReliable_=this.isReliablePlaylist_(r,o),!!this.isReliable_)return this.updateStorage_(o,r,this.calculateBaseTime_(r,o,i))}getSyncInfoForTime(e){for(const{segmentSyncInfo:i,partsSyncInfo:r}of this.storage_.values())if(r.length){for(const o of r)if(o.isInRange(e))return o}else if(i.isInRange(e))return i;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,i,r){const o=new Map;let l=`
`,c=r,f=i;this.start_=c,e.forEach((p,v)=>{const S=this.storage_.get(f),x=c,D=x+p.duration,k=!!(S&&S.segmentSyncInfo&&S.segmentSyncInfo.isAppended),I=new Tx({start:x,end:D,appended:k,segmentIndex:v});p.syncInfo=I;let C=c;const P=(p.parts||[]).map((U,Y)=>{const $=C,G=C+U.duration,W=!!(S&&S.partsSyncInfo&&S.partsSyncInfo[Y]&&S.partsSyncInfo[Y].isAppended),oe=new Tx({start:$,end:G,appended:W,segmentIndex:v,partIndex:Y});return C=G,l+=`Media Sequence: ${f}.${Y} | Range: ${$} --> ${G} | Appended: ${W}
`,U.syncInfo=oe,oe});o.set(f,new e3(I,P)),l+=`${ox(p.resolvedUri)} | Media Sequence: ${f} | Range: ${x} --> ${D} | Appended: ${k}
`,f++,c=D}),this.end_=c,this.storage_=o,this.diagnostics_=l}calculateBaseTime_(e,i,r){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const o=Math.min(...this.storage_.keys());if(e<o){const l=o-e;let c=this.storage_.get(o).segmentSyncInfo.start;for(let f=0;f<l;f++){const p=i[f];c-=p.duration}return c}return r}isReliablePlaylist_(e,i){return e!=null&&Array.isArray(i)&&i.length}}class bx extends vx{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,i,r){if(!this.storage_.size){const o=this.parent_.getSyncInfoForMediaSequence(e);return o?o.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,i,r)}}const t3=86400,jy=[{name:"VOD",run:(s,e,i,r,o)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(s,e,i,r,o,l)=>{const c=s.getMediaSequenceSync(l);if(!c||!c.isReliable)return null;const f=c.getSyncInfoForTime(o);return f?{time:f.start,partIndex:f.partIndex,segmentIndex:f.segmentIndex}:null}},{name:"ProgramDateTime",run:(s,e,i,r,o)=>{if(!Object.keys(s.timelineToDatetimeMappings).length)return null;let l=null,c=null;const f=vy(e);o=o||0;for(let p=0;p<f.length;p++){const v=e.endList||o===0?p:f.length-(p+1),S=f[v],x=S.segment,D=s.timelineToDatetimeMappings[x.timeline];if(!D||!x.dateTimeObject)continue;let I=x.dateTimeObject.getTime()/1e3+D;if(x.parts&&typeof S.partIndex=="number")for(let P=0;P<S.partIndex;P++)I+=x.parts[P].duration;const C=Math.abs(o-I);if(c!==null&&(C===0||c<C))break;c=C,l={time:I,segmentIndex:S.segmentIndex,partIndex:S.partIndex}}return l}},{name:"Segment",run:(s,e,i,r,o)=>{let l=null,c=null;o=o||0;const f=vy(e);for(let p=0;p<f.length;p++){const v=e.endList||o===0?p:f.length-(p+1),S=f[v],x=S.segment,D=S.part&&S.part.start||x&&x.start;if(x.timeline===r&&typeof D<"u"){const k=Math.abs(o-D);if(c!==null&&c<k)break;(!l||c===null||c>=k)&&(c=k,l={time:D,segmentIndex:S.segmentIndex,partIndex:S.partIndex})}}return l}},{name:"Discontinuity",run:(s,e,i,r,o)=>{let l=null;if(o=o||0,e.discontinuityStarts&&e.discontinuityStarts.length){let c=null;for(let f=0;f<e.discontinuityStarts.length;f++){const p=e.discontinuityStarts[f],v=e.discontinuitySequence+f+1,S=s.discontinuities[v];if(S){const x=Math.abs(o-S.time);if(c!==null&&c<x)break;(!l||c===null||c>=x)&&(c=x,l={time:S.time,segmentIndex:p,partIndex:null})}}}return l}},{name:"Playlist",run:(s,e,i,r,o)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class i3 extends F.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const i=new vx,r=new bx(i),o=new bx(i);this.mediaSequenceStorage_={main:i,audio:r,vtt:o},this.logger_=ls("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,i,r,o,l){if(i!==1/0)return jy.find(({name:p})=>p==="VOD").run(this,e,i);const c=this.runStrategies_(e,i,r,o,l);if(!c.length)return null;for(const f of c){const{syncPoint:p,strategy:v}=f,{segmentIndex:S,time:x}=p;if(S<0)continue;const D=e.segments[S],k=x,I=k+D.duration;if(this.logger_(`Strategy: ${v}. Current time: ${o}. selected segment: ${S}. Time: [${k} -> ${I}]}`),o>=k&&o<I)return this.logger_("Found sync point with exact match: ",p),p}return this.selectSyncPoint_(c,{key:"time",value:o})}getExpiredTime(e,i){if(!e||!e.segments)return null;const r=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!r.length)return null;const o=this.selectSyncPoint_(r,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+Nd({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))}runStrategies_(e,i,r,o,l){const c=[];for(let f=0;f<jy.length;f++){const p=jy[f],v=p.run(this,e,i,r,o,l);v&&(v.strategy=p.name,c.push({strategy:p.name,syncPoint:v}))}return c}selectSyncPoint_(e,i){let r=e[0].syncPoint,o=Math.abs(e[0].syncPoint[i.key]-i.value),l=e[0].strategy;for(let c=1;c<e.length;c++){const f=Math.abs(e[c].syncPoint[i.key]-i.value);f<o&&(o=f,r=e[c].syncPoint,l=e[c].strategy)}return this.logger_(`syncPoint for [${i.key}: ${i.value}] chosen with strategy [${l}]: [time:${r.time}, segmentIndex:${r.segmentIndex}`+(typeof r.partIndex=="number"?`,partIndex:${r.partIndex}`:"")+"]"),r}saveExpiredSegmentInfo(e,i){const r=i.mediaSequence-e.mediaSequence;if(r>t3){F.log.warn(`Not saving expired segment info. Media sequence gap ${r} is too large.`);return}for(let o=r-1;o>=0;o--){const l=e.segments[o];if(l&&typeof l.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+o,time:l.start},this.logger_(`playlist refresh sync: [time:${i.syncInfo.time}, mediaSequence: ${i.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const i=e.segments[0],r=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-r}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:i}){const r=this.calculateSegmentTimeMapping_(e,e.timingInfo,i),o=e.segment;r&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:o.start}));const l=o.dateTimeObject;o.discontinuity&&i&&l&&(this.timelineToDatetimeMappings[o.timeline]=-(l.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,i,r){const o=e.segment,l=e.part;let c=this.timelines[e.timeline],f,p;if(typeof e.timestampOffset=="number")c={time:e.startOfSegment,mapping:e.startOfSegment-i.start},r&&(this.timelines[e.timeline]=c,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${c.time}] [mapping: ${c.mapping}]`)),f=e.startOfSegment,p=i.end+c.mapping;else if(c)f=i.start+c.mapping,p=i.end+c.mapping;else return!1;return l&&(l.start=f,l.end=p),(!o.start||f<o.start)&&(o.start=f),o.end=p,!0}saveDiscontinuitySyncInfo_(e){const i=e.playlist,r=e.segment;if(r.discontinuity)this.discontinuities[r.timeline]={time:r.start,accuracy:0};else if(i.discontinuityStarts&&i.discontinuityStarts.length)for(let o=0;o<i.discontinuityStarts.length;o++){const l=i.discontinuityStarts[o],c=i.discontinuitySequence+o+1,f=l-e.mediaIndex,p=Math.abs(f);if(!this.discontinuities[c]||this.discontinuities[c].accuracy>p){let v;f<0?v=r.start-Nd({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:l}):v=r.end+Nd({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:l}),this.discontinuities[c]={time:v,accuracy:p}}}}dispose(){this.trigger("dispose"),this.off()}}class n3 extends F.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:i,to:r}){return typeof i=="number"&&typeof r=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:i,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:i,to:r}){if(typeof i=="number"&&typeof r=="number"){this.lastTimelineChanges_[e]={type:e,from:i,to:r},delete this.pendingTimelineChanges_[e];const o={timelineChangeInfo:{from:i,to:r}};this.trigger({type:"timelinechange",metadata:o})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const s3=YS(QS(function(){var s=function(){function C(){this.listeners={}}var P=C.prototype;return P.on=function(Y,$){this.listeners[Y]||(this.listeners[Y]=[]),this.listeners[Y].push($)},P.off=function(Y,$){if(!this.listeners[Y])return!1;var G=this.listeners[Y].indexOf($);return this.listeners[Y]=this.listeners[Y].slice(0),this.listeners[Y].splice(G,1),G>-1},P.trigger=function(Y){var $=this.listeners[Y];if($)if(arguments.length===2)for(var G=$.length,W=0;W<G;++W)$[W].call(this,arguments[1]);else for(var oe=Array.prototype.slice.call(arguments,1),K=$.length,de=0;de<K;++de)$[de].apply(this,oe)},P.dispose=function(){this.listeners={}},P.pipe=function(Y){this.on("data",function($){Y.push($)})},C}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(C){return C.subarray(0,C.byteLength-C[C.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const i=function(){const C=[[[],[],[],[],[]],[[],[],[],[],[]]],P=C[0],U=C[1],Y=P[4],$=U[4];let G,W,oe;const K=[],de=[];let fe,me,le,_e,he,ge;for(G=0;G<256;G++)de[(K[G]=G<<1^(G>>7)*283)^G]=G;for(W=oe=0;!Y[W];W^=fe||1,oe=de[oe]||1)for(_e=oe^oe<<1^oe<<2^oe<<3^oe<<4,_e=_e>>8^_e&255^99,Y[W]=_e,$[_e]=W,le=K[me=K[fe=K[W]]],ge=le*16843009^me*65537^fe*257^W*16843008,he=K[_e]*257^_e*16843008,G=0;G<4;G++)P[G][W]=he=he<<24^he>>>8,U[G][_e]=ge=ge<<24^ge>>>8;for(G=0;G<5;G++)P[G]=P[G].slice(0),U[G]=U[G].slice(0);return C};let r=null;class o{constructor(P){r||(r=i()),this._tables=[[r[0][0].slice(),r[0][1].slice(),r[0][2].slice(),r[0][3].slice(),r[0][4].slice()],[r[1][0].slice(),r[1][1].slice(),r[1][2].slice(),r[1][3].slice(),r[1][4].slice()]];let U,Y,$;const G=this._tables[0][4],W=this._tables[1],oe=P.length;let K=1;if(oe!==4&&oe!==6&&oe!==8)throw new Error("Invalid aes key size");const de=P.slice(0),fe=[];for(this._key=[de,fe],U=oe;U<4*oe+28;U++)$=de[U-1],(U%oe===0||oe===8&&U%oe===4)&&($=G[$>>>24]<<24^G[$>>16&255]<<16^G[$>>8&255]<<8^G[$&255],U%oe===0&&($=$<<8^$>>>24^K<<24,K=K<<1^(K>>7)*283)),de[U]=de[U-oe]^$;for(Y=0;U;Y++,U--)$=de[Y&3?U:U-4],U<=4||Y<4?fe[Y]=$:fe[Y]=W[0][G[$>>>24]]^W[1][G[$>>16&255]]^W[2][G[$>>8&255]]^W[3][G[$&255]]}decrypt(P,U,Y,$,G,W){const oe=this._key[1];let K=P^oe[0],de=$^oe[1],fe=Y^oe[2],me=U^oe[3],le,_e,he;const ge=oe.length/4-2;let Ae,ne=4;const Se=this._tables[1],pe=Se[0],Ue=Se[1],se=Se[2],Oe=Se[3],we=Se[4];for(Ae=0;Ae<ge;Ae++)le=pe[K>>>24]^Ue[de>>16&255]^se[fe>>8&255]^Oe[me&255]^oe[ne],_e=pe[de>>>24]^Ue[fe>>16&255]^se[me>>8&255]^Oe[K&255]^oe[ne+1],he=pe[fe>>>24]^Ue[me>>16&255]^se[K>>8&255]^Oe[de&255]^oe[ne+2],me=pe[me>>>24]^Ue[K>>16&255]^se[de>>8&255]^Oe[fe&255]^oe[ne+3],ne+=4,K=le,de=_e,fe=he;for(Ae=0;Ae<4;Ae++)G[(3&-Ae)+W]=we[K>>>24]<<24^we[de>>16&255]<<16^we[fe>>8&255]<<8^we[me&255]^oe[ne++],le=K,K=de,de=fe,fe=me,me=le}}class l extends s{constructor(){super(s),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(P){this.jobs.push(P),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const c=function(C){return C<<24|(C&65280)<<8|(C&16711680)>>8|C>>>24},f=function(C,P,U){const Y=new Int32Array(C.buffer,C.byteOffset,C.byteLength>>2),$=new o(Array.prototype.slice.call(P)),G=new Uint8Array(C.byteLength),W=new Int32Array(G.buffer);let oe,K,de,fe,me,le,_e,he,ge;for(oe=U[0],K=U[1],de=U[2],fe=U[3],ge=0;ge<Y.length;ge+=4)me=c(Y[ge]),le=c(Y[ge+1]),_e=c(Y[ge+2]),he=c(Y[ge+3]),$.decrypt(me,le,_e,he,W,ge),W[ge]=c(W[ge]^oe),W[ge+1]=c(W[ge+1]^K),W[ge+2]=c(W[ge+2]^de),W[ge+3]=c(W[ge+3]^fe),oe=me,K=le,de=_e,fe=he;return G};class p{constructor(P,U,Y,$){const G=p.STEP,W=new Int32Array(P.buffer),oe=new Uint8Array(P.byteLength);let K=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(W.subarray(K,K+G),U,Y,oe)),K=G;K<W.length;K+=G)Y=new Uint32Array([c(W[K-4]),c(W[K-3]),c(W[K-2]),c(W[K-1])]),this.asyncStream_.push(this.decryptChunk_(W.subarray(K,K+G),U,Y,oe));this.asyncStream_.push(function(){$(null,e(oe))})}static get STEP(){return 32e3}decryptChunk_(P,U,Y,$){return function(){const G=f(P,U,Y);$.set(G,P.byteOffset)}}}var v=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S;typeof window<"u"?S=window:typeof v<"u"?S=v:typeof self<"u"?S=self:S={};var x=S,D=function(P){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(P):P&&P.buffer instanceof ArrayBuffer},k=x.BigInt||Number;k("0x1"),k("0x100"),k("0x10000"),k("0x1000000"),k("0x100000000"),k("0x10000000000"),k("0x1000000000000"),k("0x100000000000000"),k("0x10000000000000000"),function(){var C=new Uint16Array([65484]),P=new Uint8Array(C.buffer,C.byteOffset,C.byteLength);return P[0]===255?"big":P[0]===204?"little":"unknown"}();const I=function(C){const P={};return Object.keys(C).forEach(U=>{const Y=C[U];D(Y)?P[U]={bytes:Y.buffer,byteOffset:Y.byteOffset,byteLength:Y.byteLength}:P[U]=Y}),P};self.onmessage=function(C){const P=C.data,U=new Uint8Array(P.encrypted.bytes,P.encrypted.byteOffset,P.encrypted.byteLength),Y=new Uint32Array(P.key.bytes,P.key.byteOffset,P.key.byteLength/4),$=new Uint32Array(P.iv.bytes,P.iv.byteOffset,P.iv.byteLength/4);new p(U,Y,$,function(G,W){self.postMessage(I({source:P.source,decrypted:W}),[W.buffer])})}}));var r3=$S(s3);const a3=s=>{let e=s.default?"main":"alternative";return s.characteristics&&s.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},_x=(s,e)=>{s.abort(),s.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},zy=(s,e)=>{e.activePlaylistLoader=s,s.load()},o3=(s,e)=>()=>{const{segmentLoaders:{[s]:i,main:r},mediaTypes:{[s]:o}}=e,l=o.activeTrack(),c=o.getActiveGroup(),f=o.activePlaylistLoader,p=o.lastGroup_;if(!(c&&p&&c.id===p.id)&&(o.lastGroup_=c,o.lastTrack_=l,_x(i,o),!(!c||c.isMainPlaylist))){if(!c.playlistLoader){f&&r.resetEverything();return}i.resyncLoader(),zy(c.playlistLoader,o)}},l3=(s,e)=>()=>{const{segmentLoaders:{[s]:i},mediaTypes:{[s]:r}}=e;r.lastGroup_=null,i.abort(),i.pause()},u3=(s,e)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[s]:r,main:o},mediaTypes:{[s]:l}}=e,c=l.activeTrack(),f=l.getActiveGroup(),p=l.activePlaylistLoader,v=l.lastTrack_;if(!(v&&c&&v.id===c.id)&&(l.lastGroup_=f,l.lastTrack_=c,_x(r,l),!!f)){if(f.isMainPlaylist){if(!c||!v||c.id===v.id)return;const S=e.vhs.playlistController_,x=S.selectPlaylist();if(S.media()===x)return;l.logger_(`track change. Switching main audio from ${v.id} to ${c.id}`),i.pause(),o.resetEverything(),S.fastQualityChange_(x);return}if(s==="AUDIO"){if(!f.playlistLoader){o.setAudio(!0),o.resetEverything();return}r.setAudio(!0),o.setAudio(!1)}if(p===f.playlistLoader){zy(f.playlistLoader,l);return}r.track&&r.track(c),r.resetEverything(),zy(f.playlistLoader,l)}},Up={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:i},excludePlaylist:r}=e,o=i.activeTrack(),l=i.activeGroup(),c=(l.filter(p=>p.default)[0]||l[0]).id,f=i.tracks[c];if(o===f){r({error:{message:"Problem encountered loading the default audio track."}});return}F.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const p in i.tracks)i.tracks[p].enabled=i.tracks[p]===f;i.onTrackChanged()},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:i}}=e;F.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const r=i.activeTrack();r&&(r.mode="disabled"),i.onTrackChanged()}},Sx={AUDIO:(s,e,i)=>{if(!e)return;const{tech:r,requestOptions:o,segmentLoaders:{[s]:l}}=i;e.on("loadedmetadata",()=>{const c=e.media();l.playlist(c,o),(!r.paused()||c.endList&&r.preload()!=="none")&&l.load()}),e.on("loadedplaylist",()=>{l.playlist(e.media(),o),r.paused()||l.load()}),e.on("error",Up[s](s,i))},SUBTITLES:(s,e,i)=>{const{tech:r,requestOptions:o,segmentLoaders:{[s]:l},mediaTypes:{[s]:c}}=i;e.on("loadedmetadata",()=>{const f=e.media();l.playlist(f,o),l.track(c.activeTrack()),(!r.paused()||f.endList&&r.preload()!=="none")&&l.load()}),e.on("loadedplaylist",()=>{l.playlist(e.media(),o),r.paused()||l.load()}),e.on("error",Up[s](s,i))}},c3={AUDIO:(s,e)=>{const{vhs:i,sourceType:r,segmentLoaders:{[s]:o},requestOptions:l,main:{mediaGroups:c},mediaTypes:{[s]:{groups:f,tracks:p,logger_:v}},mainPlaylistLoader:S}=e,x=kd(S.main);(!c[s]||Object.keys(c[s]).length===0)&&(c[s]={main:{default:{default:!0}}},x&&(c[s].main.default.playlists=S.main.playlists));for(const D in c[s]){f[D]||(f[D]=[]);for(const k in c[s][D]){let I=c[s][D][k],C;if(x?(v(`AUDIO group '${D}' label '${k}' is a main playlist`),I.isMainPlaylist=!0,C=null):r==="vhs-json"&&I.playlists?C=new _u(I.playlists[0],i,l):I.resolvedUri?C=new _u(I.resolvedUri,i,l):I.playlists&&r==="dash"?C=new Ay(I.playlists[0],i,l,S):C=null,I=Ct({id:k,playlistLoader:C},I),Sx[s](s,I.playlistLoader,e),f[D].push(I),typeof p[k]>"u"){const P=new F.AudioTrack({id:k,kind:a3(I),enabled:!1,language:I.language,default:I.default,label:k});p[k]=P}}}o.on("error",Up[s](s,e))},SUBTITLES:(s,e)=>{const{tech:i,vhs:r,sourceType:o,segmentLoaders:{[s]:l},requestOptions:c,main:{mediaGroups:f},mediaTypes:{[s]:{groups:p,tracks:v}},mainPlaylistLoader:S}=e;for(const x in f[s]){p[x]||(p[x]=[]);for(const D in f[s][x]){if(!r.options_.useForcedSubtitles&&f[s][x][D].forced)continue;let k=f[s][x][D],I;if(o==="hls")I=new _u(k.resolvedUri,r,c);else if(o==="dash"){if(!k.playlists.filter(P=>P.excludeUntil!==1/0).length)return;I=new Ay(k.playlists[0],r,c,S)}else o==="vhs-json"&&(I=new _u(k.playlists?k.playlists[0]:k.resolvedUri,r,c));if(k=Ct({id:D,playlistLoader:I},k),Sx[s](s,k.playlistLoader,e),p[x].push(k),typeof v[D]>"u"){const C=i.addRemoteTextTrack({id:D,kind:"subtitles",default:k.default&&k.autoselect,language:k.language,label:D},!1).track;v[D]=C}}}l.on("error",Up[s](s,e))},"CLOSED-CAPTIONS":(s,e)=>{const{tech:i,main:{mediaGroups:r},mediaTypes:{[s]:{groups:o,tracks:l}}}=e;for(const c in r[s]){o[c]||(o[c]=[]);for(const f in r[s][c]){const p=r[s][c][f];if(!/^(?:CC|SERVICE)/.test(p.instreamId))continue;const v=i.options_.vhs&&i.options_.vhs.captionServices||{};let S={label:f,language:p.language,instreamId:p.instreamId,default:p.default&&p.autoselect};if(v[S.instreamId]&&(S=Ct(S,v[S.instreamId])),S.default===void 0&&delete S.default,o[c].push(Ct({id:f},p)),typeof l[f]>"u"){const x=i.addRemoteTextTrack({id:S.instreamId,kind:"captions",default:S.default,language:S.language,label:S.label},!1).track;l[f]=x}}}}},xx=(s,e)=>{for(let i=0;i<s.length;i++)if(Sy(e,s[i])||s[i].playlists&&xx(s[i].playlists,e))return!0;return!1},d3=(s,e)=>i=>{const{mainPlaylistLoader:r,mediaTypes:{[s]:{groups:o}}}=e,l=r.media();if(!l)return null;let c=null;l.attributes[s]&&(c=o[l.attributes[s]]);const f=Object.keys(o);if(!c)if(s==="AUDIO"&&f.length>1&&kd(e.main))for(let p=0;p<f.length;p++){const v=o[f[p]];if(xx(v,l)){c=v;break}}else o.main?c=o.main:f.length===1&&(c=o[f[0]]);return typeof i>"u"?c:i===null||!c?null:c.filter(p=>p.id===i.id)[0]||null},h3={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:i}}}=e;for(const r in i)if(i[r].enabled)return i[r];return null},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:i}}}=e;for(const r in i)if(i[r].mode==="showing"||i[r].mode==="hidden")return i[r];return null}},f3=(s,{mediaTypes:e})=>()=>{const i=e[s].activeTrack();return i?e[s].activeGroup(i):null},p3=s=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(v=>{c3[v](v,s)});const{mediaTypes:e,mainPlaylistLoader:i,tech:r,vhs:o,segmentLoaders:{["AUDIO"]:l,main:c}}=s;["AUDIO","SUBTITLES"].forEach(v=>{e[v].activeGroup=d3(v,s),e[v].activeTrack=h3[v](v,s),e[v].onGroupChanged=o3(v,s),e[v].onGroupChanging=l3(v,s),e[v].onTrackChanged=u3(v,s),e[v].getActiveGroup=f3(v,s)});const f=e.AUDIO.activeGroup();if(f){const v=(f.filter(x=>x.default)[0]||f[0]).id;e.AUDIO.tracks[v].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(c.setAudio(!1),l.setAudio(!0)):c.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(v=>e[v].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(v=>e[v].onGroupChanging())});const p=()=>{e.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"})};r.audioTracks().addEventListener("change",p),r.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),o.on("dispose",()=>{r.audioTracks().removeEventListener("change",p),r.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(const v in e.AUDIO.tracks)r.audioTracks().addTrack(e.AUDIO.tracks[v])},m3=()=>{const s={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{s[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:$r,activeTrack:$r,getActiveGroup:$r,onGroupChanged:$r,onTrackChanged:$r,lastTrack_:null,logger_:ls(`MediaGroups[${e}]`)}}),s};class Ex{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=Dn(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(i=>[i.ID,i])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class g3 extends F.EventTarget{constructor(e,i){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Ex,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=ls("Content Steering"),this.xhr_=e,this.getBandwidth_=i}assignTagProperties(e,i){this.manifestType_=i.serverUri?"HLS":"DASH";const r=i.serverUri||i.serverURL;if(!r){this.logger_(`steering manifest URL is ${r}, cannot request steering manifest.`),this.trigger("error");return}if(r.startsWith("data:")){this.decodeDataUriManifest_(r.substring(r.indexOf(",")+1));return}this.steeringManifest.reloadUri=Dn(e,r),this.defaultPathway=i.pathwayId||i.defaultServiceLocation,this.queryBeforeStart=i.queryBeforeStart,this.proxyServerUrl_=i.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const i=this.steeringManifest.reloadUri;if(!i)return;const r=e?i:this.getRequestURI(i);if(!r){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const o={contentSteeringInfo:{uri:r}};this.trigger({type:"contentsteeringloadstart",metadata:o}),this.request_=this.xhr_({uri:r,requestType:"content-steering-manifest"},(l,c)=>{if(l){if(c.status===410){this.logger_(`manifest request 410 ${l}.`),this.logger_(`There will be no more content steering requests to ${r} this session.`),this.excludedSteeringManifestURLs.add(r);return}if(c.status===429){const v=c.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${l}.`),this.logger_(`content steering will retry in ${v} seconds.`),this.startTTLTimeout_(parseInt(v,10));return}this.logger_(`manifest failed to load ${l}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:o});let f;try{f=JSON.parse(this.request_.responseText)}catch(v){const S={errorType:F.Error.StreamingContentSteeringParserError,error:v};this.trigger({type:"error",metadata:S})}this.assignSteeringProperties_(f);const p={contentSteeringInfo:o.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:p}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const i=new z.URL(e),r=new z.URL(this.proxyServerUrl_);return r.searchParams.set("url",encodeURI(i.toString())),this.setSteeringParams_(r.toString())}decodeDataUriManifest_(e){const i=JSON.parse(z.atob(e));this.assignSteeringProperties_(i)}setSteeringParams_(e){const i=new z.URL(e),r=this.getPathway(),o=this.getBandwidth_();if(r){const l=`_${this.manifestType_}_pathway`;i.searchParams.set(l,r)}if(o){const l=`_${this.manifestType_}_throughput`;i.searchParams.set(l,o)}return i.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const r=(o=>{for(const l of o)if(this.availablePathways_.has(l))return l;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==r&&(this.currentPathway=r,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const i=o=>this.excludedSteeringManifestURLs.has(o);if(this.proxyServerUrl_){const o=this.setProxyServerUrl_(e);if(!i(o))return o}const r=this.setSteeringParams_(e);return i(r)?null:r}startTTLTimeout_(e=this.steeringManifest.ttl){const i=e*1e3;this.ttlTimeout_=z.setTimeout(()=>{this.requestSteeringManifest()},i)}clearTTLTimeout_(){z.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Ex}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,i){return!i&&this.steeringManifest.reloadUri||i&&(Dn(e,i.serverURL)!==this.steeringManifest.reloadUri||i.defaultServiceLocation!==this.defaultPathway||i.queryBeforeStart!==this.queryBeforeStart||i.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const y3=(s,e)=>{let i=null;return(...r)=>{clearTimeout(i),i=setTimeout(()=>{s.apply(null,r)},e)}},T3=10;let za;const v3=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],b3=function(s){return this.audioSegmentLoader_[s]+this.mainSegmentLoader_[s]},_3=function({currentPlaylist:s,buffered:e,currentTime:i,nextPlaylist:r,bufferLowWaterLine:o,bufferHighWaterLine:l,duration:c,bufferBasedABR:f,log:p}){if(!r)return F.log.warn("We received no playlist to switch to. Please check your stream."),!1;const v=`allowing switch ${s&&s.id||"null"} -> ${r.id}`;if(!s)return p(`${v} as current playlist is not set`),!0;if(r.id===s.id)return!1;const S=!!Tu(e,i).length;if(!s.endList)return!S&&typeof s.partTargetDuration=="number"?(p(`not ${v} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(p(`${v} as current playlist is live`),!0);const x=yy(e,i),D=f?ki.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:ki.MAX_BUFFER_LOW_WATER_LINE;if(c<D)return p(`${v} as duration < max low water line (${c} < ${D})`),!0;const k=r.attributes.BANDWIDTH,I=s.attributes.BANDWIDTH;if(k<I&&(!f||x<l)){let C=`${v} as next bandwidth < current bandwidth (${k} < ${I})`;return f&&(C+=` and forwardBuffer < bufferHighWaterLine (${x} < ${l})`),p(C),!0}if((!f||k>I)&&x>=o){let C=`${v} as forwardBuffer >= bufferLowWaterLine (${x} >= ${o})`;return f&&(C+=` and next bandwidth > current bandwidth (${k} > ${I})`),p(C),!0}return p(`not ${v} as no switching criteria met`),!1};class S3 extends F.EventTarget{constructor(e){super(),this.fastQualityChange_=y3(this.fastQualityChange_.bind(this),100);const{src:i,withCredentials:r,tech:o,bandwidth:l,externVhs:c,useCueTags:f,playlistExclusionDuration:p,enableLowInitialPlaylist:v,sourceType:S,cacheEncryptionKeys:x,bufferBasedABR:D,leastPixelDiffSelector:k,captionServices:I,experimentalUseMMS:C}=e;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:P}=e;(P===null||typeof P>"u")&&(P=1/0),za=c,this.bufferBasedABR=!!D,this.leastPixelDiffSelector=!!k,this.withCredentials=r,this.tech_=o,this.vhs_=o.vhs,this.player_=e.player_,this.sourceType_=S,this.useCueTags_=f,this.playlistExclusionDuration=p,this.maxPlaylistRetries=P,this.enableLowInitialPlaylist=v,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:r,maxPlaylistRetries:P,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=m3(),C&&z.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new z.ManagedMediaSource,this.usingManagedMediaSource_=!0,F.log("Using ManagedMediaSource")):z.MediaSource&&(this.mediaSource=new z.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=Ni(),this.hasPlayed_=!1,this.syncController_=new i3(e),this.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new r3,this.sourceUpdater_=new mx(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new n3,this.keyStatusMap_=new Map;const U={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:I,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:l,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:x,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new Ay(i,this.vhs_,Ct(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new _u(i,this.vhs_,Ct(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Ly(Ct(U,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Ly(Ct(U,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new KI(Ct(U,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((G,W)=>{function oe(){o.off("vttjserror",K),G()}function K(){o.off("vttjsloaded",oe),W()}o.one("vttjsloaded",oe),o.one("vttjserror",K),o.addWebVttScript_()})}),e);const Y=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new g3(this.vhs_.xhr,Y),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),v3.forEach(G=>{this[G+"_"]=b3.bind(this,G)}),this.logger_=ls("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const $=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one($,()=>{const G=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-G,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),i=this.audioAppendsToLoadedData_();return e===-1||i===-1?-1:e+i}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const i=this.selectPlaylist();i&&this.shouldSwitchToMedia_(i)&&this.switchMedia_(i,e)}switchMedia_(e,i,r){const o=this.media(),l=o&&(o.id||o.uri),c=e&&(e.id||e.uri);if(l&&l!==c){this.logger_(`switch media ${l} -> ${c} from ${i}`);const f={renditionInfo:{id:c,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:i};this.trigger({type:"renditionselected",metadata:f}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${i}`})}this.mainPlaylistLoader_.media(e,r)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const i=this.mediaTypes_[e],r=i?i.activeGroup():null,o=this.contentSteeringController_.getPathway();if(r&&o){const c=(r.length?r[0].playlists:r.playlists).filter(f=>f.attributes.serviceLocation===o);c.length&&this.mediaTypes_[e].activePlaylistLoader.media(c[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=z.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(z.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),i=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return i;const r=e.mediaGroups.AUDIO,o=Object.keys(r);let l;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)l=this.mediaTypes_.AUDIO.activeTrack();else{const f=r.main||o.length&&r[o[0]];for(const p in f)if(f[p].default){l={label:p};break}}if(!l)return i;const c=[];for(const f in r)if(r[f][l.label]){const p=r[f][l.label];if(p.playlists&&p.playlists.length)c.push.apply(c,p.playlists);else if(p.uri)c.push(p);else if(e.playlists.length)for(let v=0;v<e.playlists.length;v++){const S=e.playlists[v];S.attributes&&S.attributes.AUDIO&&S.attributes.AUDIO===f&&c.push(S)}}return c.length?c:i}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const i=this.mainPlaylistLoader_.media(),r=i.targetDuration*1.5*1e3;_y(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,i.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.mainSegmentLoader_.load()),p3({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),i),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let i=this.mainPlaylistLoader_.media();if(!i){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let r;if(this.enableLowInitialPlaylist&&(r=this.selectInitialPlaylist()),r||(r=this.selectPlaylist()),!r||!this.shouldSwitchToMedia_(r)||(this.initialMedia_=r,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;i=this.initialMedia_}this.handleUpdatedMediaPlaylist(i)}),this.mainPlaylistLoader_.on("error",()=>{const i=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:i.playlist,error:i})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const i=this.mainPlaylistLoader_.media(),r=i.targetDuration*1.5*1e3;_y(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const i=this.mainPlaylistLoader_.media();if(i.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(i)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(i=>{this.mainPlaylistLoader_.on(i,r=>{this.player_.trigger(ei({},r))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,i){const r=e.mediaGroups||{};let o=!0;const l=Object.keys(r.AUDIO);for(const c in r.AUDIO)for(const f in r.AUDIO[c])r.AUDIO[c][f].uri||(o=!1);o&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(r.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),za.Playlist.isAes(i)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),l.length&&Object.keys(r.AUDIO[l[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const i=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,r=this.tech_.currentTime(),o=this.bufferLowWaterLine(),l=this.bufferHighWaterLine(),c=this.tech_.buffered();return _3({buffered:c,currentTime:r,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:l,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const r=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:r.playlist,error:r})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const r=this.audioSegmentLoader_.pendingSegment_;if(!r||!r.segment||!r.segment.syncInfo)return;const o=r.segment.syncInfo.end+.01;this.tech_.setCurrentTime(o)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",r=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:T3}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const r=this.getCodecsOrExclude_();r&&this.sourceUpdater_.addOrChangeSourceBuffers(r)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(r=>{this.mainSegmentLoader_.on(r,o=>{this.player_.trigger(ei({},o))}),this.audioSegmentLoader_.on(r,o=>{this.player_.trigger(ei({},o))}),this.subtitleSegmentLoader_.on(r,o=>{this.player_.trigger(ei({},o))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const i=this.seekable();if(!i.length)return!1;const r=i.end(0);let o=r;if(e.start){const l=e.start.timeOffset;l<0?o=Math.max(r+l,i.start(0)):o=Math.min(r,l)}this.trigger("firstplay"),this.tech_.setCurrentTime(o)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,i=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const i=this.duration();e[e.length-1].endTime=isNaN(i)||Math.abs(i)===1/0?Number.MAX_VALUE:i}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const i=this.mainSegmentLoader_.getCurrentMediaInfo_();!i||i.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const r=this.syncController_.getExpiredTime(e,this.duration());if(r===null)return!1;const o=za.Playlist.playlistEnd(e,r),l=this.tech_.currentTime(),c=this.tech_.buffered();if(!c.length)return o-l<=nr;const f=c.end(c.length-1);return f-l<=nr&&o-f<=nr}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:i={},playlistExclusionDuration:r}){if(e=e||this.mainPlaylistLoader_.media(),r=r||i.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=i,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const o=this.mainPlaylistLoader_.main.playlists,l=o.filter(Lp),c=l.length===1&&l[0]===e;if(o.length===1&&r!==1/0)return F.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(c);if(c){if(this.main().contentSteering){const I=this.pathwayAttribute_(e),C=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(I),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(I)},C);return}let k=!1;o.forEach(I=>{if(I===e)return;const C=I.excludeUntil;typeof C<"u"&&C!==1/0&&(k=!0,delete I.excludeUntil)}),k&&(F.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let f;e.playlistErrors_>this.maxPlaylistRetries?f=1/0:f=Date.now()+r*1e3,e.excludeUntil=f,i.reason&&(e.lastExcludeReason_=i.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const p=this.selectPlaylist();if(!p){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const v=i.internal?this.logger_:F.log.warn,S=i.message?" "+i.message:"";v(`${i.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${S} Switching to playlist ${p.id}.`),p.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),p.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const x=p.targetDuration/2*1e3||5*1e3,D=typeof p.lastRequest=="number"&&Date.now()-p.lastRequest<=x;return this.switchMedia_(p,"exclude",c||D)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,i){const r=[],o=e==="all";(o||e==="main")&&r.push(this.mainPlaylistLoader_);const l=[];(o||e==="audio")&&l.push("AUDIO"),(o||e==="subtitle")&&(l.push("CLOSED-CAPTIONS"),l.push("SUBTITLES")),l.forEach(c=>{const f=this.mediaTypes_[c]&&this.mediaTypes_[c].activePlaylistLoader;f&&r.push(f)}),["main","audio","subtitle"].forEach(c=>{const f=this[`${c}SegmentLoader_`];f&&(e===c||e==="all")&&r.push(f)}),r.forEach(c=>i.forEach(f=>{typeof c[f]=="function"&&c[f]()}))}setCurrentTime(e){const i=Tu(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(i&&i.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:za.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,i){const r=e.media();if(!r)return null;const o=this.syncController_.getMediaSequenceSync(i);if(o&&o.isReliable){const f=o.start,p=o.end;if(!isFinite(f)||!isFinite(p))return null;const v=za.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,r),S=Math.max(f,p-v);return Ni([[f,S]])}const l=this.syncController_.getExpiredTime(r,this.duration());if(l===null)return null;const c=za.Playlist.seekable(r,l,za.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,r));return c.length?c:null}computeFinalSeekable_(e,i){if(!i)return e;const r=e.start(0),o=e.end(0),l=i.start(0),c=i.end(0);return l>o||r>c?e:Ni([[Math.max(r,l),Math.min(o,c)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let i;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(i=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!i))return;const r=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,i),!this.seekable_||r&&r.length&&this.seekable_.length&&r.start(0)===this.seekable_.start(0)&&r.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${fS(this.seekable_)}]`);const o={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:o}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const o=this.seekable();if(!o.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<o.end(o.length-1))&&this.sourceUpdater_.setDuration(o.end(o.length-1));return}const i=this.tech_.buffered();let r=za.Playlist.duration(this.mainPlaylistLoader_.media());i.length>0&&(r=Math.max(r,i.end(i.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const i=this.mediaTypes_[e].groups;for(const r in i)i[r].forEach(o=>{o.playlistLoader&&o.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,i=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),r=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!i||!r)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},i=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const r=Id(this.main(),i),o={},l=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(o.video=r.video||e.main.videoCodec||Qw),e.main.isMuxed&&(o.video+=`,${r.audio||e.main.audioCodec||r1}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||l)&&(o.audio=r.audio||e.main.audioCodec||e.audio.audioCodec||r1,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!o.audio&&!o.video){this.excludePlaylist({playlistToExclude:i,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const c=(v,S)=>v?nd(S,this.usingManagedMediaSource_):Qg(S),f={};let p;if(["video","audio"].forEach(function(v){if(o.hasOwnProperty(v)&&!c(e[v].isFmp4,o[v])){const S=e[v].isFmp4?"browser":"muxer";f[S]=f[S]||[],f[S].push(o[v]),v==="audio"&&(p=S)}}),l&&p&&i.attributes.AUDIO){const v=i.attributes.AUDIO;this.main().playlists.forEach(S=>{(S.attributes&&S.attributes.AUDIO)===v&&S!==i&&(S.excludeUntil=1/0)}),this.logger_(`excluding audio group ${v} as ${p} does not support codec(s): "${o.audio}"`)}if(Object.keys(f).length){const v=Object.keys(f).reduce((S,x)=>(S&&(S+=", "),S+=`${x} does not support codec(s): "${f[x].join(",")}"`,S),"")+".";this.excludePlaylist({playlistToExclude:i,error:{internal:!0,message:v},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const v=[];if(["video","audio"].forEach(S=>{const x=(Gs(this.sourceUpdater_.codecs[S]||"")[0]||{}).type,D=(Gs(o[S]||"")[0]||{}).type;x&&D&&x.toLowerCase()!==D.toLowerCase()&&v.push(`"${this.sourceUpdater_.codecs[S]}" -> "${o[S]}"`)}),v.length){this.excludePlaylist({playlistToExclude:i,error:{message:`Codec switching not supported: ${v.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return o}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const i=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(i)}excludeUnsupportedVariants_(){const e=this.main().playlists,i=[];Object.keys(e).forEach(r=>{const o=e[r];if(i.indexOf(o.id)!==-1)return;i.push(o.id);const l=Id(this.main,o),c=[];l.audio&&!Qg(l.audio)&&!nd(l.audio,this.usingManagedMediaSource_)&&c.push(`audio codec ${l.audio}`),l.video&&!Qg(l.video)&&!nd(l.video,this.usingManagedMediaSource_)&&c.push(`video codec ${l.video}`),l.text&&l.text==="stpp.ttml.im1t"&&c.push(`text codec ${l.text}`),c.length&&(o.excludeUntil=1/0,this.logger_(`excluding ${o.id} for unsupported: ${c.join(", ")}`))})}excludeIncompatibleVariants_(e){const i=[],r=this.main().playlists,o=Od(Gs(e)),l=kS(o),c=o.video&&Gs(o.video)[0]||null,f=o.audio&&Gs(o.audio)[0]||null;Object.keys(r).forEach(p=>{const v=r[p];if(i.indexOf(v.id)!==-1||v.excludeUntil===1/0)return;i.push(v.id);const S=[],x=Id(this.mainPlaylistLoader_.main,v),D=kS(x);if(!(!x.audio&&!x.video)){if(D!==l&&S.push(`codec count "${D}" !== "${l}"`),!this.sourceUpdater_.canChangeType()){const k=x.video&&Gs(x.video)[0]||null,I=x.audio&&Gs(x.audio)[0]||null;k&&c&&k.type.toLowerCase()!==c.type.toLowerCase()&&S.push(`video codec "${k.type}" !== "${c.type}"`),I&&f&&I.type.toLowerCase()!==f.type.toLowerCase()&&S.push(`audio codec "${I.type}" !== "${f.type}"`)}S.length&&(v.excludeUntil=1/0,this.logger_(`excluding ${v.id}: ${S.join(" && ")}`))}})}updateAdCues_(e){let i=0;const r=this.seekable();r.length&&(i=r.start(0)),JI(e,this.cueTagsTrack_,i)}goalBufferLength(){const e=this.tech_.currentTime(),i=ki.GOAL_BUFFER_LENGTH,r=ki.GOAL_BUFFER_LENGTH_RATE,o=Math.max(i,ki.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*r,o)}bufferLowWaterLine(){const e=this.tech_.currentTime(),i=ki.BUFFER_LOW_WATER_LINE,r=ki.BUFFER_LOW_WATER_LINE_RATE,o=Math.max(i,ki.MAX_BUFFER_LOW_WATER_LINE),l=Math.max(i,ki.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*r,this.bufferBasedABR?l:o)}bufferHighWaterLine(){return ki.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){lx(this.inbandTextTracks_,"com.apple.streaming",this.tech_),OI({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,i,r){const o=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();lx(this.inbandTextTracks_,e,this.tech_),wI({inbandTextTracks:this.inbandTextTracks_,metadataArray:i,timestampOffset:o,videoDuration:r})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const i of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(i));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(i=>{this.contentSteeringController_.on(i,r=>{this.trigger(ei({},r))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const i=this.main();(this.contentSteeringController_.didDASHTagChange(i.uri,i.contentSteering)||(()=>{const l=this.contentSteeringController_.getAvailablePathways(),c=[];for(const f of i.playlists){const p=f.attributes.serviceLocation;if(p&&(c.push(p),!l.has(p)))return!0}return!!(!c.length&&l.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const r=this.main().playlists,o=new Set;let l=!1;Object.keys(r).forEach(c=>{const f=r[c],p=this.pathwayAttribute_(f),v=p&&e!==p;f.excludeUntil===1/0&&f.lastExcludeReason_==="content-steering"&&!v&&(delete f.excludeUntil,delete f.lastExcludeReason_,l=!0);const x=!f.excludeUntil&&f.excludeUntil!==1/0;!o.has(f.id)&&v&&x&&(o.add(f.id),f.excludeUntil=1/0,f.lastExcludeReason_="content-steering",this.logger_(`excluding ${f.id} for ${f.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(c=>{const f=this.mediaTypes_[c];if(f.activePlaylistLoader){const p=f.activePlaylistLoader.media_;p&&p.attributes.serviceLocation!==e&&(l=!0)}}),l&&this.changeSegmentPathway_()}handlePathwayClones_(){const i=this.main().playlists,r=this.contentSteeringController_.currentPathwayClones,o=this.contentSteeringController_.nextPathwayClones;if(r&&r.size||o&&o.size){for(const[c,f]of r.entries())o.get(c)||(this.mainPlaylistLoader_.updateOrDeleteClone(f),this.contentSteeringController_.excludePathway(c));for(const[c,f]of o.entries()){const p=r.get(c);if(!p){i.filter(S=>S.attributes["PATHWAY-ID"]===f["BASE-ID"]).forEach(S=>{this.mainPlaylistLoader_.addClonePathway(f,S)}),this.contentSteeringController_.addAvailablePathway(c);continue}this.equalPathwayClones_(p,f)||(this.mainPlaylistLoader_.updateOrDeleteClone(f,!0),this.contentSteeringController_.addAvailablePathway(c))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...o])))}}equalPathwayClones_(e,i){if(e["BASE-ID"]!==i["BASE-ID"]||e.ID!==i.ID||e["URI-REPLACEMENT"].HOST!==i["URI-REPLACEMENT"].HOST)return!1;const r=e["URI-REPLACEMENT"].PARAMS,o=i["URI-REPLACEMENT"].PARAMS;for(const l in r)if(r[l]!==o[l])return!1;for(const l in o)if(r[l]!==o[l])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const i="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(r=>{const o=this.mainPlaylistLoader_.getKeyIdSet(r);!o||!o.size||o.forEach(l=>{const c="usable",f=this.keyStatusMap_.has(l)&&this.keyStatusMap_.get(l)===c,p=r.lastExcludeReason_===i&&r.excludeUntil===1/0;f?f&&p&&(delete r.excludeUntil,delete r.lastExcludeReason_,this.logger_(`enabling playlist ${r.id} because key ID ${l} is ${c}`)):(r.excludeUntil!==1/0&&r.lastExcludeReason_!==i&&(r.excludeUntil=1/0,r.lastExcludeReason_=i,this.logger_(`excluding playlist ${r.id} because the key ID ${l} doesn't exist in the keyStatusMap or is not ${c}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(r=>{const o=r&&r.attributes&&r.attributes.RESOLUTION&&r.attributes.RESOLUTION.height<720,l=r.excludeUntil===1/0&&r.lastExcludeReason_===i;o&&l&&(delete r.excludeUntil,F.log.warn(`enabling non-HD playlist ${r.id} because all playlists were excluded due to ${i} key IDs`))})}addKeyStatus_(e,i){const l=(typeof e=="string"?e:XI(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${i}' with key ID ${l} added to the keyStatusMap`),this.keyStatusMap_.set(l,i)}updatePlaylistByKeyStatus(e,i){this.addKeyStatus_(e,i),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const x3=(s,e,i)=>r=>{const o=s.main.playlists[e],l=by(o),c=Lp(o);if(typeof r>"u")return c;r?delete o.disabled:o.disabled=!0;const f={renditionInfo:{id:e,bandwidth:o.attributes.BANDWIDTH,resolution:o.attributes.RESOLUTION,codecs:o.attributes.CODECS},cause:"fast-quality"};return r!==c&&!l&&(r?(i(o),s.trigger({type:"renditionenabled",metadata:f})):s.trigger({type:"renditiondisabled",metadata:f})),r};class E3{constructor(e,i,r){const{playlistController_:o}=e,l=o.fastQualityChange_.bind(o);if(i.attributes){const c=i.attributes.RESOLUTION;this.width=c&&c.width,this.height=c&&c.height,this.bandwidth=i.attributes.BANDWIDTH,this.frameRate=i.attributes["FRAME-RATE"]}this.codecs=Id(o.main(),i),this.playlist=i,this.id=r,this.enabled=x3(e.playlists,i.id,l)}}const M3=function(s){s.representations=()=>{const e=s.playlistController_.main(),i=kd(e)?s.playlistController_.getAudioTrackPlaylists_():e.playlists;return i?i.filter(r=>!by(r)).map((r,o)=>new E3(s,r,r.id)):[]}},Mx=["seeking","seeked","pause","playing","error"];class D3 extends F.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=ls("PlaybackWatcher"),this.logger_("initialize");const i=()=>this.monitorCurrentTime_(),r=()=>this.monitorCurrentTime_(),o=()=>this.techWaiting_(),l=()=>this.resetTimeUpdate_(),c=this.playlistController_,f=["main","subtitle","audio"],p={};f.forEach(S=>{p[S]={reset:()=>this.resetSegmentDownloads_(S),updateend:()=>this.checkSegmentDownloads_(S)},c[`${S}SegmentLoader_`].on("appendsdone",p[S].updateend),c[`${S}SegmentLoader_`].on("playlistupdate",p[S].reset),this.tech_.on(["seeked","seeking"],p[S].reset)});const v=S=>{["main","audio"].forEach(x=>{c[`${x}SegmentLoader_`][S]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),v("off"))},this.clearSeekingAppendCheck_=()=>v("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),v("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",o),this.tech_.on(Mx,l),this.tech_.on("canplay",r),this.tech_.one("play",i),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",o),this.tech_.off(Mx,l),this.tech_.off("canplay",r),this.tech_.off("play",i),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),f.forEach(S=>{c[`${S}SegmentLoader_`].off("appendsdone",p[S].updateend),c[`${S}SegmentLoader_`].off("playlistupdate",p[S].reset),this.tech_.off(["seeked","seeking"],p[S].reset)}),this.checkCurrentTimeTimeout_&&z.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&z.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=z.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const i=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=i.buffered_()}checkSegmentDownloads_(e){const i=this.playlistController_,r=i[`${e}SegmentLoader_`],o=r.buffered_(),l=pO(this[`${e}Buffered_`],o);if(this[`${e}Buffered_`]=o,l){const c={bufferedRanges:o};i.trigger({type:"bufferedrangeschanged",metadata:c}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:r.playlist_&&r.playlist_.id,buffered:zo(o)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&i.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),i=this.tech_.buffered();if(this.lastRecordedTime===e&&(!i.length||e+nr>=i.end(i.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Ni([this.lastRecordedTime,e]));const r={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:r}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const i=this.seekable(),r=this.tech_.currentTime(),o=this.afterSeekableWindow_(i,r,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let l;if(o&&(l=i.end(i.length-1)),this.beforeSeekableWindow_(i,r)){const I=i.start(0);l=I+(I===i.end(0)?0:nr)}if(typeof l<"u")return this.logger_(`Trying to seek outside of seekable at time ${r} with seekable range ${fS(i)}. Seeking to ${l}.`),this.tech_.setCurrentTime(l),!0;const c=this.playlistController_.sourceUpdater_,f=this.tech_.buffered(),p=c.audioBuffer?c.audioBuffered():null,v=c.videoBuffer?c.videoBuffered():null,S=this.media(),x=S.partTargetDuration?S.partTargetDuration:(S.targetDuration-ir)*2,D=[p,v];for(let I=0;I<D.length;I++){if(!D[I])continue;if(yy(D[I],r)<x)return!1}const k=Ip(f,r);return k.length===0?!1:(l=k.start(0)+nr,this.logger_(`Buffered region starts (${k.start(0)}) just beyond seek point (${r}). Seeking to ${l}.`),this.tech_.setCurrentTime(l),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),i=this.tech_.buffered(),r=Tu(i,e);if(r.length&&e+3<=r.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${r.start(0)} -> ${r.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),i=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,i)){const f=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${i}. Seeking to live point (seekable end) ${f}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(f),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const r=this.tech_.vhs.playlistController_.sourceUpdater_,o=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:i}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const c=Ip(o,i);return c.length>0?(this.logger_(`Stopped at ${i} and seeking to ${c.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(i),!0):!1}afterSeekableWindow_(e,i,r,o=!1){if(!e.length)return!1;let l=e.end(e.length-1)+nr;const c=!r.endList,f=typeof r.partTargetDuration=="number";return c&&(f||o)&&(l=e.end(e.length-1)+r.targetDuration*3),i>l}beforeSeekableWindow_(e,i){return!!(e.length&&e.start(0)>0&&i<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:i,currentTime:r}){if(!e)return;let o;if(e.length&&i.length){const l=Tu(e,r-3),c=Tu(e,r),f=Tu(i,r);f.length&&!c.length&&l.length&&(o={start:l.end(0),end:f.end(0)})}else Ip(e,r).length||(o=this.gapFromVideoUnderflow_(e,r));return o?(this.logger_(`Encountered a gap in video from ${o.start} to ${o.end}. Seeking to current time ${r}`),!0):!1}skipTheGap_(e){const i=this.tech_.buffered(),r=this.tech_.currentTime(),o=Ip(i,r);if(this.resetTimeUpdate_(),o.length===0||r!==e)return;this.logger_("skipTheGap_:","currentTime:",r,"scheduled currentTime:",e,"nextRange start:",o.start(0)),this.tech_.setCurrentTime(o.start(0)+ir);const l={gapInfo:{from:r,to:o.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:l}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,i){const r=dO(e);for(let o=0;o<r.length;o++){const l=r.start(o),c=r.end(o);if(i-l<4&&i-l>2)return{start:l,end:c}}return null}}const C3={errorInterval:30,getSource(s){const i=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return s(i)}},Dx=function(s,e){let i=0,r=0;const o=Ct(C3,e);s.ready(()=>{s.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const l=function(){r&&s.currentTime(r)},c=function(S){S!=null&&(r=s.duration()!==1/0&&s.currentTime()||0,s.one("loadedmetadata",l),s.src(S),s.trigger({type:"usage",name:"vhs-error-reload"}),s.play())},f=function(){if(Date.now()-i<o.errorInterval*1e3){s.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!o.getSource||typeof o.getSource!="function"){F.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return i=Date.now(),o.getSource.call(s,c)},p=function(){s.off("loadedmetadata",l),s.off("error",f),s.off("dispose",p)},v=function(S){p(),Dx(s,S)};s.on("error",f),s.on("dispose",p),s.reloadSourceOnError=v},A3=function(s){Dx(this,s)};var Cx="3.17.0",w3="7.1.0",N3="1.3.1",k3="7.2.0",O3="4.0.2";const Kt={PlaylistLoader:_u,Playlist:Cn,utils:UO,STANDARD_PLAYLIST_SELECTOR:ax,INITIAL_PLAYLIST_SELECTOR:EI,lastBandwidthSelector:ax,movingAverageBandwidthSelector:SI,comparePlaylistBandwidth:Oy,comparePlaylistResolution:_I,xhr:jS()};Object.keys(ki).forEach(s=>{Object.defineProperty(Kt,s,{get(){return F.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),ki[s]},set(e){if(F.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){F.log.warn(`value of Vhs.${s} must be greater than or equal to 0`);return}ki[s]=e}})});const Ax="videojs-vhs",wx=function(s,e){const i=e.media();let r=-1;for(let o=0;o<s.length;o++)if(s[o].id===i.id){r=o;break}s.selectedIndex_=r,s.trigger({selectedIndex:r,type:"change"})},I3=function(s,e){e.representations().forEach(i=>{s.addQualityLevel(i)}),wx(s,e.playlists)};Kt.canPlaySource=function(){return F.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const L3=(s,e,i)=>{if(!s)return s;let r={};e&&e.attributes&&e.attributes.CODECS&&(r=Od(Gs(e.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(r.audio=i.attributes.CODECS);const o=Fl(r.video),l=Fl(r.audio),c={};for(const f in s)c[f]={},l&&(c[f].audioContentType=l),o&&(c[f].videoContentType=o),e.contentProtection&&e.contentProtection[f]&&e.contentProtection[f].pssh&&(c[f].pssh=e.contentProtection[f].pssh),typeof s[f]=="string"&&(c[f].url=s[f]);return Ct(s,c)},R3=(s,e)=>s.reduce((i,r)=>{if(!r.contentProtection)return i;const o=e.reduce((l,c)=>{const f=r.contentProtection[c];return f&&f.pssh&&(l[c]={pssh:f.pssh}),l},{});return Object.keys(o).length&&i.push(o),i},[]),j3=({player:s,sourceKeySystems:e,audioMedia:i,mainPlaylists:r})=>{if(!s.eme.initializeMediaKeys)return Promise.resolve();const o=i?r.concat([i]):r,l=R3(o,Object.keys(e)),c=[],f=[];return l.forEach(p=>{f.push(new Promise((v,S)=>{s.tech_.one("keysessioncreated",v)})),c.push(new Promise((v,S)=>{s.eme.initializeMediaKeys({keySystems:p},x=>{if(x){S(x);return}v()})}))}),Promise.race([Promise.all(c),Promise.race(f)])},z3=({player:s,sourceKeySystems:e,media:i,audioMedia:r})=>{const o=L3(e,i,r);return o?(s.currentSource().keySystems=o,o&&!s.eme?(F.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Nx=()=>{if(!z.localStorage)return null;const s=z.localStorage.getItem(Ax);if(!s)return null;try{return JSON.parse(s)}catch{return null}},U3=s=>{if(!z.localStorage)return!1;let e=Nx();e=e?Ct(e,s):s;try{z.localStorage.setItem(Ax,JSON.stringify(e))}catch{return!1}return e},P3=s=>s.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(s.substring(s.indexOf(",")+1)):s,kx=(s,e)=>{s._requestCallbackSet||(s._requestCallbackSet=new Set),s._requestCallbackSet.add(e)},Ox=(s,e)=>{s._responseCallbackSet||(s._responseCallbackSet=new Set),s._responseCallbackSet.add(e)},Ix=(s,e)=>{s._requestCallbackSet&&(s._requestCallbackSet.delete(e),s._requestCallbackSet.size||delete s._requestCallbackSet)},Lx=(s,e)=>{s._responseCallbackSet&&(s._responseCallbackSet.delete(e),s._responseCallbackSet.size||delete s._responseCallbackSet)};Kt.supportsNativeHls=function(){if(!ve||!ve.createElement)return!1;const s=ve.createElement("video");return F.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(i){return/maybe|probably/i.test(s.canPlayType(i))}):!1}(),Kt.supportsNativeDash=function(){return!ve||!ve.createElement||!F.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(ve.createElement("video").canPlayType("application/dash+xml"))}(),Kt.supportsTypeNatively=s=>s==="hls"?Kt.supportsNativeHls:s==="dash"?Kt.supportsNativeDash:!1,Kt.isSupported=function(){return F.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Kt.xhr.onRequest=function(s){kx(Kt.xhr,s)},Kt.xhr.onResponse=function(s){Ox(Kt.xhr,s)},Kt.xhr.offRequest=function(s){Ix(Kt.xhr,s)},Kt.xhr.offResponse=function(s){Lx(Kt.xhr,s)};const B3=F.getComponent("Component");class Rx extends B3{constructor(e,i,r){if(super(i,r.vhs),typeof r.initialBandwidth=="number"&&(this.options_.bandwidth=r.initialBandwidth),this.logger_=ls("VhsHandler"),i.options_&&i.options_.playerId){const o=F.getPlayer(i.options_.playerId);this.player_=o}if(this.tech_=i,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(ve,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],o=>{const l=ve.fullscreenElement||ve.webkitFullscreenElement||ve.mozFullScreenElement||ve.msFullscreenElement;l&&l.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=Ct(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const r=Nx();r&&r.bandwidth&&(this.options_.bandwidth=r.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),r&&r.throughput&&(this.options_.throughput=r.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=ki.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===ki.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(r=>{typeof this.source_[r]<"u"&&(this.options_[r]=this.source_[r])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const i=this.options_.customPixelRatio;typeof i=="number"&&i>=0&&(this.customPixelRatio=i)}setOptions(e={}){this.setOptions_(e)}src(e,i){if(!e)return;this.setOptions_(),this.options_.src=P3(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Kt,this.options_.sourceType=a1(i),this.options_.seekTo=l=>{this.tech_.setCurrentTime(l)},this.options_.player_=this.player_,this.playlistController_=new S3(this.options_);const r=Ct({liveRangeSafeTimeDelta:nr},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new D3(r),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const l=F.players[this.tech_.options_.playerId];let c=this.playlistController_.error;typeof c=="object"&&!c.code?c.code=3:typeof c=="string"&&(c={message:c,code:3}),l.error(c)});const o=this.options_.bufferBasedABR?Kt.movingAverageBandwidthSelector(.55):Kt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.playlistController_.selectInitialPlaylist=Kt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(l){this.playlistController_.selectPlaylist=l.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(l){this.playlistController_.mainSegmentLoader_.throughput.rate=l,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let l=this.playlistController_.mainSegmentLoader_.bandwidth;const c=z.navigator.connection||z.navigator.mozConnection||z.navigator.webkitConnection,f=1e7;if(this.options_.useNetworkInformationApi&&c){const p=c.downlink*1e3*1e3;p>=f&&l>=f?l=Math.max(l,p):l=p}return l},set(l){this.playlistController_.mainSegmentLoader_.bandwidth=l,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const l=1/(this.bandwidth||1);let c;return this.throughput>0?c=1/this.throughput:c=0,Math.floor(1/(l+c))},set(){F.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>zo(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>zo(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&U3({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{M3(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=z.URL.createObjectURL(this.playlistController_.mediaSource),(F.browser.IS_ANY_SAFARI||F.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),j3({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(i=>{this.logger_("error while creating EME key session",i),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=z3({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",r=>{this.playlistController_.updatePlaylistByKeyStatus(r.keyId,r.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!i){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=F.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{I3(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{wx(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Cx,"mux.js":w3,"mpd-parser":N3,"m3u8-parser":k3,"aes-decrypter":O3}}version(){return this.constructor.version()}canChangeType(){return mx.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&z.URL.revokeObjectURL&&(z.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,i){return $O({playlist:this.playlistController_.media(),time:e,callback:i})}seekToProgramTime(e,i,r=!0,o=2){return qS({programTime:e,playlist:this.playlistController_.media(),retryCount:o,pauseAfterSeek:r,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})}setupXhrHooks_(){this.xhr.onRequest=e=>{kx(this.xhr,e)},this.xhr.onResponse=e=>{Ox(this.xhr,e)},this.xhr.offRequest=e=>{Ix(this.xhr,e)},this.xhr.offResponse=e=>{Lx(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],i=["gapjumped","playedrangeschanged"];e.forEach(r=>{this.playlistController_.on(r,o=>{this.player_.trigger(ei({},o))})}),i.forEach(r=>{this.playbackWatcher_.on(r,o=>{this.player_.trigger(ei({},o))})})}}const Pp={name:"videojs-http-streaming",VERSION:Cx,canHandleSource(s,e={}){const i=Ct(F.options,e);return!i.vhs.experimentalUseMMS&&!nd("avc1.4d400d,mp4a.40.2",!1)?!1:Pp.canPlayType(s.type,i)},handleSource(s,e,i={}){const r=Ct(F.options,i);return e.vhs=new Rx(s,e,r),e.vhs.xhr=jS(),e.vhs.setupXhrHooks_(),e.vhs.src(s.src,s.type),e.vhs},canPlayType(s,e){const i=a1(s);if(!i)return"";const r=Pp.getOverrideNative(e);return!Kt.supportsTypeNatively(i)||r?"maybe":""},getOverrideNative(s={}){const{vhs:e={}}=s,i=!(F.browser.IS_ANY_SAFARI||F.browser.IS_IOS),{overrideNative:r=i}=e;return r}};(()=>nd("avc1.4d400d,mp4a.40.2",!0))()&&F.getTech("Html5").registerSourceHandler(Pp,0),F.VhsHandler=Rx,F.VhsSourceHandler=Pp,F.Vhs=Kt,F.use||F.registerComponent("Vhs",Kt),F.options.vhs=F.options.vhs||{},(!F.getPlugin||!F.getPlugin("reloadSourceOnError"))&&F.registerPlugin("reloadSourceOnError",A3);const r8="",a8="",o8="",l8="",q3=F.getComponent("Component");class jx extends q3{constructor(e,i){i&&i.relatedVideos&&(i._relatedVideos=i.relatedVideos),super(e,i),this.relatedVideos=i&&i.relatedVideos?i.relatedVideos:[]}createEl(){const e=this.options_&&this.options_._relatedVideos?this.options_._relatedVideos:[],i=this.getMaxVideosForScreen(),r=e.slice(0,i),o=super.createEl("div",{className:"vjs-end-screen-overlay"}),l=F.dom.createEl("div",{className:"vjs-related-videos-grid"});return r&&Array.isArray(r)&&r.length>0?r.forEach(c=>{const f=this.createVideoItem(c);l.appendChild(f)}):this.createSampleVideos().slice(0,this.getMaxVideosForScreen()).forEach(f=>{const p=this.createVideoItem(f);l.appendChild(p)}),o.appendChild(l),o}createVideoItem(e){const i=F.dom.createEl("div",{className:"vjs-related-video-item"}),r=e.thumbnail||this.getPlaceholderImage(e.title),o=F.dom.createEl("img",{className:"vjs-related-video-thumbnail",src:r,alt:e.title,loading:"lazy",onerror:()=>{o.src=this.getPlaceholderImage(e.title)}}),l=F.dom.createEl("div",{className:"vjs-related-video-overlay"}),c=F.dom.createEl("div",{className:"vjs-related-video-title"});c.textContent=e.title;const f=F.dom.createEl("div",{className:"vjs-related-video-meta"}),p=F.dom.createEl("div",{className:"vjs-related-video-author"});p.textContent=e.author;const v=F.dom.createEl("div",{className:"vjs-related-video-views"});v.textContent=e.views,f.appendChild(p),f.appendChild(v);const S=F.dom.createEl("div",{className:"vjs-related-video-duration"}),x=D=>{if(!D||D===0)return"";const k=Math.floor(D/60),I=Math.floor(D%60);return`${k}:${I.toString().padStart(2,"0")}`};return S.textContent=x(e.duration),l.appendChild(c),l.appendChild(f),i.appendChild(o),i.appendChild(l),e.duration&&e.duration>0&&i.appendChild(S),i.addEventListener("click",()=>{(this.player().id()||this.player().options_.id)==="video-embed"||window.location.pathname.includes("/embed")||window.location.search.includes("embed")||window.parent!==window?window.open(`/view?m=${e.id}`,"_blank","noopener,noreferrer"):window.location.href=`/view?m=${e.id}`}),i}getPlaceholderImage(e){const i=["#009931","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7","#DDA0DD","#98D8C8","#F7DC6F","#BB8FCE","#85C1E9"];let r=0;for(let v=0;v<e.length;v++)r=e.charCodeAt(v)+((r<<5)-r);const o=Math.abs(r)%i.length,l=i[o],c=e.charAt(0).toUpperCase(),f=document.createElement("canvas");f.width=320,f.height=180;const p=f.getContext("2d");p.fillStyle=l,p.fillRect(0,0,320,180),p.fillStyle="rgba(255, 255, 255, 0.1)";for(let v=0;v<20;v++)p.fillRect(Math.random()*320,Math.random()*180,2,2);return p.fillStyle="white",p.font="bold 48px Arial",p.textAlign="center",p.textBaseline="middle",p.fillText(c,160,90),f.toDataURL()}getMaxVideosForScreen(){const e=window.innerWidth;return e>=1200?12:e>=1024?9:e>=768?6:4}createSampleVideos(){return[{id:"sample1",title:"React Full Course for Beginners",author:"Bro Code",views:"2.1M views",duration:1800,thumbnail:"https://img.youtube.com/vi/dGcsHMXbSOA/maxresdefault.jpg"},{id:"sample2",title:"JavaScript ES6+ Features",author:"Tech Tutorials",views:"850K views",duration:1200,thumbnail:"https://img.youtube.com/vi/WZQc7RUAg18/maxresdefault.jpg"},{id:"sample3",title:"CSS Grid Layout Masterclass",author:"Web Dev Academy",views:"1.2M views",duration:2400,thumbnail:"https://img.youtube.com/vi/0xMQfnTU6oo/maxresdefault.jpg"},{id:"sample4",title:"Node.js Backend Development",author:"Code Master",views:"650K views",duration:3600,thumbnail:"https://img.youtube.com/vi/fBNz6F-Cowg/maxresdefault.jpg"},{id:"sample5",title:"Vue.js Complete Guide",author:"Frontend Pro",views:"980K views",duration:2800,thumbnail:"https://img.youtube.com/vi/qZXt1Aom3Cs/maxresdefault.jpg"},{id:"sample6",title:"Python Data Science",author:"Data Academy",views:"1.5M views",duration:4200,thumbnail:"https://img.youtube.com/vi/ua-CiDNNj30/maxresdefault.jpg"},{id:"sample7",title:"TypeScript Fundamentals",author:"TypeScript Expert",views:"720K views",duration:2100,thumbnail:"https://img.youtube.com/vi/BwuLxPH8IDs/maxresdefault.jpg"},{id:"sample8",title:"MongoDB Database Tutorial",author:"Database Pro",views:"890K views",duration:1800,thumbnail:"https://img.youtube.com/vi/-56x56UppqQ/maxresdefault.jpg"},{id:"sample9",title:"Docker Containerization",author:"DevOps Master",views:"1.1M views",duration:3200,thumbnail:"https://img.youtube.com/vi/pTFZFxd4hOI/maxresdefault.jpg"},{id:"sample10",title:"AWS Cloud Services",author:"Cloud Expert",views:"1.3M views",duration:4500,thumbnail:"https://img.youtube.com/vi/ITcXLS3h2qU/maxresdefault.jpg"},{id:"sample11",title:"GraphQL API Design",author:"API Specialist",views:"680K views",duration:2600,thumbnail:"https://img.youtube.com/vi/ed8SzALpx1Q/maxresdefault.jpg"},{id:"sample12",title:"Machine Learning Basics",author:"AI Academy",views:"2.3M views",duration:5400,thumbnail:"https://img.youtube.com/vi/i_LwzRVP7bg/maxresdefault.jpg"}]}show(){this.el().style.display="flex"}hide(){this.el().style.display="none"}}F.registerComponent("EndScreenOverlay",jx);const u8="",F3=F.getComponent("Component");class zx extends F3{constructor(e,i){super(e,i),this.nextVideoData=i.nextVideoData||null,this.countdownSeconds=i.countdownSeconds||5,this.onPlayNext=i.onPlayNext||(()=>{}),this.onCancel=i.onCancel||(()=>{}),this.currentCountdown=this.countdownSeconds,this.startTime=null,this.isActive=!1,this.startCountdown=this.startCountdown.bind(this),this.stopCountdown=this.stopCountdown.bind(this),this.handlePlayNext=this.handlePlayNext.bind(this),this.handleCancel=this.handleCancel.bind(this),this.updateCountdownDisplay=this.updateCountdownDisplay.bind(this)}createEl(){var c,f;const e=super.createEl("div",{className:"vjs-autoplay-countdown-overlay"}),i=((c=this.nextVideoData)==null?void 0:c.title)||"Next Video";e.innerHTML=`
<button class="autoplay-close-button" aria-label="Cancel autoplay" title="Cancel">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
<div class="autoplay-countdown-content">
<div class="countdown-label">Up Next</div>
<div class="next-video-title">${i}</div>
${(f=this.nextVideoData)!=null&&f.author?`<div class="next-video-author">${this.nextVideoData.author}</div>`:""}
<div class="circular-countdown">
<svg class="countdown-circle" viewBox="0 0 100 100" width="100" height="100">
<circle cx="50" cy="50" r="45" stroke="rgba(255,255,255,0.2)" stroke-width="3" fill="none"/>
<circle class="countdown-progress" cx="50" cy="50" r="45" stroke="white" stroke-width="3" fill="none"
stroke-dasharray="282.74" stroke-dashoffset="282.74" transform="rotate(-90 50 50)"/>
<g class="play-icon">
<circle cx="50" cy="50" r="20" fill="rgba(255,255,255,0.9)" stroke="none"/>
<path d="M45 40l15 10-15 10z" fill="#000"/>
</g>
</svg>
</div>
<span class="autoplay-cancel-button">
CANCEL
</span>
</div>
`;const r=e.querySelector(".circular-countdown"),o=e.querySelector(".autoplay-cancel-button"),l=e.querySelector(".autoplay-close-button");return r&&r.addEventListener("click",p=>{p.preventDefault(),this.handlePlayNext()}),o&&o.addEventListener("click",p=>{p.preventDefault(),this.handleCancel()}),l&&l.addEventListener("click",p=>{p.preventDefault(),this.handleCancel()}),e.style.display="none",e}startCountdown(){this.isActive=!0,this.currentCountdown=this.countdownSeconds,this.startTime=Date.now(),this.show(),this.updateCountdownDisplay();const e=()=>{if(!this.isActive)return;const i=(Date.now()-this.startTime)/1e3;this.currentCountdown=Math.max(0,this.countdownSeconds-i),this.updateCountdownDisplay(),this.currentCountdown<=0?(this.stopCountdown(),this.handlePlayNext()):requestAnimationFrame(e)};requestAnimationFrame(e)}stopCountdown(){this.isActive=!1,this.hide()}updateCountdownDisplay(){const e=this.el().querySelector(".countdown-progress");if(e){const i=2*Math.PI*45,r=(this.countdownSeconds-this.currentCountdown)/this.countdownSeconds,o=i-i*r;e.style.strokeDashoffset=o}}handlePlayNext(){try{this.stopCountdown(),this.onPlayNext()}catch(e){console.error("Error in handlePlayNext:",e)}}handleCancel(){try{this.stopCountdown(),this.onCancel()}catch(e){console.error("Error in handleCancel:",e)}}show(){this.el()&&(this.el().style.display="flex",requestAnimationFrame(()=>{this.el()&&this.el().classList.add("autoplay-countdown-show")}))}hide(){this.el()&&(this.el().style.display="none",this.el().classList.remove("autoplay-countdown-show"))}formatDuration(e){if(!e||e===0)return"";const i=Math.floor(e/3600),r=Math.floor(e%3600/60),o=e%60;return i>0?`${i}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${r}:${o.toString().padStart(2,"0")}`}updateNextVideoData(e){var i,r;if(this.nextVideoData=e,this.el()){const o=((i=this.nextVideoData)==null?void 0:i.title)||"Next Video",l=this.el().querySelector(".next-video-title"),c=this.el().querySelector(".next-video-author");l&&(l.textContent=o),c&&((r=this.nextVideoData)!=null&&r.author)&&(c.textContent=this.nextVideoData.author)}}dispose(){this.stopCountdown(),super.dispose()}}F.registerComponent("AutoplayCountdownOverlay",zx);const c8="",H3=F.getComponent("Component");class Ux extends H3{constructor(e,i){super(e,i),this.authorName=i.authorName||"Unknown",this.authorProfile=i.authorProfile||"",this.authorThumbnail=i.authorThumbnail||"",this.videoTitle=i.videoTitle||"Video",this.videoUrl=i.videoUrl||"",this.player().ready(()=>{this.createOverlay()})}createEl(){const e=document.createElement("div");return e.className="vjs-embed-info-overlay",e}createOverlay(){const e=this.player().el(),i=this.el();if(i.style.cssText=`
position: absolute;
top: 10px;
left: 10px;
z-index: 1000;
display: flex;
align-items: center;
gap: 10px;
padding: 8px 12px;
max-width: calc(100% - 40px);
box-sizing: border-box;
transition: opacity 0.3s ease-in-out;
`,this.authorThumbnail){const o=document.createElement("div");if(o.className="embed-avatar-container",o.style.cssText=`
flex-shrink: 0;
width: 32px;
height: 32px;
border-radius: 50%;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.2);
`,this.authorProfile){const l=document.createElement("a");l.href=this.authorProfile,l.target="_blank",l.rel="noopener noreferrer",l.title=this.authorName,l.style.cssText=`
display: block;
width: 100%;
height: 100%;
`;const c=document.createElement("img");c.src=this.authorThumbnail,c.alt=this.authorName,c.title=this.authorName,c.style.cssText=`
width: 100%;
height: 100%;
object-fit: cover;
display: block;
`,c.onerror=()=>{c.style.display="none",o.style.display="none"},l.appendChild(c),o.appendChild(l)}else{const l=document.createElement("img");l.src=this.authorThumbnail,l.alt=this.authorName,l.title=this.authorName,l.style.cssText=`
width: 100%;
height: 100%;
object-fit: cover;
display: block;
`,l.onerror=()=>{l.style.display="none",o.style.display="none"},o.appendChild(l)}i.appendChild(o)}const r=document.createElement("div");if(r.className="embed-title-container",r.style.cssText=`
flex: 1;
min-width: 0;
overflow: hidden;
`,this.videoUrl){const o=document.createElement("a");o.href=this.videoUrl,o.target="_blank",o.rel="noopener noreferrer",o.textContent=this.videoTitle,o.title=this.videoTitle,o.style.cssText=`
color: #fff;
text-decoration: none;
font-size: 14px;
font-weight: 500;
line-height: 1.3;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: color 0.2s ease;
`,o.addEventListener("mouseenter",()=>{o.style.color="#ccc"}),o.addEventListener("mouseleave",()=>{o.style.color="#fff"}),r.appendChild(o)}else{const o=document.createElement("span");o.textContent=this.videoTitle,o.title=this.videoTitle,o.style.cssText=`
color: #fff;
font-size: 14px;
font-weight: 500;
line-height: 1.3;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
`,r.appendChild(o)}i.appendChild(r),e.appendChild(i),this.setupAutoHide()}setupAutoHide(){const e=this.player(),i=this.el(),r=()=>{e.paused()||e.ended()||e.userActive()?(i.style.opacity="1",i.style.visibility="visible"):(i.style.opacity="0",i.style.visibility="hidden")};e.on("pause",()=>{r()}),e.on("play",()=>{r()}),e.on("ended",()=>{r()}),e.on("ready",()=>{r()}),e.on("useractive",()=>{r()}),e.on("userinactive",()=>{r()}),setTimeout(()=>{r()},100)}updateContent(e){e.authorName&&(this.authorName=e.authorName),e.authorProfile&&(this.authorProfile=e.authorProfile),e.authorThumbnail&&(this.authorThumbnail=e.authorThumbnail),e.videoTitle&&(this.videoTitle=e.videoTitle),e.videoUrl&&(this.videoUrl=e.videoUrl);const i=this.el();i.innerHTML="",this.createOverlay()}show(){this.el().style.display="flex"}hide(){this.el().style.display="none"}dispose(){const e=this.el();e&&e.parentNode&&e.parentNode.removeChild(e),super.dispose()}}F.registerComponent("EmbedInfoOverlay",Ux);const d8="",V3=F.getComponent("Component");class Px extends V3{constructor(e,i){super(e,i),this.on(e,"loadedmetadata",this.updateChapterMarkers),this.on(e,"texttrackchange",this.updateChapterMarkers),this.chaptersData=[],this.tooltip=null,this.isHovering=!1,this.previewSprite=i.previewSprite||null}createEl(){const e=super.createEl("div",{className:"vjs-chapter-markers-track"});return this.tooltip=null,e}updateChapterMarkers(){const e=this.player(),i=e.textTracks();let r=null;for(let l=0;l<i.length;l++)if(i[l].kind==="chapters"){r=i[l];break}if(!r||!r.cues)return;this.chaptersData=[];for(let l=0;l<r.cues.length;l++){const c=r.cues[l];this.chaptersData.push({startTime:c.startTime,endTime:c.endTime,chapterTitle:c.text})}this.el().innerHTML="";const o=e.duration();if(!(!o||o===1/0)){for(let l=0;l<r.cues.length;l++){const c=r.cues[l],f=this.createMarker(c,o);this.el().appendChild(f)}this.setupProgressBarHover()}}setupProgressBarHover(){if(this.options_.isTouchDevice||"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)return;const i=this.player().getChild("controlBar").getChild("progressControl");if(!i)return;const r=i.getChild("seekBar");if(!r)return;const o=r.el();if((!this.tooltip||!this.tooltip.nodeType)&&(this.tooltip=F.dom.createEl("div",{className:"vjs-chapter-floating-tooltip"}),Object.assign(this.tooltip.style,{position:"absolute",zIndex:"1000",bottom:"45px",transform:"translateX(-50%)",display:"none",minWidth:"160px",maxWidth:"200px",width:"auto"}),this.chapterTitle=F.dom.createEl("div",{className:"chapter-title"}),this.chapterInfo=F.dom.createEl("div",{className:"chapter-info"}),this.positionInfo=F.dom.createEl("div",{className:"position-info"}),this.chapterImage=F.dom.createEl("div",{className:"chapter-image-sprite"}),Object.assign(this.chapterImage.style,{display:"block",overflow:"hidden"}),this.tooltip.appendChild(this.chapterTitle),this.tooltip.appendChild(this.chapterImage),this.tooltip.appendChild(this.chapterInfo),this.tooltip.appendChild(this.positionInfo)),!o.querySelector(".vjs-chapter-floating-tooltip"))try{o.appendChild(this.tooltip)}catch{return}const l=i.el();l.removeEventListener("mouseenter",this.handleMouseEnter),l.removeEventListener("mouseleave",this.handleMouseLeave),l.removeEventListener("mousemove",this.handleMouseMove),this.handleMouseEnter=()=>{this.isHovering=!0,this.tooltip.style.display="block"},this.handleMouseLeave=()=>{this.isHovering=!1,this.tooltip.style.display="none"},this.handleMouseMove=c=>{this.isHovering&&this.updateChapterTooltip(c,o,l)},l.addEventListener("mouseenter",this.handleMouseEnter),l.addEventListener("mouseleave",this.handleMouseLeave),l.addEventListener("mousemove",this.handleMouseMove)}updateChapterTooltip(e,i,r){if(!this.tooltip||!this.isHovering)return;const o=this.player().duration();if(!o)return;const l=i.getBoundingClientRect(),c=r.getBoundingClientRect(),f=e.clientX-l.left,v=Math.max(0,Math.min(1,f/l.width))*o,S=e.clientX-c.left,x=this.findChapterAtTime(v);if(x){const P=G=>{const W=Math.floor(G/60),oe=Math.floor(G%60);return`${W}:${oe.toString().padStart(2,"0")}`},U=P(x.startTime),Y=P(x.endTime),$=x.chapterTitle.length>30?x.chapterTitle.substring(0,30)+"...":x.chapterTitle;this.chapterTitle.textContent=$,this.chapterInfo.textContent=`${U} - ${Y}`,this.updateSpriteThumbnail(v),this.chapterImage.style.display="block"}else this.chapterTitle.textContent="",this.chapterInfo.textContent="",this.updateSpriteThumbnail(v),this.chapterImage.style.display="block";this.tooltip.style.visibility="hidden",this.tooltip.style.display="block";const D=this.tooltip.offsetWidth||240,k=c.width,I=D/2;let C=S;C-I<0?C=I+5:C+I>k&&(C=k-I-5),this.tooltip.style.left=`${C}px`,this.tooltip.style.visibility="visible",this.tooltip.style.display="block"}findChapterAtTime(e){for(const i of this.chaptersData)if(e>=i.startTime&&e<i.endTime)return i;return null}updateSpriteThumbnail(e){if(!this.previewSprite||!this.previewSprite.url){this.chapterImage.style.display="none";return}const{url:i,frame:r}=this.previewSprite,{width:o,height:l}=r,c=r.seconds||10,f=this.player().duration()||45,p=Math.ceil(f/c),v=Math.min(p,6);let S=Math.floor(e/c);S=Math.min(S,v-1);const x=S,k=-(0*o),I=-(x*l);if(this.chapterImage.style.backgroundImage=`url("${i}")`,this.chapterImage.style.backgroundPosition=`${k}px ${I}px`,this.chapterImage.style.backgroundSize="auto",this.chapterImage.style.backgroundRepeat="no-repeat",this.chapterImage.style.display="block",S>=3&&e>30){const C=-(2*l);this.chapterImage.style.backgroundPosition=`${k}px ${C}px`}}formatTime(e){const i=Math.floor(e/60),r=Math.floor(e%60);return`${i}:${r.toString().padStart(2,"0")}`}createMarker(e,i){const r=F.dom.createEl("div",{className:"vjs-chapter-marker"}),o=e.startTime/i*100;r.style.left=o+"%";const l=F.dom.createEl("div",{className:"vjs-chapter-marker-tooltip"}),c=e.text.length>30?e.text.substring(0,30)+"...":e.text;return l.textContent=c,r.appendChild(l),r.addEventListener("click",f=>{f.stopPropagation(),this.player().currentTime(e.startTime)}),r.style.pointerEvents="auto",r.style.cursor="pointer",r}dispose(){var i;const e=(i=this.player().getChild("controlBar"))==null?void 0:i.getChild("progressControl");if(e){const r=e.el();r.removeEventListener("mouseenter",this.handleMouseEnter),r.removeEventListener("mouseleave",this.handleMouseLeave),r.removeEventListener("mousemove",this.handleMouseMove)}this.tooltip&&this.tooltip.parentNode&&this.tooltip.parentNode.removeChild(this.tooltip),super.dispose()}}F.registerComponent("ChapterMarkers",Px);const h8="",$3=F.getComponent("Component");class Bx extends $3{constructor(e,i){super(e,i),this.tooltip=null,this.isHovering=!1,this.previewSprite=i.previewSprite||null}createEl(){const e=super.createEl("div",{className:"vjs-sprite-preview-track"});return this.tooltip=null,e}setupProgressBarHover(){if(this.options_.isTouchDevice||"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)return;const i=this.player().getChild("controlBar").getChild("progressControl");if(!i)return;const r=i.getChild("seekBar");if(!r)return;const o=r.el();if(!this.previewSprite||!this.previewSprite.url)return;if((!this.tooltip||!this.tooltip.nodeType)&&(this.tooltip=F.dom.createEl("div",{className:"vjs-sprite-preview-tooltip"}),Object.assign(this.tooltip.style,{position:"absolute",zIndex:"1000",bottom:"45px",transform:"translateX(-50%)",display:"none",minWidth:"172px",maxWidth:"172px",width:"172px"}),this.spriteImage=F.dom.createEl("div",{className:"sprite-image-preview"}),Object.assign(this.spriteImage.style,{display:"block",overflow:"hidden"}),this.tooltip.appendChild(this.spriteImage)),!o.querySelector(".vjs-sprite-preview-tooltip"))try{o.appendChild(this.tooltip)}catch(c){console.warn("Could not append sprite preview tooltip:",c);return}const l=i.el();l.removeEventListener("mouseenter",this.handleMouseEnter),l.removeEventListener("mouseleave",this.handleMouseLeave),l.removeEventListener("mousemove",this.handleMouseMove),this.handleMouseEnter=()=>{this.isHovering=!0,this.tooltip.style.display="block"},this.handleMouseLeave=()=>{this.isHovering=!1,this.tooltip.style.display="none"},this.handleMouseMove=c=>{this.isHovering&&this.updateSpriteTooltip(c,o,l)},l.addEventListener("mouseenter",this.handleMouseEnter),l.addEventListener("mouseleave",this.handleMouseLeave),l.addEventListener("mousemove",this.handleMouseMove)}updateSpriteTooltip(e,i,r){if(!this.tooltip||!this.isHovering)return;const o=this.player().duration();if(!o)return;const l=i.getBoundingClientRect(),c=r.getBoundingClientRect(),f=e.clientX-l.left,v=Math.max(0,Math.min(1,f/l.width))*o,S=e.clientX-c.left;this.updateSpriteThumbnail(v),this.tooltip.style.visibility="hidden",this.tooltip.style.display="block";const x=this.tooltip.offsetWidth||172,D=c.width,k=x/2;let I=S;I-k<0?I=k+5:I+k>D&&(I=D-k-5),this.tooltip.style.left=`${I}px`,this.tooltip.style.visibility="visible",this.tooltip.style.display="block"}updateSpriteThumbnail(e){if(!this.previewSprite||!this.previewSprite.url){this.spriteImage.style.display="none";return}const{url:i,frame:r}=this.previewSprite,{width:o,height:l}=r,c=r.seconds||10,f=this.player().duration()||45,p=Math.ceil(f/c),v=Math.min(p,6);let S=Math.floor(e/c);S=Math.min(S,v-1);const x=S,k=-(0*o),I=-(x*l);if(this.spriteImage.style.backgroundImage=`url("${i}")`,this.spriteImage.style.backgroundPosition=`${k}px ${I}px`,this.spriteImage.style.backgroundSize="auto",this.spriteImage.style.backgroundRepeat="no-repeat",this.spriteImage.style.width="166px",this.spriteImage.style.height="96px",this.spriteImage.style.display="block",S>=3&&e>30){const C=-(2*l);this.spriteImage.style.backgroundPosition=`${k}px ${C}px`}}formatTime(e){const i=Math.floor(e/60),r=Math.floor(e%60);return`${i}:${r.toString().padStart(2,"0")}`}dispose(){var i;const e=(i=this.player().getChild("controlBar"))==null?void 0:i.getChild("progressControl");if(e){const r=e.el();r.removeEventListener("mouseenter",this.handleMouseEnter),r.removeEventListener("mouseleave",this.handleMouseLeave),r.removeEventListener("mousemove",this.handleMouseMove)}this.tooltip&&this.tooltip.parentNode&&this.tooltip.parentNode.removeChild(this.tooltip),super.dispose()}}F.registerComponent("SpritePreview",Bx);const f8="",Y3=F.getComponent("Button");class qx extends Y3{constructor(e,i){super(e,i)}createEl(){const e=super.createEl("button",{className:"vjs-next-video-control vjs-control vjs-button",type:"button",title:"Next Video","aria-label":"Next Video"}),i=F.dom.createEl("span",{"aria-hidden":"true"});i.innerHTML=`
<svg width="34" height="34" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 34L28.1667 24L14 14V34ZM30.6667 14V34H34V14H30.6667Z" fill="currentColor"/>
</svg>
`;const r=F.dom.createEl("span",{className:"vjs-control-text"});return r.textContent="Next Video",e.appendChild(i),e.appendChild(r),e}handleClick(){this.player().trigger("nextVideo")}}F.registerComponent("NextVideoButton",qx);const p8="",Fx="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPgo8cGF0aCBkPSJNMCAwIEMtMC40MzMxMjUgLTEuMzQxOTE0MDYgLTAuNDMzMTI1IC0xLjM0MTkxNDA2IC0wLjg3NSAtMi43MTA5Mzc1IEMtNi4wOTg4MTk0MSAtMTkuNzI0NjI3MTIgLTYuMDk4ODE5NDEgLTE5LjcyNDYyNzEyIC0yLjMxMjUgLTI3LjQzNzUgQzEuMjkxODE4NTggLTMxLjQzMTQ3NDY0IDMuNDY3MDUzMjggLTMyLjgyNjkyNTM3IDguODc1IC0zMy40Mzc1IEMxNC4wMzA3MDcxNCAtMzMuMjMyODMxMSAxNy45MzY4NTMzOCAtMzEuMTUyNDA1OTQgMjEuNTMzNTA4MyAtMjcuNDAwMTQ2NDggQzIzLjY2MTM2MDY4IC0yMy45MTc1NzgyNiAyNC41Nzk1NTU4NyAtMjAuMjY1ODc4MzEgMjUuNjUxMzY3MTkgLTE2LjM0NzY1NjI1IEMyNS44OTcyNTA4MiAtMTUuNDc1Njc1OTYgMjYuMTQzMTM0NDYgLTE0LjYwMzY5NTY4IDI2LjM5NjQ2OTEyIC0xMy43MDUyOTE3NSBDMjcuMjA1NDk0MyAtMTAuODI2NzY1NDQgMjguMDAxNjE2MDIgLTcuOTQ0ODU3MzggMjguNzk2ODc1IC01LjA2MjUgQzI5LjM1NTAwNTU0IC0zLjA1OTg0MjM5IDI5LjkxMzYyNjUgLTEuMDU3MzIxMzkgMzAuNDcyNzE3MjkgMC45NDUwNjgzNiBDMzEuNjQxNzIzMzggNS4xMzk4NTkyOSAzMi44MDQyNjUzOCA5LjMzNjM3NTM5IDMzLjk2MjQwMjM0IDEzLjUzNDE3OTY5IEMzNS40NDg0MTI2IDE4LjkxODEwMzY4IDM2Ljk1MTEyMjM5IDI0LjI5NzE5ODY4IDM4LjQ1ODc4MjIgMjkuNjc1MDk0NiBDMzkuNjE1MzE1MjkgMzMuODA4MDY1MTIgNDAuNzYyNjA2ODIgMzcuOTQzNTU3MiA0MS45MDcxNDI2NCA0Mi4wNzk4NjQ1IEM0Mi40NTc2MTk3NCA0NC4wNjQ2NDI0NSA0My4wMTEwNzE3MyA0Ni4wNDg1OTc3NyA0My41Njc1Mjc3NyA0OC4wMzE3MDc3NiBDNDQuMzQzMjIyMTIgNTAuODAxMTc2NDMgNDUuMTA2MzMxNDEgNTMuNTczODEzMjYgNDUuODY2MjEwOTQgNTYuMzQ3NjU2MjUgQzQ2LjA5ODg2MTU0IDU3LjE2ODU1NzQzIDQ2LjMzMTUxMjE1IDU3Ljk4OTQ1ODYyIDQ2LjU3MTIxMjc3IDU4LjgzNTIzNTYgQzQ3LjU5NzA1OTYyIDYyLjYyOTkxNzMyIDQ4LjE3Njk1NCA2NS4yNDE1Njk1OCA0NyA2OSBDNDUuODE2NjQwNjIgNjguNjAxNjc5NjkgNDQuNjMzMjgxMjUgNjguMjAzMzU5MzcgNDMuNDE0MDYyNSA2Ny43OTI5Njg3NSBDMzMuNTAyODU4MTIgNjQuNDM5MjkzODYgMzMuNTAyODU4MTIgNjQuNDM5MjkzODYgMjMuNSA2MS4zNzUgQzIwLjM5MzIzOTMzIDYwLjQ3MTA2NzcyIDE3LjQzNTQwNDA3IDU5LjM5ODY4MjA5IDE0LjQ0Nzk5ODA1IDU4LjE1NzcxNDg0IEM4LjgyMDg4MDM4IDU1Ljg4MzYwNTg4IDMuMTAwNzAxOTEgNTMuOTgxMTgwNiAtMi42Njc5Njg3NSA1Mi4xMDE1NjI1IEMtNC44ODI0MzI4NyA1MS4zNjgwMDYzNCAtNy4wOTY2MTc1MyA1MC42MzM2MDYwOCAtOS4zMTA1NDY4OCA0OS44OTg0Mzc1IEMtMTIuNzU3NDc4NzkgNDguNzU2MjY0NyAtMTYuMjA1NzAxMjkgNDcuNjE5MDgwOTYgLTE5LjY1ODkzNTU1IDQ2LjQ5NjA5Mzc1IEMtMjMuMDIxMzExNDEgNDUuNDAwNTEyMjYgLTI2LjM3NjE3OTYzIDQ0LjI4NDEyMDY5IC0yOS43MzA0Njg3NSA0My4xNjQwNjI1IEMtMzAuNzU2NjU4MTcgNDIuODM1NzI0MTggLTMxLjc4Mjg0NzYgNDIuNTA3Mzg1ODYgLTMyLjg0MDEzMzY3IDQyLjE2OTA5NzkgQy0zOC44MDgxMjY4IDQwLjE1MzYwMjQ3IC00My44NTcyNDQ2OCAzNy45MDM0OTM3NCAtNDggMzMgQy00OS42NTExMjQ1NCAyOC4wNDY2MjYzOSAtNDkuODU5NjcxMzggMjMuMDM2MDYzOCAtNDcuODEyNSAxOC4xODc1IEMtNDQuMjg2MTM3NTIgMTMuOTMxNTQ1MjggLTQxLjcyNTM5ODI5IDExLjg3NTk0NzY5IC0zNi4xODc1IDExLjI1IEMtMzQuNzkyNzY5NiAxMS4xNDk4ODg4NSAtMzMuMzk2OTkzMTQgMTEuMDYwODcxMTYgLTMyIDExIEMtNTQuODU5ODA4MjUgLTMuMTg4ODQ2NSAtNzguNDIzNjc1OCAtMTMuOTIxOTA5NTQgLTEwNSAtMTkgQy0xMDUuODU2MDk4NjMgLTE5LjE2MzcxMDk0IC0xMDYuNzEyMTk3MjcgLTE5LjMyNzQyMTg3IC0xMDcuNTk0MjM4MjggLTE5LjQ5NjA5Mzc1IEMtMTU3LjgwNzgwMzE2IC0yOC42MzQ0MTUwMSAtMjExLjk2NDMxMzk3IC0xNy4wMTg1MTAwNiAtMjU0LjE1NzcxNDg0IDExLjcwNzAzMTI1IEMtMjY0LjExNDI0NjA3IDE4LjY5NDgxMTQ1IC0yNzMuMjA4NTU4OTggMjYuNjEzMTg1OTcgLTI4MiAzNSBDLTI4Mi44NTIwNzAzMSAzNS43OTkyMTg3NSAtMjgzLjcwNDE0MDYyIDM2LjU5ODQzNzUgLTI4NC41ODIwMzEyNSAzNy40MjE4NzUgQy0zMTkuMzk4Mjc0NTYgNzAuOTc3MDU3NTIgLTM0MC4wNTk1NzA1NyAxMjEuMTczMjExNjUgLTM0MS4yMDMxMjUgMTY5LjI5Mjk2ODc1IEMtMzQxLjY5OTk0NDYgMjEzLjAwOTkyODgzIC0zMzEuMzU4Nzg5MjYgMjU2LjMzNTA1MDQyIC0zMDUgMjkyIEMtMzA0LjIzMzAwNzgxIDI5My4wNDkyOTY4NyAtMzAzLjQ2NjAxNTYzIDI5NC4wOTg1OTM3NSAtMzAyLjY3NTc4MTI1IDI5NS4xNzk2ODc1IEMtMjk2LjkyNzc3ODc1IDMwMi45MTE3NjYyOSAtMjkwLjY0ODMwNzkgMzEwLjAzNTEwNjAxIC0yODQgMzE3IEMtMjgzLjE5OTQ5MjE5IDMxNy44NTMzNTkzOCAtMjgyLjM5ODk4NDM3IDMxOC43MDY3MTg3NSAtMjgxLjU3NDIxODc1IDMxOS41ODU5Mzc1IEMtMjQ4LjAyMjExOTY2IDM1NC40MDEwNDUyMyAtMTk3LjgyMjkzNDM1IDM3NS4wNTk2NjIxNiAtMTQ5LjcwNzAzMTI1IDM3Ni4yMDMxMjUgQy0xMDEuNzQ0MzQwNTEgMzc2Ljc0ODE1NTU4IC01NS42ODY4NTMgMzYzLjM2NjAxNDI1IC0xOCAzMzMgQy0xNy4yMjE5NzAyMSAzMzIuMzc0MjQwNzIgLTE3LjIyMTk3MDIxIDMzMi4zNzQyNDA3MiAtMTYuNDI4MjIyNjYgMzMxLjczNTgzOTg0IEMtMy4zMjY2MzQ2OCAzMjEuMTI2NDIzMTIgNy45ODk4NDczNCAzMDkuNTczNDEzNzYgMTggMjk2IEMxOS4xNzM2OTE0MSAyOTQuNDA4NjUyMzQgMTkuMTczNjkxNDEgMjk0LjQwODY1MjM0IDIwLjM3MTA5Mzc1IDI5Mi43ODUxNTYyNSBDMjguMjc4NzQ3OTMgMjgxLjY5Nzk5NDY3IDM0LjkwMjUyOTYzIDI2OS44NTczNzI3OSA0MC41MTU2MjUgMjU3LjQ1MzEyNSBDNDIuNjE4NzIzODcgMjUzLjk3NzQ3NzQgNDUuMTM1MDI1MDUgMjUxLjYyNTI1MTcyIDQ5LjAyNzM0Mzc1IDI1MC4zMjAzMTI1IEM1My41MTE4NTY2NCAyNDkuODYxNzczMzUgNTYuODIzMzc1OTMgMjUwLjAwNjYxMTI0IDYxIDI1MiBDNjMuOTIxMTQ0NDQgMjU0LjUyNjM5NTE5IDY1LjgxOTk5MjQzIDI1Ni4zNDc5MTQ2OCA2Ni4yNDcwNzAzMSAyNjAuMjY3NTc4MTIgQzY2LjQ1NzI2NDQ5IDI2Ny40MzQ0Mzk3NSA2NS4xNjY5OTgxNiAyNzIuMjUwMDk1IDYxLjc1IDI3OC41IEM2MS4zMDE4MDkwOCAyNzkuMzUyMzkyNTggNjAuODUzNjE4MTYgMjgwLjIwNDc4NTE2IDYwLjM5MTg0NTcgMjgxLjA4MzAwNzgxIEM0OS40NTc1MTExOCAzMDEuNTEwODIwMTIgMzUuOTYwNDQ5ODUgMzE5LjI2ODQwMTAzIDIwIDMzNiBDMTguNjk0ODI0MjIgMzM3LjM4NDQ1MzEyIDE4LjY5NDgyNDIyIDMzNy4zODQ0NTMxMiAxNy4zNjMyODEyNSAzMzguNzk2ODc1IEMxMC40MzQ2MDU1MyAzNDUuOTU4MTkyMzggMi45NjI3NDkzNSAzNTIuMDM4OTM2MjYgLTUgMzU4IEMtNS41NDQ2Mjg5MSAzNTguNDE2MDQ0OTIgLTYuMDg5MjU3ODEgMzU4LjgzMjA4OTg0IC02LjY1MDM5MDYyIDM1OS4yNjA3NDIxOSBDLTQ0LjE3MTYzNTc4IDM4Ny44NjY3MjE3MiAtODkuMjY5OTI4NDQgNDAxLjcxNzY0NjM4IC0xMzYgNDA0IEMtMTM3LjIwMjY5NTMxIDQwNC4wNjA1ODU5NCAtMTM4LjQwNTM5MDYyIDQwNC4xMjExNzE4OCAtMTM5LjY0NDUzMTI1IDQwNC4xODM1OTM3NSBDLTE4NS4wMDgyMzg1MyA0MDUuMTk0MzE4NTUgLTIzMy4yNzQ2Nzc2NyAzOTAuNzE0MTkyMTkgLTI3MCAzNjQgQy0yNzAuOTY2Nzk2ODggMzYzLjMwNTE5NTMxIC0yNzEuOTMzNTkzNzUgMzYyLjYxMDM5MDYyIC0yNzIuOTI5Njg3NSAzNjEuODk0NTMxMjUgQy0yOTIuMTgyNzQ0NTUgMzQ3Ljc2NzI4ODA5IC0zMDkuOTk0MzIxMiAzMzEuNDIxMjA3OTQgLTMyNCAzMTIgQy0zMjQuNzYzMTI1IDMxMC45NTg0Mzc1IC0zMjUuNTI2MjUgMzA5LjkxNjg3NSAtMzI2LjMxMjUgMzA4Ljg0Mzc1IEMtMzYwLjYzMTc2NDM1IDI2MC43MDE0NDg2MiAtMzc1LjQzMTYyODI2IDIwMS4zODk5NTM5OCAtMzY2LjUwNjgzNTk0IDE0Mi43NjAyNTM5MSBDLTM2MC44Nzc3OTg0NyAxMDkuMzQzNTA4MjQgLTM0OC45Mzg4ODA1MyA3Ni42MzE4MzQ0MyAtMzI5IDQ5IEMtMzI4LjMwMzkwNjI1IDQ4LjAzMDYyNSAtMzI3LjYwNzgxMjUgNDcuMDYxMjUgLTMyNi44OTA2MjUgNDYuMDYyNSBDLTMxMi43NTYyNTE3NiAyNi44MTU2OTM4OSAtMjk2LjQyMTI4OTQ4IDkuMDA1NzM3NiAtMjc3IC01IEMtMjc1Ljk1ODQzNzUgLTUuNzYzMTI1IC0yNzQuOTE2ODc1IC02LjUyNjI1IC0yNzMuODQzNzUgLTcuMzEyNSBDLTE5OS40NzAyOTYyOSAtNjAuMzMxMTk5NjggLTk1LjI0NjQxNDMgLTY1LjMxNjg1NDg2IDAgMCBaICIgZmlsbD0iIzMyMzIzMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzk4LDc5KSIgZGF0YS1pbmRleD0iMCIgc3R5bGU9Im9wYWNpdHk6IDE7IHZpc2liaWxpdHk6IHZpc2libGU7IGZpbGw6IHJnYigyNTUsIDI1NSwgMjU1KTsiPjwvcGF0aD4KPHBhdGggZD0iTTAgMCBDMS4wODUzOTA2MyAwLjYyNzEyODkxIDIuMTcwNzgxMjUgMS4yNTQyNTc4MSAzLjI4OTA2MjUgMS45MDAzOTA2MiBDNi42NjE0MDExNCAzLjg1MzkyNzA3IDEwLjAxODg1NTYyIDUuODMxMjk4NTYgMTMuMzc1IDcuODEyNSBDMTUuNDAyODgwNDcgOC45OTc0MDQ1OCAxNy40MzE1MDExMiAxMC4xODEwNDM1MiAxOS40NjA5Mzc1IDExLjM2MzI4MTI1IEMyMi40MjY2Nzg0OSAxMy4wOTE4NzIwMSAyNS4zOTEzNTkwOCAxNC44MjIwOTg5MiAyOC4zNTIwNTA3OCAxNi41NTkzMjYxNyBDMzUuNDc2OTY4MzkgMjAuNzM0NjE4NiA0Mi42NTkxMzg5NiAyNC43OTY3MTY0NyA0OS44NzUgMjguODEyNSBDNTkuMTA0MzE0MDIgMzMuOTQ4ODEzODkgNjguMjQ3MzY5NzMgMzkuMjE0NjI1MzUgNzcuMzU1NDY4NzUgNDQuNTYyNSBDODQuNDgwMjg4MDggNDguNzM0OTQzMjEgOTEuNjYwNTk0NTIgNTIuNzk3MjA0NTggOTguODc1IDU2LjgxMjUgQzEwNy40ODQ5MDYyMiA2MS42MDc1OTkyNCAxMTYuMDQ3MTI5MDkgNjYuNDc2MjgwMjMgMTI0LjU2MjUgNzEuNDM3NSBDMTI2LjA1OTEwMTU2IDcyLjMwNzYxNzE5IDEyNi4wNTkxMDE1NiA3Mi4zMDc2MTcxOSAxMjcuNTg1OTM3NSA3My4xOTUzMTI1IEMxNDcuNTQxNjUwNTcgODQuODY1OTY0IDE0Ny41NDE2NTA1NyA4NC44NjU5NjQgMTUwLjkzNzUgOTUuNzUzOTA2MjUgQzE1Mi41MTMyNDc3MyAxMDMuMTY4MzYyMSAxNTEuNTQzNTgwMzcgMTEwLjM4MjY2MTQyIDE0Ny4zNzUgMTE2LjgxMjUgQzE0MS41NDkxNjM3MSAxMjMuMDczMDAxMjUgMTM0LjMzOTU2NTU2IDEyNi44ODY3NTI2OSAxMjYuODc1IDEzMC44NzUgQzEyNC40NDc3NjUyOCAxMzIuMTkyODgyNDUgMTIyLjAyNDcxNTI2IDEzMy41MTgzODA2IDExOS42MDE1NjI1IDEzNC44NDM3NSBDMTE4Ljk5MjAwNzE0IDEzNS4xNzYwMTA4OSAxMTguMzgyNDUxNzggMTM1LjUwODI3MTc5IDExNy43NTQ0MjUwNSAxMzUuODUwNjAxMiBDMTExLjg1MTUxMjIzIDEzOS4wNzY1NjM2NSAxMDYuMDQ0OTg3NDIgMTQyLjQ1OTMzNzgzIDEwMC4yNSAxNDUuODc1IEM5Mi4xNzg4NDkwMSAxNTAuNjIxMjA1MTEgODQuMDU2ODQ3NjIgMTU1LjI1OTc2OTMxIDc1Ljg3NSAxNTkuODEyNSBDNjcuNjUyOTc0MSAxNjQuMzg4MTY0IDU5LjQ4OTE4NTcgMTY5LjA0ODIwNzQ4IDUxLjM3NSAxNzMuODEyNSBDNDIuMjQxMTYxNTMgMTc5LjE3NTQ4NzcyIDMzLjAzMjUwMzMgMTg0LjM4NzA4MjUxIDIzLjc3NjYxMTMzIDE4OS41MzYxMzI4MSBDMTUuMTEzNTExNTMgMTk0LjM2Nzk4ODQ5IDYuNTM3Nzk4ODggMTk5LjM0MTMyNjcxIC0yLjAxMTcxODc1IDIwNC4zNzEwOTM3NSBDLTMuNDIzMjQyMTkgMjA1LjIwMDYwNTQ3IC0zLjQyMzI0MjE5IDIwNS4yMDA2MDU0NyAtNC44NjMyODEyNSAyMDYuMDQ2ODc1IEMtNS42ODg2ODQwOCAyMDYuNTMzODE4MzYgLTYuNTE0MDg2OTEgMjA3LjAyMDc2MTcyIC03LjM2NDUwMTk1IDIwNy41MjI0NjA5NCBDLTE0LjM5NjI5ODg4IDIxMS41MzU0MjI5MiAtMjEuMzM0NjkxMjEgMjEyLjI0MTI2OTUzIC0yOS4zMDA3ODEyNSAyMTAuMDg5ODQzNzUgQy0zNi44OTQxNDM1OSAyMDYuOTM3NjQxMjMgLTQwLjkyMDk0MDgxIDIwMS45NTYwNDI3MiAtNDQuNjI1IDE5NC44MTI1IEMtNDUuNzg0OTgzNzcgMTkxLjMzMjU0ODY4IC00NS43NzMxMzI2MyAxODguMjE1NzMzMDMgLTQ1Ljc3MjE3MTAyIDE4NC41OTYxNDU2MyBDLTQ1Ljc3NzY4NjA1IDE4My40ODU5NTc3MSAtNDUuNzc3Njg2MDUgMTgzLjQ4NTk1NzcxIC00NS43ODMzMTI1IDE4Mi4zNTMzNDE3NiBDLTQ1Ljc5NDM1MDczIDE3OS44NjYxNjk0MyAtNDUuNzk4MTkzNDIgMTc3LjM3OTAzODg3IC00NS44MDIwMDE5NSAxNzQuODkxODQ1NyBDLTQ1LjgwODI2NjU0IDE3My4xMTEzMDEzNCAtNDUuODE0OTEzMzMgMTcxLjMzMDc1ODI5IC00NS44MjE5MTQ2NyAxNjkuNTUwMjE2NjcgQy00NS44NDI5NTkzMyAxNjMuNjk2MjQ3NDcgLTQ1Ljg1MzMxNzkyIDE1Ny44NDIyNzc5OSAtNDUuODYzMjgxMjUgMTUxLjk4ODI4MTI1IEMtNDUuODY3MzI4NzUgMTQ5Ljk3MjkzNzc2IC00NS44NzE0NDU2NyAxNDcuOTU3NTk0NDEgLTQ1Ljg3NTYzMTMzIDE0NS45NDIyNTEyMSBDLTQ1Ljg5NDY4NDQ0IDEzNi40NzM0MjY5NCAtNDUuOTA4OTE0ODMgMTI3LjAwNDYxMDQ3IC00NS45MTcyNDMzIDExNy41MzU3NzA3MSBDLTQ1LjkyNzAxNDQ2IDEwNi42MDcxNjE0IC00NS45NTMzMzAzNyA5NS42Nzg3NTQ3IC00NS45OTM3NDQxOSA4NC43NTAyMTY3OCBDLTQ2LjAyMzkxMTE1IDc2LjMwMjU0MTA0IC00Ni4wMzg3MTI3NiA2Ny44NTQ5MjMzNSAtNDYuMDQyMDI0MzEgNTkuNDA3MTk0NzkgQy00Ni4wNDQzNzQyOCA1NC4zNjIxMzkzMyAtNDYuMDUzMzI3ODEgNDkuMzE3MzAwMjkgLTQ2LjA3ODQ4NTQ5IDQ0LjI3MjMwMjYzIEMtNDYuMTAxNzgxMDcgMzkuNTIzOTQ0MzIgLTQ2LjEwNTk5MzQzIDM0Ljc3NTk0NDY5IC00Ni4wOTU3MjQxMSAzMC4wMjc1NDQwMiBDLTQ2LjA5NTIyODk4IDI4LjI4NzcxNTIxIC00Ni4xMDE1NDI0MyAyNi41NDc4Njg2NiAtNDYuMTE1MjgwMTUgMjQuODA4MDk0MDIgQy00Ni4yMzczNjQ1MSA4LjQyNjMxOTk0IC00Ni4yMzczNjQ1MSA4LjQyNjMxOTk0IC00MS42MjUgMS44MTI1IEMtMjguOTQ2NzA4MDYgLTEwLjg2NTc5MTk0IC0xMy45NTcxMjM4MiAtOC4zMTU4MjQ0MSAwIDAgWiBNLTE5LjYyNSAyMS44MTI1IEMtMTkuNjI1IDc1LjI3MjUgLTE5LjYyNSAxMjguNzMyNSAtMTkuNjI1IDE4My44MTI1IEMtMTYuMDM5NTg5ODEgMTgyLjM3ODMzNTkzIC0xMi45NzczMDIwOSAxODAuOTg3NjU1MzIgLTkuNjUyMzQzNzUgMTc5LjExNzE4NzUgQy04LjY4NDkwMjM0IDE3OC41NzQ0OTIxOSAtNy43MTc0NjA5NCAxNzguMDMxNzk2ODcgLTYuNzIwNzAzMTIgMTc3LjQ3MjY1NjI1IEMtNS42Nzg0OTYwOSAxNzYuODgzNTU0NjkgLTQuNjM2Mjg5MDYgMTc2LjI5NDQ1MzEzIC0zLjU2MjUgMTc1LjY4NzUgQy0xLjkxNjA0NDkyIDE3NC43NjEzMDg1OSAtMS45MTYwNDQ5MiAxNzQuNzYxMzA4NTkgLTAuMjM2MzI4MTIgMTczLjgxNjQwNjI1IEM4LjU3ODQwMDkyIDE2OC44NDkwOTk4OCAxNy4zNjMzMjU5NSAxNjMuODI5ODU5NjggMjYuMTQyMzk1MDIgMTU4Ljc5OTg2NTcyIEMzNC41MDY2ODE2OCAxNTQuMDA3NjI1MjIgNDIuODk1NjI4MTMgMTQ5LjI2MTk1ODE5IDUxLjMxMjUgMTQ0LjU2MjUgQzYxLjM4NzQxNTUgMTM4LjkzNjQwMTY5IDcxLjQxOTkyODk2IDEzMy4yNDA3MTkyMiA4MS40MzAxNzU3OCAxMjcuNTAwNDg4MjggQzg2LjcwNTE4NjggMTI0LjQ3NjgyNTAyIDkxLjk4MzE1NDA2IDEyMS40NTgzMzM5MiA5Ny4yNjE1NjYxNiAxMTguNDQwNjEyNzkgQzk5LjA3MzUxNDkzIDExNy40MDQ0NDE5NiAxMDAuODg1MDQzMDMgMTE2LjM2NzUzODcxIDEwMi42OTY1MzMyIDExNS4zMzA1NjY0MSBDMTA4LjkwMDEzNjQ4IDExMS43ODI5ODc1NiAxMTUuMTE1NDU1MjkgMTA4LjI2MDUzNzA2IDEyMS4zNzUgMTA0LjgxMjUgQzExOC41NDA3MjM3MSAxMDEuNzYwNjQ3OTIgMTE1Ljc1OTQyOTM5IDk5LjY4MTY4NTAzIDExMi4xNDA2MjUgOTcuNjMyODEyNSBDMTExLjEwNDA1NzYyIDk3LjA0MTA1MjI1IDExMC4wNjc0OTAyMyA5Ni40NDkyOTE5OSAxMDguOTk5NTExNzIgOTUuODM5NTk5NjEgQzEwNy44ODU5MjI4NSA5NS4yMTE5MDY3NCAxMDYuNzcyMzMzOTggOTQuNTg0MjEzODcgMTA1LjYyNSA5My45Mzc1IEMxMDQuNDU0MTU3NSA5My4yNzEwMjI2MyAxMDMuMjgzNzUzNzcgOTIuNjAzNzczOTEgMTAyLjExMzc2OTUzIDkxLjkzNTc5MTAyIEMxMDAuMzExMTI0NDQgOTAuOTA2NzAzOCA5OC41MDgyMzcyIDg5Ljg3ODA3MjI2IDk2LjcwNDAxMDAxIDg4Ljg1MTc2MDg2IEM5MC44NjA4MjAwMyA4NS41Mjc1MjAxIDg1LjA1MjU5MzUgODIuMTQ0NTYwNTUgNzkuMjUgNzguNzUgQzc3LjI2NTYzNjkxIDc3LjU5MTEyNTQ0IDc1LjI4MTI2MTkgNzYuNDMyMjcxMjggNzMuMjk2ODc1IDc1LjI3MzQzNzUgQzcwLjMzNjQ5Mjc5IDczLjU0MzQ1ODA1IDY3LjM3NjI1NDE4IDcxLjgxMzIzMzA1IDY0LjQxNjAxNTYyIDcwLjA4MzAwNzgxIEM2MS40NDQzNDQ5NSA2OC4zNDY0MzE2NCA1OC40NzIzMDYyNiA2Ni42MTA0ODgwOCA1NS41IDY0Ljg3NSBDNTQuNTEyODE5ODIgNjQuMjk4NTQ3MzYgNTMuNTI1NjM5NjUgNjMuNzIyMDk0NzMgNTIuNTA4NTQ0OTIgNjMuMTI4MTczODMgQzQ0LjEzNjE2ODkzIDU4LjI0NDc5NjczIDM1LjczNTU3Nzg3IDUzLjQxMTE0IDI3LjMzMjUxOTUzIDQ4LjU4MDgxMDU1IEMyMS41NTkwNTI0MiA0NS4yNTM2OTExNSAxNS44MDY2NDU5NyA0MS44OTQ2NTY2IDEwLjA4MjAzMTI1IDM4LjQ4NDM3NSBDOS40NzcwNzMyMSAzOC4xMjQyMzMwOSA4Ljg3MjExNTE3IDM3Ljc2NDA5MTE5IDguMjQ4ODI1MDcgMzcuMzkzMDM1ODkgQzUuMzM5OTI2ODkgMzUuNjYwMTM0NDkgMi40MzQwODkzMSAzMy45MjI0OTYzNSAtMC40NjgwMTc1OCAzMi4xNzgyMjI2NiBDLTEuNTIwMTM0MjggMzEuNTQ5NjQzNTUgLTIuNTcyMjUwOTggMzAuOTIxMDY0NDUgLTMuNjU2MjUgMzAuMjczNDM3NSBDLTUuMDI2MjAxMTcgMjkuNDUwNDUxNjYgLTUuMDI2MjAxMTcgMjkuNDUwNDUxNjYgLTYuNDIzODI4MTIgMjguNjEwODM5ODQgQy0xMC43MzkxMjg0MiAyNi4xODY2MDk5OCAtMTUuMTk3OTI4MSAyNC4wMjYwMzU5NSAtMTkuNjI1IDIxLjgxMjUgWiAiIGZpbGw9IiM5OTk5OTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIyNC42MjUsMTU0LjE4NzUpIiBkYXRhLWluZGV4PSIxIiBzdHlsZT0ib3BhY2l0eTogMTsgdmlzaWJpbGl0eTogdmlzaWJsZTsgZmlsbDogcmdiKDI1NSwgMjU1LCAyNTUpOyI+PC9wYXRoPgo8L3N2Zz4=",Hx="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPgo8cGF0aCBkPSJNMCAwIEMtMC40MzMxMjUgLTEuMzQxOTE0MDYgLTAuNDMzMTI1IC0xLjM0MTkxNDA2IC0wLjg3NSAtMi43MTA5Mzc1IEMtNi4wOTg4MTk0MSAtMTkuNzI0NjI3MTIgLTYuMDk4ODE5NDEgLTE5LjcyNDYyNzEyIC0yLjMxMjUgLTI3LjQzNzUgQzEuMjkxODE4NTggLTMxLjQzMTQ3NDY0IDMuNDY3MDUzMjggLTMyLjgyNjkyNTM3IDguODc1IC0zMy40Mzc1IEMxNC4wMzA3MDcxNCAtMzMuMjMyODMxMSAxNy45MzY4NTMzOCAtMzEuMTUyNDA1OTQgMjEuNTMzNTA4MyAtMjcuNDAwMTQ2NDggQzIzLjY2MTM2MDY4IC0yMy45MTc1NzgyNiAyNC41Nzk1NTU4NyAtMjAuMjY1ODc4MzEgMjUuNjUxMzY3MTkgLTE2LjM0NzY1NjI1IEMyNS44OTcyNTA4MiAtMTUuNDc1Njc1OTYgMjYuMTQzMTM0NDYgLTE0LjYwMzY5NTY4IDI2LjM5NjQ2OTEyIC0xMy43MDUyOTE3NSBDMjcuMjA1NDk0MyAtMTAuODI2NzY1NDQgMjguMDAxNjE2MDIgLTcuOTQ0ODU3MzggMjguNzk2ODc1IC01LjA2MjUgQzI5LjM1NTAwNTU0IC0zLjA1OTg0MjM5IDI5LjkxMzYyNjUgLTEuMDU3MzIxMzkgMzAuNDcyNzE3MjkgMC45NDUwNjgzNiBDMzEuNjQxNzIzMzggNS4xMzk4NTkyOSAzMi44MDQyNjUzOCA5LjMzNjM3NTM5IDMzLjk2MjQwMjM0IDEzLjUzNDE3OTY5IEMzNS40NDg0MTI2IDE4LjkxODEwMzY4IDM2Ljk1MTEyMjM5IDI0LjI5NzE5ODY4IDM4LjQ1ODc4MjIgMjkuNjc1MDk0NiBDMzkuNjE1MzE1MjkgMzMuODA4MDY1MTIgNDAuNzYyNjA2ODIgMzcuOTQzNTU3MiA0MS45MDcxNDI2NCA0Mi4wNzk4NjQ1IEM0Mi40NTc2MTk3NCA0NC4wNjQ2NDI0NSA0My4wMTEwNzE3MyA0Ni4wNDg1OTc3NyA0My41Njc1Mjc3NyA0OC4wMzE3MDc3NiBDNDQuMzQzMjIyMTIgNTAuODAxMTc2NDMgNDUuMTA2MzMxNDEgNTMuNTczODEzMjYgNDUuODY2MjEwOTQgNTYuMzQ3NjU2MjUgQzQ2LjA5ODg2MTU0IDU3LjE2ODU1NzQzIDQ2LjMzMTUxMjE1IDU3Ljk4OTQ1ODYyIDQ2LjU3MTIxMjc3IDU4LjgzNTIzNTYgQzQ3LjU5NzA1OTYyIDYyLjYyOTkxNzMyIDQ4LjE3Njk1NCA2NS4yNDE1Njk1OCA0NyA2OSBDNDUuODE2NjQwNjIgNjguNjAxNjc5NjkgNDQuNjMzMjgxMjUgNjguMjAzMzU5MzcgNDMuNDE0MDYyNSA2Ny43OTI5Njg3NSBDMzMuNTAyODU4MTIgNjQuNDM5MjkzODYgMzMuNTAyODU4MTIgNjQuNDM5MjkzODYgMjMuNSA2MS4zNzUgQzIwLjM5MzIzOTMzIDYwLjQ3MTA2NzcyIDE3LjQzNTQwNDA3IDU5LjM5ODY4MjA5IDE0LjQ0Nzk5ODA1IDU4LjE1NzcxNDg0IEM4LjgyMDg4MDM4IDU1Ljg4MzYwNTg4IDMuMTAwNzAxOTEgNTMuOTgxMTgwNiAtMi42Njc5Njg3NSA1Mi4xMDE1NjI1IEMtNC44ODI0MzI4NyA1MS4zNjgwMDYzNCAtNy4wOTY2MTc1MyA1MC42MzM2MDYwOCAtOS4zMTA1NDY4OCA0OS44OTg0Mzc1IEMtMTIuNzU3NDc4NzkgNDguNzU2MjY0NyAtMTYuMjA1NzAxMjkgNDcuNjE5MDgwOTYgLTE5LjY1ODkzNTU1IDQ2LjQ5NjA5Mzc1IEMtMjMuMDIxMzExNDEgNDUuNDAwNTEyMjYgLTI2LjM3NjE3OTYzIDQ0LjI4NDEyMDY5IC0yOS43MzA0Njg3NSA0My4xNjQwNjI1IEMtMzAuNzU2NjU4MTcgNDIuODM1NzI0MTggLTMxLjc4Mjg0NzYgNDIuNTA3Mzg1ODYgLTMyLjg0MDEzMzY3IDQyLjE2OTA5NzkgQy0zOC44MDgxMjY4IDQwLjE1MzYwMjQ3IC00My44NTcyNDQ2OCAzNy45MDM0OTM3NCAtNDggMzMgQy00OS42NTExMjQ1NCAyOC4wNDY2MjYzOSAtNDkuODU5NjcxMzggMjMuMDM2MDYzOCAtNDcuODEyNSAxOC4xODc1IEMtNDQuMjg2MTM3NTIgMTMuOTMxNTQ1MjggLTQxLjcyNTM5ODI5IDExLjg3NTk0NzY5IC0zNi4xODc1IDExLjI1IEMtMzQuNzkyNzY5NiAxMS4xNDk4ODg4NSAtMzMuMzk2OTkzMTQgMTEuMDYwODcxMTYgLTMyIDExIEMtNTQuODU5ODA4MjUgLTMuMTg4ODQ2NSAtNzguNDIzNjc1OCAtMTMuOTIxOTA5NTQgLTEwNSAtMTkgQy0xMDUuODU2MDk4NjMgLTE5LjE2MzcxMDk0IC0xMDYuNzEyMTk3MjcgLTE5LjMyNzQyMTg3IC0xMDcuNTk0MjM4MjggLTE5LjQ5NjA5Mzc1IEMtMTU3LjgwNzgwMzE2IC0yOC42MzQ0MTUwMSAtMjExLjk2NDMxMzk3IC0xNy4wMTg1MTAwNiAtMjU0LjE1NzcxNDg0IDExLjcwNzAzMTI1IEMtMjY0LjExNDI0NjA3IDE4LjY5NDgxMTQ1IC0yNzMuMjA4NTU4OTggMjYuNjEzMTg1OTcgLTI4MiAzNSBDLTI4Mi44NTIwNzAzMSAzNS43OTkyMTg3NSAtMjgzLjcwNDE0MDYyIDM2LjU5ODQzNzUgLTI4NC41ODIwMzEyNSAzNy40MjE4NzUgQy0zMTkuMzk4Mjc0NTYgNzAuOTc3MDU3NTIgLTM0MC4wNTk1NzA1NyAxMjEuMTczMjExNjUgLTM0MS4yMDMxMjUgMTY5LjI5Mjk2ODc1IEMtMzQxLjY5OTk0NDYgMjEzLjAwOTkyODgzIC0zMzEuMzU4Nzg5MjYgMjU2LjMzNTA1MDQyIC0zMDUgMjkyIEMtMzA0LjIzMzAwNzgxIDI5My4wNDkyOTY4NyAtMzAzLjQ2NjAxNTYzIDI5NC4wOTg1OTM3NSAtMzAyLjY3NTc4MTI1IDI5NS4xNzk2ODc1IEMtMjk2LjkyNzc3ODc1IDMwMi45MTE3NjYyOSAtMjkwLjY0ODMwNzkgMzEwLjAzNTEwNjAxIC0yODQgMzE3IEMtMjgzLjE5OTQ5MjE5IDMxNy44NTMzNTkzOCAtMjgyLjM5ODk4NDM3IDMxOC43MDY3MTg3NSAtMjgxLjU3NDIxODc1IDMxOS41ODU5Mzc1IEMtMjQ4LjAyMjExOTY2IDM1NC40MDEwNDUyMyAtMTk3LjgyMjkzNDM1IDM3NS4wNTk2NjIxNiAtMTQ5LjcwNzAzMTI1IDM3Ni4yMDMxMjUgQy0xMDEuNzQ0MzQwNTEgMzc2Ljc0ODE1NTU4IC01NS42ODY4NTMgMzYzLjM2NjAxNDI1IC0xOCAzMzMgQy0xNy4yMjE5NzAyMSAzMzIuMzc0MjQwNzIgLTE3LjIyMTk3MDIxIDMzMi4zNzQyNDA3MiAtMTYuNDI4MjIyNjYgMzMxLjczNTgzOTg0IEMtMy4zMjY2MzQ2OCAzMjEuMTI2NDIzMTIgNy45ODk4NDczNCAzMDkuNTczNDEzNzYgMTggMjk2IEMxOS4xNzM2OTE0MSAyOTQuNDA4NjUyMzQgMTkuMTczNjkxNDEgMjk0LjQwODY1MjM0IDIwLjM3MTA5Mzc1IDI5Mi43ODUxNTYyNSBDMjguMjc4NzQ3OTMgMjgxLjY5Nzk5NDY3IDM0LjkwMjUyOTYzIDI2OS44NTczNzI3OSA0MC41MTU2MjUgMjU3LjQ1MzEyNSBDNDIuNjE4NzIzODcgMjUzLjk3NzQ3NzQgNDUuMTM1MDI1MDUgMjUxLjYyNTI1MTcyIDQ5LjAyNzM0Mzc1IDI1MC4zMjAzMTI1IEM1My41MTE4NTY2NCAyNDkuODYxNzczMzUgNTYuODIzMzc1OTMgMjUwLjAwNjYxMTI0IDYxIDI1MiBDNjMuOTIxMTQ0NDQgMjU0LjUyNjM5NTE5IDY1LjgxOTk5MjQzIDI1Ni4zNDc5MTQ2OCA2Ni4yNDcwNzAzMSAyNjAuMjY3NTc4MTIgQzY2LjQ1NzI2NDQ5IDI2Ny40MzQ0Mzk3NSA2NS4xNjY5OTgxNiAyNzIuMjUwMDk1IDYxLjc1IDI3OC41IEM2MS4zMDE4MDkwOCAyNzkuMzUyMzkyNTggNjAuODUzNjE4MTYgMjgwLjIwNDc4NTE2IDYwLjM5MTg0NTcgMjgxLjA4MzAwNzgxIEM0OS40NTc1MTExOCAzMDEuNTEwODIwMTIgMzUuOTYwNDQ5ODUgMzE5LjI2ODQwMTAzIDIwIDMzNiBDMTguNjk0ODI0MjIgMzM3LjM4NDQ1MzEyIDE4LjY5NDgyNDIyIDMzNy4zODQ0NTMxMiAxNy4zNjMyODEyNSAzMzguNzk2ODc1IEMxMC40MzQ2MDU1MyAzNDUuOTU4MTkyMzggMi45NjI3NDkzNSAzNTIuMDM4OTM2MjYgLTUgMzU4IEMtNS41NDQ2Mjg5MSAzNTguNDE2MDQ0OTIgLTYuMDg5MjU3ODEgMzU4LjgzMjA4OTg0IC02LjY1MDM5MDYyIDM1OS4yNjA3NDIxOSBDLTQ0LjE3MTYzNTc4IDM4Ny44NjY3MjE3MiAtODkuMjY5OTI4NDQgNDAxLjcxNzY0NjM4IC0xMzYgNDA0IEMtMTM3LjIwMjY5NTMxIDQwNC4wNjA1ODU5NCAtMTM4LjQwNTM5MDYyIDQwNC4xMjExNzE4OCAtMTM5LjY0NDUzMTI1IDQwNC4xODM1OTM3NSBDLTE4NS4wMDgyMzg1MyA0MDUuMTk0MzE4NTUgLTIzMy4yNzQ2Nzc2NyAzOTAuNzE0MTkyMTkgLTI3MCAzNjQgQy0yNzAuOTY2Nzk2ODggMzYzLjMwNTE5NTMxIC0yNzEuOTMzNTkzNzUgMzYyLjYxMDM5MDYyIC0yNzIuOTI5Njg3NSAzNjEuODk0NTMxMjUgQy0yOTIuMTgyNzQ0NTUgMzQ3Ljc2NzI4ODA5IC0zMDkuOTk0MzIxMiAzMzEuNDIxMjA3OTQgLTMyNCAzMTIgQy0zMjQuNzYzMTI1IDMxMC45NTg0Mzc1IC0zMjUuNTI2MjUgMzA5LjkxNjg3NSAtMzI2LjMxMjUgMzA4Ljg0Mzc1IEMtMzYwLjYzMTc2NDM1IDI2MC43MDE0NDg2MiAtMzc1LjQzMTYyODI2IDIwMS4zODk5NTM5OCAtMzY2LjUwNjgzNTk0IDE0Mi43NjAyNTM5MSBDLTM2MC44Nzc3OTg0NyAxMDkuMzQzNTA4MjQgLTM0OC45Mzg4ODA1MyA3Ni42MzE4MzQ0MyAtMzI5IDQ5IEMtMzI4LjMwMzkwNjI1IDQ4LjAzMDYyNSAtMzI3LjYwNzgxMjUgNDcuMDYxMjUgLTMyNi44OTA2MjUgNDYuMDYyNSBDLTMxMi43NTYyNTE3NiAyNi44MTU2OTM4OSAtMjk2LjQyMTI4OTQ4IDkuMDA1NzM3NiAtMjc3IC01IEMtMjc1Ljk1ODQzNzUgLTUuNzYzMTI1IC0yNzQuOTE2ODc1IC02LjUyNjI1IC0yNzMuODQzNzUgLTcuMzEyNSBDLTE5OS40NzAyOTYyOSAtNjAuMzMxMTk5NjggLTk1LjI0NjQxNDMgLTY1LjMxNjg1NDg2IDAgMCBaICIgZmlsbD0iIzAwMDAwMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzk4LDc5KSIgZGF0YS1pbmRleD0iMCIgc3R5bGU9Im9wYWNpdHk6IDE7IHZpc2liaWxpdHk6IHZpc2libGU7IGZpbGw6IHJnYigyNTUsIDI1NSwgMjU1KTsiPjwvcGF0aD4KPHBhdGggZD0iTTAgMCBDNC4xODgzNzgwNyAzLjk2MjM0OTE5IDQuODk3NTUxNDEgNy45NTkyNzc5NiA1LjA4NjA3MTAxIDEzLjU0OTI3MDYzIEM1LjE0NDMzNTY5IDE2Ljc0MzI3MDA4IDUuMTI1MjExNjkgMTkuOTMzODUwOTQgNS4xMDA1MzYzNSAyMy4xMjgxMjgwNSBDNS4xMDg2NzIyIDI0Ljg5MTE5MjYyIDUuMTE5MzU4NDYgMjYuNjU0MjQ2OTggNS4xMzIzOTY3IDI4LjQxNzI4MjEgQzUuMTU5NzA0NTMgMzMuMTk0MzAwMDUgNS4xNDkxNjM3MiAzNy45NzA1Mzg4MiA1LjEzMDEyMjE4IDQyLjc0NzU3MDA0IEM1LjExNDkwODQ3IDQ3Ljc1MTgwMzc1IDUuMTI5MDI1ODcgNTIuNzU1OTcxNzMgNS4xMzg0MzkxOCA1Ny43NjAyMDgxMyBDNS4xNDkzNDg0MiA2Ni4xNjMyNDMxMSA1LjEzNDk4NjkyIDc0LjU2NTk2MTQ3IDUuMTA2Mzk1NzIgODIuOTY4OTQ4MzYgQzUuMDczNzQzMjMgOTIuNjc3NTM3NTkgNS4wODQzMjA3IDEwMi4zODUzNzA3OCA1LjExNzM1NDE1IDExMi4wOTM5NDE2OSBDNS4xNDQ2MDEwNyAxMjAuNDM2NDM5NDQgNS4xNDg0MTUgMTI4Ljc3ODcwOTg3IDUuMTMyNzIyMTQgMTM3LjEyMTIzNzc1IEM1LjEyMzM3ODMyIDE0Mi4xMDA4NDM1NyA1LjEyMjA5MjE1IDE0Ny4wODAwOTQyNiA1LjE0MTk0MTA3IDE1Mi4wNTk2NzcxMiBDNS4xNTkzMDE1OCAxNTYuNzQxODU2MiA1LjE0NzIwMTA0IDE2MS40MjMwNjI2NCA1LjExMjU3NTUzIDE2Ni4xMDUxMzY4NyBDNS4xMDQ2NTY3IDE2Ny44MjExNzIyIDUuMTA2ODk1NjQgMTY5LjUzNzI4OTY5IDUuMTIwMTUxNTIgMTcxLjI1MzI5MjA4IEM1LjIyMjMyNTAzIDE4NS44MjU4MDYzMiA1LjIyMjMyNTAzIDE4NS44MjU4MDYzMiAxLjUyMTczOTk2IDE5MC4zOTQ5NzM3NSBDLTEuNjg5MTIwNTkgMTkzLjQyMzU3MTY4IC01LjI2NjAwNDM3IDE5NC44Njk4MTk3NSAtOS42NzU4MzA4NCAxOTQuOTIxMDk2OCBDLTE1LjE0ODQyOTkzIDE5My40MzcwMDIxMyAtMTguNzU1MjUzNDEgMTkwLjc3MzI2OTMxIC0yMS42NzU4MzA4NCAxODUuOTIxMDk2OCBDLTIyLjMwNzgyOTg2IDE4Mi4zOTEyMzYzMSAtMjIuMzA3ODI5ODYgMTgyLjM5MTIzNjMxIC0yMi4zMTc0NzgxOCAxNzguNDEzMTc3NDkgQy0yMi4zMjU5ODM3IDE3Ny42Nzc5NTA0OCAtMjIuMzM0NDg5MjIgMTc2Ljk0MjcyMzQ2IC0yMi4zNDMyNTI0OCAxNzYuMTg1MjE2ODQgQy0yMi4zNjU0NjEzNCAxNzMuNzMyMTgxIC0yMi4zNTIxMDQ5MSAxNzEuMjgwNjcwOTUgLTIyLjMzODY3MjY0IDE2OC44Mjc1OTA5NCBDLTIyLjM0NzA4ODcxIDE2Ny4wNjQ2NzYwOCAtMjIuMzU3NjE1MTEgMTY1LjMwMTc3MDIxIC0yMi4zNzAwOTA0OCAxNjMuNTM4ODc5MzkgQy0yMi4zOTcxMzY1NSAxNTguNzU3NzY1NyAtMjIuMzkyNDM4MjkgMTUzLjk3NzE3Mzg5IC0yMi4zODAzODk5MyAxNDkuMTk2MDE3NSBDLTIyLjM3MzI1NjU0IDE0NS4yMDI0MTkxMSAtMjIuMzgxNzU5MzQgMTQxLjIwODkxNzEgLTIyLjM5MDI5NTMzIDEzNy4yMTUzMjYyNSBDLTIyLjQxMDI0NjYzIDEyNy43OTMwMjQwNiAtMjIuNDA0Njc5NSAxMTguMzcwOTc1NTkgLTIyLjM4MjYxNzk1IDEwOC45NDg2ODQ2OSBDLTIyLjM2MDI1NTE4IDk5LjIzMjc0NzU1IC0yMi4zNzc4NTE5NiA4OS41MTc0NzQ4NyAtMjIuNDE1NjY3MjQgNzkuODAxNjAwNTIgQy0yMi40NDY5MTA5MSA3MS40NTQ4OTA5NCAtMjIuNDU0ODE0MTQgNjMuMTA4Mzg2OTUgLTIyLjQ0MzcxMzQ5IDU0Ljc2MTYyNjE4IEMtMjIuNDM3MjI4NzYgNDkuNzc4NjM1NDMgLTIyLjQzOTIxNzQ2IDQ0Ljc5NjAyODA2IC0yMi40NjMwMzc0OSAzOS44MTMwODE3NCBDLTIyLjQ4NDI5ODY2IDM1LjEyNjgzOTI3IC0yMi40NzYzMDAxIDMwLjQ0MTUzMzY1IC0yMi40NDU5NDM4MyAyNS43NTUzNTAxMSBDLTIyLjQzOTYxOTQ2IDI0LjAzNzY5MzMzIC0yMi40NDM0NzAwNCAyMi4zMTk5NjM3MSAtMjIuNDU4MzU0OTUgMjAuNjAyMzU5NzcgQy0yMi41NzQ1Mjk2MyA2LjAxMTY4NjEzIC0yMi41NzQ1Mjk2MyA2LjAxMTY4NjEzIC0xOC44MDc5ODcyMSAxLjQ0MjMyMTc4IEMtMTMuMDI2MDU3MTIgLTMuODg2MjgzNjggLTYuNTI1NzY4MzQgLTQuMjAxMzAyNTIgMCAwIFogIiBmaWxsPSIjMDAwMDAwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzMjguNjc1ODMwODQxMDY0NDUsMTYwLjA3ODkwMzE5ODI0MjIpIiBkYXRhLWluZGV4PSIxIiBzdHlsZT0ib3BhY2l0eTogMTsgdmlzaWJpbGl0eTogdmlzaWJsZTsgZmlsbDogcmdiKDI1NSwgMjU1LCAyNTUpOyI+PC9wYXRoPgo8cGF0aCBkPSJNMCAwIEM0LjE4ODM3ODA3IDMuOTYyMzQ5MTkgNC44OTc1NTE0MSA3Ljk1OTI3Nzk2IDUuMDg2MDcxMDEgMTMuNTQ5MjcwNjMgQzUuMTQ0MzM1NjkgMTYuNzQzMjcwMDggNS4xMjUyMTE2OSAxOS45MzM4NTA5NCA1LjEwMDUzNjM1IDIzLjEyODEyODA1IEM1LjEwODY3MjIgMjQuODkxMTkyNjIgNS4xMTkzNTg0NiAyNi42NTQyNDY5OCA1LjEzMjM5NjcgMjguNDE3MjgyMSBDNS4xNTk3MDQ1MyAzMy4xOTQzMDAwNSA1LjE0OTE2MzcyIDM3Ljk3MDUzODgyIDUuMTMwMTIyMTggNDIuNzQ3NTcwMDQgQzUuMTE0OTA4NDcgNDcuNzUxODAzNzUgNS4xMjkwMjU4NyA1Mi43NTU5NzE3MyA1LjEzODQzOTE4IDU3Ljc2MDIwODEzIEM1LjE0OTM0ODQyIDY2LjE2MzI0MzExIDUuMTM0OTg2OTIgNzQuNTY1OTYxNDcgNS4xMDYzOTU3MiA4Mi45Njg5NDgzNiBDNS4wNzM3NDMyMyA5Mi42Nzc1Mzc1OSA1LjA4NDMyMDcgMTAyLjM4NTM3MDc4IDUuMTE3MzU0MTUgMTEyLjA5Mzk0MTY5IEM1LjE0NDYwMTA3IDEyMC40MzY0Mzk0NCA1LjE0ODQxNSAxMjguNzc4NzA5ODcgNS4xMzI3MjIxNCAxMzcuMTIxMjM3NzUgQzUuMTIzMzc4MzIgMTQyLjEwMDg0MzU3IDUuMTIyMDkyMTUgMTQ3LjA4MDA5NDI2IDUuMTQxOTQxMDcgMTUyLjA1OTY3NzEyIEM1LjE1OTMwMTU4IDE1Ni43NDE4NTYyIDUuMTQ3MjAxMDQgMTYxLjQyMzA2MjY0IDUuMTEyNTc1NTMgMTY2LjEwNTEzNjg3IEM1LjEwNDY1NjcgMTY3LjgyMTE3MjIgNS4xMDY4OTU2NCAxNjkuNTM3Mjg5NjkgNS4xMjAxNTE1MiAxNzEuMjUzMjkyMDggQzUuMjIyMzI1MDMgMTg1LjgyNTgwNjMyIDUuMjIyMzI1MDMgMTg1LjgyNTgwNjMyIDEuNTIxNzM5OTYgMTkwLjM5NDk3Mzc1IEMtMS42ODkxMjA1OSAxOTMuNDIzNTcxNjggLTUuMjY2MDA0MzcgMTk0Ljg2OTgxOTc1IC05LjY3NTgzMDg0IDE5NC45MjEwOTY4IEMtMTUuMTQ4NDI5OTMgMTkzLjQzNzAwMjEzIC0xOC43NTUyNTM0MSAxOTAuNzczMjY5MzEgLTIxLjY3NTgzMDg0IDE4NS45MjEwOTY4IEMtMjIuMzA3ODI5ODYgMTgyLjM5MTIzNjMxIC0yMi4zMDc4Mjk4NiAxODIuMzkxMjM2MzEgLTIyLjMxNzQ3ODE4IDE3OC40MTMxNzc0OSBDLTIyLjMyNTk4MzcgMTc3LjY3Nzk1MDQ4IC0yMi4zMzQ0ODkyMiAxNzYuOTQyNzIzNDYgLTIyLjM0MzI1MjQ4IDE3Ni4xODUyMTY4NCBDLTIyLjM2NTQ2MTM0IDE3My43MzIxODEgLTIyLjM1MjEwNDkxIDE3MS4yODA2NzA5NSAtMjIuMzM4NjcyNjQgMTY4LjgyNzU5MDk0IEMtMjIuMzQ3MDg4NzEgMTY3LjA2NDY3NjA4IC0yMi4zNTc2MTUxMSAxNjUuMzAxNzcwMjEgLTIyLjM3MDA5MDQ4IDE2My41Mzg4NzkzOSBDLTIyLjM5NzEzNjU1IDE1OC43NTc3NjU3IC0yMi4zOTI0MzgyOSAxNTMuOTc3MTczODkgLTIyLjM4MDM4OTkzIDE0OS4xOTYwMTc1IEMtMjIuMzczMjU2NTQgMTQ1LjIwMjQxOTExIC0yMi4zODE3NTkzNCAxNDEuMjA4OTE3MSAtMjIuMzkwMjk1MzMgMTM3LjIxNTMyNjI1IEMtMjIuNDEwMjQ2NjMgMTI3Ljc5MzAyNDA2IC0yMi40MDQ2Nzk1IDExOC4zNzA5NzU1OSAtMjIuMzgyNjE3OTUgMTA4Ljk0ODY4NDY5IEMtMjIuMzYwMjU1MTggOTkuMjMyNzQ3NTUgLTIyLjM3Nzg1MTk2IDg5LjUxNzQ3NDg3IC0yMi40MTU2NjcyNCA3OS44MDE2MDA1MiBDLTIyLjQ0NjkxMDkxIDcxLjQ1NDg5MDk0IC0yMi40NTQ4MTQxNCA2My4xMDgzODY5NSAtMjIuNDQzNzEzNDkgNTQuNzYxNjI2MTggQy0yMi40MzcyMjg3NiA0OS43Nzg2MzU0MyAtMjIuNDM5MjE3NDYgNDQuNzk2MDI4MDYgLTIyLjQ2MzAzNzQ5IDM5LjgxMzA4MTc0IEMtMjIuNDg0Mjk4NjYgMzUuMTI2ODM5MjcgLTIyLjQ3NjMwMDEgMzAuNDQxNTMzNjUgLTIyLjQ0NTk0MzgzIDI1Ljc1NTM1MDExIEMtMjIuNDM5NjE5NDYgMjQuMDM3NjkzMzMgLTIyLjQ0MzQ3MDA0IDIyLjMxOTk2MzcxIC0yMi40NTgzNTQ5NSAyMC42MDIzNTk3NyBDLTIyLjU3NDUyOTYzIDYuMDExNjg2MTMgLTIyLjU3NDUyOTYzIDYuMDExNjg2MTMgLTE4LjgwNzk4NzIxIDEuNDQyMzIxNzggQy0xMy4wMjYwNTcxMiAtMy44ODYyODM2OCAtNi41MjU3NjgzNCAtNC4yMDEzMDI1MiAwIDAgWiAiIGZpbGw9IiMwMDAwMDAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIwMC42NzU4MzA4NDEwNjQ0NSwxNjAuMDc4OTAzMTk4MjQyMikiIGRhdGEtaW5kZXg9IjIiIHN0eWxlPSJvcGFjaXR5OiAxOyB2aXNpYmlsaXR5OiB2aXNpYmxlOyBmaWxsOiByZ2IoMjU1LCAyNTUsIDI1NSk7Ij48L3BhdGg+Cjwvc3ZnPg==",Q3=F.getComponent("Button");class Vx extends Q3{constructor(e,i){if(super(e,i),this.userPreferences=i.userPreferences,this.userPreferences){const r=this.userPreferences.getPreference("autoplay");this.isAutoplayEnabled=r===!0}else this.isAutoplayEnabled=!1;this.updateIcon=this.updateIcon.bind(this),this.handleClick=this.handleClick.bind(this)}createEl(){const e=super.createEl("button",{className:"vjs-autoplay-toggle vjs-control vjs-button",type:"button",title:this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off","aria-label":this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off"});this.iconSpan=F.dom.createEl("span",{"aria-hidden":"true",className:"vjs-autoplay-icon"}),this.isAutoplayEnabled?this.iconSpan.innerHTML=`<img src="${Hx}" alt="Autoplay on" style="width: 26px; height: 26px;" />`:this.iconSpan.innerHTML=`<img src="${Fx}" alt="Autoplay off" style="width: 26px; height: 26px;" />`;const i=F.dom.createEl("span",{className:"vjs-control-text"});return i.textContent=this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off",e.appendChild(this.iconSpan),e.appendChild(i),this.addTouchSupport(e),e}updateIcon(){this.iconSpan.style.transition="opacity 0.1s ease",this.iconSpan.style.opacity="0",setTimeout(()=>{if(this.isAutoplayEnabled){if(this.iconSpan.innerHTML=`<img src="${Hx}" alt="Autoplay on" style="width: 26px; height: 26px;" />`,this.el()){this.el().title="Autoplay is on",this.el().setAttribute("aria-label","Autoplay is on");const e=this.el().querySelector(".vjs-control-text");e&&(e.textContent="Autoplay is on")}}else if(this.iconSpan.innerHTML=`<img src="${Fx}" alt="Autoplay off" style="width: 26px; height: 26px;" />`,this.el()){this.el().title="Autoplay is off",this.el().setAttribute("aria-label","Autoplay is off");const e=this.el().querySelector(".vjs-control-text");e&&(e.textContent="Autoplay is off")}this.iconSpan.style.opacity="1"},100)}handleClick(){this.isAutoplayEnabled=!this.isAutoplayEnabled,this.userPreferences&&this.userPreferences.setAutoplayPreference(this.isAutoplayEnabled),this.updateIcon(),this.player().trigger("autoplayToggle",{autoplay:this.isAutoplayEnabled})}setAutoplayState(e){this.isAutoplayEnabled=e,this.updateIcon()}addTouchSupport(e){if(!(this.options_.isTouchDevice||"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0))return;let r=0;e.addEventListener("touchstart",o=>{r=Date.now()},{passive:!0}),e.addEventListener("touchend",o=>{const l=Date.now()-r,c=window.innerWidth<=767;l<500&&c&&(o.preventDefault(),o.stopPropagation(),e.classList.add("touch-active"),setTimeout(()=>{e.classList.remove("touch-active")},1500))},{passive:!1})}}F.registerComponent("AutoplayToggleButton",Vx);const m8="",G3=F.getComponent("Component");class Uy extends G3{constructor(e,i){super(e,i),this.updateContent=this.updateContent.bind(this),this.on(e,"timeupdate",this.updateContent),this.on(e,"durationchange",this.updateContent),this.on(e,"loadedmetadata",this.updateContent),this.options_={displayNegative:!1,customPrefix:"",customSuffix:"",...i}}createEl(){const e=F.dom.createEl("div",{className:"vjs-remaining-time vjs-time-control vjs-control custom-remaining-time"});return e.innerHTML=`
<span class="vjs-control-text" role="presentation">Time Display&nbsp;</span>
<span class="vjs-remaining-time-display" role="presentation">0:00 / 0:00</span>
`,e}updateContent(){const e=this.player(),i=e.currentTime(),r=e.duration(),o=this.el().querySelector(".vjs-remaining-time-display");if(o){const l=this.formatTime(isNaN(i)?0:i),c=this.formatTime(isNaN(r)?0:r);o.textContent=`${l} / ${c}`}}formatTime(e){const{customPrefix:i,customSuffix:r}=this.options_,o=Math.floor(e/3600),l=Math.floor(e%3600/60),c=Math.floor(e%60);let f;return o>0?f=`${o}:${l.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`:f=`${l}:${c.toString().padStart(2,"0")}`,`${i}${f}${r}`}dispose(){super.dispose()}}Uy.prototype.controlText_="Time Display",F.registerComponent("CustomRemainingTime",Uy);const g8="",X3=F.getComponent("Component");class Py extends X3{constructor(e,i){super(e,i),this.chaptersData=i.chaptersData||[],this.overlay=null,this.chaptersList=null,this.seriesTitle=i.seriesTitle||"Chapters",this.channelName=i.channelName||"",this.thumbnail=i.thumbnail||"",this.isScrolling=!1,this.createOverlay=this.createOverlay.bind(this),this.updateCurrentChapter=this.updateCurrentChapter.bind(this),this.toggleOverlay=this.toggleOverlay.bind(this),this.formatTime=this.formatTime.bind(this),this.getChapterTimeRange=this.getChapterTimeRange.bind(this),this.player().ready(()=>{this.createOverlay(),this.setupChaptersButton()})}formatTime(e){const i=Math.max(0,Math.floor(e)),r=Math.floor(i/3600),o=Math.floor(i%3600/60),l=i%60;return`${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}:${String(l).padStart(2,"0")}`}getChapterTimeRange(e){const i=this.formatTime(e.startTime),r=this.formatTime(e.endTime||e.startTime);return`${i} - ${r}`}createOverlay(){if(!this.chaptersData||this.chaptersData.length===0)return;const e=this.player().el();this.overlay=document.createElement("div"),this.overlay.className="custom-chapters-overlay",this.overlay.style.cssText=`
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
z-index: 9999;
display: none;
pointer-events: auto;
background: rgba(0, 0, 0, 0.35);
`,this.overlay.addEventListener("click",S=>{S.target===this.overlay&&this.closeOverlay()});const i=document.createElement("div");i.className="video-chapter",i.style.cssText=`
pointer-events: auto;
z-index: 9999999;
`,this.overlay.appendChild(i);const r=document.createElement("div");r.className="chapter-head",i.appendChild(r);const o=document.createElement("div");o.className="playlist-title",r.appendChild(o);const l=document.createElement("div");l.className="chapter-title",l.innerHTML=`
<h3><a href="#">${this.seriesTitle}</a></h3>
<p><a href="#">${this.channelName}</a> <span>1 / ${this.chaptersData.length}</span></p>
`,o.appendChild(l),this.currentChapterSpan=l.querySelector("span");const c=document.createElement("div");c.className="chapter-close";const f=document.createElement("button");f.setAttribute("aria-label","Close chapters"),f.innerHTML=`
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.7096 12L20.8596 20.15L20.1496 20.86L11.9996 12.71L3.84965 20.86L3.13965 20.15L11.2896 12L3.14965 3.85001L3.85965 3.14001L11.9996 11.29L20.1496 3.14001L20.8596 3.85001L12.7096 12Z" fill="currentColor"/>
</svg>
`,f.onclick=()=>{this.overlay.style.display="none";const S=this.player().el();S&&S.classList.remove("chapters-open")},c.appendChild(f),o.appendChild(c);const p=document.createElement("div");p.className="chapter-body",p.style.cssText+=`
-webkit-overflow-scrolling: touch;
touch-action: pan-y;
overscroll-behavior: contain;
`,i.appendChild(p);const v=document.createElement("ul");p.appendChild(v),this.chaptersList=v,this.chaptersData.forEach((S,x)=>{const D=document.createElement("li"),k=document.createElement("div");k.className=`playlist-items ${x===0?"selected":""}`;const I=document.createElement("a");I.href="#",I.onclick=ge=>ge.preventDefault();const C=document.createElement("div");C.className="playlist-drag-handle",C.textContent=x===0?"▶":String(x+1);const P=document.createElement("div");P.className="thumbnail-meta";const U=Math.max(0,Math.floor((S.endTime||S.startTime)-S.startTime)),Y=Math.floor(U/3600),$=Math.floor(U%3600/60),G=U%60,W=Y>0?`${String(Y).padStart(2,"0")}:${String($).padStart(2,"0")}:${String(G).padStart(2,"0")}`:`${String($).padStart(2,"0")}:${String(G).padStart(2,"0")}`,oe=document.createElement("h4");oe.textContent=S.chapterTitle;const K=document.createElement("div");K.className="meta-sub";const de=document.createElement("span");de.className="meta-dynamic";const fe=this.getChapterTimeRange(S);de.textContent=fe,de.setAttribute("data-duration",W),de.setAttribute("data-time-range",fe),K.appendChild(de),P.appendChild(oe),P.appendChild(K);const me=document.createElement("div");me.className="thumbnail-action";const le=document.createElement("button");le.innerHTML=`
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 16.5C12.83 16.5 13.5 17.17 13.5 18C13.5 18.83 12.83 19.5 12 19.5C11.17 19.5 10.5 18.83 10.5 18C10.5 17.17 11.17 16.5 12 16.5ZM10.5 12C10.5 12.83 11.17 13.5 12 13.5C12.83 13.5 13.5 12.83 13.5 12C13.5 11.17 12.83 10.5 12 10.5C11.17 10.5 10.5 11.17 10.5 12ZM10.5 6C10.5 6.83 11.17 7.5 12 7.5C12.83 7.5 13.5 6.83 13.5 6C13.5 5.17 12.83 4.5 12 4.5C11.17 4.5 10.5 5.17 10.5 6Z" fill="currentColor"/>
</svg>`,me.appendChild(le);const _e=ge=>{(ge.type==="click"||ge.type==="touchend"&&!this.isScrolling)&&(ge.preventDefault(),this.player().currentTime(S.startTime),this.overlay.style.display="none",this.updateActiveItem(x))};let he=0;k.addEventListener("touchstart",ge=>{he=ge.touches[0].clientY,this.isScrolling=!1},{passive:!0}),k.addEventListener("touchmove",ge=>{const Ae=ge.touches[0].clientY;Math.abs(Ae-he)>10&&(this.isScrolling=!0)},{passive:!0}),k.addEventListener("touchend",_e,{passive:!1}),k.addEventListener("click",_e),I.appendChild(C),I.appendChild(P),I.appendChild(me),k.appendChild(I),D.appendChild(k),this.chaptersList.appendChild(D)}),e.appendChild(this.overlay),this.player().on("timeupdate",this.updateCurrentChapter)}setupChaptersButton(){const e=this.player().getChild("controlBar").getChild("chaptersButton");e&&(e.off("click"),e.on("click",this.toggleOverlay),e.on("touchstart",this.toggleOverlay))}toggleOverlay(){if(!this.overlay)return;const e=this.player().el(),i=this.overlay.style.display==="none"||!this.overlay.style.display;this.overlay.style.display=i?"block":"none",e&&e.classList.toggle("chapters-open",i);try{this.player().el().querySelectorAll(".vjs-menu").forEach(r=>{r.classList.remove("vjs-lock-showing"),r.style.display="none"})}catch{}}updateCurrentChapter(){if(!this.chaptersList||!this.chaptersData)return;const e=this.player().currentTime(),i=this.chaptersList.querySelectorAll(".playlist-items");let r=-1;i.forEach((o,l)=>{const c=this.chaptersData[l],f=e>=c.startTime&&(l===this.chaptersData.length-1||e<this.chaptersData[l+1].startTime),p=o.querySelector(".playlist-drag-handle"),v=o.querySelector(".meta-dynamic");f?(r=l,o.classList.add("selected"),p&&(p.textContent="▶"),v&&(v.textContent=v.getAttribute("data-time-range")||this.getChapterTimeRange(c))):(o.classList.remove("selected"),p&&(p.textContent=String(l+1)),v&&(v.textContent=v.getAttribute("data-time-range")||this.getChapterTimeRange(c)))}),this.currentChapterSpan&&r!==-1&&(this.currentChapterSpan.textContent=`${r+1} / ${this.chaptersData.length}`)}updateActiveItem(e){this.chaptersList.querySelectorAll(".playlist-items").forEach((r,o)=>{const l=r.querySelector(".playlist-drag-handle"),c=r.querySelector(".meta-dynamic");if(o===e)r.classList.add("selected"),l&&(l.textContent="▶"),c&&(c.textContent=c.getAttribute("data-duration")||"");else if(r.classList.remove("selected"),l&&(l.textContent=String(o+1)),c){const f=c.getAttribute("data-time-range");if(f)c.textContent=f;else{const p=this.chaptersData[o];p&&(c.textContent=this.getChapterTimeRange(p))}}}),this.currentChapterSpan&&(this.currentChapterSpan.textContent=`${e+1} / ${this.chaptersData.length}`)}closeOverlay(){if(this.overlay){this.overlay.style.display="none";const e=this.player().el();e&&e.classList.remove("chapters-open")}}dispose(){this.overlay&&this.overlay.remove();const e=this.player().el();e&&e.classList.remove("chapters-open"),super.dispose()}}Py.prototype.controlText_="Chapters Overlay",F.registerComponent("CustomChaptersOverlay",Py);const y8="",T8="";class $x{constructor(){this.storageKey="videojs_user_preferences",this.isRestoringSubtitles=!1,this.subtitleAutoSaveDisabled=!1,this.defaultPreferences={volume:1,playbackRate:1,quality:"auto",subtitleLanguage:null,subtitleEnabled:!1,muted:!1,autoplay:!0}}getPreferences(){try{const e=localStorage.getItem(this.storageKey);if(e){const i=JSON.parse(e);return{...this.defaultPreferences,...i}}}catch(e){console.warn("Error reading user preferences from localStorage:",e)}return{...this.defaultPreferences}}savePreferences(e){try{const r={...this.getPreferences(),...e};localStorage.setItem(this.storageKey,JSON.stringify(r))}catch(i){console.warn("Error saving user preferences to localStorage:",i)}}getPreference(e){return this.getPreferences()[e]}setPreference(e,i,r=!1){if(e==="subtitleLanguage"){if(this.isRestoringSubtitles||this.subtitleAutoSaveDisabled&&!r)return;console.trace("Subtitle preference change stack trace")}this.savePreferences({[e]:i})}resetPreferences(){try{localStorage.removeItem(this.storageKey)}catch(e){console.warn("Error resetting user preferences:",e)}}applyToPlayer(e){const i=this.getPreferences();this.subtitleAutoSaveDisabled=!0,setTimeout(()=>{this.subtitleAutoSaveDisabled=!1},3e3),typeof i.volume=="number"&&i.volume>=0&&i.volume<=1&&e.volume(i.volume),typeof i.muted=="boolean"&&e.muted(i.muted),typeof i.playbackRate=="number"&&i.playbackRate>0&&e.playbackRate(i.playbackRate)}setupAutoSave(e){e.on("volumechange",()=>{this.setPreference("volume",e.volume()),this.setPreference("muted",e.muted())}),e.on("ratechange",()=>{this.setPreference("playbackRate",e.playbackRate())}),e.on("texttrackchange",()=>{this.isRestoringSubtitles||setTimeout(()=>{const i=e.textTracks();let r=null;for(let o=0;o<i.length;o++){const l=i[o];if(l.kind==="subtitles"&&l.mode==="showing"){r=l.language;break}}this.setPreference("subtitleLanguage",r)},100)}),this.setupSubtitleMenuListeners(e)}setupSubtitleMenuListeners(e){setTimeout(()=>{const i=e.getChild("controlBar"),r=["subtitlesButton","captionsButton","subsCapsButton","textTrackButton"];let o=null;for(const l of r){const c=i.getChild(l);if(c){o=c;break}}o||i.children().forEach(c=>{const f=c.name_||c.constructor.name||"Unknown";(f.toLowerCase().includes("subtitle")||f.toLowerCase().includes("caption")||f.toLowerCase().includes("text"))&&(o=c)}),o?(setTimeout(()=>{this.attachMenuItemListeners(e,o)},500),setTimeout(()=>{this.attachMenuItemListeners(e,o)},2e3)):this.setupDOMBasedListeners(e)},1e3)}setupDOMBasedListeners(e){setTimeout(()=>{const i=e.el();i&&i.addEventListener("click",r=>{const o=r.target;(o.closest(".vjs-subtitles-menu-item")||o.closest(".vjs-captions-menu-item")||o.closest(".vjs-menu-item")&&o.textContent.toLowerCase().includes("subtitle"))&&setTimeout(()=>{this.detectActiveSubtitleFromDOM(e,!0)},200),o.closest(".vjs-menu-item")&&o.textContent.toLowerCase().includes("off")&&setTimeout(()=>{this.setPreference("subtitleLanguage",null,!0)},200)})},1500)}detectActiveSubtitleFromDOM(e,i=!1){if(this.isRestoringSubtitles)return;const r=e.textTracks();let o=null;for(let l=0;l<r.length;l++){const c=r[l];if(c.kind==="subtitles"&&c.mode==="showing"){o=c.language;break}}this.setPreference("subtitleLanguage",o,i)}attachMenuItemListeners(e,i){try{const r=i.menu;r&&r.children_&&r.children_.forEach(o=>{if(o.track){const l=o.track,c=o.handleClick.bind(o);o.handleClick=()=>{c(),setTimeout(()=>{l.mode==="showing"?this.setPreference("subtitleLanguage",l.language,!0):this.setPreference("subtitleLanguage",null,!0)},100)}}else if(o.label&&o.label.toLowerCase().includes("off")){const l=o.handleClick.bind(o);o.handleClick=()=>{l(),setTimeout(()=>{this.setPreference("subtitleLanguage",null,!0)},100)}}})}catch(r){console.error("Error setting up subtitle menu listeners:",r)}}applySubtitlePreference(e){const i=this.getPreference("subtitleLanguage"),r=this.getPreference("subtitleEnabled");if(i){this.isRestoringSubtitles=!0;const o=(l=1)=>{const c=e.textTracks();for(let v=0;v<c.length;v++){const S=c[v];S.kind==="subtitles"&&(S.mode="disabled")}const f=(v,S)=>{const x=String(v.language||v.srclang||"").toLowerCase(),D=String(S||"").toLowerCase();return!x||!D?!1:x===D||x.startsWith(D+"-")||D.startsWith(x+"-")};let p=!1;for(let v=0;v<c.length;v++){const S=c[v];if(S.kind==="subtitles"&&f(S,i)){S.mode="showing",p=!0,this.updateSubtitleMenuUI(e,S),this.updateSubtitleButtonVisualState(e,!0),this.setPreference("subtitleEnabled",!0,!0);break}}if(!p&&r)for(let v=0;v<c.length;v++){const S=c[v];if(S.kind==="subtitles"){S.mode="showing";const x=S.language||S.srclang||null;x&&this.setPreference("subtitleLanguage",x,!0),this.setPreference("subtitleEnabled",!0,!0),this.updateSubtitleMenuUI(e,S),this.updateSubtitleButtonVisualState(e,!0),p=!0;break}}setTimeout(()=>{this.isRestoringSubtitles=!1},600),!p&&l<5?setTimeout(()=>o(l+1),l*50):p||(console.warn("Could not find subtitle track for language:",i),this.isRestoringSubtitles=!1)};o();try{const l=e.tech_&&e.tech_.el_||e.el&&e.el().querySelector&&e.el().querySelector("video"),c=l&&l.textTracks;if(c&&typeof c.addEventListener=="function"){const f=()=>setTimeout(()=>o(1),50),p=()=>setTimeout(()=>o(1),50);c.addEventListener("addtrack",f,{once:!0}),c.addEventListener("change",p,{once:!0})}}catch{}}else try{const o=e.textTracks();for(let l=0;l<o.length;l++){const c=o[l];c.kind==="subtitles"&&(c.mode="disabled")}this.updateSubtitleButtonVisualState(e,!1),this.updateCustomSettingsMenuUI(e)}catch(o){console.error("Error applying subtitle preference:",o)}}updateSubtitleButtonVisualState(e,i){try{const o=e.getChild("controlBar").getChild("subtitlesButton");if(o&&o.el()){const l=o.el();i?l.classList.add("vjs-subs-active"):l.classList.remove("vjs-subs-active")}}catch(r){console.error("Error updating subtitle button visual state:",r)}}updateSubtitleMenuUI(e,i){try{const o=e.getChild("controlBar").getChild("subtitlesButton");o&&o.menu&&o.menu.children_.forEach(c=>{c.track?c.track===i?c.selected(!0):c.selected(!1):c.label&&c.label.toLowerCase().includes("off")&&c.selected(!1)}),this.updateCustomSettingsMenuUI(e)}catch(r){console.error("Error updating subtitle menu UI:",r)}}updateCustomSettingsMenuUI(e){const i=(r=1)=>{try{const l=e.getChild("controlBar").getChild("CustomSettingsMenu");l&&l.refreshSubtitlesSubmenu?l.refreshSubtitlesSubmenu():r<5&&setTimeout(()=>i(r+1),r*200)}catch(o){console.error("Error updating custom settings menu UI:",o)}};i()}getQualityPreference(){return this.getPreference("quality")}setQualityPreference(e){this.setPreference("quality",e)}forceSetSubtitleLanguage(e){const r={...this.getPreferences(),subtitleLanguage:e};try{localStorage.setItem(this.storageKey,JSON.stringify(r))}catch(o){console.error("❌ Error force saving subtitle language:",o)}}getAutoplayPreference(){return this.getPreference("autoplay")}setAutoplayPreference(e){this.setPreference("autoplay",e)}}const W3=F.getComponent("Component");class By extends W3{constructor(e,i){super(e,i),this.settingsButton=null,this.settingsOverlay=null,this.speedSubmenu=null,this.qualitySubmenu=null,this.subtitlesSubmenu=null,this.userPreferences=(i==null?void 0:i.userPreferences)||new $x,this.providedQualities=(i==null?void 0:i.qualities)||null,this.hasSubtitles=(i==null?void 0:i.hasSubtitles)||!1,this.isTouchScrolling=!1,this.touchStartY=0,this.createSettingsButton=this.createSettingsButton.bind(this),this.createSettingsOverlay=this.createSettingsOverlay.bind(this),this.positionButton=this.positionButton.bind(this),this.toggleSettings=this.toggleSettings.bind(this),this.handleSpeedChange=this.handleSpeedChange.bind(this),this.handleQualityChange=this.handleQualityChange.bind(this),this.getAvailableQualities=this.getAvailableQualities.bind(this),this.createSubtitlesSubmenu=this.createSubtitlesSubmenu.bind(this),this.refreshSubtitlesSubmenu=this.refreshSubtitlesSubmenu.bind(this),this.handleSubtitleChange=this.handleSubtitleChange.bind(this),this.handleClickOutside=this.handleClickOutside.bind(this),this.player().ready(()=>{this.createSettingsButton(),this.createSettingsOverlay(),this.setupEventListeners(),this.restoreSubtitlePreference()})}createSettingsButton(){const e=this.player().getChild("controlBar");this.settingsButton=e.addChild("button",{controlText:"Settings",className:"vjs-settings-button settings-clicked"});const i=this.settingsButton.el();i.innerHTML=`
<span><svg height="100%" version="1.1" viewBox="0 0 36 36" width="100%"><use class="ytp-svg-shadow" xlink:href="#ytp-id-19"></use><path d="m 23.94,18.78 c .03,-0.25 .05,-0.51 .05,-0.78 0,-0.27 -0.02,-0.52 -0.05,-0.78 l 1.68,-1.32 c .15,-0.12 .19,-0.33 .09,-0.51 l -1.6,-2.76 c -0.09,-0.17 -0.31,-0.24 -0.48,-0.17 l -1.99,.8 c -0.41,-0.32 -0.86,-0.58 -1.35,-0.78 l -0.30,-2.12 c -0.02,-0.19 -0.19,-0.33 -0.39,-0.33 l -3.2,0 c -0.2,0 -0.36,.14 -0.39,.33 l -0.30,2.12 c -0.48,.2 -0.93,.47 -1.35,.78 l -1.99,-0.8 c -0.18,-0.07 -0.39,0 -0.48,.17 l -1.6,2.76 c -0.10,.17 -0.05,.39 .09,.51 l 1.68,1.32 c -0.03,.25 -0.05,.52 -0.05,.78 0,.26 .02,.52 .05,.78 l -1.68,1.32 c -0.15,.12 -0.19,.33 -0.09,.51 l 1.6,2.76 c .09,.17 .31,.24 .48,.17 l 1.99,-0.8 c .41,.32 .86,.58 1.35,.78 l .30,2.12 c .02,.19 .19,.33 .39,.33 l 3.2,0 c .2,0 .36,-0.14 .39,-0.33 l .30,-2.12 c .48,-0.2 .93,-0.47 1.35,-0.78 l 1.99,.8 c .18,.07 .39,0 .48,-0.17 l 1.6,-2.76 c .09,-0.17 .05,-0.39 -0.09,-0.51 l -1.68,-1.32 0,0 z m -5.94,2.01 c -1.54,0 -2.8,-1.25 -2.8,-2.8 0,-1.54 1.25,-2.8 2.8,-2.8 1.54,0 2.8,1.25 2.8,2.8 0,1.54 -1.25,2.8 -2.8,2.8 l 0,0 z" fill="#fff" id="ytp-id-19"></path></svg></span>
<span class="vjs-control-text">Settings</span>
`,this.positionButton();const r=this.settingsButton.el();if(r){r.style.pointerEvents="auto",r.style.cursor="pointer",r.style.touchAction="manipulation",r.style.webkitTapHighlightColor="transparent";let o=0,l={x:0,y:0},c=!1;r.addEventListener("touchstart",f=>{o=Date.now(),c=!1;const p=f.touches[0];l={x:p.clientX,y:p.clientY}},{passive:!0}),r.addEventListener("touchend",f=>{if(Date.now()-o<500){const S=f.changedTouches[0],x={x:S.clientX,y:S.clientY};Math.sqrt(Math.pow(x.x-l.x,2)+Math.pow(x.y-l.y,2))<50&&(f.preventDefault(),f.stopPropagation(),c=!0,this.toggleSettings(f))}},{passive:!1}),r.addEventListener("click",f=>{c||(f.preventDefault(),f.stopPropagation(),this.toggleSettings(f)),c=!1})}}createSettingsOverlay(){this.player().getChild("controlBar"),this.settingsOverlay=document.createElement("div"),this.settingsOverlay.className="custom-settings-overlay";const e=this.userPreferences.getPreference("playbackRate"),i=this.userPreferences.getPreference("quality");let r="Off";try{const D=this.player().textTracks();for(let k=0;k<D.length;k++){const I=D[k];if(I.kind==="subtitles"&&I.mode==="showing"){r=I.label||I.language||"Subtitles";break}}}catch{}const o=e===1?"Normal":`${e}`,l=this.getAvailableQualities(),c=l.find(D=>D.value===i)||l[0],f=(c==null?void 0:c.displayLabel)||(c==null?void 0:c.label)||(i?String(i):"Auto"),p=`
<div class="settings-header">
<span>Settings</span>
<button class="settings-close-btn" aria-label="Close settings">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.7096 12L20.8596 20.15L20.1496 20.86L11.9996 12.71L3.84965 20.86L3.13965 20.15L11.2896 12L3.14965 3.85001L3.85965 3.14001L11.9996 11.29L20.1496 3.14001L20.8596 3.85001L12.7096 12Z" fill="currentColor"/>
</svg>
</button>
</div>`,v=`
<div class="settings-item" data-setting="playback-speed">
<span class="settings-left">
<span class="vjs-icon-placeholder settings-item-svg">
<svg height="24" viewBox="0 0 24 24" width="24"><path d="M10,8v8l6-4L10,8L10,8z M6.3,5L5.7,4.2C7.2,3,9,2.2,11,2l0.1,1C9.3,3.2,7.7,3.9,6.3,5z M5,6.3L4.2,5.7C3,7.2,2.2,9,2,11 l1,.1C3.2,9.3,3.9,7.7,5,6.3z M5,17.7c-1.1-1.4-1.8-3.1-2-4.8L2,13c0.2,2,1,3.8,2.2,5.4L5,17.7z M11.1,21c-1.8-0.2-3.4-0.9-4.8-2 l-0.6,.8C7.2,21,9,21.8,11,22L11.1,21z M22,12c0-5.2-3.9-9.4-9-10l-0.1,1c4.6,.5,8.1,4.3,8.1,9s-3.5,8.5-8.1,9l0.1,1 C18.2,21.5,22,17.2,22,12z" fill="white"></path></svg>
</span>
<span>Playback speed</span></span>
<span class="settings-right">
<span class="current-speed">${o}</span>
<span class="vjs-icon-placeholder vjs-icon-navigate-next"></span>
</span>
</div>`,S=`
<div class="settings-item" data-setting="quality">
<span class="settings-left">
<span class="vjs-icon-placeholder settings-item-svg">
<svg height="24" viewBox="0 0 24 24" width="24"><path d="M15,17h6v1h-6V17z M11,17H3v1h8v2h1v-2v-1v-2h-1V17z M14,8h1V6V5V3h-1v2H3v1h11V8z M18,5v1h3V5H18z M6,14h1v-2v-1V9H6v2H3v1 h3V14z M10,12h11v-1H10V12z" fill="white"></path></svg>
</span>
<span>Quality</span></span>
<span class="settings-right">
<span class="current-quality">${f}</span>
<span class="vjs-icon-placeholder vjs-icon-navigate-next"></span>
</span>
</div>`,x=`
<div class="settings-item" data-setting="subtitles">
<span class="settings-left">
<span class="vjs-icon-placeholder settings-item-svg">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19 4H5C3.9 4 3 4.9 3 6V18C3 19.1 3.9 20 5 20H19C20.1 20 21 19.1 21 18V6C21 4.9 20.1 4 19 4ZM11 17H5V15H11V17ZM19 13H5V11H19V13ZM19 9H5V7H19V9Z" fill="white"/></svg>
</span>
<span>Subtitles</span></span>
<span class="settings-right">
<span class="current-subtitles">${r}</span>
<span class="vjs-icon-placeholder vjs-icon-navigate-next"></span>
</span>
</div>`;this.settingsOverlay.innerHTML=p,this.settingsOverlay.innerHTML+=v,this.settingsOverlay.innerHTML+=S,this.hasSubtitles&&(this.settingsOverlay.innerHTML+=x),this.createSpeedSubmenu(),this.createQualitySubmenu(l,c==null?void 0:c.value),this.createSubtitlesSubmenu(),this.player().el().appendChild(this.settingsOverlay)}createSpeedSubmenu(){const e=[{label:"0.25",value:.25},{label:"0.5",value:.5},{label:"0.75",value:.75},{label:"Normal",value:1},{label:"1.25",value:1.25},{label:"1.5",value:1.5},{label:"1.75",value:1.75},{label:"2",value:2}];this.speedSubmenu=document.createElement("div"),this.speedSubmenu.className="speed-submenu";const i=this.userPreferences.getPreference("playbackRate");this.speedSubmenu.innerHTML=`
<div class="submenu-header">
<span style="margin-right: 8px;">←</span>
<span>Playback speed</span>
</div>
${e.map(r=>`
<div class="speed-option ${r.value===i?"active":""}" data-speed="${r.value}">
<span>${r.label}</span>
${r.value===i?'<span class="checkmark">✓</span>':""}
</div>
`).join("")}
`,this.settingsOverlay.appendChild(this.speedSubmenu)}createQualitySubmenu(e,i){this.qualitySubmenu=document.createElement("div"),this.qualitySubmenu.className="quality-submenu";const r=`
<div class="submenu-header">
<span style="margin-right: 8px;">←</span>
<span>Quality</span>
</div>
`,o=e.map(l=>`
<div class="quality-option ${l.value===i?"active":""}" data-quality="${l.value}">
<span class="quality-label">${l.displayLabel||l.label}</span>
${l.value===i?'<span class="checkmark">✓</span>':""}
</div>
`).join("");this.qualitySubmenu.innerHTML=r+o,this.settingsOverlay.appendChild(this.qualitySubmenu)}createSubtitlesSubmenu(){this.subtitlesSubmenu=document.createElement("div"),this.subtitlesSubmenu.className="subtitles-submenu";const e=`
<div class="submenu-header">
<span style="margin-right: 8px;">←</span>
<span>Subtitles/CC</span>
</div>
`;this.subtitlesSubmenu.innerHTML=e+'<div class="submenu-body"></div>',this.settingsOverlay.appendChild(this.subtitlesSubmenu),this.refreshSubtitlesSubmenu()}refreshSubtitlesSubmenu(){if(!this.subtitlesSubmenu)return;const e=this.subtitlesSubmenu.querySelector(".submenu-body");if(!e)return;const r=this.player().textTracks();let o=null;for(let c=0;c<r.length;c++){const f=r[c];if(f.kind==="subtitles"&&f.mode==="showing"){o=f.language;break}}const l=[];l.push({label:"Off",lang:null});for(let c=0;c<r.length;c++){const f=r[c];f.kind==="subtitles"&&l.push({label:f.label||f.language||`Track ${c}`,lang:f.language,track:f})}e.innerHTML=l.map(c=>`
<div class="subtitle-option ${c.lang===o?"active":""}" data-lang="${c.lang||""}">
<span>${c.label}</span>
${c.lang===o?'<span class="checkmark">✓</span>':""}
</div>
`).join(""),this.updateCurrentSubtitleDisplay()}updateCurrentSubtitleDisplay(){try{const i=this.player().textTracks();let r="Off";for(let l=0;l<i.length;l++){const c=i[l];if(c.kind==="subtitles"&&c.mode==="showing"){r=c.label||c.language||"Subtitles";break}}const o=this.settingsOverlay.querySelector(".current-subtitles");o&&(o.textContent=r)}catch(e){console.error("Error updating current subtitle display:",e)}}startSubtitleSync(){this.updateCurrentSubtitleDisplay(),this.player().on("texttrackchange",()=>{this.updateCurrentSubtitleDisplay(),this.refreshSubtitlesSubmenu()}),this.subtitleSyncInterval=setInterval(()=>{this.updateCurrentSubtitleDisplay()},2e3)}stopSubtitleSync(){this.subtitleSyncInterval&&(clearInterval(this.subtitleSyncInterval),this.subtitleSyncInterval=null)}dispose(){this.stopSubtitleSync(),document.removeEventListener("click",this.handleClickOutside),this.player()&&this.player().off("texttrackchange")}getAvailableQualities(){var r;const e=["auto","144p","240p","360p","480p","720p","1080p"];if(Array.isArray(this.providedQualities)&&this.providedQualities.length)return this.sortAndDecorateQualities(this.providedQualities,e);try{const o=typeof window<"u"?window.MEDIA_DATA:null,l=(r=o==null?void 0:o.data)==null?void 0:r.qualities;if(Array.isArray(l)&&l.length){const c=l.map(f=>({label:f.label||f.value||"Auto",value:(f.value||f.label||"auto").toString().toLowerCase(),src:f.src||f.url||f.href,type:f.type||"video/mp4"}));return this.sortAndDecorateQualities(c,e)}}catch{}const i=this.player().currentSources?this.player().currentSources():this.player().currentSrc();if(Array.isArray(i)&&i.length>0){const o=i.map((l,c)=>{const f=l.label||l.res||this.inferLabelFromSrc(l.src)||(c===0?"Auto":`Source ${c+1}`),p=String(f).toLowerCase();return{label:f,value:p,src:l.src,type:l.type||"video/mp4"}});return this.sortAndDecorateQualities(o,e)}return[]}sortAndDecorateQualities(e,i){const r=c=>{const f=i.indexOf(String(c).toLowerCase());return f===-1?999:f};return e.filter(c=>c.src).map(c=>{const f=(c.value||c.label||"").toString().toLowerCase(),p=c.label||c.value||"",S=f==="1080p"?`${p} <sup class="hd-badge">HD</sup>`:p;return{...c,value:f,label:p,displayLabel:S}}).sort((c,f)=>r(c.value)-r(f.value))}inferLabelFromSrc(e){if(!e)return null;const i=/(?:_|\.|\/)\D*(1440p|1080p|720p|480p|360p|240p|144p)/i.exec(e);if(i&&i[1])return i[1].toUpperCase();const r=/(\b\d{3,4})p\b/i.exec(e);return r&&r[1]?`${r[1]}p`:null}positionButton(){}setupEventListeners(){const e=this.settingsOverlay.querySelector(".settings-close-btn");if(e){const l=c=>{var p;c.stopPropagation(),this.settingsOverlay.classList.remove("show"),this.settingsOverlay.style.display="none",this.speedSubmenu.style.display="none",this.qualitySubmenu&&(this.qualitySubmenu.style.display="none"),this.subtitlesSubmenu&&(this.subtitlesSubmenu.style.display="none");const f=(p=this.settingsButton)==null?void 0:p.el();f&&f.classList.remove("settings-clicked")};e.addEventListener("click",l),e.addEventListener("touchend",c=>{c.preventDefault(),l(c)},{passive:!1})}this.settingsOverlay.addEventListener("click",l=>{l.stopPropagation(),l.target.closest('[data-setting="playback-speed"]')&&(this.speedSubmenu.style.display="flex",this.qualitySubmenu.style.display="none"),l.target.closest('[data-setting="quality"]')&&(this.qualitySubmenu.style.display="flex",this.speedSubmenu.style.display="none"),l.target.closest('[data-setting="subtitles"]')&&(this.refreshSubtitlesSubmenu(),this.subtitlesSubmenu.style.display="flex",this.speedSubmenu.style.display="none",this.qualitySubmenu.style.display="none")}),this.settingsOverlay.addEventListener("touchstart",l=>{this.touchStartY=l.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.settingsOverlay.addEventListener("touchmove",l=>{Math.abs(l.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.settingsOverlay.addEventListener("touchend",l=>{if(l.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}l.target.closest('[data-setting="playback-speed"]')&&(l.preventDefault(),this.speedSubmenu.style.display="flex",this.qualitySubmenu.style.display="none"),l.target.closest('[data-setting="quality"]')&&(l.preventDefault(),this.qualitySubmenu.style.display="flex",this.speedSubmenu.style.display="none"),l.target.closest('[data-setting="subtitles"]')&&(l.preventDefault(),this.refreshSubtitlesSubmenu(),this.subtitlesSubmenu.style.display="flex",this.speedSubmenu.style.display="none",this.qualitySubmenu.style.display="none")},{passive:!1});const i=this.speedSubmenu.querySelector(".submenu-header");i.addEventListener("click",()=>{this.speedSubmenu.style.display="none"}),i.addEventListener("touchend",l=>{l.preventDefault(),l.stopPropagation(),this.speedSubmenu.style.display="none"},{passive:!1});const r=this.qualitySubmenu.querySelector(".submenu-header");r.addEventListener("click",()=>{this.qualitySubmenu.style.display="none"}),r.addEventListener("touchend",l=>{l.preventDefault(),l.stopPropagation(),this.qualitySubmenu.style.display="none"},{passive:!1});const o=this.subtitlesSubmenu.querySelector(".submenu-header");o.addEventListener("click",()=>{this.subtitlesSubmenu.style.display="none"}),o.addEventListener("touchend",l=>{l.preventDefault(),l.stopPropagation(),this.subtitlesSubmenu.style.display="none"},{passive:!1}),this.speedSubmenu.addEventListener("click",l=>{const c=l.target.closest(".speed-option");if(c){const f=parseFloat(c.dataset.speed);this.handleSpeedChange(f,c)}}),this.speedSubmenu.addEventListener("touchstart",l=>{this.touchStartY=l.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.speedSubmenu.addEventListener("touchmove",l=>{Math.abs(l.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.speedSubmenu.addEventListener("touchend",l=>{if(l.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}const c=l.target.closest(".speed-option");if(c){l.preventDefault();const f=parseFloat(c.dataset.speed);this.handleSpeedChange(f,c)}},{passive:!1}),this.qualitySubmenu.addEventListener("click",l=>{const c=l.target.closest(".quality-option");if(c){const f=c.dataset.quality;this.handleQualityChange(f,c)}}),this.qualitySubmenu.addEventListener("touchstart",l=>{this.touchStartY=l.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.qualitySubmenu.addEventListener("touchmove",l=>{Math.abs(l.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.qualitySubmenu.addEventListener("touchend",l=>{if(l.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}const c=l.target.closest(".quality-option");if(c){l.preventDefault();const f=c.dataset.quality;this.handleQualityChange(f,c)}},{passive:!1}),this.subtitlesSubmenu.addEventListener("click",l=>{const c=l.target.closest(".subtitle-option");if(c){const f=c.dataset.lang||null;this.handleSubtitleChange(f,c)}}),this.subtitlesSubmenu.addEventListener("touchstart",l=>{this.touchStartY=l.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.subtitlesSubmenu.addEventListener("touchmove",l=>{Math.abs(l.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.subtitlesSubmenu.addEventListener("touchend",l=>{if(l.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}const c=l.target.closest(".subtitle-option");if(c){l.preventDefault();const f=c.dataset.lang||null;this.handleSubtitleChange(f,c)}},{passive:!1}),document.addEventListener("click",this.handleClickOutside),this.settingsOverlay.addEventListener("mouseover",l=>{const c=l.target.closest(".settings-item, .speed-option");c&&!c.style.background.includes("0.1")&&(c.style.background="rgba(255, 255, 255, 0.05)")}),this.settingsOverlay.addEventListener("mouseout",l=>{const c=l.target.closest(".settings-item, .speed-option");c&&!c.style.background.includes("0.1")&&(c.style.background="transparent")}),this.startSubtitleSync()}toggleSettings(e){var o;e.stopPropagation();const i=this.settingsOverlay.classList.contains("show");i?(this.settingsOverlay.classList.remove("show"),this.settingsOverlay.style.display="none"):(this.settingsOverlay.classList.add("show"),this.settingsOverlay.style.display="block"),this.speedSubmenu.style.display="none",this.qualitySubmenu&&(this.qualitySubmenu.style.display="none");const r=(o=this.settingsButton)==null?void 0:o.el();r&&(i?r.classList.remove("settings-clicked"):r.classList.add("settings-clicked"))}handleSpeedChange(e,i){this.player().playbackRate(e),this.userPreferences.setPreference("playbackRate",e),this.speedSubmenu.querySelectorAll(".speed-option").forEach(l=>{l.classList.remove("active"),l.style.background="transparent";const c=l.querySelector(".checkmark");c&&c.remove()}),i.classList.add("active"),i.style.background="rgba(255, 255, 255, 0.1)",i.insertAdjacentHTML("beforeend",'<span class="checkmark">✓</span>');const r=this.settingsOverlay.querySelector(".current-speed"),o=e===1?"Normal":`${e}`;r.textContent=o,this.speedSubmenu.style.display="none"}handleQualityChange(e,i){const o=this.getAvailableQualities().find(c=>String(c.value)===String(e));this.userPreferences.setQualityPreference(e),this.qualitySubmenu.querySelectorAll(".quality-option").forEach(c=>{c.classList.remove("active"),c.style.background="transparent";const f=c.querySelector(".checkmark");f&&f.remove()}),i.classList.add("active"),i.style.background="rgba(255, 255, 255, 0.1)",i.insertAdjacentHTML("beforeend",'<span class="checkmark">✓</span>');const l=this.settingsOverlay.querySelector(".current-quality");if(l.innerHTML=(o==null?void 0:o.displayLabel)||(o==null?void 0:o.label)||String(e),o!=null&&o.src){const c=this.player(),f=c.paused(),p=c.currentTime(),v=c.playbackRate();let S=null;try{const I=c.textTracks();for(let C=0;C<I.length;C++){const P=I[C];if(P.kind==="subtitles"&&P.mode==="showing"){S=P.language||P.srclang||null;break}}}catch{}S&&(this.userPreferences.setPreference("subtitleLanguage",S,!0),this.userPreferences.setPreference("subtitleEnabled",!0,!0));const x=[];try{const I=c.remoteTextTrackEls?c.remoteTextTrackEls():[];for(let C=0;C<I.length;C++){const P=I[C];(P.kind||"").toLowerCase()==="subtitles"&&x.push({kind:"subtitles",src:P.src,srclang:P.srclang||P.track&&P.track.language||"",label:P.label||P.track&&P.track.label||"",default:!!P.default})}}catch{}if(x.length===0)try{const I=c.textTracks();for(let C=0;C<I.length;C++){const P=I[C];P.kind==="subtitles"&&P.src&&x.push({kind:"subtitles",src:P.src,srclang:P.language||"",label:P.label||"",default:!1})}}catch{}c.addClass("vjs-changing-resolution"),c.isChangingQuality=!0,c.src({src:o.src,type:o.type||"video/mp4"}),f&&c.pause();const D=()=>{try{x.forEach(I=>{I&&I.src&&c.addRemoteTextTrack(I,!1)})}catch{}try{c.playbackRate(v)}catch{}try{isNaN(p)||c.currentTime(p)}catch{}f?c.pause():c.play().catch(()=>{}),setTimeout(()=>{try{const I=c.textTracks();let C=!1;for(let P=0;P<I.length;P++){const U=I[P];if(U.kind==="subtitles"){const Y=S&&(U.language===S||U.srclang===S);U.mode=Y?"showing":"disabled",Y&&(C=!0)}}if(!C){const P=this.userPreferences.getPreference("subtitleLanguage");if(P)for(let U=0;U<I.length;U++){const Y=I[U];if(Y.kind==="subtitles"&&(Y.language===P||Y.srclang===P)){Y.mode="showing";break}}}}catch{}this.refreshSubtitlesSubmenu(),this.updateCurrentSubtitleDisplay(),c.trigger("texttrackchange")},150);try{const I=c.getChild("controlBar"),C=["subtitlesButton","textTrackButton","subsCapsButton"];for(const P of C){const U=I&&I.getChild(P);if(U){typeof U.show=="function"&&U.show();const Y=U.el&&U.el();Y&&(Y.style.display="",Y.style.visibility="")}}}catch{}c.removeClass("vjs-changing-resolution")},k=()=>{c.off("loadedmetadata",k),c.one("loadeddata",D)};c.one("loadedmetadata",k)}this.qualitySubmenu&&(this.qualitySubmenu.style.display="none")}handleSubtitleChange(e,i){var f;const o=this.player().textTracks();for(let p=0;p<o.length;p++){const v=o[p];v.kind==="subtitles"&&(v.mode=e&&v.language===e?"showing":"disabled")}this.userPreferences.setPreference("subtitleLanguage",e||null,!0),this.userPreferences.setPreference("subtitleEnabled",!!e,!0),this.subtitlesSubmenu.querySelectorAll(".subtitle-option").forEach(p=>{p.classList.remove("active"),p.style.background="transparent";const v=p.querySelector(".checkmark");v&&v.remove()}),i.classList.add("active"),i.style.background="rgba(255, 255, 255, 0.1)",i.insertAdjacentHTML("beforeend",'<span class="checkmark">✓</span>');const l=e?((f=i.querySelector("span"))==null?void 0:f.textContent)||e:"Off",c=this.settingsOverlay.querySelector(".current-subtitles");c&&(c.textContent=l),this.subtitlesSubmenu.style.display="none"}restoreSubtitlePreference(){const e=this.userPreferences.getPreference("subtitleLanguage");if(e){const i=(r=1)=>{try{const o=this.player(),l=o.textTracks(),c=String(e||"").toLowerCase();for(let v=0;v<l.length;v++){const S=l[v];S.kind==="subtitles"&&(S.mode="disabled")}const f=v=>{const S=String(v.language||v.srclang||"").toLowerCase();return!S||!c?!1:S===c||S.startsWith(c+"-")||c.startsWith(S+"-")};let p=!1;for(let v=0;v<l.length;v++){const S=l[v];if(S.kind==="subtitles"&&f(S)){S.mode="showing",p=!0;try{this.userPreferences.setPreference("subtitleEnabled",!0,!0)}catch{}this.refreshSubtitlesSubmenu(),this.updateCurrentSubtitleDisplay();try{o.trigger("texttrackchange")}catch{}break}}if(!p&&r<8){const v=150*r;setTimeout(()=>i(r+1),v)}}catch{r<8&&setTimeout(()=>i(r+1),150*r)}};setTimeout(()=>i(1),300);try{const r=this.player(),o=l=>r.one(l,()=>setTimeout(()=>i(1),50));o("loadedmetadata"),o("loadeddata"),o("canplay")}catch{}}}handleClickOutside(e){var i;if(this.settingsOverlay&&this.settingsButton&&!this.settingsOverlay.contains(e.target)&&!this.settingsButton.el().contains(e.target)){this.settingsOverlay.classList.remove("show"),this.settingsOverlay.style.display="none",this.speedSubmenu.style.display="none",this.qualitySubmenu&&(this.qualitySubmenu.style.display="none");const r=(i=this.settingsButton)==null?void 0:i.el();r&&r.classList.remove("settings-clicked")}}dispose(){document.removeEventListener("click",this.handleClickOutside),this.settingsOverlay&&this.settingsOverlay.remove(),super.dispose()}}By.prototype.controlText_="Settings Menu",F.registerComponent("CustomSettingsMenu",By);const v8="",K3=F.getComponent("Component");class Yx extends K3{constructor(e,i){super(e,i),this.seekAmount=i.seekAmount||5,this.isEmbedPlayer=i.isEmbedPlayer||!1,this.showTimeout=null}createEl(){const e=super.createEl("div",{className:"vjs-seek-indicator"});return e.innerHTML=`
<div class="vjs-seek-indicator-content">
<div class="vjs-seek-indicator-icon"></div>
<div class="vjs-seek-indicator-text"></div>
</div>
`,e.style.display="none",e.style.opacity="0",e.style.visibility="hidden",e}show(e,i=this.seekAmount){const r=this.el(),o=r.querySelector(".vjs-seek-indicator-icon"),l=r.querySelector(".vjs-seek-indicator-text");this.showTimeout&&clearTimeout(this.showTimeout);const c=window.innerWidth<=480,f=window.innerWidth<=768&&window.innerWidth>480;let p,v,S;c?(p="50px",v="20",S="8px"):f?(p="60px",v="22",S="9px"):(p="80px",v="24",S="10px"),e==="forward"?o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: ${p};
height: ${p};
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: none;
outline: none;
box-sizing: border-box;
overflow: hidden;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
">
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 4px;">
<svg viewBox="0 0 24 24" width="${v}" height="${v}" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M8 5v14l11-7z"/>
<path d="M13 5v14l11-7z" opacity="0.6"/>
</svg>
</div>
<div style="
color: white;
font-size: ${S};
font-weight: 500;
text-align: center;
line-height: 1.2;
opacity: 0.9;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
">${i} seconds</div>
</div>
</div>
`:e==="backward"?o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: ${p};
height: ${p};
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: none;
outline: none;
box-sizing: border-box;
overflow: hidden;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
">
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 4px;">
<svg viewBox="0 0 24 24" width="${v}" height="${v}" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M16 19V5l-11 7z"/>
<path d="M11 19V5L0 12z" opacity="0.6"/>
</svg>
</div>
<div style="
color: white;
font-size: ${S};
font-weight: 500;
text-align: center;
line-height: 1.2;
opacity: 0.9;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
">${i} seconds</div>
</div>
</div>
`:e==="play"?(o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: ${p};
height: ${p};
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
border: none;
outline: none;
box-sizing: border-box;
overflow: hidden;
">
<svg viewBox="0 0 24 24" width="${v}" height="${v}" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M8 5v14l11-7z"/>
</svg>
</div>
</div>
`,l.textContent="Play"):(e==="pause"||e==="pause-mobile")&&(o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: ${p};
height: ${p};
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
border: none;
outline: none;
box-sizing: border-box;
overflow: hidden;
">
<svg viewBox="0 0 24 24" width="${v}" height="${v}" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
</svg>
</div>
</div>
`,l.textContent="Pause"),l.textContent="",r.style.cssText=`
position: absolute !important;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
z-index: 10000 !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
visibility: visible !important;
opacity: 1 !important;
pointer-events: none !important;
width: auto !important;
height: auto !important;
margin: 0 !important;
padding: 0 !important;
`,e==="forward"||e==="backward"?this.showTimeout=setTimeout(()=>{this.hide()},1e3):(e==="play"||e==="pause"||e==="pause-mobile")&&(this.showTimeout=setTimeout(()=>{this.hide()},500))}showMobilePauseIcon(){this.show("pause-mobile");const e=this.el();e.style.pointerEvents="auto !important";const i=r=>{r.preventDefault(),r.stopPropagation(),this.player().paused()?this.player().play():this.player().pause(),this.hide()};e.addEventListener("click",i),e.addEventListener("touchend",i),this.mobileClickHandler=i}hideMobileIcon(){const e=this.el(),i=e.cloneNode(!0);e.parentNode.replaceChild(i,e),i.style.pointerEvents="none !important",this.hide(),this.mobileTimeout&&(clearTimeout(this.mobileTimeout),this.mobileTimeout=null)}hide(){const e=this.el();e.style.opacity="0",setTimeout(()=>{e.style.display="none",e.style.visibility="hidden"},200),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.mobileClickHandler&&(e.removeEventListener("click",this.mobileClickHandler),e.removeEventListener("touchend",this.mobileClickHandler),this.mobileClickHandler=null),e.style.pointerEvents="none !important"}dispose(){this.showTimeout&&clearTimeout(this.showTimeout),super.dispose()}}F.registerComponent("SeekIndicator",Yx);function Z3({videoId:s="default-video"}){var K,de,fe;const e=_i.useRef(null),i=_i.useRef(null),r=_i.useRef(new $x),o=_i.useRef({}),l=s==="video-embed",c=_i.useMemo(()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,[]),f={}.VITE_DEV_MODE==="true"||window.location.hostname.includes("vercel.app"),p=_i.useMemo(()=>typeof window<"u"&&window.MEDIA_DATA?window.MEDIA_DATA:{data:{title:"Modi tempora est quaerat numquam",author_name:"Markos Gogoulos",author_profile:"/user/markos/",author_thumbnail:"/media/userlogos/user.jpg",url:"https://demo.mediacms.io/view?m=zK2nirNLC",poster_url:"/media/original/thumbnails/user/thorkild/2ca18fadeef8475eae513c12cc0830d3_8hguMHx.19990812hd_1920_1080_30fps.mp4.jpg",chapter_data:[{startTime:"00:00:00.000",endTime:"00:00:08.295",chapterTitle:"A1 Lorem ipsum dolor sit amet consectetur adipisicing elit."},{startTime:"00:00:08.295",endTime:"00:00:15.590",chapterTitle:"A2 of Marine Life"},{startTime:"00:00:15.590",endTime:"00:00:22.885",chapterTitle:"A3 Reef Ecosystems"}],related_media:[{friendly_token:"dktSm7iEo",url:"https://demo.mediacms.io/view?m=dktSm7iEo",api_url:"https://demo.mediacms.io/api/v1/media/dktSm7iEo",user:"markos",title:"Sed aliquam consectetur dolor.",description:"Voluptatem quiquia dolorem labore dolore. Dolor etincidunt non etincidunt etincidunt sed. Adipisci eius etincidunt dolor magnam dolor. Dolorem porro etincidunt quaerat. Eius magnam dolorem tempora voluptatem labore. Dolore sed porro ipsum aliquam numquam non dolor. Labore aliquam labore dolor sit quisquam quaerat.",add_date:"2024-10-02T05:28:18.784775-04:00",views:803,media_type:"video",state:"public",duration:12,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/8624c4080afc46eba8b4f27a81eccf27.Birch.mp4_myELKan.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/8624c4080afc46eba8b4f27a81eccf27.tmpb7kerjb2.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:13,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:"124.5MB"},{friendly_token:"zK2nirNLC",url:"https://demo.mediacms.io/view?m=zK2nirNLC",api_url:"https://demo.mediacms.io/api/v1/media/zK2nirNLC",user:"markos",title:"University of Copenhagen Mærsk Tower",description:"https://maps.app.goo.gl/ewVAGgqdrb1MD1sF7",add_date:"2025-06-06T00:00:00-04:00",views:632,media_type:"video",state:"public",duration:27,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/6497e960081b4b8abddcf4cbdf2bf4eb_38hpsj6.20250604_080632.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/6497e960081b4b8abddcf4cbdf2bf4eb.tmpjc3_yx1g.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:13,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"58.8MB"},{friendly_token:"o7lKzt664",url:"https://demo.mediacms.io/view?m=o7lKzt664",api_url:"https://demo.mediacms.io/api/v1/media/o7lKzt664",user:"markos",title:"Magnam velit ipsum quisquam amet magnam etincidunt.",description:"Magnam sed quisquam quiquia dolor est. Tempora sit etincidunt dolor dolore magnam. Numquam non dolorem eius aliquam non. Consectetur sit consectetur dolor quaerat est. Consectetur amet dolor ut dolor ipsum. Mpla mpla antalya",add_date:"2024-10-02T05:35:10-04:00",views:1378,media_type:"video",state:"public",duration:6,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/95eb092b57c24f52b75691fa382d16bb_Bg99UmX.20240526_123312.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/95eb092b57c24f52b75691fa382d16bb.tmpthrejon6.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:22,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:"13.0MB"},{friendly_token:"mFELnYWko",url:"https://demo.mediacms.io/view?m=mFELnYWko",api_url:"https://demo.mediacms.io/api/v1/media/mFELnYWko",user:"markos",title:"kubectl-cheat-sheet.pdf",description:"",add_date:"2024-10-25T04:24:39-04:00",views:1391,media_type:"pdf",state:"public",duration:0,thumbnail_url:null,is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:15,dislikes:9,reported_times:1,featured:!1,user_featured:!1,size:null},{friendly_token:"ZLjVzLcCE",url:"https://demo.mediacms.io/view?m=ZLjVzLcCE",api_url:"https://demo.mediacms.io/api/v1/media/ZLjVzLcCE",user:"markos",title:"Quaerat velit sed numquam ipsum magnam.",description:"Dolore numquam aliquam dolore modi modi. Dolor quaerat est voluptatem ut. Dolor eius tempora magnam etincidunt ipsum modi porro. Etincidunt consectetur est est sed ut. Porro neque sed dolorem dolore. Sed velit quisquam ipsum quisquam consectetur porro.",add_date:"2024-10-02T05:34:03.836032-04:00",views:888,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/b5e8dea6a0a3477885db786f2e89fb51.IMG_20240324_141309.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"bvMsRGRxE",url:"https://demo.mediacms.io/view?m=bvMsRGRxE",api_url:"https://demo.mediacms.io/api/v1/media/bvMsRGRxE",user:"markos",title:"Numquam quisquam amet dolore quisquam ipsum ut.",description:"Modi numquam magnam numquam eius labore est dolorem. Voluptatem etincidunt neque ipsum non. Non tempora etincidunt magnam etincidunt. Sed dolor dolore amet quiquia porro sit non. Tempora etincidunt modi sed etincidunt est aliquam. Magnam aliquam ipsum modi dolore. Etincidunt sit eius dolore sed neque porro labore. Eius etincidunt dolorem est quiquia amet aliquam. Quaerat velit labore est dolor.",add_date:"2024-10-02T05:33:02.972212-04:00",views:773,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/b9717b02cd8b45ec91d07470933810db.IMG_20231226_140530.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:10,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"lsNWKKq5N",url:"https://demo.mediacms.io/view?m=lsNWKKq5N",api_url:"https://demo.mediacms.io/api/v1/media/lsNWKKq5N",user:"markos",title:"Quaerat quaerat numquam porro dolor",description:"Modi dolorem non non neque dolor magnam quisquam. Magnam amet magnam porro. Dolorem quiquia dolorem etincidunt labore ipsum aliquam sed. Eius sed eius sit consectetur quaerat. Voluptatem dolorem porro etincidunt labore aliquam quisquam. Adipisci quisquam dolorem dolorem magnam dolorem ipsum. Consectetur quaerat magnam sit voluptatem.",add_date:"2024-10-02T00:00:00-04:00",views:666,media_type:"video",state:"public",duration:13,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/58008fdc69d34c229a85f29076004639.VID_20230917_094453.mp4_Pe8a1dv.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/58008fdc69d34c229a85f29076004639.tmp85b478_u.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:10,dislikes:3,reported_times:1,featured:!0,user_featured:!1,size:"35.0MB"},{friendly_token:"tsgNaSe6E",url:"https://demo.mediacms.io/view?m=tsgNaSe6E",api_url:"https://demo.mediacms.io/api/v1/media/tsgNaSe6E",user:"markos",title:"Magnam ipsum eius numquam quiquia non adipisci.",description:"Adipisci labore dolorem ipsum quaerat non dolore ut. Velit porro neque non consectetur neque neque. Ut sit tempora tempora. Ipsum ut velit neque. Quaerat labore amet porro porro amet tempora. Sed voluptatem est amet quisquam sed numquam velit. Est ipsum non labore. Consectetur amet neque consectetur dolor ipsum.",add_date:"2024-10-02T05:32:46.253917-04:00",views:824,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/0405f61e131f431793644be3742fcc1a.20240628_235522.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:12,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"f9xqzbbJE",url:"https://demo.mediacms.io/view?m=f9xqzbbJE",api_url:"https://demo.mediacms.io/api/v1/media/f9xqzbbJE",user:"markos",title:"Magnam quaerat numquam modi dolore sed amet.",description:"Non non voluptatem neque velit labore. Eius labore non aliquam quisquam adipisci neque. Aliquam ipsum sed ipsum quisquam. Sit quaerat sed dolore non tempora. Ipsum sed labore dolore consectetur. Modi non quisquam sed ut ut dolor quaerat.",add_date:"2024-10-02T05:34:18.498303-04:00",views:844,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/369f44b14f944941881a20e8d5285e78.IMG_20240324_151737.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:3,dislikes:1,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"DE3KByBeo",url:"https://demo.mediacms.io/view?m=DE3KByBeo",api_url:"https://demo.mediacms.io/api/v1/media/DE3KByBeo",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:272,media_type:"video",state:"public",duration:29,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/58b35efa3aca454196227c0eb5e2ca75_pkgSAK2.20250517_101207.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/58b35efa3aca454196227c0eb5e2ca75.tmpsw6vmsfo.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:2,reported_times:0,featured:!1,user_featured:!1,size:"62.0MB"},{friendly_token:"M8ktwf8kF",url:"https://demo.mediacms.io/view?m=M8ktwf8kF",api_url:"https://demo.mediacms.io/api/v1/media/M8ktwf8kF",user:"markos",title:"Quaerat voluptatem quisquam neque velit neque.",description:"Aliquam ipsum quisquam dolor. Modi quisquam neque ut ipsum amet. Tempora quaerat ipsum aliquam velit velit porro est. Consectetur neque eius quisquam porro amet sit neque. Modi voluptatem neque modi. Ipsum aliquam labore quaerat.",add_date:"2024-10-02T05:34:32.027708-04:00",views:852,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/48a682227b544388a1b547736668d0ad.IMG_20240324_151743.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:7,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"s2qAmRTJ9",url:"https://demo.mediacms.io/view?m=s2qAmRTJ9",api_url:"https://demo.mediacms.io/api/v1/media/s2qAmRTJ9",user:"markos",title:"Labore neque ipsum labore modi tempora aliquam neque.",description:"Eius voluptatem aliquam sit sit ipsum consectetur. Dolorem velit amet modi. Porro quisquam velit neque dolorem. Dolorem modi quiquia aliquam. Numquam est magnam non numquam modi quisquam est. Sit velit ut labore sit dolore velit modi. Aliquam modi dolorem ut.",add_date:"2024-10-02T05:34:27.197596-04:00",views:779,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/2b786916111947e3ba960d7146ae0424.IMG_20230708_133437.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:16,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"8pWsxkOS5",url:"https://demo.mediacms.io/view?m=8pWsxkOS5",api_url:"https://demo.mediacms.io/api/v1/media/8pWsxkOS5",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:321,media_type:"video",state:"public",duration:47,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/d970760faf5745b4b3d0d0cff2b95d86_cvyjd5y.20250517_140535.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/d970760faf5745b4b3d0d0cff2b95d86.tmp3vtt3uip.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:5,dislikes:2,reported_times:0,featured:!1,user_featured:!1,size:"101.2MB"},{friendly_token:"swcx8A2h1",url:"https://demo.mediacms.io/view?m=swcx8A2h1",api_url:"https://demo.mediacms.io/api/v1/media/swcx8A2h1",user:"markos",title:"Etincidunt dolore eius ut non numquam dolore dolorem.",description:"Etincidunt amet dolorem quisquam tempora. Dolorem dolor modi sit modi labore sit. Labore est sed non numquam. Porro non quaerat dolorem porro tempora sit. Ut neque est etincidunt velit eius. Etincidunt aliquam adipisci sed quiquia modi. Adipisci non sed adipisci velit.",add_date:"2024-10-02T05:38:43-04:00",views:7973,media_type:"video",state:"public",duration:31,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/fe4933d67b884d4da507dd60e77f7438.VID_20200909_141053.mp4_bU90dbl.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/fe4933d67b884d4da507dd60e77f7438.tmpdd72kiwh.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:230,dislikes:62,reported_times:1,featured:!0,user_featured:!1,size:"65.9MB"},{friendly_token:"rNefa4WtV",url:"https://demo.mediacms.io/view?m=rNefa4WtV",api_url:"https://demo.mediacms.io/api/v1/media/rNefa4WtV",user:"markos",title:"Quaerat modi non eius.",description:"Quisquam ut dolorem dolorem quisquam dolore. Non modi etincidunt labore sit quisquam. Sed neque quaerat quisquam voluptatem. Numquam labore neque etincidunt. Magnam etincidunt porro adipisci.",add_date:"2024-10-02T05:36:46.062913-04:00",views:2683,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/ca0e3af507c64fc5995b9d97e4a8c779.20240527_091011.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:45,dislikes:16,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"LP09dv0mx",url:"https://demo.mediacms.io/view?m=LP09dv0mx",api_url:"https://demo.mediacms.io/api/v1/media/LP09dv0mx",user:"markos",title:"Est ipsum non etincidunt voluptatem adipisci labore.",description:"Est sit voluptatem numquam ut etincidunt. Adipisci sed dolor voluptatem labore. Quiquia est sit eius eius labore velit. Tempora ut tempora neque. Ipsum eius sit labore amet dolorem non non. Quiquia velit amet eius sit ut ut voluptatem. Quiquia sit ut ipsum ipsum neque. Amet etincidunt aliquam consectetur voluptatem sed etincidunt quiquia. Sit eius dolore magnam sed velit consectetur. Etincidunt amet numquam sit porro.",add_date:"2024-10-02T05:31:41.087014-04:00",views:711,media_type:"video",state:"public",duration:26,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/980decd203f245bbb3723cba73a94a11.VID_20230813_104846.mp4_3rwZtxQ.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/980decd203f245bbb3723cba73a94a11.tmpmddawiqe.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:11,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:"66.4MB"},{friendly_token:"just_somethi",url:"https://demo.mediacms.io/view?m=just_somethi",api_url:"https://demo.mediacms.io/api/v1/media/just_somethi",user:"markos",title:"Sit consectetur dolore numquam.",description:"Consectetur adipisci neque neque tempora. Amet quiquia ut labore non sit. Dolor aliquam quiquia adipisci dolor dolorem quiquia. Dolore porro modi labore quisquam adipisci numquam non. Dolor consectetur ut est neque.",add_date:"2024-10-02T00:00:00-04:00",views:1288,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/7aaa65ac24224fe3a768aa6b7a723b58.20240527_090952.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:28,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"PbsYTGEol",url:"https://demo.mediacms.io/view?m=PbsYTGEol",api_url:"https://demo.mediacms.io/api/v1/media/PbsYTGEol",user:"markos",title:"Voluptatem porro neque tempora dolorem quiquia est dolor.",description:"Labore aliquam dolorem quiquia est ipsum quiquia. Sed est amet non ipsum. Labore etincidunt etincidunt quiquia amet tempora tempora. Aliquam velit ipsum consectetur. Ipsum labore quaerat quiquia aliquam magnam. Quisquam ut velit velit dolorem dolorem. Aliquam quaerat tempora quisquam ut voluptatem voluptatem quiquia.",add_date:"2024-10-02T05:33:48.024941-04:00",views:785,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/f01faaa2e7be4c9aa7598ab755898a09.IMG_20240324_141304.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:14,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"mkpfy31bY",url:"https://demo.mediacms.io/view?m=mkpfy31bY",api_url:"https://demo.mediacms.io/api/v1/media/mkpfy31bY",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:212,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/c2d40995ce7640e3b8cbfee1a2890c51.20250517_183010.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"w2lYWaW8e",url:"https://demo.mediacms.io/view?m=w2lYWaW8e",api_url:"https://demo.mediacms.io/api/v1/media/w2lYWaW8e",user:"markos",title:"Plane view approaching Copenhagen airport",description:"plane view",add_date:"2025-06-06T00:00:00-04:00",views:664,media_type:"video",state:"public",duration:50,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/e84f1caf58f44d838456625ffe96173b_LQCWsAe.20250603_110810.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/e84f1caf58f44d838456625ffe96173b.tmp7hm26nok.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:13,dislikes:3,reported_times:0,featured:!1,user_featured:!1,size:"108.8MB"},{friendly_token:"qLMrr970w",url:"https://demo.mediacms.io/view?m=qLMrr970w",api_url:"https://demo.mediacms.io/api/v1/media/qLMrr970w",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:215,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/558f53227cc5418c9b7d66a3740fe2f8.20250517_082340.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"elygiagorgechania",url:"https://demo.mediacms.io/view?m=elygiagorgechania",api_url:"https://demo.mediacms.io/api/v1/media/elygiagorgechania",user:"markos",title:"Exit of Elygia Gorge, Chania, Crete",description:"This video is from the exit of Elygia Gorge, Chania, Crete, where it meets the sea!",add_date:"2025-06-15T00:00:00-04:00",views:688,media_type:"video",state:"public",duration:29,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/c1ab03cab3bb46b5854a5e217cfe3013_Nete6ao.VID_20230813_144422.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/c1ab03cab3bb46b5854a5e217cfe3013.tmpjlxkhy0i.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"75.6MB"},{friendly_token:"OxO6BMVZb",url:"https://demo.mediacms.io/view?m=OxO6BMVZb",api_url:"https://demo.mediacms.io/api/v1/media/OxO6BMVZb",user:"markos",title:"Eius velit etincidunt amet tempora ut.",description:"Aliquam eius adipisci adipisci. Quaerat dolor quaerat magnam. Amet ut quaerat sit sed magnam quaerat neque. Neque velit porro labore modi ut ut ut. Non quaerat consectetur dolor eius voluptatem. Quisquam modi amet sed magnam eius. Quisquam dolor dolore aliquam quisquam neque dolore. Quisquam dolor ut ipsum quiquia. Voluptatem quisquam neque quisquam quiquia adipisci. Est modi eius est etincidunt numquam quisquam ut.",add_date:"2024-10-02T05:34:33.461809-04:00",views:1023,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/13299e6838e143fda776bacf7081484e.IMG_20230820_200357.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:16,dislikes:4,reported_times:1,featured:!0,user_featured:!1,size:null},{friendly_token:"hDHXkdwy0",url:"https://demo.mediacms.io/view?m=hDHXkdwy0",api_url:"https://demo.mediacms.io/api/v1/media/hDHXkdwy0",user:"markos",title:"Modi tempora est quaerat numquam",description:"Magnam voluptatem est magnam dolorem. Etincidunt quiquia aliquam velit tempora porro. Magnam neque eius eius etincidunt ut ipsum. Adipisci labore quaerat modi. Ipsum modi quaerat consectetur est non quaerat sed. Neque ut modi adipisci dolore adipisci dolor ut. Dolor tempora adipisci quisquam. Dolorem consectetur velit adipisci etincidunt voluptatem. Non quisquam voluptatem adipisci. Voluptatem est aliquam porro labore non.",add_date:"2024-10-02T05:36:42-04:00",views:1679,media_type:"video",state:"public",duration:24,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/a3c5642e13624149897f193981ebccf3.VID_20210307_111552.mp4_uEHcD0C.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/a3c5642e13624149897f193981ebccf3.tmpempjz6eh.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:32,dislikes:12,reported_times:0,featured:!0,user_featured:!1,size:"52.4MB"},{friendly_token:"vDKrrkIVc",url:"https://demo.mediacms.io/view?m=vDKrrkIVc",api_url:"https://demo.mediacms.io/api/v1/media/vDKrrkIVc",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:228,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/50f296fd588240d2ad80a6fb9a5ce7d6.20250518_093811.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:1,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"4h3nsvXb1",url:"https://demo.mediacms.io/view?m=4h3nsvXb1",api_url:"https://demo.mediacms.io/api/v1/media/4h3nsvXb1",user:"markos",title:"Dolor voluptatem non quiquia consectetur est numquam sed.",description:"Aliquam ipsum etincidunt neque ipsum. Consectetur ut non velit quaerat porro. Eius ut voluptatem velit aliquam dolor. Non etincidunt est quaerat quaerat. Quiquia est non ipsum numquam. Quisquam amet magnam sed eius quaerat. Magnam porro dolorem dolor. Numquam numquam quaerat est. Quisquam tempora ut quaerat est.",add_date:"2024-10-02T05:32:43.865153-04:00",views:981,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/baca04d3009d4daba302919c25b4325e.IMG_1936.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:16,dislikes:1,reported_times:1,featured:!0,user_featured:!1,size:null},{friendly_token:"HdUU8boQP",url:"https://demo.mediacms.io/view?m=HdUU8boQP",api_url:"https://demo.mediacms.io/api/v1/media/HdUU8boQP",user:"markos",title:"Consectetur adipisci porro quiquia ipsum aliquam etincidunt ut.",description:"Consectetur numquam eius amet est dolor neque modi. Consectetur est amet voluptatem quaerat numquam sed. Porro tempora ut ut. Non dolor amet sit. Labore porro neque dolorem numquam dolore ut. Modi sed adipisci dolore. Numquam magnam est tempora. Neque aliquam labore dolor ipsum porro.",add_date:"2024-10-02T05:34:13.171233-04:00",views:795,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/e1df55b16b3b456ea88bf7feb7db6051.IMG_20230708_120717.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:8,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"vy5PTWJZ6",url:"https://demo.mediacms.io/view?m=vy5PTWJZ6",api_url:"https://demo.mediacms.io/api/v1/media/vy5PTWJZ6",user:"markos",title:"Non etincidunt numquam velit.",description:`Etincidunt ut velit ipsum. Labore modi magnam eius quisquam. Dolorem magnam sit quiquia non dolorem tempora. Aliquam labore sed quaerat magnam est aliquam porro. Adipisci adipisci aliquam tempora ut aliquam eius amet. Est etincidunt quiquia dolorem amet consectetur. Ipsum neque dolorem dolore etincidunt.\r
`,add_date:"2024-10-02T05:33:26-04:00",views:713,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/7a9ec6be9ce24a569a246c61d9b03690.IMG_20220528_135153.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:9,dislikes:1,reported_times:1,featured:!0,user_featured:!1,size:null},{friendly_token:"TAdmfDUlu",url:"https://demo.mediacms.io/view?m=TAdmfDUlu",api_url:"https://demo.mediacms.io/api/v1/media/TAdmfDUlu",user:"markos",title:"Sed neque adipisci dolorem sed.",description:`Quiquia ipsum velit amet. Consectetur porro numquam numquam magnam adipisci dolore. Dolor ipsum ut ut consectetur modi labore. Neque est non amet. Sit quiquia quisquam dolorem. Modi dolore modi dolorem ipsum ipsum. Neque modi modi dolorem quisquam numquam modi quaerat.\r
\r
best scenes at 00:00:12 and 00:14`,add_date:"2024-10-02T00:00:00-04:00",views:821,media_type:"video",state:"public",duration:30,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/f371a6b2c157451d924bc4f612bf2667_Kh4GigX.Pexels_Videos_2079217_1.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/f371a6b2c157451d924bc4f612bf2667.tmp2jqxf9sr.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:20,dislikes:4,reported_times:0,featured:!0,user_featured:!1,size:"90.0MB"},{friendly_token:"kHd7EKAVH",url:"https://demo.mediacms.io/view?m=kHd7EKAVH",api_url:"https://demo.mediacms.io/api/v1/media/kHd7EKAVH",user:"markos",title:"Tempora magnam velit ipsum neque aliquam adipisci.",description:"Porro dolorem eius sed non eius. Non dolor quiquia dolorem. Modi ut dolor aliquam dolor. Non est dolorem amet consectetur neque quiquia numquam. Aliquam adipisci quiquia voluptatem ipsum quisquam magnam adipisci. Sit adipisci dolor consectetur dolor quaerat. Magnam ut modi tempora. Modi non ipsum tempora etincidunt porro. Ut ut dolor ipsum non consectetur neque quiquia.",add_date:"2024-10-02T05:33:57.651288-04:00",views:1051,media_type:"video",state:"public",duration:54,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/9d3b8425eb08400fa08d90f988bc5ff4.VID_20220821_110509.mp4_JzAol5C.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/9d3b8425eb08400fa08d90f988bc5ff4.tmpwlnjum5k.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:26,dislikes:8,reported_times:1,featured:!0,user_featured:!1,size:"136.8MB"},{friendly_token:"Otbc37Yj4",url:"https://demo.mediacms.io/view?m=Otbc37Yj4",api_url:"https://demo.mediacms.io/api/v1/media/Otbc37Yj4",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:311,media_type:"video",state:"public",duration:25,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/dd3af0e1dece43b490bbafc9400a407a_YtfxVr4.20250517_105515.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/dd3af0e1dece43b490bbafc9400a407a.tmpl3iqzl10.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:12,dislikes:1,reported_times:0,featured:!1,user_featured:!1,size:"54.3MB"},{friendly_token:"a1BP6J0fM",url:"https://demo.mediacms.io/view?m=a1BP6J0fM",api_url:"https://demo.mediacms.io/api/v1/media/a1BP6J0fM",user:"markos",title:"Velit sed magnam quiquia amet.",description:"Numquam quiquia numquam ut etincidunt numquam. Dolore ut sit eius dolorem sed. Neque porro modi dolor ipsum amet dolore quisquam. Ipsum dolore dolor voluptatem eius quiquia etincidunt. Dolore etincidunt amet velit amet ipsum ut. Aliquam etincidunt consectetur est. Consectetur non quiquia voluptatem velit sed quisquam.",add_date:"2024-10-02T05:35:15.434023-04:00",views:997,media_type:"video",state:"public",duration:11,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/32e2cf3ff5fe498da93251034e977d9c.20240527_090548.mp4_qiF5S9H.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/32e2cf3ff5fe498da93251034e977d9c.tmpheuxmj3y.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:14,dislikes:1,reported_times:0,featured:!0,user_featured:!1,size:"3.5MB"}],media_type:"video",original_media_url:"/media/original/user/thorkild/2ca18fadeef8475eae513c12cc0830d3.19990812hd_1920_1080_30fps.mp4",hls_info:{master_file:"/media/hls/2ca18fadeef8475eae513c12cc0830d3/master.m3u8","1080_iframe":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-1/iframes.m3u8","720_iframe":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-2/iframes.m3u8","480_iframe":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-3/iframes.m3u8","360_iframe":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-4/iframes.m3u8","240_iframe":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-5/iframes.m3u8","1080_playlist":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-1/stream.m3u8","720_playlist":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-2/stream.m3u8","480_playlist":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-3/stream.m3u8","360_playlist":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-4/stream.m3u8","240_playlist":"/media/hls/2ca18fadeef8475eae513c12cc0830d3/media-5/stream.m3u8"},encodings_info:{2160:{},1440:{},1080:{h264:{title:"h264-1080",url:"/media/encoded/7/markos/6497e960081b4b8abddcf4cbdf2bf4eb.6497e960081b4b8abddcf4cbdf2bf4eb.20250604_080632.mp4.mp4",progress:100,size:"16.1MB",encoding_id:4682,status:"success"}},720:{h264:{title:"h264-720",url:"/media/encoded/10/markos/6497e960081b4b8abddcf4cbdf2bf4eb.6497e960081b4b8abddcf4cbdf2bf4eb.20250604_080632.mp4.mp4",progress:100,size:"7.8MB",encoding_id:4681,status:"success"}},480:{h264:{title:"h264-480",url:"/media/encoded/13/markos/6497e960081b4b8abddcf4cbdf2bf4eb.6497e960081b4b8abddcf4cbdf2bf4eb.20250604_080632.mp4.mp4",progress:100,size:"4.5MB",encoding_id:4680,status:"success"}},360:{h264:{title:"h264-360",url:"/media/encoded/3/markos/6497e960081b4b8abddcf4cbdf2bf4eb.6497e960081b4b8abddcf4cbdf2bf4eb.20250604_080632.mp4.mp4",progress:100,size:"2.9MB",encoding_id:4679,status:"success"}},240:{h264:{title:"h264-240",url:"/media/encoded/2/markos/6497e960081b4b8abddcf4cbdf2bf4eb.6497e960081b4b8abddcf4cbdf2bf4eb.20250604_080632.mp4.mp4",progress:100,size:"1.7MB",encoding_id:4678,status:"success"}},144:{}}},useRoundedCorners:!1,isPlayList:!1,previewSprite:{url:"https://deic.mediacms.io/media/original/thumbnails/user/thorkild/2ca18fadeef8475eae513c12cc0830d3.19990812hd_1920_1080_30fps.mp4sprites.jpg",frame:{width:160,height:90,seconds:10}},siteUrl:"https://deic.mediacms.io",nextLink:"https://deic.mediacms.io/view?m=YjGJafibO",urlAutoplay:!0,urlMuted:!1},[]),v=me=>{if(typeof me=="number")return me;if(typeof me!="string")return 0;const le=me.split(":");if(le.length!==3)return 0;const _e=parseInt(le[0],10)||0,he=parseInt(le[1],10)||0,ge=parseFloat(le[2])||0;return _e*3600+he*60+ge},S=_i.useMemo(()=>me=>!me||!Array.isArray(me)?[]:me.map(_e=>({startTime:v(_e.startTime),endTime:v(_e.endTime),chapterTitle:_e.chapterTitle})),[]),x=_i.useMemo(()=>(me,le)=>{var _e;if(!me||!Array.isArray(me)||me.length===0)return!1;if(me.length>1)return!0;if(me.length===1){const he=me[0],ge=v(he.startTime),Ae=v(he.endTime),ne=(_e=he.chapterTitle)==null?void 0:_e.toLowerCase().match(/^(segment|video|full video|chapter|part)$/);if(le&&le>0){const pe=ge<=1&&Math.abs(Ae-le)<=1;if(pe&&ne)return!1;if(!pe)return!0}if(ge===0&&ne)return!1}return!0},[]),D=_i.useMemo(()=>{var me,le,_e,he;if((me=p==null?void 0:p.data)!=null&&me.chapter_data&&((le=p==null?void 0:p.data)==null?void 0:le.chapter_data.length)>0){const ge=((_e=p==null?void 0:p.data)==null?void 0:_e.duration)||null;return x(p.data.chapter_data,ge)?S((he=p==null?void 0:p.data)==null?void 0:he.chapter_data):[]}return f?[{startTime:"00:00:00.000",endTime:"00:00:04.000",chapterTitle:"Introduction"},{startTime:"00:00:05.000",endTime:"00:00:10.000",chapterTitle:"Overview of Marine Life"},{startTime:"00:00:10.000",endTime:"00:00:15.000",chapterTitle:"Coral Reef Ecosystems"},{startTime:"00:00:15.000",endTime:"00:00:20.000",chapterTitle:"Deep Sea Creatures"},{startTime:"00:00:20.000",endTime:"00:00:30.000",chapterTitle:"Ocean Conservation"},{startTime:"00:00:24.000",endTime:"00:00:32.000",chapterTitle:"Ocean Conservation"},{startTime:"00:00:32.000",endTime:"00:00:40.000",chapterTitle:"Climate Change Impact"},{startTime:"00:00:40.000",endTime:"00:00:48.000",chapterTitle:"Marine Protected Areas"},{startTime:"00:00:48.000",endTime:"00:00:56.000",chapterTitle:"Sustainable Fishing"},{startTime:"00:00:56.000",endTime:"00:00:64.000",chapterTitle:"Research Methods"},{startTime:"00:00:64.000",endTime:"00:00:72.000",chapterTitle:"Future Challenges"},{startTime:"00:00:72.000",endTime:"00:00:80.000",chapterTitle:"Conclusion"},{startTime:"00:00:80.000",endTime:"00:00:88.000",chapterTitle:"Marine Biodiversity Hotspots"},{startTime:"00:00:88.000",endTime:"00:00:96.000",chapterTitle:"Marine Biodiversity test"},{startTime:"00:00:96.000",endTime:"00:01:04.000",chapterTitle:"Whale Migration Patterns"},{startTime:"00:01:04.000",endTime:"00:01:12.000",chapterTitle:"Plastic Pollution Crisis"},{startTime:"00:01:12.000",endTime:"00:01:20.000",chapterTitle:"Seagrass Meadows"},{startTime:"00:01:20.000",endTime:"00:01:28.000",chapterTitle:"Ocean Acidification"},{startTime:"00:01:28.000",endTime:"00:01:36.000",chapterTitle:"Marine Archaeology"},{startTime:"00:01:28.000",endTime:"00:01:36.000",chapterTitle:"Tidal Pool Ecosystems"},{startTime:"00:01:36.000",endTime:"00:01:44.000",chapterTitle:"Commercial Aquaculture"},{startTime:"00:01:44.000",endTime:"00:01:52.000",chapterTitle:"Ocean Exploration Technology"}].map(ge=>({startTime:v(ge.startTime),endTime:v(ge.endTime),chapterTitle:ge.chapterTitle})):[]},[(K=p==null?void 0:p.data)==null?void 0:K.chapter_data,(de=p==null?void 0:p.data)==null?void 0:de.duration,f,S,x]),k=(me,le)=>le==="audio"?me&&me.toLowerCase().includes(".mp3")?"audio/mpeg":me&&me.toLowerCase().includes(".ogg")?"audio/ogg":me&&me.toLowerCase().includes(".wav")?"audio/wav":me&&me.toLowerCase().includes(".m4a")?"audio/mp4":"audio/mpeg":me&&me.toLowerCase().includes(".webm")?"video/webm":me&&me.toLowerCase().includes(".ogg")?"video/ogg":"video/mp4",I=r.current.getQualityPreference(),C=_i.useMemo(()=>{var _e,he,ge,Ae,ne,Se,pe,Ue;const me=()=>{var Oe,we,qe,We,Ze,He;const se=I;if((Oe=p.data)!=null&&Oe.hls_info){if(se==="auto"&&p.data.hls_info.master_file)return[{src:p.siteUrl+p.data.hls_info.master_file,type:"application/x-mpegURL",label:"Auto"}];if(se!=="auto"){const Fe=`${se.replace("p","")}_playlist`;if(p.data.hls_info[Fe])return[{src:p.siteUrl+p.data.hls_info[Fe],type:"application/x-mpegURL",label:`${se}p`}]}if(p.data.hls_info.master_file)return[{src:p.siteUrl+p.data.hls_info.master_file,type:"application/x-mpegURL",label:"Auto"}]}if((we=p.data)!=null&&we.encodings_info){const Fe=p.data.encodings_info,dt=I;if(dt!=="auto"){const ye=dt.replace("p","");if(Fe[ye]&&Fe[ye].h264&&Fe[ye].h264.url)return[{src:Fe[ye].h264.url,type:k(Fe[ye].h264.url,(qe=p.data)==null?void 0:qe.media_type),label:`${ye}p`}]}const Ht=[],Si=Object.keys(Fe).filter(ye=>Fe[ye]&&Fe[ye].h264&&Fe[ye].h264.url).sort((ye,xe)=>parseInt(xe)-parseInt(ye));for(const ye of Si){const xe=Fe[ye].h264.url;Ht.push({src:xe,type:k(xe,(We=p.data)==null?void 0:We.media_type),label:`${ye}p`})}if(Ht.length>0)return Ht}if((Ze=p.data)!=null&&Ze.original_media_url){const Fe=p.siteUrl+p.data.original_media_url;return[{src:Fe,type:k(Fe,(He=p.data)==null?void 0:He.media_type)}]}return[{src:"/videos/sample-video-white.mp4",type:"video/mp4"}]};return{id:((_e=p.data)==null?void 0:_e.friendly_token)||"default-video",title:((he=p.data)==null?void 0:he.title)||"Video",author_name:((ge=p.data)==null?void 0:ge.author_name)||"Unknown",author_profile:(Ae=p.data)!=null&&Ae.author_profile?p.siteUrl+p.data.author_profile:"",author_thumbnail:(ne=p.data)!=null&&ne.author_thumbnail?p.siteUrl+p.data.author_thumbnail:"",url:((Se=p.data)==null?void 0:Se.url)||"",poster:(pe=p.data)!=null&&pe.poster_url?p.siteUrl+p.data.poster_url:"",previewSprite:(p==null?void 0:p.previewSprite)||{},useRoundedCorners:p==null?void 0:p.useRoundedCorners,isPlayList:p==null?void 0:p.isPlayList,related_media:((Ue=p.data)==null?void 0:Ue.related_media)||[],nextLink:(p==null?void 0:p.nextLink)||null,urlAutoplay:(p==null?void 0:p.urlAutoplay)||!0,urlMuted:(p==null?void 0:p.urlMuted)||!1,sources:me()}},[p,I]),P=_i.useMemo(()=>{var ne,Se,pe,Ue,se,Oe,we;const le=(()=>{var We;const qe=["auto"];if((We=p.data)!=null&&We.encodings_info){const Ze=Object.keys(p.data.encodings_info).filter(He=>{const Fe=p.data.encodings_info[He];return Fe&&Fe.h264&&Fe.h264.url}).map(He=>`${He}p`).sort((He,Fe)=>parseInt(He)-parseInt(Fe));qe.push(...Ze)}else qe.push("144p","240p","360p","480p","720p","1080p","1440p","2160p");return qe})(),_e=qe=>{const Ze=qe.map(Fe=>{var dt;return{label:Fe.label||Fe.value||"Auto",value:(Fe.value||Fe.label||"auto").toString().toLowerCase(),src:Fe.src||Fe.url||Fe.href,type:Fe.type||k(Fe.src||Fe.url||Fe.href,(dt=p.data)==null?void 0:dt.media_type)}}).filter(Fe=>Fe.src),He=Fe=>{const dt=le.indexOf(String(Fe).toLowerCase());return dt===-1?999:dt};return Ze.sort((Fe,dt)=>He(Fe.value)-He(dt.value)),Ze},he=(ne=p==null?void 0:p.data)==null?void 0:ne.qualities;if(Array.isArray(he)&&he.length)return _e(he);if((Se=p.data)!=null&&Se.hls_info&&p.data.hls_info.master_file){const qe=p.data.hls_info,We=[];return We.push({label:"Auto",value:"auto",src:p.siteUrl+qe.master_file,type:"application/x-mpegURL"}),Object.keys(qe).forEach(Ze=>{if(Ze.endsWith("_playlist")){const He=Ze.replace("_playlist","");We.push({label:`${He}p`,value:`${He}p`,src:p.siteUrl+qe[Ze],type:"application/x-mpegURL"})}}),_e(We)}if((pe=p.data)!=null&&pe.encodings_info){const qe=p.data.encodings_info,We=[];if(We.push({label:"Auto",value:"auto",src:null,type:k(null,(Ue=p.data)==null?void 0:Ue.media_type)}),Object.keys(qe).forEach(Ze=>{var He;if(qe[Ze]&&qe[Ze].h264&&qe[Ze].h264.url){const Fe=qe[Ze].h264.url;We.push({label:`${Ze}p`,value:`${Ze}p`,src:Fe,type:k(Fe,(He=p.data)==null?void 0:He.media_type)})}}),We.length>1)return _e(We)}const ge=(C==null?void 0:C.sources)&&((se=C.sources[0])==null?void 0:se.src)||null,Ae=(C==null?void 0:C.sources)&&((Oe=C.sources[0])==null?void 0:Oe.type)||k(ge,(we=p.data)==null?void 0:we.media_type);return ge?_e([{label:"Auto",value:"auto",src:ge,type:Ae}]):[]},[p,C]),U=_i.useMemo(()=>{var me;return(me=p==null?void 0:p.data)!=null&&me.related_media?p.data.related_media.slice(0,12).map(le=>({id:le.friendly_token,title:le.title,author:le.user||le.author_name||"Unknown",views:`${le.views} views`,thumbnail:le.thumbnail_url||le.author_thumbnail,category:le.media_type,url:le.url,duration:le.duration,size:le.size,likes:le.likes,dislikes:le.dislikes,add_date:le.add_date,description:le.description})):[]},[p]),Y=[{kind:"subtitles",src:"/sample-subtitles.vtt",srclang:"en",label:"English Subtitles",default:!1},{kind:"subtitles",src:"/sample-subtitles-greek.vtt",srclang:"el",label:"Greek Subtitles (Ελληνικά)",default:!1}],$=((fe=p==null?void 0:p.data)==null?void 0:fe.subtitles_info)||(f?Y:[]),G=$.length>0,W=G?$.map(me=>({kind:"subtitles",src:me.src,srclang:me.srclang,label:me.label,default:!1})):[],oe=()=>{p.onClickNextCallback&&typeof p.onClickNextCallback=="function"&&p.onClickNextCallback()};return _i.useEffect(()=>{if(e.current&&!i.current){if(e.current.player)return;const me=setTimeout(()=>{var le;if(!i.current&&e.current&&!e.current.player){i.current=F(e.current,{controls:!0,autoplay:!l,loop:!1,muted:p.urlMuted||!1,poster:C.poster,preload:"auto",sources:C.sources,aspectRatio:"16:9",audioOnlyMode:!1,audioPosterMode:((le=p.data)==null?void 0:le.media_type)==="audio",autoSetup:void 0,breakpoints:{tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:2561},disablePictureInPicture:!1,enableDocumentPictureInPicture:!1,enableSmoothSeeking:!1,experimentalSvgIcons:!1,fluid:!0,fullscreen:{options:{navigationUI:"hide"}},id:p.id,inactivityTimeout:l?5e3:2e3,language:"en",languages:{},liveui:!1,liveTracker:{trackingThreshold:20,liveTolerance:15},nativeControlsForTouch:!1,normalizeAutoplay:!0,notSupportedMessage:void 0,noUITitleAttributes:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playsinline:!0,plugins:{},posterImage:!0,preferFullWindow:!1,responsive:!0,restoreEl:!1,suppressNotSupportedError:!1,techCanOverridePoster:!1,techOrder:["html5"],userActions:{click:!0,tap:!0,doubleClick:!0,hotkeys:{fullscreenKey:function(Ae){return Ae.which===70},muteKey:function(Ae){return Ae.which===77},playPauseKey:function(Ae){return Ae.which===75||Ae.which===32},seekForwardKey:function(Ae){return Ae.which===39},seekBackwardKey:function(Ae){return Ae.which===37}}},"vtt.js":void 0,spatialNavigation:{enabled:!1,horizontalSeek:!1},controlBar:{progressControl:{seekBar:{timeTooltip:{displayNegative:!1}}},remainingTimeDisplay:!1,volumePanel:{inline:!0,vertical:!1},fullscreenToggle:!0,pictureInPictureToggle:!0,playbackRateMenuButton:!1,descriptionsButton:!1,subtitlesButton:!!G,captionsButton:!1,audioTrackButton:!1,liveDisplay:!1,seekToLive:!1,customControlSpacer:!1,chaptersButton:D&&D.length>0},html5:{nativeControlsForTouch:!1,nativeAudioTracks:!1,nativeTextTracks:!1,nativeVideoTracks:!1,preloadTextTracks:!0,playsinline:!0},children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"]}),i.current.ready(()=>{var dt,Ht,Si;if(r.current.applyToPlayer(i.current),r.current.setupAutoSave(i.current),typeof window<"u"&&(window.videojsPlayers||(window.videojsPlayers={}),window.videojsPlayers[s]=i.current),p.onPlayerInitCallback&&typeof p.onPlayerInitCallback=="function"&&p.onPlayerInitCallback({player:i.current},i.current.el()),p.urlTimestamp!==null&&p.urlTimestamp>=0){const ye=p.urlTimestamp;i.current.readyState()>=1?ye<i.current.duration()?i.current.currentTime(ye):ye>=0&&i.current.play():i.current.one("loadedmetadata",()=>{ye>=0&&ye<i.current.duration()?i.current.currentTime(ye):ye>=0&&i.current.play()})}const Ae=()=>document.hasFocus()||document.visibilityState==="visible"||sessionStorage.getItem("userInteracted")==="true",ne=async()=>{const ye=Ae(),xe=r.current.getPreference("muted");try{!p.urlMuted&&ye&&xe!==!0&&i.current.muted(!1),await i.current.play()}catch{if(!i.current.muted())try{if(i.current.muted(!0),await i.current.play(),xe!==!0){const Xe=()=>{i.current&&!i.current.isDisposed()&&(i.current.muted(!1),i.current.trigger("notify","🔊 Sound enabled!"))};if(ye)setTimeout(Xe,100);else{setTimeout(()=>{i.current&&!i.current.isDisposed()&&i.current.trigger("notify","🔇 Click anywhere to enable sound")},1e3);const $e=()=>{Xe(),sessionStorage.setItem("userInteracted","true"),document.removeEventListener("click",$e),document.removeEventListener("keydown",$e),document.removeEventListener("touchstart",$e)};document.addEventListener("click",$e,{once:!0}),document.addEventListener("keydown",$e,{once:!0}),document.addEventListener("touchstart",$e,{once:!0})}}}catch(Xe){console.error("❌ Even muted autoplay was blocked:",Xe.message)}}};l?setTimeout(()=>{const ye=i.current.getChild("bigPlayButton"),xe=i.current.getChild("controlBar");if(ye){ye.show();const ze=ye.el();ze&&(ze.style.display="block",ze.style.visibility="visible",ze.style.opacity="1",ze.style.zIndex="10")}if(xe){xe.hide();const ze=xe.el();ze&&(ze.style.opacity="0",ze.style.visibility="hidden",ze.style.transition="opacity 0.3s ease")}const Pe=i.current.el(),Xe=Pe.querySelector("video"),$e=Pe.querySelector(".vjs-poster");if(Xe&&$e&&(Xe.style.opacity="0",$e.style.zIndex="1",$e.style.position="absolute",$e.style.top="0",$e.style.left="0",$e.style.width="100%",$e.style.height="100%"),i.current.userActive(!1),Pe){const ze=()=>{if(xe){xe.show();const Je=xe.el();Je&&(Je.style.opacity="1",Je.style.visibility="visible")}i.current.userActive(!0)},Tt=()=>{if(i.current.paused()){if(xe){const Je=xe.el();Je&&(Je.style.opacity="0",Je.style.visibility="hidden"),setTimeout(()=>{i.current.paused()&&xe.hide()},300)}i.current.userActive(!1)}};Pe.addEventListener("mouseenter",ze),Pe.addEventListener("mouseleave",Tt),o.current.embedControlsCleanup=()=>{Pe.removeEventListener("mouseenter",ze),Pe.removeEventListener("mouseleave",Tt)}}},100):(p!=null&&p.urlAutoplay,ne()),setTimeout(()=>{const xe=i.current.el().querySelector("video");if(xe){xe.style.touchAction="manipulation";let Pe=0,Xe={x:0,y:0};const $e=Tt=>{var De;Pe=Date.now();const Je=Tt.touches[0];Xe={x:Je.clientX,y:Je.clientY};const Oi=(De=i.current.getChild("controlBar"))==null?void 0:De.getChild("progressControl");if(Oi&&Oi.el()){const Ot=Oi.el().getBoundingClientRect(),At=8;Je.clientY>=Ot.top-At&&Je.clientY<=Ot.bottom&&(i.current.seekbarTouching=!0)}},ze=Tt=>{if(Date.now()-Pe<500&&!i.current.seekbarTouching){const De=Tt.changedTouches[0],Ot={x:De.clientX,y:De.clientY};if(Math.sqrt(Math.pow(Ot.x-Xe.x,2)+Math.pow(Ot.y-Xe.y,2))<50){Tt.preventDefault(),Tt.stopPropagation();const li=i.current.getChild("controlBar"),Ut=li?li.el():null,gi=Ut&&window.getComputedStyle(Ut).opacity!=="0"&&window.getComputedStyle(Ut).visibility!=="hidden",Zt=o.current.seekIndicator,xt=Zt?Zt.el():null,ui=xt&&window.getComputedStyle(xt).opacity!=="0"&&window.getComputedStyle(xt).visibility!=="hidden"&&window.getComputedStyle(xt).display!=="none";let ks=!1;if(xt&&ui){const An=xt.getBoundingClientRect();ks=De.clientX>=An.left&&De.clientX<=An.right&&De.clientY>=An.top&&De.clientY<=An.bottom}i.current.paused()?i.current.play():ks||gi?i.current.pause():(i.current.userActive(!0),Zt&&Zt.showMobilePauseIcon())}}setTimeout(()=>{i.current&&(i.current.seekbarTouching=!1)},50)};xe.addEventListener("touchstart",$e,{passive:!0}),xe.addEventListener("touchend",ze,{passive:!1})}},100);const pe=i.current.getChild("controlBar"),Ue=pe.getChild("playToggle");pe.getChild("currentTimeDisplay");const se=pe.getChild("progressControl"),Oe=se.getChild("seekBar"),we=pe.getChild("chaptersButton");if(l||new URLSearchParams(window.location.search).get("m")&&setTimeout(async()=>{if(i.current&&!i.current.isDisposed())try{await i.current.play()}catch(Pe){if(console.error(" Browser prevented play:",Pe.message),!i.current.muted())try{i.current.muted(!0),await i.current.play()}catch(Xe){console.error(" Even muted play was blocked:",Xe.message)}}},100),G)try{const ye=r.current.getPreference("subtitleLanguage"),xe=r.current.getPreference("subtitleEnabled"),Pe=($e,ze)=>{const Tt=String($e.srclang||$e.language||"").toLowerCase(),Je=String(ze||"").toLowerCase();return!Tt||!Je?!1:Tt===Je||Tt.startsWith(Je+"-")||Je.startsWith(Tt+"-")};W.map($e=>({...$e,default:!!(xe&&ye&&Pe($e,ye))})).forEach($e=>{i.current.addRemoteTextTrack($e,!1)})}catch{W.forEach(xe=>{i.current.addRemoteTextTrack(xe,!1)})}if(r.current.applySubtitlePreference(i.current),i.current.one("loadeddata",()=>r.current.applySubtitlePreference(i.current)),i.current.one("canplay",()=>r.current.applySubtitlePreference(i.current)),D&&D.length>0){const ye=i.current.addTextTrack("chapters","Chapters","en");D.forEach(xe=>{const Pe=new(window.VTTCue||window.TextTrackCue)(xe.startTime,xe.endTime,xe.chapterTitle);ye.addCue(Pe)})}const qe=Ue.el(),We=document.createElement("div");We.className="vjs-play-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",qe.parentNode.insertBefore(We,qe),We.appendChild(qe);const Ze=new Uy(i.current,{displayNegative:!1,customPrefix:"",customSuffix:""}),He=pe.children().indexOf(Ue);if(pe.addChild(Ze,{},He+1),o.current.customRemainingTime=Ze,!l&&(p!=null&&p.nextLink||f)){const ye=new qx(i.current,{nextLink:p.nextLink}),xe=pe.children().indexOf(Ue);pe.addChild(ye,{},xe+2),setTimeout(()=>{const Pe=ye.el();if(Pe){const Xe=document.createElement("div");Xe.className="vjs-next-video-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",Pe.parentNode.insertBefore(Xe,Pe),Xe.appendChild(Pe)}},100)}if(setTimeout(()=>{const ye=pe.getChild("volumePanel");if(ye){const xe=ye.el();if(xe){const Pe=document.createElement("div");Pe.className="vjs-volume-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",xe.parentNode.insertBefore(Pe,xe),Pe.appendChild(xe)}}},100),!l)try{const ye=new Vx(i.current,{userPreferences:r.current,isTouchDevice:c}),xe=we?pe.children().indexOf(we):-1,Pe=xe>0?xe:pe.children().length-3;pe.addChild(ye,{},Pe),o.current.autoplayToggleButton=ye,setTimeout(()=>{ye.updateIcon()},100),setTimeout(()=>{const Xe=ye.el();if(Xe){const $e=document.createElement("div");$e.className="vjs-autoplay-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",Xe.parentNode.insertBefore($e,Xe),$e.appendChild(Xe)}},150)}catch(ye){console.error("✗ Failed to add autoplay toggle button:",ye)}if(setTimeout(()=>{(()=>{["subtitlesButton","playbackRateMenuButton"].forEach(Xe=>{const $e=pe.getChild(Xe);if($e&&$e.menuButton_){const ze=$e.menuButton_;ze.off("mouseenter"),ze.off("mouseleave"),ze.on("click",function(){this.menu.hasClass("vjs-lock-showing")?(this.menu.removeClass("vjs-lock-showing"),this.menu.hide()):(this.menu.addClass("vjs-lock-showing"),this.menu.show())})}else if($e){const ze=$e.el();ze&&ze.addEventListener("click",function(Tt){Tt.preventDefault(),Tt.stopPropagation();const Je=ze.querySelector(".vjs-menu");Je&&(Je.style.display==="block"?Je.style.display="none":(document.querySelectorAll(".vjs-menu").forEach(Oi=>{Oi!==Je&&(Oi.style.display="none")}),Je.style.display="block"))})}});const Pe=["subtitlesButton","captionsButton","subsCapsButton"];for(const Xe of Pe){const $e=pe.getChild(Xe);if($e&&$e.el()){const ze=$e.el(),Tt=ze.querySelector(".vjs-menu");Tt&&(Tt.style.display="none");const Je=Ot=>{Ot.preventDefault(),Ot.stopPropagation();const At=i.current.textTracks();let li=!1;for(let Ut=0;Ut<At.length;Ut++){const gi=At[Ut];if(gi.kind==="subtitles"&&gi.mode==="showing"){li=!0;break}}if(li){for(let Ut=0;Ut<At.length;Ut++){const gi=At[Ut];gi.kind==="subtitles"&&(gi.mode="disabled")}ze.classList.remove("vjs-subs-active");try{r.current.setPreference("subtitleEnabled",!1,!0)}catch{}}else{const Ut=r.current.getPreference("subtitleLanguage");if(!Ut){let Zt=null;for(let xt=0;xt<At.length;xt++){const ui=At[xt];if(ui.kind==="subtitles"){Zt=ui.language;break}}if(Zt){for(let xt=0;xt<At.length;xt++){const ui=At[xt];ui.kind==="subtitles"&&(ui.mode=ui.language===Zt?"showing":"disabled")}try{r.current.setPreference("subtitleLanguage",Zt,!0)}catch{}try{r.current.setPreference("subtitleEnabled",!0,!0)}catch{}ze.classList.add("vjs-subs-active")}return}let gi=!1;for(let Zt=0;Zt<At.length;Zt++){const xt=At[Zt];if(xt.kind==="subtitles"){const ui=xt.language===Ut;xt.mode=ui?"showing":"disabled",ui&&(gi=!0)}}if(gi){ze.classList.add("vjs-subs-active");try{r.current.setPreference("subtitleEnabled",!0,!0)}catch{}}}};ze.addEventListener("click",Je,{capture:!0}),ze.addEventListener("touchend",Ot=>{Ot.preventDefault(),Ot.stopPropagation(),Je(Ot)},{passive:!1}),i.current.on("texttrackchange",()=>{const Ot=i.current.textTracks();let At=!1;for(let li=0;li<Ot.length;li++){const Ut=Ot[li];if(Ut.kind==="subtitles"&&Ut.mode==="showing"){At=!0;break}}At?ze.classList.add("vjs-subs-active"):ze.classList.remove("vjs-subs-active")});const Oi=i.current.textTracks();let De=!1;for(let Ot=0;Ot<Oi.length;Ot++){const At=Oi[Ot];if(At.kind==="subtitles"&&At.mode==="showing"){De=!0;break}}De&&ze.classList.add("vjs-subs-active");break}}})()},1500),se&&Oe){if(D&&D.length>0){const xe=new Px(i.current,{previewSprite:p.previewSprite,isTouchDevice:c});Oe.addChild(xe)}else if(p.previewSprite&&!c){const xe=new Bx(i.current,{previewSprite:p.previewSprite,isTouchDevice:c});Oe.addChild(xe),setTimeout(()=>{xe.setupProgressBarHover()},100)}}setTimeout(()=>{const ye=document.createElement("div");ye.className="vjs-spacer-control vjs-control",ye.style.flex="1",ye.style.minWidth="1px",ye.style.height="100%";const xe=pe.getChild("durationDisplay");if(xe&&xe.el()){const Pe=pe.el(),$e=xe.el().nextSibling;Pe.insertBefore(ye,$e)}},300),setTimeout(()=>{try{const ye=pe.getChild("pictureInPictureToggle"),xe=pe.getChild("fullscreenToggle");ye&&(pe.removeChild(ye),pe.addChild(ye)),xe&&(pe.removeChild(xe),pe.addChild(xe))}catch(ye){console.error("✗ Failed to move PiP/Fullscreen buttons to end:",ye)}},100),D&&D.length>0&&(o.current.chaptersOverlay=new Py(i.current,{chaptersData:D,seriesTitle:((dt=p==null?void 0:p.data)==null?void 0:dt.title)||"Chapters",channelName:"Chapter",thumbnail:((Ht=p==null?void 0:p.data)==null?void 0:Ht.thumbnail_url)||((Si=p==null?void 0:p.data)==null?void 0:Si.author_thumbnail)||""})),l&&(o.current.embedInfoOverlay=new Ux(i.current,{authorName:C.author_name,authorProfile:C.author_profile,authorThumbnail:C.author_thumbnail,videoTitle:C.title,videoUrl:C.url})),o.current.settingsMenu=new By(i.current,{userPreferences:r.current,qualities:P,hasSubtitles:G,isTouchDevice:c});try{i.current.on("loadedmetadata",()=>{var ye;if(o.current.settingsMenu&&o.current.settingsMenu.setQualities){const xe=typeof window<"u"?window.MEDIA_DATA:null,Pe=((ye=xe==null?void 0:xe.data)==null?void 0:ye.qualities)||P;o.current.settingsMenu.setQualities(Pe)}})}catch{}setTimeout(()=>{if(i.current.getChild("controlBar")&&o.current.settingsMenu&&o.current.settingsMenu.settingsButton){const xe=o.current.settingsMenu.settingsButton.el();if(xe){const Pe=document.createElement("div");Pe.className="vjs-settings-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",xe.parentNode.insertBefore(Pe,xe),Pe.appendChild(xe)}}},200),setTimeout(()=>{const ye=i.current.getChild("controlBar"),xe=ye==null?void 0:ye.getChild("pictureInPictureToggle");if(xe){const Pe=xe.el();if(Pe){const Xe=document.createElement("div");Xe.className="vjs-pip-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",Pe.parentNode.insertBefore(Xe,Pe),Xe.appendChild(Pe)}}},100),setTimeout(()=>{const ye=i.current.getChild("controlBar"),xe=ye==null?void 0:ye.getChild("fullscreenToggle");if(xe){const Pe=xe.el();if(Pe){const Xe=document.createElement("div");Xe.className="vjs-fullscreen-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",Pe.parentNode.insertBefore(Xe,Pe),Xe.appendChild(Pe)}}},100),o.current.seekIndicator=new Yx(i.current,{seekAmount:5,isEmbedPlayer:l}),i.current.addChild(o.current.seekIndicator),o.current.seekIndicator.hide();const Fe=ye=>{const xe=document.activeElement;if(xe&&(xe.tagName==="INPUT"||xe.tagName==="TEXTAREA"||xe.contentEditable==="true"))return;if(ye.code==="Space"||ye.key===" "){ye.preventDefault(),i.current&&(i.current.paused()?i.current.play():i.current.pause());return}const Xe=5;if(ye.key==="ArrowRight"||ye.keyCode===39){ye.preventDefault();const $e=i.current.currentTime(),ze=i.current.duration(),Tt=Math.min($e+Xe,ze);i.current.currentTime(Tt),o.current.seekIndicator&&o.current.seekIndicator.show("forward",Xe)}else if(ye.key==="ArrowLeft"||ye.keyCode===37){ye.preventDefault();const $e=i.current.currentTime(),ze=Math.max($e-Xe,0);i.current.currentTime(ze),o.current.seekIndicator&&o.current.seekIndicator.show("backward",Xe)}};document.addEventListener("keydown",Fe),o.current.cleanupArrowKeyHandler=()=>{document.removeEventListener("keydown",Fe)}}),i.current.on("nextVideo",()=>{oe()});const _e=setInterval(()=>{i.current&&!i.current.paused()&&!i.current.ended()&&!(document.querySelector(".vjs-settings-overlay.show")||document.querySelector(".vjs-menu-button-popup.vjs-lock-showing")||document.querySelector(".vjs-texttrack-settings")||document.querySelector(".vjs-menu.vjs-lock-showing"))&&i.current.userActivity_&&Date.now()-i.current.userActivity_>(l?5500:2500)&&i.current.userActive(!1)},1e3);o.current.forceHideInterval=_e,i.current.on("play",()=>{if(!i.current.isChangingQuality&&o.current.seekIndicator&&o.current.seekIndicator.show("play"),l){const Ae=i.current.el(),ne=Ae.querySelector("video"),Se=Ae.querySelector(".vjs-poster"),pe=i.current.getChild("bigPlayButton");ne&&(ne.style.opacity="1"),Se&&(Se.style.opacity="0"),pe&&pe.hide()}}),i.current.on("pause",()=>{if(!i.current.isChangingQuality&&o.current.seekIndicator&&o.current.seekIndicator.show("pause"),l&&i.current.currentTime()===0){const Ae=i.current.el(),ne=Ae.querySelector("video"),Se=Ae.querySelector(".vjs-poster"),pe=i.current.getChild("bigPlayButton");ne&&(ne.style.opacity="0"),Se&&(Se.style.opacity="1"),pe&&pe.show()}});let he=null,ge=null;i.current.on("ended",()=>{if(l){const pe=i.current.getChild("bigPlayButton");pe&&pe.show()}setTimeout(()=>{if(i.current&&!i.current.isDisposed()&&i.current.el()){const Ue=i.current.getChild("controlBar");Ue&&(Ue.show(),Ue.el().style.opacity="1",Ue.el().style.pointerEvents="auto")}},50);const Ae=r.current.getAutoplayPreference(),ne=p.nextLink!==null;if(!l&&Ae&&ne)if(C.isPlayList)he&&(i.current.removeChild(he),he=null),ge&&(i.current.removeChild(ge),ge=null),oe();else{let pe={title:"Next Video",author:"",duration:0,thumbnail:""};if(U.length>0){const Ue=U[0];pe={title:Ue.title||"Next Video",author:Ue.author||"",duration:Ue.duration||0,thumbnail:Ue.thumbnail||""}}he&&(i.current.removeChild(he),he=null),ge&&(i.current.removeChild(ge),ge=null),ge=new zx(i.current,{nextVideoData:pe,countdownSeconds:5,onPlayNext:()=>{oe()},onCancel:()=>{ge&&(i.current.removeChild(ge),ge=null),Se()}}),i.current.addChild(ge),setTimeout(()=>{ge&&!ge.isDisposed()&&ge.startCountdown()},0)}else Se();function Se(){he&&(i.current.removeChild(he),he=null),he=new jx(i.current,{relatedVideos:U}),he.relatedVideos=U,i.current.addChild(he),he.show()}}),i.current.on("play",()=>{he&&he.hide(),ge&&ge.stopCountdown()}),i.current.on("seeking",()=>{he&&he.hide(),ge&&ge.stopCountdown()}),i.current.on("replay",()=>{he&&he.hide(),i.current.currentTime(0),i.current.play()}),i.current.on("error",Ae=>{}),i.current.on("fullscreenchange",()=>{}),i.current.on("volumechange",()=>{}),i.current.on("ratechange",()=>{}),i.current.on("texttrackchange",()=>{}),i.current.ready(()=>{if(i.current.el()){const Ae=i.current.el();Ae.setAttribute("tabindex","0"),Ae.focus()}}),i.current.on("fullscreenchange",()=>{setTimeout(()=>{if(i.current&&i.current.el()){const Ae=i.current.el();if(Ae.setAttribute("tabindex","0"),Ae.focus(),i.current.isFullscreen()){const ne=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;ne&&(ne.setAttribute("tabindex","0"),ne.focus())}}},100)})}},0);return()=>{clearTimeout(me)}}return()=>{o.current&&o.current.cleanupArrowKeyHandler&&o.current.cleanupArrowKeyHandler(),o.current&&o.current.cleanupSeekbarTouch&&o.current.cleanupSeekbarTouch(),o.current&&o.current.embedControlsCleanup&&o.current.embedControlsCleanup(),o.current&&o.current.forceHideInterval&&clearInterval(o.current.forceHideInterval),i.current&&!i.current.isDisposed()&&(i.current.dispose(),i.current=null)}},[]),_i.useEffect(()=>{const me=()=>{if(i.current&&i.current.el()){const Ae=i.current.el();Ae.setAttribute("tabindex","0"),Ae.focus()}},le=()=>{document.hidden||setTimeout(me,100)},_e=()=>{setTimeout(me,100)};document.addEventListener("visibilitychange",le),window.addEventListener("focus",_e);const ge=[100,500,1e3,2e3].map(Ae=>setTimeout(me,Ae));return()=>{document.removeEventListener("visibilitychange",le),window.removeEventListener("focus",_e),ge.forEach(clearTimeout)}},[]),Bl.jsx("video",{ref:e,id:s,className:`video-js vjs-default-skin${C.useRoundedCorners?" video-js-rounded-corners":""}`,tabIndex:"0"})}function Qx({videoId:s="default-video",...e}){return Bl.jsx(Z3,{videoId:s,...e})}const jd=()=>{const s=document.getElementById("video-js-root-main");s&&!s.hasChildNodes()&&zb.createRoot(s).render(Bl.jsx(_i.StrictMode,{children:Bl.jsx(Qx,{videoId:"video-main"})}));const e=document.getElementById("video-js-root-embed");e&&!e.hasChildNodes()&&zb.createRoot(e).render(Bl.jsx(_i.StrictMode,{children:Bl.jsx(Qx,{videoId:"video-embed"})}))};window.triggerVideoJSMount=jd,document.addEventListener("triggerVideoJSMount",()=>{jd()}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",jd):jd(),setInterval(()=>{const s=document.getElementById("video-js-root-embed");s&&!s.hasChildNodes()&&jd()},1e3)})();
//# sourceMappingURL=video-js.js.map