mediacms/static/video_js/video-js.js
Yiannis Christodoulou a89ee7b0e0 fix: Fullscreeen left/right/play/pause arrow keys doesn't work
BUG3. Fullscreeen left / right arrows doesn't work. Even if they work, if i leave the fullscreen and then enter again they are lost.
2025-10-03 11:24:30 +03:00

805 lines
1.1 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 Mf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function w_(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 A_={exports:{}},Wc={},D_={exports:{}},Qc={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.
*/Qc.exports;var k_;function OD(){return k_||(k_=1,function(s,e){(function(){function i(D,X){Object.defineProperty(u.prototype,D,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",X[0],X[1])}})}function r(D){return D===null||typeof D!="object"?null:(D=Ze&&D[Ze]||D["@@iterator"],typeof D=="function"?D:null)}function o(D,X){D=(D=D.constructor)&&(D.displayName||D.name)||"ReactClass";var ge=D+"."+X;pt[ge]||(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.",X,D),pt[ge]=!0)}function u(D,X,ge){this.props=D,this.context=X,this.refs=Sn,this.updater=ge||At}function c(){}function f(D,X,ge){this.props=D,this.context=X,this.refs=Sn,this.updater=ge||At}function m(D){return""+D}function b(D){try{m(D);var X=!1}catch{X=!0}if(X){X=console;var ge=X.error,Ee=typeof Symbol=="function"&&Symbol.toStringTag&&D[Symbol.toStringTag]||D.constructor.name||"Object";return ge.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Ee),m(D)}}function S(D){if(D==null)return null;if(typeof D=="function")return D.$$typeof===xn?null:D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case ee:return"Fragment";case ve:return"Profiler";case we:return"StrictMode";case at:return"Suspense";case Me:return"SuspenseList";case ft:return"Activity"}if(typeof D=="object")switch(typeof D.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),D.$$typeof){case Be:return"Portal";case Ue:return(D.displayName||"Context")+".Provider";case Re:return(D._context.displayName||"Context")+".Consumer";case ht:var X=D.render;return D=D.displayName,D||(D=X.displayName||X.name||"",D=D!==""?"ForwardRef("+D+")":"ForwardRef"),D;case ke:return X=D.displayName||null,X!==null?X:S(D.type)||"Memo";case ut:X=D._payload,D=D._init;try{return S(D(X))}catch{}}return null}function x(D){if(D===ee)return"<>";if(typeof D=="object"&&D!==null&&D.$$typeof===ut)return"<...>";try{var X=S(D);return X?"<"+X+">":"<...>"}catch{return"<...>"}}function w(){var D=_e.A;return D===null?null:D.getOwner()}function R(){return Error("react-stack-top-frame")}function L(D){if(Ei.call(D,"key")){var X=Object.getOwnPropertyDescriptor(D,"key").get;if(X&&X.isReactWarning)return!1}return D.key!==void 0}function A(D,X){function ge(){$t||($t=!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)",X))}ge.isReactWarning=!0,Object.defineProperty(D,"key",{get:ge,configurable:!0})}function q(){var D=S(this.type);return Hr[D]||(Hr[D]=!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.")),D=this.props.ref,D!==void 0?D:null}function U(D,X,ge,Ee,Pe,Je,Ge,ct){return ge=Je.ref,D={$$typeof:Oe,type:D,key:X,props:Je,_owner:Pe},(ge!==void 0?ge:null)!==null?Object.defineProperty(D,"ref",{enumerable:!1,get:q}):Object.defineProperty(D,"ref",{enumerable:!1,value:null}),D._store={},Object.defineProperty(D._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(D,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(D,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ge}),Object.defineProperty(D,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ct}),Object.freeze&&(Object.freeze(D.props),Object.freeze(D)),D}function G(D,X){return X=U(D.type,X,void 0,void 0,D._owner,D.props,D._debugStack,D._debugTask),D._store&&(X._store.validated=D._store.validated),X}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===Oe}function W(D){var X={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ge){return X[ge]})}function K(D,X){return typeof D=="object"&&D!==null&&D.key!=null?(b(D.key),W(""+D.key)):X.toString(36)}function le(){}function Y(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(le,le):(D.status="pending",D.then(function(X){D.status==="pending"&&(D.status="fulfilled",D.value=X)},function(X){D.status==="pending"&&(D.status="rejected",D.reason=X)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function J(D,X,ge,Ee,Pe){var Je=typeof D;(Je==="undefined"||Je==="boolean")&&(D=null);var Ge=!1;if(D===null)Ge=!0;else switch(Je){case"bigint":case"string":case"number":Ge=!0;break;case"object":switch(D.$$typeof){case Oe:case Be:Ge=!0;break;case ut:return Ge=D._init,J(Ge(D._payload),X,ge,Ee,Pe)}}if(Ge){Ge=D,Pe=Pe(Ge);var ct=Ee===""?"."+K(Ge,0):Ee;return dt(Pe)?(ge="",ct!=null&&(ge=ct.replace(Ba,"$&/")+"/"),J(Pe,X,ge,"",function(si){return si})):Pe!=null&&($(Pe)&&(Pe.key!=null&&(Ge&&Ge.key===Pe.key||b(Pe.key)),ge=G(Pe,ge+(Pe.key==null||Ge&&Ge.key===Pe.key?"":(""+Pe.key).replace(Ba,"$&/")+"/")+ct),Ee!==""&&Ge!=null&&$(Ge)&&Ge.key==null&&Ge._store&&!Ge._store.validated&&(ge._store.validated=2),Pe=ge),X.push(Pe)),1}if(Ge=0,ct=Ee===""?".":Ee+":",dt(D))for(var Ye=0;Ye<D.length;Ye++)Ee=D[Ye],Je=ct+K(Ee,Ye),Ge+=J(Ee,X,ge,Je,Pe);else if(Ye=r(D),typeof Ye=="function")for(Ye===D.entries&&(jr||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),jr=!0),D=Ye.call(D),Ye=0;!(Ee=D.next()).done;)Ee=Ee.value,Je=ct+K(Ee,Ye++),Ge+=J(Ee,X,ge,Je,Pe);else if(Je==="object"){if(typeof D.then=="function")return J(Y(D),X,ge,Ee,Pe);throw X=String(D),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ge}function te(D,X,ge){if(D==null)return D;var Ee=[],Pe=0;return J(D,Ee,"","",function(Je){return X.call(ge,Je,Pe++)}),Ee}function xe(D){if(D._status===-1){var X=D._result;X=X(),X.then(function(ge){(D._status===0||D._status===-1)&&(D._status=1,D._result=ge)},function(ge){(D._status===0||D._status===-1)&&(D._status=2,D._result=ge)}),D._status===-1&&(D._status=0,D._result=X)}if(D._status===1)return X=D._result,X===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?`,X),"default"in X||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
Your code should look like:
const MyComponent = lazy(() => import('./MyComponent'))`,X),X.default;throw D._result}function he(){var D=_e.H;return D===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.`),D}function be(){}function ye(D){if(gt===null)try{var X=("require"+Math.random()).slice(0,7);gt=(s&&s[X]).call(s,"timers").setImmediate}catch{gt=function(Ee){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 Pe=new MessageChannel;Pe.port1.onmessage=Ee,Pe.port2.postMessage(void 0)}}return gt(D)}function pe(D){return 1<D.length&&typeof AggregateError=="function"?new AggregateError(D):D[0]}function He(D,X){X!==tr-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. "),tr=X}function ce(D,X,ge){var Ee=_e.actQueue;if(Ee!==null)if(Ee.length!==0)try{Ce(Ee),ye(function(){return ce(D,X,ge)});return}catch(Pe){_e.thrownErrors.push(Pe)}else _e.actQueue=null;0<_e.thrownErrors.length?(Ee=pe(_e.thrownErrors),_e.thrownErrors.length=0,ge(Ee)):X(D)}function Ce(D){if(!qn){qn=!0;var X=0;try{for(;X<D.length;X++){var ge=D[X];do{_e.didUsePromise=!1;var Ee=ge(!1);if(Ee!==null){if(_e.didUsePromise){D[X]=ge,D.splice(0,X);return}ge=Ee}else break}while(1)}D.length=0}catch(Pe){D.splice(0,X+1),_e.thrownErrors.push(Pe)}finally{qn=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Oe=Symbol.for("react.transitional.element"),Be=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),we=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Re=Symbol.for("react.consumer"),Ue=Symbol.for("react.context"),ht=Symbol.for("react.forward_ref"),at=Symbol.for("react.suspense"),Me=Symbol.for("react.suspense_list"),ke=Symbol.for("react.memo"),ut=Symbol.for("react.lazy"),ft=Symbol.for("react.activity"),Ze=Symbol.iterator,pt={},At={isMounted:function(){return!1},enqueueForceUpdate:function(D){o(D,"forceUpdate")},enqueueReplaceState:function(D){o(D,"replaceState")},enqueueSetState:function(D){o(D,"setState")}},Vt=Object.assign,Sn={};Object.freeze(Sn),u.prototype.isReactComponent={},u.prototype.setState=function(D,X){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,X,"setState")},u.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};var kt={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)."]},Ot;for(Ot in kt)kt.hasOwnProperty(Ot)&&i(Ot,kt[Ot]);c.prototype=u.prototype,kt=f.prototype=new c,kt.constructor=f,Vt(kt,u.prototype),kt.isPureReactComponent=!0;var dt=Array.isArray,xn=Symbol.for("react.client.reference"),_e={H:null,A:null,T:null,S:null,V:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Ei=Object.prototype.hasOwnProperty,ci=console.createTask?console.createTask:function(){return null};kt={"react-stack-bottom-frame":function(D){return D()}};var $t,Ci,Hr={},Pa=kt["react-stack-bottom-frame"].bind(kt,R)(),er=ci(x(R)),jr=!1,Ba=/\/+/g,zr=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},Ua=!1,gt=null,tr=0,Wi=!1,qn=!1,ir=typeof queueMicrotask=="function"?function(D){queueMicrotask(function(){return queueMicrotask(D)})}:ye;kt=Object.freeze({__proto__:null,c:function(D){return he().useMemoCache(D)}}),e.Children={map:te,forEach:function(D,X,ge){te(D,function(){X.apply(this,arguments)},ge)},count:function(D){var X=0;return te(D,function(){X++}),X},toArray:function(D){return te(D,function(X){return X})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},e.Component=u,e.Fragment=ee,e.Profiler=ve,e.PureComponent=f,e.StrictMode=we,e.Suspense=at,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_e,e.__COMPILER_RUNTIME=kt,e.act=function(D){var X=_e.actQueue,ge=tr;tr++;var Ee=_e.actQueue=X!==null?X:[],Pe=!1;try{var Je=D()}catch(Ye){_e.thrownErrors.push(Ye)}if(0<_e.thrownErrors.length)throw He(X,ge),D=pe(_e.thrownErrors),_e.thrownErrors.length=0,D;if(Je!==null&&typeof Je=="object"&&typeof Je.then=="function"){var Ge=Je;return ir(function(){Pe||Wi||(Wi=!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(Ye,si){Pe=!0,Ge.then(function(ws){if(He(X,ge),ge===0){try{Ce(Ee),ye(function(){return ce(ws,Ye,si)})}catch(Ud){_e.thrownErrors.push(Ud)}if(0<_e.thrownErrors.length){var Bd=pe(_e.thrownErrors);_e.thrownErrors.length=0,si(Bd)}}else Ye(ws)},function(ws){He(X,ge),0<_e.thrownErrors.length&&(ws=pe(_e.thrownErrors),_e.thrownErrors.length=0),si(ws)})}}}var ct=Je;if(He(X,ge),ge===0&&(Ce(Ee),Ee.length!==0&&ir(function(){Pe||Wi||(Wi=!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(() => ...)"))}),_e.actQueue=null),0<_e.thrownErrors.length)throw D=pe(_e.thrownErrors),_e.thrownErrors.length=0,D;return{then:function(Ye,si){Pe=!0,ge===0?(_e.actQueue=Ee,ye(function(){return ce(ct,Ye,si)})):Ye(ct)}}},e.cache=function(D){return function(){return D.apply(null,arguments)}},e.captureOwnerStack=function(){var D=_e.getCurrentStack;return D===null?null:D()},e.cloneElement=function(D,X,ge){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var Ee=Vt({},D.props),Pe=D.key,Je=D._owner;if(X!=null){var Ge;e:{if(Ei.call(X,"ref")&&(Ge=Object.getOwnPropertyDescriptor(X,"ref").get)&&Ge.isReactWarning){Ge=!1;break e}Ge=X.ref!==void 0}Ge&&(Je=w()),L(X)&&(b(X.key),Pe=""+X.key);for(ct in X)!Ei.call(X,ct)||ct==="key"||ct==="__self"||ct==="__source"||ct==="ref"&&X.ref===void 0||(Ee[ct]=X[ct])}var ct=arguments.length-2;if(ct===1)Ee.children=ge;else if(1<ct){Ge=Array(ct);for(var Ye=0;Ye<ct;Ye++)Ge[Ye]=arguments[Ye+2];Ee.children=Ge}for(Ee=U(D.type,Pe,void 0,void 0,Je,Ee,D._debugStack,D._debugTask),Pe=2;Pe<arguments.length;Pe++)Je=arguments[Pe],$(Je)&&Je._store&&(Je._store.validated=1);return Ee},e.createContext=function(D){return D={$$typeof:Ue,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:Re,_context:D},D._currentRenderer=null,D._currentRenderer2=null,D},e.createElement=function(D,X,ge){for(var Ee=2;Ee<arguments.length;Ee++){var Pe=arguments[Ee];$(Pe)&&Pe._store&&(Pe._store.validated=1)}if(Ee={},Pe=null,X!=null)for(Ye in Ci||!("__self"in X)||"key"in X||(Ci=!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")),L(X)&&(b(X.key),Pe=""+X.key),X)Ei.call(X,Ye)&&Ye!=="key"&&Ye!=="__self"&&Ye!=="__source"&&(Ee[Ye]=X[Ye]);var Je=arguments.length-2;if(Je===1)Ee.children=ge;else if(1<Je){for(var Ge=Array(Je),ct=0;ct<Je;ct++)Ge[ct]=arguments[ct+2];Object.freeze&&Object.freeze(Ge),Ee.children=Ge}if(D&&D.defaultProps)for(Ye in Je=D.defaultProps,Je)Ee[Ye]===void 0&&(Ee[Ye]=Je[Ye]);Pe&&A(Ee,typeof D=="function"?D.displayName||D.name||"Unknown":D);var Ye=1e4>_e.recentlyCreatedOwnerStacks++;return U(D,Pe,void 0,void 0,w(),Ee,Ye?Error("react-stack-top-frame"):Pa,Ye?ci(x(D)):er)},e.createRef=function(){var D={current:null};return Object.seal(D),D},e.forwardRef=function(D){D!=null&&D.$$typeof===ke?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof D!="function"?console.error("forwardRef requires a render function but was given %s.",D===null?"null":typeof D):D.length!==0&&D.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",D.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),D!=null&&D.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var X={$$typeof:ht,render:D},ge;return Object.defineProperty(X,"displayName",{enumerable:!1,configurable:!0,get:function(){return ge},set:function(Ee){ge=Ee,D.name||D.displayName||(Object.defineProperty(D,"name",{value:Ee}),D.displayName=Ee)}}),X},e.isValidElement=$,e.lazy=function(D){return{$$typeof:ut,_payload:{_status:-1,_result:D},_init:xe}},e.memo=function(D,X){D==null&&console.error("memo: The first argument must be a component. Instead received: %s",D===null?"null":typeof D),X={$$typeof:ke,type:D,compare:X===void 0?null:X};var ge;return Object.defineProperty(X,"displayName",{enumerable:!1,configurable:!0,get:function(){return ge},set:function(Ee){ge=Ee,D.name||D.displayName||(Object.defineProperty(D,"name",{value:Ee}),D.displayName=Ee)}}),X},e.startTransition=function(D){var X=_e.T,ge={};_e.T=ge,ge._updatedFibers=new Set;try{var Ee=D(),Pe=_e.S;Pe!==null&&Pe(ge,Ee),typeof Ee=="object"&&Ee!==null&&typeof Ee.then=="function"&&Ee.then(be,zr)}catch(Je){zr(Je)}finally{X===null&&ge._updatedFibers&&(D=ge._updatedFibers.size,ge._updatedFibers.clear(),10<D&&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.")),_e.T=X}},e.unstable_useCacheRefresh=function(){return he().useCacheRefresh()},e.use=function(D){return he().use(D)},e.useActionState=function(D,X,ge){return he().useActionState(D,X,ge)},e.useCallback=function(D,X){return he().useCallback(D,X)},e.useContext=function(D){var X=he();return D.$$typeof===Re&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),X.useContext(D)},e.useDebugValue=function(D,X){return he().useDebugValue(D,X)},e.useDeferredValue=function(D,X){return he().useDeferredValue(D,X)},e.useEffect=function(D,X,ge){D==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var Ee=he();if(typeof ge=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Ee.useEffect(D,X)},e.useId=function(){return he().useId()},e.useImperativeHandle=function(D,X,ge){return he().useImperativeHandle(D,X,ge)},e.useInsertionEffect=function(D,X){return D==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),he().useInsertionEffect(D,X)},e.useLayoutEffect=function(D,X){return D==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),he().useLayoutEffect(D,X)},e.useMemo=function(D,X){return he().useMemo(D,X)},e.useOptimistic=function(D,X){return he().useOptimistic(D,X)},e.useReducer=function(D,X,ge){return he().useReducer(D,X,ge)},e.useRef=function(D){return he().useRef(D)},e.useState=function(D){return he().useState(D)},e.useSyncExternalStore=function(D,X,ge){return he().useSyncExternalStore(D,X,ge)},e.useTransition=function(){return he().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())})()}(Qc,Qc.exports)),Qc.exports}D_.exports=OD();var Ri=D_.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 O_;function RD(){return O_||(O_=1,function(){function s(ee){if(ee==null)return null;if(typeof ee=="function")return ee.$$typeof===xe?null:ee.displayName||ee.name||null;if(typeof ee=="string")return ee;switch(ee){case A:return"Fragment";case U:return"Profiler";case q:return"StrictMode";case K:return"Suspense";case le:return"SuspenseList";case te:return"Activity"}if(typeof ee=="object")switch(typeof ee.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),ee.$$typeof){case L:return"Portal";case $:return(ee.displayName||"Context")+".Provider";case G:return(ee._context.displayName||"Context")+".Consumer";case W:var we=ee.render;return ee=ee.displayName,ee||(ee=we.displayName||we.name||"",ee=ee!==""?"ForwardRef("+ee+")":"ForwardRef"),ee;case Y:return we=ee.displayName||null,we!==null?we:s(ee.type)||"Memo";case J:we=ee._payload,ee=ee._init;try{return s(ee(we))}catch{}}return null}function e(ee){return""+ee}function i(ee){try{e(ee);var we=!1}catch{we=!0}if(we){we=console;var ve=we.error,Re=typeof Symbol=="function"&&Symbol.toStringTag&&ee[Symbol.toStringTag]||ee.constructor.name||"Object";return ve.call(we,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Re),e(ee)}}function r(ee){if(ee===A)return"<>";if(typeof ee=="object"&&ee!==null&&ee.$$typeof===J)return"<...>";try{var we=s(ee);return we?"<"+we+">":"<...>"}catch{return"<...>"}}function o(){var ee=he.A;return ee===null?null:ee.getOwner()}function u(){return Error("react-stack-top-frame")}function c(ee){if(be.call(ee,"key")){var we=Object.getOwnPropertyDescriptor(ee,"key").get;if(we&&we.isReactWarning)return!1}return ee.key!==void 0}function f(ee,we){function ve(){He||(He=!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)",we))}ve.isReactWarning=!0,Object.defineProperty(ee,"key",{get:ve,configurable:!0})}function m(){var ee=s(this.type);return ce[ee]||(ce[ee]=!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.")),ee=this.props.ref,ee!==void 0?ee:null}function b(ee,we,ve,Re,Ue,ht,at,Me){return ve=ht.ref,ee={$$typeof:R,type:ee,key:we,props:ht,_owner:Ue},(ve!==void 0?ve:null)!==null?Object.defineProperty(ee,"ref",{enumerable:!1,get:m}):Object.defineProperty(ee,"ref",{enumerable:!1,value:null}),ee._store={},Object.defineProperty(ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(ee,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(ee,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:at}),Object.defineProperty(ee,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Me}),Object.freeze&&(Object.freeze(ee.props),Object.freeze(ee)),ee}function S(ee,we,ve,Re,Ue,ht,at,Me){var ke=we.children;if(ke!==void 0)if(Re)if(ye(ke)){for(Re=0;Re<ke.length;Re++)x(ke[Re]);Object.freeze&&Object.freeze(ke)}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(ke);if(be.call(we,"key")){ke=s(ee);var ut=Object.keys(we).filter(function(Ze){return Ze!=="key"});Re=0<ut.length?"{key: someKey, "+ut.join(": ..., ")+": ...}":"{key: someKey}",Be[ke+Re]||(ut=0<ut.length?"{"+ut.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} />`,Re,ke,ut,ke),Be[ke+Re]=!0)}if(ke=null,ve!==void 0&&(i(ve),ke=""+ve),c(we)&&(i(we.key),ke=""+we.key),"key"in we){ve={};for(var ft in we)ft!=="key"&&(ve[ft]=we[ft])}else ve=we;return ke&&f(ve,typeof ee=="function"?ee.displayName||ee.name||"Unknown":ee),b(ee,ke,ht,Ue,o(),ve,at,Me)}function x(ee){typeof ee=="object"&&ee!==null&&ee.$$typeof===R&&ee._store&&(ee._store.validated=1)}var w=Ri,R=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),$=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),xe=Symbol.for("react.client.reference"),he=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be=Object.prototype.hasOwnProperty,ye=Array.isArray,pe=console.createTask?console.createTask:function(){return null};w={"react-stack-bottom-frame":function(ee){return ee()}};var He,ce={},Ce=w["react-stack-bottom-frame"].bind(w,u)(),Oe=pe(r(u)),Be={};Wc.Fragment=A,Wc.jsx=function(ee,we,ve,Re,Ue){var ht=1e4>he.recentlyCreatedOwnerStacks++;return S(ee,we,ve,!1,Re,Ue,ht?Error("react-stack-top-frame"):Ce,ht?pe(r(ee)):Oe)},Wc.jsxs=function(ee,we,ve,Re,Ue){var ht=1e4>he.recentlyCreatedOwnerStacks++;return S(ee,we,ve,!0,Re,Ue,ht?Error("react-stack-top-frame"):Ce,ht?pe(r(ee)):Oe)}}()),Wc}A_.exports=RD();var Fl=A_.exports,R_={exports:{}},Ng={exports:{}},Pg={};/**
* @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 M_;function MD(){return M_||(M_=1,function(s){(function(){function e(){if(K=!1,te){var ce=s.unstable_now();be=ce;var Ce=!0;try{e:{$=!1,W&&(W=!1,Y(xe),xe=-1),G=!0;var Oe=U;try{t:{for(c(ce),q=r(R);q!==null&&!(q.expirationTime>ce&&m());){var Be=q.callback;if(typeof Be=="function"){q.callback=null,U=q.priorityLevel;var ee=Be(q.expirationTime<=ce);if(ce=s.unstable_now(),typeof ee=="function"){q.callback=ee,c(ce),Ce=!0;break t}q===r(R)&&o(R),c(ce)}else o(R);q=r(R)}if(q!==null)Ce=!0;else{var we=r(L);we!==null&&b(f,we.startTime-ce),Ce=!1}}break e}finally{q=null,U=Oe,G=!1}Ce=void 0}}finally{Ce?ye():te=!1}}}function i(ce,Ce){var Oe=ce.length;ce.push(Ce);e:for(;0<Oe;){var Be=Oe-1>>>1,ee=ce[Be];if(0<u(ee,Ce))ce[Be]=Ce,ce[Oe]=ee,Oe=Be;else break e}}function r(ce){return ce.length===0?null:ce[0]}function o(ce){if(ce.length===0)return null;var Ce=ce[0],Oe=ce.pop();if(Oe!==Ce){ce[0]=Oe;e:for(var Be=0,ee=ce.length,we=ee>>>1;Be<we;){var ve=2*(Be+1)-1,Re=ce[ve],Ue=ve+1,ht=ce[Ue];if(0>u(Re,Oe))Ue<ee&&0>u(ht,Re)?(ce[Be]=ht,ce[Ue]=Oe,Be=Ue):(ce[Be]=Re,ce[ve]=Oe,Be=ve);else if(Ue<ee&&0>u(ht,Oe))ce[Be]=ht,ce[Ue]=Oe,Be=Ue;else break e}}return Ce}function u(ce,Ce){var Oe=ce.sortIndex-Ce.sortIndex;return Oe!==0?Oe:ce.id-Ce.id}function c(ce){for(var Ce=r(L);Ce!==null;){if(Ce.callback===null)o(L);else if(Ce.startTime<=ce)o(L),Ce.sortIndex=Ce.expirationTime,i(R,Ce);else break;Ce=r(L)}}function f(ce){if(W=!1,c(ce),!$)if(r(R)!==null)$=!0,te||(te=!0,ye());else{var Ce=r(L);Ce!==null&&b(f,Ce.startTime-ce)}}function m(){return K?!0:!(s.unstable_now()-be<he)}function b(ce,Ce){xe=le(function(){ce(s.unstable_now())},Ce)}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,w=x.now();s.unstable_now=function(){return x.now()-w}}var R=[],L=[],A=1,q=null,U=3,G=!1,$=!1,W=!1,K=!1,le=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null,te=!1,xe=-1,he=5,be=-1;if(typeof J=="function")var ye=function(){J(e)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,He=pe.port2;pe.port1.onmessage=e,ye=function(){He.postMessage(null)}}else ye=function(){le(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(ce){ce.callback=null},s.unstable_forceFrameRate=function(ce){0>ce||125<ce?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<ce?Math.floor(1e3/ce):5},s.unstable_getCurrentPriorityLevel=function(){return U},s.unstable_next=function(ce){switch(U){case 1:case 2:case 3:var Ce=3;break;default:Ce=U}var Oe=U;U=Ce;try{return ce()}finally{U=Oe}},s.unstable_requestPaint=function(){K=!0},s.unstable_runWithPriority=function(ce,Ce){switch(ce){case 1:case 2:case 3:case 4:case 5:break;default:ce=3}var Oe=U;U=ce;try{return Ce()}finally{U=Oe}},s.unstable_scheduleCallback=function(ce,Ce,Oe){var Be=s.unstable_now();switch(typeof Oe=="object"&&Oe!==null?(Oe=Oe.delay,Oe=typeof Oe=="number"&&0<Oe?Be+Oe:Be):Oe=Be,ce){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=Oe+ee,ce={id:A++,callback:Ce,priorityLevel:ce,startTime:Oe,expirationTime:ee,sortIndex:-1},Oe>Be?(ce.sortIndex=Oe,i(L,ce),r(R)===null&&ce===r(L)&&(W?(Y(xe),xe=-1):W=!0,b(f,Oe-Be))):(ce.sortIndex=ee,i(R,ce),$||G||($=!0,te||(te=!0,ye()))),ce},s.unstable_shouldYield=m,s.unstable_wrapCallback=function(ce){var Ce=U;return function(){var Oe=U;U=Ce;try{return ce.apply(this,arguments)}finally{U=Oe}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Pg)),Pg}var L_;function LD(){return L_||(L_=1,Ng.exports=MD()),Ng.exports}var Bg={exports:{}},Vi={};/**
* @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 I_;function ID(){return I_||(I_=1,function(){function s(){}function e(x){return""+x}function i(x,w,R){var L=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{e(L);var A=!1}catch{A=!0}return A&&(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&&L[Symbol.toStringTag]||L.constructor.name||"Object"),e(L)),{$$typeof:b,key:L==null?null:""+L,children:x,containerInfo:w,implementation:R}}function r(x,w){if(x==="font")return"";if(typeof w=="string")return w==="use-credentials"?w:""}function o(x){return x===null?"`null`":x===void 0?"`undefined`":x===""?"an empty string":'something with type "'+typeof x+'"'}function u(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=Ri,m={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},b=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"),Vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=m,Vi.createPortal=function(x,w){var R=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!w||w.nodeType!==1&&w.nodeType!==9&&w.nodeType!==11)throw Error("Target container is not a DOM element.");return i(x,w,null,R)},Vi.flushSync=function(x){var w=S.T,R=m.p;try{if(S.T=null,m.p=2,x)return x()}finally{S.T=w,m.p=R,m.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.")}},Vi.preconnect=function(x,w){typeof x=="string"&&x?w!=null&&typeof w!="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.",u(w)):w!=null&&typeof w.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(w.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"&&(w?(w=w.crossOrigin,w=typeof w=="string"?w==="use-credentials"?w:"":void 0):w=null,m.d.C(x,w))},Vi.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 w=arguments[1];typeof w=="object"&&w.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`.",u(w)):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`.",u(w))}typeof x=="string"&&m.d.D(x)},Vi.preinit=function(x,w){if(typeof x=="string"&&x?w==null||typeof w!="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.",u(w)):w.as!=="style"&&w.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".',u(w.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"&&w&&typeof w.as=="string"){var R=w.as,L=r(R,w.crossOrigin),A=typeof w.integrity=="string"?w.integrity:void 0,q=typeof w.fetchPriority=="string"?w.fetchPriority:void 0;R==="style"?m.d.S(x,typeof w.precedence=="string"?w.precedence:void 0,{crossOrigin:L,integrity:A,fetchPriority:q}):R==="script"&&m.d.X(x,{crossOrigin:L,integrity:A,fetchPriority:q,nonce:typeof w.nonce=="string"?w.nonce:void 0})}},Vi.preinitModule=function(x,w){var R="";if(typeof x=="string"&&x||(R+=" The `href` argument encountered was "+o(x)+"."),w!==void 0&&typeof w!="object"?R+=" The `options` argument encountered was "+o(w)+".":w&&"as"in w&&w.as!=="script"&&(R+=" The `as` option encountered was "+u(w.as)+"."),R)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",R);else switch(R=w&&typeof w.as=="string"?w.as:"script",R){case"script":break;default:R=u(R),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)',R,x)}typeof x=="string"&&(typeof w=="object"&&w!==null?(w.as==null||w.as==="script")&&(R=r(w.as,w.crossOrigin),m.d.M(x,{crossOrigin:R,integrity:typeof w.integrity=="string"?w.integrity:void 0,nonce:typeof w.nonce=="string"?w.nonce:void 0})):w==null&&m.d.M(x))},Vi.preload=function(x,w){var R="";if(typeof x=="string"&&x||(R+=" The `href` argument encountered was "+o(x)+"."),w==null||typeof w!="object"?R+=" The `options` argument encountered was "+o(w)+".":typeof w.as=="string"&&w.as||(R+=" The `as` option encountered was "+o(w.as)+"."),R&&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',R),typeof x=="string"&&typeof w=="object"&&w!==null&&typeof w.as=="string"){R=w.as;var L=r(R,w.crossOrigin);m.d.L(x,R,{crossOrigin:L,integrity:typeof w.integrity=="string"?w.integrity:void 0,nonce:typeof w.nonce=="string"?w.nonce:void 0,type:typeof w.type=="string"?w.type:void 0,fetchPriority:typeof w.fetchPriority=="string"?w.fetchPriority:void 0,referrerPolicy:typeof w.referrerPolicy=="string"?w.referrerPolicy:void 0,imageSrcSet:typeof w.imageSrcSet=="string"?w.imageSrcSet:void 0,imageSizes:typeof w.imageSizes=="string"?w.imageSizes:void 0,media:typeof w.media=="string"?w.media:void 0})}},Vi.preloadModule=function(x,w){var R="";typeof x=="string"&&x||(R+=" The `href` argument encountered was "+o(x)+"."),w!==void 0&&typeof w!="object"?R+=" The `options` argument encountered was "+o(w)+".":w&&"as"in w&&typeof w.as!="string"&&(R+=" The `as` option encountered was "+o(w.as)+"."),R&&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',R),typeof x=="string"&&(w?(R=r(w.as,w.crossOrigin),m.d.m(x,{as:typeof w.as=="string"&&w.as!=="script"?w.as:void 0,crossOrigin:R,integrity:typeof w.integrity=="string"?w.integrity:void 0})):m.d.m(x))},Vi.requestFormReset=function(x){m.d.r(x)},Vi.unstable_batchedUpdates=function(x,w){return x(w)},Vi.useFormState=function(x,w,R){return c().useFormState(x,w,R)},Vi.useFormStatus=function(){return c().useHostTransitionStatus()},Vi.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Vi}var N_;function ND(){return N_||(N_=1,Bg.exports=ID()),Bg.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 P_;function PD(){return P_||(P_=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,l){if(a>=n.length)return l;var d=n[a],p=Fi(t)?t.slice():it({},t);return p[d]=e(t[d],n,a+1,l),p}function i(t,n,a){if(n.length!==a.length)console.warn("copyWithRename() expects paths of the same length");else{for(var l=0;l<a.length-1;l++)if(n[l]!==a[l]){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,l){var d=n[l],p=Fi(t)?t.slice():it({},t);return l+1===n.length?(p[a[l]]=p[d],Fi(p)?p.splice(d,1):delete p[d]):p[d]=r(t[d],n,a,l+1),p}function o(t,n,a){var l=n[a],d=Fi(t)?t.slice():it({},t);return a+1===n.length?(Fi(d)?d.splice(l,1):delete d[l],d):(d[l]=o(t[l],n,a+1),d)}function u(){return!1}function c(){return null}function f(){}function m(){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 b(){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 w(t,n,a,l){return new Jy(t,n,a,l)}function R(t,n){t.context===ho&&(Zv(t.current,2,n,t,null,null),sc())}function L(t,n){if(hs!==null){var a=n.staleFamilies;n=n.updatedFamilies,Ih(),Xd(t.current,n,a),sc()}}function A(t){hs=t}function q(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 G(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 W(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,l=n;;){var d=a.return;if(d===null)break;var p=d.alternate;if(p===null){if(l=d.return,l!==null){a=l;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===a)return $(d),t;if(p===l)return $(d),n;p=p.sibling}throw Error("Unable to find node on an unmounted component.")}if(a.return!==l.return)a=d,l=p;else{for(var T=!1,C=d.child;C;){if(C===a){T=!0,a=d,l=p;break}if(C===l){T=!0,l=d,a=p;break}C=C.sibling}if(!T){for(C=p.child;C;){if(C===a){T=!0,a=p,l=d;break}if(C===l){T=!0,l=p,a=d;break}C=C.sibling}if(!T)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!==l)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 K(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=K(t),n!==null)return n;t=t.sibling}return null}function le(t){return t===null||typeof t!="object"?null:(t=ZC&&t[ZC]||t["@@iterator"],typeof t=="function"?t:null)}function Y(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===sL?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case dc:return"Fragment";case rb:return"Profiler";case Hm:return"StrictMode";case ob:return"Suspense";case lb:return"SuspenseList";case ub: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 Sr:return(t.displayName||"Context")+".Provider";case ab:return(t._context.displayName||"Context")+".Consumer";case zh:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case jm:return n=t.displayName||null,n!==null?n:Y(t.type)||"Memo";case Xn:n=t._payload,t=t._init;try{return Y(t(n))}catch{}}return null}function J(t){return typeof t.tag=="number"?te(t):typeof t.name=="string"?t.name:null}function te(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 Y(n);case 8:return n===Hm?"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 te(t.return)}return null}function xe(t){return{current:t}}function he(t,n){0>ca?console.error("Unexpected pop."):(n!==db[ca]&&console.error("Unexpected Fiber popped."),t.current=cb[ca],cb[ca]=null,db[ca]=null,ca--)}function be(t,n,a){ca++,cb[ca]=t.current,db[ca]=a,t.current=n}function ye(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 pe(t,n){be(oo,n,t),be(Vh,t,t),be(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)?wC(n):Sa;break;default:if(a=n.tagName,n=n.namespaceURI)n=wC(n),n=AC(n,a);else switch(a){case"svg":n=Gc;break;case"math":n=Dg;break;default:n=Sa}}a=a.toLowerCase(),a=Cn(null,a),a={context:n,ancestorInfo:a},he(ao,t),be(ao,a,t)}function He(t){he(ao,t),he(Vh,t),he(oo,t)}function ce(){return ye(ao.current)}function Ce(t){t.memoizedState!==null&&be(zm,t,t);var n=ye(ao.current),a=t.type,l=AC(n.context,a);a=Cn(n.ancestorInfo,a),l={context:l,ancestorInfo:a},n!==l&&(be(Vh,t,t),be(ao,l,t))}function Oe(t){Vh.current===t&&(he(ao,t),he(Vh,t)),zm.current===t&&(he(zm,t),kf._currentValue=ql)}function Be(t){return typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}function ee(t){try{return we(t),!1}catch{return!0}}function we(t){return""+t}function ve(t,n){if(ee(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,Be(t)),we(t)}function Re(t,n){if(ee(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,Be(t)),we(t)}function Ue(t){if(ee(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.",Be(t)),we(t)}function ht(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),Ki=n}catch(a){console.error("React instrumentation encountered an error: %s.",a)}return!!n.checkDCE}function at(t){if(typeof dL=="function"&&hL(t),Ki&&typeof Ki.setStrictMode=="function")try{Ki.setStrictMode(fc,t)}catch(n){Er||(Er=!0,console.error("React instrumentation encountered an error: %s",n))}}function Me(t){Ae=t}function ke(){Ae!==null&&typeof Ae.markCommitStopped=="function"&&Ae.markCommitStopped()}function ut(t){Ae!==null&&typeof Ae.markComponentRenderStarted=="function"&&Ae.markComponentRenderStarted(t)}function ft(){Ae!==null&&typeof Ae.markComponentRenderStopped=="function"&&Ae.markComponentRenderStopped()}function Ze(t){Ae!==null&&typeof Ae.markRenderStarted=="function"&&Ae.markRenderStarted(t)}function pt(){Ae!==null&&typeof Ae.markRenderStopped=="function"&&Ae.markRenderStopped()}function At(t,n){Ae!==null&&typeof Ae.markStateUpdateScheduled=="function"&&Ae.markStateUpdateScheduled(t,n)}function Vt(t){return t>>>=0,t===0?32:31-(fL(t)/pL|0)|0}function Sn(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 kt(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 Ot(t,n,a){var l=t.pendingLanes;if(l===0)return 0;var d=0,p=t.suspendedLanes,T=t.pingedLanes;t=t.warmLanes;var C=l&134217727;return C!==0?(l=C&~p,l!==0?d=kt(l):(T&=C,T!==0?d=kt(T):a||(a=C&~t,a!==0&&(d=kt(a))))):(C=l&~p,C!==0?d=kt(C):T!==0?d=kt(T):a||(a=l&~t,a!==0&&(d=kt(a)))),d===0?0:n!==0&&n!==d&&!(n&p)&&(p=d&-d,a=n&-n,p>=a||p===32&&(a&4194048)!==0)?n:d}function dt(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function xn(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 _e(){var t=Vm;return Vm<<=1,!(Vm&4194048)&&(Vm=256),t}function Ei(){var t=$m;return $m<<=1,!($m&62914560)&&($m=4194304),t}function ci(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function $t(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ci(t,n,a,l,d,p){var T=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 C=t.entanglements,O=t.expirationTimes,I=t.hiddenUpdates;for(a=T&~a;0<a;){var Z=31-ln(a),re=1<<Z;C[Z]=0,O[Z]=-1;var Q=I[Z];if(Q!==null)for(I[Z]=null,Z=0;Z<Q.length;Z++){var ae=Q[Z];ae!==null&&(ae.lane&=-536870913)}a&=~re}l!==0&&Hr(t,l,0),p!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=p&~(T&~n))}function Hr(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var l=31-ln(n);t.entangledLanes|=n,t.entanglements[l]=t.entanglements[l]|1073741824|a&4194090}function Pa(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var l=31-ln(a),d=1<<l;d&n|t[l]&n&&(t[l]|=n),a&=~d}}function er(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 jr(t,n,a){if(Ps)for(t=t.pendingUpdatersLaneMap;0<a;){var l=31-ln(a),d=1<<l;t[l].add(n),a&=~d}}function Ba(t,n){if(Ps)for(var a=t.pendingUpdatersLaneMap,l=t.memoizedUpdaters;0<n;){var d=31-ln(n);t=1<<d,d=a[d],0<d.size&&(d.forEach(function(p){var T=p.alternate;T!==null&&l.has(T)||l.add(p)}),d.clear()),n&=~t}}function zr(t){return t&=-t,cs<t?Cr<t?t&134217727?ha:Gm:Cr:cs}function Ua(){var t=_t.p;return t!==0?t:(t=window.event,t===void 0?ha:GC(t.type))}function gt(t,n){var a=_t.p;try{return _t.p=t,n()}finally{_t.p=a}}function tr(t){delete t[Zi],delete t[kn],delete t[gb],delete t[mL],delete t[gL]}function Wi(t){var n=t[Zi];if(n)return n;for(var a=t.parentNode;a;){if(n=a[uo]||a[Zi]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=LC(t);t!==null;){if(a=t[Zi])return a;t=LC(t)}return n}t=a,a=t.parentNode}return null}function qn(t){if(t=t[Zi]||t[uo]){var n=t.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return t}return null}function ir(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function D(t){var n=t[JC];return n||(n=t[JC]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function X(t){t[$h]=!0}function ge(t,n){Ee(t,n),Ee(t+"Capture",n)}function Ee(t,n){_l[t]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",t),_l[t]=n;var a=t.toLowerCase();for(yb[a]=t,t==="onDoubleClick"&&(yb.ondblclick=t),t=0;t<n.length;t++)ew.add(n[t])}function Pe(t,n){yL[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 Je(t){return da.call(iw,t)?!0:da.call(tw,t)?!1:vL.test(t)?iw[t]=!0:(tw[t]=!0,console.error("Invalid attribute name: `%s`",t),!1)}function Ge(t,n,a){if(Je(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:(ve(a,n),t===""+a?a:t)}}function ct(t,n,a){if(Je(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(n);return}}ve(a,n),t.setAttribute(n,""+a)}}function Ye(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}ve(a,n),t.setAttribute(n,""+a)}}function si(t,n,a,l){if(l===null)t.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}ve(l,a),t.setAttributeNS(n,a,""+l)}}function ws(){}function Bd(){if(Gh===0){nw=console.log,sw=console.info,rw=console.warn,aw=console.error,ow=console.group,lw=console.groupCollapsed,uw=console.groupEnd;var t={configurable:!0,enumerable:!0,value:ws,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}Gh++}function Ud(){if(Gh--,Gh===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:it({},t,{value:nw}),info:it({},t,{value:sw}),warn:it({},t,{value:rw}),error:it({},t,{value:aw}),group:it({},t,{value:ow}),groupCollapsed:it({},t,{value:lw}),groupEnd:it({},t,{value:uw})})}0>Gh&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function En(t){if(vb===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);vb=n&&n[1]||"",cw=-1<a.stack.indexOf(`
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
`+vb+t+cw}function qd(t,n){if(!t||bb)return"";var a=_b.get(t);if(a!==void 0)return a;bb=!0,a=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var l=null;l=se.H,se.H=null,Bd();try{var d={DetermineComponentFrameRoot:function(){try{if(n){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(Le){var ae=Le}Reflect.construct(t,[],Q)}else{try{Q.call()}catch(Le){ae=Le}t.call(Q.prototype)}}else{try{throw Error()}catch(Le){ae=Le}(Q=t())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(Le){if(Le&&ae&&typeof Le.stack=="string")return[Le.stack,ae.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=d.DetermineComponentFrameRoot(),C=T[0],O=T[1];if(C&&O){var I=C.split(`
`),Z=O.split(`
`);for(T=p=0;p<I.length&&!I[p].includes("DetermineComponentFrameRoot");)p++;for(;T<Z.length&&!Z[T].includes("DetermineComponentFrameRoot");)T++;if(p===I.length||T===Z.length)for(p=I.length-1,T=Z.length-1;1<=p&&0<=T&&I[p]!==Z[T];)T--;for(;1<=p&&0<=T;p--,T--)if(I[p]!==Z[T]){if(p!==1||T!==1)do if(p--,T--,0>T||I[p]!==Z[T]){var re=`
`+I[p].replace(" at new "," at ");return t.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",t.displayName)),typeof t=="function"&&_b.set(t,re),re}while(1<=p&&0<=T);break}}}finally{bb=!1,se.H=l,Ud(),Error.prepareStackTrace=a}return I=(I=t?t.displayName||t.name:"")?En(I):"",typeof t=="function"&&_b.set(t,I),I}function Fd(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 Hd(t){switch(t.tag){case 26:case 27:case 5:return En(t.type);case 16:return En("Lazy");case 13:return En("Suspense");case 19:return En("SuspenseList");case 0:case 15:return qd(t.type,!1);case 11:return qd(t.type.render,!1);case 1:return qd(t.type,!0);case 31:return En("Activity");default:return""}}function Fo(t){try{var n="";do{n+=Hd(t);var a=t._debugInfo;if(a)for(var l=a.length-1;0<=l;l--){var d=a[l];if(typeof d.name=="string"){var p=n,T=d.env,C=En(d.name+(T?" ["+T+"]":""));n=p+C}}t=t.return}while(t);return n}catch(O){return`
Error generating stack: `+O.message+`
`+O.stack}}function Li(t){return(t=t?t.displayName||t.name:"")?En(t):""}function Au(){if(Wn===null)return null;var t=Wn._debugOwner;return t!=null?J(t):null}function Hy(){if(Wn===null)return"";var t=Wn;try{var n="";switch(t.tag===6&&(t=t.return),t.tag){case 26:case 27:case 5:n+=En(t.type);break;case 13:n+=En("Suspense");break;case 19:n+=En("SuspenseList");break;case 31:n+=En("Activity");break;case 30:case 0:case 15:case 1:t._debugOwner||n!==""||(n+=Li(t.type));break;case 11:t._debugOwner||n!==""||(n+=Li(t.type.render))}for(;t;)if(typeof t.tag=="number"){var a=t;t=a._debugOwner;var l=a._debugStack;t&&l&&(typeof l!="string"&&(a._debugStack=l=Fd(l)),l!==""&&(n+=`
`+l))}else if(t.debugStack!=null){var d=t.debugStack;(t=t.owner)&&d&&(n+=`
`+Fd(d))}else break;var p=n}catch(T){p=`
Error generating stack: `+T.message+`
`+T.stack}return p}function Ne(t,n,a,l,d,p,T){var C=Wn;Fn(t);try{return t!==null&&t._debugTask?t._debugTask.run(n.bind(null,a,l,d,p,T)):n(a,l,d,p,T)}finally{Fn(C)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Fn(t){se.getCurrentStack=t===null?null:Hy,wr=!1,Wn=t}function Ii(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return Ue(t),t;default:return""}}function Et(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function jy(t){var n=Et(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);Ue(t[n]);var l=""+t[n];if(!t.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,p=a.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(T){Ue(T),l=""+T,p.call(this,T)}}),Object.defineProperty(t,n,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(T){Ue(T),l=""+T},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Vr(t){t._valueTracker||(t._valueTracker=jy(t))}function Ho(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),l="";return t&&(l=Et(t)?t.checked?"true":"false":t.value),t=l,t!==a?(n.setValue(t),!0):!1}function Du(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 di(t){return t.replace(bL,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Nt(t,n){n.checked===void 0||n.defaultChecked===void 0||hw||(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",Au()||"A component",n.type),hw=!0),n.value===void 0||n.defaultValue===void 0||dw||(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",Au()||"A component",n.type),dw=!0)}function ku(t,n,a,l,d,p,T,C){t.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?(ve(T,"type"),t.type=T):t.removeAttribute("type"),n!=null?T==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Ii(n)):t.value!==""+Ii(n)&&(t.value=""+Ii(n)):T!=="submit"&&T!=="reset"||t.removeAttribute("value"),n!=null?jd(t,T,Ii(n)):a!=null?jd(t,T,Ii(a)):l!=null&&t.removeAttribute("value"),d==null&&p!=null&&(t.defaultChecked=!!p),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?(ve(C,"name"),t.name=""+Ii(C)):t.removeAttribute("name")}function jo(t,n,a,l,d,p,T,C){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(ve(p,"type"),t.type=p),n!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||n!=null))return;a=a!=null?""+Ii(a):"",n=n!=null?""+Ii(n):a,C||n===t.value||(t.value=n),t.defaultValue=n}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=C?t.checked:!!l,t.defaultChecked=!!l,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(ve(T,"name"),t.name=T)}function jd(t,n,a){n==="number"&&Du(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Fp(t,n){n.value==null&&(typeof n.children=="object"&&n.children!==null?sb.Children.forEach(n.children,function(a){a==null||typeof a=="string"||typeof a=="number"||typeof a=="bigint"||pw||(pw=!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||mw||(mw=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||fw||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),fw=!0)}function Hp(){var t=Au();return t?`
Check the render method of \``+t+"`.":""}function $r(t,n,a,l){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&&l&&(t[a].defaultSelected=!0)}else{for(a=""+Ii(a),n=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,l&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function Ou(t,n){for(t=0;t<yw.length;t++){var a=yw[t];if(n[a]!=null){var l=Fi(n[a]);n.multiple&&!l?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",a,Hp()):!n.multiple&&l&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",a,Hp())}}n.value===void 0||n.defaultValue===void 0||gw||(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"),gw=!0)}function Ru(t,n){n.value===void 0||n.defaultValue===void 0||vw||(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",Au()||"A component"),vw=!0),n.children!=null&&n.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function zd(t,n,a){if(n!=null&&(n=""+Ii(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Ii(a):""}function jp(t,n,a,l){if(n==null){if(l!=null){if(a!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Fi(l)){if(1<l.length)throw Error("<textarea> can only have at most one child.");l=l[0]}a=l}a==null&&(a=""),n=a}a=Ii(n),t.defaultValue=a,l=t.textContent,l===a&&l!==""&&l!==null&&(t.value=l)}function zp(t,n){return t.serverProps===void 0&&t.serverTail.length===0&&t.children.length===1&&3<t.distanceFromLeaf&&t.distanceFromLeaf>15-n?zp(t.children[0],n):t}function wi(t){return" "+" ".repeat(t)}function As(t){return"+ "+" ".repeat(t)}function nr(t){return"- "+" ".repeat(t)}function qa(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 Ds(t,n){return bw.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 sr(t,n,a){var l=120-2*a;if(n===null)return As(a)+Ds(t,l)+`
`;if(typeof n=="string"){for(var d=0;d<n.length&&d<t.length&&n.charCodeAt(d)===t.charCodeAt(d);d++);return d>l-8&&10<d&&(t="..."+t.slice(d-8),n="..."+n.slice(d-8)),As(a)+Ds(t,l)+`
`+nr(a)+Ds(n,l)+`
`}return wi(a)+Ds(t,l)+`
`}function Gr(t){return Object.prototype.toString.call(t).replace(/^\[object (.*)\]$/,function(n,a){return a})}function zo(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(Fi(t))return"[...]";if(t.$$typeof===ro)return(n=Y(t.type))?"<"+n+">":"<...>";var a=Gr(t);if(a==="Object"){a="",n-=2;for(var l in t)if(t.hasOwnProperty(l)){var d=JSON.stringify(l);if(d!=='"'+l+'"'&&(l=d),n-=l.length-2,d=zo(t[l],15>n?n:15),n-=d.length,0>n){a+=a===""?"...":", ...";break}a+=(a===""?"":",")+l+":"+d}return"{"+a+"}"}return a;case"function":return(n=t.displayName||t.name)?"function "+n:"function";default:return String(t)}}function Yr(t,n){return typeof t!="string"||bw.test(t)?"{"+zo(t,n-2)+"}":t.length>n-2?5>n?'"..."':'"'+t.slice(0,n-5)+'..."':'"'+t+'"'}function Vd(t,n,a){var l=120-a.length-t.length,d=[],p;for(p in n)if(n.hasOwnProperty(p)&&p!=="children"){var T=Yr(n[p],120-a.length-p.length-1);l-=p.length+T.length+2,d.push(p+"="+T)}return d.length===0?a+"<"+t+`>
`:0<l?a+"<"+t+" "+d.join(" ")+`>
`:a+"<"+t+`
`+a+" "+d.join(`
`+a+" ")+`
`+a+`>
`}function zy(t,n,a){var l="",d=it({},n),p;for(p in t)if(t.hasOwnProperty(p)){delete d[p];var T=120-2*a-p.length-2,C=zo(t[p],T);n.hasOwnProperty(p)?(T=zo(n[p],T),l+=As(a)+p+": "+C+`
`,l+=nr(a)+p+": "+T+`
`):l+=As(a)+p+": "+C+`
`}for(var O in d)d.hasOwnProperty(O)&&(t=zo(d[O],120-2*a-O.length-2),l+=nr(a)+O+": "+t+`
`);return l}function rr(t,n,a,l){var d="",p=new Map;for(I in a)a.hasOwnProperty(I)&&p.set(I.toLowerCase(),I);if(p.size===1&&p.has("children"))d+=Vd(t,n,wi(l));else{for(var T in n)if(n.hasOwnProperty(T)&&T!=="children"){var C=120-2*(l+1)-T.length-1,O=p.get(T.toLowerCase());if(O!==void 0){p.delete(T.toLowerCase());var I=n[T];O=a[O];var Z=Yr(I,C);C=Yr(O,C),typeof I=="object"&&I!==null&&typeof O=="object"&&O!==null&&Gr(I)==="Object"&&Gr(O)==="Object"&&(2<Object.keys(I).length||2<Object.keys(O).length||-1<Z.indexOf("...")||-1<C.indexOf("..."))?d+=wi(l+1)+T+`={{
`+zy(I,O,l+2)+wi(l+1)+`}}
`:(d+=As(l+1)+T+"="+Z+`
`,d+=nr(l+1)+T+"="+C+`
`)}else d+=wi(l+1)+T+"="+Yr(n[T],C)+`
`}p.forEach(function(re){if(re!=="children"){var Q=120-2*(l+1)-re.length-1;d+=nr(l+1)+re+"="+Yr(a[re],Q)+`
`}}),d=d===""?wi(l)+"<"+t+`>
`:wi(l)+"<"+t+`
`+d+wi(l)+`>
`}return t=a.children,n=n.children,typeof t=="string"||typeof t=="number"||typeof t=="bigint"?(p="",(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(p=""+n),d+=sr(p,""+t,l+1)):(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(d=t==null?d+sr(""+n,null,l+1):d+sr(""+n,void 0,l+1)),d}function Vo(t,n){var a=qa(t);if(a===null){for(a="",t=t.child;t;)a+=Vo(t,n),t=t.sibling;return a}return wi(n)+"<"+a+`>
`}function $d(t,n){var a=zp(t,n);if(a!==t&&(t.children.length!==1||t.children[0]!==a))return wi(n)+`...
`+$d(a,n+1);a="";var l=t.fiber._debugInfo;if(l)for(var d=0;d<l.length;d++){var p=l[d].name;typeof p=="string"&&(a+=wi(n)+"<"+p+`>
`,n++)}if(l="",d=t.fiber.pendingProps,t.fiber.tag===6)l=sr(d,t.serverProps,n),n++;else if(p=qa(t.fiber),p!==null)if(t.serverProps===void 0){l=n;var T=120-2*l-p.length-2,C="";for(I in d)if(d.hasOwnProperty(I)&&I!=="children"){var O=Yr(d[I],15);if(T-=I.length+O.length+2,0>T){C+=" ...";break}C+=" "+I+"="+O}l=wi(l)+"<"+p+C+`>
`,n++}else t.serverProps===null?(l=Vd(p,d,As(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."):(l=rr(p,d,t.serverProps,n),n++);var I="";for(d=t.fiber.child,p=0;d&&p<t.children.length;)T=t.children[p],T.fiber===d?(I+=$d(T,n),p++):I+=Vo(d,n),d=d.sibling;for(d&&0<t.children.length&&(I+=wi(n)+`...
`),d=t.serverTail,t.serverProps===null&&n--,t=0;t<d.length;t++)p=d[t],I=typeof p=="string"?I+(nr(n)+Ds(p,120-2*n)+`
`):I+Vd(p.type,p.props,nr(n));return a+l+I}function $o(t){try{return`
`+$d(t,0)}catch{return""}}function Mu(t,n,a){for(var l=n,d=null,p=0;l;)l===t&&(p=0),d={fiber:l,children:d!==null?[d]:[],serverProps:l===n?a:l===t?null:void 0,serverTail:[],distanceFromLeaf:p},p++,l=l.return;return d!==null?$o(d).replaceAll(/^[+-]/gm,">"):""}function Cn(t,n){var a=it({},t||Tw),l={tag:n};return _w.indexOf(n)!==-1&&(a.aTagInScope=null,a.buttonTagInScope=null,a.nobrTagInScope=null),TL.indexOf(n)!==-1&&(a.pTagInButtonScope=null),_L.indexOf(n)!==-1&&n!=="address"&&n!=="div"&&n!=="p"&&(a.listItemTagAutoclosing=null,a.dlItemTagAutoclosing=null),a.current=l,n==="form"&&(a.formTag=l),n==="a"&&(a.aTagInScope=l),n==="button"&&(a.buttonTagInScope=l),n==="nobr"&&(a.nobrTagInScope=l),n==="p"&&(a.pTagInButtonScope=l),n==="li"&&(a.listItemTagAutoclosing=l),(n==="dd"||n==="dt")&&(a.dlItemTagAutoclosing=l),n==="#document"||n==="html"?a.containerTagInScope=null:a.containerTagInScope||(a.containerTagInScope=l),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 SL.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 Lu(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 Fa(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 Ha(t,n){n=n||Tw;var a=n.current;if(n=(a=Vp(t,a&&a.tag,n.implicitRootScope)?null:a)?null:Lu(t,n),n=a||n,!n)return!0;var l=n.tag;if(n=String(!!a)+"|"+t+"|"+l,Ym[n])return!1;Ym[n]=!0;var d=(n=Wn)?Fa(n.return,l):null,p=n!==null&&d!==null?Mu(d,n,null):"",T="<"+t+">";return a?(a="",l==="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`,T,l,a,p)):console.error(`In HTML, %s cannot be a descendant of <%s>.
This will cause a hydration error.%s`,T,l,p),n&&(t=n.return,d===null||t===null||d===t&&t._debugOwner===n._debugOwner||Ne(d,function(){console.error(`<%s> cannot contain a nested %s.
See this log for the ancestor stack trace.`,l,T)})),!1}function ks(t,n,a){if(a||Vp("#text",n,!1))return!0;if(a="#text|"+n,Ym[a])return!1;Ym[a]=!0;var l=(a=Wn)?Fa(a,n):null;return a=a!==null&&l!==null?Mu(l,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 Xr(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(CL,function(n,a){return a.toUpperCase()})}function Iu(t,n,a){var l=n.indexOf("--")===0;l||(-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(EL,"ms-")))):xL.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))):!Ew.test(a)||Sb.hasOwnProperty(a)&&Sb[a]||(Sb[a]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,a.replace(Ew,""))),typeof a=="number"&&(isNaN(a)?Cw||(Cw=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(a)||ww||(ww=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",n)))),a==null||typeof a=="boolean"||a===""?l?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":l?t.setProperty(n,a):typeof a!="number"||a===0||Aw.has(n)?n==="float"?t.cssFloat=a:(Re(a,n),t[n]=(""+a).trim()):t[n]=a+"px"}function Gp(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 l={};if(a){for(var d in a)if(a.hasOwnProperty(d)&&!n.hasOwnProperty(d))for(var p=Tb[d]||[d],T=0;T<p.length;T++)l[p[T]]=d}for(var C in n)if(n.hasOwnProperty(C)&&(!a||a[C]!==n[C]))for(d=Tb[C]||[C],p=0;p<d.length;p++)l[d[p]]=C;C={};for(var O in n)for(d=Tb[O]||[O],p=0;p<d.length;p++)C[d[p]]=O;O={};for(var I in l)if(d=l[I],(p=C[I])&&d!==p&&(T=d+","+p,!O[T])){O[T]=!0,T=console;var Z=n[d];T.error.call(T,"%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,p)}}for(var re in a)!a.hasOwnProperty(re)||n!=null&&n.hasOwnProperty(re)||(re.indexOf("--")===0?t.setProperty(re,""):re==="float"?t.cssFloat="":t[re]="");for(var Q in n)I=n[Q],n.hasOwnProperty(Q)&&a[Q]!==I&&Iu(t,Q,I)}else for(l in n)n.hasOwnProperty(l)&&Iu(t,l,n[l])}function Go(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 Yp(t){return wL.get(t)||t}function Nu(t,n){if(da.call(gc,n)&&gc[n])return!0;if(DL.test(n)){if(t="aria-"+n.slice(4).toLowerCase(),t=Dw.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(AL.test(n)){if(t=n.toLowerCase(),t=Dw.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 Xp(t,n){var a=[],l;for(l in n)Nu(t,l)||a.push(l);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,l){if(da.call(un,n)&&un[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."),un[n]=!0;if(typeof a=="function"&&(t==="form"&&n==="action"||t==="input"&&n==="formAction"||t==="button"&&n==="formAction"))return!0;if(l!=null){if(t=l.possibleRegistrationNames,l.registrationNameDependencies.hasOwnProperty(n))return!0;if(l=t.hasOwnProperty(d)?t[d]:null,l!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",n,l),un[n]=!0;if(Ow.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),un[n]=!0}else if(Ow.test(n))return kL.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),un[n]=!0;if(OL.test(n)||RL.test(n))return!0;if(d==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),un[n]=!0;if(d==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),un[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),un[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),un[n]=!0;if(Wm.hasOwnProperty(d)){if(d=Wm[d],d!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,d),un[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),un[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),un[n]=!0)}case"function":case"symbol":return un[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),un[n]=!0}}return!0}function Wp(t,n,a){var l=[],d;for(d in n)Vy(t,d,n[d],a)||l.push(d);n=l.map(function(p){return"`"+p+"`"}).join(", "),l.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<l.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 Yo(t){return ML.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Pu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}function Qp(t){var n=qn(t);if(n&&(t=n.stateNode)){var a=t[kn]||null;e:switch(t=n.stateNode,n.type){case"input":if(ku(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(ve(n,"name"),a=a.querySelectorAll('input[name="'+di(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var l=a[n];if(l!==t&&l.form===t.form){var d=l[kn]||null;if(!d)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");ku(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)l=a[n],l.form===t.form&&Ho(l)}break e;case"textarea":zd(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&$r(t,!!a.multiple,n,!1)}}}function Xo(t,n,a){if(xb)return t(n,a);xb=!0;try{var l=t(n);return l}finally{if(xb=!1,(yc!==null||vc!==null)&&(sc(),yc&&(n=yc,t=vc,vc=yc=null,Qp(n),t)))for(n=0;n<t.length;n++)Qp(t[n])}}function Os(t,n){var a=t.stateNode;if(a===null)return null;var l=a[kn]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;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 Gd(){if(Qm)return Qm;var t,n=Cb,a=n.length,l,d="value"in co?co.value:co.textContent,p=d.length;for(t=0;t<a&&n[t]===d[t];t++);var T=a-t;for(l=1;l<=T&&n[a-l]===d[p-l];l++);return Qm=d.slice(t,1<l?1-l:void 0)}function Bu(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 Yd(){return!1}function Ni(t){function n(a,l,d,p,T){this._reactName=a,this._targetInst=d,this.type=l,this.nativeEvent=p,this.target=T,this.currentTarget=null;for(var C in t)t.hasOwnProperty(C)&&(a=t[C],this[C]=a?a(p):p[C]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Uu:Yd,this.isPropagationStopped=Yd,this}return it(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=$L[t])?!!n[t]:!1}function qu(){return $y}function Kp(t,n){switch(t){case"keyup":return n6.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==Iw;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 Gy(t,n){switch(t){case"compositionend":return Zp(n);case"keypress":return n.which!==Pw?null:(Uw=!0,Bw);case"textInput":return t=n.data,t===Bw&&Uw?null:t;default:return null}}function Yy(t,n){if(bc)return t==="compositionend"||!kb&&Kp(t,n)?(t=Gd(),Qm=Cb=co=null,bc=!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 Nw&&n.locale!=="ko"?null:n.data;default:return null}}function Jp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!r6[t.type]:n==="textarea"}function Xy(t){if(!Ar)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 Fu(t,n,a,l){yc?vc?vc.push(l):vc=[l]:yc=l,n=Rm(n,"onChange"),0<n.length&&(a=new Km("onChange","change",null,a,l),t.push({event:a,listeners:n}))}function Wy(t){gC(t,0)}function Wo(t){var n=ir(t);if(Ho(n))return t}function Qo(t,n){if(t==="change")return n}function em(){Zh&&(Zh.detachEvent("onpropertychange",tm),Jh=Zh=null)}function tm(t){if(t.propertyName==="value"&&Wo(Jh)){var n=[];Fu(n,Jh,t,Pu(t)),Xo(Wy,n)}}function Qy(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 Wo(Jh)}function Zy(t,n){if(t==="click")return Wo(n)}function Hu(t,n){if(t==="input"||t==="change")return Wo(n)}function Ko(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}function Rs(t,n){if(cn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),l=Object.keys(n);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var d=a[l];if(!da.call(n,d)||!cn(t[d],n[d]))return!1}return!0}function Zo(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function wn(t,n){var a=Zo(t);t=0;for(var l;a;){if(a.nodeType===3){if(l=t+a.textContent.length,t<=n&&l>=n)return{node:a,offset:n-t};t=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zo(a)}}function ss(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?ss(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=Du(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=Du(t.document)}return n}function ju(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 l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Rb||_c==null||_c!==Du(l)||(l=_c,"selectionStart"in l&&ju(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ef&&Rs(ef,l)||(ef=l,l=Rm(Ob,"onSelect"),0<l.length&&(n=new Km("onSelect","select",null,n,a),t.push({event:n,listeners:l}),n.target=_c)))}function Wr(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}function Qr(t){if(Mb[t])return Mb[t];if(!Tc[t])return t;var n=Tc[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in Fw)return Mb[t]=n[a];return t}function Hn(t,n){$w.set(t,n),ge(n,[t])}function Pi(t,n){if(typeof t=="object"&&t!==null){var a=Ib.get(t);return a!==void 0?a:(n={value:t,source:n,stack:Fo(n)},Ib.set(t,n),n)}return{value:t,source:n,stack:Fo(n)}}function ja(){for(var t=Sc,n=Nb=Sc=0;n<t;){var a=ds[n];ds[n++]=null;var l=ds[n];ds[n++]=null;var d=ds[n];ds[n++]=null;var p=ds[n];if(ds[n++]=null,l!==null&&d!==null){var T=l.pending;T===null?d.next=d:(d.next=T.next,T.next=d),l.pending=d}p!==0&&lr(a,d,p)}}function ar(t,n,a,l){ds[Sc++]=t,ds[Sc++]=n,ds[Sc++]=a,ds[Sc++]=l,Nb|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function or(t,n,a,l){return ar(t,n,a,l),zu(t)}function mi(t,n){return ar(t,null,null,n),zu(t)}function lr(t,n,a){t.lanes|=a;var l=t.alternate;l!==null&&(l.lanes|=a);for(var d=!1,p=t.return;p!==null;)p.childLanes|=a,l=p.alternate,l!==null&&(l.childLanes|=a),p.tag===22&&(t=p.stateNode,t===null||t._visibility&Jm||(d=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,d&&n!==null&&(d=31-ln(a),t=p.hiddenUpdates,l=t[d],l===null?t[d]=[n]:l.push(n),n.lane=a|536870912),p):null}function zu(t){if(xf>D6)throw Il=xf=0,Ef=d_=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.");Il>k6&&(Il=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&&uC(t);for(var n=t,a=n.return;a!==null;)n.alternate===null&&n.flags&4098&&uC(t),n=a,a=n.return;return n.tag===3?n.stateNode:null}function ur(t){if(hs===null)return t;var n=hs(t);return n===void 0?t:n.current}function Vu(t){if(hs===null)return t;var n=hs(t);return n===void 0?t!=null&&typeof t.render=="function"&&(n=ur(t.render),t.render!==n)?(n={$$typeof:zh,render:n},t.displayName!==void 0&&(n.displayName=t.displayName),n):t:n.current}function $u(t,n){if(hs===null)return!1;var a=t.elementType;n=n.type;var l=!1,d=typeof n=="object"&&n!==null?n.$$typeof:null;switch(t.tag){case 1:typeof n=="function"&&(l=!0);break;case 0:(typeof n=="function"||d===Xn)&&(l=!0);break;case 11:(d===zh||d===Xn)&&(l=!0);break;case 14:case 15:(d===jm||d===Xn)&&(l=!0);break;default:return!1}return!!(l&&(t=hs(a),t!==void 0&&t===hs(n)))}function nm(t){hs!==null&&typeof WeakSet=="function"&&(xc===null&&(xc=new WeakSet),xc.add(t))}function Xd(t,n,a){var l=t.alternate,d=t.child,p=t.sibling,T=t.tag,C=t.type,O=null;switch(T){case 0:case 15:case 1:O=C;break;case 11:O=C.render}if(hs===null)throw Error("Expected resolveFamily to be set during hot reload.");var I=!1;C=!1,O!==null&&(O=hs(O),O!==void 0&&(a.has(O)?C=!0:n.has(O)&&(T===1?C=!0:I=!0))),xc!==null&&(xc.has(t)||l!==null&&xc.has(l))&&(C=!0),C&&(t._debugNeedsRemount=!0),(C||I)&&(l=mi(t,2),l!==null&&ai(l,t,2)),d===null||C||Xd(d,n,a),p!==null&&Xd(p,n,a)}function Jy(t,n,a,l){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=l,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,Yw||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function za(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ms(t,n){var a=t.alternate;switch(a===null?(a=w(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=ur(t.type);break;case 1:a.type=ur(t.type);break;case 11:a.type=Vu(t.type)}return a}function Gu(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 Wd(t,n,a,l,d,p){var T=0,C=t;if(typeof t=="function")za(t)&&(T=1),C=ur(C);else if(typeof t=="string")T=ce(),T=jM(t,a,T)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case ub:return n=w(31,a,n,d),n.elementType=ub,n.lanes=p,n;case dc:return cr(a.children,d,p,n);case Hm:T=8,d|=Ji,d|=Bs;break;case rb:return t=a,l=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=w(12,t,n,l|Hi),n.elementType=rb,n.lanes=p,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case ob:return n=w(13,a,n,d),n.elementType=ob,n.lanes=p,n;case lb:return n=w(19,a,n,d),n.elementType=lb,n.lanes=p,n;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case iL:case Sr:T=10;break e;case ab:T=9;break e;case zh:T=11,C=Vu(C);break e;case jm:T=14;break e;case Xn:T=16,C=null;break e}C="",(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(C+=" 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":Fi(t)?a="array":t!==void 0&&t.$$typeof===ro?(a="<"+(Y(t.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):a=typeof t,(T=l?J(l):null)&&(C+=`
Check the render method of \``+T+"`."),T=29,a=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(a+"."+C)),C=null}return n=w(T,a,n,d),n.elementType=t,n.type=C,n.lanes=p,n._debugOwner=l,n}function Yu(t,n,a){return n=Wd(t.type,t.key,t.props,t._owner,n,a),n._debugOwner=t._owner,n._debugStack=t._debugStack,n._debugTask=t._debugTask,n}function cr(t,n,a,l){return t=w(7,t,l,n),t.lanes=a,t}function Va(t,n,a){return t=w(6,t,null,n),t.lanes=a,t}function Qd(t,n,a){return n=w(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}function Kr(t,n){Ls(),Ec[Cc++]=tg,Ec[Cc++]=eg,eg=t,tg=n}function sm(t,n,a){Ls(),fs[ps++]=pa,fs[ps++]=ma,fs[ps++]=Sl,Sl=t;var l=pa;t=ma;var d=32-ln(l)-1;l&=~(1<<d),a+=1;var p=32-ln(n)+d;if(30<p){var T=d-d%5;p=(l&(1<<T)-1).toString(32),l>>=T,d-=T,pa=1<<32-ln(n)+d|a<<d|l,ma=p+t}else pa=1<<p|a<<d|l,ma=t}function el(t){Ls(),t.return!==null&&(Kr(t,1),sm(t,1,0))}function Kd(t){for(;t===eg;)eg=Ec[--Cc],Ec[Cc]=null,tg=Ec[--Cc],Ec[Cc]=null;for(;t===Sl;)Sl=fs[--ps],fs[ps]=null,ma=fs[--ps],fs[ps]=null,pa=fs[--ps],fs[ps]=null}function Ls(){mt||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function dr(t,n){if(t.return===null){if(ms===null)ms={fiber:t,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(ms.fiber!==t)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ms.distanceFromLeaf>n&&(ms.distanceFromLeaf=n)}return ms}var a=dr(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){ga||(t=dr(t,0),t.serverProps=null,n!==null&&(n=OC(n),t.serverTail.push(n)))}function Zr(t){var n="",a=ms;throw a!==null&&(ms=null,n=$o(a)),il(Pi(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)),Pb}function rm(t){var n=t.stateNode,a=t.type,l=t.memoizedProps;switch(n[Zi]=t,n[kn]=l,Hv(a,l),a){case"dialog":ot("cancel",n),ot("close",n);break;case"iframe":case"object":case"embed":ot("load",n);break;case"video":case"audio":for(a=0;a<Cf.length;a++)ot(Cf[a],n);break;case"source":ot("error",n);break;case"img":case"image":case"link":ot("error",n),ot("load",n);break;case"details":ot("toggle",n);break;case"input":Pe("input",l),ot("invalid",n),Nt(n,l),jo(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),Vr(n);break;case"option":Fp(n,l);break;case"select":Pe("select",l),ot("invalid",n),Ou(n,l);break;case"textarea":Pe("textarea",l),ot("invalid",n),Ru(n,l),jp(n,l.value,l.defaultValue,l.children),Vr(n)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||l.suppressHydrationWarning===!0||_C(n.textContent,a)?(l.popover!=null&&(ot("beforetoggle",n),ot("toggle",n)),l.onScroll!=null&&ot("scroll",n),l.onScrollEnd!=null&&ot("scrollend",n),l.onClick!=null&&(n.onclick=Mm),n=!0):n=!1,n||Zr(t)}function am(t){for(dn=t.return;dn;)switch(dn.tag){case 5:case 13:Dr=!1;return;case 27:case 3:Dr=!0;return;default:dn=dn.return}}function $a(t){if(t!==dn)return!1;if(!mt)return am(t),mt=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Gv(t.type,t.memoizedProps)),a=!a),a&&ei){for(a=ei;a;){var l=dr(t,0),d=OC(a);l.serverTail.push(d),a=d.type==="Suspense"?MC(a):us(a.nextSibling)}Zr(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.");ei=MC(t)}else n===27?(n=ei,so(t.type)?(t=x_,x_=null,ei=t):ei=n):ei=dn?us(t.stateNode.nextSibling):null;return!0}function tl(){ei=dn=null,ga=mt=!1}function Jd(){var t=xl;return t!==null&&(pn===null?pn=t:pn.push.apply(pn,t),xl=null),t}function il(t){xl===null?xl=[t]:xl.push(t)}function eh(){var t=ms;if(t!==null){ms=null;for(var n=$o(t);0<t.children.length;)t=t.children[0];Ne(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 ri(){wc=ig=null,Ac=!1}function rs(t,n,a){be(Bb,n._currentValue,t),n._currentValue=a,be(Ub,n._currentRenderer,t),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==Kw&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=Kw}function Zt(t,n){t._currentValue=Bb.current;var a=Ub.current;he(Ub,n),t._currentRenderer=a,he(Bb,n)}function Jr(t,n,a){for(;t!==null;){var l=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.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,l){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var p=d.dependencies;if(p!==null){var T=d.child;p=p.firstContext;e:for(;p!==null;){var C=p;p=d;for(var O=0;O<n.length;O++)if(C.context===n[O]){p.lanes|=a,C=p.alternate,C!==null&&(C.lanes|=a),Jr(p.return,a,t),l||(T=null);break e}p=C.next}}else if(d.tag===18){if(T=d.return,T===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");T.lanes|=a,p=T.alternate,p!==null&&(p.lanes|=a),Jr(T,a,t),T=null}else T=d.child;if(T!==null)T.return=d;else for(T=d;T!==null;){if(T===t){T=null;break}if(d=T.sibling,d!==null){d.return=T.return,T=d;break}T=T.return}d=T}}function nl(t,n,a,l){t=null;for(var d=n,p=!1;d!==null;){if(!p){if(d.flags&524288)p=!0;else if(d.flags&262144)break}if(d.tag===10){var T=d.alternate;if(T===null)throw Error("Should have a current fiber. This is a bug in React.");if(T=T.memoizedProps,T!==null){var C=d.type;cn(d.pendingProps.value,T.value)||(t!==null?t.push(C):t=[C])}}else if(d===zm.current){if(T=d.alternate,T===null)throw Error("Should have a current fiber. This is a bug in React.");T.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(kf):t=[kf])}d=d.return}t!==null&&th(n,t,a,l),n.flags|=262144}function jn(t){for(t=t.firstContext;t!==null;){if(!cn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function hr(t){ig=t,wc=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function qt(t){return Ac&&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 Xu(t,n){return ig===null&&hr(t),sl(t,n)}function sl(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},wc===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().");wc=n,t.dependencies={lanes:0,firstContext:n,_debugThenableState:null},t.flags|=524288}else wc=wc.next=n;return a}function ih(){return{controller:new f6,data:new Map,refCount:0}}function ea(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&&p6(m6,function(){t.controller.abort()})}function Is(){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 ta(t){On=Dc(),0>t.actualStartTime&&(t.actualStartTime=On)}function Wu(t){if(0<=On){var n=Dc()-On;t.actualDuration+=n,t.selfBaseDuration=n,On=-1}}function ll(t){if(0<=On){var n=Dc()-On;t.actualDuration+=n,On=-1}}function Qi(){if(0<=On){var t=Dc()-On;On=-1,El+=t}}function yt(){On=Dc()}function Ns(t){for(var n=t.child;n;)t.actualDuration+=n.actualDuration,n=n.sibling}function nh(t,n){if(tf===null){var a=tf=[];qb=0,Cl=Bv(),kc={status:"pending",value:void 0,then:function(l){a.push(l)}}}return qb++,n.then(om,om),n}function om(){if(--qb===0&&tf!==null){kc!==null&&(kc.status="fulfilled");var t=tf;tf=null,Cl=0,kc=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function ev(t,n){var a=[],l={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){l.status="fulfilled",l.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(l.status="rejected",l.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),l}function sh(){var t=wl.current;return t!==null?t:Pt.pooledCache}function Qu(t,n){n===null?be(wl,wl.current,t):be(wl,n.pool,t)}function rh(){var t=sh();return t===null?null:{parent:yi._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){se.actQueue!==null&&(se.didUsePromise=!0);var l=t.thenables;switch(a=l[a],a===void 0?l.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=Pt,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 p=n;p.status="fulfilled",p.value=d}},function(d){if(n.status==="pending"){var p=n;p.status="rejected",p.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 An(t){return{lane:t,tag:iA,payload:null,callback:null,next:null}}function fr(t,n,a){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,jb===l&&!rA){var d=te(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),rA=!0}return(Tt&fn)!==Qn?(d=l.pending,d===null?n.next=n:(n.next=d.next,d.next=n),l.pending=n,n=zu(t),lr(t,null,a),n):(ar(t,l,n,a),zu(t))}function Ga(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var l=n.lanes;l&=t.pendingLanes,a|=l,n.lanes=a,Pa(t,a)}}function dl(t,n){var a=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var d=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var T={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?d=p=T:p=p.next=T,a=a.next}while(a!==null);p===null?d=p=n:p=p.next=n}else d=p=n;a={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:l.shared,callbacks:l.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}function hl(){if(zb){var t=kc;if(t!==null)throw t}}function fl(t,n,a,l){zb=!1;var d=t.updateQueue;fo=!1,jb=d.shared;var p=d.firstBaseUpdate,T=d.lastBaseUpdate,C=d.shared.pending;if(C!==null){d.shared.pending=null;var O=C,I=O.next;O.next=null,T===null?p=I:T.next=I,T=O;var Z=t.alternate;Z!==null&&(Z=Z.updateQueue,C=Z.lastBaseUpdate,C!==T&&(C===null?Z.firstBaseUpdate=I:C.next=I,Z.lastBaseUpdate=O))}if(p!==null){var re=d.baseState;T=0,Z=I=O=null,C=p;do{var Q=C.lane&-536870913,ae=Q!==C.lane;if(ae?(rt&Q)===Q:(l&Q)===Q){Q!==0&&Q===Cl&&(zb=!0),Z!==null&&(Z=Z.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{Q=t;var Le=C,Ve=n,Bt=a;switch(Le.tag){case nA:if(Le=Le.payload,typeof Le=="function"){Ac=!0;var lt=Le.call(Bt,re,Ve);if(Q.mode&Ji){at(!0);try{Le.call(Bt,re,Ve)}finally{at(!1)}}Ac=!1,re=lt;break e}re=Le;break e;case Hb:Q.flags=Q.flags&-65537|128;case iA:if(lt=Le.payload,typeof lt=="function"){if(Ac=!0,Le=lt.call(Bt,re,Ve),Q.mode&Ji){at(!0);try{lt.call(Bt,re,Ve)}finally{at(!1)}}Ac=!1}else Le=lt;if(Le==null)break e;re=it({},re,Le);break e;case sA:fo=!0}}Q=C.callback,Q!==null&&(t.flags|=64,ae&&(t.flags|=8192),ae=d.callbacks,ae===null?d.callbacks=[Q]:ae.push(Q))}else ae={lane:Q,tag:C.tag,payload:C.payload,callback:C.callback,next:null},Z===null?(I=Z=ae,O=re):Z=Z.next=ae,T|=Q;if(C=C.next,C===null){if(C=d.shared.pending,C===null)break;ae=C,C=ae.next,ae.next=null,d.lastBaseUpdate=ae,d.shared.pending=null}}while(1);Z===null&&(O=re),d.baseState=O,d.firstBaseUpdate=I,d.lastBaseUpdate=Z,p===null&&(d.shared.lanes=0),yo|=T,t.lanes=T,t.memoizedState=re}jb=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 tv(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=Rr;be(ug,a,t),be(Oc,n,t),Rr=a|n.baseLanes}function hh(t){be(ug,Rr,t),be(Oc,Oc.current,t)}function fh(t){Rr=ug.current,he(Oc,t),he(ug,t)}function tt(){var t=ne;vs===null?vs=[t]:vs.push(t)}function fe(){var t=ne;if(vs!==null&&(va++,vs[va]!==t)){var n=te($e);if(!aA.has(n)&&(aA.add(n),vs!==null)){for(var a="",l=0;l<=va;l++){var d=vs[l],p=l===va?t:d;for(d=l+1+". "+d;30>d.length;)d+=" ";d+=p+`
`,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 Ya(t){t==null||Fi(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.",ne,typeof t)}function Ju(){var t=te($e);lA.has(t)||(lA.add(t),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",t))}function Wt(){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.",ne),!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`,ne,"["+n.join(", ")+"]","["+t.join(", ")+"]");for(var a=0;a<n.length&&a<t.length;a++)if(!cn(t[a],n[a]))return!1;return!0}function mh(t,n,a,l,d,p){po=p,$e=n,vs=t!==null?t._debugHookTypes:null,va=-1,hf=t!==null&&t.type!==n.type,(Object.prototype.toString.call(a)==="[object AsyncFunction]"||Object.prototype.toString.call(a)==="[object AsyncGeneratorFunction]")&&(p=te($e),Vb.has(p)||(Vb.add(p),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.",p===null?"An unknown Component":"<"+p+">"))),n.memoizedState=null,n.updateQueue=null,n.lanes=0,se.H=t!==null&&t.memoizedState!==null?Gb:vs!==null?uA:$b,Dl=p=(n.mode&Ji)!==Ft;var T=Yb(a,l,d);if(Dl=!1,Mc&&(T=gh(n,a,l,d)),p){at(!0);try{T=gh(n,a,l,d)}finally{at(!1)}}return um(t,n),T}function um(t,n){n._debugHookTypes=vs,n.dependencies===null?ya!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:ya}):n.dependencies._debugThenableState=ya,se.H=hg;var a=It!==null&&It.next!==null;if(po=0,vs=ne=fi=It=$e=null,va=-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,ya=null,a)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");t===null||ki||(t=t.dependencies,t!==null&&jn(t)&&(ki=!0)),lg?(lg=!1,t=!0):t=!1,t&&(n=te(n)||"Unknown",oA.has(n)||Vb.has(n)||(oA.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,l){$e=t;var d=0;do{if(Mc&&(ya=null),df=0,Mc=!1,d>=y6)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(d+=1,hf=!1,fi=It=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}va=-1,se.H=cA,p=Yb(n,a,l)}while(Mc);return p}function pr(){var t=se.H,n=t.useState()[0];return n=typeof n.then=="function"?Xa(n):n,t=t.useState()[0],(It!==null?It.memoizedState:null)!==t&&($e.flags|=1024),n}function yh(){var t=dg!==0;return dg=0,t}function vh(t,n,a){n.updateQueue=t.updateQueue,n.flags=(n.mode&Bs)!==Ft?n.flags&-402655237:n.flags&-2053,t.lanes&=~a}function bh(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,vs=fi=It=$e=null,va=-1,ne=null,Mc=!1,df=dg=0,ya=null}function an(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fi===null?$e.memoizedState=fi=t:fi=fi.next=t,fi}function vt(){if(It===null){var t=$e.alternate;t=t!==null?t.memoizedState:null}else t=It.next;var n=fi===null?$e.memoizedState:fi.next;if(n!==null)fi=n,It=t;else{if(t===null)throw $e.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.");It=t,t={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},fi===null?$e.memoizedState=fi=t:fi=fi.next=t}return fi}function pl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xa(t){var n=df;return df+=1,ya===null&&(ya=ah()),t=lh(ya,t,n),n=$e,(fi===null?n.memoizedState:fi.next)===null&&(n=n.alternate,se.H=n!==null&&n.memoizedState!==null?Gb:$b),t}function zn(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Xa(t);if(t.$$typeof===Sr)return qt(t)}throw Error("An unsupported type was passed to use(): "+String(t))}function as(t){var n=null,a=$e.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var l=$e.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=pl(),$e.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0||hf)for(a=n.data[n.index]=Array(t),l=0;l<t;l++)a[l]=nL;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 Vn(t,n){return typeof n=="function"?n(t):n}function _h(t,n,a){var l=an();if(a!==void 0){var d=a(n);if(Dl){at(!0);try{a(n)}finally{at(!1)}}}else d=n;return l.memoizedState=l.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},l.queue=t,t=t.dispatch=Q5.bind(null,$e,t),[l.memoizedState,t]}function Wa(t){var n=vt();return Th(n,It,t)}function Th(t,n,a){var l=t.queue;if(l===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");l.lastRenderedReducer=a;var d=t.baseQueue,p=l.pending;if(p!==null){if(d!==null){var T=d.next;d.next=p.next,p.next=T}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=p,l.pending=null}if(p=t.baseState,d===null)t.memoizedState=p;else{n=d.next;var C=T=null,O=null,I=n,Z=!1;do{var re=I.lane&-536870913;if(re!==I.lane?(rt&re)===re:(po&re)===re){var Q=I.revertLane;if(Q===0)O!==null&&(O=O.next={lane:0,revertLane:0,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),re===Cl&&(Z=!0);else if((po&Q)===Q){I=I.next,Q===Cl&&(Z=!0);continue}else re={lane:0,revertLane:I.revertLane,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},O===null?(C=O=re,T=p):O=O.next=re,$e.lanes|=Q,yo|=Q;re=I.action,Dl&&a(p,re),p=I.hasEagerState?I.eagerState:a(p,re)}else Q={lane:re,revertLane:I.revertLane,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},O===null?(C=O=Q,T=p):O=O.next=Q,$e.lanes|=re,yo|=re;I=I.next}while(I!==null&&I!==n);if(O===null?T=p:O.next=C,!cn(p,t.memoizedState)&&(ki=!0,Z&&(a=kc,a!==null)))throw a;t.memoizedState=p,t.baseState=T,t.baseQueue=O,l.lastRenderedState=p}return d===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function ml(t){var n=vt(),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 l=a.dispatch,d=a.pending,p=n.memoizedState;if(d!==null){a.pending=null;var T=d=d.next;do p=t(p,T.action),T=T.next;while(T!==d);cn(p,n.memoizedState)||(ki=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),a.lastRenderedState=p}return[p,l]}function gl(t,n,a){var l=$e,d=an();if(mt){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var p=a();Rc||p===a()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Rc=!0)}else{if(p=n(),Rc||(a=n(),cn(p,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Rc=!0)),Pt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");rt&124||cm(l,n,p)}return d.memoizedState=p,a={value:p,getSnapshot:n},d.queue=a,ie(ia.bind(null,l,a,t),[t]),l.flags|=2048,k(ys|vi,M(),Sh.bind(null,l,a,p,n),null),p}function ec(t,n,a){var l=$e,d=vt(),p=mt;if(p){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(),!Rc){var T=n();cn(a,T)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Rc=!0)}(T=!cn((It||d).memoizedState,a))&&(d.memoizedState=a,ki=!0),d=d.queue;var C=ia.bind(null,l,d,t);if(z(2048,vi,C,[t]),d.getSnapshot!==n||T||fi!==null&&fi.memoizedState.tag&ys){if(l.flags|=2048,k(ys|vi,M(),Sh.bind(null,l,d,a,n),null),Pt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");p||po&124||cm(l,n,a)}return a}function cm(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=$e.updateQueue,n===null?(n=pl(),$e.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function Sh(t,n,a,l){n.value=a,n.getSnapshot=l,bt(n)&&mr(t)}function ia(t,n,a){return a(function(){bt(n)&&mr(t)})}function bt(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!cn(t,a)}catch{return!0}}function mr(t){var n=mi(t,2);n!==null&&ai(n,t,2)}function gi(t){var n=an();if(typeof t=="function"){var a=t;if(t=a(),Dl){at(!0);try{a()}finally{at(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:t},n}function Dn(t){t=gi(t);var n=t.queue,a=Wx.bind(null,$e,n);return n.dispatch=a,[t.memoizedState,a]}function xh(t){var n=an();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=av.bind(null,$e,!0,a),a.dispatch=n,[t,n]}function Eh(t,n){var a=vt();return dm(a,It,t,n)}function dm(t,n,a,l){return t.baseState=a,Th(t,It,typeof l=="function"?l:Vn)}function hm(t,n){var a=vt();return It!==null?dm(a,It,t,n):(a.baseState=t,[t,a.queue.dispatch])}function iv(t,n,a,l,d){if(gm(t))throw Error("Cannot update form state while rendering.");if(t=n.action,t!==null){var p={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){p.listeners.push(T)}};se.T!==null?a(!0):p.isTransition=!1,l(p),a=n.pending,a===null?(p.next=n.pending=p,fm(n,p)):(p.next=a.next,n.pending=a.next=p)}}function fm(t,n){var a=n.action,l=n.payload,d=t.state;if(n.isTransition){var p=se.T,T={};se.T=T,se.T._updatedFibers=new Set;try{var C=a(d,l),O=se.S;O!==null&&O(T,C),pm(t,n,C)}catch(I){Ch(t,n,I)}finally{se.T=p,p===null&&T._updatedFibers&&(t=T._updatedFibers.size,T._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{T=a(d,l),pm(t,n,T)}catch(I){Ch(t,n,I)}}function pm(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?(a.then(function(l){mm(t,n,l)},function(l){return Ch(t,n,l)}),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,wh(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 Ch(t,n,a){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=a,wh(n),n=n.next;while(n!==l)}t.action=null}function wh(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(mt){var a=Pt.formState;if(a!==null){e:{var l=$e;if(mt){if(ei){t:{for(var d=ei,p=Dr;d.nodeType!==8;){if(!p){d=null;break t}if(d=us(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p===b_||p===lD?d:null}if(d){ei=us(d.nextSibling),l=d.data===b_;break e}}Zr(l)}l=!1}l&&(n=a[0])}}return a=an(),a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:n},a.queue=l,a=Wx.bind(null,$e,l),l.dispatch=a,l=gi(!1),p=av.bind(null,$e,!1,l.queue),l=an(),d={state:n,dispatch:null,action:t,pending:null},l.queue=d,a=iv.bind(null,$e,d,p,a),d.dispatch=a,l.memoizedState=t,[n,a,!1]}function y(t){var n=vt();return v(n,It,t)}function v(t,n,a){if(n=Th(t,n,h)[0],t=Wa(Vn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Xa(n)}catch(T){throw T===uf?og:T}else l=n;n=vt();var d=n.queue,p=d.dispatch;return a!==n.memoizedState&&($e.flags|=2048,k(ys|vi,M(),_.bind(null,d,a),null)),[l,p,t]}function _(t,n){t.action=n}function E(t){var n=vt(),a=It;if(a!==null)return v(n,a,t);vt(),n=n.memoizedState,a=vt();var l=a.queue.dispatch;return a.memoizedState=t,[n,l,!1]}function k(t,n,a,l){return t={tag:t,create:a,deps:l,inst:n,next:null},n=$e.updateQueue,n===null&&(n=pl(),$e.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(l=a.next,a.next=t,t.next=l,n.lastEffect=t),t}function M(){return{destroy:void 0,resource:void 0}}function N(t){var n=an();return t={current:t},n.memoizedState=t}function P(t,n,a,l){var d=an();l=l===void 0?null:l,$e.flags|=t,d.memoizedState=k(ys|n,M(),a,l)}function z(t,n,a,l){var d=vt();l=l===void 0?null:l;var p=d.memoizedState.inst;It!==null&&l!==null&&ph(l,It.memoizedState.deps)?d.memoizedState=k(n,p,a,l):($e.flags|=t,d.memoizedState=k(ys|n,p,a,l))}function ie(t,n){($e.mode&Bs)!==Ft&&($e.mode&Gw)===Ft?P(276826112,vi,t,n):P(8390656,vi,t,n)}function Te(t,n){var a=4194308;return($e.mode&Bs)!==Ft&&(a|=134217728),P(a,ji,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 qe(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 l=4194308;($e.mode&Bs)!==Ft&&(l|=134217728),P(l,ji,ue.bind(null,n,t),a)}function je(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,z(4,ji,ue.bind(null,n,t),a)}function Jt(t,n){return an().memoizedState=[t,n===void 0?null:n],t}function Ai(t,n){var a=vt();n=n===void 0?null:n;var l=a.memoizedState;return n!==null&&ph(n,l[1])?l[0]:(a.memoizedState=[t,n],t)}function os(t,n){var a=an();n=n===void 0?null:n;var l=t();if(Dl){at(!0);try{t()}finally{at(!1)}}return a.memoizedState=[l,n],l}function gr(t,n){var a=vt();n=n===void 0?null:n;var l=a.memoizedState;if(n!==null&&ph(n,l[1]))return l[0];if(l=t(),Dl){at(!0);try{t()}finally{at(!1)}}return a.memoizedState=[l,n],l}function na(t,n){var a=an();return Za(a,t,n)}function Qa(t,n){var a=vt();return Rt(a,It.memoizedState,t,n)}function Ka(t,n){var a=vt();return It===null?Za(a,t,n):Rt(a,It.memoizedState,t,n)}function Za(t,n,a){return a===void 0||po&1073741824?t.memoizedState=n:(t.memoizedState=a,t=VE(),$e.lanes|=t,yo|=t,a)}function Rt(t,n,a,l){return cn(a,n)?a:Oc.current!==null?(t=Za(t,a,l),cn(t,n)||(ki=!0),t):po&42?(t=VE(),$e.lanes|=t,yo|=t,n):(ki=!0,t.memoizedState=a)}function Ja(t,n,a,l,d){var p=_t.p;_t.p=p!==0&&p<Cr?p:Cr;var T=se.T,C={};se.T=C,av(t,!1,n,a),C._updatedFibers=new Set;try{var O=d(),I=se.S;if(I!==null&&I(C,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var Z=ev(O,l);Ah(t,n,Z,Yn(t))}else Ah(t,n,l,Yn(t))}catch(re){Ah(t,n,{then:function(){},status:"rejected",reason:re},Yn(t))}finally{_t.p=p,se.T=T,T===null&&C._updatedFibers&&(t=C._updatedFibers.size,C._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 on(t,n,a,l){if(t.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var d=$x(t).queue;Ja(t,d,n,ql,a===null?S:function(){return Gx(t),a(l)})}function $x(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:ql,baseState:ql,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:ql},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Gx(t){se.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var n=$x(t).next.queue;Ah(t,n,{},Yn(t))}function nv(){var t=gi(!1);return t=Ja.bind(null,$e,t.queue,!0,!1),an().memoizedState=t,[!1,t]}function Yx(){var t=Wa(Vn)[0],n=vt().memoizedState;return[typeof t=="boolean"?t:Xa(t),n]}function Xx(){var t=ml(Vn)[0],n=vt().memoizedState;return[typeof t=="boolean"?t:Xa(t),n]}function yl(){return qt(kf)}function sv(){var t=an(),n=Pt.identifierPrefix;if(mt){var a=ma,l=pa;a=(l&~(1<<32-ln(l)-1)).toString(32)+a,n="«"+n+"R"+a,a=dg++,0<a&&(n+="H"+a.toString(32)),n+="»"}else a=g6++,n="«"+n+"r"+a.toString(32)+"»";return t.memoizedState=n}function rv(){return an().memoizedState=W5.bind(null,$e)}function W5(t,n){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var l=Yn(a);t=An(l);var d=fr(a,t,l);d!==null&&(ai(d,a,l),Ga(d,a,l)),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 Q5(t,n,a){var l=arguments;typeof l[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()."),l=Yn(t);var d={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};gm(t)?Qx(n,d):(d=or(t,n,d,l),d!==null&&(ai(d,t,l),Kx(d,n,l))),At(t,l)}function Wx(t,n,a){var l=arguments;typeof l[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()."),l=Yn(t),Ah(t,n,a,l),At(t,l)}function Ah(t,n,a,l){var d={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(gm(t))Qx(n,d);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null)){var T=se.H;se.H=qs;try{var C=n.lastRenderedState,O=p(C,a);if(d.hasEagerState=!0,d.eagerState=O,cn(O,C))return ar(t,n,d,0),Pt===null&&ja(),!1}catch{}finally{se.H=T}}if(a=or(t,n,d,l),a!==null)return ai(a,t,l),Kx(a,n,l),!0}return!1}function av(t,n,a,l){if(se.T===null&&Cl===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."),l={lane:2,revertLane:Bv(),action:l,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=or(t,a,l,2),n!==null&&ai(n,t,2);At(t,2)}function gm(t){var n=t.alternate;return t===$e||n!==null&&n===$e}function Qx(t,n){Mc=cg=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function Kx(t,n,a){if(a&4194048){var l=n.lanes;l&=t.pendingLanes,a|=l,n.lanes=a,Pa(t,a)}}function Bi(t){var n=et;return t!=null&&(et=n===null?t:n.concat(t)),n}function ym(t,n,a){for(var l=Object.keys(t.props),d=0;d<l.length;d++){var p=l[d];if(p!=="children"&&p!=="key"){n===null&&(n=Yu(t,a.mode,0),n._debugInfo=et,n.return=a),Ne(n,function(T){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T)},p);break}}}function vm(t){var n=ff;return ff+=1,Lc===null&&(Lc=ah()),lh(Lc,t,n)}function Dh(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function bm(t,n){throw n.$$typeof===tL?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 _m(t,n){var a=te(t)||"Component";CA[a]||(CA[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 Tm(t,n){var a=te(t)||"Component";wA[a]||(wA[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 Zx(t){function n(F,H){if(t){var V=F.deletions;V===null?(F.deletions=[H],F.flags|=16):V.push(H)}}function a(F,H){if(!t)return null;for(;H!==null;)n(F,H),H=H.sibling;return null}function l(F){for(var H=new Map;F!==null;)F.key!==null?H.set(F.key,F):H.set(F.index,F),F=F.sibling;return H}function d(F,H){return F=Ms(F,H),F.index=0,F.sibling=null,F}function p(F,H,V){return F.index=V,t?(V=F.alternate,V!==null?(V=V.index,V<H?(F.flags|=67108866,H):V):(F.flags|=67108866,H)):(F.flags|=1048576,H)}function T(F){return t&&F.alternate===null&&(F.flags|=67108866),F}function C(F,H,V,oe){return H===null||H.tag!==6?(H=Va(V,F.mode,oe),H.return=F,H._debugOwner=F,H._debugTask=F._debugTask,H._debugInfo=et,H):(H=d(H,V),H.return=F,H._debugInfo=et,H)}function O(F,H,V,oe){var Se=V.type;return Se===dc?(H=Z(F,H,V.props.children,oe,V.key),ym(V,H,F),H):H!==null&&(H.elementType===Se||$u(H,V)||typeof Se=="object"&&Se!==null&&Se.$$typeof===Xn&&mo(Se)===H.type)?(H=d(H,V.props),Dh(H,V),H.return=F,H._debugOwner=V._owner,H._debugInfo=et,H):(H=Yu(V,F.mode,oe),Dh(H,V),H.return=F,H._debugInfo=et,H)}function I(F,H,V,oe){return H===null||H.tag!==4||H.stateNode.containerInfo!==V.containerInfo||H.stateNode.implementation!==V.implementation?(H=Qd(V,F.mode,oe),H.return=F,H._debugInfo=et,H):(H=d(H,V.children||[]),H.return=F,H._debugInfo=et,H)}function Z(F,H,V,oe,Se){return H===null||H.tag!==7?(H=cr(V,F.mode,oe,Se),H.return=F,H._debugOwner=F,H._debugTask=F._debugTask,H._debugInfo=et,H):(H=d(H,V),H.return=F,H._debugInfo=et,H)}function re(F,H,V){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Va(""+H,F.mode,V),H.return=F,H._debugOwner=F,H._debugTask=F._debugTask,H._debugInfo=et,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case ro:return V=Yu(H,F.mode,V),Dh(V,H),V.return=F,F=Bi(H._debugInfo),V._debugInfo=et,et=F,V;case cc:return H=Qd(H,F.mode,V),H.return=F,H._debugInfo=et,H;case Xn:var oe=Bi(H._debugInfo);return H=mo(H),F=re(F,H,V),et=oe,F}if(Fi(H)||le(H))return V=cr(H,F.mode,V,null),V.return=F,V._debugOwner=F,V._debugTask=F._debugTask,F=Bi(H._debugInfo),V._debugInfo=et,et=F,V;if(typeof H.then=="function")return oe=Bi(H._debugInfo),F=re(F,vm(H),V),et=oe,F;if(H.$$typeof===Sr)return re(F,Xu(F,H),V);bm(F,H)}return typeof H=="function"&&_m(F,H),typeof H=="symbol"&&Tm(F,H),null}function Q(F,H,V,oe){var Se=H!==null?H.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Se!==null?null:C(F,H,""+V,oe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case ro:return V.key===Se?(Se=Bi(V._debugInfo),F=O(F,H,V,oe),et=Se,F):null;case cc:return V.key===Se?I(F,H,V,oe):null;case Xn:return Se=Bi(V._debugInfo),V=mo(V),F=Q(F,H,V,oe),et=Se,F}if(Fi(V)||le(V))return Se!==null?null:(Se=Bi(V._debugInfo),F=Z(F,H,V,oe,null),et=Se,F);if(typeof V.then=="function")return Se=Bi(V._debugInfo),F=Q(F,H,vm(V),oe),et=Se,F;if(V.$$typeof===Sr)return Q(F,H,Xu(F,V),oe);bm(F,V)}return typeof V=="function"&&_m(F,V),typeof V=="symbol"&&Tm(F,V),null}function ae(F,H,V,oe,Se){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return F=F.get(V)||null,C(H,F,""+oe,Se);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case ro:return V=F.get(oe.key===null?V:oe.key)||null,F=Bi(oe._debugInfo),H=O(H,V,oe,Se),et=F,H;case cc:return F=F.get(oe.key===null?V:oe.key)||null,I(H,F,oe,Se);case Xn:var Xe=Bi(oe._debugInfo);return oe=mo(oe),H=ae(F,H,V,oe,Se),et=Xe,H}if(Fi(oe)||le(oe))return V=F.get(V)||null,F=Bi(oe._debugInfo),H=Z(H,V,oe,Se,null),et=F,H;if(typeof oe.then=="function")return Xe=Bi(oe._debugInfo),H=ae(F,H,V,vm(oe),Se),et=Xe,H;if(oe.$$typeof===Sr)return ae(F,H,V,Xu(H,oe),Se);bm(H,oe)}return typeof oe=="function"&&_m(H,oe),typeof oe=="symbol"&&Tm(H,oe),null}function Le(F,H,V,oe){if(typeof V!="object"||V===null)return oe;switch(V.$$typeof){case ro:case cc:f(F,H,V);var Se=V.key;if(typeof Se!="string")break;if(oe===null){oe=new Set,oe.add(Se);break}if(!oe.has(Se)){oe.add(Se);break}Ne(H,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.",Se)});break;case Xn:V=mo(V),Le(F,H,V,oe)}return oe}function Ve(F,H,V,oe){for(var Se=null,Xe=null,Ie=null,We=H,Ke=H=0,Ht=null;We!==null&&Ke<V.length;Ke++){We.index>Ke?(Ht=We,We=null):Ht=We.sibling;var li=Q(F,We,V[Ke],oe);if(li===null){We===null&&(We=Ht);break}Se=Le(F,li,V[Ke],Se),t&&We&&li.alternate===null&&n(F,We),H=p(li,H,Ke),Ie===null?Xe=li:Ie.sibling=li,Ie=li,We=Ht}if(Ke===V.length)return a(F,We),mt&&Kr(F,Ke),Xe;if(We===null){for(;Ke<V.length;Ke++)We=re(F,V[Ke],oe),We!==null&&(Se=Le(F,We,V[Ke],Se),H=p(We,H,Ke),Ie===null?Xe=We:Ie.sibling=We,Ie=We);return mt&&Kr(F,Ke),Xe}for(We=l(We);Ke<V.length;Ke++)Ht=ae(We,F,Ke,V[Ke],oe),Ht!==null&&(Se=Le(F,Ht,V[Ke],Se),t&&Ht.alternate!==null&&We.delete(Ht.key===null?Ke:Ht.key),H=p(Ht,H,Ke),Ie===null?Xe=Ht:Ie.sibling=Ht,Ie=Ht);return t&&We.forEach(function(Ea){return n(F,Ea)}),mt&&Kr(F,Ke),Xe}function Bt(F,H,V,oe){if(V==null)throw Error("An iterable object provided no iterator.");for(var Se=null,Xe=null,Ie=H,We=H=0,Ke=null,Ht=null,li=V.next();Ie!==null&&!li.done;We++,li=V.next()){Ie.index>We?(Ke=Ie,Ie=null):Ke=Ie.sibling;var Ea=Q(F,Ie,li.value,oe);if(Ea===null){Ie===null&&(Ie=Ke);break}Ht=Le(F,Ea,li.value,Ht),t&&Ie&&Ea.alternate===null&&n(F,Ie),H=p(Ea,H,We),Xe===null?Se=Ea:Xe.sibling=Ea,Xe=Ea,Ie=Ke}if(li.done)return a(F,Ie),mt&&Kr(F,We),Se;if(Ie===null){for(;!li.done;We++,li=V.next())Ie=re(F,li.value,oe),Ie!==null&&(Ht=Le(F,Ie,li.value,Ht),H=p(Ie,H,We),Xe===null?Se=Ie:Xe.sibling=Ie,Xe=Ie);return mt&&Kr(F,We),Se}for(Ie=l(Ie);!li.done;We++,li=V.next())Ke=ae(Ie,F,We,li.value,oe),Ke!==null&&(Ht=Le(F,Ke,li.value,Ht),t&&Ke.alternate!==null&&Ie.delete(Ke.key===null?We:Ke.key),H=p(Ke,H,We),Xe===null?Se=Ke:Xe.sibling=Ke,Xe=Ke);return t&&Ie.forEach(function(z6){return n(F,z6)}),mt&&Kr(F,We),Se}function lt(F,H,V,oe){if(typeof V=="object"&&V!==null&&V.type===dc&&V.key===null&&(ym(V,null,F),V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case ro:var Se=Bi(V._debugInfo);e:{for(var Xe=V.key;H!==null;){if(H.key===Xe){if(Xe=V.type,Xe===dc){if(H.tag===7){a(F,H.sibling),oe=d(H,V.props.children),oe.return=F,oe._debugOwner=V._owner,oe._debugInfo=et,ym(V,oe,F),F=oe;break e}}else if(H.elementType===Xe||$u(H,V)||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===Xn&&mo(Xe)===H.type){a(F,H.sibling),oe=d(H,V.props),Dh(oe,V),oe.return=F,oe._debugOwner=V._owner,oe._debugInfo=et,F=oe;break e}a(F,H);break}else n(F,H);H=H.sibling}V.type===dc?(oe=cr(V.props.children,F.mode,oe,V.key),oe.return=F,oe._debugOwner=F,oe._debugTask=F._debugTask,oe._debugInfo=et,ym(V,oe,F),F=oe):(oe=Yu(V,F.mode,oe),Dh(oe,V),oe.return=F,oe._debugInfo=et,F=oe)}return F=T(F),et=Se,F;case cc:e:{for(Se=V,V=Se.key;H!==null;){if(H.key===V)if(H.tag===4&&H.stateNode.containerInfo===Se.containerInfo&&H.stateNode.implementation===Se.implementation){a(F,H.sibling),oe=d(H,Se.children||[]),oe.return=F,F=oe;break e}else{a(F,H);break}else n(F,H);H=H.sibling}oe=Qd(Se,F.mode,oe),oe.return=F,F=oe}return T(F);case Xn:return Se=Bi(V._debugInfo),V=mo(V),F=lt(F,H,V,oe),et=Se,F}if(Fi(V))return Se=Bi(V._debugInfo),F=Ve(F,H,V,oe),et=Se,F;if(le(V)){if(Se=Bi(V._debugInfo),Xe=le(V),typeof Xe!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ie=Xe.call(V);return Ie===V?(F.tag!==0||Object.prototype.toString.call(F.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ie)!=="[object Generator]")&&(xA||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."),xA=!0):V.entries!==Xe||Wb||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Wb=!0),F=Bt(F,H,Ie,oe),et=Se,F}if(typeof V.then=="function")return Se=Bi(V._debugInfo),F=lt(F,H,vm(V),oe),et=Se,F;if(V.$$typeof===Sr)return lt(F,H,Xu(F,V),oe);bm(F,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(Se=""+V,H!==null&&H.tag===6?(a(F,H.sibling),oe=d(H,Se),oe.return=F,F=oe):(a(F,H),oe=Va(Se,F.mode,oe),oe.return=F,oe._debugOwner=F,oe._debugTask=F._debugTask,oe._debugInfo=et,F=oe),T(F)):(typeof V=="function"&&_m(F,V),typeof V=="symbol"&&Tm(F,V),a(F,H))}return function(F,H,V,oe){var Se=et;et=null;try{ff=0;var Xe=lt(F,H,V,oe);return Lc=null,Xe}catch(Ht){if(Ht===uf||Ht===og)throw Ht;var Ie=w(29,Ht,null,F.mode);Ie.lanes=oe,Ie.return=F;var We=Ie._debugInfo=et;if(Ie._debugOwner=F._debugOwner,Ie._debugTask=F._debugTask,We!=null){for(var Ke=We.length-1;0<=Ke;Ke--)if(typeof We[Ke].stack=="string"){Ie._debugOwner=We[Ke],Ie._debugTask=We[Ke].debugTask;break}}return Ie}finally{et=Se}}}function eo(t){var n=t.alternate;be(bi,bi.current&Nc,t),be(bs,t,t),Or===null&&(n===null||Oc.current!==null||n.memoizedState!==null)&&(Or=t)}function Jx(t){if(t.tag===22){if(be(bi,bi.current,t),be(bs,t,t),Or===null){var n=t.alternate;n!==null&&n.memoizedState!==null&&(Or=t)}}else to(t)}function to(t){be(bi,bi.current,t),be(bs,bs.current,t)}function sa(t){he(bs,t),Or===t&&(Or=null),he(bi,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===Ta||Xv(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 ov(t){if(t!==null&&typeof t!="function"){var n=String(t);UA.has(n)||(UA.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",t))}}function lv(t,n,a,l){var d=t.memoizedState,p=a(l,d);if(t.mode&Ji){at(!0);try{p=a(l,d)}finally{at(!1)}}p===void 0&&(n=Y(n)||"Component",IA.has(n)||(IA.add(n),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))),d=p==null?d:it({},d,p),t.memoizedState=d,t.lanes===0&&(t.updateQueue.baseState=d)}function eE(t,n,a,l,d,p,T){var C=t.stateNode;if(typeof C.shouldComponentUpdate=="function"){if(a=C.shouldComponentUpdate(l,p,T),t.mode&Ji){at(!0);try{a=C.shouldComponentUpdate(l,p,T)}finally{at(!1)}}return a===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Y(n)||"Component"),a}return n.prototype&&n.prototype.isPureReactComponent?!Rs(a,l)||!Rs(d,p):!0}function tE(t,n,a,l){var d=n.state;typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,l),n.state!==d&&(t=te(t)||"Component",kA.has(t)||(kA.add(t),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",t)),Qb.enqueueReplaceState(n,n.state,null))}function vl(t,n){var a=n;if("ref"in n){a={};for(var l in n)l!=="ref"&&(a[l]=n[l])}if(t=t.defaultProps){a===n&&(a=it({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function iE(t){Kb(t),console.warn(`%s
%s
`,Pc?"An error occurred in the <"+Pc+"> 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 nE(t){var n=Pc?"The above error occurred in the <"+Pc+"> 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, "+((Zb||"Anonymous")+".");if(typeof t=="object"&&t!==null&&typeof t.environmentName=="string"){var l=t.environmentName;t=[`%o
%s
%s
`,t,n,a].slice(0),typeof t[0]=="string"?t.splice(0,1,gD+t[0],yD,Rg+l+Rg,vD):t.splice(0,0,gD,yD,Rg+l+Rg,vD),t.unshift(console),l=H6.apply(console.error,t),l()}else console.error(`%o
%s
%s
`,t,n,a)}function sE(t){Kb(t)}function xm(t,n){try{Pc=n.source?te(n.source):null,Zb=null;var a=n.value;if(se.actQueue!==null)se.thrownErrors.push(a);else{var l=t.onUncaughtError;l(a,{componentStack:n.stack})}}catch(d){setTimeout(function(){throw d})}}function rE(t,n,a){try{Pc=a.source?te(a.source):null,Zb=te(n);var l=t.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function uv(t,n,a){return a=An(a),a.tag=Hb,a.payload={element:null},a.callback=function(){Ne(n.source,xm,t,n)},a}function cv(t){return t=An(t),t.tag=Hb,t}function dv(t,n,a,l){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var p=l.value;t.payload=function(){return d(p)},t.callback=function(){nm(a),Ne(l.source,rE,n,a,l)}}var T=a.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(t.callback=function(){nm(a),Ne(l.source,rE,n,a,l),typeof d!="function"&&(bo===null?bo=new Set([this]):bo.add(this)),v6(this,l),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.",te(a)||"Unknown")})}function K5(t,n,a,l,d){if(a.flags|=32768,Ps&&Nh(t,d),l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=a.alternate,n!==null&&nl(n,a,d,!0),mt&&(ga=!0),a=bs.current,a!==null){switch(a.tag){case 13:return Or===null?Ov():a.alternate===null&&ti===_a&&(ti=i_),a.flags&=-257,a.flags|=65536,a.lanes=d,l===Fb?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([l]):n.add(l),Lv(t,l,d)),!1;case 22:return a.flags|=65536,l===Fb?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([l]):a.add(l)),Lv(t,l,d)),!1}throw Error("Unexpected Suspense handler tag ("+a.tag+"). This is a bug in React.")}return Lv(t,l,d),Ov(),!1}if(mt)return ga=!0,n=bs.current,n!==null?(!(n.flags&65536)&&(n.flags|=256),n.flags|=65536,n.lanes=d,l!==Pb&&il(Pi(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:l}),a))):(l!==Pb&&il(Pi(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:l}),a)),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,l=Pi(l,a),d=uv(t.stateNode,l,d),dl(t,d),ti!==kl&&(ti=Fc)),!1;var p=Pi(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:l}),a);if(Tf===null?Tf=[p]:Tf.push(p),ti!==kl&&(ti=Fc),n===null)return!0;l=Pi(l,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=uv(a.stateNode,l,t),dl(a,t),!1;case 1:if(n=a.type,p=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(bo===null||!bo.has(p))))return a.flags|=65536,d&=-d,a.lanes|=d,d=cv(d),dv(d,t,a,l),dl(a,d),!1}a=a.return}while(a!==null);return!1}function Ui(t,n,a,l){n.child=t===null?AA(n,null,a,l):Ic(n,t.child,a,l)}function aE(t,n,a,l,d){a=a.render;var p=n.ref;if("ref"in l){var T={};for(var C in l)C!=="ref"&&(T[C]=l[C])}else T=l;return hr(n),ut(n),l=mh(t,n,a,T,p,d),C=yh(),ft(),t!==null&&!ki?(vh(t,n,d),ra(t,n,d)):(mt&&C&&el(n),n.flags|=1,Ui(t,n,l,d),n.child)}function oE(t,n,a,l,d){if(t===null){var p=a.type;return typeof p=="function"&&!za(p)&&p.defaultProps===void 0&&a.compare===null?(a=ur(p),n.tag=15,n.type=a,fv(n,p),lE(t,n,a,l,d)):(t=Wd(a.type,null,l,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(p=t.child,!bv(t,d)){var T=p.memoizedProps;if(a=a.compare,a=a!==null?a:Rs,a(T,l)&&t.ref===n.ref)return ra(t,n,d)}return n.flags|=1,t=Ms(p,l),t.ref=n.ref,t.return=n,n.child=t}function lE(t,n,a,l,d){if(t!==null){var p=t.memoizedProps;if(Rs(p,l)&&t.ref===n.ref&&n.type===t.type)if(ki=!1,n.pendingProps=l=p,bv(t,d))t.flags&131072&&(ki=!0);else return n.lanes=t.lanes,ra(t,n,d)}return hv(t,n,a,l,d)}function uE(t,n,a){var l=n.pendingProps,d=l.children,p=t!==null?t.memoizedState:null;if(l.mode==="hidden"){if(n.flags&128){if(l=p!==null?p.baseLanes|a:a,t!==null){for(d=n.child=t.child,p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;n.childLanes=p&~l}else n.childLanes=0,n.child=null;return cE(t,n,l,a)}if(a&536870912)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Qu(n,p!==null?p.cachePool:null),p!==null?Zu(n,p):hh(n),Jx(n);else return n.lanes=n.childLanes=536870912,cE(t,n,p!==null?p.baseLanes|a:a,a)}else p!==null?(Qu(n,p.cachePool),Zu(n,p),to(n),n.memoizedState=null):(t!==null&&Qu(n,null),hh(n),to(n));return Ui(t,n,d,a),n.child}function cE(t,n,a,l){var d=sh();return d=d===null?null:{parent:yi._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},t!==null&&Qu(n,null),hh(n),Jx(n),t!==null&&nl(t,n,l,!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 hv(t,n,a,l,d){if(a.prototype&&typeof a.prototype.render=="function"){var p=Y(a)||"Unknown";FA[p]||(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.",p,p),FA[p]=!0)}return n.mode&Ji&&Us.recordLegacyContextWarning(n,null),t===null&&(fv(n,n.type),a.contextTypes&&(p=Y(a)||"Unknown",jA[p]||(jA[p]=!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)",p)))),hr(n),ut(n),a=mh(t,n,a,l,void 0,d),l=yh(),ft(),t!==null&&!ki?(vh(t,n,d),ra(t,n,d)):(mt&&l&&el(n),n.flags|=1,Ui(t,n,a,d),n.child)}function dE(t,n,a,l,d,p){return hr(n),ut(n),va=-1,hf=t!==null&&t.type!==n.type,n.updateQueue=null,a=gh(n,l,a,d),um(t,n),l=yh(),ft(),t!==null&&!ki?(vh(t,n,p),ra(t,n,p)):(mt&&l&&el(n),n.flags|=1,Ui(t,n,a,p),n.child)}function hE(t,n,a,l,d){switch(c(n)){case!1:var p=n.stateNode,T=new n.type(n.memoizedProps,p.context).state;p.updater.enqueueSetState(p,T,null);break;case!0:n.flags|=128,n.flags|=65536,p=Error("Simulated error coming from DevTools");var C=d&-d;if(n.lanes|=C,T=Pt,T===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");C=cv(C),dv(C,T,n,Pi(p,n)),dl(n,C)}if(hr(n),n.stateNode===null){if(T=ho,p=a.contextType,"contextType"in a&&p!==null&&(p===void 0||p.$$typeof!==Sr)&&!BA.has(a)&&(BA.add(a),C=p===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 p!="object"?" However, it is set to a "+typeof p+".":p.$$typeof===ab?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(p).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Y(a)||"Component",C)),typeof p=="object"&&p!==null&&(T=qt(p)),p=new a(l,T),n.mode&Ji){at(!0);try{p=new a(l,T)}finally{at(!1)}}if(T=n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Qb,n.stateNode=p,p._reactInternals=n,p._reactInternalInstance=DA,typeof a.getDerivedStateFromProps=="function"&&T===null&&(T=Y(a)||"Component",OA.has(T)||(OA.add(T),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.",T,p.state===null?"null":"undefined",T))),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"){var O=C=T=null;if(typeof p.componentWillMount=="function"&&p.componentWillMount.__suppressDeprecationWarning!==!0?T="componentWillMount":typeof p.UNSAFE_componentWillMount=="function"&&(T="UNSAFE_componentWillMount"),typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps.__suppressDeprecationWarning!==!0?C="componentWillReceiveProps":typeof p.UNSAFE_componentWillReceiveProps=="function"&&(C="UNSAFE_componentWillReceiveProps"),typeof p.componentWillUpdate=="function"&&p.componentWillUpdate.__suppressDeprecationWarning!==!0?O="componentWillUpdate":typeof p.UNSAFE_componentWillUpdate=="function"&&(O="UNSAFE_componentWillUpdate"),T!==null||C!==null||O!==null){p=Y(a)||"Component";var I=typeof a.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";MA.has(p)||(MA.add(p),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`,p,I,T!==null?`
`+T:"",C!==null?`
`+C:"",O!==null?`
`+O:""))}}p=n.stateNode,T=Y(a)||"Component",p.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?",T):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",T)),!p.getInitialState||p.getInitialState.isReactClassApproved||p.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?",T),p.getDefaultProps&&!p.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.",T),p.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",T),a.childContextTypes&&!PA.has(a)&&(PA.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)",T)),a.contextTypes&&!NA.has(a)&&(NA.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)",T)),typeof p.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.",T),a.prototype&&a.prototype.isPureReactComponent&&typeof p.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.",Y(a)||"A pure component"),typeof p.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",T),typeof p.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().",T),typeof p.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",T),typeof p.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",T),C=p.props!==l,p.props!==void 0&&C&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",T),p.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.",T,T),typeof p.getSnapshotBeforeUpdate!="function"||typeof p.componentDidUpdate=="function"||RA.has(a)||(RA.add(a),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Y(a))),typeof p.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",T),typeof p.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",T),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.",T),(C=p.state)&&(typeof C!="object"||Fi(C))&&console.error("%s.state: must be set to an object or null",T),typeof p.getChildContext=="function"&&typeof a.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",T),p=n.stateNode,p.props=l,p.state=n.memoizedState,p.refs={},cl(n),T=a.contextType,p.context=typeof T=="object"&&T!==null?qt(T):ho,p.state===l&&(T=Y(a)||"Component",LA.has(T)||(LA.add(T),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.",T))),n.mode&Ji&&Us.recordLegacyContextWarning(n,p),Us.recordUnsafeLifecycleWarnings(n,p),p.state=n.memoizedState,T=a.getDerivedStateFromProps,typeof T=="function"&&(lv(n,a,T,l),p.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(T=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),T!==p.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",te(n)||"Component"),Qb.enqueueReplaceState(p,p.state,null)),fl(n,l,p,d),hl(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Bs)!==Ft&&(n.flags|=134217728),p=!0}else if(t===null){p=n.stateNode;var Z=n.memoizedProps;C=vl(a,Z),p.props=C;var re=p.context;O=a.contextType,T=ho,typeof O=="object"&&O!==null&&(T=qt(O)),I=a.getDerivedStateFromProps,O=typeof I=="function"||typeof p.getSnapshotBeforeUpdate=="function",Z=n.pendingProps!==Z,O||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(Z||re!==T)&&tE(n,p,l,T),fo=!1;var Q=n.memoizedState;p.state=Q,fl(n,l,p,d),hl(),re=n.memoizedState,Z||Q!==re||fo?(typeof I=="function"&&(lv(n,a,I,l),re=n.memoizedState),(C=fo||eE(n,a,C,l,Q,re,T))?(O||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Bs)!==Ft&&(n.flags|=134217728)):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Bs)!==Ft&&(n.flags|=134217728),n.memoizedProps=l,n.memoizedState=re),p.props=l,p.state=re,p.context=T,p=C):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Bs)!==Ft&&(n.flags|=134217728),p=!1)}else{p=n.stateNode,ch(t,n),T=n.memoizedProps,O=vl(a,T),p.props=O,I=n.pendingProps,Q=p.context,re=a.contextType,C=ho,typeof re=="object"&&re!==null&&(C=qt(re)),Z=a.getDerivedStateFromProps,(re=typeof Z=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(T!==I||Q!==C)&&tE(n,p,l,C),fo=!1,Q=n.memoizedState,p.state=Q,fl(n,l,p,d),hl();var ae=n.memoizedState;T!==I||Q!==ae||fo||t!==null&&t.dependencies!==null&&jn(t.dependencies)?(typeof Z=="function"&&(lv(n,a,Z,l),ae=n.memoizedState),(O=fo||eE(n,a,O,l,Q,ae,C)||t!==null&&t.dependencies!==null&&jn(t.dependencies))?(re||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(l,ae,C),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(l,ae,C)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||T===t.memoizedProps&&Q===t.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||T===t.memoizedProps&&Q===t.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=ae),p.props=l,p.state=ae,p.context=C,p=O):(typeof p.componentDidUpdate!="function"||T===t.memoizedProps&&Q===t.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||T===t.memoizedProps&&Q===t.memoizedState||(n.flags|=1024),p=!1)}if(C=p,Em(t,n),T=(n.flags&128)!==0,C||T){if(C=n.stateNode,Fn(n),T&&typeof a.getDerivedStateFromError!="function")a=null,On=-1;else{if(ut(n),a=fA(C),n.mode&Ji){at(!0);try{fA(C)}finally{at(!1)}}ft()}n.flags|=1,t!==null&&T?(n.child=Ic(n,t.child,null,d),n.child=Ic(n,null,a,d)):Ui(t,n,a,d),n.memoizedState=C.state,t=n.child}else t=ra(t,n,d);return d=n.stateNode,p&&d.props!==l&&(Bc||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",te(n)||"a component"),Bc=!0),t}function fE(t,n,a,l){return tl(),n.flags|=256,Ui(t,n,a,l),n.child}function fv(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=Y(n)||"Unknown",zA[t]||(console.error("%s: Function components do not support getDerivedStateFromProps.",t),zA[t]=!0)),typeof n.contextType=="object"&&n.contextType!==null&&(n=Y(n)||"Unknown",HA[n]||(console.error("%s: Function components do not support contextType.",n),HA[n]=!0))}function pv(t){return{baseLanes:t,cachePool:rh()}}function mv(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=Zn),t}function pE(t,n,a){var l,d=n.pendingProps;u(n)&&(n.flags|=128);var p=!1,T=(n.flags&128)!==0;if((l=T)||(l=t!==null&&t.memoizedState===null?!1:(bi.current&pf)!==0),l&&(p=!0,n.flags&=-129),l=(n.flags&32)!==0,n.flags&=-33,t===null){if(mt){if(p?eo(n):to(n),mt){var C=ei,O;if(!(O=!C)){e:{var I=C;for(O=Dr;I.nodeType!==8;){if(!O){O=null;break e}if(I=us(I.nextSibling),I===null){O=null;break e}}O=I}O!==null?(Ls(),n.memoizedState={dehydrated:O,treeContext:Sl!==null?{id:pa,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},I=w(18,null,null,Ft),I.stateNode=O,I.return=n,n.child=I,dn=n,ei=null,O=!0):O=!1,O=!O}O&&(Zd(n,C),Zr(n))}if(C=n.memoizedState,C!==null&&(C=C.dehydrated,C!==null))return Xv(C)?n.lanes=32:n.lanes=536870912,null;sa(n)}return C=d.children,d=d.fallback,p?(to(n),p=n.mode,C=Cm({mode:"hidden",children:C},p),d=cr(d,p,a,null),C.return=n,d.return=n,C.sibling=d,n.child=C,p=n.child,p.memoizedState=pv(a),p.childLanes=mv(t,l,a),n.memoizedState=e_,d):(eo(n),gv(n,C))}var Z=t.memoizedState;if(Z!==null&&(C=Z.dehydrated,C!==null)){if(T)n.flags&256?(eo(n),n.flags&=-257,n=yv(t,n,a)):n.memoizedState!==null?(to(n),n.child=t.child,n.flags|=128,n=null):(to(n),p=d.fallback,C=n.mode,d=Cm({mode:"visible",children:d.children},C),p=cr(p,C,a,null),p.flags|=2,d.return=n,p.return=n,d.sibling=p,n.child=d,Ic(n,t.child,null,a),d=n.child,d.memoizedState=pv(a),d.childLanes=mv(t,l,a),n.memoizedState=e_,n=p);else if(eo(n),mt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),Xv(C)){if(l=C.nextSibling&&C.nextSibling.dataset,l){O=l.dgst;var re=l.msg;I=l.stck;var Q=l.cstck}C=re,l=O,d=I,O=p=Q,p=Error(C||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),p.stack=d||"",p.digest=l,l=O===void 0?null:O,d={value:p,source:null,stack:l},typeof l=="string"&&Ib.set(p,d),il(d),n=yv(t,n,a)}else if(ki||nl(t,n,a,!1),l=(a&t.childLanes)!==0,ki||l){if(l=Pt,l!==null&&(d=a&-a,d=d&42?1:er(d),d=d&(l.suspendedLanes|a)?0:d,d!==0&&d!==Z.retryLane))throw Z.retryLane=d,mi(t,d),ai(l,t,d),qA;C.data===Ta||Ov(),n=yv(t,n,a)}else C.data===Ta?(n.flags|=192,n.child=t.child,n=null):(t=Z.treeContext,ei=us(C.nextSibling),dn=n,mt=!0,xl=null,ga=!1,ms=null,Dr=!1,t!==null&&(Ls(),fs[ps++]=pa,fs[ps++]=ma,fs[ps++]=Sl,pa=t.id,ma=t.overflow,Sl=n),n=gv(n,d.children),n.flags|=4096);return n}return p?(to(n),p=d.fallback,C=n.mode,O=t.child,I=O.sibling,d=Ms(O,{mode:"hidden",children:d.children}),d.subtreeFlags=O.subtreeFlags&65011712,I!==null?p=Ms(I,p):(p=cr(p,C,a,null),p.flags|=2),p.return=n,d.return=n,d.sibling=p,n.child=d,d=p,p=n.child,C=t.child.memoizedState,C===null?C=pv(a):(O=C.cachePool,O!==null?(I=yi._currentValue,O=O.parent!==I?{parent:I,pool:I}:O):O=rh(),C={baseLanes:C.baseLanes|a,cachePool:O}),p.memoizedState=C,p.childLanes=mv(t,l,a),n.memoizedState=e_,d):(eo(n),a=t.child,t=a.sibling,a=Ms(a,{mode:"visible",children:d.children}),a.return=n,a.sibling=null,t!==null&&(l=n.deletions,l===null?(n.deletions=[t],n.flags|=16):l.push(t)),n.child=a,n.memoizedState=null,a)}function gv(t,n){return n=Cm({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Cm(t,n){return t=w(22,t,null,n),t.lanes=0,t.stateNode={_visibility:Jm,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function yv(t,n,a){return Ic(n,t.child,null,a),t=gv(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function mE(t,n,a){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n),Jr(t.return,n,a)}function gE(t,n){var a=Fi(t);return t=!a&&typeof le(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 vv(t,n,a,l,d){var p=t.memoizedState;p===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:d}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=a,p.tailMode=d)}function yE(t,n,a){var l=n.pendingProps,d=l.revealOrder,p=l.tail;if(l=l.children,d!==void 0&&d!=="forwards"&&d!=="backwards"&&d!=="together"&&!VA[d])if(VA[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);p===void 0||Jb[p]||(p!=="collapsed"&&p!=="hidden"?(Jb[p]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',p)):d!=="forwards"&&d!=="backwards"&&(Jb[p]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',p)));e:if((d==="forwards"||d==="backwards")&&l!==void 0&&l!==null&&l!==!1)if(Fi(l)){for(var T=0;T<l.length;T++)if(!gE(l[T],T))break e}else if(T=le(l),typeof T=="function"){if(T=T.call(l))for(var C=T.next(),O=0;!C.done;C=T.next()){if(!gE(C.value,O))break e;O++}}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(Ui(t,n,l,a),l=bi.current,l&pf)l=l&Nc|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&&mE(t,a,n);else if(t.tag===19)mE(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}l&=Nc}switch(be(bi,l,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),vv(n,!1,d,a,p);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}vv(n,!0,a,null,p);break;case"together":vv(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function ra(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),On=-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=Ms(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=Ms(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function bv(t,n){return t.lanes&n?!0:(t=t.dependencies,!!(t!==null&&jn(t)))}function Z5(t,n,a){switch(n.tag){case 3:pe(n,n.stateNode.containerInfo),rs(n,yi,t.memoizedState.cache),tl();break;case 27:case 5:Ce(n);break;case 4:pe(n,n.stateNode.containerInfo);break;case 10:rs(n,n.type,n.memoizedProps.value);break;case 12:a&n.childLanes&&(n.flags|=4),n.flags|=2048;var l=n.stateNode;l.effectDuration=-0,l.passiveEffectDuration=-0;break;case 13:if(l=n.memoizedState,l!==null)return l.dehydrated!==null?(eo(n),n.flags|=128,null):a&n.child.childLanes?pE(t,n,a):(eo(n),t=ra(t,n,a),t!==null?t.sibling:null);eo(n);break;case 19:var d=(t.flags&128)!==0;if(l=(a&n.childLanes)!==0,l||(nl(t,n,a,!1),l=(a&n.childLanes)!==0),d){if(l)return yE(t,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),be(bi,bi.current,n),l)break;return null;case 22:case 23:return n.lanes=0,uE(t,n,a);case 24:rs(n,yi,t.memoizedState.cache)}return ra(t,n,a)}function _v(t,n,a){if(n._debugNeedsRemount&&t!==null){a=Wd(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes),a._debugStack=n._debugStack,a._debugTask=n._debugTask;var l=n.return;if(l===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===l.child)l.child=a;else{var d=l.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=l.deletions,n===null?(l.deletions=[t],l.flags|=16):n.push(t),a.flags|=2,a}if(t!==null)if(t.memoizedProps!==n.pendingProps||n.type!==t.type)ki=!0;else{if(!bv(t,a)&&!(n.flags&128))return ki=!1,Z5(t,n,a);ki=!!(t.flags&131072)}else ki=!1,(l=mt)&&(Ls(),l=(n.flags&1048576)!==0),l&&(l=n.index,Ls(),sm(n,tg,l));switch(n.lanes=0,n.tag){case 16:e:if(l=n.pendingProps,t=mo(n.elementType),n.type=t,typeof t=="function")za(t)?(l=vl(t,l),n.tag=1,n.type=t=ur(t),n=hE(null,n,t,l,a)):(n.tag=0,fv(n,t),n.type=t=ur(t),n=hv(null,n,t,l,a));else{if(t!=null){if(d=t.$$typeof,d===zh){n.tag=11,n.type=t=Vu(t),n=aE(null,n,t,l,a);break e}else if(d===jm){n.tag=14,n=oE(null,n,t,l,a);break e}}throw n="",t!==null&&typeof t=="object"&&t.$$typeof===Xn&&(n=" Did you wrap a component in React.lazy() more than once?"),t=Y(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 hv(t,n,n.type,n.pendingProps,a);case 1:return l=n.type,d=vl(l,n.pendingProps),hE(t,n,l,d,a);case 3:e:{if(pe(n,n.stateNode.containerInfo),t===null)throw Error("Should have a current fiber. This is a bug in React.");l=n.pendingProps;var p=n.memoizedState;d=p.element,ch(t,n),fl(n,l,null,a);var T=n.memoizedState;if(l=T.cache,rs(n,yi,l),l!==p.cache&&th(n,[yi],a,!0),hl(),l=T.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:T.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=fE(t,n,l,a);break e}else if(l!==d){d=Pi(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),il(d),n=fE(t,n,l,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(ei=us(t.firstChild),dn=n,mt=!0,xl=null,ga=!1,ms=null,Dr=!0,t=AA(n,null,l,a),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling}else{if(tl(),l===d){n=ra(t,n,a);break e}Ui(t,n,l,a)}n=n.child}return n;case 26:return Em(t,n),t===null?(t=PC(n.type,null,n.pendingProps,null))?n.memoizedState=t:mt||(t=n.type,a=n.pendingProps,l=ye(oo.current),l=Lm(l).createElement(t),l[Zi]=n,l[kn]=a,qi(l,t,a),X(l),n.stateNode=l):n.memoizedState=PC(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Ce(n),t===null&&mt&&(l=ye(oo.current),d=ce(),l=n.stateNode=IC(n.type,n.pendingProps,l,d,!1),ga||(d=CC(l,n.type,n.pendingProps,d),d!==null&&(dr(n,0).serverProps=d)),dn=n,Dr=!0,d=ei,so(n.type)?(x_=d,ei=us(l.firstChild)):ei=d),Ui(t,n,n.pendingProps.children,a),Em(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&mt&&(p=ce(),l=Ha(n.type,p.ancestorInfo),d=ei,(T=!d)||(T=NM(d,n.type,n.pendingProps,Dr),T!==null?(n.stateNode=T,ga||(p=CC(T,n.type,n.pendingProps,p),p!==null&&(dr(n,0).serverProps=p)),dn=n,ei=us(T.firstChild),Dr=!1,p=!0):p=!1,T=!p),T&&(l&&Zd(n,d),Zr(n))),Ce(n),d=n.type,p=n.pendingProps,T=t!==null?t.memoizedProps:null,l=p.children,Gv(d,p)?l=null:T!==null&&Gv(d,T)&&(n.flags|=32),n.memoizedState!==null&&(d=mh(t,n,pr,null,null,a),kf._currentValue=d),Em(t,n),Ui(t,n,l,a),n.child;case 6:return t===null&&mt&&(t=n.pendingProps,a=ce(),l=a.ancestorInfo.current,t=l!=null?ks(t,l.tag,a.ancestorInfo.implicitRootScope):!0,a=ei,(l=!a)||(l=PM(a,n.pendingProps,Dr),l!==null?(n.stateNode=l,dn=n,ei=null,l=!0):l=!1,l=!l),l&&(t&&Zd(n,a),Zr(n))),null;case 13:return pE(t,n,a);case 4:return pe(n,n.stateNode.containerInfo),l=n.pendingProps,t===null?n.child=Ic(n,null,l,a):Ui(t,n,l,a),n.child;case 11:return aE(t,n,n.type,n.pendingProps,a);case 7:return Ui(t,n,n.pendingProps,a),n.child;case 8:return Ui(t,n,n.pendingProps.children,a),n.child;case 12:return n.flags|=4,n.flags|=2048,l=n.stateNode,l.effectDuration=-0,l.passiveEffectDuration=-0,Ui(t,n,n.pendingProps.children,a),n.child;case 10:return l=n.type,d=n.pendingProps,p=d.value,"value"in d||$A||($A=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),rs(n,l,p),Ui(t,n,d.children,a),n.child;case 9:return d=n.type._context,l=n.pendingProps.children,typeof l!="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."),hr(n),d=qt(d),ut(n),l=Yb(l,d,void 0),ft(),n.flags|=1,Ui(t,n,l,a),n.child;case 14:return oE(t,n,n.type,n.pendingProps,a);case 15:return lE(t,n,n.type,n.pendingProps,a);case 19:return yE(t,n,a);case 31:return l=n.pendingProps,a=n.mode,l={mode:l.mode,children:l.children},t===null?(t=Cm(l,a),t.ref=n.ref,n.child=t,t.return=n,n=t):(t=Ms(t.child,l),t.ref=n.ref,n.child=t,t.return=n,n=t),n;case 22:return uE(t,n,a);case 24:return hr(n),l=qt(yi),t===null?(d=sh(),d===null&&(d=Pt,p=ih(),d.pooledCache=p,ea(p),p!==null&&(d.pooledCacheLanes|=a),d=p),n.memoizedState={parent:l,cache:d},cl(n),rs(n,yi,d)):(t.lanes&a&&(ch(t,n),fl(n,null,null,a),hl()),d=t.memoizedState,p=n.memoizedState,d.parent!==l?(d={parent:l,cache:l},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),rs(n,yi,l)):(l=p.cache,rs(n,yi,l),l!==d.cache&&th(n,[yi],a,!0))),Ui(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 aa(t){t.flags|=4}function vE(t,n){if(n.type!=="stylesheet"||(n.state.loading&_s)!==Ul)t.flags&=-16777217;else if(t.flags|=16777216,!HC(n)){if(n=bs.current,n!==null&&((rt&4194048)===rt?Or!==null:(rt&62914560)!==rt&&!(rt&536870912)||n!==Or))throw cf=Fb,tA;t.flags|=8192}}function wm(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Ei():536870912,t.lanes|=n,Ml|=n)}function kh(t,n){if(!mt)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 l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function Gt(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,l=0;if(n)if((t.mode&Hi)!==Ft){for(var d=t.selfBaseDuration,p=t.child;p!==null;)a|=p.lanes|p.childLanes,l|=p.subtreeFlags&65011712,l|=p.flags&65011712,d+=p.treeBaseDuration,p=p.sibling;t.treeBaseDuration=d}else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=t,d=d.sibling;else if((t.mode&Hi)!==Ft){d=t.actualDuration,p=t.selfBaseDuration;for(var T=t.child;T!==null;)a|=T.lanes|T.childLanes,l|=T.subtreeFlags,l|=T.flags,d+=T.actualDuration,p+=T.treeBaseDuration,T=T.sibling;t.actualDuration=d,t.treeBaseDuration=p}else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=l,t.childLanes=a,n}function J5(t,n,a){var l=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 Gt(n),null;case 1:return Gt(n),null;case 3:return a=n.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Zt(yi,n),He(n),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&($a(n)?(eh(),aa(n)):t===null||t.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Jd())),Gt(n),null;case 26:return a=n.memoizedState,t===null?(aa(n),a!==null?(Gt(n),vE(n,a)):(Gt(n),n.flags&=-16777217)):a?a!==t.memoizedState?(aa(n),Gt(n),vE(n,a)):(Gt(n),n.flags&=-16777217):(t.memoizedProps!==l&&aa(n),Gt(n),n.flags&=-16777217),null;case 27:Oe(n),a=ye(oo.current);var d=n.type;if(t!==null&&n.stateNode!=null)t.memoizedProps!==l&&aa(n);else{if(!l){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 Gt(n),null}t=ce(),$a(n)?rm(n):(t=IC(d,l,a,t,!0),n.stateNode=t,aa(n))}return Gt(n),null;case 5:if(Oe(n),a=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==l&&aa(n);else{if(!l){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 Gt(n),null}if(d=ce(),$a(n))rm(n);else{switch(t=ye(oo.current),Ha(a,d.ancestorInfo),d=d.context,t=Lm(t),d){case Gc:t=t.createElementNS(mc,a);break;case Dg:t=t.createElementNS(Xm,a);break;default:switch(a){case"svg":t=t.createElementNS(mc,a);break;case"math":t=t.createElementNS(Xm,a);break;case"script":t=t.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?t.createElement("select",{is:l.is}):t.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?t.createElement(a,{is:l.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]"||da.call(cD,a)||(cD[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[Zi]=n,t[kn]=l;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(qi(t,a,l),a){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&aa(n)}}return Gt(n),n.flags&=-16777217,null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==l&&aa(n);else{if(typeof l!="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=ye(oo.current),a=ce(),$a(n)){t=n.stateNode,a=n.memoizedProps,d=!ga,l=null;var p=dn;if(p!==null)switch(p.tag){case 3:d&&(d=RC(t,a,l),d!==null&&(dr(n,0).serverProps=d));break;case 27:case 5:l=p.memoizedProps,d&&(d=RC(t,a,l),d!==null&&(dr(n,0).serverProps=d))}t[Zi]=n,t=!!(t.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||_C(t.nodeValue,a)),t||Zr(n)}else d=a.ancestorInfo.current,d!=null&&ks(l,d.tag,a.ancestorInfo.implicitRootScope),t=Lm(t).createTextNode(l),t[Zi]=n,n.stateNode=t}return Gt(n),null;case 13:if(l=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=$a(n),l!==null&&l.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[Zi]=n,Gt(n),(n.mode&Hi)!==Ft&&l!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration))}else eh(),tl(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4,Gt(n),(n.mode&Hi)!==Ft&&l!==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?(sa(n),n):(sa(n),null)}return sa(n),n.flags&128?(n.lanes=a,(n.mode&Hi)!==Ft&&Ns(n),n):(a=l!==null,t=t!==null&&t.memoizedState!==null,a&&(l=n.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),wm(n,n.updateQueue),Gt(n),(n.mode&Hi)!==Ft&&a&&(t=n.child,t!==null&&(n.treeBaseDuration-=t.treeBaseDuration)),null);case 4:return He(n),t===null&&qv(n.stateNode.containerInfo),Gt(n),null;case 10:return Zt(n.type,n),Gt(n),null;case 19:if(he(bi,n),d=n.memoizedState,d===null)return Gt(n),null;if(l=(n.flags&128)!==0,p=d.rendering,p===null)if(l)kh(d,!1);else{if(ti!==_a||t!==null&&t.flags&128)for(t=n.child;t!==null;){if(p=Sm(t),p!==null){for(n.flags|=128,kh(d,!1),t=p.updateQueue,n.updateQueue=t,wm(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)Gu(a,t),a=a.sibling;return be(bi,bi.current&Nc|pf,n),n.child}t=t.sibling}d.tail!==null&&xr()>gg&&(n.flags|=128,l=!0,kh(d,!1),n.lanes=4194304)}else{if(!l)if(t=Sm(p),t!==null){if(n.flags|=128,l=!0,t=t.updateQueue,n.updateQueue=t,wm(n,t),kh(d,!0),d.tail===null&&d.tailMode==="hidden"&&!p.alternate&&!mt)return Gt(n),null}else 2*xr()-d.renderingStartTime>gg&&a!==536870912&&(n.flags|=128,l=!0,kh(d,!1),n.lanes=4194304);d.isBackwards?(p.sibling=n.child,n.child=p):(t=d.last,t!==null?t.sibling=p:n.child=p,d.last=p)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=xr(),t.sibling=null,a=bi.current,a=l?a&Nc|pf:a&Nc,be(bi,a,n),t):(Gt(n),null);case 22:case 23:return sa(n),fh(n),l=n.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?a&536870912&&!(n.flags&128)&&(Gt(n),n.subtreeFlags&6&&(n.flags|=8192)):Gt(n),a=n.updateQueue,a!==null&&wm(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==a&&(n.flags|=2048),t!==null&&he(wl,n),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Zt(yi,n),Gt(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 eM(t,n){switch(Kd(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&Hi)!==Ft&&Ns(n),n):null;case 3:return Zt(yi,n),He(n),t=n.flags,t&65536&&!(t&128)?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Oe(n),null;case 13:if(sa(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&Hi)!==Ft&&Ns(n),n):null;case 19:return he(bi,n),null;case 4:return He(n),null;case 10:return Zt(n.type,n),null;case 22:case 23:return sa(n),fh(n),t!==null&&he(wl,n),t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&Hi)!==Ft&&Ns(n),n):null;case 24:return Zt(yi,n),null;case 25:return null;default:return null}}function bE(t,n){switch(Kd(n),n.tag){case 3:Zt(yi,n),He(n);break;case 26:case 27:case 5:Oe(n);break;case 4:He(n);break;case 13:sa(n);break;case 19:he(bi,n);break;case 10:Zt(n.type,n);break;case 22:case 23:sa(n),fh(n),t!==null&&he(wl,n);break;case 24:Zt(yi,n)}}function yr(t){return(t.mode&Hi)!==Ft}function _E(t,n){yr(t)?(yt(),Oh(n,t),Qi()):Oh(n,t)}function Tv(t,n,a){yr(t)?(yt(),tc(a,t,n),Qi()):tc(a,t,n)}function Oh(t,n){try{var a=n.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var d=l.next;a=d;do{if((a.tag&t)===t&&((t&vi)!==gs?Ae!==null&&typeof Ae.markComponentPassiveEffectMountStarted=="function"&&Ae.markComponentPassiveEffectMountStarted(n):(t&ji)!==gs&&Ae!==null&&typeof Ae.markComponentLayoutEffectMountStarted=="function"&&Ae.markComponentLayoutEffectMountStarted(n),l=void 0,(t&hn)!==gs&&(Vc=!0),l=Ne(n,b6,a),(t&hn)!==gs&&(Vc=!1),(t&vi)!==gs?Ae!==null&&typeof Ae.markComponentPassiveEffectMountStopped=="function"&&Ae.markComponentPassiveEffectMountStopped():(t&ji)!==gs&&Ae!==null&&typeof Ae.markComponentLayoutEffectMountStopped=="function"&&Ae.markComponentLayoutEffectMountStopped(),l!==void 0&&typeof l!="function")){var p=void 0;p=a.tag&ji?"useLayoutEffect":a.tag&hn?"useInsertionEffect":"useEffect";var T=void 0;T=l===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof l.then=="function"?`
It looks like you wrote `+p+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
`+p+`(() => {
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: "+l,Ne(n,function(C,O){console.error("%s must not return anything besides a function, which is used for clean-up.%s",C,O)},p,T)}a=a.next}while(a!==d)}}catch(C){Mt(n,n.return,C)}}function tc(t,n,a){try{var l=n.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var p=d.next;l=p;do{if((l.tag&t)===t){var T=l.inst,C=T.destroy;C!==void 0&&(T.destroy=void 0,(t&vi)!==gs?Ae!==null&&typeof Ae.markComponentPassiveEffectUnmountStarted=="function"&&Ae.markComponentPassiveEffectUnmountStarted(n):(t&ji)!==gs&&Ae!==null&&typeof Ae.markComponentLayoutEffectUnmountStarted=="function"&&Ae.markComponentLayoutEffectUnmountStarted(n),(t&hn)!==gs&&(Vc=!0),d=n,Ne(d,_6,d,a,C),(t&hn)!==gs&&(Vc=!1),(t&vi)!==gs?Ae!==null&&typeof Ae.markComponentPassiveEffectUnmountStopped=="function"&&Ae.markComponentPassiveEffectUnmountStopped():(t&ji)!==gs&&Ae!==null&&typeof Ae.markComponentLayoutEffectUnmountStopped=="function"&&Ae.markComponentLayoutEffectUnmountStopped())}l=l.next}while(l!==p)}}catch(O){Mt(n,n.return,O)}}function TE(t,n){yr(t)?(yt(),Oh(n,t),Qi()):Oh(n,t)}function Sv(t,n,a){yr(t)?(yt(),tc(a,t,n),Qi()):tc(a,t,n)}function SE(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;t.type.defaultProps||"ref"in t.memoizedProps||Bc||(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.",te(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.",te(t)||"instance"));try{Ne(t,lm,n,a)}catch(l){Mt(t,t.return,l)}}}function tM(t,n,a){return t.getSnapshotBeforeUpdate(n,a)}function iM(t,n){var a=n.memoizedProps,l=n.memoizedState;n=t.stateNode,t.type.defaultProps||"ref"in t.memoizedProps||Bc||(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.",te(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.",te(t)||"instance"));try{var d=vl(t.type,a,t.elementType===t.type),p=Ne(t,tM,n,d,l);a=GA,p!==void 0||a.has(t.type)||(a.add(t.type),Ne(t,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",te(t))})),n.__reactInternalSnapshotBeforeUpdate=p}catch(T){Mt(t,t.return,T)}}function xE(t,n,a){a.props=vl(t.type,t.memoizedProps),a.state=t.memoizedState,yr(t)?(yt(),Ne(t,bA,t,n,a),Qi()):Ne(t,bA,t,n,a)}function nM(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(yr(t))try{yt(),t.refCleanup=n(a)}finally{Qi()}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().",te(t)),n.current=a}}function Rh(t,n){try{Ne(t,nM,t)}catch(a){Mt(t,n,a)}}function vr(t,n){var a=t.ref,l=t.refCleanup;if(a!==null)if(typeof l=="function")try{if(yr(t))try{yt(),Ne(t,l)}finally{Qi(t)}else Ne(t,l)}catch(d){Mt(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{if(yr(t))try{yt(),Ne(t,a,null)}finally{Qi(t)}else Ne(t,a,null)}catch(d){Mt(t,n,d)}else a.current=null}function EE(t,n,a,l){var d=t.memoizedProps,p=d.id,T=d.onCommit;d=d.onRender,n=n===null?"mount":"update",sg&&(n="nested-update"),typeof d=="function"&&d(p,n,t.actualDuration,t.treeBaseDuration,t.actualStartTime,a),typeof T=="function"&&T(t.memoizedProps.id,n,l,a)}function sM(t,n,a,l){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,l,a)}function CE(t){var n=t.type,a=t.memoizedProps,l=t.stateNode;try{Ne(t,wM,l,n,a,t)}catch(d){Mt(t,t.return,d)}}function xv(t,n,a){try{Ne(t,AM,t.stateNode,t.type,a,n,t)}catch(l){Mt(t,t.return,l)}}function wE(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&so(t.type)||t.tag===4}function Ev(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 Cv(t,n,a){var l=t.tag;if(l===5||l===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=Mm));else if(l!==4&&(l===27&&so(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(Cv(t,n,a),t=t.sibling;t!==null;)Cv(t,n,a),t=t.sibling}function Am(t,n,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(l!==4&&(l===27&&so(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Am(t,n,a),t=t.sibling;t!==null;)Am(t,n,a),t=t.sibling}function rM(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=Ev(t),Am(t,a,n);break;case 5:a=n.stateNode,n.flags&32&&(DC(a),n.flags&=-33),n=Ev(t),Am(t,n,a);break;case 3:case 4:n=n.stateNode.containerInfo,a=Ev(t),Cv(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 AE(t){var n=t.stateNode,a=t.memoizedProps;try{Ne(t,FM,t.type,a,n,t)}catch(l){Mt(t,t.return,l)}}function aM(t,n){if(t=t.containerInfo,__=Mg,t=Jo(t),ju(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var d=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var T=0,C=-1,O=-1,I=0,Z=0,re=t,Q=null;t:for(;;){for(var ae;re!==a||d!==0&&re.nodeType!==3||(C=T+d),re!==p||l!==0&&re.nodeType!==3||(O=T+l),re.nodeType===3&&(T+=re.nodeValue.length),(ae=re.firstChild)!==null;)Q=re,re=ae;for(;;){if(re===t)break t;if(Q===a&&++I===d&&(C=T),Q===p&&++Z===l&&(O=T),(ae=re.nextSibling)!==null)break;re=Q,Q=re.parentNode}re=ae}a=C===-1||O===-1?null:{start:C,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(T_={focusedElem:t,selectionRange:a},Mg=!1,Oi=n;Oi!==null;)if(n=Oi,t=n.child,(n.subtreeFlags&1024)!==0&&t!==null)t.return=n,Oi=t;else for(;Oi!==null;){switch(t=n=Oi,a=t.alternate,d=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:d&1024&&a!==null&&iM(t,a);break;case 3:if(d&1024){if(t=t.stateNode.containerInfo,a=t.nodeType,a===9)Yv(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Yv(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,Oi=t;break}Oi=n.return}}function DE(t,n,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:la(t,a),l&4&&_E(a,ji|ys);break;case 1:if(la(t,a),l&4)if(t=a.stateNode,n===null)a.type.defaultProps||"ref"in a.memoizedProps||Bc||(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.",te(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.",te(a)||"instance")),yr(a)?(yt(),Ne(a,Xb,a,t),Qi()):Ne(a,Xb,a,t);else{var d=vl(a.type,n.memoizedProps);n=n.memoizedState,a.type.defaultProps||"ref"in a.memoizedProps||Bc||(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.",te(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.",te(a)||"instance")),yr(a)?(yt(),Ne(a,gA,a,t,d,n,t.__reactInternalSnapshotBeforeUpdate),Qi()):Ne(a,gA,a,t,d,n,t.__reactInternalSnapshotBeforeUpdate)}l&64&&SE(a),l&512&&Rh(a,a.return);break;case 3:if(n=Is(),la(t,a),l&64&&(l=a.updateQueue,l!==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{Ne(a,lm,l,d)}catch(T){Mt(a,a.return,T)}}t.effectDuration+=al(n);break;case 27:n===null&&l&4&&AE(a);case 26:case 5:la(t,a),n===null&&l&4&&CE(a),l&512&&Rh(a,a.return);break;case 12:if(l&4){l=Is(),la(t,a),t=a.stateNode,t.effectDuration+=ol(l);try{Ne(a,EE,a,n,ng,t.effectDuration)}catch(T){Mt(a,a.return,T)}}else la(t,a);break;case 13:la(t,a),l&4&&RE(t,a),l&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=mM.bind(null,a),BM(t,a))));break;case 22:if(l=a.memoizedState!==null||ba,!l){n=n!==null&&n.memoizedState!==null||oi,d=ba;var p=oi;ba=l,(oi=n)&&!p?ua(t,a,(a.subtreeFlags&8772)!==0):la(t,a),ba=d,oi=p}break;case 30:break;default:la(t,a)}}function kE(t){var n=t.alternate;n!==null&&(t.alternate=null,kE(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&tr(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 oa(t,n,a){for(a=a.child;a!==null;)OE(t,n,a),a=a.sibling}function OE(t,n,a){if(Ki&&typeof Ki.onCommitFiberUnmount=="function")try{Ki.onCommitFiberUnmount(fc,a)}catch(p){Er||(Er=!0,console.error("React instrumentation encountered an error: %s",p))}switch(a.tag){case 26:oi||vr(a,n),oa(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:oi||vr(a,n);var l=pi,d=Rn;so(a.type)&&(pi=a.stateNode,Rn=!1),oa(t,n,a),Ne(a,Uh,a.stateNode),pi=l,Rn=d;break;case 5:oi||vr(a,n);case 6:if(l=pi,d=Rn,pi=null,oa(t,n,a),pi=l,Rn=d,pi!==null)if(Rn)try{Ne(a,OM,pi,a.stateNode)}catch(p){Mt(a,n,p)}else try{Ne(a,kM,pi,a.stateNode)}catch(p){Mt(a,n,p)}break;case 18:pi!==null&&(Rn?(t=pi,kC(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),jh(t)):kC(pi,a.stateNode));break;case 4:l=pi,d=Rn,pi=a.stateNode.containerInfo,Rn=!0,oa(t,n,a),pi=l,Rn=d;break;case 0:case 11:case 14:case 15:oi||tc(hn,a,n),oi||Tv(a,n,ji),oa(t,n,a);break;case 1:oi||(vr(a,n),l=a.stateNode,typeof l.componentWillUnmount=="function"&&xE(a,n,l)),oa(t,n,a);break;case 21:oa(t,n,a);break;case 22:oi=(l=oi)||a.memoizedState!==null,oa(t,n,a),oi=l;break;default:oa(t,n,a)}}function RE(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ne(n,qM,t)}catch(a){Mt(n,n.return,a)}}function oM(t){switch(t.tag){case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new YA),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new YA),n;default:throw Error("Unexpected Suspense handler tag ("+t.tag+"). This is a bug in React.")}}function wv(t,n){var a=oM(t);n.forEach(function(l){var d=gM.bind(null,t,l);if(!a.has(l)){if(a.add(l),Ps)if(Uc!==null&&qc!==null)Nh(qc,Uc);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");l.then(d,d)}})}function $n(t,n){var a=n.deletions;if(a!==null)for(var l=0;l<a.length;l++){var d=t,p=n,T=a[l],C=p;e:for(;C!==null;){switch(C.tag){case 27:if(so(C.type)){pi=C.stateNode,Rn=!1;break e}break;case 5:pi=C.stateNode,Rn=!1;break e;case 3:case 4:pi=C.stateNode.containerInfo,Rn=!0;break e}C=C.return}if(pi===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");OE(d,p,T),pi=null,Rn=!1,d=T,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)ME(n,t),n=n.sibling}function ME(t,n){var a=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:$n(n,t),Gn(t),l&4&&(tc(hn|ys,t,t.return),Oh(hn|ys,t),Tv(t,t.return,ji|ys));break;case 1:$n(n,t),Gn(t),l&512&&(oi||a===null||vr(a,a.return)),l&64&&ba&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var d=Fs;if($n(n,t),Gn(t),l&512&&(oi||a===null||vr(a,a.return)),l&4)if(n=a!==null?a.memoizedState:null,l=t.memoizedState,a===null)if(l===null)if(t.stateNode===null){e:{l=t.type,a=t.memoizedProps,n=d.ownerDocument||d;t:switch(l){case"title":d=n.getElementsByTagName("title")[0],(!d||d[$h]||d[Zi]||d.namespaceURI===mc||d.hasAttribute("itemprop"))&&(d=n.createElement(l),n.head.insertBefore(d,n.querySelector("head > title"))),qi(d,l,a),d[Zi]=t,X(d),l=d;break e;case"link":var p=qC("link","href",n).get(l+(a.href||""));if(p){for(var T=0;T<p.length;T++)if(d=p[T],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)){p.splice(T,1);break t}}d=n.createElement(l),qi(d,l,a),n.head.appendChild(d);break;case"meta":if(p=qC("meta","content",n).get(l+(a.content||""))){for(T=0;T<p.length;T++)if(d=p[T],ve(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)){p.splice(T,1);break t}}d=n.createElement(l),qi(d,l,a),n.head.appendChild(d);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+l+'". This is a bug in React.')}d[Zi]=t,X(d),l=d}t.stateNode=l}else FC(d,t.type,t.stateNode);else t.stateNode=UC(d,l,t.memoizedProps);else n!==l?(n===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):n.count--,l===null?FC(d,t.type,t.stateNode):UC(d,l,t.memoizedProps)):l===null&&t.stateNode!==null&&xv(t,t.memoizedProps,a.memoizedProps);break;case 27:$n(n,t),Gn(t),l&512&&(oi||a===null||vr(a,a.return)),a!==null&&l&4&&xv(t,t.memoizedProps,a.memoizedProps);break;case 5:if($n(n,t),Gn(t),l&512&&(oi||a===null||vr(a,a.return)),t.flags&32){n=t.stateNode;try{Ne(t,DC,n)}catch(Z){Mt(t,t.return,Z)}}l&4&&t.stateNode!=null&&(n=t.memoizedProps,xv(t,n,a!==null?a.memoizedProps:n)),l&1024&&(t_=!0,t.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if($n(n,t),Gn(t),l&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.");l=t.memoizedProps,a=a!==null?a.memoizedProps:l,n=t.stateNode;try{Ne(t,DM,n,a,l)}catch(Z){Mt(t,t.return,Z)}}break;case 3:if(d=Is(),kg=null,p=Fs,Fs=Im(n.containerInfo),$n(n,t),Fs=p,Gn(t),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Ne(t,UM,n.containerInfo)}catch(Z){Mt(t,t.return,Z)}t_&&(t_=!1,LE(t)),n.effectDuration+=al(d);break;case 4:l=Fs,Fs=Im(t.stateNode.containerInfo),$n(n,t),Gn(t),Fs=l;break;case 12:l=Is(),$n(n,t),Gn(t),t.stateNode.effectDuration+=ol(l);break;case 13:$n(n,t),Gn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(o_=xr()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,wv(t,l)));break;case 22:d=t.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,O=ba,I=oi;if(ba=O||d,oi=I||C,$n(n,t),oi=I,ba=O,Gn(t),l&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&~Jm:n._visibility|Jm,d&&(a===null||C||ba||oi||bl(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){C=a=n;try{p=C.stateNode,d?Ne(C,RM,p):Ne(C,LM,C.stateNode,C.memoizedProps)}catch(Z){Mt(C,C.return,Z)}}}else if(n.tag===6){if(a===null){C=n;try{T=C.stateNode,d?Ne(C,MM,T):Ne(C,IM,T,C.memoizedProps)}catch(Z){Mt(C,C.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}l&4&&(l=t.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,wv(t,a))));break;case 19:$n(n,t),Gn(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,wv(t,l)));break;case 30:break;case 21:break;default:$n(n,t),Gn(t)}}function Gn(t){var n=t.flags;if(n&2){try{Ne(t,rM,t)}catch(a){Mt(t,t.return,a)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function LE(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;LE(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function la(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)DE(t,n.alternate,n),n=n.sibling}function IE(t){switch(t.tag){case 0:case 11:case 14:case 15:Tv(t,t.return,ji),bl(t);break;case 1:vr(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&xE(t,t.return,n),bl(t);break;case 27:Ne(t,Uh,t.stateNode);case 26:case 5:vr(t,t.return),bl(t);break;case 22:t.memoizedState===null&&bl(t);break;case 30:bl(t);break;default:bl(t)}}function bl(t){for(t=t.child;t!==null;)IE(t),t=t.sibling}function NE(t,n,a,l){var d=a.flags;switch(a.tag){case 0:case 11:case 15:ua(t,a,l),_E(a,ji);break;case 1:if(ua(t,a,l),n=a.stateNode,typeof n.componentDidMount=="function"&&Ne(a,Xb,a,n),n=a.updateQueue,n!==null){t=a.stateNode;try{Ne(a,tv,n,t)}catch(p){Mt(a,a.return,p)}}l&&d&64&&SE(a),Rh(a,a.return);break;case 27:AE(a);case 26:case 5:ua(t,a,l),l&&n===null&&d&4&&CE(a),Rh(a,a.return);break;case 12:if(l&&d&4){d=Is(),ua(t,a,l),l=a.stateNode,l.effectDuration+=ol(d);try{Ne(a,EE,a,n,ng,l.effectDuration)}catch(p){Mt(a,a.return,p)}}else ua(t,a,l);break;case 13:ua(t,a,l),l&&d&4&&RE(t,a);break;case 22:a.memoizedState===null&&ua(t,a,l),Rh(a,a.return);break;case 30:break;default:ua(t,a,l)}}function ua(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;)NE(t,n.alternate,n,a),n=n.sibling}function Av(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&&ea(t),a!=null&&rl(a))}function Dv(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(ea(n),t!=null&&rl(t))}function br(t,n,a,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)PE(t,n,a,l),n=n.sibling}function PE(t,n,a,l){var d=n.flags;switch(n.tag){case 0:case 11:case 15:br(t,n,a,l),d&2048&&TE(n,vi|ys);break;case 1:br(t,n,a,l);break;case 3:var p=Is();br(t,n,a,l),d&2048&&(a=null,n.alternate!==null&&(a=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==a&&(ea(n),a!=null&&rl(a))),t.passiveEffectDuration+=al(p);break;case 12:if(d&2048){d=Is(),br(t,n,a,l),t=n.stateNode,t.passiveEffectDuration+=ol(d);try{Ne(n,sM,n,n.alternate,ng,t.passiveEffectDuration)}catch(C){Mt(n,n.return,C)}}else br(t,n,a,l);break;case 13:br(t,n,a,l);break;case 23:break;case 22:p=n.stateNode;var T=n.alternate;n.memoizedState!==null?p._visibility&fa?br(t,n,a,l):Mh(t,n):p._visibility&fa?br(t,n,a,l):(p._visibility|=fa,ic(t,n,a,l,(n.subtreeFlags&10256)!==0)),d&2048&&Av(T,n);break;case 24:br(t,n,a,l),d&2048&&Dv(n.alternate,n);break;default:br(t,n,a,l)}}function ic(t,n,a,l,d){for(d=d&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;)BE(t,n,a,l,d),n=n.sibling}function BE(t,n,a,l,d){var p=n.flags;switch(n.tag){case 0:case 11:case 15:ic(t,n,a,l,d),TE(n,vi);break;case 23:break;case 22:var T=n.stateNode;n.memoizedState!==null?T._visibility&fa?ic(t,n,a,l,d):Mh(t,n):(T._visibility|=fa,ic(t,n,a,l,d)),d&&p&2048&&Av(n.alternate,n);break;case 24:ic(t,n,a,l,d),d&&p&2048&&Dv(n.alternate,n);break;default:ic(t,n,a,l,d)}}function Mh(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,l=n,d=l.flags;switch(l.tag){case 22:Mh(a,l),d&2048&&Av(l.alternate,l);break;case 24:Mh(a,l),d&2048&&Dv(l.alternate,l);break;default:Mh(a,l)}n=n.sibling}}function nc(t){if(t.subtreeFlags&mf)for(t=t.child;t!==null;)UE(t),t=t.sibling}function UE(t){switch(t.tag){case 26:nc(t),t.flags&mf&&t.memoizedState!==null&&VM(Fs,t.memoizedState,t.memoizedProps);break;case 5:nc(t);break;case 3:case 4:var n=Fs;Fs=Im(t.stateNode.containerInfo),nc(t),Fs=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 qE(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 Lh(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];Oi=l,jE(l,t)}qE(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)FE(t),t=t.sibling}function FE(t){switch(t.tag){case 0:case 11:case 15:Lh(t),t.flags&2048&&Sv(t,t.return,vi|ys);break;case 3:var n=Is();Lh(t),t.stateNode.passiveEffectDuration+=al(n);break;case 12:n=Is(),Lh(t),t.stateNode.passiveEffectDuration+=ol(n);break;case 22:n=t.stateNode,t.memoizedState!==null&&n._visibility&fa&&(t.return===null||t.return.tag!==13)?(n._visibility&=~fa,Dm(t)):Lh(t);break;default:Lh(t)}}function Dm(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];Oi=l,jE(l,t)}qE(t)}for(t=t.child;t!==null;)HE(t),t=t.sibling}function HE(t){switch(t.tag){case 0:case 11:case 15:Sv(t,t.return,vi),Dm(t);break;case 22:var n=t.stateNode;n._visibility&fa&&(n._visibility&=~fa,Dm(t));break;default:Dm(t)}}function jE(t,n){for(;Oi!==null;){var a=Oi,l=a;switch(l.tag){case 0:case 11:case 15:Sv(l,n,vi);break;case 23:case 22:l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(l=l.memoizedState.cachePool.pool,l!=null&&ea(l));break;case 24:rl(l.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Oi=l;else e:for(a=t;Oi!==null;){l=Oi;var d=l.sibling,p=l.return;if(kE(l),l===a){Oi=null;break e}if(d!==null){d.return=p,Oi=d;break e}Oi=p}}}function lM(){S6.forEach(function(t){return t()})}function zE(){var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return t||se.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),t}function Yn(t){if((Tt&fn)!==Qn&&rt!==0)return rt&-rt;var n=se.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(t),t=Cl,t!==0?t:Bv()):Ua()}function VE(){Zn===0&&(Zn=!(rt&536870912)||mt?_e():536870912);var t=bs.current;return t!==null&&(t.flags|=32),Zn}function ai(t,n,a){if(Vc&&console.error("useInsertionEffect must not schedule updates."),h_&&(yg=!0),(t===Pt&&(Ct===Ol||Ct===Rl)||t.cancelPendingCommit!==null)&&(rc(t,0),io(t,rt,Zn,!1)),$t(t,a),Tt&fn&&t===Pt){if(wr)switch(n.tag){case 0:case 11:case 15:t=st&&te(st)||"Unknown",nD.has(t)||(nD.add(t),n=te(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:iD||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),iD=!0)}}else Ps&&jr(t,n,a),vM(n),t===Pt&&((Tt&fn)===Qn&&(vo|=a),ti===kl&&io(t,rt,Zn,!1)),_r(t)}function $E(t,n,a){if((Tt&(fn|Hs))!==Qn)throw Error("Should not already be working.");var l=!a&&(n&124)===0&&(n&t.expiredLanes)===0||dt(t,n),d=l?cM(t,n):Rv(t,n,!0),p=l;do{if(d===_a){jc&&!l&&io(t,n,0,!1);break}else{if(a=t.current.alternate,p&&!uM(a)){d=Rv(t,n,!1),p=!1;continue}if(d===Fc){if(p=n,t.errorRecoveryDisabledLanes&p)var T=0;else T=t.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){n=T;e:{d=t;var C=T;T=Tf;var O=d.current.memoizedState.isDehydrated;if(O&&(rc(d,C).flags|=256),C=Rv(d,C,!1),C!==Fc){if(r_&&!O){d.errorRecoveryDisabledLanes|=p,vo|=p,d=kl;break e}d=pn,pn=T,d!==null&&(pn===null?pn=d:pn.push.apply(pn,d))}d=C}if(p=!1,d!==Fc)continue}}if(d===yf){rc(t,0),io(t,n,0,!0);break}e:{switch(l=t,d){case _a:case yf:throw Error("Root did not complete. This is a bug in React.");case kl:if((n&4194048)!==n)break;case pg:io(l,n,Zn,!go);break e;case Fc:pn=null;break;case i_:case XA:break;default:throw Error("Unknown root exit status.")}if(se.actQueue!==null)Mv(l,a,n,pn,Sf,mg,Zn,vo,Ml);else{if((n&62914560)===n&&(p=o_+QA-xr(),10<p)){if(io(l,n,Zn,!go),Ot(l,0,!0)!==0)break e;l.timeoutHandle=dD(GE.bind(null,l,a,pn,Sf,mg,n,Zn,vo,Ml,go,d,w6,Zw,0),p);break e}GE(l,a,pn,Sf,mg,n,Zn,vo,Ml,go,d,E6,Zw,0)}}}break}while(1);_r(t)}function GE(t,n,a,l,d,p,T,C,O,I,Z,re,Q,ae){if(t.timeoutHandle=Bl,re=n.subtreeFlags,(re&8192||(re&16785408)===16785408)&&(Df={stylesheets:null,count:0,unsuspend:zM},UE(n),re=$M(),re!==null)){t.cancelPendingCommit=re(Mv.bind(null,t,n,p,a,l,d,T,C,O,Z,C6,Q,ae)),io(t,p,T,!I);return}Mv(t,n,p,a,l,d,T,C,O)}function uM(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 l=0;l<a.length;l++){var d=a[l],p=d.getSnapshot;d=d.value;try{if(!cn(p(),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,l){n&=~a_,n&=~vo,t.suspendedLanes|=n,t.pingedLanes&=~n,l&&(t.warmLanes|=n),l=t.expirationTimes;for(var d=n;0<d;){var p=31-ln(d),T=1<<p;l[p]=-1,d&=~T}a!==0&&Hr(t,a,n)}function sc(){return(Tt&(fn|Hs))===Qn?(Ph(0,!1),!1):!0}function kv(){if(st!==null){if(Ct===Mn)var t=st.return;else t=st,ri(),bh(t),Lc=null,ff=0,t=st;for(;t!==null;)bE(t.alternate,t),t=t.return;st=null}}function rc(t,n){var a=t.timeoutHandle;a!==Bl&&(t.timeoutHandle=Bl,q6(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),kv(),Pt=t,st=a=Ms(t.current,null),rt=n,Ct=Mn,Kn=null,go=!1,jc=dt(t,n),r_=!1,ti=_a,Ml=Zn=a_=vo=yo=0,pn=Tf=null,mg=!1,n&8&&(n|=n&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=n;0<l;){var d=31-ln(l),p=1<<d;n|=t[d],l&=~p}return Rr=n,ja(),n=Qw(),1e3<n-Ww&&(se.recentlyCreatedOwnerStacks=0,Ww=n),Us.discardPendingWarnings(),a}function YE(t,n){$e=null,se.H=hg,se.getCurrentStack=null,wr=!1,Wn=null,n===uf||n===og?(n=Ku(),Ct=bf):n===tA?(n=Ku(),Ct=WA):Ct=n===qA?s_:n!==null&&typeof n=="object"&&typeof n.then=="function"?Hc:vf,Kn=n;var a=st;if(a===null)ti=yf,xm(t,Pi(n,t.current));else switch(a.mode&Hi&&Wu(a),ft(),Ct){case vf:Ae!==null&&typeof Ae.markComponentErrored=="function"&&Ae.markComponentErrored(a,n,rt);break;case Ol:case Rl:case bf:case Hc:case _f:Ae!==null&&typeof Ae.markComponentSuspended=="function"&&Ae.markComponentSuspended(a,n,rt)}}function XE(){var t=se.H;return se.H=hg,t===null?hg:t}function WE(){var t=se.A;return se.A=T6,t}function Ov(){ti=kl,go||(rt&4194048)!==rt&&bs.current!==null||(jc=!0),!(yo&134217727)&&!(vo&134217727)||Pt===null||io(Pt,rt,Zn,!1)}function Rv(t,n,a){var l=Tt;Tt|=fn;var d=XE(),p=WE();if(Pt!==t||rt!==n){if(Ps){var T=t.memoizedUpdaters;0<T.size&&(Nh(t,rt),T.clear()),Ba(t,n)}Sf=null,rc(t,n)}Ze(n),n=!1,T=ti;e:do try{if(Ct!==Mn&&st!==null){var C=st,O=Kn;switch(Ct){case s_:kv(),T=pg;break e;case bf:case Ol:case Rl:case Hc:bs.current===null&&(n=!0);var I=Ct;if(Ct=Mn,Kn=null,ac(t,C,O,I),a&&jc){T=_a;break e}break;default:I=Ct,Ct=Mn,Kn=null,ac(t,C,O,I)}}QE(),T=ti;break}catch(Z){YE(t,Z)}while(1);return n&&t.shellSuspendCounter++,ri(),Tt=l,se.H=d,se.A=p,pt(),st===null&&(Pt=null,rt=0,ja()),T}function QE(){for(;st!==null;)KE(st)}function cM(t,n){var a=Tt;Tt|=fn;var l=XE(),d=WE();if(Pt!==t||rt!==n){if(Ps){var p=t.memoizedUpdaters;0<p.size&&(Nh(t,rt),p.clear()),Ba(t,n)}Sf=null,gg=xr()+KA,rc(t,n)}else jc=dt(t,n);Ze(n);e:do try{if(Ct!==Mn&&st!==null)t:switch(n=st,p=Kn,Ct){case vf:Ct=Mn,Kn=null,ac(t,n,p,vf);break;case Ol:case Rl:if(oh(p)){Ct=Mn,Kn=null,ZE(n);break}n=function(){Ct!==Ol&&Ct!==Rl||Pt!==t||(Ct=_f),_r(t)},p.then(n,n);break e;case bf:Ct=_f;break e;case WA:Ct=n_;break e;case _f:oh(p)?(Ct=Mn,Kn=null,ZE(n)):(Ct=Mn,Kn=null,ac(t,n,p,_f));break;case n_:var T=null;switch(st.tag){case 26:T=st.memoizedState;case 5:case 27:var C=st;if(!T||HC(T)){Ct=Mn,Kn=null;var O=C.sibling;if(O!==null)st=O;else{var I=C.return;I!==null?(st=I,km(I)):st=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Ct=Mn,Kn=null,ac(t,n,p,n_);break;case Hc:Ct=Mn,Kn=null,ac(t,n,p,Hc);break;case s_:kv(),ti=pg;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}se.actQueue!==null?QE():dM();break}catch(Z){YE(t,Z)}while(1);return ri(),se.H=l,se.A=d,Tt=a,st!==null?(Ae!==null&&typeof Ae.markRenderYielded=="function"&&Ae.markRenderYielded(),_a):(pt(),Pt=null,rt=0,ja(),ti)}function dM(){for(;st!==null&&!oL();)KE(st)}function KE(t){var n=t.alternate;(t.mode&Hi)!==Ft?(ta(t),n=Ne(t,_v,n,t,Rr),Wu(t)):n=Ne(t,_v,n,t,Rr),t.memoizedProps=t.pendingProps,n===null?km(t):st=n}function ZE(t){var n=Ne(t,hM,t);t.memoizedProps=t.pendingProps,n===null?km(t):st=n}function hM(t){var n=t.alternate,a=(t.mode&Hi)!==Ft;switch(a&&ta(t),t.tag){case 15:case 0:n=dE(n,t,t.pendingProps,t.type,void 0,rt);break;case 11:n=dE(n,t,t.pendingProps,t.type.render,t.ref,rt);break;case 5:bh(t);default:bE(n,t),t=st=Gu(t,Rr),n=_v(n,t,Rr)}return a&&Wu(t),n}function ac(t,n,a,l){ri(),bh(n),Lc=null,ff=0;var d=n.return;try{if(K5(t,d,n,a,rt)){ti=yf,xm(t,Pi(a,t.current)),st=null;return}}catch(p){if(d!==null)throw st=d,p;ti=yf,xm(t,Pi(a,t.current)),st=null;return}n.flags&32768?(mt||l===vf?t=!0:jc||rt&536870912?t=!1:(go=t=!0,(l===Ol||l===Rl||l===bf||l===Hc)&&(l=bs.current,l!==null&&l.tag===13&&(l.flags|=16384))),JE(n,t)):km(n)}function km(t){var n=t;do{if(n.flags&32768){JE(n,go);return}var a=n.alternate;if(t=n.return,ta(n),a=Ne(n,J5,a,n,Rr),(n.mode&Hi)!==Ft&&ll(n),a!==null){st=a;return}if(n=n.sibling,n!==null){st=n;return}st=n=t}while(n!==null);ti===_a&&(ti=XA)}function JE(t,n){do{var a=eM(t.alternate,t);if(a!==null){a.flags&=32767,st=a;return}if((t.mode&Hi)!==Ft){ll(t),a=t.actualDuration;for(var l=t.child;l!==null;)a+=l.actualDuration,l=l.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)){st=t;return}st=t=a}while(t!==null);ti=pg,st=null}function Mv(t,n,a,l,d,p,T,C,O){t.cancelPendingCommit=null;do Ih();while(zi!==Ll);if(Us.flushLegacyContextWarning(),Us.flushPendingUnsafeLifecycleWarnings(),(Tt&(fn|Hs))!==Qn)throw Error("Should not already be working.");if(Ae!==null&&typeof Ae.markCommitStarted=="function"&&Ae.markCommitStarted(a),n===null)ke();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(p=n.lanes|n.childLanes,p|=Nb,Ci(t,a,p,T,C,O),t===Pt&&(st=Pt=null,rt=0),zc=n,_o=t,To=a,u_=p,c_=d,tD=l,n.subtreeFlags&10256||n.flags&10256?(t.callbackNode=null,t.callbackPriority=0,yM(hc,function(){return sC(),null})):(t.callbackNode=null,t.callbackPriority=0),ng=Dc(),l=(n.flags&13878)!==0,n.subtreeFlags&13878||l){l=se.T,se.T=null,d=_t.p,_t.p=cs,T=Tt,Tt|=Hs;try{aM(t,n,a)}finally{Tt=T,_t.p=d,se.T=l}}zi=ZA,eC(),tC(),iC()}}function eC(){if(zi===ZA){zi=Ll;var t=_o,n=zc,a=To,l=(n.flags&13878)!==0;if(n.subtreeFlags&13878||l){l=se.T,se.T=null;var d=_t.p;_t.p=cs;var p=Tt;Tt|=Hs;try{Uc=a,qc=t,ME(n,t),qc=Uc=null,a=T_;var T=Jo(t.containerInfo),C=a.focusedElem,O=a.selectionRange;if(T!==C&&C&&C.ownerDocument&&ss(C.ownerDocument.documentElement,C)){if(O!==null&&ju(C)){var I=O.start,Z=O.end;if(Z===void 0&&(Z=I),"selectionStart"in C)C.selectionStart=I,C.selectionEnd=Math.min(Z,C.value.length);else{var re=C.ownerDocument||document,Q=re&&re.defaultView||window;if(Q.getSelection){var ae=Q.getSelection(),Le=C.textContent.length,Ve=Math.min(O.start,Le),Bt=O.end===void 0?Ve:Math.min(O.end,Le);!ae.extend&&Ve>Bt&&(T=Bt,Bt=Ve,Ve=T);var lt=wn(C,Ve),F=wn(C,Bt);if(lt&&F&&(ae.rangeCount!==1||ae.anchorNode!==lt.node||ae.anchorOffset!==lt.offset||ae.focusNode!==F.node||ae.focusOffset!==F.offset)){var H=re.createRange();H.setStart(lt.node,lt.offset),ae.removeAllRanges(),Ve>Bt?(ae.addRange(H),ae.extend(F.node,F.offset)):(H.setEnd(F.node,F.offset),ae.addRange(H))}}}}for(re=[],ae=C;ae=ae.parentNode;)ae.nodeType===1&&re.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<re.length;C++){var V=re[C];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Mg=!!__,T_=__=null}finally{Tt=p,_t.p=d,se.T=l}}t.current=n,zi=JA}}function tC(){if(zi===JA){zi=Ll;var t=_o,n=zc,a=To,l=(n.flags&8772)!==0;if(n.subtreeFlags&8772||l){l=se.T,se.T=null;var d=_t.p;_t.p=cs;var p=Tt;Tt|=Hs;try{Ae!==null&&typeof Ae.markLayoutEffectsStarted=="function"&&Ae.markLayoutEffectsStarted(a),Uc=a,qc=t,DE(t,n.alternate,n),qc=Uc=null,Ae!==null&&typeof Ae.markLayoutEffectsStopped=="function"&&Ae.markLayoutEffectsStopped()}finally{Tt=p,_t.p=d,se.T=l}}zi=eD}}function iC(){if(zi===A6||zi===eD){zi=Ll,lL();var t=_o,n=zc,a=To,l=tD,d=(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;d?zi=l_:(zi=Ll,zc=_o=null,nC(t,t.pendingLanes),Il=0,Ef=null);var p=t.pendingLanes;if(p===0&&(bo=null),d||lC(t),d=zr(a),n=n.stateNode,Ki&&typeof Ki.onCommitFiberRoot=="function")try{var T=(n.current.flags&128)===128;switch(d){case cs:var C=fb;break;case Cr:C=pb;break;case ha:C=hc;break;case Gm:C=mb;break;default:C=hc}Ki.onCommitFiberRoot(fc,n,C,T)}catch(re){Er||(Er=!0,console.error("React instrumentation encountered an error: %s",re))}if(Ps&&t.memoizedUpdaters.clear(),lM(),l!==null){T=se.T,C=_t.p,_t.p=cs,se.T=null;try{var O=t.onRecoverableError;for(n=0;n<l.length;n++){var I=l[n],Z=fM(I.stack);Ne(I.source,O,I.value,Z)}}finally{se.T=T,_t.p=C}}To&3&&Ih(),_r(t),p=t.pendingLanes,a&4194090&&p&42?(rg=!0,t===d_?xf++:(xf=0,d_=t)):xf=0,Ph(0,!1),ke()}}function fM(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 nC(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,rl(n)))}function Ih(t){return eC(),tC(),iC(),sC()}function sC(){if(zi!==l_)return!1;var t=_o,n=u_;u_=0;var a=zr(To),l=ha>a?ha:a;a=se.T;var d=_t.p;try{_t.p=l,se.T=null,l=c_,c_=null;var p=_o,T=To;if(zi=Ll,zc=_o=null,To=0,(Tt&(fn|Hs))!==Qn)throw Error("Cannot flush passive effects while already rendering.");h_=!0,yg=!1,Ae!==null&&typeof Ae.markPassiveEffectsStarted=="function"&&Ae.markPassiveEffectsStarted(T);var C=Tt;if(Tt|=Hs,FE(p.current),PE(p,p.current,T,l),Ae!==null&&typeof Ae.markPassiveEffectsStopped=="function"&&Ae.markPassiveEffectsStopped(),lC(p),Tt=C,Ph(0,!1),yg?p===Ef?Il++:(Il=0,Ef=p):Il=0,yg=h_=!1,Ki&&typeof Ki.onPostCommitFiberRoot=="function")try{Ki.onPostCommitFiberRoot(fc,p)}catch(I){Er||(Er=!0,console.error("React instrumentation encountered an error: %s",I))}var O=p.current.stateNode;return O.effectDuration=0,O.passiveEffectDuration=0,!0}finally{_t.p=d,se.T=a,nC(t,n)}}function rC(t,n,a){n=Pi(a,n),n=uv(t.stateNode,n,2),t=fr(t,n,2),t!==null&&($t(t,2),_r(t))}function Mt(t,n,a){if(Vc=!1,t.tag===3)rC(t,t,a);else{for(;n!==null;){if(n.tag===3){rC(n,t,a);return}if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(bo===null||!bo.has(l))){t=Pi(a,t),a=cv(2),l=fr(n,a,2),l!==null&&(dv(a,l,n,t),$t(l,2),_r(l));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 Lv(t,n,a){var l=t.pingCache;if(l===null){l=t.pingCache=new x6;var d=new Set;l.set(n,d)}else d=l.get(n),d===void 0&&(d=new Set,l.set(n,d));d.has(a)||(r_=!0,d.add(a),l=pM.bind(null,t,n,a),Ps&&Nh(t,a),n.then(l,l))}function pM(t,n,a){var l=t.pingCache;l!==null&&l.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,zE()&&se.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`),Pt===t&&(rt&a)===a&&(ti===kl||ti===i_&&(rt&62914560)===rt&&xr()-o_<QA?(Tt&fn)===Qn&&rc(t,0):a_|=a,Ml===rt&&(Ml=0)),_r(t)}function aC(t,n){n===0&&(n=Ei()),t=mi(t,n),t!==null&&($t(t,n),_r(t))}function mM(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),aC(t,a)}function gM(t,n){var a=0;switch(t.tag){case 13:var l=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}l!==null&&l.delete(n),aC(t,a)}function Iv(t,n,a){if(n.subtreeFlags&67117056)for(n=n.child;n!==null;){var l=t,d=n,p=d.type===Hm;p=a||p,d.tag!==22?d.flags&67108864?p&&Ne(d,oC,l,d,(d.mode&Gw)===Ft):Iv(l,d,p):d.memoizedState===null&&(p&&d.flags&8192?Ne(d,oC,l,d):d.subtreeFlags&67108864&&Ne(d,Iv,l,d,p)),n=n.sibling}}function oC(t,n){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;at(!0);try{IE(n),a&&HE(n),NE(t,n.alternate,n,!1),a&&BE(t,n,0,null,!1,0)}finally{at(!1)}}function lC(t){var n=!0;t.current.mode&(Ji|Bs)||(n=!1),Iv(t,t.current,n)}function uC(t){if((Tt&fn)===Qn){var n=t.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=te(t)||"ReactComponent",vg!==null){if(vg.has(n))return;vg.add(n)}else vg=new Set([n]);Ne(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 Nh(t,n){Ps&&t.memoizedUpdaters.forEach(function(a){jr(t,a,n)})}function yM(t,n){var a=se.actQueue;return a!==null?(a.push(n),O6):hb(t,n)}function vM(t){zE()&&se.actQueue===null&&Ne(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`,te(t))})}function _r(t){t!==$c&&t.next===null&&($c===null?bg=$c=t:$c=$c.next=t),_g=!0,se.actQueue!==null?p_||(p_=!0,fC()):f_||(f_=!0,fC())}function Ph(t,n){if(!m_&&_g){m_=!0;do for(var a=!1,l=bg;l!==null;){if(!n)if(t!==0){var d=l.pendingLanes;if(d===0)var p=0;else{var T=l.suspendedLanes,C=l.pingedLanes;p=(1<<31-ln(42|t)+1)-1,p&=d&~(T&~C),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,hC(l,p))}else p=rt,p=Ot(l,l===Pt?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Bl),!(p&3)||dt(l,p)||(a=!0,hC(l,p));l=l.next}while(a);m_=!1}}function bM(){Nv()}function Nv(){_g=p_=f_=!1;var t=0;Nl!==0&&(EM()&&(t=Nl),Nl=0);for(var n=xr(),a=null,l=bg;l!==null;){var d=l.next,p=cC(l,n);p===0?(l.next=null,a===null?bg=d:a.next=d,d===null&&($c=a)):(a=l,(t!==0||p&3)&&(_g=!0)),l=d}Ph(t,!1)}function cC(t,n){for(var a=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var T=31-ln(p),C=1<<T,O=d[T];O===-1?(!(C&a)||C&l)&&(d[T]=xn(C,n)):O<=n&&(t.expiredLanes|=C),p&=~C}if(n=Pt,a=rt,a=Ot(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==Bl),l=t.callbackNode,a===0||t===n&&(Ct===Ol||Ct===Rl)||t.cancelPendingCommit!==null)return l!==null&&Pv(l),t.callbackNode=null,t.callbackPriority=0;if(!(a&3)||dt(t,a)){if(n=a&-a,n!==t.callbackPriority||se.actQueue!==null&&l!==g_)Pv(l);else return n;switch(zr(a)){case cs:case Cr:a=pb;break;case ha:a=hc;break;case Gm:a=mb;break;default:a=hc}return l=dC.bind(null,t),se.actQueue!==null?(se.actQueue.push(l),a=g_):a=hb(a,l),t.callbackPriority=n,t.callbackNode=a,n}return l!==null&&Pv(l),t.callbackPriority=2,t.callbackNode=null,2}function dC(t,n){if(rg=sg=!1,zi!==Ll&&zi!==l_)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Ih()&&t.callbackNode!==a)return null;var l=rt;return l=Ot(t,t===Pt?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==Bl),l===0?null:($E(t,l,n),cC(t,xr()),t.callbackNode!=null&&t.callbackNode===a?dC.bind(null,t):null)}function hC(t,n){if(Ih())return null;sg=rg,rg=!1,$E(t,n,!0)}function Pv(t){t!==g_&&t!==null&&aL(t)}function fC(){se.actQueue!==null&&se.actQueue.push(function(){return Nv(),null}),F6(function(){(Tt&(fn|Hs))!==Qn?hb(fb,bM):Nv()})}function Bv(){return Nl===0&&(Nl=_e()),Nl}function pC(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:(ve(t,"action"),Yo(""+t))}function mC(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 _M(t,n,a,l,d){if(n==="submit"&&a&&a.stateNode===d){var p=pC((d[kn]||null).action),T=l.submitter;T&&(n=(n=T[kn]||null)?pC(n.formAction):T.getAttribute("formAction"),n!==null&&(p=n,T=null));var C=new Km("action","action",null,l,d);t.push({event:C,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Nl!==0){var O=T?mC(d,T):new FormData(d),I={pending:!0,data:O,method:d.method,action:p};Object.freeze(I),on(a,I,null,O)}}else typeof p=="function"&&(C.preventDefault(),O=T?mC(d,T):new FormData(d),I={pending:!0,data:O,method:d.method,action:p},Object.freeze(I),on(a,I,p,O))},currentTarget:d}]})}}function Om(t,n,a){t.currentTarget=a;try{n(t)}catch(l){Kb(l)}t.currentTarget=null}function gC(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var l=t[a];e:{var d=void 0,p=l.event;if(l=l.listeners,n)for(var T=l.length-1;0<=T;T--){var C=l[T],O=C.instance,I=C.currentTarget;if(C=C.listener,O!==d&&p.isPropagationStopped())break e;O!==null?Ne(O,Om,p,C,I):Om(p,C,I),d=O}else for(T=0;T<l.length;T++){if(C=l[T],O=C.instance,I=C.currentTarget,C=C.listener,O!==d&&p.isPropagationStopped())break e;O!==null?Ne(O,Om,p,C,I):Om(p,C,I),d=O}}}}function ot(t,n){y_.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[gb];a===void 0&&(a=n[gb]=new Set);var l=t+"__bubble";a.has(l)||(yC(n,t,2,!1),a.add(l))}function Uv(t,n,a){y_.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 l=0;n&&(l|=4),yC(a,t,l,n)}function qv(t){if(!t[Tg]){t[Tg]=!0,ew.forEach(function(a){a!=="selectionchange"&&(y_.has(a)||Uv(a,!1,t),Uv(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Tg]||(n[Tg]=!0,Uv("selectionchange",!1,n))}}function yC(t,n,a,l){switch(GC(n)){case cs:var d=QM;break;case Cr:d=KM;break;default:d=eb}a=d.bind(null,n,a,t),d=void 0,!Eb||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),l?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 Fv(t,n,a,l,d){var p=l;if(!(n&1)&&!(n&2)&&l!==null)e:for(;;){if(l===null)return;var T=l.tag;if(T===3||T===4){var C=l.stateNode.containerInfo;if(C===d)break;if(T===4)for(T=l.return;T!==null;){var O=T.tag;if((O===3||O===4)&&T.stateNode.containerInfo===d)return;T=T.return}for(;C!==null;){if(T=Wi(C),T===null)return;if(O=T.tag,O===5||O===6||O===26||O===27){l=p=T;continue e}C=C.parentNode}}l=l.return}Xo(function(){var I=p,Z=Pu(a),re=[];e:{var Q=$w.get(t);if(Q!==void 0){var ae=Km,Le=t;switch(t){case"keypress":if(Bu(a)===0)break e;case"keydown":case"keyup":ae=YL;break;case"focusin":Le="focus",ae=Db;break;case"focusout":Le="blur",ae=Db;break;case"beforeblur":case"afterblur":ae=Db;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":ae=Rw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=NL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=QL;break;case Hw:case jw:case zw:ae=UL;break;case Vw:ae=ZL;break;case"scroll":case"scrollend":ae=LL;break;case"wheel":ae=e6;break;case"copy":case"cut":case"paste":ae=FL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Lw;break;case"toggle":case"beforetoggle":ae=i6}var Ve=(n&4)!==0,Bt=!Ve&&(t==="scroll"||t==="scrollend"),lt=Ve?Q!==null?Q+"Capture":null:Q;Ve=[];for(var F=I,H;F!==null;){var V=F;if(H=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||H===null||lt===null||(V=Os(F,lt),V!=null&&Ve.push(Bh(F,V,H))),Bt)break;F=F.return}0<Ve.length&&(Q=new ae(Q,Le,null,a,Z),re.push({event:Q,listeners:Ve}))}}if(!(n&7)){e:{if(Q=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",Q&&a!==Yh&&(Le=a.relatedTarget||a.fromElement)&&(Wi(Le)||Le[uo]))break e;if((ae||Q)&&(Q=Z.window===Z?Z:(Q=Z.ownerDocument)?Q.defaultView||Q.parentWindow:window,ae?(Le=a.relatedTarget||a.toElement,ae=I,Le=Le?Wi(Le):null,Le!==null&&(Bt=U(Le),Ve=Le.tag,Le!==Bt||Ve!==5&&Ve!==27&&Ve!==6)&&(Le=null)):(ae=null,Le=I),ae!==Le)){if(Ve=Rw,V="onMouseLeave",lt="onMouseEnter",F="mouse",(t==="pointerout"||t==="pointerover")&&(Ve=Lw,V="onPointerLeave",lt="onPointerEnter",F="pointer"),Bt=ae==null?Q:ir(ae),H=Le==null?Q:ir(Le),Q=new Ve(V,F+"leave",ae,a,Z),Q.target=Bt,Q.relatedTarget=H,V=null,Wi(Z)===I&&(Ve=new Ve(lt,F+"enter",Le,a,Z),Ve.target=H,Ve.relatedTarget=Bt,V=Ve),Bt=V,ae&&Le)t:{for(Ve=ae,lt=Le,F=0,H=Ve;H;H=oc(H))F++;for(H=0,V=lt;V;V=oc(V))H++;for(;0<F-H;)Ve=oc(Ve),F--;for(;0<H-F;)lt=oc(lt),H--;for(;F--;){if(Ve===lt||lt!==null&&Ve===lt.alternate)break t;Ve=oc(Ve),lt=oc(lt)}Ve=null}else Ve=null;ae!==null&&vC(re,Q,ae,Ve,!1),Le!==null&&Bt!==null&&vC(re,Bt,Le,Ve,!0)}}e:{if(Q=I?ir(I):window,ae=Q.nodeName&&Q.nodeName.toLowerCase(),ae==="select"||ae==="input"&&Q.type==="file")var oe=Qo;else if(Jp(Q))if(qw)oe=Hu;else{oe=Ky;var Se=Qy}else ae=Q.nodeName,!ae||ae.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?I&&Go(I.elementType)&&(oe=Qo):oe=Zy;if(oe&&(oe=oe(t,I))){Fu(re,oe,a,Z);break e}Se&&Se(t,Q,I),t==="focusout"&&I&&Q.type==="number"&&I.memoizedProps.value!=null&&jd(Q,"number",Q.value)}switch(Se=I?ir(I):window,t){case"focusin":(Jp(Se)||Se.contentEditable==="true")&&(_c=Se,Ob=I,ef=null);break;case"focusout":ef=Ob=_c=null;break;case"mousedown":Rb=!0;break;case"contextmenu":case"mouseup":case"dragend":Rb=!1,im(re,a,Z);break;case"selectionchange":if(a6)break;case"keydown":case"keyup":im(re,a,Z)}var Xe;if(kb)e:{switch(t){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else bc?Kp(t,a)&&(Ie="onCompositionEnd"):t==="keydown"&&a.keyCode===Iw&&(Ie="onCompositionStart");Ie&&(Nw&&a.locale!=="ko"&&(bc||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&bc&&(Xe=Gd()):(co=Z,Cb="value"in co?co.value:co.textContent,bc=!0)),Se=Rm(I,Ie),0<Se.length&&(Ie=new Mw(Ie,t,null,a,Z),re.push({event:Ie,listeners:Se}),Xe?Ie.data=Xe:(Xe=Zp(a),Xe!==null&&(Ie.data=Xe)))),(Xe=s6?Gy(t,a):Yy(t,a))&&(Ie=Rm(I,"onBeforeInput"),0<Ie.length&&(Se=new jL("onBeforeInput","beforeinput",null,a,Z),re.push({event:Se,listeners:Ie}),Se.data=Xe)),_M(re,t,I,a,Z)}gC(re,n)})}function Bh(t,n,a){return{instance:t,listener:n,currentTarget:a}}function Rm(t,n){for(var a=n+"Capture",l=[];t!==null;){var d=t,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=Os(t,a),d!=null&&l.unshift(Bh(t,d,p)),d=Os(t,n),d!=null&&l.push(Bh(t,d,p))),t.tag===3)return l;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 vC(t,n,a,l,d){for(var p=n._reactName,T=[];a!==null&&a!==l;){var C=a,O=C.alternate,I=C.stateNode;if(C=C.tag,O!==null&&O===l)break;C!==5&&C!==26&&C!==27||I===null||(O=I,d?(I=Os(a,p),I!=null&&T.unshift(Bh(a,I,O))):d||(I=Os(a,p),I!=null&&T.push(Bh(a,I,O)))),a=a.return}T.length!==0&&t.push({event:n,listeners:T})}function Hv(t,n){Xp(t,n),t!=="input"&&t!=="textarea"&&t!=="select"||n==null||n.value!==null||kw||(kw=!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:_l,possibleRegistrationNames:yb};Go(t)||typeof n.is=="string"||Wp(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 Di(t,n,a,l){n!==a&&(a=no(a),no(n)!==a&&(l[t]=n))}function TM(t,n,a){n.forEach(function(l){a[TC(l)]=l==="style"?zv(t):t.getAttribute(l)})}function Tr(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 bC(t,n){return t=t.namespaceURI===Xm||t.namespaceURI===mc?t.ownerDocument.createElementNS(t.namespaceURI,t.tagName):t.ownerDocument.createElement(t.tagName),t.innerHTML=n,t.innerHTML}function no(t){return ee(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.",Be(t)),we(t)),(typeof t=="string"?t:""+t).replace(R6,`
`).replace(M6,"")}function _C(t,n){return n=no(n),no(t)===n}function Mm(){}function Lt(t,n,a,l,d,p){switch(a){case"children":typeof l=="string"?(ks(l,n,!1),n==="body"||n==="textarea"&&l===""||Xr(t,l)):(typeof l=="number"||typeof l=="bigint")&&(ks(""+l,n,!1),n!=="body"&&Xr(t,""+l));break;case"className":Ye(t,"class",l);break;case"tabIndex":Ye(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ye(t,a,l);break;case"style":Gp(t,l,p);break;case"data":if(n!=="object"){Ye(t,"data",l);break}case"src":case"href":if(l===""&&(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(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}ve(l,a),l=Yo(""+l),t.setAttribute(a,l);break;case"action":case"formAction":if(l!=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 l=="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 l=="function"&&(d.name==null||aD||(aD=!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 l=="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 p=="function"&&(a==="formAction"?(n!=="input"&&Lt(t,n,"name",d.name,d,null),Lt(t,n,"formEncType",d.formEncType,d,null),Lt(t,n,"formMethod",d.formMethod,d,null),Lt(t,n,"formTarget",d.formTarget,d,null)):(Lt(t,n,"encType",d.encType,d,null),Lt(t,n,"method",d.method,d,null),Lt(t,n,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}ve(l,a),l=Yo(""+l),t.setAttribute(a,l);break;case"onClick":l!=null&&(typeof l!="function"&&Tr(a,l),t.onclick=Mm);break;case"onScroll":l!=null&&(typeof l!="function"&&Tr(a,l),ot("scroll",t));break;case"onScrollEnd":l!=null&&(typeof l!="function"&&Tr(a,l),ot("scrollend",t));break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))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=l.__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=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}ve(l,a),a=Yo(""+l),t.setAttributeNS(Pl,"xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?(ve(l,a),t.setAttribute(a,""+l)):t.removeAttribute(a);break;case"inert":l!==""||Cg[a]||(Cg[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":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":l===!0?t.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?(ve(l,a),t.setAttribute(a,l)):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?(ve(l,a),t.setAttribute(a,l)):t.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(a):(ve(l,a),t.setAttribute(a,l));break;case"popover":ot("beforetoggle",t),ot("toggle",t),ct(t,"popover",l);break;case"xlinkActuate":si(t,Pl,"xlink:actuate",l);break;case"xlinkArcrole":si(t,Pl,"xlink:arcrole",l);break;case"xlinkRole":si(t,Pl,"xlink:role",l);break;case"xlinkShow":si(t,Pl,"xlink:show",l);break;case"xlinkTitle":si(t,Pl,"xlink:title",l);break;case"xlinkType":si(t,Pl,"xlink:type",l);break;case"xmlBase":si(t,v_,"xml:base",l);break;case"xmlLang":si(t,v_,"xml:lang",l);break;case"xmlSpace":si(t,v_,"xml:space",l);break;case"is":p!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),ct(t,"is",l);break;case"innerText":case"textContent":break;case"popoverTarget":oD||l==null||typeof l!="object"||(oD=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",l));default:!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N"?(a=Yp(a),ct(t,a,l)):_l.hasOwnProperty(a)&&l!=null&&typeof l!="function"&&Tr(a,l)}}function jv(t,n,a,l,d,p){switch(a){case"style":Gp(t,l,p);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))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=l.__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 l=="string"?Xr(t,l):(typeof l=="number"||typeof l=="bigint")&&Xr(t,""+l);break;case"onScroll":l!=null&&(typeof l!="function"&&Tr(a,l),ot("scroll",t));break;case"onScrollEnd":l!=null&&(typeof l!="function"&&Tr(a,l),ot("scrollend",t));break;case"onClick":l!=null&&(typeof l!="function"&&Tr(a,l),t.onclick=Mm);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(_l.hasOwnProperty(a))l!=null&&typeof l!="function"&&Tr(a,l);else e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),p=t[kn]||null,p=p!=null?p[a]:null,typeof p=="function"&&t.removeEventListener(n,p,d),typeof l=="function")){typeof p!="function"&&p!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,l,d);break e}a in t?t[a]=l:l===!0?t.setAttribute(a,""):ct(t,a,l)}}}function qi(t,n,a){switch(Hv(n,a),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ot("error",t),ot("load",t);var l=!1,d=!1,p;for(p in a)if(a.hasOwnProperty(p)){var T=a[p];if(T!=null)switch(p){case"src":l=!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:Lt(t,n,p,T,a,null)}}d&&Lt(t,n,"srcSet",a.srcSet,a,null),l&&Lt(t,n,"src",a.src,a,null);return;case"input":Pe("input",a),ot("invalid",t);var C=p=T=d=null,O=null,I=null;for(l in a)if(a.hasOwnProperty(l)){var Z=a[l];if(Z!=null)switch(l){case"name":d=Z;break;case"type":T=Z;break;case"checked":O=Z;break;case"defaultChecked":I=Z;break;case"value":p=Z;break;case"defaultValue":C=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:Lt(t,n,l,Z,a,null)}}Nt(t,a),jo(t,p,C,O,I,T,d,!1),Vr(t);return;case"select":Pe("select",a),ot("invalid",t),l=T=p=null;for(d in a)if(a.hasOwnProperty(d)&&(C=a[d],C!=null))switch(d){case"value":p=C;break;case"defaultValue":T=C;break;case"multiple":l=C;default:Lt(t,n,d,C,a,null)}Ou(t,a),n=p,a=T,t.multiple=!!l,n!=null?$r(t,!!l,n,!1):a!=null&&$r(t,!!l,a,!0);return;case"textarea":Pe("textarea",a),ot("invalid",t),p=d=l=null;for(T in a)if(a.hasOwnProperty(T)&&(C=a[T],C!=null))switch(T){case"value":l=C;break;case"defaultValue":d=C;break;case"children":p=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Lt(t,n,T,C,a,null)}Ru(t,a),jp(t,l,d,p),Vr(t);return;case"option":Fp(t,a);for(O in a)if(a.hasOwnProperty(O)&&(l=a[O],l!=null))switch(O){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Lt(t,n,O,l,a,null)}return;case"dialog":ot("beforetoggle",t),ot("toggle",t),ot("cancel",t),ot("close",t);break;case"iframe":case"object":ot("load",t);break;case"video":case"audio":for(l=0;l<Cf.length;l++)ot(Cf[l],t);break;case"image":ot("error",t),ot("load",t);break;case"details":ot("toggle",t);break;case"embed":case"source":case"link":ot("error",t),ot("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(I in a)if(a.hasOwnProperty(I)&&(l=a[I],l!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Lt(t,n,I,l,a,null)}return;default:if(Go(n)){for(Z in a)a.hasOwnProperty(Z)&&(l=a[Z],l!==void 0&&jv(t,n,Z,l,a,void 0));return}}for(C in a)a.hasOwnProperty(C)&&(l=a[C],l!=null&&Lt(t,n,C,l,a,null))}function SM(t,n,a,l){switch(Hv(n,l),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,T=null,C=null,O=null,I=null,Z=null;for(ae in a){var re=a[ae];if(a.hasOwnProperty(ae)&&re!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":O=re;default:l.hasOwnProperty(ae)||Lt(t,n,ae,null,l,re)}}for(var Q in l){var ae=l[Q];if(re=a[Q],l.hasOwnProperty(Q)&&(ae!=null||re!=null))switch(Q){case"type":p=ae;break;case"name":d=ae;break;case"checked":I=ae;break;case"defaultChecked":Z=ae;break;case"value":T=ae;break;case"defaultValue":C=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ae!==re&&Lt(t,n,Q,ae,l,re)}}n=a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null,l=l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null,n||!l||rD||(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"),rD=!0),!n||l||sD||(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"),sD=!0),ku(t,T,C,O,I,Z,p,d);return;case"select":ae=T=C=Q=null;for(p in a)if(O=a[p],a.hasOwnProperty(p)&&O!=null)switch(p){case"value":break;case"multiple":ae=O;default:l.hasOwnProperty(p)||Lt(t,n,p,null,l,O)}for(d in l)if(p=l[d],O=a[d],l.hasOwnProperty(d)&&(p!=null||O!=null))switch(d){case"value":Q=p;break;case"defaultValue":C=p;break;case"multiple":T=p;default:p!==O&&Lt(t,n,d,p,l,O)}l=C,n=T,a=ae,Q!=null?$r(t,!!n,Q,!1):!!a!=!!n&&(l!=null?$r(t,!!n,l,!0):$r(t,!!n,n?[]:"",!1));return;case"textarea":ae=Q=null;for(C in a)if(d=a[C],a.hasOwnProperty(C)&&d!=null&&!l.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:Lt(t,n,C,null,l,d)}for(T in l)if(d=l[T],p=a[T],l.hasOwnProperty(T)&&(d!=null||p!=null))switch(T){case"value":Q=d;break;case"defaultValue":ae=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:d!==p&&Lt(t,n,T,d,l,p)}zd(t,Q,ae);return;case"option":for(var Le in a)if(Q=a[Le],a.hasOwnProperty(Le)&&Q!=null&&!l.hasOwnProperty(Le))switch(Le){case"selected":t.selected=!1;break;default:Lt(t,n,Le,null,l,Q)}for(O in l)if(Q=l[O],ae=a[O],l.hasOwnProperty(O)&&Q!==ae&&(Q!=null||ae!=null))switch(O){case"selected":t.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:Lt(t,n,O,Q,l,ae)}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 Ve in a)Q=a[Ve],a.hasOwnProperty(Ve)&&Q!=null&&!l.hasOwnProperty(Ve)&&Lt(t,n,Ve,null,l,Q);for(I in l)if(Q=l[I],ae=a[I],l.hasOwnProperty(I)&&Q!==ae&&(Q!=null||ae!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Lt(t,n,I,Q,l,ae)}return;default:if(Go(n)){for(var Bt in a)Q=a[Bt],a.hasOwnProperty(Bt)&&Q!==void 0&&!l.hasOwnProperty(Bt)&&jv(t,n,Bt,void 0,l,Q);for(Z in l)Q=l[Z],ae=a[Z],!l.hasOwnProperty(Z)||Q===ae||Q===void 0&&ae===void 0||jv(t,n,Z,Q,l,ae);return}}for(var lt in a)Q=a[lt],a.hasOwnProperty(lt)&&Q!=null&&!l.hasOwnProperty(lt)&&Lt(t,n,lt,null,l,Q);for(re in l)Q=l[re],ae=a[re],!l.hasOwnProperty(re)||Q===ae||Q==null&&ae==null||Lt(t,n,re,Q,l,ae)}function TC(t){switch(t){case"class":return"className";case"for":return"htmlFor";default:return t}}function zv(t){var n={};t=t.style;for(var a=0;a<t.length;a++){var l=t[a];n[l]=t.getPropertyValue(l)}return n}function SC(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 l,d=l="",p;for(p in n)if(n.hasOwnProperty(p)){var T=n[p];T!=null&&typeof T!="boolean"&&T!==""&&(p.indexOf("--")===0?(Re(T,p),l+=d+p+":"+(""+T).trim()):typeof T!="number"||T===0||Aw.has(p)?(Re(T,p),l+=d+p.replace(Sw,"-$1").toLowerCase().replace(xw,"-ms-")+":"+(""+T).trim()):l+=d+p.replace(Sw,"-$1").toLowerCase().replace(xw,"-ms-")+":"+T+"px",d=";")}l=l||null,n=t.getAttribute("style"),n!==l&&(l=no(l),no(n)!==l&&(a.style=zv(t)))}}function ls(t,n,a,l,d,p){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":return}else if(l!=null)switch(typeof l){case"function":case"symbol":case"boolean":break;default:if(ve(l,n),t===""+l)return}Di(n,t,l,p)}function xC(t,n,a,l,d,p){if(d.delete(a),t=t.getAttribute(a),t===null){switch(typeof l){case"function":case"symbol":return}if(!l)return}else switch(typeof l){case"function":case"symbol":break;default:if(l)return}Di(n,t,l,p)}function Vv(t,n,a,l,d,p){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof l){case"undefined":case"function":case"symbol":return}else if(l!=null)switch(typeof l){case"function":case"symbol":break;default:if(ve(l,a),t===""+l)return}Di(n,t,l,p)}function EC(t,n,a,l,d,p){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(l))return}else if(l!=null)switch(typeof l){case"function":case"symbol":case"boolean":break;default:if(!isNaN(l)&&(ve(l,n),t===""+l))return}Di(n,t,l,p)}function $v(t,n,a,l,d,p){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":return}else if(l!=null)switch(typeof l){case"function":case"symbol":case"boolean":break;default:if(ve(l,n),a=Yo(""+l),t===a)return}Di(n,t,l,p)}function CC(t,n,a,l){for(var d={},p=new Set,T=t.attributes,C=0;C<T.length;C++)switch(T[C].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:p.add(T[C].name)}if(Go(n)){for(var O in a)if(a.hasOwnProperty(O)){var I=a[O];if(I!=null){if(_l.hasOwnProperty(O))typeof I!="function"&&Tr(O,I);else if(a.suppressHydrationWarning!==!0)switch(O){case"children":typeof I!="string"&&typeof I!="number"||Di("children",t.textContent,I,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":T=t.innerHTML,I=I?I.__html:void 0,I!=null&&(I=bC(t,I),Di(O,T,I,d));continue;case"style":p.delete(O),SC(t,I,d);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":p.delete(O.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",O);continue;case"className":p.delete("class"),T=Ge(t,"class",I),Di("className",T,I,d);continue;default:l.context===Sa&&n!=="svg"&&n!=="math"?p.delete(O.toLowerCase()):p.delete(O),T=Ge(t,O,I),Di(O,T,I,d)}}}}else for(I in a)if(a.hasOwnProperty(I)&&(O=a[I],O!=null)){if(_l.hasOwnProperty(I))typeof O!="function"&&Tr(I,O);else if(a.suppressHydrationWarning!==!0)switch(I){case"children":typeof O!="string"&&typeof O!="number"||Di("children",t.textContent,O,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":T=t.innerHTML,O=O?O.__html:void 0,O!=null&&(O=bC(t,O),T!==O&&(d[I]={__html:T}));continue;case"className":ls(t,I,"class",O,p,d);continue;case"tabIndex":ls(t,I,"tabindex",O,p,d);continue;case"style":p.delete(I),SC(t,O,d);continue;case"multiple":p.delete(I),Di(I,t.multiple,O,d);continue;case"muted":p.delete(I),Di(I,t.muted,O,d);continue;case"autoFocus":p.delete("autofocus"),Di(I,t.autofocus,O,d);continue;case"data":if(n!=="object"){p.delete(I),T=t.getAttribute("data"),Di(I,T,O,d);continue}case"src":case"href":if(!(O!==""||n==="a"&&I==="href"||n==="object"&&I==="data")){console.error(I==="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.',I,I);continue}$v(t,I,I,O,p,d);continue;case"action":case"formAction":if(T=t.getAttribute(I),typeof O=="function"){p.delete(I.toLowerCase()),I==="formAction"?(p.delete("name"),p.delete("formenctype"),p.delete("formmethod"),p.delete("formtarget")):(p.delete("enctype"),p.delete("method"),p.delete("target"));continue}else if(T===L6){p.delete(I.toLowerCase()),Di(I,"function",O,d);continue}$v(t,I,I.toLowerCase(),O,p,d);continue;case"xlinkHref":$v(t,I,"xlink:href",O,p,d);continue;case"contentEditable":Vv(t,I,"contenteditable",O,p,d);continue;case"spellCheck":Vv(t,I,"spellcheck",O,p,d);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Vv(t,I,I,O,p,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":xC(t,I,I.toLowerCase(),O,p,d);continue;case"capture":case"download":e:{C=t;var Z=T=I,re=d;if(p.delete(Z),C=C.getAttribute(Z),C===null)switch(typeof O){case"undefined":case"function":case"symbol":break e;default:if(O===!1)break e}else if(O!=null)switch(typeof O){case"function":case"symbol":break;case"boolean":if(O===!0&&C==="")break e;break;default:if(ve(O,T),C===""+O)break e}Di(T,C,O,re)}continue;case"cols":case"rows":case"size":case"span":e:{if(C=t,Z=T=I,re=d,p.delete(Z),C=C.getAttribute(Z),C===null)switch(typeof O){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(O)||1>O)break e}else if(O!=null)switch(typeof O){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(O)||1>O)&&(ve(O,T),C===""+O))break e}Di(T,C,O,re)}continue;case"rowSpan":EC(t,I,"rowspan",O,p,d);continue;case"start":EC(t,I,I,O,p,d);continue;case"xHeight":ls(t,I,"x-height",O,p,d);continue;case"xlinkActuate":ls(t,I,"xlink:actuate",O,p,d);continue;case"xlinkArcrole":ls(t,I,"xlink:arcrole",O,p,d);continue;case"xlinkRole":ls(t,I,"xlink:role",O,p,d);continue;case"xlinkShow":ls(t,I,"xlink:show",O,p,d);continue;case"xlinkTitle":ls(t,I,"xlink:title",O,p,d);continue;case"xlinkType":ls(t,I,"xlink:type",O,p,d);continue;case"xmlBase":ls(t,I,"xml:base",O,p,d);continue;case"xmlLang":ls(t,I,"xml:lang",O,p,d);continue;case"xmlSpace":ls(t,I,"xml:space",O,p,d);continue;case"inert":O!==""||Cg[I]||(Cg[I]=!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.",I)),xC(t,I,I,O,p,d);continue;default:if(!(2<I.length)||I[0]!=="o"&&I[0]!=="O"||I[1]!=="n"&&I[1]!=="N"){C=Yp(I),T=!1,l.context===Sa&&n!=="svg"&&n!=="math"?p.delete(C.toLowerCase()):(Z=I.toLowerCase(),Z=Wm.hasOwnProperty(Z)&&Wm[Z]||null,Z!==null&&Z!==I&&(T=!0,p.delete(Z)),p.delete(C));e:if(Z=t,re=C,C=O,Je(re))if(Z.hasAttribute(re))Z=Z.getAttribute(re),ve(C,re),C=Z===""+C?C:Z;else{switch(typeof C){case"function":case"symbol":break e;case"boolean":if(Z=re.toLowerCase().slice(0,5),Z!=="data-"&&Z!=="aria-")break e}C=C===void 0?void 0:null}else C=void 0;T||Di(I,C,O,d)}}}return 0<p.size&&a.suppressHydrationWarning!==!0&&TM(t,p,d),Object.keys(d).length===0?null:d}function xM(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 Lm(t){return t.nodeType===9?t:t.ownerDocument}function wC(t){switch(t){case mc:return Gc;case Xm:return Dg;default:return Sa}}function AC(t,n){if(t===Sa)switch(n){case"svg":return Gc;case"math":return Dg;default:return Sa}return t===Gc&&n==="foreignObject"?Sa:t}function Gv(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 EM(){var t=window.event;return t&&t.type==="popstate"?t===S_?!1:(S_=t,!0):(S_=null,!1)}function CM(t){setTimeout(function(){throw t})}function wM(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 AM(t,n,a,l){SM(t,n,a,l),t[kn]=l}function DC(t){Xr(t,"")}function DM(t,n,a){t.nodeValue=a}function so(t){return t==="head"}function kM(t,n){t.removeChild(n)}function OM(t,n){(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).removeChild(n)}function kC(t,n){var a=n,l=0,d=0;do{var p=a.nextSibling;if(t.removeChild(a),p&&p.nodeType===8)if(a=p.data,a===Ag){if(0<l&&8>l){a=l;var T=t.ownerDocument;if(a&N6&&Uh(T.documentElement),a&P6&&Uh(T.body),a&B6)for(a=T.head,Uh(a),T=a.firstChild;T;){var C=T.nextSibling,O=T.nodeName;T[$h]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&T.rel.toLowerCase()==="stylesheet"||a.removeChild(T),T=C}}if(d===0){t.removeChild(p),jh(n);return}d--}else a===wg||a===Ta||a===wf?d++:l=a.charCodeAt(0)-48;else l=0;a=p}while(a);jh(n)}function RM(t){t=t.style,typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function MM(t){t.nodeValue=""}function LM(t,n){n=n[U6],n=n!=null&&n.hasOwnProperty("display")?n.display:null,t.style.display=n==null||typeof n=="boolean"?"":(""+n).trim()}function IM(t,n){t.nodeValue=n}function Yv(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":Yv(a),tr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function NM(t,n,a,l){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[$h])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==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(p=t.getAttribute("src"),(p!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){ve(d.name,"name");var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=us(t.nextSibling),t===null)break}return null}function PM(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=us(t.nextSibling),t===null))return null;return t}function Xv(t){return t.data===wf||t.data===Ta&&t.ownerDocument.readyState===uD}function BM(t,n){var a=t.ownerDocument;if(t.data!==Ta||a.readyState===uD)n();else{var l=function(){n(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function us(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===wg||n===wf||n===Ta||n===b_||n===lD)break;if(n===Ag)return null}}return t}function OC(t){if(t.nodeType===1){for(var n=t.nodeName.toLowerCase(),a={},l=t.attributes,d=0;d<l.length;d++){var p=l[d];a[TC(p.name)]=p.name.toLowerCase()==="style"?zv(t):p.value}return{type:n,props:a}}return t.nodeType===8?{type:"Suspense",props:{}}:t.nodeValue}function RC(t,n,a){return a===null||a[I6]!==!0?(t.nodeValue===n?t=null:(n=no(n),t=no(t.nodeValue)===n?null:t.nodeValue),t):null}function MC(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a===Ag){if(n===0)return us(t.nextSibling);n--}else a!==wg&&a!==wf&&a!==Ta||n++}t=t.nextSibling}return null}function LC(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a===wg||a===wf||a===Ta){if(n===0)return t;n--}else a===Ag&&n++}t=t.previousSibling}return null}function UM(t){jh(t)}function qM(t){jh(t)}function IC(t,n,a,l,d){switch(d&&Ha(t,l.ancestorInfo),n=Lm(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 FM(t,n,a,l){if(!a[uo]&&qn(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]);qi(a,t,n),a[Zi]=l,a[kn]=n}function Uh(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);tr(t)}function Im(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}function NC(t,n,a){var l=Yc;if(l&&typeof n=="string"&&n){var d=di(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),mD.has(d)||(mD.add(d),t={rel:t,crossOrigin:a,href:n},l.querySelector(d)===null&&(n=l.createElement("link"),qi(n,"link",t),X(n),l.head.appendChild(n)))}}function PC(t,n,a,l){var d=(d=oo.current)?Im(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=D(d).hoistableStyles,l=n.get(a),l||(l={type:"style",instance:null,count:0,state:null},n.set(a,l)),l):{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 p=D(d).hoistableStyles,T=p.get(t);if(!T&&(d=d.ownerDocument||d,T={type:"stylesheet",instance:null,count:0,state:{loading:Ul,preload:null}},p.set(t,T),(p=d.querySelector(qh(t)))&&!p._p&&(T.instance=p,T.state.loading=Af|_s),!Ts.has(t))){var C={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy};Ts.set(t,C),p||HM(d,t,C,T.state)}if(n&&l===null)throw a=`
- `+Nm(n)+`
+ `+Nm(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 T}if(n&&l!==null)throw a=`
- `+Nm(n)+`
+ `+Nm(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=D(d).hoistableScripts,l=n.get(a),l||(l={type:"script",instance:null,count:0,state:null},n.set(a,l)),l):{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 Nm(t){var n=0,a="<link";return typeof t.rel=="string"?(n++,a+=' rel="'+t.rel+'"'):da.call(t,"rel")&&(n++,a+=' rel="'+(t.rel===null?"null":"invalid type "+typeof t.rel)+'"'),typeof t.href=="string"?(n++,a+=' href="'+t.href+'"'):da.call(t,"href")&&(n++,a+=' href="'+(t.href===null?"null":"invalid type "+typeof t.href)+'"'),typeof t.precedence=="string"?(n++,a+=' precedence="'+t.precedence+'"'):da.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="'+di(t)+'"'}function qh(t){return'link[rel="stylesheet"]['+t+"]"}function BC(t){return it({},t,{"data-precedence":t.precedence,precedence:null})}function HM(t,n,a,l){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=Af:(n=t.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=Af}),n.addEventListener("error",function(){return l.loading|=fD}),qi(n,"link",a),X(n),t.head.appendChild(n))}function uc(t){return'[src="'+di(t)+'"]'}function Fh(t){return"script[async]"+t}function UC(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var l=t.querySelector('style[data-href~="'+di(a.href)+'"]');if(l)return n.instance=l,X(l),l;var d=it({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),X(l),qi(l,"style",d),Pm(l,a.precedence,t),n.instance=l;case"stylesheet":d=lc(a.href);var p=t.querySelector(qh(d));if(p)return n.state.loading|=_s,n.instance=p,X(p),p;l=BC(a),(d=Ts.get(d))&&Wv(l,d),p=(t.ownerDocument||t).createElement("link"),X(p);var T=p;return T._p=new Promise(function(C,O){T.onload=C,T.onerror=O}),qi(p,"link",l),n.state.loading|=_s,Pm(p,a.precedence,t),n.instance=p;case"script":return p=uc(a.src),(d=t.querySelector(Fh(p)))?(n.instance=d,X(d),d):(l=a,(d=Ts.get(p))&&(l=it({},a),Qv(l,d)),t=t.ownerDocument||t,d=t.createElement("script"),X(d),qi(d,"link",l),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&_s)===Ul&&(l=n.instance,n.state.loading|=_s,Pm(l,a.precedence,t));return n.instance}function Pm(t,n,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,p=d,T=0;T<l.length;T++){var C=l[T];if(C.dataset.precedence===n)p=C;else if(p!==d)break}p?p.parentNode.insertBefore(t,p.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function Wv(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Qv(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}function qC(t,n,a){if(kg===null){var l=new Map,d=kg=new Map;d.set(a,l)}else d=kg,l=d.get(a),l||(l=new Map,d.set(a,l));if(l.has(t))return l;for(l.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var p=a[d];if(!(p[$h]||p[Zi]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!==mc){var T=p.getAttribute(n)||"";T=t+T;var C=l.get(T);C?C.push(p):l.set(T,[p])}}return l}function FC(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function jM(t,n,a){var l=!a.ancestorInfo.containerTagInScope;if(a.context===Gc||n.itemProp!=null)return!l||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===""){l&&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,p=n.disabled;a=[],n.onLoad&&a.push("`onLoad`"),d&&a.push("`onError`"),p!=null&&a.push("`disabled`"),d=xM(a,"and"),d+=a.length===1?" prop":" props",p=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,p,d)}l&&(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"&&l&&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"){l&&(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":l&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",t)}return!1}function HC(t){return!(t.type==="stylesheet"&&(t.state.loading&pD)===Ul)}function zM(){}function VM(t,n,a){if(Df===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var l=Df;if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&_s)===Ul){if(n.instance===null){var d=lc(a.href),p=t.querySelector(qh(d));if(p){t=p._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Bm.bind(l),t.then(l,l)),n.state.loading|=_s,n.instance=p,X(p);return}p=t.ownerDocument||t,a=BC(a),(d=Ts.get(d))&&Wv(a,d),p=p.createElement("link"),X(p);var T=p;T._p=new Promise(function(C,O){T.onload=C,T.onerror=O}),qi(p,"link",a),n.instance=p}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&pD)===Ul&&(l.count++,n=Bm.bind(l),t.addEventListener("load",n),t.addEventListener("error",n))}}function $M(){if(Df===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var t=Df;return t.stylesheets&&t.count===0&&Kv(t,t.stylesheets),0<t.count?function(n){var a=setTimeout(function(){if(t.stylesheets&&Kv(t,t.stylesheets),t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}},6e4);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(a)}}:null}function Bm(){if(this.count--,this.count===0){if(this.stylesheets)Kv(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}function Kv(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Og=new Map,n.forEach(GM,t),Og=null,Bm.call(t))}function GM(t,n){if(!(n.state.loading&_s)){var a=Og.get(t);if(a)var l=a.get(E_);else{a=new Map,Og.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var T=d[p];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(a.set(T.dataset.precedence,T),l=T)}l&&a.set(E_,l)}d=n.instance,T=d.getAttribute("data-precedence"),p=a.get(T)||l,p===l&&a.set(E_,d),a.set(T,d),this.count++,l=Bm.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),p?p.parentNode.insertBefore(d,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=_s}}function YM(t,n,a,l,d,p,T,C){for(this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Bl,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ci(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ci(0),this.hiddenUpdates=ci(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,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 jC(t,n,a,l,d,p,T,C,O,I,Z,re){return t=new YM(t,n,a,T,C,O,I,re),n=c6,p===!0&&(n|=Ji|Bs),Ps&&(n|=Hi),p=w(3,null,null,n),t.current=p,p.stateNode=t,n=ih(),ea(n),t.pooledCache=n,ea(n),p.memoizedState={element:l,isDehydrated:a,cache:n},cl(p),t}function zC(t){return t?(t=ho,t):ho}function Zv(t,n,a,l,d,p){if(Ki&&typeof Ki.onScheduleFiberRoot=="function")try{Ki.onScheduleFiberRoot(fc,l,a)}catch(T){Er||(Er=!0,console.error("React instrumentation encountered an error: %s",T))}Ae!==null&&typeof Ae.markRenderScheduled=="function"&&Ae.markRenderScheduled(n),d=zC(d),l.context===null?l.context=d:l.pendingContext=d,wr&&Wn!==null&&!bD&&(bD=!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.`,te(Wn)||"Unknown")),l=An(n),l.payload={element:a},p=p===void 0?null:p,p!==null&&(typeof p!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",p),l.callback=p),a=fr(t,l,n),a!==null&&(ai(a,t,n),Ga(a,t,n))}function VC(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function Jv(t,n){VC(t,n),(t=t.alternate)&&VC(t,n)}function $C(t){if(t.tag===13){var n=mi(t,67108864);n!==null&&ai(n,t,67108864),Jv(t,67108864)}}function XM(){return Wn}function WM(){for(var t=new Map,n=1,a=0;31>a;a++){var l=Sn(n);t.set(n,l),n*=2}return t}function QM(t,n,a,l){var d=se.T;se.T=null;var p=_t.p;try{_t.p=cs,eb(t,n,a,l)}finally{_t.p=p,se.T=d}}function KM(t,n,a,l){var d=se.T;se.T=null;var p=_t.p;try{_t.p=Cr,eb(t,n,a,l)}finally{_t.p=p,se.T=d}}function eb(t,n,a,l){if(Mg){var d=tb(l);if(d===null)Fv(t,n,l,Lg,a),YC(t,l);else if(ZM(d,t,n,a,l))l.stopPropagation();else if(YC(t,l),n&4&&-1<j6.indexOf(t)){for(;d!==null;){var p=qn(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var T=kt(p.pendingLanes);if(T!==0){var C=p;for(C.pendingLanes|=2,C.entangledLanes|=2;T;){var O=1<<31-ln(T);C.entanglements[1]|=O,T&=~O}_r(p),(Tt&(fn|Hs))===Qn&&(gg=xr()+KA,Ph(0,!1))}}break;case 13:C=mi(p,2),C!==null&&ai(C,p,2),sc(),Jv(p,2)}if(p=tb(l),p===null&&Fv(t,n,l,Lg,a),p===d)break;d=p}d!==null&&l.stopPropagation()}else Fv(t,n,l,null,a)}}function tb(t){return t=Pu(t),ib(t)}function ib(t){if(Lg=null,t=Wi(t),t!==null){var n=U(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=G(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 Lg=t,null}function GC(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 cs;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 Cr;case"message":switch(uL()){case fb:return cs;case pb:return Cr;case hc:case cL:return ha;case mb:return Gm;default:return ha}default:return ha}}function YC(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":Of.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rf.delete(n.pointerId)}}function Hh(t,n,a,l,d,p){return t===null||t.nativeEvent!==p?(t={blockedOn:n,domEventName:a,eventSystemFlags:l,nativeEvent:p,targetContainers:[d]},n!==null&&(n=qn(n),n!==null&&$C(n)),t):(t.eventSystemFlags|=l,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function ZM(t,n,a,l,d){switch(n){case"focusin":return So=Hh(So,t,n,a,l,d),!0;case"dragenter":return xo=Hh(xo,t,n,a,l,d),!0;case"mouseover":return Eo=Hh(Eo,t,n,a,l,d),!0;case"pointerover":var p=d.pointerId;return Of.set(p,Hh(Of.get(p)||null,t,n,a,l,d)),!0;case"gotpointercapture":return p=d.pointerId,Rf.set(p,Hh(Rf.get(p)||null,t,n,a,l,d)),!0}return!1}function XC(t){var n=Wi(t.target);if(n!==null){var a=U(n);if(a!==null){if(n=a.tag,n===13){if(n=G(a),n!==null){t.blockedOn=n,gt(t.priority,function(){if(a.tag===13){var l=Yn(a);l=er(l);var d=mi(a,l);d!==null&&ai(d,a,l),Jv(a,l)}});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=tb(t.nativeEvent);if(a===null){a=t.nativeEvent;var l=new a.constructor(a.type,a),d=l;Yh!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Yh=d,a.target.dispatchEvent(l),Yh===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."),Yh=null}else return n=qn(a),n!==null&&$C(n),t.blockedOn=a,!1;n.shift()}return!0}function WC(t,n,a){Um(t)&&a.delete(n)}function JM(){C_=!1,So!==null&&Um(So)&&(So=null),xo!==null&&Um(xo)&&(xo=null),Eo!==null&&Um(Eo)&&(Eo=null),Of.forEach(WC),Rf.forEach(WC)}function qm(t,n){t.blockedOn===n&&(t.blockedOn=null,C_||(C_=!0,hi.unstable_scheduleCallback(hi.unstable_NormalPriority,JM)))}function QC(t){Ig!==t&&(Ig=t,hi.unstable_scheduleCallback(hi.unstable_NormalPriority,function(){Ig===t&&(Ig=null);for(var n=0;n<t.length;n+=3){var a=t[n],l=t[n+1],d=t[n+2];if(typeof l!="function"){if(ib(l||a)===null)continue;break}var p=qn(a);p!==null&&(t.splice(n,3),n-=3,a={pending:!0,data:d,method:a.method,action:l},Object.freeze(a),on(p,a,l,d))}}))}function jh(t){function n(O){return qm(O,t)}So!==null&&qm(So,t),xo!==null&&qm(xo,t),Eo!==null&&qm(Eo,t),Of.forEach(n),Rf.forEach(n);for(var a=0;a<Co.length;a++){var l=Co[a];l.blockedOn===t&&(l.blockedOn=null)}for(;0<Co.length&&(a=Co[0],a.blockedOn===null);)XC(a),a.blockedOn===null&&Co.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var d=a[l],p=a[l+1],T=d[kn]||null;if(typeof p=="function")T||QC(a);else if(T){var C=null;if(p&&p.hasAttribute("formAction")){if(d=p,T=p[kn]||null)C=T.formAction;else if(ib(d)!==null)continue}else C=T.action;typeof C=="function"?a[l+1]=C:(a.splice(l,3),l-=3),QC(a)}}}function nb(t){this._internalRoot=t}function Fm(t){this._internalRoot=t}function KC(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 hi=LD(),sb=Ri,eL=ND(),it=Object.assign,tL=Symbol.for("react.element"),ro=Symbol.for("react.transitional.element"),cc=Symbol.for("react.portal"),dc=Symbol.for("react.fragment"),Hm=Symbol.for("react.strict_mode"),rb=Symbol.for("react.profiler"),iL=Symbol.for("react.provider"),ab=Symbol.for("react.consumer"),Sr=Symbol.for("react.context"),zh=Symbol.for("react.forward_ref"),ob=Symbol.for("react.suspense"),lb=Symbol.for("react.suspense_list"),jm=Symbol.for("react.memo"),Xn=Symbol.for("react.lazy"),ub=Symbol.for("react.activity"),nL=Symbol.for("react.memo_cache_sentinel"),ZC=Symbol.iterator,sL=Symbol.for("react.client.reference"),Fi=Array.isArray,se=sb.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_t=eL.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rL=Object.freeze({pending:!1,data:null,method:null,action:null}),cb=[],db=[],ca=-1,ao=xe(null),Vh=xe(null),oo=xe(null),zm=xe(null),da=Object.prototype.hasOwnProperty,hb=hi.unstable_scheduleCallback,aL=hi.unstable_cancelCallback,oL=hi.unstable_shouldYield,lL=hi.unstable_requestPaint,xr=hi.unstable_now,uL=hi.unstable_getCurrentPriorityLevel,fb=hi.unstable_ImmediatePriority,pb=hi.unstable_UserBlockingPriority,hc=hi.unstable_NormalPriority,cL=hi.unstable_LowPriority,mb=hi.unstable_IdlePriority,dL=hi.log,hL=hi.unstable_setDisableYieldValue,fc=null,Ki=null,Ae=null,Er=!1,Ps=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",ln=Math.clz32?Math.clz32:Vt,fL=Math.log,pL=Math.LN2,Vm=256,$m=4194304,cs=2,Cr=8,ha=32,Gm=268435456,lo=Math.random().toString(36).slice(2),Zi="__reactFiber$"+lo,kn="__reactProps$"+lo,uo="__reactContainer$"+lo,gb="__reactEvents$"+lo,mL="__reactListeners$"+lo,gL="__reactHandles$"+lo,JC="__reactResources$"+lo,$h="__reactMarker$"+lo,ew=new Set,_l={},yb={},yL={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},vL=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]*$"),tw={},iw={},Gh=0,nw,sw,rw,aw,ow,lw,uw;ws.__reactDisabledLog=!0;var vb,cw,bb=!1,_b=new(typeof WeakMap=="function"?WeakMap:Map),Wn=null,wr=!1,bL=/[\n"\\]/g,dw=!1,hw=!1,fw=!1,pw=!1,mw=!1,gw=!1,yw=["value","defaultValue"],vw=!1,bw=/["'&<>\n\t]|^\s|\s$/,_L="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(" "),_w="applet caption html table td th marquee object template foreignObject desc title".split(" "),TL=_w.concat(["button"]),SL="dd dt li option optgroup p rp rt".split(" "),Tw={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Ym={},Tb={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"]},Sw=/([A-Z])/g,xw=/^ms-/,xL=/^(?:webkit|moz|o)[A-Z]/,EL=/^-ms-/,CL=/-(.)/g,Ew=/;\s*$/,pc={},Sb={},Cw=!1,ww=!1,Aw=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(" ")),Xm="http://www.w3.org/1998/Math/MathML",mc="http://www.w3.org/2000/svg",wL=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"]]),Wm={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"},Dw={"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={},AL=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]*$"),DL=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]*$"),kw=!1,un={},Ow=/^on./,kL=/^on[^A-Z]/,OL=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]*$"),RL=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]*$"),ML=/^[\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,Yh=null,yc=null,vc=null,xb=!1,Ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eb=!1;if(Ar)try{var Xh={};Object.defineProperty(Xh,"passive",{get:function(){Eb=!0}}),window.addEventListener("test",Xh,Xh),window.removeEventListener("test",Xh,Xh)}catch{Eb=!1}var co=null,Cb=null,Qm=null,Tl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Km=Ni(Tl),Wh=it({},Tl,{view:0,detail:0}),LL=Ni(Wh),wb,Ab,Qh,Zm=it({},Wh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qu,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!==Qh&&(Qh&&t.type==="mousemove"?(wb=t.screenX-Qh.screenX,Ab=t.screenY-Qh.screenY):Ab=wb=0,Qh=t),wb)},movementY:function(t){return"movementY"in t?t.movementY:Ab}}),Rw=Ni(Zm),IL=it({},Zm,{dataTransfer:0}),NL=Ni(IL),PL=it({},Wh,{relatedTarget:0}),Db=Ni(PL),BL=it({},Tl,{animationName:0,elapsedTime:0,pseudoElement:0}),UL=Ni(BL),qL=it({},Tl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),FL=Ni(qL),HL=it({},Tl,{data:0}),Mw=Ni(HL),jL=Mw,zL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VL={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"},$L={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},GL=it({},Wh,{key:function(t){if(t.key){var n=zL[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Bu(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?VL[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qu,charCode:function(t){return t.type==="keypress"?Bu(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Bu(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),YL=Ni(GL),XL=it({},Zm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lw=Ni(XL),WL=it({},Wh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qu}),QL=Ni(WL),KL=it({},Tl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZL=Ni(KL),JL=it({},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}),e6=Ni(JL),t6=it({},Tl,{newState:0,oldState:0}),i6=Ni(t6),n6=[9,13,27,32],Iw=229,kb=Ar&&"CompositionEvent"in window,Kh=null;Ar&&"documentMode"in document&&(Kh=document.documentMode);var s6=Ar&&"TextEvent"in window&&!Kh,Nw=Ar&&(!kb||Kh&&8<Kh&&11>=Kh),Pw=32,Bw=String.fromCharCode(Pw),Uw=!1,bc=!1,r6={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,qw=!1;Ar&&(qw=Xy("input")&&(!document.documentMode||9<document.documentMode));var cn=typeof Object.is=="function"?Object.is:Ko,a6=Ar&&"documentMode"in document&&11>=document.documentMode,_c=null,Ob=null,ef=null,Rb=!1,Tc={animationend:Wr("Animation","AnimationEnd"),animationiteration:Wr("Animation","AnimationIteration"),animationstart:Wr("Animation","AnimationStart"),transitionrun:Wr("Transition","TransitionRun"),transitionstart:Wr("Transition","TransitionStart"),transitioncancel:Wr("Transition","TransitionCancel"),transitionend:Wr("Transition","TransitionEnd")},Mb={},Fw={};Ar&&(Fw=document.createElement("div").style,"AnimationEvent"in window||(delete Tc.animationend.animation,delete Tc.animationiteration.animation,delete Tc.animationstart.animation),"TransitionEvent"in window||delete Tc.transitionend.transition);var Hw=Qr("animationend"),jw=Qr("animationiteration"),zw=Qr("animationstart"),o6=Qr("transitionrun"),l6=Qr("transitionstart"),u6=Qr("transitioncancel"),Vw=Qr("transitionend"),$w=new Map,Lb="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(" ");Lb.push("scrollEnd");var Ib=new WeakMap,Jm=1,fa=2,ds=[],Sc=0,Nb=0,ho={};Object.freeze(ho);var hs=null,xc=null,Ft=0,c6=1,Hi=2,Ji=8,Bs=16,Gw=64,Yw=!1;try{var Xw=Object.preventExtensions({})}catch{Yw=!0}var Ec=[],Cc=0,eg=null,tg=0,fs=[],ps=0,Sl=null,pa=1,ma="",dn=null,ei=null,mt=!1,ga=!1,ms=null,xl=null,Dr=!1,Pb=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."),Ww=0;if(typeof performance=="object"&&typeof performance.now=="function")var d6=performance,Qw=function(){return d6.now()};else{var h6=Date;Qw=function(){return h6.now()}}var Bb=xe(null),Ub=xe(null),Kw={},ig=null,wc=null,Ac=!1,f6=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,l){t.push(l)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},p6=hi.unstable_scheduleCallback,m6=hi.unstable_NormalPriority,yi={$$typeof:Sr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Dc=hi.unstable_now,Zw=-0,ng=-0,On=-1.1,El=-0,sg=!1,rg=!1,tf=null,qb=0,Cl=0,kc=null,Jw=se.S;se.S=function(t,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&nh(t,n),Jw!==null&&Jw(t,n)};var wl=xe(null),Us={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},nf=[],sf=[],rf=[],af=[],of=[],lf=[],Al=new Set;Us.recordUnsafeLifecycleWarnings=function(t,n){Al.has(t.type)||(typeof n.componentWillMount=="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&nf.push(t),t.mode&Ji&&typeof n.UNSAFE_componentWillMount=="function"&&sf.push(t),typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&rf.push(t),t.mode&Ji&&typeof n.UNSAFE_componentWillReceiveProps=="function"&&af.push(t),typeof n.componentWillUpdate=="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&of.push(t),t.mode&Ji&&typeof n.UNSAFE_componentWillUpdate=="function"&&lf.push(t))},Us.flushPendingUnsafeLifecycleWarnings=function(){var t=new Set;0<nf.length&&(nf.forEach(function(C){t.add(te(C)||"Component"),Al.add(C.type)}),nf=[]);var n=new Set;0<sf.length&&(sf.forEach(function(C){n.add(te(C)||"Component"),Al.add(C.type)}),sf=[]);var a=new Set;0<rf.length&&(rf.forEach(function(C){a.add(te(C)||"Component"),Al.add(C.type)}),rf=[]);var l=new Set;0<af.length&&(af.forEach(function(C){l.add(te(C)||"Component"),Al.add(C.type)}),af=[]);var d=new Set;0<of.length&&(of.forEach(function(C){d.add(te(C)||"Component"),Al.add(C.type)}),of=[]);var p=new Set;if(0<lf.length&&(lf.forEach(function(C){p.add(te(C)||"Component"),Al.add(C.type)}),lf=[]),0<n.size){var T=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`,T)}0<l.size&&(T=x(l),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`,T)),0<p.size&&(T=x(p),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`,T)),0<t.size&&(T=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`,T)),0<a.size&&(T=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`,T)),0<d.size&&(T=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`,T))};var ag=new Map,eA=new Set;Us.recordLegacyContextWarning=function(t,n){for(var a=null,l=t;l!==null;)l.mode&Ji&&(a=l),l=l.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."):!eA.has(t.type)&&(l=ag.get(a),t.type.contextTypes!=null||t.type.childContextTypes!=null||n!==null&&typeof n.getChildContext=="function")&&(l===void 0&&(l=[],ag.set(a,l)),l.push(t))},Us.flushLegacyContextWarning=function(){ag.forEach(function(t){if(t.length!==0){var n=t[0],a=new Set;t.forEach(function(d){a.add(te(d)||"Component"),eA.add(d.type)});var l=x(a);Ne(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`,l)})}})},Us.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`."),tA=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."),Fb={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,gs=0,ys=1,hn=2,ji=4,vi=8,iA=0,nA=1,sA=2,Hb=3,fo=!1,rA=!1,jb=null,zb=!1,Oc=xe(null),ug=xe(0),Rc,aA=new Set,oA=new Set,Vb=new Set,lA=new Set,po=0,$e=null,It=null,fi=null,cg=!1,Mc=!1,Dl=!1,dg=0,df=0,ya=null,g6=0,y6=25,ne=null,vs=null,va=-1,hf=!1,hg={readContext:qt,use:zn,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useLayoutEffect:Wt,useInsertionEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useSyncExternalStore:Wt,useId:Wt,useHostTransitionStatus:Wt,useFormState:Wt,useActionState:Wt,useOptimistic:Wt,useMemoCache:Wt,useCacheRefresh:Wt},$b=null,uA=null,Gb=null,cA=null,kr=null,qs=null,fg=null;$b={readContext:function(t){return qt(t)},use:zn,useCallback:function(t,n){return ne="useCallback",tt(),Ya(n),Jt(t,n)},useContext:function(t){return ne="useContext",tt(),qt(t)},useEffect:function(t,n){return ne="useEffect",tt(),Ya(n),ie(t,n)},useImperativeHandle:function(t,n,a){return ne="useImperativeHandle",tt(),Ya(a),qe(t,n,a)},useInsertionEffect:function(t,n){ne="useInsertionEffect",tt(),Ya(n),P(4,hn,t,n)},useLayoutEffect:function(t,n){return ne="useLayoutEffect",tt(),Ya(n),Te(t,n)},useMemo:function(t,n){ne="useMemo",tt(),Ya(n);var a=se.H;se.H=kr;try{return os(t,n)}finally{se.H=a}},useReducer:function(t,n,a){ne="useReducer",tt();var l=se.H;se.H=kr;try{return _h(t,n,a)}finally{se.H=l}},useRef:function(t){return ne="useRef",tt(),N(t)},useState:function(t){ne="useState",tt();var n=se.H;se.H=kr;try{return Dn(t)}finally{se.H=n}},useDebugValue:function(){ne="useDebugValue",tt()},useDeferredValue:function(t,n){return ne="useDeferredValue",tt(),na(t,n)},useTransition:function(){return ne="useTransition",tt(),nv()},useSyncExternalStore:function(t,n,a){return ne="useSyncExternalStore",tt(),gl(t,n,a)},useId:function(){return ne="useId",tt(),sv()},useFormState:function(t,n){return ne="useFormState",tt(),Ju(),g(t,n)},useActionState:function(t,n){return ne="useActionState",tt(),g(t,n)},useOptimistic:function(t){return ne="useOptimistic",tt(),xh(t)},useHostTransitionStatus:yl,useMemoCache:as,useCacheRefresh:function(){return ne="useCacheRefresh",tt(),rv()}},uA={readContext:function(t){return qt(t)},use:zn,useCallback:function(t,n){return ne="useCallback",fe(),Jt(t,n)},useContext:function(t){return ne="useContext",fe(),qt(t)},useEffect:function(t,n){return ne="useEffect",fe(),ie(t,n)},useImperativeHandle:function(t,n,a){return ne="useImperativeHandle",fe(),qe(t,n,a)},useInsertionEffect:function(t,n){ne="useInsertionEffect",fe(),P(4,hn,t,n)},useLayoutEffect:function(t,n){return ne="useLayoutEffect",fe(),Te(t,n)},useMemo:function(t,n){ne="useMemo",fe();var a=se.H;se.H=kr;try{return os(t,n)}finally{se.H=a}},useReducer:function(t,n,a){ne="useReducer",fe();var l=se.H;se.H=kr;try{return _h(t,n,a)}finally{se.H=l}},useRef:function(t){return ne="useRef",fe(),N(t)},useState:function(t){ne="useState",fe();var n=se.H;se.H=kr;try{return Dn(t)}finally{se.H=n}},useDebugValue:function(){ne="useDebugValue",fe()},useDeferredValue:function(t,n){return ne="useDeferredValue",fe(),na(t,n)},useTransition:function(){return ne="useTransition",fe(),nv()},useSyncExternalStore:function(t,n,a){return ne="useSyncExternalStore",fe(),gl(t,n,a)},useId:function(){return ne="useId",fe(),sv()},useActionState:function(t,n){return ne="useActionState",fe(),g(t,n)},useFormState:function(t,n){return ne="useFormState",fe(),Ju(),g(t,n)},useOptimistic:function(t){return ne="useOptimistic",fe(),xh(t)},useHostTransitionStatus:yl,useMemoCache:as,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),rv()}},Gb={readContext:function(t){return qt(t)},use:zn,useCallback:function(t,n){return ne="useCallback",fe(),Ai(t,n)},useContext:function(t){return ne="useContext",fe(),qt(t)},useEffect:function(t,n){ne="useEffect",fe(),z(2048,vi,t,n)},useImperativeHandle:function(t,n,a){return ne="useImperativeHandle",fe(),je(t,n,a)},useInsertionEffect:function(t,n){return ne="useInsertionEffect",fe(),z(4,hn,t,n)},useLayoutEffect:function(t,n){return ne="useLayoutEffect",fe(),z(4,ji,t,n)},useMemo:function(t,n){ne="useMemo",fe();var a=se.H;se.H=qs;try{return gr(t,n)}finally{se.H=a}},useReducer:function(t,n,a){ne="useReducer",fe();var l=se.H;se.H=qs;try{return Wa(t,n,a)}finally{se.H=l}},useRef:function(){return ne="useRef",fe(),vt().memoizedState},useState:function(){ne="useState",fe();var t=se.H;se.H=qs;try{return Wa(Vn)}finally{se.H=t}},useDebugValue:function(){ne="useDebugValue",fe()},useDeferredValue:function(t,n){return ne="useDeferredValue",fe(),Qa(t,n)},useTransition:function(){return ne="useTransition",fe(),Yx()},useSyncExternalStore:function(t,n,a){return ne="useSyncExternalStore",fe(),ec(t,n,a)},useId:function(){return ne="useId",fe(),vt().memoizedState},useFormState:function(t){return ne="useFormState",fe(),Ju(),y(t)},useActionState:function(t){return ne="useActionState",fe(),y(t)},useOptimistic:function(t,n){return ne="useOptimistic",fe(),Eh(t,n)},useHostTransitionStatus:yl,useMemoCache:as,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),vt().memoizedState}},cA={readContext:function(t){return qt(t)},use:zn,useCallback:function(t,n){return ne="useCallback",fe(),Ai(t,n)},useContext:function(t){return ne="useContext",fe(),qt(t)},useEffect:function(t,n){ne="useEffect",fe(),z(2048,vi,t,n)},useImperativeHandle:function(t,n,a){return ne="useImperativeHandle",fe(),je(t,n,a)},useInsertionEffect:function(t,n){return ne="useInsertionEffect",fe(),z(4,hn,t,n)},useLayoutEffect:function(t,n){return ne="useLayoutEffect",fe(),z(4,ji,t,n)},useMemo:function(t,n){ne="useMemo",fe();var a=se.H;se.H=fg;try{return gr(t,n)}finally{se.H=a}},useReducer:function(t,n,a){ne="useReducer",fe();var l=se.H;se.H=fg;try{return ml(t,n,a)}finally{se.H=l}},useRef:function(){return ne="useRef",fe(),vt().memoizedState},useState:function(){ne="useState",fe();var t=se.H;se.H=fg;try{return ml(Vn)}finally{se.H=t}},useDebugValue:function(){ne="useDebugValue",fe()},useDeferredValue:function(t,n){return ne="useDeferredValue",fe(),Ka(t,n)},useTransition:function(){return ne="useTransition",fe(),Xx()},useSyncExternalStore:function(t,n,a){return ne="useSyncExternalStore",fe(),ec(t,n,a)},useId:function(){return ne="useId",fe(),vt().memoizedState},useFormState:function(t){return ne="useFormState",fe(),Ju(),E(t)},useActionState:function(t){return ne="useActionState",fe(),E(t)},useOptimistic:function(t,n){return ne="useOptimistic",fe(),hm(t,n)},useHostTransitionStatus:yl,useMemoCache:as,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),vt().memoizedState}},kr={readContext:function(t){return b(),qt(t)},use:function(t){return m(),zn(t)},useCallback:function(t,n){return ne="useCallback",m(),tt(),Jt(t,n)},useContext:function(t){return ne="useContext",m(),tt(),qt(t)},useEffect:function(t,n){return ne="useEffect",m(),tt(),ie(t,n)},useImperativeHandle:function(t,n,a){return ne="useImperativeHandle",m(),tt(),qe(t,n,a)},useInsertionEffect:function(t,n){ne="useInsertionEffect",m(),tt(),P(4,hn,t,n)},useLayoutEffect:function(t,n){return ne="useLayoutEffect",m(),tt(),Te(t,n)},useMemo:function(t,n){ne="useMemo",m(),tt();var a=se.H;se.H=kr;try{return os(t,n)}finally{se.H=a}},useReducer:function(t,n,a){ne="useReducer",m(),tt();var l=se.H;se.H=kr;try{return _h(t,n,a)}finally{se.H=l}},useRef:function(t){return ne="useRef",m(),tt(),N(t)},useState:function(t){ne="useState",m(),tt();var n=se.H;se.H=kr;try{return Dn(t)}finally{se.H=n}},useDebugValue:function(){ne="useDebugValue",m(),tt()},useDeferredValue:function(t,n){return ne="useDeferredValue",m(),tt(),na(t,n)},useTransition:function(){return ne="useTransition",m(),tt(),nv()},useSyncExternalStore:function(t,n,a){return ne="useSyncExternalStore",m(),tt(),gl(t,n,a)},useId:function(){return ne="useId",m(),tt(),sv()},useFormState:function(t,n){return ne="useFormState",m(),tt(),g(t,n)},useActionState:function(t,n){return ne="useActionState",m(),tt(),g(t,n)},useOptimistic:function(t){return ne="useOptimistic",m(),tt(),xh(t)},useMemoCache:function(t){return m(),as(t)},useHostTransitionStatus:yl,useCacheRefresh:function(){return ne="useCacheRefresh",tt(),rv()}},qs={readContext:function(t){return b(),qt(t)},use:function(t){return m(),zn(t)},useCallback:function(t,n){return ne="useCallback",m(),fe(),Ai(t,n)},useContext:function(t){return ne="useContext",m(),fe(),qt(t)},useEffect:function(t,n){ne="useEffect",m(),fe(),z(2048,vi,t,n)},useImperativeHandle:function(t,n,a){return ne="useImperativeHandle",m(),fe(),je(t,n,a)},useInsertionEffect:function(t,n){return ne="useInsertionEffect",m(),fe(),z(4,hn,t,n)},useLayoutEffect:function(t,n){return ne="useLayoutEffect",m(),fe(),z(4,ji,t,n)},useMemo:function(t,n){ne="useMemo",m(),fe();var a=se.H;se.H=qs;try{return gr(t,n)}finally{se.H=a}},useReducer:function(t,n,a){ne="useReducer",m(),fe();var l=se.H;se.H=qs;try{return Wa(t,n,a)}finally{se.H=l}},useRef:function(){return ne="useRef",m(),fe(),vt().memoizedState},useState:function(){ne="useState",m(),fe();var t=se.H;se.H=qs;try{return Wa(Vn)}finally{se.H=t}},useDebugValue:function(){ne="useDebugValue",m(),fe()},useDeferredValue:function(t,n){return ne="useDeferredValue",m(),fe(),Qa(t,n)},useTransition:function(){return ne="useTransition",m(),fe(),Yx()},useSyncExternalStore:function(t,n,a){return ne="useSyncExternalStore",m(),fe(),ec(t,n,a)},useId:function(){return ne="useId",m(),fe(),vt().memoizedState},useFormState:function(t){return ne="useFormState",m(),fe(),y(t)},useActionState:function(t){return ne="useActionState",m(),fe(),y(t)},useOptimistic:function(t,n){return ne="useOptimistic",m(),fe(),Eh(t,n)},useMemoCache:function(t){return m(),as(t)},useHostTransitionStatus:yl,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),vt().memoizedState}},fg={readContext:function(t){return b(),qt(t)},use:function(t){return m(),zn(t)},useCallback:function(t,n){return ne="useCallback",m(),fe(),Ai(t,n)},useContext:function(t){return ne="useContext",m(),fe(),qt(t)},useEffect:function(t,n){ne="useEffect",m(),fe(),z(2048,vi,t,n)},useImperativeHandle:function(t,n,a){return ne="useImperativeHandle",m(),fe(),je(t,n,a)},useInsertionEffect:function(t,n){return ne="useInsertionEffect",m(),fe(),z(4,hn,t,n)},useLayoutEffect:function(t,n){return ne="useLayoutEffect",m(),fe(),z(4,ji,t,n)},useMemo:function(t,n){ne="useMemo",m(),fe();var a=se.H;se.H=qs;try{return gr(t,n)}finally{se.H=a}},useReducer:function(t,n,a){ne="useReducer",m(),fe();var l=se.H;se.H=qs;try{return ml(t,n,a)}finally{se.H=l}},useRef:function(){return ne="useRef",m(),fe(),vt().memoizedState},useState:function(){ne="useState",m(),fe();var t=se.H;se.H=qs;try{return ml(Vn)}finally{se.H=t}},useDebugValue:function(){ne="useDebugValue",m(),fe()},useDeferredValue:function(t,n){return ne="useDeferredValue",m(),fe(),Ka(t,n)},useTransition:function(){return ne="useTransition",m(),fe(),Xx()},useSyncExternalStore:function(t,n,a){return ne="useSyncExternalStore",m(),fe(),ec(t,n,a)},useId:function(){return ne="useId",m(),fe(),vt().memoizedState},useFormState:function(t){return ne="useFormState",m(),fe(),E(t)},useActionState:function(t){return ne="useActionState",m(),fe(),E(t)},useOptimistic:function(t,n){return ne="useOptimistic",m(),fe(),hm(t,n)},useMemoCache:function(t){return m(),as(t)},useHostTransitionStatus:yl,useCacheRefresh:function(){return ne="useCacheRefresh",fe(),vt().memoizedState}};var dA={"react-stack-bottom-frame":function(t,n,a){var l=wr;wr=!0;try{return t(n,a)}finally{wr=l}}},Yb=dA["react-stack-bottom-frame"].bind(dA),hA={"react-stack-bottom-frame":function(t){var n=wr;wr=!0;try{return t.render()}finally{wr=n}}},fA=hA["react-stack-bottom-frame"].bind(hA),pA={"react-stack-bottom-frame":function(t,n){try{n.componentDidMount()}catch(a){Mt(t,t.return,a)}}},Xb=pA["react-stack-bottom-frame"].bind(pA),mA={"react-stack-bottom-frame":function(t,n,a,l,d){try{n.componentDidUpdate(a,l,d)}catch(p){Mt(t,t.return,p)}}},gA=mA["react-stack-bottom-frame"].bind(mA),yA={"react-stack-bottom-frame":function(t,n){var a=n.stack;t.componentDidCatch(n.value,{componentStack:a!==null?a:""})}},v6=yA["react-stack-bottom-frame"].bind(yA),vA={"react-stack-bottom-frame":function(t,n,a){try{a.componentWillUnmount()}catch(l){Mt(t,n,l)}}},bA=vA["react-stack-bottom-frame"].bind(vA),_A={"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}},b6=_A["react-stack-bottom-frame"].bind(_A),TA={"react-stack-bottom-frame":function(t,n,a){try{a()}catch(l){Mt(t,n,l)}}},_6=TA["react-stack-bottom-frame"].bind(TA),SA={"react-stack-bottom-frame":function(t){var n=t._init;return n(t._payload)}},mo=SA["react-stack-bottom-frame"].bind(SA),Lc=null,ff=0,et=null,Wb,xA=Wb=!1,EA={},CA={},wA={};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 l=te(t),d=l||"null";if(!EA[d]){EA[d]=!0,a=a._owner,t=t._debugOwner;var p="";t&&typeof t.tag=="number"&&(d=te(t))&&(p=`
Check the render method of \``+d+"`."),p||l&&(p=`
Check the top-level render call using <`+l+">.");var T="";a!=null&&t!==a&&(l=null,typeof a.tag=="number"?l=te(a):typeof a.name=="string"&&(l=a.name),l&&(T=" It was passed a child from "+l+".")),Ne(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.',p,T)})}}};var Ic=Zx(!0),AA=Zx(!1),bs=xe(null),Or=null,Nc=1,pf=2,bi=xe(0),DA={},kA=new Set,OA=new Set,RA=new Set,MA=new Set,LA=new Set,IA=new Set,NA=new Set,PA=new Set,BA=new Set,UA=new Set;Object.freeze(DA);var Qb={enqueueSetState:function(t,n,a){t=t._reactInternals;var l=Yn(t),d=An(l);d.payload=n,a!=null&&(ov(a),d.callback=a),n=fr(t,d,l),n!==null&&(ai(n,t,l),Ga(n,t,l)),At(t,l)},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var l=Yn(t),d=An(l);d.tag=nA,d.payload=n,a!=null&&(ov(a),d.callback=a),n=fr(t,d,l),n!==null&&(ai(n,t,l),Ga(n,t,l)),At(t,l)},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=Yn(t),l=An(a);l.tag=sA,n!=null&&(ov(n),l.callback=n),n=fr(t,l,a),n!==null&&(ai(n,t,a),Ga(n,t,a)),Ae!==null&&typeof Ae.markForceUpdateScheduled=="function"&&Ae.markForceUpdateScheduled(t,a)}},Kb=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)},Pc=null,Zb=null,qA=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."),ki=!1,FA={},HA={},jA={},zA={},Bc=!1,VA={},Jb={},e_={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},$A=!1,GA=null;GA=new Set;var ba=!1,oi=!1,t_=!1,YA=typeof WeakSet=="function"?WeakSet:Set,Oi=null,Uc=null,qc=null,pi=null,Rn=!1,Fs=null,mf=8192,T6={getCacheForType:function(t){var n=qt(yi),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},getOwner:function(){return Wn}};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 S6=[],x6=typeof WeakMap=="function"?WeakMap:Map,Qn=0,fn=2,Hs=4,_a=0,yf=1,Fc=2,i_=3,kl=4,pg=6,XA=5,Tt=Qn,Pt=null,st=null,rt=0,Mn=0,vf=1,Ol=2,bf=3,WA=4,n_=5,Hc=6,_f=7,s_=8,Rl=9,Ct=Mn,Kn=null,go=!1,jc=!1,r_=!1,Rr=0,ti=_a,yo=0,vo=0,a_=0,Zn=0,Ml=0,Tf=null,pn=null,mg=!1,o_=0,QA=300,gg=1/0,KA=500,Sf=null,bo=null,E6=0,C6=1,w6=2,Ll=0,ZA=1,JA=2,eD=3,A6=4,l_=5,zi=0,_o=null,zc=null,To=0,u_=0,c_=null,tD=null,D6=50,xf=0,d_=null,h_=!1,yg=!1,k6=50,Il=0,Ef=null,Vc=!1,vg=null,iD=!1,nD=new Set,O6={},bg=null,$c=null,f_=!1,p_=!1,_g=!1,m_=!1,Nl=0,g_={};(function(){for(var t=0;t<Lb.length;t++){var n=Lb[t],a=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),Hn(a,"on"+n)}Hn(Hw,"onAnimationEnd"),Hn(jw,"onAnimationIteration"),Hn(zw,"onAnimationStart"),Hn("dblclick","onDoubleClick"),Hn("focusin","onFocus"),Hn("focusout","onBlur"),Hn(o6,"onTransitionRun"),Hn(l6,"onTransitionStart"),Hn(u6,"onTransitionCancel"),Hn(Vw,"onTransitionEnd")})(),Ee("onMouseEnter",["mouseout","mouseover"]),Ee("onMouseLeave",["mouseout","mouseover"]),Ee("onPointerEnter",["pointerout","pointerover"]),Ee("onPointerLeave",["pointerout","pointerover"]),ge("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ge("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ge("onBeforeInput",["compositionend","keypress","textInput","paste"]),ge("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ge("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ge("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cf="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(" "),y_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cf)),Tg="_reactListening"+Math.random().toString(36).slice(2),sD=!1,rD=!1,Sg=!1,aD=!1,xg=!1,Eg=!1,oD=!1,Cg={},R6=/\r\n?/g,M6=/\u0000|\uFFFD/g,Pl="http://www.w3.org/1999/xlink",v_="http://www.w3.org/XML/1998/namespace",L6="javascript:throw new Error('React form unexpectedly submitted.')",I6="suppressHydrationWarning",wg="$",Ag="/$",Ta="$?",wf="$!",N6=1,P6=2,B6=4,b_="F!",lD="F",uD="complete",U6="style",Sa=0,Gc=1,Dg=2,__=null,T_=null,cD={dialog:!0,webview:!0},S_=null,dD=typeof setTimeout=="function"?setTimeout:void 0,q6=typeof clearTimeout=="function"?clearTimeout:void 0,Bl=-1,hD=typeof Promise=="function"?Promise:void 0,F6=typeof queueMicrotask=="function"?queueMicrotask:typeof hD<"u"?function(t){return hD.resolve(null).then(t).catch(CM)}:dD,x_=null,Ul=0,Af=1,fD=2,pD=3,_s=4,Ts=new Map,mD=new Set,xa=_t.d;_t.d={f:function(){var t=xa.f(),n=sc();return t||n},r:function(t){var n=qn(t);n!==null&&n.tag===5&&n.type==="form"?Gx(n):xa.r(t)},D:function(t){xa.D(t),NC("dns-prefetch",t,null)},C:function(t,n){xa.C(t,n),NC("preconnect",t,n)},L:function(t,n,a){xa.L(t,n,a);var l=Yc;if(l&&t&&n){var d='link[rel="preload"][as="'+di(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+di(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+di(a.imageSizes)+'"]')):d+='[href="'+di(t)+'"]';var p=d;switch(n){case"style":p=lc(t);break;case"script":p=uc(t)}Ts.has(p)||(t=it({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),Ts.set(p,t),l.querySelector(d)!==null||n==="style"&&l.querySelector(qh(p))||n==="script"&&l.querySelector(Fh(p))||(n=l.createElement("link"),qi(n,"link",t),X(n),l.head.appendChild(n)))}},m:function(t,n){xa.m(t,n);var a=Yc;if(a&&t){var l=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+di(l)+'"][href="'+di(t)+'"]',p=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=uc(t)}if(!Ts.has(p)&&(t=it({rel:"modulepreload",href:t},n),Ts.set(p,t),a.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fh(p)))return}l=a.createElement("link"),qi(l,"link",t),X(l),a.head.appendChild(l)}}},X:function(t,n){xa.X(t,n);var a=Yc;if(a&&t){var l=D(a).hoistableScripts,d=uc(t),p=l.get(d);p||(p=a.querySelector(Fh(d)),p||(t=it({src:t,async:!0},n),(n=Ts.get(d))&&Qv(t,n),p=a.createElement("script"),X(p),qi(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(d,p))}},S:function(t,n,a){xa.S(t,n,a);var l=Yc;if(l&&t){var d=D(l).hoistableStyles,p=lc(t);n=n||"default";var T=d.get(p);if(!T){var C={loading:Ul,preload:null};if(T=l.querySelector(qh(p)))C.loading=Af|_s;else{t=it({rel:"stylesheet",href:t,"data-precedence":n},a),(a=Ts.get(p))&&Wv(t,a);var O=T=l.createElement("link");X(O),qi(O,"link",t),O._p=new Promise(function(I,Z){O.onload=I,O.onerror=Z}),O.addEventListener("load",function(){C.loading|=Af}),O.addEventListener("error",function(){C.loading|=fD}),C.loading|=_s,Pm(T,n,l)}T={type:"stylesheet",instance:T,count:1,state:C},d.set(p,T)}}},M:function(t,n){xa.M(t,n);var a=Yc;if(a&&t){var l=D(a).hoistableScripts,d=uc(t),p=l.get(d);p||(p=a.querySelector(Fh(d)),p||(t=it({src:t,async:!0,type:"module"},n),(n=Ts.get(d))&&Qv(t,n),p=a.createElement("script"),X(p),qi(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(d,p))}}};var Yc=typeof document>"u"?null:document,kg=null,Df=null,E_=null,Og=null,ql=rL,kf={$$typeof:Sr,Provider:null,Consumer:null,_currentValue:ql,_currentValue2:ql,_threadCount:0},gD="%c%s%c ",yD="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",vD="",Rg=" ",H6=Function.prototype.bind,bD=!1,_D=null,TD=null,SD=null,xD=null,ED=null,CD=null,wD=null,AD=null,DD=null;_D=function(t,n,a,l){n=s(t,n),n!==null&&(a=e(n.memoizedState,a,0,l),n.memoizedState=a,n.baseState=a,t.memoizedProps=it({},t.memoizedProps),a=mi(t,2),a!==null&&ai(a,t,2))},TD=function(t,n,a){n=s(t,n),n!==null&&(a=o(n.memoizedState,a,0),n.memoizedState=a,n.baseState=a,t.memoizedProps=it({},t.memoizedProps),a=mi(t,2),a!==null&&ai(a,t,2))},SD=function(t,n,a,l){n=s(t,n),n!==null&&(a=i(n.memoizedState,a,l),n.memoizedState=a,n.baseState=a,t.memoizedProps=it({},t.memoizedProps),a=mi(t,2),a!==null&&ai(a,t,2))},xD=function(t,n,a){t.pendingProps=e(t.memoizedProps,n,0,a),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=mi(t,2),n!==null&&ai(n,t,2)},ED=function(t,n){t.pendingProps=o(t.memoizedProps,n,0),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=mi(t,2),n!==null&&ai(n,t,2)},CD=function(t,n,a){t.pendingProps=i(t.memoizedProps,n,a),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=mi(t,2),n!==null&&ai(n,t,2)},wD=function(t){var n=mi(t,2);n!==null&&ai(n,t,2)},AD=function(t){c=t},DD=function(t){u=t};var Mg=!0,Lg=null,C_=!1,So=null,xo=null,Eo=null,Of=new Map,Rf=new Map,Co=[],j6="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(" "),Ig=null;if(Fm.prototype.render=nb.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()."):q(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 l=n.current,d=Yn(l);Zv(l,d,a,n,null,null)},Fm.prototype.unmount=nb.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;(Tt&(fn|Hs))!==Qn&&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."),Zv(t.current,2,null,t,null,null),sc(),n[uo]=null}},Fm.prototype.unstable_scheduleHydration=function(t){if(t){var n=Ua();t={blockedOn:null,target:t,priority:n};for(var a=0;a<Co.length&&n!==0&&n<Co[a].priority;a++);Co.splice(a,0,t),a===0&&XC(t)}},function(){var t=sb.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"),_t.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=W(n),t=t!==null?K(t):null,t=t===null?null:t.stateNode,t},!function(){var t={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:se,reconcilerVersion:"19.1.0"};return t.overrideHookState=_D,t.overrideHookStateDeletePath=TD,t.overrideHookStateRenamePath=SD,t.overrideProps=xD,t.overridePropsDeletePath=ED,t.overridePropsRenamePath=CD,t.scheduleUpdate=wD,t.setErrorHandler=AD,t.setSuspenseHandler=DD,t.scheduleRefresh=L,t.scheduleRoot=R,t.setRefreshHandler=A,t.getCurrentFiber=XM,t.getLaneLabelMap=WM,t.injectProfilingHooks=Me,ht(t)}()&&Ar&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var kD=window.location.protocol;/^(https?|file):$/.test(kD)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(kD==="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(!q(t))throw Error("Target container is not a DOM element.");KC(t);var a=!1,l="",d=iE,p=nE,T=sE,C=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&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(T=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(C=n.unstable_transitionCallbacks)),n=jC(t,1,!1,null,null,a,l,d,p,T,C,null),t[uo]=n.current,qv(t),new nb(n)},Kc.hydrateRoot=function(t,n,a){if(!q(t))throw Error("Target container is not a DOM element.");KC(t),n===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var l=!1,d="",p=iE,T=nE,C=sE,O=null,I=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(T=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(O=a.unstable_transitionCallbacks),a.formState!==void 0&&(I=a.formState)),n=jC(t,1,!0,n,a??null,l,d,p,T,C,O,I),n.context=zC(null),a=n.current,l=Yn(a),l=er(l),d=An(l),d.callback=null,fr(a,d,l),a=l,n.current.lanes=a,$t(n,a),_r(n),t[uo]=n.current,qv(t),new Fm(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}R_.exports=PD();var B_=R_.exports;const V6="";var Zc;typeof window<"u"?Zc=window:typeof Mf<"u"?Zc=Mf:typeof self<"u"?Zc=self:Zc={};var Lf=Zc;const B=Xc(Lf),BD=w_(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var U_=typeof Mf<"u"?Mf:typeof window<"u"?window:{},UD=BD,Jc;typeof document<"u"?Jc=document:(Jc=U_["__GLOBAL_DOCUMENT_CACHE@4"],Jc||(Jc=U_["__GLOBAL_DOCUMENT_CACHE@4"]=UD));var q_=Jc;const me=Xc(q_);var Ug={exports:{}};function Qt(){return Qt=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},Qt.apply(null,arguments)}const qD=w_(Object.freeze(Object.defineProperty({__proto__:null,get default(){return Qt}},Symbol.toStringTag,{value:"Module"})));var FD=jD,HD=Object.prototype.toString;function jD(s){if(!s)return!1;var e=HD.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 zD(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=VD(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 VD(s,e){if(s){if(typeof s=="string")return F_(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 F_(s,e)}}function F_(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 $D=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 u=this.typeToInterceptorsMap_.get(r);return u.has(o)?!1:(u.add(o),!0)},e.removeInterceptor=function(r,o){var u=this.typeToInterceptorsMap_.get(r);return u&&u.has(o)?(u.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 u=this.getForType(r),c=zD(u),f;!(f=c()).done;){var m=f.value;try{o=m(o)}catch{}}return o},s}(),GD=$D,YD=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,u=o.maxAttempts,c=o.delayFactor,f=o.fuzzFactor,m=o.initialDelay;return new XD({maxAttempts:u||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:f||this.fuzzFactor_,initialDelay:m||this.initialDelay_})},s}(),XD=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}(),WD=YD,QD=Lf,KD=function(e,i){return i===void 0&&(i=!1),function(r,o,u){if(r){e(r);return}if(o.statusCode>=400&&o.statusCode<=599){var c=u;if(i)if(QD.TextDecoder){var f=ZD(o.headers&&o.headers["content-type"]);try{c=new TextDecoder(f).decode(u)}catch{}}else c=String.fromCharCode.apply(null,new Uint8Array(u));e({cause:c});return}e(null,u)}};function ZD(s){return s===void 0&&(s=""),s.toLowerCase().split(";").reduce(function(e,i){var r=i.split("="),o=r[0],u=r[1];return o.trim()==="charset"?u.trim():e},"utf-8")}var JD=KD,H_=Lf,ek=qD,tk=FD,j_=GD,ik=WD;ii.httpHandler=JD,ii.requestInterceptorsStorage=new j_,ii.responseInterceptorsStorage=new j_,ii.retryManager=new ik;/**
* @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 nk=function(e){var i={};return e&&e.trim().split(`
`).forEach(function(r){var o=r.indexOf(":"),u=r.slice(0,o).trim().toLowerCase(),c=r.slice(o+1).trim();typeof i[u]>"u"?i[u]=c:Array.isArray(i[u])?i[u].push(c):i[u]=[i[u],c]}),i};Ug.exports=ii,Ug.exports.default=ii,ii.XMLHttpRequest=H_.XMLHttpRequest||ok,ii.XDomainRequest="withCredentials"in new ii.XMLHttpRequest?ii.XMLHttpRequest:H_.XDomainRequest,sk(["get","put","post","patch","head","delete"],function(s){ii[s==="delete"?"del":s]=function(e,i,r){return i=z_(e,i,r),i.method=s.toUpperCase(),qg(i)}});function sk(s,e){for(var i=0;i<s.length;i++)e(s[i])}function rk(s){for(var e in s)if(s.hasOwnProperty(e))return!1;return!0}function z_(s,e,i){var r=s;return tk(e)?(i=e,typeof s=="string"&&(r={uri:s})):r=ek({},e,{uri:s}),r.callback=i,r}function ii(s,e,i){return e=z_(s,e,i),qg(e)}function qg(s){if(typeof s.callback>"u")throw new Error("callback argument missing");if(s.requestType&&ii.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=ii.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(K,le,Y){r||(r=!0,s.callback(K,le,Y))};function u(){b.readyState===4&&!ii.responseInterceptorsStorage.getIsEnabled()&&setTimeout(m,0)}function c(){var W=void 0;if(b.response?W=b.response:W=b.responseText||ak(b),U)try{W=JSON.parse(W)}catch{}return W}function f(W){if(clearTimeout(G),clearTimeout(s.retryTimeout),W instanceof Error||(W=new Error(""+(W||"Unknown XMLHttpRequest Error"))),W.statusCode=0,!x&&ii.retryManager.getIsEnabled()&&s.retry&&s.retry.shouldRetry()){s.retryTimeout=setTimeout(function(){s.retry.moveToNextAttempt(),s.xhr=b,qg(s)},s.retry.getCurrentFuzzedDelay());return}if(s.requestType&&ii.responseInterceptorsStorage.getIsEnabled()){var K={headers:$.headers||{},body:$.body,responseUrl:b.responseURL,responseType:b.responseType},le=ii.responseInterceptorsStorage.execute(s.requestType,K);$.body=le.body,$.headers=le.headers}return o(W,$)}function m(){if(!x){var W;clearTimeout(G),clearTimeout(s.retryTimeout),s.useXDR&&b.status===void 0?W=200:W=b.status===1223?204:b.status;var K=$,le=null;if(W!==0?(K={body:c(),statusCode:W,method:R,headers:{},url:w,rawRequest:b},b.getAllResponseHeaders&&(K.headers=nk(b.getAllResponseHeaders()))):le=new Error("Internal XMLHttpRequest Error"),s.requestType&&ii.responseInterceptorsStorage.getIsEnabled()){var Y={headers:K.headers||{},body:K.body,responseUrl:b.responseURL,responseType:b.responseType},J=ii.responseInterceptorsStorage.execute(s.requestType,Y);K.body=J.body,K.headers=J.headers}return o(le,K,K.body)}}var b=s.xhr||null;b||(s.cors||s.useXDR?b=new ii.XDomainRequest:b=new ii.XMLHttpRequest);var S,x,w=b.url=s.uri||s.url,R=b.method=s.method||"GET",L=s.body||s.data,A=b.headers=s.headers||{},q=!!s.sync,U=!1,G,$={body:void 0,headers:{},statusCode:0,method:R,url:w,rawRequest:b};if("json"in s&&s.json!==!1&&(U=!0,A.accept||A.Accept||(A.Accept="application/json"),R!=="GET"&&R!=="HEAD"&&(A["content-type"]||A["Content-Type"]||(A["Content-Type"]="application/json"),L=JSON.stringify(s.json===!0?L:s.json))),b.onreadystatechange=u,b.onload=m,b.onerror=f,b.onprogress=function(){},b.onabort=function(){x=!0,clearTimeout(s.retryTimeout)},b.ontimeout=f,b.open(R,w,!q,s.username,s.password),q||(b.withCredentials=!!s.withCredentials),!q&&s.timeout>0&&(G=setTimeout(function(){if(!x){x=!0,b.abort("timeout");var W=new Error("XMLHttpRequest timeout");W.code="ETIMEDOUT",f(W)}},s.timeout)),b.setRequestHeader)for(S in A)A.hasOwnProperty(S)&&b.setRequestHeader(S,A[S]);else if(s.headers&&!rk(s.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in s&&(b.responseType=s.responseType),"beforeSend"in s&&typeof s.beforeSend=="function"&&s.beforeSend(b),b.send(L||null),b}function ak(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 ok(){}var lk=Ug.exports;const V_=Xc(lk);var $_={exports:{}},G_=q_,Fg=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 In(s,e){this.name="ParsingError",this.code=s.code,this.message=e||s.message}In.prototype=Fg(Error.prototype),In.prototype.constructor=In,In.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function Hg(s){function e(r,o,u,c){return(r|0)*3600+(o|0)*60+(u|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=Fg(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 u in o)if(typeof o[u]=="string"){var c=o[u].split(i);if(c.length===2){var f=c[0].trim(),m=c[1].trim();e(f,m)}}}function uk(s,e,i){var r=s;function o(){var f=Hg(s);if(f===null)throw new In(In.Errors.BadTimeStamp,"Malformed timestamp: "+r);return s=s.replace(/^[^\sa-zA-Z-]+/,""),f}function u(f,m){var b=new ed;td(f,function(S,x){switch(S){case"region":for(var w=i.length-1;w>=0;w--)if(i[w].id===x){b.set(S,i[w].region);break}break;case"vertical":b.alt(S,x,["rl","lr"]);break;case"line":var R=x.split(","),L=R[0];b.integer(S,L),b.percent(S,L)&&b.set("snapToLines",!1),b.alt(S,L,["auto"]),R.length===2&&b.alt("lineAlign",R[1],["start","center","end"]);break;case"position":R=x.split(","),b.percent(S,R[0]),R.length===2&&b.alt("positionAlign",R[1],["start","center","end"]);break;case"size":b.percent(S,x);break;case"align":b.alt(S,x,["start","center","end","left","right"]);break}},/:/,/\s/),m.region=b.get("region",null),m.vertical=b.get("vertical","");try{m.line=b.get("line","auto")}catch{}m.lineAlign=b.get("lineAlign","start"),m.snapToLines=b.get("snapToLines",!0),m.size=b.get("size",100);try{m.align=b.get("align","center")}catch{m.align=b.get("align","middle")}try{m.position=b.get("position","auto")}catch{m.position=b.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},m.align)}m.positionAlign=b.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},m.align)}function c(){s=s.replace(/^\s+/,"")}if(c(),e.startTime=o(),c(),s.substr(0,3)!=="-->")throw new In(In.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+r);s=s.substr(3),c(),e.endTime=o(),c(),u(s,e)}var jg=G_.createElement&&G_.createElement("textarea"),ck={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Y_={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)"},dk={v:"title",lang:"lang"},X_={rt:"ruby"};function W_(s,e){function i(){if(!e)return null;function L(q){return e=e.substr(q.length),q}var A=e.match(/^([^<]*)(<[^>]*>?)?/);return L(A[1]?A[1]:A[2])}function r(L){return jg.innerHTML=L,L=jg.textContent,jg.textContent="",L}function o(L,A){return!X_[A.localName]||X_[A.localName]===L.localName}function u(L,A){var q=ck[L];if(!q)return null;var U=s.document.createElement(q),G=dk[L];return G&&A&&(U[G]=A.trim()),U}for(var c=s.document.createElement("div"),f=c,m,b=[];(m=i())!==null;){if(m[0]==="<"){if(m[1]==="/"){b.length&&b[b.length-1]===m.substr(2).replace(">","")&&(b.pop(),f=f.parentNode);continue}var S=Hg(m.substr(1,m.length-2)),x;if(S){x=s.document.createProcessingInstruction("timestamp",S),f.appendChild(x);continue}var w=m.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!w||(x=u(w[1],w[3]),!x)||!o(f,x))continue;if(w[2]){var R=w[2].split(".");R.forEach(function(L){var A=/^bg_/.test(L),q=A?L.slice(3):L;if(Y_.hasOwnProperty(q)){var U=A?"background-color":"color",G=Y_[q];x.style[U]=G}}),x.className=R.join(" ")}b.push(w[1]),f.appendChild(x),f=x;continue}f.appendChild(s.document.createTextNode(r(m)))}return c}var Q_=[[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 hk(s){for(var e=0;e<Q_.length;e++){var i=Q_[e];if(s>=i[0]&&s<=i[1])return!0}return!1}function fk(s){var e=[],i="",r;if(!s||!s.childNodes)return"ltr";function o(f,m){for(var b=m.childNodes.length-1;b>=0;b--)f.push(m.childNodes[b])}function u(f){if(!f||!f.length)return null;var m=f.pop(),b=m.textContent||m.innerText;if(b){var S=b.match(/^.*(\n|\r)/);return S?(f.length=0,S[0]):b}if(m.tagName==="ruby")return u(f);if(m.childNodes)return o(f,m),u(f)}for(o(e,s);i=u(e);)for(var c=0;c<i.length;c++)if(r=i.charCodeAt(c),hk(r))return"rtl";return"ltr"}function pk(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 If(){}If.prototype.applyStyles=function(s,e){e=e||this.div;for(var i in s)s.hasOwnProperty(i)&&(e.style[i]=s[i])},If.prototype.formatStyle=function(s,e){return s===0?0:s+e};function Nf(s,e,i){If.call(this),this.cue=e,this.cueDiv=W_(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:fk(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(u){this.applyStyles({top:this.formatStyle(u.top,"px"),bottom:this.formatStyle(u.bottom,"px"),left:this.formatStyle(u.left,"px"),right:this.formatStyle(u.right,"px"),height:this.formatStyle(u.height,"px"),width:this.formatStyle(u.width,"px")})}}Nf.prototype=Fg(If.prototype),Nf.prototype.constructor=Nf;function en(s){var e,i,r,o;if(s.div){i=s.div.offsetHeight,r=s.div.offsetWidth,o=s.div.offsetTop;var u=(u=s.div.childNodes)&&(u=u[0])&&u.getClientRects&&u.getClientRects();s=s.div.getBoundingClientRect(),e=u?Math.max(u[0]&&u[0].height||0,s.height/u.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}en.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}},en.prototype.overlaps=function(s){return this.left<s.right&&this.right>s.left&&this.top<s.bottom&&this.bottom>s.top},en.prototype.overlapsAny=function(s){for(var e=0;e<s.length;e++)if(this.overlaps(s[e]))return!0;return!1},en.prototype.within=function(s){return this.top>=s.top&&this.bottom<=s.bottom&&this.left>=s.left&&this.right<=s.right},en.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}},en.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)},en.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}},en.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 mk(s,e,i,r){function o(q,U){for(var G,$=new en(q),W=1,K=0;K<U.length;K++){for(;q.overlapsOppositeAxis(i,U[K])||q.within(i)&&q.overlapsAny(r);)q.move(U[K]);if(q.within(i))return q;var le=q.intersectPercentage(i);W>le&&(G=new en(q),W=le),q=new en($)}return G||$}var u=new en(e),c=e.cue,f=pk(c),m=[];if(c.snapToLines){var b;switch(c.vertical){case"":m=["+y","-y"],b="height";break;case"rl":m=["+x","-x"],b="width";break;case"lr":m=["-x","+x"],b="width";break}var S=u.lineHeight,x=S*Math.round(f),w=i[b]+S,R=m[0];Math.abs(x)>w&&(x=x<0?-1:1,x*=Math.ceil(w/S)*S),f<0&&(x+=c.vertical===""?i.height:i.width,m=m.reverse()),u.move(R,x)}else{var L=u.lineHeight/i.height*100;switch(c.lineAlign){case"center":f-=L/2;break;case"end":f-=L;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}m=["+y","-x","+x","-y"],u=new en(e)}var A=o(u,m);e.move(A.toCSSCompatValues(i))}function Hl(){}Hl.StringDecoder=function(){return{decode:function(s){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))}}},Hl.convertCueToDOMTree=function(s,e){return!s||!e?null:W_(s,e)};var gk=.05,yk="sans-serif",vk="1.5%";Hl.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=vk,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 u=0;u<e.length;u++)r.appendChild(e[u].displayState);return}var c=[],f=en.getSimpleBoxPosition(r),m=Math.round(f.height*gk*100)/100,b={font:m+"px "+yk};(function(){for(var S,x,w=0;w<e.length;w++)x=e[w],S=new Nf(s,x,b),r.appendChild(S.div),mk(s,S,f,c),x.displayState=S.div,c.push(en.getSimpleBoxPosition(S))})()},Hl.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=[]},Hl.Parser.prototype={reportOrThrowError:function(s){if(s instanceof In)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 w=S.substr(0,x);return S[x]==="\r"&&++x,S[x]===`
`&&++x,e.buffer=S.substr(x),w}function r(S){var x=new ed;if(td(S,function(R,L){switch(R){case"id":x.set(R,L);break;case"width":x.percent(R,L);break;case"lines":x.integer(R,L);break;case"regionanchor":case"viewportanchor":var A=L.split(",");if(A.length!==2)break;var q=new ed;if(q.percent("x",A[0]),q.percent("y",A[1]),!q.has("x")||!q.has("y"))break;x.set(R+"X",q.get("x")),x.set(R+"Y",q.get("y"));break;case"scroll":x.alt(R,L,["up"]);break}},/=/,/\s/),x.has("id")){var w=new(e.vttjs.VTTRegion||e.window.VTTRegion);w.width=x.get("width",100),w.lines=x.get("lines",3),w.regionAnchorX=x.get("regionanchorX",0),w.regionAnchorY=x.get("regionanchorY",100),w.viewportAnchorX=x.get("viewportanchorX",0),w.viewportAnchorY=x.get("viewportanchorY",100),w.scroll=x.get("scroll",""),e.onregion&&e.onregion(w),e.regionList.push({id:x.get("id"),region:w})}}function o(S){var x=new ed;td(S,function(w,R){switch(w){case"MPEGT":x.integer(w+"S",R);break;case"LOCA":x.set(w+"L",Hg(R));break}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:x.get("MPEGTS"),LOCAL:x.get("LOCAL")})}function u(S){S.match(/X-TIMESTAMP-MAP/)?td(S,function(x,w){switch(x){case"X-TIMESTAMP-MAP":o(w);break}},/=/):td(S,function(x,w){switch(x){case"Region":r(w);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 In(In.Errors.BadSignature);e.state="HEADER"}for(var m=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(m?m=!1:c=i(),e.state){case"HEADER":/:/.test(c)?u(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{uk(c,e.cue,e.regionList)}catch(S){e.reportOrThrowError(S),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var b=c.indexOf("-->")!==-1;if(!c||b&&(m=!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 In(In.Errors.BadSignature)}catch(e){s.reportOrThrowError(e)}return s.onflush&&s.onflush(),this}};var bk=Hl,_k="auto",Tk={"":1,lr:1,rl:1},Sk={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function xk(s){if(typeof s!="string")return!1;var e=Tk[s.toLowerCase()];return e?s.toLowerCase():!1}function zg(s){if(typeof s!="string")return!1;var e=Sk[s.toLowerCase()];return e?s.toLowerCase():!1}function K_(s,e,i){this.hasBeenReset=!1;var r="",o=!1,u=s,c=e,f=i,m=null,b="",S=!0,x="auto",w="start",R="auto",L="auto",A=100,q="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 u},set:function(U){if(typeof U!="number")throw new TypeError("Start time must be set to a number.");u=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 m},set:function(U){m=U,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return b},set:function(U){var G=xk(U);if(G===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");b=G,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!==_k)throw new SyntaxError("Line: an invalid number or illegal string was specified.");x=U,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return w},set:function(U){var G=zg(U);G?(w=G,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return R},set:function(U){if(U<0||U>100)throw new Error("Position must be between 0 and 100.");R=U,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return L},set:function(U){var G=zg(U);G?(L=G,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return A},set:function(U){if(U<0||U>100)throw new Error("Size must be between 0 and 100.");A=U,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return q},set:function(U){var G=zg(U);if(!G)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");q=G,this.hasBeenReset=!0}}}),this.displayState=void 0}K_.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ek=K_,Ck={"":!0,up:!0};function wk(s){if(typeof s!="string")return!1;var e=Ck[s.toLowerCase()];return e?s.toLowerCase():!1}function id(s){return typeof s=="number"&&s>=0&&s<=100}function Ak(){var s=100,e=3,i=0,r=100,o=0,u=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 u},set:function(f){if(!id(f))throw new Error("ViewportAnchorY must be between 0 and 100.");u=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 m=wk(f);m===!1?console.warn("Scroll: an invalid or illegal string was specified."):c=m}}})}var Dk=Ak,Mr=Lf,wo=$_.exports={WebVTT:bk,VTTCue:Ek,VTTRegion:Dk};Mr.vttjs=wo,Mr.WebVTT=wo.WebVTT;var kk=wo.VTTCue,Ok=wo.VTTRegion,Rk=Mr.VTTCue,Mk=Mr.VTTRegion;wo.shim=function(){Mr.VTTCue=kk,Mr.VTTRegion=Ok},wo.restore=function(){Mr.VTTCue=Rk,Mr.VTTRegion=Mk},Mr.VTTCue||wo.shim();var Lk=$_.exports;const Z_=Xc(Lk);var J_="https://example.com",Pf=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=B.location&&B.location.href||"");var r=/^\/\//.test(e),o=!B.location&&!/\/\//i.test(e);e=new B.URL(e,B.location||J_);var u=new URL(i,e);return o?u.href.slice(J_.length):r?u.href.slice(u.protocol.length):u.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 u=this.listeners[r].indexOf(o);return this.listeners[r]=this.listeners[r].slice(0),this.listeners[r].splice(u,1),u>-1},e.trigger=function(r){var o=this.listeners[r];if(o)if(arguments.length===2)for(var u=o.length,c=0;c<u;++c)o[c].call(this,arguments[1]);else for(var f=Array.prototype.slice.call(arguments,1),m=o.length,b=0;b<m;++b)o[b].apply(this,f)},e.dispose=function(){this.listeners={}},e.pipe=function(r){this.on("data",function(o){r.push(o)})},s}(),Ik=function(e){return B.atob?B.atob(e):Buffer.from(e,"base64").toString("binary")};function e1(s){for(var e=Ik(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 Nk 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 Pk=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},Bk=function(){const s="[^=]*",e='"[^"]*"|[^,]*',i="(?:"+s+")=(?:"+e+")";return new RegExp("(?:^|,)("+i+")")},tn=function(s){const e={};if(!s)return e;const i=s.split(Bk());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 Uk 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((u,c)=>{const f=c(e);return f===e?u:u.concat([f])},[e]).forEach(u=>{for(let c=0;c<this.customParsers.length;c++)if(this.customParsers[c].call(this,u))return;if(u.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:u.slice(1)});return}if(u=u.replace("\r",""),i=/^#EXTM3U/.exec(u),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(u),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(u),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(u),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(u),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(u),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(u),i){r={type:"tag",tagType:"playlist-type"},i[1]&&(r.playlistType=i[1]),this.trigger("data",r);return}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(u),i){r=Qt($g(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",r);return}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(u),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(u),i){if(r={type:"tag",tagType:"map"},i[1]){const c=tn(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(u),i){r={type:"tag",tagType:"stream-inf"},i[1]&&(r.attributes=tn(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(u),i){r={type:"tag",tagType:"media"},i[1]&&(r.attributes=tn(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-ENDLIST/.exec(u),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(u),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(u),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(u),i){r={type:"tag",tagType:"key"},i[1]&&(r.attributes=tn(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(u),i){r={type:"tag",tagType:"start"},i[1]&&(r.attributes=tn(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(u),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(u),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(u),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(u),i&&i[1]){r={type:"tag",tagType:"skip"},r.attributes=tn(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(Pk)),this.trigger("data",r);return}if(i=/^#EXT-X-PART:(.*)$/.exec(u),i&&i[1]){r={type:"tag",tagType:"part"},r.attributes=tn(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(u),i&&i[1]){r={type:"tag",tagType:"server-control"},r.attributes=tn(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(u),i&&i[1]){r={type:"tag",tagType:"part-inf"},r.attributes=tn(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(u),i&&i[1]){r={type:"tag",tagType:"preload-hint"},r.attributes=tn(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(u),i&&i[1]){r={type:"tag",tagType:"rendition-report"},r.attributes=tn(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(u),i&&i[1]){r={type:"tag",tagType:"daterange"},r.attributes=tn(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 m=/[0-9A-Fa-f]{6}/g.test(r.attributes[f]),b=/^\d+(\.\d+)?$/.test(r.attributes[f]);r.attributes[f]=m?r.attributes[f].toString(16):b?parseFloat(r.attributes[f]):String(r.attributes[f])}this.trigger("data",r);return}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(u),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(u),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(u),i){r={type:"tag",tagType:"content-steering"},r.attributes=tn(i[1]),this.trigger("data",r);return}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(u),i){r={type:"tag",tagType:"i-frame-playlist"},r.attributes=tn(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(u),i){r={type:"tag",tagType:"define"},r.attributes=tn(i[1]),this.trigger("data",r);return}this.trigger("data",{type:"tag",data:u.slice(4)})})}addParser({expression:e,customType:i,dataParser:r,segment:o}){typeof r!="function"&&(r=u=>u),this.customParsers.push(u=>{if(e.exec(u))return this.trigger("data",{type:"custom",data:r(u),customType:i,segment:o}),!0})}addTagMapper({expression:e,map:i}){const r=o=>e.test(o)?i(o):o;this.tagMappers.push(r)}}const qk=s=>s.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),Ca=function(s){const e={};return Object.keys(s).forEach(function(i){e[qk(i)]=s[i]}),e},Gg=function(s){const{serverControl:e,targetDuration:i,partTargetDuration:r}=s;if(!e)return;const o="#EXT-X-SERVER-CONTROL",u="holdBack",c="partHoldBack",f=i&&i*3,m=r&&r*2;i&&!e.hasOwnProperty(u)&&(e[u]=f,this.trigger("info",{message:`${o} defaulting HOLD-BACK to targetDuration * 3 (${f}).`})),f&&e[u]<f&&(this.trigger("warn",{message:`${o} clamping HOLD-BACK (${e[u]}) to targetDuration * 3 (${f})`}),e[u]=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]<m&&(this.trigger("warn",{message:`${o} clamping PART-HOLD-BACK (${e[c]}) to partTargetDuration * 2 (${m}).`}),e[c]=m)};class Fk extends Vg{constructor(e={}){super(),this.lineStream=new Nk,this.parseStream=new Uk,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={},u,c,f=!1;const m=function(){},b={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 w=0,R=0;const L={};this.on("end",()=>{o.uri||!o.parts&&!o.preloadHints||(!o.map&&u&&(o.map=u),!o.key&&c&&(o.key=c),!o.timeline&&typeof x=="number"&&(o.timeline=x),this.manifest.preloadSegment=o)}),this.parseStream.on("data",function(A){let q,U;if(i.manifest.definitions){for(const G in i.manifest.definitions)if(A.uri&&(A.uri=A.uri.replace(`{$${G}}`,i.manifest.definitions[G])),A.attributes)for(const $ in A.attributes)typeof A.attributes[$]=="string"&&(A.attributes[$]=A.attributes[$].replace(`{$${G}}`,i.manifest.definitions[G]))}({tag(){({version(){A.version&&(this.manifest.version=A.version)},"allow-cache"(){this.manifest.allowCache=A.allowed,"allowed"in A||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const G={};"length"in A&&(o.byterange=G,G.length=A.length,"offset"in A||(A.offset=w)),"offset"in A&&(o.byterange=G,G.offset=A.offset),w=G.offset+G.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"})),A.title&&(o.title=A.title),A.duration>0&&(o.duration=A.duration),A.duration===0&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key(){if(!A.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(A.attributes.METHOD==="NONE"){c=null;return}if(!A.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(A.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:A.attributes};return}if(A.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:A.attributes.URI};return}if(A.attributes.KEYFORMAT===S){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(A.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(A.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),A.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(A.attributes.KEYID&&A.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:A.attributes.KEYFORMAT,keyId:A.attributes.KEYID.substring(2)},pssh:e1(A.attributes.URI.split(",")[1])};return}A.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),c={method:A.attributes.METHOD||"AES-128",uri:A.attributes.URI},typeof A.attributes.IV<"u"&&(c.iv=A.attributes.IV)},"media-sequence"(){if(!isFinite(A.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+A.number});return}this.manifest.mediaSequence=A.number},"discontinuity-sequence"(){if(!isFinite(A.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+A.number});return}this.manifest.discontinuitySequence=A.number,x=A.number},"playlist-type"(){if(!/VOD|EVENT/.test(A.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+A.playlist});return}this.manifest.playlistType=A.playlistType},map(){u={},A.uri&&(u.uri=A.uri),A.byterange&&(u.byterange=A.byterange),c&&(u.key=c)},"stream-inf"(){if(this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||b,!A.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}o.attributes||(o.attributes={}),Qt(o.attributes,A.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||b,!(A.attributes&&A.attributes.TYPE&&A.attributes["GROUP-ID"]&&A.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const G=this.manifest.mediaGroups[A.attributes.TYPE];G[A.attributes["GROUP-ID"]]=G[A.attributes["GROUP-ID"]]||{},q=G[A.attributes["GROUP-ID"]],U={default:/yes/i.test(A.attributes.DEFAULT)},U.default?U.autoselect=!0:U.autoselect=/yes/i.test(A.attributes.AUTOSELECT),A.attributes.LANGUAGE&&(U.language=A.attributes.LANGUAGE),A.attributes.URI&&(U.uri=A.attributes.URI),A.attributes["INSTREAM-ID"]&&(U.instreamId=A.attributes["INSTREAM-ID"]),A.attributes.CHARACTERISTICS&&(U.characteristics=A.attributes.CHARACTERISTICS),A.attributes.FORCED&&(U.forced=/yes/i.test(A.attributes.FORCED)),q[A.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=A.dateTimeString,this.manifest.dateTimeObject=A.dateTimeObject),o.dateTimeString=A.dateTimeString,o.dateTimeObject=A.dateTimeObject;const{lastProgramDateTime:G}=this;this.lastProgramDateTime=new Date(A.dateTimeString).getTime(),G===null&&this.manifest.segments.reduceRight(($,W)=>(W.programDateTime=$-W.duration*1e3,W.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(A.duration)||A.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+A.duration});return}this.manifest.targetDuration=A.duration,Gg.call(this,this.manifest)},start(){if(!A.attributes||isNaN(A.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:A.attributes["TIME-OFFSET"],precise:A.attributes.PRECISE}},"cue-out"(){o.cueOut=A.data},"cue-out-cont"(){o.cueOutCont=A.data},"cue-in"(){o.cueIn=A.data},skip(){this.manifest.skip=Ca(A.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",A.attributes,["SKIPPED-SEGMENTS"])},part(){f=!0;const G=this.manifest.segments.length,$=Ca(A.attributes);o.parts=o.parts||[],o.parts.push($),$.byterange&&($.byterange.hasOwnProperty("offset")||($.byterange.offset=R),R=$.byterange.offset+$.byterange.length);const W=o.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${W} for segment #${G}`,A.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((K,le)=>{K.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${le} lacks required attribute(s): LAST-PART`})})},"server-control"(){const G=this.manifest.serverControl=Ca(A.attributes);G.hasOwnProperty("canBlockReload")||(G.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Gg.call(this,this.manifest),G.canSkipDateranges&&!G.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 G=this.manifest.segments.length,$=Ca(A.attributes),W=$.type&&$.type==="PART";o.preloadHints=o.preloadHints||[],o.preloadHints.push($),$.byterange&&($.byterange.hasOwnProperty("offset")||($.byterange.offset=W?R:0,W&&(R=$.byterange.offset+$.byterange.length)));const K=o.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${K} for segment #${G}`,A.attributes,["TYPE","URI"]),!!$.type)for(let le=0;le<o.preloadHints.length-1;le++){const Y=o.preloadHints[le];Y.type&&Y.type===$.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${K} for segment #${G} has the same TYPE ${$.type} as preload hint #${le}`})}},"rendition-report"(){const G=Ca(A.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(G);const $=this.manifest.renditionReports.length-1,W=["LAST-MSN","URI"];f&&W.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${$}`,A.attributes,W)},"part-inf"(){this.manifest.partInf=Ca(A.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",A.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Gg.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(Ca(A.attributes));const G=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${G}`,A.attributes,["ID","START-DATE"]);const $=this.manifest.dateRanges[G];$.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 W=!!$.endOnNext;if(W&&!$.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),W&&($.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 le=$.startDate.getTime()+$.duration*1e3;this.manifest.dateRanges[G].endDate=new Date(le)}if(!L[$.id])L[$.id]=$;else{for(const le in L[$.id])if($[le]&&JSON.stringify(L[$.id][le])!==JSON.stringify($[le])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const K=this.manifest.dateRanges.findIndex(le=>le.id===$.id);this.manifest.dateRanges[K]=Qt(this.manifest.dateRanges[K],$),L[$.id]=Qt(L[$.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(A.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",A.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const G=($,W)=>{if($ in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${$}`});return}this.manifest.definitions[$]=W};if("QUERYPARAM"in A.attributes){if("NAME"in A.attributes||"IMPORT"in A.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const $=this.params.get(A.attributes.QUERYPARAM);if(!$){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${A.attributes.QUERYPARAM}`});return}G(A.attributes.QUERYPARAM,decodeURIComponent($));return}if("NAME"in A.attributes){if("IMPORT"in A.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in A.attributes)||typeof A.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${A.attributes.NAME}`});return}G(A.attributes.NAME,A.attributes.VALUE);return}if("IMPORT"in A.attributes){if(!this.mainDefinitions[A.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${A.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}G(A.attributes.IMPORT,this.mainDefinitions[A.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:A.attributes,uri:A.uri,timeline:x}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",A.attributes,["BANDWIDTH","URI"])}}[A.tagType]||m).call(i)},uri(){o.uri=A.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,u&&(o.map=u),R=0,this.lastProgramDateTime!==null&&(o.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=o.duration*1e3),o={}},comment(){},custom(){A.segment?(o.custom=o.custom||{},o.custom[A.customType]=A.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[A.customType]=A.data)}})[A.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(u){i.hasOwnProperty(u)||o.push(u)}),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 Ao={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^/},Hk=["video","audio","text"],i1=["Video","Audio","Text"],n1=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,r,o){var u=("00"+Number(r).toString(16)).slice(-2),c=("00"+Number(o).toString(16)).slice(-2);return"avc1."+u+"00"+c})},js=function(e){e===void 0&&(e="");var i=e.split(","),r=[];return i.forEach(function(o){o=o.trim();var u;Hk.forEach(function(c){var f=Ao[c].exec(o.toLowerCase());if(!(!f||f.length<=1)){u=c;var m=o.substring(0,f[1].length),b=o.replace(m,"");r.push({type:m,details:b,mediaType:c})}}),u||r.push({type:o,details:"",mediaType:"unknown"})}),r},jk=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 u=r[o];if(u.default&&u.playlists)return js(u.playlists[0].attributes.CODECS)}return null},s1=function(e){return e===void 0&&(e=""),Ao.audio.test(e.trim().toLowerCase())},zk=function(e){return e===void 0&&(e=""),Ao.text.test(e.trim().toLowerCase())},jl=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(u){return n1(u.trim())}),r="video";i.length===1&&s1(i[0])?r="audio":i.length===1&&zk(i[0])&&(r="application");var o="mp4";return i.every(function(u){return Ao.mp4.test(u)})?o="mp4":i.every(function(u){return Ao.webm.test(u)})?o="webm":i.every(function(u){return Ao.ogg.test(u)})&&(o="ogg"),r+"/"+o+';codecs="'+e+'"'}},nd=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),B.MediaSource&&B.MediaSource.isTypeSupported&&B.MediaSource.isTypeSupported(jl(e))||i&&B.ManagedMediaSource&&B.ManagedMediaSource.isTypeSupported&&B.ManagedMediaSource.isTypeSupported(jl(e))||!1},Yg=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(Ao["muxer"+o].test(i))return!0}return!1})},r1="mp4a.40.2",Vk="avc1.4d400d",$k=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,Gk=/^application\/dash\+xml/i,a1=function(e){return $k.test(e)?"hls":Gk.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},Yk=function(e){return e.toString(2).length},Xk=function(e){return Math.ceil(Yk(e)/8)},o1=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Wk=function(e){return o1(e)},Fe=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!Wk(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))},Mi=B.BigInt||Number,Xg=[Mi("0x1"),Mi("0x100"),Mi("0x10000"),Mi("0x1000000"),Mi("0x100000000"),Mi("0x10000000000"),Mi("0x1000000000000"),Mi("0x100000000000000"),Mi("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 Qk=function(e,i){var r=i===void 0?{}:i,o=r.signed,u=o===void 0?!1:o,c=r.le,f=c===void 0?!1:c;e=Fe(e);var m=f?"reduce":"reduceRight",b=e[m]?e[m]:Array.prototype[m],S=b.call(e,function(w,R,L){var A=f?L:Math.abs(L+1-e.length);return w+Mi(R)*Xg[A]},Mi(0));if(u){var x=Xg[e.length]/Mi(2)-Mi(1);S=Mi(S),S>x&&(S-=x,S-=x,S-=Mi(2))}return Number(S)},Kk=function(e,i){var r=i===void 0?{}:i,o=r.le,u=o===void 0?!1:o;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Mi(e);for(var c=Xk(e),f=new Uint8Array(new ArrayBuffer(c)),m=0;m<c;m++){var b=u?m:Math.abs(m+1-f.length);f[b]=Number(e/Xg[m]&Mi(255)),e<0&&(f[b]=Math.abs(~f[b]),f[b]-=m===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},Zk=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 Fe(i[0]);var o=i.reduce(function(f,m,b){return f+(m.byteLength||m.length)},0),u=new Uint8Array(o),c=0;return i.forEach(function(f){f=Fe(f),u.set(f,c),c+=f.byteLength}),u},jt=function(e,i,r){var o=r===void 0?{}:r,u=o.offset,c=u===void 0?0:u,f=o.mask,m=f===void 0?[]:f;e=Fe(e),i=Fe(i);var b=i.every?i.every:Array.prototype.every;return i.length&&e.length-c>=i.length&&b.call(i,function(S,x){var w=m[x]?m[x]&e[c+x]:e[c+x];return S===w})},Jk=function(e,i,r){i.forEach(function(o){for(var u in e.mediaGroups[o])for(var c in e.mediaGroups[o][u]){var f=e.mediaGroups[o][u][c];r(f,o,u,c)}})},wa={},Lr={};function e4(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 Wg(s,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(s):s}function t4(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=Wg({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=Wg({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/"});Lr.assign=t4,Lr.find=e4,Lr.freeze=Wg,Lr.MIME_TYPE=u1,Lr.NAMESPACE=c1;var d1=Lr,zs=d1.find,sd=d1.NAMESPACE;function i4(s){return s!==""}function n4(s){return s?s.split(/[\t\n\f\r ]+/).filter(i4):[]}function s4(s,e){return s.hasOwnProperty(e)||(s[e]=!0),s}function h1(s){if(!s)return[];var e=n4(s);return Object.keys(e.reduce(s4,{}))}function r4(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 mn(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 gn={},Ss=gn.ELEMENT_NODE=1,zl=gn.ATTRIBUTE_NODE=2,Bf=gn.TEXT_NODE=3,f1=gn.CDATA_SECTION_NODE=4,p1=gn.ENTITY_REFERENCE_NODE=5,a4=gn.ENTITY_NODE=6,m1=gn.PROCESSING_INSTRUCTION_NODE=7,g1=gn.COMMENT_NODE=8,y1=gn.DOCUMENT_NODE=9,v1=gn.DOCUMENT_TYPE_NODE=10,Ir=gn.DOCUMENT_FRAGMENT_NODE=11,o4=gn.NOTATION_NODE=12,$i={},_i={};$i.INDEX_SIZE_ERR=(_i[1]="Index size error",1),$i.DOMSTRING_SIZE_ERR=(_i[2]="DOMString size error",2);var yn=$i.HIERARCHY_REQUEST_ERR=(_i[3]="Hierarchy request error",3);$i.WRONG_DOCUMENT_ERR=(_i[4]="Wrong document",4),$i.INVALID_CHARACTER_ERR=(_i[5]="Invalid character",5),$i.NO_DATA_ALLOWED_ERR=(_i[6]="No data allowed",6),$i.NO_MODIFICATION_ALLOWED_ERR=(_i[7]="No modification allowed",7);var b1=$i.NOT_FOUND_ERR=(_i[8]="Not found",8);$i.NOT_SUPPORTED_ERR=(_i[9]="Not supported",9);var _1=$i.INUSE_ATTRIBUTE_ERR=(_i[10]="Attribute in use",10);$i.INVALID_STATE_ERR=(_i[11]="Invalid state",11),$i.SYNTAX_ERR=(_i[12]="Syntax error",12),$i.INVALID_MODIFICATION_ERR=(_i[13]="Invalid modification",13),$i.NAMESPACE_ERR=(_i[14]="Invalid namespace",14),$i.INVALID_ACCESS_ERR=(_i[15]="Invalid access",15);function ni(s,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,_i[s]),this.message=_i[s],Error.captureStackTrace&&Error.captureStackTrace(this,ni);return i.code=s,e&&(this.message=this.message+": "+e),i}ni.prototype=Error.prototype,rd($i,ni);function Nr(){}Nr.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,Qg(this)}function Qg(s){var e=s._node._inc||s._node.ownerDocument._inc;if(s._inc!==e){var i=s._refresh(s._node);if(B1(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 Qg(this),this[s]||null},mn(Vl,Nr);function Uf(){}function T1(s,e){for(var i=s.length;i--;)if(s[i]===e)return i}function S1(s,e,i,r){if(r?e[T1(e,r)]=i:e[e.length++]=i,s){i.ownerElement=s;var o=s.ownerDocument;o&&(r&&w1(o,s,r),l4(o,s,i))}}function x1(s,e,i){var r=T1(e,i);if(r>=0){for(var o=e.length-1;r<o;)e[r]=e[++r];if(e.length=o,s){var u=s.ownerDocument;u&&(w1(u,s,i),i.ownerElement=null)}}else throw new ni(b1,new Error(s.tagName+"@"+i))}Uf.prototype={length:0,item:Nr.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 ni(_1);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 ni(_1);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 Nr,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 Hf;return r.name=s,r.nodeName=s,r.publicId=e||"",r.systemId=i||"",r}};function wt(){}wt.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 qf(this,s,e)},replaceChild:function(s,e){qf(this,s,e,O1),e&&this.removeChild(e)},removeChild:function(s){return A1(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==Bf&&s.nodeType==Bf?(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==zl?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==zl?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(s){var e=this.lookupPrefix(s);return e==null}};function C1(s){return s=="<"&&"&lt;"||s==">"&&"&gt;"||s=="&"&&"&amp;"||s=='"'&&"&quot;"||"&#"+s.charCodeAt()+";"}rd(gn,wt),rd(gn,wt.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 l4(s,e,i){s&&s._inc++;var r=i.namespaceURI;r===sd.XMLNS&&(e._nsMap[i.prefix?i.localName:""]=i.value)}function w1(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,u=0;o;)r[u++]=o,o=o.nextSibling;r.length=u,delete r[r.length]}}}function A1(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 u4(s){return s&&(s.nodeType===wt.DOCUMENT_NODE||s.nodeType===wt.DOCUMENT_FRAGMENT_NODE||s.nodeType===wt.ELEMENT_NODE)}function c4(s){return s&&(Vs(s)||Zg(s)||Pr(s)||s.nodeType===wt.DOCUMENT_FRAGMENT_NODE||s.nodeType===wt.COMMENT_NODE||s.nodeType===wt.PROCESSING_INSTRUCTION_NODE)}function Pr(s){return s&&s.nodeType===wt.DOCUMENT_TYPE_NODE}function Vs(s){return s&&s.nodeType===wt.ELEMENT_NODE}function Zg(s){return s&&s.nodeType===wt.TEXT_NODE}function D1(s,e){var i=s.childNodes||[];if(zs(i,Vs)||Pr(e))return!1;var r=zs(i,Pr);return!(e&&r&&i.indexOf(r)>i.indexOf(e))}function k1(s,e){var i=s.childNodes||[];function r(u){return Vs(u)&&u!==e}if(zs(i,r))return!1;var o=zs(i,Pr);return!(e&&o&&i.indexOf(o)>i.indexOf(e))}function d4(s,e,i){if(!u4(s))throw new ni(yn,"Unexpected parent node type "+s.nodeType);if(i&&i.parentNode!==s)throw new ni(b1,"child not in parent");if(!c4(e)||Pr(e)&&s.nodeType!==wt.DOCUMENT_NODE)throw new ni(yn,"Unexpected node type "+e.nodeType+" for parent node type "+s.nodeType)}function h4(s,e,i){var r=s.childNodes||[],o=e.childNodes||[];if(e.nodeType===wt.DOCUMENT_FRAGMENT_NODE){var u=o.filter(Vs);if(u.length>1||zs(o,Zg))throw new ni(yn,"More than one element or text in fragment");if(u.length===1&&!D1(s,i))throw new ni(yn,"Element in fragment can not be inserted before doctype")}if(Vs(e)&&!D1(s,i))throw new ni(yn,"Only one element can be added and only after doctype");if(Pr(e)){if(zs(r,Pr))throw new ni(yn,"Only one doctype is allowed");var c=zs(r,Vs);if(i&&r.indexOf(c)<r.indexOf(i))throw new ni(yn,"Doctype can only be inserted before an element");if(!i&&c)throw new ni(yn,"Doctype can not be appended since element is present")}}function O1(s,e,i){var r=s.childNodes||[],o=e.childNodes||[];if(e.nodeType===wt.DOCUMENT_FRAGMENT_NODE){var u=o.filter(Vs);if(u.length>1||zs(o,Zg))throw new ni(yn,"More than one element or text in fragment");if(u.length===1&&!k1(s,i))throw new ni(yn,"Element in fragment can not be inserted before doctype")}if(Vs(e)&&!k1(s,i))throw new ni(yn,"Only one element can be added and only after doctype");if(Pr(e)){if(zs(r,function(m){return Pr(m)&&m!==i}))throw new ni(yn,"Only one doctype is allowed");var c=zs(r,Vs);if(i&&r.indexOf(c)<r.indexOf(i))throw new ni(yn,"Doctype can only be inserted before an element")}}function qf(s,e,i,r){d4(s,e,i),s.nodeType===wt.DOCUMENT_NODE&&(r||h4)(s,e,i);var o=e.parentNode;if(o&&o.removeChild(e),e.nodeType===Ir){var u=e.firstChild;if(u==null)return e;var c=e.lastChild}else u=c=e;var f=i?i.previousSibling:s.lastChild;u.previousSibling=f,c.nextSibling=i,f?f.nextSibling=u:s.firstChild=u,i==null?s.lastChild=c:i.previousSibling=c;do u.parentNode=s;while(u!==c&&(u=u.nextSibling));return Kg(s.ownerDocument||s,s),e.nodeType==Ir&&(e.firstChild=e.lastChild=null),e}function f4(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==Ir){for(var i=s.firstChild;i;){var r=i.nextSibling;this.insertBefore(i,e),i=r}return s}return qf(this,s,e),s.ownerDocument=this,this.documentElement===null&&s.nodeType===Ss&&(this.documentElement=s),s},removeChild:function(s){return this.documentElement==s&&(this.documentElement=null),A1(this,s)},replaceChild:function(s,e){qf(this,s,e,O1),s.ownerDocument=this,e&&this.removeChild(e),Vs(s)&&(this.documentElement=s)},importNode:function(s,e){return P1(this,s,e)},getElementById:function(s){var e=null;return ad(this.documentElement,function(i){if(i.nodeType==Ss&&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===Ss){var u=o.getAttribute("class");if(u){var c=s===u;if(!c){var f=h1(u);c=e.every(r4(f))}c&&r.push(o)}}}),r})},createElement:function(s){var e=new Do;e.ownerDocument=this,e.nodeName=s,e.tagName=s,e.localName=s,e.childNodes=new Nr;var i=e.attributes=new Uf;return i._ownerElement=e,e},createDocumentFragment:function(){var s=new jf;return s.ownerDocument=this,s.childNodes=new Nr,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 Ff;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 Do,r=e.split(":"),o=i.attributes=new Uf;return i.childNodes=new Nr,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 Ff,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}},mn(od,wt);function Do(){this._nsMap={}}Do.prototype={nodeType:Ss,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===Ir?this.insertBefore(s,null):f4(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==Ss&&(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===Ss&&(s==="*"||o.namespaceURI===s)&&(e==="*"||o.localName==e)&&r.push(o)}),r})}},od.prototype.getElementsByTagName=Do.prototype.getElementsByTagName,od.prototype.getElementsByTagNameNS=Do.prototype.getElementsByTagNameNS,mn(Do,wt);function Ff(){}Ff.prototype.nodeType=zl,mn(Ff,wt);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(_i[yn])},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}},mn(ld,wt);function Jg(){}Jg.prototype={nodeName:"#text",nodeType:Bf,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}},mn(Jg,ld);function e0(){}e0.prototype={nodeName:"#comment",nodeType:g1},mn(e0,ld);function t0(){}t0.prototype={nodeName:"#cdata-section",nodeType:f1},mn(t0,ld);function Hf(){}Hf.prototype.nodeType=v1,mn(Hf,wt);function R1(){}R1.prototype.nodeType=o4,mn(R1,wt);function M1(){}M1.prototype.nodeType=a4,mn(M1,wt);function i0(){}i0.prototype.nodeType=p1,mn(i0,wt);function jf(){}jf.prototype.nodeName="#document-fragment",jf.prototype.nodeType=Ir,mn(jf,wt);function n0(){}n0.prototype.nodeType=m1,mn(n0,wt);function L1(){}L1.prototype.serializeToString=function(s,e,i){return I1.call(s,e,i)},wt.prototype.toString=I1;function I1(s,e){var i=[],r=this.nodeType==9&&this.documentElement||this,o=r.prefix,u=r.namespaceURI;if(u&&o==null){var o=r.lookupPrefix(u);if(o==null)var c=[{namespace:u,prefix:null}]}return $l(this,i,s,e,c),i.join("")}function N1(s,e,i){var r=s.prefix||"",o=s.namespaceURI;if(!o||r==="xml"&&o===sd.XML||o===sd.XMLNS)return!1;for(var u=i.length;u--;){var c=i[u];if(c.prefix===r)return c.namespace!==o}return!0}function s0(s,e,i){s.push(" ",e,'="',i.replace(/[<>&"\t\n\r]/g,C1),'"')}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 Ss:var u=s.attributes,c=u.length,U=s.firstChild,f=s.tagName;i=sd.isHTML(s.namespaceURI)||i;var m=f;if(!i&&!s.prefix&&s.namespaceURI){for(var b,S=0;S<u.length;S++)if(u.item(S).name==="xmlns"){b=u.item(S).value;break}if(!b)for(var x=o.length-1;x>=0;x--){var w=o[x];if(w.prefix===""&&w.namespace===s.namespaceURI){b=w.namespace;break}}if(b!==s.namespaceURI)for(var x=o.length-1;x>=0;x--){var w=o[x];if(w.namespace===s.namespaceURI){w.prefix&&(m=w.prefix+":"+f);break}}}e.push("<",m);for(var R=0;R<c;R++){var L=u.item(R);L.prefix=="xmlns"?o.push({prefix:L.localName,namespace:L.value}):L.nodeName=="xmlns"&&o.push({prefix:"",namespace:L.value})}for(var R=0;R<c;R++){var L=u.item(R);if(N1(L,i,o)){var A=L.prefix||"",q=L.namespaceURI;s0(e,A?"xmlns:"+A:"xmlns",q),o.push({prefix:A,namespace:q})}$l(L,e,i,r,o)}if(f===m&&N1(s,i,o)){var A=s.prefix||"",q=s.namespaceURI;s0(e,A?"xmlns:"+A:"xmlns",q),o.push({prefix:A,namespace:q})}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("</",m,">")}else e.push("/>");return;case y1:case Ir:for(var U=s.firstChild;U;)$l(U,e,i,r,o.slice()),U=U.nextSibling;return;case zl:return s0(e,s.name,s.value);case Bf:return e.push(s.data.replace(/[<&>]/g,C1));case f1:return e.push("<![CDATA[",s.data,"]]>");case g1:return e.push("<!--",s.data,"-->");case v1:var G=s.publicId,$=s.systemId;if(e.push("<!DOCTYPE ",s.name),G)e.push(" PUBLIC ",G),$&&$!="."&&e.push(" ",$),e.push(">");else if($&&$!=".")e.push(" SYSTEM ",$,">");else{var W=s.internalSubset;W&&e.push(" [",W,"]"),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 P1(s,e,i){var r;switch(e.nodeType){case Ss:r=e.cloneNode(!1),r.ownerDocument=s;case Ir:break;case zl:i=!0;break}if(r||(r=e.cloneNode(!1)),r.ownerDocument=s,r.parentNode=null,i)for(var o=e.firstChild;o;)r.appendChild(P1(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 u=e[o];typeof u!="object"&&u!=r[o]&&(r[o]=u)}switch(e.childNodes&&(r.childNodes=new Nr),r.ownerDocument=s,r.nodeType){case Ss:var c=e.attributes,f=r.attributes=new Uf,m=c.length;f._ownerElement=r;for(var b=0;b<m;b++)r.setAttributeNode(r0(s,c.item(b),!0));break;case zl:i=!0}if(i)for(var S=e.firstChild;S;)r.appendChild(r0(s,S,i)),S=S.nextSibling;return r}function B1(s,e,i){s[e]=i}try{if(Object.defineProperty){let s=function(e){switch(e.nodeType){case Ss:case Ir: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 Qg(this),this.$$length}}),Object.defineProperty(wt.prototype,"textContent",{get:function(){return s(this)},set:function(e){switch(this.nodeType){case Ss:case Ir: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}}}),B1=function(e,i,r){e["$$"+i]=r}}}catch{}wa.DocumentType=Hf,wa.DOMException=ni,wa.DOMImplementation=E1,wa.Element=Do,wa.Node=wt,wa.NodeList=Nr,wa.XMLSerializer=L1;var zf={},U1={};(function(s){var e=Lr.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=Lr.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]/,q1=new RegExp("[\\-\\.0-9"+o0.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),F1=new RegExp("^"+o0.source+q1.source+"*(?::"+o0.source+q1.source+"*)?$"),cd=0,Aa=1,Gl=2,dd=3,Yl=4,Xl=5,hd=6,Vf=7;function Wl(s,e){this.message=s,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Wl)}Wl.prototype=new Error,Wl.prototype.name=Wl.name;function H1(){}H1.prototype={parse:function(s,e,i){var r=this.domBuilder;r.startDocument(),V1(e,e={}),p4(s,e,i,r,this.errorHandler),r.endDocument()}};function p4(s,e,i,r,o){function u(ce){if(ce>65535){ce-=65536;var Ce=55296+(ce>>10),Oe=56320+(ce&1023);return String.fromCharCode(Ce,Oe)}else return String.fromCharCode(ce)}function c(ce){var Ce=ce.slice(1,-1);return Object.hasOwnProperty.call(i,Ce)?i[Ce]:Ce.charAt(0)==="#"?u(parseInt(Ce.substr(1).replace("x","0x"))):(o.error("entity not found:"+ce),ce)}function f(ce){if(ce>A){var Ce=s.substring(A,ce).replace(/&#?\w+;/g,c);w&&m(A),r.characters(Ce,0,ce-A),A=ce}}function m(ce,Ce){for(;ce>=S&&(Ce=x.exec(s));)b=Ce.index,S=b+Ce[0].length,w.lineNumber++;w.columnNumber=ce-b+1}for(var b=0,S=0,x=/.*(?:\r\n?|\n)|.*$/g,w=r.locator,R=[{currentNSMap:e}],L={},A=0;;){try{var q=s.indexOf("<",A);if(q<0){if(!s.substr(A).match(/^\s*$/)){var U=r.doc,G=U.createTextNode(s.substr(A));U.appendChild(G),r.currentElement=G}return}switch(q>A&&f(q),s.charAt(q+1)){case"/":var he=s.indexOf(">",q+3),$=s.substring(q+2,he).replace(/[ \t\n\r]+$/g,""),W=R.pop();he<0?($=s.substring(q+2).replace(/[\s<].*/,""),o.error("end tag name: "+$+" is not complete:"+W.tagName),he=q+1+$.length):$.match(/\s</)&&($=$.replace(/[\s<].*/,""),o.error("end tag name: "+$+" maybe not complete"),he=q+1+$.length);var K=W.localNSMap,le=W.tagName==$,Y=le||W.tagName&&W.tagName.toLowerCase()==$.toLowerCase();if(Y){if(r.endElement(W.uri,W.localName,$),K)for(var J in K)Object.prototype.hasOwnProperty.call(K,J)&&r.endPrefixMapping(J);le||o.fatalError("end tag name: "+$+" is not match the current start tagName:"+W.tagName)}else R.push(W);he++;break;case"?":w&&m(q),he=b4(s,q,r);break;case"!":w&&m(q),he=v4(s,q,r,o);break;default:w&&m(q);var te=new $1,xe=R[R.length-1].currentNSMap,he=m4(s,q,te,xe,c,o),be=te.length;if(!te.closed&&y4(s,he,te.tagName,L)&&(te.closed=!0,i.nbsp||o.warning("unclosed xml attribute")),w&&be){for(var ye=j1(w,{}),pe=0;pe<be;pe++){var He=te[pe];m(He.offset),He.locator=j1(w,{})}r.locator=ye,z1(te,r,xe)&&R.push(te),r.locator=w}else z1(te,r,xe)&&R.push(te);ud.isHTML(te.uri)&&!te.closed?he=g4(s,he,te.tagName,c,r):he++}}catch(ce){if(ce instanceof Wl)throw ce;o.error("element parse error: "+ce),he=-1}he>A?A=he:f(Math.max(q,A)+1)}}function j1(s,e){return e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber,e}function m4(s,e,i,r,o,u){function c(w,R,L){i.attributeNames.hasOwnProperty(w)&&u.fatalError("Attribute "+w+" redefined"),i.addValue(w,R.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,o),L)}for(var f,m,b=++e,S=cd;;){var x=s.charAt(b);switch(x){case"=":if(S===Aa)f=s.slice(e,b),S=dd;else if(S===Gl)S=dd;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(S===dd||S===Aa)if(S===Aa&&(u.warning('attribute value must after "="'),f=s.slice(e,b)),e=b+1,b=s.indexOf(x,e),b>0)m=s.slice(e,b),c(f,m,e-1),S=Xl;else throw new Error("attribute value no end '"+x+"' match");else if(S==Yl)m=s.slice(e,b),c(f,m,e),u.warning('attribute "'+f+'" missed start quot('+x+")!!"),e=b+1,S=Xl;else throw new Error('attribute value must after "="');break;case"/":switch(S){case cd:i.setTagName(s.slice(e,b));case Xl:case hd:case Vf:S=Vf,i.closed=!0;case Yl:case Aa:break;case Gl:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),S==cd&&i.setTagName(s.slice(e,b)),b;case">":switch(S){case cd:i.setTagName(s.slice(e,b));case Xl:case hd:case Vf:break;case Yl:case Aa:m=s.slice(e,b),m.slice(-1)==="/"&&(i.closed=!0,m=m.slice(0,-1));case Gl:S===Gl&&(m=f),S==Yl?(u.warning('attribute "'+m+'" missed quot(")!'),c(f,m,e)):((!ud.isHTML(r[""])||!m.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+m+'" missed value!! "'+m+'" instead!!'),c(m,m,e));break;case dd:throw new Error("attribute value missed!!")}return b;case"€":x=" ";default:if(x<=" ")switch(S){case cd:i.setTagName(s.slice(e,b)),S=hd;break;case Aa:f=s.slice(e,b),S=Gl;break;case Yl:var m=s.slice(e,b);u.warning('attribute "'+m+'" missed quot(")!!'),c(f,m,e);case Xl:S=hd;break}else switch(S){case Gl:i.tagName,(!ud.isHTML(r[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+f+'" missed value!! "'+f+'" instead2!!'),c(f,f,e),e=b,S=Aa;break;case Xl:u.warning('attribute space is required"'+f+'"!!');case hd:S=Aa,e=b;break;case dd:S=Yl,e=b;break;case Vf:throw new Error("elements closed character '/' and '>' must be connected to")}}b++}}function z1(s,e,i){for(var r=s.tagName,o=null,x=s.length;x--;){var u=s[x],c=u.qName,f=u.value,w=c.indexOf(":");if(w>0)var m=u.prefix=c.slice(0,w),b=c.slice(w+1),S=m==="xmlns"&&b;else b=c,m=null,S=c==="xmlns"&&"";u.localName=b,S!==!1&&(o==null&&(o={},V1(i,i={})),i[S]=o[S]=f,u.uri=ud.XMLNS,e.startPrefixMapping(S,f))}for(var x=s.length;x--;){u=s[x];var m=u.prefix;m&&(m==="xml"&&(u.uri=ud.XML),m!=="xmlns"&&(u.uri=i[m||""]))}var w=r.indexOf(":");w>0?(m=s.prefix=r.slice(0,w),b=s.localName=r.slice(w+1)):(m=null,b=s.localName=r);var R=s.uri=i[m||""];if(e.startElement(R,b,r,s),s.closed){if(e.endElement(R,b,r),o)for(m in o)Object.prototype.hasOwnProperty.call(o,m)&&e.endPrefixMapping(m)}else return s.currentNSMap=i,s.localNSMap=o,!0}function g4(s,e,i,r,o){if(/^(?:script|textarea)$/i.test(i)){var u=s.indexOf("</"+i+">",e),c=s.substring(e+1,u);if(/[&<]/.test(c))return/^script$/i.test(i)?(o.characters(c,0,c.length),u):(c=c.replace(/&#?\w+;/g,r),o.characters(c,0,c.length),u)}return e+1}function y4(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 v4(s,e,i,r){var o=s.charAt(e+2);switch(o){case"-":if(s.charAt(e+3)==="-"){var u=s.indexOf("-->",e+4);return u>e?(i.comment(s,e+4,u-e-4),u+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(s.substr(e+3,6)=="CDATA["){var u=s.indexOf("]]>",e+9);return i.startCDATA(),i.characters(s,e+9,u-e-9),i.endCDATA(),u+3}var c=_4(s,e),f=c.length;if(f>1&&/!doctype/i.test(c[0][0])){var m=c[1][0],b=!1,S=!1;f>3&&(/^public$/i.test(c[2][0])?(b=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(m,b,S),i.endDTD(),x.index+x[0].length}}return-1}function b4(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(!F1.test(s))throw new Error("invalid tagName:"+s);this.tagName=s},addValue:function(s,e,i){if(!F1.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 _4(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=H1,a0.ParseError=Wl;var T4=Lr,S4=wa,G1=U1,Y1=a0,x4=S4.DOMImplementation,X1=T4.NAMESPACE,E4=Y1.ParseError,C4=Y1.XMLReader;function W1(s){return s.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function Q1(s){this.options=s||{locator:{}}}Q1.prototype.parseFromString=function(s,e){var i=this.options,r=new C4,o=i.domBuilder||new fd,u=i.errorHandler,c=i.locator,f=i.xmlns||{},m=/\/x?html?$/.test(e),b=m?G1.HTML_ENTITIES:G1.XML_ENTITIES;c&&o.setDocumentLocator(c),r.errorHandler=w4(u,o,c),r.domBuilder=i.domBuilder||o,m&&(f[""]=X1.HTML),f.xml=f.xml||X1.XML;var S=i.normalizeLineEndings||W1;return s&&typeof s=="string"?r.parse(S(s),f,b):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 u(c){var f=s[c];!f&&o&&(f=s.length==2?function(m){s(c,m)}:s),r[c]=f&&function(m){f("[xmldom "+c+"] "+m+l0(i))}||function(){}}return u("warning"),u("error"),u("fatalError"),r}function fd(){this.cdata=!1}function Ql(s,e){e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber}fd.prototype={startDocument:function(){this.doc=new x4().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(s,e,i,r){var o=this.doc,u=o.createElementNS(s,i||e),c=r.length;$f(this,u),this.currentElement=u,this.locator&&Ql(this.locator,u);for(var f=0;f<c;f++){var s=r.getURI(f),m=r.getValue(f),i=r.getQName(f),b=o.createAttributeNS(s,i);this.locator&&Ql(r.getLocator(f),b),b.value=b.nodeValue=m,u.setAttributeNode(b)}},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&&Ql(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&&Ql(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&&Ql(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&&Ql(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 E4(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)}zf.__DOMHandler=fd,zf.normalizeLineEndings=W1,zf.DOMParser=Q1;var A4=zf.DOMParser;/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const Z1=s=>!!s&&typeof s=="object",Ti=(...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]=Ti(e[r],i[r]):e[r]=i[r]}),e),{}),J1=s=>Object.keys(s).map(e=>s[e]),D4=(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),[]),eT=s=>{if(!s.length)return[];const e=[];for(let i=0;i<s.length;i++)e.push(s[i]);return e},k4=(s,e)=>s.reduce((i,r,o)=>(r[e]&&i.push(o),i),[]),O4=(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:Pf(s||"",e)};if(i||r){const c=(i||r).split("-");let f=B.BigInt?B.BigInt(c[0]):parseInt(c[0],10),m=B.BigInt?B.BigInt(c[1]):parseInt(c[1],10);f<Number.MAX_SAFE_INTEGER&&typeof f=="bigint"&&(f=Number(f)),m<Number.MAX_SAFE_INTEGER&&typeof m=="bigint"&&(m=Number(m));let b;typeof m=="bigint"||typeof f=="bigint"?b=B.BigInt(m)-B.BigInt(f)+B.BigInt(1):b=m-f+1,typeof b=="bigint"&&b<Number.MAX_SAFE_INTEGER&&(b=Number(b)),o.byterange={length:b,offset:f}}return o},R4=s=>{let e;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=B.BigInt(s.offset)+B.BigInt(s.length)-B.BigInt(1):e=s.offset+s.length-1,`${s.offset}-${e}`},tT=s=>(s&&typeof s!="number"&&(s=parseInt(s,10)),isNaN(s)?null:s),M4={static(s){const{duration:e,timescale:i=1,sourceDuration:r,periodDuration:o}=s,u=tT(s.endNumber),c=e/i;return typeof u=="number"?{start:0,end:u}: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:u,periodStart:c=0,minimumUpdatePeriod:f=0,timeShiftBufferDepth:m=1/0}=s,b=tT(s.endNumber),S=(e+i)/1e3,x=r+c,R=S+f-x,L=Math.ceil(R*o/u),A=Math.floor((S-x-m)*o/u),q=Math.floor((S-x)*o/u);return{start:Math.max(0,A),end:typeof b=="number"?b:Math.min(L,q)}}},L4=s=>e=>{const{duration:i,timescale:r=1,periodStart:o,startNumber:u=1}=s;return{number:u+e,duration:i/r,timeline:o,time:e*i}},u0=s=>{const{type:e,duration:i,timescale:r=1,periodDuration:o,sourceDuration:u}=s,{start:c,end:f}=M4[e](s),m=D4(c,f).map(L4(s));if(e==="static"){const b=m.length-1,S=typeof o=="number"?o:u;m[b].duration=S-i/r*b}return m},iT=s=>{const{baseUrl:e,initialization:i={},sourceDuration:r,indexRange:o="",periodStart:u,presentationTime:c,number:f=0,duration:m}=s;if(!e)throw new Error(Zl.NO_BASE_URL);const b=pd({baseUrl:e,source:i.sourceURL,range:i.range}),S=pd({baseUrl:e,source:e,indexRange:o});if(S.map=b,m){const x=u0(s);x.length&&(S.duration=x[0].duration,S.timeline=x[0].timeline)}else r&&(S.duration=r,S.timeline=u);return S.presentationTime=c||u,S.number=f,[S]},c0=(s,e,i)=>{const r=s.sidx.map?s.sidx.map:null,o=s.sidx.duration,u=s.timeline||0,c=s.sidx.byterange,f=c.offset+c.length,m=e.timescale,b=e.references.filter(q=>q.referenceType!==1),S=[],x=s.endList?"static":"dynamic",w=s.sidx.timeline;let R=w,L=s.mediaSequence||0,A;typeof e.firstOffset=="bigint"?A=B.BigInt(f)+e.firstOffset:A=f+e.firstOffset;for(let q=0;q<b.length;q++){const U=e.references[q],G=U.referencedSize,$=U.subsegmentDuration;let W;typeof A=="bigint"?W=A+B.BigInt(G)-B.BigInt(1):W=A+G-1;const K=`${A}-${W}`,Y=iT({baseUrl:i,timescale:m,timeline:u,periodStart:w,presentationTime:R,number:L,duration:$,sourceDuration:o,indexRange:K,type:x})[0];r&&(Y.map=r),S.push(Y),typeof A=="bigint"?A+=B.BigInt(G):A+=G,R+=$/m,L++}return s.segments=S,s},I4=["AUDIO","SUBTITLES"],N4=1/60,nT=s=>O4(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},sT=s=>{let e=[];return Jk(s,I4,(i,r,o,u)=>{e=e.concat(i.playlists||[])}),e},rT=({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:m}){return m===r.timeline});const o=P4(s,r.attributes.NAME);if(!o||r.sidx)return;const u=r.segments[0],c=o.segments.findIndex(function(m){return Math.abs(m.presentationTime-u.presentationTime)<N4});if(c===-1){rT({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&&!u.discontinuity&&(u.discontinuity=!0,r.discontinuityStarts.unshift(0),r.discontinuitySequence--),rT({playlist:r,mediaSequence:o.segments[c].number})})},U4=({oldManifest:s,newManifest:e})=>{const i=s.playlists.concat(sT(s)),r=e.playlists.concat(sT(e));return e.timelineStarts=nT([s.timelineStarts,e.timelineStarts]),B4({oldPlaylists:i,newPlaylists:r,timelineStarts:e.timelineStarts}),e},Gf=s=>s&&s.uri+"-"+R4(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((u,c)=>{const f=c.attributes.id+(c.attributes.lang||"");return u[f]?(c.segments&&(c.segments[0]&&(c.segments[0].discontinuity=!0),u[f].segments.push(...c.segments)),c.attributes.contentProtection&&(u[f].attributes.contentProtection=c.attributes.contentProtection)):(u[f]=c,u[f].attributes.timelineStarts=[]),u[f].attributes.timelineStarts.push({start:c.attributes.periodStart,timeline:c.attributes.periodStart}),u},{}));i=i.concat(o)}),i.map(r=>(r.discontinuityStarts=k4(r.segments||[],"discontinuity"),r))},h0=(s,e)=>{const i=Gf(s.sidx),r=i&&e[i]&&e[i].sidx;return r&&c0(s,r,s.sidx.resolvedUri),s},q4=(s,e={})=>{if(!Object.keys(e).length)return s;for(const i in s)s[i]=h0(s[i],e);return s},F4=({attributes:s,segments:e,sidx:i,mediaSequence:r,discontinuitySequence:o,discontinuityStarts:u},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:u,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},H4=({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 u={NAME:s.id,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1};s.codecs&&(u.CODECS=s.codecs);const c={attributes:u,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},j4=(s,e={},i=!1)=>{let r;const o=s.reduce((u,c)=>{const f=c.attributes.role&&c.attributes.role.value||"",m=c.attributes.lang||"";let b=c.attributes.label||"main";if(m&&!c.attributes.label){const x=f?` (${f})`:"";b=`${c.attributes.lang}${x}`}u[b]||(u[b]={language:m,autoselect:!0,default:f==="main",playlists:[],uri:""});const S=h0(F4(c,i),e);return u[b].playlists.push(S),typeof r>"u"&&f==="main"&&(r=c,r.default=!0),u},{});if(!r){const u=Object.keys(o)[0];o[u].default=!0}return o},z4=(s,e={})=>s.reduce((i,r)=>{const o=r.attributes.label||r.attributes.lang||"text",u=r.attributes.lang||"und";return i[o]||(i[o]={language:u,default:!1,autoselect:!1,playlists:[],uri:""}),i[o].playlists.push(h0(H4(r),e)),i},{}),V4=s=>s.reduce((e,i)=>(i&&i.forEach(r=>{const{channel:o,language:u}=r;e[u]={autoselect:!1,default:!1,instreamId:o,language:u},r.hasOwnProperty("aspectRatio")&&(e[u].aspectRatio=r.aspectRatio),r.hasOwnProperty("easyReader")&&(e[u].easyReader=r.easyReader),r.hasOwnProperty("3D")&&(e[u]["3D"]=r["3D"])}),e),{}),$4=({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},G4=({attributes:s})=>s.mimeType==="video/mp4"||s.mimeType==="video/webm"||s.contentType==="video",Y4=({attributes:s})=>s.mimeType==="audio/mp4"||s.mimeType==="audio/webm"||s.contentType==="audio",X4=({attributes:s})=>s.mimeType==="text/vtt"||s.contentType==="text",W4=(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})})},aT=s=>s?Object.keys(s).reduce((e,i)=>{const r=s[i];return e.concat(r.playlists)},[]):[],Q4=({dashPlaylists:s,locations:e,contentSteering:i,sidxMapping:r={},previousManifest:o,eventStream:u})=>{if(!s.length)return{};const{sourceDuration:c,type:f,suggestedPresentationDelay:m,minimumUpdatePeriod:b}=s[0].attributes,S=d0(s.filter(G4)).map($4),x=d0(s.filter(Y4)),w=d0(s.filter(X4)),R=s.map(W=>W.attributes.captionServices).filter(Boolean),L={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:c,playlists:q4(S,r)};b>=0&&(L.minimumUpdatePeriod=b*1e3),e&&(L.locations=e),i&&(L.contentSteering=i),f==="dynamic"&&(L.suggestedPresentationDelay=m),u&&u.length>0&&(L.eventStream=u);const A=L.playlists.length===0,q=x.length?j4(x,r,A):null,U=w.length?z4(w,r):null,G=S.concat(aT(q),aT(U)),$=G.map(({timelineStarts:W})=>W);return L.timelineStarts=nT($),W4(G,L.timelineStarts),q&&(L.mediaGroups.AUDIO.audio=q),U&&(L.mediaGroups.SUBTITLES.subs=U),R.length&&(L.mediaGroups["CLOSED-CAPTIONS"].cc=V4(R)),o?U4({oldManifest:o,newManifest:L}):L},K4=(s,e,i)=>{const{NOW:r,clientOffset:o,availabilityStartTime:u,timescale:c=1,periodStart:f=0,minimumUpdatePeriod:m=0}=s,b=(r+o)/1e3,S=u+f,w=b+m-S;return Math.ceil((w*c-e)/i)},oT=(s,e)=>{const{type:i,minimumUpdatePeriod:r=0,media:o="",sourceDuration:u,timescale:c=1,startNumber:f=1,periodStart:m}=s,b=[];let S=-1;for(let x=0;x<e.length;x++){const w=e[x],R=w.d,L=w.r||0,A=w.t||0;S<0&&(S=A),A&&A>S&&(S=A);let q;if(L<0){const $=x+1;$===e.length?i==="dynamic"&&r>0&&o.indexOf("$Number$")>0?q=K4(s,S,R):q=(u*c-S)/R:q=(e[$].t-S)/R}else q=L+1;const U=f+b.length+q;let G=f+b.length;for(;G<U;)b.push({number:G,duration:R/c,time:S,timeline:m}),S+=R,G++}return b},Z4=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,J4=s=>(e,i,r,o)=>{if(e==="$$")return"$";if(typeof s[i]>"u")return e;const u=""+s[i];return i==="RepresentationID"||(r?o=parseInt(o,10):o=1,u.length>=o)?u:`${new Array(o-u.length+1).join("0")}${u}`},lT=(s,e)=>s.replace(Z4,J4(e)),e3=(s,e)=>!s.duration&&!e?[{number:s.startNumber||1,duration:s.sourceDuration,time:0,timeline:s.periodStart}]:s.duration?u0(s):oT(s,e),t3=(s,e)=>{const i={RepresentationID:s.id,Bandwidth:s.bandwidth||0},{initialization:r={sourceURL:"",range:""}}=s,o=pd({baseUrl:s.baseUrl,source:lT(r.sourceURL,i),range:r.range});return e3(s,e).map(c=>{i.Number=c.number,i.Time=c.time;const f=lT(s.media||"",i),m=s.timescale||1,b=s.presentationTimeOffset||0,S=s.periodStart+(c.time-b)/m;return{uri:f,timeline:c.timeline,duration:c.duration,resolvedUri:Pf(s.baseUrl||"",f),map:o,number:c.number,presentationTime:S}})},i3=(s,e)=>{const{baseUrl:i,initialization:r={}}=s,o=pd({baseUrl:i,source:r.sourceURL,range:r.range}),u=pd({baseUrl:i,source:e.media,range:e.mediaRange});return u.map=o,u},n3=(s,e)=>{const{duration:i,segmentUrls:r=[],periodStart:o}=s;if(!i&&!e||i&&e)throw new Error(Zl.SEGMENT_TIME_UNSPECIFIED);const u=r.map(m=>i3(s,m));let c;return i&&(c=u0(s)),e&&(c=oT(s,e)),c.map((m,b)=>{if(u[b]){const S=u[b],x=s.timescale||1,w=s.presentationTimeOffset||0;return S.timeline=m.timeline,S.duration=m.duration,S.number=m.number,S.presentationTime=o+(m.time-w)/x,S}}).filter(m=>m)},s3=({attributes:s,segmentInfo:e})=>{let i,r;e.template?(r=t3,i=Ti(s,e.template)):e.base?(r=iT,i=Ti(s,e.base)):e.list&&(r=n3,i=Ti(s,e.list));const o={attributes:s};if(!r)return o;const u=r(i,e.segmentTimeline);if(i.duration){const{duration:c,timescale:f=1}=i;i.duration=c/f}else u.length?i.duration=u.reduce((c,f)=>Math.max(c,Math.ceil(f.duration)),0):i.duration=0;return o.attributes=i,o.segments=u,e.base&&i.indexRange&&(o.sidx=u[0],o.segments=[]),o},r3=s=>s.map(s3),zt=(s,e)=>eT(s.childNodes).filter(({tagName:i})=>i===e),md=s=>s.textContent.trim(),a3=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[m,b,S,x,w,R]=f.slice(1);return parseFloat(m||0)*31536e3+parseFloat(b||0)*2592e3+parseFloat(S||0)*86400+parseFloat(x||0)*3600+parseFloat(w||0)*60+parseFloat(R||0)},o3=s=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(s)&&(s+="Z"),Date.parse(s)),uT={mediaPresentationDuration(s){return Jl(s)},availabilityStartTime(s){return o3(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 a3(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}},ui=s=>s&&s.attributes?eT(s.attributes).reduce((e,i)=>{const r=uT[i.name]||uT.DEFAULT;return e[i.name]=r(i.value),e},{}):{},l3={"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"},Yf=(s,e)=>e.length?Kl(s.map(function(i){return e.map(function(r){const o=md(r),u=Pf(i.baseUrl,o),c=Ti(ui(r),{baseUrl:u});return u!==o&&!c.serviceLocation&&i.serviceLocation&&(c.serviceLocation=i.serviceLocation),c})})):s,f0=s=>{const e=zt(s,"SegmentTemplate")[0],i=zt(s,"SegmentList")[0],r=i&&zt(i,"SegmentURL").map(x=>Ti({tag:"SegmentURL"},ui(x))),o=zt(s,"SegmentBase")[0],u=i||e,c=u&&zt(u,"SegmentTimeline")[0],f=i||o||e,m=f&&zt(f,"Initialization")[0],b=e&&ui(e);b&&m?b.initialization=m&&ui(m):b&&b.initialization&&(b.initialization={sourceURL:b.initialization});const S={template:b,segmentTimeline:c&&zt(c,"S").map(x=>ui(x)),list:i&&Ti(ui(i),{segmentUrls:r,initialization:ui(m)}),base:o&&Ti(ui(o),{initialization:ui(m)})};return Object.keys(S).forEach(x=>{S[x]||delete S[x]}),S},u3=(s,e,i)=>r=>{const o=zt(r,"BaseURL"),u=Yf(e,o),c=Ti(s,ui(r)),f=f0(r);return u.map(m=>({segmentInfo:Ti(i,f),attributes:Ti(c,m)}))},c3=s=>s.reduce((e,i)=>{const r=ui(i);r.schemeIdUri&&(r.schemeIdUri=r.schemeIdUri.toLowerCase());const o=l3[r.schemeIdUri];if(o){e[o]={attributes:r};const u=zt(i,"cenc:pssh")[0];if(u){const c=md(u);e[o].pssh=c&&e1(c)}}return e},{}),d3=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,u=""]=i.split("=");r.channel=o,r.language=i,u.split(",").forEach(c=>{const[f,m]=c.split(":");f==="lang"?r.language=m:f==="er"?r.easyReader=Number(m):f==="war"?r.aspectRatio=Number(m):f==="3D"&&(r["3D"]=Number(m))})}else r.language=i;return r.channel&&(r.channel="SERVICE"+r.channel),r})},h3=s=>Kl(zt(s.node,"EventStream").map(e=>{const i=ui(e),r=i.schemeIdUri;return zt(e,"Event").map(o=>{const u=ui(o),c=u.presentationTime||0,f=i.timescale||1,m=u.duration||0,b=c/f+s.attributes.start;return{schemeIdUri:r,value:i.value,id:u.id,start:b,end:b+m/f,messageData:md(o)||u.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),f3=(s,e,i)=>r=>{const o=ui(r),u=Yf(e,zt(r,"BaseURL")),c=zt(r,"Role")[0],f={role:ui(c)};let m=Ti(s,o,f);const b=zt(r,"Accessibility")[0],S=d3(ui(b));S&&(m=Ti(m,{captionServices:S}));const x=zt(r,"Label")[0];if(x&&x.childNodes.length){const q=x.childNodes[0].nodeValue.trim();m=Ti(m,{label:q})}const w=c3(zt(r,"ContentProtection"));Object.keys(w).length&&(m=Ti(m,{contentProtection:w}));const R=f0(r),L=zt(r,"Representation"),A=Ti(i,R);return Kl(L.map(u3(m,u,A)))},p3=(s,e)=>(i,r)=>{const o=Yf(e,zt(i.node,"BaseURL")),u=Ti(s,{periodStart:i.attributes.start});typeof i.attributes.duration=="number"&&(u.periodDuration=i.attributes.duration);const c=zt(i.node,"AdaptationSet"),f=f0(i.node);return Kl(c.map(f3(u,o,f)))},m3=(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=Ti({serverURL:md(s[0])},ui(s[0]));return i.queryBeforeStart=i.queryBeforeStart==="true",i},g3=({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,y3=(s,e={})=>{const{manifestUri:i="",NOW:r=Date.now(),clientOffset:o=0,eventHandler:u=function(){}}=e,c=zt(s,"Period");if(!c.length)throw new Error(Zl.INVALID_NUMBER_OF_PERIOD);const f=zt(s,"Location"),m=ui(s),b=Yf([{baseUrl:i}],zt(s,"BaseURL")),S=zt(s,"ContentSteering");m.type=m.type||"static",m.sourceDuration=m.mediaPresentationDuration||0,m.NOW=r,m.clientOffset=o,f.length&&(m.locations=f.map(md));const x=[];return c.forEach((w,R)=>{const L=ui(w),A=x[R-1];L.start=g3({attributes:L,priorPeriodAttributes:A?A.attributes:null,mpdType:m.type}),x.push({node:w,attributes:L})}),{locations:m.locations,contentSteeringInfo:m3(S,u),representationInfo:Kl(x.map(p3(m,b))),eventStream:Kl(x.map(h3))}},cT=s=>{if(s==="")throw new Error(Zl.DASH_EMPTY_MANIFEST);const e=new A4;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},v3=s=>{const e=zt(s,"UTCTiming")[0];if(!e)return null;const i=ui(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},b3=(s,e={})=>{const i=y3(cT(s),e),r=r3(i.representationInfo);return Q4({dashPlaylists:r,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:i.eventStream})},_3=s=>v3(cT(s));var dT=Math.pow(2,32),T3=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)*dT+e.getUint32(4)},S3={getUint64:T3,MAX_UINT32:dT},hT=S3.getUint64,x3=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=hT(s.subarray(r)),i.firstOffset=hT(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},E3=x3;const C3=Xc(E3);var w3=Fe([73,68,51]),A3=function(e,i){i===void 0&&(i=0),e=Fe(e);var r=e[i+5],o=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],u=(r&16)>>4;return u?o+20:o+10},gd=function s(e,i){return i===void 0&&(i=0),e=Fe(e),e.length-i<10||!jt(e,w3,{offset:i})?i:(i+=A3(e,i),s(e,i))},fT=function(e){return typeof e=="string"?l1(e):e},D3=function(e){return Array.isArray(e)?e.map(function(i){return fT(i)}):[fT(e)]},k3=function s(e,i,r){r===void 0&&(r=!1),i=D3(i),e=Fe(e);var o=[];if(!i.length)return o;for(var u=0;u<e.length;){var c=(e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3])>>>0,f=e.subarray(u+4,u+8);if(c===0)break;var m=u+c;if(m>e.length){if(r)break;m=e.length}var b=e.subarray(u+8,m);jt(f,i[0])&&(i.length===1?o.push(b):o.push.apply(o,s(b,i.slice(1),r))),u=m}return o},Xf={EBML:Fe([26,69,223,163]),DocType:Fe([66,130]),Segment:Fe([24,83,128,103]),SegmentInfo:Fe([21,73,169,102]),Tracks:Fe([22,84,174,107]),Track:Fe([174]),TrackNumber:Fe([215]),DefaultDuration:Fe([35,227,131]),TrackEntry:Fe([174]),TrackType:Fe([131]),FlagDefault:Fe([136]),CodecID:Fe([134]),CodecPrivate:Fe([99,162]),VideoTrack:Fe([224]),AudioTrack:Fe([225]),Cluster:Fe([31,67,182,117]),Timestamp:Fe([231]),TimestampScale:Fe([42,215,177]),BlockGroup:Fe([160]),BlockDuration:Fe([155]),Block:Fe([161]),SimpleBlock:Fe([163])},p0=[128,64,32,16,8,4,2,1],O3=function(e){for(var i=1,r=0;r<p0.length&&!(e&p0[r]);r++)i++;return i},Wf=function(e,i,r,o){r===void 0&&(r=!0),o===void 0&&(o=!1);var u=O3(e[i]),c=e.subarray(i,i+u);return r&&(c=Array.prototype.slice.call(e,i,i+u),c[0]^=p0[u-1]),{length:u,value:Qk(c,{signed:o}),bytes:c}},pT=function s(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return s(i)}):typeof e=="number"?Kk(e):e},R3=function(e){return Array.isArray(e)?e.map(function(i){return pT(i)}):[pT(e)]},M3=function s(e,i,r){if(r>=i.length)return i.length;var o=Wf(i,r,!1);if(jt(e.bytes,o.bytes))return r;var u=Wf(i,r+o.length);return s(e,i,r+u.length+u.value+o.length)},mT=function s(e,i){i=R3(i),e=Fe(e);var r=[];if(!i.length)return r;for(var o=0;o<e.length;){var u=Wf(e,o,!1),c=Wf(e,o+u.length),f=o+u.length+c.length;c.value===127&&(c.value=M3(u,e,f),c.value!==e.length&&(c.value-=f));var m=f+c.value>e.length?e.length:f+c.value,b=e.subarray(f,m);jt(i[0],u.bytes)&&(i.length===1?r.push(b):r=r.concat(s(b,i.slice(1))));var S=u.length+c.length+b.length;o+=S}return r},L3=Fe([0,0,0,1]),I3=Fe([0,0,1]),N3=Fe([0,0,3]),P3=function(e){for(var i=[],r=1;r<e.length-2;)jt(e.subarray(r,r+3),N3)&&(i.push(r+2),r++),r++;if(i.length===0)return e;var o=e.length-i.length,u=new Uint8Array(o),c=0;for(r=0;r<o;c++,r++)c===i[0]&&(c++,i.shift()),u[r]=e[c];return u},gT=function(e,i,r,o){o===void 0&&(o=1/0),e=Fe(e),r=[].concat(r);for(var u=0,c,f=0;u<e.length&&(f<o||c);){var m=void 0;if(jt(e.subarray(u),L3)?m=4:jt(e.subarray(u),I3)&&(m=3),!m){u++;continue}if(f++,c)return P3(e.subarray(c,u));var b=void 0;i==="h264"?b=e[u+m]&31:i==="h265"&&(b=e[u+m]>>1&63),r.indexOf(b)!==-1&&(c=u+m),u+=m+(i==="h264"?1:2)}return e.subarray(0,0)},B3=function(e,i,r){return gT(e,"h264",i,r)},U3=function(e,i,r){return gT(e,"h265",i,r)},nn={webm:Fe([119,101,98,109]),matroska:Fe([109,97,116,114,111,115,107,97]),flac:Fe([102,76,97,67]),ogg:Fe([79,103,103,83]),ac3:Fe([11,119]),riff:Fe([82,73,70,70]),avi:Fe([65,86,73]),wav:Fe([87,65,86,69]),"3gp":Fe([102,116,121,112,51,103]),mp4:Fe([102,116,121,112]),fmp4:Fe([115,116,121,112]),mov:Fe([102,116,121,112,113,116]),moov:Fe([109,111,111,118]),moof:Fe([109,111,111,102])},eu={aac:function(e){var i=gd(e);return jt(e,[255,16],{offset:i,mask:[255,22]})},mp3:function(e){var i=gd(e);return jt(e,[255,2],{offset:i,mask:[255,6]})},webm:function(e){var i=mT(e,[Xf.EBML,Xf.DocType])[0];return jt(i,nn.webm)},mkv:function(e){var i=mT(e,[Xf.EBML,Xf.DocType])[0];return jt(i,nn.matroska)},mp4:function(e){if(eu["3gp"](e)||eu.mov(e))return!1;if(jt(e,nn.mp4,{offset:4})||jt(e,nn.fmp4,{offset:4})||jt(e,nn.moof,{offset:4})||jt(e,nn.moov,{offset:4}))return!0},mov:function(e){return jt(e,nn.mov,{offset:4})},"3gp":function(e){return jt(e,nn["3gp"],{offset:4})},ac3:function(e){var i=gd(e);return jt(e,nn.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 jt(e,nn.flac,{offset:i})},ogg:function(e){return jt(e,nn.ogg)},avi:function(e){return jt(e,nn.riff)&&jt(e,nn.avi,{offset:8})},wav:function(e){return jt(e,nn.riff)&&jt(e,nn.wav,{offset:8})},h264:function(e){return B3(e,7,3).length},h265:function(e){return U3(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(Fe(i))}});var q3=eu,g0=function(e){e=Fe(e);for(var i=0;i<m0.length;i++){var r=m0[i];if(q3[r](e))return r}return""},F3=function(e){return k3(e,["moof"]).length>0},y0=9e4,v0,b0,Qf,_0,yT,vT,bT;v0=function(s){return s*y0},b0=function(s,e){return s*e},Qf=function(s){return s/y0},_0=function(s,e){return s/e},yT=function(s,e){return v0(_0(s,e))},vT=function(s,e){return b0(Qf(s),e)},bT=function(s,e,i){return Qf(i?s:s-e)};var ko={ONE_SECOND_IN_TS:y0,secondsToVideoTs:v0,secondsToAudioTs:b0,videoTsToSeconds:Qf,audioTsToSeconds:_0,audioTsToVideoTs:yT,videoTsToAudioTs:vT,metadataTsToSeconds:bT};/**
* @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 T0="8.23.3";const Br={},Da=function(s,e){return Br[s]=Br[s]||[],e&&(Br[s]=Br[s].concat(e)),Br[s]},H3=function(s,e){Da(s,e)},_T=function(s,e){const i=Da(s).indexOf(e);return i<=-1?!1:(Br[s]=Br[s].slice(),Br[s].splice(i,1),!0)},j3=function(s,e){Da(s,[].concat(e).map(i=>{const r=(...o)=>(_T(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"]],TT=Zf[0];let yd;for(let s=0;s<Zf.length;s++)if(Zf[s][1]in me){yd=Zf[s];break}if(yd){for(let s=0;s<yd.length;s++)Kf[TT[s]]=yd[s];Kf.prefixed=yd[0]!==TT[0]}let vn=[];const z3=(s,e,i)=>(r,o,u)=>{const c=e.levels[o],f=new RegExp(`^(${c})$`);let m=s;if(r!=="log"&&u.unshift(r.toUpperCase()+":"),i&&(m=`%c${s}`,u.unshift(i)),u.unshift(m+":"),vn){vn.push([].concat(u));const S=vn.length-1e3;vn.splice(0,S>0?S:0)}if(!B.console)return;let b=B.console[r];!b&&r==="debug"&&(b=B.console.info||B.console.log),!(!b||!c||!f.test(r))&&b[Array.isArray(u)?"apply":"call"](B.console,u)};function S0(s,e=":",i=""){let r="info",o;function u(...c){o("log",r,c)}return o=z3(s,u,i),u.createLogger=(c,f,m)=>{const b=f!==void 0?f:e,S=m!==void 0?m:i,x=`${s} ${b} ${c}`;return S0(x,b,S)},u.createNewLogger=(c,f,m)=>S0(c,f,m),u.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},u.level=c=>{if(typeof c=="string"){if(!u.levels.hasOwnProperty(c))throw new Error(`"${c}" in not a valid log level`);r=c}return r},u.history=()=>vn?[].concat(vn):[],u.history.filter=c=>(vn||[]).filter(f=>new RegExp(`.*${c}.*`).test(f[0])),u.history.clear=()=>{vn&&(vn.length=0)},u.history.disable=()=>{vn!==null&&(vn.length=0,vn=null)},u.history.enable=()=>{vn===null&&(vn=[])},u.error=(...c)=>o("error",r,c),u.warn=(...c)=>o("warn",r,c),u.debug=(...c)=>o("debug",r,c),u}const nt=S0("VIDEOJS"),ST=nt.createLogger,V3=Object.prototype.toString,xT=function(s){return $s(s)?Object.keys(s):[]};function tu(s,e){xT(s).forEach(i=>e(s[i],i))}function ET(s,e,i=0){return xT(s).reduce((r,o)=>e(r,s[o],o),i)}function $s(s){return!!s&&typeof s=="object"}function iu(s){return $s(s)&&V3.call(s)==="[object Object]"&&s.constructor===Object}function Dt(...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]=Dt(e[o],r)})}),e}function CT(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}),u={configurable:!0,enumerable:!0,get(){const c=i();return o(c),c}};return r&&(u.set=o),Object.defineProperty(s,e,u)}var $3=Object.freeze({__proto__:null,each:tu,reduce:ET,isObject:$s,isPlain:iu,merge:Dt,values:CT,defineLazyProperty:Jf});let x0=!1,wT=null,xs=!1,AT,DT=!1,nu=!1,su=!1,Gs=!1,E0=null,ep=null;const G3=!!(B.cast&&B.cast.framework&&B.cast.framework.CastReceiverContext);let kT=null,tp=!1,ip=!1,np=!1,sp=!1,rp=!1,ap=!1,op=!1;const vd=!!(ru()&&("ontouchstart"in B||B.navigator.maxTouchPoints||B.DocumentTouch&&B.document instanceof B.DocumentTouch)),ka=B.navigator&&B.navigator.userAgentData;if(ka&&ka.platform&&ka.brands&&(xs=ka.platform==="Android",nu=!!ka.brands.find(s=>s.brand==="Microsoft Edge"),su=!!ka.brands.find(s=>s.brand==="Chromium"),Gs=!nu&&su,E0=ep=(ka.brands.find(s=>s.brand==="Chromium")||{}).version||null,ip=ka.platform==="Windows"),!su){const s=B.navigator&&B.navigator.userAgent||"";x0=/iPod/i.test(s),wT=function(){const e=s.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),xs=/Android/i.test(s),AT=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}(),DT=/Firefox/i.test(s),nu=/Edg/i.test(s),su=/Chrome/i.test(s)||/CriOS/i.test(s),Gs=!nu&&su,E0=ep=function(){const e=s.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),kT=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)&&!Gs&&!xs&&!nu&&!op,ip=/Windows/i.test(s),np=/iPad/i.test(s)||tp&&vd&&!/iPhone/i.test(s),sp=/iPhone/i.test(s)&&!np}const Gi=sp||np||x0,lp=(tp||Gi)&&!Gs;var OT=Object.freeze({__proto__:null,get IS_IPOD(){return x0},get IOS_VERSION(){return wT},get IS_ANDROID(){return xs},get ANDROID_VERSION(){return AT},get IS_FIREFOX(){return DT},get IS_EDGE(){return nu},get IS_CHROMIUM(){return su},get IS_CHROME(){return Gs},get CHROMIUM_VERSION(){return E0},get CHROME_VERSION(){return ep},IS_CHROMECAST_RECEIVER:G3,get IE_VERSION(){return kT},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:vd,IS_IOS:Gi,IS_ANY_SAFARI:lp});function RT(s){return typeof s=="string"&&!!s.trim()}function Y3(s){if(s.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function ru(){return me===B.document}function au(s){return $s(s)&&s.nodeType===1}function MT(){try{return B.parent!==B.self}catch{return!0}}function LT(s){return function(e,i){if(!RT(e))return me[s](null);RT(i)&&(i=me.querySelector(i));const r=au(i)?i:me;return r[s]&&r[s](e)}}function ze(s="div",e={},i={},r){const o=me.createElement(s);return Object.getOwnPropertyNames(e).forEach(function(u){const c=e[u];u==="textContent"?Oa(o,c):(o[u]!==c||u==="tabIndex")&&(o[u]=c)}),Object.getOwnPropertyNames(i).forEach(function(u){o.setAttribute(u,i[u])}),r&&w0(o,r),o}function Oa(s,e){return typeof s.textContent>"u"?s.innerText=e:s.textContent=e,s}function C0(s,e){e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}function bd(s,e){return Y3(e),s.classList.contains(e)}function Oo(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):(nt.warn("removeClass was called with an element that doesn't exist"),null)}function IT(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 NT(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 Ra(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 u=r[o].name;let c=r[o].value;i.includes(u)&&(c=c!==null),e[u]=c}}return e}function PT(s,e){return s.getAttribute(e)}function ou(s,e,i){s.setAttribute(e,i)}function cp(s,e){s.removeAttribute(e)}function BT(){me.body.focus(),me.onselectstart=function(){return!1}}function UT(){me.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 _d(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!==me[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(Gi){let S=s;for(;S&&S.nodeName.toLowerCase()!=="html";){const x=uu(S,"transform");if(/^matrix/.test(x)){const w=x.slice(7,-1).split(/,\s/).map(Number);i.x+=w[4],i.y+=w[5]}else if(/^matrix3d/.test(x)){const w=x.slice(9,-1).split(/,\s/).map(Number);i.x+=w[12],i.y+=w[13]}if(S.assignedSlot&&S.assignedSlot.parentElement&&B.WebKitCSSMatrix){const w=B.getComputedStyle(S.assignedSlot.parentElement).transform,R=new B.WebKitCSSMatrix(w);i.x+=R.m41,i.y+=R.m42}S=S.parentNode||S.host}}const r={},o=_d(e.target),u=_d(s),c=u.width,f=u.height;let m=e.offsetY-(u.top-o.top),b=e.offsetX-(u.left-o.left);return e.changedTouches&&(b=e.changedTouches[0].pageX-u.left,m=e.changedTouches[0].pageY+u.top,Gi&&(b-=i.x,m-=i.y)),r.y=1-Math.max(0,Math.min(1,m/f)),r.x=Math.max(0,Math.min(1,b/c)),r}function qT(s){return $s(s)&&s.nodeType===3}function hp(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function FT(s){return typeof s=="function"&&(s=s()),(Array.isArray(s)?s:[s]).map(e=>{if(typeof e=="function"&&(e=e()),au(e)||qT(e))return e;if(typeof e=="string"&&/\S/.test(e))return me.createTextNode(e)}).filter(e=>e)}function w0(s,e){return FT(e).forEach(i=>s.appendChild(i)),s}function HT(s,e){return w0(hp(s),e)}function Td(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 Ma=LT("querySelector"),jT=LT("querySelectorAll");function uu(s,e){if(!s||!e)return"";if(typeof B.getComputedStyle=="function"){let i;try{i=B.getComputedStyle(s)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}function zT(s){[...me.styleSheets].forEach(e=>{try{const i=[...e.cssRules].map(o=>o.cssText).join(""),r=me.createElement("style");r.textContent=i,s.document.head.appendChild(r)}catch{const r=me.createElement("link");r.rel="stylesheet",r.type=e.type,r.media=e.media.mediaText,r.href=e.href,s.document.head.appendChild(r)}})}var VT=Object.freeze({__proto__:null,isReal:ru,isEl:au,isInFrame:MT,createEl:ze,textContent:Oa,prependTo:C0,hasClass:bd,addClass:Oo,removeClass:up,toggleClass:IT,setAttributes:NT,getAttributes:Ra,getAttribute:PT,setAttribute:ou,removeAttribute:cp,blockTextSelection:BT,unblockTextSelection:UT,getBoundingClientRect:lu,findPosition:_d,getPointerPosition:dp,isTextNode:qT,emptyEl:hp,normalizeContent:FT,appendContent:w0,insertContent:HT,isSingleLeftClick:Td,$:Ma,$$:jT,computedStyle:uu,copyStyleSheetsToWindow:zT});let $T=!1,A0;const X3=function(){if(A0.options.autoSetup===!1)return;const s=Array.prototype.slice.call(me.getElementsByTagName("video")),e=Array.prototype.slice.call(me.getElementsByTagName("audio")),i=Array.prototype.slice.call(me.getElementsByTagName("video-js")),r=s.concat(e,i);if(r&&r.length>0)for(let o=0,u=r.length;o<u;o++){const c=r[o];if(c&&c.getAttribute)c.player===void 0&&c.getAttribute("data-setup")!==null&&A0(c);else{D0(1);break}}else $T||D0(1)};function D0(s,e){ru()&&(e&&(A0=e),B.setTimeout(X3,s))}function k0(){$T=!0,B.removeEventListener("load",k0)}ru()&&(me.readyState==="complete"?k0():B.addEventListener("load",k0));const GT=function(s){const e=me.createElement("style");return e.className=s,e},YT=function(s,e){s.styleSheet?s.styleSheet.cssText=e:s.textContent=e};var sn=new WeakMap;let W3=3;function Jn(){return W3++}function XT(s,e){if(!sn.has(s))return;const i=sn.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&&sn.delete(s)}function O0(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||B.event;s={};const o=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const u in r)o.includes(u)||u==="returnValue"&&r.preventDefault||(s[u]=r[u]);if(s.target||(s.target=s.srcElement||me),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 u=me.documentElement,c=me.body;s.pageX=s.clientX+(u&&u.scrollLeft||c&&c.scrollLeft||0)-(u&&u.clientLeft||c&&c.clientLeft||0),s.pageY=s.clientY+(u&&u.scrollTop||c&&c.scrollTop||0)-(u&&u.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 Q3=function(){if(typeof pp!="boolean"){pp=!1;try{const s=Object.defineProperty({},"passive",{get(){pp=!0}});B.addEventListener("test",null,s),B.removeEventListener("test",null,s)}catch{}}return pp},K3=["touchstart","touchmove"];function Nn(s,e,i){if(Array.isArray(e))return O0(Nn,s,e,i);sn.has(s)||sn.set(s,{});const r=sn.get(s);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),i.guid||(i.guid=Jn()),r.handlers[e].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(o,u){if(r.disabled)return;o=fp(o);const c=r.handlers[o.type];if(c){const f=c.slice(0);for(let m=0,b=f.length;m<b&&!o.isImmediatePropagationStopped();m++)try{f[m].call(s,o,u)}catch(S){nt.error(S)}}}),r.handlers[e].length===1)if(s.addEventListener){let o=!1;Q3()&&K3.indexOf(e)>-1&&(o={passive:!0}),s.addEventListener(e,r.dispatcher,o)}else s.attachEvent&&s.attachEvent("on"+e,r.dispatcher)}function Yi(s,e,i){if(!sn.has(s))return;const r=sn.get(s);if(!r.handlers)return;if(Array.isArray(e))return O0(Yi,s,e,i);const o=function(c,f){r.handlers[f]=[],XT(c,f)};if(e===void 0){for(const c in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},c)&&o(s,c);return}const u=r.handlers[e];if(u){if(!i){o(s,e);return}if(i.guid)for(let c=0;c<u.length;c++)u[c].guid===i.guid&&u.splice(c--,1);XT(s,e)}}function cu(s,e,i){const r=sn.has(s)?sn.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]){sn.has(e.target)||sn.set(e.target,{});const u=sn.get(e.target);e.target[e.type]&&(u.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),u.disabled=!1)}return!e.defaultPrevented}function mp(s,e,i){if(Array.isArray(e))return O0(mp,s,e,i);const r=function(){Yi(s,e,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||Jn(),Nn(s,e,r)}function R0(s,e,i){const r=function(){Yi(s,e,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||Jn(),Nn(s,e,r)}var Z3=Object.freeze({__proto__:null,fixEvent:fp,on:Nn,off:Yi,trigger:cu,one:mp,any:R0});const es=30,Ut=function(s,e,i){e.guid||(e.guid=Jn());const r=e.bind(s);return r.guid=i?i+"_"+e.guid:e.guid,r},Ys=function(s,e){let i=B.performance.now();return function(...o){const u=B.performance.now();u-i>=e&&(s(...o),i=u)}},WT=function(s,e,i,r=B){let o;const u=()=>{r.clearTimeout(o),o=null},c=function(){const f=this,m=arguments;let b=function(){o=null,b=null,i||s.apply(f,m)};!o&&i&&s.apply(f,m),r.clearTimeout(o),o=r.setTimeout(b,e)};return c.cancel=u,c};var J3=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:es,bind_:Ut,throttle:Ys,debounce:WT});let Sd;class Pn{on(e,i){const r=this.addEventListener;this.addEventListener=()=>{},Nn(this,e,i),this.addEventListener=r}off(e,i){Yi(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=()=>{},R0(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),B.clearTimeout(o);const u=B.setTimeout(()=>{r.delete(i),r.size===0&&(r=null,Sd.delete(this)),this.trigger(e)},0);r.set(i,u)}}Pn.prototype.allowedEvents_={},Pn.prototype.addEventListener=Pn.prototype.on,Pn.prototype.removeEventListener=Pn.prototype.off,Pn.prototype.dispatchEvent=Pn.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,Ur=s=>s instanceof Pn||!!s.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof s[e]=="function"),eO=(s,e)=>{Ur(s)?e():(s.eventedCallbacks||(s.eventedCallbacks=[]),s.eventedCallbacks.push(e))},M0=s=>typeof s=="string"&&/\S/.test(s)||Array.isArray(s)&&!!s.length,yp=(s,e,i)=>{if(!s||!s.nodeName&&!Ur(s))throw new Error(`Invalid target for ${gp(e)}#${i}; must be a DOM node or evented object.`)},QT=(s,e,i)=>{if(!M0(s))throw new Error(`Invalid event type for ${gp(e)}#${i}; must be a non-empty string or array.`)},KT=(s,e,i)=>{if(typeof s!="function")throw new Error(`Invalid listener for ${gp(e)}#${i}; must be a function.`)},L0=(s,e,i)=>{const r=e.length<3||e[0]===s||e[0]===s.eventBusEl_;let o,u,c;return r?(o=s.eventBusEl_,e.length>=3&&e.shift(),[u,c]=e):(o=e[0],u=e[1],c=e[2]),yp(o,s,i),QT(u,s,i),KT(c,s,i),c=Ut(s,c),{isTargetingSelf:r,target:o,type:u,listener:c}},Ro=(s,e,i,r)=>{yp(s,s,e),s.nodeName?Z3[e](s,i,r):s[e](i,r)},tO={on(...s){const{isTargetingSelf:e,target:i,type:r,listener:o}=L0(this,s,"on");if(Ro(i,"on",r,o),!e){const u=()=>this.off(i,r,o);u.guid=o.guid;const c=()=>this.off("dispose",u);c.guid=o.guid,Ro(this,"on","dispose",u),Ro(i,"on","dispose",c)}},one(...s){const{isTargetingSelf:e,target:i,type:r,listener:o}=L0(this,s,"one");if(e)Ro(i,"one",r,o);else{const u=(...c)=>{this.off(i,r,u),o.apply(null,c)};u.guid=o.guid,Ro(i,"one",r,u)}},any(...s){const{isTargetingSelf:e,target:i,type:r,listener:o}=L0(this,s,"any");if(e)Ro(i,"any",r,o);else{const u=(...c)=>{this.off(i,r,u),o.apply(null,c)};u.guid=o.guid,Ro(i,"any",r,u)}},off(s,e,i){if(!s||M0(s))Yi(this.eventBusEl_,s,e);else{const r=s,o=e;yp(r,this,"off"),QT(o,this,"off"),KT(i,this,"off"),i=Ut(this,i),this.off("dispose",i),r.nodeName?(Yi(r,o,i),Yi(r,"dispose",i)):Ur(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(!M0(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 I0(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_=ze("span",{className:"vjs-event-bus"});return Object.assign(s,tO),s.eventedCallbacks&&s.eventedCallbacks.forEach(r=>{r()}),s.on("dispose",()=>{s.off(),[s,s.el_,s.eventBusEl_].forEach(function(r){r&&sn.has(r)&&sn.delete(r)}),B.setTimeout(()=>{s.eventBusEl_=null},0)}),s}const iO={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&&Ur(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function ZT(s,e){return Object.assign(s,iO),s.state=Object.assign({},s.state,e),typeof s.handleStateChanged=="function"&&Ur(s)&&s.on("statechanged",s.handleStateChanged),s}const xd=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toLowerCase())},Kt=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},JT=function(s,e){return Kt(s)===Kt(e)};var nO=Object.freeze({__proto__:null,toLowerCase:xd,toTitleCase:Kt,titleCaseEquals:JT});let de=class Ln{constructor(e,i,r){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Dt({},this.options_),i=this.options_=Dt(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_${Jn()}`}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&&(I0(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),ZT(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_=Dt(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,i,r){return ze(e,i,r)}localize(e,i,r=e){const o=this.player_.language&&this.player_.language(),u=this.player_.languages&&this.player_.languages(),c=u&&u[o],f=o&&o.split("-")[0],m=u&&u[f];let b=r;return c&&c[e]?b=c[e]:m&&m[e]&&(b=m[e]),i&&(b=b.replace(/\{(\d+)\}/g,function(S,x){const w=i[x-1];let R=w;return typeof w>"u"&&(R=S),R})),b}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=ze("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),u=me.createElementNS(r,"svg");u.setAttributeNS(null,"viewBox","0 0 512 512");const c=me.createElementNS(r,"use");return u.appendChild(c),c.setAttributeNS(null,"href",`#vjs-icon-${e}`),o.appendChild(u),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,u;if(typeof e=="string"){u=Kt(e);const c=i.componentClass||u;i.name=u;const f=Ln.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),u=u||o.name&&Kt(o.name()),u&&(this.childNameIndex_[u]=o,this.childNameIndex_[xd(u)]=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_[Kt(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 m=c.opts;if(i[f]!==void 0&&(m=i[f]),m===!1)return;m===!0&&(m={}),m.playerOptions=this.options_.playerOptions;const b=this.addChild(f,m);b&&(this[f]=b)};let o;const u=Ln.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,m;return typeof c=="string"?(f=c,m=e[f]||this.options_[f]||{}):(f=c.name,m=c),{name:f,opts:m}}).filter(c=>{const f=Ln.getComponent(c.opts.componentClass||Kt(c.name));return f&&!u.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 Ma(e,i||this.contentEl())}$$(e,i){return jT(e,i||this.contentEl())}hasClass(e){return bd(this.el_,e)}addClass(...e){Oo(this.el_,...e)}removeClass(...e){up(this.el_,...e)}toggleClass(e,i){IT(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 PT(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],u=o.indexOf("px");return parseInt(u!==-1?o.slice(0,u):this.el_["offset"+Kt(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${Kt(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 u;this.on("touchstart",function(f){f.touches.length===1&&(i={pageX:f.touches[0].pageX,pageY:f.touches[0].pageY},e=B.performance.now(),u=!0)}),this.on("touchmove",function(f){if(f.touches.length>1)u=!1;else if(i){const m=f.touches[0].pageX-i.pageX,b=f.touches[0].pageY-i.pageY;Math.sqrt(m*m+b*b)>r&&(u=!1)}});const c=function(){u=!1};this.on("touchleave",c),this.on("touchcancel",c),this.on("touchend",function(f){i=null,u===!0&&B.performance.now()-e<o&&(f.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Ut(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=Ut(this,e),this.clearTimersOnDispose_(),r=B.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),B.clearTimeout(e)),e}setInterval(e,i){e=Ut(this,e),this.clearTimersOnDispose_();const r=B.setInterval(e,i);return this.setIntervalIds_.add(r),r}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),B.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=Ut(this,e),i=B.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=Ut(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),B.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(u){const c=B.getComputedStyle(u,null),f=c.getPropertyValue("visibility");return c.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(f)}function r(u){return!(!i(u.parentElement)||!i(u)||u.style.opacity==="0"||B.getComputedStyle(u).height==="0px"||B.getComputedStyle(u).width==="0px")}function o(u){if(u.offsetWidth+u.offsetHeight+u.getBoundingClientRect().height+u.getBoundingClientRect().width===0)return!1;const c={x:u.getBoundingClientRect().left+u.offsetWidth/2,y:u.getBoundingClientRect().top+u.offsetHeight/2};if(c.x<0||c.x>(me.documentElement.clientWidth||B.innerWidth)||c.y<0||c.y>(me.documentElement.clientHeight||B.innerHeight))return!1;let f=me.elementFromPoint(c.x,c.y);for(;f;){if(f===u)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=Ln.getComponent("Tech"),o=r&&r.isTech(i),u=Ln===i||Ln.prototype.isPrototypeOf(i.prototype);if(o||!u){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=Kt(e),Ln.components_||(Ln.components_={});const c=Ln.getComponent("Player");if(e==="Player"&&c&&c.players){const f=c.players,m=Object.keys(f);if(f&&m.length>0){for(let b=0;b<m.length;b++)if(f[m[b]]!==null)throw new Error("Can not register Player component after player has been created.")}}return Ln.components_[e]=i,Ln.components_[xd(e)]=i,i}static getComponent(e){if(!(!e||!Ln.components_))return Ln.components_[e]}};de.registerComponent("Component",de);function sO(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 sO(s,r,i.length-1),i[r][e]}function N0(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)},B.Symbol&&B.Symbol.iterator&&(e[B.Symbol.iterator]=()=>(s||[]).values()),e}function Es(s,e){return Array.isArray(s)?N0(s):s===void 0||e===void 0?N0():N0([[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 u=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||u>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,o+r+i};let P0=t2;function i2(s){P0=s}function n2(){P0=t2}function Mo(s,e=s){return P0(s,e)}var rO=Object.freeze({__proto__:null,createTimeRanges:Es,createTimeRange:Es,setFormatTime:i2,resetFormatTime:n2,formatTime:Mo});function s2(s,e){let i=0,r,o;if(!e)return 0;(!s||!s.length)&&(s=Es(0,0));for(let u=0;u<s.length;u++)r=s.start(u),o=s.end(u),o>e&&(o=e),i+=o-r;return i/e}function Yt(s){if(s instanceof Yt)return s;typeof s=="number"?this.code=s:typeof s=="string"?this.message=s:$s(s)&&(typeof s.code=="number"&&(this.code=s.code),Object.assign(this,s)),this.message||(this.message=Yt.defaultMessages[this.code]||"")}Yt.prototype.code=0,Yt.prototype.message="",Yt.prototype.status=null,Yt.prototype.metadata=null,Yt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Yt.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."},Yt.MEDIA_ERR_CUSTOM=0,Yt.prototype.MEDIA_ERR_CUSTOM=0,Yt.MEDIA_ERR_ABORTED=1,Yt.prototype.MEDIA_ERR_ABORTED=1,Yt.MEDIA_ERR_NETWORK=2,Yt.prototype.MEDIA_ERR_NETWORK=2,Yt.MEDIA_ERR_DECODE=3,Yt.prototype.MEDIA_ERR_DECODE=3,Yt.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Yt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Yt.MEDIA_ERR_ENCRYPTED=5,Yt.prototype.MEDIA_ERR_ENCRYPTED=5;function Ed(s){return s!=null&&typeof s.then=="function"}function Xs(s){Ed(s)&&s.then(null,e=>{})}const B0=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 u=B0(o.track);return o.src&&(u.src=o.src),u}).concat(Array.prototype.filter.call(s.textTracks(),function(o){return i.indexOf(o)===-1}).map(B0))},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:B0};const q0="vjs-modal-dialog";class du extends de{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_=ze("div",{className:`${q0}-content`},{role:"document"}),this.descEl_=ze("p",{className:`${q0}-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`${q0} 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(),HT(i,e),this.trigger("modalfill"),o?r.insertBefore(i,o):r.appendChild(i);const u=this.getChild("closeButton");u&&r.appendChild(u.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=me.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 u=0;u<i.length;u++)if(r===i[u]){o=u;break}me.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 B.HTMLAnchorElement||i instanceof B.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof B.HTMLInputElement||i instanceof B.HTMLSelectElement||i instanceof B.HTMLTextAreaElement||i instanceof B.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof B.HTMLIFrameElement||i instanceof B.HTMLObjectElement||i instanceof B.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable"))}}du.prototype.options_={pauseOnOpen:!0,temporary:!0},de.registerComponent("ModalDialog",du);class Lo extends Pn{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})},Ur(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 u=this[r];if(u.id===e){i=u;break}}return i}}Lo.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const s in Lo.prototype.allowedEvents_)Lo.prototype["on"+s]=null;const F0=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 Lo{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){F0(e,e[i]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&F0(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,F0(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 H0=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 Lo{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){H0(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&&H0(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,H0(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 j0 extends Lo{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 aO{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 vp{constructor(e){vp.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 u=function(c){""+c in this||Object.defineProperty(this,""+c,{get(){return this.cues_[c]}})};if(i<o)for(r=i;r<o;r++)u.call(this,r)}getCueById(e){let i=null;for(let r=0,o=this.length;r<o;r++){const u=this[r];if(u.id===e){i=u;break}}return i}}const oO={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},lO={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},uO={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},o2={disabled:"disabled",hidden:"hidden",showing:"showing"};class z0 extends Pn{constructor(e={}){super();const i={id:e.id||"vjs_track_"+Jn(),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,me.baseURI)},l2=function(s){return new URL(s,me.baseURI).href},$0=function(s){if(typeof s=="string"){const i=s.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():""}return""},bp=function(s,e=B.location){return V0(s).origin!==e.origin};var cO=Object.freeze({__proto__:null,parseUrl:V0,getAbsoluteURL:l2,getFileExtension:$0,isCrossOrigin:bp});const u2=function(s,e){const i=new B.WebVTT.Parser(B,B.vttjs,B.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&&(B.console&&B.console.groupCollapsed&&B.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),r.forEach(o=>nt.error(o)),B.console&&B.console.groupEnd&&B.console.groupEnd()),i.flush()},c2=function(s,e){const i={uri:s},r=bp(s);r&&(i.cors=r);const o=e.tech_.crossOrigin()==="use-credentials";o&&(i.withCredentials=o),V_(i,Ut(this,function(u,c,f){if(u)return nt.error(u,c);e.loaded_=!0,typeof B.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],m=>{if(m.type==="vttjserror"){nt.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return u2(f,e)}):u2(f,e)}))};class Cd extends z0{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const i=Dt(e,{kind:uO[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 u=new vp(this.cues_),c=new vp(this.activeCues_);let f=!1;this.timeupdateHandler=Ut(this,function(b={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){b.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,f&&(this.trigger("cuechange"),f=!1),b.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const m=()=>{this.stopTracking()};this.tech_.one("dispose",m),r!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return o},set(){}},mode:{get(){return r},set(b){o2[b]&&r!==b&&(r=b,!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_?u:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return c;const b=this.tech_.currentTime(),S=[];for(let x=0,w=this.cues.length;x<w;x++){const R=this.cues[x];R.startTime<=b&&R.endTime>=b&&S.push(R)}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 B.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}}}}Cd.prototype.allowedEvents_={cuechange:"cuechange"};class d2 extends z0{constructor(e={}){const i=Dt(e,{kind:lO[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 z0{constructor(e={}){const i=Dt(e,{kind:oO[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 qr extends Pn{constructor(e={}){super();let i;const r=new Cd(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=qr.NONE,r.addEventListener("loadeddata",()=>{i=qr.LOADED,this.trigger({type:"load",target:this})})}}qr.prototype.allowedEvents_={load:"load"},qr.NONE=0,qr.LOADING=1,qr.LOADED=2,qr.ERROR=3;const ts={audio:{ListClass:r2,TrackClass:d2,capitalName:"Audio"},video:{ListClass:a2,TrackClass:h2,capitalName:"Video"},text:{ListClass:j0,TrackClass:Cd,capitalName:"Text"}};Object.keys(ts).forEach(function(s){ts[s].getterName=`${s}Tracks`,ts[s].privateName=`${s}Tracks_`});const hu={remoteText:{ListClass:j0,TrackClass:Cd,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:aO,TrackClass:qr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},rn=Object.assign({},ts,hu);hu.names=Object.keys(hu),ts.names=Object.keys(ts),rn.names=[].concat(hu.names).concat(ts.names);function dO(s,e,i,r,o={}){const u=s.textTracks();o.kind=e,i&&(o.label=i),r&&(o.language=r),o.tech=s;const c=new rn.text.TrackClass(o);return u.addTrack(c),c}class Qe extends de{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}),rn.names.forEach(r=>{const o=rn[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 rn.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(Ut(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 Es(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(ts.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 u=r[o];i==="text"&&this.removeRemoteTextTrack(u),r.removeTrack(u)}})}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 Yt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Es(0,0):Es()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){ts.names.forEach(e=>{const i=ts[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(!B.WebVTT)if(me.body.contains(this.el())){if(!this.options_["vtt.js"]&&iu(Z_)&&Object.keys(Z_).length>0){this.trigger("vttjsloaded");return}const e=me.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}),B.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 u=()=>this.trigger("texttrackchange"),c=()=>{u();for(let f=0;f<e.length;f++){const m=e[f];m.removeEventListener("cuechange",u),m.mode==="showing"&&m.addEventListener("cuechange",u)}};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",u)})}addTextTrack(e,i,r){if(!e)throw new Error("TextTrack kind is required but was not provided");return dO(this,e,i,r)}createRemoteTextTrack(e){const i=Dt(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=Jn();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 Qe.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Qe||e instanceof Qe||e===Qe}static registerTech(e,i){if(Qe.techs_||(Qe.techs_={}),!Qe.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!Qe.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Qe.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Kt(e),Qe.techs_[e]=i,Qe.techs_[xd(e)]=i,e!=="Tech"&&Qe.defaultTechOrder_.push(e),i}static getTech(e){if(e){if(Qe.techs_&&Qe.techs_[e])return Qe.techs_[e];if(e=Kt(e),B&&B.videojs&&B.videojs[e])return nt.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),B.videojs[e]}}}rn.names.forEach(function(s){const e=rn[s];Qe.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),Qe.prototype.featuresVolumeControl=!0,Qe.prototype.featuresMuteControl=!0,Qe.prototype.featuresFullscreenResize=!1,Qe.prototype.featuresPlaybackRate=!1,Qe.prototype.featuresProgressEvents=!1,Qe.prototype.featuresSourceset=!1,Qe.prototype.featuresTimeupdateEvents=!1,Qe.prototype.featuresNativeTextTracks=!1,Qe.prototype.featuresVideoFrameCallback=!1,Qe.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 u=0;u<r.length;u++)if(o=r[u].canPlayType(i),o)return o;return""},s.selectSourceHandler=function(i,r){const o=s.sourceHandlers||[];let u;for(let c=0;c<o.length;c++)if(u=o[c].canHandleSource(i,r),u)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:nt.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)}},de.registerComponent("Tech",Qe),Qe.registerTech("Tech",Qe),Qe.defaultTechOrder_=[];const Io={},_p={},Tp={};function hO(s,e){Io[s]=Io[s]||[],Io[s].push(e)}function fO(s,e,i){s.setTimeout(()=>No(e,Io[e.type],i,s),1)}function pO(s,e){s.forEach(i=>i.setTech&&i.setTech(e))}function mO(s,e,i){return s.reduceRight(G0(i),e[i]())}function gO(s,e,i,r){return e[i](s.reduce(G0(i),r))}function f2(s,e,i,r=null){const o="call"+Kt(i),u=s.reduce(G0(o),r),c=u===Tp,f=c?null:e[i](u);return bO(s,i,f,c),f}const yO={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},vO={setCurrentTime:1,setMuted:1,setVolume:1},p2={play:1,pause:1};function G0(s){return(e,i)=>e===Tp?Tp:i[s]?i[s](e):e}function bO(s,e,i,r){for(let o=s.length-1;o>=0;o--){const u=s[o];u[e]&&u[e](r,i)}}function _O(s){_p.hasOwnProperty(s.id())&&delete _p[s.id()]}function TO(s,e){const i=_p[s.id()];let r=null;if(i==null)return r=e(s),_p[s.id()]=[[e,r]],r;for(let o=0;o<i.length;o++){const[u,c]=i[o];u===e&&(r=c)}return r===null&&(r=e(s),i.push([e,r])),r}function No(s={},e=[],i,r,o=[],u=!1){const[c,...f]=e;if(typeof c=="string")No(s,Io[c],i,r,o,u);else if(c){const m=TO(r,c);if(!m.setSource)return o.push(m),No(s,f,i,r,o,u);m.setSource(Object.assign({},s),function(b,S){if(b)return No(s,f,i,r,o,u);o.push(m),No(S,s.type===S.type?f:Io[S.type],i,r,o,u)})}else f.length?No(s,f,i,r,o,u):u?i(s,o):No(s,Io["*"],i,r,o,!0)}const SO={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 SO[e.toLowerCase()]||""},xO=(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 u=r[o];if(u.type&&u.src&&u.src===e)return u.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):$s(i)&&e.push(i)}),s=e}else typeof s=="string"&&s.trim()?s=[g2({src:s})]:$s(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 EO=`<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}},v2=5;class CO extends Pn{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()+v2);break;case"rw":this.userSeek_(this.player_.currentTime()-v2);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 u of o)u.hasOwnProperty("el_")&&u.getIsFocusable()&&u.getIsAvailableToBeFocused(u.el())&&i.push(u),u.hasOwnProperty("children_")&&u.children_.length>0&&r(u.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 u=o.el_.querySelector(".vjs-errors-ok-button-container");u&&u.querySelectorAll("button").forEach((f,m)=>{i.push({name:()=>"ModalButton"+(m+1),el:()=>f,getPositions:()=>{const b=f.getBoundingClientRect(),S={x:b.x,y:b.y,width:b.width,height:b.height,top:b.top,right:b.right,bottom:b.bottom,left:b.left},x={x:b.left+b.width/2,y:b.top+b.height/2,width:0,height:0,top:b.top+b.height/2,right:b.left+b.width/2,bottom:b.top+b.height/2,left:b.left+b.width/2};return{boundingClientRect:S,center:x}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:b=>!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 u=r.children[o],c=i(u);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)),u=this.findBestCandidate_(r.center,o,e);u?this.focus(u):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:i})}findBestCandidate_(e,i,r){let o=1/0,u=null;for(const c of i){const f=c.getPositions().center,m=this.calculateDistance_(e,f,r);m<o&&(o=m,u=c)}return u}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),u=Math.abs(e.y-i.y);let c;switch(r){case"right":case"left":c=o+u*100;break;case"up":c=u*2+o*.5;break;case"down":c=u*5+o;break;default:c=o+u}return c}searchForTrackSelect_(){const e=this;for(const i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break}}}class wO extends de{constructor(e,i,r){const o=Dt({createEl:!1},i);if(super(e,o,r),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let u=0,c=i.playerOptions.techOrder;u<c.length;u++){const f=Kt(c[u]);let m=Qe.getTech(f);if(f||(m=de.getComponent(f)),m&&m.isSupported()){e.loadTech_(f);break}}else e.src(i.playerOptions.sources)}}de.registerComponent("MediaLoader",wO);class xp extends de{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"&&nt.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=ze(e,i,r);return this.player_.options_.experimentalSvgIcons||o.appendChild(ze("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=ze("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)}}de.registerComponent("ClickableComponent",xp);class Y0 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 ze("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(ze("picture",{className:"vjs-poster",tabIndex:-1},{},ze("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()?Xs(this.player_.play()):this.player_.pause())}}Y0.prototype.crossorigin=Y0.prototype.crossOrigin,de.registerComponent("PosterImage",Y0);const is="#222",b2="#ccc",AO={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 X0(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 Ws(s,e,i){try{s.style[e]=i}catch{return}}function _2(s){return s?`${s}px`:""}class DO extends de{constructor(e,i,r){super(e,i,r);const o=c=>this.updateDisplay(c),u=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(Ut(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",u),e.on("playerresize",u);const c=B.screen.orientation||B,f=B.screen.orientation?"change":"orientationchange";c.addEventListener(f,u),e.on("dispose",()=>c.removeEventListener(f,u));const m=this.options_.playerOptions.tracks||[];for(let b=0;b<m.length;b++)this.player_.addRemoteTextTrack(m[b],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},i=this.player_.textTracks(),r=this.player_.cache_.selectedLanguage;let o,u,c;for(let f=0;f<i.length;f++){const m=i[f];r&&r.enabled&&r.language&&r.language===m.language&&m.kind in e?m.kind===r.kind?c=m:c||(c=m):r&&!r.enabled?(c=null,o=null,u=null):m.default&&(m.kind==="descriptions"&&!o?o=m:m.kind in e&&!u&&(u=m))}c?c.mode="showing":u?u.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 B.WebVTT=="function"&&B.WebVTT.processCues(B,[],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 m=e[f];m.mode==="showing"&&c.push(m)}this.updateForTrack(c);return}let r=null,o=null,u=e.length;for(;u--;){const c=e[u];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)),!B.CSS.supports("inset","10px")){const c=this.el_,f=c.querySelectorAll(".vjs-text-track-cue"),m=this.player_.controlBar.el_.getBoundingClientRect().height,b=this.player_.el_.getBoundingClientRect().height;c.style="",Ws(c,"position","relative"),Ws(c,"height",b-m+"px"),Ws(c,"top","unset"),op?Ws(c,"bottom",b+"px"):Ws(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()||!B.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 u=0,c=0;Math.abs(r-o)>.1&&(r>o?u=Math.round((e-i*o)/2):c=Math.round((i-e/o)/2)),Ws(this.el_,"insetInline",_2(u)),Ws(this.el_,"insetBlock",_2(c))}updateDisplayState(e){const i=this.player_.textTrackSettings.getValues(),r=e.activeCues;let o=r.length;for(;o--;){const u=r[o];if(!u)continue;const c=u.displayState;if(i.color&&(c.firstChild.style.color=i.color),i.textOpacity&&Ws(c.firstChild,"color",X0(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(c.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Ws(c.firstChild,"backgroundColor",X0(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Ws(c,"backgroundColor",X0(i.windowColor,i.windowOpacity)):c.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?c.firstChild.style.textShadow=`2px 2px 3px ${is}, 2px 2px 4px ${is}, 2px 2px 5px ${is}`:i.edgeStyle==="raised"?c.firstChild.style.textShadow=`1px 1px ${is}, 2px 2px ${is}, 3px 3px ${is}`:i.edgeStyle==="depressed"?c.firstChild.style.textShadow=`1px 1px ${b2}, 0 1px ${b2}, -1px -1px ${is}, 0 -1px ${is}`:i.edgeStyle==="uniform"&&(c.firstChild.style.textShadow=`0 0 4px ${is}, 0 0 4px ${is}, 0 0 4px ${is}, 0 0 4px ${is}`)),i.fontPercent&&i.fontPercent!==1){const f=B.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=AO[i.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof B.WebVTT!="function"||e.every(r=>!r.activeCues))return;const i=[];for(let r=0;r<e.length;++r){const o=e[r];for(let u=0;u<o.activeCues.length;++u)i.push(o.activeCues[u])}B.WebVTT.processCues(B,i,this.el_);for(let r=0;r<e.length;++r){const o=e[r];for(let u=0;u<o.activeCues.length;++u){const c=o.activeCues[u].displayState;Oo(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)}}}de.registerComponent("TextTrackDisplay",DO);class kO extends de{createEl(){const e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),r=ze("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"])}}de.registerComponent("LoadingSpinner",kO);let Xi=class extends xp{createEl(e,i={},r={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),r=Object.assign({type:"button"},r);const o=ze(e,i,r);return this.player_.options_.experimentalSvgIcons||o.appendChild(ze("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}addChild(e,i={}){const r=this.constructor.name;return nt.warn(`Adding an actionable (user controllable) child to a Button (${r}) is not supported; use a ClickableComponent instead.`),de.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)}};de.registerComponent("Button",Xi);class T2 extends Xi{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){Xs(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 u=()=>o.focus();Ed(i)?i.then(u,()=>{}):this.setTimeout(u,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}T2.prototype.controlText_="Play Video",de.registerComponent("BigPlayButton",T2);class OO extends Xi{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)}}de.registerComponent("CloseButton",OO);class S2 extends Xi{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()?Xs(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",de.registerComponent("PlayToggle",S2);class pu extends de{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=ze("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return i.appendChild(r),this.contentEl_=ze("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=Mo(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,nt.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_=me.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",de.registerComponent("TimeDisplay",pu);class W0 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)}}W0.prototype.labelText_="Current Time",W0.prototype.controlText_="Current Time",de.registerComponent("CurrentTimeDisplay",W0);class Q0 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)}}Q0.prototype.labelText_="Duration",Q0.prototype.controlText_="Duration",de.registerComponent("DurationDisplay",Q0);class RO extends de{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}}de.registerComponent("TimeDivider",RO);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(ze("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",de.registerComponent("RemainingTimeDisplay",K0);class MO extends de{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_=ze("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(ze("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(me.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()}}de.registerComponent("LiveDisplay",MO);class x2 extends Xi{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_=ze("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",de.registerComponent("SeekToLive",x2);function wd(s,e,i){return s=Number(s),Math.min(i,Math.max(e,isNaN(s)?e:s))}var LO=Object.freeze({__proto__:null,clamp:wd});class Z0 extends de{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"&&!Gs&&e.preventDefault(),BT(),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;UT(),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(wd(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")}}de.registerComponent("Slider",Z0);const J0=(s,e)=>wd(s/e*100,0,100).toFixed(2)+"%";class IO extends de{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=ze("span",{className:"vjs-control-text"}),r=ze("span",{textContent:this.localize("Loaded")}),o=me.createTextNode(": ");return this.percentageEl_=ze("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(),u=this.player_.bufferedEnd(),c=this.partEls_,f=J0(u,o);this.percent_!==f&&(this.el_.style.width=f,Oa(this.percentageEl_,f),this.percent_=f);for(let m=0;m<r.length;m++){const b=r.start(m),S=r.end(m);let x=c[m];x||(x=this.el_.appendChild(ze()),c[m]=x),!(x.dataset.start===b&&x.dataset.end===S)&&(x.dataset.start=b,x.dataset.end=S,x.style.left=J0(b,u),x.style.width=J0(S-b,u))}for(let m=c.length;m>r.length;m--)this.el_.removeChild(c[m-1]);c.length=r.length})}}de.registerComponent("LoadProgressBar",IO);class NO extends de{constructor(e,i){super(e,i),this.update=Ys(Ut(this,this.update),es)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,i,r){const o=_d(this.el_),u=lu(this.player_.el()),c=e.width*i;if(!u||!o)return;let f=e.left-u.left+c,m=e.width-c+(u.right-e.right);m||(m=e.width-c,f=c);let b=o.width/2;f<b?b+=b-f:m<b&&(b=m),b<0?b=0:b>o.width&&(b=o.width),b=Math.round(b),this.el_.style.right=`-${b}px`,this.write(r)}write(e){Oa(this.el_,e)}updateTime(e,i,r,o){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let u;const c=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const f=this.player_.liveTracker.liveWindow(),m=f-i*f;u=(m<1?"":"-")+Mo(m,f)}else u=Mo(r,c);this.update(e,i,u),o&&o()})}}de.registerComponent("TimeTooltip",NO);class ey extends de{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=Ys(Ut(this,this.update),es)}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 u=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,u)}}ey.prototype.options_={children:[]},!Gi&&!xs&&ey.prototype.options_.children.push("timeTooltip"),de.registerComponent("PlayProgressBar",ey);class E2 extends de{constructor(e,i){super(e,i),this.update=Ys(Ut(this,this.update),es)}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"]},de.registerComponent("MouseTimeDisplay",E2);class Ep extends Z0{constructor(e,i){i=Dt(Ep.prototype.options_,i),i.children=[...i.children];const r=e.options_.disableSeekWhileScrubbingOnMobile&&(Gi||xs)||e.options_.disableSeekWhileScrubbingOnSTV;(!Gi&&!xs||r)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=r,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Ut(this,this.update),this.update=Ys(this.update_,es),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 me&&"visibilityState"in me&&this.on(me,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){me.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,es))}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(me.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 u=this.player_.duration();o&&o.isLive()&&(u=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==r||this.duration_!==u)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Mo(r,u),Mo(u,u)],"{1} of {2}")),this.currentTime_=r,this.duration_=u),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){Td(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,i=!1){if(!Td(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let r;const o=this.calculateDistance(e),u=this.player_.liveTracker;if(!u||!u.isLive())r=o*this.player_.duration(),r===this.player_.duration()&&(r=r-.1);else{if(o>=.99){u.seekToLiveEdge();return}const c=u.seekableStart(),f=u.liveCurrentTime();if(r=c+o*u.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?Xs(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 me&&"visibilityState"in me&&this.off(me,"visibilitychange",this.toggleVisibility_),super.dispose()}}Ep.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},de.registerComponent("SeekBar",Ep);class C2 extends de{constructor(e,i){super(e,i),this.handleMouseMove=Ys(Ut(this,this.handleMouseMove),es),this.throttledHandleMouseSeek=Ys(Ut(this,this.handleMouseSeek),es),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 u=i.el(),c=_d(u);let f=dp(u,e).x;f=wd(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&&Xs(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()}}C2.prototype.options_={children:["seekBar"]},de.registerComponent("ProgressControl",C2);class w2 extends Xi{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(){me.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in B?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 me.exitPictureInPicture=="function"&&super.show()}}w2.prototype.controlText_="Picture-in-Picture",de.registerComponent("PictureInPictureToggle",w2);class A2 extends Xi{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",r=>this.handleFullscreenChange(r)),me[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()}}A2.prototype.controlText_="Fullscreen",de.registerComponent("FullscreenToggle",A2);const PO=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 BO extends de{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}}de.registerComponent("VolumeLevel",BO);class UO extends de{constructor(e,i){super(e,i),this.update=Ys(Ut(this,this.update),es)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,i,r,o){if(!r){const u=lu(this.el_),c=lu(this.player_.el()),f=e.width*i;if(!c||!u)return;const m=e.left-c.left+f,b=e.width-f+(c.right-e.right);let S=u.width/2;m<S?S+=S-m:b<S&&(S=b),S<0?S=0:S>u.width&&(S=u.width),this.el_.style.right=`-${S}px`}this.write(`${o}%`)}write(e){Oa(this.el_,e)}updateVolume(e,i,r,o,u){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,r,o.toFixed(0)),u&&u()})}}de.registerComponent("VolumeLevelTooltip",UO);class D2 extends de{constructor(e,i){super(e,i),this.update=Ys(Ut(this,this.update),es)}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`})}}D2.prototype.options_={children:["volumeLevelTooltip"]},de.registerComponent("MouseVolumeLevelDisplay",D2);class Cp 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){Td(e)&&super.handleMouseDown(e)}handleMouseMove(e){const i=this.getChild("mouseVolumeLevelDisplay");if(i){const r=this.el(),o=lu(r),u=this.vertical();let c=dp(r,e);c=u?c.y:c.x,c=wd(c,0,1),i.update(o,c,u)}Td(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)})}}Cp.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Gi&&!xs&&Cp.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Cp.prototype.playerEvent="volumechange",de.registerComponent("VolumeBar",Cp);class k2 extends de{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),PO(this,e),this.throttledHandleMouseMove=Ys(Ut(this,this.handleMouseMove),es),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)}}k2.prototype.options_={children:["volumeBar"]},de.registerComponent("VolumeControl",k2);const qO=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 O2 extends Xi{constructor(e,i){super(e,i),qO(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"),Gi&&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}`,"")),Oo(this.el_,`vjs-vol-${i}`)}updateControlText_(){const i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)}}O2.prototype.controlText_="Mute",de.registerComponent("MuteToggle",O2);class R2 extends de{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"),Nn(me,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),Yi(me,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}R2.prototype.options_={children:["muteToggle","volumeControl"]},de.registerComponent("VolumePanel",R2);class M2 extends Xi{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 u;i+this.skipTime<=o?u=i+this.skipTime:u=o,this.player_.currentTime(u)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}M2.prototype.controlText_="Skip Forward",de.registerComponent("SkipForward",M2);class L2 extends Xi{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 u;o&&i-this.skipTime<=o?u=o:i>=this.skipTime?u=i-this.skipTime:u=0,this.player_.currentTime(u)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}L2.prototype.controlText_="Skip Backward",de.registerComponent("SkipBackward",L2);class I2 extends de{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 de&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof de&&(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_=ze(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_),Nn(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||me.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())}}de.registerComponent("Menu",I2);class ty extends de{constructor(e,i={}){super(e,i),this.menuButton_=new Xi(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const r=Xi.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=u=>this.handleClick(u);this.handleMenuKeyUp_=u=>this.handleMenuKeyUp(u),this.on(this.menuButton_,"tap",o),this.on(this.menuButton_,"click",o),this.on(this.menuButton_,"keydown",u=>this.handleKeyDown(u)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),Nn(me,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",u=>this.handleMouseLeave(u)),this.on("keydown",u=>this.handleSubmenuKeyDown(u))}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 I2(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=ze("li",{className:"vjs-menu-title",textContent:Kt(this.options_.title),tabIndex:-1}),r=new de(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=Xi.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"),Yi(me,"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"),Gi&&MT())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()}}de.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=Ut(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)})}}de.registerComponent("TrackButton",iy);class Ad 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),u=ze("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?o.appendChild(u):o.replaceChild(u,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))}}de.registerComponent("MenuItem",Ad);class Dd extends Ad{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 u=(...f)=>{this.handleTracksChange.apply(this,f)},c=(...f)=>{this.handleSelectedLanguageChange.apply(this,f)};if(e.on(["loadstart","texttrackchange"],u),o.addEventListener("change",u),o.addEventListener("selectedlanguagechange",c),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],u),o.removeEventListener("change",u),o.removeEventListener("selectedlanguagechange",c)}),o.onchange===void 0){let f;this.on(["tap","click"],function(){if(typeof B.Event!="object")try{f=new B.Event("change")}catch{}f||(f=me.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 u=r[o];this.kinds.indexOf(u.kind)!==-1&&(u===i?u.mode!=="showing"&&(u.mode="showing"):u.mode!=="disabled"&&(u.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()}}de.registerComponent("TextTrackMenuItem",Dd);class N2 extends Dd{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,u=i.length;o<u;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,u=i.length;o<u;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()}}de.registerComponent("OffTextTrackMenuItem",N2);class mu extends iy{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i)}createItems(e=[],i=Dd){let r;this.label_&&(r=`${this.label_} off`),e.push(new N2(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 u=0;u<o.length;u++){const c=o[u];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}}de.registerComponent("TextTrackButton",mu);class P2 extends Ad{constructor(e,i){const r=i.track,o=i.cue,u=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=o.text,i.selected=o.startTime<=u&&u<o.endTime,super(e,i),this.track=r,this.cue=o}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}de.registerComponent("ChaptersTrackMenuItem",P2);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(Kt(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 u=i[r],c=new P2(this.player_,{track:this.track_,cue:u});e.push(c)}return e}}ny.prototype.kind_="chapters",ny.prototype.controlText_="Chapters",de.registerComponent("ChaptersButton",ny);class sy extends mu{constructor(e,i,r){super(e,i,r),this.setIcon("audio-description");const o=e.textTracks(),u=Ut(this,this.handleTracksChange);o.addEventListener("change",u),this.on("dispose",function(){o.removeEventListener("change",u)})}handleTracksChange(e){const i=this.player().textTracks();let r=!1;for(let o=0,u=i.length;o<u;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",de.registerComponent("DescriptionsButton",sy);class ry 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",de.registerComponent("SubtitlesButton",ry);class ay extends Dd{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()}}de.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",de.registerComponent("CaptionsButton",oy);class B2 extends Dd{createEl(e,i,r){const o=super.createEl(e,i,r),u=o.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",o):u.appendChild(ze("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),u.appendChild(ze("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),o}}de.registerComponent("SubsCapsMenuItem",B2);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(Kt(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,B2),e}}ly.prototype.kinds_=["captions","subtitles"],ly.prototype.controlText_="Subtitles",de.registerComponent("SubsCapsButton",ly);class U2 extends Ad{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 u=(...c)=>{this.handleTracksChange.apply(this,c)};o.addEventListener("change",u),this.on("dispose",()=>{o.removeEventListener("change",u)})}createEl(e,i,r){const o=super.createEl(e,i,r),u=o.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(u.appendChild(ze("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),u.appendChild(ze("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)}}de.registerComponent("AudioTrackMenuItem",U2);class q2 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}}q2.prototype.controlText_="Audio Track",de.registerComponent("AudioTrackButton",q2);class uy extends Ad{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",u=>this.update(u))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}uy.prototype.contentElType="button",de.registerComponent("PlaybackRateMenuItem",uy);class F2 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_=ze("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")}}F2.prototype.controlText_="Playback Rate",de.registerComponent("PlaybackRateMenuButton",F2);class H2 extends de{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",i={},r={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,r)}}de.registerComponent("Spacer",H2);class FO extends H2{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}de.registerComponent("CustomControlSpacer",FO);class j2 extends de{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}j2.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},de.registerComponent("ControlBar",j2);class z2 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):""}}z2.prototype.options_=Object.assign({},du.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),de.registerComponent("ErrorDisplay",z2);class V2 extends de{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(),ze("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{const r=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Jn()}`)+"-"+i[1].replace(/\W+/g,""),o=ze("option",{id:r,value:this.localize(i[0]),textContent:this.localize(i[1])});return o.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${r}`),o}))}}de.registerComponent("TextTrackSelect",V2);class Po extends de{constructor(e,i={}){super(e,i);const r=ze("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(r);const o=this.options_.selects;for(const u of o){const c=this.options_.selectConfigs[u],f=c.className,m=c.id.replace("%s",this.options_.id_);let b=null;const S=`vjs_select_${Jn()}`;if(this.options_.type==="colors"){b=ze("span",{className:f});const w=ze("label",{id:m,className:"vjs-label",textContent:this.localize(c.label)});w.setAttribute("for",S),b.appendChild(w)}const x=new V2(e,{SelectOptions:c.options,legendId:this.options_.legendId,id:S,labelId:m});this.addChild(x),this.options_.type==="colors"&&(b.appendChild(x.el()),this.el().appendChild(b))}}createEl(){return ze("fieldset",{className:this.options_.className})}}de.registerComponent("TextTrackFieldset",Po);class $2 extends de{constructor(e,i={}){super(e,i);const r=this.options_.textTrackComponentid,o=new Po(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 u=new Po(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(u);const c=new Po(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 ze("div",{className:"vjs-track-settings-colors"})}}de.registerComponent("TextTrackSettingsColors",$2);class G2 extends de{constructor(e,i={}){super(e,i);const r=this.options_.textTrackComponentid,o=new Po(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 u=new Po(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(u);const c=new Po(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 ze("div",{className:"vjs-track-settings-font"})}}de.registerComponent("TextTrackSettingsFont",G2);class Y2 extends de{constructor(e,i={}){super(e,i);const r=new Xi(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"),u=new Xi(e,{controlText:o,className:"vjs-done-button"});u.el().classList.remove("vjs-control","vjs-button"),u.el().textContent=o,this.addChild(u)}createEl(){return ze("div",{className:"vjs-track-settings-controls"})}}de.registerComponent("TrackSettingsControls",Y2);const cy="vjs-text-track-settings",X2=["#000","Black"],W2=["#00F","Blue"],Q2=["#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"],La={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[X2,eS,J2,K2,W2,tS,Z2,Q2],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,X2,J2,K2,W2,tS,Z2,Q2],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"}};La.windowColor.options=La.backgroundColor.options;function nS(s,e){if(e&&(s=e(s)),s&&s!=="none")return s}function HO(s,e){const i=s.options[s.options.selectedIndex].value;return nS(i,e)}function jO(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 zO 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=ze("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:La,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);const r=new G2(e,{textTrackComponentid:this.id_,selectConfigs:La,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(r);const o=new Y2(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(La,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 ET(La,(e,i,r)=>{const o=HO(this.$(i.selector),i.parser);return o!==void 0&&(e[r]=o),e},{})}setValues(e){tu(La,(i,r)=>{jO(this.$(i.selector),e[r],i.parser)})}setDefaults(){tu(La,e=>{const i=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=i})}restoreSettings(){let e;try{e=JSON.parse(B.localStorage.getItem(cy))}catch(i){nt.warn(i)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?B.localStorage.setItem(cy,JSON.stringify(e)):B.localStorage.removeItem(cy)}catch(i){nt.warn(i)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}de.registerComponent("TextTrackSettings",zO);class VO extends de{constructor(e,i){let r=i.ResizeObserver||B.ResizeObserver;i.ResizeObserver===null&&(r=!1);const o=Dt({createEl:!r,reportTouchActivity:!1},i);super(e,o),this.ResizeObserver=i.ResizeObserver||B.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=WT(()=>{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 u=this.debouncedHandler_;let c=this.unloadListener_=function(){Yi(this,"resize",u),Yi(this,"unload",c),c=null};Nn(this.el_.contentWindow,"unload",c),Nn(this.el_.contentWindow,"resize",u)},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()}}de.registerComponent("ResizeManager",VO);const $O={trackingThreshold:20,liveTolerance:15};class GO extends de{constructor(e,i){const r=Dt($O,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(B.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(),u=this.player_.currentTime();let c=this.player_.paused()||this.seekedBehindLive_||Math.abs(o-u)>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_,es),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()}}de.registerComponent("LiveTracker",GO);class YO extends de{constructor(e,i){super(e,i),this.on("statechanged",r=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:ze("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${Jn()}`}),description:ze("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${Jn()}`})},ze("div",{className:"vjs-title-bar"},{},CT(this.els))}updateDom_(){const e=this.player_.tech_,i=e&&e.el_,r={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(o=>{const u=this.state[o],c=this.els[o],f=r[o];hp(c),u&&Oa(c,u),i&&(i.removeAttribute(f),u&&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}}de.registerComponent("TitleBar",YO);const XO={initialDisplay:4e3,position:[],takeFocus:!1};class WO extends Xi{constructor(e,i){i=Dt(XO,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=ze("button",{},{type:"button",class:this.buildCSSClass()},ze("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()}}de.registerComponent("TransientButton",WO);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 u=0;u<i.length;u++){const c=i[u].src;c&&r.indexOf(c)===-1&&r.push(c)}return r.length?(r.length===1&&(o=r[0]),s.triggerSourceset(o),!0):!1},QO=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(s){const e=me.createElement(this.nodeName.toLowerCase());e.innerHTML=s;const i=me.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",B.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},KO=s=>sS([s.el(),B.HTMLMediaElement.prototype,B.Element.prototype,QO],"innerHTML"),rS=function(s){const e=s.el();if(e.resetSourceWatch_)return;const i={},r=KO(s),o=u=>(...c)=>{const f=u.apply(e,c);return fy(s),f};["append","appendChild","insertAdjacentHTML"].forEach(u=>{e[u]&&(i[u]=e[u],e[u]=o(i[u]))}),Object.defineProperty(e,"innerHTML",Dt(r,{set:o(r.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(i).forEach(u=>{e[u]=i[u]}),Object.defineProperty(e,"innerHTML",r)},s.one("sourceset",e.resetSourceWatch_)},ZO=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?l2(B.Element.prototype.getAttribute.call(this,"src")):""},set(s){return B.Element.prototype.setAttribute.call(this,"src",s),s}}),JO=s=>sS([s.el(),B.HTMLMediaElement.prototype,ZO],"src"),eR=function(s){if(!s.featuresSourceset)return;const e=s.el();if(e.resetSourceset_)return;const i=JO(s),r=e.setAttribute,o=e.load;Object.defineProperty(e,"src",Dt(i,{set:u=>{const c=i.set.call(e,u);return s.triggerSourceset(e.src),c}})),e.setAttribute=(u,c)=>{const f=r.call(e,u,c);return/src/i.test(u)&&s.triggerSourceset(e.src),f},e.load=()=>{const u=o.call(e);return fy(s)||(s.triggerSourceset(""),rS(s)),u},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 De extends Qe{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 u=this.el_.childNodes;let c=u.length;const f=[];for(;c--;){const m=u[c];m.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(m),this.remoteTextTracks().addTrack(m.track),this.textTracks().addTrack(m.track),!o&&!this.el_.hasAttribute("crossorigin")&&bp(m.src)&&(o=!0)):f.push(m))}for(let m=0;m<f.length;m++)this.el_.removeChild(f[m])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&o&&nt.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_(),(vd||sp)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),De.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){eR(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let i;const r=()=>{i=[];for(let u=0;u<e.length;u++){const c=e[u];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 u=0;u<i.length;u++){const c=i[u];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=ts[e],r=this.el()[i.getterName],o=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!r||!r.addEventListener)return;const u={change:f=>{const m={type:"change",target:o,currentTarget:o,srcElement:o};o.trigger(m),e==="text"&&this[hu.remoteText.getterName]().trigger(m)},addtrack(f){o.addTrack(f.track)},removetrack(f){o.removeTrack(f.track)}},c=function(){const f=[];for(let m=0;m<o.length;m++){let b=!1;for(let S=0;S<r.length;S++)if(r[S]===o[m]){b=!0;break}b||f.push(o[m])}for(;f.length;)o.removeTrack(f.shift())};this[i.getterName+"Listeners_"]=u,Object.keys(u).forEach(f=>{const m=u[f];r.addEventListener(f,m),this.on("dispose",b=>r.removeEventListener(f,m))}),this.on("loadstart",c),this.on("dispose",f=>this.off("loadstart",c))}proxyNativeTracks_(){ts.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),De.disposeMediaElement(e),e=r}else{e=me.createElement("video");const r=this.options_.tag&&Ra(this.options_.tag),o=Dt({},r);(!vd||this.options_.nativeControlsForTouch!==!0)&&delete o.controls,NT(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],u=this.options_[o];typeof u<"u"&&(u?ou(e,o,o):cp(e,o),e[o]=u)}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 u=function(){r||this.trigger("loadstart")};this.on("loadedmetadata",u),this.ready(function(){this.off("loadstart",o),this.off("loadedmetadata",u),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){nt(i,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&xs&&Gs&&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)Xs(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 nt.error("Invalid source URL."),!1;const r={src:e};i&&(r.type=i);const o=ze("source",{},r);return this.el_.appendChild(o),!0}removeSourceElement(e){if(!e)return nt.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 nt.warn(`No matching source element found with src: ${e}`),!1}reset(){De.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=me.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),B.performance&&(e.creationTime=B.performance.now()),e}}Jf(De,"TEST_VID",function(){if(!ru())return;const s=me.createElement("video"),e=me.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",s.appendChild(e),s}),De.isSupported=function(){try{De.TEST_VID.volume=.5}catch{return!1}return!!(De.TEST_VID&&De.TEST_VID.canPlayType)},De.canPlayType=function(s){return De.TEST_VID.canPlayType(s)},De.canPlaySource=function(s,e){return De.canPlayType(s.type)},De.canControlVolume=function(){try{const s=De.TEST_VID.volume;De.TEST_VID.volume=s/2+.1;const e=s!==De.TEST_VID.volume;return e&&Gi?(B.setTimeout(()=>{De&&De.prototype&&(De.prototype.featuresVolumeControl=s!==De.TEST_VID.volume)}),!1):e}catch{return!1}},De.canMuteVolume=function(){try{const s=De.TEST_VID.muted;return De.TEST_VID.muted=!s,De.TEST_VID.muted?ou(De.TEST_VID,"muted","muted"):cp(De.TEST_VID,"muted","muted"),s!==De.TEST_VID.muted}catch{return!1}},De.canControlPlaybackRate=function(){if(xs&&Gs&&ep<58)return!1;try{const s=De.TEST_VID.playbackRate;return De.TEST_VID.playbackRate=s/2+.1,s!==De.TEST_VID.playbackRate}catch{return!1}},De.canOverrideAttributes=function(){try{const s=()=>{};Object.defineProperty(me.createElement("video"),"src",{get:s,set:s}),Object.defineProperty(me.createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(me.createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(me.createElement("audio"),"innerHTML",{get:s,set:s})}catch{return!1}return!0},De.supportsNativeTextTracks=function(){return lp||Gi&&Gs},De.supportsNativeVideoTracks=function(){return!!(De.TEST_VID&&De.TEST_VID.videoTracks)},De.supportsNativeAudioTracks=function(){return!!(De.TEST_VID&&De.TEST_VID.audioTracks)},De.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(De.prototype,s,()=>De[e](),!0)}),De.prototype.featuresVolumeControl=De.canControlVolume(),De.prototype.movingMediaElementInDOM=!Gi,De.prototype.featuresFullscreenResize=!0,De.prototype.featuresProgressEvents=!0,De.prototype.featuresTimeupdateEvents=!0,De.prototype.featuresVideoFrameCallback=!!(De.TEST_VID&&De.TEST_VID.requestVideoFrameCallback),De.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{}}()}},De.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){De.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){De.prototype["set"+Kt(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){De.prototype[s]=function(){return this.el_[s]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){De.prototype["set"+Kt(s)]=function(e){this.el_[s]=e}}),["pause","load","play"].forEach(function(s){De.prototype[s]=function(){return this.el_[s]()}}),Qe.withSourceHandlers(De),De.nativeSourceHandler={},De.nativeSourceHandler.canPlayType=function(s){try{return De.TEST_VID.canPlayType(s)}catch{return""}},De.nativeSourceHandler.canHandleSource=function(s,e){if(s.type)return De.nativeSourceHandler.canPlayType(s.type);if(s.src){const i=$0(s.src);return De.nativeSourceHandler.canPlayType(`video/${i}`)}return""},De.nativeSourceHandler.handleSource=function(s,e,i){e.setSrc(s.src)},De.nativeSourceHandler.dispose=function(){},De.registerSourceHandler(De.nativeSourceHandler),Qe.registerTech("Html5",De);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"],wp={};my.forEach(s=>{const e=s.charAt(0)==="x"?`x-${s.substring(1)}`:s;wp[s]=`vjs-layout-${e}`});const tR={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class St extends de{constructor(e,i,r){if(e.id=e.id||i.id||`vjs_video_${Jn()}`,i=Object.assign(St.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=ST(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&&Ra(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_=St.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(),I0(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(Nn(me,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const o=Dt(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 B.DOMParser().parseFromString(EO,"image/svg+xml");if(f.querySelector("parsererror"))nt.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const b=f.documentElement;b.style.display="none",this.el_.appendChild(b),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 CO(this),this.addClass("vjs-spatial-navigation-enabled")),vd&&this.addClass("vjs-touch-enabled"),Gi||this.addClass("vjs-workinghover"),St.players[this.id_]=this;const u=T0.split(".")[0];this.addClass(`vjs-v${u}`),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"),Yi(me,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Yi(me,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),St.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),_O(this),rn.names.forEach(e=>{const i=rn[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 u=Ra(e);if(o){for(i=this.el_=e,e=this.tag=me.createElement("video");i.children.length;)e.appendChild(i.firstChild);bd(i,"video-js")||Oo(i,"video-js"),i.appendChild(e),r=this.playerElIngest_=i,Object.keys(i).forEach(m=>{try{e[m]=i[m]}catch{}})}e.setAttribute("tabindex","-1"),u.tabindex="-1",Gs&&ip&&(e.setAttribute("role","application"),u.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in u&&delete u.width,"height"in u&&delete u.height,Object.getOwnPropertyNames(u).forEach(function(m){o&&m==="class"||i.setAttribute(m,u[m]),o&&e.setAttribute(m,u[m])}),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(m=>OT[m]).map(m=>"vjs-device-"+m.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...c),B.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=GT("vjs-styles-dimensions");const m=Ma(".vjs-styles-defaults"),b=Ma("head");b.insertBefore(this.styleEl_,m?m.nextSibling:b.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 m=0;m<f.length;m++){const b=f.item(m);Oo(b,"vjs-hidden"),b.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!r&&e.parentNode.insertBefore(i,e),C0(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"){nt.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)){nt.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,Ur(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),eO(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(B.VIDEOJS_NO_DYNAMIC_STYLE===!0){const f=typeof this.width_=="number"?this.width_:this.options_.width,m=typeof this.height_=="number"?this.height_:this.options_.height,b=this.tech_&&this.tech_.el();b&&(f>=0&&(b.width=f),m>=0&&(b.height=m));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 u=r.split(":"),c=u[1]/u[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),YT(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=Kt(e),o=e.charAt(0).toLowerCase()+e.slice(1);r!=="Html5"&&this.tag&&(Qe.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;let u=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(u=!1);const c={source:i,autoplay:u,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};rn.names.forEach(m=>{const b=rn[m];c[b.getterName]=this[b.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=Qe.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(Ut(this,this.handleTechReady_),!0),U0.jsonToTextTracks(this.textTracksJson_||[],this.tech_),aS.forEach(m=>{this.on(this.tech_,m,b=>this[`handleTech${Kt(m)}_`](b))}),Object.keys(py).forEach(m=>{this.on(this.tech_,m,b=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${py[m]}_`].bind(this),event:b});return}this[`handleTech${py[m]}_`](b)})}),this.on(this.tech_,"loadstart",m=>this.handleTechLoadStart_(m)),this.on(this.tech_,"sourceset",m=>this.handleTechSourceset_(m)),this.on(this.tech_,"waiting",m=>this.handleTechWaiting_(m)),this.on(this.tech_,"ended",m=>this.handleTechEnded_(m)),this.on(this.tech_,"seeking",m=>this.handleTechSeeking_(m)),this.on(this.tech_,"play",m=>this.handleTechPlay_(m)),this.on(this.tech_,"pause",m=>this.handleTechPause_(m)),this.on(this.tech_,"durationchange",m=>this.handleTechDurationChange_(m)),this.on(this.tech_,"fullscreenchange",(m,b)=>this.handleTechFullscreenChange_(m,b)),this.on(this.tech_,"fullscreenerror",(m,b)=>this.handleTechFullscreenError_(m,b)),this.on(this.tech_,"enterpictureinpicture",m=>this.handleTechEnterPictureInPicture_(m)),this.on(this.tech_,"leavepictureinpicture",m=>this.handleTechLeavePictureInPicture_(m)),this.on(this.tech_,"error",m=>this.handleTechError_(m)),this.on(this.tech_,"posterchange",m=>this.handleTechPosterChange_(m)),this.on(this.tech_,"textdata",m=>this.handleTechTextData_(m)),this.on(this.tech_,"ratechange",m=>this.handleTechRateChange_(m)),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)&&C0(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){rn.names.forEach(e=>{const i=rn[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&&nt.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":T0}}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 u=()=>{this.muted(o)};this.playTerminatedQueue_.push(u);const c=this.play();if(Ed(c))return c.catch(f=>{throw u(),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=xO(this,i)),this.cache_.source=Dt({},e,{src:i,type:r});const o=this.cache_.sources.filter(m=>m.src&&m.src===i),u=[],c=this.$$("source"),f=[];for(let m=0;m<c.length;m++){const b=Ra(c[m]);u.push(b),b.src&&b.src===i&&f.push(b.src)}f.length&&!o.length?this.cache_.sources=u:o.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i}handleTechSourceset_(e){if(!this.changingSrc_){let i=u=>this.updateSourceCaches_(u);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"],u=>{if(u.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()?Xs(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()&&!me.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=me[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 vO)return gO(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 nt(r),r}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in yO)return mO(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?(nt(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(nt(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(nt(i),i)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Xs){this.playCallbacks_.push(e);const i=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),r=!!(lp||Gi);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")||Es(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=Es(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=Es(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 u(){i.off("fullscreenerror",f),i.off("fullscreenchange",c)}function c(){u(),r()}function f(b,S){u(),o(S)}i.one("fullscreenchange",c),i.one("fullscreenerror",f);const m=i.requestFullscreenHelper_(e);m&&(m.then(u,u),m.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",u)}function u(){o(),i()}function c(m,b){o(),r(b)}e.one("fullscreenchange",u),e.one("fullscreenerror",c);const f=e.exitFullscreenHelper_();f&&(f.then(o,o),f.then(i,r))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=me[this.fsApi_.exitFullscreen]();return e&&Xs(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=me.documentElement.style.overflow,Nn(me,"keydown",this.boundFullWindowOnEscKey_),me.documentElement.style.overflow="hidden",Oo(me.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,Yi(me,"keydown",this.boundFullWindowOnEscKey_),me.documentElement.style.overflow=this.docOrigOverflow,up(me.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&&B.documentPictureInPicture){const e=me.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(ze("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),B.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(zT(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 me&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(B.documentPictureInPicture&&B.documentPictureInPicture.window)return B.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in me)return me.exitPictureInPicture()}handleKeyDown(e){const{userActions:i}=this.options_;!i||!i.hotkeys||(o=>{const u=o.tagName.toLowerCase();if(o.isContentEditable)return!0;const c=["button","checkbox","hidden","radio","reset","submit"];return u==="input"?c.indexOf(o.type)===-1:["textarea"].indexOf(u)!==-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:u=c=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();const c=de.getComponent("FullscreenToggle");me[this.fsApi_.fullscreenEnabled]!==!1&&c.prototype.handleClick.call(this,e)}else o.call(this,e)?(e.preventDefault(),e.stopPropagation(),de.getComponent("MuteToggle").prototype.handleClick.call(this,e)):u.call(this,e)&&(e.preventDefault(),e.stopPropagation(),de.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let i;for(let r=0,o=this.options_.techOrder;r<o.length;r++){const u=o[r];let c=Qe.getTech(u);if(c||(c=de.getComponent(u)),!c){nt.error(`The "${u}" 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,Qe.getTech(f)]).filter(([f,m])=>m?m.isSupported():(nt.error(`The "${f}" tech is undefined. Skipped browser support check for that tech.`),!1)),r=function(f,m,b){let S;return f.some(x=>m.some(w=>{if(S=b(x,w),S)return!0})),S};let o;const u=f=>(m,b)=>f(b,m),c=([f,m],b)=>{if(m.canPlaySource(b,this.options_[f.toLowerCase()]))return{source:b,tech:f}};return this.options_.sourceOrder?o=r(e,i,u(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]),fO(this,r[0],(o,u)=>{if(this.middleware_=u,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}pO(u,this.tech_)}),r.length>1){const o=()=>{this.error(null),this.handleSrc_(r.slice(1),!0)},u=()=>{this.off("error",o)};this.one("error",o),this.one("playing",u),this.resetRetryOnError_=()=>{this.off("error",o),this.off("playing",u)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const i=this.selectSource([e]);return i?JT(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();Xs(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}),Ur(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:u}=r||{};e&&e.updateContent(),i&&i.updateContent(),o&&o.updateContent(),u&&(u.update(),u.loadProgressBar&&u.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(Da("beforeerror").forEach(i=>{const r=i(this,e);if(!($s(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 Yt(e),this.addClass("vjs-error"),nt.error(`(CODE:${this.error_.code} ${Yt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),Da("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=Ut(this,this.reportUserActivity),u=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",u),this.on("mouseup",f),this.on("mouseleave",f);const m=this.getChild("controlBar");m&&!Gi&&!xs&&(m.on("mouseenter",function(x){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),m.on("mouseleave",function(x){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o);let b;const S=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(b);const x=this.options_.inactivityTimeout;x<=0||(b=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(),Ur(this)&&this.trigger("languagechange"))}languages(){return Dt(St.prototype.options_.languages,this.languages_)}toJSON(){const e=Dt(this.options_),i=e.tracks;e.tracks=[];for(let r=0;r<i.length;r++){let o=i[r];o=Dt(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],u=this.breakpoints_[o];if(i<=u){if(e===o)return;e&&this.removeClass(wp[e]),this.addClass(wp[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({},tR,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 wp[this.breakpoint_]||""}loadMedia(e,i){if(!e||typeof e!="object")return;const r=this.crossOrigin();this.reset(),this.cache_.media=Dt(e);const{artist:o,artwork:u,description:c,poster:f,src:m,textTracks:b,title:S}=this.cache_.media;!u&&f&&(this.cache_.media.artwork=[{src:f,type:Sp(f)}]),r&&this.crossOrigin(r),m&&this.src(m),f&&this.poster(f),Array.isArray(b)&&b.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(),u=>({kind:u.kind,label:u.label,language:u.language,src:u.src})),o={src:i,textTracks:r};return e&&(o.poster=e,o.artwork=[{src:o.poster,type:Sp(o.poster)}]),o}return Dt(this.cache_.media)}static getTagSettings(e){const i={sources:[],tracks:[]},r=Ra(e),o=r["data-setup"];if(bd(e,"vjs-fill")&&(r.fill=!0),bd(e,"vjs-fluid")&&(r.fluid=!0),o!==null)try{Object.assign(r,JSON.parse(o||"{}"))}catch(u){nt.error("data-setup",u)}if(Object.assign(i,r),e.hasChildNodes()){const u=e.childNodes;for(let c=0,f=u.length;c<f;c++){const m=u[c],b=m.nodeName.toLowerCase();b==="source"?i.sources.push(Ra(m)):b==="track"&&i.tracks.push(Ra(m))}}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"))}}St.prototype.videoTracks=()=>{},St.prototype.audioTracks=()=>{},St.prototype.textTracks=()=>{},St.prototype.remoteTextTracks=()=>{},St.prototype.remoteTextTrackEls=()=>{},rn.names.forEach(function(s){const e=rn[s];St.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),St.prototype.crossorigin=St.prototype.crossOrigin,St.players={};const kd=B.navigator;St.prototype.options_={techOrder:Qe.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:kd&&(kd.languages&&kd.languages[0]||kd.userLanguage||kd.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){St.prototype[`handleTech${Kt(s)}_`]=function(){return this.trigger(s)}}),de.registerComponent("Player",St);const Ap="plugin",gu="activePlugins_",yu={},Dp=s=>yu.hasOwnProperty(s),kp=s=>Dp(s)?yu[s]:void 0,oS=(s,e)=>{s[gu]=s[gu]||{},s[gu][e]=!0},Op=(s,e,i)=>{const r=(i?"before":"")+"pluginsetup";s.trigger(r,e),s.trigger(r+":"+e.name,e)},iR=function(s,e){const i=function(){Op(this,{name:s,plugin:e,instance:null},!0);const r=e.apply(this,arguments);return oS(this,s),Op(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){Op(this,{name:s,plugin:e,instance:null},!0);const r=new e(this,...i);return this[s]=()=>r,Op(this,r.getEventHash()),r});class bn{constructor(e){if(this.constructor===bn)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),I0(this),delete this.trigger,ZT(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"?kp(e):e;return typeof i=="function"&&!bn.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(Dp(e))nt.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(St.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!==Ap&&(bn.isBasic(i)?St.prototype[e]=iR(e,i):St.prototype[e]=lS(e,i)),i}static deregisterPlugin(e){if(e===Ap)throw new Error("Cannot de-register base plugin.");Dp(e)&&(delete yu[e],delete St.prototype[e])}static getPlugins(e=Object.keys(yu)){let i;return e.forEach(r=>{const o=kp(r);o&&(i=i||{},i[r]=o)}),i}static getPluginVersion(e){const i=kp(e);return i&&i.VERSION||""}}bn.getPlugin=kp,bn.BASE_PLUGIN_NAME=Ap,bn.registerPlugin(Ap,bn),St.prototype.usingPlugin=function(s){return!!this[gu]&&this[gu][s]===!0},St.prototype.hasPlugin=function(s){return!!Dp(s)};function nR(s,e){let i=!1;return function(...r){return i||nt.warn(s),i=!0,e.apply(this,r)}}function Cs(s,e,i,r){return nR(`${e} is deprecated and will be removed in ${s}.0; please use ${i} instead.`,r)}var sR={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 j(s,e,i){let r=j.getPlayer(s);if(r)return e&&nt.warn(`Player "${s}" is already initialised. Options will not be applied.`),i&&r.ready(i),r;const o=typeof s=="string"?Ma("#"+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 B.ShadowRoot:!1)?o.getRootNode():o.ownerDocument.body;(!o.ownerDocument.defaultView||!c.contains(o))&&nt.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)),Da("beforesetup").forEach(m=>{const b=m(o,Dt(e));if(!$s(b)||Array.isArray(b)){nt.error("please return an object in beforesetup hooks");return}e=Dt(e,b)});const f=de.getComponent("Player");return r=new f(o,e,i),Da("setup").forEach(m=>m(r)),r}if(j.hooks_=Br,j.hooks=Da,j.hook=H3,j.hookOnce=j3,j.removeHook=_T,B.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&ru()){let s=Ma(".vjs-styles-defaults");if(!s){s=GT("vjs-styles-defaults");const e=Ma("head");e&&e.insertBefore(s,e.firstChild),YT(s,`
.video-js {
width: 300px;
height: 150px;
}
.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: 56.25%
}
`)}}D0(1,j),j.VERSION=T0,j.options=St.prototype.options_,j.getPlayers=()=>St.players,j.getPlayer=s=>{const e=St.players;let i;if(typeof s=="string"){const r=uS(s),o=e[r];if(o)return o;i=Ma("#"+r)}else i=s;if(au(i)){const{player:r,playerId:o}=i;if(r||e[o])return r||e[o]}},j.getAllPlayers=()=>Object.keys(St.players).map(s=>St.players[s]).filter(Boolean),j.players=St.players,j.getComponent=de.getComponent,j.registerComponent=(s,e)=>(Qe.isTech(e)&&nt.warn(`The ${s} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),de.registerComponent.call(de,s,e)),j.getTech=Qe.getTech,j.registerTech=Qe.registerTech,j.use=hO,Object.defineProperty(j,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(j.middleware,"TERMINATOR",{value:Tp,writeable:!1,enumerable:!0}),j.browser=OT,j.obj=$3,j.mergeOptions=Cs(9,"videojs.mergeOptions","videojs.obj.merge",Dt),j.defineLazyProperty=Cs(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Jf),j.bind=Cs(9,"videojs.bind","native Function.prototype.bind",Ut),j.registerPlugin=bn.registerPlugin,j.deregisterPlugin=bn.deregisterPlugin,j.plugin=(s,e)=>(nt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),bn.registerPlugin(s,e)),j.getPlugins=bn.getPlugins,j.getPlugin=bn.getPlugin,j.getPluginVersion=bn.getPluginVersion,j.addLanguage=function(s,e){return s=(""+s).toLowerCase(),j.options.languages=Dt(j.options.languages,{[s]:e}),j.options.languages[s]},j.log=nt,j.createLogger=ST,j.time=rO,j.createTimeRange=Cs(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Es),j.createTimeRanges=Cs(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Es),j.formatTime=Cs(9,"videojs.formatTime","videojs.time.formatTime",Mo),j.setFormatTime=Cs(9,"videojs.setFormatTime","videojs.time.setFormatTime",i2),j.resetFormatTime=Cs(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",n2),j.parseUrl=Cs(9,"videojs.parseUrl","videojs.url.parseUrl",V0),j.isCrossOrigin=Cs(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",bp),j.EventTarget=Pn,j.any=R0,j.on=Nn,j.one=mp,j.off=Yi,j.trigger=cu,j.xhr=V_,j.TrackList=Lo,j.TextTrack=Cd,j.TextTrackList=j0,j.AudioTrack=d2,j.AudioTrackList=r2,j.VideoTrack=h2,j.VideoTrackList=a2,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(s=>{j[s]=function(){return nt.warn(`videojs.${s}() is deprecated; use videojs.dom.${s}() instead`),VT[s].apply(null,arguments)}}),j.computedStyle=Cs(9,"videojs.computedStyle","videojs.dom.computedStyle",uu),j.dom=VT,j.fn=J3,j.num=LO,j.str=nO,j.url=cO,j.Error=sR;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class rR{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 Rp extends j.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 rR(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}}Rp.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const s in Rp.prototype.allowedEvents_)Rp.prototype["on"+s]=null;var cS="4.1.0";const aR=function(s,e){const i=s.qualityLevels,r=new Rp,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 aR(this,j.obj.merge({},s))};j.registerPlugin("qualityLevels",dS),dS.VERSION=cS;/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */const _n=Pf,Mp=(s,e)=>e&&e.responseURL&&s!==e.responseURL?e.responseURL:s,ns=s=>j.log.debug?j.log.debug.bind(j,"VHS:",`${s} >`):function(){};function xt(...s){const e=j.obj||j;return(e.merge||e.mergeOptions).apply(e,s)}function Si(...s){const e=j.time||j;return(e.createTimeRanges||e.createTimeRanges).apply(e,s)}function oR(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 Qs=1/30,Ks=Qs*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 Si(i)},vu=function(s,e){return hS(s,function(i,r){return i-Ks<=e&&r+Ks>=e})},Lp=function(s,e){return hS(s,function(i){return i-Qs>=e})},lR=function(s){if(s.length<2)return Si();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 Si(e)},uR=function(s,e){let i=null,r=null,o=0;const u=[],c=[];if(!s||!s.length||!e||!e.length)return Si();let f=s.length;for(;f--;)u.push({time:s.start(f),type:"start"}),u.push({time:s.end(f),type:"end"});for(f=e.length;f--;)u.push({time:e.start(f),type:"start"}),u.push({time:e.end(f),type:"end"});for(u.sort(function(m,b){return m.time-b.time}),f=0;f<u.length;f++)u[f].type==="start"?(o++,o===2&&(i=u[f].time)):u[f].type==="end"&&(o--,o===1&&(r=u[f].time)),i!==null&&r!==null&&(c.push([i,r]),i=null,r=null);return Si(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(", ")},cR=function(s,e,i=1){return((s.length?s.end(s.length-1):0)-e)/i},Bo=s=>{const e=[];for(let i=0;i<s.length;i++)e.push({start:s.start(i),end:s.end(i)});return e},dR=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),u=s.end(r);if(!(e>u)){if(e>o&&e<=u){i+=u-e;continue}i+=u-o}}return i},vy=(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},by=s=>(s.segments||[]).reduce((e,i,r)=>(i.parts?i.parts.forEach(function(o,u){e.push({duration:o.duration,segmentIndex:r,partIndex:u,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,u)=>o+(u.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},hR=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+=vy(s,o),typeof o.start<"u")return{result:i+o.start,precise:!0}}return{result:i,precise:!1}},fR=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+=vy(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=hR(s,e);if(r.precise)return r.result;const o=fR(s,e);return o.precise?o.result:r.result+i},vS=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 B.Infinity}return yS(s,e,i)},Od=function({defaultDuration:s,durationList:e,startIndex:i,endIndex:r}){let o=0;if(i>r&&([i,r]=[r,i]),i<0){for(let u=i;u<Math.min(0,r);u++)o+=s;i=0}for(let u=i;u<r;u++)o+=e[u].duration;return o},bS=function(s,e,i,r){if(!s||!s.segments)return null;if(s.endList)return vS(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)},pR=function(s,e,i){const o=e||0;let u=bS(s,e,!0,i);return u===null?Si():(u<o&&(u=o),Si(o,u))},mR=function({playlist:s,currentTime:e,startingSegmentIndex:i,startingPartIndex:r,startTime:o,exactManifestTimings:u}){let c=e-o;const f=by(s);let m=0;for(let b=0;b<f.length;b++){const S=f[b];if(i===S.segmentIndex&&!(typeof r=="number"&&typeof S.partIndex=="number"&&r!==S.partIndex)){m=b;break}}if(c<0){if(m>0)for(let b=m-1;b>=0;b--){const S=f[b];if(c+=S.duration,u){if(c<0)continue}else if(c+Qs<=0)continue;return{partIndex:S.partIndex,segmentIndex:S.segmentIndex,startTime:o-Od({defaultDuration:s.targetDuration,durationList:f,startIndex:m,endIndex:b})}}return{partIndex:f[0]&&f[0].partIndex||null,segmentIndex:f[0]&&f[0].segmentIndex||0,startTime:e}}if(m<0){for(let b=m;b<0;b++)if(c-=s.targetDuration,c<0)return{partIndex:f[0]&&f[0].partIndex||null,segmentIndex:f[0]&&f[0].segmentIndex||0,startTime:e};m=0}for(let b=m;b<f.length;b++){const S=f[b];c-=S.duration;const x=S.duration>Qs,w=c===0,R=x&&c+Qs>=0;if(!((w||R)&&b!==f.length-1)){if(u){if(c>0)continue}else if(c-Qs>=0)continue;return{partIndex:S.partIndex,segmentIndex:S.segmentIndex,startTime:o+Od({defaultDuration:s.targetDuration,durationList:f,startIndex:m,endIndex:b})}}}return{segmentIndex:f[f.length-1].segmentIndex,partIndex:f[f.length-1].partIndex,startTime:e}},_S=function(s){return s.excludeUntil&&s.excludeUntil>Date.now()},_y=function(s){return s.excludeUntil&&s.excludeUntil===1/0},Ip=function(s){const e=_S(s);return!s.disabled&&!e},gR=function(s){return s.disabled},yR=function(s){for(let e=0;e<s.segments.length;e++)if(s.segments[e].key)return!0;return!1},TS=function(s,e){return e.attributes&&e.attributes[s]},vR=function(s,e,i,r=0){return TS("BANDWIDTH",i)?(s*i.attributes.BANDWIDTH-r*8)/e:NaN},Ty=(s,e)=>{if(s.playlists.length===1)return!0;const i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return s.playlists.filter(r=>Ip(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 u in i[o])if(r=e(i[o][u]),r)break;if(r)break}return!!r},Rd=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(u=>s1(u))||SS(s,u=>Sy(i,u))))return!1}return!0};var Tn={liveEdgeDelay:gS,duration:vS,seekable:pR,getMediaInfoForTime:mR,isEnabled:Ip,isDisabled:gR,isExcluded:_S,isIncompatible:_y,playlistEnd:bS,isAes:yR,hasAttribute:TS,estimateSegmentRequestTime:vR,isLowestEnabledRendition:Ty,isAudioOnly:Rd,playlistMatch:Sy,segmentDurationWithParts:vy};const{log:xS}=j,bu=(s,e)=>`${s}-${e}`,ES=(s,e,i)=>`placeholder-uri-${s}-${e}-${i}`,bR=({onwarn:s,oninfo:e,manifestString:i,customTagParsers:r=[],customTagMappers:o=[],llhls:u})=>{const c=new Fk;s&&c.on("warn",s),e&&c.on("info",e),r.forEach(b=>c.addParser(b)),o.forEach(b=>c.addTagMapper(b)),c.push(i),c.end();const f=c.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(b){f.hasOwnProperty(b)&&delete f[b]}),f.segments&&f.segments.forEach(function(b){["parts","preloadHints"].forEach(function(S){b.hasOwnProperty(S)&&delete b[S]})})),!f.targetDuration){let b=10;f.segments&&f.segments.length&&(b=f.segments.reduce((S,x)=>Math.max(S,x.duration),0)),s&&s({message:`manifest has no targetDuration defaulting to ${b}`}),f.targetDuration=b}const m=pS(f);if(m.length&&!f.partTargetDuration){const b=m.reduce((S,x)=>Math.max(S,x.duration),0);s&&(s({message:`manifest has no partTargetDuration defaulting to ${b}`}),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=b}return f},_u=(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 u=s.mediaGroups[i][r][o];e(u,i,r,o)}})},CS=({playlist:s,uri:e,id:i})=>{s.id=i,s.playlistErrors_=0,e&&(s.uri=e),s.attributes=s.attributes||{}},_R=s=>{let e=s.playlists.length;for(;e--;){const i=s.playlists[e];CS({playlist:i,id:bu(e,i.uri)}),i.resolvedUri=_n(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.")}},TR=s=>{_u(s,e=>{e.uri&&(e.resolvedUri=_n(s.uri,e.uri))})},SR=(s,e)=>{const i=bu(0,e),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:B.location.href,resolvedUri:B.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return r.playlists[i]=r.playlists[0],r.playlists[e]=r.playlists[0],r},wS=(s,e,i=ES)=>{s.uri=e;for(let o=0;o<s.playlists.length;o++)if(!s.playlists[o].uri){const u=`placeholder-uri-${o}`;s.playlists[o].uri=u}const r=Rd(s);_u(s,(o,u,c,f)=>{if(!o.playlists||!o.playlists.length){if(r&&u==="AUDIO"&&!o.uri)for(let m=0;m<s.playlists.length;m++){const b=s.playlists[m];if(b.attributes&&b.attributes.AUDIO&&b.attributes.AUDIO===c)return}o.playlists=[Qt({},o)]}o.playlists.forEach(function(m,b){const S=i(u,c,f,m),x=bu(b,S);m.uri?m.resolvedUri=m.resolvedUri||_n(s.uri,m.uri):(m.uri=b===0?S:x,m.resolvedUri=m.uri),m.id=m.id||x,m.attributes=m.attributes||{},s.playlists[m.id]=m,s.playlists[m.uri]=m})}),_R(s),TR(s)};class AS{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,u)=>(o.set(u.id,u),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 u=e[r.class].push(r);r.classListIndex=u-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 DS=22,Uo=({requestType:s,request:e,error:i,parseFailure:r})=>{const o=e.status<200||e.status>299,u=e.status>=400&&e.status<=499,c={uri:e.uri,requestType:s},f=o&&!u||r;if(i&&u)c.error=Qt({},i),c.errorType=j.Error.NetworkRequestFailed;else if(e.aborted)c.errorType=j.Error.NetworkRequestAborted;else if(e.timedout)c.erroType=j.Error.NetworkRequestTimeout;else if(f){const m=r?j.Error.NetworkBodyParserFailed:j.Error.NetworkBadStatus;c.errorType=m,c.status=e.status,c.headers=e.headers}return c},xR=ns("CodecUtils"),kS=function(s){const e=s.attributes||{};if(e.CODECS)return js(e.CODECS)},OS=(s,e)=>{const i=e.attributes||{};return s&&s.mediaGroups&&s.mediaGroups.AUDIO&&i.AUDIO&&s.mediaGroups.AUDIO[i.AUDIO]},ER=(s,e)=>{if(!OS(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},Md=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){xR(`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},RS=function(s){let e=0;return s.audio&&e++,s.video&&e++,e},Ld=function(s,e){const i=e.attributes||{},r=Md(kS(e)||[]);if(OS(s,e)&&!r.audio&&!ER(s,e)){const o=Md(jk(s,i.AUDIO)||[]);o.audio&&(r.audio=o.audio)}return r},{EventTarget:CR}=j,wR=(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 u=r.parts||[],c=mS(e)-1;c>-1&&c!==u.length-1&&(i._HLS_part=c),(c>-1||u.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 B.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},AR=(s,e)=>{if(!s)return e;const i=xt(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]=xt(s.parts[r],e.parts[r]));return!s.skipped&&e.skipped&&(i.skipped=!1),s.preload&&!e.preload&&(i.preload=!1),i},DR=(s,e,i)=>{const r=s.slice(),o=e.slice();i=i||0;const u=[];let c;for(let f=0;f<o.length;f++){const m=r[f+i],b=o[f];m?(c=m.map||c,u.push(AR(m,b))):(c&&!b.map&&(b.map=c),u.push(b))}return u},MS=(s,e)=>{!s.resolvedUri&&s.uri&&(s.resolvedUri=_n(e,s.uri)),s.key&&!s.key.resolvedUri&&(s.key.resolvedUri=_n(e,s.key.uri)),s.map&&!s.map.resolvedUri&&(s.map.resolvedUri=_n(e,s.map.uri)),s.map&&s.map.key&&!s.map.key.resolvedUri&&(s.map.key.resolvedUri=_n(e,s.map.key.uri)),s.parts&&s.parts.length&&s.parts.forEach(i=>{i.resolvedUri||(i.resolvedUri=_n(e,i.uri))}),s.preloadHints&&s.preloadHints.length&&s.preloadHints.forEach(i=>{i.resolvedUri||(i.resolvedUri=_n(e,i.uri))})},LS=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},IS=(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=IS)=>{const r=xt(s,{}),o=r.playlists[e.id];if(!o||i(o,e))return null;e.segments=LS(e);const u=xt(o,e);if(u.preloadSegment&&!e.preloadSegment&&delete u.preloadSegment,o.segments){if(e.skip){e.segments=e.segments||[];for(let c=0;c<e.skip.skippedSegments;c++)e.segments.unshift({skipped:!0})}u.segments=DR(o.segments,e.segments,e.mediaSequence-o.mediaSequence)}u.segments.forEach(c=>{MS(c,u.resolvedUri)});for(let c=0;c<r.playlists.length;c++)r.playlists[c].id===e.id&&(r.playlists[c]=u);return r.playlists[e.id]=u,r.playlists[e.uri]=u,_u(s,(c,f,m,b)=>{if(c.playlists)for(let S=0;S<c.playlists.length;S++)e.id===c.playlists[S].id&&(c.playlists[S]=u)}),r},Ey=(s,e)=>{const i=s.segments||[],r=i[i.length-1],o=r&&r.parts&&r.parts[r.parts.length-1],u=o&&o.duration||r&&r.duration;return e&&u?u*1e3:(s.partTargetDuration||s.targetDuration||10)*500},NS=(s,e,i)=>{if(!s)return;const r=[];return s.forEach(o=>{if(!o.attributes)return;const{BANDWIDTH:u,RESOLUTION:c,CODECS:f}=o.attributes;r.push({id:o.id,bandwidth:u,resolution:c,codecs:f})}),{type:e,isLive:i,renditions:r}};class Tu extends CR{constructor(e,i,r={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=ns("PlaylistLoader");const{withCredentials:o=!1}=r;this.src=e,this.vhs_=i,this.withCredentials=o,this.addDateRangesToTextTrack_=r.addDateRangesToTextTrack;const u=i.options_;this.customTagParsers=u&&u.customTagParsers||[],this.customTagMappers=u&&u.customTagMappers||[],this.llhls=u&&u.llhls,this.dateRangesStorage_=new AS,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=_n(this.main.uri,e.uri);this.llhls&&(i=wR(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:u}=i;this.request=null,r&&(this.state=r),this.error={playlist:this.main.playlists[u],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=bR({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:j.Error.StreamingHlsPlaylistParserError,error:r}}}excludeAudioOnlyVariants(e){const i=r=>{const o=r.attributes||{},{width:u,height:c}=o.RESOLUTION||{};if(u&&c)return!0;const f=kS(r)||[];return!!Md(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 u={playlistInfo:{type:"media",uri:r}};this.trigger({type:"playlistparsestart",metadata:u});const c=i||this.parseManifest_({url:r,manifestString:e});c.lastRequest=Date.now(),CS({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)),u.parsedPlaylist=NS(this.main.playlists,u.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:u}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),B.clearTimeout(this.mediaUpdateTimeout),B.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new AS,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(B.clearTimeout(this.finalRenditionTimeout),i){const f=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=B.setTimeout(this.media.bind(this,e,!1),f);return}const r=this.state,o=!this.media_||e.id!==this.media_.id,u=this.main.playlists[e.id];if(u&&u.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,m)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=Mp(e.resolvedUri,m),f)return this.playlistRequestError(this.request,e,r);this.trigger({type:"playlistrequestcomplete",metadata:c}),this.haveMetadata({playlistString:m.responseText,url:e.uri,id:e.id}),r==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(B.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&&(B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const i=this.media();if(e){const r=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=B.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&&(B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=B.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=B.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=Mp(this.src,r),this.trigger({type:"playlistparsestart",metadata:e});const o=this.parseManifest_({manifestString:r.responseText,url:this.src});e.parsedPlaylist=NS(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,wS(this.main,this.srcUri()),e.playlists.forEach(r=>{r.segments=LS(r),r.segments.forEach(o=>{MS(o,r.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const i=this.srcUri()||B.location.href;this.main=SR(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 u=r.playlists.length;for(;u--;){const c=r.playlists[u];if(c.attributes["PATHWAY-ID"]===o){const f=c.resolvedUri,m=c.id;if(i){const b=this.createCloneURI_(c.resolvedUri,e),S=bu(o,b),x=this.createCloneAttributes_(o,c.attributes),w=this.createClonePlaylist_(c,S,e,x);r.playlists[u]=w,r.playlists[S]=w,r.playlists[b]=w}else r.playlists.splice(u,1);delete r.playlists[m],delete r.playlists[f]}}this.updateOrDeleteCloneMedia(e,i)}updateOrDeleteCloneMedia(e,i){const r=this.main,o=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{if(!(!r.mediaGroups[u]||!r.mediaGroups[u][o])){for(const c in r.mediaGroups[u])if(c===o){for(const f in r.mediaGroups[u][c])r.mediaGroups[u][c][f].playlists.forEach((b,S)=>{const x=r.playlists[b.id],w=x.id,R=x.resolvedUri;delete r.playlists[w],delete r.playlists[R]});delete r.mediaGroups[u][c]}}}),i&&this.createClonedMediaGroups_(e)}addClonePathway(e,i={}){const r=this.main,o=r.playlists.length,u=this.createCloneURI_(i.resolvedUri,e),c=bu(e.ID,u),f=this.createCloneAttributes_(e.ID,i.attributes),m=this.createClonePlaylist_(i,c,e,f);r.playlists[o]=m,r.playlists[c]=m,r.playlists[u]=m,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const i=e.ID,r=e["BASE-ID"],o=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{if(!(!o.mediaGroups[u]||o.mediaGroups[u][i]))for(const c in o.mediaGroups[u]){if(c===r)o.mediaGroups[u][i]={};else continue;for(const f in o.mediaGroups[u][c]){const m=o.mediaGroups[u][c][f];o.mediaGroups[u][i][f]=Qt({},m);const b=o.mediaGroups[u][i][f],S=this.createCloneURI_(m.resolvedUri,e);b.resolvedUri=S,b.uri=S,b.playlists=[],m.playlists.forEach((x,w)=>{const R=o.playlists[x.id],L=ES(u,i,f),A=bu(i,L);if(R&&!o.playlists[A]){const q=this.createClonePlaylist_(R,A,e),U=q.resolvedUri;o.playlists[A]=q,o.playlists[U]=q}b.playlists[w]=this.createClonePlaylist_(x,A,e)})}}})}createClonePlaylist_(e,i,r,o){const u=this.createCloneURI_(e.resolvedUri,r),c={resolvedUri:u,uri:u,id:i};return e.segments&&(c.segments=[]),o&&(c.attributes=o),xt(e,c)}createCloneURI_(e,i){const r=new URL(e);r.hostname=i["URI-REPLACEMENT"].HOST;const o=i["URI-REPLACEMENT"].PARAMS;for(const u of Object.keys(o))r.searchParams.set(u,o[u]);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 Cy=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)},kR=(s,e)=>{if(!s||!s.size)return;let i=e;return s.forEach(r=>{i=r(i)}),i},OR=(s,e,i,r)=>{!s||!s.size||s.forEach(o=>{o(e,i,r)})},PS=function(){const s=function e(i,r){i=xt({timeout:45e3},i);const o=e.beforeRequest||j.Vhs.xhr.beforeRequest,u=e._requestCallbackSet||j.Vhs.xhr._requestCallbackSet||new Set,c=e._responseCallbackSet||j.Vhs.xhr._responseCallbackSet;o&&typeof o=="function"&&(j.log.warn("beforeRequest is deprecated, use onRequest instead."),u.add(o));const f=j.Vhs.xhr.original===!0?j.xhr:j.Vhs.xhr,m=kR(u,i);u.delete(o);const b=f(m||i,function(x,w){return OR(c,b,x,w),Cy(b,x,w,r)}),S=b.abort;return b.abort=function(){return b.aborted=!0,S.apply(b,arguments)},b.uri=i.uri,b.requestType=i.requestType,b.requestTime=Date.now(),b};return s.original=!0,s},RR=function(s){let e;const i=s.offset;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=B.BigInt(s.offset)+B.BigInt(s.length)-B.BigInt(1):e=s.offset+s.length-1,"bytes="+i+"-"+e},wy=function(s){const e={};return s.byterange&&(e.Range=RR(s.byterange)),e},MR=function(s,e){return s.start(e)+"-"+s.end(e)},LR=function(s,e){const i=s.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},IR=function(s){return s>=32&&s<126?String.fromCharCode(s):"."},BS=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},Np=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},qS=s=>{const e=Array.prototype.slice.call(s),i=16;let r="",o,u;for(let c=0;c<e.length/i;c++)o=e.slice(c*i,c*i+i).map(LR).join(""),u=e.slice(c*i,c*i+i).map(IR).join(""),r+=o+" "+u+`
`;return r};var NR=Object.freeze({__proto__:null,createTransferableMessage:BS,initSegmentId:Np,segmentKeyId:US,hexDump:qS,tagDump:({bytes:s})=>qS(s),textRanges:s=>{let e="",i;for(i=0;i<s.length;i++)e+=MR(s,i)+" ";return e}});const FS=.25,PR=(s,e)=>{if(!e.dateTimeObject)return null;const i=e.videoTimingInfo.transmuxerPrependedSeconds,o=e.videoTimingInfo.transmuxedPresentationStart+i,u=s-o;return new Date(e.dateTimeObject.getTime()+u*1e3)},BR=s=>s.transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds,UR=(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 m=0;m<e.segments.length-1;m++){r=e.segments[m];const b=new Date(e.segments[m+1].dateTimeObject);if(i<b)break}const o=e.segments[e.segments.length-1],u=o.dateTimeObject,c=o.videoTimingInfo?BR(o.videoTimingInfo):o.duration+o.duration*FS,f=new Date(u.getTime()+c*1e3);return i>f?null:(i>new Date(u)&&(r=o),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Tn.duration(e,e.mediaSequence+e.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})},qR=(s,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let i=0,r;for(let u=0;u<e.segments.length&&(r=e.segments[u],i=r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationEnd:i+r.duration,!(s<=i));u++);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*FS)return null;r=o}return{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:i-r.duration,type:r.videoTimingInfo?"accurate":"estimate"}},FR=(s,e)=>{let i,r;try{i=new Date(s),r=new Date(e)}catch{}const o=i.getTime();return(r.getTime()-o)/1e3},HR=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},jR=({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=qR(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},u=PR(e,r.segment);return u&&(o.programDateTime=u.toISOString()),i(null,o)},HS=({programTime:s,playlist:e,retryCount:i=2,seekTo:r,pauseAfterSeek:o=!0,tech:u,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&&!u.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!HR(e))return c({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const f=UR(s,e);if(!f)return c({message:`${s} was not found in the stream`});const m=f.segment,b=FR(m.dateTimeObject,s);if(f.type==="estimate"){if(i===0)return c({message:`${s} is not buffered yet. Try again`});r(f.estimatedStart+b),u.one("seeked",()=>{HS({programTime:s,playlist:e,retryCount:i-1,seekTo:r,pauseAfterSeek:o,tech:u,callback:c})});return}const S=m.start+b,x=()=>c(null,u.currentTime());u.one("seeked",x),o&&u.pause(),r(S)},Ay=(s,e)=>{if(s.readyState===4)return e()},zR=(s,e,i,r)=>{let o=[],u,c=!1;const f=function(x,w,R,L){return w.abort(),c=!0,i(x,w,R,L)},m=function(x,w){if(c)return;if(x)return x.metadata=Uo({requestType:r,request:w,error:x}),f(x,w,"",o);const R=w.responseText.substring(o&&o.byteLength||0,w.responseText.length);if(o=Zk(o,l1(R,!0)),u=u||gd(o),o.length<10||u&&o.length<u+2)return Ay(w,()=>f(x,w,"",o));const L=g0(o);return L==="ts"&&o.length<188?Ay(w,()=>f(x,w,"",o)):!L&&o.length<376?Ay(w,()=>f(x,w,"",o)):f(null,w,L,o)},S=e({uri:s,beforeSend(x){x.overrideMimeType("text/plain; charset=x-user-defined"),x.addEventListener("progress",function({total:w,loaded:R}){return Cy(x,null,{statusCode:x.status},m)})}},function(x,w){return Cy(S,x,w,m)});return S},{EventTarget:VR}=j,jS=function(s,e){if(!IS(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 u=r.byterange,c=o.byterange;if(u&&!c||!u&&c||u.offset!==c.offset||u.length!==c.length)return!1}return!0},$R=(s,e,i,r)=>{const o=r.attributes.NAME||i;return`placeholder-uri-${s}-${e}-${o}`},GR=({mainXml:s,srcUrl:e,clientOffset:i,sidxMapping:r,previousManifest:o})=>{const u=b3(s,{manifestUri:e,clientOffset:i,sidxMapping:r,previousManifest:o});return wS(u,e,$R),u},YR=(s,e)=>{_u(s,(i,r,o,u)=>{(!e.mediaGroups[r][o]||!(u in e.mediaGroups[r][o]))&&delete s.mediaGroups[r][o][u]})},XR=(s,e,i)=>{let r=!0,o=xt(s,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let u=0;u<e.playlists.length;u++){const c=e.playlists[u];if(c.sidx){const m=Gf(c.sidx);i&&i[m]&&i[m].sidx&&c0(c,i[m].sidx,c.sidx.resolvedUri)}const f=xy(o,c,jS);f&&(o=f,r=!1)}return _u(e,(u,c,f,m)=>{if(u.playlists&&u.playlists.length){const b=u.playlists[0].id,S=xy(o,u.playlists[0],jS);S&&(o=S,m in o.mediaGroups[c][f]||(o.mediaGroups[c][f][m]=u),o.mediaGroups[c][f][m].playlists[0]=o.playlists[b],r=!1)}}),YR(o,e),e.minimumUpdatePeriod!==s.minimumUpdatePeriod&&(r=!1),r?null:o},WR=(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,zS=(s,e)=>{const i={};for(const r in s){const u=s[r].sidx;if(u){const c=Gf(u);if(!e[c])break;const f=e[c].sidxInfo;WR(f,u)&&(i[c]=e[c])}}return i},QR=(s,e)=>{let r=zS(s.playlists,e);return _u(s,(o,u,c,f)=>{if(o.playlists&&o.playlists.length){const m=o.playlists;r=xt(r,zS(m,e))}}),r};class Dy extends VR{constructor(e,i,r={},o){super(),this.isPaused_=!0,this.mainPlaylistLoader_=o||this,o||(this.isMain_=!0);const{withCredentials:u=!1}=r;if(this.vhs_=i,this.withCredentials=u,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_=ns("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&&Gf(e.sidx);if(!e.sidx||!o||this.mainPlaylistLoader_.sidxMapping_[o]){B.clearTimeout(this.mediaRequest_),this.mediaRequest_=B.setTimeout(()=>r(!1),0);return}const u=Mp(e.sidx.resolvedUri),c=(m,b)=>{if(this.requestErrored_(m,b,i))return;const S=this.mainPlaylistLoader_.sidxMapping_,{requestType:x}=b;let w;try{w=C3(Fe(b.response).subarray(8))}catch(R){R.metadata=Uo({requestType:x,request:b,parseFailure:!0}),this.requestErrored_(R,b,i);return}return S[o]={sidxInfo:e.sidx,sidx:w},c0(e,w,e.sidx.resolvedUri),r(!0)},f="dash-sidx";this.request=zR(u,this.vhs_.xhr,(m,b,S,x)=>{if(m)return c(m,b);if(!S||S!=="mp4"){const L=S||"unknown";return c({status:b.status,message:`Unsupported ${L} container type for sidx segment at URL: ${u}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},b)}const{offset:w,length:R}=e.sidx.byterange;if(x.length>=R+w)return c(m,{response:x.subarray(w,w+R),status:b.status,uri:b.uri});this.request=this.vhs_.xhr({uri:u,responseType:"arraybuffer",requestType:"dash-sidx",headers:wy({byterange:e.sidx.byterange})},c)},f)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},B.clearTimeout(this.minimumUpdatePeriodTimeout_),B.clearTimeout(this.mediaRequest_),B.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,B.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(),B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(B.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const i=this.media();if(e){const r=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=B.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_){B.clearTimeout(this.mediaRequest_),this.mediaRequest_=B.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 u=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=Mp(this.mainPlaylistLoader_.srcUrl,o),u){this.handleMain_(),this.syncClientServerClock_(()=>e(o,u));return}return e(o,u)})}syncClientServerClock_(e){const i=_3(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:_n(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 u;i.method==="HEAD"?!o.responseHeaders||!o.responseHeaders.date?u=this.mainLoaded_:u=Date.parse(o.responseHeaders.date):u=Date.parse(o.responseText),this.mainPlaylistLoader_.clientOffset_=u-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){B.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=GR({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(u){this.error=u,this.error.metadata={errorType:j.Error.StreamingDashManifestParserError,error:u},this.trigger("error")}e&&(r=XR(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:u,endList:c}=r,f=[];r.playlists.forEach(b=>{f.push({id:b.id,bandwidth:b.attributes.BANDWIDTH,resolution:b.attributes.RESOLUTION,codecs:b.attributes.CODECS})});const m={duration:u,isLive:!c,renditions:f};i.parsedManifest=m,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_&&(B.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_=B.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_=QR(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=B.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 xi={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 KR=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},ZR=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=ZR(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}},GS=function(s){return`var browserWorkerPolyFill = ${VS.toString()};
browserWorkerPolyFill(self);
`+s},YS=function(s){return s.toString().replace(/^function.+?{/,"").slice(0,-1)},JR=GS(YS(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 v;return h[g]?(v=h[g].indexOf(y),h[g]=h[g].slice(),h[g].splice(v,1),v>-1):!1},this.trigger=function(g){var y,v,_,E;if(y=h[g],!!y)if(arguments.length===2)for(_=y.length,v=0;v<_;++v)y[v].call(this,arguments[1]);else{for(E=[],v=arguments.length,v=1;v<arguments.length;++v)E.push(arguments[v]);for(_=y.length,v=0;v<_;++v)y[v].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)},u={getUint64:o,MAX_UINT32:r},c=u.MAX_UINT32,f,m,b,S,x,w,R,L,A,q,U,G,$,W,K,le,Y,J,te,xe,he,be,ye,pe,He,ce,Ce,Oe,Be,ee,we,ve,Re,Ue,ht,at;(function(){var h;if(ye={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 ye)ye.hasOwnProperty(h)&&(ye[h]=[h.charCodeAt(0),h.charCodeAt(1),h.charCodeAt(2),h.charCodeAt(3)]);pe=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),ce=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),He=new Uint8Array([0,0,0,1]),Ce=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]),Oe=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]),Be={video:Ce,audio:Oe},ve=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),we=new Uint8Array([0,0,0,0,0,0,0,0]),Re=new Uint8Array([0,0,0,0,0,0,0,0]),Ue=Re,ht=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),at=Re,ee=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),f=function(h){var g=[],y=0,v,_,E;for(v=1;v<arguments.length;v++)g.push(arguments[v]);for(v=g.length;v--;)y+=g[v].byteLength;for(_=new Uint8Array(y+8),E=new DataView(_.buffer,_.byteOffset,_.byteLength),E.setUint32(0,_.byteLength),_.set(h,4),v=0,y=8;v<g.length;v++)_.set(g[v],y),y+=g[v].byteLength;return _},m=function(){return f(ye.dinf,f(ye.dref,ve))},b=function(h){return f(ye.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(ye.ftyp,pe,He,pe,ce)},le=function(h){return f(ye.hdlr,Be[h])},x=function(h){return f(ye.mdat,h)},K=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(ye.mdhd,g)},W=function(h){return f(ye.mdia,K(h),le(h.type),R(h))},w=function(h){return f(ye.mfhd,new Uint8Array([0,0,0,0,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255]))},R=function(h){return f(ye.minf,h.type==="video"?f(ye.vmhd,ee):f(ye.smhd,we),m(),J(h))},L=function(h,g){for(var y=[],v=g.length;v--;)y[v]=xe(g[v]);return f.apply(null,[ye.moof,w(h)].concat(y))},A=function(h){for(var g=h.length,y=[];g--;)y[g]=G(h[g]);return f.apply(null,[ye.moov,U(4294967295)].concat(y).concat(q(h)))},q=function(h){for(var g=h.length,y=[];g--;)y[g]=he(h[g]);return f.apply(null,[ye.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(ye.mvhd,g)},Y=function(h){var g=h.samples||[],y=new Uint8Array(4+g.length),v,_;for(_=0;_<g.length;_++)v=g[_].flags,y[_+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return f(ye.sdtp,y)},J=function(h){return f(ye.stbl,te(h),f(ye.stts,at),f(ye.stsc,Ue),f(ye.stsz,ht),f(ye.stco,Re))},function(){var h,g;te=function(y){return f(ye.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),y.type==="video"?h(y):g(y))},h=function(y){var v=y.sps||[],_=y.pps||[],E=[],k=[],M,N;for(M=0;M<v.length;M++)E.push((v[M].byteLength&65280)>>>8),E.push(v[M].byteLength&255),E=E.concat(Array.prototype.slice.call(v[M]));for(M=0;M<_.length;M++)k.push((_[M].byteLength&65280)>>>8),k.push(_[M].byteLength&255),k=k.concat(Array.prototype.slice.call(_[M]));if(N=[ye.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(ye.avcC,new Uint8Array([1,y.profileIdc,y.profileCompatibility,y.levelIdc,255].concat([v.length],E,[_.length],k))),f(ye.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],y.sarRatio){var P=y.sarRatio[0],z=y.sarRatio[1];N.push(f(ye.pasp,new Uint8Array([(P&4278190080)>>24,(P&16711680)>>16,(P&65280)>>8,P&255,(z&4278190080)>>24,(z&16711680)>>16,(z&65280)>>8,z&255])))}return f.apply(null,N)},g=function(y){return f(ye.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]),b(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(ye.tkhd,g)},xe=function(h){var g,y,v,_,E,k,M;return g=f(ye.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])),k=Math.floor(h.baseMediaDecodeTime/c),M=Math.floor(h.baseMediaDecodeTime%c),y=f(ye.tfdt,new Uint8Array([1,0,0,0,k>>>24&255,k>>>16&255,k>>>8&255,k&255,M>>>24&255,M>>>16&255,M>>>8&255,M&255])),E=32+20+8+16+8+8,h.type==="audio"?(v=be(h,E),f(ye.traf,g,y,v)):(_=Y(h),v=be(h,_.length+E),f(ye.traf,g,y,v,_))},G=function(h){return h.duration=h.duration||4294967295,f(ye.trak,$(h),W(h))},he=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(ye.trex,g)},function(){var h,g,y;y=function(v,_){var E=0,k=0,M=0,N=0;return v.length&&(v[0].duration!==void 0&&(E=1),v[0].size!==void 0&&(k=2),v[0].flags!==void 0&&(M=4),v[0].compositionTimeOffset!==void 0&&(N=8)),[0,0,E|k|M|N,1,(v.length&4278190080)>>>24,(v.length&16711680)>>>16,(v.length&65280)>>>8,v.length&255,(_&4278190080)>>>24,(_&16711680)>>>16,(_&65280)>>>8,_&255]},g=function(v,_){var E,k,M,N,P,z;for(N=v.samples||[],_+=8+12+16*N.length,M=y(N,_),k=new Uint8Array(M.length+N.length*16),k.set(M),E=M.length,z=0;z<N.length;z++)P=N[z],k[E++]=(P.duration&4278190080)>>>24,k[E++]=(P.duration&16711680)>>>16,k[E++]=(P.duration&65280)>>>8,k[E++]=P.duration&255,k[E++]=(P.size&4278190080)>>>24,k[E++]=(P.size&16711680)>>>16,k[E++]=(P.size&65280)>>>8,k[E++]=P.size&255,k[E++]=P.flags.isLeading<<2|P.flags.dependsOn,k[E++]=P.flags.isDependedOn<<6|P.flags.hasRedundancy<<4|P.flags.paddingValue<<1|P.flags.isNonSyncSample,k[E++]=P.flags.degradationPriority&61440,k[E++]=P.flags.degradationPriority&15,k[E++]=(P.compositionTimeOffset&4278190080)>>>24,k[E++]=(P.compositionTimeOffset&16711680)>>>16,k[E++]=(P.compositionTimeOffset&65280)>>>8,k[E++]=P.compositionTimeOffset&255;return f(ye.trun,k)},h=function(v,_){var E,k,M,N,P,z;for(N=v.samples||[],_+=8+12+8*N.length,M=y(N,_),E=new Uint8Array(M.length+N.length*8),E.set(M),k=M.length,z=0;z<N.length;z++)P=N[z],E[k++]=(P.duration&4278190080)>>>24,E[k++]=(P.duration&16711680)>>>16,E[k++]=(P.duration&65280)>>>8,E[k++]=P.duration&255,E[k++]=(P.size&4278190080)>>>24,E[k++]=(P.size&16711680)>>>16,E[k++]=(P.size&65280)>>>8,E[k++]=P.size&255;return f(ye.trun,E)},be=function(v,_){return v.type==="audio"?h(v,_):g(v,_)}}();var Me={ftyp:S,mdat:x,moof:L,moov:A,initSegment:function(h){var g=S(),y=A(h),v;return v=new Uint8Array(g.byteLength+y.byteLength),v.set(g),v.set(y,g.byteLength),v}},ke=function(h){var g,y,v=[],_=[];for(_.byteLength=0,_.nalCount=0,_.duration=0,v.byteLength=0,g=0;g<h.length;g++)y=h[g],y.nalUnitType==="access_unit_delimiter_rbsp"?(v.length&&(v.duration=y.dts-v.dts,_.byteLength+=v.byteLength,_.nalCount+=v.length,_.duration+=v.duration,_.push(v)),v=[y],v.byteLength=y.data.byteLength,v.pts=y.pts,v.dts=y.dts):(y.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(v.keyFrame=!0),v.duration=y.dts-v.dts,v.byteLength+=y.data.byteLength,v.push(y));return _.length&&(!v.duration||v.duration<=0)&&(v.duration=_[_.length-1].duration),_.byteLength+=v.byteLength,_.nalCount+=v.length,_.duration+=v.duration,_.push(v),_},ut=function(h){var g,y,v=[],_=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=h[0].pts,v.dts=h[0].dts,_.byteLength=0,_.nalCount=0,_.duration=0,_.pts=h[0].pts,_.dts=h[0].dts,g=0;g<h.length;g++)y=h[g],y.keyFrame?(v.length&&(_.push(v),_.byteLength+=v.byteLength,_.nalCount+=v.nalCount,_.duration+=v.duration),v=[y],v.nalCount=y.length,v.byteLength=y.byteLength,v.pts=y.pts,v.dts=y.dts,v.duration=y.duration):(v.duration+=y.duration,v.nalCount+=y.length,v.byteLength+=y.byteLength,v.push(y));return _.length&&v.duration<=0&&(v.duration=_[_.length-1].duration),_.byteLength+=v.byteLength,_.nalCount+=v.nalCount,_.duration+=v.duration,_.push(v),_},ft=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},Ze=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},pt=function(h,g){var y=Ze();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},At=function(h,g){var y,v,_,E,k,M=g||0,N=[];for(y=0;y<h.length;y++)for(E=h[y],v=0;v<E.length;v++)k=E[v],_=pt(k,M),M+=_.size,N.push(_);return N},Vt=function(h){var g,y,v,_,E,k,M=0,N=h.byteLength,P=h.nalCount,z=N+4*P,ie=new Uint8Array(z),Te=new DataView(ie.buffer);for(g=0;g<h.length;g++)for(_=h[g],y=0;y<_.length;y++)for(E=_[y],v=0;v<E.length;v++)k=E[v],Te.setUint32(M,k.data.byteLength),M+=4,ie.set(k.data,M),M+=k.data.byteLength;return ie},Sn=function(h,g){var y,v=g||0,_=[];return y=pt(h,v),_.push(y),_},kt=function(h){var g,y,v=0,_=h.byteLength,E=h.length,k=_+4*E,M=new Uint8Array(k),N=new DataView(M.buffer);for(g=0;g<h.length;g++)y=h[g],N.setUint32(v,y.data.byteLength),v+=4,M.set(y.data,v),v+=y.data.byteLength;return M},Ot={groupNalsIntoFrames:ke,groupFramesIntoGops:ut,extendFirstKeyFrame:ft,generateSampleTable:At,concatenateNalData:Vt,generateSampleTableForFrame:Sn,concatenateNalDataForFrame:kt},dt=[33,16,5,32,164,27],xn=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],_e=function(h){for(var g=[];h--;)g.push(0);return g},Ei=function(h){return Object.keys(h).reduce(function(g,y){return g[y]=new Uint8Array(h[y].reduce(function(v,_){return v.concat(_)},[])),g},{})},ci,$t=function(){if(!ci){var h={96e3:[dt,[227,64],_e(154),[56]],88200:[dt,[231],_e(170),[56]],64e3:[dt,[248,192],_e(240),[56]],48e3:[dt,[255,192],_e(268),[55,148,128],_e(54),[112]],44100:[dt,[255,192],_e(268),[55,163,128],_e(84),[112]],32e3:[dt,[255,192],_e(268),[55,234],_e(226),[112]],24e3:[dt,[255,192],_e(268),[55,255,128],_e(268),[111,112],_e(126),[224]],16e3:[dt,[255,192],_e(268),[55,255,128],_e(268),[111,255],_e(269),[223,108],_e(195),[1,192]],12e3:[xn,_e(268),[3,127,248],_e(268),[6,255,240],_e(268),[13,255,224],_e(268),[27,253,128],_e(259),[56]],11025:[xn,_e(268),[3,127,248],_e(268),[6,255,240],_e(268),[13,255,224],_e(268),[27,255,192],_e(268),[55,175,128],_e(108),[112]],8e3:[xn,_e(268),[3,121,16],_e(47),[7]]};ci=Ei(h)}return ci},Ci=9e4,Hr,Pa,er,jr,Ba,zr,Ua;Hr=function(h){return h*Ci},Pa=function(h,g){return h*g},er=function(h){return h/Ci},jr=function(h,g){return h/g},Ba=function(h,g){return Hr(jr(h,g))},zr=function(h,g){return Pa(er(h),g)},Ua=function(h,g,y){return er(y?h:h-g)};var gt={ONE_SECOND_IN_TS:Ci,secondsToVideoTs:Hr,secondsToAudioTs:Pa,videoTsToSeconds:er,audioTsToSeconds:jr,audioTsToVideoTs:Ba,videoTsToAudioTs:zr,metadataTsToSeconds:Ua},tr=$t,Wi=gt,qn=function(h){var g,y,v=0;for(g=0;g<h.length;g++)y=h[g],v+=y.data.byteLength;return v},ir=function(h,g,y,v){var _,E=0,k=0,M=0,N=0,P,z,ie;if(g.length&&(_=Wi.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),E=Math.ceil(Wi.ONE_SECOND_IN_TS/(h.samplerate/1024)),y&&v&&(k=_-Math.max(y,v),M=Math.floor(k/E),N=M*E),!(M<1||N>Wi.ONE_SECOND_IN_TS/2))){for(P=tr()[h.samplerate],P||(P=g[0].data),z=0;z<M;z++)ie=g[0],g.splice(0,0,{data:P,dts:ie.dts-E,pts:ie.pts-E});return h.baseMediaDecodeTime-=Math.floor(Wi.videoTsToAudioTs(N,h.samplerate)),N}},D=function(h,g,y){return g.minSegmentDts>=y?h:(g.minSegmentDts=1/0,h.filter(function(v){return v.dts>=y?(g.minSegmentDts=Math.min(g.minSegmentDts,v.dts),g.minSegmentPts=g.minSegmentDts,!0):!1}))},X=function(h){var g,y,v=[];for(g=0;g<h.length;g++)y=h[g],v.push({size:y.data.byteLength,duration:1024});return v},ge=function(h){var g,y,v=0,_=new Uint8Array(qn(h));for(g=0;g<h.length;g++)y=h[g],_.set(y.data,v),v+=y.data.byteLength;return _},Ee={prefixWithSilence:ir,trimAdtsFramesByEarliestDts:D,generateSampleTable:X,concatenateFrameData:ge},Pe=gt.ONE_SECOND_IN_TS,Je=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))},Ge=function(h){delete h.minSegmentDts,delete h.maxSegmentDts,delete h.minSegmentPts,delete h.maxSegmentPts},ct=function(h,g){var y,v,_=h.minSegmentDts;return g||(_-=h.timelineStartInfo.dts),y=h.timelineStartInfo.baseMediaDecodeTime,y+=_,y=Math.max(0,y),h.type==="audio"&&(v=h.samplerate/Pe,y*=v,y=Math.floor(y)),y},Ye={clearDtsInfo:Ge,calculateTrackBaseMediaDecodeTime:ct,collectDtsInfo:Je},si=4,ws=128,Bd=function(h){for(var g=0,y={payloadType:-1,payloadSize:0},v=0,_=0;g<h.byteLength&&h[g]!==ws;){for(;h[g]===255;)v+=255,g++;for(v+=h[g++];h[g]===255;)_+=255,g++;if(_+=h[g++],!y.payload&&v===si){var E=String.fromCharCode(h[g+3],h[g+4],h[g+5],h[g+6]);if(E==="GA94"){y.payloadType=v,y.payloadSize=_,y.payload=h.subarray(g,g+_);break}else y.payload=void 0}g+=_,v=0,_=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)},En=function(h,g){var y=[],v,_,E,k;if(!(g[0]&64))return y;for(_=g[0]&31,v=0;v<_;v++)E=v*3,k={type:g[E+2]&3,pts:h},g[E+2]&4&&(k.ccData=g[E+3]<<8|g[E+4],y.push(k));return y},qd=function(h){for(var g=h.byteLength,y=[],v=1,_,E;v<g-2;)h[v]===0&&h[v+1]===0&&h[v+2]===3?(y.push(v+2),v+=2):v++;if(y.length===0)return h;_=g-y.length,E=new Uint8Array(_);var k=0;for(v=0;v<_;k++,v++)k===y[0]&&(k++,y.shift()),E[v]=h[k];return E},Fd={parseSei:Bd,parseUserData:Ud,parseCaptionPackets:En,discardEmulationPreventionBytes:qd,USER_DATA_REGISTERED_ITU_T_T35:si},Hd=i,Fo=Fd,Li=function(h){h=h||{},Li.prototype.init.call(this),this.parse708captions_=typeof h.parse708captions=="boolean"?h.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Nt(0,0),new Nt(0,1),new Nt(1,0),new Nt(1,1)],this.parse708captions_&&(this.cc708Stream_=new Et({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")))};Li.prototype=new Hd,Li.prototype.push=function(h){var g,y,v;if(h.nalUnitType==="sei_rbsp"&&(g=Fo.parseSei(h.escapedRBSP),!!g.payload&&g.payloadType===Fo.USER_DATA_REGISTERED_ITU_T_T35&&(y=Fo.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}v=Fo.parseCaptionPackets(h.pts,y),this.captionPackets_=this.captionPackets_.concat(v),this.latestDts_!==h.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=h.dts}},Li.prototype.flushCCStreams=function(h){this.ccStreams_.forEach(function(g){return h==="flush"?g.flush():g.partialFlush()},this)},Li.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)},Li.prototype.flush=function(){return this.flushStream("flush")},Li.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Li.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(h){h.reset()})},Li.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)},Li.prototype.setsChannel1Active=function(h){return(h.ccData&30720)===4096},Li.prototype.setsChannel2Active=function(h){return(h.ccData&30720)===6144},Li.prototype.setsTextOrXDSActive=function(h){return(h.ccData&28928)===256||(h.ccData&30974)===4138||(h.ccData&30974)===6186},Li.prototype.dispatchCea708Packet=function(h){this.parse708captions_&&this.cc708Stream_.push(h)};var Au={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},Hy=function(h){var g=Au[h]||h;return h&4096&&h===g?"":String.fromCharCode(g)},Ne=function(h){return 32<=h&&h<=127||160<=h&&h<=255},Fn=function(h){this.windowNum=h,this.reset()};Fn.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},Fn.prototype.getText=function(){return this.rows.join(`
`)},Fn.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Fn.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--},Fn.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Fn.prototype.addText=function(h){this.rows[this.rowIdx]+=h},Fn.prototype.backspace=function(){if(!this.isEmpty()){var h=this.rows[this.rowIdx];this.rows[this.rowIdx]=h.substr(0,h.length-1)}};var Ii=function(h,g,y){this.serviceNum=h,this.text="",this.currentWindow=new Fn(-1),this.windows=[],this.stream=y,typeof g=="string"&&this.createTextDecoder(g)};Ii.prototype.init=function(h,g){this.startPts=h;for(var y=0;y<8;y++)this.windows[y]=new Fn(y),typeof g=="function"&&(this.windows[y].beforeRowOverflow=g)},Ii.prototype.setCurrentWindow=function(h){this.currentWindow=this.windows[h]},Ii.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 Et=function(h){h=h||{},Et.prototype.init.call(this);var g=this,y=h.captionServices||{},v={},_;Object.keys(y).forEach(E=>{_=y[E],/^SERVICE/.test(E)&&(v[E]=_.encoding)}),this.serviceEncodings=v,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))}};Et.prototype=new Hd,Et.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Et.prototype.add708Bytes=function(h){var g=h.ccData,y=g>>>8,v=g&255;this.current708Packet.ptsVals.push(h.pts),this.current708Packet.data.push(y),this.current708Packet.data.push(v)},Et.prototype.push708Packet=function(){var h=this.current708Packet,g=h.data,y=null,v=null,_=0,E=g[_++];for(h.seq=E>>6,h.sizeCode=E&63;_<g.length;_++)E=g[_++],y=E>>5,v=E&31,y===7&&v>0&&(E=g[_++],y=E),this.pushServiceBlock(y,_,v),v>0&&(_+=v-1)},Et.prototype.pushServiceBlock=function(h,g,y){var v,_=g,E=this.current708Packet.data,k=this.services[h];for(k||(k=this.initService(h,_));_<g+y&&_<E.length;_++)v=E[_],Ne(v)?_=this.handleText(_,k):v===24?_=this.multiByteCharacter(_,k):v===16?_=this.extendedCommands(_,k):128<=v&&v<=135?_=this.setCurrentWindow(_,k):152<=v&&v<=159?_=this.defineWindow(_,k):v===136?_=this.clearWindows(_,k):v===140?_=this.deleteWindows(_,k):v===137?_=this.displayWindows(_,k):v===138?_=this.hideWindows(_,k):v===139?_=this.toggleWindows(_,k):v===151?_=this.setWindowAttributes(_,k):v===144?_=this.setPenAttributes(_,k):v===145?_=this.setPenColor(_,k):v===146?_=this.setPenLocation(_,k):v===143?k=this.reset(_,k):v===8?k.currentWindow.backspace():v===12?k.currentWindow.clearText():v===13?k.currentWindow.pendingNewLine=!0:v===14?k.currentWindow.clearText():v===141&&_++},Et.prototype.extendedCommands=function(h,g){var y=this.current708Packet.data,v=y[++h];return Ne(v)&&(h=this.handleText(h,g,{isExtended:!0})),h},Et.prototype.getPts=function(h){return this.current708Packet.ptsVals[Math.floor(h/2)]},Et.prototype.initService=function(h,g){var v="SERVICE"+h,y=this,v,_;return v in this.serviceEncodings&&(_=this.serviceEncodings[v]),this.services[h]=new Ii(h,_,y),this.services[h].init(this.getPts(g),function(E){y.flushDisplayed(E,y.services[h])}),this.services[h]},Et.prototype.handleText=function(h,g,y){var v=y&&y.isExtended,_=y&&y.isMultiByte,E=this.current708Packet.data,k=v?4096:0,M=E[h],N=E[h+1],P=g.currentWindow,z,ie;function Te(ue){return ue.map(qe=>("0"+(qe&255).toString(16)).slice(-2)).join("")}if(_?(ie=[M,N],h++):ie=[M],g.textDecoder_&&!v)z=g.textDecoder_.decode(new Uint8Array(ie));else if(_){const ue=Te(ie);z=String.fromCharCode(parseInt(ue,16))}else z=Hy(k|M);return P.pendingNewLine&&!P.isEmpty()&&P.newLine(this.getPts(h)),P.pendingNewLine=!1,P.addText(z),h},Et.prototype.multiByteCharacter=function(h,g){var y=this.current708Packet.data,v=y[h+1],_=y[h+2];return Ne(v)&&Ne(_)&&(h=this.handleText(++h,g,{isMultiByte:!0})),h},Et.prototype.setCurrentWindow=function(h,g){var y=this.current708Packet.data,v=y[h],_=v&7;return g.setCurrentWindow(_),h},Et.prototype.defineWindow=function(h,g){var y=this.current708Packet.data,v=y[h],_=v&7;g.setCurrentWindow(_);var E=g.currentWindow;return v=y[++h],E.visible=(v&32)>>5,E.rowLock=(v&16)>>4,E.columnLock=(v&8)>>3,E.priority=v&7,v=y[++h],E.relativePositioning=(v&128)>>7,E.anchorVertical=v&127,v=y[++h],E.anchorHorizontal=v,v=y[++h],E.anchorPoint=(v&240)>>4,E.rowCount=v&15,v=y[++h],E.columnCount=v&63,v=y[++h],E.windowStyle=(v&56)>>3,E.penStyle=v&7,E.virtualRowCount=E.rowCount+1,h},Et.prototype.setWindowAttributes=function(h,g){var y=this.current708Packet.data,v=y[h],_=g.currentWindow.winAttr;return v=y[++h],_.fillOpacity=(v&192)>>6,_.fillRed=(v&48)>>4,_.fillGreen=(v&12)>>2,_.fillBlue=v&3,v=y[++h],_.borderType=(v&192)>>6,_.borderRed=(v&48)>>4,_.borderGreen=(v&12)>>2,_.borderBlue=v&3,v=y[++h],_.borderType+=(v&128)>>5,_.wordWrap=(v&64)>>6,_.printDirection=(v&48)>>4,_.scrollDirection=(v&12)>>2,_.justify=v&3,v=y[++h],_.effectSpeed=(v&240)>>4,_.effectDirection=(v&12)>>2,_.displayEffect=v&3,h},Et.prototype.flushDisplayed=function(h,g){for(var y=[],v=0;v<8;v++)g.windows[v].visible&&!g.windows[v].isEmpty()&&y.push(g.windows[v].getText());g.endPts=h,g.text=y.join(`
`),this.pushCaption(g),g.startPts=h},Et.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)},Et.prototype.displayWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var E=0;E<8;E++)v&1<<E&&(g.windows[E].visible=1);return h},Et.prototype.hideWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var E=0;E<8;E++)v&1<<E&&(g.windows[E].visible=0);return h},Et.prototype.toggleWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var E=0;E<8;E++)v&1<<E&&(g.windows[E].visible^=1);return h},Et.prototype.clearWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var E=0;E<8;E++)v&1<<E&&g.windows[E].clearText();return h},Et.prototype.deleteWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var E=0;E<8;E++)v&1<<E&&g.windows[E].reset();return h},Et.prototype.setPenAttributes=function(h,g){var y=this.current708Packet.data,v=y[h],_=g.currentWindow.penAttr;return v=y[++h],_.textTag=(v&240)>>4,_.offset=(v&12)>>2,_.penSize=v&3,v=y[++h],_.italics=(v&128)>>7,_.underline=(v&64)>>6,_.edgeType=(v&56)>>3,_.fontStyle=v&7,h},Et.prototype.setPenColor=function(h,g){var y=this.current708Packet.data,v=y[h],_=g.currentWindow.penColor;return v=y[++h],_.fgOpacity=(v&192)>>6,_.fgRed=(v&48)>>4,_.fgGreen=(v&12)>>2,_.fgBlue=v&3,v=y[++h],_.bgOpacity=(v&192)>>6,_.bgRed=(v&48)>>4,_.bgGreen=(v&12)>>2,_.bgBlue=v&3,v=y[++h],_.edgeRed=(v&48)>>4,_.edgeGreen=(v&12)>>2,_.edgeBlue=v&3,h},Et.prototype.setPenLocation=function(h,g){var y=this.current708Packet.data,v=y[h],_=g.currentWindow.penLoc;return g.currentWindow.pendingNewLine=!0,v=y[++h],_.row=v&15,v=y[++h],_.column=v&63,h},Et.prototype.reset=function(h,g){var y=this.getPts(h);return this.flushDisplayed(y,g),this.initService(g.serviceNum,h)};var jy={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},Vr=function(h){return h===null?"":(h=jy[h]||h,String.fromCharCode(h))},Ho=14,Du=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],di=function(){for(var h=[],g=Ho+1;g--;)h.push({text:"",indent:0,offset:0});return h},Nt=function(h,g){Nt.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 v,_,E,k,M;if(v=y.ccData&32639,v===this.lastControlCode_){this.lastControlCode_=null;return}if((v&61440)===4096?this.lastControlCode_=v:v!==this.PADDING_&&(this.lastControlCode_=null),E=v>>>8,k=v&255,v!==this.PADDING_)if(v===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(v===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(y.pts),this.flushDisplayed(y.pts),_=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=_,this.startPts_=y.pts;else if(v===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(y.pts);else if(v===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(y.pts);else if(v===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(y.pts);else if(v===this.CARRIAGE_RETURN_)this.clearFormatting(y.pts),this.flushDisplayed(y.pts),this.shiftRowsUp_(),this.startPts_=y.pts;else if(v===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(v===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(y.pts),this.displayed_=di();else if(v===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=di();else if(v===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(y.pts),this.displayed_=di()),this.mode_="paintOn",this.startPts_=y.pts;else if(this.isSpecialCharacter(E,k))E=(E&3)<<8,M=Vr(E|k),this[this.mode_](y.pts,M),this.column_++;else if(this.isExtCharacter(E,k))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,M=Vr(E|k),this[this.mode_](y.pts,M),this.column_++;else if(this.isMidRowCode(E,k))this.clearFormatting(y.pts),this[this.mode_](y.pts," "),this.column_++,(k&14)===14&&this.addFormatting(y.pts,["i"]),(k&1)===1&&this.addFormatting(y.pts,["u"]);else if(this.isOffsetControlCode(E,k)){const P=k&3;this.nonDisplayed_[this.row_].offset=P,this.column_+=P}else if(this.isPAC(E,k)){var N=Du.indexOf(v&7968);if(this.mode_==="rollUp"&&(N-this.rollUpRows_+1<0&&(N=this.rollUpRows_-1),this.setRollUp(y.pts,N)),N!==this.row_&&N>=0&&N<=14&&(this.clearFormatting(y.pts),this.row_=N),k&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(y.pts,["u"]),(v&16)===16){const P=(v&14)>>1;this.column_=P*4,this.nonDisplayed_[this.row_].indent+=P}this.isColorPAC(k)&&(k&14)===14&&this.addFormatting(y.pts,["i"])}else this.isNormalChar(E)&&(k===0&&(k=null),M=Vr(E),M+=Vr(k),this[this.mode_](y.pts,M),this.column_+=M.length)}};Nt.prototype=new Hd,Nt.prototype.flushDisplayed=function(h){const g=v=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+v+"."})},y=[];this.displayed_.forEach((v,_)=>{if(v&&v.text&&v.text.length){try{v.text=v.text.trim()}catch{g(_)}v.text.length&&y.push({text:v.text,line:_+1,position:10+Math.min(70,v.indent*10)+v.offset*2.5})}else v==null&&g(_)}),y.length&&this.trigger("data",{startPts:this.startPts_,endPts:h,content:y,stream:this.name_})},Nt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=di(),this.nonDisplayed_=di(),this.lastControlCode_=null,this.column_=0,this.row_=Ho,this.rollUpRows_=2,this.formatting_=[]},Nt.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},Nt.prototype.isSpecialCharacter=function(h,g){return h===this.EXT_&&g>=48&&g<=63},Nt.prototype.isExtCharacter=function(h,g){return(h===this.EXT_+1||h===this.EXT_+2)&&g>=32&&g<=63},Nt.prototype.isMidRowCode=function(h,g){return h===this.EXT_&&g>=32&&g<=47},Nt.prototype.isOffsetControlCode=function(h,g){return h===this.OFFSET_&&g>=33&&g<=35},Nt.prototype.isPAC=function(h,g){return h>=this.BASE_&&h<this.BASE_+8&&g>=64&&g<=127},Nt.prototype.isColorPAC=function(h){return h>=64&&h<=79||h>=96&&h<=127},Nt.prototype.isNormalChar=function(h){return h>=32&&h<=127},Nt.prototype.setRollUp=function(h,g){if(this.mode_!=="rollUp"&&(this.row_=Ho,this.mode_="rollUp",this.flushDisplayed(h),this.nonDisplayed_=di(),this.displayed_=di()),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},Nt.prototype.addFormatting=function(h,g){this.formatting_=this.formatting_.concat(g);var y=g.reduce(function(v,_){return v+"<"+_+">"},"");this[this.mode_](h,y)},Nt.prototype.clearFormatting=function(h){if(this.formatting_.length){var g=this.formatting_.reverse().reduce(function(y,v){return y+"</"+v+">"},"");this.formatting_=[],this[this.mode_](h,g)}},Nt.prototype.popOn=function(h,g){var y=this.nonDisplayed_[this.row_].text;y+=g,this.nonDisplayed_[this.row_].text=y},Nt.prototype.rollUp=function(h,g){var y=this.displayed_[this.row_].text;y+=g,this.displayed_[this.row_].text=y},Nt.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<Ho+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}},Nt.prototype.paintOn=function(h,g){var y=this.displayed_[this.row_].text;y+=g,this.displayed_[this.row_].text=y};var ku={CaptionStream:Li,Cea608Stream:Nt,Cea708Stream:Et},jo={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},jd=i,Fp=8589934592,Hp=4294967296,$r="shared",Ou=function(h,g){var y=1;for(h>g&&(y=-1);Math.abs(g-h)>Hp;)h+=y*Fp;return h},Ru=function(h){var g,y;Ru.prototype.init.call(this),this.type_=h||$r,this.push=function(v){if(v.type==="metadata"){this.trigger("data",v);return}this.type_!==$r&&v.type!==this.type_||(y===void 0&&(y=v.dts),v.dts=Ou(v.dts,y),v.pts=Ou(v.pts,y),g=v.dts,this.trigger("data",v))},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")}};Ru.prototype=new jd;var zd={TimestampRolloverStream:Ru,handleRollover:Ou},jp=(h,g,y)=>{if(!h)return-1;for(var v=y;v<h.length;v++)if(h[v]===g)return v;return-1},zp={typedArrayIndexOf:jp},wi=zp.typedArrayIndexOf,As={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},nr=function(h,g,y){var v,_="";for(v=g;v<y;v++)_+="%"+("00"+h[v].toString(16)).slice(-2);return _},qa=function(h,g,y){return decodeURIComponent(nr(h,g,y))},Ds=function(h,g,y){return unescape(nr(h,g,y))},sr=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},Gr={APIC:function(h){var g=1,y,v,_="-->";h.data[0]===As.Utf8&&(y=wi(h.data,0,g),!(y<0)&&(h.mimeType=Ds(h.data,g,y),g=y+1,h.pictureType=h.data[g],g++,v=wi(h.data,0,g),!(v<0)&&(h.description=qa(h.data,g,v),g=v+1,h.mimeType===_?h.url=Ds(h.data,g,h.data.length):h.pictureData=h.data.subarray(g,h.data.length))))},"T*":function(h){h.data[0]===As.Utf8&&(h.value=qa(h.data,1,h.data.length).replace(/\0*$/,""),h.values=h.value.split("\0"))},TXXX:function(h){var g;h.data[0]===As.Utf8&&(g=wi(h.data,0,1),g!==-1&&(h.description=qa(h.data,1,g),h.value=qa(h.data,g+1,h.data.length).replace(/\0*$/,""),h.data=h.value))},"W*":function(h){h.url=Ds(h.data,0,h.data.length).replace(/\0.*$/,"")},WXXX:function(h){var g;h.data[0]===As.Utf8&&(g=wi(h.data,0,1),g!==-1&&(h.description=qa(h.data,1,g),h.url=Ds(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=Ds(h.data,0,g);break}h.privateData=h.data.subarray(g+1),h.data=h.privateData}},zo=function(h){var g,y,v=10,_=0,E=[];if(!(h.length<10||h[0]!=="I".charCodeAt(0)||h[1]!=="D".charCodeAt(0)||h[2]!=="3".charCodeAt(0))){_=sr(h.subarray(6,10)),_+=10;var k=h[5]&64;k&&(v+=4,v+=sr(h.subarray(10,14)),_-=sr(h.subarray(16,20)));do{if(g=sr(h.subarray(v+4,v+8)),g<1)break;y=String.fromCharCode(h[v],h[v+1],h[v+2],h[v+3]);var M={id:y,data:h.subarray(v+10,v+g+10)};M.key=M.id,Gr[M.id]?Gr[M.id](M):M.id[0]==="T"?Gr["T*"](M):M.id[0]==="W"&&Gr["W*"](M),E.push(M),v+=10,v+=g}while(v<_);return E}},Yr={parseId3Frames:zo,parseSyncSafeInteger:sr,frameParsers:Gr},Vd=i,zy=jo,rr=Yr,Vo;Vo=function(h){var g={descriptor:h&&h.descriptor},y=0,v=[],_=0,E;if(Vo.prototype.init.call(this),this.dispatchType=zy.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(k){var M,N,P,z,ie,Te;if(k.type==="timed-metadata"){if(k.dataAlignmentIndicator&&(_=0,v.length=0),v.length===0&&(k.data.length<10||k.data[0]!=="I".charCodeAt(0)||k.data[1]!=="D".charCodeAt(0)||k.data[2]!=="3".charCodeAt(0))){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(v.push(k),_+=k.data.byteLength,v.length===1&&(y=rr.parseSyncSafeInteger(k.data.subarray(6,10)),y+=10),!(_<y)){for(M={data:new Uint8Array(y),frames:[],pts:v[0].pts,dts:v[0].dts},ie=0;ie<y;)M.data.set(v[0].data.subarray(0,y-ie),ie),ie+=v[0].data.byteLength,_-=v[0].data.byteLength,v.shift();N=10,M.data[5]&64&&(N+=4,N+=rr.parseSyncSafeInteger(M.data.subarray(10,14)),y-=rr.parseSyncSafeInteger(M.data.subarray(16,20)));do{if(P=rr.parseSyncSafeInteger(M.data.subarray(N+4,N+8)),P<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(Te=String.fromCharCode(M.data[N],M.data[N+1],M.data[N+2],M.data[N+3]),z={id:Te,data:M.data.subarray(N+10,N+P+10)},z.key=z.id,rr.frameParsers[z.id]?rr.frameParsers[z.id](z):z.id[0]==="T"?rr.frameParsers["T*"](z):z.id[0]==="W"&&rr.frameParsers["W*"](z),z.owner==="com.apple.streaming.transportStreamTimestamp"){var ue=z.data,qe=(ue[3]&1)<<30|ue[4]<<22|ue[5]<<14|ue[6]<<6|ue[7]>>>2;qe*=4,qe+=ue[7]&3,z.timeStamp=qe,M.pts===void 0&&M.dts===void 0&&(M.pts=z.timeStamp,M.dts=z.timeStamp),this.trigger("timestamp",z)}M.frames.push(z),N+=10,N+=P}while(N<y);this.trigger("data",M)}}}},Vo.prototype=new Vd;var $d=Vo,$o=i,Mu=ku,Cn=jo,Vp=zd.TimestampRolloverStream,Lu,Fa,Ha,ks=188,Xr=71;Lu=function(){var h=new Uint8Array(ks),g=0;Lu.prototype.init.call(this),this.push=function(y){var v=0,_=ks,E;for(g?(E=new Uint8Array(y.byteLength+g),E.set(h.subarray(0,g)),E.set(y,g),g=0):E=y;_<E.byteLength;){if(E[v]===Xr&&E[_]===Xr){this.trigger("data",E.subarray(v,_)),v+=ks,_+=ks;continue}v++,_++}v<E.byteLength&&(h.set(E.subarray(v),0),g=E.byteLength-v)},this.flush=function(){g===ks&&h[0]===Xr&&(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")}},Lu.prototype=new $o,Fa=function(){var h,g,y,v;Fa.prototype.init.call(this),v=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,h=function(_,E){var k=0;E.payloadUnitStartIndicator&&(k+=_[k]+1),E.type==="pat"?g(_.subarray(k),E):y(_.subarray(k),E)},g=function(_,E){E.section_number=_[7],E.last_section_number=_[8],v.pmtPid=(_[10]&31)<<8|_[11],E.pmtPid=v.pmtPid},y=function(_,E){var k,M,N,P;if(_[5]&1){for(v.programMapTable={video:null,audio:null,"timed-metadata":{}},k=(_[1]&15)<<8|_[2],M=3+k-4,N=(_[10]&15)<<8|_[11],P=12+N;P<M;){var z=_[P],ie=(_[P+1]&31)<<8|_[P+2];z===Cn.H264_STREAM_TYPE&&v.programMapTable.video===null?v.programMapTable.video=ie:z===Cn.ADTS_STREAM_TYPE&&v.programMapTable.audio===null?v.programMapTable.audio=ie:z===Cn.METADATA_STREAM_TYPE&&(v.programMapTable["timed-metadata"][ie]=z),P+=((_[P+3]&15)<<8|_[P+4])+5}E.programMapTable=v.programMapTable}},this.push=function(_){var E={},k=4;if(E.payloadUnitStartIndicator=!!(_[1]&64),E.pid=_[1]&31,E.pid<<=8,E.pid|=_[2],(_[3]&48)>>>4>1&&(k+=_[k]+1),E.pid===0)E.type="pat",h(_.subarray(k),E),this.trigger("data",E);else if(E.pid===this.pmtPid)for(E.type="pmt",h(_.subarray(k),E),this.trigger("data",E);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([_,k,E]):this.processPes_(_,k,E)},this.processPes_=function(_,E,k){k.pid===this.programMapTable.video?k.streamType=Cn.H264_STREAM_TYPE:k.pid===this.programMapTable.audio?k.streamType=Cn.ADTS_STREAM_TYPE:k.streamType=this.programMapTable["timed-metadata"][k.pid],k.type="pes",k.data=_.subarray(E),this.trigger("data",k)}},Fa.prototype=new $o,Fa.STREAM_TYPES={h264:27,adts:15},Ha=function(){var h=this,g=!1,y={data:[],size:0},v={data:[],size:0},_={data:[],size:0},E,k=function(N,P){var z;const ie=N[0]<<16|N[1]<<8|N[2];P.data=new Uint8Array,ie===1&&(P.packetLength=6+(N[4]<<8|N[5]),P.dataAlignmentIndicator=(N[6]&4)!==0,z=N[7],z&192&&(P.pts=(N[9]&14)<<27|(N[10]&255)<<20|(N[11]&254)<<12|(N[12]&255)<<5|(N[13]&254)>>>3,P.pts*=4,P.pts+=(N[13]&6)>>>1,P.dts=P.pts,z&64&&(P.dts=(N[14]&14)<<27|(N[15]&255)<<20|(N[16]&254)<<12|(N[17]&255)<<5|(N[18]&254)>>>3,P.dts*=4,P.dts+=(N[18]&6)>>>1)),P.data=N.subarray(9+N[8]))},M=function(N,P,z){var ie=new Uint8Array(N.size),Te={type:P},ue=0,qe=0,je=!1,Jt;if(!(!N.data.length||N.size<9)){for(Te.trackId=N.data[0].pid,ue=0;ue<N.data.length;ue++)Jt=N.data[ue],ie.set(Jt.data,qe),qe+=Jt.data.byteLength;k(ie,Te),je=P==="video"||Te.packetLength<=N.size,(z||je)&&(N.size=0,N.data.length=0),je&&h.trigger("data",Te)}};Ha.prototype.init.call(this),this.push=function(N){({pat:function(){},pes:function(){var P,z;switch(N.streamType){case Cn.H264_STREAM_TYPE:P=y,z="video";break;case Cn.ADTS_STREAM_TYPE:P=v,z="audio";break;case Cn.METADATA_STREAM_TYPE:P=_,z="timed-metadata";break;default:return}N.payloadUnitStartIndicator&&M(P,z,!0),P.data.push(N),P.size+=N.data.byteLength},pmt:function(){var P={type:"metadata",tracks:[]};E=N.programMapTable,E.video!==null&&P.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.video,codec:"avc",type:"video"}),E.audio!==null&&P.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.audio,codec:"adts",type:"audio"}),g=!0,h.trigger("data",P)}})[N.type]()},this.reset=function(){y.size=0,y.data.length=0,v.size=0,v.data.length=0,this.trigger("reset")},this.flushStreams_=function(){M(y,"video"),M(v,"audio"),M(_,"timed-metadata")},this.flush=function(){if(!g&&E){var N={type:"metadata",tracks:[]};E.video!==null&&N.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.video,codec:"avc",type:"video"}),E.audio!==null&&N.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.audio,codec:"adts",type:"audio"}),h.trigger("data",N)}g=!1,this.flushStreams_(),this.trigger("done")}},Ha.prototype=new $o;var $p={PAT_PID:0,MP2T_PACKET_LENGTH:ks,TransportPacketStream:Lu,TransportParseStream:Fa,ElementaryStream:Ha,TimestampRolloverStream:Vp,CaptionStream:Mu.CaptionStream,Cea608Stream:Mu.Cea608Stream,Cea708Stream:Mu.Cea708Stream,MetadataStream:$d};for(var Iu in Cn)Cn.hasOwnProperty(Iu)&&($p[Iu]=Cn[Iu]);var Gp=$p,Go=i,Yp=gt.ONE_SECOND_IN_TS,Nu,Xp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Nu=function(h){var g,y=0;Nu.prototype.init.call(this),this.skipWarn_=function(v,_){this.trigger("log",{level:"warn",message:`adts skiping bytes ${v} to ${_} in frame ${y} outside syncword`})},this.push=function(v){var _=0,E,k,M,N,P;if(h||(y=0),v.type==="audio"){g&&g.length?(M=g,g=new Uint8Array(M.byteLength+v.data.byteLength),g.set(M),g.set(v.data,M.byteLength)):g=v.data;for(var z;_+7<g.length;){if(g[_]!==255||(g[_+1]&246)!==240){typeof z!="number"&&(z=_),_++;continue}if(typeof z=="number"&&(this.skipWarn_(z,_),z=null),k=(~g[_+1]&1)*2,E=(g[_+3]&3)<<11|g[_+4]<<3|(g[_+5]&224)>>5,N=((g[_+6]&3)+1)*1024,P=N*Yp/Xp[(g[_+2]&60)>>>2],g.byteLength-_<E)break;this.trigger("data",{pts:v.pts+y*P,dts:v.dts+y*P,sampleCount:N,audioobjecttype:(g[_+2]>>>6&3)+1,channelcount:(g[_+2]&1)<<2|(g[_+3]&192)>>>6,samplerate:Xp[(g[_+2]&60)>>>2],samplingfrequencyindex:(g[_+2]&60)>>>2,samplesize:16,data:g.subarray(_+7+k,_+E)}),y++,_+=E}typeof z=="number"&&(this.skipWarn_(z,_),z=null),g=g.subarray(_)}},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")}},Nu.prototype=new Go;var Vy=Nu,Wp;Wp=function(h){var g=h.byteLength,y=0,v=0;this.length=function(){return 8*g},this.bitsAvailable=function(){return 8*g+v},this.loadWord=function(){var _=h.byteLength-g,E=new Uint8Array(4),k=Math.min(4,g);if(k===0)throw new Error("no bytes available");E.set(h.subarray(_,_+k)),y=new DataView(E.buffer).getUint32(0),v=k*8,g-=k},this.skipBits=function(_){var E;v>_?(y<<=_,v-=_):(_-=v,E=Math.floor(_/8),_-=E*8,g-=E,this.loadWord(),y<<=_,v-=_)},this.readBits=function(_){var E=Math.min(v,_),k=y>>>32-E;return v-=E,v>0?y<<=E:g>0&&this.loadWord(),E=_-E,E>0?k<<E|this.readBits(E):k},this.skipLeadingZeros=function(){var _;for(_=0;_<v;++_)if(y&2147483648>>>_)return y<<=_,v-=_,_;return this.loadWord(),_+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var _=this.skipLeadingZeros();return this.readBits(_+1)-1},this.readExpGolomb=function(){var _=this.readUnsignedExpGolomb();return 1&_?1+_>>>1:-1*(_>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Yo=Wp,Pu=i,Qp=Yo,Xo,Os,Gd;Os=function(){var h=0,g,y;Os.prototype.init.call(this),this.push=function(v){var _;y?(_=new Uint8Array(y.byteLength+v.data.byteLength),_.set(y),_.set(v.data,y.byteLength),y=_):y=v.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")}},Os.prototype=new Pu,Gd={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Xo=function(){var h=new Os,g,y,v,_,E,k,M;Xo.prototype.init.call(this),g=this,this.push=function(N){N.type==="video"&&(y=N.trackId,v=N.pts,_=N.dts,h.push(N))},h.on("data",function(N){var P={trackId:y,pts:v,dts:_,data:N,nalUnitTypeCode:N[0]&31};switch(P.nalUnitTypeCode){case 5:P.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:P.nalUnitType="sei_rbsp",P.escapedRBSP=E(N.subarray(1));break;case 7:P.nalUnitType="seq_parameter_set_rbsp",P.escapedRBSP=E(N.subarray(1)),P.config=k(P.escapedRBSP);break;case 8:P.nalUnitType="pic_parameter_set_rbsp";break;case 9:P.nalUnitType="access_unit_delimiter_rbsp";break}g.trigger("data",P)}),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()},M=function(N,P){var z=8,ie=8,Te,ue;for(Te=0;Te<N;Te++)ie!==0&&(ue=P.readExpGolomb(),ie=(z+ue+256)%256),z=ie===0?z:ie},E=function(N){for(var P=N.byteLength,z=[],ie=1,Te,ue;ie<P-2;)N[ie]===0&&N[ie+1]===0&&N[ie+2]===3?(z.push(ie+2),ie+=2):ie++;if(z.length===0)return N;Te=P-z.length,ue=new Uint8Array(Te);var qe=0;for(ie=0;ie<Te;qe++,ie++)qe===z[0]&&(qe++,z.shift()),ue[ie]=N[qe];return ue},k=function(N){var P=0,z=0,ie=0,Te=0,ue,qe,je,Jt,Ai,os,gr,na,Qa,Ka,Za,Rt=[1,1],Ja,on;if(ue=new Qp(N),qe=ue.readUnsignedByte(),Jt=ue.readUnsignedByte(),je=ue.readUnsignedByte(),ue.skipUnsignedExpGolomb(),Gd[qe]&&(Ai=ue.readUnsignedExpGolomb(),Ai===3&&ue.skipBits(1),ue.skipUnsignedExpGolomb(),ue.skipUnsignedExpGolomb(),ue.skipBits(1),ue.readBoolean()))for(Za=Ai!==3?8:12,on=0;on<Za;on++)ue.readBoolean()&&(on<6?M(16,ue):M(64,ue));if(ue.skipUnsignedExpGolomb(),os=ue.readUnsignedExpGolomb(),os===0)ue.readUnsignedExpGolomb();else if(os===1)for(ue.skipBits(1),ue.skipExpGolomb(),ue.skipExpGolomb(),gr=ue.readUnsignedExpGolomb(),on=0;on<gr;on++)ue.skipExpGolomb();if(ue.skipUnsignedExpGolomb(),ue.skipBits(1),na=ue.readUnsignedExpGolomb(),Qa=ue.readUnsignedExpGolomb(),Ka=ue.readBits(1),Ka===0&&ue.skipBits(1),ue.skipBits(1),ue.readBoolean()&&(P=ue.readUnsignedExpGolomb(),z=ue.readUnsignedExpGolomb(),ie=ue.readUnsignedExpGolomb(),Te=ue.readUnsignedExpGolomb()),ue.readBoolean()&&ue.readBoolean()){switch(Ja=ue.readUnsignedByte(),Ja){case 1:Rt=[1,1];break;case 2:Rt=[12,11];break;case 3:Rt=[10,11];break;case 4:Rt=[16,11];break;case 5:Rt=[40,33];break;case 6:Rt=[24,11];break;case 7:Rt=[20,11];break;case 8:Rt=[32,11];break;case 9:Rt=[80,33];break;case 10:Rt=[18,11];break;case 11:Rt=[15,11];break;case 12:Rt=[64,33];break;case 13:Rt=[160,99];break;case 14:Rt=[4,3];break;case 15:Rt=[3,2];break;case 16:Rt=[2,1];break;case 255:{Rt=[ue.readUnsignedByte()<<8|ue.readUnsignedByte(),ue.readUnsignedByte()<<8|ue.readUnsignedByte()];break}}Rt&&Rt[0]/Rt[1]}return{profileIdc:qe,levelIdc:je,profileCompatibility:Jt,width:(na+1)*16-P*2-z*2,height:(2-Ka)*(Qa+1)*16-ie*2-Te*2,sarRatio:Rt}}},Xo.prototype=new Pu;var Bu={H264Stream:Xo,NalByteStream:Os},Uu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Yd=function(h,g){var y=h[g+6]<<21|h[g+7]<<14|h[g+8]<<7|h[g+9],v=h[g+5],_=(v&16)>>4;return y=y>=0?y:0,_?y+20:y+10},Ni=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+=Yd(h,g),Ni(h,g))},$y=function(h){var g=Ni(h,0);return h.length>=g+2&&(h[g]&255)===255&&(h[g+1]&240)===240&&(h[g+1]&22)===16},qu=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},Kp=function(h,g,y){var v,_="";for(v=g;v<y;v++)_+="%"+("00"+h[v].toString(16)).slice(-2);return _},Zp=function(h,g,y){return unescape(Kp(h,g,y))},Gy=function(h,g){var y=(h[g+5]&224)>>5,v=h[g+4]<<3,_=h[g+3]&6144;return _|v|y},Yy=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},Xy=function(h){var g,y,v,_;g=10,h[5]&64&&(g+=4,g+=qu(h.subarray(10,14)));do{if(y=qu(h.subarray(g+4,g+8)),y<1)return null;if(_=String.fromCharCode(h[g],h[g+1],h[g+2],h[g+3]),_==="PRIV"){v=h.subarray(g+10,g+y+10);for(var E=0;E<v.byteLength;E++)if(v[E]===0){var k=Zp(v,0,E);if(k==="com.apple.streaming.transportStreamTimestamp"){var M=v.subarray(E+1),N=(M[3]&1)<<30|M[4]<<22|M[5]<<14|M[6]<<6|M[7]>>>2;return N*=4,N+=M[7]&3,N}break}}g+=10,g+=y}while(g<h.byteLength);return null},Fu={isLikelyAacData:$y,parseId3TagSize:Yd,parseAdtsSize:Gy,parseType:Yy,parseSampleRate:Jp,parseAacTimestamp:Xy},Wy=i,Wo=Fu,Qo;Qo=function(){var h=new Uint8Array,g=0;Qo.prototype.init.call(this),this.setTimestamp=function(y){g=y},this.push=function(y){var v=0,_=0,E,k,M,N;for(h.length?(N=h.length,h=new Uint8Array(y.byteLength+N),h.set(h.subarray(0,N)),h.set(y,N)):h=y;h.length-_>=3;){if(h[_]==="I".charCodeAt(0)&&h[_+1]==="D".charCodeAt(0)&&h[_+2]==="3".charCodeAt(0)){if(h.length-_<10||(v=Wo.parseId3TagSize(h,_),_+v>h.length))break;k={type:"timed-metadata",data:h.subarray(_,_+v)},this.trigger("data",k),_+=v;continue}else if((h[_]&255)===255&&(h[_+1]&240)===240){if(h.length-_<7||(v=Wo.parseAdtsSize(h,_),_+v>h.length))break;M={type:"audio",data:h.subarray(_,_+v),pts:g,dts:g},this.trigger("data",M),_+=v;continue}_++}E=h.length-_,E>0?h=h.subarray(_):h=new Uint8Array},this.reset=function(){h=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){h=new Uint8Array,this.trigger("endedtimeline")}},Qo.prototype=new Wy;var em=Qo,tm=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Qy=tm,Ky=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Zy=Ky,Hu=i,Ko=Me,Rs=Ot,Zo=Ee,wn=Ye,ss=Gp,Jo=gt,ju=Vy,im=Bu.H264Stream,Wr=em,Qr=Fu.isLikelyAacData,Hn=gt.ONE_SECOND_IN_TS,Pi=Qy,ja=Zy,ar,or,mi,lr,zu=function(h,g){g.stream=h,this.trigger("log",g)},ur=function(h,g){for(var y=Object.keys(g),v=0;v<y.length;v++){var _=y[v];_==="headOfPipeline"||!g[_].on||g[_].on("log",zu.bind(h,_))}},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,v,_,E){var k=y-g,M=v-g,N=_-y;return{start:{dts:h,pts:h+k},end:{dts:h+M,pts:h+N},prependedContentDuration:E,baseMediaDecodeTime:h}};or=function(h,g){var y=[],v,_=0,E=0,k=1/0;g=g||{},v=g.firstSequenceNumber||0,or.prototype.init.call(this),this.push=function(M){wn.collectDtsInfo(h,M),h&&Pi.forEach(function(N){h[N]=M[N]}),y.push(M)},this.setEarliestDts=function(M){_=M},this.setVideoBaseMediaDecodeTime=function(M){k=M},this.setAudioAppendStart=function(M){E=M},this.flush=function(){var M,N,P,z,ie,Te,ue;if(y.length===0){this.trigger("done","AudioSegmentStream");return}M=Zo.trimAdtsFramesByEarliestDts(y,h,_),h.baseMediaDecodeTime=wn.calculateTrackBaseMediaDecodeTime(h,g.keepOriginalTimestamps),ue=Zo.prefixWithSilence(h,M,E,k),h.samples=Zo.generateSampleTable(M),P=Ko.mdat(Zo.concatenateFrameData(M)),y=[],N=Ko.moof(v,[h]),z=new Uint8Array(N.byteLength+P.byteLength),v++,z.set(N),z.set(P,N.byteLength),wn.clearDtsInfo(h),ie=Math.ceil(Hn*1024/h.samplerate),M.length&&(Te=M.length*ie,this.trigger("segmentTimingInfo",$u(Jo.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),M[0].dts,M[0].pts,M[0].dts+Te,M[0].pts+Te,ue||0)),this.trigger("timingInfo",{start:M[0].pts,end:M[0].pts+Te})),this.trigger("data",{track:h,boxes:z}),this.trigger("done","AudioSegmentStream")},this.reset=function(){wn.clearDtsInfo(h),y=[],this.trigger("reset")}},or.prototype=new Hu,ar=function(h,g){var y,v=[],_=[],E,k;g=g||{},y=g.firstSequenceNumber||0,ar.prototype.init.call(this),delete h.minPTS,this.gopCache_=[],this.push=function(M){wn.collectDtsInfo(h,M),M.nalUnitType==="seq_parameter_set_rbsp"&&!E&&(E=M.config,h.sps=[M.data],ja.forEach(function(N){h[N]=E[N]},this)),M.nalUnitType==="pic_parameter_set_rbsp"&&!k&&(k=M.data,h.pps=[M.data]),v.push(M)},this.flush=function(){for(var M,N,P,z,ie,Te,ue=0,qe,je;v.length&&v[0].nalUnitType!=="access_unit_delimiter_rbsp";)v.shift();if(v.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(M=Rs.groupNalsIntoFrames(v),P=Rs.groupFramesIntoGops(M),P[0][0].keyFrame||(N=this.getGopForFusion_(v[0],h),N?(ue=N.duration,P.unshift(N),P.byteLength+=N.byteLength,P.nalCount+=N.nalCount,P.pts=N.pts,P.dts=N.dts,P.duration+=N.duration):P=Rs.extendFirstKeyFrame(P)),_.length){var Jt;if(g.alignGopsAtEnd?Jt=this.alignGopsAtEnd_(P):Jt=this.alignGopsAtStart_(P),!Jt){this.gopCache_.unshift({gop:P.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),v=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}wn.clearDtsInfo(h),P=Jt}wn.collectDtsInfo(h,P),h.samples=Rs.generateSampleTable(P),ie=Ko.mdat(Rs.concatenateNalData(P)),h.baseMediaDecodeTime=wn.calculateTrackBaseMediaDecodeTime(h,g.keepOriginalTimestamps),this.trigger("processedGopsInfo",P.map(function(Ai){return{pts:Ai.pts,dts:Ai.dts,byteLength:Ai.byteLength}})),qe=P[0],je=P[P.length-1],this.trigger("segmentTimingInfo",$u(h.baseMediaDecodeTime,qe.dts,qe.pts,je.dts+je.duration,je.pts+je.duration,ue)),this.trigger("timingInfo",{start:P[0].pts,end:P[P.length-1].pts+P[P.length-1].duration}),this.gopCache_.unshift({gop:P.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),v=[],this.trigger("baseMediaDecodeTime",h.baseMediaDecodeTime),this.trigger("timelineStartInfo",h.timelineStartInfo),z=Ko.moof(y,[h]),Te=new Uint8Array(z.byteLength+ie.byteLength),y++,Te.set(z),Te.set(ie,z.byteLength),this.trigger("data",{track:h,boxes:Te}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),v=[],this.gopCache_.length=0,_.length=0,this.trigger("reset")},this.resetStream_=function(){wn.clearDtsInfo(h),E=void 0,k=void 0},this.getGopForFusion_=function(M){var N=45e3,P=1e4,z=1/0,ie,Te,ue,qe,je;for(je=0;je<this.gopCache_.length;je++)qe=this.gopCache_[je],ue=qe.gop,!(!(h.pps&&Vu(h.pps[0],qe.pps[0]))||!(h.sps&&Vu(h.sps[0],qe.sps[0])))&&(ue.dts<h.timelineStartInfo.dts||(ie=M.dts-ue.dts-ue.duration,ie>=-P&&ie<=N&&(!Te||z>ie)&&(Te=qe,z=ie)));return Te?Te.gop:null},this.alignGopsAtStart_=function(M){var N,P,z,ie,Te,ue,qe,je;for(Te=M.byteLength,ue=M.nalCount,qe=M.duration,N=P=0;N<_.length&&P<M.length&&(z=_[N],ie=M[P],z.pts!==ie.pts);){if(ie.pts>z.pts){N++;continue}P++,Te-=ie.byteLength,ue-=ie.nalCount,qe-=ie.duration}return P===0?M:P===M.length?null:(je=M.slice(P),je.byteLength=Te,je.duration=qe,je.nalCount=ue,je.pts=je[0].pts,je.dts=je[0].dts,je)},this.alignGopsAtEnd_=function(M){var N,P,z,ie,Te,ue;for(N=_.length-1,P=M.length-1,Te=null,ue=!1;N>=0&&P>=0;){if(z=_[N],ie=M[P],z.pts===ie.pts){ue=!0;break}if(z.pts>ie.pts){N--;continue}N===_.length-1&&(Te=P),P--}if(!ue&&Te===null)return null;var qe;if(ue?qe=P:qe=Te,qe===0)return M;var je=M.slice(qe),Jt=je.reduce(function(Ai,os){return Ai.byteLength+=os.byteLength,Ai.duration+=os.duration,Ai.nalCount+=os.nalCount,Ai},{byteLength:0,duration:0,nalCount:0});return je.byteLength=Jt.byteLength,je.duration=Jt.duration,je.nalCount=Jt.nalCount,je.pts=je[0].pts,je.dts=je[0].dts,je},this.alignGopsWith=function(M){_=M}},ar.prototype=new Hu,lr=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,lr.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))}},lr.prototype=new Hu,lr.prototype.flush=function(h){var g=0,y={captions:[],captionStreams:{},metadata:[],info:{}},v,_,E,k=0,M;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?(k=this.videoTrack.timelineStartInfo.pts,ja.forEach(function(N){y.info[N]=this.videoTrack[N]},this)):this.audioTrack&&(k=this.audioTrack.timelineStartInfo.pts,Pi.forEach(function(N){y.info[N]=this.audioTrack[N]},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),M=0;M<this.pendingBoxes.length;M++)y.data.set(this.pendingBoxes[M],g),g+=this.pendingBoxes[M].byteLength;for(M=0;M<this.pendingCaptions.length;M++)v=this.pendingCaptions[M],v.startTime=Jo.metadataTsToSeconds(v.startPts,k,this.keepOriginalTimestamps),v.endTime=Jo.metadataTsToSeconds(v.endPts,k,this.keepOriginalTimestamps),y.captionStreams[v.stream]=!0,y.captions.push(v);for(M=0;M<this.pendingMetadata.length;M++)_=this.pendingMetadata[M],_.cueTime=Jo.metadataTsToSeconds(_.pts,k,this.keepOriginalTimestamps),y.metadata.push(_);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),M=0;M<y.captions.length;M++)v=y.captions[M],this.trigger("caption",v);for(M=0;M<y.metadata.length;M++)_=y.metadata[M],this.trigger("id3Frame",_)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},lr.prototype.setRemux=function(h){this.remuxTracks=h},mi=function(h){var g=this,y=!0,v,_;mi.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 ss.MetadataStream,E.aacStream=new Wr,E.audioTimestampRolloverStream=new ss.TimestampRolloverStream("audio"),E.timedMetadataTimestampRolloverStream=new ss.TimestampRolloverStream("timed-metadata"),E.adtsStream=new ju,E.coalesceStream=new lr(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(k){E.aacStream.setTimestamp(k.timeStamp)}),E.aacStream.on("data",function(k){k.type!=="timed-metadata"&&k.type!=="audio"||E.audioSegmentStream||(_=_||{timelineStartInfo:{baseMediaDecodeTime:g.baseMediaDecodeTime},codec:"adts",type:"audio"},E.coalesceStream.numberOfTracks++,E.audioSegmentStream=new or(_,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:!!_,hasVideo:!!v}))}),E.coalesceStream.on("data",this.trigger.bind(this,"data")),E.coalesceStream.on("done",this.trigger.bind(this,"done")),ur(this,E)},this.setupTsPipeline=function(){var E={};this.transmuxPipeline_=E,E.type="ts",E.metadataStream=new ss.MetadataStream,E.packetStream=new ss.TransportPacketStream,E.parseStream=new ss.TransportParseStream,E.elementaryStream=new ss.ElementaryStream,E.timestampRolloverStream=new ss.TimestampRolloverStream,E.adtsStream=new ju,E.h264Stream=new im,E.captionStream=new ss.CaptionStream(h),E.coalesceStream=new lr(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(k){var M;if(k.type==="metadata"){for(M=k.tracks.length;M--;)!v&&k.tracks[M].type==="video"?(v=k.tracks[M],v.timelineStartInfo.baseMediaDecodeTime=g.baseMediaDecodeTime):!_&&k.tracks[M].type==="audio"&&(_=k.tracks[M],_.timelineStartInfo.baseMediaDecodeTime=g.baseMediaDecodeTime);v&&!E.videoSegmentStream&&(E.coalesceStream.numberOfTracks++,E.videoSegmentStream=new ar(v,h),E.videoSegmentStream.on("log",g.getLogTrigger_("videoSegmentStream")),E.videoSegmentStream.on("timelineStartInfo",function(N){_&&!h.keepOriginalTimestamps&&(_.timelineStartInfo=N,E.audioSegmentStream.setEarliestDts(N.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(N){_&&E.audioSegmentStream.setVideoBaseMediaDecodeTime(N)}),E.videoSegmentStream.on("timingInfo",g.trigger.bind(g,"videoTimingInfo")),E.h264Stream.pipe(E.videoSegmentStream).pipe(E.coalesceStream)),_&&!E.audioSegmentStream&&(E.coalesceStream.numberOfTracks++,E.audioSegmentStream=new or(_,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:!!_,hasVideo:!!v})}}),E.coalesceStream.on("data",this.trigger.bind(this,"data")),E.coalesceStream.on("id3Frame",function(k){k.dispatchType=E.metadataStream.dispatchType,g.trigger("id3Frame",k)}),E.coalesceStream.on("caption",this.trigger.bind(this,"caption")),E.coalesceStream.on("done",this.trigger.bind(this,"done")),ur(this,E)},this.setBaseMediaDecodeTime=function(E){var k=this.transmuxPipeline_;h.keepOriginalTimestamps||(this.baseMediaDecodeTime=E),_&&(_.timelineStartInfo.dts=void 0,_.timelineStartInfo.pts=void 0,wn.clearDtsInfo(_),k.audioTimestampRolloverStream&&k.audioTimestampRolloverStream.discontinuity()),v&&(k.videoSegmentStream&&(k.videoSegmentStream.gopCache_=[]),v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,wn.clearDtsInfo(v),k.captionStream.reset()),k.timestampRolloverStream&&k.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(E){_&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(E)},this.setRemux=function(E){var k=this.transmuxPipeline_;h.remux=E,k&&k.coalesceStream&&k.coalesceStream.setRemux(E)},this.alignGopsWith=function(E){v&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(E)},this.getLogTrigger_=function(E){var k=this;return function(M){M.stream=E,k.trigger("log",M)}},this.push=function(E){if(y){var k=Qr(E);k&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!k&&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()}},mi.prototype=new Hu;var nm={Transmuxer:mi,VideoSegmentStream:ar,AudioSegmentStream:or,AUDIO_PROPERTIES:Pi,VIDEO_PROPERTIES:ja,generateSegmentTimingInfo:$u},Xd=function(h){return h>>>0},Jy=function(h){return("00"+h.toString(16)).slice(-2)},za={toUnsigned:Xd,toHexString:Jy},Ms=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},Gu=Ms,Wd=za.toUnsigned,Yu=Gu,cr=function(h,g){var y=[],v,_,E,k,M;if(!g.length)return null;for(v=0;v<h.byteLength;)_=Wd(h[v]<<24|h[v+1]<<16|h[v+2]<<8|h[v+3]),E=Yu(h.subarray(v+4,v+8)),k=_>1?v+_:h.byteLength,E===g[0]&&(g.length===1?y.push(h.subarray(v+8,k)):(M=cr(h.subarray(v+8,k),g.slice(1)),M.length&&(y=y.concat(M)))),v=k;return y},Va=cr,Qd=za.toUnsigned,Kr=u.getUint64,sm=function(h){var g={version:h[0],flags:new Uint8Array(h.subarray(1,4))};return g.version===1?g.baseMediaDecodeTime=Kr(h.subarray(4)):g.baseMediaDecodeTime=Qd(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)},v=y.flags[2]&1,_=y.flags[2]&2,E=y.flags[2]&8,k=y.flags[2]&16,M=y.flags[2]&32,N=y.flags[0]&65536,P=y.flags[0]&131072,z;return z=8,v&&(z+=4,y.baseDataOffset=g.getUint32(12),z+=4),_&&(y.sampleDescriptionIndex=g.getUint32(z),z+=4),E&&(y.defaultSampleDuration=g.getUint32(z),z+=4),k&&(y.defaultSampleSize=g.getUint32(z),z+=4),M&&(y.defaultSampleFlags=g.getUint32(z)),N&&(y.durationIsEmpty=!0),!v&&P&&(y.baseDataOffsetIsMoof=!0),y},Ls=Kd,dr=u.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)},v=12;y.version===0?(y.earliestPresentationTime=g.getUint32(v),y.firstOffset=g.getUint32(v+4),v+=8):(y.earliestPresentationTime=dr(h.subarray(v)),y.firstOffset=dr(h.subarray(v+8)),v+=16),v+=2;var _=g.getUint16(v);for(v+=2;_>0;v+=12,_--)y.references.push({referenceType:(h[v]&128)>>>7,referencedSize:g.getUint32(v)&2147483647,subsegmentDuration:g.getUint32(v+4),startsWithSap:!!(h[v+8]&128),sapType:(h[v+8]&112)>>>4,sapDeltaTime:g.getUint32(v+8)&268435455});return y},Zr=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),v=g.flags[2]&1,_=g.flags[2]&4,E=g.flags[1]&1,k=g.flags[1]&2,M=g.flags[1]&4,N=g.flags[1]&8,P=y.getUint32(4),z=8,ie;for(v&&(g.dataOffset=y.getInt32(z),z+=4),_&&P&&(ie={flags:$a(h.subarray(z,z+4))},z+=4,E&&(ie.duration=y.getUint32(z),z+=4),k&&(ie.size=y.getUint32(z),z+=4),N&&(g.version===1?ie.compositionTimeOffset=y.getInt32(z):ie.compositionTimeOffset=y.getUint32(z),z+=4),g.samples.push(ie),P--);P--;)ie={},E&&(ie.duration=y.getUint32(z),z+=4),k&&(ie.size=y.getUint32(z),z+=4),M&&(ie.flags=$a(h.subarray(z,z+4)),z+=4),N&&(g.version===1?ie.compositionTimeOffset=y.getInt32(z):ie.compositionTimeOffset=y.getUint32(z),z+=4),g.samples.push(ie);return g},Jd=tl,il=u,eh=il.getUint64,ri,rs,Zt=function(h){return new Date(h*1e3-20828448e5)},Jr=Gu,th=Va,nl=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=[],v,_;for(v=0;v+4<h.length;v+=_){if(_=g.getUint32(v),v+=4,_<=0){y.push("<span style='color:red;'>MALFORMED DATA</span>");continue}switch(h[v]&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[v]&31);break}}return y},jn={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:ri(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:[]},v=h[5]&31,_,E,k,M;for(k=6,M=0;M<v;M++)E=g.getUint16(k),k+=2,y.sps.push(new Uint8Array(h.subarray(k,k+E))),k+=E;for(_=h[k],k++,M=0;M<_;M++)E=g.getUint16(k),k+=2,y.pps.push(new Uint8Array(h.subarray(k,k+E))),k+=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:ri(g)}},elst:function(g){var y=new DataView(g.buffer,g.byteOffset,g.byteLength),v={version:y.getUint8(0),flags:new Uint8Array(g.subarray(1,4)),edits:[]},_=y.getUint32(4),E;for(E=8;_;_--)v.version===0?(v.edits.push({segmentDuration:y.getUint32(E),mediaTime:y.getInt32(E+4),mediaRate:y.getUint16(E+8)+y.getUint16(E+10)/(256*256)}),E+=12):(v.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 v},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:Jr(h.subarray(0,4)),minorVersion:g.getUint32(4),compatibleBrands:[]},v=8;v<h.byteLength;)y.compatibleBrands.push(Jr(h.subarray(v,v+4))),v+=4;return y},dinf:function(h){return{boxes:ri(h)}},dref:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),dataReferences:ri(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:Jr(h.subarray(8,12)),name:""},v=8;for(v=24;v<h.byteLength;v++){if(h[v]===0){v++;break}y.name+=String.fromCharCode(h[v])}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,v,_={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),language:""};return _.version===1?(y+=4,_.creationTime=Zt(g.getUint32(y)),y+=8,_.modificationTime=Zt(g.getUint32(y)),y+=4,_.timescale=g.getUint32(y),y+=8,_.duration=g.getUint32(y)):(_.creationTime=Zt(g.getUint32(y)),y+=4,_.modificationTime=Zt(g.getUint32(y)),y+=4,_.timescale=g.getUint32(y),y+=4,_.duration=g.getUint32(y)),y+=4,v=g.getUint16(y),_.language+=String.fromCharCode((v>>10)+96),_.language+=String.fromCharCode(((v&992)>>5)+96),_.language+=String.fromCharCode((v&31)+96),_},mdia:function(h){return{boxes:ri(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:ri(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=ri(h.subarray(28))[0]),y},moof:function(h){return{boxes:ri(h)}},moov:function(h){return{boxes:ri(h)}},mvex:function(h){return{boxes:ri(h)}},mvhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,v={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4))};return v.version===1?(y+=4,v.creationTime=Zt(g.getUint32(y)),y+=8,v.modificationTime=Zt(g.getUint32(y)),y+=4,v.timescale=g.getUint32(y),y+=8,v.duration=g.getUint32(y)):(v.creationTime=Zt(g.getUint32(y)),y+=4,v.modificationTime=Zt(g.getUint32(y)),y+=4,v.timescale=g.getUint32(y),y+=4,v.duration=g.getUint32(y)),y+=4,v.rate=g.getUint16(y)+g.getUint16(y+2)/16,y+=4,v.volume=g.getUint8(y)+g.getUint8(y+1)/8,y+=2,y+=2,y+=2*4,v.matrix=new Uint32Array(h.subarray(y,y+9*4)),y+=9*4,y+=6*4,v.nextTrackId=g.getUint32(y),v},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:Zr,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:ri(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:[]},v=g.getUint32(4),_;for(_=8;v;_+=8,v--)y.compositionOffsets.push({sampleCount:g.getUint32(_),sampleOffset:g[y.version===0?"getUint32":"getInt32"](_+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:[]},v=g.getUint32(4),_;for(_=8;v;_+=4,v--)y.syncSamples.push(g.getUint32(_));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:[]},v=g.getUint32(4),_;for(_=8;v;_+=4,v--)y.chunkOffsets.push(g.getUint32(_));return y},stsc:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=g.getUint32(4),v={version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleToChunks:[]},_;for(_=8;y;_+=12,y--)v.sampleToChunks.push({firstChunk:g.getUint32(_),samplesPerChunk:g.getUint32(_+4),sampleDescriptionIndex:g.getUint32(_+8)});return v},stsd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleDescriptions:ri(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:[]},v;for(v=12;v<h.byteLength;v+=4)y.entries.push(g.getUint32(v));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:[]},v=g.getUint32(4),_;for(_=8;v;_+=8,v--)y.timeToSamples.push({sampleCount:g.getUint32(_),sampleDelta:g.getUint32(_+4)});return y},styp:function(h){return jn.ftyp(h)},tfdt:el,tfhd:Ls,tkhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,v={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4))};return v.version===1?(y+=4,v.creationTime=Zt(g.getUint32(y)),y+=8,v.modificationTime=Zt(g.getUint32(y)),y+=4,v.trackId=g.getUint32(y),y+=4,y+=8,v.duration=g.getUint32(y)):(v.creationTime=Zt(g.getUint32(y)),y+=4,v.modificationTime=Zt(g.getUint32(y)),y+=4,v.trackId=g.getUint32(y),y+=4,y+=4,v.duration=g.getUint32(y)),y+=4,y+=2*4,v.layer=g.getUint16(y),y+=2,v.alternateGroup=g.getUint16(y),y+=2,v.volume=g.getUint8(y)+g.getUint8(y+1)/8,y+=2,y+=2,v.matrix=new Uint32Array(h.subarray(y,y+9*4)),y+=9*4,v.width=g.getUint16(y)+g.getUint16(y+2)/65536,y+=4,v.height=g.getUint16(y)+g.getUint16(y+2)/65536,v},traf:function(h){return{boxes:ri(h)}},trak:function(h){return{boxes:ri(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)])}}};ri=function(h){for(var g=0,y=[],v,_,E,k,M,N=new ArrayBuffer(h.length),P=new Uint8Array(N),z=0;z<h.length;++z)P[z]=h[z];for(v=new DataView(N);g<h.byteLength;)_=v.getUint32(g),E=Jr(h.subarray(g+4,g+8)),k=_>1?g+_:h.byteLength,M=(jn[E]||function(ie){return{data:ie}})(h.subarray(g+8,k)),M.size=_,M.type=E,y.push(M),g=k;return y},rs=function(h,g){var y;return g=g||0,y=new Array(g*2+1).join(" "),h.map(function(v,_){return y+v.type+`
`+Object.keys(v).filter(function(E){return E!=="type"&&E!=="boxes"}).map(function(E){var k=y+" "+E+": ",M=v[E];if(M instanceof Uint8Array||M instanceof Uint32Array){var N=Array.prototype.slice.call(new Uint8Array(M.buffer,M.byteOffset,M.byteLength)).map(function(P){return" "+("00"+P.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return N?N.length===1?k+"<"+N.join("").slice(1)+">":k+`<
`+N.map(function(P){return y+" "+P}).join(`
`)+`
`+y+" >":k+"<>"}return k+JSON.stringify(M,null,2).split(`
`).map(function(P,z){return z===0?P:y+" "+P}).join(`
`)}).join(`
`)+(v.boxes?`
`+rs(v.boxes,g+1):"")}).join(`
`)};var hr={inspect:ri,textify:rs,parseType:Jr,findBox:th,parseTraf:jn.traf,parseTfdt:jn.tfdt,parseHdlr:jn.hdlr,parseTfhd:jn.tfhd,parseTrun:jn.trun,parseSidx:jn.sidx},qt=function(h){for(var g=0,y=String.fromCharCode(h[g]),v="";y!=="\0";)v+=y,g++,y=String.fromCharCode(h[g]);return v+=y,v},Xu={uint8ToCString:qt},sl=Xu.uint8ToCString,ih=u.getUint64,ea=function(h){var g=4,y=h[0],v,_,E,k,M,N,P,z;if(y===0){v=sl(h.subarray(g)),g+=v.length,_=sl(h.subarray(g)),g+=_.length;var ie=new DataView(h.buffer);E=ie.getUint32(g),g+=4,M=ie.getUint32(g),g+=4,N=ie.getUint32(g),g+=4,P=ie.getUint32(g),g+=4}else if(y===1){var ie=new DataView(h.buffer);E=ie.getUint32(g),g+=4,k=ih(h.subarray(g)),g+=8,N=ie.getUint32(g),g+=4,P=ie.getUint32(g),g+=4,v=sl(h.subarray(g)),g+=v.length,_=sl(h.subarray(g)),g+=_.length}z=new Uint8Array(h.subarray(g,h.byteLength));var Te={scheme_id_uri:v,value:_,timescale:E||1,presentation_time:k,presentation_time_delta:M,event_duration:N,id:P,message_data:z};return Is(y,Te)?Te:void 0},rl=function(h,g,y,v){return h||h===0?h/g:v+y/g},Is=function(h,g){var y=g.scheme_id_uri!=="\0",v=h===0&&al(g.presentation_time_delta)&&y,_=h===1&&al(g.presentation_time)&&y;return!(h>1)&&v||_},al=function(h){return h!==void 0||h!==null},ol={parseEmsgBox:ea,scaleTime:rl},ta;typeof window<"u"?ta=window:typeof s<"u"?ta=s:typeof self<"u"?ta=self:ta={};var Wu=ta,ll=za.toUnsigned,Qi=za.toHexString,yt=Va,Ns=Gu,nh=ol,om=Ls,ev=Jd,sh=el,Qu=u.getUint64,rh,ah,oh,ul,lh,Ku,uh,cl=Wu,ch=Yr.parseId3Frames;rh=function(h){var g={},y=yt(h,["moov","trak"]);return y.reduce(function(v,_){var E,k,M,N,P;return E=yt(_,["tkhd"])[0],!E||(k=E[0],M=k===0?12:20,N=ll(E[M]<<24|E[M+1]<<16|E[M+2]<<8|E[M+3]),P=yt(_,["mdia","mdhd"])[0],!P)?null:(k=P[0],M=k===0?12:20,v[N]=ll(P[M]<<24|P[M+1]<<16|P[M+2]<<8|P[M+3]),v)},g)},ah=function(h,g){var y;y=yt(g,["moof","traf"]);var v=y.reduce(function(_,E){var k=yt(E,["tfhd"])[0],M=ll(k[4]<<24|k[5]<<16|k[6]<<8|k[7]),N=h[M]||9e4,P=yt(E,["tfdt"])[0],z=new DataView(P.buffer,P.byteOffset,P.byteLength),ie;P[0]===1?ie=Qu(P.subarray(4,12)):ie=z.getUint32(4);let Te;return typeof ie=="bigint"?Te=ie/cl.BigInt(N):typeof ie=="number"&&!isNaN(ie)&&(Te=ie/N),Te<Number.MAX_SAFE_INTEGER&&(Te=Number(Te)),Te<_&&(_=Te),_},1/0);return typeof v=="bigint"||isFinite(v)?v:0},oh=function(h,g){var y=yt(g,["moof","traf"]),v=0,_=0,E;if(y&&y.length){var k=yt(y[0],["tfhd"])[0],M=yt(y[0],["trun"])[0],N=yt(y[0],["tfdt"])[0];if(k){var P=om(k);E=P.trackId}if(N){var z=sh(N);v=z.baseMediaDecodeTime}if(M){var ie=ev(M);ie.samples&&ie.samples.length&&(_=ie.samples[0].compositionTimeOffset||0)}}var Te=h[E]||9e4;typeof v=="bigint"&&(_=cl.BigInt(_),Te=cl.BigInt(Te));var ue=(v+_)/Te;return typeof ue=="bigint"&&ue<Number.MAX_SAFE_INTEGER&&(ue=Number(ue)),ue},ul=function(h){var g=yt(h,["moov","trak"]),y=[];return g.forEach(function(v){var _=yt(v,["mdia","hdlr"]),E=yt(v,["tkhd"]);_.forEach(function(k,M){var N=Ns(k.subarray(8,12)),P=E[M],z,ie,Te;N==="vide"&&(z=new DataView(P.buffer,P.byteOffset,P.byteLength),ie=z.getUint8(0),Te=ie===0?z.getUint32(12):z.getUint32(20),y.push(Te))})}),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=yt(h,["moov","trak"]),y=[];return g.forEach(function(v){var _={},E=yt(v,["tkhd"])[0],k,M;E&&(k=new DataView(E.buffer,E.byteOffset,E.byteLength),M=k.getUint8(0),_.id=M===0?k.getUint32(12):k.getUint32(20));var N=yt(v,["mdia","hdlr"])[0];if(N){var P=Ns(N.subarray(8,12));P==="vide"?_.type="video":P==="soun"?_.type="audio":_.type=P}var z=yt(v,["mdia","minf","stbl","stsd"])[0];if(z){var ie=z.subarray(8);_.codec=Ns(ie.subarray(4,8));var Te=yt(ie,[_.codec])[0],ue,qe;Te&&(/^[asm]vc[1-9]$/i.test(_.codec)?(ue=Te.subarray(78),qe=Ns(ue.subarray(4,8)),qe==="avcC"&&ue.length>11?(_.codec+=".",_.codec+=Qi(ue[9]),_.codec+=Qi(ue[10]),_.codec+=Qi(ue[11])):_.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(_.codec)?(ue=Te.subarray(28),qe=Ns(ue.subarray(4,8)),qe==="esds"&&ue.length>20&&ue[19]!==0?(_.codec+="."+Qi(ue[19]),_.codec+="."+Qi(ue[20]>>>2&63).replace(/^0/,"")):_.codec="mp4a.40.2"):_.codec=_.codec.toLowerCase())}var je=yt(v,["mdia","mdhd"])[0];je&&(_.timescale=Ku(je)),y.push(_)}),y},uh=function(h,g=0){var y=yt(h,["emsg"]);return y.map(v=>{var _=nh.parseEmsgBox(new Uint8Array(v)),E=ch(_.message_data);return{cueTime:nh.scaleTime(_.presentation_time,_.timescale,_.presentation_time_delta,g),duration:nh.scaleTime(_.event_duration,_.timescale),frames:E}})};var An={findBox:yt,parseType:Ns,timescale:rh,startTime:ah,compositionStartTime:oh,videoTrackIds:ul,tracks:lh,getTimescaleFromMediaHeader:Ku,getEmsgID3:uh};const{parseTrun:fr}=hr,{findBox:Ga}=An;var dl=Wu,hl=function(h){var g=Ga(h,["moof","traf"]),y=Ga(h,["mdat"]),v=[];return y.forEach(function(_,E){var k=g[E];v.push({mdat:_,traf:k})}),v},fl=function(h,g,y){var v=g,_=y.defaultSampleDuration||0,E=y.defaultSampleSize||0,k=y.trackId,M=[];return h.forEach(function(N){var P=fr(N),z=P.samples;z.forEach(function(ie){ie.duration===void 0&&(ie.duration=_),ie.size===void 0&&(ie.size=E),ie.trackId=k,ie.dts=v,ie.compositionTimeOffset===void 0&&(ie.compositionTimeOffset=0),typeof v=="bigint"?(ie.pts=v+dl.BigInt(ie.compositionTimeOffset),v+=dl.BigInt(ie.duration)):(ie.pts=v+ie.compositionTimeOffset,v+=ie.duration)}),M=M.concat(z)}),M},dh={getMdatTrafPairs:hl,parseSamples:fl},tv=Fd.discardEmulationPreventionBytes,lm=ku.CaptionStream,Zu=Va,hh=el,fh=Ls,{getMdatTrafPairs:tt,parseSamples:fe}=dh,Ya=function(h,g){for(var y=h,v=0;v<g.length;v++){var _=g[v];if(y<_.size)return _;y-=_.size}return null},Ju=function(h,g,y){var v=new DataView(h.buffer,h.byteOffset,h.byteLength),_={logs:[],seiNals:[]},E,k,M,N;for(k=0;k+4<h.length;k+=M)if(M=v.getUint32(k),k+=4,!(M<=0))switch(h[k]&31){case 6:var P=h.subarray(k+1,k+1+M),z=Ya(k,g);if(E={nalUnitType:"sei_rbsp",size:M,data:P,escapedRBSP:tv(P),trackId:y},z)E.pts=z.pts,E.dts=z.dts,N=z;else if(N)E.pts=N.pts,E.dts=N.dts;else{_.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+k+" for trackId "+y+". See mux.js#223."});break}_.seiNals.push(E);break}return _},Wt=function(h,g){var y={},v=tt(h);return v.forEach(function(_){var E=_.mdat,k=_.traf,M=Zu(k,["tfhd"]),N=fh(M[0]),P=N.trackId,z=Zu(k,["tfdt"]),ie=z.length>0?hh(z[0]).baseMediaDecodeTime:0,Te=Zu(k,["trun"]),ue,qe;g===P&&Te.length>0&&(ue=fe(Te,ie,N),qe=Ju(E,ue,P),y[P]||(y[P]={seiNals:[],logs:[]}),y[P].seiNals=y[P].seiNals.concat(qe.seiNals),y[P].logs=y[P].logs.concat(qe.logs))}),y},ph=function(h,g,y){var v;if(g===null)return null;v=Wt(h,g);var _=v[g]||{};return{seiNals:_.seiNals,logs:_.logs,timescale:y}},mh=function(){var h=!1,g,y,v,_,E,k;this.isInitialized=function(){return h},this.init=function(M){g=new lm,h=!0,k=M?M.isPartial:!1,g.on("data",function(N){N.startTime=N.startPts/_,N.endTime=N.endPts/_,E.captions.push(N),E.captionStreams[N.stream]=!0}),g.on("log",function(N){E.logs.push(N)})},this.isNewInit=function(M,N){return M&&M.length===0||N&&typeof N=="object"&&Object.keys(N).length===0?!1:v!==M[0]||_!==N[v]},this.parse=function(M,N,P){var z;if(this.isInitialized()){if(!N||!P)return null;if(this.isNewInit(N,P))v=N[0],_=P[v];else if(v===null||!_)return y.push(M),null}else return null;for(;y.length>0;){var ie=y.shift();this.parse(ie,N,P)}return z=ph(M,v,_),z&&z.logs&&(E.logs=E.logs.concat(z.logs)),z===null||!z.seiNals?E.logs.length?{logs:E.logs,captions:[],captionStreams:[]}:null:(this.pushNals(z.seiNals),this.flushStream(),E)},this.pushNals=function(M){if(!this.isInitialized()||!M||M.length===0)return null;M.forEach(function(N){g.push(N)})},this.flushStream=function(){if(!this.isInitialized())return null;k?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=[],v=null,_=null,E?this.clearParsedCaptions():E={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},um=mh;const{parseTfdt:gh}=hr,pr=Va,{getTimescaleFromMediaHeader:yh}=An,{parseSamples:vh,getMdatTrafPairs:bh}=dh;var vt=function(){let h=9e4;this.init=function(g){const y=pr(g,["moov","trak","mdia","mdhd"])[0];y&&(h=yh(y))},this.parseSegment=function(g){const y=[],v=bh(g);let _=0;return v.forEach(function(E){const k=E.mdat,M=E.traf,N=pr(M,["tfdt"])[0],P=pr(M,["tfhd"])[0],z=pr(M,["trun"]);if(N&&(_=gh(N).baseMediaDecodeTime),z.length&&P){const ie=vh(z,_,P);let Te=0;ie.forEach(function(ue){const qe="utf-8",je=new TextDecoder(qe),Jt=k.slice(Te,Te+ue.size);if(pr(Jt,["vtte"])[0]){Te+=ue.size;return}pr(Jt,["vttc"]).forEach(function(gr){const na=pr(gr,["payl"])[0],Qa=pr(gr,["sttg"])[0],Ka=ue.pts/h,Za=(ue.pts+ue.duration)/h;let Rt,Ja;if(na)try{Rt=je.decode(na)}catch(on){console.error(on)}if(Qa)try{Ja=je.decode(Qa)}catch(on){console.error(on)}ue.duration&&Rt&&y.push({cueText:Rt,start:Ka,end:Za,settings:Ja})}),Te+=ue.size})}}),y}},pl=jo,Xa=function(h){var g=h[1]&31;return g<<=8,g|=h[2],g},zn=function(h){return!!(h[1]&64)},as=function(h){var g=0;return(h[3]&48)>>>4>1&&(g+=h[4]+1),g},Vn=function(h,g){var y=Xa(h);return y===0?"pat":y===g?"pmt":g?"pes":null},_h=function(h){var g=zn(h),y=4+as(h);return g&&(y+=h[y]+1),(h[y+10]&31)<<8|h[y+11]},Wa=function(h){var g={},y=zn(h),v=4+as(h);if(y&&(v+=h[v]+1),!!(h[v+5]&1)){var _,E,k;_=(h[v+1]&15)<<8|h[v+2],E=3+_-4,k=(h[v+10]&15)<<8|h[v+11];for(var M=12+k;M<E;){var N=v+M;g[(h[N+1]&31)<<8|h[N+2]]=h[N],M+=((h[N+3]&15)<<8|h[N+4])+5}return g}},Th=function(h,g){var y=Xa(h),v=g[y];switch(v){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=zn(h);if(!g)return null;var y=4+as(h);if(y>=h.byteLength)return null;var v=null,_;return _=h[y+7],_&192&&(v={},v.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,v.pts*=4,v.pts+=(h[y+13]&6)>>>1,v.dts=v.pts,_&64&&(v.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,v.dts*=4,v.dts+=(h[y+18]&6)>>>1)),v},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+as(h),y=h.subarray(g),v=0,_=0,E=!1,k;_<y.byteLength-3;_++)if(y[_+2]===1){v=_+5;break}for(;v<y.byteLength;)switch(y[v]){case 0:if(y[v-1]!==0){v+=2;break}else if(y[v-2]!==0){v++;break}_+3!==v-2&&(k=gl(y[_+3]&31),k==="slice_layer_without_partitioning_rbsp_idr"&&(E=!0));do v++;while(y[v]!==1&&v<y.length);_=v-2,v+=3;break;case 1:if(y[v-1]!==0||y[v-2]!==0){v+=3;break}k=gl(y[_+3]&31),k==="slice_layer_without_partitioning_rbsp_idr"&&(E=!0),_=v-2,v+=3;break;default:v+=3;break}return y=y.subarray(_),v-=_,_=0,y&&y.byteLength>3&&(k=gl(y[_+3]&31),k==="slice_layer_without_partitioning_rbsp_idr"&&(E=!0)),E},cm={parseType:Vn,parsePat:_h,parsePmt:Wa,parsePayloadUnitStartIndicator:zn,parsePesType:Th,parsePesTime:ml,videoPacketContainsKeyFrame:ec},Sh=jo,ia=zd.handleRollover,bt={};bt.ts=cm,bt.aac=Fu;var mr=gt.ONE_SECOND_IN_TS,gi=188,Dn=71,xh=function(h,g){for(var y=0,v=gi,_,E;v<h.byteLength;){if(h[y]===Dn&&h[v]===Dn){switch(_=h.subarray(y,v),E=bt.ts.parseType(_,g.pid),E){case"pat":g.pid=bt.ts.parsePat(_);break;case"pmt":var k=bt.ts.parsePmt(_);g.table=g.table||{},Object.keys(k).forEach(function(M){g.table[M]=k[M]});break}y+=gi,v+=gi;continue}y++,v++}},Eh=function(h,g,y){for(var v=0,_=gi,E,k,M,N,P,z=!1;_<=h.byteLength;){if(h[v]===Dn&&(h[_]===Dn||_===h.byteLength)){switch(E=h.subarray(v,_),k=bt.ts.parseType(E,g.pid),k){case"pes":M=bt.ts.parsePesType(E,g.table),N=bt.ts.parsePayloadUnitStartIndicator(E),M==="audio"&&N&&(P=bt.ts.parsePesTime(E),P&&(P.type="audio",y.audio.push(P),z=!0));break}if(z)break;v+=gi,_+=gi;continue}v++,_++}for(_=h.byteLength,v=_-gi,z=!1;v>=0;){if(h[v]===Dn&&(h[_]===Dn||_===h.byteLength)){switch(E=h.subarray(v,_),k=bt.ts.parseType(E,g.pid),k){case"pes":M=bt.ts.parsePesType(E,g.table),N=bt.ts.parsePayloadUnitStartIndicator(E),M==="audio"&&N&&(P=bt.ts.parsePesTime(E),P&&(P.type="audio",y.audio.push(P),z=!0));break}if(z)break;v-=gi,_-=gi;continue}v--,_--}},dm=function(h,g,y){for(var v=0,_=gi,E,k,M,N,P,z,ie,Te,ue=!1,qe={data:[],size:0};_<h.byteLength;){if(h[v]===Dn&&h[_]===Dn){switch(E=h.subarray(v,_),k=bt.ts.parseType(E,g.pid),k){case"pes":if(M=bt.ts.parsePesType(E,g.table),N=bt.ts.parsePayloadUnitStartIndicator(E),M==="video"&&(N&&!ue&&(P=bt.ts.parsePesTime(E),P&&(P.type="video",y.video.push(P),ue=!0)),!y.firstKeyFrame)){if(N&&qe.size!==0){for(z=new Uint8Array(qe.size),ie=0;qe.data.length;)Te=qe.data.shift(),z.set(Te,ie),ie+=Te.byteLength;if(bt.ts.videoPacketContainsKeyFrame(z)){var je=bt.ts.parsePesTime(z);je?(y.firstKeyFrame=je,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.")}qe.size=0}qe.data.push(E),qe.size+=E.byteLength}break}if(ue&&y.firstKeyFrame)break;v+=gi,_+=gi;continue}v++,_++}for(_=h.byteLength,v=_-gi,ue=!1;v>=0;){if(h[v]===Dn&&h[_]===Dn){switch(E=h.subarray(v,_),k=bt.ts.parseType(E,g.pid),k){case"pes":M=bt.ts.parsePesType(E,g.table),N=bt.ts.parsePayloadUnitStartIndicator(E),M==="video"&&N&&(P=bt.ts.parsePesTime(E),P&&(P.type="video",y.video.push(P),ue=!0));break}if(ue)break;v-=gi,_-=gi;continue}v--,_--}},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=ia(E.dts,y),E.pts=ia(E.pts,y),E.dtsTime=E.dts/mr,E.ptsTime=E.pts/mr})}if(h.video&&h.video.length){var v=g;if((typeof v>"u"||isNaN(v))&&(v=h.video[0].dts),h.video.forEach(function(E){E.dts=ia(E.dts,v),E.pts=ia(E.pts,v),E.dtsTime=E.dts/mr,E.ptsTime=E.pts/mr}),h.firstKeyFrame){var _=h.firstKeyFrame;_.dts=ia(_.dts,v),_.pts=ia(_.pts,v),_.dtsTime=_.dts/mr,_.ptsTime=_.pts/mr}}},iv=function(h){for(var g=!1,y=0,v=null,_=null,E=0,k=0,M;h.length-k>=3;){var N=bt.aac.parseType(h,k);switch(N){case"timed-metadata":if(h.length-k<10){g=!0;break}if(E=bt.aac.parseId3TagSize(h,k),E>h.length){g=!0;break}_===null&&(M=h.subarray(k,k+E),_=bt.aac.parseAacTimestamp(M)),k+=E;break;case"audio":if(h.length-k<7){g=!0;break}if(E=bt.aac.parseAdtsSize(h,k),E>h.length){g=!0;break}v===null&&(M=h.subarray(k,k+E),v=bt.aac.parseSampleRate(M)),y++,k+=E;break;default:k++;break}if(g)return null}if(v===null||_===null)return null;var P=mr/v,z={audio:[{type:"audio",dts:_,pts:_},{type:"audio",dts:_+y*1024*P,pts:_+y*1024*P}]};return z},fm=function(h){var g={pid:null,table:null},y={};xh(h,g);for(var v in g.table)if(g.table.hasOwnProperty(v)){var _=g.table[v];switch(_){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=bt.aac.isLikelyAacData(h),v;return y?v=iv(h):v=fm(h),!v||!v.audio&&!v.video?null:(hm(v,g),v)},mm={inspect:pm,parseAudioPes_:Eh};const Ch=function(h,g){g.on("data",function(y){const v=y.initSegment;y.initSegment={data:v.buffer,byteOffset:v.byteOffset,byteLength:v.byteLength};const _=y.data;y.data=_.buffer,h.postMessage({action:"data",segment:y,byteOffset:_.byteOffset,byteLength:_.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 v={start:{decode:gt.videoTsToSeconds(y.start.dts),presentation:gt.videoTsToSeconds(y.start.pts)},end:{decode:gt.videoTsToSeconds(y.end.dts),presentation:gt.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:gt.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(v.prependedContentDuration=gt.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:v})}),g.on("audioSegmentTimingInfo",function(y){const v={start:{decode:gt.videoTsToSeconds(y.start.dts),presentation:gt.videoTsToSeconds(y.start.pts)},end:{decode:gt.videoTsToSeconds(y.end.dts),presentation:gt.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:gt.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(v.prependedContentDuration=gt.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:v})}),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:gt.videoTsToSeconds(y.start),end:gt.videoTsToSeconds(y.end)}})}),g.on("videoTimingInfo",function(y){h.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:gt.videoTsToSeconds(y.start),end:gt.videoTsToSeconds(y.end)}})}),g.on("log",function(y){h.postMessage({action:"log",log:y})})};class wh{constructor(g,y){this.options=y||{},this.self=g,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new nm.Transmuxer(this.options),Ch(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),v=this.captionParser.parse(y,g.trackIds,g.timescales);this.self.postMessage({action:"mp4Captions",captions:v&&v.captions||[],logs:v&&v.logs||[],data:y.buffer},[y.buffer])}initMp4WebVttParser(g){this.webVttParser||(this.webVttParser=new vt);const y=new Uint8Array(g.data,g.byteOffset,g.byteLength);this.webVttParser.init(y)}getMp4WebVttText(g){this.webVttParser||(this.webVttParser=new vt);const y=new Uint8Array(g.data,g.byteOffset,g.byteLength),v=this.webVttParser.parseSegment(y);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:v||[],data:y.buffer},[y.buffer])}probeMp4StartTime({timescales:g,data:y}){const v=An.startTime(g,y);this.self.postMessage({action:"probeMp4StartTime",startTime:v,data:y},[y.buffer])}probeMp4Tracks({data:g}){const y=An.tracks(g);this.self.postMessage({action:"probeMp4Tracks",tracks:y,data:g},[g.buffer])}probeEmsgID3({data:g,offset:y}){const v=An.getEmsgID3(g,y);this.self.postMessage({action:"probeEmsgID3",id3Frames:v,emsgData:g},[g.buffer])}probeTs({data:g,baseStartTime:y}){const v=typeof y=="number"&&!isNaN(y)?y*gt.ONE_SECOND_IN_TS:void 0,_=mm.inspect(g,v);let E=null;_&&(E={hasVideo:_.video&&_.video.length===2||!1,hasAudio:_.audio&&_.audio.length===2||!1},E.hasVideo&&(E.videoStart=_.video[0].ptsTime),E.hasAudio&&(E.audioStart=_.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(gt.secondsToVideoTs(y)))}setAudioAppendStart(g){this.transmuxer.setAudioAppendStart(Math.ceil(gt.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 wh(self,h.data.options);return}this.messageHandlers||(this.messageHandlers=new wh(self)),h.data&&h.data.action&&h.data.action!=="init"&&this.messageHandlers[h.data.action]&&this.messageHandlers[h.data.action](h.data)}}));var e8=$S(JR);const t8=(s,e,i)=>{const{type:r,initSegment:o,captions:u,captionStreams:c,metadata:f,videoFrameDtsTime:m,videoFramePtsTime:b}=s.data.segment;e.buffer.push({captions:u,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 m<"u"&&(x.videoFrameDtsTime=m),typeof b<"u"&&(x.videoFramePtsTime=b),i(x)},i8=({transmuxedData:s,callback:e})=>{s.buffer=[],e(s)},n8=(s,e)=>{e.gopInfo=s.data.gopInfo},XS=s=>{const{transmuxer:e,bytes:i,audioAppendStart:r,gopsToAlignWith:o,remux:u,onData:c,onTrackInfo:f,onAudioTimingInfo:m,onVideoTimingInfo:b,onVideoSegmentTimingInfo:S,onAudioSegmentTimingInfo:x,onId3:w,onCaptions:R,onDone:L,onEndedTimeline:A,onTransmuxerLog:q,isEndOfTimeline:U,segment:G,triggerSegmentEventFn:$}=s,W={buffer:[]};let K=U;const le=J=>{e.currentTransmux===s&&(J.data.action==="data"&&t8(J,W,c),J.data.action==="trackinfo"&&f(J.data.trackInfo),J.data.action==="gopInfo"&&n8(J,W),J.data.action==="audioTimingInfo"&&m(J.data.audioTimingInfo),J.data.action==="videoTimingInfo"&&b(J.data.videoTimingInfo),J.data.action==="videoSegmentTimingInfo"&&S(J.data.videoSegmentTimingInfo),J.data.action==="audioSegmentTimingInfo"&&x(J.data.audioSegmentTimingInfo),J.data.action==="id3Frame"&&w([J.data.id3Frame],J.data.id3Frame.dispatchType),J.data.action==="caption"&&R(J.data.caption),J.data.action==="endedtimeline"&&(K=!1,A()),J.data.action==="log"&&q(J.data.log),J.data.type==="transmuxed"&&(K||(e.onmessage=null,i8({transmuxedData:W,callback:L}),WS(e))))},Y=()=>{const J={message:"Received an error message from the transmuxer worker",metadata:{errorType:j.Error.StreamingFailedToTransmuxSegment,segmentInfo:qo({segment:G})}};L(null,J)};if(e.onmessage=le,e.onerror=Y,r&&e.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(o)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:o}),typeof u<"u"&&e.postMessage({action:"setRemux",remux:u}),i.byteLength){const J=i instanceof ArrayBuffer?i:i.buffer,te=i instanceof ArrayBuffer?0:i.byteOffset;$({type:"segmenttransmuxingstart",segment:G}),e.postMessage({action:"push",data:J,byteOffset:te,byteLength:i.byteLength},[J])}U&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},WS=s=>{s.currentTransmux=null,s.transmuxQueue.length&&(s.currentTransmux=s.transmuxQueue.shift(),typeof s.currentTransmux=="function"?s.currentTransmux():XS(s.currentTransmux))},QS=(s,e)=>{s.postMessage({action:e}),WS(s)},KS=(s,e)=>{if(!e.currentTransmux){e.currentTransmux=s,QS(e,s);return}e.transmuxQueue.push(QS.bind(null,e,s))},s8=s=>{KS("reset",s)},r8=s=>{KS("endTimeline",s)},ZS=s=>{if(!s.transmuxer.currentTransmux){s.transmuxer.currentTransmux=s,XS(s);return}s.transmuxer.transmuxQueue.push(s)};var ky={reset:s8,endTimeline:r8,transmux:ZS,createTransmuxer:s=>{const e=new e8;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=Qt({},s,{endAction:null,transmuxer:null,callback:null}),u=c=>{c.data.action===i&&(e.removeEventListener("message",u),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",u),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)},Zs={FAILURE:2,TIMEOUT:-101,ABORTED:-102},JS="wvtt",Oy=s=>{s.forEach(e=>{e.abort()})},a8=s=>({bandwidth:s.bandwidth,bytesReceived:s.bytesReceived||0,roundTripTime:s.roundTripTime||0}),o8=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},Ry=(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:Zs.TIMEOUT,xhr:e,metadata:r}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Zs.ABORTED,xhr:e,metadata:r}:s?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Zs.FAILURE,xhr:e,metadata:r}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:Zs.FAILURE,xhr:e,metadata:r}:null},ex=(s,e,i,r)=>(o,u)=>{const c=u.response,f=Ry(o,u);if(f)return i(f,s);if(c.byteLength!==16)return i({status:u.status,message:"Invalid HLS key at URL: "+u.uri,code:Zs.FAILURE,xhr:u},s);const m=new DataView(c),b=new Uint32Array([m.getUint32(0),m.getUint32(4),m.getUint32(8),m.getUint32(12)]);for(let x=0;x<e.length;x++)e[x].bytes=b;const S={uri:u.uri};return r({type:"segmentkeyloadcomplete",segment:s,keyInfo:S}),i(null,s)},l8=(s,e)=>{e===JS&&s.transmuxer.postMessage({action:"initMp4WebVttParser",data:s.map.bytes})},u8=(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:Zs.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(u){s.map.tracks=s.map.tracks||{},!s.map.tracks[u.type]&&(s.map.tracks[u.type]=u,typeof u.id=="number"&&u.timescale&&(s.map.timescales=s.map.timescales||{},s.map.timescales[u.id]=u.timescale),u.type==="text"&&l8(s,u.codec))}),e(null))})},c8=({segment:s,finishProcessingFn:e,triggerSegmentEventFn:i})=>(r,o)=>{const u=Ry(r,o);if(u)return e(u,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)})},d8=({segment:s,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:r})=>(o,u)=>{const c=Ry(o,u);if(c)return e(c,s);r({type:"segmentloaded",segment:s});const f=i==="arraybuffer"||!u.responseText?u.response:KR(u.responseText.substring(s.lastReachedChar||0));return s.stats=a8(u),s.key?s.encryptedBytes=new Uint8Array(f):s.bytes=new Uint8Array(f),e(null,s)},h8=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:R})=>{const L=s.map&&s.map.tracks||{},A=!!(L.audio&&L.video);let q=r.bind(null,s,"audio","start");const U=r.bind(null,s,"audio","end");let G=r.bind(null,s,"video","start");const $=r.bind(null,s,"video","end"),W=()=>ZS({bytes:e,transmuxer:s.transmuxer,audioAppendStart:s.audioAppendStart,gopsToAlignWith:s.gopsToAlignWith,remux:A,onData:K=>{K.type=K.type==="combined"?"video":K.type,S(s,K)},onTrackInfo:K=>{i&&(A&&(K.isMuxed=!0),i(s,K))},onAudioTimingInfo:K=>{q&&typeof K.start<"u"&&(q(K.start),q=null),U&&typeof K.end<"u"&&U(K.end)},onVideoTimingInfo:K=>{G&&typeof K.start<"u"&&(G(K.start),G=null),$&&typeof K.end<"u"&&$(K.end)},onVideoSegmentTimingInfo:K=>{const le={pts:{start:K.start.presentation,end:K.end.presentation},dts:{start:K.start.decode,end:K.end.decode}};R({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:le}),o(K)},onAudioSegmentTimingInfo:K=>{const le={pts:{start:K.start.pts,end:K.end.pts},dts:{start:K.start.dts,end:K.end.dts}};R({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:le}),u(K)},onId3:(K,le)=>{c(s,K,le)},onCaptions:K=>{f(s,[K])},isEndOfTimeline:m,onEndedTimeline:()=>{b()},onTransmuxerLog:w,onDone:(K,le)=>{x&&(K.type=K.type==="combined"?"video":K.type,R({type:"segmenttransmuxingcomplete",segment:s}),x(le,s,K))},segment:s,triggerSegmentEventFn:R});Su({action:"probeTs",transmuxer:s.transmuxer,data:e,baseStartTime:s.baseStartTime,callback:K=>{s.bytes=e=K.data;const le=K.result;le&&(i(s,{hasAudio:le.hasAudio,hasVideo:le.hasVideo,isMuxed:A}),i=null),W()}})},ix=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:R})=>{let L=new Uint8Array(e);if(F3(L)){s.isFmp4=!0;const{tracks:A}=s.map;if(A.text&&(!A.audio||!A.video)){S(s,{data:L,type:"text"}),u8(s,A.text.codec,x);return}const U={isFmp4:!0,hasVideo:!!A.video,hasAudio:!!A.audio};A.audio&&A.audio.codec&&A.audio.codec!=="enca"&&(U.audioCodec=A.audio.codec),A.video&&A.video.codec&&A.video.codec!=="encv"&&(U.videoCodec=A.video.codec),A.video&&A.audio&&(U.isMuxed=!0),i(s,U);const G=($,W)=>{S(s,{data:L,type:U.hasAudio&&!U.isMuxed?"audio":"video"}),W&&W.length&&c(s,W),$&&$.length&&f(s,$),x(null,s,{})};Su({action:"probeMp4StartTime",timescales:s.map.timescales,data:L,transmuxer:s.transmuxer,callback:({data:$,startTime:W})=>{e=$.buffer,s.bytes=L=$,U.hasAudio&&!U.isMuxed&&r(s,"audio","start",W),U.hasVideo&&r(s,"video","start",W),Su({action:"probeEmsgID3",data:L,transmuxer:s.transmuxer,offset:W,callback:({emsgData:K,id3Frames:le})=>{if(e=K.buffer,s.bytes=L=K,!A.video||!K.byteLength||!s.transmuxer){G(void 0,le);return}Su({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:s.transmuxer,data:L,timescales:s.map.timescales,trackIds:[A.video.id],callback:Y=>{e=Y.data.buffer,s.bytes=L=Y.data,Y.logs.forEach(function(J){w(xt(J,{stream:"mp4CaptionParser"}))}),G(Y.captions,le)}})}})}});return}if(!s.transmuxer){x(null,s,{});return}if(typeof s.container>"u"&&(s.container=g0(L)),s.container!=="ts"&&s.container!=="aac"){i(s,{hasAudio:!1,hasVideo:!1}),x(null,s,{});return}h8({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:R})},nx=function({id:s,key:e,encryptedBytes:i,decryptionWorker:r,segment:o,doneFn:u},c){const f=b=>{if(b.data.source===s){r.removeEventListener("message",f);const S=b.data.decrypted;c(new Uint8Array(S.bytes,S.byteOffset,S.byteLength))}};r.onerror=()=>{const b="An error occurred in the decryption worker",S=qo({segment:o}),x={message:b,metadata:{error:new Error(b),errorType:j.Error.StreamingFailedToDecryptSegment,segmentInfo:S,keyInfo:{uri:o.key.resolvedUri||o.map.key.resolvedUri}}};u(x,o)},r.addEventListener("message",f);let m;e.bytes.slice?m=e.bytes.slice():m=new Uint32Array(Array.prototype.slice.call(e.bytes)),r.postMessage(BS({source:s,encrypted:i,key:m,iv:e.iv}),[i.buffer,m.buffer])},f8=({decryptionWorker:s,segment:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:R})=>{R({type:"segmentdecryptionstart"}),nx({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:s,segment:e,doneFn:x},L=>{e.bytes=L,R({type:"segmentdecryptioncomplete",segment:e}),ix({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:R})})},p8=({activeXhrs:s,decryptionWorker:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:R})=>{let L=0,A=!1;return(q,U)=>{if(!A){if(q)return A=!0,Oy(s),x(q,U);if(L+=1,L===s.length){const G=function(){if(U.encryptedBytes)return f8({decryptionWorker:e,segment:U,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:R});ix({segment:U,bytes:U.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:R})};if(U.endOfAllRequests=Date.now(),U.map&&U.map.encryptedBytes&&!U.map.bytes)return R({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=$,R({type:"segmentdecryptioncomplete",segment:U}),tx(U,W=>{if(W)return Oy(s),x(W,U);G()})});G()}}}},m8=({loadendState:s,abortFn:e})=>i=>{i.target.aborted&&e&&!s.calledAbortFn&&(e(),s.calledAbortFn=!0)},g8=({segment:s,progressFn:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S})=>x=>{if(!x.target.aborted)return s.stats=xt(s.stats,o8(x)),!s.stats.firstBytesReceivedAt&&s.stats.bytesReceived&&(s.stats.firstBytesReceivedAt=Date.now()),e(x,s)},y8=({xhr:s,xhrOptions:e,decryptionWorker:i,segment:r,abortFn:o,progressFn:u,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:m,audioSegmentTimingInfoFn:b,id3Fn:S,captionsFn:x,isEndOfTimeline:w,endedTimelineFn:R,dataFn:L,doneFn:A,onTransmuxerLog:q,triggerSegmentEventFn:U})=>{const G=[],$=p8({activeXhrs:G,decryptionWorker:i,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:m,audioSegmentTimingInfoFn:b,id3Fn:S,captionsFn:x,isEndOfTimeline:w,endedTimelineFn:R,dataFn:L,doneFn:A,onTransmuxerLog:q,triggerSegmentEventFn:U});if(r.key&&!r.key.bytes){const J=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&J.push(r.map.key);const te=xt(e,{uri:r.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),xe=ex(r,J,$,U),he={uri:r.key.resolvedUri};U({type:"segmentkeyloadstart",segment:r,keyInfo:he});const be=s(te,xe);G.push(be)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){const be=xt(e,{uri:r.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),ye=ex(r,[r.map.key],$,U),pe={uri:r.map.key.resolvedUri};U({type:"segmentkeyloadstart",segment:r,keyInfo:pe});const He=s(be,ye);G.push(He)}const te=xt(e,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:wy(r.map),requestType:"segment-media-initialization"}),xe=c8({segment:r,finishProcessingFn:$,triggerSegmentEventFn:U});U({type:"segmentloadstart",segment:r});const he=s(te,xe);G.push(he)}const W=xt(e,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:wy(r),requestType:"segment"}),K=d8({segment:r,finishProcessingFn:$,responseType:W.responseType,triggerSegmentEventFn:U});U({type:"segmentloadstart",segment:r});const le=s(W,K);le.addEventListener("progress",g8({segment:r,progressFn:u,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:m,audioSegmentTimingInfoFn:b,id3Fn:S,captionsFn:x,isEndOfTimeline:w,endedTimelineFn:R,dataFn:L})),G.push(le);const Y={};return G.forEach(J=>{J.addEventListener("loadend",m8({loadendState:Y,abortFn:o}))}),()=>Oy(G)},Pp=ns("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=B.getComputedStyle(s);return i?i[e]:""},Eu=function(s,e){const i=s.slice();s.sort(function(r,o){const u=e(r,o);return u===0?i.indexOf(r)-i.indexOf(o):u})},My=function(s,e){let i,r;return s.attributes.BANDWIDTH&&(i=s.attributes.BANDWIDTH),i=i||B.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),r=r||B.Number.MAX_VALUE,i-r},v8=function(s,e){let i,r;return s.attributes.RESOLUTION&&s.attributes.RESOLUTION.width&&(i=s.attributes.RESOLUTION.width),i=i||B.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),r=r||B.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:u,limitRenditionByPlayerDimensions:c,playlistController:f}=s;if(!e)return;const m={bandwidth:i,width:r,height:o,limitRenditionByPlayerDimensions:c};let b=e.playlists;Tn.isAudioOnly(e)&&(b=f.getAudioTrackPlaylists_(),m.audioOnly=!0);let S=b.map(Y=>{let J;const te=Y.attributes&&Y.attributes.RESOLUTION&&Y.attributes.RESOLUTION.width,xe=Y.attributes&&Y.attributes.RESOLUTION&&Y.attributes.RESOLUTION.height;return J=Y.attributes&&Y.attributes.BANDWIDTH,J=J||B.Number.MAX_VALUE,{bandwidth:J,width:te,height:xe,playlist:Y}});Eu(S,(Y,J)=>Y.bandwidth-J.bandwidth),S=S.filter(Y=>!Tn.isIncompatible(Y.playlist));let x=S.filter(Y=>Tn.isEnabled(Y.playlist));x.length||(x=S.filter(Y=>!Tn.isDisabled(Y.playlist)));const w=x.filter(Y=>Y.bandwidth*xi.BANDWIDTH_VARIANCE<i);let R=w[w.length-1];const L=w.filter(Y=>Y.bandwidth===R.bandwidth)[0];if(c===!1){const Y=L||x[0]||S[0];if(Y&&Y.playlist){let J="sortedPlaylistReps";return L&&(J="bandwidthBestRep"),x[0]&&(J="enabledPlaylistReps"),Pp(`choosing ${sx(Y)} using ${J} with options`,m),Y.playlist}return Pp("could not choose a playlist with options",m),null}const A=w.filter(Y=>Y.width&&Y.height);Eu(A,(Y,J)=>Y.width-J.width);const q=A.filter(Y=>Y.width===r&&Y.height===o);R=q[q.length-1];const U=q.filter(Y=>Y.bandwidth===R.bandwidth)[0];let G,$,W;U||(G=A.filter(Y=>u==="cover"?Y.width>r&&Y.height>o:Y.width>r||Y.height>o),$=G.filter(Y=>Y.width===G[0].width&&Y.height===G[0].height),R=$[$.length-1],W=$.filter(Y=>Y.bandwidth===R.bandwidth)[0]);let K;if(f.leastPixelDiffSelector){const Y=A.map(J=>(J.pixelDiff=Math.abs(J.width-r)+Math.abs(J.height-o),J));Eu(Y,(J,te)=>J.pixelDiff===te.pixelDiff?te.bandwidth-J.bandwidth:J.pixelDiff-te.pixelDiff),K=Y[0]}const le=K||W||U||L||x[0]||S[0];if(le&&le.playlist){let Y="sortedPlaylistReps";return K?Y="leastPixelDiffRep":W?Y="resolutionPlusOneRep":U?Y="resolutionBestRep":L?Y="bandwidthBestRep":x[0]&&(Y="enabledPlaylistReps"),Pp(`choosing ${sx(le)} using ${Y} with options`,m),le.playlist}return Pp("could not choose a playlist with options",m),null};const ax=function(){let s=this.useDevicePixelRatio&&B.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_})},b8=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&&B.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_})}},_8=function(s){const{main:e,currentTime:i,bandwidth:r,duration:o,segmentDuration:u,timeUntilRebuffer:c,currentTimeline:f,syncController:m}=s,b=e.playlists.filter(L=>!Tn.isIncompatible(L));let S=b.filter(Tn.isEnabled);S.length||(S=b.filter(L=>!Tn.isDisabled(L)));const w=S.filter(Tn.hasAttribute.bind(null,"BANDWIDTH")).map(L=>{const q=m.getSyncPoint(L,o,f,i)?1:2,G=Tn.estimateSegmentRequestTime(u,r,L)*q-c;return{playlist:L,rebufferingImpact:G}}),R=w.filter(L=>L.rebufferingImpact<=0);return Eu(R,(L,A)=>My(A.playlist,L.playlist)),R.length?R[0]:(Eu(w,(L,A)=>L.rebufferingImpact-A.rebufferingImpact),w[0]||null)},T8=function(){const s=this.playlists.main.playlists.filter(Tn.isEnabled);return Eu(s,(i,r)=>My(i,r)),s.filter(i=>!!Ld(this.playlists.main,i).video)[0]||null},S8=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 x8=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 u=e.options_.vhs&&e.options_.vhs.captionServices||{};let c=i,f=i,m=!1;const b=u[r];b&&(c=b.label,f=b.language,m=b.default),s[i]=e.addRemoteTextTrack({kind:"captions",id:r,default:m,label:c,language:f},!1).track}}},E8=function({inbandTextTracks:s,captionArray:e,timestampOffset:i}){if(!e)return;const r=B.WebKitDataCue||B.VTTCue;e.forEach(o=>{const u=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[u].addCue(f)}):s[u].addCue(new r(o.startTime+i,o.endTime+i,o.text))})},C8=function(s){Object.defineProperties(s.frame,{id:{get(){return j.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),s.value.key}},value:{get(){return j.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),s.value.data}},privateData:{get(){return j.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),s.value.data}}})},w8=({inbandTextTracks:s,metadataArray:e,timestampOffset:i,videoDuration:r})=>{if(!e)return;const o=B.WebKitDataCue||B.VTTCue,u=s.metadataTrack_;if(!u||(e.forEach(S=>{const x=S.cueTime+i;typeof x!="number"||B.isNaN(x)||x<0||!(x<1/0)||!S.frames||!S.frames.length||S.frames.forEach(w=>{const R=new o(x,x,w.value||w.url||w.data||"");R.frame=w,R.value=w,C8(R),u.addCue(R)})}),!u.cues||!u.cues.length))return;const c=u.cues,f=[];for(let S=0;S<c.length;S++)c[S]&&f.push(c[S]);const m=f.reduce((S,x)=>{const w=S[x.startTime]||[];return w.push(x),S[x.startTime]=w,S},{}),b=Object.keys(m).sort((S,x)=>Number(S)-Number(x));b.forEach((S,x)=>{const w=m[S],R=isFinite(r)?r:S,L=Number(b[x+1])||R;w.forEach(A=>{A.endTime=L})})},A8={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"},D8=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),k8=({inbandTextTracks:s,dateRanges:e})=>{const i=s.metadataTrack_;if(!i)return;const r=B.WebKitDataCue||B.VTTCue;e.forEach(o=>{for(const u of Object.keys(o)){if(D8.has(u))continue;const c=new r(o.startTime,o.endTime,"");c.id=o.id,c.type="com.apple.quicktime.HLS",c.value={key:A8[u],data:o[u]},(u==="scte35Out"||u==="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,j.browser.IS_ANY_SAFARI||(s.metadataTrack_.inBandMetadataTrackDispatchType=e))},Id=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)},O8=function(s){const e=s.cues;if(!e)return;const i={};for(let r=e.length-1;r>=0;r--){const o=e[r],u=`${o.startTime}-${o.endTime}-${o.text}`;i[u]?s.removeCue(o):i[u]=o}},R8=(s,e,i)=>{if(typeof e>"u"||e===null||!s.length)return[];const r=Math.ceil((e-i+3)*ko.ONE_SECOND_IN_TS);let o;for(o=0;o<s.length&&!(s[o].pts>r);o++);return s.slice(o)},M8=(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)},L8=(s,e,i,r)=>{const o=Math.ceil((e-r)*ko.ONE_SECOND_IN_TS),u=Math.ceil((i-r)*ko.ONE_SECOND_IN_TS),c=s.slice();let f=s.length;for(;f--&&!(s[f].pts<=u););if(f===-1)return c;let m=f+1;for(;m--&&!(s[m].pts<=o););return m=Math.max(m,0),c.splice(m,f-m+1),c},I8=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 u=i[o];if(u!==r[o]||s[u]!==e[u])return!1}return!0},N8=function(s,e,i){e=e||[];const r=[];let o=0;for(let u=0;u<e.length;u++){const c=e[u];if(s===c.timeline&&(r.push(u),o+=c.duration,o>i))return u}return r.length===0?0:r[r.length-1]},Nd=1,P8=500,ux=s=>typeof s=="number"&&isFinite(s),Bp=1/60,B8=(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,U8=(s,e,i)=>{let r=e-xi.BACK_BUFFER_LENGTH;s.length&&(r=Math.max(r,s.start(0)));const o=e-i;return Math.min(o,r)},Cu=s=>{const{startOfSegment:e,duration:i,segment:r,part:o,playlist:{mediaSequence:u,id:c,segments:f=[]},mediaIndex:m,partIndex:b,timeline:S}=s,x=f.length-1;let w="mediaIndex/partIndex increment";s.getMediaInfoForTime?w=`getMediaInfoForTime (${s.getMediaInfoForTime})`:s.isSyncRequest&&(w="getSyncSegmentCandidate (isSyncRequest)"),s.independent&&(w+=` with independent ${s.independent}`);const R=typeof b=="number",L=s.segment.uri?"segment":"pre-segment",A=R?mS({preloadSegment:r})-1:0;return`${L} [${u+m}/${u+x}]`+(R?` part [${b}/${A}]`:"")+` segment start/end [${r.start} => ${r.end}]`+(R?` part start/end [${o.start} => ${o.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${S}] selected by [${w}] playlist [${c}]`},cx=s=>`${s}TimingInfo`,q8=({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,Ly=({timelineChangeController:s,currentTimeline:e,segmentTimeline:i,loaderType:r,audioDisabled:o})=>{if(e===i)return!1;if(r==="audio"){const u=s.lastTimelineChange({type:"main"});return!u||u.to!==i}if(r==="main"&&o){const u=s.pendingTimelineChange({type:"audio"});return!(u&&u.to===i)}return!1},F8=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)},H8=s=>{const e=s.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=s.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to},Ia=s=>{const e=s.pendingSegment_;if(!e)return;if(Ly({timelineChangeController:s.timelineChangeController_,currentTimeline:s.currentTimeline_,segmentTimeline:e.timeline,loaderType:s.loaderType_,audioDisabled:s.audioDisabled_})&&F8(s.timelineChangeController_)){if(H8(s)){s.timelineChangeController_.trigger("audioTimelineBehind");return}s.timelineChangeController_.trigger("fixBadTimelineChange")}},j8=s=>{let e=0;return["video","audio"].forEach(function(i){const r=s[`${i}TimingInfo`];if(!r)return;const{start:o,end:u}=r;let c;typeof o=="bigint"||typeof u=="bigint"?c=B.BigInt(u)-B.BigInt(o):typeof o=="number"&&typeof u=="number"&&(c=u-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+Qs:!1,z8=(s,e)=>{if(e!=="hls")return null;const i=j8({audioTimingInfo:s.audioTimingInfo,videoTimingInfo:s.videoTimingInfo});if(!i)return null;const r=s.playlist.targetDuration,o=dx({segmentDuration:i,maxDuration:r*2}),u=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||u?{severity:o?"warn":"info",message:c}:null},qo=({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 Iy extends j.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_=ns(`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_():Ia(this)}),this.sourceUpdater_.on("codecschange",r=>{this.trigger(Qt({type:"codecschange"},r))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Ia(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",r=>{this.trigger(Qt({type:"timelinechange"},r)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():Ia(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Ia(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return ky.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_&&B.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,B.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_&&ky.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Si();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=Np(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 u={resolvedUri:(o||e).resolvedUri};return o&&(u.bytes=o.bytes),u}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 u=null;if(r&&(r.id?u=r.id:r.uri&&(u=r.uri)),this.logger_(`playlist update [${u} => ${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 m=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=m}}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_&&(B.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_&&ky.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 u=1;const c=()=>{u--,u===0&&r()};(o||!this.audioDisabled_)&&(u++,this.sourceUpdater_.removeAudio(e,i,c)),(o||this.loaderType_==="main")&&(this.gopBuffer_=L8(this.gopBuffer_,e,i,this.timeMapping_),u++,this.sourceUpdater_.removeVideo(e,i,c));for(const f in this.inbandTextTracks_)Id(e,i,this.inbandTextTracks_[f]);Id(e,i,this.segmentMetadataTrack_),c()}monitorBuffer_(){this.checkBufferTimeout_&&B.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=B.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&B.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=B.setTimeout(this.monitorBufferTick_.bind(this),P8)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const i={segmentInfo:qo({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],u=e+1===i.segments.length,c=!o||!o.parts||r+1===o.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&u&&c}chooseNextRequest_(){const e=this.buffered_(),i=gy(e)||0,r=yy(e,this.currentTime_()),o=!this.hasPlayed_()&&r>=1,u=r>=this.goalBufferLength_(),c=this.playlist_.segments;if(!c.length||o||u)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=N8(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 w=c[this.mediaIndex],R=typeof this.partIndex=="number"?this.partIndex:-1;f.startOfSegment=w.end?w.end:i,w.parts&&w.parts[R+1]?(f.mediaIndex=this.mediaIndex,f.partIndex=R+1):f.mediaIndex=this.mediaIndex+1}else{let w,R,L;const A=this.fetchAtBuffer_?i:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
For TargetTime: ${A}.
CurrentTime: ${this.currentTime_()}
BufferedEnd: ${i}
Fetch At Buffer: ${this.fetchAtBuffer_}
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const q=this.getSyncInfoFromMediaSequenceSync_(A);if(!q){const U="No sync info found while using media sequence sync";return this.error({message:U,metadata:{errorType:j.Error.StreamingFailedToSelectNextSegment,error:new Error(U)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${q.start} --> ${q.end})`),w=q.segmentIndex,R=q.partIndex,L=q.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const q=Tn.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:A,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});w=q.segmentIndex,R=q.partIndex,L=q.startTime}f.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${A}`:`currentTime ${A}`,f.mediaIndex=w,f.startOfSegment=L,f.partIndex=R,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${f.mediaIndex} `)}const m=c[f.mediaIndex];let b=m&&typeof f.partIndex=="number"&&m.parts&&m.parts[f.partIndex];if(!m||typeof f.partIndex=="number"&&!b)return null;typeof f.partIndex!="number"&&m.parts&&(f.partIndex=0,b=m.parts[0]);const S=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!r&&b&&!S&&!b.independent)if(f.partIndex===0){const w=c[f.mediaIndex-1],R=w.parts&&w.parts.length&&w.parts[w.parts.length-1];R&&R.independent&&(f.mediaIndex-=1,f.partIndex=w.parts.length-1,f.independent="previous segment")}else m.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:u,isSyncRequest:c,partIndex:f,forceTimestampOffset:m,getMediaInfoForTime:b}=e,S=r.segments[o],x=typeof f=="number"&&S.parts[f],w={requestId:"segment-loader-"+Math.random(),uri:x&&x.resolvedUri||S.resolvedUri,mediaIndex:o,partIndex:x?f:null,isSyncRequest:c,startOfSegment:u,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:b,independent:i},R=typeof m<"u"?m:this.isPendingTimestampOffset_;w.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:S.timeline,currentTimeline:this.currentTimeline_,startOfSegment:u,buffered:this.buffered_(),overrideCheck:R});const L=gy(this.sourceUpdater_.audioBuffered());return typeof L=="number"&&(w.audioAppendStart=L-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(w.gopsToAlignWith=R8(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),w}timestampOffsetForSegment_(e){return q8(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,u=Tn.estimateSegmentRequestTime(o,r,this.playlist_,e.bytesReceived),c=cR(this.buffered_(),i,this.vhs_.tech_.playbackRate())-1;if(u<=c)return;const f=_8({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 b=u-c-f.rebufferingImpact;let S=.5;c<=Qs&&(S=1),!(!f.playlist||f.playlist.uri===this.playlist_.uri||b<S)&&(this.bandwidth=f.playlist.attributes.BANDWIDTH*xi.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Cu(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,u={segmentInfo:qo({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:r,hasVideo:o}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:u}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(i)||(i=i||{},I8(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_():Ia(this))))}handleTimingInfo_(e,i,r,o){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const u=this.pendingSegment_,c=cx(i);u[c]=u[c]||{},u[c][r]=o,this.logger_(`timinginfo: ${i} - ${r} - ${o}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Ia(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(),u={};i.forEach(c=>{u[c.stream]=u[c.stream]||{startTime:1/0,captions:[],endTime:0};const f=u[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(u).forEach(c=>{const{startTime:f,endTime:m,captions:b}=u[c],S=this.inbandTextTracks_;this.logger_(`adding cues from ${f} -> ${m} for ${c}`),x8(S,this.vhs_.tech_,c),Id(f,m,S[c]),E8({captionArray:b,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_()?!Ly({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:u}=i;return!(o&&!e.videoTimingInfo||r&&!this.audioDisabled_&&!u&&!e.audioTimingInfo||Ly({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_()){Ia(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_(),u=this.loaderType_==="main"&&o&&o.hasVideo;let c;u&&(c=r.videoTimingInfo.start),r.timingInfo.start=this.trueSegmentStart_({currentStart:r.timingInfo.start,playlist:r.playlist,mediaIndex:r.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:u,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 u=Np(r);if(this.activeInitSegmentId_===u)return null;i=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=u}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 u=this.sourceUpdater_.audioBuffered(),c=this.sourceUpdater_.videoBuffered();u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Bo(u).join(", ")),c.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Bo(c).join(", "));const f=u.length?u.start(0):0,m=u.length?u.end(u.length-1):0,b=c.length?c.start(0):0,S=c.length?c.end(c.length-1):0;if(m-f<=Nd&&S-b<=Nd){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${r.byteLength}, audio buffer: ${Bo(u).join(", ")}, video buffer: ${Bo(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 w=this.currentTime_()-Nd;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${w}`),this.remove(0,w,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Nd}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=B.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Nd*1e3)},!0)}handleAppendError_({segmentInfo:e,type:i,bytes:r},o){if(o){if(o.code===DS){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:j.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:r,data:o,bytes:u}){if(!u){const f=[o];let m=o.byteLength;r&&(f.unshift(r),m+=r.byteLength),u=S8({bytes:m,segments:f})}const c={segmentInfo:qo({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:c}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:i,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:e,type:i,bytes:u}))}handleSegmentTimingInfo_(e,i,r){if(!this.pendingSegment_||i!==this.pendingSegment_.requestId)return;const o=this.pendingSegment_.segment,u=`${e}TimingInfo`;o[u]||(o[u]={}),o[u].transmuxerPrependedSeconds=r.prependedContentDuration||0,o[u].transmuxedPresentationStart=r.start.presentation,o[u].transmuxedDecodeStart=r.start.decode,o[u].transmuxedPresentationEnd=r.end.presentation,o[u].transmuxedDecodeEnd=r.end.decode,o[u].baseMediaDecodeTime=r.baseMediaDecodeTime}appendData_(e,i){const{type:r,data:o}=i;if(!o||!o.byteLength||r==="audio"&&this.audioDisabled_)return;const u=this.getInitSegmentAndUpdateState_({type:r,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:r,initSegment:u,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_()){Ia(this),this.loadQueue_.push(()=>{const i=Qt({},e,{forceTimestampOffset:!0});Qt(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,u=e.timeline!==this.currentTimeline_&&e.timeline>0,c=r||o&&u;this.logger_(`Requesting
${ox(e.uri)}
${Cu(e)}`),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=y8({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:m,stream:b})=>{this.logger_(`${Cu(e)} logged from transmuxer stream ${b} as a ${m}: ${f}`)},triggerSegmentEventFn:({type:f,segment:m,keyInfo:b,trackInfo:S,timingInfo:x})=>{const R={segmentInfo:qo({segment:m})};b&&(R.keyInfo=b),S&&(R.trackInfo=S),x&&(R.timingInfo=x),this.trigger({type:f,metadata:R})}})}trimBackBuffer_(e){const i=U8(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,u=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:u},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 m=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);c.key=this.segmentKey(i.key),c.key.iv=m}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<Bp){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${Bp}`);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===Zs.ABORTED)return;if(this.pause(),e.code===Zs.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_=M8(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:u,useVideoTimingInfo:c,videoTimingInfo:f,audioTimingInfo:m}){if(typeof e<"u")return e;if(!c)return m.start;const b=i.segments[r-1];return r===0||!b||typeof b.start>"u"||b.end!==o+u?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:u}=i,c=this.loaderType_==="main"&&o,f=!this.audioDisabled_&&r&&!u;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=B8(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 m={segmentInfo:qo({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:m})}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=z8(e,this.sourceType_);if(i&&(i.severity==="warn"?j.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 ${Cu(e)}`);return}this.logger_(`Appended ${Cu(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,u=r.end&&this.currentTime_()-r.end>e.playlist.targetDuration*3,c=o&&o.end&&this.currentTime_()-o.end>e.playlist.partTargetDuration*3;if(u||c){this.logger_(`bad ${u?"segment":"part"} ${Cu(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<Bp){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${Bp}`);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;Id(r,o,this.segmentMetadataTrack_);const u=B.WebKitDataCue||B.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),m=new u(r,o,f);m.value=c,this.segmentMetadataTrack_.addCue(m)}}function Fr(){}const hx=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},V8=["video","audio"],Ny=(s,e)=>{const i=e[`${s}Buffer`];return i&&i.updating||e.queuePending[s]},$8=(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},wu=(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(),wu("audio",e),wu("video",e));return}if(s!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||Ny(s,e))){if(r.type!==s){if(i=$8(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,wu(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)},Js=(s,e)=>s&&e&&Array.prototype.indexOf.call(s.sourceBuffers,e)!==-1,Bn={appendBuffer:(s,e,i)=>(r,o)=>{const u=o[`${r}Buffer`];if(Js(o.mediaSource,u)){o.logger_(`Appending segment ${e.mediaIndex}'s ${s.length} bytes to ${r}Buffer`);try{u.appendBuffer(s)}catch(c){o.logger_(`Error with code ${c.code} `+(c.code===DS?"(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(Js(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`];Js(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){j.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){j.log.warn("Failed to set media source duration",i)}},abort:()=>(s,e)=>{if(e.mediaSource.readyState!=="open")return;const i=e[`${s}Buffer`];if(Js(e.mediaSource,i)){e.logger_(`calling abort on ${s}Buffer`);try{i.abort()}catch(r){j.log.warn(`Failed to abort on ${s}Buffer`,r)}}},addSourceBuffer:(s,e)=>i=>{const r=hx(s),o=jl(e);i.logger_(`Adding ${s}Buffer with codec ${e} to mediaSource`);const u=i.mediaSource.addSourceBuffer(o);u.addEventListener("updateend",i[`on${r}UpdateEnd_`]),u.addEventListener("error",i[`on${r}Error_`]),i.codecs[s]=e,i[`${s}Buffer`]=u},removeSourceBuffer:s=>e=>{const i=e[`${s}Buffer`];if(fx(s,e),!!Js(e.mediaSource,i)){e.logger_(`Removing ${s}Buffer with codec ${e.codecs[s]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(i)}catch(r){j.log.warn(`Failed to removeSourceBuffer ${s}Buffer`,r)}}},changeType:s=>(e,i)=>{const r=i[`${e}Buffer`],o=jl(s);if(!Js(i.mediaSource,r))return;const u=s.substring(0,s.indexOf(".")),c=i.codecs[e];if(c.substring(0,c.indexOf("."))===u)return;const m={codecsChangeInfo:{from:c,to:s}};i.trigger({type:"codecschange",metadata:m}),i.logger_(`changing ${e}Buffer codec from ${c} to ${s}`);try{r.changeType(o),i.codecs[e]=s}catch(b){m.errorType=j.Error.StreamingCodecsChangeError,m.error=b,b.metadata=m,i.error_=b,i.trigger("error"),j.log.warn(`Failed to changeType on ${e}Buffer`,b)}}},Un=({type:s,sourceUpdater:e,action:i,doneFn:r,name:o})=>{e.queue.push({type:s,action:i,doneFn:r,name:o}),wu(s,e)},px=(s,e)=>i=>{const r=e[`${s}Buffered`](),o=oR(r);if(e.logger_(`received "updateend" event for ${s} Source Buffer: `,o),e.queuePending[s]){const u=e.queuePending[s].doneFn;e.queuePending[s]=null,u&&u(e[`${s}Error_`])}wu(s,e)};class mx extends j.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>wu("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=ns("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){Un({type:"mediaSource",sourceUpdater:this,action:Bn.addSourceBuffer(e,i),name:"addSourceBuffer"})}abort(e){Un({type:e,sourceUpdater:this,action:Bn.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){j.log.error("removeSourceBuffer is not supported!");return}Un({type:"mediaSource",sourceUpdater:this,action:Bn.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!j.browser.IS_FIREFOX&&B.MediaSource&&B.MediaSource.prototype&&typeof B.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return B.SourceBuffer&&B.SourceBuffer.prototype&&typeof B.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,i){if(!this.canChangeType()){j.log.error("changeType is not supported!");return}Un({type:e,sourceUpdater:this,action:Bn.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:u}=e;if(this.processedAppend_=!0,o==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,i]),this.logger_(`delayed audio append of ${u.length} until video append`);return}const c=i;if(Un({type:o,sourceUpdater:this,action:Bn.appendBuffer(u,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(m=>{this.appendBuffer.apply(this,m)})}}audioBuffered(){return Js(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Si()}videoBuffered(){return Js(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Si()}buffered(){const e=Js(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,i=Js(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return i&&!e?this.audioBuffered():e&&!i?this.videoBuffered():uR(this.audioBuffered(),this.videoBuffered())}setDuration(e,i=Fr){Un({type:"mediaSource",sourceUpdater:this,action:Bn.duration(e),name:"duration",doneFn:i})}endOfStream(e=null,i=Fr){typeof e!="string"&&(e=void 0),Un({type:"mediaSource",sourceUpdater:this,action:Bn.endOfStream(e),name:"endOfStream",doneFn:i})}removeAudio(e,i,r=Fr){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){r();return}Un({type:"audio",sourceUpdater:this,action:Bn.remove(e,i),doneFn:r,name:"remove"})}removeVideo(e,i,r=Fr){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){r();return}Un({type:"video",sourceUpdater:this,action:Bn.remove(e,i),doneFn:r,name:"remove"})}updating(){return!!(Ny("audio",this)||Ny("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Un({type:"audio",sourceUpdater:this,action:Bn.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(Un({type:"video",sourceUpdater:this,action:Bn.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&Un({type:"audio",sourceUpdater:this,action:Bn.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&Un({type:"video",sourceUpdater:this,action:Bn.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),V8.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))),G8=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 Y8 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class X8 extends Iy{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 Si();const e=this.subtitlesTrack_.cues,i=e[0].startTime,r=e[e.length-1].startTime;return Si([[i,r]])}initSegmentForMap(e,i=!1){if(!e)return null;const r=Np(e);let o=this.initSegments_[r];if(i&&!o&&e.bytes){const u=yx.byteLength+e.bytes.byteLength,c=new Uint8Array(u);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){Id(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===Zs.TIMEOUT&&this.handleTimeout_(),e.code===Zs.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const o=this.pendingSegment_,u=r.mp4VttCues&&r.mp4VttCues.length;u&&(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 B.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:j.Error.StreamingVttParserError,error:f}});return}if(u||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 B.VTTCue(f.startTime,f.endTime,f.text):f)}),O8(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,u=r.end+i,c=new B.VTTCue(o,u,r.cueText);r.settings&&r.settings.split(" ").forEach(f=>{const m=f.split(":"),b=m[0],S=m[1];c[b]=isNaN(S)?S:Number(S)}),e.cues.push(c)})}parseVTTCues_(e){let i,r=!1;if(typeof B.WebVTT!="function")throw new Y8;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof B.TextDecoder=="function"?i=new B.TextDecoder("utf8"):(i=B.WebVTT.StringDecoder(),r=!0);const o=new B.WebVTT.Parser(B,B.vttjs,i);if(o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=c=>{e.timestampmap=c},o.onparsingerror=c=>{j.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 u=e.bytes;r&&(u=gx(u)),o.parse(u),o.flush()}updateTimeMapping_(e,i,r){const o=e.segment;if(!i)return;if(!e.cues.length){o.empty=!0;return}const{MPEGTS:u,LOCAL:c}=e.timestampmap,m=u/ko.ONE_SECOND_IN_TS-c+i.mapping;if(e.cues.forEach(b=>{const S=b.endTime-b.startTime,x=this.handleRollover_(b.startTime+m,i.time);b.startTime=Math.max(x,0),b.endTime=Math.max(x+S,0)}),!r.syncInfo){const b=e.cues[0].startTime,S=e.cues[e.cues.length-1].startTime;r.syncInfo={mediaSequence:r.mediaSequence+e.mediaIndex,time:Math.min(b,S-o.duration)}}}handleRollover_(e,i){if(i===null)return e;let r=e*ko.ONE_SECOND_IN_TS;const o=i*ko.ONE_SECOND_IN_TS;let u;for(o<r?u=-8589934592:u=8589934592;Math.abs(r-o)>4294967296;)r+=u;return r/ko.ONE_SECOND_IN_TS}}const W8=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},Q8=function(s,e,i=0){if(!s.segments)return;let r=i,o;for(let u=0;u<s.segments.length;u++){const c=s.segments[u];if(o||(o=W8(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 B.VTTCue(r,r+c.duration,c.cueOut),o.adStartTime=r,o.adEndTime=r+parseFloat(c.cueOut),e.addCue(o)),"cueOutCont"in c){const[f,m]=c.cueOutCont.split("/").map(parseFloat);o=new B.VTTCue(r,r+c.duration,""),o.adStartTime=r-f,o.adEndTime=o.adStartTime+m,e.addCue(o)}r+=c.duration}};class vx{constructor({start:e,end:i,segmentIndex:r,partIndex:o=null,appended:u=!1}){this.start_=e,this.end_=i,this.segmentIndex_=r,this.partIndex_=o,this.appended_=u}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 K8{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 bx{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 u=`
`,c=r,f=i;this.start_=c,e.forEach((m,b)=>{const S=this.storage_.get(f),x=c,w=x+m.duration,R=!!(S&&S.segmentSyncInfo&&S.segmentSyncInfo.isAppended),L=new vx({start:x,end:w,appended:R,segmentIndex:b});m.syncInfo=L;let A=c;const q=(m.parts||[]).map((U,G)=>{const $=A,W=A+U.duration,K=!!(S&&S.partsSyncInfo&&S.partsSyncInfo[G]&&S.partsSyncInfo[G].isAppended),le=new vx({start:$,end:W,appended:K,segmentIndex:b,partIndex:G});return A=W,u+=`Media Sequence: ${f}.${G} | Range: ${$} --> ${W} | Appended: ${K}
`,U.syncInfo=le,le});o.set(f,new K8(L,q)),u+=`${ox(m.resolvedUri)} | Media Sequence: ${f} | Range: ${x} --> ${w} | Appended: ${R}
`,f++,c=w}),this.end_=c,this.storage_=o,this.diagnostics_=u}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 u=o-e;let c=this.storage_.get(o).segmentSyncInfo.start;for(let f=0;f<u;f++){const m=i[f];c-=m.duration}return c}return r}isReliablePlaylist_(e,i){return e!=null&&Array.isArray(i)&&i.length}}class _x extends bx{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 Z8=86400,Py=[{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,u)=>{const c=s.getMediaSequenceSync(u);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 u=null,c=null;const f=by(e);o=o||0;for(let m=0;m<f.length;m++){const b=e.endList||o===0?m:f.length-(m+1),S=f[b],x=S.segment,w=s.timelineToDatetimeMappings[x.timeline];if(!w||!x.dateTimeObject)continue;let L=x.dateTimeObject.getTime()/1e3+w;if(x.parts&&typeof S.partIndex=="number")for(let q=0;q<S.partIndex;q++)L+=x.parts[q].duration;const A=Math.abs(o-L);if(c!==null&&(A===0||c<A))break;c=A,u={time:L,segmentIndex:S.segmentIndex,partIndex:S.partIndex}}return u}},{name:"Segment",run:(s,e,i,r,o)=>{let u=null,c=null;o=o||0;const f=by(e);for(let m=0;m<f.length;m++){const b=e.endList||o===0?m:f.length-(m+1),S=f[b],x=S.segment,w=S.part&&S.part.start||x&&x.start;if(x.timeline===r&&typeof w<"u"){const R=Math.abs(o-w);if(c!==null&&c<R)break;(!u||c===null||c>=R)&&(c=R,u={time:w,segmentIndex:S.segmentIndex,partIndex:S.partIndex})}}return u}},{name:"Discontinuity",run:(s,e,i,r,o)=>{let u=null;if(o=o||0,e.discontinuityStarts&&e.discontinuityStarts.length){let c=null;for(let f=0;f<e.discontinuityStarts.length;f++){const m=e.discontinuityStarts[f],b=e.discontinuitySequence+f+1,S=s.discontinuities[b];if(S){const x=Math.abs(o-S.time);if(c!==null&&c<x)break;(!u||c===null||c>=x)&&(c=x,u={time:S.time,segmentIndex:m,partIndex:null})}}}return u}},{name:"Playlist",run:(s,e,i,r,o)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class J8 extends j.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const i=new bx,r=new _x(i),o=new _x(i);this.mediaSequenceStorage_={main:i,audio:r,vtt:o},this.logger_=ns("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,i,r,o,u){if(i!==1/0)return Py.find(({name:m})=>m==="VOD").run(this,e,i);const c=this.runStrategies_(e,i,r,o,u);if(!c.length)return null;for(const f of c){const{syncPoint:m,strategy:b}=f,{segmentIndex:S,time:x}=m;if(S<0)continue;const w=e.segments[S],R=x,L=R+w.duration;if(this.logger_(`Strategy: ${b}. Current time: ${o}. selected segment: ${S}. Time: [${R} -> ${L}]}`),o>=R&&o<L)return this.logger_("Found sync point with exact match: ",m),m}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+Od({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))}runStrategies_(e,i,r,o,u){const c=[];for(let f=0;f<Py.length;f++){const m=Py[f],b=m.run(this,e,i,r,o,u);b&&(b.strategy=m.name,c.push({strategy:m.name,syncPoint:b}))}return c}selectSyncPoint_(e,i){let r=e[0].syncPoint,o=Math.abs(e[0].syncPoint[i.key]-i.value),u=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,u=e[c].strategy)}return this.logger_(`syncPoint for [${i.key}: ${i.value}] chosen with strategy [${u}]: [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>Z8){j.log.warn(`Not saving expired segment info. Media sequence gap ${r} is too large.`);return}for(let o=r-1;o>=0;o--){const u=e.segments[o];if(u&&typeof u.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+o,time:u.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 u=o.dateTimeObject;o.discontinuity&&i&&u&&(this.timelineToDatetimeMappings[o.timeline]=-(u.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,u=e.part;let c=this.timelines[e.timeline],f,m;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,m=i.end+c.mapping;else if(c)f=i.start+c.mapping,m=i.end+c.mapping;else return!1;return u&&(u.start=f,u.end=m),(!o.start||f<o.start)&&(o.start=f),o.end=m,!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 u=i.discontinuityStarts[o],c=i.discontinuitySequence+o+1,f=u-e.mediaIndex,m=Math.abs(f);if(!this.discontinuities[c]||this.discontinuities[c].accuracy>m){let b;f<0?b=r.start-Od({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:u}):b=r.end+Od({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:u}),this.discontinuities[c]={time:b,accuracy:m}}}}dispose(){this.trigger("dispose"),this.off()}}class e5 extends j.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 t5=GS(YS(function(){var s=function(){function A(){this.listeners={}}var q=A.prototype;return q.on=function(G,$){this.listeners[G]||(this.listeners[G]=[]),this.listeners[G].push($)},q.off=function(G,$){if(!this.listeners[G])return!1;var W=this.listeners[G].indexOf($);return this.listeners[G]=this.listeners[G].slice(0),this.listeners[G].splice(W,1),W>-1},q.trigger=function(G){var $=this.listeners[G];if($)if(arguments.length===2)for(var W=$.length,K=0;K<W;++K)$[K].call(this,arguments[1]);else for(var le=Array.prototype.slice.call(arguments,1),Y=$.length,J=0;J<Y;++J)$[J].apply(this,le)},q.dispose=function(){this.listeners={}},q.pipe=function(G){this.on("data",function($){G.push($)})},A}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(A){return A.subarray(0,A.byteLength-A[A.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const i=function(){const A=[[[],[],[],[],[]],[[],[],[],[],[]]],q=A[0],U=A[1],G=q[4],$=U[4];let W,K,le;const Y=[],J=[];let te,xe,he,be,ye,pe;for(W=0;W<256;W++)J[(Y[W]=W<<1^(W>>7)*283)^W]=W;for(K=le=0;!G[K];K^=te||1,le=J[le]||1)for(be=le^le<<1^le<<2^le<<3^le<<4,be=be>>8^be&255^99,G[K]=be,$[be]=K,he=Y[xe=Y[te=Y[K]]],pe=he*16843009^xe*65537^te*257^K*16843008,ye=Y[be]*257^be*16843008,W=0;W<4;W++)q[W][K]=ye=ye<<24^ye>>>8,U[W][be]=pe=pe<<24^pe>>>8;for(W=0;W<5;W++)q[W]=q[W].slice(0),U[W]=U[W].slice(0);return A};let r=null;class o{constructor(q){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,G,$;const W=this._tables[0][4],K=this._tables[1],le=q.length;let Y=1;if(le!==4&&le!==6&&le!==8)throw new Error("Invalid aes key size");const J=q.slice(0),te=[];for(this._key=[J,te],U=le;U<4*le+28;U++)$=J[U-1],(U%le===0||le===8&&U%le===4)&&($=W[$>>>24]<<24^W[$>>16&255]<<16^W[$>>8&255]<<8^W[$&255],U%le===0&&($=$<<8^$>>>24^Y<<24,Y=Y<<1^(Y>>7)*283)),J[U]=J[U-le]^$;for(G=0;U;G++,U--)$=J[G&3?U:U-4],U<=4||G<4?te[G]=$:te[G]=K[0][W[$>>>24]]^K[1][W[$>>16&255]]^K[2][W[$>>8&255]]^K[3][W[$&255]]}decrypt(q,U,G,$,W,K){const le=this._key[1];let Y=q^le[0],J=$^le[1],te=G^le[2],xe=U^le[3],he,be,ye;const pe=le.length/4-2;let He,ce=4;const Ce=this._tables[1],Oe=Ce[0],Be=Ce[1],ee=Ce[2],we=Ce[3],ve=Ce[4];for(He=0;He<pe;He++)he=Oe[Y>>>24]^Be[J>>16&255]^ee[te>>8&255]^we[xe&255]^le[ce],be=Oe[J>>>24]^Be[te>>16&255]^ee[xe>>8&255]^we[Y&255]^le[ce+1],ye=Oe[te>>>24]^Be[xe>>16&255]^ee[Y>>8&255]^we[J&255]^le[ce+2],xe=Oe[xe>>>24]^Be[Y>>16&255]^ee[J>>8&255]^we[te&255]^le[ce+3],ce+=4,Y=he,J=be,te=ye;for(He=0;He<4;He++)W[(3&-He)+K]=ve[Y>>>24]<<24^ve[J>>16&255]<<16^ve[te>>8&255]<<8^ve[xe&255]^le[ce++],he=Y,Y=J,J=te,te=xe,xe=he}}class u 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(q){this.jobs.push(q),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const c=function(A){return A<<24|(A&65280)<<8|(A&16711680)>>8|A>>>24},f=function(A,q,U){const G=new Int32Array(A.buffer,A.byteOffset,A.byteLength>>2),$=new o(Array.prototype.slice.call(q)),W=new Uint8Array(A.byteLength),K=new Int32Array(W.buffer);let le,Y,J,te,xe,he,be,ye,pe;for(le=U[0],Y=U[1],J=U[2],te=U[3],pe=0;pe<G.length;pe+=4)xe=c(G[pe]),he=c(G[pe+1]),be=c(G[pe+2]),ye=c(G[pe+3]),$.decrypt(xe,he,be,ye,K,pe),K[pe]=c(K[pe]^le),K[pe+1]=c(K[pe+1]^Y),K[pe+2]=c(K[pe+2]^J),K[pe+3]=c(K[pe+3]^te),le=xe,Y=he,J=be,te=ye;return W};class m{constructor(q,U,G,$){const W=m.STEP,K=new Int32Array(q.buffer),le=new Uint8Array(q.byteLength);let Y=0;for(this.asyncStream_=new u,this.asyncStream_.push(this.decryptChunk_(K.subarray(Y,Y+W),U,G,le)),Y=W;Y<K.length;Y+=W)G=new Uint32Array([c(K[Y-4]),c(K[Y-3]),c(K[Y-2]),c(K[Y-1])]),this.asyncStream_.push(this.decryptChunk_(K.subarray(Y,Y+W),U,G,le));this.asyncStream_.push(function(){$(null,e(le))})}static get STEP(){return 32e3}decryptChunk_(q,U,G,$){return function(){const W=f(q,U,G);$.set(W,q.byteOffset)}}}var b=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S;typeof window<"u"?S=window:typeof b<"u"?S=b:typeof self<"u"?S=self:S={};var x=S,w=function(q){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(q):q&&q.buffer instanceof ArrayBuffer},R=x.BigInt||Number;R("0x1"),R("0x100"),R("0x10000"),R("0x1000000"),R("0x100000000"),R("0x10000000000"),R("0x1000000000000"),R("0x100000000000000"),R("0x10000000000000000"),function(){var A=new Uint16Array([65484]),q=new Uint8Array(A.buffer,A.byteOffset,A.byteLength);return q[0]===255?"big":q[0]===204?"little":"unknown"}();const L=function(A){const q={};return Object.keys(A).forEach(U=>{const G=A[U];w(G)?q[U]={bytes:G.buffer,byteOffset:G.byteOffset,byteLength:G.byteLength}:q[U]=G}),q};self.onmessage=function(A){const q=A.data,U=new Uint8Array(q.encrypted.bytes,q.encrypted.byteOffset,q.encrypted.byteLength),G=new Uint32Array(q.key.bytes,q.key.byteOffset,q.key.byteLength/4),$=new Uint32Array(q.iv.bytes,q.iv.byteOffset,q.iv.byteLength/4);new m(U,G,$,function(W,K){self.postMessage(L({source:q.source,decrypted:K}),[K.buffer])})}}));var i5=$S(t5);const n5=s=>{let e=s.default?"main":"alternative";return s.characteristics&&s.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},Tx=(s,e)=>{s.abort(),s.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},By=(s,e)=>{e.activePlaylistLoader=s,s.load()},s5=(s,e)=>()=>{const{segmentLoaders:{[s]:i,main:r},mediaTypes:{[s]:o}}=e,u=o.activeTrack(),c=o.getActiveGroup(),f=o.activePlaylistLoader,m=o.lastGroup_;if(!(c&&m&&c.id===m.id)&&(o.lastGroup_=c,o.lastTrack_=u,Tx(i,o),!(!c||c.isMainPlaylist))){if(!c.playlistLoader){f&&r.resetEverything();return}i.resyncLoader(),By(c.playlistLoader,o)}},r5=(s,e)=>()=>{const{segmentLoaders:{[s]:i},mediaTypes:{[s]:r}}=e;r.lastGroup_=null,i.abort(),i.pause()},a5=(s,e)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[s]:r,main:o},mediaTypes:{[s]:u}}=e,c=u.activeTrack(),f=u.getActiveGroup(),m=u.activePlaylistLoader,b=u.lastTrack_;if(!(b&&c&&b.id===c.id)&&(u.lastGroup_=f,u.lastTrack_=c,Tx(r,u),!!f)){if(f.isMainPlaylist){if(!c||!b||c.id===b.id)return;const S=e.vhs.playlistController_,x=S.selectPlaylist();if(S.media()===x)return;u.logger_(`track change. Switching main audio from ${b.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(m===f.playlistLoader){By(f.playlistLoader,u);return}r.track&&r.track(c),r.resetEverything(),By(f.playlistLoader,u)}},Up={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:i},excludePlaylist:r}=e,o=i.activeTrack(),u=i.activeGroup(),c=(u.filter(m=>m.default)[0]||u[0]).id,f=i.tracks[c];if(o===f){r({error:{message:"Problem encountered loading the default audio track."}});return}j.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const m in i.tracks)i.tracks[m].enabled=i.tracks[m]===f;i.onTrackChanged()},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:i}}=e;j.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]:u}}=i;e.on("loadedmetadata",()=>{const c=e.media();u.playlist(c,o),(!r.paused()||c.endList&&r.preload()!=="none")&&u.load()}),e.on("loadedplaylist",()=>{u.playlist(e.media(),o),r.paused()||u.load()}),e.on("error",Up[s](s,i))},SUBTITLES:(s,e,i)=>{const{tech:r,requestOptions:o,segmentLoaders:{[s]:u},mediaTypes:{[s]:c}}=i;e.on("loadedmetadata",()=>{const f=e.media();u.playlist(f,o),u.track(c.activeTrack()),(!r.paused()||f.endList&&r.preload()!=="none")&&u.load()}),e.on("loadedplaylist",()=>{u.playlist(e.media(),o),r.paused()||u.load()}),e.on("error",Up[s](s,i))}},o5={AUDIO:(s,e)=>{const{vhs:i,sourceType:r,segmentLoaders:{[s]:o},requestOptions:u,main:{mediaGroups:c},mediaTypes:{[s]:{groups:f,tracks:m,logger_:b}},mainPlaylistLoader:S}=e,x=Rd(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 w in c[s]){f[w]||(f[w]=[]);for(const R in c[s][w]){let L=c[s][w][R],A;if(x?(b(`AUDIO group '${w}' label '${R}' is a main playlist`),L.isMainPlaylist=!0,A=null):r==="vhs-json"&&L.playlists?A=new Tu(L.playlists[0],i,u):L.resolvedUri?A=new Tu(L.resolvedUri,i,u):L.playlists&&r==="dash"?A=new Dy(L.playlists[0],i,u,S):A=null,L=xt({id:R,playlistLoader:A},L),Sx[s](s,L.playlistLoader,e),f[w].push(L),typeof m[R]>"u"){const q=new j.AudioTrack({id:R,kind:n5(L),enabled:!1,language:L.language,default:L.default,label:R});m[R]=q}}}o.on("error",Up[s](s,e))},SUBTITLES:(s,e)=>{const{tech:i,vhs:r,sourceType:o,segmentLoaders:{[s]:u},requestOptions:c,main:{mediaGroups:f},mediaTypes:{[s]:{groups:m,tracks:b}},mainPlaylistLoader:S}=e;for(const x in f[s]){m[x]||(m[x]=[]);for(const w in f[s][x]){if(!r.options_.useForcedSubtitles&&f[s][x][w].forced)continue;let R=f[s][x][w],L;if(o==="hls")L=new Tu(R.resolvedUri,r,c);else if(o==="dash"){if(!R.playlists.filter(q=>q.excludeUntil!==1/0).length)return;L=new Dy(R.playlists[0],r,c,S)}else o==="vhs-json"&&(L=new Tu(R.playlists?R.playlists[0]:R.resolvedUri,r,c));if(R=xt({id:w,playlistLoader:L},R),Sx[s](s,R.playlistLoader,e),m[x].push(R),typeof b[w]>"u"){const A=i.addRemoteTextTrack({id:w,kind:"subtitles",default:R.default&&R.autoselect,language:R.language,label:w},!1).track;b[w]=A}}}u.on("error",Up[s](s,e))},"CLOSED-CAPTIONS":(s,e)=>{const{tech:i,main:{mediaGroups:r},mediaTypes:{[s]:{groups:o,tracks:u}}}=e;for(const c in r[s]){o[c]||(o[c]=[]);for(const f in r[s][c]){const m=r[s][c][f];if(!/^(?:CC|SERVICE)/.test(m.instreamId))continue;const b=i.options_.vhs&&i.options_.vhs.captionServices||{};let S={label:f,language:m.language,instreamId:m.instreamId,default:m.default&&m.autoselect};if(b[S.instreamId]&&(S=xt(S,b[S.instreamId])),S.default===void 0&&delete S.default,o[c].push(xt({id:f},m)),typeof u[f]>"u"){const x=i.addRemoteTextTrack({id:S.instreamId,kind:"captions",default:S.default,language:S.language,label:S.label},!1).track;u[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},l5=(s,e)=>i=>{const{mainPlaylistLoader:r,mediaTypes:{[s]:{groups:o}}}=e,u=r.media();if(!u)return null;let c=null;u.attributes[s]&&(c=o[u.attributes[s]]);const f=Object.keys(o);if(!c)if(s==="AUDIO"&&f.length>1&&Rd(e.main))for(let m=0;m<f.length;m++){const b=o[f[m]];if(xx(b,u)){c=b;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(m=>m.id===i.id)[0]||null},u5={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}},c5=(s,{mediaTypes:e})=>()=>{const i=e[s].activeTrack();return i?e[s].activeGroup(i):null},d5=s=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(b=>{o5[b](b,s)});const{mediaTypes:e,mainPlaylistLoader:i,tech:r,vhs:o,segmentLoaders:{["AUDIO"]:u,main:c}}=s;["AUDIO","SUBTITLES"].forEach(b=>{e[b].activeGroup=l5(b,s),e[b].activeTrack=u5[b](b,s),e[b].onGroupChanged=s5(b,s),e[b].onGroupChanging=r5(b,s),e[b].onTrackChanged=a5(b,s),e[b].getActiveGroup=c5(b,s)});const f=e.AUDIO.activeGroup();if(f){const b=(f.filter(x=>x.default)[0]||f[0]).id;e.AUDIO.tracks[b].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(c.setAudio(!1),u.setAudio(!0)):c.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(b=>e[b].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(b=>e[b].onGroupChanging())});const m=()=>{e.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"})};r.audioTracks().addEventListener("change",m),r.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),o.on("dispose",()=>{r.audioTracks().removeEventListener("change",m),r.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(const b in e.AUDIO.tracks)r.audioTracks().addTrack(e.AUDIO.tracks[b])},h5=()=>{const s={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{s[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Fr,activeTrack:Fr,getActiveGroup:Fr,onGroupChanged:Fr,onTrackChanged:Fr,lastTrack_:null,logger_:ns(`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_=_n(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 f5 extends j.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_=ns("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=_n(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"},(u,c)=>{if(u){if(c.status===410){this.logger_(`manifest request 410 ${u}.`),this.logger_(`There will be no more content steering requests to ${r} this session.`),this.excludedSteeringManifestURLs.add(r);return}if(c.status===429){const b=c.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${u}.`),this.logger_(`content steering will retry in ${b} seconds.`),this.startTTLTimeout_(parseInt(b,10));return}this.logger_(`manifest failed to load ${u}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:o});let f;try{f=JSON.parse(this.request_.responseText)}catch(b){const S={errorType:j.Error.StreamingContentSteeringParserError,error:b};this.trigger({type:"error",metadata:S})}this.assignSteeringProperties_(f);const m={contentSteeringInfo:o.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:m}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const i=new B.URL(e),r=new B.URL(this.proxyServerUrl_);return r.searchParams.set("url",encodeURI(i.toString())),this.setSteeringParams_(r.toString())}decodeDataUriManifest_(e){const i=JSON.parse(B.atob(e));this.assignSteeringProperties_(i)}setSteeringParams_(e){const i=new B.URL(e),r=this.getPathway(),o=this.getBandwidth_();if(r){const u=`_${this.manifestType_}_pathway`;i.searchParams.set(u,r)}if(o){const u=`_${this.manifestType_}_throughput`;i.searchParams.set(u,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 u of o)if(this.availablePathways_.has(u))return u;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_=B.setTimeout(()=>{this.requestSteeringManifest()},i)}clearTTLTimeout_(){B.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&&(_n(e,i.serverURL)!==this.steeringManifest.reloadUri||i.defaultServiceLocation!==this.defaultPathway||i.queryBeforeStart!==this.queryBeforeStart||i.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const p5=(s,e)=>{let i=null;return(...r)=>{clearTimeout(i),i=setTimeout(()=>{s.apply(null,r)},e)}},m5=10;let Na;const g5=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],y5=function(s){return this.audioSegmentLoader_[s]+this.mainSegmentLoader_[s]},v5=function({currentPlaylist:s,buffered:e,currentTime:i,nextPlaylist:r,bufferLowWaterLine:o,bufferHighWaterLine:u,duration:c,bufferBasedABR:f,log:m}){if(!r)return j.log.warn("We received no playlist to switch to. Please check your stream."),!1;const b=`allowing switch ${s&&s.id||"null"} -> ${r.id}`;if(!s)return m(`${b} as current playlist is not set`),!0;if(r.id===s.id)return!1;const S=!!vu(e,i).length;if(!s.endList)return!S&&typeof s.partTargetDuration=="number"?(m(`not ${b} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(m(`${b} as current playlist is live`),!0);const x=yy(e,i),w=f?xi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:xi.MAX_BUFFER_LOW_WATER_LINE;if(c<w)return m(`${b} as duration < max low water line (${c} < ${w})`),!0;const R=r.attributes.BANDWIDTH,L=s.attributes.BANDWIDTH;if(R<L&&(!f||x<u)){let A=`${b} as next bandwidth < current bandwidth (${R} < ${L})`;return f&&(A+=` and forwardBuffer < bufferHighWaterLine (${x} < ${u})`),m(A),!0}if((!f||R>L)&&x>=o){let A=`${b} as forwardBuffer >= bufferLowWaterLine (${x} >= ${o})`;return f&&(A+=` and next bandwidth > current bandwidth (${R} > ${L})`),m(A),!0}return m(`not ${b} as no switching criteria met`),!1};class b5 extends j.EventTarget{constructor(e){super(),this.fastQualityChange_=p5(this.fastQualityChange_.bind(this),100);const{src:i,withCredentials:r,tech:o,bandwidth:u,externVhs:c,useCueTags:f,playlistExclusionDuration:m,enableLowInitialPlaylist:b,sourceType:S,cacheEncryptionKeys:x,bufferBasedABR:w,leastPixelDiffSelector:R,captionServices:L,experimentalUseMMS:A}=e;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:q}=e;(q===null||typeof q>"u")&&(q=1/0),Na=c,this.bufferBasedABR=!!w,this.leastPixelDiffSelector=!!R,this.withCredentials=r,this.tech_=o,this.vhs_=o.vhs,this.player_=e.player_,this.sourceType_=S,this.useCueTags_=f,this.playlistExclusionDuration=m,this.maxPlaylistRetries=q,this.enableLowInitialPlaylist=b,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:r,maxPlaylistRetries:q,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=h5(),A&&B.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new B.ManagedMediaSource,this.usingManagedMediaSource_=!0,j.log("Using ManagedMediaSource")):B.MediaSource&&(this.mediaSource=new B.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_=Si(),this.hasPlayed_=!1,this.syncController_=new J8(e),this.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new i5,this.sourceUpdater_=new mx(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new e5,this.keyStatusMap_=new Map;const U={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:L,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:u,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 Dy(i,this.vhs_,xt(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Tu(i,this.vhs_,xt(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Iy(xt(U,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Iy(xt(U,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new X8(xt(U,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((W,K)=>{function le(){o.off("vttjserror",Y),W()}function Y(){o.off("vttjsloaded",le),K()}o.one("vttjsloaded",le),o.one("vttjserror",Y),o.addWebVttScript_()})}),e);const G=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new f5(this.vhs_.xhr,G),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),g5.forEach(W=>{this[W+"_"]=y5.bind(this,W)}),this.logger_=ns("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 W=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-W,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(),u=o&&(o.id||o.uri),c=e&&(e.id||e.uri);if(u&&u!==c){this.logger_(`switch media ${u} -> ${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_=B.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(B.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 u;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)u=this.mediaTypes_.AUDIO.activeTrack();else{const f=r.main||o.length&&r[o[0]];for(const m in f)if(f[m].default){u={label:m};break}}if(!u)return i;const c=[];for(const f in r)if(r[f][u.label]){const m=r[f][u.label];if(m.playlists&&m.playlists.length)c.push.apply(c,m.playlists);else if(m.uri)c.push(m);else if(e.playlists.length)for(let b=0;b<e.playlists.length;b++){const S=e.playlists[b];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;Ty(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()),d5({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;Ty(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(Qt({},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 u=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"}),Na.Playlist.isAes(i)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),u.length&&Object.keys(r.AUDIO[u[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(),u=this.bufferHighWaterLine(),c=this.tech_.buffered();return v5({buffered:c,currentTime:r,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:u,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:m5}))});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(Qt({},o))}),this.audioSegmentLoader_.on(r,o=>{this.player_.trigger(Qt({},o))}),this.subtitleSegmentLoader_.on(r,o=>{this.player_.trigger(Qt({},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 u=e.start.timeOffset;u<0?o=Math.max(r+u,i.start(0)):o=Math.min(r,u)}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=Na.Playlist.playlistEnd(e,r),u=this.tech_.currentTime(),c=this.tech_.buffered();if(!c.length)return o-u<=Ks;const f=c.end(c.length-1);return f-u<=Ks&&o-f<=Ks}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,u=o.filter(Ip),c=u.length===1&&u[0]===e;if(o.length===1&&r!==1/0)return j.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 L=this.pathwayAttribute_(e),A=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(L),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(L)},A);return}let R=!1;o.forEach(L=>{if(L===e)return;const A=L.excludeUntil;typeof A<"u"&&A!==1/0&&(R=!0,delete L.excludeUntil)}),R&&(j.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 m=this.selectPlaylist();if(!m){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const b=i.internal?this.logger_:j.log.warn,S=i.message?" "+i.message:"";b(`${i.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${S} Switching to playlist ${m.id}.`),m.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),m.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const x=m.targetDuration/2*1e3||5*1e3,w=typeof m.lastRequest=="number"&&Date.now()-m.lastRequest<=x;return this.switchMedia_(m,"exclude",c||w)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,i){const r=[],o=e==="all";(o||e==="main")&&r.push(this.mainPlaylistLoader_);const u=[];(o||e==="audio")&&u.push("AUDIO"),(o||e==="subtitle")&&(u.push("CLOSED-CAPTIONS"),u.push("SUBTITLES")),u.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=vu(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:Na.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,m=o.end;if(!isFinite(f)||!isFinite(m))return null;const b=Na.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,r),S=Math.max(f,m-b);return Si([[f,S]])}const u=this.syncController_.getExpiredTime(r,this.duration());if(u===null)return null;const c=Na.Playlist.seekable(r,u,Na.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),u=i.start(0),c=i.end(0);return u>o||r>c?e:Si([[Math.max(r,u),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=Na.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=Ld(this.main(),i),o={},u=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(o.video=r.video||e.main.videoCodec||Vk),e.main.isMuxed&&(o.video+=`,${r.audio||e.main.audioCodec||r1}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||u)&&(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=(b,S)=>b?nd(S,this.usingManagedMediaSource_):Yg(S),f={};let m;if(["video","audio"].forEach(function(b){if(o.hasOwnProperty(b)&&!c(e[b].isFmp4,o[b])){const S=e[b].isFmp4?"browser":"muxer";f[S]=f[S]||[],f[S].push(o[b]),b==="audio"&&(m=S)}}),u&&m&&i.attributes.AUDIO){const b=i.attributes.AUDIO;this.main().playlists.forEach(S=>{(S.attributes&&S.attributes.AUDIO)===b&&S!==i&&(S.excludeUntil=1/0)}),this.logger_(`excluding audio group ${b} as ${m} does not support codec(s): "${o.audio}"`)}if(Object.keys(f).length){const b=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:b},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const b=[];if(["video","audio"].forEach(S=>{const x=(js(this.sourceUpdater_.codecs[S]||"")[0]||{}).type,w=(js(o[S]||"")[0]||{}).type;x&&w&&x.toLowerCase()!==w.toLowerCase()&&b.push(`"${this.sourceUpdater_.codecs[S]}" -> "${o[S]}"`)}),b.length){this.excludePlaylist({playlistToExclude:i,error:{message:`Codec switching not supported: ${b.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 u=Ld(this.main,o),c=[];u.audio&&!Yg(u.audio)&&!nd(u.audio,this.usingManagedMediaSource_)&&c.push(`audio codec ${u.audio}`),u.video&&!Yg(u.video)&&!nd(u.video,this.usingManagedMediaSource_)&&c.push(`video codec ${u.video}`),u.text&&u.text==="stpp.ttml.im1t"&&c.push(`text codec ${u.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=Md(js(e)),u=RS(o),c=o.video&&js(o.video)[0]||null,f=o.audio&&js(o.audio)[0]||null;Object.keys(r).forEach(m=>{const b=r[m];if(i.indexOf(b.id)!==-1||b.excludeUntil===1/0)return;i.push(b.id);const S=[],x=Ld(this.mainPlaylistLoader_.main,b),w=RS(x);if(!(!x.audio&&!x.video)){if(w!==u&&S.push(`codec count "${w}" !== "${u}"`),!this.sourceUpdater_.canChangeType()){const R=x.video&&js(x.video)[0]||null,L=x.audio&&js(x.audio)[0]||null;R&&c&&R.type.toLowerCase()!==c.type.toLowerCase()&&S.push(`video codec "${R.type}" !== "${c.type}"`),L&&f&&L.type.toLowerCase()!==f.type.toLowerCase()&&S.push(`audio codec "${L.type}" !== "${f.type}"`)}S.length&&(b.excludeUntil=1/0,this.logger_(`excluding ${b.id}: ${S.join(" && ")}`))}})}updateAdCues_(e){let i=0;const r=this.seekable();r.length&&(i=r.start(0)),Q8(e,this.cueTagsTrack_,i)}goalBufferLength(){const e=this.tech_.currentTime(),i=xi.GOAL_BUFFER_LENGTH,r=xi.GOAL_BUFFER_LENGTH_RATE,o=Math.max(i,xi.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*r,o)}bufferLowWaterLine(){const e=this.tech_.currentTime(),i=xi.BUFFER_LOW_WATER_LINE,r=xi.BUFFER_LOW_WATER_LINE_RATE,o=Math.max(i,xi.MAX_BUFFER_LOW_WATER_LINE),u=Math.max(i,xi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*r,this.bufferBasedABR?u:o)}bufferHighWaterLine(){return xi.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){lx(this.inbandTextTracks_,"com.apple.streaming",this.tech_),k8({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_),w8({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(Qt({},r))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const i=this.main();(this.contentSteeringController_.didDASHTagChange(i.uri,i.contentSteering)||(()=>{const u=this.contentSteeringController_.getAvailablePathways(),c=[];for(const f of i.playlists){const m=f.attributes.serviceLocation;if(m&&(c.push(m),!u.has(m)))return!0}return!!(!c.length&&u.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const r=this.main().playlists,o=new Set;let u=!1;Object.keys(r).forEach(c=>{const f=r[c],m=this.pathwayAttribute_(f),b=m&&e!==m;f.excludeUntil===1/0&&f.lastExcludeReason_==="content-steering"&&!b&&(delete f.excludeUntil,delete f.lastExcludeReason_,u=!0);const x=!f.excludeUntil&&f.excludeUntil!==1/0;!o.has(f.id)&&b&&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 m=f.activePlaylistLoader.media_;m&&m.attributes.serviceLocation!==e&&(u=!0)}}),u&&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 m=r.get(c);if(!m){i.filter(S=>S.attributes["PATHWAY-ID"]===f["BASE-ID"]).forEach(S=>{this.mainPlaylistLoader_.addClonePathway(f,S)}),this.contentSteeringController_.addAvailablePathway(c);continue}this.equalPathwayClones_(m,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 u in r)if(r[u]!==o[u])return!1;for(const u in o)if(r[u]!==o[u])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(u=>{const c="usable",f=this.keyStatusMap_.has(u)&&this.keyStatusMap_.get(u)===c,m=r.lastExcludeReason_===i&&r.excludeUntil===1/0;f?f&&m&&(delete r.excludeUntil,delete r.lastExcludeReason_,this.logger_(`enabling playlist ${r.id} because key ID ${u} 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 ${u} 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,u=r.excludeUntil===1/0&&r.lastExcludeReason_===i;o&&u&&(delete r.excludeUntil,j.log.warn(`enabling non-HD playlist ${r.id} because all playlists were excluded due to ${i} key IDs`))})}addKeyStatus_(e,i){const u=(typeof e=="string"?e:G8(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${i}' with key ID ${u} added to the keyStatusMap`),this.keyStatusMap_.set(u,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 _5=(s,e,i)=>r=>{const o=s.main.playlists[e],u=_y(o),c=Ip(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&&!u&&(r?(i(o),s.trigger({type:"renditionenabled",metadata:f})):s.trigger({type:"renditiondisabled",metadata:f})),r};class T5{constructor(e,i,r){const{playlistController_:o}=e,u=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=Ld(o.main(),i),this.playlist=i,this.id=r,this.enabled=_5(e.playlists,i.id,u)}}const S5=function(s){s.representations=()=>{const e=s.playlistController_.main(),i=Rd(e)?s.playlistController_.getAudioTrackPlaylists_():e.playlists;return i?i.filter(r=>!_y(r)).map((r,o)=>new T5(s,r,r.id)):[]}},Cx=["seeking","seeked","pause","playing","error"];class x5 extends j.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_=ns("PlaybackWatcher"),this.logger_("initialize");const i=()=>this.monitorCurrentTime_(),r=()=>this.monitorCurrentTime_(),o=()=>this.techWaiting_(),u=()=>this.resetTimeUpdate_(),c=this.playlistController_,f=["main","subtitle","audio"],m={};f.forEach(S=>{m[S]={reset:()=>this.resetSegmentDownloads_(S),updateend:()=>this.checkSegmentDownloads_(S)},c[`${S}SegmentLoader_`].on("appendsdone",m[S].updateend),c[`${S}SegmentLoader_`].on("playlistupdate",m[S].reset),this.tech_.on(["seeked","seeking"],m[S].reset)});const b=S=>{["main","audio"].forEach(x=>{c[`${x}SegmentLoader_`][S]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),b("off"))},this.clearSeekingAppendCheck_=()=>b("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),b("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",o),this.tech_.on(Cx,u),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(Cx,u),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",m[S].updateend),c[`${S}SegmentLoader_`].off("playlistupdate",m[S].reset),this.tech_.off(["seeked","seeking"],m[S].reset)}),this.checkCurrentTimeTimeout_&&B.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&B.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=B.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_(),u=dR(this[`${e}Buffered_`],o);if(this[`${e}Buffered_`]=o,u){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:Bo(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+Ks>=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(Si([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 u;if(o&&(u=i.end(i.length-1)),this.beforeSeekableWindow_(i,r)){const L=i.start(0);u=L+(L===i.end(0)?0:Ks)}if(typeof u<"u")return this.logger_(`Trying to seek outside of seekable at time ${r} with seekable range ${fS(i)}. Seeking to ${u}.`),this.tech_.setCurrentTime(u),!0;const c=this.playlistController_.sourceUpdater_,f=this.tech_.buffered(),m=c.audioBuffer?c.audioBuffered():null,b=c.videoBuffer?c.videoBuffered():null,S=this.media(),x=S.partTargetDuration?S.partTargetDuration:(S.targetDuration-Qs)*2,w=[m,b];for(let L=0;L<w.length;L++){if(!w[L])continue;if(yy(w[L],r)<x)return!1}const R=Lp(f,r);return R.length===0?!1:(u=R.start(0)+Ks,this.logger_(`Buffered region starts (${R.start(0)}) just beyond seek point (${r}). Seeking to ${u}.`),this.tech_.setCurrentTime(u),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),i=this.tech_.buffered(),r=vu(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=Lp(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 u=e.end(e.length-1)+Ks;const c=!r.endList,f=typeof r.partTargetDuration=="number";return c&&(f||o)&&(u=e.end(e.length-1)+r.targetDuration*3),i>u}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 u=vu(e,r-3),c=vu(e,r),f=vu(i,r);f.length&&!c.length&&u.length&&(o={start:u.end(0),end:f.end(0)})}else Lp(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=Lp(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)+Qs);const u={gapInfo:{from:r,to:o.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:u}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,i){const r=lR(e);for(let o=0;o<r.length;o++){const u=r.start(o),c=r.end(o);if(i-u<4&&i-u>2)return{start:u,end:c}}return null}}const E5={errorInterval:30,getSource(s){const i=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return s(i)}},wx=function(s,e){let i=0,r=0;const o=xt(E5,e);s.ready(()=>{s.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const u=function(){r&&s.currentTime(r)},c=function(S){S!=null&&(r=s.duration()!==1/0&&s.currentTime()||0,s.one("loadedmetadata",u),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"){j.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return i=Date.now(),o.getSource.call(s,c)},m=function(){s.off("loadedmetadata",u),s.off("error",f),s.off("dispose",m)},b=function(S){m(),wx(s,S)};s.on("error",f),s.on("dispose",m),s.reloadSourceOnError=b},C5=function(s){wx(this,s)};var Ax="3.17.0",w5="7.1.0",A5="1.3.1",D5="7.2.0",k5="4.0.2";const Xt={PlaylistLoader:Tu,Playlist:Tn,utils:NR,STANDARD_PLAYLIST_SELECTOR:ax,INITIAL_PLAYLIST_SELECTOR:T8,lastBandwidthSelector:ax,movingAverageBandwidthSelector:b8,comparePlaylistBandwidth:My,comparePlaylistResolution:v8,xhr:PS()};Object.keys(xi).forEach(s=>{Object.defineProperty(Xt,s,{get(){return j.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),xi[s]},set(e){if(j.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){j.log.warn(`value of Vhs.${s} must be greater than or equal to 0`);return}xi[s]=e}})});const Dx="videojs-vhs",kx=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"})},O5=function(s,e){e.representations().forEach(i=>{s.addQualityLevel(i)}),kx(s,e.playlists)};Xt.canPlaySource=function(){return j.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const R5=(s,e,i)=>{if(!s)return s;let r={};e&&e.attributes&&e.attributes.CODECS&&(r=Md(js(e.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(r.audio=i.attributes.CODECS);const o=jl(r.video),u=jl(r.audio),c={};for(const f in s)c[f]={},u&&(c[f].audioContentType=u),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 xt(s,c)},M5=(s,e)=>s.reduce((i,r)=>{if(!r.contentProtection)return i;const o=e.reduce((u,c)=>{const f=r.contentProtection[c];return f&&f.pssh&&(u[c]={pssh:f.pssh}),u},{});return Object.keys(o).length&&i.push(o),i},[]),L5=({player:s,sourceKeySystems:e,audioMedia:i,mainPlaylists:r})=>{if(!s.eme.initializeMediaKeys)return Promise.resolve();const o=i?r.concat([i]):r,u=M5(o,Object.keys(e)),c=[],f=[];return u.forEach(m=>{f.push(new Promise((b,S)=>{s.tech_.one("keysessioncreated",b)})),c.push(new Promise((b,S)=>{s.eme.initializeMediaKeys({keySystems:m},x=>{if(x){S(x);return}b()})}))}),Promise.race([Promise.all(c),Promise.race(f)])},I5=({player:s,sourceKeySystems:e,media:i,audioMedia:r})=>{const o=R5(e,i,r);return o?(s.currentSource().keySystems=o,o&&!s.eme?(j.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Ox=()=>{if(!B.localStorage)return null;const s=B.localStorage.getItem(Dx);if(!s)return null;try{return JSON.parse(s)}catch{return null}},N5=s=>{if(!B.localStorage)return!1;let e=Ox();e=e?xt(e,s):s;try{B.localStorage.setItem(Dx,JSON.stringify(e))}catch{return!1}return e},P5=s=>s.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(s.substring(s.indexOf(",")+1)):s,Rx=(s,e)=>{s._requestCallbackSet||(s._requestCallbackSet=new Set),s._requestCallbackSet.add(e)},Mx=(s,e)=>{s._responseCallbackSet||(s._responseCallbackSet=new Set),s._responseCallbackSet.add(e)},Lx=(s,e)=>{s._requestCallbackSet&&(s._requestCallbackSet.delete(e),s._requestCallbackSet.size||delete s._requestCallbackSet)},Ix=(s,e)=>{s._responseCallbackSet&&(s._responseCallbackSet.delete(e),s._responseCallbackSet.size||delete s._responseCallbackSet)};Xt.supportsNativeHls=function(){if(!me||!me.createElement)return!1;const s=me.createElement("video");return j.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}(),Xt.supportsNativeDash=function(){return!me||!me.createElement||!j.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(me.createElement("video").canPlayType("application/dash+xml"))}(),Xt.supportsTypeNatively=s=>s==="hls"?Xt.supportsNativeHls:s==="dash"?Xt.supportsNativeDash:!1,Xt.isSupported=function(){return j.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Xt.xhr.onRequest=function(s){Rx(Xt.xhr,s)},Xt.xhr.onResponse=function(s){Mx(Xt.xhr,s)},Xt.xhr.offRequest=function(s){Lx(Xt.xhr,s)},Xt.xhr.offResponse=function(s){Ix(Xt.xhr,s)};const B5=j.getComponent("Component");class Nx extends B5{constructor(e,i,r){if(super(i,r.vhs),typeof r.initialBandwidth=="number"&&(this.options_.bandwidth=r.initialBandwidth),this.logger_=ns("VhsHandler"),i.options_&&i.options_.playerId){const o=j.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(me,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],o=>{const u=me.fullscreenElement||me.webkitFullscreenElement||me.mozFullScreenElement||me.msFullscreenElement;u&&u.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_=xt(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=Ox();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=xi.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===xi.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=P5(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Xt,this.options_.sourceType=a1(i),this.options_.seekTo=u=>{this.tech_.setCurrentTime(u)},this.options_.player_=this.player_,this.playlistController_=new b5(this.options_);const r=xt({liveRangeSafeTimeDelta:Ks},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new x5(r),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const u=j.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}),u.error(c)});const o=this.options_.bufferBasedABR?Xt.movingAverageBandwidthSelector(.55):Xt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.playlistController_.selectInitialPlaylist=Xt.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(u){this.playlistController_.selectPlaylist=u.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(u){this.playlistController_.mainSegmentLoader_.throughput.rate=u,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let u=this.playlistController_.mainSegmentLoader_.bandwidth;const c=B.navigator.connection||B.navigator.mozConnection||B.navigator.webkitConnection,f=1e7;if(this.options_.useNetworkInformationApi&&c){const m=c.downlink*1e3*1e3;m>=f&&u>=f?u=Math.max(u,m):u=m}return u},set(u){this.playlistController_.mainSegmentLoader_.bandwidth=u,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const u=1/(this.bandwidth||1);let c;return this.throughput>0?c=1/this.throughput:c=0,Math.floor(1/(u+c))},set(){j.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:()=>Bo(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:()=>Bo(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&&N5({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{S5(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_=B.URL.createObjectURL(this.playlistController_.mediaSource),(j.browser.IS_ANY_SAFARI||j.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"),L5({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=I5({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=j.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{O5(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{kx(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Ax,"mux.js":w5,"mpd-parser":A5,"m3u8-parser":D5,"aes-decrypter":k5}}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_&&B.URL.revokeObjectURL&&(B.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,i){return jR({playlist:this.playlistController_.media(),time:e,callback:i})}seekToProgramTime(e,i,r=!0,o=2){return HS({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=>{Rx(this.xhr,e)},this.xhr.onResponse=e=>{Mx(this.xhr,e)},this.xhr.offRequest=e=>{Lx(this.xhr,e)},this.xhr.offResponse=e=>{Ix(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(Qt({},o))})}),i.forEach(r=>{this.playbackWatcher_.on(r,o=>{this.player_.trigger(Qt({},o))})})}}const qp={name:"videojs-http-streaming",VERSION:Ax,canHandleSource(s,e={}){const i=xt(j.options,e);return!i.vhs.experimentalUseMMS&&!nd("avc1.4d400d,mp4a.40.2",!1)?!1:qp.canPlayType(s.type,i)},handleSource(s,e,i={}){const r=xt(j.options,i);return e.vhs=new Nx(s,e,r),e.vhs.xhr=PS(),e.vhs.setupXhrHooks_(),e.vhs.src(s.src,s.type),e.vhs},canPlayType(s,e){const i=a1(s);if(!i)return"";const r=qp.getOverrideNative(e);return!Xt.supportsTypeNatively(i)||r?"maybe":""},getOverrideNative(s={}){const{vhs:e={}}=s,i=!(j.browser.IS_ANY_SAFARI||j.browser.IS_IOS),{overrideNative:r=i}=e;return r}};(()=>nd("avc1.4d400d,mp4a.40.2",!0))()&&j.getTech("Html5").registerSourceHandler(qp,0),j.VhsHandler=Nx,j.VhsSourceHandler=qp,j.Vhs=Xt,j.use||j.registerComponent("Vhs",Xt),j.options.vhs=j.options.vhs||{},(!j.getPlugin||!j.getPlugin("reloadSourceOnError"))&&j.registerPlugin("reloadSourceOnError",C5);const tI="",U5=j.getComponent("Component");class Px extends U5{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"}),u=j.dom.createEl("div",{className:"vjs-related-videos-title"});u.textContent="More Videos";const c=j.dom.createEl("div",{className:"vjs-related-videos-grid"});return r&&Array.isArray(r)&&r.length>0?r.forEach(f=>{const m=this.createVideoItem(f);c.appendChild(m)}):this.createSampleVideos().slice(0,this.getMaxVideosForScreen()).forEach(m=>{const b=this.createVideoItem(m);c.appendChild(b)}),o.appendChild(u),o.appendChild(c),o}createVideoItem(e){const i=j.dom.createEl("div",{className:"vjs-related-video-item"}),r=e.thumbnail||this.getPlaceholderImage(e.title),o=j.dom.createEl("img",{className:"vjs-related-video-thumbnail",src:r,alt:e.title,loading:"lazy",onerror:()=>{o.src=this.getPlaceholderImage(e.title)}}),u=j.dom.createEl("div",{className:"vjs-related-video-overlay"}),c=j.dom.createEl("div",{className:"vjs-related-video-title"});c.textContent=e.title;const f=j.dom.createEl("div",{className:"vjs-related-video-meta"}),m=j.dom.createEl("div",{className:"vjs-related-video-author"});m.textContent=e.author;const b=j.dom.createEl("div",{className:"vjs-related-video-views"});b.textContent=e.views,f.appendChild(m),f.appendChild(b);const S=j.dom.createEl("div",{className:"vjs-related-video-duration"}),x=w=>{if(!w||w===0)return"";const R=Math.floor(w/60),L=Math.floor(w%60);return`${R}:${L.toString().padStart(2,"0")}`};return S.textContent=x(e.duration),u.appendChild(c),u.appendChild(f),i.appendChild(o),i.appendChild(u),e.duration&&e.duration>0&&i.appendChild(S),i.addEventListener("click",()=>{window.location.href=`/view?m=${e.id}`}),i}getPlaceholderImage(e){const i=["#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7","#DDA0DD","#98D8C8","#F7DC6F","#BB8FCE","#85C1E9"];let r=0;for(let b=0;b<e.length;b++)r=e.charCodeAt(b)+((r<<5)-r);const o=Math.abs(r)%i.length,u=i[o],c=e.charAt(0).toUpperCase(),f=document.createElement("canvas");f.width=320,f.height=180;const m=f.getContext("2d");m.fillStyle=u,m.fillRect(0,0,320,180),m.fillStyle="rgba(255, 255, 255, 0.1)";for(let b=0;b<20;b++)m.fillRect(Math.random()*320,Math.random()*180,2,2);return m.fillStyle="white",m.font="bold 48px Arial",m.textAlign="center",m.textBaseline="middle",m.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"}}j.registerComponent("EndScreenOverlay",Px);const iI="",q5=j.getComponent("Component");class Bx extends q5{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.countdownInterval=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,m,b;const e=super.createEl("div",{className:"vjs-autoplay-countdown-overlay"}),i=((c=this.nextVideoData)==null?void 0:c.title)||"Next Video",r=((f=this.nextVideoData)==null?void 0:f.thumbnail)||"";e.innerHTML=`
<div class="autoplay-countdown-content">
<div class="autoplay-countdown-header">
<h3>Up next in <span class="countdown-timer">${this.countdownSeconds}</span></h3>
</div>
<div class="autoplay-countdown-video-info">
${r?`<div class="next-video-thumbnail">
<img src="${r}" alt="${i}" />
<div class="play-overlay">
<svg viewBox="0 0 24 24" width="28" height="28" fill="currentColor">
<path d="M8 5v14l11-7z"/>
</svg>
</div>
</div>`:""}
<div class="next-video-details">
<h4 class="next-video-title">${i}</h4>
${(m=this.nextVideoData)!=null&&m.author?`<p class="next-video-author">${this.nextVideoData.author}</p>`:""}
${(b=this.nextVideoData)!=null&&b.duration?`<p class="next-video-duration">${this.formatDuration(this.nextVideoData.duration)}</p>`:""}
</div>
</div>
<div class="autoplay-countdown-actions">
<button class="autoplay-play-button" type="button">
<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" fill="currentColor">
<path d="M8 5v14l11-7z"/>
</svg>
Play Now
</button>
<button class="autoplay-cancel-button" type="button">
<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" fill="currentColor">
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</svg>
Cancel
</button>
</div>
</div>
`;const o=e.querySelector(".autoplay-play-button"),u=e.querySelector(".autoplay-cancel-button");return o&&o.addEventListener("click",S=>{S.preventDefault(),this.handlePlayNext()}),u&&u.addEventListener("click",S=>{S.preventDefault(),this.handleCancel()}),e.style.display="none",e}startCountdown(){this.isActive=!0,this.currentCountdown=this.countdownSeconds,this.show(),this.updateCountdownDisplay(),this.countdownInterval=setInterval(()=>{this.currentCountdown--,this.updateCountdownDisplay(),this.currentCountdown<=0&&(this.stopCountdown(),this.handlePlayNext())},1e3)}stopCountdown(){this.isActive=!1,this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null),this.hide()}updateCountdownDisplay(){const e=this.el().querySelector(".countdown-timer");e&&(e.textContent=this.currentCountdown)}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",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,o,u;if(this.nextVideoData=e,this.el()){const c=((i=this.nextVideoData)==null?void 0:i.title)||"Next Video",f=((r=this.nextVideoData)==null?void 0:r.thumbnail)||"",m=this.el().querySelector(".autoplay-countdown-video-info");m&&(m.innerHTML=`
${f?`<div class="next-video-thumbnail">
<img src="${f}" alt="${c}" />
<div class="play-overlay">
<svg viewBox="0 0 24 24" width="28" height="28" fill="currentColor">
<path d="M8 5v14l11-7z"/>
</svg>
</div>
</div>`:""}
<div class="next-video-details">
<h4 class="next-video-title">${c}</h4>
${(o=this.nextVideoData)!=null&&o.author?`<p class="next-video-author">${this.nextVideoData.author}</p>`:""}
${(u=this.nextVideoData)!=null&&u.duration?`<p class="next-video-duration">${this.formatDuration(this.nextVideoData.duration)}</p>`:""}
</div>
`)}}dispose(){this.stopCountdown(),super.dispose()}}j.registerComponent("AutoplayCountdownOverlay",Bx);const F5=j.getComponent("Component");class Ux extends F5{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 u=0;u<i.length;u++)if(i[u].kind==="chapters"){r=i[u];break}if(!r||!r.cues)return;this.chaptersData=[];for(let u=0;u<r.cues.length;u++){const c=r.cues[u];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 u=0;u<r.cues.length;u++){const c=r.cues[u],f=this.createMarker(c,o);this.el().appendChild(f)}this.setupProgressBarHover()}}setupProgressBarHover(){const e=this.player().getChild("controlBar").getChild("progressControl");if(!e)return;const i=e.getChild("seekBar");if(!i)return;const r=i.el();if((!this.tooltip||!this.tooltip.nodeType)&&(this.tooltip=j.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=j.dom.createEl("div",{className:"chapter-title"}),this.chapterInfo=j.dom.createEl("div",{className:"chapter-info"}),this.positionInfo=j.dom.createEl("div",{className:"position-info"}),this.chapterImage=j.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)),!r.querySelector(".vjs-chapter-floating-tooltip"))try{r.appendChild(this.tooltip)}catch{return}const o=e.el();o.removeEventListener("mouseenter",this.handleMouseEnter),o.removeEventListener("mouseleave",this.handleMouseLeave),o.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=u=>{this.isHovering&&this.updateChapterTooltip(u,r,o)},o.addEventListener("mouseenter",this.handleMouseEnter),o.addEventListener("mouseleave",this.handleMouseLeave),o.addEventListener("mousemove",this.handleMouseMove)}updateChapterTooltip(e,i,r){if(!this.tooltip||!this.isHovering)return;const o=this.player().duration();if(!o)return;const u=i.getBoundingClientRect(),c=r.getBoundingClientRect(),f=e.clientX-u.left,b=Math.max(0,Math.min(1,f/u.width))*o,S=e.clientX-c.left,x=this.findChapterAtTime(b);if(x){const q=$=>{const W=Math.floor($/60),K=Math.floor($%60);return`${W}:${K.toString().padStart(2,"0")}`},U=q(x.startTime),G=q(x.endTime);this.chapterTitle.textContent=x.chapterTitle,this.chapterInfo.textContent=`${U} - ${G}`,this.updateSpriteThumbnail(b),this.chapterImage.style.display="block"}else this.chapterTitle.textContent="",this.chapterInfo.textContent="",this.updateSpriteThumbnail(b),this.chapterImage.style.display="block";this.tooltip.style.visibility="hidden",this.tooltip.style.display="block";const w=this.tooltip.offsetWidth||240,R=c.width,L=w/2;let A=S;A-L<0?A=L+5:A+L>R&&(A=R-L-5),this.tooltip.style.left=`${A}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:u}=r,c=r.seconds||10,f=this.player().duration()||45,m=Math.ceil(f/c),b=Math.min(m,6);let S=Math.floor(e/c);S=Math.min(S,b-1);const x=S,R=-(0*o),L=-(x*u);if(this.chapterImage.style.backgroundImage=`url("${i}")`,this.chapterImage.style.backgroundPosition=`${R}px ${L}px`,this.chapterImage.style.backgroundSize="auto",this.chapterImage.style.backgroundRepeat="no-repeat",this.chapterImage.style.display="block",S>=3&&e>30){const A=-(2*u);this.chapterImage.style.backgroundPosition=`${R}px ${A}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=j.dom.createEl("div",{className:"vjs-chapter-marker"}),o=e.startTime/i*100;r.style.left=o+"%";const u=j.dom.createEl("div",{className:"vjs-chapter-marker-tooltip"});return u.textContent=e.chapterTitle,r.appendChild(u),r.addEventListener("click",c=>{c.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()}}j.registerComponent("ChapterMarkers",Ux);const H5=j.getComponent("Component");class qx extends H5{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(){const e=this.player().getChild("controlBar").getChild("progressControl");if(!e)return;const i=e.getChild("seekBar");if(!i)return;const r=i.el();if(!this.previewSprite||!this.previewSprite.url)return;if((!this.tooltip||!this.tooltip.nodeType)&&(this.tooltip=j.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=j.dom.createEl("div",{className:"sprite-image-preview"}),Object.assign(this.spriteImage.style,{display:"block",overflow:"hidden"}),this.tooltip.appendChild(this.spriteImage)),!r.querySelector(".vjs-sprite-preview-tooltip"))try{r.appendChild(this.tooltip)}catch(u){console.warn("Could not append sprite preview tooltip:",u);return}const o=e.el();o.removeEventListener("mouseenter",this.handleMouseEnter),o.removeEventListener("mouseleave",this.handleMouseLeave),o.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=u=>{this.isHovering&&this.updateSpriteTooltip(u,r,o)},o.addEventListener("mouseenter",this.handleMouseEnter),o.addEventListener("mouseleave",this.handleMouseLeave),o.addEventListener("mousemove",this.handleMouseMove)}updateSpriteTooltip(e,i,r){if(!this.tooltip||!this.isHovering)return;const o=this.player().duration();if(!o)return;const u=i.getBoundingClientRect(),c=r.getBoundingClientRect(),f=e.clientX-u.left,b=Math.max(0,Math.min(1,f/u.width))*o,S=e.clientX-c.left;this.updateSpriteThumbnail(b),this.tooltip.style.visibility="hidden",this.tooltip.style.display="block";const x=this.tooltip.offsetWidth||172,w=c.width,R=x/2;let L=S;L-R<0?L=R+5:L+R>w&&(L=w-R-5),this.tooltip.style.left=`${L}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:u}=r,c=r.seconds||10,f=this.player().duration()||45,m=Math.ceil(f/c),b=Math.min(m,6);let S=Math.floor(e/c);S=Math.min(S,b-1);const x=S,R=-(0*o),L=-(x*u);if(this.spriteImage.style.backgroundImage=`url("${i}")`,this.spriteImage.style.backgroundPosition=`${R}px ${L}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 A=-(2*u);this.spriteImage.style.backgroundPosition=`${R}px ${A}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()}}j.registerComponent("SpritePreview",qx);const j5=j.getComponent("Button");class Fx extends j5{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=j.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=j.dom.createEl("span",{className:"vjs-control-text"});return r.textContent="Next Video",e.appendChild(i),e.appendChild(r),e}handleClick(){this.player().trigger("nextVideo")}}j.registerComponent("NextVideoButton",Fx);const z5=j.getComponent("Button");class Hx extends z5{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=j.dom.createEl("span",{"aria-hidden":"true",className:"vjs-autoplay-icon"}),this.isAutoplayEnabled?this.iconSpan.innerHTML='<span style="font-size: 1.2em; color: #ff4444;">●</span>':this.iconSpan.innerHTML='<span style="font-size: 1.2em; color: #ccc;">○</span>';const i=j.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=`<span style="transform: inherit !important; margin: 20px 0 0; font-size: 1.2em; color: #ff4444;">
<svg width="198" height="100" viewBox="0 0 198 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect y="18" width="180" height="64" rx="32" fill="white"/>
<rect x="98" width="100" height="100" rx="50" fill="white"/>
<path d="M133 69L163 50L133 31V69ZM138.455 59.0929V40.9071L152.773 50L138.455 59.0929Z" fill="#1C1B1F"/>
</svg>
</span>`,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=`<span style="transform: inherit !important; margin: 20px 0 0; font-size: 1.2em; color: #ccc;">
<svg width="198" height="100" viewBox="0 0 198 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="18" y="18" width="180" height="64" rx="32" fill="white"/>
<rect width="100" height="100" rx="50" fill="white"/>
<path d="M52.1429 65V35H65V65H52.1429ZM35 65V35H47.8571V65H35ZM56.4286 60.7143H60.7143V39.2857H56.4286V60.7143ZM39.2857 60.7143H43.5714V39.2857H39.2857V60.7143Z" fill="#1C1B1F"/>
</svg>
</span>`,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){let i=0;e.addEventListener("touchstart",r=>{i=Date.now()},{passive:!0}),e.addEventListener("touchend",r=>{Date.now()-i<500&&(r.preventDefault(),r.stopPropagation(),e.classList.add("touch-active"),setTimeout(()=>{e.classList.remove("touch-active")},2e3))},{passive:!1})}}j.registerComponent("AutoplayToggleButton",Hx);const V5=j.getComponent("Component");class Uy extends V5{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=j.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 u=this.formatTime(isNaN(i)?0:i),c=this.formatTime(isNaN(r)?0:r);o.textContent=`${u} / ${c}`}}formatTime(e){const{customPrefix:i,customSuffix:r}=this.options_,o=Math.floor(e/3600),u=Math.floor(e%3600/60),c=Math.floor(e%60);let f;return o>0?f=`${o}:${u.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`:f=`${u}:${c.toString().padStart(2,"0")}`,`${i}${f}${r}`}dispose(){super.dispose()}}Uy.prototype.controlText_="Time Display",j.registerComponent("CustomRemainingTime",Uy);const $5=j.getComponent("Component");class qy extends $5{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),u=i%60;return`${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}:${String(u).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 u=document.createElement("div");u.className="chapter-title",u.innerHTML=`
<h3><a href="#">${this.seriesTitle}</a></h3>
<p><a href="#">${this.channelName}</a> <span>1 / ${this.chaptersData.length}</span></p>
`,o.appendChild(u),this.currentChapterSpan=u.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 m=document.createElement("div");m.className="chapter-body",m.style.cssText+=`
-webkit-overflow-scrolling: touch;
touch-action: pan-y;
overscroll-behavior: contain;
`,i.appendChild(m);const b=document.createElement("ul");m.appendChild(b),this.chaptersList=b,this.chaptersData.forEach((S,x)=>{const w=document.createElement("li"),R=document.createElement("div");R.className=`playlist-items ${x===0?"selected":""}`;const L=document.createElement("a");L.href="#",L.onclick=pe=>pe.preventDefault();const A=document.createElement("div");A.className="playlist-drag-handle",A.textContent=x===0?"▶":String(x+1);const q=document.createElement("div");q.className="thumbnail-meta";const U=Math.max(0,Math.floor((S.endTime||S.startTime)-S.startTime)),G=Math.floor(U/3600),$=Math.floor(U%3600/60),W=U%60,K=G>0?`${String(G).padStart(2,"0")}:${String($).padStart(2,"0")}:${String(W).padStart(2,"0")}`:`${String($).padStart(2,"0")}:${String(W).padStart(2,"0")}`,le=document.createElement("h4");le.textContent=S.chapterTitle;const Y=document.createElement("div");Y.className="meta-sub";const J=document.createElement("span");J.className="meta-dynamic";const te=this.getChapterTimeRange(S);J.textContent=te,J.setAttribute("data-duration",K),J.setAttribute("data-time-range",te),Y.appendChild(J),q.appendChild(le),q.appendChild(Y);const xe=document.createElement("div");xe.className="thumbnail-action";const he=document.createElement("button");he.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>`,xe.appendChild(he);const be=pe=>{(pe.type==="click"||pe.type==="touchend"&&!this.isScrolling)&&(pe.preventDefault(),this.player().currentTime(S.startTime),this.overlay.style.display="none",this.updateActiveItem(x))};let ye=0;R.addEventListener("touchstart",pe=>{ye=pe.touches[0].clientY,this.isScrolling=!1},{passive:!0}),R.addEventListener("touchmove",pe=>{const He=pe.touches[0].clientY;Math.abs(He-ye)>10&&(this.isScrolling=!0)},{passive:!0}),R.addEventListener("touchend",be,{passive:!1}),R.addEventListener("click",be),L.appendChild(A),L.appendChild(q),L.appendChild(xe),R.appendChild(L),w.appendChild(R),this.chaptersList.appendChild(w)}),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,u)=>{const c=this.chaptersData[u],f=e>=c.startTime&&(u===this.chaptersData.length-1||e<this.chaptersData[u+1].startTime),m=o.querySelector(".playlist-drag-handle"),b=o.querySelector(".meta-dynamic");f?(r=u,o.classList.add("selected"),m&&(m.textContent="▶"),b&&(b.textContent=b.getAttribute("data-time-range")||this.getChapterTimeRange(c))):(o.classList.remove("selected"),m&&(m.textContent=String(u+1)),b&&(b.textContent=b.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 u=r.querySelector(".playlist-drag-handle"),c=r.querySelector(".meta-dynamic");if(o===e)r.classList.add("selected"),u&&(u.textContent="▶"),c&&(c.textContent=c.getAttribute("data-duration")||"");else if(r.classList.remove("selected"),u&&(u.textContent=String(o+1)),c){const f=c.getAttribute("data-time-range");if(f)c.textContent=f;else{const m=this.chaptersData[o];m&&(c.textContent=this.getChapterTimeRange(m))}}}),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()}}qy.prototype.controlText_="Chapters Overlay",j.registerComponent("CustomChaptersOverlay",qy);const nI="";class jx{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 u=i[o];if(u.kind==="subtitles"&&u.mode==="showing"){r=u.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 u of r){const c=i.getChild(u);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 u=0;u<r.length;u++){const c=r[u];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 u=o.track,c=o.handleClick.bind(o);o.handleClick=()=>{c(),setTimeout(()=>{u.mode==="showing"?this.setPreference("subtitleLanguage",u.language,!0):this.setPreference("subtitleLanguage",null,!0)},100)}}else if(o.label&&o.label.toLowerCase().includes("off")){const u=o.handleClick.bind(o);o.handleClick=()=>{u(),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=(u=1)=>{const c=e.textTracks();for(let b=0;b<c.length;b++){const S=c[b];S.kind==="subtitles"&&(S.mode="disabled")}const f=(b,S)=>{const x=String(b.language||b.srclang||"").toLowerCase(),w=String(S||"").toLowerCase();return!x||!w?!1:x===w||x.startsWith(w+"-")||w.startsWith(x+"-")};let m=!1;for(let b=0;b<c.length;b++){const S=c[b];if(S.kind==="subtitles"&&f(S,i)){S.mode="showing",m=!0,this.updateSubtitleMenuUI(e,S),this.updateSubtitleButtonVisualState(e,!0),this.setPreference("subtitleEnabled",!0,!0);break}}if(!m&&r)for(let b=0;b<c.length;b++){const S=c[b];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),m=!0;break}}setTimeout(()=>{this.isRestoringSubtitles=!1},600),!m&&u<5?setTimeout(()=>o(u+1),u*50):m||(console.warn("Could not find subtitle track for language:",i),this.isRestoringSubtitles=!1)};o();try{const u=e.tech_&&e.tech_.el_||e.el&&e.el().querySelector&&e.el().querySelector("video"),c=u&&u.textTracks;if(c&&typeof c.addEventListener=="function"){const f=()=>setTimeout(()=>o(1),50),m=()=>setTimeout(()=>o(1),50);c.addEventListener("addtrack",f,{once:!0}),c.addEventListener("change",m,{once:!0})}}catch{}}else try{const o=e.textTracks();for(let u=0;u<o.length;u++){const c=o[u];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 u=o.el();i?u.classList.add("vjs-subs-active"):u.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 u=e.getChild("controlBar").getChild("CustomSettingsMenu");u&&u.refreshSubtitlesSubmenu?u.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 G5=j.getComponent("Component");class Fy extends G5{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 jx,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,u={x:0,y:0},c=!1;r.addEventListener("touchstart",f=>{o=Date.now(),c=!1;const m=f.touches[0];u={x:m.clientX,y:m.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-u.x,2)+Math.pow(x.y-u.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 w=this.player().textTracks();for(let R=0;R<w.length;R++){const L=w[R];if(L.kind==="subtitles"&&L.mode==="showing"){r=L.label||L.language||"Subtitles";break}}}catch{}const o=e===1?"Normal":`${e}`,u=this.getAvailableQualities(),c=u.find(w=>w.value===i)||u[0],f=(c==null?void 0:c.displayLabel)||(c==null?void 0:c.label)||(i?String(i):"Auto"),m=`
<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>`,b=`
<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=m,this.settingsOverlay.innerHTML+=b,this.settingsOverlay.innerHTML+=S,this.hasSubtitles&&(this.settingsOverlay.innerHTML+=x),this.createSpeedSubmenu(),this.createQualitySubmenu(u,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(u=>`
<div class="quality-option ${u.value===i?"active":""}" data-quality="${u.value}">
<span class="quality-label">${u.displayLabel||u.label}</span>
${u.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 u=[];u.push({label:"Off",lang:null});for(let c=0;c<r.length;c++){const f=r[c];f.kind==="subtitles"&&u.push({label:f.label||f.language||`Track ${c}`,lang:f.language,track:f})}e.innerHTML=u.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 u=0;u<i.length;u++){const c=i[u];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,u=(r=o==null?void 0:o.data)==null?void 0:r.qualities;if(Array.isArray(u)&&u.length){const c=u.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((u,c)=>{const f=u.label||u.res||this.inferLabelFromSrc(u.src)||(c===0?"Auto":`Source ${c+1}`),m=String(f).toLowerCase();return{label:f,value:m,src:u.src,type:u.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(),m=c.label||c.value||"",S=f==="1080p"?`${m} <sup class="hd-badge">HD</sup>`:m;return{...c,value:f,label:m,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(){const e=this.player().getChild("controlBar"),i=e.getChild("fullscreenToggle");this.settingsButton&&i&&setTimeout(()=>{const r=e.children().indexOf(i);e.removeChild(this.settingsButton),e.addChild(this.settingsButton,{},r+1)},50)}setupEventListeners(){const e=this.settingsOverlay.querySelector(".settings-close-btn");if(e){const u=c=>{var m;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=(m=this.settingsButton)==null?void 0:m.el();f&&f.classList.remove("settings-clicked")};e.addEventListener("click",u),e.addEventListener("touchend",c=>{c.preventDefault(),u(c)},{passive:!1})}this.settingsOverlay.addEventListener("click",u=>{u.stopPropagation(),u.target.closest('[data-setting="playback-speed"]')&&(this.speedSubmenu.style.display="flex",this.qualitySubmenu.style.display="none"),u.target.closest('[data-setting="quality"]')&&(this.qualitySubmenu.style.display="flex",this.speedSubmenu.style.display="none"),u.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",u=>{this.touchStartY=u.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.settingsOverlay.addEventListener("touchmove",u=>{Math.abs(u.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.settingsOverlay.addEventListener("touchend",u=>{if(u.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}u.target.closest('[data-setting="playback-speed"]')&&(u.preventDefault(),this.speedSubmenu.style.display="flex",this.qualitySubmenu.style.display="none"),u.target.closest('[data-setting="quality"]')&&(u.preventDefault(),this.qualitySubmenu.style.display="flex",this.speedSubmenu.style.display="none"),u.target.closest('[data-setting="subtitles"]')&&(u.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",u=>{u.preventDefault(),u.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",u=>{u.preventDefault(),u.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",u=>{u.preventDefault(),u.stopPropagation(),this.subtitlesSubmenu.style.display="none"},{passive:!1}),this.speedSubmenu.addEventListener("click",u=>{const c=u.target.closest(".speed-option");if(c){const f=parseFloat(c.dataset.speed);this.handleSpeedChange(f,c)}}),this.speedSubmenu.addEventListener("touchstart",u=>{this.touchStartY=u.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.speedSubmenu.addEventListener("touchmove",u=>{Math.abs(u.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.speedSubmenu.addEventListener("touchend",u=>{if(u.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}const c=u.target.closest(".speed-option");if(c){u.preventDefault();const f=parseFloat(c.dataset.speed);this.handleSpeedChange(f,c)}},{passive:!1}),this.qualitySubmenu.addEventListener("click",u=>{const c=u.target.closest(".quality-option");if(c){const f=c.dataset.quality;this.handleQualityChange(f,c)}}),this.qualitySubmenu.addEventListener("touchstart",u=>{this.touchStartY=u.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.qualitySubmenu.addEventListener("touchmove",u=>{Math.abs(u.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.qualitySubmenu.addEventListener("touchend",u=>{if(u.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}const c=u.target.closest(".quality-option");if(c){u.preventDefault();const f=c.dataset.quality;this.handleQualityChange(f,c)}},{passive:!1}),this.subtitlesSubmenu.addEventListener("click",u=>{const c=u.target.closest(".subtitle-option");if(c){const f=c.dataset.lang||null;this.handleSubtitleChange(f,c)}}),this.subtitlesSubmenu.addEventListener("touchstart",u=>{this.touchStartY=u.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.subtitlesSubmenu.addEventListener("touchmove",u=>{Math.abs(u.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.subtitlesSubmenu.addEventListener("touchend",u=>{if(u.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}const c=u.target.closest(".subtitle-option");if(c){u.preventDefault();const f=c.dataset.lang||null;this.handleSubtitleChange(f,c)}},{passive:!1}),document.addEventListener("click",this.handleClickOutside),this.settingsOverlay.addEventListener("mouseover",u=>{const c=u.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",u=>{const c=u.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(u=>{u.classList.remove("active"),u.style.background="transparent";const c=u.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 u=this.settingsOverlay.querySelector(".current-quality");if(u.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(),m=c.currentTime(),b=c.playbackRate();let S=null;try{const L=c.textTracks();for(let A=0;A<L.length;A++){const q=L[A];if(q.kind==="subtitles"&&q.mode==="showing"){S=q.language||q.srclang||null;break}}}catch{}S&&(this.userPreferences.setPreference("subtitleLanguage",S,!0),this.userPreferences.setPreference("subtitleEnabled",!0,!0));const x=[];try{const L=c.remoteTextTrackEls?c.remoteTextTrackEls():[];for(let A=0;A<L.length;A++){const q=L[A];(q.kind||"").toLowerCase()==="subtitles"&&x.push({kind:"subtitles",src:q.src,srclang:q.srclang||q.track&&q.track.language||"",label:q.label||q.track&&q.track.label||"",default:!!q.default})}}catch{}if(x.length===0)try{const L=c.textTracks();for(let A=0;A<L.length;A++){const q=L[A];q.kind==="subtitles"&&q.src&&x.push({kind:"subtitles",src:q.src,srclang:q.language||"",label:q.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 w=()=>{try{x.forEach(L=>{L&&L.src&&c.addRemoteTextTrack(L,!1)})}catch{}try{c.playbackRate(b)}catch{}try{isNaN(m)||c.currentTime(m)}catch{}f?c.pause():c.play().catch(()=>{}),setTimeout(()=>{try{const L=c.textTracks();let A=!1;for(let q=0;q<L.length;q++){const U=L[q];if(U.kind==="subtitles"){const G=S&&(U.language===S||U.srclang===S);U.mode=G?"showing":"disabled",G&&(A=!0)}}if(!A){const q=this.userPreferences.getPreference("subtitleLanguage");if(q)for(let U=0;U<L.length;U++){const G=L[U];if(G.kind==="subtitles"&&(G.language===q||G.srclang===q)){G.mode="showing";break}}}}catch{}this.refreshSubtitlesSubmenu(),this.updateCurrentSubtitleDisplay(),c.trigger("texttrackchange")},150);try{const L=c.getChild("controlBar"),A=["subtitlesButton","textTrackButton","subsCapsButton"];for(const q of A){const U=L&&L.getChild(q);if(U){typeof U.show=="function"&&U.show();const G=U.el&&U.el();G&&(G.style.display="",G.style.visibility="")}}}catch{}c.removeClass("vjs-changing-resolution")},R=()=>{c.off("loadedmetadata",R),c.one("loadeddata",w)};c.one("loadedmetadata",R)}this.qualitySubmenu&&(this.qualitySubmenu.style.display="none")}handleSubtitleChange(e,i){var f;const o=this.player().textTracks();for(let m=0;m<o.length;m++){const b=o[m];b.kind==="subtitles"&&(b.mode=e&&b.language===e?"showing":"disabled")}this.userPreferences.setPreference("subtitleLanguage",e||null,!0),this.userPreferences.setPreference("subtitleEnabled",!!e,!0),this.subtitlesSubmenu.querySelectorAll(".subtitle-option").forEach(m=>{m.classList.remove("active"),m.style.background="transparent";const b=m.querySelector(".checkmark");b&&b.remove()}),i.classList.add("active"),i.style.background="rgba(255, 255, 255, 0.1)",i.insertAdjacentHTML("beforeend",'<span class="checkmark">✓</span>');const u=e?((f=i.querySelector("span"))==null?void 0:f.textContent)||e:"Off",c=this.settingsOverlay.querySelector(".current-subtitles");c&&(c.textContent=u),this.subtitlesSubmenu.style.display="none"}restoreSubtitlePreference(){const e=this.userPreferences.getPreference("subtitleLanguage");if(e){const i=(r=1)=>{try{const o=this.player(),u=o.textTracks(),c=String(e||"").toLowerCase();for(let b=0;b<u.length;b++){const S=u[b];S.kind==="subtitles"&&(S.mode="disabled")}const f=b=>{const S=String(b.language||b.srclang||"").toLowerCase();return!S||!c?!1:S===c||S.startsWith(c+"-")||c.startsWith(S+"-")};let m=!1;for(let b=0;b<u.length;b++){const S=u[b];if(S.kind==="subtitles"&&f(S)){S.mode="showing",m=!0;try{this.userPreferences.setPreference("subtitleEnabled",!0,!0)}catch{}this.refreshSubtitlesSubmenu(),this.updateCurrentSubtitleDisplay();try{o.trigger("texttrackchange")}catch{}break}}if(!m&&r<8){const b=150*r;setTimeout(()=>i(r+1),b)}}catch{r<8&&setTimeout(()=>i(r+1),150*r)}};setTimeout(()=>i(1),300);try{const r=this.player(),o=u=>r.one(u,()=>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()}}Fy.prototype.controlText_="Settings Menu",j.registerComponent("CustomSettingsMenu",Fy);const Y5=j.getComponent("Component");class zx extends Y5{constructor(e,i){super(e,i),this.seekAmount=i.seekAmount||5,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"),u=r.querySelector(".vjs-seek-indicator-text");this.showTimeout&&clearTimeout(this.showTimeout),e==="forward"?o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: 80px;
height: 80px;
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="24" height="24" 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: 10px;
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: 80px;
height: 80px;
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="24" height="24" 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: 10px;
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: 80px;
height: 80px;
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="32" height="32" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M8 5v14l11-7z"/>
</svg>
</div>
</div>
`,u.textContent="Play"):e==="pause"&&(o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: 80px;
height: 80px;
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="32" height="32" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
</svg>
</div>
</div>
`,u.textContent="Pause"),u.textContent="",r.style.cssText=`
position: absolute !important;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
z-index: 99999 !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;
`,this.showTimeout=setTimeout(()=>{this.hide()},1e3)}hide(){const e=this.el();e.style.opacity="0",setTimeout(()=>{e.style.display="none",e.style.visibility="hidden"},200)}dispose(){this.showTimeout&&clearTimeout(this.showTimeout),super.dispose()}}j.registerComponent("SeekIndicator",zx);function X5({videoId:s="default-video"}){var K,le;const e=Ri.useRef(null),i=Ri.useRef(null),r=Ri.useRef(new jx),o=Ri.useRef({}),u=s==="video-embed",c={}.VITE_DEV_MODE==="true"||window.location.hostname.includes("vercel.app"),f=Ri.useMemo(()=>typeof window<"u"&&window.MEDIA_DATA?window.MEDIA_DATA:{data:{poster_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/7dedcb56bde9463dbc0766768a99be0f_C8E5GFY.20250605_110647.mp4.jpg",chapter_data:[{startTime:"00:00:00.000",endTime:"00:00:08.295",chapterTitle:"A1 test"},{startTime:"00:00:24.295",endTime:"00:00:48.590",chapterTitle:"A2 of Marine Life"},{startTime:"00:00:48.590",endTime:"00:01:12.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:"https://demo.mediacms.io/media/original/user/markos/7dedcb56bde9463dbc0766768a99be0f.20250605_110647.mp4",hls_info:{master_file:"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/master.m3u8","1080_iframe":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-1/iframes.m3u8","720_iframe":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-2/iframes.m3u8","360_iframe":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-3/iframes.m3u8","240_iframe":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-4/iframes.m3u8","480_iframe":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-5/iframes.m3u8","1080_playlist":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-1/stream.m3u8","720_playlist":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-2/stream.m3u8","360_playlist":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-3/stream.m3u8","240_playlist":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-4/stream.m3u8","480_playlist":"https://demo.mediacms.io/media/hls/7dedcb56bde9463dbc0766768a99be0f/media-5/stream.m3u8"},encodings_info:{2160:{},1440:{},1080:{h264:{title:"h264-1080",url:"https://demo.mediacms.io/media/encoded/7/markos/7dedcb56bde9463dbc0766768a99be0f.7dedcb56bde9463dbc0766768a99be0f.20250605_110647.mp4.mp4",progress:100,size:"31.4MB",encoding_id:4688,status:"success"}},720:{h264:{title:"h264-720",url:"https://demo.mediacms.io/media/encoded/10/markos/7dedcb56bde9463dbc0766768a99be0f.7dedcb56bde9463dbc0766768a99be0f.20250605_110647.mp4.mp4",progress:100,size:"17.7MB",encoding_id:4687,status:"success"}},480:{h264:{title:"h264-480",url:"https://demo.mediacms.io/media/encoded/13/markos/7dedcb56bde9463dbc0766768a99be0f.7dedcb56bde9463dbc0766768a99be0f.20250605_110647.mp4.mp4",progress:100,size:"7.4MB",encoding_id:4686,status:"success"}},360:{h264:{title:"h264-360",url:"https://demo.mediacms.io/media/encoded/3/markos/7dedcb56bde9463dbc0766768a99be0f.7dedcb56bde9463dbc0766768a99be0f.20250605_110647.mp4.mp4",progress:100,size:"4.0MB",encoding_id:4685,status:"success"}},240:{h264:{title:"h264-240",url:"https://demo.mediacms.io/media/encoded/2/markos/7dedcb56bde9463dbc0766768a99be0f.7dedcb56bde9463dbc0766768a99be0f.20250605_110647.mp4.mp4",progress:100,size:"2.7MB",encoding_id:4684,status:"success"}},144:{}}},previewSprite:{url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/fe4933d67b884d4da507dd60e77f7438.VID_20200909_141053.mp4sprites.jpg",frame:{width:160,height:90,seconds:10}},siteUrl:"",nextLink:"https://demo.mediacms.io/view?m=YjGJafibO",urlAutoplay:!0,urlMuted:!1},[]),m=Y=>{if(typeof Y=="number")return Y;if(typeof Y!="string")return 0;const J=Y.split(":");if(J.length!==3)return 0;const te=parseInt(J[0],10)||0,xe=parseInt(J[1],10)||0,he=parseFloat(J[2])||0;return te*3600+xe*60+he},b=Ri.useMemo(()=>Y=>!Y||!Array.isArray(Y)?[]:Y.map(te=>({startTime:m(te.startTime),endTime:m(te.endTime),chapterTitle:te.chapterTitle})),[]),S=Ri.useMemo(()=>{var Y,J,te;return(Y=f==null?void 0:f.data)!=null&&Y.chapter_data&&((J=f==null?void 0:f.data)==null?void 0:J.chapter_data.length)>0?b((te=f==null?void 0:f.data)==null?void 0:te.chapter_data):c?[{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(xe=>({startTime:m(xe.startTime),endTime:m(xe.endTime),chapterTitle:xe.chapterTitle})):[]},[(K=f==null?void 0:f.data)==null?void 0:K.chapter_data,c,b]),x=(Y,J)=>J==="audio"?Y&&Y.toLowerCase().includes(".mp3")?"audio/mpeg":Y&&Y.toLowerCase().includes(".ogg")?"audio/ogg":Y&&Y.toLowerCase().includes(".wav")?"audio/wav":Y&&Y.toLowerCase().includes(".m4a")?"audio/mp4":"audio/mpeg":Y&&Y.toLowerCase().includes(".webm")?"video/webm":Y&&Y.toLowerCase().includes(".ogg")?"video/ogg":"video/mp4",w=r.current.getQualityPreference(),R=Ri.useMemo(()=>{var J,te,xe,he;const Y=()=>{var ye,pe,He,ce,Ce,Oe;const be=w;if((ye=f.data)!=null&&ye.hls_info){if(be==="auto"&&f.data.hls_info.master_file)return[{src:f.siteUrl+f.data.hls_info.master_file,type:"application/x-mpegURL",label:"Auto"}];if(be!=="auto"){const Be=`${be.replace("p","")}_playlist`;if(f.data.hls_info[Be])return[{src:f.data.hls_info[Be],type:"application/x-mpegURL",label:`${be}p`}]}if(f.data.hls_info.master_file)return[{src:f.siteUrl+f.data.hls_info.master_file,type:"application/x-mpegURL",label:"Auto"}]}if((pe=f.data)!=null&&pe.encodings_info){const Be=f.data.encodings_info,ee=w;if(ee!=="auto"){const Re=ee.replace("p","");if(Be[Re]&&Be[Re].h264&&Be[Re].h264.url)return[{src:Be[Re].h264.url,type:x(Be[Re].h264.url,(He=f.data)==null?void 0:He.media_type),label:`${Re}p`}]}const we=[],ve=Object.keys(Be).filter(Re=>Be[Re]&&Be[Re].h264&&Be[Re].h264.url).sort((Re,Ue)=>parseInt(Ue)-parseInt(Re));for(const Re of ve){const Ue=Be[Re].h264.url;we.push({src:Ue,type:x(Ue,(ce=f.data)==null?void 0:ce.media_type),label:`${Re}p`})}if(we.length>0)return we}if((Ce=f.data)!=null&&Ce.original_media_url){const Be=f.data.original_media_url;return[{src:Be,type:x(Be,(Oe=f.data)==null?void 0:Oe.media_type)}]}return[{src:"/videos/sample-video-white.mp4",type:"video/mp4"}]};return{id:((J=f.data)==null?void 0:J.friendly_token)||"default-video",title:((te=f.data)==null?void 0:te.title)||"Video",poster:(xe=f.data)!=null&&xe.poster_url?f.siteUrl+f.data.poster_url:"",previewSprite:(f==null?void 0:f.previewSprite)||{},related_media:((he=f.data)==null?void 0:he.related_media)||[],nextLink:(f==null?void 0:f.nextLink)||null,urlAutoplay:(f==null?void 0:f.urlAutoplay)||!0,urlMuted:(f==null?void 0:f.urlMuted)||!1,sources:Y()}},[f,w]),L=Ri.useMemo(()=>{var ye,pe,He,ce,Ce,Oe,Be;const J=(()=>{var we;const ee=["auto"];if((we=f.data)!=null&&we.encodings_info){const ve=Object.keys(f.data.encodings_info).filter(Re=>{const Ue=f.data.encodings_info[Re];return Ue&&Ue.h264&&Ue.h264.url}).map(Re=>`${Re}p`).sort((Re,Ue)=>parseInt(Re)-parseInt(Ue));ee.push(...ve)}else ee.push("144p","240p","360p","480p","720p","1080p","1440p","2160p");return ee})(),te=ee=>{const ve=ee.map(Ue=>{var ht;return{label:Ue.label||Ue.value||"Auto",value:(Ue.value||Ue.label||"auto").toString().toLowerCase(),src:Ue.src||Ue.url||Ue.href,type:Ue.type||x(Ue.src||Ue.url||Ue.href,(ht=f.data)==null?void 0:ht.media_type)}}).filter(Ue=>Ue.src),Re=Ue=>{const ht=J.indexOf(String(Ue).toLowerCase());return ht===-1?999:ht};return ve.sort((Ue,ht)=>Re(Ue.value)-Re(ht.value)),ve},xe=(ye=f==null?void 0:f.data)==null?void 0:ye.qualities;if(Array.isArray(xe)&&xe.length)return te(xe);if((pe=f.data)!=null&&pe.hls_info&&f.data.hls_info.master_file){const ee=f.data.hls_info,we=[];return we.push({label:"Auto",value:"auto",src:f.siteUrl+ee.master_file,type:"application/x-mpegURL"}),Object.keys(ee).forEach(ve=>{if(ve.endsWith("_playlist")){const Re=ve.replace("_playlist","");we.push({label:`${Re}p`,value:`${Re}p`,src:f.siteUrl+ee[ve],type:"application/x-mpegURL"})}}),te(we)}if((He=f.data)!=null&&He.encodings_info){const ee=f.data.encodings_info,we=[];if(we.push({label:"Auto",value:"auto",src:null,type:x(null,(ce=f.data)==null?void 0:ce.media_type)}),Object.keys(ee).forEach(ve=>{var Re;if(ee[ve]&&ee[ve].h264&&ee[ve].h264.url){const Ue=ee[ve].h264.url;we.push({label:`${ve}p`,value:`${ve}p`,src:Ue,type:x(Ue,(Re=f.data)==null?void 0:Re.media_type)})}}),we.length>1)return te(we)}const he=(R==null?void 0:R.sources)&&((Ce=R.sources[0])==null?void 0:Ce.src)||null,be=(R==null?void 0:R.sources)&&((Oe=R.sources[0])==null?void 0:Oe.type)||x(he,(Be=f.data)==null?void 0:Be.media_type);return he?te([{label:"Auto",value:"auto",src:he,type:be}]):[]},[f,R]),A=Ri.useMemo(()=>{var Y;return(Y=f==null?void 0:f.data)!=null&&Y.related_media?f.data.related_media.slice(0,12).map(J=>({id:J.friendly_token,title:J.title,author:J.user||J.author_name||"Unknown",views:`${J.views} views`,thumbnail:J.thumbnail_url||J.author_thumbnail,category:J.media_type,url:J.url,duration:J.duration,size:J.size,likes:J.likes,dislikes:J.dislikes,add_date:J.add_date,description:J.description})):[]},[f]),q=[{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}],U=((le=f==null?void 0:f.data)==null?void 0:le.subtitles_info)||(c?q:[]),G=U.length>0,$=G?U.map(Y=>({kind:"subtitles",src:Y.src,srclang:Y.srclang,label:Y.label,default:!1})):[],W=()=>{f.onClickNextCallback&&typeof f.onClickNextCallback=="function"&&f.onClickNextCallback()};return Ri.useEffect(()=>{if(e.current&&!i.current){if(e.current.player)return;const Y=setTimeout(()=>{var J;if(!i.current&&e.current&&!e.current.player){i.current=j(e.current,{controls:!0,autoplay:!0,loop:!1,muted:f.urlMuted||!1,poster:R.poster,preload:"auto",sources:R.sources,aspectRatio:"16:9",audioOnlyMode:!1,audioPosterMode:((J=f.data)==null?void 0:J.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:f.id,inactivityTimeout:2e3,language:"en",languages:{},liveui:!1,liveTracker:{trackingThreshold:20,liveTolerance:15},nativeControlsForTouch:!1,normalizeAutoplay:!0,notSupportedMessage:void 0,noUITitleAttributes:!1,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,doubleClick:!0,hotkeys:{fullscreenKey:function(he){return he.which===70},muteKey:function(he){return he.which===77},playPauseKey:function(he){return he.which===75||he.which===32},seekForwardKey:function(he){return he.which===39},seekBackwardKey:function(he){return he.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:!0,subtitlesButton:!!G,captionsButton:!1,audioTrackButton:!0,liveDisplay:!0,seekToLive:!0,customControlSpacer:!0,chaptersButton:!0},html5:{nativeControlsForTouch:!1,nativeAudioTracks:!0,nativeTextTracks:!0,nativeVideoTracks:!0,preloadTextTracks:!0},children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"]}),i.current.ready(()=>{var Ue,ht,at;if(r.current.applyToPlayer(i.current),r.current.setupAutoSave(i.current),typeof window<"u"&&(window.videojsPlayers||(window.videojsPlayers={}),window.videojsPlayers[s]=i.current),f.onPlayerInitCallback&&typeof f.onPlayerInitCallback=="function"&&f.onPlayerInitCallback({player:i.current},i.current.el()),f.urlTimestamp!==null&&f.urlTimestamp>=0){const Me=f.urlTimestamp;i.current.readyState()>=1?Me<i.current.duration()?i.current.currentTime(Me):Me>=0&&i.current.play():i.current.one("loadedmetadata",()=>{Me>=0&&Me<i.current.duration()?i.current.currentTime(Me):Me>=0&&i.current.play()})}const he=()=>document.hasFocus()||document.visibilityState==="visible"||sessionStorage.getItem("userInteracted")==="true",be=async()=>{const Me=he(),ke=r.current.getPreference("muted");try{!f.urlMuted&&Me&&ke!==!0&&i.current.muted(!1),await i.current.play()}catch{if(!i.current.muted())try{if(i.current.muted(!0),await i.current.play(),ke!==!0){const ft=()=>{i.current&&!i.current.isDisposed()&&(i.current.muted(!1),i.current.trigger("notify","🔊 Sound enabled!"))};if(Me)setTimeout(ft,100);else{setTimeout(()=>{i.current&&!i.current.isDisposed()&&i.current.trigger("notify","🔇 Click anywhere to enable sound")},1e3);const Ze=()=>{ft(),sessionStorage.setItem("userInteracted","true"),document.removeEventListener("click",Ze),document.removeEventListener("keydown",Ze),document.removeEventListener("touchstart",Ze)};document.addEventListener("click",Ze,{once:!0}),document.addEventListener("keydown",Ze,{once:!0}),document.addEventListener("touchstart",Ze,{once:!0})}}}catch(ft){console.error("❌ Even muted autoplay was blocked:",ft.message)}}};f!=null&&f.urlAutoplay,be(),setTimeout(()=>{const ke=i.current.el().querySelector("video");if(ke){ke.style.touchAction="manipulation";let ut=0,ft={x:0,y:0};const Ze=At=>{ut=Date.now();const Vt=At.touches[0];ft={x:Vt.clientX,y:Vt.clientY}},pt=At=>{if(Date.now()-ut<500){const kt=At.changedTouches[0],Ot={x:kt.clientX,y:kt.clientY};Math.sqrt(Math.pow(Ot.x-ft.x,2)+Math.pow(Ot.y-ft.y,2))<50&&(At.preventDefault(),At.stopPropagation(),i.current.paused()?i.current.play():i.current.pause())}};ke.addEventListener("touchstart",Ze,{passive:!0}),ke.addEventListener("touchend",pt,{passive:!1})}},100);const pe=i.current.getChild("controlBar"),He=pe.getChild("playToggle"),ce=pe.getChild("currentTimeDisplay"),Ce=pe.getChild("progressControl"),Oe=Ce.getChild("seekBar"),Be=pe.getChild("chaptersButton");if(new URLSearchParams(window.location.search).get("m")&&setTimeout(async()=>{if(i.current&&!i.current.isDisposed())try{await i.current.play()}catch(Me){if(console.error(" Browser prevented play:",Me.message),!i.current.muted())try{i.current.muted(!0),await i.current.play()}catch(ke){console.error(" Even muted play was blocked:",ke.message)}}},100),G)try{const Me=r.current.getPreference("subtitleLanguage"),ke=r.current.getPreference("subtitleEnabled"),ut=(Ze,pt)=>{const At=String(Ze.srclang||Ze.language||"").toLowerCase(),Vt=String(pt||"").toLowerCase();return!At||!Vt?!1:At===Vt||At.startsWith(Vt+"-")||Vt.startsWith(At+"-")};$.map(Ze=>({...Ze,default:!!(ke&&Me&&ut(Ze,Me))})).forEach(Ze=>{i.current.addRemoteTextTrack(Ze,!1)})}catch{$.forEach(ke=>{i.current.addRemoteTextTrack(ke,!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)),S&&S.length>0){const Me=i.current.addTextTrack("chapters","Chapters","en");S.forEach(ke=>{const ut=new(window.VTTCue||window.TextTrackCue)(ke.startTime,ke.endTime,ke.chapterTitle);Me.addCue(ut)})}const ve=new Uy(i.current,{displayNegative:!1,customPrefix:"",customSuffix:""});if(ce){const Me=pe.children().indexOf(ce);pe.addChild(ve,{},Me+1)}else pe.addChild(ve,{},2);if(!u&&(f!=null&&f.nextLink||c)){const Me=new Fx(i.current,{nextLink:f.nextLink}),ke=pe.children().indexOf(He);pe.addChild(Me,{},ke+1)}if(!u)try{const Me=new Hx(i.current,{userPreferences:r.current}),ke=pe.children().indexOf(Be),ut=ke>0?ke:pe.children().length-3;pe.addChild(Me,{},ut),o.current.autoplayToggleButton=Me,setTimeout(()=>{Me.updateIcon()},100)}catch(Me){console.error("✗ Failed to add autoplay toggle button:",Me)}if(setTimeout(()=>{(()=>{["subtitlesButton","playbackRateMenuButton"].forEach(ft=>{const Ze=pe.getChild(ft);if(Ze&&Ze.menuButton_){const pt=Ze.menuButton_;pt.off("mouseenter"),pt.off("mouseleave"),pt.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(Ze){const pt=Ze.el();pt&&pt.addEventListener("click",function(At){At.preventDefault(),At.stopPropagation();const Vt=pt.querySelector(".vjs-menu");Vt&&(Vt.style.display==="block"?Vt.style.display="none":(document.querySelectorAll(".vjs-menu").forEach(Sn=>{Sn!==Vt&&(Sn.style.display="none")}),Vt.style.display="block"))})}});const ut=["subtitlesButton","captionsButton","subsCapsButton"];for(const ft of ut){const Ze=pe.getChild(ft);if(Ze&&Ze.el()){const pt=Ze.el(),At=pt.querySelector(".vjs-menu");At&&(At.style.display="none");const Vt=Ot=>{Ot.preventDefault(),Ot.stopPropagation();const dt=i.current.textTracks();let xn=!1;for(let _e=0;_e<dt.length;_e++){const Ei=dt[_e];if(Ei.kind==="subtitles"&&Ei.mode==="showing"){xn=!0;break}}if(xn){for(let _e=0;_e<dt.length;_e++){const Ei=dt[_e];Ei.kind==="subtitles"&&(Ei.mode="disabled")}pt.classList.remove("vjs-subs-active");try{r.current.setPreference("subtitleEnabled",!1,!0)}catch{}}else{const _e=r.current.getPreference("subtitleLanguage");if(!_e){let ci=null;for(let $t=0;$t<dt.length;$t++){const Ci=dt[$t];if(Ci.kind==="subtitles"){ci=Ci.language;break}}if(ci){for(let $t=0;$t<dt.length;$t++){const Ci=dt[$t];Ci.kind==="subtitles"&&(Ci.mode=Ci.language===ci?"showing":"disabled")}try{r.current.setPreference("subtitleLanguage",ci,!0)}catch{}try{r.current.setPreference("subtitleEnabled",!0,!0)}catch{}pt.classList.add("vjs-subs-active")}return}let Ei=!1;for(let ci=0;ci<dt.length;ci++){const $t=dt[ci];if($t.kind==="subtitles"){const Ci=$t.language===_e;$t.mode=Ci?"showing":"disabled",Ci&&(Ei=!0)}}if(Ei){pt.classList.add("vjs-subs-active");try{r.current.setPreference("subtitleEnabled",!0,!0)}catch{}}}};pt.addEventListener("click",Vt,{capture:!0}),pt.addEventListener("touchend",Ot=>{Ot.preventDefault(),Ot.stopPropagation(),Vt(Ot)},{passive:!1}),i.current.on("texttrackchange",()=>{const Ot=i.current.textTracks();let dt=!1;for(let xn=0;xn<Ot.length;xn++){const _e=Ot[xn];if(_e.kind==="subtitles"&&_e.mode==="showing"){dt=!0;break}}dt?pt.classList.add("vjs-subs-active"):pt.classList.remove("vjs-subs-active")});const Sn=i.current.textTracks();let kt=!1;for(let Ot=0;Ot<Sn.length;Ot++){const dt=Sn[Ot];if(dt.kind==="subtitles"&&dt.mode==="showing"){kt=!0;break}}kt&&pt.classList.add("vjs-subs-active");break}}})()},1500),Ce&&Oe){if(S&&S.length>0){const ke=new Ux(i.current,{previewSprite:f.previewSprite});Oe.addChild(ke)}else if(f.previewSprite){const ke=new qx(i.current,{previewSprite:f.previewSprite});Oe.addChild(ke),setTimeout(()=>{ke.setupProgressBarHover()},100)}}setTimeout(()=>{const Me=document.createElement("div");Me.className="vjs-spacer-control vjs-control",Me.style.flex="1",Me.style.minWidth="1px",Me.style.height="100%";const ke=pe.getChild("durationDisplay");if(ke&&ke.el()){const ut=pe.el(),Ze=ke.el().nextSibling;ut.insertBefore(Me,Ze)}},300),setTimeout(()=>{try{const Me=pe.getChild("pictureInPictureToggle"),ke=pe.getChild("fullscreenToggle");Me&&(pe.removeChild(Me),pe.addChild(Me)),ke&&(pe.removeChild(ke),pe.addChild(ke))}catch(Me){console.error("✗ Failed to move PiP/Fullscreen buttons to end:",Me)}},100),S&&S.length>0&&(o.current.chaptersOverlay=new qy(i.current,{chaptersData:S,seriesTitle:((Ue=f==null?void 0:f.data)==null?void 0:Ue.title)||"Chapters",channelName:"Chapter",thumbnail:((ht=f==null?void 0:f.data)==null?void 0:ht.thumbnail_url)||((at=f==null?void 0:f.data)==null?void 0:at.author_thumbnail)||""})),o.current.settingsMenu=new Fy(i.current,{userPreferences:r.current,qualities:L,hasSubtitles:G});try{i.current.on("loadedmetadata",()=>{var Me;if(o.current.settingsMenu&&o.current.settingsMenu.setQualities){const ke=typeof window<"u"?window.MEDIA_DATA:null,ut=((Me=ke==null?void 0:ke.data)==null?void 0:Me.qualities)||L;o.current.settingsMenu.setQualities(ut)}})}catch{}o.current.seekIndicator=new zx(i.current,{seekAmount:5}),i.current.addChild(o.current.seekIndicator),o.current.seekIndicator.hide();const Re=Me=>{const ke=document.activeElement;if(ke&&(ke.tagName==="INPUT"||ke.tagName==="TEXTAREA"||ke.contentEditable==="true"))return;if(Me.code==="Space"||Me.key===" "){Me.preventDefault(),i.current&&(i.current.paused()?i.current.play():i.current.pause());return}const ft=5;if(Me.key==="ArrowRight"||Me.keyCode===39){Me.preventDefault();const Ze=i.current.currentTime(),pt=i.current.duration(),At=Math.min(Ze+ft,pt);i.current.currentTime(At),o.current.seekIndicator&&o.current.seekIndicator.show("forward",ft)}else if(Me.key==="ArrowLeft"||Me.keyCode===37){Me.preventDefault();const Ze=i.current.currentTime(),pt=Math.max(Ze-ft,0);i.current.currentTime(pt),o.current.seekIndicator&&o.current.seekIndicator.show("backward",ft)}};document.addEventListener("keydown",Re),o.current.cleanupArrowKeyHandler=()=>{document.removeEventListener("keydown",Re)}}),i.current.on("nextVideo",()=>{W()}),i.current.on("play",()=>{!i.current.isChangingQuality&&o.current.seekIndicator&&o.current.seekIndicator.show("play")}),i.current.on("pause",()=>{!i.current.isChangingQuality&&o.current.seekIndicator&&o.current.seekIndicator.show("pause")});let te=null,xe=null;i.current.on("ended",()=>{setTimeout(()=>{if(i.current&&!i.current.isDisposed()&&i.current.el()){const He=i.current.getChild("controlBar");He&&(He.show(),He.el().style.opacity="1",He.el().style.pointerEvents="auto")}},50);const he=r.current.getAutoplayPreference(),be=f.nextLink!==null;if(!u&&he&&be){let pe={title:"Next Video",author:"",duration:0,thumbnail:""};if(A.length>0){const He=A[0];pe={title:He.title||"Next Video",author:He.author||"",duration:He.duration||0,thumbnail:He.thumbnail||""}}te&&(i.current.removeChild(te),te=null),xe&&(i.current.removeChild(xe),xe=null),xe=new Bx(i.current,{nextVideoData:pe,countdownSeconds:5,onPlayNext:()=>{W()},onCancel:()=>{xe&&(i.current.removeChild(xe),xe=null),ye()}}),i.current.addChild(xe),xe.startCountdown()}else ye();function ye(){te&&(i.current.removeChild(te),te=null),te=new Px(i.current,{relatedVideos:A}),te.relatedVideos=A,i.current.addChild(te),te.show()}}),i.current.on("play",()=>{te&&te.hide(),xe&&xe.stopCountdown()}),i.current.on("seeking",()=>{te&&te.hide(),xe&&xe.stopCountdown()}),i.current.on("replay",()=>{te&&te.hide(),i.current.currentTime(0),i.current.play()}),i.current.on("error",he=>{}),i.current.on("fullscreenchange",()=>{}),i.current.on("volumechange",()=>{}),i.current.on("ratechange",()=>{}),i.current.on("texttrackchange",()=>{}),i.current.ready(()=>{if(i.current.el()){const he=i.current.el();he.setAttribute("tabindex","0"),he.focus()}}),i.current.on("fullscreenchange",()=>{setTimeout(()=>{if(i.current&&i.current.el()){const he=i.current.el();if(he.setAttribute("tabindex","0"),he.focus(),i.current.isFullscreen()){const be=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;be&&(be.setAttribute("tabindex","0"),be.focus())}}},100)})}},0);return()=>{clearTimeout(Y)}}return()=>{o.current&&o.current.cleanupArrowKeyHandler&&o.current.cleanupArrowKeyHandler(),i.current&&!i.current.isDisposed()&&(i.current.dispose(),i.current=null)}},[]),Ri.useEffect(()=>{const Y=()=>{if(i.current&&i.current.el()){const be=i.current.el();be.setAttribute("tabindex","0"),be.focus()}},J=()=>{document.hidden||setTimeout(Y,100)},te=()=>{setTimeout(Y,100)};document.addEventListener("visibilitychange",J),window.addEventListener("focus",te);const he=[100,500,1e3,2e3].map(be=>setTimeout(Y,be));return()=>{document.removeEventListener("visibilitychange",J),window.removeEventListener("focus",te),he.forEach(clearTimeout)}},[]),Fl.jsx("video",{ref:e,id:s,className:"video-js vjs-default-skin",tabIndex:"0"})}function Vx({videoId:s="default-video",...e}){return Fl.jsx(X5,{videoId:s,...e})}const Pd=()=>{const s=document.getElementById("video-js-root-main");s&&!s.hasChildNodes()&&B_.createRoot(s).render(Fl.jsx(Ri.StrictMode,{children:Fl.jsx(Vx,{videoId:"video-main"})}));const e=document.getElementById("video-js-root-embed");e&&!e.hasChildNodes()&&B_.createRoot(e).render(Fl.jsx(Ri.StrictMode,{children:Fl.jsx(Vx,{videoId:"video-embed"})}))};window.triggerVideoJSMount=Pd,document.addEventListener("triggerVideoJSMount",()=>{Pd()}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Pd):Pd(),setInterval(()=>{const s=document.getElementById("video-js-root-embed");s&&!s.hasChildNodes()&&Pd()},1e3)})();
//# sourceMappingURL=video-js.js.map