- Added virtual environment (venv) check - Added pip check - Added minimum python version check - Added requirements.txt check - Added proxy support for front/back end - Added opengraph images for each url - Added pyinstaller support
161 lines
1.1 MiB
161 lines
1.1 MiB
var hD=(b,D)=>()=>(D||b((D={exports:{}}).exports,D),D.exports);var iR=hD((uR,Th)=>{(function(){const D=document.createElement("link").relList;if(D&&D.supports&&D.supports("modulepreload"))return;for(const T of document.querySelectorAll('link[rel="modulepreload"]'))x(T);new MutationObserver(T=>{for(const j of T)if(j.type==="childList")for(const O of j.addedNodes)O.tagName==="LINK"&&O.rel==="modulepreload"&&x(O)}).observe(document,{childList:!0,subtree:!0});function N(T){const j={};return T.integrity&&(j.integrity=T.integrity),T.referrerPolicy&&(j.referrerPolicy=T.referrerPolicy),T.crossOrigin==="use-credentials"?j.credentials="include":T.crossOrigin==="anonymous"?j.credentials="omit":j.credentials="same-origin",j}function x(T){if(T.ep)return;T.ep=!0;const j=N(T);fetch(T.href,j)}})();var yD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zf(b){return b&&b.__esModule&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b}var _0={exports:{}},yh={},U0={exports:{}},Wt={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var h2;function gD(){if(h2)return Wt;h2=1;var b=Symbol.for("react.element"),D=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),O=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),v=Symbol.iterator;function A(se){return se===null||typeof se!="object"?null:(se=v&&se[v]||se["@@iterator"],typeof se=="function"?se:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I=Object.assign,ee={};function re(se,Ie,Lt){this.props=se,this.context=Ie,this.refs=ee,this.updater=Lt||z}re.prototype.isReactComponent={},re.prototype.setState=function(se,Ie){if(typeof se!="object"&&typeof se!="function"&&se!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,se,Ie,"setState")},re.prototype.forceUpdate=function(se){this.updater.enqueueForceUpdate(this,se,"forceUpdate")};function ge(){}ge.prototype=re.prototype;function Ae(se,Ie,Lt){this.props=se,this.context=Ie,this.refs=ee,this.updater=Lt||z}var oe=Ae.prototype=new ge;oe.constructor=Ae,I(oe,re.prototype),oe.isPureReactComponent=!0;var De=Array.isArray,Ge=Object.prototype.hasOwnProperty,mt={current:null},ln={key:!0,ref:!0,__self:!0,__source:!0};function xn(se,Ie,Lt){var G,It={},kt=null,dn=null;if(Ie!=null)for(G in Ie.ref!==void 0&&(dn=Ie.ref),Ie.key!==void 0&&(kt=""+Ie.key),Ie)Ge.call(Ie,G)&&!ln.hasOwnProperty(G)&&(It[G]=Ie[G]);var on=arguments.length-2;if(on===1)It.children=Lt;else if(1<on){for(var Sn=Array(on),oi=0;oi<on;oi++)Sn[oi]=arguments[oi+2];It.children=Sn}if(se&&se.defaultProps)for(G in on=se.defaultProps,on)It[G]===void 0&&(It[G]=on[G]);return{$$typeof:b,type:se,key:kt,ref:dn,props:It,_owner:mt.current}}function mn(se,Ie){return{$$typeof:b,type:se.type,key:Ie,ref:se.ref,props:se.props,_owner:se._owner}}function _(se){return typeof se=="object"&&se!==null&&se.$$typeof===b}function le(se){var Ie={"=":"=0",":":"=2"};return"$"+se.replace(/[=:]/g,function(Lt){return Ie[Lt]})}var pe=/\/+/g;function qe(se,Ie){return typeof se=="object"&&se!==null&&se.key!=null?le(""+se.key):Ie.toString(36)}function be(se,Ie,Lt,G,It){var kt=typeof se;(kt==="undefined"||kt==="boolean")&&(se=null);var dn=!1;if(se===null)dn=!0;else switch(kt){case"string":case"number":dn=!0;break;case"object":switch(se.$$typeof){case b:case D:dn=!0}}if(dn)return dn=se,It=It(dn),se=G===""?"."+qe(dn,0):G,De(It)?(Lt="",se!=null&&(Lt=se.replace(pe,"$&/")+"/"),be(It,Ie,Lt,"",function(oi){return oi})):It!=null&&(_(It)&&(It=mn(It,Lt+(!It.key||dn&&dn.key===It.key?"":(""+It.key).replace(pe,"$&/")+"/")+se)),Ie.push(It)),1;if(dn=0,G=G===""?".":G+":",De(se))for(var on=0;on<se.length;on++){kt=se[on];var Sn=G+qe(kt,on);dn+=be(kt,Ie,Lt,Sn,It)}else if(Sn=A(se),typeof Sn=="function")for(se=Sn.call(se),on=0;!(kt=se.next()).done;)kt=kt.value,Sn=G+qe(kt,on++),dn+=be(kt,Ie,Lt,Sn,It);else if(kt==="object")throw Ie=String(se),Error("Objects are not valid as a React child (found: "+(Ie==="[object Object]"?"object with keys {"+Object.keys(se).join(", ")+"}":Ie)+"). If you meant to render a collection of children, use an array instead.");return dn}function ke(se,Ie,Lt){if(se==null)return se;var G=[],It=0;return be(se,G,"","",function(kt){return Ie.call(Lt,kt,It++)}),G}function Ut(se){if(se._status===-1){var Ie=se._result;Ie=Ie(),Ie.then(function(Lt){(se._status===0||se._status===-1)&&(se._status=1,se._result=Lt)},function(Lt){(se._status===0||se._status===-1)&&(se._status=2,se._result=Lt)}),se._status===-1&&(se._status=0,se._result=Ie)}if(se._status===1)return se._result.default;throw se._result}var Ot={current:null},Ue={transition:null},gt={ReactCurrentDispatcher:Ot,ReactCurrentBatchConfig:Ue,ReactCurrentOwner:mt};function Xe(){throw Error("act(...) is not supported in production builds of React.")}return Wt.Children={map:ke,forEach:function(se,Ie,Lt){ke(se,function(){Ie.apply(this,arguments)},Lt)},count:function(se){var Ie=0;return ke(se,function(){Ie++}),Ie},toArray:function(se){return ke(se,function(Ie){return Ie})||[]},only:function(se){if(!_(se))throw Error("React.Children.only expected to receive a single React element child.");return se}},Wt.Component=re,Wt.Fragment=N,Wt.Profiler=T,Wt.PureComponent=Ae,Wt.StrictMode=x,Wt.Suspense=l,Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gt,Wt.act=Xe,Wt.cloneElement=function(se,Ie,Lt){if(se==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+se+".");var G=I({},se.props),It=se.key,kt=se.ref,dn=se._owner;if(Ie!=null){if(Ie.ref!==void 0&&(kt=Ie.ref,dn=mt.current),Ie.key!==void 0&&(It=""+Ie.key),se.type&&se.type.defaultProps)var on=se.type.defaultProps;for(Sn in Ie)Ge.call(Ie,Sn)&&!ln.hasOwnProperty(Sn)&&(G[Sn]=Ie[Sn]===void 0&&on!==void 0?on[Sn]:Ie[Sn])}var Sn=arguments.length-2;if(Sn===1)G.children=Lt;else if(1<Sn){on=Array(Sn);for(var oi=0;oi<Sn;oi++)on[oi]=arguments[oi+2];G.children=on}return{$$typeof:b,type:se.type,key:It,ref:kt,props:G,_owner:dn}},Wt.createContext=function(se){return se={$$typeof:O,_currentValue:se,_currentValue2:se,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},se.Provider={$$typeof:j,_context:se},se.Consumer=se},Wt.createElement=xn,Wt.createFactory=function(se){var Ie=xn.bind(null,se);return Ie.type=se,Ie},Wt.createRef=function(){return{current:null}},Wt.forwardRef=function(se){return{$$typeof:h,render:se}},Wt.isValidElement=_,Wt.lazy=function(se){return{$$typeof:d,_payload:{_status:-1,_result:se},_init:Ut}},Wt.memo=function(se,Ie){return{$$typeof:u,type:se,compare:Ie===void 0?null:Ie}},Wt.startTransition=function(se){var Ie=Ue.transition;Ue.transition={};try{se()}finally{Ue.transition=Ie}},Wt.unstable_act=Xe,Wt.useCallback=function(se,Ie){return Ot.current.useCallback(se,Ie)},Wt.useContext=function(se){return Ot.current.useContext(se)},Wt.useDebugValue=function(){},Wt.useDeferredValue=function(se){return Ot.current.useDeferredValue(se)},Wt.useEffect=function(se,Ie){return Ot.current.useEffect(se,Ie)},Wt.useId=function(){return Ot.current.useId()},Wt.useImperativeHandle=function(se,Ie,Lt){return Ot.current.useImperativeHandle(se,Ie,Lt)},Wt.useInsertionEffect=function(se,Ie){return Ot.current.useInsertionEffect(se,Ie)},Wt.useLayoutEffect=function(se,Ie){return Ot.current.useLayoutEffect(se,Ie)},Wt.useMemo=function(se,Ie){return Ot.current.useMemo(se,Ie)},Wt.useReducer=function(se,Ie,Lt){return Ot.current.useReducer(se,Ie,Lt)},Wt.useRef=function(se){return Ot.current.useRef(se)},Wt.useState=function(se){return Ot.current.useState(se)},Wt.useSyncExternalStore=function(se,Ie,Lt){return Ot.current.useSyncExternalStore(se,Ie,Lt)},Wt.useTransition=function(){return Ot.current.useTransition()},Wt.version="18.3.1",Wt}var y2;function ev(){return y2||(y2=1,U0.exports=gD()),U0.exports}/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var g2;function vD(){if(g2)return yh;g2=1;var b=ev(),D=Symbol.for("react.element"),N=Symbol.for("react.fragment"),x=Object.prototype.hasOwnProperty,T=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function O(h,l,u){var d,v={},A=null,z=null;u!==void 0&&(A=""+u),l.key!==void 0&&(A=""+l.key),l.ref!==void 0&&(z=l.ref);for(d in l)x.call(l,d)&&!j.hasOwnProperty(d)&&(v[d]=l[d]);if(h&&h.defaultProps)for(d in l=h.defaultProps,l)v[d]===void 0&&(v[d]=l[d]);return{$$typeof:D,type:h,key:A,ref:z,props:v,_owner:T.current}}return yh.Fragment=N,yh.jsx=O,yh.jsxs=O,yh}var v2;function mD(){return v2||(v2=1,_0.exports=vD()),_0.exports}var ae=mD(),we=ev();const xh=Zf(we);var Wg={},j0={exports:{}},Gi={},B0={exports:{}},V0={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var m2;function SD(){return m2||(m2=1,function(b){function D(Ue,gt){var Xe=Ue.length;Ue.push(gt);e:for(;0<Xe;){var se=Xe-1>>>1,Ie=Ue[se];if(0<T(Ie,gt))Ue[se]=gt,Ue[Xe]=Ie,Xe=se;else break e}}function N(Ue){return Ue.length===0?null:Ue[0]}function x(Ue){if(Ue.length===0)return null;var gt=Ue[0],Xe=Ue.pop();if(Xe!==gt){Ue[0]=Xe;e:for(var se=0,Ie=Ue.length,Lt=Ie>>>1;se<Lt;){var G=2*(se+1)-1,It=Ue[G],kt=G+1,dn=Ue[kt];if(0>T(It,Xe))kt<Ie&&0>T(dn,It)?(Ue[se]=dn,Ue[kt]=Xe,se=kt):(Ue[se]=It,Ue[G]=Xe,se=G);else if(kt<Ie&&0>T(dn,Xe))Ue[se]=dn,Ue[kt]=Xe,se=kt;else break e}}return gt}function T(Ue,gt){var Xe=Ue.sortIndex-gt.sortIndex;return Xe!==0?Xe:Ue.id-gt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var j=performance;b.unstable_now=function(){return j.now()}}else{var O=Date,h=O.now();b.unstable_now=function(){return O.now()-h}}var l=[],u=[],d=1,v=null,A=3,z=!1,I=!1,ee=!1,re=typeof setTimeout=="function"?setTimeout:null,ge=typeof clearTimeout=="function"?clearTimeout:null,Ae=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function oe(Ue){for(var gt=N(u);gt!==null;){if(gt.callback===null)x(u);else if(gt.startTime<=Ue)x(u),gt.sortIndex=gt.expirationTime,D(l,gt);else break;gt=N(u)}}function De(Ue){if(ee=!1,oe(Ue),!I)if(N(l)!==null)I=!0,Ut(Ge);else{var gt=N(u);gt!==null&&Ot(De,gt.startTime-Ue)}}function Ge(Ue,gt){I=!1,ee&&(ee=!1,ge(xn),xn=-1),z=!0;var Xe=A;try{for(oe(gt),v=N(l);v!==null&&(!(v.expirationTime>gt)||Ue&&!le());){var se=v.callback;if(typeof se=="function"){v.callback=null,A=v.priorityLevel;var Ie=se(v.expirationTime<=gt);gt=b.unstable_now(),typeof Ie=="function"?v.callback=Ie:v===N(l)&&x(l),oe(gt)}else x(l);v=N(l)}if(v!==null)var Lt=!0;else{var G=N(u);G!==null&&Ot(De,G.startTime-gt),Lt=!1}return Lt}finally{v=null,A=Xe,z=!1}}var mt=!1,ln=null,xn=-1,mn=5,_=-1;function le(){return!(b.unstable_now()-_<mn)}function pe(){if(ln!==null){var Ue=b.unstable_now();_=Ue;var gt=!0;try{gt=ln(!0,Ue)}finally{gt?qe():(mt=!1,ln=null)}}else mt=!1}var qe;if(typeof Ae=="function")qe=function(){Ae(pe)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,ke=be.port2;be.port1.onmessage=pe,qe=function(){ke.postMessage(null)}}else qe=function(){re(pe,0)};function Ut(Ue){ln=Ue,mt||(mt=!0,qe())}function Ot(Ue,gt){xn=re(function(){Ue(b.unstable_now())},gt)}b.unstable_IdlePriority=5,b.unstable_ImmediatePriority=1,b.unstable_LowPriority=4,b.unstable_NormalPriority=3,b.unstable_Profiling=null,b.unstable_UserBlockingPriority=2,b.unstable_cancelCallback=function(Ue){Ue.callback=null},b.unstable_continueExecution=function(){I||z||(I=!0,Ut(Ge))},b.unstable_forceFrameRate=function(Ue){0>Ue||125<Ue?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):mn=0<Ue?Math.floor(1e3/Ue):5},b.unstable_getCurrentPriorityLevel=function(){return A},b.unstable_getFirstCallbackNode=function(){return N(l)},b.unstable_next=function(Ue){switch(A){case 1:case 2:case 3:var gt=3;break;default:gt=A}var Xe=A;A=gt;try{return Ue()}finally{A=Xe}},b.unstable_pauseExecution=function(){},b.unstable_requestPaint=function(){},b.unstable_runWithPriority=function(Ue,gt){switch(Ue){case 1:case 2:case 3:case 4:case 5:break;default:Ue=3}var Xe=A;A=Ue;try{return gt()}finally{A=Xe}},b.unstable_scheduleCallback=function(Ue,gt,Xe){var se=b.unstable_now();switch(typeof Xe=="object"&&Xe!==null?(Xe=Xe.delay,Xe=typeof Xe=="number"&&0<Xe?se+Xe:se):Xe=se,Ue){case 1:var Ie=-1;break;case 2:Ie=250;break;case 5:Ie=1073741823;break;case 4:Ie=1e4;break;default:Ie=5e3}return Ie=Xe+Ie,Ue={id:d++,callback:gt,priorityLevel:Ue,startTime:Xe,expirationTime:Ie,sortIndex:-1},Xe>se?(Ue.sortIndex=Xe,D(u,Ue),N(l)===null&&Ue===N(u)&&(ee?(ge(xn),xn=-1):ee=!0,Ot(De,Xe-se))):(Ue.sortIndex=Ie,D(l,Ue),I||z||(I=!0,Ut(Ge))),Ue},b.unstable_shouldYield=le,b.unstable_wrapCallback=function(Ue){var gt=A;return function(){var Xe=A;A=gt;try{return Ue.apply(this,arguments)}finally{A=Xe}}}}(V0)),V0}var S2;function wD(){return S2||(S2=1,B0.exports=SD()),B0.exports}/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var w2;function TD(){if(w2)return Gi;w2=1;var b=ev(),D=wD();function N(s){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+s,y=1;y<arguments.length;y++)c+="&args[]="+encodeURIComponent(arguments[y]);return"Minified React error #"+s+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var x=new Set,T={};function j(s,c){O(s,c),O(s+"Capture",c)}function O(s,c){for(T[s]=c,s=0;s<c.length;s++)x.add(c[s])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,d={},v={};function A(s){return l.call(v,s)?!0:l.call(d,s)?!1:u.test(s)?v[s]=!0:(d[s]=!0,!1)}function z(s,c,y,S){if(y!==null&&y.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return S?!1:y!==null?!y.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function I(s,c,y,S){if(c===null||typeof c>"u"||z(s,c,y,S))return!0;if(S)return!1;if(y!==null)switch(y.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function ee(s,c,y,S,k,R,V){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=S,this.attributeNamespace=k,this.mustUseProperty=y,this.propertyName=s,this.type=c,this.sanitizeURL=R,this.removeEmptyString=V}var re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){re[s]=new ee(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var c=s[0];re[c]=new ee(c,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){re[s]=new ee(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){re[s]=new ee(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){re[s]=new ee(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){re[s]=new ee(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){re[s]=new ee(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){re[s]=new ee(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){re[s]=new ee(s,5,!1,s.toLowerCase(),null,!1,!1)});var ge=/[\-:]([a-z])/g;function Ae(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var c=s.replace(ge,Ae);re[c]=new ee(c,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var c=s.replace(ge,Ae);re[c]=new ee(c,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var c=s.replace(ge,Ae);re[c]=new ee(c,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){re[s]=new ee(s,1,!1,s.toLowerCase(),null,!1,!1)}),re.xlinkHref=new ee("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){re[s]=new ee(s,1,!1,s.toLowerCase(),null,!0,!0)});function oe(s,c,y,S){var k=re.hasOwnProperty(c)?re[c]:null;(k!==null?k.type!==0:S||!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(I(c,y,k,S)&&(y=null),S||k===null?A(c)&&(y===null?s.removeAttribute(c):s.setAttribute(c,""+y)):k.mustUseProperty?s[k.propertyName]=y===null?k.type===3?!1:"":y:(c=k.attributeName,S=k.attributeNamespace,y===null?s.removeAttribute(c):(k=k.type,y=k===3||k===4&&y===!0?"":""+y,S?s.setAttributeNS(S,c,y):s.setAttribute(c,y))))}var De=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ge=Symbol.for("react.element"),mt=Symbol.for("react.portal"),ln=Symbol.for("react.fragment"),xn=Symbol.for("react.strict_mode"),mn=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),le=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),qe=Symbol.for("react.suspense"),be=Symbol.for("react.suspense_list"),ke=Symbol.for("react.memo"),Ut=Symbol.for("react.lazy"),Ot=Symbol.for("react.offscreen"),Ue=Symbol.iterator;function gt(s){return s===null||typeof s!="object"?null:(s=Ue&&s[Ue]||s["@@iterator"],typeof s=="function"?s:null)}var Xe=Object.assign,se;function Ie(s){if(se===void 0)try{throw Error()}catch(y){var c=y.stack.trim().match(/\n( *(at )?)/);se=c&&c[1]||""}return`
|
||
`+se+s}var Lt=!1;function G(s,c){if(!s||Lt)return"";Lt=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(me){var S=me}Reflect.construct(s,[],c)}else{try{c.call()}catch(me){S=me}s.call(c.prototype)}else{try{throw Error()}catch(me){S=me}s()}}catch(me){if(me&&S&&typeof me.stack=="string"){for(var k=me.stack.split(`
|
||
`),R=S.stack.split(`
|
||
`),V=k.length-1,J=R.length-1;1<=V&&0<=J&&k[V]!==R[J];)J--;for(;1<=V&&0<=J;V--,J--)if(k[V]!==R[J]){if(V!==1||J!==1)do if(V--,J--,0>J||k[V]!==R[J]){var te=`
|
||
`+k[V].replace(" at new "," at ");return s.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",s.displayName)),te}while(1<=V&&0<=J);break}}}finally{Lt=!1,Error.prepareStackTrace=y}return(s=s?s.displayName||s.name:"")?Ie(s):""}function It(s){switch(s.tag){case 5:return Ie(s.type);case 16:return Ie("Lazy");case 13:return Ie("Suspense");case 19:return Ie("SuspenseList");case 0:case 2:case 15:return s=G(s.type,!1),s;case 11:return s=G(s.type.render,!1),s;case 1:return s=G(s.type,!0),s;default:return""}}function kt(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case ln:return"Fragment";case mt:return"Portal";case mn:return"Profiler";case xn:return"StrictMode";case qe:return"Suspense";case be:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case le:return(s.displayName||"Context")+".Consumer";case _:return(s._context.displayName||"Context")+".Provider";case pe:var c=s.render;return s=s.displayName,s||(s=c.displayName||c.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case ke:return c=s.displayName||null,c!==null?c:kt(s.type)||"Memo";case Ut:c=s._payload,s=s._init;try{return kt(s(c))}catch{}}return null}function dn(s){var c=s.type;switch(s.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=c.render,s=s.displayName||s.name||"",c.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return kt(c);case 8:return c===xn?"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 17:case 2:case 14:case 15:if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function on(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Sn(s){var c=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function oi(s){var c=Sn(s)?"checked":"value",y=Object.getOwnPropertyDescriptor(s.constructor.prototype,c),S=""+s[c];if(!s.hasOwnProperty(c)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var k=y.get,R=y.set;return Object.defineProperty(s,c,{configurable:!0,get:function(){return k.call(this)},set:function(V){S=""+V,R.call(this,V)}}),Object.defineProperty(s,c,{enumerable:y.enumerable}),{getValue:function(){return S},setValue:function(V){S=""+V},stopTracking:function(){s._valueTracker=null,delete s[c]}}}}function lc(s){s._valueTracker||(s._valueTracker=oi(s))}function Me(s){if(!s)return!1;var c=s._valueTracker;if(!c)return!0;var y=c.getValue(),S="";return s&&(S=Sn(s)?s.checked?"true":"false":s.value),s=S,s!==y?(c.setValue(s),!0):!1}function sc(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function nd(s,c){var y=c.checked;return Xe({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:y??s._wrapperState.initialChecked})}function Ju(s,c){var y=c.defaultValue==null?"":c.defaultValue,S=c.checked!=null?c.checked:c.defaultChecked;y=on(c.value!=null?c.value:y),s._wrapperState={initialChecked:S,initialValue:y,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function Bs(s,c){c=c.checked,c!=null&&oe(s,"checked",c,!1)}function Qu(s,c){Bs(s,c);var y=on(c.value),S=c.type;if(y!=null)S==="number"?(y===0&&s.value===""||s.value!=y)&&(s.value=""+y):s.value!==""+y&&(s.value=""+y);else if(S==="submit"||S==="reset"){s.removeAttribute("value");return}c.hasOwnProperty("value")?Ti(s,c.type,y):c.hasOwnProperty("defaultValue")&&Ti(s,c.type,on(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(s.defaultChecked=!!c.defaultChecked)}function Ph(s,c,y){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var S=c.type;if(!(S!=="submit"&&S!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+s._wrapperState.initialValue,y||c===s.value||(s.value=c),s.defaultValue=c}y=s.name,y!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,y!==""&&(s.name=y)}function Ti(s,c,y){(c!=="number"||sc(s.ownerDocument)!==s)&&(y==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+y&&(s.defaultValue=""+y))}var ft=Array.isArray;function xi(s,c,y,S){if(s=s.options,c){c={};for(var k=0;k<y.length;k++)c["$"+y[k]]=!0;for(y=0;y<s.length;y++)k=c.hasOwnProperty("$"+s[y].value),s[y].selected!==k&&(s[y].selected=k),k&&S&&(s[y].defaultSelected=!0)}else{for(y=""+on(y),c=null,k=0;k<s.length;k++){if(s[k].value===y){s[k].selected=!0,S&&(s[k].defaultSelected=!0);return}c!==null||s[k].disabled||(c=s[k])}c!==null&&(c.selected=!0)}}function rd(s,c){if(c.dangerouslySetInnerHTML!=null)throw Error(N(91));return Xe({},c,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function rv(s,c){var y=c.value;if(y==null){if(y=c.children,c=c.defaultValue,y!=null){if(c!=null)throw Error(N(92));if(ft(y)){if(1<y.length)throw Error(N(93));y=y[0]}c=y}c==null&&(c=""),y=c}s._wrapperState={initialValue:on(y)}}function iv(s,c){var y=on(c.value),S=on(c.defaultValue);y!=null&&(y=""+y,y!==s.value&&(s.value=y),c.defaultValue==null&&s.defaultValue!==y&&(s.defaultValue=y)),S!=null&&(s.defaultValue=""+S)}function id(s){var c=s.textContent;c===s._wrapperState.initialValue&&c!==""&&c!==null&&(s.value=c)}function Vs(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function At(s,c){return s==null||s==="http://www.w3.org/1999/xhtml"?Vs(c):s==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Fs,Dh=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,y,S,k){MSApp.execUnsafeLocalFunction(function(){return s(c,y,S,k)})}:s}(function(s,c){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=c;else{for(Fs=Fs||document.createElement("div"),Fs.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=Fs.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;c.firstChild;)s.appendChild(c.firstChild)}});function Ks(s,c){if(c){var y=s.firstChild;if(y&&y===s.lastChild&&y.nodeType===3){y.nodeValue=c;return}}s.textContent=c}var Hl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Un=["Webkit","ms","Moz","O"];Object.keys(Hl).forEach(function(s){Un.forEach(function(c){c=c+s.charAt(0).toUpperCase()+s.substring(1),Hl[c]=Hl[s]})});function vu(s,c,y){return c==null||typeof c=="boolean"||c===""?"":y||typeof c!="number"||c===0||Hl.hasOwnProperty(s)&&Hl[s]?(""+c).trim():c+"px"}function ac(s,c){s=s.style;for(var y in c)if(c.hasOwnProperty(y)){var S=y.indexOf("--")===0,k=vu(y,c[y],S);y==="float"&&(y="cssFloat"),S?s.setProperty(y,k):s[y]=k}}var od=Xe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Rt(s,c){if(c){if(od[s]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(N(137,s));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(N(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(N(61))}if(c.style!=null&&typeof c.style!="object")throw Error(N(62))}}function ud(s,c){if(s.indexOf("-")===-1)return typeof c.is=="string";switch(s){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}}var ld=null;function cc(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Zu=null,mu=null,Xi=null;function vo(s){if(s=pl(s)){if(typeof Zu!="function")throw Error(N(280));var c=s.stateNode;c&&(c=ga(c),Zu(s.stateNode,s.type,c))}}function zr(s){mu?Xi?Xi.push(s):Xi=[s]:mu=s}function Ze(){if(mu){var s=mu,c=Xi;if(Xi=mu=null,vo(s),c)for(s=0;s<c.length;s++)vo(c[s])}}function sd(s,c){return s(c)}function wr(){}var Hs=!1;function ql(s,c,y){if(Hs)return s(c,y);Hs=!0;try{return sd(s,c,y)}finally{Hs=!1,(mu!==null||Xi!==null)&&(wr(),Ze())}}function nr(s,c){var y=s.stateNode;if(y===null)return null;var S=ga(y);if(S===null)return null;y=S[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(S=!S.disabled)||(s=s.type,S=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!S;break e;default:s=!1}if(s)return null;if(y&&typeof y!="function")throw Error(N(231,c,typeof y));return y}var Su=!1;if(h)try{var mo={};Object.defineProperty(mo,"passive",{get:function(){Su=!0}}),window.addEventListener("test",mo,mo),window.removeEventListener("test",mo,mo)}catch{Su=!1}function el(s,c,y,S,k,R,V,J,te){var me=Array.prototype.slice.call(arguments,3);try{c.apply(y,me)}catch(Ee){this.onError(Ee)}}var Xn=!1,qs=null,zs=!1,Gr=null,Oh={onError:function(s){Xn=!0,qs=s}};function Gs(s,c,y,S,k,R,V,J,te){Xn=!1,qs=null,el.apply(Oh,arguments)}function Y(s,c,y,S,k,R,V,J,te){if(Gs.apply(this,arguments),Xn){if(Xn){var me=qs;Xn=!1,qs=null}else throw Error(N(198));zs||(zs=!0,Gr=me)}}function Ii(s){var c=s,y=s;if(s.alternate)for(;c.return;)c=c.return;else{s=c;do c=s,(c.flags&4098)!==0&&(y=c.return),s=c.return;while(s)}return c.tag===3?y:null}function ad(s){if(s.tag===13){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function fc(s){if(Ii(s)!==s)throw Error(N(188))}function Ws(s){var c=s.alternate;if(!c){if(c=Ii(s),c===null)throw Error(N(188));return c!==s?null:s}for(var y=s,S=c;;){var k=y.return;if(k===null)break;var R=k.alternate;if(R===null){if(S=k.return,S!==null){y=S;continue}break}if(k.child===R.child){for(R=k.child;R;){if(R===y)return fc(k),s;if(R===S)return fc(k),c;R=R.sibling}throw Error(N(188))}if(y.return!==S.return)y=k,S=R;else{for(var V=!1,J=k.child;J;){if(J===y){V=!0,y=k,S=R;break}if(J===S){V=!0,S=k,y=R;break}J=J.sibling}if(!V){for(J=R.child;J;){if(J===y){V=!0,y=R,S=k;break}if(J===S){V=!0,S=R,y=k;break}J=J.sibling}if(!V)throw Error(N(189))}}if(y.alternate!==S)throw Error(N(190))}if(y.tag!==3)throw Error(N(188));return y.stateNode.current===y?s:c}function Xs(s){return s=Ws(s),s!==null?Ys(s):null}function Ys(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var c=Ys(s);if(c!==null)return c;s=s.sibling}return null}var zl=D.unstable_scheduleCallback,st=D.unstable_cancelCallback,Yi=D.unstable_shouldYield,$s=D.unstable_requestPaint,In=D.unstable_now,$i=D.unstable_getCurrentPriorityLevel,Mr=D.unstable_ImmediatePriority,Js=D.unstable_UserBlockingPriority,Wr=D.unstable_NormalPriority,Tr=D.unstable_LowPriority,Qs=D.unstable_IdlePriority,So=null,Xr=null;function Ei(s){if(Xr&&typeof Xr.onCommitFiberRoot=="function")try{Xr.onCommitFiberRoot(So,s,void 0,(s.current.flags&128)===128)}catch{}}var Yr=Math.clz32?Math.clz32:Rh,cd=Math.log,wu=Math.LN2;function Rh(s){return s>>>=0,s===0?32:31-(cd(s)/wu|0)|0}var Tu=64,xu=4194304;function tl(s){switch(s&-s){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: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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Tt(s,c){var y=s.pendingLanes;if(y===0)return 0;var S=0,k=s.suspendedLanes,R=s.pingedLanes,V=y&268435455;if(V!==0){var J=V&~k;J!==0?S=tl(J):(R&=V,R!==0&&(S=tl(R)))}else V=y&~k,V!==0?S=tl(V):R!==0&&(S=tl(R));if(S===0)return 0;if(c!==0&&c!==S&&(c&k)===0&&(k=S&-S,R=c&-c,k>=R||k===16&&(R&4194240)!==0))return c;if((S&4)!==0&&(S|=y&16),c=s.entangledLanes,c!==0)for(s=s.entanglements,c&=S;0<c;)y=31-Yr(c),k=1<<y,S|=s[y],c&=~k;return S}function bh(s,c){switch(s){case 1:case 2:case 4:return c+250;case 8:case 16:case 32:case 64: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 c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zs(s,c){for(var y=s.suspendedLanes,S=s.pingedLanes,k=s.expirationTimes,R=s.pendingLanes;0<R;){var V=31-Yr(R),J=1<<V,te=k[V];te===-1?((J&y)===0||(J&S)!==0)&&(k[V]=bh(J,c)):te<=c&&(s.expiredLanes|=J),R&=~J}}function dc(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function pc(){var s=Tu;return Tu<<=1,(Tu&4194240)===0&&(Tu=64),s}function Iu(s){for(var c=[],y=0;31>y;y++)c.push(s);return c}function Ji(s,c,y){s.pendingLanes|=c,c!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,c=31-Yr(c),s[c]=y}function Qt(s,c){var y=s.pendingLanes&~c;s.pendingLanes=c,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=c,s.mutableReadLanes&=c,s.entangledLanes&=c,c=s.entanglements;var S=s.eventTimes;for(s=s.expirationTimes;0<y;){var k=31-Yr(y),R=1<<k;c[k]=0,S[k]=-1,s[k]=-1,y&=~R}}function wo(s,c){var y=s.entangledLanes|=c;for(s=s.entanglements;y;){var S=31-Yr(y),k=1<<S;k&c|s[S]&c&&(s[S]|=c),y&=~k}}var jt=0;function ui(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var hc,ea,ur,fd,nl,Eu=!1,To=[],$r=null,Ci=null,li=null,ta=new Map,Lr=new Map,Jr=[],dd="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 submit".split(" ");function Gl(s,c){switch(s){case"focusin":case"focusout":$r=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":li=null;break;case"pointerover":case"pointerout":ta.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lr.delete(c.pointerId)}}function Qi(s,c,y,S,k,R){return s===null||s.nativeEvent!==R?(s={blockedOn:c,domEventName:y,eventSystemFlags:S,nativeEvent:R,targetContainers:[k]},c!==null&&(c=pl(c),c!==null&&ea(c)),s):(s.eventSystemFlags|=S,c=s.targetContainers,k!==null&&c.indexOf(k)===-1&&c.push(k),s)}function pd(s,c,y,S,k){switch(c){case"focusin":return $r=Qi($r,s,c,y,S,k),!0;case"dragenter":return Ci=Qi(Ci,s,c,y,S,k),!0;case"mouseover":return li=Qi(li,s,c,y,S,k),!0;case"pointerover":var R=k.pointerId;return ta.set(R,Qi(ta.get(R)||null,s,c,y,S,k)),!0;case"gotpointercapture":return R=k.pointerId,Lr.set(R,Qi(Lr.get(R)||null,s,c,y,S,k)),!0}return!1}function Mh(s){var c=Co(s.target);if(c!==null){var y=Ii(c);if(y!==null){if(c=y.tag,c===13){if(c=ad(y),c!==null){s.blockedOn=c,nl(s.priority,function(){ur(y)});return}}else if(c===3&&y.stateNode.current.memoizedState.isDehydrated){s.blockedOn=y.tag===3?y.stateNode.containerInfo:null;return}}}s.blockedOn=null}function rl(s){if(s.blockedOn!==null)return!1;for(var c=s.targetContainers;0<c.length;){var y=Ai(s.domEventName,s.eventSystemFlags,c[0],s.nativeEvent);if(y===null){y=s.nativeEvent;var S=new y.constructor(y.type,y);ld=S,y.target.dispatchEvent(S),ld=null}else return c=pl(y),c!==null&&ea(c),s.blockedOn=y,!1;c.shift()}return!0}function hd(s,c,y){rl(s)&&y.delete(c)}function bt(){Eu=!1,$r!==null&&rl($r)&&($r=null),Ci!==null&&rl(Ci)&&(Ci=null),li!==null&&rl(li)&&(li=null),ta.forEach(hd),Lr.forEach(hd)}function sn(s,c){s.blockedOn===c&&(s.blockedOn=null,Eu||(Eu=!0,D.unstable_scheduleCallback(D.unstable_NormalPriority,bt)))}function rr(s){function c(k){return sn(k,s)}if(0<To.length){sn(To[0],s);for(var y=1;y<To.length;y++){var S=To[y];S.blockedOn===s&&(S.blockedOn=null)}}for($r!==null&&sn($r,s),Ci!==null&&sn(Ci,s),li!==null&&sn(li,s),ta.forEach(c),Lr.forEach(c),y=0;y<Jr.length;y++)S=Jr[y],S.blockedOn===s&&(S.blockedOn=null);for(;0<Jr.length&&(y=Jr[0],y.blockedOn===null);)Mh(y),y.blockedOn===null&&Jr.shift()}var xr=De.ReactCurrentBatchConfig,pn=!0;function ki(s,c,y,S){var k=jt,R=xr.transition;xr.transition=null;try{jt=1,Zi(s,c,y,S)}finally{jt=k,xr.transition=R}}function rt(s,c,y,S){var k=jt,R=xr.transition;xr.transition=null;try{jt=4,Zi(s,c,y,S)}finally{jt=k,xr.transition=R}}function Zi(s,c,y,S){if(pn){var k=Ai(s,c,y,S);if(k===null)Du(s,c,S,na,y),Gl(s,S);else if(pd(k,s,c,y,S))S.stopPropagation();else if(Gl(s,S),c&4&&-1<dd.indexOf(s)){for(;k!==null;){var R=pl(k);if(R!==null&&hc(R),R=Ai(s,c,y,S),R===null&&Du(s,c,S,na,y),R===k)break;k=R}k!==null&&S.stopPropagation()}else Du(s,c,S,null,y)}}var na=null;function Ai(s,c,y,S){if(na=null,s=cc(S),s=Co(s),s!==null)if(c=Ii(s),c===null)s=null;else if(y=c.tag,y===13){if(s=ad(c),s!==null)return s;s=null}else if(y===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;s=null}else c!==s&&(s=null);return na=s,null}function Fo(s){switch(s){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch($i()){case Mr:return 1;case Js:return 4;case Wr:case Tr:return 16;case Qs:return 536870912;default:return 16}default:return 16}}var lr=null,Wl=null,sr=null;function xo(){if(sr)return sr;var s,c=Wl,y=c.length,S,k="value"in lr?lr.value:lr.textContent,R=k.length;for(s=0;s<y&&c[s]===k[s];s++);var V=y-s;for(S=1;S<=V&&c[y-S]===k[R-S];S++);return sr=k.slice(s,1<S?1-S:void 0)}function jn(s){var c=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&c===13&&(s=13)):s=c,s===10&&(s=13),32<=s||s===13?s:0}function il(){return!0}function ra(){return!1}function si(s){function c(y,S,k,R,V){this._reactName=y,this._targetInst=k,this.type=S,this.nativeEvent=R,this.target=V,this.currentTarget=null;for(var J in s)s.hasOwnProperty(J)&&(y=s[J],this[J]=y?y(R):R[J]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?il:ra,this.isPropagationStopped=ra,this}return Xe(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var y=this.nativeEvent;y&&(y.preventDefault?y.preventDefault():typeof y.returnValue!="unknown"&&(y.returnValue=!1),this.isDefaultPrevented=il)},stopPropagation:function(){var y=this.nativeEvent;y&&(y.stopPropagation?y.stopPropagation():typeof y.cancelBubble!="unknown"&&(y.cancelBubble=!0),this.isPropagationStopped=il)},persist:function(){},isPersistent:il}),c}var Ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yc=si(Ko),Xl=Xe({},Ko,{view:0,detail:0}),Lh=si(Xl),gc,ia,ol,Yl=Xe({},Xl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ll,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==ol&&(ol&&s.type==="mousemove"?(gc=s.screenX-ol.screenX,ia=s.screenY-ol.screenY):ia=gc=0,ol=s),gc)},movementY:function(s){return"movementY"in s?s.movementY:ia}}),zt=si(Yl),Nh=Xe({},Yl,{dataTransfer:0}),vc=si(Nh),mc=Xe({},Xl,{relatedTarget:0}),Sc=si(mc),ov=Xe({},Ko,{animationName:0,elapsedTime:0,pseudoElement:0}),_h=si(ov),oa=Xe({},Ko,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),wc=si(oa),Io=Xe({},Ko,{data:0}),Tc=si(Io),ua={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Uh={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"},la={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ul(s){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(s):(s=la[s])?!!c[s]:!1}function ll(){return ul}var sl=Xe({},Xl,{key:function(s){if(s.key){var c=ua[s.key]||s.key;if(c!=="Unidentified")return c}return s.type==="keypress"?(s=jn(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Uh[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ll,charCode:function(s){return s.type==="keypress"?jn(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?jn(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),yd=si(sl),jh=Xe({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gd=si(jh),Bh=Xe({},Xl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ll}),$l=si(Bh),vd=Xe({},Ko,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jl=si(vd),Vh=Xe({},Yl,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Ho=si(Vh),uv=[9,13,27,32],Eo=h&&"CompositionEvent"in window,ai=null;h&&"documentMode"in document&&(ai=document.documentMode);var Cu=h&&"TextEvent"in window&&!ai,xc=h&&(!Eo||ai&&8<ai&&11>=ai),qo=" ",Ic=!1;function Ec(s,c){switch(s){case"keyup":return uv.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function md(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Ql=!1;function hn(s,c){switch(s){case"compositionend":return md(c);case"keypress":return c.which!==32?null:(Ic=!0,qo);case"textInput":return s=c.data,s===qo&&Ic?null:s;default:return null}}function Cc(s,c){if(Ql)return s==="compositionend"||!Eo&&Ec(s,c)?(s=xo(),sr=Wl=lr=null,Ql=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return xc&&c.locale!=="ko"?null:c.data;default:return null}}var kc={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};function Ac(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c==="input"?!!kc[s.type]:c==="textarea"}function ku(s,c,y,S){zr(S),c=ts(c,"onChange"),0<c.length&&(y=new yc("onChange","change",null,y,S),s.push({event:y,listeners:c}))}var zo=null,Go=null;function lv(s){gn(s,0)}function sa(s){var c=bu(s);if(Me(c))return s}function sv(s,c){if(s==="change")return c}var Fh=!1;if(h){var Sd;if(h){var wd="oninput"in document;if(!wd){var al=document.createElement("div");al.setAttribute("oninput","return;"),wd=typeof al.oninput=="function"}Sd=wd}else Sd=!1;Fh=Sd&&(!document.documentMode||9<document.documentMode)}function aa(){zo&&(zo.detachEvent("onpropertychange",Td),Go=zo=null)}function Td(s){if(s.propertyName==="value"&&sa(Go)){var c=[];ku(c,Go,s,cc(s)),ql(lv,c)}}function ar(s,c,y){s==="focusin"?(aa(),zo=c,Go=y,zo.attachEvent("onpropertychange",Td)):s==="focusout"&&aa()}function Pc(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return sa(Go)}function Wo(s,c){if(s==="click")return sa(c)}function ci(s,c){if(s==="input"||s==="change")return sa(c)}function cl(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var Yn=typeof Object.is=="function"?Object.is:cl;function rn(s,c){if(Yn(s,c))return!0;if(typeof s!="object"||s===null||typeof c!="object"||c===null)return!1;var y=Object.keys(s),S=Object.keys(c);if(y.length!==S.length)return!1;for(S=0;S<y.length;S++){var k=y[S];if(!l.call(c,k)||!Yn(s[k],c[k]))return!1}return!0}function Pn(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Xo(s,c){var y=Pn(s);s=0;for(var S;y;){if(y.nodeType===3){if(S=s+y.textContent.length,s<=c&&S>=c)return{node:y,offset:c-s};s=S}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=Pn(y)}}function xd(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?xd(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function ca(){for(var s=window,c=sc();c instanceof s.HTMLIFrameElement;){try{var y=typeof c.contentWindow.location.href=="string"}catch{y=!1}if(y)s=c.contentWindow;else break;c=sc(s.document)}return c}function cr(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c&&(c==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||c==="textarea"||s.contentEditable==="true")}function Id(s){var c=ca(),y=s.focusedElem,S=s.selectionRange;if(c!==y&&y&&y.ownerDocument&&xd(y.ownerDocument.documentElement,y)){if(S!==null&&cr(y)){if(c=S.start,s=S.end,s===void 0&&(s=c),"selectionStart"in y)y.selectionStart=c,y.selectionEnd=Math.min(s,y.value.length);else if(s=(c=y.ownerDocument||document)&&c.defaultView||window,s.getSelection){s=s.getSelection();var k=y.textContent.length,R=Math.min(S.start,k);S=S.end===void 0?R:Math.min(S.end,k),!s.extend&&R>S&&(k=S,S=R,R=k),k=Xo(y,R);var V=Xo(y,S);k&&V&&(s.rangeCount!==1||s.anchorNode!==k.node||s.anchorOffset!==k.offset||s.focusNode!==V.node||s.focusOffset!==V.offset)&&(c=c.createRange(),c.setStart(k.node,k.offset),s.removeAllRanges(),R>S?(s.addRange(c),s.extend(V.node,V.offset)):(c.setEnd(V.node,V.offset),s.addRange(c)))}}for(c=[],s=y;s=s.parentNode;)s.nodeType===1&&c.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<c.length;y++)s=c[y],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var at=h&&"documentMode"in document&&11>=document.documentMode,an=null,Ed=null,Zl=null,fa=!1;function yn(s,c,y){var S=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;fa||an==null||an!==sc(S)||(S=an,"selectionStart"in S&&cr(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),Zl&&rn(Zl,S)||(Zl=S,S=ts(Ed,"onSelect"),0<S.length&&(c=new yc("onSelect","select",null,c,y),s.push({event:c,listeners:S}),c.target=an)))}function Yo(s,c){var y={};return y[s.toLowerCase()]=c.toLowerCase(),y["Webkit"+s]="webkit"+c,y["Moz"+s]="moz"+c,y}var Au={animationend:Yo("Animation","AnimationEnd"),animationiteration:Yo("Animation","AnimationIteration"),animationstart:Yo("Animation","AnimationStart"),transitionend:Yo("Transition","TransitionEnd")},Cd={},da={};h&&(da=document.createElement("div").style,"AnimationEvent"in window||(delete Au.animationend.animation,delete Au.animationiteration.animation,delete Au.animationstart.animation),"TransitionEvent"in window||delete Au.transitionend.transition);function bn(s){if(Cd[s])return Cd[s];if(!Au[s])return s;var c=Au[s],y;for(y in c)if(c.hasOwnProperty(y)&&y in da)return Cd[s]=c[y];return s}var $o=bn("animationend"),Ir=bn("animationiteration"),Er=bn("animationstart"),Dc=bn("transitionend"),kd=new Map,Kh="abort auxClick 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(" ");function Cr(s,c){kd.set(s,c),j(c,[s])}for(var eo=0;eo<Kh.length;eo++){var Pu=Kh[eo],av=Pu.toLowerCase(),cv=Pu[0].toUpperCase()+Pu.slice(1);Cr(av,"on"+cv)}Cr($o,"onAnimationEnd"),Cr(Ir,"onAnimationIteration"),Cr(Er,"onAnimationStart"),Cr("dblclick","onDoubleClick"),Cr("focusin","onFocus"),Cr("focusout","onBlur"),Cr(Dc,"onTransitionEnd"),O("onMouseEnter",["mouseout","mouseover"]),O("onMouseLeave",["mouseout","mouseover"]),O("onPointerEnter",["pointerout","pointerover"]),O("onPointerLeave",["pointerout","pointerover"]),j("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),j("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),j("onBeforeInput",["compositionend","keypress","textInput","paste"]),j("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),j("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),j("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var es="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(" "),Hh=new Set("cancel close invalid load scroll toggle".split(" ").concat(es));function qh(s,c,y){var S=s.type||"unknown-event";s.currentTarget=y,Y(S,c,void 0,s),s.currentTarget=null}function gn(s,c){c=(c&4)!==0;for(var y=0;y<s.length;y++){var S=s[y],k=S.event;S=S.listeners;e:{var R=void 0;if(c)for(var V=S.length-1;0<=V;V--){var J=S[V],te=J.instance,me=J.currentTarget;if(J=J.listener,te!==R&&k.isPropagationStopped())break e;qh(k,J,me),R=te}else for(V=0;V<S.length;V++){if(J=S[V],te=J.instance,me=J.currentTarget,J=J.listener,te!==R&&k.isPropagationStopped())break e;qh(k,J,me),R=te}}}if(zs)throw s=Gr,zs=!1,Gr=null,s}function En(s,c){var y=c[Ld];y===void 0&&(y=c[Ld]=new Set);var S=s+"__bubble";y.has(S)||(fi(c,s,2,!1),y.add(S))}function Ad(s,c,y){var S=0;c&&(S|=4),fi(y,s,S,c)}var to="_reactListening"+Math.random().toString(36).slice(2);function Jo(s){if(!s[to]){s[to]=!0,x.forEach(function(y){y!=="selectionchange"&&(Hh.has(y)||Ad(y,!1,s),Ad(y,!0,s))});var c=s.nodeType===9?s:s.ownerDocument;c===null||c[to]||(c[to]=!0,Ad("selectionchange",!1,c))}}function fi(s,c,y,S){switch(Fo(c)){case 1:var k=ki;break;case 4:k=rt;break;default:k=Zi}y=k.bind(null,c,y,s),k=void 0,!Su||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(k=!0),S?k!==void 0?s.addEventListener(c,y,{capture:!0,passive:k}):s.addEventListener(c,y,!0):k!==void 0?s.addEventListener(c,y,{passive:k}):s.addEventListener(c,y,!1)}function Du(s,c,y,S,k){var R=S;if((c&1)===0&&(c&2)===0&&S!==null)e:for(;;){if(S===null)return;var V=S.tag;if(V===3||V===4){var J=S.stateNode.containerInfo;if(J===k||J.nodeType===8&&J.parentNode===k)break;if(V===4)for(V=S.return;V!==null;){var te=V.tag;if((te===3||te===4)&&(te=V.stateNode.containerInfo,te===k||te.nodeType===8&&te.parentNode===k))return;V=V.return}for(;J!==null;){if(V=Co(J),V===null)return;if(te=V.tag,te===5||te===6){S=R=V;continue e}J=J.parentNode}}S=S.return}ql(function(){var me=R,Ee=cc(y),Pe=[];e:{var xe=kd.get(s);if(xe!==void 0){var He=yc,et=s;switch(s){case"keypress":if(jn(y)===0)break e;case"keydown":case"keyup":He=yd;break;case"focusin":et="focus",He=Sc;break;case"focusout":et="blur",He=Sc;break;case"beforeblur":case"afterblur":He=Sc;break;case"click":if(y.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":He=zt;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":He=vc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":He=$l;break;case $o:case Ir:case Er:He=_h;break;case Dc:He=Jl;break;case"scroll":He=Lh;break;case"wheel":He=Ho;break;case"copy":case"cut":case"paste":He=wc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":He=gd}var tt=(c&4)!==0,Kn=!tt&&s==="scroll",fe=tt?xe!==null?xe+"Capture":null:xe;tt=[];for(var ne=me,ye;ne!==null;){ye=ne;var Re=ye.stateNode;if(ye.tag===5&&Re!==null&&(ye=Re,fe!==null&&(Re=nr(ne,fe),Re!=null&&tt.push(Qo(ne,Re,ye)))),Kn)break;ne=ne.return}0<tt.length&&(xe=new He(xe,et,null,y,Ee),Pe.push({event:xe,listeners:tt}))}}if((c&7)===0){e:{if(xe=s==="mouseover"||s==="pointerover",He=s==="mouseout"||s==="pointerout",xe&&y!==ld&&(et=y.relatedTarget||y.fromElement)&&(Co(et)||et[Zo]))break e;if((He||xe)&&(xe=Ee.window===Ee?Ee:(xe=Ee.ownerDocument)?xe.defaultView||xe.parentWindow:window,He?(et=y.relatedTarget||y.toElement,He=me,et=et?Co(et):null,et!==null&&(Kn=Ii(et),et!==Kn||et.tag!==5&&et.tag!==6)&&(et=null)):(He=null,et=me),He!==et)){if(tt=zt,Re="onMouseLeave",fe="onMouseEnter",ne="mouse",(s==="pointerout"||s==="pointerover")&&(tt=gd,Re="onPointerLeave",fe="onPointerEnter",ne="pointer"),Kn=He==null?xe:bu(He),ye=et==null?xe:bu(et),xe=new tt(Re,ne+"leave",He,y,Ee),xe.target=Kn,xe.relatedTarget=ye,Re=null,Co(Ee)===me&&(tt=new tt(fe,ne+"enter",et,y,Ee),tt.target=ye,tt.relatedTarget=Kn,Re=tt),Kn=Re,He&&et)t:{for(tt=He,fe=et,ne=0,ye=tt;ye;ye=Et(ye))ne++;for(ye=0,Re=fe;Re;Re=Et(Re))ye++;for(;0<ne-ye;)tt=Et(tt),ne--;for(;0<ye-ne;)fe=Et(fe),ye--;for(;ne--;){if(tt===fe||fe!==null&&tt===fe.alternate)break t;tt=Et(tt),fe=Et(fe)}tt=null}else tt=null;He!==null&&Ou(Pe,xe,He,tt,!1),et!==null&&Kn!==null&&Ou(Pe,Kn,et,tt,!0)}}e:{if(xe=me?bu(me):window,He=xe.nodeName&&xe.nodeName.toLowerCase(),He==="select"||He==="input"&&xe.type==="file")var nt=sv;else if(Ac(xe))if(Fh)nt=ci;else{nt=Pc;var ct=ar}else(He=xe.nodeName)&&He.toLowerCase()==="input"&&(xe.type==="checkbox"||xe.type==="radio")&&(nt=Wo);if(nt&&(nt=nt(s,me))){ku(Pe,nt,y,Ee);break e}ct&&ct(s,xe,me),s==="focusout"&&(ct=xe._wrapperState)&&ct.controlled&&xe.type==="number"&&Ti(xe,"number",xe.value)}switch(ct=me?bu(me):window,s){case"focusin":(Ac(ct)||ct.contentEditable==="true")&&(an=ct,Ed=me,Zl=null);break;case"focusout":Zl=Ed=an=null;break;case"mousedown":fa=!0;break;case"contextmenu":case"mouseup":case"dragend":fa=!1,yn(Pe,y,Ee);break;case"selectionchange":if(at)break;case"keydown":case"keyup":yn(Pe,y,Ee)}var ut;if(Eo)e:{switch(s){case"compositionstart":var ht="onCompositionStart";break e;case"compositionend":ht="onCompositionEnd";break e;case"compositionupdate":ht="onCompositionUpdate";break e}ht=void 0}else Ql?Ec(s,y)&&(ht="onCompositionEnd"):s==="keydown"&&y.keyCode===229&&(ht="onCompositionStart");ht&&(xc&&y.locale!=="ko"&&(Ql||ht!=="onCompositionStart"?ht==="onCompositionEnd"&&Ql&&(ut=xo()):(lr=Ee,Wl="value"in lr?lr.value:lr.textContent,Ql=!0)),ct=ts(me,ht),0<ct.length&&(ht=new Tc(ht,s,null,y,Ee),Pe.push({event:ht,listeners:ct}),ut?ht.data=ut:(ut=md(y),ut!==null&&(ht.data=ut)))),(ut=Cu?hn(s,y):Cc(s,y))&&(me=ts(me,"onBeforeInput"),0<me.length&&(Ee=new Tc("onBeforeInput","beforeinput",null,y,Ee),Pe.push({event:Ee,listeners:me}),Ee.data=ut))}gn(Pe,c)})}function Qo(s,c,y){return{instance:s,listener:c,currentTarget:y}}function ts(s,c){for(var y=c+"Capture",S=[];s!==null;){var k=s,R=k.stateNode;k.tag===5&&R!==null&&(k=R,R=nr(s,y),R!=null&&S.unshift(Qo(s,R,k)),R=nr(s,c),R!=null&&S.push(Qo(s,R,k))),s=s.return}return S}function Et(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function Ou(s,c,y,S,k){for(var R=c._reactName,V=[];y!==null&&y!==S;){var J=y,te=J.alternate,me=J.stateNode;if(te!==null&&te===S)break;J.tag===5&&me!==null&&(J=me,k?(te=nr(y,R),te!=null&&V.unshift(Qo(y,te,J))):k||(te=nr(y,R),te!=null&&V.push(Qo(y,te,J)))),y=y.return}V.length!==0&&s.push({event:c,listeners:V})}var Pd=/\r\n?/g,Dd=/\u0000|\uFFFD/g;function pa(s){return(typeof s=="string"?s:""+s).replace(Pd,`
|
||
`).replace(Dd,"")}function ha(s,c,y){if(c=pa(c),pa(s)!==c&&y)throw Error(N(425))}function ya(){}var Oc=null,Od=null;function Rd(s,c){return s==="textarea"||s==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var ns=typeof setTimeout=="function"?setTimeout:void 0,fv=typeof clearTimeout=="function"?clearTimeout:void 0,bd=typeof Promise=="function"?Promise:void 0,dv=typeof queueMicrotask=="function"?queueMicrotask:typeof bd<"u"?function(s){return bd.resolve(null).then(s).catch(pv)}:ns;function pv(s){setTimeout(function(){throw s})}function Rc(s,c){var y=c,S=0;do{var k=y.nextSibling;if(s.removeChild(y),k&&k.nodeType===8)if(y=k.data,y==="/$"){if(S===0){s.removeChild(k),rr(c);return}S--}else y!=="$"&&y!=="$?"&&y!=="$!"||S++;y=k}while(y);rr(c)}function Ru(s){for(;s!=null;s=s.nextSibling){var c=s.nodeType;if(c===1||c===3)break;if(c===8){if(c=s.data,c==="$"||c==="$!"||c==="$?")break;if(c==="/$")return null}}return s}function Md(s){s=s.previousSibling;for(var c=0;s;){if(s.nodeType===8){var y=s.data;if(y==="$"||y==="$!"||y==="$?"){if(c===0)return s;c--}else y==="/$"&&c++}s=s.previousSibling}return null}var fl=Math.random().toString(36).slice(2),di="__reactFiber$"+fl,dl="__reactProps$"+fl,Zo="__reactContainer$"+fl,Ld="__reactEvents$"+fl,hv="__reactListeners$"+fl,rs="__reactHandles$"+fl;function Co(s){var c=s[di];if(c)return c;for(var y=s.parentNode;y;){if(c=y[Zo]||y[di]){if(y=c.alternate,c.child!==null||y!==null&&y.child!==null)for(s=Md(s);s!==null;){if(y=s[di])return y;s=Md(s)}return c}s=y,y=s.parentNode}return null}function pl(s){return s=s[di]||s[Zo],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function bu(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(N(33))}function ga(s){return s[dl]||null}var va=[],hl=-1;function Pi(s){return{current:s}}function vn(s){0>hl||(s.current=va[hl],va[hl]=null,hl--)}function un(s,c){hl++,va[hl]=s.current,s.current=c}var eu={},fr=Pi(eu),Nr=Pi(!1),Mu=eu;function is(s,c){var y=s.type.contextTypes;if(!y)return eu;var S=s.stateNode;if(S&&S.__reactInternalMemoizedUnmaskedChildContext===c)return S.__reactInternalMemoizedMaskedChildContext;var k={},R;for(R in y)k[R]=c[R];return S&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=c,s.__reactInternalMemoizedMaskedChildContext=k),k}function dr(s){return s=s.childContextTypes,s!=null}function bc(){vn(Nr),vn(fr)}function Zt(s,c,y){if(fr.current!==eu)throw Error(N(168));un(fr,c),un(Nr,y)}function Nd(s,c,y){var S=s.stateNode;if(c=c.childContextTypes,typeof S.getChildContext!="function")return y;S=S.getChildContext();for(var k in S)if(!(k in c))throw Error(N(108,dn(s)||"Unknown",k));return Xe({},y,S)}function os(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||eu,Mu=fr.current,un(fr,s),un(Nr,Nr.current),!0}function zh(s,c,y){var S=s.stateNode;if(!S)throw Error(N(169));y?(s=Nd(s,c,Mu),S.__reactInternalMemoizedMergedChildContext=s,vn(Nr),vn(fr),un(fr,s)):vn(Nr),un(Nr,y)}var tu=null,ma=!1,Mc=!1;function Di(s){tu===null?tu=[s]:tu.push(s)}function Nt(s){ma=!0,Di(s)}function $t(){if(!Mc&&tu!==null){Mc=!0;var s=0,c=jt;try{var y=tu;for(jt=1;s<y.length;s++){var S=y[s];do S=S(!0);while(S!==null)}tu=null,ma=!1}catch(k){throw tu!==null&&(tu=tu.slice(s+1)),zl(Mr,$t),k}finally{jt=c,Mc=!1}}return null}var Oi=[],Lu=0,nu=null,Sa=0,pi=[],Ri=0,Te=null,ko=1,bi="";function xt(s,c){Oi[Lu++]=Sa,Oi[Lu++]=nu,nu=s,Sa=c}function yl(s,c,y){pi[Ri++]=ko,pi[Ri++]=bi,pi[Ri++]=Te,Te=s;var S=ko;s=bi;var k=32-Yr(S)-1;S&=~(1<<k),y+=1;var R=32-Yr(c)+k;if(30<R){var V=k-k%5;R=(S&(1<<V)-1).toString(32),S>>=V,k-=V,ko=1<<32-Yr(c)+k|y<<k|S,bi=R+s}else ko=1<<R|y<<k|S,bi=s}function ru(s){s.return!==null&&(xt(s,1),yl(s,1,0))}function Bt(s){for(;s===nu;)nu=Oi[--Lu],Oi[Lu]=null,Sa=Oi[--Lu],Oi[Lu]=null;for(;s===Te;)Te=pi[--Ri],pi[Ri]=null,bi=pi[--Ri],pi[Ri]=null,ko=pi[--Ri],pi[Ri]=null}var Bn=null,Qr=null,wt=!1,no=null;function _d(s,c){var y=ji(5,null,null,0);y.elementType="DELETED",y.stateNode=c,y.return=s,c=s.deletions,c===null?(s.deletions=[y],s.flags|=16):c.push(y)}function Gh(s,c){switch(s.tag){case 5:var y=s.type;return c=c.nodeType!==1||y.toLowerCase()!==c.nodeName.toLowerCase()?null:c,c!==null?(s.stateNode=c,Bn=s,Qr=Ru(c.firstChild),!0):!1;case 6:return c=s.pendingProps===""||c.nodeType!==3?null:c,c!==null?(s.stateNode=c,Bn=s,Qr=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(y=Te!==null?{id:ko,overflow:bi}:null,s.memoizedState={dehydrated:c,treeContext:y,retryLane:1073741824},y=ji(18,null,null,0),y.stateNode=c,y.return=s,s.child=y,Bn=s,Qr=null,!0):!1;default:return!1}}function Lc(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Nc(s){if(wt){var c=Qr;if(c){var y=c;if(!Gh(s,c)){if(Lc(s))throw Error(N(418));c=Ru(y.nextSibling);var S=Bn;c&&Gh(s,c)?_d(S,y):(s.flags=s.flags&-4097|2,wt=!1,Bn=s)}}else{if(Lc(s))throw Error(N(418));s.flags=s.flags&-4097|2,wt=!1,Bn=s}}}function wa(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Bn=s}function _r(s){if(s!==Bn)return!1;if(!wt)return wa(s),wt=!0,!1;var c;if((c=s.tag!==3)&&!(c=s.tag!==5)&&(c=s.type,c=c!=="head"&&c!=="body"&&!Rd(s.type,s.memoizedProps)),c&&(c=Qr)){if(Lc(s))throw Ud(),Error(N(418));for(;c;)_d(s,c),c=Ru(c.nextSibling)}if(wa(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(N(317));e:{for(s=s.nextSibling,c=0;s;){if(s.nodeType===8){var y=s.data;if(y==="/$"){if(c===0){Qr=Ru(s.nextSibling);break e}c--}else y!=="$"&&y!=="$!"&&y!=="$?"||c++}s=s.nextSibling}Qr=null}}else Qr=Bn?Ru(s.stateNode.nextSibling):null;return!0}function Ud(){for(var s=Qr;s;)s=Ru(s.nextSibling)}function iu(){Qr=Bn=null,wt=!1}function Nu(s){no===null?no=[s]:no.push(s)}var Ht=De.ReactCurrentBatchConfig;function gl(s,c,y){if(s=y.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(y._owner){if(y=y._owner,y){if(y.tag!==1)throw Error(N(309));var S=y.stateNode}if(!S)throw Error(N(147,s));var k=S,R=""+s;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===R?c.ref:(c=function(V){var J=k.refs;V===null?delete J[R]:J[R]=V},c._stringRef=R,c)}if(typeof s!="string")throw Error(N(284));if(!y._owner)throw Error(N(290,s))}return s}function _c(s,c){throw s=Object.prototype.toString.call(c),Error(N(31,s==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":s))}function us(s){var c=s._init;return c(s._payload)}function Uc(s){function c(fe,ne){if(s){var ye=fe.deletions;ye===null?(fe.deletions=[ne],fe.flags|=16):ye.push(ne)}}function y(fe,ne){if(!s)return null;for(;ne!==null;)c(fe,ne),ne=ne.sibling;return null}function S(fe,ne){for(fe=new Map;ne!==null;)ne.key!==null?fe.set(ne.key,ne):fe.set(ne.index,ne),ne=ne.sibling;return fe}function k(fe,ne){return fe=_o(fe,ne),fe.index=0,fe.sibling=null,fe}function R(fe,ne,ye){return fe.index=ye,s?(ye=fe.alternate,ye!==null?(ye=ye.index,ye<ne?(fe.flags|=2,ne):ye):(fe.flags|=2,ne)):(fe.flags|=1048576,ne)}function V(fe){return s&&fe.alternate===null&&(fe.flags|=2),fe}function J(fe,ne,ye,Re){return ne===null||ne.tag!==6?(ne=qu(ye,fe.mode,Re),ne.return=fe,ne):(ne=k(ne,ye),ne.return=fe,ne)}function te(fe,ne,ye,Re){var nt=ye.type;return nt===ln?Ee(fe,ne,ye.props.children,Re,ye.key):ne!==null&&(ne.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===Ut&&us(nt)===ne.type)?(Re=k(ne,ye.props),Re.ref=gl(fe,ne,ye),Re.return=fe,Re):(Re=Ga(ye.type,ye.key,ye.props,null,fe.mode,Re),Re.ref=gl(fe,ne,ye),Re.return=fe,Re)}function me(fe,ne,ye,Re){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==ye.containerInfo||ne.stateNode.implementation!==ye.implementation?(ne=xp(ye,fe.mode,Re),ne.return=fe,ne):(ne=k(ne,ye.children||[]),ne.return=fe,ne)}function Ee(fe,ne,ye,Re,nt){return ne===null||ne.tag!==7?(ne=Uo(ye,fe.mode,Re,nt),ne.return=fe,ne):(ne=k(ne,ye),ne.return=fe,ne)}function Pe(fe,ne,ye){if(typeof ne=="string"&&ne!==""||typeof ne=="number")return ne=qu(""+ne,fe.mode,ye),ne.return=fe,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case Ge:return ye=Ga(ne.type,ne.key,ne.props,null,fe.mode,ye),ye.ref=gl(fe,null,ne),ye.return=fe,ye;case mt:return ne=xp(ne,fe.mode,ye),ne.return=fe,ne;case Ut:var Re=ne._init;return Pe(fe,Re(ne._payload),ye)}if(ft(ne)||gt(ne))return ne=Uo(ne,fe.mode,ye,null),ne.return=fe,ne;_c(fe,ne)}return null}function xe(fe,ne,ye,Re){var nt=ne!==null?ne.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return nt!==null?null:J(fe,ne,""+ye,Re);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Ge:return ye.key===nt?te(fe,ne,ye,Re):null;case mt:return ye.key===nt?me(fe,ne,ye,Re):null;case Ut:return nt=ye._init,xe(fe,ne,nt(ye._payload),Re)}if(ft(ye)||gt(ye))return nt!==null?null:Ee(fe,ne,ye,Re,null);_c(fe,ye)}return null}function He(fe,ne,ye,Re,nt){if(typeof Re=="string"&&Re!==""||typeof Re=="number")return fe=fe.get(ye)||null,J(ne,fe,""+Re,nt);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case Ge:return fe=fe.get(Re.key===null?ye:Re.key)||null,te(ne,fe,Re,nt);case mt:return fe=fe.get(Re.key===null?ye:Re.key)||null,me(ne,fe,Re,nt);case Ut:var ct=Re._init;return He(fe,ne,ye,ct(Re._payload),nt)}if(ft(Re)||gt(Re))return fe=fe.get(ye)||null,Ee(ne,fe,Re,nt,null);_c(ne,Re)}return null}function et(fe,ne,ye,Re){for(var nt=null,ct=null,ut=ne,ht=ne=0,Zn=null;ut!==null&&ht<ye.length;ht++){ut.index>ht?(Zn=ut,ut=null):Zn=ut.sibling;var _t=xe(fe,ut,ye[ht],Re);if(_t===null){ut===null&&(ut=Zn);break}s&&ut&&_t.alternate===null&&c(fe,ut),ne=R(_t,ne,ht),ct===null?nt=_t:ct.sibling=_t,ct=_t,ut=Zn}if(ht===ye.length)return y(fe,ut),wt&&xt(fe,ht),nt;if(ut===null){for(;ht<ye.length;ht++)ut=Pe(fe,ye[ht],Re),ut!==null&&(ne=R(ut,ne,ht),ct===null?nt=ut:ct.sibling=ut,ct=ut);return wt&&xt(fe,ht),nt}for(ut=S(fe,ut);ht<ye.length;ht++)Zn=He(ut,fe,ht,ye[ht],Re),Zn!==null&&(s&&Zn.alternate!==null&&ut.delete(Zn.key===null?ht:Zn.key),ne=R(Zn,ne,ht),ct===null?nt=Zn:ct.sibling=Zn,ct=Zn);return s&&ut.forEach(function(Gu){return c(fe,Gu)}),wt&&xt(fe,ht),nt}function tt(fe,ne,ye,Re){var nt=gt(ye);if(typeof nt!="function")throw Error(N(150));if(ye=nt.call(ye),ye==null)throw Error(N(151));for(var ct=nt=null,ut=ne,ht=ne=0,Zn=null,_t=ye.next();ut!==null&&!_t.done;ht++,_t=ye.next()){ut.index>ht?(Zn=ut,ut=null):Zn=ut.sibling;var Gu=xe(fe,ut,_t.value,Re);if(Gu===null){ut===null&&(ut=Zn);break}s&&ut&&Gu.alternate===null&&c(fe,ut),ne=R(Gu,ne,ht),ct===null?nt=Gu:ct.sibling=Gu,ct=Gu,ut=Zn}if(_t.done)return y(fe,ut),wt&&xt(fe,ht),nt;if(ut===null){for(;!_t.done;ht++,_t=ye.next())_t=Pe(fe,_t.value,Re),_t!==null&&(ne=R(_t,ne,ht),ct===null?nt=_t:ct.sibling=_t,ct=_t);return wt&&xt(fe,ht),nt}for(ut=S(fe,ut);!_t.done;ht++,_t=ye.next())_t=He(ut,fe,ht,_t.value,Re),_t!==null&&(s&&_t.alternate!==null&&ut.delete(_t.key===null?ht:_t.key),ne=R(_t,ne,ht),ct===null?nt=_t:ct.sibling=_t,ct=_t);return s&&ut.forEach(function(Sf){return c(fe,Sf)}),wt&&xt(fe,ht),nt}function Kn(fe,ne,ye,Re){if(typeof ye=="object"&&ye!==null&&ye.type===ln&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Ge:e:{for(var nt=ye.key,ct=ne;ct!==null;){if(ct.key===nt){if(nt=ye.type,nt===ln){if(ct.tag===7){y(fe,ct.sibling),ne=k(ct,ye.props.children),ne.return=fe,fe=ne;break e}}else if(ct.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===Ut&&us(nt)===ct.type){y(fe,ct.sibling),ne=k(ct,ye.props),ne.ref=gl(fe,ct,ye),ne.return=fe,fe=ne;break e}y(fe,ct);break}else c(fe,ct);ct=ct.sibling}ye.type===ln?(ne=Uo(ye.props.children,fe.mode,Re,ye.key),ne.return=fe,fe=ne):(Re=Ga(ye.type,ye.key,ye.props,null,fe.mode,Re),Re.ref=gl(fe,ne,ye),Re.return=fe,fe=Re)}return V(fe);case mt:e:{for(ct=ye.key;ne!==null;){if(ne.key===ct)if(ne.tag===4&&ne.stateNode.containerInfo===ye.containerInfo&&ne.stateNode.implementation===ye.implementation){y(fe,ne.sibling),ne=k(ne,ye.children||[]),ne.return=fe,fe=ne;break e}else{y(fe,ne);break}else c(fe,ne);ne=ne.sibling}ne=xp(ye,fe.mode,Re),ne.return=fe,fe=ne}return V(fe);case Ut:return ct=ye._init,Kn(fe,ne,ct(ye._payload),Re)}if(ft(ye))return et(fe,ne,ye,Re);if(gt(ye))return tt(fe,ne,ye,Re);_c(fe,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ne!==null&&ne.tag===6?(y(fe,ne.sibling),ne=k(ne,ye),ne.return=fe,fe=ne):(y(fe,ne),ne=qu(ye,fe.mode,Re),ne.return=fe,fe=ne),V(fe)):y(fe,ne)}return Kn}var Mt=Uc(!0),Ao=Uc(!1),Ta=Pi(null),Vt=null,it=null,Po=null;function pr(){Po=it=Vt=null}function xa(s){var c=Ta.current;vn(Ta),s._currentValue=c}function _u(s,c,y){for(;s!==null;){var S=s.alternate;if((s.childLanes&c)!==c?(s.childLanes|=c,S!==null&&(S.childLanes|=c)):S!==null&&(S.childLanes&c)!==c&&(S.childLanes|=c),s===y)break;s=s.return}}function vl(s,c){Vt=s,Po=it=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&c)!==0&&(ir=!0),s.firstContext=null)}function Ur(s){var c=s._currentValue;if(Po!==s)if(s={context:s,memoizedValue:c,next:null},it===null){if(Vt===null)throw Error(N(308));it=s,Vt.dependencies={lanes:0,firstContext:s}}else it=it.next=s;return c}var Mi=null;function jd(s){Mi===null?Mi=[s]:Mi.push(s)}function Bd(s,c,y,S){var k=c.interleaved;return k===null?(y.next=y,jd(c)):(y.next=k.next,k.next=y),c.interleaved=y,ro(s,S)}function ro(s,c){s.lanes|=c;var y=s.alternate;for(y!==null&&(y.lanes|=c),y=s,s=s.return;s!==null;)s.childLanes|=c,y=s.alternate,y!==null&&(y.childLanes|=c),y=s,s=s.return;return y.tag===3?y.stateNode:null}var io=!1;function ls(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wh(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function ou(s,c){return{eventTime:s,lane:c,tag:0,payload:null,callback:null,next:null}}function uu(s,c,y){var S=s.updateQueue;if(S===null)return null;if(S=S.shared,(Jt&2)!==0){var k=S.pending;return k===null?c.next=c:(c.next=k.next,k.next=c),S.pending=c,ro(s,y)}return k=S.interleaved,k===null?(c.next=c,jd(S)):(c.next=k.next,k.next=c),S.interleaved=c,ro(s,y)}function jc(s,c,y){if(c=c.updateQueue,c!==null&&(c=c.shared,(y&4194240)!==0)){var S=c.lanes;S&=s.pendingLanes,y|=S,c.lanes=y,wo(s,y)}}function Vd(s,c){var y=s.updateQueue,S=s.alternate;if(S!==null&&(S=S.updateQueue,y===S)){var k=null,R=null;if(y=y.firstBaseUpdate,y!==null){do{var V={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};R===null?k=R=V:R=R.next=V,y=y.next}while(y!==null);R===null?k=R=c:R=R.next=c}else k=R=c;y={baseState:S.baseState,firstBaseUpdate:k,lastBaseUpdate:R,shared:S.shared,effects:S.effects},s.updateQueue=y;return}s=y.lastBaseUpdate,s===null?y.firstBaseUpdate=c:s.next=c,y.lastBaseUpdate=c}function Ia(s,c,y,S){var k=s.updateQueue;io=!1;var R=k.firstBaseUpdate,V=k.lastBaseUpdate,J=k.shared.pending;if(J!==null){k.shared.pending=null;var te=J,me=te.next;te.next=null,V===null?R=me:V.next=me,V=te;var Ee=s.alternate;Ee!==null&&(Ee=Ee.updateQueue,J=Ee.lastBaseUpdate,J!==V&&(J===null?Ee.firstBaseUpdate=me:J.next=me,Ee.lastBaseUpdate=te))}if(R!==null){var Pe=k.baseState;V=0,Ee=me=te=null,J=R;do{var xe=J.lane,He=J.eventTime;if((S&xe)===xe){Ee!==null&&(Ee=Ee.next={eventTime:He,lane:0,tag:J.tag,payload:J.payload,callback:J.callback,next:null});e:{var et=s,tt=J;switch(xe=c,He=y,tt.tag){case 1:if(et=tt.payload,typeof et=="function"){Pe=et.call(He,Pe,xe);break e}Pe=et;break e;case 3:et.flags=et.flags&-65537|128;case 0:if(et=tt.payload,xe=typeof et=="function"?et.call(He,Pe,xe):et,xe==null)break e;Pe=Xe({},Pe,xe);break e;case 2:io=!0}}J.callback!==null&&J.lane!==0&&(s.flags|=64,xe=k.effects,xe===null?k.effects=[J]:xe.push(J))}else He={eventTime:He,lane:xe,tag:J.tag,payload:J.payload,callback:J.callback,next:null},Ee===null?(me=Ee=He,te=Pe):Ee=Ee.next=He,V|=xe;if(J=J.next,J===null){if(J=k.shared.pending,J===null)break;xe=J,J=xe.next,xe.next=null,k.lastBaseUpdate=xe,k.shared.pending=null}}while(!0);if(Ee===null&&(te=Pe),k.baseState=te,k.firstBaseUpdate=me,k.lastBaseUpdate=Ee,c=k.shared.interleaved,c!==null){k=c;do V|=k.lane,k=k.next;while(k!==c)}else R===null&&(k.shared.lanes=0);Ui|=V,s.lanes=V,s.memoizedState=Pe}}function Xh(s,c,y){if(s=c.effects,c.effects=null,s!==null)for(c=0;c<s.length;c++){var S=s[c],k=S.callback;if(k!==null){if(S.callback=null,S=y,typeof k!="function")throw Error(N(191,k));k.call(S)}}}var Ea={},Do=Pi(Ea),ss=Pi(Ea),lu=Pi(Ea);function Uu(s){if(s===Ea)throw Error(N(174));return s}function Bc(s,c){switch(un(lu,c),un(ss,s),un(Do,Ea),s=c.nodeType,s){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:At(null,"");break;default:s=s===8?c.parentNode:c,c=s.namespaceURI||null,s=s.tagName,c=At(c,s)}vn(Do),un(Do,c)}function as(){vn(Do),vn(ss),vn(lu)}function Yh(s){Uu(lu.current);var c=Uu(Do.current),y=At(c,s.type);c!==y&&(un(ss,s),un(Do,y))}function Ca(s){ss.current===s&&(vn(Do),vn(ss))}var kn=Pi(0);function ka(s){for(var c=s;c!==null;){if(c.tag===13){var y=c.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||y.data==="$?"||y.data==="$!"))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Fd=[];function Kd(){for(var s=0;s<Fd.length;s++)Fd[s]._workInProgressVersionPrimary=null;Fd.length=0}var cs=De.ReactCurrentDispatcher,Vc=De.ReactCurrentBatchConfig,ml=0,Dn=null,Gn=null,Mn=null,Aa=!1,Pa=!1,su=0,yv=0;function kr(){throw Error(N(321))}function Fc(s,c){if(c===null)return!1;for(var y=0;y<c.length&&y<s.length;y++)if(!Yn(s[y],c[y]))return!1;return!0}function Hd(s,c,y,S,k,R){if(ml=R,Dn=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,cs.current=s===null||s.memoizedState===null?ey:gv,s=y(S,k),Pa){R=0;do{if(Pa=!1,su=0,25<=R)throw Error(N(301));R+=1,Mn=Gn=null,c.updateQueue=null,cs.current=ju,s=y(S,k)}while(Pa)}if(cs.current=vs,c=Gn!==null&&Gn.next!==null,ml=0,Mn=Gn=Dn=null,Aa=!1,c)throw Error(N(300));return s}function Kc(){var s=su!==0;return su=0,s}function Oo(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mn===null?Dn.memoizedState=Mn=s:Mn=Mn.next=s,Mn}function Li(){if(Gn===null){var s=Dn.alternate;s=s!==null?s.memoizedState:null}else s=Gn.next;var c=Mn===null?Dn.memoizedState:Mn.next;if(c!==null)Mn=c,Gn=s;else{if(s===null)throw Error(N(310));Gn=s,s={memoizedState:Gn.memoizedState,baseState:Gn.baseState,baseQueue:Gn.baseQueue,queue:Gn.queue,next:null},Mn===null?Dn.memoizedState=Mn=s:Mn=Mn.next=s}return Mn}function Da(s,c){return typeof c=="function"?c(s):c}function fs(s){var c=Li(),y=c.queue;if(y===null)throw Error(N(311));y.lastRenderedReducer=s;var S=Gn,k=S.baseQueue,R=y.pending;if(R!==null){if(k!==null){var V=k.next;k.next=R.next,R.next=V}S.baseQueue=k=R,y.pending=null}if(k!==null){R=k.next,S=S.baseState;var J=V=null,te=null,me=R;do{var Ee=me.lane;if((ml&Ee)===Ee)te!==null&&(te=te.next={lane:0,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null}),S=me.hasEagerState?me.eagerState:s(S,me.action);else{var Pe={lane:Ee,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null};te===null?(J=te=Pe,V=S):te=te.next=Pe,Dn.lanes|=Ee,Ui|=Ee}me=me.next}while(me!==null&&me!==R);te===null?V=S:te.next=J,Yn(S,c.memoizedState)||(ir=!0),c.memoizedState=S,c.baseState=V,c.baseQueue=te,y.lastRenderedState=S}if(s=y.interleaved,s!==null){k=s;do R=k.lane,Dn.lanes|=R,Ui|=R,k=k.next;while(k!==s)}else k===null&&(y.lanes=0);return[c.memoizedState,y.dispatch]}function Hc(s){var c=Li(),y=c.queue;if(y===null)throw Error(N(311));y.lastRenderedReducer=s;var S=y.dispatch,k=y.pending,R=c.memoizedState;if(k!==null){y.pending=null;var V=k=k.next;do R=s(R,V.action),V=V.next;while(V!==k);Yn(R,c.memoizedState)||(ir=!0),c.memoizedState=R,c.baseQueue===null&&(c.baseState=R),y.lastRenderedState=R}return[R,S]}function qd(){}function qc(s,c){var y=Dn,S=Li(),k=c(),R=!Yn(S.memoizedState,k);if(R&&(S.memoizedState=k,ir=!0),S=S.queue,Wc(Sl.bind(null,y,S,s),[s]),S.getSnapshot!==c||R||Mn!==null&&Mn.memoizedState.tag&1){if(y.flags|=2048,ps(9,zd.bind(null,y,S,k,c),void 0,null),Le===null)throw Error(N(349));(ml&30)!==0||$h(y,c,k)}return k}function $h(s,c,y){s.flags|=16384,s={getSnapshot:c,value:y},c=Dn.updateQueue,c===null?(c={lastEffect:null,stores:null},Dn.updateQueue=c,c.stores=[s]):(y=c.stores,y===null?c.stores=[s]:y.push(s))}function zd(s,c,y,S){c.value=y,c.getSnapshot=S,ds(c)&&zc(s)}function Sl(s,c,y){return y(function(){ds(c)&&zc(s)})}function ds(s){var c=s.getSnapshot;s=s.value;try{var y=c();return!Yn(s,y)}catch{return!0}}function zc(s){var c=ro(s,1);c!==null&&Br(c,s,1,-1)}function Gc(s){var c=Oo();return typeof s=="function"&&(s=s()),c.memoizedState=c.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:s},c.queue=s,s=s.dispatch=au.bind(null,Dn,s),[c.memoizedState,s]}function ps(s,c,y,S){return s={tag:s,create:c,destroy:y,deps:S,next:null},c=Dn.updateQueue,c===null?(c={lastEffect:null,stores:null},Dn.updateQueue=c,c.lastEffect=s.next=s):(y=c.lastEffect,y===null?c.lastEffect=s.next=s:(S=y.next,y.next=s,s.next=S,c.lastEffect=s)),s}function Gd(){return Li().memoizedState}function Oa(s,c,y,S){var k=Oo();Dn.flags|=s,k.memoizedState=ps(1|c,y,void 0,S===void 0?null:S)}function hs(s,c,y,S){var k=Li();S=S===void 0?null:S;var R=void 0;if(Gn!==null){var V=Gn.memoizedState;if(R=V.destroy,S!==null&&Fc(S,V.deps)){k.memoizedState=ps(c,y,R,S);return}}Dn.flags|=s,k.memoizedState=ps(1|c,y,R,S)}function Wd(s,c){return Oa(8390656,8,s,c)}function Wc(s,c){return hs(2048,8,s,c)}function ys(s,c){return hs(4,2,s,c)}function Xd(s,c){return hs(4,4,s,c)}function hi(s,c){if(typeof c=="function")return s=s(),c(s),function(){c(null)};if(c!=null)return s=s(),c.current=s,function(){c.current=null}}function Jh(s,c,y){return y=y!=null?y.concat([s]):null,hs(4,4,hi.bind(null,c,s),y)}function Yd(){}function $d(s,c){var y=Li();c=c===void 0?null:c;var S=y.memoizedState;return S!==null&&c!==null&&Fc(c,S[1])?S[0]:(y.memoizedState=[s,c],s)}function Qh(s,c){var y=Li();c=c===void 0?null:c;var S=y.memoizedState;return S!==null&&c!==null&&Fc(c,S[1])?S[0]:(s=s(),y.memoizedState=[s,c],s)}function Ar(s,c,y){return(ml&21)===0?(s.baseState&&(s.baseState=!1,ir=!0),s.memoizedState=y):(Yn(y,c)||(y=pc(),Dn.lanes|=y,Ui|=y,s.baseState=!0),c)}function Jd(s,c){var y=jt;jt=y!==0&&4>y?y:4,s(!0);var S=Vc.transition;Vc.transition={};try{s(!1),c()}finally{jt=y,Vc.transition=S}}function Fe(){return Li().memoizedState}function Zh(s,c,y){var S=Gt(s);if(y={lane:S,action:y,hasEagerState:!1,eagerState:null,next:null},Qd(s))gs(c,y);else if(y=Bd(s,c,y,S),y!==null){var k=wn();Br(y,s,S,k),Xc(y,c,S)}}function au(s,c,y){var S=Gt(s),k={lane:S,action:y,hasEagerState:!1,eagerState:null,next:null};if(Qd(s))gs(c,k);else{var R=s.alternate;if(s.lanes===0&&(R===null||R.lanes===0)&&(R=c.lastRenderedReducer,R!==null))try{var V=c.lastRenderedState,J=R(V,y);if(k.hasEagerState=!0,k.eagerState=J,Yn(J,V)){var te=c.interleaved;te===null?(k.next=k,jd(c)):(k.next=te.next,te.next=k),c.interleaved=k;return}}catch{}finally{}y=Bd(s,c,k,S),y!==null&&(k=wn(),Br(y,s,S,k),Xc(y,c,S))}}function Qd(s){var c=s.alternate;return s===Dn||c!==null&&c===Dn}function gs(s,c){Pa=Aa=!0;var y=s.pending;y===null?c.next=c:(c.next=y.next,y.next=c),s.pending=c}function Xc(s,c,y){if((y&4194240)!==0){var S=c.lanes;S&=s.pendingLanes,y|=S,c.lanes=y,wo(s,y)}}var vs={readContext:Ur,useCallback:kr,useContext:kr,useEffect:kr,useImperativeHandle:kr,useInsertionEffect:kr,useLayoutEffect:kr,useMemo:kr,useReducer:kr,useRef:kr,useState:kr,useDebugValue:kr,useDeferredValue:kr,useTransition:kr,useMutableSource:kr,useSyncExternalStore:kr,useId:kr,unstable_isNewReconciler:!1},ey={readContext:Ur,useCallback:function(s,c){return Oo().memoizedState=[s,c===void 0?null:c],s},useContext:Ur,useEffect:Wd,useImperativeHandle:function(s,c,y){return y=y!=null?y.concat([s]):null,Oa(4194308,4,hi.bind(null,c,s),y)},useLayoutEffect:function(s,c){return Oa(4194308,4,s,c)},useInsertionEffect:function(s,c){return Oa(4,2,s,c)},useMemo:function(s,c){var y=Oo();return c=c===void 0?null:c,s=s(),y.memoizedState=[s,c],s},useReducer:function(s,c,y){var S=Oo();return c=y!==void 0?y(c):c,S.memoizedState=S.baseState=c,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:c},S.queue=s,s=s.dispatch=Zh.bind(null,Dn,s),[S.memoizedState,s]},useRef:function(s){var c=Oo();return s={current:s},c.memoizedState=s},useState:Gc,useDebugValue:Yd,useDeferredValue:function(s){return Oo().memoizedState=s},useTransition:function(){var s=Gc(!1),c=s[0];return s=Jd.bind(null,s[1]),Oo().memoizedState=s,[c,s]},useMutableSource:function(){},useSyncExternalStore:function(s,c,y){var S=Dn,k=Oo();if(wt){if(y===void 0)throw Error(N(407));y=y()}else{if(y=c(),Le===null)throw Error(N(349));(ml&30)!==0||$h(S,c,y)}k.memoizedState=y;var R={value:y,getSnapshot:c};return k.queue=R,Wd(Sl.bind(null,S,R,s),[s]),S.flags|=2048,ps(9,zd.bind(null,S,R,y,c),void 0,null),y},useId:function(){var s=Oo(),c=Le.identifierPrefix;if(wt){var y=bi,S=ko;y=(S&~(1<<32-Yr(S)-1)).toString(32)+y,c=":"+c+"R"+y,y=su++,0<y&&(c+="H"+y.toString(32)),c+=":"}else y=yv++,c=":"+c+"r"+y.toString(32)+":";return s.memoizedState=c},unstable_isNewReconciler:!1},gv={readContext:Ur,useCallback:$d,useContext:Ur,useEffect:Wc,useImperativeHandle:Jh,useInsertionEffect:ys,useLayoutEffect:Xd,useMemo:Qh,useReducer:fs,useRef:Gd,useState:function(){return fs(Da)},useDebugValue:Yd,useDeferredValue:function(s){var c=Li();return Ar(c,Gn.memoizedState,s)},useTransition:function(){var s=fs(Da)[0],c=Li().memoizedState;return[s,c]},useMutableSource:qd,useSyncExternalStore:qc,useId:Fe,unstable_isNewReconciler:!1},ju={readContext:Ur,useCallback:$d,useContext:Ur,useEffect:Wc,useImperativeHandle:Jh,useInsertionEffect:ys,useLayoutEffect:Xd,useMemo:Qh,useReducer:Hc,useRef:Gd,useState:function(){return Hc(Da)},useDebugValue:Yd,useDeferredValue:function(s){var c=Li();return Gn===null?c.memoizedState=s:Ar(c,Gn.memoizedState,s)},useTransition:function(){var s=Hc(Da)[0],c=Li().memoizedState;return[s,c]},useMutableSource:qd,useSyncExternalStore:qc,useId:Fe,unstable_isNewReconciler:!1};function Ni(s,c){if(s&&s.defaultProps){c=Xe({},c),s=s.defaultProps;for(var y in s)c[y]===void 0&&(c[y]=s[y]);return c}return c}function Yc(s,c,y,S){c=s.memoizedState,y=y(S,c),y=y==null?c:Xe({},c,y),s.memoizedState=y,s.lanes===0&&(s.updateQueue.baseState=y)}var oo={isMounted:function(s){return(s=s._reactInternals)?Ii(s)===s:!1},enqueueSetState:function(s,c,y){s=s._reactInternals;var S=wn(),k=Gt(s),R=ou(S,k);R.payload=c,y!=null&&(R.callback=y),c=uu(s,R,k),c!==null&&(Br(c,s,k,S),jc(c,s,k))},enqueueReplaceState:function(s,c,y){s=s._reactInternals;var S=wn(),k=Gt(s),R=ou(S,k);R.tag=1,R.payload=c,y!=null&&(R.callback=y),c=uu(s,R,k),c!==null&&(Br(c,s,k,S),jc(c,s,k))},enqueueForceUpdate:function(s,c){s=s._reactInternals;var y=wn(),S=Gt(s),k=ou(y,S);k.tag=2,c!=null&&(k.callback=c),c=uu(s,k,S),c!==null&&(Br(c,s,S,y),jc(c,s,S))}};function $c(s,c,y,S,k,R,V){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(S,R,V):c.prototype&&c.prototype.isPureReactComponent?!rn(y,S)||!rn(k,R):!0}function Zd(s,c,y){var S=!1,k=eu,R=c.contextType;return typeof R=="object"&&R!==null?R=Ur(R):(k=dr(c)?Mu:fr.current,S=c.contextTypes,R=(S=S!=null)?is(s,k):eu),c=new c(y,R),s.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=oo,s.stateNode=c,c._reactInternals=s,S&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=k,s.__reactInternalMemoizedMaskedChildContext=R),c}function ep(s,c,y,S){s=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(y,S),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(y,S),c.state!==s&&oo.enqueueReplaceState(c,c.state,null)}function Ra(s,c,y,S){var k=s.stateNode;k.props=y,k.state=s.memoizedState,k.refs={},ls(s);var R=c.contextType;typeof R=="object"&&R!==null?k.context=Ur(R):(R=dr(c)?Mu:fr.current,k.context=is(s,R)),k.state=s.memoizedState,R=c.getDerivedStateFromProps,typeof R=="function"&&(Yc(s,c,R,y),k.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(c=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),c!==k.state&&oo.enqueueReplaceState(k,k.state,null),Ia(s,y,k,S),k.state=s.memoizedState),typeof k.componentDidMount=="function"&&(s.flags|=4194308)}function ms(s,c){try{var y="",S=c;do y+=It(S),S=S.return;while(S);var k=y}catch(R){k=`
|
||
Error generating stack: `+R.message+`
|
||
`+R.stack}return{value:s,source:c,stack:k,digest:null}}function cu(s,c,y){return{value:s,source:null,stack:y??null,digest:c??null}}function Bu(s,c){try{console.error(c.value)}catch(y){setTimeout(function(){throw y})}}var ty=typeof WeakMap=="function"?WeakMap:Map;function ba(s,c,y){y=ou(-1,y),y.tag=3,y.payload={element:null};var S=c.value;return y.callback=function(){Ba||(Ba=!0,af=S),Bu(s,c)},y}function Ma(s,c,y){y=ou(-1,y),y.tag=3;var S=s.type.getDerivedStateFromError;if(typeof S=="function"){var k=c.value;y.payload=function(){return S(k)},y.callback=function(){Bu(s,c)}}var R=s.stateNode;return R!==null&&typeof R.componentDidCatch=="function"&&(y.callback=function(){Bu(s,c),typeof S!="function"&&(pu===null?pu=new Set([this]):pu.add(this));var V=c.stack;this.componentDidCatch(c.value,{componentStack:V!==null?V:""})}),y}function tp(s,c,y){var S=s.pingCache;if(S===null){S=s.pingCache=new ty;var k=new Set;S.set(c,k)}else k=S.get(c),k===void 0&&(k=new Set,S.set(c,k));k.has(y)||(k.add(y),s=Sp.bind(null,s,c,y),c.then(s,s))}function np(s){do{var c;if((c=s.tag===13)&&(c=s.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return s;s=s.return}while(s!==null);return null}function rp(s,c,y,S,k){return(s.mode&1)===0?(s===c?s.flags|=65536:(s.flags|=128,y.flags|=131072,y.flags&=-52805,y.tag===1&&(y.alternate===null?y.tag=17:(c=ou(-1,1),c.tag=2,uu(y,c,1))),y.lanes|=1),s):(s.flags|=65536,s.lanes=k,s)}var vv=De.ReactCurrentOwner,ir=!1;function cn(s,c,y,S){c.child=s===null?Ao(c,null,y,S):Mt(c,s.child,y,S)}function Ro(s,c,y,S,k){y=y.render;var R=c.ref;return vl(c,k),S=Hd(s,c,y,S,R,k),y=Kc(),s!==null&&!ir?(c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~k,fu(s,c,k)):(wt&&y&&ru(c),c.flags|=1,cn(s,c,S,k),c.child)}function Jc(s,c,y,S,k){if(s===null){var R=y.type;return typeof R=="function"&&!Tp(R)&&R.defaultProps===void 0&&y.compare===null&&y.defaultProps===void 0?(c.tag=15,c.type=R,Pr(s,c,R,S,k)):(s=Ga(y.type,null,S,c,c.mode,k),s.ref=c.ref,s.return=c,c.child=s)}if(R=s.child,(s.lanes&k)===0){var V=R.memoizedProps;if(y=y.compare,y=y!==null?y:rn,y(V,S)&&s.ref===c.ref)return fu(s,c,k)}return c.flags|=1,s=_o(R,S),s.ref=c.ref,s.return=c,c.child=s}function Pr(s,c,y,S,k){if(s!==null){var R=s.memoizedProps;if(rn(R,S)&&s.ref===c.ref)if(ir=!1,c.pendingProps=S=R,(s.lanes&k)!==0)(s.flags&131072)!==0&&(ir=!0);else return c.lanes=s.lanes,fu(s,c,k)}return or(s,c,y,S,k)}function dt(s,c,y){var S=c.pendingProps,k=S.children,R=s!==null?s.memoizedState:null;if(S.mode==="hidden")if((c.mode&1)===0)c.memoizedState={baseLanes:0,cachePool:null,transitions:null},un(Il,gi),gi|=y;else{if((y&1073741824)===0)return s=R!==null?R.baseLanes|y:y,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:s,cachePool:null,transitions:null},c.updateQueue=null,un(Il,gi),gi|=s,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},S=R!==null?R.baseLanes:y,un(Il,gi),gi|=S}else R!==null?(S=R.baseLanes|y,c.memoizedState=null):S=y,un(Il,gi),gi|=S;return cn(s,c,k,y),c.child}function Qc(s,c){var y=c.ref;(s===null&&y!==null||s!==null&&s.ref!==y)&&(c.flags|=512,c.flags|=2097152)}function or(s,c,y,S,k){var R=dr(y)?Mu:fr.current;return R=is(c,R),vl(c,k),y=Hd(s,c,y,S,R,k),S=Kc(),s!==null&&!ir?(c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~k,fu(s,c,k)):(wt&&S&&ru(c),c.flags|=1,cn(s,c,y,k),c.child)}function Oe(s,c,y,S,k){if(dr(y)){var R=!0;os(c)}else R=!1;if(vl(c,k),c.stateNode===null)Ts(s,c),Zd(c,y,S),Ra(c,y,S,k),S=!0;else if(s===null){var V=c.stateNode,J=c.memoizedProps;V.props=J;var te=V.context,me=y.contextType;typeof me=="object"&&me!==null?me=Ur(me):(me=dr(y)?Mu:fr.current,me=is(c,me));var Ee=y.getDerivedStateFromProps,Pe=typeof Ee=="function"||typeof V.getSnapshotBeforeUpdate=="function";Pe||typeof V.UNSAFE_componentWillReceiveProps!="function"&&typeof V.componentWillReceiveProps!="function"||(J!==S||te!==me)&&ep(c,V,S,me),io=!1;var xe=c.memoizedState;V.state=xe,Ia(c,S,V,k),te=c.memoizedState,J!==S||xe!==te||Nr.current||io?(typeof Ee=="function"&&(Yc(c,y,Ee,S),te=c.memoizedState),(J=io||$c(c,y,J,S,xe,te,me))?(Pe||typeof V.UNSAFE_componentWillMount!="function"&&typeof V.componentWillMount!="function"||(typeof V.componentWillMount=="function"&&V.componentWillMount(),typeof V.UNSAFE_componentWillMount=="function"&&V.UNSAFE_componentWillMount()),typeof V.componentDidMount=="function"&&(c.flags|=4194308)):(typeof V.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=S,c.memoizedState=te),V.props=S,V.state=te,V.context=me,S=J):(typeof V.componentDidMount=="function"&&(c.flags|=4194308),S=!1)}else{V=c.stateNode,Wh(s,c),J=c.memoizedProps,me=c.type===c.elementType?J:Ni(c.type,J),V.props=me,Pe=c.pendingProps,xe=V.context,te=y.contextType,typeof te=="object"&&te!==null?te=Ur(te):(te=dr(y)?Mu:fr.current,te=is(c,te));var He=y.getDerivedStateFromProps;(Ee=typeof He=="function"||typeof V.getSnapshotBeforeUpdate=="function")||typeof V.UNSAFE_componentWillReceiveProps!="function"&&typeof V.componentWillReceiveProps!="function"||(J!==Pe||xe!==te)&&ep(c,V,S,te),io=!1,xe=c.memoizedState,V.state=xe,Ia(c,S,V,k);var et=c.memoizedState;J!==Pe||xe!==et||Nr.current||io?(typeof He=="function"&&(Yc(c,y,He,S),et=c.memoizedState),(me=io||$c(c,y,me,S,xe,et,te)||!1)?(Ee||typeof V.UNSAFE_componentWillUpdate!="function"&&typeof V.componentWillUpdate!="function"||(typeof V.componentWillUpdate=="function"&&V.componentWillUpdate(S,et,te),typeof V.UNSAFE_componentWillUpdate=="function"&&V.UNSAFE_componentWillUpdate(S,et,te)),typeof V.componentDidUpdate=="function"&&(c.flags|=4),typeof V.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof V.componentDidUpdate!="function"||J===s.memoizedProps&&xe===s.memoizedState||(c.flags|=4),typeof V.getSnapshotBeforeUpdate!="function"||J===s.memoizedProps&&xe===s.memoizedState||(c.flags|=1024),c.memoizedProps=S,c.memoizedState=et),V.props=S,V.state=et,V.context=te,S=me):(typeof V.componentDidUpdate!="function"||J===s.memoizedProps&&xe===s.memoizedState||(c.flags|=4),typeof V.getSnapshotBeforeUpdate!="function"||J===s.memoizedProps&&xe===s.memoizedState||(c.flags|=1024),S=!1)}return Vu(s,c,y,S,R,k)}function Vu(s,c,y,S,k,R){Qc(s,c);var V=(c.flags&128)!==0;if(!S&&!V)return k&&zh(c,y,!1),fu(s,c,R);S=c.stateNode,vv.current=c;var J=V&&typeof y.getDerivedStateFromError!="function"?null:S.render();return c.flags|=1,s!==null&&V?(c.child=Mt(c,s.child,null,R),c.child=Mt(c,null,J,R)):cn(s,c,J,R),c.memoizedState=S.state,k&&zh(c,y,!0),c.child}function Be(s){var c=s.stateNode;c.pendingContext?Zt(s,c.pendingContext,c.pendingContext!==c.context):c.context&&Zt(s,c.context,!1),Bc(s,c.containerInfo)}function Ct(s,c,y,S,k){return iu(),Nu(k),c.flags|=256,cn(s,c,y,S),c.child}var Ss={dehydrated:null,treeContext:null,retryLane:0};function ip(s){return{baseLanes:s,cachePool:null,transitions:null}}function Xt(s,c,y){var S=c.pendingProps,k=kn.current,R=!1,V=(c.flags&128)!==0,J;if((J=V)||(J=s!==null&&s.memoizedState===null?!1:(k&2)!==0),J?(R=!0,c.flags&=-129):(s===null||s.memoizedState!==null)&&(k|=1),un(kn,k&1),s===null)return Nc(c),s=c.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((c.mode&1)===0?c.lanes=1:s.data==="$!"?c.lanes=8:c.lanes=1073741824,null):(V=S.children,s=S.fallback,R?(S=c.mode,R=c.child,V={mode:"hidden",children:V},(S&1)===0&&R!==null?(R.childLanes=0,R.pendingProps=V):R=pf(V,S,0,null),s=Uo(s,S,y,null),R.return=c,s.return=c,R.sibling=s,c.child=R,c.child.memoizedState=ip(y),c.memoizedState=Ss,s):La(c,V));if(k=s.memoizedState,k!==null&&(J=k.dehydrated,J!==null))return mv(s,c,V,S,J,k,y);if(R){R=S.fallback,V=c.mode,k=s.child,J=k.sibling;var te={mode:"hidden",children:S.children};return(V&1)===0&&c.child!==k?(S=c.child,S.childLanes=0,S.pendingProps=te,c.deletions=null):(S=_o(k,te),S.subtreeFlags=k.subtreeFlags&14680064),J!==null?R=_o(J,R):(R=Uo(R,V,y,null),R.flags|=2),R.return=c,S.return=c,S.sibling=R,c.child=S,S=R,R=c.child,V=s.child.memoizedState,V=V===null?ip(y):{baseLanes:V.baseLanes|y,cachePool:null,transitions:V.transitions},R.memoizedState=V,R.childLanes=s.childLanes&~y,c.memoizedState=Ss,S}return R=s.child,s=R.sibling,S=_o(R,{mode:"visible",children:S.children}),(c.mode&1)===0&&(S.lanes=y),S.return=c,S.sibling=null,s!==null&&(y=c.deletions,y===null?(c.deletions=[s],c.flags|=16):y.push(s)),c.child=S,c.memoizedState=null,S}function La(s,c){return c=pf({mode:"visible",children:c},s.mode,0,null),c.return=s,s.child=c}function Na(s,c,y,S){return S!==null&&Nu(S),Mt(c,s.child,null,y),s=La(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function mv(s,c,y,S,k,R,V){if(y)return c.flags&256?(c.flags&=-257,S=cu(Error(N(422))),Na(s,c,V,S)):c.memoizedState!==null?(c.child=s.child,c.flags|=128,null):(R=S.fallback,k=c.mode,S=pf({mode:"visible",children:S.children},k,0,null),R=Uo(R,k,V,null),R.flags|=2,S.return=c,R.return=c,S.sibling=R,c.child=S,(c.mode&1)!==0&&Mt(c,s.child,null,V),c.child.memoizedState=ip(V),c.memoizedState=Ss,R);if((c.mode&1)===0)return Na(s,c,V,null);if(k.data==="$!"){if(S=k.nextSibling&&k.nextSibling.dataset,S)var J=S.dgst;return S=J,R=Error(N(419)),S=cu(R,S,void 0),Na(s,c,V,S)}if(J=(V&s.childLanes)!==0,ir||J){if(S=Le,S!==null){switch(V&-V){case 4:k=2;break;case 16:k=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:k=32;break;case 536870912:k=268435456;break;default:k=0}k=(k&(S.suspendedLanes|V))!==0?0:k,k!==0&&k!==R.retryLane&&(R.retryLane=k,ro(s,k),Br(S,s,k,-1))}return ff(),S=cu(Error(N(421))),Na(s,c,V,S)}return k.data==="$?"?(c.flags|=128,c.child=s.child,c=Tv.bind(null,s),k._reactRetry=c,null):(s=R.treeContext,Qr=Ru(k.nextSibling),Bn=c,wt=!0,no=null,s!==null&&(pi[Ri++]=ko,pi[Ri++]=bi,pi[Ri++]=Te,ko=s.id,bi=s.overflow,Te=c),c=La(c,S.children),c.flags|=4096,c)}function ny(s,c,y){s.lanes|=c;var S=s.alternate;S!==null&&(S.lanes|=c),_u(s.return,c,y)}function Zc(s,c,y,S,k){var R=s.memoizedState;R===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:S,tail:y,tailMode:k}:(R.isBackwards=c,R.rendering=null,R.renderingStartTime=0,R.last=S,R.tail=y,R.tailMode=k)}function ws(s,c,y){var S=c.pendingProps,k=S.revealOrder,R=S.tail;if(cn(s,c,S.children,y),S=kn.current,(S&2)!==0)S=S&1|2,c.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&ny(s,y,c);else if(s.tag===19)ny(s,y,c);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===c)break e;for(;s.sibling===null;){if(s.return===null||s.return===c)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}S&=1}if(un(kn,S),(c.mode&1)===0)c.memoizedState=null;else switch(k){case"forwards":for(y=c.child,k=null;y!==null;)s=y.alternate,s!==null&&ka(s)===null&&(k=y),y=y.sibling;y=k,y===null?(k=c.child,c.child=null):(k=y.sibling,y.sibling=null),Zc(c,!1,k,y,R);break;case"backwards":for(y=null,k=c.child,c.child=null;k!==null;){if(s=k.alternate,s!==null&&ka(s)===null){c.child=k;break}s=k.sibling,k.sibling=y,y=k,k=s}Zc(c,!0,y,null,R);break;case"together":Zc(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function Ts(s,c){(c.mode&1)===0&&s!==null&&(s.alternate=null,c.alternate=null,c.flags|=2)}function fu(s,c,y){if(s!==null&&(c.dependencies=s.dependencies),Ui|=c.lanes,(y&c.childLanes)===0)return null;if(s!==null&&c.child!==s.child)throw Error(N(153));if(c.child!==null){for(s=c.child,y=_o(s,s.pendingProps),c.child=y,y.return=c;s.sibling!==null;)s=s.sibling,y=y.sibling=_o(s,s.pendingProps),y.return=c;y.sibling=null}return c.child}function _a(s,c,y){switch(c.tag){case 3:Be(c),iu();break;case 5:Yh(c);break;case 1:dr(c.type)&&os(c);break;case 4:Bc(c,c.stateNode.containerInfo);break;case 10:var S=c.type._context,k=c.memoizedProps.value;un(Ta,S._currentValue),S._currentValue=k;break;case 13:if(S=c.memoizedState,S!==null)return S.dehydrated!==null?(un(kn,kn.current&1),c.flags|=128,null):(y&c.child.childLanes)!==0?Xt(s,c,y):(un(kn,kn.current&1),s=fu(s,c,y),s!==null?s.sibling:null);un(kn,kn.current&1);break;case 19:if(S=(y&c.childLanes)!==0,(s.flags&128)!==0){if(S)return ws(s,c,y);c.flags|=128}if(k=c.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),un(kn,kn.current),S)break;return null;case 22:case 23:return c.lanes=0,dt(s,c,y)}return fu(s,c,y)}var op,ef,up,tf;op=function(s,c){for(var y=c.child;y!==null;){if(y.tag===5||y.tag===6)s.appendChild(y.stateNode);else if(y.tag!==4&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===c)break;for(;y.sibling===null;){if(y.return===null||y.return===c)return;y=y.return}y.sibling.return=y.return,y=y.sibling}},ef=function(){},up=function(s,c,y,S){var k=s.memoizedProps;if(k!==S){s=c.stateNode,Uu(Do.current);var R=null;switch(y){case"input":k=nd(s,k),S=nd(s,S),R=[];break;case"select":k=Xe({},k,{value:void 0}),S=Xe({},S,{value:void 0}),R=[];break;case"textarea":k=rd(s,k),S=rd(s,S),R=[];break;default:typeof k.onClick!="function"&&typeof S.onClick=="function"&&(s.onclick=ya)}Rt(y,S);var V;y=null;for(me in k)if(!S.hasOwnProperty(me)&&k.hasOwnProperty(me)&&k[me]!=null)if(me==="style"){var J=k[me];for(V in J)J.hasOwnProperty(V)&&(y||(y={}),y[V]="")}else me!=="dangerouslySetInnerHTML"&&me!=="children"&&me!=="suppressContentEditableWarning"&&me!=="suppressHydrationWarning"&&me!=="autoFocus"&&(T.hasOwnProperty(me)?R||(R=[]):(R=R||[]).push(me,null));for(me in S){var te=S[me];if(J=k!=null?k[me]:void 0,S.hasOwnProperty(me)&&te!==J&&(te!=null||J!=null))if(me==="style")if(J){for(V in J)!J.hasOwnProperty(V)||te&&te.hasOwnProperty(V)||(y||(y={}),y[V]="");for(V in te)te.hasOwnProperty(V)&&J[V]!==te[V]&&(y||(y={}),y[V]=te[V])}else y||(R||(R=[]),R.push(me,y)),y=te;else me==="dangerouslySetInnerHTML"?(te=te?te.__html:void 0,J=J?J.__html:void 0,te!=null&&J!==te&&(R=R||[]).push(me,te)):me==="children"?typeof te!="string"&&typeof te!="number"||(R=R||[]).push(me,""+te):me!=="suppressContentEditableWarning"&&me!=="suppressHydrationWarning"&&(T.hasOwnProperty(me)?(te!=null&&me==="onScroll"&&En("scroll",s),R||J===te||(R=[])):(R=R||[]).push(me,te))}y&&(R=R||[]).push("style",y);var me=R;(c.updateQueue=me)&&(c.flags|=4)}},tf=function(s,c,y,S){y!==S&&(c.flags|=4)};function Ua(s,c){if(!wt)switch(s.tailMode){case"hidden":c=s.tail;for(var y=null;c!==null;)c.alternate!==null&&(y=c),c=c.sibling;y===null?s.tail=null:y.sibling=null;break;case"collapsed":y=s.tail;for(var S=null;y!==null;)y.alternate!==null&&(S=y),y=y.sibling;S===null?c||s.tail===null?s.tail=null:s.tail.sibling=null:S.sibling=null}}function Dr(s){var c=s.alternate!==null&&s.alternate.child===s.child,y=0,S=0;if(c)for(var k=s.child;k!==null;)y|=k.lanes|k.childLanes,S|=k.subtreeFlags&14680064,S|=k.flags&14680064,k.return=s,k=k.sibling;else for(k=s.child;k!==null;)y|=k.lanes|k.childLanes,S|=k.subtreeFlags,S|=k.flags,k.return=s,k=k.sibling;return s.subtreeFlags|=S,s.childLanes=y,c}function Sv(s,c,y){var S=c.pendingProps;switch(Bt(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dr(c),null;case 1:return dr(c.type)&&bc(),Dr(c),null;case 3:return S=c.stateNode,as(),vn(Nr),vn(fr),Kd(),S.pendingContext&&(S.context=S.pendingContext,S.pendingContext=null),(s===null||s.child===null)&&(_r(c)?c.flags|=4:s===null||s.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,no!==null&&(Es(no),no=null))),ef(s,c),Dr(c),null;case 5:Ca(c);var k=Uu(lu.current);if(y=c.type,s!==null&&c.stateNode!=null)up(s,c,y,S,k),s.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!S){if(c.stateNode===null)throw Error(N(166));return Dr(c),null}if(s=Uu(Do.current),_r(c)){S=c.stateNode,y=c.type;var R=c.memoizedProps;switch(S[di]=c,S[dl]=R,s=(c.mode&1)!==0,y){case"dialog":En("cancel",S),En("close",S);break;case"iframe":case"object":case"embed":En("load",S);break;case"video":case"audio":for(k=0;k<es.length;k++)En(es[k],S);break;case"source":En("error",S);break;case"img":case"image":case"link":En("error",S),En("load",S);break;case"details":En("toggle",S);break;case"input":Ju(S,R),En("invalid",S);break;case"select":S._wrapperState={wasMultiple:!!R.multiple},En("invalid",S);break;case"textarea":rv(S,R),En("invalid",S)}Rt(y,R),k=null;for(var V in R)if(R.hasOwnProperty(V)){var J=R[V];V==="children"?typeof J=="string"?S.textContent!==J&&(R.suppressHydrationWarning!==!0&&ha(S.textContent,J,s),k=["children",J]):typeof J=="number"&&S.textContent!==""+J&&(R.suppressHydrationWarning!==!0&&ha(S.textContent,J,s),k=["children",""+J]):T.hasOwnProperty(V)&&J!=null&&V==="onScroll"&&En("scroll",S)}switch(y){case"input":lc(S),Ph(S,R,!0);break;case"textarea":lc(S),id(S);break;case"select":case"option":break;default:typeof R.onClick=="function"&&(S.onclick=ya)}S=k,c.updateQueue=S,S!==null&&(c.flags|=4)}else{V=k.nodeType===9?k:k.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Vs(y)),s==="http://www.w3.org/1999/xhtml"?y==="script"?(s=V.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof S.is=="string"?s=V.createElement(y,{is:S.is}):(s=V.createElement(y),y==="select"&&(V=s,S.multiple?V.multiple=!0:S.size&&(V.size=S.size))):s=V.createElementNS(s,y),s[di]=c,s[dl]=S,op(s,c,!1,!1),c.stateNode=s;e:{switch(V=ud(y,S),y){case"dialog":En("cancel",s),En("close",s),k=S;break;case"iframe":case"object":case"embed":En("load",s),k=S;break;case"video":case"audio":for(k=0;k<es.length;k++)En(es[k],s);k=S;break;case"source":En("error",s),k=S;break;case"img":case"image":case"link":En("error",s),En("load",s),k=S;break;case"details":En("toggle",s),k=S;break;case"input":Ju(s,S),k=nd(s,S),En("invalid",s);break;case"option":k=S;break;case"select":s._wrapperState={wasMultiple:!!S.multiple},k=Xe({},S,{value:void 0}),En("invalid",s);break;case"textarea":rv(s,S),k=rd(s,S),En("invalid",s);break;default:k=S}Rt(y,k),J=k;for(R in J)if(J.hasOwnProperty(R)){var te=J[R];R==="style"?ac(s,te):R==="dangerouslySetInnerHTML"?(te=te?te.__html:void 0,te!=null&&Dh(s,te)):R==="children"?typeof te=="string"?(y!=="textarea"||te!=="")&&Ks(s,te):typeof te=="number"&&Ks(s,""+te):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(T.hasOwnProperty(R)?te!=null&&R==="onScroll"&&En("scroll",s):te!=null&&oe(s,R,te,V))}switch(y){case"input":lc(s),Ph(s,S,!1);break;case"textarea":lc(s),id(s);break;case"option":S.value!=null&&s.setAttribute("value",""+on(S.value));break;case"select":s.multiple=!!S.multiple,R=S.value,R!=null?xi(s,!!S.multiple,R,!1):S.defaultValue!=null&&xi(s,!!S.multiple,S.defaultValue,!0);break;default:typeof k.onClick=="function"&&(s.onclick=ya)}switch(y){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}}S&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return Dr(c),null;case 6:if(s&&c.stateNode!=null)tf(s,c,s.memoizedProps,S);else{if(typeof S!="string"&&c.stateNode===null)throw Error(N(166));if(y=Uu(lu.current),Uu(Do.current),_r(c)){if(S=c.stateNode,y=c.memoizedProps,S[di]=c,(R=S.nodeValue!==y)&&(s=Bn,s!==null))switch(s.tag){case 3:ha(S.nodeValue,y,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&ha(S.nodeValue,y,(s.mode&1)!==0)}R&&(c.flags|=4)}else S=(y.nodeType===9?y:y.ownerDocument).createTextNode(S),S[di]=c,c.stateNode=S}return Dr(c),null;case 13:if(vn(kn),S=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(wt&&Qr!==null&&(c.mode&1)!==0&&(c.flags&128)===0)Ud(),iu(),c.flags|=98560,R=!1;else if(R=_r(c),S!==null&&S.dehydrated!==null){if(s===null){if(!R)throw Error(N(318));if(R=c.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(N(317));R[di]=c}else iu(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Dr(c),R=!1}else no!==null&&(Es(no),no=null),R=!0;if(!R)return c.flags&65536?c:null}return(c.flags&128)!==0?(c.lanes=y,c):(S=S!==null,S!==(s!==null&&s.memoizedState!==null)&&S&&(c.child.flags|=8192,(c.mode&1)!==0&&(s===null||(kn.current&1)!==0?Fn===0&&(Fn=3):ff())),c.updateQueue!==null&&(c.flags|=4),Dr(c),null);case 4:return as(),ef(s,c),s===null&&Jo(c.stateNode.containerInfo),Dr(c),null;case 10:return xa(c.type._context),Dr(c),null;case 17:return dr(c.type)&&bc(),Dr(c),null;case 19:if(vn(kn),R=c.memoizedState,R===null)return Dr(c),null;if(S=(c.flags&128)!==0,V=R.rendering,V===null)if(S)Ua(R,!1);else{if(Fn!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(V=ka(s),V!==null){for(c.flags|=128,Ua(R,!1),S=V.updateQueue,S!==null&&(c.updateQueue=S,c.flags|=4),c.subtreeFlags=0,S=y,y=c.child;y!==null;)R=y,s=S,R.flags&=14680066,V=R.alternate,V===null?(R.childLanes=0,R.lanes=s,R.child=null,R.subtreeFlags=0,R.memoizedProps=null,R.memoizedState=null,R.updateQueue=null,R.dependencies=null,R.stateNode=null):(R.childLanes=V.childLanes,R.lanes=V.lanes,R.child=V.child,R.subtreeFlags=0,R.deletions=null,R.memoizedProps=V.memoizedProps,R.memoizedState=V.memoizedState,R.updateQueue=V.updateQueue,R.type=V.type,s=V.dependencies,R.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),y=y.sibling;return un(kn,kn.current&1|2),c.child}s=s.sibling}R.tail!==null&&In()>Cl&&(c.flags|=128,S=!0,Ua(R,!1),c.lanes=4194304)}else{if(!S)if(s=ka(V),s!==null){if(c.flags|=128,S=!0,y=s.updateQueue,y!==null&&(c.updateQueue=y,c.flags|=4),Ua(R,!0),R.tail===null&&R.tailMode==="hidden"&&!V.alternate&&!wt)return Dr(c),null}else 2*In()-R.renderingStartTime>Cl&&y!==1073741824&&(c.flags|=128,S=!0,Ua(R,!1),c.lanes=4194304);R.isBackwards?(V.sibling=c.child,c.child=V):(y=R.last,y!==null?y.sibling=V:c.child=V,R.last=V)}return R.tail!==null?(c=R.tail,R.rendering=c,R.tail=c.sibling,R.renderingStartTime=In(),c.sibling=null,y=kn.current,un(kn,S?y&1|2:y&1),c):(Dr(c),null);case 22:case 23:return Ha(),S=c.memoizedState!==null,s!==null&&s.memoizedState!==null!==S&&(c.flags|=8192),S&&(c.mode&1)!==0?(gi&1073741824)!==0&&(Dr(c),c.subtreeFlags&6&&(c.flags|=8192)):Dr(c),null;case 24:return null;case 25:return null}throw Error(N(156,c.tag))}function nf(s,c){switch(Bt(c),c.tag){case 1:return dr(c.type)&&bc(),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return as(),vn(Nr),vn(fr),Kd(),s=c.flags,(s&65536)!==0&&(s&128)===0?(c.flags=s&-65537|128,c):null;case 5:return Ca(c),null;case 13:if(vn(kn),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(N(340));iu()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return vn(kn),null;case 4:return as(),null;case 10:return xa(c.type._context),null;case 22:case 23:return Ha(),null;case 24:return null;default:return null}}var rf=!1,$n=!1,wl=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function Fu(s,c){var y=s.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(S){Ln(s,c,S)}else y.current=null}function Ku(s,c,y){try{y()}catch(S){Ln(s,c,S)}}var ry=!1;function xs(s,c){if(Oc=pn,s=ca(),cr(s)){if("selectionStart"in s)var y={start:s.selectionStart,end:s.selectionEnd};else e:{y=(y=s.ownerDocument)&&y.defaultView||window;var S=y.getSelection&&y.getSelection();if(S&&S.rangeCount!==0){y=S.anchorNode;var k=S.anchorOffset,R=S.focusNode;S=S.focusOffset;try{y.nodeType,R.nodeType}catch{y=null;break e}var V=0,J=-1,te=-1,me=0,Ee=0,Pe=s,xe=null;t:for(;;){for(var He;Pe!==y||k!==0&&Pe.nodeType!==3||(J=V+k),Pe!==R||S!==0&&Pe.nodeType!==3||(te=V+S),Pe.nodeType===3&&(V+=Pe.nodeValue.length),(He=Pe.firstChild)!==null;)xe=Pe,Pe=He;for(;;){if(Pe===s)break t;if(xe===y&&++me===k&&(J=V),xe===R&&++Ee===S&&(te=V),(He=Pe.nextSibling)!==null)break;Pe=xe,xe=Pe.parentNode}Pe=He}y=J===-1||te===-1?null:{start:J,end:te}}else y=null}y=y||{start:0,end:0}}else y=null;for(Od={focusedElem:s,selectionRange:y},pn=!1,Ke=c;Ke!==null;)if(c=Ke,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,Ke=s;else for(;Ke!==null;){c=Ke;try{var et=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(et!==null){var tt=et.memoizedProps,Kn=et.memoizedState,fe=c.stateNode,ne=fe.getSnapshotBeforeUpdate(c.elementType===c.type?tt:Ni(c.type,tt),Kn);fe.__reactInternalSnapshotBeforeUpdate=ne}break;case 3:var ye=c.stateNode.containerInfo;ye.nodeType===1?ye.textContent="":ye.nodeType===9&&ye.documentElement&&ye.removeChild(ye.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(Re){Ln(c,c.return,Re)}if(s=c.sibling,s!==null){s.return=c.return,Ke=s;break}Ke=c.return}return et=ry,ry=!1,et}function ja(s,c,y){var S=c.updateQueue;if(S=S!==null?S.lastEffect:null,S!==null){var k=S=S.next;do{if((k.tag&s)===s){var R=k.destroy;k.destroy=void 0,R!==void 0&&Ku(c,y,R)}k=k.next}while(k!==S)}}function Tl(s,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var y=c=c.next;do{if((y.tag&s)===s){var S=y.create;y.destroy=S()}y=y.next}while(y!==c)}}function lp(s){var c=s.ref;if(c!==null){var y=s.stateNode;switch(s.tag){case 5:s=y;break;default:s=y}typeof c=="function"?c(s):c.current=s}}function iy(s){var c=s.alternate;c!==null&&(s.alternate=null,iy(c)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(c=s.stateNode,c!==null&&(delete c[di],delete c[dl],delete c[Ld],delete c[hv],delete c[rs])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function sp(s){return s.tag===5||s.tag===3||s.tag===4}function oy(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||sp(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function ap(s,c,y){var S=s.tag;if(S===5||S===6)s=s.stateNode,c?y.nodeType===8?y.parentNode.insertBefore(s,c):y.insertBefore(s,c):(y.nodeType===8?(c=y.parentNode,c.insertBefore(s,y)):(c=y,c.appendChild(s)),y=y._reactRootContainer,y!=null||c.onclick!==null||(c.onclick=ya));else if(S!==4&&(s=s.child,s!==null))for(ap(s,c,y),s=s.sibling;s!==null;)ap(s,c,y),s=s.sibling}function cp(s,c,y){var S=s.tag;if(S===5||S===6)s=s.stateNode,c?y.insertBefore(s,c):y.appendChild(s);else if(S!==4&&(s=s.child,s!==null))for(cp(s,c,y),s=s.sibling;s!==null;)cp(s,c,y),s=s.sibling}var Jn=null,Zr=!1;function yi(s,c,y){for(y=y.child;y!==null;)xl(s,c,y),y=y.sibling}function xl(s,c,y){if(Xr&&typeof Xr.onCommitFiberUnmount=="function")try{Xr.onCommitFiberUnmount(So,y)}catch{}switch(y.tag){case 5:$n||Fu(y,c);case 6:var S=Jn,k=Zr;Jn=null,yi(s,c,y),Jn=S,Zr=k,Jn!==null&&(Zr?(s=Jn,y=y.stateNode,s.nodeType===8?s.parentNode.removeChild(y):s.removeChild(y)):Jn.removeChild(y.stateNode));break;case 18:Jn!==null&&(Zr?(s=Jn,y=y.stateNode,s.nodeType===8?Rc(s.parentNode,y):s.nodeType===1&&Rc(s,y),rr(s)):Rc(Jn,y.stateNode));break;case 4:S=Jn,k=Zr,Jn=y.stateNode.containerInfo,Zr=!0,yi(s,c,y),Jn=S,Zr=k;break;case 0:case 11:case 14:case 15:if(!$n&&(S=y.updateQueue,S!==null&&(S=S.lastEffect,S!==null))){k=S=S.next;do{var R=k,V=R.destroy;R=R.tag,V!==void 0&&((R&2)!==0||(R&4)!==0)&&Ku(y,c,V),k=k.next}while(k!==S)}yi(s,c,y);break;case 1:if(!$n&&(Fu(y,c),S=y.stateNode,typeof S.componentWillUnmount=="function"))try{S.props=y.memoizedProps,S.state=y.memoizedState,S.componentWillUnmount()}catch(J){Ln(y,c,J)}yi(s,c,y);break;case 21:yi(s,c,y);break;case 22:y.mode&1?($n=(S=$n)||y.memoizedState!==null,yi(s,c,y),$n=S):yi(s,c,y);break;default:yi(s,c,y)}}function bo(s){var c=s.updateQueue;if(c!==null){s.updateQueue=null;var y=s.stateNode;y===null&&(y=s.stateNode=new wl),c.forEach(function(S){var k=df.bind(null,s,S);y.has(S)||(y.add(S),S.then(k,k))})}}function en(s,c){var y=c.deletions;if(y!==null)for(var S=0;S<y.length;S++){var k=y[S];try{var R=s,V=c,J=V;e:for(;J!==null;){switch(J.tag){case 5:Jn=J.stateNode,Zr=!1;break e;case 3:Jn=J.stateNode.containerInfo,Zr=!0;break e;case 4:Jn=J.stateNode.containerInfo,Zr=!0;break e}J=J.return}if(Jn===null)throw Error(N(160));xl(R,V,k),Jn=null,Zr=!1;var te=k.alternate;te!==null&&(te.return=null),k.return=null}catch(me){Ln(k,c,me)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)Is(c,s),c=c.sibling}function Is(s,c){var y=s.alternate,S=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(en(c,s),_i(s),S&4){try{ja(3,s,s.return),Tl(3,s)}catch(tt){Ln(s,s.return,tt)}try{ja(5,s,s.return)}catch(tt){Ln(s,s.return,tt)}}break;case 1:en(c,s),_i(s),S&512&&y!==null&&Fu(y,y.return);break;case 5:if(en(c,s),_i(s),S&512&&y!==null&&Fu(y,y.return),s.flags&32){var k=s.stateNode;try{Ks(k,"")}catch(tt){Ln(s,s.return,tt)}}if(S&4&&(k=s.stateNode,k!=null)){var R=s.memoizedProps,V=y!==null?y.memoizedProps:R,J=s.type,te=s.updateQueue;if(s.updateQueue=null,te!==null)try{J==="input"&&R.type==="radio"&&R.name!=null&&Bs(k,R),ud(J,V);var me=ud(J,R);for(V=0;V<te.length;V+=2){var Ee=te[V],Pe=te[V+1];Ee==="style"?ac(k,Pe):Ee==="dangerouslySetInnerHTML"?Dh(k,Pe):Ee==="children"?Ks(k,Pe):oe(k,Ee,Pe,me)}switch(J){case"input":Qu(k,R);break;case"textarea":iv(k,R);break;case"select":var xe=k._wrapperState.wasMultiple;k._wrapperState.wasMultiple=!!R.multiple;var He=R.value;He!=null?xi(k,!!R.multiple,He,!1):xe!==!!R.multiple&&(R.defaultValue!=null?xi(k,!!R.multiple,R.defaultValue,!0):xi(k,!!R.multiple,R.multiple?[]:"",!1))}k[dl]=R}catch(tt){Ln(s,s.return,tt)}}break;case 6:if(en(c,s),_i(s),S&4){if(s.stateNode===null)throw Error(N(162));k=s.stateNode,R=s.memoizedProps;try{k.nodeValue=R}catch(tt){Ln(s,s.return,tt)}}break;case 3:if(en(c,s),_i(s),S&4&&y!==null&&y.memoizedState.isDehydrated)try{rr(c.containerInfo)}catch(tt){Ln(s,s.return,tt)}break;case 4:en(c,s),_i(s);break;case 13:en(c,s),_i(s),k=s.child,k.flags&8192&&(R=k.memoizedState!==null,k.stateNode.isHidden=R,!R||k.alternate!==null&&k.alternate.memoizedState!==null||(sf=In())),S&4&&bo(s);break;case 22:if(Ee=y!==null&&y.memoizedState!==null,s.mode&1?($n=(me=$n)||Ee,en(c,s),$n=me):en(c,s),_i(s),S&8192){if(me=s.memoizedState!==null,(s.stateNode.isHidden=me)&&!Ee&&(s.mode&1)!==0)for(Ke=s,Ee=s.child;Ee!==null;){for(Pe=Ke=Ee;Ke!==null;){switch(xe=Ke,He=xe.child,xe.tag){case 0:case 11:case 14:case 15:ja(4,xe,xe.return);break;case 1:Fu(xe,xe.return);var et=xe.stateNode;if(typeof et.componentWillUnmount=="function"){S=xe,y=xe.return;try{c=S,et.props=c.memoizedProps,et.state=c.memoizedState,et.componentWillUnmount()}catch(tt){Ln(S,y,tt)}}break;case 5:Fu(xe,xe.return);break;case 22:if(xe.memoizedState!==null){ay(Pe);continue}}He!==null?(He.return=xe,Ke=He):ay(Pe)}Ee=Ee.sibling}e:for(Ee=null,Pe=s;;){if(Pe.tag===5){if(Ee===null){Ee=Pe;try{k=Pe.stateNode,me?(R=k.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none"):(J=Pe.stateNode,te=Pe.memoizedProps.style,V=te!=null&&te.hasOwnProperty("display")?te.display:null,J.style.display=vu("display",V))}catch(tt){Ln(s,s.return,tt)}}}else if(Pe.tag===6){if(Ee===null)try{Pe.stateNode.nodeValue=me?"":Pe.memoizedProps}catch(tt){Ln(s,s.return,tt)}}else if((Pe.tag!==22&&Pe.tag!==23||Pe.memoizedState===null||Pe===s)&&Pe.child!==null){Pe.child.return=Pe,Pe=Pe.child;continue}if(Pe===s)break e;for(;Pe.sibling===null;){if(Pe.return===null||Pe.return===s)break e;Ee===Pe&&(Ee=null),Pe=Pe.return}Ee===Pe&&(Ee=null),Pe.sibling.return=Pe.return,Pe=Pe.sibling}}break;case 19:en(c,s),_i(s),S&4&&bo(s);break;case 21:break;default:en(c,s),_i(s)}}function _i(s){var c=s.flags;if(c&2){try{e:{for(var y=s.return;y!==null;){if(sp(y)){var S=y;break e}y=y.return}throw Error(N(160))}switch(S.tag){case 5:var k=S.stateNode;S.flags&32&&(Ks(k,""),S.flags&=-33);var R=oy(s);cp(s,R,k);break;case 3:case 4:var V=S.stateNode.containerInfo,J=oy(s);ap(s,J,V);break;default:throw Error(N(161))}}catch(te){Ln(s,s.return,te)}s.flags&=-3}c&4096&&(s.flags&=-4097)}function uy(s,c,y){Ke=s,ly(s)}function ly(s,c,y){for(var S=(s.mode&1)!==0;Ke!==null;){var k=Ke,R=k.child;if(k.tag===22&&S){var V=k.memoizedState!==null||rf;if(!V){var J=k.alternate,te=J!==null&&J.memoizedState!==null||$n;J=rf;var me=$n;if(rf=V,($n=te)&&!me)for(Ke=k;Ke!==null;)V=Ke,te=V.child,V.tag===22&&V.memoizedState!==null?fp(k):te!==null?(te.return=V,Ke=te):fp(k);for(;R!==null;)Ke=R,ly(R),R=R.sibling;Ke=k,rf=J,$n=me}sy(s)}else(k.subtreeFlags&8772)!==0&&R!==null?(R.return=k,Ke=R):sy(s)}}function sy(s){for(;Ke!==null;){var c=Ke;if((c.flags&8772)!==0){var y=c.alternate;try{if((c.flags&8772)!==0)switch(c.tag){case 0:case 11:case 15:$n||Tl(5,c);break;case 1:var S=c.stateNode;if(c.flags&4&&!$n)if(y===null)S.componentDidMount();else{var k=c.elementType===c.type?y.memoizedProps:Ni(c.type,y.memoizedProps);S.componentDidUpdate(k,y.memoizedState,S.__reactInternalSnapshotBeforeUpdate)}var R=c.updateQueue;R!==null&&Xh(c,R,S);break;case 3:var V=c.updateQueue;if(V!==null){if(y=null,c.child!==null)switch(c.child.tag){case 5:y=c.child.stateNode;break;case 1:y=c.child.stateNode}Xh(c,V,y)}break;case 5:var J=c.stateNode;if(y===null&&c.flags&4){y=J;var te=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":te.autoFocus&&y.focus();break;case"img":te.src&&(y.src=te.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var me=c.alternate;if(me!==null){var Ee=me.memoizedState;if(Ee!==null){var Pe=Ee.dehydrated;Pe!==null&&rr(Pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}$n||c.flags&512&&lp(c)}catch(xe){Ln(c,c.return,xe)}}if(c===s){Ke=null;break}if(y=c.sibling,y!==null){y.return=c.return,Ke=y;break}Ke=c.return}}function ay(s){for(;Ke!==null;){var c=Ke;if(c===s){Ke=null;break}var y=c.sibling;if(y!==null){y.return=c.return,Ke=y;break}Ke=c.return}}function fp(s){for(;Ke!==null;){var c=Ke;try{switch(c.tag){case 0:case 11:case 15:var y=c.return;try{Tl(4,c)}catch(te){Ln(c,y,te)}break;case 1:var S=c.stateNode;if(typeof S.componentDidMount=="function"){var k=c.return;try{S.componentDidMount()}catch(te){Ln(c,k,te)}}var R=c.return;try{lp(c)}catch(te){Ln(c,R,te)}break;case 5:var V=c.return;try{lp(c)}catch(te){Ln(c,V,te)}}}catch(te){Ln(c,c.return,te)}if(c===s){Ke=null;break}var J=c.sibling;if(J!==null){J.return=c.return,Ke=J;break}Ke=c.return}}var cy=Math.ceil,of=De.ReactCurrentDispatcher,dp=De.ReactCurrentOwner,ei=De.ReactCurrentBatchConfig,Jt=0,Le=null,Vn=null,hr=0,gi=0,Il=Pi(0),Fn=0,du=null,Ui=0,uf=0,lf=0,El=null,jr=null,sf=0,Cl=1/0,Mo=null,Ba=!1,af=null,pu=null,Va=!1,hu=null,Fa=0,Ka=0,St=null,ti=-1,kl=0;function wn(){return(Jt&6)!==0?In():ti!==-1?ti:ti=In()}function Gt(s){return(s.mode&1)===0?1:(Jt&2)!==0&&hr!==0?hr&-hr:Ht.transition!==null?(kl===0&&(kl=pc()),kl):(s=jt,s!==0||(s=window.event,s=s===void 0?16:Fo(s.type)),s)}function Br(s,c,y,S){if(50<Ka)throw Ka=0,St=null,Error(N(185));Ji(s,y,S),((Jt&2)===0||s!==Le)&&(s===Le&&((Jt&2)===0&&(uf|=y),Fn===4&&Hu(s,hr)),Or(s,S),y===1&&Jt===0&&(c.mode&1)===0&&(Cl=In()+500,ma&&$t()))}function Or(s,c){var y=s.callbackNode;Zs(s,c);var S=Tt(s,s===Le?hr:0);if(S===0)y!==null&&st(y),s.callbackNode=null,s.callbackPriority=0;else if(c=S&-S,s.callbackPriority!==c){if(y!=null&&st(y),c===1)s.tag===0?Nt(hp.bind(null,s)):Di(hp.bind(null,s)),dv(function(){(Jt&6)===0&&$t()}),y=null;else{switch(ui(S)){case 1:y=Mr;break;case 4:y=Js;break;case 16:y=Wr;break;case 536870912:y=Qs;break;default:y=Wr}y=wp(y,pp.bind(null,s))}s.callbackPriority=c,s.callbackNode=y}}function pp(s,c){if(ti=-1,kl=0,(Jt&6)!==0)throw Error(N(327));var y=s.callbackNode;if(Al()&&s.callbackNode!==y)return null;var S=Tt(s,s===Le?hr:0);if(S===0)return null;if((S&30)!==0||(S&s.expiredLanes)!==0||c)c=qa(s,S);else{c=S;var k=Jt;Jt|=2;var R=Cs();(Le!==s||hr!==c)&&(Mo=null,Cl=In()+500,No(s,c));do try{gp();break}catch(J){fy(s,J)}while(!0);pr(),of.current=R,Jt=k,Vn!==null?c=0:(Le=null,hr=0,c=Fn)}if(c!==0){if(c===2&&(k=dc(s),k!==0&&(S=k,c=cf(s,k))),c===1)throw y=du,No(s,0),Hu(s,S),Or(s,In()),y;if(c===6)Hu(s,S);else{if(k=s.current.alternate,(S&30)===0&&!wv(k)&&(c=qa(s,S),c===2&&(R=dc(s),R!==0&&(S=R,c=cf(s,R))),c===1))throw y=du,No(s,0),Hu(s,S),Or(s,In()),y;switch(s.finishedWork=k,s.finishedLanes=S,c){case 0:case 1:throw Error(N(345));case 2:lo(s,jr,Mo);break;case 3:if(Hu(s,S),(S&130023424)===S&&(c=sf+500-In(),10<c)){if(Tt(s,0)!==0)break;if(k=s.suspendedLanes,(k&S)!==S){wn(),s.pingedLanes|=s.suspendedLanes&k;break}s.timeoutHandle=ns(lo.bind(null,s,jr,Mo),c);break}lo(s,jr,Mo);break;case 4:if(Hu(s,S),(S&4194240)===S)break;for(c=s.eventTimes,k=-1;0<S;){var V=31-Yr(S);R=1<<V,V=c[V],V>k&&(k=V),S&=~R}if(S=k,S=In()-S,S=(120>S?120:480>S?480:1080>S?1080:1920>S?1920:3e3>S?3e3:4320>S?4320:1960*cy(S/1960))-S,10<S){s.timeoutHandle=ns(lo.bind(null,s,jr,Mo),S);break}lo(s,jr,Mo);break;case 5:lo(s,jr,Mo);break;default:throw Error(N(329))}}}return Or(s,In()),s.callbackNode===y?pp.bind(null,s):null}function cf(s,c){var y=El;return s.current.memoizedState.isDehydrated&&(No(s,c).flags|=256),s=qa(s,c),s!==2&&(c=jr,jr=y,c!==null&&Es(c)),s}function Es(s){jr===null?jr=s:jr.push.apply(jr,s)}function wv(s){for(var c=s;;){if(c.flags&16384){var y=c.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var S=0;S<y.length;S++){var k=y[S],R=k.getSnapshot;k=k.value;try{if(!Yn(R(),k))return!1}catch{return!1}}}if(y=c.child,c.subtreeFlags&16384&&y!==null)y.return=c,c=y;else{if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Hu(s,c){for(c&=~lf,c&=~uf,s.suspendedLanes|=c,s.pingedLanes&=~c,s=s.expirationTimes;0<c;){var y=31-Yr(c),S=1<<y;s[y]=-1,c&=~S}}function hp(s){if((Jt&6)!==0)throw Error(N(327));Al();var c=Tt(s,0);if((c&1)===0)return Or(s,In()),null;var y=qa(s,c);if(s.tag!==0&&y===2){var S=dc(s);S!==0&&(c=S,y=cf(s,S))}if(y===1)throw y=du,No(s,0),Hu(s,c),Or(s,In()),y;if(y===6)throw Error(N(345));return s.finishedWork=s.current.alternate,s.finishedLanes=c,lo(s,jr,Mo),Or(s,In()),null}function yp(s,c){var y=Jt;Jt|=1;try{return s(c)}finally{Jt=y,Jt===0&&(Cl=In()+500,ma&&$t())}}function Lo(s){hu!==null&&hu.tag===0&&(Jt&6)===0&&Al();var c=Jt;Jt|=1;var y=ei.transition,S=jt;try{if(ei.transition=null,jt=1,s)return s()}finally{jt=S,ei.transition=y,Jt=c,(Jt&6)===0&&$t()}}function Ha(){gi=Il.current,vn(Il)}function No(s,c){s.finishedWork=null,s.finishedLanes=0;var y=s.timeoutHandle;if(y!==-1&&(s.timeoutHandle=-1,fv(y)),Vn!==null)for(y=Vn.return;y!==null;){var S=y;switch(Bt(S),S.tag){case 1:S=S.type.childContextTypes,S!=null&&bc();break;case 3:as(),vn(Nr),vn(fr),Kd();break;case 5:Ca(S);break;case 4:as();break;case 13:vn(kn);break;case 19:vn(kn);break;case 10:xa(S.type._context);break;case 22:case 23:Ha()}y=y.return}if(Le=s,Vn=s=_o(s.current,null),hr=gi=c,Fn=0,du=null,lf=uf=Ui=0,jr=El=null,Mi!==null){for(c=0;c<Mi.length;c++)if(y=Mi[c],S=y.interleaved,S!==null){y.interleaved=null;var k=S.next,R=y.pending;if(R!==null){var V=R.next;R.next=k,S.next=V}y.pending=S}Mi=null}return s}function fy(s,c){do{var y=Vn;try{if(pr(),cs.current=vs,Aa){for(var S=Dn.memoizedState;S!==null;){var k=S.queue;k!==null&&(k.pending=null),S=S.next}Aa=!1}if(ml=0,Mn=Gn=Dn=null,Pa=!1,su=0,dp.current=null,y===null||y.return===null){Fn=1,du=c,Vn=null;break}e:{var R=s,V=y.return,J=y,te=c;if(c=hr,J.flags|=32768,te!==null&&typeof te=="object"&&typeof te.then=="function"){var me=te,Ee=J,Pe=Ee.tag;if((Ee.mode&1)===0&&(Pe===0||Pe===11||Pe===15)){var xe=Ee.alternate;xe?(Ee.updateQueue=xe.updateQueue,Ee.memoizedState=xe.memoizedState,Ee.lanes=xe.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var He=np(V);if(He!==null){He.flags&=-257,rp(He,V,J,R,c),He.mode&1&&tp(R,me,c),c=He,te=me;var et=c.updateQueue;if(et===null){var tt=new Set;tt.add(te),c.updateQueue=tt}else et.add(te);break e}else{if((c&1)===0){tp(R,me,c),ff();break e}te=Error(N(426))}}else if(wt&&J.mode&1){var Kn=np(V);if(Kn!==null){(Kn.flags&65536)===0&&(Kn.flags|=256),rp(Kn,V,J,R,c),Nu(ms(te,J));break e}}R=te=ms(te,J),Fn!==4&&(Fn=2),El===null?El=[R]:El.push(R),R=V;do{switch(R.tag){case 3:R.flags|=65536,c&=-c,R.lanes|=c;var fe=ba(R,te,c);Vd(R,fe);break e;case 1:J=te;var ne=R.type,ye=R.stateNode;if((R.flags&128)===0&&(typeof ne.getDerivedStateFromError=="function"||ye!==null&&typeof ye.componentDidCatch=="function"&&(pu===null||!pu.has(ye)))){R.flags|=65536,c&=-c,R.lanes|=c;var Re=Ma(R,J,c);Vd(R,Re);break e}}R=R.return}while(R!==null)}dy(y)}catch(nt){c=nt,Vn===y&&y!==null&&(Vn=y=y.return);continue}break}while(!0)}function Cs(){var s=of.current;return of.current=vs,s===null?vs:s}function ff(){(Fn===0||Fn===3||Fn===2)&&(Fn=4),Le===null||(Ui&268435455)===0&&(uf&268435455)===0||Hu(Le,hr)}function qa(s,c){var y=Jt;Jt|=2;var S=Cs();(Le!==s||hr!==c)&&(Mo=null,No(s,c));do try{uo();break}catch(k){fy(s,k)}while(!0);if(pr(),Jt=y,of.current=S,Vn!==null)throw Error(N(261));return Le=null,hr=0,Fn}function uo(){for(;Vn!==null;)vp(Vn)}function gp(){for(;Vn!==null&&!Yi();)vp(Vn)}function vp(s){var c=Pl(s.alternate,s,gi);s.memoizedProps=s.pendingProps,c===null?dy(s):Vn=c,dp.current=null}function dy(s){var c=s;do{var y=c.alternate;if(s=c.return,(c.flags&32768)===0){if(y=Sv(y,c,gi),y!==null){Vn=y;return}}else{if(y=nf(y,c),y!==null){y.flags&=32767,Vn=y;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Fn=6,Vn=null;return}}if(c=c.sibling,c!==null){Vn=c;return}Vn=c=s}while(c!==null);Fn===0&&(Fn=5)}function lo(s,c,y){var S=jt,k=ei.transition;try{ei.transition=null,jt=1,mp(s,c,y,S)}finally{ei.transition=k,jt=S}return null}function mp(s,c,y,S){do Al();while(hu!==null);if((Jt&6)!==0)throw Error(N(327));y=s.finishedWork;var k=s.finishedLanes;if(y===null)return null;if(s.finishedWork=null,s.finishedLanes=0,y===s.current)throw Error(N(177));s.callbackNode=null,s.callbackPriority=0;var R=y.lanes|y.childLanes;if(Qt(s,R),s===Le&&(Vn=Le=null,hr=0),(y.subtreeFlags&2064)===0&&(y.flags&2064)===0||Va||(Va=!0,wp(Wr,function(){return Al(),null})),R=(y.flags&15990)!==0,(y.subtreeFlags&15990)!==0||R){R=ei.transition,ei.transition=null;var V=jt;jt=1;var J=Jt;Jt|=4,dp.current=null,xs(s,y),Is(y,s),Id(Od),pn=!!Oc,Od=Oc=null,s.current=y,uy(y),$s(),Jt=J,jt=V,ei.transition=R}else s.current=y;if(Va&&(Va=!1,hu=s,Fa=k),R=s.pendingLanes,R===0&&(pu=null),Ei(y.stateNode),Or(s,In()),c!==null)for(S=s.onRecoverableError,y=0;y<c.length;y++)k=c[y],S(k.value,{componentStack:k.stack,digest:k.digest});if(Ba)throw Ba=!1,s=af,af=null,s;return(Fa&1)!==0&&s.tag!==0&&Al(),R=s.pendingLanes,(R&1)!==0?s===St?Ka++:(Ka=0,St=s):Ka=0,$t(),null}function Al(){if(hu!==null){var s=ui(Fa),c=ei.transition,y=jt;try{if(ei.transition=null,jt=16>s?16:s,hu===null)var S=!1;else{if(s=hu,hu=null,Fa=0,(Jt&6)!==0)throw Error(N(331));var k=Jt;for(Jt|=4,Ke=s.current;Ke!==null;){var R=Ke,V=R.child;if((Ke.flags&16)!==0){var J=R.deletions;if(J!==null){for(var te=0;te<J.length;te++){var me=J[te];for(Ke=me;Ke!==null;){var Ee=Ke;switch(Ee.tag){case 0:case 11:case 15:ja(8,Ee,R)}var Pe=Ee.child;if(Pe!==null)Pe.return=Ee,Ke=Pe;else for(;Ke!==null;){Ee=Ke;var xe=Ee.sibling,He=Ee.return;if(iy(Ee),Ee===me){Ke=null;break}if(xe!==null){xe.return=He,Ke=xe;break}Ke=He}}}var et=R.alternate;if(et!==null){var tt=et.child;if(tt!==null){et.child=null;do{var Kn=tt.sibling;tt.sibling=null,tt=Kn}while(tt!==null)}}Ke=R}}if((R.subtreeFlags&2064)!==0&&V!==null)V.return=R,Ke=V;else e:for(;Ke!==null;){if(R=Ke,(R.flags&2048)!==0)switch(R.tag){case 0:case 11:case 15:ja(9,R,R.return)}var fe=R.sibling;if(fe!==null){fe.return=R.return,Ke=fe;break e}Ke=R.return}}var ne=s.current;for(Ke=ne;Ke!==null;){V=Ke;var ye=V.child;if((V.subtreeFlags&2064)!==0&&ye!==null)ye.return=V,Ke=ye;else e:for(V=ne;Ke!==null;){if(J=Ke,(J.flags&2048)!==0)try{switch(J.tag){case 0:case 11:case 15:Tl(9,J)}}catch(nt){Ln(J,J.return,nt)}if(J===V){Ke=null;break e}var Re=J.sibling;if(Re!==null){Re.return=J.return,Ke=Re;break e}Ke=J.return}}if(Jt=k,$t(),Xr&&typeof Xr.onPostCommitFiberRoot=="function")try{Xr.onPostCommitFiberRoot(So,s)}catch{}S=!0}return S}finally{jt=y,ei.transition=c}}return!1}function za(s,c,y){c=ms(y,c),c=ba(s,c,1),s=uu(s,c,1),c=wn(),s!==null&&(Ji(s,1,c),Or(s,c))}function Ln(s,c,y){if(s.tag===3)za(s,s,y);else for(;c!==null;){if(c.tag===3){za(c,s,y);break}else if(c.tag===1){var S=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(pu===null||!pu.has(S))){s=ms(y,s),s=Ma(c,s,1),c=uu(c,s,1),s=wn(),c!==null&&(Ji(c,1,s),Or(c,s));break}}c=c.return}}function Sp(s,c,y){var S=s.pingCache;S!==null&&S.delete(c),c=wn(),s.pingedLanes|=s.suspendedLanes&y,Le===s&&(hr&y)===y&&(Fn===4||Fn===3&&(hr&130023424)===hr&&500>In()-sf?No(s,0):lf|=y),Or(s,c)}function py(s,c){c===0&&((s.mode&1)===0?c=1:(c=xu,xu<<=1,(xu&130023424)===0&&(xu=4194304)));var y=wn();s=ro(s,c),s!==null&&(Ji(s,c,y),Or(s,y))}function Tv(s){var c=s.memoizedState,y=0;c!==null&&(y=c.retryLane),py(s,y)}function df(s,c){var y=0;switch(s.tag){case 13:var S=s.stateNode,k=s.memoizedState;k!==null&&(y=k.retryLane);break;case 19:S=s.stateNode;break;default:throw Error(N(314))}S!==null&&S.delete(c),py(s,y)}var Pl;Pl=function(s,c,y){if(s!==null)if(s.memoizedProps!==c.pendingProps||Nr.current)ir=!0;else{if((s.lanes&y)===0&&(c.flags&128)===0)return ir=!1,_a(s,c,y);ir=(s.flags&131072)!==0}else ir=!1,wt&&(c.flags&1048576)!==0&&yl(c,Sa,c.index);switch(c.lanes=0,c.tag){case 2:var S=c.type;Ts(s,c),s=c.pendingProps;var k=is(c,fr.current);vl(c,y),k=Hd(null,c,S,s,k,y);var R=Kc();return c.flags|=1,typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,dr(S)?(R=!0,os(c)):R=!1,c.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,ls(c),k.updater=oo,c.stateNode=k,k._reactInternals=c,Ra(c,S,s,y),c=Vu(null,c,S,!0,R,y)):(c.tag=0,wt&&R&&ru(c),cn(null,c,k,y),c=c.child),c;case 16:S=c.elementType;e:{switch(Ts(s,c),s=c.pendingProps,k=S._init,S=k(S._payload),c.type=S,k=c.tag=Iv(S),s=Ni(S,s),k){case 0:c=or(null,c,S,s,y);break e;case 1:c=Oe(null,c,S,s,y);break e;case 11:c=Ro(null,c,S,s,y);break e;case 14:c=Jc(null,c,S,Ni(S.type,s),y);break e}throw Error(N(306,S,""))}return c;case 0:return S=c.type,k=c.pendingProps,k=c.elementType===S?k:Ni(S,k),or(s,c,S,k,y);case 1:return S=c.type,k=c.pendingProps,k=c.elementType===S?k:Ni(S,k),Oe(s,c,S,k,y);case 3:e:{if(Be(c),s===null)throw Error(N(387));S=c.pendingProps,R=c.memoizedState,k=R.element,Wh(s,c),Ia(c,S,null,y);var V=c.memoizedState;if(S=V.element,R.isDehydrated)if(R={element:S,isDehydrated:!1,cache:V.cache,pendingSuspenseBoundaries:V.pendingSuspenseBoundaries,transitions:V.transitions},c.updateQueue.baseState=R,c.memoizedState=R,c.flags&256){k=ms(Error(N(423)),c),c=Ct(s,c,S,y,k);break e}else if(S!==k){k=ms(Error(N(424)),c),c=Ct(s,c,S,y,k);break e}else for(Qr=Ru(c.stateNode.containerInfo.firstChild),Bn=c,wt=!0,no=null,y=Ao(c,null,S,y),c.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(iu(),S===k){c=fu(s,c,y);break e}cn(s,c,S,y)}c=c.child}return c;case 5:return Yh(c),s===null&&Nc(c),S=c.type,k=c.pendingProps,R=s!==null?s.memoizedProps:null,V=k.children,Rd(S,k)?V=null:R!==null&&Rd(S,R)&&(c.flags|=32),Qc(s,c),cn(s,c,V,y),c.child;case 6:return s===null&&Nc(c),null;case 13:return Xt(s,c,y);case 4:return Bc(c,c.stateNode.containerInfo),S=c.pendingProps,s===null?c.child=Mt(c,null,S,y):cn(s,c,S,y),c.child;case 11:return S=c.type,k=c.pendingProps,k=c.elementType===S?k:Ni(S,k),Ro(s,c,S,k,y);case 7:return cn(s,c,c.pendingProps,y),c.child;case 8:return cn(s,c,c.pendingProps.children,y),c.child;case 12:return cn(s,c,c.pendingProps.children,y),c.child;case 10:e:{if(S=c.type._context,k=c.pendingProps,R=c.memoizedProps,V=k.value,un(Ta,S._currentValue),S._currentValue=V,R!==null)if(Yn(R.value,V)){if(R.children===k.children&&!Nr.current){c=fu(s,c,y);break e}}else for(R=c.child,R!==null&&(R.return=c);R!==null;){var J=R.dependencies;if(J!==null){V=R.child;for(var te=J.firstContext;te!==null;){if(te.context===S){if(R.tag===1){te=ou(-1,y&-y),te.tag=2;var me=R.updateQueue;if(me!==null){me=me.shared;var Ee=me.pending;Ee===null?te.next=te:(te.next=Ee.next,Ee.next=te),me.pending=te}}R.lanes|=y,te=R.alternate,te!==null&&(te.lanes|=y),_u(R.return,y,c),J.lanes|=y;break}te=te.next}}else if(R.tag===10)V=R.type===c.type?null:R.child;else if(R.tag===18){if(V=R.return,V===null)throw Error(N(341));V.lanes|=y,J=V.alternate,J!==null&&(J.lanes|=y),_u(V,y,c),V=R.sibling}else V=R.child;if(V!==null)V.return=R;else for(V=R;V!==null;){if(V===c){V=null;break}if(R=V.sibling,R!==null){R.return=V.return,V=R;break}V=V.return}R=V}cn(s,c,k.children,y),c=c.child}return c;case 9:return k=c.type,S=c.pendingProps.children,vl(c,y),k=Ur(k),S=S(k),c.flags|=1,cn(s,c,S,y),c.child;case 14:return S=c.type,k=Ni(S,c.pendingProps),k=Ni(S.type,k),Jc(s,c,S,k,y);case 15:return Pr(s,c,c.type,c.pendingProps,y);case 17:return S=c.type,k=c.pendingProps,k=c.elementType===S?k:Ni(S,k),Ts(s,c),c.tag=1,dr(S)?(s=!0,os(c)):s=!1,vl(c,y),Zd(c,S,k),Ra(c,S,k,y),Vu(null,c,S,!0,s,y);case 19:return ws(s,c,y);case 22:return dt(s,c,y)}throw Error(N(156,c.tag))};function wp(s,c){return zl(s,c)}function xv(s,c,y,S){this.tag=s,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ji(s,c,y,S){return new xv(s,c,y,S)}function Tp(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Iv(s){if(typeof s=="function")return Tp(s)?1:0;if(s!=null){if(s=s.$$typeof,s===pe)return 11;if(s===ke)return 14}return 2}function _o(s,c){var y=s.alternate;return y===null?(y=ji(s.tag,c,s.key,s.mode),y.elementType=s.elementType,y.type=s.type,y.stateNode=s.stateNode,y.alternate=s,s.alternate=y):(y.pendingProps=c,y.type=s.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=s.flags&14680064,y.childLanes=s.childLanes,y.lanes=s.lanes,y.child=s.child,y.memoizedProps=s.memoizedProps,y.memoizedState=s.memoizedState,y.updateQueue=s.updateQueue,c=s.dependencies,y.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},y.sibling=s.sibling,y.index=s.index,y.ref=s.ref,y}function Ga(s,c,y,S,k,R){var V=2;if(S=s,typeof s=="function")Tp(s)&&(V=1);else if(typeof s=="string")V=5;else e:switch(s){case ln:return Uo(y.children,k,R,c);case xn:V=8,k|=8;break;case mn:return s=ji(12,y,c,k|2),s.elementType=mn,s.lanes=R,s;case qe:return s=ji(13,y,c,k),s.elementType=qe,s.lanes=R,s;case be:return s=ji(19,y,c,k),s.elementType=be,s.lanes=R,s;case Ot:return pf(y,k,R,c);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case _:V=10;break e;case le:V=9;break e;case pe:V=11;break e;case ke:V=14;break e;case Ut:V=16,S=null;break e}throw Error(N(130,s==null?s:typeof s,""))}return c=ji(V,y,c,k),c.elementType=s,c.type=S,c.lanes=R,c}function Uo(s,c,y,S){return s=ji(7,s,S,c),s.lanes=y,s}function pf(s,c,y,S){return s=ji(22,s,S,c),s.elementType=Ot,s.lanes=y,s.stateNode={isHidden:!1},s}function qu(s,c,y){return s=ji(6,s,null,c),s.lanes=y,s}function xp(s,c,y){return c=ji(4,s.children!==null?s.children:[],s.key,c),c.lanes=y,c.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},c}function hf(s,c,y,S,k){this.tag=c,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Iu(0),this.expirationTimes=Iu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Iu(0),this.identifierPrefix=S,this.onRecoverableError=k,this.mutableSourceEagerHydrationData=null}function Ip(s,c,y,S,k,R,V,J,te){return s=new hf(s,c,y,J,te),c===1?(c=1,R===!0&&(c|=8)):c=0,R=ji(3,null,null,c),s.current=R,R.stateNode=s,R.memoizedState={element:S,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},ls(R),s}function hy(s,c,y){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:mt,key:S==null?null:""+S,children:s,containerInfo:c,implementation:y}}function yf(s){if(!s)return eu;s=s._reactInternals;e:{if(Ii(s)!==s||s.tag!==1)throw Error(N(170));var c=s;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(dr(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(N(171))}if(s.tag===1){var y=s.type;if(dr(y))return Nd(s,y,c)}return c}function yy(s,c,y,S,k,R,V,J,te){return s=Ip(y,S,!0,s,k,R,V,J,te),s.context=yf(null),y=s.current,S=wn(),k=Gt(y),R=ou(S,k),R.callback=c??null,uu(y,R,k),s.current.lanes=k,Ji(s,k,S),Or(s,S),s}function gf(s,c,y,S){var k=c.current,R=wn(),V=Gt(k);return y=yf(y),c.context===null?c.context=y:c.pendingContext=y,c=ou(R,V),c.payload={element:s},S=S===void 0?null:S,S!==null&&(c.callback=S),s=uu(k,c,V),s!==null&&(Br(s,k,V,R),jc(s,k,V)),V}function vf(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function gy(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var y=s.retryLane;s.retryLane=y!==0&&y<c?y:c}}function Ep(s,c){gy(s,c),(s=s.alternate)&&gy(s,c)}function Ev(){return null}var vy=typeof reportError=="function"?reportError:function(s){console.error(s)};function Cp(s){this._internalRoot=s}Wa.prototype.render=Cp.prototype.render=function(s){var c=this._internalRoot;if(c===null)throw Error(N(409));gf(s,c,null,null)},Wa.prototype.unmount=Cp.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var c=s.containerInfo;Lo(function(){gf(null,s,null,null)}),c[Zo]=null}};function Wa(s){this._internalRoot=s}Wa.prototype.unstable_scheduleHydration=function(s){if(s){var c=fd();s={blockedOn:null,target:s,priority:c};for(var y=0;y<Jr.length&&c!==0&&c<Jr[y].priority;y++);Jr.splice(y,0,s),y===0&&Mh(s)}};function Xa(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function ks(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function mf(){}function kp(s,c,y,S,k){if(k){if(typeof S=="function"){var R=S;S=function(){var me=vf(V);R.call(me)}}var V=yy(c,S,s,0,null,!1,!1,"",mf);return s._reactRootContainer=V,s[Zo]=V.current,Jo(s.nodeType===8?s.parentNode:s),Lo(),V}for(;k=s.lastChild;)s.removeChild(k);if(typeof S=="function"){var J=S;S=function(){var me=vf(te);J.call(me)}}var te=Ip(s,0,!1,null,null,!1,!1,"",mf);return s._reactRootContainer=te,s[Zo]=te.current,Jo(s.nodeType===8?s.parentNode:s),Lo(function(){gf(c,te,y,S)}),te}function Dl(s,c,y,S,k){var R=y._reactRootContainer;if(R){var V=R;if(typeof k=="function"){var J=k;k=function(){var te=vf(V);J.call(te)}}gf(c,V,s,k)}else V=kp(y,c,s,k,S);return vf(V)}hc=function(s){switch(s.tag){case 3:var c=s.stateNode;if(c.current.memoizedState.isDehydrated){var y=tl(c.pendingLanes);y!==0&&(wo(c,y|1),Or(c,In()),(Jt&6)===0&&(Cl=In()+500,$t()))}break;case 13:Lo(function(){var S=ro(s,1);if(S!==null){var k=wn();Br(S,s,1,k)}}),Ep(s,1)}},ea=function(s){if(s.tag===13){var c=ro(s,134217728);if(c!==null){var y=wn();Br(c,s,134217728,y)}Ep(s,134217728)}},ur=function(s){if(s.tag===13){var c=Gt(s),y=ro(s,c);if(y!==null){var S=wn();Br(y,s,c,S)}Ep(s,c)}},fd=function(){return jt},nl=function(s,c){var y=jt;try{return jt=s,c()}finally{jt=y}},Zu=function(s,c,y){switch(c){case"input":if(Qu(s,y),c=y.name,y.type==="radio"&&c!=null){for(y=s;y.parentNode;)y=y.parentNode;for(y=y.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<y.length;c++){var S=y[c];if(S!==s&&S.form===s.form){var k=ga(S);if(!k)throw Error(N(90));Me(S),Qu(S,k)}}}break;case"textarea":iv(s,y);break;case"select":c=y.value,c!=null&&xi(s,!!y.multiple,c,!1)}},sd=yp,wr=Lo;var Ap={usingClientEntryPoint:!1,Events:[pl,bu,ga,zr,Ze,yp]},Qn={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ya={bundleType:Qn.bundleType,version:Qn.version,rendererPackageName:Qn.rendererPackageName,rendererConfig:Qn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:De.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Xs(s),s===null?null:s.stateNode},findFiberByHostInstance:Qn.findFiberByHostInstance||Ev,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zu.isDisabled&&zu.supportsFiber)try{So=zu.inject(Ya),Xr=zu}catch{}}return Gi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ap,Gi.createPortal=function(s,c){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xa(c))throw Error(N(200));return hy(s,c,null,y)},Gi.createRoot=function(s,c){if(!Xa(s))throw Error(N(299));var y=!1,S="",k=vy;return c!=null&&(c.unstable_strictMode===!0&&(y=!0),c.identifierPrefix!==void 0&&(S=c.identifierPrefix),c.onRecoverableError!==void 0&&(k=c.onRecoverableError)),c=Ip(s,1,!1,null,null,y,!1,S,k),s[Zo]=c.current,Jo(s.nodeType===8?s.parentNode:s),new Cp(c)},Gi.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var c=s._reactInternals;if(c===void 0)throw typeof s.render=="function"?Error(N(188)):(s=Object.keys(s).join(","),Error(N(268,s)));return s=Xs(c),s=s===null?null:s.stateNode,s},Gi.flushSync=function(s){return Lo(s)},Gi.hydrate=function(s,c,y){if(!ks(c))throw Error(N(200));return Dl(null,s,c,!0,y)},Gi.hydrateRoot=function(s,c,y){if(!Xa(s))throw Error(N(405));var S=y!=null&&y.hydratedSources||null,k=!1,R="",V=vy;if(y!=null&&(y.unstable_strictMode===!0&&(k=!0),y.identifierPrefix!==void 0&&(R=y.identifierPrefix),y.onRecoverableError!==void 0&&(V=y.onRecoverableError)),c=yy(c,null,s,1,y??null,k,!1,R,V),s[Zo]=c.current,Jo(s),S)for(s=0;s<S.length;s++)y=S[s],k=y._getVersion,k=k(y._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[y,k]:c.mutableSourceEagerHydrationData.push(y,k);return new Wa(c)},Gi.render=function(s,c,y){if(!ks(c))throw Error(N(200));return Dl(null,s,c,!1,y)},Gi.unmountComponentAtNode=function(s){if(!ks(s))throw Error(N(40));return s._reactRootContainer?(Lo(function(){Dl(null,null,s,!1,function(){s._reactRootContainer=null,s[Zo]=null})}),!0):!1},Gi.unstable_batchedUpdates=yp,Gi.unstable_renderSubtreeIntoContainer=function(s,c,y,S){if(!ks(y))throw Error(N(200));if(s==null||s._reactInternals===void 0)throw Error(N(38));return Dl(s,c,y,!1,S)},Gi.version="18.3.1-next-f1338f8080-20240426",Gi}var T2;function xD(){if(T2)return j0.exports;T2=1;function b(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b)}catch(D){console.error(D)}}return b(),j0.exports=TD(),j0.exports}var x2;function ID(){if(x2)return Wg;x2=1;var b=xD();return Wg.createRoot=b.createRoot,Wg.hydrateRoot=b.hydrateRoot,Wg}var ED=ID(),gh={},I2;function CD(){if(I2)return gh;I2=1,Object.defineProperty(gh,"__esModule",{value:!0}),gh.parse=O,gh.serialize=u;const b=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,D=/^[\u0021-\u003A\u003C-\u007E]*$/,N=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,x=/^[\u0020-\u003A\u003D-\u007E]*$/,T=Object.prototype.toString,j=(()=>{const A=function(){};return A.prototype=Object.create(null),A})();function O(A,z){const I=new j,ee=A.length;if(ee<2)return I;const re=(z==null?void 0:z.decode)||d;let ge=0;do{const Ae=A.indexOf("=",ge);if(Ae===-1)break;const oe=A.indexOf(";",ge),De=oe===-1?ee:oe;if(Ae>De){ge=A.lastIndexOf(";",Ae-1)+1;continue}const Ge=h(A,ge,Ae),mt=l(A,Ae,Ge),ln=A.slice(Ge,mt);if(I[ln]===void 0){let xn=h(A,Ae+1,De),mn=l(A,De,xn);const _=re(A.slice(xn,mn));I[ln]=_}ge=De+1}while(ge<ee);return I}function h(A,z,I){do{const ee=A.charCodeAt(z);if(ee!==32&&ee!==9)return z}while(++z<I);return I}function l(A,z,I){for(;z>I;){const ee=A.charCodeAt(--z);if(ee!==32&&ee!==9)return z+1}return I}function u(A,z,I){const ee=(I==null?void 0:I.encode)||encodeURIComponent;if(!b.test(A))throw new TypeError(`argument name is invalid: ${A}`);const re=ee(z);if(!D.test(re))throw new TypeError(`argument val is invalid: ${z}`);let ge=A+"="+re;if(!I)return ge;if(I.maxAge!==void 0){if(!Number.isInteger(I.maxAge))throw new TypeError(`option maxAge is invalid: ${I.maxAge}`);ge+="; Max-Age="+I.maxAge}if(I.domain){if(!N.test(I.domain))throw new TypeError(`option domain is invalid: ${I.domain}`);ge+="; Domain="+I.domain}if(I.path){if(!x.test(I.path))throw new TypeError(`option path is invalid: ${I.path}`);ge+="; Path="+I.path}if(I.expires){if(!v(I.expires)||!Number.isFinite(I.expires.valueOf()))throw new TypeError(`option expires is invalid: ${I.expires}`);ge+="; Expires="+I.expires.toUTCString()}if(I.httpOnly&&(ge+="; HttpOnly"),I.secure&&(ge+="; Secure"),I.partitioned&&(ge+="; Partitioned"),I.priority)switch(typeof I.priority=="string"?I.priority.toLowerCase():void 0){case"low":ge+="; Priority=Low";break;case"medium":ge+="; Priority=Medium";break;case"high":ge+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${I.priority}`)}if(I.sameSite)switch(typeof I.sameSite=="string"?I.sameSite.toLowerCase():I.sameSite){case!0:case"strict":ge+="; SameSite=Strict";break;case"lax":ge+="; SameSite=Lax";break;case"none":ge+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${I.sameSite}`)}return ge}function d(A){if(A.indexOf("%")===-1)return A;try{return decodeURIComponent(A)}catch{return A}}function v(A){return T.call(A)==="[object Date]"}return gh}CD();/**
|
||
* react-router v7.1.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/var E2="popstate";function kD(b={}){function D(x,T){let{pathname:j,search:O,hash:h}=x.location;return Q0("",{pathname:j,search:O,hash:h},T.state&&T.state.usr||null,T.state&&T.state.key||"default")}function N(x,T){return typeof T=="string"?T:Ih(T)}return PD(D,N,null,b)}function zn(b,D){if(b===!1||b===null||typeof b>"u")throw new Error(D)}function Yu(b,D){if(!b){typeof console<"u"&&console.warn(D);try{throw new Error(D)}catch{}}}function AD(){return Math.random().toString(36).substring(2,10)}function C2(b,D){return{usr:b.state,key:b.key,idx:D}}function Q0(b,D,N=null,x){return{pathname:typeof b=="string"?b:b.pathname,search:"",hash:"",...typeof D=="string"?ed(D):D,state:N,key:D&&D.key||x||AD()}}function Ih({pathname:b="/",search:D="",hash:N=""}){return D&&D!=="?"&&(b+=D.charAt(0)==="?"?D:"?"+D),N&&N!=="#"&&(b+=N.charAt(0)==="#"?N:"#"+N),b}function ed(b){let D={};if(b){let N=b.indexOf("#");N>=0&&(D.hash=b.substring(N),b=b.substring(0,N));let x=b.indexOf("?");x>=0&&(D.search=b.substring(x),b=b.substring(0,x)),b&&(D.pathname=b)}return D}function PD(b,D,N,x={}){let{window:T=document.defaultView,v5Compat:j=!1}=x,O=T.history,h="POP",l=null,u=d();u==null&&(u=0,O.replaceState({...O.state,idx:u},""));function d(){return(O.state||{idx:null}).idx}function v(){h="POP";let re=d(),ge=re==null?null:re-u;u=re,l&&l({action:h,location:ee.location,delta:ge})}function A(re,ge){h="PUSH";let Ae=Q0(ee.location,re,ge);u=d()+1;let oe=C2(Ae,u),De=ee.createHref(Ae);try{O.pushState(oe,"",De)}catch(Ge){if(Ge instanceof DOMException&&Ge.name==="DataCloneError")throw Ge;T.location.assign(De)}j&&l&&l({action:h,location:ee.location,delta:1})}function z(re,ge){h="REPLACE";let Ae=Q0(ee.location,re,ge);u=d();let oe=C2(Ae,u),De=ee.createHref(Ae);O.replaceState(oe,"",De),j&&l&&l({action:h,location:ee.location,delta:0})}function I(re){let ge=T.location.origin!=="null"?T.location.origin:T.location.href,Ae=typeof re=="string"?re:Ih(re);return Ae=Ae.replace(/ $/,"%20"),zn(ge,`No window.location.(origin|href) available to create URL for href: ${Ae}`),new URL(Ae,ge)}let ee={get action(){return h},get location(){return b(T,O)},listen(re){if(l)throw new Error("A history only accepts one active listener");return T.addEventListener(E2,v),l=re,()=>{T.removeEventListener(E2,v),l=null}},createHref(re){return D(T,re)},createURL:I,encodeLocation(re){let ge=I(re);return{pathname:ge.pathname,search:ge.search,hash:ge.hash}},push:A,replace:z,go(re){return O.go(re)}};return ee}function V2(b,D,N="/"){return DD(b,D,N,!1)}function DD(b,D,N,x){let T=typeof D=="string"?ed(D):D,j=Us(T.pathname||"/",N);if(j==null)return null;let O=F2(b);OD(O);let h=null;for(let l=0;h==null&&l<O.length;++l){let u=FD(j);h=BD(O[l],u,x)}return h}function F2(b,D=[],N=[],x=""){let T=(j,O,h)=>{let l={relativePath:h===void 0?j.path||"":h,caseSensitive:j.caseSensitive===!0,childrenIndex:O,route:j};l.relativePath.startsWith("/")&&(zn(l.relativePath.startsWith(x),`Absolute route path "${l.relativePath}" nested under path "${x}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(x.length));let u=Fl([x,l.relativePath]),d=N.concat(l);j.children&&j.children.length>0&&(zn(j.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),F2(j.children,D,d,u)),!(j.path==null&&!j.index)&&D.push({path:u,score:UD(u,j.index),routesMeta:d})};return b.forEach((j,O)=>{var h;if(j.path===""||!((h=j.path)!=null&&h.includes("?")))T(j,O);else for(let l of K2(j.path))T(j,O,l)}),D}function K2(b){let D=b.split("/");if(D.length===0)return[];let[N,...x]=D,T=N.endsWith("?"),j=N.replace(/\?$/,"");if(x.length===0)return T?[j,""]:[j];let O=K2(x.join("/")),h=[];return h.push(...O.map(l=>l===""?j:[j,l].join("/"))),T&&h.push(...O),h.map(l=>b.startsWith("/")&&l===""?"/":l)}function OD(b){b.sort((D,N)=>D.score!==N.score?N.score-D.score:jD(D.routesMeta.map(x=>x.childrenIndex),N.routesMeta.map(x=>x.childrenIndex)))}var RD=/^:[\w-]+$/,bD=3,MD=2,LD=1,ND=10,_D=-2,k2=b=>b==="*";function UD(b,D){let N=b.split("/"),x=N.length;return N.some(k2)&&(x+=_D),D&&(x+=MD),N.filter(T=>!k2(T)).reduce((T,j)=>T+(RD.test(j)?bD:j===""?LD:ND),x)}function jD(b,D){return b.length===D.length&&b.slice(0,-1).every((x,T)=>x===D[T])?b[b.length-1]-D[D.length-1]:0}function BD(b,D,N=!1){let{routesMeta:x}=b,T={},j="/",O=[];for(let h=0;h<x.length;++h){let l=x[h],u=h===x.length-1,d=j==="/"?D:D.slice(j.length)||"/",v=Qg({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),A=l.route;if(!v&&u&&N&&!x[x.length-1].route.index&&(v=Qg({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!v)return null;Object.assign(T,v.params),O.push({params:T,pathname:Fl([j,v.pathname]),pathnameBase:zD(Fl([j,v.pathnameBase])),route:A}),v.pathnameBase!=="/"&&(j=Fl([j,v.pathnameBase]))}return O}function Qg(b,D){typeof b=="string"&&(b={path:b,caseSensitive:!1,end:!0});let[N,x]=VD(b.path,b.caseSensitive,b.end),T=D.match(N);if(!T)return null;let j=T[0],O=j.replace(/(.)\/+$/,"$1"),h=T.slice(1);return{params:x.reduce((u,{paramName:d,isOptional:v},A)=>{if(d==="*"){let I=h[A]||"";O=j.slice(0,j.length-I.length).replace(/(.)\/+$/,"$1")}const z=h[A];return v&&!z?u[d]=void 0:u[d]=(z||"").replace(/%2F/g,"/"),u},{}),pathname:j,pathnameBase:O,pattern:b}}function VD(b,D=!1,N=!0){Yu(b==="*"||!b.endsWith("*")||b.endsWith("/*"),`Route path "${b}" will be treated as if it were "${b.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${b.replace(/\*$/,"/*")}".`);let x=[],T="^"+b.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(O,h,l)=>(x.push({paramName:h,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return b.endsWith("*")?(x.push({paramName:"*"}),T+=b==="*"||b==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):N?T+="\\/*$":b!==""&&b!=="/"&&(T+="(?:(?=\\/|$))"),[new RegExp(T,D?void 0:"i"),x]}function FD(b){try{return b.split("/").map(D=>decodeURIComponent(D).replace(/\//g,"%2F")).join("/")}catch(D){return Yu(!1,`The URL path "${b}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${D}).`),b}}function Us(b,D){if(D==="/")return b;if(!b.toLowerCase().startsWith(D.toLowerCase()))return null;let N=D.endsWith("/")?D.length-1:D.length,x=b.charAt(N);return x&&x!=="/"?null:b.slice(N)||"/"}function KD(b,D="/"){let{pathname:N,search:x="",hash:T=""}=typeof b=="string"?ed(b):b;return{pathname:N?N.startsWith("/")?N:HD(N,D):D,search:GD(x),hash:WD(T)}}function HD(b,D){let N=D.replace(/\/+$/,"").split("/");return b.split("/").forEach(T=>{T===".."?N.length>1&&N.pop():T!=="."&&N.push(T)}),N.length>1?N.join("/"):"/"}function F0(b,D,N,x){return`Cannot include a '${b}' character in a manually specified \`to.${D}\` field [${JSON.stringify(x)}]. Please separate it out to the \`to.${N}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function qD(b){return b.filter((D,N)=>N===0||D.route.path&&D.route.path.length>0)}function H2(b){let D=qD(b);return D.map((N,x)=>x===D.length-1?N.pathname:N.pathnameBase)}function q2(b,D,N,x=!1){let T;typeof b=="string"?T=ed(b):(T={...b},zn(!T.pathname||!T.pathname.includes("?"),F0("?","pathname","search",T)),zn(!T.pathname||!T.pathname.includes("#"),F0("#","pathname","hash",T)),zn(!T.search||!T.search.includes("#"),F0("#","search","hash",T)));let j=b===""||T.pathname==="",O=j?"/":T.pathname,h;if(O==null)h=N;else{let v=D.length-1;if(!x&&O.startsWith("..")){let A=O.split("/");for(;A[0]==="..";)A.shift(),v-=1;T.pathname=A.join("/")}h=v>=0?D[v]:"/"}let l=KD(T,h),u=O&&O!=="/"&&O.endsWith("/"),d=(j||O===".")&&N.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}var Fl=b=>b.join("/").replace(/\/\/+/g,"/"),zD=b=>b.replace(/\/+$/,"").replace(/^\/*/,"/"),GD=b=>!b||b==="?"?"":b.startsWith("?")?b:"?"+b,WD=b=>!b||b==="#"?"":b.startsWith("#")?b:"#"+b;function XD(b){return b!=null&&typeof b.status=="number"&&typeof b.statusText=="string"&&typeof b.internal=="boolean"&&"data"in b}var z2=["POST","PUT","PATCH","DELETE"];new Set(z2);var YD=["GET",...z2];new Set(YD);var td=we.createContext(null);td.displayName="DataRouter";var tv=we.createContext(null);tv.displayName="DataRouterState";var G2=we.createContext({isTransitioning:!1});G2.displayName="ViewTransition";var $D=we.createContext(new Map);$D.displayName="Fetchers";var JD=we.createContext(null);JD.displayName="Await";var $u=we.createContext(null);$u.displayName="Navigation";var Ch=we.createContext(null);Ch.displayName="Location";var Kl=we.createContext({outlet:null,matches:[],isDataRoute:!1});Kl.displayName="Route";var o1=we.createContext(null);o1.displayName="RouteError";function QD(b,{relative:D}={}){zn(kh(),"useHref() may be used only in the context of a <Router> component.");let{basename:N,navigator:x}=we.useContext($u),{hash:T,pathname:j,search:O}=Ah(b,{relative:D}),h=j;return N!=="/"&&(h=j==="/"?N:Fl([N,j])),x.createHref({pathname:h,search:O,hash:T})}function kh(){return we.useContext(Ch)!=null}function js(){return zn(kh(),"useLocation() may be used only in the context of a <Router> component."),we.useContext(Ch).location}var W2="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function X2(b){we.useContext($u).static||we.useLayoutEffect(b)}function ZD(){let{isDataRoute:b}=we.useContext(Kl);return b?dO():eO()}function eO(){zn(kh(),"useNavigate() may be used only in the context of a <Router> component.");let b=we.useContext(td),{basename:D,navigator:N}=we.useContext($u),{matches:x}=we.useContext(Kl),{pathname:T}=js(),j=JSON.stringify(H2(x)),O=we.useRef(!1);return X2(()=>{O.current=!0}),we.useCallback((l,u={})=>{if(Yu(O.current,W2),!O.current)return;if(typeof l=="number"){N.go(l);return}let d=q2(l,JSON.parse(j),T,u.relative==="path");b==null&&D!=="/"&&(d.pathname=d.pathname==="/"?D:Fl([D,d.pathname])),(u.replace?N.replace:N.push)(d,u.state,u)},[D,N,j,T,b])}we.createContext(null);function Ah(b,{relative:D}={}){let{matches:N}=we.useContext(Kl),{pathname:x}=js(),T=JSON.stringify(H2(N));return we.useMemo(()=>q2(b,JSON.parse(T),x,D==="path"),[b,T,x,D])}function tO(b,D){return Y2(b,D)}function Y2(b,D,N,x){var ge;zn(kh(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:T}=we.useContext($u),{matches:j}=we.useContext(Kl),O=j[j.length-1],h=O?O.params:{},l=O?O.pathname:"/",u=O?O.pathnameBase:"/",d=O&&O.route;{let Ae=d&&d.path||"";$2(l,!d||Ae.endsWith("*")||Ae.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${Ae}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
||
|
||
Please change the parent <Route path="${Ae}"> to <Route path="${Ae==="/"?"*":`${Ae}/*`}">.`)}let v=js(),A;if(D){let Ae=typeof D=="string"?ed(D):D;zn(u==="/"||((ge=Ae.pathname)==null?void 0:ge.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${Ae.pathname}" was given in the \`location\` prop.`),A=Ae}else A=v;let z=A.pathname||"/",I=z;if(u!=="/"){let Ae=u.replace(/^\//,"").split("/");I="/"+z.replace(/^\//,"").split("/").slice(Ae.length).join("/")}let ee=V2(b,{pathname:I});Yu(d||ee!=null,`No routes matched location "${A.pathname}${A.search}${A.hash}" `),Yu(ee==null||ee[ee.length-1].route.element!==void 0||ee[ee.length-1].route.Component!==void 0||ee[ee.length-1].route.lazy!==void 0,`Matched leaf route at location "${A.pathname}${A.search}${A.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let re=uO(ee&&ee.map(Ae=>Object.assign({},Ae,{params:Object.assign({},h,Ae.params),pathname:Fl([u,T.encodeLocation?T.encodeLocation(Ae.pathname).pathname:Ae.pathname]),pathnameBase:Ae.pathnameBase==="/"?u:Fl([u,T.encodeLocation?T.encodeLocation(Ae.pathnameBase).pathname:Ae.pathnameBase])})),j,N,x);return D&&re?we.createElement(Ch.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...A},navigationType:"POP"}},re):re}function nO(){let b=fO(),D=XD(b)?`${b.status} ${b.statusText}`:b instanceof Error?b.message:JSON.stringify(b),N=b instanceof Error?b.stack:null,x="rgba(200,200,200, 0.5)",T={padding:"0.5rem",backgroundColor:x},j={padding:"2px 4px",backgroundColor:x},O=null;return console.error("Error handled by React Router default ErrorBoundary:",b),O=we.createElement(we.Fragment,null,we.createElement("p",null,"💿 Hey developer 👋"),we.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",we.createElement("code",{style:j},"ErrorBoundary")," or"," ",we.createElement("code",{style:j},"errorElement")," prop on your route.")),we.createElement(we.Fragment,null,we.createElement("h2",null,"Unexpected Application Error!"),we.createElement("h3",{style:{fontStyle:"italic"}},D),N?we.createElement("pre",{style:T},N):null,O)}var rO=we.createElement(nO,null),iO=class extends we.Component{constructor(b){super(b),this.state={location:b.location,revalidation:b.revalidation,error:b.error}}static getDerivedStateFromError(b){return{error:b}}static getDerivedStateFromProps(b,D){return D.location!==b.location||D.revalidation!=="idle"&&b.revalidation==="idle"?{error:b.error,location:b.location,revalidation:b.revalidation}:{error:b.error!==void 0?b.error:D.error,location:D.location,revalidation:b.revalidation||D.revalidation}}componentDidCatch(b,D){console.error("React Router caught the following error during render",b,D)}render(){return this.state.error!==void 0?we.createElement(Kl.Provider,{value:this.props.routeContext},we.createElement(o1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function oO({routeContext:b,match:D,children:N}){let x=we.useContext(td);return x&&x.static&&x.staticContext&&(D.route.errorElement||D.route.ErrorBoundary)&&(x.staticContext._deepestRenderedBoundaryId=D.route.id),we.createElement(Kl.Provider,{value:b},N)}function uO(b,D=[],N=null,x=null){if(b==null){if(!N)return null;if(N.errors)b=N.matches;else if(D.length===0&&!N.initialized&&N.matches.length>0)b=N.matches;else return null}let T=b,j=N==null?void 0:N.errors;if(j!=null){let l=T.findIndex(u=>u.route.id&&(j==null?void 0:j[u.route.id])!==void 0);zn(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(j).join(",")}`),T=T.slice(0,Math.min(T.length,l+1))}let O=!1,h=-1;if(N)for(let l=0;l<T.length;l++){let u=T[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(h=l),u.route.id){let{loaderData:d,errors:v}=N,A=u.route.loader&&!d.hasOwnProperty(u.route.id)&&(!v||v[u.route.id]===void 0);if(u.route.lazy||A){O=!0,h>=0?T=T.slice(0,h+1):T=[T[0]];break}}}return T.reduceRight((l,u,d)=>{let v,A=!1,z=null,I=null;N&&(v=j&&u.route.id?j[u.route.id]:void 0,z=u.route.errorElement||rO,O&&(h<0&&d===0?($2("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,I=null):h===d&&(A=!0,I=u.route.hydrateFallbackElement||null)));let ee=D.concat(T.slice(0,d+1)),re=()=>{let ge;return v?ge=z:A?ge=I:u.route.Component?ge=we.createElement(u.route.Component,null):u.route.element?ge=u.route.element:ge=l,we.createElement(oO,{match:u,routeContext:{outlet:l,matches:ee,isDataRoute:N!=null},children:ge})};return N&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?we.createElement(iO,{location:N.location,revalidation:N.revalidation,component:z,error:v,children:re(),routeContext:{outlet:null,matches:ee,isDataRoute:!0}}):re()},null)}function u1(b){return`${b} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lO(b){let D=we.useContext(td);return zn(D,u1(b)),D}function sO(b){let D=we.useContext(tv);return zn(D,u1(b)),D}function aO(b){let D=we.useContext(Kl);return zn(D,u1(b)),D}function l1(b){let D=aO(b),N=D.matches[D.matches.length-1];return zn(N.route.id,`${b} can only be used on routes that contain a unique "id"`),N.route.id}function cO(){return l1("useRouteId")}function fO(){var x;let b=we.useContext(o1),D=sO("useRouteError"),N=l1("useRouteError");return b!==void 0?b:(x=D.errors)==null?void 0:x[N]}function dO(){let{router:b}=lO("useNavigate"),D=l1("useNavigate"),N=we.useRef(!1);return X2(()=>{N.current=!0}),we.useCallback(async(T,j={})=>{Yu(N.current,W2),N.current&&(typeof T=="number"?b.navigate(T):await b.navigate(T,{fromRouteId:D,...j}))},[b,D])}var A2={};function $2(b,D,N){!D&&!A2[b]&&(A2[b]=!0,Yu(!1,N))}we.memo(pO);function pO({routes:b,future:D,state:N}){return Y2(b,void 0,N,D)}function wh(b){zn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function hO({basename:b="/",children:D=null,location:N,navigationType:x="POP",navigator:T,static:j=!1}){zn(!kh(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let O=b.replace(/^\/*/,"/"),h=we.useMemo(()=>({basename:O,navigator:T,static:j,future:{}}),[O,T,j]);typeof N=="string"&&(N=ed(N));let{pathname:l="/",search:u="",hash:d="",state:v=null,key:A="default"}=N,z=we.useMemo(()=>{let I=Us(l,O);return I==null?null:{location:{pathname:I,search:u,hash:d,state:v,key:A},navigationType:x}},[O,l,u,d,v,A,x]);return Yu(z!=null,`<Router basename="${O}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:we.createElement($u.Provider,{value:h},we.createElement(Ch.Provider,{children:D,value:z}))}function yO({children:b,location:D}){return tO(Z0(b),D)}function Z0(b,D=[]){let N=[];return we.Children.forEach(b,(x,T)=>{if(!we.isValidElement(x))return;let j=[...D,T];if(x.type===we.Fragment){N.push.apply(N,Z0(x.props.children,j));return}zn(x.type===wh,`[${typeof x.type=="string"?x.type:x.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),zn(!x.props.index||!x.props.children,"An index route cannot have child routes.");let O={id:x.props.id||j.join("-"),caseSensitive:x.props.caseSensitive,element:x.props.element,Component:x.props.Component,index:x.props.index,path:x.props.path,loader:x.props.loader,action:x.props.action,hydrateFallbackElement:x.props.hydrateFallbackElement,HydrateFallback:x.props.HydrateFallback,errorElement:x.props.errorElement,ErrorBoundary:x.props.ErrorBoundary,hasErrorBoundary:x.props.hasErrorBoundary===!0||x.props.ErrorBoundary!=null||x.props.errorElement!=null,shouldRevalidate:x.props.shouldRevalidate,handle:x.props.handle,lazy:x.props.lazy};x.props.children&&(O.children=Z0(x.props.children,j)),N.push(O)}),N}var $g="get",Jg="application/x-www-form-urlencoded";function nv(b){return b!=null&&typeof b.tagName=="string"}function gO(b){return nv(b)&&b.tagName.toLowerCase()==="button"}function vO(b){return nv(b)&&b.tagName.toLowerCase()==="form"}function mO(b){return nv(b)&&b.tagName.toLowerCase()==="input"}function SO(b){return!!(b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)}function wO(b,D){return b.button===0&&(!D||D==="_self")&&!SO(b)}var Xg=null;function TO(){if(Xg===null)try{new FormData(document.createElement("form"),0),Xg=!1}catch{Xg=!0}return Xg}var xO=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function K0(b){return b!=null&&!xO.has(b)?(Yu(!1,`"${b}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jg}"`),null):b}function IO(b,D){let N,x,T,j,O;if(vO(b)){let h=b.getAttribute("action");x=h?Us(h,D):null,N=b.getAttribute("method")||$g,T=K0(b.getAttribute("enctype"))||Jg,j=new FormData(b)}else if(gO(b)||mO(b)&&(b.type==="submit"||b.type==="image")){let h=b.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=b.getAttribute("formaction")||h.getAttribute("action");if(x=l?Us(l,D):null,N=b.getAttribute("formmethod")||h.getAttribute("method")||$g,T=K0(b.getAttribute("formenctype"))||K0(h.getAttribute("enctype"))||Jg,j=new FormData(h,b),!TO()){let{name:u,type:d,value:v}=b;if(d==="image"){let A=u?`${u}.`:"";j.append(`${A}x`,"0"),j.append(`${A}y`,"0")}else u&&j.append(u,v)}}else{if(nv(b))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');N=$g,x=null,T=Jg,O=b}return j&&T==="text/plain"&&(O=j,j=void 0),{action:x,method:N.toLowerCase(),encType:T,formData:j,body:O}}function s1(b,D){if(b===!1||b===null||typeof b>"u")throw new Error(D)}async function EO(b,D){if(b.id in D)return D[b.id];try{let N=await import(b.module);return D[b.id]=N,N}catch(N){return console.error(`Error loading route module \`${b.module}\`, reloading page...`),console.error(N),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function CO(b){return b==null?!1:b.href==null?b.rel==="preload"&&typeof b.imageSrcSet=="string"&&typeof b.imageSizes=="string":typeof b.rel=="string"&&typeof b.href=="string"}async function kO(b,D,N){let x=await Promise.all(b.map(async T=>{let j=D.routes[T.route.id];if(j){let O=await EO(j,N);return O.links?O.links():[]}return[]}));return OO(x.flat(1).filter(CO).filter(T=>T.rel==="stylesheet"||T.rel==="preload").map(T=>T.rel==="stylesheet"?{...T,rel:"prefetch",as:"style"}:{...T,rel:"prefetch"}))}function P2(b,D,N,x,T,j){let O=(l,u)=>N[u]?l.route.id!==N[u].route.id:!0,h=(l,u)=>{var d;return N[u].pathname!==l.pathname||((d=N[u].route.path)==null?void 0:d.endsWith("*"))&&N[u].params["*"]!==l.params["*"]};return j==="assets"?D.filter((l,u)=>O(l,u)||h(l,u)):j==="data"?D.filter((l,u)=>{var v;let d=x.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(O(l,u)||h(l,u))return!0;if(l.route.shouldRevalidate){let A=l.route.shouldRevalidate({currentUrl:new URL(T.pathname+T.search+T.hash,window.origin),currentParams:((v=N[0])==null?void 0:v.params)||{},nextUrl:new URL(b,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof A=="boolean")return A}return!0}):[]}function AO(b,D){return PO(b.map(N=>{let x=D.routes[N.route.id];if(!x)return[];let T=[x.module];return x.imports&&(T=T.concat(x.imports)),T}).flat(1))}function PO(b){return[...new Set(b)]}function DO(b){let D={},N=Object.keys(b).sort();for(let x of N)D[x]=b[x];return D}function OO(b,D){let N=new Set;return new Set(D),b.reduce((x,T)=>{let j=JSON.stringify(DO(T));return N.has(j)||(N.add(j),x.push({key:j,link:T})),x},[])}function RO(b){let D=typeof b=="string"?new URL(b,typeof window>"u"?"server://singlefetch/":window.location.origin):b;return D.pathname==="/"?D.pathname="_root.data":D.pathname=`${D.pathname.replace(/\/$/,"")}.data`,D}function bO(){let b=we.useContext(td);return s1(b,"You must render this element inside a <DataRouterContext.Provider> element"),b}function MO(){let b=we.useContext(tv);return s1(b,"You must render this element inside a <DataRouterStateContext.Provider> element"),b}var a1=we.createContext(void 0);a1.displayName="FrameworkContext";function J2(){let b=we.useContext(a1);return s1(b,"You must render this element inside a <HydratedRouter> element"),b}function LO(b,D){let N=we.useContext(a1),[x,T]=we.useState(!1),[j,O]=we.useState(!1),{onFocus:h,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:v}=D,A=we.useRef(null);we.useEffect(()=>{if(b==="render"&&O(!0),b==="viewport"){let ee=ge=>{ge.forEach(Ae=>{O(Ae.isIntersecting)})},re=new IntersectionObserver(ee,{threshold:.5});return A.current&&re.observe(A.current),()=>{re.disconnect()}}},[b]),we.useEffect(()=>{if(x){let ee=setTimeout(()=>{O(!0)},100);return()=>{clearTimeout(ee)}}},[x]);let z=()=>{T(!0)},I=()=>{T(!1),O(!1)};return N?b!=="intent"?[j,A,{}]:[j,A,{onFocus:vh(h,z),onBlur:vh(l,I),onMouseEnter:vh(u,z),onMouseLeave:vh(d,I),onTouchStart:vh(v,z)}]:[!1,A,{}]}function vh(b,D){return N=>{b&&b(N),N.defaultPrevented||D(N)}}function NO({page:b,...D}){let{router:N}=bO(),x=we.useMemo(()=>V2(N.routes,b,N.basename),[N.routes,b,N.basename]);return x?we.createElement(UO,{page:b,matches:x,...D}):null}function _O(b){let{manifest:D,routeModules:N}=J2(),[x,T]=we.useState([]);return we.useEffect(()=>{let j=!1;return kO(b,D,N).then(O=>{j||T(O)}),()=>{j=!0}},[b,D,N]),x}function UO({page:b,matches:D,...N}){let x=js(),{manifest:T,routeModules:j}=J2(),{loaderData:O,matches:h}=MO(),l=we.useMemo(()=>P2(b,D,h,T,x,"data"),[b,D,h,T,x]),u=we.useMemo(()=>P2(b,D,h,T,x,"assets"),[b,D,h,T,x]),d=we.useMemo(()=>{if(b===x.pathname+x.search+x.hash)return[];let z=new Set,I=!1;if(D.forEach(re=>{var Ae;let ge=T.routes[re.route.id];!ge||!ge.hasLoader||(!l.some(oe=>oe.route.id===re.route.id)&&re.route.id in O&&((Ae=j[re.route.id])!=null&&Ae.shouldRevalidate)||ge.hasClientLoader?I=!0:z.add(re.route.id))}),z.size===0)return[];let ee=RO(b);return I&&z.size>0&&ee.searchParams.set("_routes",D.filter(re=>z.has(re.route.id)).map(re=>re.route.id).join(",")),[ee.pathname+ee.search]},[O,x,T,l,D,b,j]),v=we.useMemo(()=>AO(u,T),[u,T]),A=_O(u);return we.createElement(we.Fragment,null,d.map(z=>we.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...N})),v.map(z=>we.createElement("link",{key:z,rel:"modulepreload",href:z,...N})),A.map(({key:z,link:I})=>we.createElement("link",{key:z,...I})))}function jO(...b){return D=>{b.forEach(N=>{typeof N=="function"?N(D):N!=null&&(N.current=D)})}}var Q2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Q2&&(window.__reactRouterVersion="7.1.3")}catch{}function BO({basename:b,children:D,window:N}){let x=we.useRef();x.current==null&&(x.current=kD({window:N,v5Compat:!0}));let T=x.current,[j,O]=we.useState({action:T.action,location:T.location}),h=we.useCallback(l=>{we.startTransition(()=>O(l))},[O]);return we.useLayoutEffect(()=>T.listen(h),[T,h]),we.createElement(hO,{basename:b,children:D,location:j.location,navigationType:j.action,navigator:T})}var Z2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$f=we.forwardRef(function({onClick:D,discover:N="render",prefetch:x="none",relative:T,reloadDocument:j,replace:O,state:h,target:l,to:u,preventScrollReset:d,viewTransition:v,...A},z){let{basename:I}=we.useContext($u),ee=typeof u=="string"&&Z2.test(u),re,ge=!1;if(typeof u=="string"&&ee&&(re=u,Q2))try{let mn=new URL(window.location.href),_=u.startsWith("//")?new URL(mn.protocol+u):new URL(u),le=Us(_.pathname,I);_.origin===mn.origin&&le!=null?u=le+_.search+_.hash:ge=!0}catch{Yu(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let Ae=QD(u,{relative:T}),[oe,De,Ge]=LO(x,A),mt=HO(u,{replace:O,state:h,target:l,preventScrollReset:d,relative:T,viewTransition:v});function ln(mn){D&&D(mn),mn.defaultPrevented||mt(mn)}let xn=we.createElement("a",{...A,...Ge,href:re||Ae,onClick:ge||j?D:ln,ref:jO(z,De),target:l,"data-discover":!ee&&N==="render"?"true":void 0});return oe&&!ee?we.createElement(we.Fragment,null,xn,we.createElement(NO,{page:Ae})):xn});$f.displayName="Link";var VO=we.forwardRef(function({"aria-current":D="page",caseSensitive:N=!1,className:x="",end:T=!1,style:j,to:O,viewTransition:h,children:l,...u},d){let v=Ah(O,{relative:u.relative}),A=js(),z=we.useContext(tv),{navigator:I,basename:ee}=we.useContext($u),re=z!=null&&XO(v)&&h===!0,ge=I.encodeLocation?I.encodeLocation(v).pathname:v.pathname,Ae=A.pathname,oe=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;N||(Ae=Ae.toLowerCase(),oe=oe?oe.toLowerCase():null,ge=ge.toLowerCase()),oe&&ee&&(oe=Us(oe,ee)||oe);const De=ge!=="/"&&ge.endsWith("/")?ge.length-1:ge.length;let Ge=Ae===ge||!T&&Ae.startsWith(ge)&&Ae.charAt(De)==="/",mt=oe!=null&&(oe===ge||!T&&oe.startsWith(ge)&&oe.charAt(ge.length)==="/"),ln={isActive:Ge,isPending:mt,isTransitioning:re},xn=Ge?D:void 0,mn;typeof x=="function"?mn=x(ln):mn=[x,Ge?"active":null,mt?"pending":null,re?"transitioning":null].filter(Boolean).join(" ");let _=typeof j=="function"?j(ln):j;return we.createElement($f,{...u,"aria-current":xn,className:mn,ref:d,style:_,to:O,viewTransition:h},typeof l=="function"?l(ln):l)});VO.displayName="NavLink";var FO=we.forwardRef(({discover:b="render",fetcherKey:D,navigate:N,reloadDocument:x,replace:T,state:j,method:O=$g,action:h,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:v,...A},z)=>{let I=GO(),ee=WO(h,{relative:u}),re=O.toLowerCase()==="get"?"get":"post",ge=typeof h=="string"&&Z2.test(h),Ae=oe=>{if(l&&l(oe),oe.defaultPrevented)return;oe.preventDefault();let De=oe.nativeEvent.submitter,Ge=(De==null?void 0:De.getAttribute("formmethod"))||O;I(De||oe.currentTarget,{fetcherKey:D,method:Ge,navigate:N,replace:T,state:j,relative:u,preventScrollReset:d,viewTransition:v})};return we.createElement("form",{ref:z,method:re,action:ee,onSubmit:x?l:Ae,...A,"data-discover":!ge&&b==="render"?"true":void 0})});FO.displayName="Form";function KO(b){return`${b} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function eI(b){let D=we.useContext(td);return zn(D,KO(b)),D}function HO(b,{target:D,replace:N,state:x,preventScrollReset:T,relative:j,viewTransition:O}={}){let h=ZD(),l=js(),u=Ah(b,{relative:j});return we.useCallback(d=>{if(wO(d,D)){d.preventDefault();let v=N!==void 0?N:Ih(l)===Ih(u);h(b,{replace:v,state:x,preventScrollReset:T,relative:j,viewTransition:O})}},[l,h,u,N,x,D,b,T,j,O])}var qO=0,zO=()=>`__${String(++qO)}__`;function GO(){let{router:b}=eI("useSubmit"),{basename:D}=we.useContext($u),N=cO();return we.useCallback(async(x,T={})=>{let{action:j,method:O,encType:h,formData:l,body:u}=IO(x,D);if(T.navigate===!1){let d=T.fetcherKey||zO();await b.fetch(d,N,T.action||j,{preventScrollReset:T.preventScrollReset,formData:l,body:u,formMethod:T.method||O,formEncType:T.encType||h,flushSync:T.flushSync})}else await b.navigate(T.action||j,{preventScrollReset:T.preventScrollReset,formData:l,body:u,formMethod:T.method||O,formEncType:T.encType||h,replace:T.replace,state:T.state,fromRouteId:N,flushSync:T.flushSync,viewTransition:T.viewTransition})},[b,D,N])}function WO(b,{relative:D}={}){let{basename:N}=we.useContext($u),x=we.useContext(Kl);zn(x,"useFormAction must be used inside a RouteContext");let[T]=x.matches.slice(-1),j={...Ah(b||".",{relative:D})},O=js();if(b==null){j.search=O.search;let h=new URLSearchParams(j.search),l=h.getAll("index");if(l.some(d=>d==="")){h.delete("index"),l.filter(v=>v).forEach(v=>h.append("index",v));let d=h.toString();j.search=d?`?${d}`:""}}return(!b||b===".")&&T.route.index&&(j.search=j.search?j.search.replace(/^\?/,"?index&"):"?index"),N!=="/"&&(j.pathname=j.pathname==="/"?N:Fl([N,j.pathname])),Ih(j)}function XO(b,D={}){let N=we.useContext(G2);zn(N!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:x}=eI("useViewTransitionState"),T=Ah(b,{relative:D.relative});if(!N.isTransitioning)return!1;let j=Us(N.currentLocation.pathname,x)||N.currentLocation.pathname,O=Us(N.nextLocation.pathname,x)||N.nextLocation.pathname;return Qg(T.pathname,O)!=null||Qg(T.pathname,j)!=null}new TextEncoder;function YO(){const b=js();return ae.jsxs(ae.Fragment,{children:[ae.jsx("div",{className:`w-full h-1/10 flex flex-col items-center ${b.pathname==="/"?"bg-black/50":"hover:bg-black/35"} transition-all duration-300 ease-in-out overflow-hidden mt-5`,children:ae.jsxs($f,{to:"/",className:"flex w-8/10 items-center",children:[ae.jsx("img",{src:"/home.svg",alt:"Home",className:"flex h-5/10 w-3/10"}),ae.jsx("p",{className:"w-7/10 h-full flex items-center text-xl text-white",children:"Home"})]})}),ae.jsx("div",{className:`w-full h-1/10 flex flex-col items-center ${b.pathname==="/Cache"?"bg-black/50":"hover:bg-black/35"} transition-all duration-300 ease-in-out overflow-hidden`,children:ae.jsxs($f,{to:"/cache",className:"flex w-8/10 items-center",children:[ae.jsx("img",{src:"/search.svg",alt:"Search",className:"flex h-5/10 w-3/10"}),ae.jsx("p",{className:"w-7/10 h-full flex items-center text-xl text-white",children:"Cache"})]})}),ae.jsx("div",{className:`w-full h-1/10 flex flex-col items-center ${b.pathname==="/TestPlayer"?"bg-black/50":"hover:bg-black/35"} transition-all duration-300 ease-in-out overflow-hidden`,children:ae.jsxs($f,{to:"/testplayer",className:"flex w-8/10 items-center",children:[ae.jsx("img",{src:"/video.svg",alt:"Test Player",className:"flex h-5/10 w-3/10"}),ae.jsx("p",{className:"w-7/10 h-full flex items-center text-xl text-white",children:"Test Player"})]})}),ae.jsx("div",{className:`w-full h-1/10 flex flex-col items-center ${b.pathname==="/API"?"bg-black/50":"hover:bg-black/35"} transition-all duration-300 ease-in-out overflow-hidden`,children:ae.jsxs($f,{to:"/api",className:"flex w-8/10 items-center",children:[ae.jsx("img",{src:"/docu_logo.svg",alt:"API",className:"flex h-5/10 w-3/10"}),ae.jsx("p",{className:"w-7/10 h-full flex items-center text-xl text-white",children:"API"})]})})]})}function $O(){return ae.jsx("div",{className:"flex flex-col w-full h-full overflow-y-auto shadow-lg shadow-black",children:ae.jsx(YO,{})})}function JO(){return ae.jsxs("div",{className:"flex flex-row w-full h-full items-center justify-around overflow-hidden",children:[ae.jsx("a",{href:"https://discord.cdrm-project.com",className:"w-1/6 h-1/6 hover:animate-bounce",children:ae.jsx("img",{src:"/discord.svg",alt:"Discord Logo"})}),ae.jsx("a",{href:"https://telegram.cdrm-project.com",className:"w-1/6 h-1/6 hover:animate-bounce",children:ae.jsx("img",{src:"/telegram.svg",alt:"Telegram Logo"})}),ae.jsx("a",{href:"https://github.com/tpd94",className:"w-1/6 h-1/6 hover:animate-bounce",children:ae.jsx("img",{src:"/github.svg",alt:"Github Logo"})})]})}function QO(){return ae.jsx("div",{className:"flex flex-row w-full h-full shadow-lg shadow-black items-center justify-center overflow-hidden",children:ae.jsx("a",{href:"/",className:"w-2/3 h-2/3 flex",children:ae.jsx("img",{src:"/logo.svg",alt:"CDRM Logo"})})})}function ZO(){return ae.jsxs("div",{className:"flex flex-col w-full h-full bg-zinc-900 border-r-1",children:[ae.jsx("div",{className:"w-full h-1/10",children:ae.jsx(QO,{})}),ae.jsx("div",{className:"w-full h-8/10",children:ae.jsx($O,{})}),ae.jsx("div",{className:"w-full h-1/10",children:ae.jsx(JO,{})})]})}var H0={exports:{}},q0,D2;function e3(){if(D2)return q0;D2=1;var b="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return q0=b,q0}var z0,O2;function t3(){if(O2)return z0;O2=1;var b=e3();function D(){}function N(){}return N.resetWarningCache=D,z0=function(){function x(O,h,l,u,d,v){if(v!==b){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}}x.isRequired=x;function T(){return x}var j={array:x,bigint:x,bool:x,func:x,number:x,object:x,string:x,symbol:x,any:x,arrayOf:T,element:x,elementType:x,instanceOf:T,node:x,objectOf:T,oneOf:T,oneOfType:T,shape:T,exact:T,checkPropTypes:N,resetWarningCache:D};return j.PropTypes=j,j},z0}var R2;function n3(){return R2||(R2=1,H0.exports=t3()()),H0.exports}var r3=n3();const Nn=Zf(r3);var G0,b2;function i3(){if(b2)return G0;b2=1;function b(h){return h&&typeof h=="object"&&"default"in h?h.default:h}var D=ev(),N=b(D);function x(h,l,u){return l in h?Object.defineProperty(h,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):h[l]=u,h}function T(h,l){h.prototype=Object.create(l.prototype),h.prototype.constructor=h,h.__proto__=l}var j=!!(typeof window<"u"&&window.document&&window.document.createElement);function O(h,l,u){if(typeof h!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof l!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof u<"u"&&typeof u!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function d(v){return v.displayName||v.name||"Component"}return function(A){if(typeof A!="function")throw new Error("Expected WrappedComponent to be a React component.");var z=[],I;function ee(){I=h(z.map(function(ge){return ge.props})),re.canUseDOM?l(I):u&&(I=u(I))}var re=function(ge){T(Ae,ge);function Ae(){return ge.apply(this,arguments)||this}Ae.peek=function(){return I},Ae.rewind=function(){if(Ae.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var Ge=I;return I=void 0,z=[],Ge};var oe=Ae.prototype;return oe.UNSAFE_componentWillMount=function(){z.push(this),ee()},oe.componentDidUpdate=function(){ee()},oe.componentWillUnmount=function(){var Ge=z.indexOf(this);z.splice(Ge,1),ee()},oe.render=function(){return N.createElement(A,this.props)},Ae}(D.PureComponent);return x(re,"displayName","SideEffect("+d(A)+")"),x(re,"canUseDOM",j),re}}return G0=O,G0}var o3=i3();const u3=Zf(o3);var W0,M2;function l3(){if(M2)return W0;M2=1;var b=typeof Element<"u",D=typeof Map=="function",N=typeof Set=="function",x=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function T(j,O){if(j===O)return!0;if(j&&O&&typeof j=="object"&&typeof O=="object"){if(j.constructor!==O.constructor)return!1;var h,l,u;if(Array.isArray(j)){if(h=j.length,h!=O.length)return!1;for(l=h;l--!==0;)if(!T(j[l],O[l]))return!1;return!0}var d;if(D&&j instanceof Map&&O instanceof Map){if(j.size!==O.size)return!1;for(d=j.entries();!(l=d.next()).done;)if(!O.has(l.value[0]))return!1;for(d=j.entries();!(l=d.next()).done;)if(!T(l.value[1],O.get(l.value[0])))return!1;return!0}if(N&&j instanceof Set&&O instanceof Set){if(j.size!==O.size)return!1;for(d=j.entries();!(l=d.next()).done;)if(!O.has(l.value[0]))return!1;return!0}if(x&&ArrayBuffer.isView(j)&&ArrayBuffer.isView(O)){if(h=j.length,h!=O.length)return!1;for(l=h;l--!==0;)if(j[l]!==O[l])return!1;return!0}if(j.constructor===RegExp)return j.source===O.source&&j.flags===O.flags;if(j.valueOf!==Object.prototype.valueOf&&typeof j.valueOf=="function"&&typeof O.valueOf=="function")return j.valueOf()===O.valueOf();if(j.toString!==Object.prototype.toString&&typeof j.toString=="function"&&typeof O.toString=="function")return j.toString()===O.toString();if(u=Object.keys(j),h=u.length,h!==Object.keys(O).length)return!1;for(l=h;l--!==0;)if(!Object.prototype.hasOwnProperty.call(O,u[l]))return!1;if(b&&j instanceof Element)return!1;for(l=h;l--!==0;)if(!((u[l]==="_owner"||u[l]==="__v"||u[l]==="__o")&&j.$$typeof)&&!T(j[u[l]],O[u[l]]))return!1;return!0}return j!==j&&O!==O}return W0=function(O,h){try{return T(O,h)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},W0}var s3=l3();const a3=Zf(s3);/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/var X0,L2;function c3(){if(L2)return X0;L2=1;var b=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;function x(j){if(j==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(j)}function T(){try{if(!Object.assign)return!1;var j=new String("abc");if(j[5]="de",Object.getOwnPropertyNames(j)[0]==="5")return!1;for(var O={},h=0;h<10;h++)O["_"+String.fromCharCode(h)]=h;var l=Object.getOwnPropertyNames(O).map(function(d){return O[d]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return X0=T()?Object.assign:function(j,O){for(var h,l=x(j),u,d=1;d<arguments.length;d++){h=Object(arguments[d]);for(var v in h)D.call(h,v)&&(l[v]=h[v]);if(b){u=b(h);for(var A=0;A<u.length;A++)N.call(h,u[A])&&(l[u[A]]=h[u[A]])}}return l},X0}var f3=c3();const d3=Zf(f3);var uc={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},Dt={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(Dt).map(function(b){return Dt[b]});var _n={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},Zg={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Eh={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},p3=Object.keys(Zg).reduce(function(b,D){return b[Zg[D]]=D,b},{}),h3=[Dt.NOSCRIPT,Dt.SCRIPT,Dt.STYLE],gu="data-react-helmet",y3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},g3=function(b,D){if(!(b instanceof D))throw new TypeError("Cannot call a class as a function")},v3=function(){function b(D,N){for(var x=0;x<N.length;x++){var T=N[x];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(D,T.key,T)}}return function(D,N,x){return N&&b(D.prototype,N),x&&b(D,x),D}}(),Wi=Object.assign||function(b){for(var D=1;D<arguments.length;D++){var N=arguments[D];for(var x in N)Object.prototype.hasOwnProperty.call(N,x)&&(b[x]=N[x])}return b},m3=function(b,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);b.prototype=Object.create(D&&D.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(b,D):b.__proto__=D)},N2=function(b,D){var N={};for(var x in b)D.indexOf(x)>=0||Object.prototype.hasOwnProperty.call(b,x)&&(N[x]=b[x]);return N},S3=function(b,D){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:b},e1=function(D){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return N===!1?String(D):String(D).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},w3=function(D){var N=Jf(D,Dt.TITLE),x=Jf(D,Eh.TITLE_TEMPLATE);if(x&&N)return x.replace(/%s/g,function(){return Array.isArray(N)?N.join(""):N});var T=Jf(D,Eh.DEFAULT_TITLE);return N||T||void 0},T3=function(D){return Jf(D,Eh.ON_CHANGE_CLIENT_STATE)||function(){}},Y0=function(D,N){return N.filter(function(x){return typeof x[D]<"u"}).map(function(x){return x[D]}).reduce(function(x,T){return Wi({},x,T)},{})},x3=function(D,N){return N.filter(function(x){return typeof x[Dt.BASE]<"u"}).map(function(x){return x[Dt.BASE]}).reverse().reduce(function(x,T){if(!x.length)for(var j=Object.keys(T),O=0;O<j.length;O++){var h=j[O],l=h.toLowerCase();if(D.indexOf(l)!==-1&&T[l])return x.concat(T)}return x},[])},mh=function(D,N,x){var T={};return x.filter(function(j){return Array.isArray(j[D])?!0:(typeof j[D]<"u"&&k3("Helmet: "+D+' should be of type "Array". Instead found type "'+y3(j[D])+'"'),!1)}).map(function(j){return j[D]}).reverse().reduce(function(j,O){var h={};O.filter(function(A){for(var z=void 0,I=Object.keys(A),ee=0;ee<I.length;ee++){var re=I[ee],ge=re.toLowerCase();N.indexOf(ge)!==-1&&!(z===_n.REL&&A[z].toLowerCase()==="canonical")&&!(ge===_n.REL&&A[ge].toLowerCase()==="stylesheet")&&(z=ge),N.indexOf(re)!==-1&&(re===_n.INNER_HTML||re===_n.CSS_TEXT||re===_n.ITEM_PROP)&&(z=re)}if(!z||!A[z])return!1;var Ae=A[z].toLowerCase();return T[z]||(T[z]={}),h[z]||(h[z]={}),T[z][Ae]?!1:(h[z][Ae]=!0,!0)}).reverse().forEach(function(A){return j.push(A)});for(var l=Object.keys(h),u=0;u<l.length;u++){var d=l[u],v=d3({},T[d],h[d]);T[d]=v}return j},[]).reverse()},Jf=function(D,N){for(var x=D.length-1;x>=0;x--){var T=D[x];if(T.hasOwnProperty(N))return T[N]}return null},I3=function(D){return{baseTag:x3([_n.HREF,_n.TARGET],D),bodyAttributes:Y0(uc.BODY,D),defer:Jf(D,Eh.DEFER),encode:Jf(D,Eh.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Y0(uc.HTML,D),linkTags:mh(Dt.LINK,[_n.REL,_n.HREF],D),metaTags:mh(Dt.META,[_n.NAME,_n.CHARSET,_n.HTTPEQUIV,_n.PROPERTY,_n.ITEM_PROP],D),noscriptTags:mh(Dt.NOSCRIPT,[_n.INNER_HTML],D),onChangeClientState:T3(D),scriptTags:mh(Dt.SCRIPT,[_n.SRC,_n.INNER_HTML],D),styleTags:mh(Dt.STYLE,[_n.CSS_TEXT],D),title:w3(D),titleAttributes:Y0(uc.TITLE,D)}},t1=function(){var b=Date.now();return function(D){var N=Date.now();N-b>16?(b=N,D(N)):setTimeout(function(){t1(D)},0)}}(),_2=function(D){return clearTimeout(D)},E3=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||t1:global.requestAnimationFrame||t1,C3=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||_2:global.cancelAnimationFrame||_2,k3=function(D){return console&&typeof console.warn=="function"&&console.warn(D)},Sh=null,A3=function(D){Sh&&C3(Sh),D.defer?Sh=E3(function(){U2(D,function(){Sh=null})}):(U2(D),Sh=null)},U2=function(D,N){var x=D.baseTag,T=D.bodyAttributes,j=D.htmlAttributes,O=D.linkTags,h=D.metaTags,l=D.noscriptTags,u=D.onChangeClientState,d=D.scriptTags,v=D.styleTags,A=D.title,z=D.titleAttributes;n1(Dt.BODY,T),n1(Dt.HTML,j),P3(A,z);var I={baseTag:Xf(Dt.BASE,x),linkTags:Xf(Dt.LINK,O),metaTags:Xf(Dt.META,h),noscriptTags:Xf(Dt.NOSCRIPT,l),scriptTags:Xf(Dt.SCRIPT,d),styleTags:Xf(Dt.STYLE,v)},ee={},re={};Object.keys(I).forEach(function(ge){var Ae=I[ge],oe=Ae.newTags,De=Ae.oldTags;oe.length&&(ee[ge]=oe),De.length&&(re[ge]=I[ge].oldTags)}),N&&N(),u(D,ee,re)},tI=function(D){return Array.isArray(D)?D.join(""):D},P3=function(D,N){typeof D<"u"&&document.title!==D&&(document.title=tI(D)),n1(Dt.TITLE,N)},n1=function(D,N){var x=document.getElementsByTagName(D)[0];if(x){for(var T=x.getAttribute(gu),j=T?T.split(","):[],O=[].concat(j),h=Object.keys(N),l=0;l<h.length;l++){var u=h[l],d=N[u]||"";x.getAttribute(u)!==d&&x.setAttribute(u,d),j.indexOf(u)===-1&&j.push(u);var v=O.indexOf(u);v!==-1&&O.splice(v,1)}for(var A=O.length-1;A>=0;A--)x.removeAttribute(O[A]);j.length===O.length?x.removeAttribute(gu):x.getAttribute(gu)!==h.join(",")&&x.setAttribute(gu,h.join(","))}},Xf=function(D,N){var x=document.head||document.querySelector(Dt.HEAD),T=x.querySelectorAll(D+"["+gu+"]"),j=Array.prototype.slice.call(T),O=[],h=void 0;return N&&N.length&&N.forEach(function(l){var u=document.createElement(D);for(var d in l)if(l.hasOwnProperty(d))if(d===_n.INNER_HTML)u.innerHTML=l.innerHTML;else if(d===_n.CSS_TEXT)u.styleSheet?u.styleSheet.cssText=l.cssText:u.appendChild(document.createTextNode(l.cssText));else{var v=typeof l[d]>"u"?"":l[d];u.setAttribute(d,v)}u.setAttribute(gu,"true"),j.some(function(A,z){return h=z,u.isEqualNode(A)})?j.splice(h,1):O.push(u)}),j.forEach(function(l){return l.parentNode.removeChild(l)}),O.forEach(function(l){return x.appendChild(l)}),{oldTags:j,newTags:O}},nI=function(D){return Object.keys(D).reduce(function(N,x){var T=typeof D[x]<"u"?x+'="'+D[x]+'"':""+x;return N?N+" "+T:T},"")},D3=function(D,N,x,T){var j=nI(x),O=tI(N);return j?"<"+D+" "+gu+'="true" '+j+">"+e1(O,T)+"</"+D+">":"<"+D+" "+gu+'="true">'+e1(O,T)+"</"+D+">"},O3=function(D,N,x){return N.reduce(function(T,j){var O=Object.keys(j).filter(function(u){return!(u===_n.INNER_HTML||u===_n.CSS_TEXT)}).reduce(function(u,d){var v=typeof j[d]>"u"?d:d+'="'+e1(j[d],x)+'"';return u?u+" "+v:v},""),h=j.innerHTML||j.cssText||"",l=h3.indexOf(D)===-1;return T+"<"+D+" "+gu+'="true" '+O+(l?"/>":">"+h+"</"+D+">")},"")},rI=function(D){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(D).reduce(function(x,T){return x[Zg[T]||T]=D[T],x},N)},R3=function(D){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(D).reduce(function(x,T){return x[p3[T]||T]=D[T],x},N)},b3=function(D,N,x){var T,j=(T={key:N},T[gu]=!0,T),O=rI(x,j);return[xh.createElement(Dt.TITLE,O,N)]},M3=function(D,N){return N.map(function(x,T){var j,O=(j={key:T},j[gu]=!0,j);return Object.keys(x).forEach(function(h){var l=Zg[h]||h;if(l===_n.INNER_HTML||l===_n.CSS_TEXT){var u=x.innerHTML||x.cssText;O.dangerouslySetInnerHTML={__html:u}}else O[l]=x[h]}),xh.createElement(D,O)})},Vl=function(D,N,x){switch(D){case Dt.TITLE:return{toComponent:function(){return b3(D,N.title,N.titleAttributes)},toString:function(){return D3(D,N.title,N.titleAttributes,x)}};case uc.BODY:case uc.HTML:return{toComponent:function(){return rI(N)},toString:function(){return nI(N)}};default:return{toComponent:function(){return M3(D,N)},toString:function(){return O3(D,N,x)}}}},iI=function(D){var N=D.baseTag,x=D.bodyAttributes,T=D.encode,j=D.htmlAttributes,O=D.linkTags,h=D.metaTags,l=D.noscriptTags,u=D.scriptTags,d=D.styleTags,v=D.title,A=v===void 0?"":v,z=D.titleAttributes;return{base:Vl(Dt.BASE,N,T),bodyAttributes:Vl(uc.BODY,x,T),htmlAttributes:Vl(uc.HTML,j,T),link:Vl(Dt.LINK,O,T),meta:Vl(Dt.META,h,T),noscript:Vl(Dt.NOSCRIPT,l,T),script:Vl(Dt.SCRIPT,u,T),style:Vl(Dt.STYLE,d,T),title:Vl(Dt.TITLE,{title:A,titleAttributes:z},T)}},L3=function(D){var N,x;return x=N=function(T){m3(j,T);function j(){return g3(this,j),S3(this,T.apply(this,arguments))}return j.prototype.shouldComponentUpdate=function(h){return!a3(this.props,h)},j.prototype.mapNestedChildrenToProps=function(h,l){if(!l)return null;switch(h.type){case Dt.SCRIPT:case Dt.NOSCRIPT:return{innerHTML:l};case Dt.STYLE:return{cssText:l}}throw new Error("<"+h.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},j.prototype.flattenArrayTypeChildren=function(h){var l,u=h.child,d=h.arrayTypeChildren,v=h.newChildProps,A=h.nestedChildren;return Wi({},d,(l={},l[u.type]=[].concat(d[u.type]||[],[Wi({},v,this.mapNestedChildrenToProps(u,A))]),l))},j.prototype.mapObjectTypeChildren=function(h){var l,u,d=h.child,v=h.newProps,A=h.newChildProps,z=h.nestedChildren;switch(d.type){case Dt.TITLE:return Wi({},v,(l={},l[d.type]=z,l.titleAttributes=Wi({},A),l));case Dt.BODY:return Wi({},v,{bodyAttributes:Wi({},A)});case Dt.HTML:return Wi({},v,{htmlAttributes:Wi({},A)})}return Wi({},v,(u={},u[d.type]=Wi({},A),u))},j.prototype.mapArrayTypeChildrenToProps=function(h,l){var u=Wi({},l);return Object.keys(h).forEach(function(d){var v;u=Wi({},u,(v={},v[d]=h[d],v))}),u},j.prototype.warnOnInvalidChildren=function(h,l){return!0},j.prototype.mapChildrenToProps=function(h,l){var u=this,d={};return xh.Children.forEach(h,function(v){if(!(!v||!v.props)){var A=v.props,z=A.children,I=N2(A,["children"]),ee=R3(I);switch(u.warnOnInvalidChildren(v,z),v.type){case Dt.LINK:case Dt.META:case Dt.NOSCRIPT:case Dt.SCRIPT:case Dt.STYLE:d=u.flattenArrayTypeChildren({child:v,arrayTypeChildren:d,newChildProps:ee,nestedChildren:z});break;default:l=u.mapObjectTypeChildren({child:v,newProps:l,newChildProps:ee,nestedChildren:z});break}}}),l=this.mapArrayTypeChildrenToProps(d,l),l},j.prototype.render=function(){var h=this.props,l=h.children,u=N2(h,["children"]),d=Wi({},u);return l&&(d=this.mapChildrenToProps(l,d)),xh.createElement(D,d)},v3(j,null,[{key:"canUseDOM",set:function(h){D.canUseDOM=h}}]),j}(xh.Component),N.propTypes={base:Nn.object,bodyAttributes:Nn.object,children:Nn.oneOfType([Nn.arrayOf(Nn.node),Nn.node]),defaultTitle:Nn.string,defer:Nn.bool,encodeSpecialCharacters:Nn.bool,htmlAttributes:Nn.object,link:Nn.arrayOf(Nn.object),meta:Nn.arrayOf(Nn.object),noscript:Nn.arrayOf(Nn.object),onChangeClientState:Nn.func,script:Nn.arrayOf(Nn.object),style:Nn.arrayOf(Nn.object),title:Nn.string,titleAttributes:Nn.object,titleTemplate:Nn.string},N.defaultProps={defer:!0,encodeSpecialCharacters:!0},N.peek=D.peek,N.rewind=function(){var T=D.rewind();return T||(T=iI({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),T},x},N3=function(){return null},_3=u3(I3,A3,iI)(N3),Qf=L3(_3);Qf.renderStatic=Qf.rewind;/*!
|
||
* protobuf.js v7.4.0 (c) 2016, daniel wirtz
|
||
* compiled thu, 22 aug 2024 20:30:39 utc
|
||
* licensed under the bsd-3-clause license
|
||
* see: https://github.com/dcodeio/protobuf.js for details
|
||
*/(function(b){(function(D,N,x){var T=function j(O){var h=N[O];return h||D[O][0].call(h=N[O]={exports:{}},j,h,h.exports),h.exports}(x[0]);T.util.global.protobuf=T,typeof define=="function"&&define.amd&&define(["long"],function(j){return j&&j.isLong&&(T.util.Long=j,T.configure()),T}),typeof Th=="object"&&Th&&Th.exports&&(Th.exports=T)})({1:[function(D,N,x){N.exports=function(T,j){for(var O=Array(arguments.length-1),h=0,l=2,u=!0;l<arguments.length;)O[h++]=arguments[l++];return new Promise(function(d,v){O[h]=function(A){if(u)if(u=!1,A)v(A);else{for(var z=Array(arguments.length-1),I=0;I<z.length;)z[I++]=arguments[I];d.apply(null,z)}};try{T.apply(j||null,O)}catch(A){u&&(u=!1,v(A))}})}},{}],2:[function(D,N,x){x.length=function(l){var u=l.length;if(!u)return 0;for(var d=0;1<--u%4&&(l[0|u]||"")=="=";)++d;return Math.ceil(3*l.length)/4-d};for(var T=Array(64),j=Array(123),O=0;O<64;)j[T[O]=O<26?O+65:O<52?O+71:O<62?O-4:O-59|43]=O++;x.encode=function(l,u,d){for(var v,A=null,z=[],I=0,ee=0;u<d;){var re=l[u++];switch(ee){case 0:z[I++]=T[re>>2],v=(3&re)<<4,ee=1;break;case 1:z[I++]=T[v|re>>4],v=(15&re)<<2,ee=2;break;case 2:z[I++]=T[v|re>>6],z[I++]=T[63&re],ee=0}8191<I&&((A=A||[]).push(String.fromCharCode.apply(String,z)),I=0)}return ee&&(z[I++]=T[v],z[I++]=61,ee===1&&(z[I++]=61)),A?(I&&A.push(String.fromCharCode.apply(String,z.slice(0,I))),A.join("")):String.fromCharCode.apply(String,z.slice(0,I))};var h="invalid encoding";x.decode=function(l,u,d){for(var v,A=d,z=0,I=0;I<l.length;){var ee=l.charCodeAt(I++);if(ee==61&&1<z)break;if((ee=j[ee])===b)throw Error(h);switch(z){case 0:v=ee,z=1;break;case 1:u[d++]=v<<2|(48&ee)>>4,v=ee,z=2;break;case 2:u[d++]=(15&v)<<4|(60&ee)>>2,v=ee,z=3;break;case 3:u[d++]=(3&v)<<6|ee,z=0}}if(z===1)throw Error(h);return d-A},x.test=function(l){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(l)}},{}],3:[function(D,N,x){function T(){this.t={}}(N.exports=T).prototype.on=function(j,O,h){return(this.t[j]||(this.t[j]=[])).push({fn:O,ctx:h||this}),this},T.prototype.off=function(j,O){if(j===b)this.t={};else if(O===b)this.t[j]=[];else for(var h=this.t[j],l=0;l<h.length;)h[l].fn===O?h.splice(l,1):++l;return this},T.prototype.emit=function(j){var O=this.t[j];if(O){for(var h=[],l=1;l<arguments.length;)h.push(arguments[l++]);for(l=0;l<O.length;)O[l].fn.apply(O[l++].ctx,h)}return this}},{}],4:[function(D,N,x){function T(u){function d(le,pe,qe,be){var ke=pe<0?1:0;le((pe=ke?-pe:pe)===0?0<1/pe?0:2147483648:isNaN(pe)?2143289344:34028234663852886e22<pe?(ke<<31|2139095040)>>>0:pe<11754943508222875e-54?(ke<<31|Math.round(pe/1401298464324817e-60))>>>0:(ke<<31|127+(le=Math.floor(Math.log(pe)/Math.LN2))<<23|8388607&Math.round(pe*Math.pow(2,-le)*8388608))>>>0,qe,be)}function v(le,pe,qe){return le=le(pe,qe),pe=2*(le>>31)+1,qe=le>>>23&255,le&=8388607,qe==255?le?NaN:1/0*pe:qe==0?1401298464324817e-60*pe*le:pe*Math.pow(2,qe-150)*(8388608+le)}function A(le,pe,qe){re[0]=le,pe[qe]=ge[0],pe[qe+1]=ge[1],pe[qe+2]=ge[2],pe[qe+3]=ge[3]}function z(le,pe,qe){re[0]=le,pe[qe]=ge[3],pe[qe+1]=ge[2],pe[qe+2]=ge[1],pe[qe+3]=ge[0]}function I(le,pe){return ge[0]=le[pe],ge[1]=le[pe+1],ge[2]=le[pe+2],ge[3]=le[pe+3],re[0]}function ee(le,pe){return ge[3]=le[pe],ge[2]=le[pe+1],ge[1]=le[pe+2],ge[0]=le[pe+3],re[0]}var re,ge,Ae,oe,De;function Ge(le,pe,qe,be,ke,Ut){var Ot,Ue=be<0?1:0;(be=Ue?-be:be)===0?(le(0,ke,Ut+pe),le(0<1/be?0:2147483648,ke,Ut+qe)):isNaN(be)?(le(0,ke,Ut+pe),le(2146959360,ke,Ut+qe)):17976931348623157e292<be?(le(0,ke,Ut+pe),le((Ue<<31|2146435072)>>>0,ke,Ut+qe)):be<22250738585072014e-324?(le((Ot=be/5e-324)>>>0,ke,Ut+pe),le((Ue<<31|Ot/4294967296)>>>0,ke,Ut+qe)):(le(4503599627370496*(Ot=be*Math.pow(2,-(be=(be=Math.floor(Math.log(be)/Math.LN2))===1024?1023:be)))>>>0,ke,Ut+pe),le((Ue<<31|be+1023<<20|1048576*Ot&1048575)>>>0,ke,Ut+qe))}function mt(le,pe,qe,be,ke){return pe=le(be,ke+pe),le=le(be,ke+qe),be=2*(le>>31)+1,ke=le>>>20&2047,qe=4294967296*(1048575&le)+pe,ke==2047?qe?NaN:1/0*be:ke==0?5e-324*be*qe:be*Math.pow(2,ke-1075)*(qe+4503599627370496)}function ln(le,pe,qe){Ae[0]=le,pe[qe]=oe[0],pe[qe+1]=oe[1],pe[qe+2]=oe[2],pe[qe+3]=oe[3],pe[qe+4]=oe[4],pe[qe+5]=oe[5],pe[qe+6]=oe[6],pe[qe+7]=oe[7]}function xn(le,pe,qe){Ae[0]=le,pe[qe]=oe[7],pe[qe+1]=oe[6],pe[qe+2]=oe[5],pe[qe+3]=oe[4],pe[qe+4]=oe[3],pe[qe+5]=oe[2],pe[qe+6]=oe[1],pe[qe+7]=oe[0]}function mn(le,pe){return oe[0]=le[pe],oe[1]=le[pe+1],oe[2]=le[pe+2],oe[3]=le[pe+3],oe[4]=le[pe+4],oe[5]=le[pe+5],oe[6]=le[pe+6],oe[7]=le[pe+7],Ae[0]}function _(le,pe){return oe[7]=le[pe],oe[6]=le[pe+1],oe[5]=le[pe+2],oe[4]=le[pe+3],oe[3]=le[pe+4],oe[2]=le[pe+5],oe[1]=le[pe+6],oe[0]=le[pe+7],Ae[0]}return typeof Float32Array<"u"?(re=new Float32Array([-0]),ge=new Uint8Array(re.buffer),De=ge[3]===128,u.writeFloatLE=De?A:z,u.writeFloatBE=De?z:A,u.readFloatLE=De?I:ee,u.readFloatBE=De?ee:I):(u.writeFloatLE=d.bind(null,j),u.writeFloatBE=d.bind(null,O),u.readFloatLE=v.bind(null,h),u.readFloatBE=v.bind(null,l)),typeof Float64Array<"u"?(Ae=new Float64Array([-0]),oe=new Uint8Array(Ae.buffer),De=oe[7]===128,u.writeDoubleLE=De?ln:xn,u.writeDoubleBE=De?xn:ln,u.readDoubleLE=De?mn:_,u.readDoubleBE=De?_:mn):(u.writeDoubleLE=Ge.bind(null,j,0,4),u.writeDoubleBE=Ge.bind(null,O,4,0),u.readDoubleLE=mt.bind(null,h,0,4),u.readDoubleBE=mt.bind(null,l,4,0)),u}function j(u,d,v){d[v]=255&u,d[v+1]=u>>>8&255,d[v+2]=u>>>16&255,d[v+3]=u>>>24}function O(u,d,v){d[v]=u>>>24,d[v+1]=u>>>16&255,d[v+2]=u>>>8&255,d[v+3]=255&u}function h(u,d){return(u[d]|u[d+1]<<8|u[d+2]<<16|u[d+3]<<24)>>>0}function l(u,d){return(u[d]<<24|u[d+1]<<16|u[d+2]<<8|u[d+3])>>>0}N.exports=T(T)},{}],5:[function(D,N,x){function T(j){try{var O=void 0;if(O&&(O.length||Object.keys(O).length))return O}catch{}return null}N.exports=T},{}],6:[function(D,N,x){N.exports=function(T,j,O){var h=O||8192,l=h>>>1,u=null,d=h;return function(v){return v<1||l<v?T(v):(h<d+v&&(u=T(h),d=0),v=j.call(u,d,d+=v),7&d&&(d=1+(7|d)),v)}}},{}],7:[function(D,N,x){x.length=function(T){for(var j,O=0,h=0;h<T.length;++h)(j=T.charCodeAt(h))<128?O+=1:j<2048?O+=2:(64512&j)==55296&&(64512&T.charCodeAt(h+1))==56320?(++h,O+=4):O+=3;return O},x.read=function(T,j,O){if(O-j<1)return"";for(var h,l=null,u=[],d=0;j<O;)(h=T[j++])<128?u[d++]=h:191<h&&h<224?u[d++]=(31&h)<<6|63&T[j++]:239<h&&h<365?(h=((7&h)<<18|(63&T[j++])<<12|(63&T[j++])<<6|63&T[j++])-65536,u[d++]=55296+(h>>10),u[d++]=56320+(1023&h)):u[d++]=(15&h)<<12|(63&T[j++])<<6|63&T[j++],8191<d&&((l=l||[]).push(String.fromCharCode.apply(String,u)),d=0);return l?(d&&l.push(String.fromCharCode.apply(String,u.slice(0,d))),l.join("")):String.fromCharCode.apply(String,u.slice(0,d))},x.write=function(T,j,O){for(var h,l,u=O,d=0;d<T.length;++d)(h=T.charCodeAt(d))<128?j[O++]=h:(h<2048?j[O++]=h>>6|192:((64512&h)==55296&&(64512&(l=T.charCodeAt(d+1)))==56320?(++d,j[O++]=(h=65536+((1023&h)<<10)+(1023&l))>>18|240,j[O++]=h>>12&63|128):j[O++]=h>>12|224,j[O++]=h>>6&63|128),j[O++]=63&h|128);return O-u}},{}],8:[function(D,N,x){var T=x;function j(){T.util.n(),T.Writer.n(T.BufferWriter),T.Reader.n(T.BufferReader)}T.build="minimal",T.Writer=D(16),T.BufferWriter=D(17),T.Reader=D(9),T.BufferReader=D(10),T.util=D(15),T.rpc=D(12),T.roots=D(11),T.configure=j,j()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(D,N,x){N.exports=u;var T,j=D(15),O=j.LongBits,h=j.utf8;function l(re,ge){return RangeError("index out of range: "+re.pos+" + "+(ge||1)+" > "+re.len)}function u(re){this.buf=re,this.pos=0,this.len=re.length}function d(){return j.Buffer?function(re){return(u.create=function(ge){return j.Buffer.isBuffer(ge)?new T(ge):A(ge)})(re)}:A}var v,A=typeof Uint8Array<"u"?function(re){if(re instanceof Uint8Array||Array.isArray(re))return new u(re);throw Error("illegal buffer")}:function(re){if(Array.isArray(re))return new u(re);throw Error("illegal buffer")};function z(){var re=new O(0,0),ge=0;if(!(4<this.len-this.pos)){for(;ge<3;++ge){if(this.pos>=this.len)throw l(this);if(re.lo=(re.lo|(127&this.buf[this.pos])<<7*ge)>>>0,this.buf[this.pos++]<128)return re}return re.lo=(re.lo|(127&this.buf[this.pos++])<<7*ge)>>>0,re}for(;ge<4;++ge)if(re.lo=(re.lo|(127&this.buf[this.pos])<<7*ge)>>>0,this.buf[this.pos++]<128)return re;if(re.lo=(re.lo|(127&this.buf[this.pos])<<28)>>>0,re.hi=(re.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return re;if(ge=0,4<this.len-this.pos){for(;ge<5;++ge)if(re.hi=(re.hi|(127&this.buf[this.pos])<<7*ge+3)>>>0,this.buf[this.pos++]<128)return re}else for(;ge<5;++ge){if(this.pos>=this.len)throw l(this);if(re.hi=(re.hi|(127&this.buf[this.pos])<<7*ge+3)>>>0,this.buf[this.pos++]<128)return re}throw Error("invalid varint encoding")}function I(re,ge){return(re[ge-4]|re[ge-3]<<8|re[ge-2]<<16|re[ge-1]<<24)>>>0}function ee(){if(this.pos+8>this.len)throw l(this,8);return new O(I(this.buf,this.pos+=4),I(this.buf,this.pos+=4))}u.create=d(),u.prototype.i=j.Array.prototype.subarray||j.Array.prototype.slice,u.prototype.uint32=(v=4294967295,function(){if(v=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(v=(v|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(v=(v|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(v=(v|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(v=(v|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return v;throw this.pos=this.len,l(this,10)}),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var re=this.uint32();return re>>>1^-(1&re)|0},u.prototype.bool=function(){return this.uint32()!==0},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw l(this,4);return I(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw l(this,4);return 0|I(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw l(this,4);var re=j.float.readFloatLE(this.buf,this.pos);return this.pos+=4,re},u.prototype.double=function(){if(this.pos+8>this.len)throw l(this,4);var re=j.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,re},u.prototype.bytes=function(){var re=this.uint32(),ge=this.pos,Ae=this.pos+re;if(Ae>this.len)throw l(this,re);return this.pos+=re,Array.isArray(this.buf)?this.buf.slice(ge,Ae):ge===Ae?(re=j.Buffer)?re.alloc(0):new this.buf.constructor(0):this.i.call(this.buf,ge,Ae)},u.prototype.string=function(){var re=this.bytes();return h.read(re,0,re.length)},u.prototype.skip=function(re){if(typeof re=="number"){if(this.pos+re>this.len)throw l(this,re);this.pos+=re}else do if(this.pos>=this.len)throw l(this);while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(re){switch(re){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(re=7&this.uint32())!=4;)this.skipType(re);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+re+" at offset "+this.pos)}return this},u.n=function(re){T=re,u.create=d(),T.n();var ge=j.Long?"toLong":"toNumber";j.merge(u.prototype,{int64:function(){return z.call(this)[ge](!1)},uint64:function(){return z.call(this)[ge](!0)},sint64:function(){return z.call(this).zzDecode()[ge](!1)},fixed64:function(){return ee.call(this)[ge](!0)},sfixed64:function(){return ee.call(this)[ge](!1)}})}},{15:15}],10:[function(D,N,x){N.exports=O;var T=D(9),j=((O.prototype=Object.create(T.prototype)).constructor=O,D(15));function O(h){T.call(this,h)}O.n=function(){j.Buffer&&(O.prototype.i=j.Buffer.prototype.slice)},O.prototype.string=function(){var h=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+h,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+h,this.len))},O.n()},{15:15,9:9}],11:[function(D,N,x){N.exports={}},{}],12:[function(D,N,x){x.Service=D(13)},{13:13}],13:[function(D,N,x){N.exports=j;var T=D(15);function j(O,h,l){if(typeof O!="function")throw TypeError("rpcImpl must be a function");T.EventEmitter.call(this),this.rpcImpl=O,this.requestDelimited=!!h,this.responseDelimited=!!l}((j.prototype=Object.create(T.EventEmitter.prototype)).constructor=j).prototype.rpcCall=function O(h,l,u,d,v){if(!d)throw TypeError("request must be specified");var A=this;if(!v)return T.asPromise(O,A,h,l,u,d);if(!A.rpcImpl)return setTimeout(function(){v(Error("already ended"))},0),b;try{return A.rpcImpl(h,l[A.requestDelimited?"encodeDelimited":"encode"](d).finish(),function(z,I){if(z)return A.emit("error",z,h),v(z);if(I===null)return A.end(!0),b;if(!(I instanceof u))try{I=u[A.responseDelimited?"decodeDelimited":"decode"](I)}catch(ee){return A.emit("error",ee,h),v(ee)}return A.emit("data",I,h),v(null,I)})}catch(z){return A.emit("error",z,h),setTimeout(function(){v(z)},0),b}},j.prototype.end=function(O){return this.rpcImpl&&(O||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(D,N,x){N.exports=j;var T=D(15);function j(l,u){this.lo=l>>>0,this.hi=u>>>0}var O=j.zero=new j(0,0),h=(O.toNumber=function(){return 0},O.zzEncode=O.zzDecode=function(){return this},O.length=function(){return 1},j.zeroHash="\0\0\0\0\0\0\0\0",j.fromNumber=function(l){var u,d;return l===0?O:(d=(l=(u=l<0)?-l:l)>>>0,l=(l-d)/4294967296>>>0,u&&(l=~l>>>0,d=~d>>>0,4294967295<++d&&(d=0,4294967295<++l&&(l=0))),new j(d,l))},j.from=function(l){if(typeof l=="number")return j.fromNumber(l);if(T.isString(l)){if(!T.Long)return j.fromNumber(parseInt(l,10));l=T.Long.fromString(l)}return l.low||l.high?new j(l.low>>>0,l.high>>>0):O},j.prototype.toNumber=function(l){var u;return!l&&this.hi>>>31?(l=1+~this.lo>>>0,u=~this.hi>>>0,-(l+4294967296*(u=l?u:u+1>>>0))):this.lo+4294967296*this.hi},j.prototype.toLong=function(l){return T.Long?new T.Long(0|this.lo,0|this.hi,!!l):{low:0|this.lo,high:0|this.hi,unsigned:!!l}},String.prototype.charCodeAt);j.fromHash=function(l){return l==="\0\0\0\0\0\0\0\0"?O:new j((h.call(l,0)|h.call(l,1)<<8|h.call(l,2)<<16|h.call(l,3)<<24)>>>0,(h.call(l,4)|h.call(l,5)<<8|h.call(l,6)<<16|h.call(l,7)<<24)>>>0)},j.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},j.prototype.zzEncode=function(){var l=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^l)>>>0,this.lo=(this.lo<<1^l)>>>0,this},j.prototype.zzDecode=function(){var l=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^l)>>>0,this.hi=(this.hi>>>1^l)>>>0,this},j.prototype.length=function(){var l=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,d=this.hi>>>24;return d==0?u==0?l<16384?l<128?1:2:l<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:d<128?9:10}},{15:15}],15:[function(D,N,x){var T=x;function j(h,l,u){for(var d=Object.keys(l),v=0;v<d.length;++v)h[d[v]]!==b&&u||(h[d[v]]=l[d[v]]);return h}function O(h){function l(u,d){if(!(this instanceof l))return new l(u,d);Object.defineProperty(this,"message",{get:function(){return u}}),Error.captureStackTrace?Error.captureStackTrace(this,l):Object.defineProperty(this,"stack",{value:Error().stack||""}),d&&j(this,d)}return l.prototype=Object.create(Error.prototype,{constructor:{value:l,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return h},set:b,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),l}T.asPromise=D(1),T.base64=D(2),T.EventEmitter=D(3),T.float=D(4),T.inquire=D(5),T.utf8=D(7),T.pool=D(6),T.LongBits=D(14),T.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),T.global=T.isNode&&global||!1||typeof self<"u"&&self||this,T.emptyArray=Object.freeze?Object.freeze([]):[],T.emptyObject=Object.freeze?Object.freeze({}):{},T.isInteger=Number.isInteger||function(h){return typeof h=="number"&&isFinite(h)&&Math.floor(h)===h},T.isString=function(h){return typeof h=="string"||h instanceof String},T.isObject=function(h){return h&&typeof h=="object"},T.isset=T.isSet=function(h,l){var u=h[l];return u!=null&&h.hasOwnProperty(l)&&(typeof u!="object"||0<(Array.isArray(u)?u:Object.keys(u)).length)},T.Buffer=function(){try{var h=T.inquire("buffer").Buffer;return h.prototype.utf8Write?h:null}catch{return null}}(),T.r=null,T.u=null,T.newBuffer=function(h){return typeof h=="number"?T.Buffer?T.u(h):new T.Array(h):T.Buffer?T.r(h):typeof Uint8Array>"u"?h:new Uint8Array(h)},T.Array=typeof Uint8Array<"u"?Uint8Array:Array,T.Long=T.global.dcodeIO&&T.global.dcodeIO.Long||T.global.Long||T.inquire("long"),T.key2Re=/^true|false|0|1$/,T.key32Re=/^-?(?:0|[1-9][0-9]*)$/,T.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,T.longToHash=function(h){return h?T.LongBits.from(h).toHash():T.LongBits.zeroHash},T.longFromHash=function(h,l){return h=T.LongBits.fromHash(h),T.Long?T.Long.fromBits(h.lo,h.hi,l):h.toNumber(!!l)},T.merge=j,T.lcFirst=function(h){return(h[0]||"").toLowerCase()+h.substring(1)},T.newError=O,T.ProtocolError=O("ProtocolError"),T.oneOfGetter=function(h){for(var l={},u=0;u<h.length;++u)l[h[u]]=1;return function(){for(var d=Object.keys(this),v=d.length-1;-1<v;--v)if(l[d[v]]===1&&this[d[v]]!==b&&this[d[v]]!==null)return d[v]}},T.oneOfSetter=function(h){return function(l){for(var u=0;u<h.length;++u)h[u]!==l&&delete this[h[u]]}},T.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},T.n=function(){var h=T.Buffer;h?(T.r=h.from!==Uint8Array.from&&h.from||function(l,u){return new h(l,u)},T.u=h.allocUnsafe||function(l){return new h(l)}):T.r=T.u=null}},{1:1,14:14,2:2,3:3,4:4,5:5,6:6,7:7}],16:[function(D,N,x){N.exports=A;var T,j=D(15),O=j.LongBits,h=j.base64,l=j.utf8;function u(oe,De,Ge){this.fn=oe,this.len=De,this.next=b,this.val=Ge}function d(){}function v(oe){this.head=oe.head,this.tail=oe.tail,this.len=oe.len,this.next=oe.states}function A(){this.len=0,this.head=new u(d,0,0),this.tail=this.head,this.states=null}function z(){return j.Buffer?function(){return(A.create=function(){return new T})()}:function(){return new A}}function I(oe,De,Ge){De[Ge]=255&oe}function ee(oe,De){this.len=oe,this.next=b,this.val=De}function re(oe,De,Ge){for(;oe.hi;)De[Ge++]=127&oe.lo|128,oe.lo=(oe.lo>>>7|oe.hi<<25)>>>0,oe.hi>>>=7;for(;127<oe.lo;)De[Ge++]=127&oe.lo|128,oe.lo=oe.lo>>>7;De[Ge++]=oe.lo}function ge(oe,De,Ge){De[Ge]=255&oe,De[Ge+1]=oe>>>8&255,De[Ge+2]=oe>>>16&255,De[Ge+3]=oe>>>24}A.create=z(),A.alloc=function(oe){return new j.Array(oe)},j.Array!==Array&&(A.alloc=j.pool(A.alloc,j.Array.prototype.subarray)),A.prototype.e=function(oe,De,Ge){return this.tail=this.tail.next=new u(oe,De,Ge),this.len+=De,this},(ee.prototype=Object.create(u.prototype)).fn=function(oe,De,Ge){for(;127<oe;)De[Ge++]=127&oe|128,oe>>>=7;De[Ge]=oe},A.prototype.uint32=function(oe){return this.len+=(this.tail=this.tail.next=new ee((oe>>>=0)<128?1:oe<16384?2:oe<2097152?3:oe<268435456?4:5,oe)).len,this},A.prototype.int32=function(oe){return oe<0?this.e(re,10,O.fromNumber(oe)):this.uint32(oe)},A.prototype.sint32=function(oe){return this.uint32((oe<<1^oe>>31)>>>0)},A.prototype.int64=A.prototype.uint64=function(oe){return oe=O.from(oe),this.e(re,oe.length(),oe)},A.prototype.sint64=function(oe){return oe=O.from(oe).zzEncode(),this.e(re,oe.length(),oe)},A.prototype.bool=function(oe){return this.e(I,1,oe?1:0)},A.prototype.sfixed32=A.prototype.fixed32=function(oe){return this.e(ge,4,oe>>>0)},A.prototype.sfixed64=A.prototype.fixed64=function(oe){return oe=O.from(oe),this.e(ge,4,oe.lo).e(ge,4,oe.hi)},A.prototype.float=function(oe){return this.e(j.float.writeFloatLE,4,oe)},A.prototype.double=function(oe){return this.e(j.float.writeDoubleLE,8,oe)};var Ae=j.Array.prototype.set?function(oe,De,Ge){De.set(oe,Ge)}:function(oe,De,Ge){for(var mt=0;mt<oe.length;++mt)De[Ge+mt]=oe[mt]};A.prototype.bytes=function(oe){var De,Ge=oe.length>>>0;return Ge?(j.isString(oe)&&(De=A.alloc(Ge=h.length(oe)),h.decode(oe,De,0),oe=De),this.uint32(Ge).e(Ae,Ge,oe)):this.e(I,1,0)},A.prototype.string=function(oe){var De=l.length(oe);return De?this.uint32(De).e(l.write,De,oe):this.e(I,1,0)},A.prototype.fork=function(){return this.states=new v(this),this.head=this.tail=new u(d,0,0),this.len=0,this},A.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(d,0,0),this.len=0),this},A.prototype.ldelim=function(){var oe=this.head,De=this.tail,Ge=this.len;return this.reset().uint32(Ge),Ge&&(this.tail.next=oe.next,this.tail=De,this.len+=Ge),this},A.prototype.finish=function(){for(var oe=this.head.next,De=this.constructor.alloc(this.len),Ge=0;oe;)oe.fn(oe.val,De,Ge),Ge+=oe.len,oe=oe.next;return De},A.n=function(oe){T=oe,A.create=z(),T.n()}},{15:15}],17:[function(D,N,x){N.exports=O;var T=D(16),j=((O.prototype=Object.create(T.prototype)).constructor=O,D(15));function O(){T.call(this)}function h(l,u,d){l.length<40?j.utf8.write(l,u,d):u.utf8Write?u.utf8Write(l,d):u.write(l,d)}O.n=function(){O.alloc=j.u,O.writeBytesBuffer=j.Buffer&&j.Buffer.prototype instanceof Uint8Array&&j.Buffer.prototype.set.name==="set"?function(l,u,d){u.set(l,d)}:function(l,u,d){if(l.copy)l.copy(u,d,0,l.length);else for(var v=0;v<l.length;)u[d++]=l[v++]}},O.prototype.bytes=function(l){var u=(l=j.isString(l)?j.r(l,"base64"):l).length>>>0;return this.uint32(u),u&&this.e(O.writeBytesBuffer,u,l),this},O.prototype.string=function(l){var u=j.Buffer.byteLength(l);return this.uint32(u),u&&this.e(h,u,l),this},O.n()},{15:15,16:16}]},{},[8])})();(function(b){var D=b.Reader,N=b.Writer,x=b.util,T=b.roots.default||(b.roots.default={});return T.license_protocol=function(){var j={};return j.LicenseType=function(){var O={},h=Object.create(O);return h[O[1]="STREAMING"]=1,h[O[2]="OFFLINE"]=2,h[O[3]="AUTOMATIC"]=3,h}(),j.PlatformVerificationStatus=function(){var O={},h=Object.create(O);return h[O[0]="PLATFORM_UNVERIFIED"]=0,h[O[1]="PLATFORM_TAMPERED"]=1,h[O[2]="PLATFORM_SOFTWARE_VERIFIED"]=2,h[O[3]="PLATFORM_HARDWARE_VERIFIED"]=3,h[O[4]="PLATFORM_NO_VERIFICATION"]=4,h[O[5]="PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED"]=5,h}(),j.LicenseIdentification=function(){function O(h){if(h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.requestId=x.newBuffer([]),O.prototype.sessionId=x.newBuffer([]),O.prototype.purchaseId=x.newBuffer([]),O.prototype.type=1,O.prototype.version=0,O.prototype.providerSessionToken=x.newBuffer([]),O.create=function(l){return new O(l)},O.encode=function(l,u){return u||(u=N.create()),l.requestId!=null&&Object.hasOwnProperty.call(l,"requestId")&&u.uint32(10).bytes(l.requestId),l.sessionId!=null&&Object.hasOwnProperty.call(l,"sessionId")&&u.uint32(18).bytes(l.sessionId),l.purchaseId!=null&&Object.hasOwnProperty.call(l,"purchaseId")&&u.uint32(26).bytes(l.purchaseId),l.type!=null&&Object.hasOwnProperty.call(l,"type")&&u.uint32(32).int32(l.type),l.version!=null&&Object.hasOwnProperty.call(l,"version")&&u.uint32(40).int32(l.version),l.providerSessionToken!=null&&Object.hasOwnProperty.call(l,"providerSessionToken")&&u.uint32(50).bytes(l.providerSessionToken),u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.LicenseIdentification;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.requestId=l.bytes();break}case 2:{v.sessionId=l.bytes();break}case 3:{v.purchaseId=l.bytes();break}case 4:{v.type=l.int32();break}case 5:{v.version=l.int32();break}case 6:{v.providerSessionToken=l.bytes();break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.requestId!=null&&l.hasOwnProperty("requestId")&&!(l.requestId&&typeof l.requestId.length=="number"||x.isString(l.requestId)))return"requestId: buffer expected";if(l.sessionId!=null&&l.hasOwnProperty("sessionId")&&!(l.sessionId&&typeof l.sessionId.length=="number"||x.isString(l.sessionId)))return"sessionId: buffer expected";if(l.purchaseId!=null&&l.hasOwnProperty("purchaseId")&&!(l.purchaseId&&typeof l.purchaseId.length=="number"||x.isString(l.purchaseId)))return"purchaseId: buffer expected";if(l.type!=null&&l.hasOwnProperty("type"))switch(l.type){default:return"type: enum value expected";case 1:case 2:case 3:break}return l.version!=null&&l.hasOwnProperty("version")&&!x.isInteger(l.version)?"version: integer expected":l.providerSessionToken!=null&&l.hasOwnProperty("providerSessionToken")&&!(l.providerSessionToken&&typeof l.providerSessionToken.length=="number"||x.isString(l.providerSessionToken))?"providerSessionToken: buffer expected":null},O.fromObject=function(l){if(l instanceof T.license_protocol.LicenseIdentification)return l;var u=new T.license_protocol.LicenseIdentification;switch(l.requestId!=null&&(typeof l.requestId=="string"?x.base64.decode(l.requestId,u.requestId=x.newBuffer(x.base64.length(l.requestId)),0):l.requestId.length>=0&&(u.requestId=l.requestId)),l.sessionId!=null&&(typeof l.sessionId=="string"?x.base64.decode(l.sessionId,u.sessionId=x.newBuffer(x.base64.length(l.sessionId)),0):l.sessionId.length>=0&&(u.sessionId=l.sessionId)),l.purchaseId!=null&&(typeof l.purchaseId=="string"?x.base64.decode(l.purchaseId,u.purchaseId=x.newBuffer(x.base64.length(l.purchaseId)),0):l.purchaseId.length>=0&&(u.purchaseId=l.purchaseId)),l.type){default:if(typeof l.type=="number"){u.type=l.type;break}break;case"STREAMING":case 1:u.type=1;break;case"OFFLINE":case 2:u.type=2;break;case"AUTOMATIC":case 3:u.type=3;break}return l.version!=null&&(u.version=l.version|0),l.providerSessionToken!=null&&(typeof l.providerSessionToken=="string"?x.base64.decode(l.providerSessionToken,u.providerSessionToken=x.newBuffer(x.base64.length(l.providerSessionToken)),0):l.providerSessionToken.length>=0&&(u.providerSessionToken=l.providerSessionToken)),u},O.toObject=function(l,u){u||(u={});var d={};return u.defaults&&(u.bytes===String?d.requestId="":(d.requestId=[],u.bytes!==Array&&(d.requestId=x.newBuffer(d.requestId))),u.bytes===String?d.sessionId="":(d.sessionId=[],u.bytes!==Array&&(d.sessionId=x.newBuffer(d.sessionId))),u.bytes===String?d.purchaseId="":(d.purchaseId=[],u.bytes!==Array&&(d.purchaseId=x.newBuffer(d.purchaseId))),d.type=u.enums===String?"STREAMING":1,d.version=0,u.bytes===String?d.providerSessionToken="":(d.providerSessionToken=[],u.bytes!==Array&&(d.providerSessionToken=x.newBuffer(d.providerSessionToken)))),l.requestId!=null&&l.hasOwnProperty("requestId")&&(d.requestId=u.bytes===String?x.base64.encode(l.requestId,0,l.requestId.length):u.bytes===Array?Array.prototype.slice.call(l.requestId):l.requestId),l.sessionId!=null&&l.hasOwnProperty("sessionId")&&(d.sessionId=u.bytes===String?x.base64.encode(l.sessionId,0,l.sessionId.length):u.bytes===Array?Array.prototype.slice.call(l.sessionId):l.sessionId),l.purchaseId!=null&&l.hasOwnProperty("purchaseId")&&(d.purchaseId=u.bytes===String?x.base64.encode(l.purchaseId,0,l.purchaseId.length):u.bytes===Array?Array.prototype.slice.call(l.purchaseId):l.purchaseId),l.type!=null&&l.hasOwnProperty("type")&&(d.type=u.enums===String?T.license_protocol.LicenseType[l.type]===void 0?l.type:T.license_protocol.LicenseType[l.type]:l.type),l.version!=null&&l.hasOwnProperty("version")&&(d.version=l.version),l.providerSessionToken!=null&&l.hasOwnProperty("providerSessionToken")&&(d.providerSessionToken=u.bytes===String?x.base64.encode(l.providerSessionToken,0,l.providerSessionToken.length):u.bytes===Array?Array.prototype.slice.call(l.providerSessionToken):l.providerSessionToken),d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.LicenseIdentification"},O}(),j.License=function(){function O(h){if(this.key=[],this.groupIds=[],h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.id=null,O.prototype.policy=null,O.prototype.key=x.emptyArray,O.prototype.licenseStartTime=x.Long?x.Long.fromBits(0,0,!1):0,O.prototype.remoteAttestationVerified=!1,O.prototype.providerClientToken=x.newBuffer([]),O.prototype.protectionScheme=0,O.prototype.srmRequirement=x.newBuffer([]),O.prototype.srmUpdate=x.newBuffer([]),O.prototype.platformVerificationStatus=4,O.prototype.groupIds=x.emptyArray,O.create=function(l){return new O(l)},O.encode=function(l,u){if(u||(u=N.create()),l.id!=null&&Object.hasOwnProperty.call(l,"id")&&T.license_protocol.LicenseIdentification.encode(l.id,u.uint32(10).fork()).ldelim(),l.policy!=null&&Object.hasOwnProperty.call(l,"policy")&&T.license_protocol.License.Policy.encode(l.policy,u.uint32(18).fork()).ldelim(),l.key!=null&&l.key.length)for(var d=0;d<l.key.length;d+=1)T.license_protocol.License.KeyContainer.encode(l.key[d],u.uint32(26).fork()).ldelim();if(l.licenseStartTime!=null&&Object.hasOwnProperty.call(l,"licenseStartTime")&&u.uint32(32).int64(l.licenseStartTime),l.remoteAttestationVerified!=null&&Object.hasOwnProperty.call(l,"remoteAttestationVerified")&&u.uint32(40).bool(l.remoteAttestationVerified),l.providerClientToken!=null&&Object.hasOwnProperty.call(l,"providerClientToken")&&u.uint32(50).bytes(l.providerClientToken),l.protectionScheme!=null&&Object.hasOwnProperty.call(l,"protectionScheme")&&u.uint32(56).uint32(l.protectionScheme),l.srmRequirement!=null&&Object.hasOwnProperty.call(l,"srmRequirement")&&u.uint32(66).bytes(l.srmRequirement),l.srmUpdate!=null&&Object.hasOwnProperty.call(l,"srmUpdate")&&u.uint32(74).bytes(l.srmUpdate),l.platformVerificationStatus!=null&&Object.hasOwnProperty.call(l,"platformVerificationStatus")&&u.uint32(80).int32(l.platformVerificationStatus),l.groupIds!=null&&l.groupIds.length)for(var d=0;d<l.groupIds.length;d+=1)u.uint32(90).bytes(l.groupIds[d]);return u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.License;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.id=T.license_protocol.LicenseIdentification.decode(l,l.uint32());break}case 2:{v.policy=T.license_protocol.License.Policy.decode(l,l.uint32());break}case 3:{v.key&&v.key.length||(v.key=[]),v.key.push(T.license_protocol.License.KeyContainer.decode(l,l.uint32()));break}case 4:{v.licenseStartTime=l.int64();break}case 5:{v.remoteAttestationVerified=l.bool();break}case 6:{v.providerClientToken=l.bytes();break}case 7:{v.protectionScheme=l.uint32();break}case 8:{v.srmRequirement=l.bytes();break}case 9:{v.srmUpdate=l.bytes();break}case 10:{v.platformVerificationStatus=l.int32();break}case 11:{v.groupIds&&v.groupIds.length||(v.groupIds=[]),v.groupIds.push(l.bytes());break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.id!=null&&l.hasOwnProperty("id")){var u=T.license_protocol.LicenseIdentification.verify(l.id);if(u)return"id."+u}if(l.policy!=null&&l.hasOwnProperty("policy")){var u=T.license_protocol.License.Policy.verify(l.policy);if(u)return"policy."+u}if(l.key!=null&&l.hasOwnProperty("key")){if(!Array.isArray(l.key))return"key: array expected";for(var d=0;d<l.key.length;d+=1){var u=T.license_protocol.License.KeyContainer.verify(l.key[d]);if(u)return"key."+u}}if(l.licenseStartTime!=null&&l.hasOwnProperty("licenseStartTime")&&!x.isInteger(l.licenseStartTime)&&!(l.licenseStartTime&&x.isInteger(l.licenseStartTime.low)&&x.isInteger(l.licenseStartTime.high)))return"licenseStartTime: integer|Long expected";if(l.remoteAttestationVerified!=null&&l.hasOwnProperty("remoteAttestationVerified")&&typeof l.remoteAttestationVerified!="boolean")return"remoteAttestationVerified: boolean expected";if(l.providerClientToken!=null&&l.hasOwnProperty("providerClientToken")&&!(l.providerClientToken&&typeof l.providerClientToken.length=="number"||x.isString(l.providerClientToken)))return"providerClientToken: buffer expected";if(l.protectionScheme!=null&&l.hasOwnProperty("protectionScheme")&&!x.isInteger(l.protectionScheme))return"protectionScheme: integer expected";if(l.srmRequirement!=null&&l.hasOwnProperty("srmRequirement")&&!(l.srmRequirement&&typeof l.srmRequirement.length=="number"||x.isString(l.srmRequirement)))return"srmRequirement: buffer expected";if(l.srmUpdate!=null&&l.hasOwnProperty("srmUpdate")&&!(l.srmUpdate&&typeof l.srmUpdate.length=="number"||x.isString(l.srmUpdate)))return"srmUpdate: buffer expected";if(l.platformVerificationStatus!=null&&l.hasOwnProperty("platformVerificationStatus"))switch(l.platformVerificationStatus){default:return"platformVerificationStatus: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(l.groupIds!=null&&l.hasOwnProperty("groupIds")){if(!Array.isArray(l.groupIds))return"groupIds: array expected";for(var d=0;d<l.groupIds.length;d+=1)if(!(l.groupIds[d]&&typeof l.groupIds[d].length=="number"||x.isString(l.groupIds[d])))return"groupIds: buffer[] expected"}return null},O.fromObject=function(l){if(l instanceof T.license_protocol.License)return l;var u=new T.license_protocol.License;if(l.id!=null){if(typeof l.id!="object")throw TypeError(".license_protocol.License.id: object expected");u.id=T.license_protocol.LicenseIdentification.fromObject(l.id)}if(l.policy!=null){if(typeof l.policy!="object")throw TypeError(".license_protocol.License.policy: object expected");u.policy=T.license_protocol.License.Policy.fromObject(l.policy)}if(l.key){if(!Array.isArray(l.key))throw TypeError(".license_protocol.License.key: array expected");u.key=[];for(var d=0;d<l.key.length;d+=1){if(typeof l.key[d]!="object")throw TypeError(".license_protocol.License.key: object expected");u.key[d]=T.license_protocol.License.KeyContainer.fromObject(l.key[d])}}switch(l.licenseStartTime!=null&&(x.Long?(u.licenseStartTime=x.Long.fromValue(l.licenseStartTime)).unsigned=!1:typeof l.licenseStartTime=="string"?u.licenseStartTime=parseInt(l.licenseStartTime,10):typeof l.licenseStartTime=="number"?u.licenseStartTime=l.licenseStartTime:typeof l.licenseStartTime=="object"&&(u.licenseStartTime=new x.LongBits(l.licenseStartTime.low>>>0,l.licenseStartTime.high>>>0).toNumber())),l.remoteAttestationVerified!=null&&(u.remoteAttestationVerified=!!l.remoteAttestationVerified),l.providerClientToken!=null&&(typeof l.providerClientToken=="string"?x.base64.decode(l.providerClientToken,u.providerClientToken=x.newBuffer(x.base64.length(l.providerClientToken)),0):l.providerClientToken.length>=0&&(u.providerClientToken=l.providerClientToken)),l.protectionScheme!=null&&(u.protectionScheme=l.protectionScheme>>>0),l.srmRequirement!=null&&(typeof l.srmRequirement=="string"?x.base64.decode(l.srmRequirement,u.srmRequirement=x.newBuffer(x.base64.length(l.srmRequirement)),0):l.srmRequirement.length>=0&&(u.srmRequirement=l.srmRequirement)),l.srmUpdate!=null&&(typeof l.srmUpdate=="string"?x.base64.decode(l.srmUpdate,u.srmUpdate=x.newBuffer(x.base64.length(l.srmUpdate)),0):l.srmUpdate.length>=0&&(u.srmUpdate=l.srmUpdate)),l.platformVerificationStatus){case"PLATFORM_UNVERIFIED":case 0:u.platformVerificationStatus=0;break;case"PLATFORM_TAMPERED":case 1:u.platformVerificationStatus=1;break;case"PLATFORM_SOFTWARE_VERIFIED":case 2:u.platformVerificationStatus=2;break;case"PLATFORM_HARDWARE_VERIFIED":case 3:u.platformVerificationStatus=3;break;default:if(typeof l.platformVerificationStatus=="number"){u.platformVerificationStatus=l.platformVerificationStatus;break}break;case"PLATFORM_NO_VERIFICATION":case 4:u.platformVerificationStatus=4;break;case"PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED":case 5:u.platformVerificationStatus=5;break}if(l.groupIds){if(!Array.isArray(l.groupIds))throw TypeError(".license_protocol.License.groupIds: array expected");u.groupIds=[];for(var d=0;d<l.groupIds.length;d+=1)typeof l.groupIds[d]=="string"?x.base64.decode(l.groupIds[d],u.groupIds[d]=x.newBuffer(x.base64.length(l.groupIds[d])),0):l.groupIds[d].length>=0&&(u.groupIds[d]=l.groupIds[d])}return u},O.toObject=function(l,u){u||(u={});var d={};if((u.arrays||u.defaults)&&(d.key=[],d.groupIds=[]),u.defaults){if(d.id=null,d.policy=null,x.Long){var v=new x.Long(0,0,!1);d.licenseStartTime=u.longs===String?v.toString():u.longs===Number?v.toNumber():v}else d.licenseStartTime=u.longs===String?"0":0;d.remoteAttestationVerified=!1,u.bytes===String?d.providerClientToken="":(d.providerClientToken=[],u.bytes!==Array&&(d.providerClientToken=x.newBuffer(d.providerClientToken))),d.protectionScheme=0,u.bytes===String?d.srmRequirement="":(d.srmRequirement=[],u.bytes!==Array&&(d.srmRequirement=x.newBuffer(d.srmRequirement))),u.bytes===String?d.srmUpdate="":(d.srmUpdate=[],u.bytes!==Array&&(d.srmUpdate=x.newBuffer(d.srmUpdate))),d.platformVerificationStatus=u.enums===String?"PLATFORM_NO_VERIFICATION":4}if(l.id!=null&&l.hasOwnProperty("id")&&(d.id=T.license_protocol.LicenseIdentification.toObject(l.id,u)),l.policy!=null&&l.hasOwnProperty("policy")&&(d.policy=T.license_protocol.License.Policy.toObject(l.policy,u)),l.key&&l.key.length){d.key=[];for(var A=0;A<l.key.length;A+=1)d.key[A]=T.license_protocol.License.KeyContainer.toObject(l.key[A],u)}if(l.licenseStartTime!=null&&l.hasOwnProperty("licenseStartTime")&&(typeof l.licenseStartTime=="number"?d.licenseStartTime=u.longs===String?String(l.licenseStartTime):l.licenseStartTime:d.licenseStartTime=u.longs===String?x.Long.prototype.toString.call(l.licenseStartTime):u.longs===Number?new x.LongBits(l.licenseStartTime.low>>>0,l.licenseStartTime.high>>>0).toNumber():l.licenseStartTime),l.remoteAttestationVerified!=null&&l.hasOwnProperty("remoteAttestationVerified")&&(d.remoteAttestationVerified=l.remoteAttestationVerified),l.providerClientToken!=null&&l.hasOwnProperty("providerClientToken")&&(d.providerClientToken=u.bytes===String?x.base64.encode(l.providerClientToken,0,l.providerClientToken.length):u.bytes===Array?Array.prototype.slice.call(l.providerClientToken):l.providerClientToken),l.protectionScheme!=null&&l.hasOwnProperty("protectionScheme")&&(d.protectionScheme=l.protectionScheme),l.srmRequirement!=null&&l.hasOwnProperty("srmRequirement")&&(d.srmRequirement=u.bytes===String?x.base64.encode(l.srmRequirement,0,l.srmRequirement.length):u.bytes===Array?Array.prototype.slice.call(l.srmRequirement):l.srmRequirement),l.srmUpdate!=null&&l.hasOwnProperty("srmUpdate")&&(d.srmUpdate=u.bytes===String?x.base64.encode(l.srmUpdate,0,l.srmUpdate.length):u.bytes===Array?Array.prototype.slice.call(l.srmUpdate):l.srmUpdate),l.platformVerificationStatus!=null&&l.hasOwnProperty("platformVerificationStatus")&&(d.platformVerificationStatus=u.enums===String?T.license_protocol.PlatformVerificationStatus[l.platformVerificationStatus]===void 0?l.platformVerificationStatus:T.license_protocol.PlatformVerificationStatus[l.platformVerificationStatus]:l.platformVerificationStatus),l.groupIds&&l.groupIds.length){d.groupIds=[];for(var A=0;A<l.groupIds.length;A+=1)d.groupIds[A]=u.bytes===String?x.base64.encode(l.groupIds[A],0,l.groupIds[A].length):u.bytes===Array?Array.prototype.slice.call(l.groupIds[A]):l.groupIds[A]}return d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.License"},O.Policy=function(){function h(l){if(l)for(var u=Object.keys(l),d=0;d<u.length;d+=1)l[u[d]]!=null&&(this[u[d]]=l[u[d]])}return h.prototype.canPlay=!1,h.prototype.canPersist=!1,h.prototype.canRenew=!1,h.prototype.rentalDurationSeconds=x.Long?x.Long.fromBits(0,0,!1):0,h.prototype.playbackDurationSeconds=x.Long?x.Long.fromBits(0,0,!1):0,h.prototype.licenseDurationSeconds=x.Long?x.Long.fromBits(0,0,!1):0,h.prototype.renewalRecoveryDurationSeconds=x.Long?x.Long.fromBits(0,0,!1):0,h.prototype.renewalServerUrl="",h.prototype.renewalDelaySeconds=x.Long?x.Long.fromBits(0,0,!1):0,h.prototype.renewalRetryIntervalSeconds=x.Long?x.Long.fromBits(0,0,!1):0,h.prototype.renewWithUsage=!1,h.prototype.alwaysIncludeClientId=!1,h.prototype.playStartGracePeriodSeconds=x.Long?x.Long.fromBits(0,0,!1):0,h.prototype.softEnforcePlaybackDuration=!1,h.prototype.softEnforceRentalDuration=!0,h.create=function(u){return new h(u)},h.encode=function(u,d){return d||(d=N.create()),u.canPlay!=null&&Object.hasOwnProperty.call(u,"canPlay")&&d.uint32(8).bool(u.canPlay),u.canPersist!=null&&Object.hasOwnProperty.call(u,"canPersist")&&d.uint32(16).bool(u.canPersist),u.canRenew!=null&&Object.hasOwnProperty.call(u,"canRenew")&&d.uint32(24).bool(u.canRenew),u.rentalDurationSeconds!=null&&Object.hasOwnProperty.call(u,"rentalDurationSeconds")&&d.uint32(32).int64(u.rentalDurationSeconds),u.playbackDurationSeconds!=null&&Object.hasOwnProperty.call(u,"playbackDurationSeconds")&&d.uint32(40).int64(u.playbackDurationSeconds),u.licenseDurationSeconds!=null&&Object.hasOwnProperty.call(u,"licenseDurationSeconds")&&d.uint32(48).int64(u.licenseDurationSeconds),u.renewalRecoveryDurationSeconds!=null&&Object.hasOwnProperty.call(u,"renewalRecoveryDurationSeconds")&&d.uint32(56).int64(u.renewalRecoveryDurationSeconds),u.renewalServerUrl!=null&&Object.hasOwnProperty.call(u,"renewalServerUrl")&&d.uint32(66).string(u.renewalServerUrl),u.renewalDelaySeconds!=null&&Object.hasOwnProperty.call(u,"renewalDelaySeconds")&&d.uint32(72).int64(u.renewalDelaySeconds),u.renewalRetryIntervalSeconds!=null&&Object.hasOwnProperty.call(u,"renewalRetryIntervalSeconds")&&d.uint32(80).int64(u.renewalRetryIntervalSeconds),u.renewWithUsage!=null&&Object.hasOwnProperty.call(u,"renewWithUsage")&&d.uint32(88).bool(u.renewWithUsage),u.alwaysIncludeClientId!=null&&Object.hasOwnProperty.call(u,"alwaysIncludeClientId")&&d.uint32(96).bool(u.alwaysIncludeClientId),u.playStartGracePeriodSeconds!=null&&Object.hasOwnProperty.call(u,"playStartGracePeriodSeconds")&&d.uint32(104).int64(u.playStartGracePeriodSeconds),u.softEnforcePlaybackDuration!=null&&Object.hasOwnProperty.call(u,"softEnforcePlaybackDuration")&&d.uint32(112).bool(u.softEnforcePlaybackDuration),u.softEnforceRentalDuration!=null&&Object.hasOwnProperty.call(u,"softEnforceRentalDuration")&&d.uint32(120).bool(u.softEnforceRentalDuration),d},h.encodeDelimited=function(u,d){return this.encode(u,d).ldelim()},h.decode=function(u,d){u instanceof D||(u=D.create(u));for(var v=d===void 0?u.len:u.pos+d,A=new T.license_protocol.License.Policy;u.pos<v;){var z=u.uint32();switch(z>>>3){case 1:{A.canPlay=u.bool();break}case 2:{A.canPersist=u.bool();break}case 3:{A.canRenew=u.bool();break}case 4:{A.rentalDurationSeconds=u.int64();break}case 5:{A.playbackDurationSeconds=u.int64();break}case 6:{A.licenseDurationSeconds=u.int64();break}case 7:{A.renewalRecoveryDurationSeconds=u.int64();break}case 8:{A.renewalServerUrl=u.string();break}case 9:{A.renewalDelaySeconds=u.int64();break}case 10:{A.renewalRetryIntervalSeconds=u.int64();break}case 11:{A.renewWithUsage=u.bool();break}case 12:{A.alwaysIncludeClientId=u.bool();break}case 13:{A.playStartGracePeriodSeconds=u.int64();break}case 14:{A.softEnforcePlaybackDuration=u.bool();break}case 15:{A.softEnforceRentalDuration=u.bool();break}default:u.skipType(z&7);break}}return A},h.decodeDelimited=function(u){return u instanceof D||(u=new D(u)),this.decode(u,u.uint32())},h.verify=function(u){return typeof u!="object"||u===null?"object expected":u.canPlay!=null&&u.hasOwnProperty("canPlay")&&typeof u.canPlay!="boolean"?"canPlay: boolean expected":u.canPersist!=null&&u.hasOwnProperty("canPersist")&&typeof u.canPersist!="boolean"?"canPersist: boolean expected":u.canRenew!=null&&u.hasOwnProperty("canRenew")&&typeof u.canRenew!="boolean"?"canRenew: boolean expected":u.rentalDurationSeconds!=null&&u.hasOwnProperty("rentalDurationSeconds")&&!x.isInteger(u.rentalDurationSeconds)&&!(u.rentalDurationSeconds&&x.isInteger(u.rentalDurationSeconds.low)&&x.isInteger(u.rentalDurationSeconds.high))?"rentalDurationSeconds: integer|Long expected":u.playbackDurationSeconds!=null&&u.hasOwnProperty("playbackDurationSeconds")&&!x.isInteger(u.playbackDurationSeconds)&&!(u.playbackDurationSeconds&&x.isInteger(u.playbackDurationSeconds.low)&&x.isInteger(u.playbackDurationSeconds.high))?"playbackDurationSeconds: integer|Long expected":u.licenseDurationSeconds!=null&&u.hasOwnProperty("licenseDurationSeconds")&&!x.isInteger(u.licenseDurationSeconds)&&!(u.licenseDurationSeconds&&x.isInteger(u.licenseDurationSeconds.low)&&x.isInteger(u.licenseDurationSeconds.high))?"licenseDurationSeconds: integer|Long expected":u.renewalRecoveryDurationSeconds!=null&&u.hasOwnProperty("renewalRecoveryDurationSeconds")&&!x.isInteger(u.renewalRecoveryDurationSeconds)&&!(u.renewalRecoveryDurationSeconds&&x.isInteger(u.renewalRecoveryDurationSeconds.low)&&x.isInteger(u.renewalRecoveryDurationSeconds.high))?"renewalRecoveryDurationSeconds: integer|Long expected":u.renewalServerUrl!=null&&u.hasOwnProperty("renewalServerUrl")&&!x.isString(u.renewalServerUrl)?"renewalServerUrl: string expected":u.renewalDelaySeconds!=null&&u.hasOwnProperty("renewalDelaySeconds")&&!x.isInteger(u.renewalDelaySeconds)&&!(u.renewalDelaySeconds&&x.isInteger(u.renewalDelaySeconds.low)&&x.isInteger(u.renewalDelaySeconds.high))?"renewalDelaySeconds: integer|Long expected":u.renewalRetryIntervalSeconds!=null&&u.hasOwnProperty("renewalRetryIntervalSeconds")&&!x.isInteger(u.renewalRetryIntervalSeconds)&&!(u.renewalRetryIntervalSeconds&&x.isInteger(u.renewalRetryIntervalSeconds.low)&&x.isInteger(u.renewalRetryIntervalSeconds.high))?"renewalRetryIntervalSeconds: integer|Long expected":u.renewWithUsage!=null&&u.hasOwnProperty("renewWithUsage")&&typeof u.renewWithUsage!="boolean"?"renewWithUsage: boolean expected":u.alwaysIncludeClientId!=null&&u.hasOwnProperty("alwaysIncludeClientId")&&typeof u.alwaysIncludeClientId!="boolean"?"alwaysIncludeClientId: boolean expected":u.playStartGracePeriodSeconds!=null&&u.hasOwnProperty("playStartGracePeriodSeconds")&&!x.isInteger(u.playStartGracePeriodSeconds)&&!(u.playStartGracePeriodSeconds&&x.isInteger(u.playStartGracePeriodSeconds.low)&&x.isInteger(u.playStartGracePeriodSeconds.high))?"playStartGracePeriodSeconds: integer|Long expected":u.softEnforcePlaybackDuration!=null&&u.hasOwnProperty("softEnforcePlaybackDuration")&&typeof u.softEnforcePlaybackDuration!="boolean"?"softEnforcePlaybackDuration: boolean expected":u.softEnforceRentalDuration!=null&&u.hasOwnProperty("softEnforceRentalDuration")&&typeof u.softEnforceRentalDuration!="boolean"?"softEnforceRentalDuration: boolean expected":null},h.fromObject=function(u){if(u instanceof T.license_protocol.License.Policy)return u;var d=new T.license_protocol.License.Policy;return u.canPlay!=null&&(d.canPlay=!!u.canPlay),u.canPersist!=null&&(d.canPersist=!!u.canPersist),u.canRenew!=null&&(d.canRenew=!!u.canRenew),u.rentalDurationSeconds!=null&&(x.Long?(d.rentalDurationSeconds=x.Long.fromValue(u.rentalDurationSeconds)).unsigned=!1:typeof u.rentalDurationSeconds=="string"?d.rentalDurationSeconds=parseInt(u.rentalDurationSeconds,10):typeof u.rentalDurationSeconds=="number"?d.rentalDurationSeconds=u.rentalDurationSeconds:typeof u.rentalDurationSeconds=="object"&&(d.rentalDurationSeconds=new x.LongBits(u.rentalDurationSeconds.low>>>0,u.rentalDurationSeconds.high>>>0).toNumber())),u.playbackDurationSeconds!=null&&(x.Long?(d.playbackDurationSeconds=x.Long.fromValue(u.playbackDurationSeconds)).unsigned=!1:typeof u.playbackDurationSeconds=="string"?d.playbackDurationSeconds=parseInt(u.playbackDurationSeconds,10):typeof u.playbackDurationSeconds=="number"?d.playbackDurationSeconds=u.playbackDurationSeconds:typeof u.playbackDurationSeconds=="object"&&(d.playbackDurationSeconds=new x.LongBits(u.playbackDurationSeconds.low>>>0,u.playbackDurationSeconds.high>>>0).toNumber())),u.licenseDurationSeconds!=null&&(x.Long?(d.licenseDurationSeconds=x.Long.fromValue(u.licenseDurationSeconds)).unsigned=!1:typeof u.licenseDurationSeconds=="string"?d.licenseDurationSeconds=parseInt(u.licenseDurationSeconds,10):typeof u.licenseDurationSeconds=="number"?d.licenseDurationSeconds=u.licenseDurationSeconds:typeof u.licenseDurationSeconds=="object"&&(d.licenseDurationSeconds=new x.LongBits(u.licenseDurationSeconds.low>>>0,u.licenseDurationSeconds.high>>>0).toNumber())),u.renewalRecoveryDurationSeconds!=null&&(x.Long?(d.renewalRecoveryDurationSeconds=x.Long.fromValue(u.renewalRecoveryDurationSeconds)).unsigned=!1:typeof u.renewalRecoveryDurationSeconds=="string"?d.renewalRecoveryDurationSeconds=parseInt(u.renewalRecoveryDurationSeconds,10):typeof u.renewalRecoveryDurationSeconds=="number"?d.renewalRecoveryDurationSeconds=u.renewalRecoveryDurationSeconds:typeof u.renewalRecoveryDurationSeconds=="object"&&(d.renewalRecoveryDurationSeconds=new x.LongBits(u.renewalRecoveryDurationSeconds.low>>>0,u.renewalRecoveryDurationSeconds.high>>>0).toNumber())),u.renewalServerUrl!=null&&(d.renewalServerUrl=String(u.renewalServerUrl)),u.renewalDelaySeconds!=null&&(x.Long?(d.renewalDelaySeconds=x.Long.fromValue(u.renewalDelaySeconds)).unsigned=!1:typeof u.renewalDelaySeconds=="string"?d.renewalDelaySeconds=parseInt(u.renewalDelaySeconds,10):typeof u.renewalDelaySeconds=="number"?d.renewalDelaySeconds=u.renewalDelaySeconds:typeof u.renewalDelaySeconds=="object"&&(d.renewalDelaySeconds=new x.LongBits(u.renewalDelaySeconds.low>>>0,u.renewalDelaySeconds.high>>>0).toNumber())),u.renewalRetryIntervalSeconds!=null&&(x.Long?(d.renewalRetryIntervalSeconds=x.Long.fromValue(u.renewalRetryIntervalSeconds)).unsigned=!1:typeof u.renewalRetryIntervalSeconds=="string"?d.renewalRetryIntervalSeconds=parseInt(u.renewalRetryIntervalSeconds,10):typeof u.renewalRetryIntervalSeconds=="number"?d.renewalRetryIntervalSeconds=u.renewalRetryIntervalSeconds:typeof u.renewalRetryIntervalSeconds=="object"&&(d.renewalRetryIntervalSeconds=new x.LongBits(u.renewalRetryIntervalSeconds.low>>>0,u.renewalRetryIntervalSeconds.high>>>0).toNumber())),u.renewWithUsage!=null&&(d.renewWithUsage=!!u.renewWithUsage),u.alwaysIncludeClientId!=null&&(d.alwaysIncludeClientId=!!u.alwaysIncludeClientId),u.playStartGracePeriodSeconds!=null&&(x.Long?(d.playStartGracePeriodSeconds=x.Long.fromValue(u.playStartGracePeriodSeconds)).unsigned=!1:typeof u.playStartGracePeriodSeconds=="string"?d.playStartGracePeriodSeconds=parseInt(u.playStartGracePeriodSeconds,10):typeof u.playStartGracePeriodSeconds=="number"?d.playStartGracePeriodSeconds=u.playStartGracePeriodSeconds:typeof u.playStartGracePeriodSeconds=="object"&&(d.playStartGracePeriodSeconds=new x.LongBits(u.playStartGracePeriodSeconds.low>>>0,u.playStartGracePeriodSeconds.high>>>0).toNumber())),u.softEnforcePlaybackDuration!=null&&(d.softEnforcePlaybackDuration=!!u.softEnforcePlaybackDuration),u.softEnforceRentalDuration!=null&&(d.softEnforceRentalDuration=!!u.softEnforceRentalDuration),d},h.toObject=function(u,d){d||(d={});var v={};if(d.defaults){if(v.canPlay=!1,v.canPersist=!1,v.canRenew=!1,x.Long){var A=new x.Long(0,0,!1);v.rentalDurationSeconds=d.longs===String?A.toString():d.longs===Number?A.toNumber():A}else v.rentalDurationSeconds=d.longs===String?"0":0;if(x.Long){var A=new x.Long(0,0,!1);v.playbackDurationSeconds=d.longs===String?A.toString():d.longs===Number?A.toNumber():A}else v.playbackDurationSeconds=d.longs===String?"0":0;if(x.Long){var A=new x.Long(0,0,!1);v.licenseDurationSeconds=d.longs===String?A.toString():d.longs===Number?A.toNumber():A}else v.licenseDurationSeconds=d.longs===String?"0":0;if(x.Long){var A=new x.Long(0,0,!1);v.renewalRecoveryDurationSeconds=d.longs===String?A.toString():d.longs===Number?A.toNumber():A}else v.renewalRecoveryDurationSeconds=d.longs===String?"0":0;if(v.renewalServerUrl="",x.Long){var A=new x.Long(0,0,!1);v.renewalDelaySeconds=d.longs===String?A.toString():d.longs===Number?A.toNumber():A}else v.renewalDelaySeconds=d.longs===String?"0":0;if(x.Long){var A=new x.Long(0,0,!1);v.renewalRetryIntervalSeconds=d.longs===String?A.toString():d.longs===Number?A.toNumber():A}else v.renewalRetryIntervalSeconds=d.longs===String?"0":0;if(v.renewWithUsage=!1,v.alwaysIncludeClientId=!1,x.Long){var A=new x.Long(0,0,!1);v.playStartGracePeriodSeconds=d.longs===String?A.toString():d.longs===Number?A.toNumber():A}else v.playStartGracePeriodSeconds=d.longs===String?"0":0;v.softEnforcePlaybackDuration=!1,v.softEnforceRentalDuration=!0}return u.canPlay!=null&&u.hasOwnProperty("canPlay")&&(v.canPlay=u.canPlay),u.canPersist!=null&&u.hasOwnProperty("canPersist")&&(v.canPersist=u.canPersist),u.canRenew!=null&&u.hasOwnProperty("canRenew")&&(v.canRenew=u.canRenew),u.rentalDurationSeconds!=null&&u.hasOwnProperty("rentalDurationSeconds")&&(typeof u.rentalDurationSeconds=="number"?v.rentalDurationSeconds=d.longs===String?String(u.rentalDurationSeconds):u.rentalDurationSeconds:v.rentalDurationSeconds=d.longs===String?x.Long.prototype.toString.call(u.rentalDurationSeconds):d.longs===Number?new x.LongBits(u.rentalDurationSeconds.low>>>0,u.rentalDurationSeconds.high>>>0).toNumber():u.rentalDurationSeconds),u.playbackDurationSeconds!=null&&u.hasOwnProperty("playbackDurationSeconds")&&(typeof u.playbackDurationSeconds=="number"?v.playbackDurationSeconds=d.longs===String?String(u.playbackDurationSeconds):u.playbackDurationSeconds:v.playbackDurationSeconds=d.longs===String?x.Long.prototype.toString.call(u.playbackDurationSeconds):d.longs===Number?new x.LongBits(u.playbackDurationSeconds.low>>>0,u.playbackDurationSeconds.high>>>0).toNumber():u.playbackDurationSeconds),u.licenseDurationSeconds!=null&&u.hasOwnProperty("licenseDurationSeconds")&&(typeof u.licenseDurationSeconds=="number"?v.licenseDurationSeconds=d.longs===String?String(u.licenseDurationSeconds):u.licenseDurationSeconds:v.licenseDurationSeconds=d.longs===String?x.Long.prototype.toString.call(u.licenseDurationSeconds):d.longs===Number?new x.LongBits(u.licenseDurationSeconds.low>>>0,u.licenseDurationSeconds.high>>>0).toNumber():u.licenseDurationSeconds),u.renewalRecoveryDurationSeconds!=null&&u.hasOwnProperty("renewalRecoveryDurationSeconds")&&(typeof u.renewalRecoveryDurationSeconds=="number"?v.renewalRecoveryDurationSeconds=d.longs===String?String(u.renewalRecoveryDurationSeconds):u.renewalRecoveryDurationSeconds:v.renewalRecoveryDurationSeconds=d.longs===String?x.Long.prototype.toString.call(u.renewalRecoveryDurationSeconds):d.longs===Number?new x.LongBits(u.renewalRecoveryDurationSeconds.low>>>0,u.renewalRecoveryDurationSeconds.high>>>0).toNumber():u.renewalRecoveryDurationSeconds),u.renewalServerUrl!=null&&u.hasOwnProperty("renewalServerUrl")&&(v.renewalServerUrl=u.renewalServerUrl),u.renewalDelaySeconds!=null&&u.hasOwnProperty("renewalDelaySeconds")&&(typeof u.renewalDelaySeconds=="number"?v.renewalDelaySeconds=d.longs===String?String(u.renewalDelaySeconds):u.renewalDelaySeconds:v.renewalDelaySeconds=d.longs===String?x.Long.prototype.toString.call(u.renewalDelaySeconds):d.longs===Number?new x.LongBits(u.renewalDelaySeconds.low>>>0,u.renewalDelaySeconds.high>>>0).toNumber():u.renewalDelaySeconds),u.renewalRetryIntervalSeconds!=null&&u.hasOwnProperty("renewalRetryIntervalSeconds")&&(typeof u.renewalRetryIntervalSeconds=="number"?v.renewalRetryIntervalSeconds=d.longs===String?String(u.renewalRetryIntervalSeconds):u.renewalRetryIntervalSeconds:v.renewalRetryIntervalSeconds=d.longs===String?x.Long.prototype.toString.call(u.renewalRetryIntervalSeconds):d.longs===Number?new x.LongBits(u.renewalRetryIntervalSeconds.low>>>0,u.renewalRetryIntervalSeconds.high>>>0).toNumber():u.renewalRetryIntervalSeconds),u.renewWithUsage!=null&&u.hasOwnProperty("renewWithUsage")&&(v.renewWithUsage=u.renewWithUsage),u.alwaysIncludeClientId!=null&&u.hasOwnProperty("alwaysIncludeClientId")&&(v.alwaysIncludeClientId=u.alwaysIncludeClientId),u.playStartGracePeriodSeconds!=null&&u.hasOwnProperty("playStartGracePeriodSeconds")&&(typeof u.playStartGracePeriodSeconds=="number"?v.playStartGracePeriodSeconds=d.longs===String?String(u.playStartGracePeriodSeconds):u.playStartGracePeriodSeconds:v.playStartGracePeriodSeconds=d.longs===String?x.Long.prototype.toString.call(u.playStartGracePeriodSeconds):d.longs===Number?new x.LongBits(u.playStartGracePeriodSeconds.low>>>0,u.playStartGracePeriodSeconds.high>>>0).toNumber():u.playStartGracePeriodSeconds),u.softEnforcePlaybackDuration!=null&&u.hasOwnProperty("softEnforcePlaybackDuration")&&(v.softEnforcePlaybackDuration=u.softEnforcePlaybackDuration),u.softEnforceRentalDuration!=null&&u.hasOwnProperty("softEnforceRentalDuration")&&(v.softEnforceRentalDuration=u.softEnforceRentalDuration),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.License.Policy"},h}(),O.KeyContainer=function(){function h(l){if(this.videoResolutionConstraints=[],l)for(var u=Object.keys(l),d=0;d<u.length;d+=1)l[u[d]]!=null&&(this[u[d]]=l[u[d]])}return h.prototype.id=x.newBuffer([]),h.prototype.iv=x.newBuffer([]),h.prototype.key=x.newBuffer([]),h.prototype.type=1,h.prototype.level=1,h.prototype.requiredProtection=null,h.prototype.requestedProtection=null,h.prototype.keyControl=null,h.prototype.operatorSessionKeyPermissions=null,h.prototype.videoResolutionConstraints=x.emptyArray,h.prototype.antiRollbackUsageTable=!1,h.prototype.trackLabel="",h.create=function(u){return new h(u)},h.encode=function(u,d){if(d||(d=N.create()),u.id!=null&&Object.hasOwnProperty.call(u,"id")&&d.uint32(10).bytes(u.id),u.iv!=null&&Object.hasOwnProperty.call(u,"iv")&&d.uint32(18).bytes(u.iv),u.key!=null&&Object.hasOwnProperty.call(u,"key")&&d.uint32(26).bytes(u.key),u.type!=null&&Object.hasOwnProperty.call(u,"type")&&d.uint32(32).int32(u.type),u.level!=null&&Object.hasOwnProperty.call(u,"level")&&d.uint32(40).int32(u.level),u.requiredProtection!=null&&Object.hasOwnProperty.call(u,"requiredProtection")&&T.license_protocol.License.KeyContainer.OutputProtection.encode(u.requiredProtection,d.uint32(50).fork()).ldelim(),u.requestedProtection!=null&&Object.hasOwnProperty.call(u,"requestedProtection")&&T.license_protocol.License.KeyContainer.OutputProtection.encode(u.requestedProtection,d.uint32(58).fork()).ldelim(),u.keyControl!=null&&Object.hasOwnProperty.call(u,"keyControl")&&T.license_protocol.License.KeyContainer.KeyControl.encode(u.keyControl,d.uint32(66).fork()).ldelim(),u.operatorSessionKeyPermissions!=null&&Object.hasOwnProperty.call(u,"operatorSessionKeyPermissions")&&T.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.encode(u.operatorSessionKeyPermissions,d.uint32(74).fork()).ldelim(),u.videoResolutionConstraints!=null&&u.videoResolutionConstraints.length)for(var v=0;v<u.videoResolutionConstraints.length;v+=1)T.license_protocol.License.KeyContainer.VideoResolutionConstraint.encode(u.videoResolutionConstraints[v],d.uint32(82).fork()).ldelim();return u.antiRollbackUsageTable!=null&&Object.hasOwnProperty.call(u,"antiRollbackUsageTable")&&d.uint32(88).bool(u.antiRollbackUsageTable),u.trackLabel!=null&&Object.hasOwnProperty.call(u,"trackLabel")&&d.uint32(98).string(u.trackLabel),d},h.encodeDelimited=function(u,d){return this.encode(u,d).ldelim()},h.decode=function(u,d){u instanceof D||(u=D.create(u));for(var v=d===void 0?u.len:u.pos+d,A=new T.license_protocol.License.KeyContainer;u.pos<v;){var z=u.uint32();switch(z>>>3){case 1:{A.id=u.bytes();break}case 2:{A.iv=u.bytes();break}case 3:{A.key=u.bytes();break}case 4:{A.type=u.int32();break}case 5:{A.level=u.int32();break}case 6:{A.requiredProtection=T.license_protocol.License.KeyContainer.OutputProtection.decode(u,u.uint32());break}case 7:{A.requestedProtection=T.license_protocol.License.KeyContainer.OutputProtection.decode(u,u.uint32());break}case 8:{A.keyControl=T.license_protocol.License.KeyContainer.KeyControl.decode(u,u.uint32());break}case 9:{A.operatorSessionKeyPermissions=T.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.decode(u,u.uint32());break}case 10:{A.videoResolutionConstraints&&A.videoResolutionConstraints.length||(A.videoResolutionConstraints=[]),A.videoResolutionConstraints.push(T.license_protocol.License.KeyContainer.VideoResolutionConstraint.decode(u,u.uint32()));break}case 11:{A.antiRollbackUsageTable=u.bool();break}case 12:{A.trackLabel=u.string();break}default:u.skipType(z&7);break}}return A},h.decodeDelimited=function(u){return u instanceof D||(u=new D(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.id!=null&&u.hasOwnProperty("id")&&!(u.id&&typeof u.id.length=="number"||x.isString(u.id)))return"id: buffer expected";if(u.iv!=null&&u.hasOwnProperty("iv")&&!(u.iv&&typeof u.iv.length=="number"||x.isString(u.iv)))return"iv: buffer expected";if(u.key!=null&&u.hasOwnProperty("key")&&!(u.key&&typeof u.key.length=="number"||x.isString(u.key)))return"key: buffer expected";if(u.type!=null&&u.hasOwnProperty("type"))switch(u.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:break}if(u.level!=null&&u.hasOwnProperty("level"))switch(u.level){default:return"level: enum value expected";case 1:case 2:case 3:case 4:case 5:break}if(u.requiredProtection!=null&&u.hasOwnProperty("requiredProtection")){var d=T.license_protocol.License.KeyContainer.OutputProtection.verify(u.requiredProtection);if(d)return"requiredProtection."+d}if(u.requestedProtection!=null&&u.hasOwnProperty("requestedProtection")){var d=T.license_protocol.License.KeyContainer.OutputProtection.verify(u.requestedProtection);if(d)return"requestedProtection."+d}if(u.keyControl!=null&&u.hasOwnProperty("keyControl")){var d=T.license_protocol.License.KeyContainer.KeyControl.verify(u.keyControl);if(d)return"keyControl."+d}if(u.operatorSessionKeyPermissions!=null&&u.hasOwnProperty("operatorSessionKeyPermissions")){var d=T.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.verify(u.operatorSessionKeyPermissions);if(d)return"operatorSessionKeyPermissions."+d}if(u.videoResolutionConstraints!=null&&u.hasOwnProperty("videoResolutionConstraints")){if(!Array.isArray(u.videoResolutionConstraints))return"videoResolutionConstraints: array expected";for(var v=0;v<u.videoResolutionConstraints.length;v+=1){var d=T.license_protocol.License.KeyContainer.VideoResolutionConstraint.verify(u.videoResolutionConstraints[v]);if(d)return"videoResolutionConstraints."+d}}return u.antiRollbackUsageTable!=null&&u.hasOwnProperty("antiRollbackUsageTable")&&typeof u.antiRollbackUsageTable!="boolean"?"antiRollbackUsageTable: boolean expected":u.trackLabel!=null&&u.hasOwnProperty("trackLabel")&&!x.isString(u.trackLabel)?"trackLabel: string expected":null},h.fromObject=function(u){if(u instanceof T.license_protocol.License.KeyContainer)return u;var d=new T.license_protocol.License.KeyContainer;switch(u.id!=null&&(typeof u.id=="string"?x.base64.decode(u.id,d.id=x.newBuffer(x.base64.length(u.id)),0):u.id.length>=0&&(d.id=u.id)),u.iv!=null&&(typeof u.iv=="string"?x.base64.decode(u.iv,d.iv=x.newBuffer(x.base64.length(u.iv)),0):u.iv.length>=0&&(d.iv=u.iv)),u.key!=null&&(typeof u.key=="string"?x.base64.decode(u.key,d.key=x.newBuffer(x.base64.length(u.key)),0):u.key.length>=0&&(d.key=u.key)),u.type){default:if(typeof u.type=="number"){d.type=u.type;break}break;case"SIGNING":case 1:d.type=1;break;case"CONTENT":case 2:d.type=2;break;case"KEY_CONTROL":case 3:d.type=3;break;case"OPERATOR_SESSION":case 4:d.type=4;break;case"ENTITLEMENT":case 5:d.type=5;break;case"OEM_CONTENT":case 6:d.type=6;break}switch(u.level){default:if(typeof u.level=="number"){d.level=u.level;break}break;case"SW_SECURE_CRYPTO":case 1:d.level=1;break;case"SW_SECURE_DECODE":case 2:d.level=2;break;case"HW_SECURE_CRYPTO":case 3:d.level=3;break;case"HW_SECURE_DECODE":case 4:d.level=4;break;case"HW_SECURE_ALL":case 5:d.level=5;break}if(u.requiredProtection!=null){if(typeof u.requiredProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.requiredProtection: object expected");d.requiredProtection=T.license_protocol.License.KeyContainer.OutputProtection.fromObject(u.requiredProtection)}if(u.requestedProtection!=null){if(typeof u.requestedProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.requestedProtection: object expected");d.requestedProtection=T.license_protocol.License.KeyContainer.OutputProtection.fromObject(u.requestedProtection)}if(u.keyControl!=null){if(typeof u.keyControl!="object")throw TypeError(".license_protocol.License.KeyContainer.keyControl: object expected");d.keyControl=T.license_protocol.License.KeyContainer.KeyControl.fromObject(u.keyControl)}if(u.operatorSessionKeyPermissions!=null){if(typeof u.operatorSessionKeyPermissions!="object")throw TypeError(".license_protocol.License.KeyContainer.operatorSessionKeyPermissions: object expected");d.operatorSessionKeyPermissions=T.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.fromObject(u.operatorSessionKeyPermissions)}if(u.videoResolutionConstraints){if(!Array.isArray(u.videoResolutionConstraints))throw TypeError(".license_protocol.License.KeyContainer.videoResolutionConstraints: array expected");d.videoResolutionConstraints=[];for(var v=0;v<u.videoResolutionConstraints.length;v+=1){if(typeof u.videoResolutionConstraints[v]!="object")throw TypeError(".license_protocol.License.KeyContainer.videoResolutionConstraints: object expected");d.videoResolutionConstraints[v]=T.license_protocol.License.KeyContainer.VideoResolutionConstraint.fromObject(u.videoResolutionConstraints[v])}}return u.antiRollbackUsageTable!=null&&(d.antiRollbackUsageTable=!!u.antiRollbackUsageTable),u.trackLabel!=null&&(d.trackLabel=String(u.trackLabel)),d},h.toObject=function(u,d){d||(d={});var v={};if((d.arrays||d.defaults)&&(v.videoResolutionConstraints=[]),d.defaults&&(d.bytes===String?v.id="":(v.id=[],d.bytes!==Array&&(v.id=x.newBuffer(v.id))),d.bytes===String?v.iv="":(v.iv=[],d.bytes!==Array&&(v.iv=x.newBuffer(v.iv))),d.bytes===String?v.key="":(v.key=[],d.bytes!==Array&&(v.key=x.newBuffer(v.key))),v.type=d.enums===String?"SIGNING":1,v.level=d.enums===String?"SW_SECURE_CRYPTO":1,v.requiredProtection=null,v.requestedProtection=null,v.keyControl=null,v.operatorSessionKeyPermissions=null,v.antiRollbackUsageTable=!1,v.trackLabel=""),u.id!=null&&u.hasOwnProperty("id")&&(v.id=d.bytes===String?x.base64.encode(u.id,0,u.id.length):d.bytes===Array?Array.prototype.slice.call(u.id):u.id),u.iv!=null&&u.hasOwnProperty("iv")&&(v.iv=d.bytes===String?x.base64.encode(u.iv,0,u.iv.length):d.bytes===Array?Array.prototype.slice.call(u.iv):u.iv),u.key!=null&&u.hasOwnProperty("key")&&(v.key=d.bytes===String?x.base64.encode(u.key,0,u.key.length):d.bytes===Array?Array.prototype.slice.call(u.key):u.key),u.type!=null&&u.hasOwnProperty("type")&&(v.type=d.enums===String?T.license_protocol.License.KeyContainer.KeyType[u.type]===void 0?u.type:T.license_protocol.License.KeyContainer.KeyType[u.type]:u.type),u.level!=null&&u.hasOwnProperty("level")&&(v.level=d.enums===String?T.license_protocol.License.KeyContainer.SecurityLevel[u.level]===void 0?u.level:T.license_protocol.License.KeyContainer.SecurityLevel[u.level]:u.level),u.requiredProtection!=null&&u.hasOwnProperty("requiredProtection")&&(v.requiredProtection=T.license_protocol.License.KeyContainer.OutputProtection.toObject(u.requiredProtection,d)),u.requestedProtection!=null&&u.hasOwnProperty("requestedProtection")&&(v.requestedProtection=T.license_protocol.License.KeyContainer.OutputProtection.toObject(u.requestedProtection,d)),u.keyControl!=null&&u.hasOwnProperty("keyControl")&&(v.keyControl=T.license_protocol.License.KeyContainer.KeyControl.toObject(u.keyControl,d)),u.operatorSessionKeyPermissions!=null&&u.hasOwnProperty("operatorSessionKeyPermissions")&&(v.operatorSessionKeyPermissions=T.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.toObject(u.operatorSessionKeyPermissions,d)),u.videoResolutionConstraints&&u.videoResolutionConstraints.length){v.videoResolutionConstraints=[];for(var A=0;A<u.videoResolutionConstraints.length;A+=1)v.videoResolutionConstraints[A]=T.license_protocol.License.KeyContainer.VideoResolutionConstraint.toObject(u.videoResolutionConstraints[A],d)}return u.antiRollbackUsageTable!=null&&u.hasOwnProperty("antiRollbackUsageTable")&&(v.antiRollbackUsageTable=u.antiRollbackUsageTable),u.trackLabel!=null&&u.hasOwnProperty("trackLabel")&&(v.trackLabel=u.trackLabel),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.License.KeyContainer"},h.KeyType=function(){var l={},u=Object.create(l);return u[l[1]="SIGNING"]=1,u[l[2]="CONTENT"]=2,u[l[3]="KEY_CONTROL"]=3,u[l[4]="OPERATOR_SESSION"]=4,u[l[5]="ENTITLEMENT"]=5,u[l[6]="OEM_CONTENT"]=6,u}(),h.SecurityLevel=function(){var l={},u=Object.create(l);return u[l[1]="SW_SECURE_CRYPTO"]=1,u[l[2]="SW_SECURE_DECODE"]=2,u[l[3]="HW_SECURE_CRYPTO"]=3,u[l[4]="HW_SECURE_DECODE"]=4,u[l[5]="HW_SECURE_ALL"]=5,u}(),h.KeyControl=function(){function l(u){if(u)for(var d=Object.keys(u),v=0;v<d.length;v+=1)u[d[v]]!=null&&(this[d[v]]=u[d[v]])}return l.prototype.keyControlBlock=x.newBuffer([]),l.prototype.iv=x.newBuffer([]),l.create=function(d){return new l(d)},l.encode=function(d,v){return v||(v=N.create()),d.keyControlBlock!=null&&Object.hasOwnProperty.call(d,"keyControlBlock")&&v.uint32(10).bytes(d.keyControlBlock),d.iv!=null&&Object.hasOwnProperty.call(d,"iv")&&v.uint32(18).bytes(d.iv),v},l.encodeDelimited=function(d,v){return this.encode(d,v).ldelim()},l.decode=function(d,v){d instanceof D||(d=D.create(d));for(var A=v===void 0?d.len:d.pos+v,z=new T.license_protocol.License.KeyContainer.KeyControl;d.pos<A;){var I=d.uint32();switch(I>>>3){case 1:{z.keyControlBlock=d.bytes();break}case 2:{z.iv=d.bytes();break}default:d.skipType(I&7);break}}return z},l.decodeDelimited=function(d){return d instanceof D||(d=new D(d)),this.decode(d,d.uint32())},l.verify=function(d){return typeof d!="object"||d===null?"object expected":d.keyControlBlock!=null&&d.hasOwnProperty("keyControlBlock")&&!(d.keyControlBlock&&typeof d.keyControlBlock.length=="number"||x.isString(d.keyControlBlock))?"keyControlBlock: buffer expected":d.iv!=null&&d.hasOwnProperty("iv")&&!(d.iv&&typeof d.iv.length=="number"||x.isString(d.iv))?"iv: buffer expected":null},l.fromObject=function(d){if(d instanceof T.license_protocol.License.KeyContainer.KeyControl)return d;var v=new T.license_protocol.License.KeyContainer.KeyControl;return d.keyControlBlock!=null&&(typeof d.keyControlBlock=="string"?x.base64.decode(d.keyControlBlock,v.keyControlBlock=x.newBuffer(x.base64.length(d.keyControlBlock)),0):d.keyControlBlock.length>=0&&(v.keyControlBlock=d.keyControlBlock)),d.iv!=null&&(typeof d.iv=="string"?x.base64.decode(d.iv,v.iv=x.newBuffer(x.base64.length(d.iv)),0):d.iv.length>=0&&(v.iv=d.iv)),v},l.toObject=function(d,v){v||(v={});var A={};return v.defaults&&(v.bytes===String?A.keyControlBlock="":(A.keyControlBlock=[],v.bytes!==Array&&(A.keyControlBlock=x.newBuffer(A.keyControlBlock))),v.bytes===String?A.iv="":(A.iv=[],v.bytes!==Array&&(A.iv=x.newBuffer(A.iv)))),d.keyControlBlock!=null&&d.hasOwnProperty("keyControlBlock")&&(A.keyControlBlock=v.bytes===String?x.base64.encode(d.keyControlBlock,0,d.keyControlBlock.length):v.bytes===Array?Array.prototype.slice.call(d.keyControlBlock):d.keyControlBlock),d.iv!=null&&d.hasOwnProperty("iv")&&(A.iv=v.bytes===String?x.base64.encode(d.iv,0,d.iv.length):v.bytes===Array?Array.prototype.slice.call(d.iv):d.iv),A},l.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},l.getTypeUrl=function(d){return d===void 0&&(d="type.googleapis.com"),d+"/license_protocol.License.KeyContainer.KeyControl"},l}(),h.OutputProtection=function(){function l(u){if(u)for(var d=Object.keys(u),v=0;v<d.length;v+=1)u[d[v]]!=null&&(this[d[v]]=u[d[v]])}return l.prototype.hdcp=0,l.prototype.cgmsFlags=42,l.prototype.hdcpSrmRule=0,l.prototype.disableAnalogOutput=!1,l.prototype.disableDigitalOutput=!1,l.create=function(d){return new l(d)},l.encode=function(d,v){return v||(v=N.create()),d.hdcp!=null&&Object.hasOwnProperty.call(d,"hdcp")&&v.uint32(8).int32(d.hdcp),d.cgmsFlags!=null&&Object.hasOwnProperty.call(d,"cgmsFlags")&&v.uint32(16).int32(d.cgmsFlags),d.hdcpSrmRule!=null&&Object.hasOwnProperty.call(d,"hdcpSrmRule")&&v.uint32(24).int32(d.hdcpSrmRule),d.disableAnalogOutput!=null&&Object.hasOwnProperty.call(d,"disableAnalogOutput")&&v.uint32(32).bool(d.disableAnalogOutput),d.disableDigitalOutput!=null&&Object.hasOwnProperty.call(d,"disableDigitalOutput")&&v.uint32(40).bool(d.disableDigitalOutput),v},l.encodeDelimited=function(d,v){return this.encode(d,v).ldelim()},l.decode=function(d,v){d instanceof D||(d=D.create(d));for(var A=v===void 0?d.len:d.pos+v,z=new T.license_protocol.License.KeyContainer.OutputProtection;d.pos<A;){var I=d.uint32();switch(I>>>3){case 1:{z.hdcp=d.int32();break}case 2:{z.cgmsFlags=d.int32();break}case 3:{z.hdcpSrmRule=d.int32();break}case 4:{z.disableAnalogOutput=d.bool();break}case 5:{z.disableDigitalOutput=d.bool();break}default:d.skipType(I&7);break}}return z},l.decodeDelimited=function(d){return d instanceof D||(d=new D(d)),this.decode(d,d.uint32())},l.verify=function(d){if(typeof d!="object"||d===null)return"object expected";if(d.hdcp!=null&&d.hasOwnProperty("hdcp"))switch(d.hdcp){default:return"hdcp: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 255:break}if(d.cgmsFlags!=null&&d.hasOwnProperty("cgmsFlags"))switch(d.cgmsFlags){default:return"cgmsFlags: enum value expected";case 42:case 0:case 2:case 3:break}if(d.hdcpSrmRule!=null&&d.hasOwnProperty("hdcpSrmRule"))switch(d.hdcpSrmRule){default:return"hdcpSrmRule: enum value expected";case 0:case 1:break}return d.disableAnalogOutput!=null&&d.hasOwnProperty("disableAnalogOutput")&&typeof d.disableAnalogOutput!="boolean"?"disableAnalogOutput: boolean expected":d.disableDigitalOutput!=null&&d.hasOwnProperty("disableDigitalOutput")&&typeof d.disableDigitalOutput!="boolean"?"disableDigitalOutput: boolean expected":null},l.fromObject=function(d){if(d instanceof T.license_protocol.License.KeyContainer.OutputProtection)return d;var v=new T.license_protocol.License.KeyContainer.OutputProtection;switch(d.hdcp){default:if(typeof d.hdcp=="number"){v.hdcp=d.hdcp;break}break;case"HDCP_NONE":case 0:v.hdcp=0;break;case"HDCP_V1":case 1:v.hdcp=1;break;case"HDCP_V2":case 2:v.hdcp=2;break;case"HDCP_V2_1":case 3:v.hdcp=3;break;case"HDCP_V2_2":case 4:v.hdcp=4;break;case"HDCP_V2_3":case 5:v.hdcp=5;break;case"HDCP_NO_DIGITAL_OUTPUT":case 255:v.hdcp=255;break}switch(d.cgmsFlags){default:if(typeof d.cgmsFlags=="number"){v.cgmsFlags=d.cgmsFlags;break}break;case"CGMS_NONE":case 42:v.cgmsFlags=42;break;case"COPY_FREE":case 0:v.cgmsFlags=0;break;case"COPY_ONCE":case 2:v.cgmsFlags=2;break;case"COPY_NEVER":case 3:v.cgmsFlags=3;break}switch(d.hdcpSrmRule){default:if(typeof d.hdcpSrmRule=="number"){v.hdcpSrmRule=d.hdcpSrmRule;break}break;case"HDCP_SRM_RULE_NONE":case 0:v.hdcpSrmRule=0;break;case"CURRENT_SRM":case 1:v.hdcpSrmRule=1;break}return d.disableAnalogOutput!=null&&(v.disableAnalogOutput=!!d.disableAnalogOutput),d.disableDigitalOutput!=null&&(v.disableDigitalOutput=!!d.disableDigitalOutput),v},l.toObject=function(d,v){v||(v={});var A={};return v.defaults&&(A.hdcp=v.enums===String?"HDCP_NONE":0,A.cgmsFlags=v.enums===String?"CGMS_NONE":42,A.hdcpSrmRule=v.enums===String?"HDCP_SRM_RULE_NONE":0,A.disableAnalogOutput=!1,A.disableDigitalOutput=!1),d.hdcp!=null&&d.hasOwnProperty("hdcp")&&(A.hdcp=v.enums===String?T.license_protocol.License.KeyContainer.OutputProtection.HDCP[d.hdcp]===void 0?d.hdcp:T.license_protocol.License.KeyContainer.OutputProtection.HDCP[d.hdcp]:d.hdcp),d.cgmsFlags!=null&&d.hasOwnProperty("cgmsFlags")&&(A.cgmsFlags=v.enums===String?T.license_protocol.License.KeyContainer.OutputProtection.CGMS[d.cgmsFlags]===void 0?d.cgmsFlags:T.license_protocol.License.KeyContainer.OutputProtection.CGMS[d.cgmsFlags]:d.cgmsFlags),d.hdcpSrmRule!=null&&d.hasOwnProperty("hdcpSrmRule")&&(A.hdcpSrmRule=v.enums===String?T.license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule[d.hdcpSrmRule]===void 0?d.hdcpSrmRule:T.license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule[d.hdcpSrmRule]:d.hdcpSrmRule),d.disableAnalogOutput!=null&&d.hasOwnProperty("disableAnalogOutput")&&(A.disableAnalogOutput=d.disableAnalogOutput),d.disableDigitalOutput!=null&&d.hasOwnProperty("disableDigitalOutput")&&(A.disableDigitalOutput=d.disableDigitalOutput),A},l.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},l.getTypeUrl=function(d){return d===void 0&&(d="type.googleapis.com"),d+"/license_protocol.License.KeyContainer.OutputProtection"},l.HDCP=function(){var u={},d=Object.create(u);return d[u[0]="HDCP_NONE"]=0,d[u[1]="HDCP_V1"]=1,d[u[2]="HDCP_V2"]=2,d[u[3]="HDCP_V2_1"]=3,d[u[4]="HDCP_V2_2"]=4,d[u[5]="HDCP_V2_3"]=5,d[u[255]="HDCP_NO_DIGITAL_OUTPUT"]=255,d}(),l.CGMS=function(){var u={},d=Object.create(u);return d[u[42]="CGMS_NONE"]=42,d[u[0]="COPY_FREE"]=0,d[u[2]="COPY_ONCE"]=2,d[u[3]="COPY_NEVER"]=3,d}(),l.HdcpSrmRule=function(){var u={},d=Object.create(u);return d[u[0]="HDCP_SRM_RULE_NONE"]=0,d[u[1]="CURRENT_SRM"]=1,d}(),l}(),h.VideoResolutionConstraint=function(){function l(u){if(u)for(var d=Object.keys(u),v=0;v<d.length;v+=1)u[d[v]]!=null&&(this[d[v]]=u[d[v]])}return l.prototype.minResolutionPixels=0,l.prototype.maxResolutionPixels=0,l.prototype.requiredProtection=null,l.create=function(d){return new l(d)},l.encode=function(d,v){return v||(v=N.create()),d.minResolutionPixels!=null&&Object.hasOwnProperty.call(d,"minResolutionPixels")&&v.uint32(8).uint32(d.minResolutionPixels),d.maxResolutionPixels!=null&&Object.hasOwnProperty.call(d,"maxResolutionPixels")&&v.uint32(16).uint32(d.maxResolutionPixels),d.requiredProtection!=null&&Object.hasOwnProperty.call(d,"requiredProtection")&&T.license_protocol.License.KeyContainer.OutputProtection.encode(d.requiredProtection,v.uint32(26).fork()).ldelim(),v},l.encodeDelimited=function(d,v){return this.encode(d,v).ldelim()},l.decode=function(d,v){d instanceof D||(d=D.create(d));for(var A=v===void 0?d.len:d.pos+v,z=new T.license_protocol.License.KeyContainer.VideoResolutionConstraint;d.pos<A;){var I=d.uint32();switch(I>>>3){case 1:{z.minResolutionPixels=d.uint32();break}case 2:{z.maxResolutionPixels=d.uint32();break}case 3:{z.requiredProtection=T.license_protocol.License.KeyContainer.OutputProtection.decode(d,d.uint32());break}default:d.skipType(I&7);break}}return z},l.decodeDelimited=function(d){return d instanceof D||(d=new D(d)),this.decode(d,d.uint32())},l.verify=function(d){if(typeof d!="object"||d===null)return"object expected";if(d.minResolutionPixels!=null&&d.hasOwnProperty("minResolutionPixels")&&!x.isInteger(d.minResolutionPixels))return"minResolutionPixels: integer expected";if(d.maxResolutionPixels!=null&&d.hasOwnProperty("maxResolutionPixels")&&!x.isInteger(d.maxResolutionPixels))return"maxResolutionPixels: integer expected";if(d.requiredProtection!=null&&d.hasOwnProperty("requiredProtection")){var v=T.license_protocol.License.KeyContainer.OutputProtection.verify(d.requiredProtection);if(v)return"requiredProtection."+v}return null},l.fromObject=function(d){if(d instanceof T.license_protocol.License.KeyContainer.VideoResolutionConstraint)return d;var v=new T.license_protocol.License.KeyContainer.VideoResolutionConstraint;if(d.minResolutionPixels!=null&&(v.minResolutionPixels=d.minResolutionPixels>>>0),d.maxResolutionPixels!=null&&(v.maxResolutionPixels=d.maxResolutionPixels>>>0),d.requiredProtection!=null){if(typeof d.requiredProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.VideoResolutionConstraint.requiredProtection: object expected");v.requiredProtection=T.license_protocol.License.KeyContainer.OutputProtection.fromObject(d.requiredProtection)}return v},l.toObject=function(d,v){v||(v={});var A={};return v.defaults&&(A.minResolutionPixels=0,A.maxResolutionPixels=0,A.requiredProtection=null),d.minResolutionPixels!=null&&d.hasOwnProperty("minResolutionPixels")&&(A.minResolutionPixels=d.minResolutionPixels),d.maxResolutionPixels!=null&&d.hasOwnProperty("maxResolutionPixels")&&(A.maxResolutionPixels=d.maxResolutionPixels),d.requiredProtection!=null&&d.hasOwnProperty("requiredProtection")&&(A.requiredProtection=T.license_protocol.License.KeyContainer.OutputProtection.toObject(d.requiredProtection,v)),A},l.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},l.getTypeUrl=function(d){return d===void 0&&(d="type.googleapis.com"),d+"/license_protocol.License.KeyContainer.VideoResolutionConstraint"},l}(),h.OperatorSessionKeyPermissions=function(){function l(u){if(u)for(var d=Object.keys(u),v=0;v<d.length;v+=1)u[d[v]]!=null&&(this[d[v]]=u[d[v]])}return l.prototype.allowEncrypt=!1,l.prototype.allowDecrypt=!1,l.prototype.allowSign=!1,l.prototype.allowSignatureVerify=!1,l.create=function(d){return new l(d)},l.encode=function(d,v){return v||(v=N.create()),d.allowEncrypt!=null&&Object.hasOwnProperty.call(d,"allowEncrypt")&&v.uint32(8).bool(d.allowEncrypt),d.allowDecrypt!=null&&Object.hasOwnProperty.call(d,"allowDecrypt")&&v.uint32(16).bool(d.allowDecrypt),d.allowSign!=null&&Object.hasOwnProperty.call(d,"allowSign")&&v.uint32(24).bool(d.allowSign),d.allowSignatureVerify!=null&&Object.hasOwnProperty.call(d,"allowSignatureVerify")&&v.uint32(32).bool(d.allowSignatureVerify),v},l.encodeDelimited=function(d,v){return this.encode(d,v).ldelim()},l.decode=function(d,v){d instanceof D||(d=D.create(d));for(var A=v===void 0?d.len:d.pos+v,z=new T.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions;d.pos<A;){var I=d.uint32();switch(I>>>3){case 1:{z.allowEncrypt=d.bool();break}case 2:{z.allowDecrypt=d.bool();break}case 3:{z.allowSign=d.bool();break}case 4:{z.allowSignatureVerify=d.bool();break}default:d.skipType(I&7);break}}return z},l.decodeDelimited=function(d){return d instanceof D||(d=new D(d)),this.decode(d,d.uint32())},l.verify=function(d){return typeof d!="object"||d===null?"object expected":d.allowEncrypt!=null&&d.hasOwnProperty("allowEncrypt")&&typeof d.allowEncrypt!="boolean"?"allowEncrypt: boolean expected":d.allowDecrypt!=null&&d.hasOwnProperty("allowDecrypt")&&typeof d.allowDecrypt!="boolean"?"allowDecrypt: boolean expected":d.allowSign!=null&&d.hasOwnProperty("allowSign")&&typeof d.allowSign!="boolean"?"allowSign: boolean expected":d.allowSignatureVerify!=null&&d.hasOwnProperty("allowSignatureVerify")&&typeof d.allowSignatureVerify!="boolean"?"allowSignatureVerify: boolean expected":null},l.fromObject=function(d){if(d instanceof T.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions)return d;var v=new T.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions;return d.allowEncrypt!=null&&(v.allowEncrypt=!!d.allowEncrypt),d.allowDecrypt!=null&&(v.allowDecrypt=!!d.allowDecrypt),d.allowSign!=null&&(v.allowSign=!!d.allowSign),d.allowSignatureVerify!=null&&(v.allowSignatureVerify=!!d.allowSignatureVerify),v},l.toObject=function(d,v){v||(v={});var A={};return v.defaults&&(A.allowEncrypt=!1,A.allowDecrypt=!1,A.allowSign=!1,A.allowSignatureVerify=!1),d.allowEncrypt!=null&&d.hasOwnProperty("allowEncrypt")&&(A.allowEncrypt=d.allowEncrypt),d.allowDecrypt!=null&&d.hasOwnProperty("allowDecrypt")&&(A.allowDecrypt=d.allowDecrypt),d.allowSign!=null&&d.hasOwnProperty("allowSign")&&(A.allowSign=d.allowSign),d.allowSignatureVerify!=null&&d.hasOwnProperty("allowSignatureVerify")&&(A.allowSignatureVerify=d.allowSignatureVerify),A},l.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},l.getTypeUrl=function(d){return d===void 0&&(d="type.googleapis.com"),d+"/license_protocol.License.KeyContainer.OperatorSessionKeyPermissions"},l}(),h}(),O}(),j.ProtocolVersion=function(){var O={},h=Object.create(O);return h[O[20]="VERSION_2_0"]=20,h[O[21]="VERSION_2_1"]=21,h[O[22]="VERSION_2_2"]=22,h}(),j.LicenseRequest=function(){function O(h){if(h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.clientId=null,O.prototype.contentId=null,O.prototype.type=1,O.prototype.requestTime=x.Long?x.Long.fromBits(0,0,!1):0,O.prototype.keyControlNonceDeprecated=x.newBuffer([]),O.prototype.protocolVersion=20,O.prototype.keyControlNonce=0,O.prototype.encryptedClientId=null,O.create=function(l){return new O(l)},O.encode=function(l,u){return u||(u=N.create()),l.clientId!=null&&Object.hasOwnProperty.call(l,"clientId")&&T.license_protocol.ClientIdentification.encode(l.clientId,u.uint32(10).fork()).ldelim(),l.contentId!=null&&Object.hasOwnProperty.call(l,"contentId")&&T.license_protocol.LicenseRequest.ContentIdentification.encode(l.contentId,u.uint32(18).fork()).ldelim(),l.type!=null&&Object.hasOwnProperty.call(l,"type")&&u.uint32(24).int32(l.type),l.requestTime!=null&&Object.hasOwnProperty.call(l,"requestTime")&&u.uint32(32).int64(l.requestTime),l.keyControlNonceDeprecated!=null&&Object.hasOwnProperty.call(l,"keyControlNonceDeprecated")&&u.uint32(42).bytes(l.keyControlNonceDeprecated),l.protocolVersion!=null&&Object.hasOwnProperty.call(l,"protocolVersion")&&u.uint32(48).int32(l.protocolVersion),l.keyControlNonce!=null&&Object.hasOwnProperty.call(l,"keyControlNonce")&&u.uint32(56).uint32(l.keyControlNonce),l.encryptedClientId!=null&&Object.hasOwnProperty.call(l,"encryptedClientId")&&T.license_protocol.EncryptedClientIdentification.encode(l.encryptedClientId,u.uint32(66).fork()).ldelim(),u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.LicenseRequest;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.clientId=T.license_protocol.ClientIdentification.decode(l,l.uint32());break}case 2:{v.contentId=T.license_protocol.LicenseRequest.ContentIdentification.decode(l,l.uint32());break}case 3:{v.type=l.int32();break}case 4:{v.requestTime=l.int64();break}case 5:{v.keyControlNonceDeprecated=l.bytes();break}case 6:{v.protocolVersion=l.int32();break}case 7:{v.keyControlNonce=l.uint32();break}case 8:{v.encryptedClientId=T.license_protocol.EncryptedClientIdentification.decode(l,l.uint32());break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.clientId!=null&&l.hasOwnProperty("clientId")){var u=T.license_protocol.ClientIdentification.verify(l.clientId);if(u)return"clientId."+u}if(l.contentId!=null&&l.hasOwnProperty("contentId")){var u=T.license_protocol.LicenseRequest.ContentIdentification.verify(l.contentId);if(u)return"contentId."+u}if(l.type!=null&&l.hasOwnProperty("type"))switch(l.type){default:return"type: enum value expected";case 1:case 2:case 3:break}if(l.requestTime!=null&&l.hasOwnProperty("requestTime")&&!x.isInteger(l.requestTime)&&!(l.requestTime&&x.isInteger(l.requestTime.low)&&x.isInteger(l.requestTime.high)))return"requestTime: integer|Long expected";if(l.keyControlNonceDeprecated!=null&&l.hasOwnProperty("keyControlNonceDeprecated")&&!(l.keyControlNonceDeprecated&&typeof l.keyControlNonceDeprecated.length=="number"||x.isString(l.keyControlNonceDeprecated)))return"keyControlNonceDeprecated: buffer expected";if(l.protocolVersion!=null&&l.hasOwnProperty("protocolVersion"))switch(l.protocolVersion){default:return"protocolVersion: enum value expected";case 20:case 21:case 22:break}if(l.keyControlNonce!=null&&l.hasOwnProperty("keyControlNonce")&&!x.isInteger(l.keyControlNonce))return"keyControlNonce: integer expected";if(l.encryptedClientId!=null&&l.hasOwnProperty("encryptedClientId")){var u=T.license_protocol.EncryptedClientIdentification.verify(l.encryptedClientId);if(u)return"encryptedClientId."+u}return null},O.fromObject=function(l){if(l instanceof T.license_protocol.LicenseRequest)return l;var u=new T.license_protocol.LicenseRequest;if(l.clientId!=null){if(typeof l.clientId!="object")throw TypeError(".license_protocol.LicenseRequest.clientId: object expected");u.clientId=T.license_protocol.ClientIdentification.fromObject(l.clientId)}if(l.contentId!=null){if(typeof l.contentId!="object")throw TypeError(".license_protocol.LicenseRequest.contentId: object expected");u.contentId=T.license_protocol.LicenseRequest.ContentIdentification.fromObject(l.contentId)}switch(l.type){default:if(typeof l.type=="number"){u.type=l.type;break}break;case"NEW":case 1:u.type=1;break;case"RENEWAL":case 2:u.type=2;break;case"RELEASE":case 3:u.type=3;break}switch(l.requestTime!=null&&(x.Long?(u.requestTime=x.Long.fromValue(l.requestTime)).unsigned=!1:typeof l.requestTime=="string"?u.requestTime=parseInt(l.requestTime,10):typeof l.requestTime=="number"?u.requestTime=l.requestTime:typeof l.requestTime=="object"&&(u.requestTime=new x.LongBits(l.requestTime.low>>>0,l.requestTime.high>>>0).toNumber())),l.keyControlNonceDeprecated!=null&&(typeof l.keyControlNonceDeprecated=="string"?x.base64.decode(l.keyControlNonceDeprecated,u.keyControlNonceDeprecated=x.newBuffer(x.base64.length(l.keyControlNonceDeprecated)),0):l.keyControlNonceDeprecated.length>=0&&(u.keyControlNonceDeprecated=l.keyControlNonceDeprecated)),l.protocolVersion){default:if(typeof l.protocolVersion=="number"){u.protocolVersion=l.protocolVersion;break}break;case"VERSION_2_0":case 20:u.protocolVersion=20;break;case"VERSION_2_1":case 21:u.protocolVersion=21;break;case"VERSION_2_2":case 22:u.protocolVersion=22;break}if(l.keyControlNonce!=null&&(u.keyControlNonce=l.keyControlNonce>>>0),l.encryptedClientId!=null){if(typeof l.encryptedClientId!="object")throw TypeError(".license_protocol.LicenseRequest.encryptedClientId: object expected");u.encryptedClientId=T.license_protocol.EncryptedClientIdentification.fromObject(l.encryptedClientId)}return u},O.toObject=function(l,u){u||(u={});var d={};if(u.defaults){if(d.clientId=null,d.contentId=null,d.type=u.enums===String?"NEW":1,x.Long){var v=new x.Long(0,0,!1);d.requestTime=u.longs===String?v.toString():u.longs===Number?v.toNumber():v}else d.requestTime=u.longs===String?"0":0;u.bytes===String?d.keyControlNonceDeprecated="":(d.keyControlNonceDeprecated=[],u.bytes!==Array&&(d.keyControlNonceDeprecated=x.newBuffer(d.keyControlNonceDeprecated))),d.protocolVersion=u.enums===String?"VERSION_2_0":20,d.keyControlNonce=0,d.encryptedClientId=null}return l.clientId!=null&&l.hasOwnProperty("clientId")&&(d.clientId=T.license_protocol.ClientIdentification.toObject(l.clientId,u)),l.contentId!=null&&l.hasOwnProperty("contentId")&&(d.contentId=T.license_protocol.LicenseRequest.ContentIdentification.toObject(l.contentId,u)),l.type!=null&&l.hasOwnProperty("type")&&(d.type=u.enums===String?T.license_protocol.LicenseRequest.RequestType[l.type]===void 0?l.type:T.license_protocol.LicenseRequest.RequestType[l.type]:l.type),l.requestTime!=null&&l.hasOwnProperty("requestTime")&&(typeof l.requestTime=="number"?d.requestTime=u.longs===String?String(l.requestTime):l.requestTime:d.requestTime=u.longs===String?x.Long.prototype.toString.call(l.requestTime):u.longs===Number?new x.LongBits(l.requestTime.low>>>0,l.requestTime.high>>>0).toNumber():l.requestTime),l.keyControlNonceDeprecated!=null&&l.hasOwnProperty("keyControlNonceDeprecated")&&(d.keyControlNonceDeprecated=u.bytes===String?x.base64.encode(l.keyControlNonceDeprecated,0,l.keyControlNonceDeprecated.length):u.bytes===Array?Array.prototype.slice.call(l.keyControlNonceDeprecated):l.keyControlNonceDeprecated),l.protocolVersion!=null&&l.hasOwnProperty("protocolVersion")&&(d.protocolVersion=u.enums===String?T.license_protocol.ProtocolVersion[l.protocolVersion]===void 0?l.protocolVersion:T.license_protocol.ProtocolVersion[l.protocolVersion]:l.protocolVersion),l.keyControlNonce!=null&&l.hasOwnProperty("keyControlNonce")&&(d.keyControlNonce=l.keyControlNonce),l.encryptedClientId!=null&&l.hasOwnProperty("encryptedClientId")&&(d.encryptedClientId=T.license_protocol.EncryptedClientIdentification.toObject(l.encryptedClientId,u)),d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.LicenseRequest"},O.ContentIdentification=function(){function h(u){if(u)for(var d=Object.keys(u),v=0;v<d.length;v+=1)u[d[v]]!=null&&(this[d[v]]=u[d[v]])}h.prototype.widevinePsshData=null,h.prototype.webmKeyId=null,h.prototype.existingLicense=null,h.prototype.initData=null;var l;return Object.defineProperty(h.prototype,"contentIdVariant",{get:x.oneOfGetter(l=["widevinePsshData","webmKeyId","existingLicense","initData"]),set:x.oneOfSetter(l)}),h.create=function(d){return new h(d)},h.encode=function(d,v){return v||(v=N.create()),d.widevinePsshData!=null&&Object.hasOwnProperty.call(d,"widevinePsshData")&&T.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.encode(d.widevinePsshData,v.uint32(10).fork()).ldelim(),d.webmKeyId!=null&&Object.hasOwnProperty.call(d,"webmKeyId")&&T.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.encode(d.webmKeyId,v.uint32(18).fork()).ldelim(),d.existingLicense!=null&&Object.hasOwnProperty.call(d,"existingLicense")&&T.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.encode(d.existingLicense,v.uint32(26).fork()).ldelim(),d.initData!=null&&Object.hasOwnProperty.call(d,"initData")&&T.license_protocol.LicenseRequest.ContentIdentification.InitData.encode(d.initData,v.uint32(34).fork()).ldelim(),v},h.encodeDelimited=function(d,v){return this.encode(d,v).ldelim()},h.decode=function(d,v){d instanceof D||(d=D.create(d));for(var A=v===void 0?d.len:d.pos+v,z=new T.license_protocol.LicenseRequest.ContentIdentification;d.pos<A;){var I=d.uint32();switch(I>>>3){case 1:{z.widevinePsshData=T.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.decode(d,d.uint32());break}case 2:{z.webmKeyId=T.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.decode(d,d.uint32());break}case 3:{z.existingLicense=T.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.decode(d,d.uint32());break}case 4:{z.initData=T.license_protocol.LicenseRequest.ContentIdentification.InitData.decode(d,d.uint32());break}default:d.skipType(I&7);break}}return z},h.decodeDelimited=function(d){return d instanceof D||(d=new D(d)),this.decode(d,d.uint32())},h.verify=function(d){if(typeof d!="object"||d===null)return"object expected";var v={};if(d.widevinePsshData!=null&&d.hasOwnProperty("widevinePsshData")){v.contentIdVariant=1;{var A=T.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.verify(d.widevinePsshData);if(A)return"widevinePsshData."+A}}if(d.webmKeyId!=null&&d.hasOwnProperty("webmKeyId")){if(v.contentIdVariant===1)return"contentIdVariant: multiple values";v.contentIdVariant=1;{var A=T.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.verify(d.webmKeyId);if(A)return"webmKeyId."+A}}if(d.existingLicense!=null&&d.hasOwnProperty("existingLicense")){if(v.contentIdVariant===1)return"contentIdVariant: multiple values";v.contentIdVariant=1;{var A=T.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.verify(d.existingLicense);if(A)return"existingLicense."+A}}if(d.initData!=null&&d.hasOwnProperty("initData")){if(v.contentIdVariant===1)return"contentIdVariant: multiple values";v.contentIdVariant=1;{var A=T.license_protocol.LicenseRequest.ContentIdentification.InitData.verify(d.initData);if(A)return"initData."+A}}return null},h.fromObject=function(d){if(d instanceof T.license_protocol.LicenseRequest.ContentIdentification)return d;var v=new T.license_protocol.LicenseRequest.ContentIdentification;if(d.widevinePsshData!=null){if(typeof d.widevinePsshData!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.widevinePsshData: object expected");v.widevinePsshData=T.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.fromObject(d.widevinePsshData)}if(d.webmKeyId!=null){if(typeof d.webmKeyId!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.webmKeyId: object expected");v.webmKeyId=T.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.fromObject(d.webmKeyId)}if(d.existingLicense!=null){if(typeof d.existingLicense!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.existingLicense: object expected");v.existingLicense=T.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.fromObject(d.existingLicense)}if(d.initData!=null){if(typeof d.initData!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.initData: object expected");v.initData=T.license_protocol.LicenseRequest.ContentIdentification.InitData.fromObject(d.initData)}return v},h.toObject=function(d,v){v||(v={});var A={};return d.widevinePsshData!=null&&d.hasOwnProperty("widevinePsshData")&&(A.widevinePsshData=T.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.toObject(d.widevinePsshData,v),v.oneofs&&(A.contentIdVariant="widevinePsshData")),d.webmKeyId!=null&&d.hasOwnProperty("webmKeyId")&&(A.webmKeyId=T.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.toObject(d.webmKeyId,v),v.oneofs&&(A.contentIdVariant="webmKeyId")),d.existingLicense!=null&&d.hasOwnProperty("existingLicense")&&(A.existingLicense=T.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.toObject(d.existingLicense,v),v.oneofs&&(A.contentIdVariant="existingLicense")),d.initData!=null&&d.hasOwnProperty("initData")&&(A.initData=T.license_protocol.LicenseRequest.ContentIdentification.InitData.toObject(d.initData,v),v.oneofs&&(A.contentIdVariant="initData")),A},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(d){return d===void 0&&(d="type.googleapis.com"),d+"/license_protocol.LicenseRequest.ContentIdentification"},h.WidevinePsshData=function(){function u(d){if(this.psshData=[],d)for(var v=Object.keys(d),A=0;A<v.length;A+=1)d[v[A]]!=null&&(this[v[A]]=d[v[A]])}return u.prototype.psshData=x.emptyArray,u.prototype.licenseType=1,u.prototype.requestId=x.newBuffer([]),u.create=function(v){return new u(v)},u.encode=function(v,A){if(A||(A=N.create()),v.psshData!=null&&v.psshData.length)for(var z=0;z<v.psshData.length;z+=1)A.uint32(10).bytes(v.psshData[z]);return v.licenseType!=null&&Object.hasOwnProperty.call(v,"licenseType")&&A.uint32(16).int32(v.licenseType),v.requestId!=null&&Object.hasOwnProperty.call(v,"requestId")&&A.uint32(26).bytes(v.requestId),A},u.encodeDelimited=function(v,A){return this.encode(v,A).ldelim()},u.decode=function(v,A){v instanceof D||(v=D.create(v));for(var z=A===void 0?v.len:v.pos+A,I=new T.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData;v.pos<z;){var ee=v.uint32();switch(ee>>>3){case 1:{I.psshData&&I.psshData.length||(I.psshData=[]),I.psshData.push(v.bytes());break}case 2:{I.licenseType=v.int32();break}case 3:{I.requestId=v.bytes();break}default:v.skipType(ee&7);break}}return I},u.decodeDelimited=function(v){return v instanceof D||(v=new D(v)),this.decode(v,v.uint32())},u.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.psshData!=null&&v.hasOwnProperty("psshData")){if(!Array.isArray(v.psshData))return"psshData: array expected";for(var A=0;A<v.psshData.length;A+=1)if(!(v.psshData[A]&&typeof v.psshData[A].length=="number"||x.isString(v.psshData[A])))return"psshData: buffer[] expected"}if(v.licenseType!=null&&v.hasOwnProperty("licenseType"))switch(v.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return v.requestId!=null&&v.hasOwnProperty("requestId")&&!(v.requestId&&typeof v.requestId.length=="number"||x.isString(v.requestId))?"requestId: buffer expected":null},u.fromObject=function(v){if(v instanceof T.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData)return v;var A=new T.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData;if(v.psshData){if(!Array.isArray(v.psshData))throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.psshData: array expected");A.psshData=[];for(var z=0;z<v.psshData.length;z+=1)typeof v.psshData[z]=="string"?x.base64.decode(v.psshData[z],A.psshData[z]=x.newBuffer(x.base64.length(v.psshData[z])),0):v.psshData[z].length>=0&&(A.psshData[z]=v.psshData[z])}switch(v.licenseType){default:if(typeof v.licenseType=="number"){A.licenseType=v.licenseType;break}break;case"STREAMING":case 1:A.licenseType=1;break;case"OFFLINE":case 2:A.licenseType=2;break;case"AUTOMATIC":case 3:A.licenseType=3;break}return v.requestId!=null&&(typeof v.requestId=="string"?x.base64.decode(v.requestId,A.requestId=x.newBuffer(x.base64.length(v.requestId)),0):v.requestId.length>=0&&(A.requestId=v.requestId)),A},u.toObject=function(v,A){A||(A={});var z={};if((A.arrays||A.defaults)&&(z.psshData=[]),A.defaults&&(z.licenseType=A.enums===String?"STREAMING":1,A.bytes===String?z.requestId="":(z.requestId=[],A.bytes!==Array&&(z.requestId=x.newBuffer(z.requestId)))),v.psshData&&v.psshData.length){z.psshData=[];for(var I=0;I<v.psshData.length;I+=1)z.psshData[I]=A.bytes===String?x.base64.encode(v.psshData[I],0,v.psshData[I].length):A.bytes===Array?Array.prototype.slice.call(v.psshData[I]):v.psshData[I]}return v.licenseType!=null&&v.hasOwnProperty("licenseType")&&(z.licenseType=A.enums===String?T.license_protocol.LicenseType[v.licenseType]===void 0?v.licenseType:T.license_protocol.LicenseType[v.licenseType]:v.licenseType),v.requestId!=null&&v.hasOwnProperty("requestId")&&(z.requestId=A.bytes===String?x.base64.encode(v.requestId,0,v.requestId.length):A.bytes===Array?Array.prototype.slice.call(v.requestId):v.requestId),z},u.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},u.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData"},u}(),h.WebmKeyId=function(){function u(d){if(d)for(var v=Object.keys(d),A=0;A<v.length;A+=1)d[v[A]]!=null&&(this[v[A]]=d[v[A]])}return u.prototype.header=x.newBuffer([]),u.prototype.licenseType=1,u.prototype.requestId=x.newBuffer([]),u.create=function(v){return new u(v)},u.encode=function(v,A){return A||(A=N.create()),v.header!=null&&Object.hasOwnProperty.call(v,"header")&&A.uint32(10).bytes(v.header),v.licenseType!=null&&Object.hasOwnProperty.call(v,"licenseType")&&A.uint32(16).int32(v.licenseType),v.requestId!=null&&Object.hasOwnProperty.call(v,"requestId")&&A.uint32(26).bytes(v.requestId),A},u.encodeDelimited=function(v,A){return this.encode(v,A).ldelim()},u.decode=function(v,A){v instanceof D||(v=D.create(v));for(var z=A===void 0?v.len:v.pos+A,I=new T.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId;v.pos<z;){var ee=v.uint32();switch(ee>>>3){case 1:{I.header=v.bytes();break}case 2:{I.licenseType=v.int32();break}case 3:{I.requestId=v.bytes();break}default:v.skipType(ee&7);break}}return I},u.decodeDelimited=function(v){return v instanceof D||(v=new D(v)),this.decode(v,v.uint32())},u.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.header!=null&&v.hasOwnProperty("header")&&!(v.header&&typeof v.header.length=="number"||x.isString(v.header)))return"header: buffer expected";if(v.licenseType!=null&&v.hasOwnProperty("licenseType"))switch(v.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return v.requestId!=null&&v.hasOwnProperty("requestId")&&!(v.requestId&&typeof v.requestId.length=="number"||x.isString(v.requestId))?"requestId: buffer expected":null},u.fromObject=function(v){if(v instanceof T.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId)return v;var A=new T.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId;switch(v.header!=null&&(typeof v.header=="string"?x.base64.decode(v.header,A.header=x.newBuffer(x.base64.length(v.header)),0):v.header.length>=0&&(A.header=v.header)),v.licenseType){default:if(typeof v.licenseType=="number"){A.licenseType=v.licenseType;break}break;case"STREAMING":case 1:A.licenseType=1;break;case"OFFLINE":case 2:A.licenseType=2;break;case"AUTOMATIC":case 3:A.licenseType=3;break}return v.requestId!=null&&(typeof v.requestId=="string"?x.base64.decode(v.requestId,A.requestId=x.newBuffer(x.base64.length(v.requestId)),0):v.requestId.length>=0&&(A.requestId=v.requestId)),A},u.toObject=function(v,A){A||(A={});var z={};return A.defaults&&(A.bytes===String?z.header="":(z.header=[],A.bytes!==Array&&(z.header=x.newBuffer(z.header))),z.licenseType=A.enums===String?"STREAMING":1,A.bytes===String?z.requestId="":(z.requestId=[],A.bytes!==Array&&(z.requestId=x.newBuffer(z.requestId)))),v.header!=null&&v.hasOwnProperty("header")&&(z.header=A.bytes===String?x.base64.encode(v.header,0,v.header.length):A.bytes===Array?Array.prototype.slice.call(v.header):v.header),v.licenseType!=null&&v.hasOwnProperty("licenseType")&&(z.licenseType=A.enums===String?T.license_protocol.LicenseType[v.licenseType]===void 0?v.licenseType:T.license_protocol.LicenseType[v.licenseType]:v.licenseType),v.requestId!=null&&v.hasOwnProperty("requestId")&&(z.requestId=A.bytes===String?x.base64.encode(v.requestId,0,v.requestId.length):A.bytes===Array?Array.prototype.slice.call(v.requestId):v.requestId),z},u.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},u.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.WebmKeyId"},u}(),h.ExistingLicense=function(){function u(d){if(d)for(var v=Object.keys(d),A=0;A<v.length;A+=1)d[v[A]]!=null&&(this[v[A]]=d[v[A]])}return u.prototype.licenseId=null,u.prototype.secondsSinceStarted=x.Long?x.Long.fromBits(0,0,!1):0,u.prototype.secondsSinceLastPlayed=x.Long?x.Long.fromBits(0,0,!1):0,u.prototype.sessionUsageTableEntry=x.newBuffer([]),u.create=function(v){return new u(v)},u.encode=function(v,A){return A||(A=N.create()),v.licenseId!=null&&Object.hasOwnProperty.call(v,"licenseId")&&T.license_protocol.LicenseIdentification.encode(v.licenseId,A.uint32(10).fork()).ldelim(),v.secondsSinceStarted!=null&&Object.hasOwnProperty.call(v,"secondsSinceStarted")&&A.uint32(16).int64(v.secondsSinceStarted),v.secondsSinceLastPlayed!=null&&Object.hasOwnProperty.call(v,"secondsSinceLastPlayed")&&A.uint32(24).int64(v.secondsSinceLastPlayed),v.sessionUsageTableEntry!=null&&Object.hasOwnProperty.call(v,"sessionUsageTableEntry")&&A.uint32(34).bytes(v.sessionUsageTableEntry),A},u.encodeDelimited=function(v,A){return this.encode(v,A).ldelim()},u.decode=function(v,A){v instanceof D||(v=D.create(v));for(var z=A===void 0?v.len:v.pos+A,I=new T.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense;v.pos<z;){var ee=v.uint32();switch(ee>>>3){case 1:{I.licenseId=T.license_protocol.LicenseIdentification.decode(v,v.uint32());break}case 2:{I.secondsSinceStarted=v.int64();break}case 3:{I.secondsSinceLastPlayed=v.int64();break}case 4:{I.sessionUsageTableEntry=v.bytes();break}default:v.skipType(ee&7);break}}return I},u.decodeDelimited=function(v){return v instanceof D||(v=new D(v)),this.decode(v,v.uint32())},u.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.licenseId!=null&&v.hasOwnProperty("licenseId")){var A=T.license_protocol.LicenseIdentification.verify(v.licenseId);if(A)return"licenseId."+A}return v.secondsSinceStarted!=null&&v.hasOwnProperty("secondsSinceStarted")&&!x.isInteger(v.secondsSinceStarted)&&!(v.secondsSinceStarted&&x.isInteger(v.secondsSinceStarted.low)&&x.isInteger(v.secondsSinceStarted.high))?"secondsSinceStarted: integer|Long expected":v.secondsSinceLastPlayed!=null&&v.hasOwnProperty("secondsSinceLastPlayed")&&!x.isInteger(v.secondsSinceLastPlayed)&&!(v.secondsSinceLastPlayed&&x.isInteger(v.secondsSinceLastPlayed.low)&&x.isInteger(v.secondsSinceLastPlayed.high))?"secondsSinceLastPlayed: integer|Long expected":v.sessionUsageTableEntry!=null&&v.hasOwnProperty("sessionUsageTableEntry")&&!(v.sessionUsageTableEntry&&typeof v.sessionUsageTableEntry.length=="number"||x.isString(v.sessionUsageTableEntry))?"sessionUsageTableEntry: buffer expected":null},u.fromObject=function(v){if(v instanceof T.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense)return v;var A=new T.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense;if(v.licenseId!=null){if(typeof v.licenseId!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.licenseId: object expected");A.licenseId=T.license_protocol.LicenseIdentification.fromObject(v.licenseId)}return v.secondsSinceStarted!=null&&(x.Long?(A.secondsSinceStarted=x.Long.fromValue(v.secondsSinceStarted)).unsigned=!1:typeof v.secondsSinceStarted=="string"?A.secondsSinceStarted=parseInt(v.secondsSinceStarted,10):typeof v.secondsSinceStarted=="number"?A.secondsSinceStarted=v.secondsSinceStarted:typeof v.secondsSinceStarted=="object"&&(A.secondsSinceStarted=new x.LongBits(v.secondsSinceStarted.low>>>0,v.secondsSinceStarted.high>>>0).toNumber())),v.secondsSinceLastPlayed!=null&&(x.Long?(A.secondsSinceLastPlayed=x.Long.fromValue(v.secondsSinceLastPlayed)).unsigned=!1:typeof v.secondsSinceLastPlayed=="string"?A.secondsSinceLastPlayed=parseInt(v.secondsSinceLastPlayed,10):typeof v.secondsSinceLastPlayed=="number"?A.secondsSinceLastPlayed=v.secondsSinceLastPlayed:typeof v.secondsSinceLastPlayed=="object"&&(A.secondsSinceLastPlayed=new x.LongBits(v.secondsSinceLastPlayed.low>>>0,v.secondsSinceLastPlayed.high>>>0).toNumber())),v.sessionUsageTableEntry!=null&&(typeof v.sessionUsageTableEntry=="string"?x.base64.decode(v.sessionUsageTableEntry,A.sessionUsageTableEntry=x.newBuffer(x.base64.length(v.sessionUsageTableEntry)),0):v.sessionUsageTableEntry.length>=0&&(A.sessionUsageTableEntry=v.sessionUsageTableEntry)),A},u.toObject=function(v,A){A||(A={});var z={};if(A.defaults){if(z.licenseId=null,x.Long){var I=new x.Long(0,0,!1);z.secondsSinceStarted=A.longs===String?I.toString():A.longs===Number?I.toNumber():I}else z.secondsSinceStarted=A.longs===String?"0":0;if(x.Long){var I=new x.Long(0,0,!1);z.secondsSinceLastPlayed=A.longs===String?I.toString():A.longs===Number?I.toNumber():I}else z.secondsSinceLastPlayed=A.longs===String?"0":0;A.bytes===String?z.sessionUsageTableEntry="":(z.sessionUsageTableEntry=[],A.bytes!==Array&&(z.sessionUsageTableEntry=x.newBuffer(z.sessionUsageTableEntry)))}return v.licenseId!=null&&v.hasOwnProperty("licenseId")&&(z.licenseId=T.license_protocol.LicenseIdentification.toObject(v.licenseId,A)),v.secondsSinceStarted!=null&&v.hasOwnProperty("secondsSinceStarted")&&(typeof v.secondsSinceStarted=="number"?z.secondsSinceStarted=A.longs===String?String(v.secondsSinceStarted):v.secondsSinceStarted:z.secondsSinceStarted=A.longs===String?x.Long.prototype.toString.call(v.secondsSinceStarted):A.longs===Number?new x.LongBits(v.secondsSinceStarted.low>>>0,v.secondsSinceStarted.high>>>0).toNumber():v.secondsSinceStarted),v.secondsSinceLastPlayed!=null&&v.hasOwnProperty("secondsSinceLastPlayed")&&(typeof v.secondsSinceLastPlayed=="number"?z.secondsSinceLastPlayed=A.longs===String?String(v.secondsSinceLastPlayed):v.secondsSinceLastPlayed:z.secondsSinceLastPlayed=A.longs===String?x.Long.prototype.toString.call(v.secondsSinceLastPlayed):A.longs===Number?new x.LongBits(v.secondsSinceLastPlayed.low>>>0,v.secondsSinceLastPlayed.high>>>0).toNumber():v.secondsSinceLastPlayed),v.sessionUsageTableEntry!=null&&v.hasOwnProperty("sessionUsageTableEntry")&&(z.sessionUsageTableEntry=A.bytes===String?x.base64.encode(v.sessionUsageTableEntry,0,v.sessionUsageTableEntry.length):A.bytes===Array?Array.prototype.slice.call(v.sessionUsageTableEntry):v.sessionUsageTableEntry),z},u.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},u.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.ExistingLicense"},u}(),h.InitData=function(){function u(d){if(d)for(var v=Object.keys(d),A=0;A<v.length;A+=1)d[v[A]]!=null&&(this[v[A]]=d[v[A]])}return u.prototype.initDataType=1,u.prototype.initData=x.newBuffer([]),u.prototype.licenseType=1,u.prototype.requestId=x.newBuffer([]),u.create=function(v){return new u(v)},u.encode=function(v,A){return A||(A=N.create()),v.initDataType!=null&&Object.hasOwnProperty.call(v,"initDataType")&&A.uint32(8).int32(v.initDataType),v.initData!=null&&Object.hasOwnProperty.call(v,"initData")&&A.uint32(18).bytes(v.initData),v.licenseType!=null&&Object.hasOwnProperty.call(v,"licenseType")&&A.uint32(24).int32(v.licenseType),v.requestId!=null&&Object.hasOwnProperty.call(v,"requestId")&&A.uint32(34).bytes(v.requestId),A},u.encodeDelimited=function(v,A){return this.encode(v,A).ldelim()},u.decode=function(v,A){v instanceof D||(v=D.create(v));for(var z=A===void 0?v.len:v.pos+A,I=new T.license_protocol.LicenseRequest.ContentIdentification.InitData;v.pos<z;){var ee=v.uint32();switch(ee>>>3){case 1:{I.initDataType=v.int32();break}case 2:{I.initData=v.bytes();break}case 3:{I.licenseType=v.int32();break}case 4:{I.requestId=v.bytes();break}default:v.skipType(ee&7);break}}return I},u.decodeDelimited=function(v){return v instanceof D||(v=new D(v)),this.decode(v,v.uint32())},u.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.initDataType!=null&&v.hasOwnProperty("initDataType"))switch(v.initDataType){default:return"initDataType: enum value expected";case 1:case 2:break}if(v.initData!=null&&v.hasOwnProperty("initData")&&!(v.initData&&typeof v.initData.length=="number"||x.isString(v.initData)))return"initData: buffer expected";if(v.licenseType!=null&&v.hasOwnProperty("licenseType"))switch(v.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return v.requestId!=null&&v.hasOwnProperty("requestId")&&!(v.requestId&&typeof v.requestId.length=="number"||x.isString(v.requestId))?"requestId: buffer expected":null},u.fromObject=function(v){if(v instanceof T.license_protocol.LicenseRequest.ContentIdentification.InitData)return v;var A=new T.license_protocol.LicenseRequest.ContentIdentification.InitData;switch(v.initDataType){default:if(typeof v.initDataType=="number"){A.initDataType=v.initDataType;break}break;case"CENC":case 1:A.initDataType=1;break;case"WEBM":case 2:A.initDataType=2;break}switch(v.initData!=null&&(typeof v.initData=="string"?x.base64.decode(v.initData,A.initData=x.newBuffer(x.base64.length(v.initData)),0):v.initData.length>=0&&(A.initData=v.initData)),v.licenseType){default:if(typeof v.licenseType=="number"){A.licenseType=v.licenseType;break}break;case"STREAMING":case 1:A.licenseType=1;break;case"OFFLINE":case 2:A.licenseType=2;break;case"AUTOMATIC":case 3:A.licenseType=3;break}return v.requestId!=null&&(typeof v.requestId=="string"?x.base64.decode(v.requestId,A.requestId=x.newBuffer(x.base64.length(v.requestId)),0):v.requestId.length>=0&&(A.requestId=v.requestId)),A},u.toObject=function(v,A){A||(A={});var z={};return A.defaults&&(z.initDataType=A.enums===String?"CENC":1,A.bytes===String?z.initData="":(z.initData=[],A.bytes!==Array&&(z.initData=x.newBuffer(z.initData))),z.licenseType=A.enums===String?"STREAMING":1,A.bytes===String?z.requestId="":(z.requestId=[],A.bytes!==Array&&(z.requestId=x.newBuffer(z.requestId)))),v.initDataType!=null&&v.hasOwnProperty("initDataType")&&(z.initDataType=A.enums===String?T.license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType[v.initDataType]===void 0?v.initDataType:T.license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType[v.initDataType]:v.initDataType),v.initData!=null&&v.hasOwnProperty("initData")&&(z.initData=A.bytes===String?x.base64.encode(v.initData,0,v.initData.length):A.bytes===Array?Array.prototype.slice.call(v.initData):v.initData),v.licenseType!=null&&v.hasOwnProperty("licenseType")&&(z.licenseType=A.enums===String?T.license_protocol.LicenseType[v.licenseType]===void 0?v.licenseType:T.license_protocol.LicenseType[v.licenseType]:v.licenseType),v.requestId!=null&&v.hasOwnProperty("requestId")&&(z.requestId=A.bytes===String?x.base64.encode(v.requestId,0,v.requestId.length):A.bytes===Array?Array.prototype.slice.call(v.requestId):v.requestId),z},u.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},u.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.InitData"},u.InitDataType=function(){var d={},v=Object.create(d);return v[d[1]="CENC"]=1,v[d[2]="WEBM"]=2,v}(),u}(),h}(),O.RequestType=function(){var h={},l=Object.create(h);return l[h[1]="NEW"]=1,l[h[2]="RENEWAL"]=2,l[h[3]="RELEASE"]=3,l}(),O}(),j.MetricData=function(){function O(h){if(this.metricData=[],h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.stageName="",O.prototype.metricData=x.emptyArray,O.create=function(l){return new O(l)},O.encode=function(l,u){if(u||(u=N.create()),l.stageName!=null&&Object.hasOwnProperty.call(l,"stageName")&&u.uint32(10).string(l.stageName),l.metricData!=null&&l.metricData.length)for(var d=0;d<l.metricData.length;d+=1)T.license_protocol.MetricData.TypeValue.encode(l.metricData[d],u.uint32(18).fork()).ldelim();return u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.MetricData;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.stageName=l.string();break}case 2:{v.metricData&&v.metricData.length||(v.metricData=[]),v.metricData.push(T.license_protocol.MetricData.TypeValue.decode(l,l.uint32()));break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.stageName!=null&&l.hasOwnProperty("stageName")&&!x.isString(l.stageName))return"stageName: string expected";if(l.metricData!=null&&l.hasOwnProperty("metricData")){if(!Array.isArray(l.metricData))return"metricData: array expected";for(var u=0;u<l.metricData.length;u+=1){var d=T.license_protocol.MetricData.TypeValue.verify(l.metricData[u]);if(d)return"metricData."+d}}return null},O.fromObject=function(l){if(l instanceof T.license_protocol.MetricData)return l;var u=new T.license_protocol.MetricData;if(l.stageName!=null&&(u.stageName=String(l.stageName)),l.metricData){if(!Array.isArray(l.metricData))throw TypeError(".license_protocol.MetricData.metricData: array expected");u.metricData=[];for(var d=0;d<l.metricData.length;d+=1){if(typeof l.metricData[d]!="object")throw TypeError(".license_protocol.MetricData.metricData: object expected");u.metricData[d]=T.license_protocol.MetricData.TypeValue.fromObject(l.metricData[d])}}return u},O.toObject=function(l,u){u||(u={});var d={};if((u.arrays||u.defaults)&&(d.metricData=[]),u.defaults&&(d.stageName=""),l.stageName!=null&&l.hasOwnProperty("stageName")&&(d.stageName=l.stageName),l.metricData&&l.metricData.length){d.metricData=[];for(var v=0;v<l.metricData.length;v+=1)d.metricData[v]=T.license_protocol.MetricData.TypeValue.toObject(l.metricData[v],u)}return d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.MetricData"},O.MetricType=function(){var h={},l=Object.create(h);return l[h[1]="LATENCY"]=1,l[h[2]="TIMESTAMP"]=2,l}(),O.TypeValue=function(){function h(l){if(l)for(var u=Object.keys(l),d=0;d<u.length;d+=1)l[u[d]]!=null&&(this[u[d]]=l[u[d]])}return h.prototype.type=1,h.prototype.value=x.Long?x.Long.fromBits(0,0,!1):0,h.create=function(u){return new h(u)},h.encode=function(u,d){return d||(d=N.create()),u.type!=null&&Object.hasOwnProperty.call(u,"type")&&d.uint32(8).int32(u.type),u.value!=null&&Object.hasOwnProperty.call(u,"value")&&d.uint32(16).int64(u.value),d},h.encodeDelimited=function(u,d){return this.encode(u,d).ldelim()},h.decode=function(u,d){u instanceof D||(u=D.create(u));for(var v=d===void 0?u.len:u.pos+d,A=new T.license_protocol.MetricData.TypeValue;u.pos<v;){var z=u.uint32();switch(z>>>3){case 1:{A.type=u.int32();break}case 2:{A.value=u.int64();break}default:u.skipType(z&7);break}}return A},h.decodeDelimited=function(u){return u instanceof D||(u=new D(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.type!=null&&u.hasOwnProperty("type"))switch(u.type){default:return"type: enum value expected";case 1:case 2:break}return u.value!=null&&u.hasOwnProperty("value")&&!x.isInteger(u.value)&&!(u.value&&x.isInteger(u.value.low)&&x.isInteger(u.value.high))?"value: integer|Long expected":null},h.fromObject=function(u){if(u instanceof T.license_protocol.MetricData.TypeValue)return u;var d=new T.license_protocol.MetricData.TypeValue;switch(u.type){default:if(typeof u.type=="number"){d.type=u.type;break}break;case"LATENCY":case 1:d.type=1;break;case"TIMESTAMP":case 2:d.type=2;break}return u.value!=null&&(x.Long?(d.value=x.Long.fromValue(u.value)).unsigned=!1:typeof u.value=="string"?d.value=parseInt(u.value,10):typeof u.value=="number"?d.value=u.value:typeof u.value=="object"&&(d.value=new x.LongBits(u.value.low>>>0,u.value.high>>>0).toNumber())),d},h.toObject=function(u,d){d||(d={});var v={};if(d.defaults)if(v.type=d.enums===String?"LATENCY":1,x.Long){var A=new x.Long(0,0,!1);v.value=d.longs===String?A.toString():d.longs===Number?A.toNumber():A}else v.value=d.longs===String?"0":0;return u.type!=null&&u.hasOwnProperty("type")&&(v.type=d.enums===String?T.license_protocol.MetricData.MetricType[u.type]===void 0?u.type:T.license_protocol.MetricData.MetricType[u.type]:u.type),u.value!=null&&u.hasOwnProperty("value")&&(typeof u.value=="number"?v.value=d.longs===String?String(u.value):u.value:v.value=d.longs===String?x.Long.prototype.toString.call(u.value):d.longs===Number?new x.LongBits(u.value.low>>>0,u.value.high>>>0).toNumber():u.value),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.MetricData.TypeValue"},h}(),O}(),j.VersionInfo=function(){function O(h){if(h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.licenseSdkVersion="",O.prototype.licenseServiceVersion="",O.create=function(l){return new O(l)},O.encode=function(l,u){return u||(u=N.create()),l.licenseSdkVersion!=null&&Object.hasOwnProperty.call(l,"licenseSdkVersion")&&u.uint32(10).string(l.licenseSdkVersion),l.licenseServiceVersion!=null&&Object.hasOwnProperty.call(l,"licenseServiceVersion")&&u.uint32(18).string(l.licenseServiceVersion),u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.VersionInfo;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.licenseSdkVersion=l.string();break}case 2:{v.licenseServiceVersion=l.string();break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){return typeof l!="object"||l===null?"object expected":l.licenseSdkVersion!=null&&l.hasOwnProperty("licenseSdkVersion")&&!x.isString(l.licenseSdkVersion)?"licenseSdkVersion: string expected":l.licenseServiceVersion!=null&&l.hasOwnProperty("licenseServiceVersion")&&!x.isString(l.licenseServiceVersion)?"licenseServiceVersion: string expected":null},O.fromObject=function(l){if(l instanceof T.license_protocol.VersionInfo)return l;var u=new T.license_protocol.VersionInfo;return l.licenseSdkVersion!=null&&(u.licenseSdkVersion=String(l.licenseSdkVersion)),l.licenseServiceVersion!=null&&(u.licenseServiceVersion=String(l.licenseServiceVersion)),u},O.toObject=function(l,u){u||(u={});var d={};return u.defaults&&(d.licenseSdkVersion="",d.licenseServiceVersion=""),l.licenseSdkVersion!=null&&l.hasOwnProperty("licenseSdkVersion")&&(d.licenseSdkVersion=l.licenseSdkVersion),l.licenseServiceVersion!=null&&l.hasOwnProperty("licenseServiceVersion")&&(d.licenseServiceVersion=l.licenseServiceVersion),d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.VersionInfo"},O}(),j.SignedMessage=function(){function O(h){if(this.metricData=[],h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.type=1,O.prototype.msg=x.newBuffer([]),O.prototype.signature=x.newBuffer([]),O.prototype.sessionKey=x.newBuffer([]),O.prototype.remoteAttestation=x.newBuffer([]),O.prototype.metricData=x.emptyArray,O.prototype.serviceVersionInfo=null,O.prototype.sessionKeyType=1,O.prototype.oemcryptoCoreMessage=x.newBuffer([]),O.create=function(l){return new O(l)},O.encode=function(l,u){if(u||(u=N.create()),l.type!=null&&Object.hasOwnProperty.call(l,"type")&&u.uint32(8).int32(l.type),l.msg!=null&&Object.hasOwnProperty.call(l,"msg")&&u.uint32(18).bytes(l.msg),l.signature!=null&&Object.hasOwnProperty.call(l,"signature")&&u.uint32(26).bytes(l.signature),l.sessionKey!=null&&Object.hasOwnProperty.call(l,"sessionKey")&&u.uint32(34).bytes(l.sessionKey),l.remoteAttestation!=null&&Object.hasOwnProperty.call(l,"remoteAttestation")&&u.uint32(42).bytes(l.remoteAttestation),l.metricData!=null&&l.metricData.length)for(var d=0;d<l.metricData.length;d+=1)T.license_protocol.MetricData.encode(l.metricData[d],u.uint32(50).fork()).ldelim();return l.serviceVersionInfo!=null&&Object.hasOwnProperty.call(l,"serviceVersionInfo")&&T.license_protocol.VersionInfo.encode(l.serviceVersionInfo,u.uint32(58).fork()).ldelim(),l.sessionKeyType!=null&&Object.hasOwnProperty.call(l,"sessionKeyType")&&u.uint32(64).int32(l.sessionKeyType),l.oemcryptoCoreMessage!=null&&Object.hasOwnProperty.call(l,"oemcryptoCoreMessage")&&u.uint32(74).bytes(l.oemcryptoCoreMessage),u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.SignedMessage;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.type=l.int32();break}case 2:{v.msg=l.bytes();break}case 3:{v.signature=l.bytes();break}case 4:{v.sessionKey=l.bytes();break}case 5:{v.remoteAttestation=l.bytes();break}case 6:{v.metricData&&v.metricData.length||(v.metricData=[]),v.metricData.push(T.license_protocol.MetricData.decode(l,l.uint32()));break}case 7:{v.serviceVersionInfo=T.license_protocol.VersionInfo.decode(l,l.uint32());break}case 8:{v.sessionKeyType=l.int32();break}case 9:{v.oemcryptoCoreMessage=l.bytes();break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.type!=null&&l.hasOwnProperty("type"))switch(l.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:break}if(l.msg!=null&&l.hasOwnProperty("msg")&&!(l.msg&&typeof l.msg.length=="number"||x.isString(l.msg)))return"msg: buffer expected";if(l.signature!=null&&l.hasOwnProperty("signature")&&!(l.signature&&typeof l.signature.length=="number"||x.isString(l.signature)))return"signature: buffer expected";if(l.sessionKey!=null&&l.hasOwnProperty("sessionKey")&&!(l.sessionKey&&typeof l.sessionKey.length=="number"||x.isString(l.sessionKey)))return"sessionKey: buffer expected";if(l.remoteAttestation!=null&&l.hasOwnProperty("remoteAttestation")&&!(l.remoteAttestation&&typeof l.remoteAttestation.length=="number"||x.isString(l.remoteAttestation)))return"remoteAttestation: buffer expected";if(l.metricData!=null&&l.hasOwnProperty("metricData")){if(!Array.isArray(l.metricData))return"metricData: array expected";for(var u=0;u<l.metricData.length;u+=1){var d=T.license_protocol.MetricData.verify(l.metricData[u]);if(d)return"metricData."+d}}if(l.serviceVersionInfo!=null&&l.hasOwnProperty("serviceVersionInfo")){var d=T.license_protocol.VersionInfo.verify(l.serviceVersionInfo);if(d)return"serviceVersionInfo."+d}if(l.sessionKeyType!=null&&l.hasOwnProperty("sessionKeyType"))switch(l.sessionKeyType){default:return"sessionKeyType: enum value expected";case 0:case 1:case 2:break}return l.oemcryptoCoreMessage!=null&&l.hasOwnProperty("oemcryptoCoreMessage")&&!(l.oemcryptoCoreMessage&&typeof l.oemcryptoCoreMessage.length=="number"||x.isString(l.oemcryptoCoreMessage))?"oemcryptoCoreMessage: buffer expected":null},O.fromObject=function(l){if(l instanceof T.license_protocol.SignedMessage)return l;var u=new T.license_protocol.SignedMessage;switch(l.type){default:if(typeof l.type=="number"){u.type=l.type;break}break;case"LICENSE_REQUEST":case 1:u.type=1;break;case"LICENSE":case 2:u.type=2;break;case"ERROR_RESPONSE":case 3:u.type=3;break;case"SERVICE_CERTIFICATE_REQUEST":case 4:u.type=4;break;case"SERVICE_CERTIFICATE":case 5:u.type=5;break;case"SUB_LICENSE":case 6:u.type=6;break;case"CAS_LICENSE_REQUEST":case 7:u.type=7;break;case"CAS_LICENSE":case 8:u.type=8;break;case"EXTERNAL_LICENSE_REQUEST":case 9:u.type=9;break;case"EXTERNAL_LICENSE":case 10:u.type=10;break}if(l.msg!=null&&(typeof l.msg=="string"?x.base64.decode(l.msg,u.msg=x.newBuffer(x.base64.length(l.msg)),0):l.msg.length>=0&&(u.msg=l.msg)),l.signature!=null&&(typeof l.signature=="string"?x.base64.decode(l.signature,u.signature=x.newBuffer(x.base64.length(l.signature)),0):l.signature.length>=0&&(u.signature=l.signature)),l.sessionKey!=null&&(typeof l.sessionKey=="string"?x.base64.decode(l.sessionKey,u.sessionKey=x.newBuffer(x.base64.length(l.sessionKey)),0):l.sessionKey.length>=0&&(u.sessionKey=l.sessionKey)),l.remoteAttestation!=null&&(typeof l.remoteAttestation=="string"?x.base64.decode(l.remoteAttestation,u.remoteAttestation=x.newBuffer(x.base64.length(l.remoteAttestation)),0):l.remoteAttestation.length>=0&&(u.remoteAttestation=l.remoteAttestation)),l.metricData){if(!Array.isArray(l.metricData))throw TypeError(".license_protocol.SignedMessage.metricData: array expected");u.metricData=[];for(var d=0;d<l.metricData.length;d+=1){if(typeof l.metricData[d]!="object")throw TypeError(".license_protocol.SignedMessage.metricData: object expected");u.metricData[d]=T.license_protocol.MetricData.fromObject(l.metricData[d])}}if(l.serviceVersionInfo!=null){if(typeof l.serviceVersionInfo!="object")throw TypeError(".license_protocol.SignedMessage.serviceVersionInfo: object expected");u.serviceVersionInfo=T.license_protocol.VersionInfo.fromObject(l.serviceVersionInfo)}switch(l.sessionKeyType){case"UNDEFINED":case 0:u.sessionKeyType=0;break;default:if(typeof l.sessionKeyType=="number"){u.sessionKeyType=l.sessionKeyType;break}break;case"WRAPPED_AES_KEY":case 1:u.sessionKeyType=1;break;case"EPHERMERAL_ECC_PUBLIC_KEY":case 2:u.sessionKeyType=2;break}return l.oemcryptoCoreMessage!=null&&(typeof l.oemcryptoCoreMessage=="string"?x.base64.decode(l.oemcryptoCoreMessage,u.oemcryptoCoreMessage=x.newBuffer(x.base64.length(l.oemcryptoCoreMessage)),0):l.oemcryptoCoreMessage.length>=0&&(u.oemcryptoCoreMessage=l.oemcryptoCoreMessage)),u},O.toObject=function(l,u){u||(u={});var d={};if((u.arrays||u.defaults)&&(d.metricData=[]),u.defaults&&(d.type=u.enums===String?"LICENSE_REQUEST":1,u.bytes===String?d.msg="":(d.msg=[],u.bytes!==Array&&(d.msg=x.newBuffer(d.msg))),u.bytes===String?d.signature="":(d.signature=[],u.bytes!==Array&&(d.signature=x.newBuffer(d.signature))),u.bytes===String?d.sessionKey="":(d.sessionKey=[],u.bytes!==Array&&(d.sessionKey=x.newBuffer(d.sessionKey))),u.bytes===String?d.remoteAttestation="":(d.remoteAttestation=[],u.bytes!==Array&&(d.remoteAttestation=x.newBuffer(d.remoteAttestation))),d.serviceVersionInfo=null,d.sessionKeyType=u.enums===String?"WRAPPED_AES_KEY":1,u.bytes===String?d.oemcryptoCoreMessage="":(d.oemcryptoCoreMessage=[],u.bytes!==Array&&(d.oemcryptoCoreMessage=x.newBuffer(d.oemcryptoCoreMessage)))),l.type!=null&&l.hasOwnProperty("type")&&(d.type=u.enums===String?T.license_protocol.SignedMessage.MessageType[l.type]===void 0?l.type:T.license_protocol.SignedMessage.MessageType[l.type]:l.type),l.msg!=null&&l.hasOwnProperty("msg")&&(d.msg=u.bytes===String?x.base64.encode(l.msg,0,l.msg.length):u.bytes===Array?Array.prototype.slice.call(l.msg):l.msg),l.signature!=null&&l.hasOwnProperty("signature")&&(d.signature=u.bytes===String?x.base64.encode(l.signature,0,l.signature.length):u.bytes===Array?Array.prototype.slice.call(l.signature):l.signature),l.sessionKey!=null&&l.hasOwnProperty("sessionKey")&&(d.sessionKey=u.bytes===String?x.base64.encode(l.sessionKey,0,l.sessionKey.length):u.bytes===Array?Array.prototype.slice.call(l.sessionKey):l.sessionKey),l.remoteAttestation!=null&&l.hasOwnProperty("remoteAttestation")&&(d.remoteAttestation=u.bytes===String?x.base64.encode(l.remoteAttestation,0,l.remoteAttestation.length):u.bytes===Array?Array.prototype.slice.call(l.remoteAttestation):l.remoteAttestation),l.metricData&&l.metricData.length){d.metricData=[];for(var v=0;v<l.metricData.length;v+=1)d.metricData[v]=T.license_protocol.MetricData.toObject(l.metricData[v],u)}return l.serviceVersionInfo!=null&&l.hasOwnProperty("serviceVersionInfo")&&(d.serviceVersionInfo=T.license_protocol.VersionInfo.toObject(l.serviceVersionInfo,u)),l.sessionKeyType!=null&&l.hasOwnProperty("sessionKeyType")&&(d.sessionKeyType=u.enums===String?T.license_protocol.SignedMessage.SessionKeyType[l.sessionKeyType]===void 0?l.sessionKeyType:T.license_protocol.SignedMessage.SessionKeyType[l.sessionKeyType]:l.sessionKeyType),l.oemcryptoCoreMessage!=null&&l.hasOwnProperty("oemcryptoCoreMessage")&&(d.oemcryptoCoreMessage=u.bytes===String?x.base64.encode(l.oemcryptoCoreMessage,0,l.oemcryptoCoreMessage.length):u.bytes===Array?Array.prototype.slice.call(l.oemcryptoCoreMessage):l.oemcryptoCoreMessage),d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.SignedMessage"},O.MessageType=function(){var h={},l=Object.create(h);return l[h[1]="LICENSE_REQUEST"]=1,l[h[2]="LICENSE"]=2,l[h[3]="ERROR_RESPONSE"]=3,l[h[4]="SERVICE_CERTIFICATE_REQUEST"]=4,l[h[5]="SERVICE_CERTIFICATE"]=5,l[h[6]="SUB_LICENSE"]=6,l[h[7]="CAS_LICENSE_REQUEST"]=7,l[h[8]="CAS_LICENSE"]=8,l[h[9]="EXTERNAL_LICENSE_REQUEST"]=9,l[h[10]="EXTERNAL_LICENSE"]=10,l}(),O.SessionKeyType=function(){var h={},l=Object.create(h);return l[h[0]="UNDEFINED"]=0,l[h[1]="WRAPPED_AES_KEY"]=1,l[h[2]="EPHERMERAL_ECC_PUBLIC_KEY"]=2,l}(),O}(),j.HashAlgorithmProto=function(){var O={},h=Object.create(O);return h[O[0]="HASH_ALGORITHM_UNSPECIFIED"]=0,h[O[1]="HASH_ALGORITHM_SHA_1"]=1,h[O[2]="HASH_ALGORITHM_SHA_256"]=2,h[O[3]="HASH_ALGORITHM_SHA_384"]=3,h}(),j.ClientIdentification=function(){function O(h){if(this.clientInfo=[],this.deviceCredentials=[],h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.type=0,O.prototype.token=x.newBuffer([]),O.prototype.clientInfo=x.emptyArray,O.prototype.providerClientToken=x.newBuffer([]),O.prototype.licenseCounter=0,O.prototype.clientCapabilities=null,O.prototype.vmpData=x.newBuffer([]),O.prototype.deviceCredentials=x.emptyArray,O.create=function(l){return new O(l)},O.encode=function(l,u){if(u||(u=N.create()),l.type!=null&&Object.hasOwnProperty.call(l,"type")&&u.uint32(8).int32(l.type),l.token!=null&&Object.hasOwnProperty.call(l,"token")&&u.uint32(18).bytes(l.token),l.clientInfo!=null&&l.clientInfo.length)for(var d=0;d<l.clientInfo.length;d+=1)T.license_protocol.ClientIdentification.NameValue.encode(l.clientInfo[d],u.uint32(26).fork()).ldelim();if(l.providerClientToken!=null&&Object.hasOwnProperty.call(l,"providerClientToken")&&u.uint32(34).bytes(l.providerClientToken),l.licenseCounter!=null&&Object.hasOwnProperty.call(l,"licenseCounter")&&u.uint32(40).uint32(l.licenseCounter),l.clientCapabilities!=null&&Object.hasOwnProperty.call(l,"clientCapabilities")&&T.license_protocol.ClientIdentification.ClientCapabilities.encode(l.clientCapabilities,u.uint32(50).fork()).ldelim(),l.vmpData!=null&&Object.hasOwnProperty.call(l,"vmpData")&&u.uint32(58).bytes(l.vmpData),l.deviceCredentials!=null&&l.deviceCredentials.length)for(var d=0;d<l.deviceCredentials.length;d+=1)T.license_protocol.ClientIdentification.ClientCredentials.encode(l.deviceCredentials[d],u.uint32(66).fork()).ldelim();return u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.ClientIdentification;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.type=l.int32();break}case 2:{v.token=l.bytes();break}case 3:{v.clientInfo&&v.clientInfo.length||(v.clientInfo=[]),v.clientInfo.push(T.license_protocol.ClientIdentification.NameValue.decode(l,l.uint32()));break}case 4:{v.providerClientToken=l.bytes();break}case 5:{v.licenseCounter=l.uint32();break}case 6:{v.clientCapabilities=T.license_protocol.ClientIdentification.ClientCapabilities.decode(l,l.uint32());break}case 7:{v.vmpData=l.bytes();break}case 8:{v.deviceCredentials&&v.deviceCredentials.length||(v.deviceCredentials=[]),v.deviceCredentials.push(T.license_protocol.ClientIdentification.ClientCredentials.decode(l,l.uint32()));break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.type!=null&&l.hasOwnProperty("type"))switch(l.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}if(l.token!=null&&l.hasOwnProperty("token")&&!(l.token&&typeof l.token.length=="number"||x.isString(l.token)))return"token: buffer expected";if(l.clientInfo!=null&&l.hasOwnProperty("clientInfo")){if(!Array.isArray(l.clientInfo))return"clientInfo: array expected";for(var u=0;u<l.clientInfo.length;u+=1){var d=T.license_protocol.ClientIdentification.NameValue.verify(l.clientInfo[u]);if(d)return"clientInfo."+d}}if(l.providerClientToken!=null&&l.hasOwnProperty("providerClientToken")&&!(l.providerClientToken&&typeof l.providerClientToken.length=="number"||x.isString(l.providerClientToken)))return"providerClientToken: buffer expected";if(l.licenseCounter!=null&&l.hasOwnProperty("licenseCounter")&&!x.isInteger(l.licenseCounter))return"licenseCounter: integer expected";if(l.clientCapabilities!=null&&l.hasOwnProperty("clientCapabilities")){var d=T.license_protocol.ClientIdentification.ClientCapabilities.verify(l.clientCapabilities);if(d)return"clientCapabilities."+d}if(l.vmpData!=null&&l.hasOwnProperty("vmpData")&&!(l.vmpData&&typeof l.vmpData.length=="number"||x.isString(l.vmpData)))return"vmpData: buffer expected";if(l.deviceCredentials!=null&&l.hasOwnProperty("deviceCredentials")){if(!Array.isArray(l.deviceCredentials))return"deviceCredentials: array expected";for(var u=0;u<l.deviceCredentials.length;u+=1){var d=T.license_protocol.ClientIdentification.ClientCredentials.verify(l.deviceCredentials[u]);if(d)return"deviceCredentials."+d}}return null},O.fromObject=function(l){if(l instanceof T.license_protocol.ClientIdentification)return l;var u=new T.license_protocol.ClientIdentification;switch(l.type){default:if(typeof l.type=="number"){u.type=l.type;break}break;case"KEYBOX":case 0:u.type=0;break;case"DRM_DEVICE_CERTIFICATE":case 1:u.type=1;break;case"REMOTE_ATTESTATION_CERTIFICATE":case 2:u.type=2;break;case"OEM_DEVICE_CERTIFICATE":case 3:u.type=3;break}if(l.token!=null&&(typeof l.token=="string"?x.base64.decode(l.token,u.token=x.newBuffer(x.base64.length(l.token)),0):l.token.length>=0&&(u.token=l.token)),l.clientInfo){if(!Array.isArray(l.clientInfo))throw TypeError(".license_protocol.ClientIdentification.clientInfo: array expected");u.clientInfo=[];for(var d=0;d<l.clientInfo.length;d+=1){if(typeof l.clientInfo[d]!="object")throw TypeError(".license_protocol.ClientIdentification.clientInfo: object expected");u.clientInfo[d]=T.license_protocol.ClientIdentification.NameValue.fromObject(l.clientInfo[d])}}if(l.providerClientToken!=null&&(typeof l.providerClientToken=="string"?x.base64.decode(l.providerClientToken,u.providerClientToken=x.newBuffer(x.base64.length(l.providerClientToken)),0):l.providerClientToken.length>=0&&(u.providerClientToken=l.providerClientToken)),l.licenseCounter!=null&&(u.licenseCounter=l.licenseCounter>>>0),l.clientCapabilities!=null){if(typeof l.clientCapabilities!="object")throw TypeError(".license_protocol.ClientIdentification.clientCapabilities: object expected");u.clientCapabilities=T.license_protocol.ClientIdentification.ClientCapabilities.fromObject(l.clientCapabilities)}if(l.vmpData!=null&&(typeof l.vmpData=="string"?x.base64.decode(l.vmpData,u.vmpData=x.newBuffer(x.base64.length(l.vmpData)),0):l.vmpData.length>=0&&(u.vmpData=l.vmpData)),l.deviceCredentials){if(!Array.isArray(l.deviceCredentials))throw TypeError(".license_protocol.ClientIdentification.deviceCredentials: array expected");u.deviceCredentials=[];for(var d=0;d<l.deviceCredentials.length;d+=1){if(typeof l.deviceCredentials[d]!="object")throw TypeError(".license_protocol.ClientIdentification.deviceCredentials: object expected");u.deviceCredentials[d]=T.license_protocol.ClientIdentification.ClientCredentials.fromObject(l.deviceCredentials[d])}}return u},O.toObject=function(l,u){u||(u={});var d={};if((u.arrays||u.defaults)&&(d.clientInfo=[],d.deviceCredentials=[]),u.defaults&&(d.type=u.enums===String?"KEYBOX":0,u.bytes===String?d.token="":(d.token=[],u.bytes!==Array&&(d.token=x.newBuffer(d.token))),u.bytes===String?d.providerClientToken="":(d.providerClientToken=[],u.bytes!==Array&&(d.providerClientToken=x.newBuffer(d.providerClientToken))),d.licenseCounter=0,d.clientCapabilities=null,u.bytes===String?d.vmpData="":(d.vmpData=[],u.bytes!==Array&&(d.vmpData=x.newBuffer(d.vmpData)))),l.type!=null&&l.hasOwnProperty("type")&&(d.type=u.enums===String?T.license_protocol.ClientIdentification.TokenType[l.type]===void 0?l.type:T.license_protocol.ClientIdentification.TokenType[l.type]:l.type),l.token!=null&&l.hasOwnProperty("token")&&(d.token=u.bytes===String?x.base64.encode(l.token,0,l.token.length):u.bytes===Array?Array.prototype.slice.call(l.token):l.token),l.clientInfo&&l.clientInfo.length){d.clientInfo=[];for(var v=0;v<l.clientInfo.length;v+=1)d.clientInfo[v]=T.license_protocol.ClientIdentification.NameValue.toObject(l.clientInfo[v],u)}if(l.providerClientToken!=null&&l.hasOwnProperty("providerClientToken")&&(d.providerClientToken=u.bytes===String?x.base64.encode(l.providerClientToken,0,l.providerClientToken.length):u.bytes===Array?Array.prototype.slice.call(l.providerClientToken):l.providerClientToken),l.licenseCounter!=null&&l.hasOwnProperty("licenseCounter")&&(d.licenseCounter=l.licenseCounter),l.clientCapabilities!=null&&l.hasOwnProperty("clientCapabilities")&&(d.clientCapabilities=T.license_protocol.ClientIdentification.ClientCapabilities.toObject(l.clientCapabilities,u)),l.vmpData!=null&&l.hasOwnProperty("vmpData")&&(d.vmpData=u.bytes===String?x.base64.encode(l.vmpData,0,l.vmpData.length):u.bytes===Array?Array.prototype.slice.call(l.vmpData):l.vmpData),l.deviceCredentials&&l.deviceCredentials.length){d.deviceCredentials=[];for(var v=0;v<l.deviceCredentials.length;v+=1)d.deviceCredentials[v]=T.license_protocol.ClientIdentification.ClientCredentials.toObject(l.deviceCredentials[v],u)}return d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.ClientIdentification"},O.TokenType=function(){var h={},l=Object.create(h);return l[h[0]="KEYBOX"]=0,l[h[1]="DRM_DEVICE_CERTIFICATE"]=1,l[h[2]="REMOTE_ATTESTATION_CERTIFICATE"]=2,l[h[3]="OEM_DEVICE_CERTIFICATE"]=3,l}(),O.NameValue=function(){function h(l){if(l)for(var u=Object.keys(l),d=0;d<u.length;d+=1)l[u[d]]!=null&&(this[u[d]]=l[u[d]])}return h.prototype.name="",h.prototype.value="",h.create=function(u){return new h(u)},h.encode=function(u,d){return d||(d=N.create()),u.name!=null&&Object.hasOwnProperty.call(u,"name")&&d.uint32(10).string(u.name),u.value!=null&&Object.hasOwnProperty.call(u,"value")&&d.uint32(18).string(u.value),d},h.encodeDelimited=function(u,d){return this.encode(u,d).ldelim()},h.decode=function(u,d){u instanceof D||(u=D.create(u));for(var v=d===void 0?u.len:u.pos+d,A=new T.license_protocol.ClientIdentification.NameValue;u.pos<v;){var z=u.uint32();switch(z>>>3){case 1:{A.name=u.string();break}case 2:{A.value=u.string();break}default:u.skipType(z&7);break}}return A},h.decodeDelimited=function(u){return u instanceof D||(u=new D(u)),this.decode(u,u.uint32())},h.verify=function(u){return typeof u!="object"||u===null?"object expected":u.name!=null&&u.hasOwnProperty("name")&&!x.isString(u.name)?"name: string expected":u.value!=null&&u.hasOwnProperty("value")&&!x.isString(u.value)?"value: string expected":null},h.fromObject=function(u){if(u instanceof T.license_protocol.ClientIdentification.NameValue)return u;var d=new T.license_protocol.ClientIdentification.NameValue;return u.name!=null&&(d.name=String(u.name)),u.value!=null&&(d.value=String(u.value)),d},h.toObject=function(u,d){d||(d={});var v={};return d.defaults&&(v.name="",v.value=""),u.name!=null&&u.hasOwnProperty("name")&&(v.name=u.name),u.value!=null&&u.hasOwnProperty("value")&&(v.value=u.value),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.ClientIdentification.NameValue"},h}(),O.ClientCapabilities=function(){function h(l){if(this.supportedCertificateKeyType=[],l)for(var u=Object.keys(l),d=0;d<u.length;d+=1)l[u[d]]!=null&&(this[u[d]]=l[u[d]])}return h.prototype.clientToken=!1,h.prototype.sessionToken=!1,h.prototype.videoResolutionConstraints=!1,h.prototype.maxHdcpVersion=0,h.prototype.oemCryptoApiVersion=0,h.prototype.antiRollbackUsageTable=!1,h.prototype.srmVersion=0,h.prototype.canUpdateSrm=!1,h.prototype.supportedCertificateKeyType=x.emptyArray,h.prototype.analogOutputCapabilities=0,h.prototype.canDisableAnalogOutput=!1,h.prototype.resourceRatingTier=0,h.create=function(u){return new h(u)},h.encode=function(u,d){if(d||(d=N.create()),u.clientToken!=null&&Object.hasOwnProperty.call(u,"clientToken")&&d.uint32(8).bool(u.clientToken),u.sessionToken!=null&&Object.hasOwnProperty.call(u,"sessionToken")&&d.uint32(16).bool(u.sessionToken),u.videoResolutionConstraints!=null&&Object.hasOwnProperty.call(u,"videoResolutionConstraints")&&d.uint32(24).bool(u.videoResolutionConstraints),u.maxHdcpVersion!=null&&Object.hasOwnProperty.call(u,"maxHdcpVersion")&&d.uint32(32).int32(u.maxHdcpVersion),u.oemCryptoApiVersion!=null&&Object.hasOwnProperty.call(u,"oemCryptoApiVersion")&&d.uint32(40).uint32(u.oemCryptoApiVersion),u.antiRollbackUsageTable!=null&&Object.hasOwnProperty.call(u,"antiRollbackUsageTable")&&d.uint32(48).bool(u.antiRollbackUsageTable),u.srmVersion!=null&&Object.hasOwnProperty.call(u,"srmVersion")&&d.uint32(56).uint32(u.srmVersion),u.canUpdateSrm!=null&&Object.hasOwnProperty.call(u,"canUpdateSrm")&&d.uint32(64).bool(u.canUpdateSrm),u.supportedCertificateKeyType!=null&&u.supportedCertificateKeyType.length)for(var v=0;v<u.supportedCertificateKeyType.length;v+=1)d.uint32(72).int32(u.supportedCertificateKeyType[v]);return u.analogOutputCapabilities!=null&&Object.hasOwnProperty.call(u,"analogOutputCapabilities")&&d.uint32(80).int32(u.analogOutputCapabilities),u.canDisableAnalogOutput!=null&&Object.hasOwnProperty.call(u,"canDisableAnalogOutput")&&d.uint32(88).bool(u.canDisableAnalogOutput),u.resourceRatingTier!=null&&Object.hasOwnProperty.call(u,"resourceRatingTier")&&d.uint32(96).uint32(u.resourceRatingTier),d},h.encodeDelimited=function(u,d){return this.encode(u,d).ldelim()},h.decode=function(u,d){u instanceof D||(u=D.create(u));for(var v=d===void 0?u.len:u.pos+d,A=new T.license_protocol.ClientIdentification.ClientCapabilities;u.pos<v;){var z=u.uint32();switch(z>>>3){case 1:{A.clientToken=u.bool();break}case 2:{A.sessionToken=u.bool();break}case 3:{A.videoResolutionConstraints=u.bool();break}case 4:{A.maxHdcpVersion=u.int32();break}case 5:{A.oemCryptoApiVersion=u.uint32();break}case 6:{A.antiRollbackUsageTable=u.bool();break}case 7:{A.srmVersion=u.uint32();break}case 8:{A.canUpdateSrm=u.bool();break}case 9:{if(A.supportedCertificateKeyType&&A.supportedCertificateKeyType.length||(A.supportedCertificateKeyType=[]),(z&7)===2)for(var I=u.uint32()+u.pos;u.pos<I;)A.supportedCertificateKeyType.push(u.int32());else A.supportedCertificateKeyType.push(u.int32());break}case 10:{A.analogOutputCapabilities=u.int32();break}case 11:{A.canDisableAnalogOutput=u.bool();break}case 12:{A.resourceRatingTier=u.uint32();break}default:u.skipType(z&7);break}}return A},h.decodeDelimited=function(u){return u instanceof D||(u=new D(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.clientToken!=null&&u.hasOwnProperty("clientToken")&&typeof u.clientToken!="boolean")return"clientToken: boolean expected";if(u.sessionToken!=null&&u.hasOwnProperty("sessionToken")&&typeof u.sessionToken!="boolean")return"sessionToken: boolean expected";if(u.videoResolutionConstraints!=null&&u.hasOwnProperty("videoResolutionConstraints")&&typeof u.videoResolutionConstraints!="boolean")return"videoResolutionConstraints: boolean expected";if(u.maxHdcpVersion!=null&&u.hasOwnProperty("maxHdcpVersion"))switch(u.maxHdcpVersion){default:return"maxHdcpVersion: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 255:break}if(u.oemCryptoApiVersion!=null&&u.hasOwnProperty("oemCryptoApiVersion")&&!x.isInteger(u.oemCryptoApiVersion))return"oemCryptoApiVersion: integer expected";if(u.antiRollbackUsageTable!=null&&u.hasOwnProperty("antiRollbackUsageTable")&&typeof u.antiRollbackUsageTable!="boolean")return"antiRollbackUsageTable: boolean expected";if(u.srmVersion!=null&&u.hasOwnProperty("srmVersion")&&!x.isInteger(u.srmVersion))return"srmVersion: integer expected";if(u.canUpdateSrm!=null&&u.hasOwnProperty("canUpdateSrm")&&typeof u.canUpdateSrm!="boolean")return"canUpdateSrm: boolean expected";if(u.supportedCertificateKeyType!=null&&u.hasOwnProperty("supportedCertificateKeyType")){if(!Array.isArray(u.supportedCertificateKeyType))return"supportedCertificateKeyType: array expected";for(var d=0;d<u.supportedCertificateKeyType.length;d+=1)switch(u.supportedCertificateKeyType[d]){default:return"supportedCertificateKeyType: enum value[] expected";case 0:case 1:case 2:case 3:case 4:break}}if(u.analogOutputCapabilities!=null&&u.hasOwnProperty("analogOutputCapabilities"))switch(u.analogOutputCapabilities){default:return"analogOutputCapabilities: enum value expected";case 0:case 1:case 2:case 3:break}return u.canDisableAnalogOutput!=null&&u.hasOwnProperty("canDisableAnalogOutput")&&typeof u.canDisableAnalogOutput!="boolean"?"canDisableAnalogOutput: boolean expected":u.resourceRatingTier!=null&&u.hasOwnProperty("resourceRatingTier")&&!x.isInteger(u.resourceRatingTier)?"resourceRatingTier: integer expected":null},h.fromObject=function(u){if(u instanceof T.license_protocol.ClientIdentification.ClientCapabilities)return u;var d=new T.license_protocol.ClientIdentification.ClientCapabilities;switch(u.clientToken!=null&&(d.clientToken=!!u.clientToken),u.sessionToken!=null&&(d.sessionToken=!!u.sessionToken),u.videoResolutionConstraints!=null&&(d.videoResolutionConstraints=!!u.videoResolutionConstraints),u.maxHdcpVersion){default:if(typeof u.maxHdcpVersion=="number"){d.maxHdcpVersion=u.maxHdcpVersion;break}break;case"HDCP_NONE":case 0:d.maxHdcpVersion=0;break;case"HDCP_V1":case 1:d.maxHdcpVersion=1;break;case"HDCP_V2":case 2:d.maxHdcpVersion=2;break;case"HDCP_V2_1":case 3:d.maxHdcpVersion=3;break;case"HDCP_V2_2":case 4:d.maxHdcpVersion=4;break;case"HDCP_V2_3":case 5:d.maxHdcpVersion=5;break;case"HDCP_NO_DIGITAL_OUTPUT":case 255:d.maxHdcpVersion=255;break}if(u.oemCryptoApiVersion!=null&&(d.oemCryptoApiVersion=u.oemCryptoApiVersion>>>0),u.antiRollbackUsageTable!=null&&(d.antiRollbackUsageTable=!!u.antiRollbackUsageTable),u.srmVersion!=null&&(d.srmVersion=u.srmVersion>>>0),u.canUpdateSrm!=null&&(d.canUpdateSrm=!!u.canUpdateSrm),u.supportedCertificateKeyType){if(!Array.isArray(u.supportedCertificateKeyType))throw TypeError(".license_protocol.ClientIdentification.ClientCapabilities.supportedCertificateKeyType: array expected");d.supportedCertificateKeyType=[];for(var v=0;v<u.supportedCertificateKeyType.length;v+=1)switch(u.supportedCertificateKeyType[v]){default:if(typeof u.supportedCertificateKeyType[v]=="number"){d.supportedCertificateKeyType[v]=u.supportedCertificateKeyType[v];break}case"RSA_2048":case 0:d.supportedCertificateKeyType[v]=0;break;case"RSA_3072":case 1:d.supportedCertificateKeyType[v]=1;break;case"ECC_SECP256R1":case 2:d.supportedCertificateKeyType[v]=2;break;case"ECC_SECP384R1":case 3:d.supportedCertificateKeyType[v]=3;break;case"ECC_SECP521R1":case 4:d.supportedCertificateKeyType[v]=4;break}}switch(u.analogOutputCapabilities){default:if(typeof u.analogOutputCapabilities=="number"){d.analogOutputCapabilities=u.analogOutputCapabilities;break}break;case"ANALOG_OUTPUT_UNKNOWN":case 0:d.analogOutputCapabilities=0;break;case"ANALOG_OUTPUT_NONE":case 1:d.analogOutputCapabilities=1;break;case"ANALOG_OUTPUT_SUPPORTED":case 2:d.analogOutputCapabilities=2;break;case"ANALOG_OUTPUT_SUPPORTS_CGMS_A":case 3:d.analogOutputCapabilities=3;break}return u.canDisableAnalogOutput!=null&&(d.canDisableAnalogOutput=!!u.canDisableAnalogOutput),u.resourceRatingTier!=null&&(d.resourceRatingTier=u.resourceRatingTier>>>0),d},h.toObject=function(u,d){d||(d={});var v={};if((d.arrays||d.defaults)&&(v.supportedCertificateKeyType=[]),d.defaults&&(v.clientToken=!1,v.sessionToken=!1,v.videoResolutionConstraints=!1,v.maxHdcpVersion=d.enums===String?"HDCP_NONE":0,v.oemCryptoApiVersion=0,v.antiRollbackUsageTable=!1,v.srmVersion=0,v.canUpdateSrm=!1,v.analogOutputCapabilities=d.enums===String?"ANALOG_OUTPUT_UNKNOWN":0,v.canDisableAnalogOutput=!1,v.resourceRatingTier=0),u.clientToken!=null&&u.hasOwnProperty("clientToken")&&(v.clientToken=u.clientToken),u.sessionToken!=null&&u.hasOwnProperty("sessionToken")&&(v.sessionToken=u.sessionToken),u.videoResolutionConstraints!=null&&u.hasOwnProperty("videoResolutionConstraints")&&(v.videoResolutionConstraints=u.videoResolutionConstraints),u.maxHdcpVersion!=null&&u.hasOwnProperty("maxHdcpVersion")&&(v.maxHdcpVersion=d.enums===String?T.license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion[u.maxHdcpVersion]===void 0?u.maxHdcpVersion:T.license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion[u.maxHdcpVersion]:u.maxHdcpVersion),u.oemCryptoApiVersion!=null&&u.hasOwnProperty("oemCryptoApiVersion")&&(v.oemCryptoApiVersion=u.oemCryptoApiVersion),u.antiRollbackUsageTable!=null&&u.hasOwnProperty("antiRollbackUsageTable")&&(v.antiRollbackUsageTable=u.antiRollbackUsageTable),u.srmVersion!=null&&u.hasOwnProperty("srmVersion")&&(v.srmVersion=u.srmVersion),u.canUpdateSrm!=null&&u.hasOwnProperty("canUpdateSrm")&&(v.canUpdateSrm=u.canUpdateSrm),u.supportedCertificateKeyType&&u.supportedCertificateKeyType.length){v.supportedCertificateKeyType=[];for(var A=0;A<u.supportedCertificateKeyType.length;A+=1)v.supportedCertificateKeyType[A]=d.enums===String?T.license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType[u.supportedCertificateKeyType[A]]===void 0?u.supportedCertificateKeyType[A]:T.license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType[u.supportedCertificateKeyType[A]]:u.supportedCertificateKeyType[A]}return u.analogOutputCapabilities!=null&&u.hasOwnProperty("analogOutputCapabilities")&&(v.analogOutputCapabilities=d.enums===String?T.license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities[u.analogOutputCapabilities]===void 0?u.analogOutputCapabilities:T.license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities[u.analogOutputCapabilities]:u.analogOutputCapabilities),u.canDisableAnalogOutput!=null&&u.hasOwnProperty("canDisableAnalogOutput")&&(v.canDisableAnalogOutput=u.canDisableAnalogOutput),u.resourceRatingTier!=null&&u.hasOwnProperty("resourceRatingTier")&&(v.resourceRatingTier=u.resourceRatingTier),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.ClientIdentification.ClientCapabilities"},h.HdcpVersion=function(){var l={},u=Object.create(l);return u[l[0]="HDCP_NONE"]=0,u[l[1]="HDCP_V1"]=1,u[l[2]="HDCP_V2"]=2,u[l[3]="HDCP_V2_1"]=3,u[l[4]="HDCP_V2_2"]=4,u[l[5]="HDCP_V2_3"]=5,u[l[255]="HDCP_NO_DIGITAL_OUTPUT"]=255,u}(),h.CertificateKeyType=function(){var l={},u=Object.create(l);return u[l[0]="RSA_2048"]=0,u[l[1]="RSA_3072"]=1,u[l[2]="ECC_SECP256R1"]=2,u[l[3]="ECC_SECP384R1"]=3,u[l[4]="ECC_SECP521R1"]=4,u}(),h.AnalogOutputCapabilities=function(){var l={},u=Object.create(l);return u[l[0]="ANALOG_OUTPUT_UNKNOWN"]=0,u[l[1]="ANALOG_OUTPUT_NONE"]=1,u[l[2]="ANALOG_OUTPUT_SUPPORTED"]=2,u[l[3]="ANALOG_OUTPUT_SUPPORTS_CGMS_A"]=3,u}(),h}(),O.ClientCredentials=function(){function h(l){if(l)for(var u=Object.keys(l),d=0;d<u.length;d+=1)l[u[d]]!=null&&(this[u[d]]=l[u[d]])}return h.prototype.type=0,h.prototype.token=x.newBuffer([]),h.create=function(u){return new h(u)},h.encode=function(u,d){return d||(d=N.create()),u.type!=null&&Object.hasOwnProperty.call(u,"type")&&d.uint32(8).int32(u.type),u.token!=null&&Object.hasOwnProperty.call(u,"token")&&d.uint32(18).bytes(u.token),d},h.encodeDelimited=function(u,d){return this.encode(u,d).ldelim()},h.decode=function(u,d){u instanceof D||(u=D.create(u));for(var v=d===void 0?u.len:u.pos+d,A=new T.license_protocol.ClientIdentification.ClientCredentials;u.pos<v;){var z=u.uint32();switch(z>>>3){case 1:{A.type=u.int32();break}case 2:{A.token=u.bytes();break}default:u.skipType(z&7);break}}return A},h.decodeDelimited=function(u){return u instanceof D||(u=new D(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.type!=null&&u.hasOwnProperty("type"))switch(u.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return u.token!=null&&u.hasOwnProperty("token")&&!(u.token&&typeof u.token.length=="number"||x.isString(u.token))?"token: buffer expected":null},h.fromObject=function(u){if(u instanceof T.license_protocol.ClientIdentification.ClientCredentials)return u;var d=new T.license_protocol.ClientIdentification.ClientCredentials;switch(u.type){default:if(typeof u.type=="number"){d.type=u.type;break}break;case"KEYBOX":case 0:d.type=0;break;case"DRM_DEVICE_CERTIFICATE":case 1:d.type=1;break;case"REMOTE_ATTESTATION_CERTIFICATE":case 2:d.type=2;break;case"OEM_DEVICE_CERTIFICATE":case 3:d.type=3;break}return u.token!=null&&(typeof u.token=="string"?x.base64.decode(u.token,d.token=x.newBuffer(x.base64.length(u.token)),0):u.token.length>=0&&(d.token=u.token)),d},h.toObject=function(u,d){d||(d={});var v={};return d.defaults&&(v.type=d.enums===String?"KEYBOX":0,d.bytes===String?v.token="":(v.token=[],d.bytes!==Array&&(v.token=x.newBuffer(v.token)))),u.type!=null&&u.hasOwnProperty("type")&&(v.type=d.enums===String?T.license_protocol.ClientIdentification.TokenType[u.type]===void 0?u.type:T.license_protocol.ClientIdentification.TokenType[u.type]:u.type),u.token!=null&&u.hasOwnProperty("token")&&(v.token=d.bytes===String?x.base64.encode(u.token,0,u.token.length):d.bytes===Array?Array.prototype.slice.call(u.token):u.token),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.ClientIdentification.ClientCredentials"},h}(),O}(),j.EncryptedClientIdentification=function(){function O(h){if(h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.providerId="",O.prototype.serviceCertificateSerialNumber=x.newBuffer([]),O.prototype.encryptedClientId=x.newBuffer([]),O.prototype.encryptedClientIdIv=x.newBuffer([]),O.prototype.encryptedPrivacyKey=x.newBuffer([]),O.create=function(l){return new O(l)},O.encode=function(l,u){return u||(u=N.create()),l.providerId!=null&&Object.hasOwnProperty.call(l,"providerId")&&u.uint32(10).string(l.providerId),l.serviceCertificateSerialNumber!=null&&Object.hasOwnProperty.call(l,"serviceCertificateSerialNumber")&&u.uint32(18).bytes(l.serviceCertificateSerialNumber),l.encryptedClientId!=null&&Object.hasOwnProperty.call(l,"encryptedClientId")&&u.uint32(26).bytes(l.encryptedClientId),l.encryptedClientIdIv!=null&&Object.hasOwnProperty.call(l,"encryptedClientIdIv")&&u.uint32(34).bytes(l.encryptedClientIdIv),l.encryptedPrivacyKey!=null&&Object.hasOwnProperty.call(l,"encryptedPrivacyKey")&&u.uint32(42).bytes(l.encryptedPrivacyKey),u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.EncryptedClientIdentification;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.providerId=l.string();break}case 2:{v.serviceCertificateSerialNumber=l.bytes();break}case 3:{v.encryptedClientId=l.bytes();break}case 4:{v.encryptedClientIdIv=l.bytes();break}case 5:{v.encryptedPrivacyKey=l.bytes();break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){return typeof l!="object"||l===null?"object expected":l.providerId!=null&&l.hasOwnProperty("providerId")&&!x.isString(l.providerId)?"providerId: string expected":l.serviceCertificateSerialNumber!=null&&l.hasOwnProperty("serviceCertificateSerialNumber")&&!(l.serviceCertificateSerialNumber&&typeof l.serviceCertificateSerialNumber.length=="number"||x.isString(l.serviceCertificateSerialNumber))?"serviceCertificateSerialNumber: buffer expected":l.encryptedClientId!=null&&l.hasOwnProperty("encryptedClientId")&&!(l.encryptedClientId&&typeof l.encryptedClientId.length=="number"||x.isString(l.encryptedClientId))?"encryptedClientId: buffer expected":l.encryptedClientIdIv!=null&&l.hasOwnProperty("encryptedClientIdIv")&&!(l.encryptedClientIdIv&&typeof l.encryptedClientIdIv.length=="number"||x.isString(l.encryptedClientIdIv))?"encryptedClientIdIv: buffer expected":l.encryptedPrivacyKey!=null&&l.hasOwnProperty("encryptedPrivacyKey")&&!(l.encryptedPrivacyKey&&typeof l.encryptedPrivacyKey.length=="number"||x.isString(l.encryptedPrivacyKey))?"encryptedPrivacyKey: buffer expected":null},O.fromObject=function(l){if(l instanceof T.license_protocol.EncryptedClientIdentification)return l;var u=new T.license_protocol.EncryptedClientIdentification;return l.providerId!=null&&(u.providerId=String(l.providerId)),l.serviceCertificateSerialNumber!=null&&(typeof l.serviceCertificateSerialNumber=="string"?x.base64.decode(l.serviceCertificateSerialNumber,u.serviceCertificateSerialNumber=x.newBuffer(x.base64.length(l.serviceCertificateSerialNumber)),0):l.serviceCertificateSerialNumber.length>=0&&(u.serviceCertificateSerialNumber=l.serviceCertificateSerialNumber)),l.encryptedClientId!=null&&(typeof l.encryptedClientId=="string"?x.base64.decode(l.encryptedClientId,u.encryptedClientId=x.newBuffer(x.base64.length(l.encryptedClientId)),0):l.encryptedClientId.length>=0&&(u.encryptedClientId=l.encryptedClientId)),l.encryptedClientIdIv!=null&&(typeof l.encryptedClientIdIv=="string"?x.base64.decode(l.encryptedClientIdIv,u.encryptedClientIdIv=x.newBuffer(x.base64.length(l.encryptedClientIdIv)),0):l.encryptedClientIdIv.length>=0&&(u.encryptedClientIdIv=l.encryptedClientIdIv)),l.encryptedPrivacyKey!=null&&(typeof l.encryptedPrivacyKey=="string"?x.base64.decode(l.encryptedPrivacyKey,u.encryptedPrivacyKey=x.newBuffer(x.base64.length(l.encryptedPrivacyKey)),0):l.encryptedPrivacyKey.length>=0&&(u.encryptedPrivacyKey=l.encryptedPrivacyKey)),u},O.toObject=function(l,u){u||(u={});var d={};return u.defaults&&(d.providerId="",u.bytes===String?d.serviceCertificateSerialNumber="":(d.serviceCertificateSerialNumber=[],u.bytes!==Array&&(d.serviceCertificateSerialNumber=x.newBuffer(d.serviceCertificateSerialNumber))),u.bytes===String?d.encryptedClientId="":(d.encryptedClientId=[],u.bytes!==Array&&(d.encryptedClientId=x.newBuffer(d.encryptedClientId))),u.bytes===String?d.encryptedClientIdIv="":(d.encryptedClientIdIv=[],u.bytes!==Array&&(d.encryptedClientIdIv=x.newBuffer(d.encryptedClientIdIv))),u.bytes===String?d.encryptedPrivacyKey="":(d.encryptedPrivacyKey=[],u.bytes!==Array&&(d.encryptedPrivacyKey=x.newBuffer(d.encryptedPrivacyKey)))),l.providerId!=null&&l.hasOwnProperty("providerId")&&(d.providerId=l.providerId),l.serviceCertificateSerialNumber!=null&&l.hasOwnProperty("serviceCertificateSerialNumber")&&(d.serviceCertificateSerialNumber=u.bytes===String?x.base64.encode(l.serviceCertificateSerialNumber,0,l.serviceCertificateSerialNumber.length):u.bytes===Array?Array.prototype.slice.call(l.serviceCertificateSerialNumber):l.serviceCertificateSerialNumber),l.encryptedClientId!=null&&l.hasOwnProperty("encryptedClientId")&&(d.encryptedClientId=u.bytes===String?x.base64.encode(l.encryptedClientId,0,l.encryptedClientId.length):u.bytes===Array?Array.prototype.slice.call(l.encryptedClientId):l.encryptedClientId),l.encryptedClientIdIv!=null&&l.hasOwnProperty("encryptedClientIdIv")&&(d.encryptedClientIdIv=u.bytes===String?x.base64.encode(l.encryptedClientIdIv,0,l.encryptedClientIdIv.length):u.bytes===Array?Array.prototype.slice.call(l.encryptedClientIdIv):l.encryptedClientIdIv),l.encryptedPrivacyKey!=null&&l.hasOwnProperty("encryptedPrivacyKey")&&(d.encryptedPrivacyKey=u.bytes===String?x.base64.encode(l.encryptedPrivacyKey,0,l.encryptedPrivacyKey.length):u.bytes===Array?Array.prototype.slice.call(l.encryptedPrivacyKey):l.encryptedPrivacyKey),d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.EncryptedClientIdentification"},O}(),j.DrmCertificate=function(){function O(h){if(this.serviceTypes=[],h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.type=0,O.prototype.serialNumber=x.newBuffer([]),O.prototype.creationTimeSeconds=0,O.prototype.expirationTimeSeconds=0,O.prototype.publicKey=x.newBuffer([]),O.prototype.systemId=0,O.prototype.testDeviceDeprecated=!1,O.prototype.providerId="",O.prototype.serviceTypes=x.emptyArray,O.prototype.algorithm=1,O.prototype.rotId=x.newBuffer([]),O.prototype.encryptionKey=null,O.create=function(l){return new O(l)},O.encode=function(l,u){if(u||(u=N.create()),l.type!=null&&Object.hasOwnProperty.call(l,"type")&&u.uint32(8).int32(l.type),l.serialNumber!=null&&Object.hasOwnProperty.call(l,"serialNumber")&&u.uint32(18).bytes(l.serialNumber),l.creationTimeSeconds!=null&&Object.hasOwnProperty.call(l,"creationTimeSeconds")&&u.uint32(24).uint32(l.creationTimeSeconds),l.publicKey!=null&&Object.hasOwnProperty.call(l,"publicKey")&&u.uint32(34).bytes(l.publicKey),l.systemId!=null&&Object.hasOwnProperty.call(l,"systemId")&&u.uint32(40).uint32(l.systemId),l.testDeviceDeprecated!=null&&Object.hasOwnProperty.call(l,"testDeviceDeprecated")&&u.uint32(48).bool(l.testDeviceDeprecated),l.providerId!=null&&Object.hasOwnProperty.call(l,"providerId")&&u.uint32(58).string(l.providerId),l.serviceTypes!=null&&l.serviceTypes.length)for(var d=0;d<l.serviceTypes.length;d+=1)u.uint32(64).int32(l.serviceTypes[d]);return l.algorithm!=null&&Object.hasOwnProperty.call(l,"algorithm")&&u.uint32(72).int32(l.algorithm),l.rotId!=null&&Object.hasOwnProperty.call(l,"rotId")&&u.uint32(82).bytes(l.rotId),l.encryptionKey!=null&&Object.hasOwnProperty.call(l,"encryptionKey")&&T.license_protocol.DrmCertificate.EncryptionKey.encode(l.encryptionKey,u.uint32(90).fork()).ldelim(),l.expirationTimeSeconds!=null&&Object.hasOwnProperty.call(l,"expirationTimeSeconds")&&u.uint32(96).uint32(l.expirationTimeSeconds),u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.DrmCertificate;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.type=l.int32();break}case 2:{v.serialNumber=l.bytes();break}case 3:{v.creationTimeSeconds=l.uint32();break}case 12:{v.expirationTimeSeconds=l.uint32();break}case 4:{v.publicKey=l.bytes();break}case 5:{v.systemId=l.uint32();break}case 6:{v.testDeviceDeprecated=l.bool();break}case 7:{v.providerId=l.string();break}case 8:{if(v.serviceTypes&&v.serviceTypes.length||(v.serviceTypes=[]),(A&7)===2)for(var z=l.uint32()+l.pos;l.pos<z;)v.serviceTypes.push(l.int32());else v.serviceTypes.push(l.int32());break}case 9:{v.algorithm=l.int32();break}case 10:{v.rotId=l.bytes();break}case 11:{v.encryptionKey=T.license_protocol.DrmCertificate.EncryptionKey.decode(l,l.uint32());break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.type!=null&&l.hasOwnProperty("type"))switch(l.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(l.serialNumber!=null&&l.hasOwnProperty("serialNumber")&&!(l.serialNumber&&typeof l.serialNumber.length=="number"||x.isString(l.serialNumber)))return"serialNumber: buffer expected";if(l.creationTimeSeconds!=null&&l.hasOwnProperty("creationTimeSeconds")&&!x.isInteger(l.creationTimeSeconds))return"creationTimeSeconds: integer expected";if(l.expirationTimeSeconds!=null&&l.hasOwnProperty("expirationTimeSeconds")&&!x.isInteger(l.expirationTimeSeconds))return"expirationTimeSeconds: integer expected";if(l.publicKey!=null&&l.hasOwnProperty("publicKey")&&!(l.publicKey&&typeof l.publicKey.length=="number"||x.isString(l.publicKey)))return"publicKey: buffer expected";if(l.systemId!=null&&l.hasOwnProperty("systemId")&&!x.isInteger(l.systemId))return"systemId: integer expected";if(l.testDeviceDeprecated!=null&&l.hasOwnProperty("testDeviceDeprecated")&&typeof l.testDeviceDeprecated!="boolean")return"testDeviceDeprecated: boolean expected";if(l.providerId!=null&&l.hasOwnProperty("providerId")&&!x.isString(l.providerId))return"providerId: string expected";if(l.serviceTypes!=null&&l.hasOwnProperty("serviceTypes")){if(!Array.isArray(l.serviceTypes))return"serviceTypes: array expected";for(var u=0;u<l.serviceTypes.length;u+=1)switch(l.serviceTypes[u]){default:return"serviceTypes: enum value[] expected";case 0:case 1:case 2:case 3:case 4:break}}if(l.algorithm!=null&&l.hasOwnProperty("algorithm"))switch(l.algorithm){default:return"algorithm: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(l.rotId!=null&&l.hasOwnProperty("rotId")&&!(l.rotId&&typeof l.rotId.length=="number"||x.isString(l.rotId)))return"rotId: buffer expected";if(l.encryptionKey!=null&&l.hasOwnProperty("encryptionKey")){var d=T.license_protocol.DrmCertificate.EncryptionKey.verify(l.encryptionKey);if(d)return"encryptionKey."+d}return null},O.fromObject=function(l){if(l instanceof T.license_protocol.DrmCertificate)return l;var u=new T.license_protocol.DrmCertificate;switch(l.type){default:if(typeof l.type=="number"){u.type=l.type;break}break;case"ROOT":case 0:u.type=0;break;case"DEVICE_MODEL":case 1:u.type=1;break;case"DEVICE":case 2:u.type=2;break;case"SERVICE":case 3:u.type=3;break;case"PROVISIONER":case 4:u.type=4;break}if(l.serialNumber!=null&&(typeof l.serialNumber=="string"?x.base64.decode(l.serialNumber,u.serialNumber=x.newBuffer(x.base64.length(l.serialNumber)),0):l.serialNumber.length>=0&&(u.serialNumber=l.serialNumber)),l.creationTimeSeconds!=null&&(u.creationTimeSeconds=l.creationTimeSeconds>>>0),l.expirationTimeSeconds!=null&&(u.expirationTimeSeconds=l.expirationTimeSeconds>>>0),l.publicKey!=null&&(typeof l.publicKey=="string"?x.base64.decode(l.publicKey,u.publicKey=x.newBuffer(x.base64.length(l.publicKey)),0):l.publicKey.length>=0&&(u.publicKey=l.publicKey)),l.systemId!=null&&(u.systemId=l.systemId>>>0),l.testDeviceDeprecated!=null&&(u.testDeviceDeprecated=!!l.testDeviceDeprecated),l.providerId!=null&&(u.providerId=String(l.providerId)),l.serviceTypes){if(!Array.isArray(l.serviceTypes))throw TypeError(".license_protocol.DrmCertificate.serviceTypes: array expected");u.serviceTypes=[];for(var d=0;d<l.serviceTypes.length;d+=1)switch(l.serviceTypes[d]){default:if(typeof l.serviceTypes[d]=="number"){u.serviceTypes[d]=l.serviceTypes[d];break}case"UNKNOWN_SERVICE_TYPE":case 0:u.serviceTypes[d]=0;break;case"LICENSE_SERVER_SDK":case 1:u.serviceTypes[d]=1;break;case"LICENSE_SERVER_PROXY_SDK":case 2:u.serviceTypes[d]=2;break;case"PROVISIONING_SDK":case 3:u.serviceTypes[d]=3;break;case"CAS_PROXY_SDK":case 4:u.serviceTypes[d]=4;break}}switch(l.algorithm){case"UNKNOWN_ALGORITHM":case 0:u.algorithm=0;break;default:if(typeof l.algorithm=="number"){u.algorithm=l.algorithm;break}break;case"RSA":case 1:u.algorithm=1;break;case"ECC_SECP256R1":case 2:u.algorithm=2;break;case"ECC_SECP384R1":case 3:u.algorithm=3;break;case"ECC_SECP521R1":case 4:u.algorithm=4;break}if(l.rotId!=null&&(typeof l.rotId=="string"?x.base64.decode(l.rotId,u.rotId=x.newBuffer(x.base64.length(l.rotId)),0):l.rotId.length>=0&&(u.rotId=l.rotId)),l.encryptionKey!=null){if(typeof l.encryptionKey!="object")throw TypeError(".license_protocol.DrmCertificate.encryptionKey: object expected");u.encryptionKey=T.license_protocol.DrmCertificate.EncryptionKey.fromObject(l.encryptionKey)}return u},O.toObject=function(l,u){u||(u={});var d={};if((u.arrays||u.defaults)&&(d.serviceTypes=[]),u.defaults&&(d.type=u.enums===String?"ROOT":0,u.bytes===String?d.serialNumber="":(d.serialNumber=[],u.bytes!==Array&&(d.serialNumber=x.newBuffer(d.serialNumber))),d.creationTimeSeconds=0,u.bytes===String?d.publicKey="":(d.publicKey=[],u.bytes!==Array&&(d.publicKey=x.newBuffer(d.publicKey))),d.systemId=0,d.testDeviceDeprecated=!1,d.providerId="",d.algorithm=u.enums===String?"RSA":1,u.bytes===String?d.rotId="":(d.rotId=[],u.bytes!==Array&&(d.rotId=x.newBuffer(d.rotId))),d.encryptionKey=null,d.expirationTimeSeconds=0),l.type!=null&&l.hasOwnProperty("type")&&(d.type=u.enums===String?T.license_protocol.DrmCertificate.Type[l.type]===void 0?l.type:T.license_protocol.DrmCertificate.Type[l.type]:l.type),l.serialNumber!=null&&l.hasOwnProperty("serialNumber")&&(d.serialNumber=u.bytes===String?x.base64.encode(l.serialNumber,0,l.serialNumber.length):u.bytes===Array?Array.prototype.slice.call(l.serialNumber):l.serialNumber),l.creationTimeSeconds!=null&&l.hasOwnProperty("creationTimeSeconds")&&(d.creationTimeSeconds=l.creationTimeSeconds),l.publicKey!=null&&l.hasOwnProperty("publicKey")&&(d.publicKey=u.bytes===String?x.base64.encode(l.publicKey,0,l.publicKey.length):u.bytes===Array?Array.prototype.slice.call(l.publicKey):l.publicKey),l.systemId!=null&&l.hasOwnProperty("systemId")&&(d.systemId=l.systemId),l.testDeviceDeprecated!=null&&l.hasOwnProperty("testDeviceDeprecated")&&(d.testDeviceDeprecated=l.testDeviceDeprecated),l.providerId!=null&&l.hasOwnProperty("providerId")&&(d.providerId=l.providerId),l.serviceTypes&&l.serviceTypes.length){d.serviceTypes=[];for(var v=0;v<l.serviceTypes.length;v+=1)d.serviceTypes[v]=u.enums===String?T.license_protocol.DrmCertificate.ServiceType[l.serviceTypes[v]]===void 0?l.serviceTypes[v]:T.license_protocol.DrmCertificate.ServiceType[l.serviceTypes[v]]:l.serviceTypes[v]}return l.algorithm!=null&&l.hasOwnProperty("algorithm")&&(d.algorithm=u.enums===String?T.license_protocol.DrmCertificate.Algorithm[l.algorithm]===void 0?l.algorithm:T.license_protocol.DrmCertificate.Algorithm[l.algorithm]:l.algorithm),l.rotId!=null&&l.hasOwnProperty("rotId")&&(d.rotId=u.bytes===String?x.base64.encode(l.rotId,0,l.rotId.length):u.bytes===Array?Array.prototype.slice.call(l.rotId):l.rotId),l.encryptionKey!=null&&l.hasOwnProperty("encryptionKey")&&(d.encryptionKey=T.license_protocol.DrmCertificate.EncryptionKey.toObject(l.encryptionKey,u)),l.expirationTimeSeconds!=null&&l.hasOwnProperty("expirationTimeSeconds")&&(d.expirationTimeSeconds=l.expirationTimeSeconds),d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.DrmCertificate"},O.Type=function(){var h={},l=Object.create(h);return l[h[0]="ROOT"]=0,l[h[1]="DEVICE_MODEL"]=1,l[h[2]="DEVICE"]=2,l[h[3]="SERVICE"]=3,l[h[4]="PROVISIONER"]=4,l}(),O.ServiceType=function(){var h={},l=Object.create(h);return l[h[0]="UNKNOWN_SERVICE_TYPE"]=0,l[h[1]="LICENSE_SERVER_SDK"]=1,l[h[2]="LICENSE_SERVER_PROXY_SDK"]=2,l[h[3]="PROVISIONING_SDK"]=3,l[h[4]="CAS_PROXY_SDK"]=4,l}(),O.Algorithm=function(){var h={},l=Object.create(h);return l[h[0]="UNKNOWN_ALGORITHM"]=0,l[h[1]="RSA"]=1,l[h[2]="ECC_SECP256R1"]=2,l[h[3]="ECC_SECP384R1"]=3,l[h[4]="ECC_SECP521R1"]=4,l}(),O.EncryptionKey=function(){function h(l){if(l)for(var u=Object.keys(l),d=0;d<u.length;d+=1)l[u[d]]!=null&&(this[u[d]]=l[u[d]])}return h.prototype.publicKey=x.newBuffer([]),h.prototype.algorithm=1,h.create=function(u){return new h(u)},h.encode=function(u,d){return d||(d=N.create()),u.publicKey!=null&&Object.hasOwnProperty.call(u,"publicKey")&&d.uint32(10).bytes(u.publicKey),u.algorithm!=null&&Object.hasOwnProperty.call(u,"algorithm")&&d.uint32(16).int32(u.algorithm),d},h.encodeDelimited=function(u,d){return this.encode(u,d).ldelim()},h.decode=function(u,d){u instanceof D||(u=D.create(u));for(var v=d===void 0?u.len:u.pos+d,A=new T.license_protocol.DrmCertificate.EncryptionKey;u.pos<v;){var z=u.uint32();switch(z>>>3){case 1:{A.publicKey=u.bytes();break}case 2:{A.algorithm=u.int32();break}default:u.skipType(z&7);break}}return A},h.decodeDelimited=function(u){return u instanceof D||(u=new D(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.publicKey!=null&&u.hasOwnProperty("publicKey")&&!(u.publicKey&&typeof u.publicKey.length=="number"||x.isString(u.publicKey)))return"publicKey: buffer expected";if(u.algorithm!=null&&u.hasOwnProperty("algorithm"))switch(u.algorithm){default:return"algorithm: enum value expected";case 0:case 1:case 2:case 3:case 4:break}return null},h.fromObject=function(u){if(u instanceof T.license_protocol.DrmCertificate.EncryptionKey)return u;var d=new T.license_protocol.DrmCertificate.EncryptionKey;switch(u.publicKey!=null&&(typeof u.publicKey=="string"?x.base64.decode(u.publicKey,d.publicKey=x.newBuffer(x.base64.length(u.publicKey)),0):u.publicKey.length>=0&&(d.publicKey=u.publicKey)),u.algorithm){case"UNKNOWN_ALGORITHM":case 0:d.algorithm=0;break;default:if(typeof u.algorithm=="number"){d.algorithm=u.algorithm;break}break;case"RSA":case 1:d.algorithm=1;break;case"ECC_SECP256R1":case 2:d.algorithm=2;break;case"ECC_SECP384R1":case 3:d.algorithm=3;break;case"ECC_SECP521R1":case 4:d.algorithm=4;break}return d},h.toObject=function(u,d){d||(d={});var v={};return d.defaults&&(d.bytes===String?v.publicKey="":(v.publicKey=[],d.bytes!==Array&&(v.publicKey=x.newBuffer(v.publicKey))),v.algorithm=d.enums===String?"RSA":1),u.publicKey!=null&&u.hasOwnProperty("publicKey")&&(v.publicKey=d.bytes===String?x.base64.encode(u.publicKey,0,u.publicKey.length):d.bytes===Array?Array.prototype.slice.call(u.publicKey):u.publicKey),u.algorithm!=null&&u.hasOwnProperty("algorithm")&&(v.algorithm=d.enums===String?T.license_protocol.DrmCertificate.Algorithm[u.algorithm]===void 0?u.algorithm:T.license_protocol.DrmCertificate.Algorithm[u.algorithm]:u.algorithm),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.DrmCertificate.EncryptionKey"},h}(),O}(),j.SignedDrmCertificate=function(){function O(h){if(h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.drmCertificate=x.newBuffer([]),O.prototype.signature=x.newBuffer([]),O.prototype.signer=null,O.prototype.hashAlgorithm=0,O.create=function(l){return new O(l)},O.encode=function(l,u){return u||(u=N.create()),l.drmCertificate!=null&&Object.hasOwnProperty.call(l,"drmCertificate")&&u.uint32(10).bytes(l.drmCertificate),l.signature!=null&&Object.hasOwnProperty.call(l,"signature")&&u.uint32(18).bytes(l.signature),l.signer!=null&&Object.hasOwnProperty.call(l,"signer")&&T.license_protocol.SignedDrmCertificate.encode(l.signer,u.uint32(26).fork()).ldelim(),l.hashAlgorithm!=null&&Object.hasOwnProperty.call(l,"hashAlgorithm")&&u.uint32(32).int32(l.hashAlgorithm),u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.SignedDrmCertificate;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.drmCertificate=l.bytes();break}case 2:{v.signature=l.bytes();break}case 3:{v.signer=T.license_protocol.SignedDrmCertificate.decode(l,l.uint32());break}case 4:{v.hashAlgorithm=l.int32();break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.drmCertificate!=null&&l.hasOwnProperty("drmCertificate")&&!(l.drmCertificate&&typeof l.drmCertificate.length=="number"||x.isString(l.drmCertificate)))return"drmCertificate: buffer expected";if(l.signature!=null&&l.hasOwnProperty("signature")&&!(l.signature&&typeof l.signature.length=="number"||x.isString(l.signature)))return"signature: buffer expected";if(l.signer!=null&&l.hasOwnProperty("signer")){var u=T.license_protocol.SignedDrmCertificate.verify(l.signer);if(u)return"signer."+u}if(l.hashAlgorithm!=null&&l.hasOwnProperty("hashAlgorithm"))switch(l.hashAlgorithm){default:return"hashAlgorithm: enum value expected";case 0:case 1:case 2:case 3:break}return null},O.fromObject=function(l){if(l instanceof T.license_protocol.SignedDrmCertificate)return l;var u=new T.license_protocol.SignedDrmCertificate;if(l.drmCertificate!=null&&(typeof l.drmCertificate=="string"?x.base64.decode(l.drmCertificate,u.drmCertificate=x.newBuffer(x.base64.length(l.drmCertificate)),0):l.drmCertificate.length>=0&&(u.drmCertificate=l.drmCertificate)),l.signature!=null&&(typeof l.signature=="string"?x.base64.decode(l.signature,u.signature=x.newBuffer(x.base64.length(l.signature)),0):l.signature.length>=0&&(u.signature=l.signature)),l.signer!=null){if(typeof l.signer!="object")throw TypeError(".license_protocol.SignedDrmCertificate.signer: object expected");u.signer=T.license_protocol.SignedDrmCertificate.fromObject(l.signer)}switch(l.hashAlgorithm){default:if(typeof l.hashAlgorithm=="number"){u.hashAlgorithm=l.hashAlgorithm;break}break;case"HASH_ALGORITHM_UNSPECIFIED":case 0:u.hashAlgorithm=0;break;case"HASH_ALGORITHM_SHA_1":case 1:u.hashAlgorithm=1;break;case"HASH_ALGORITHM_SHA_256":case 2:u.hashAlgorithm=2;break;case"HASH_ALGORITHM_SHA_384":case 3:u.hashAlgorithm=3;break}return u},O.toObject=function(l,u){u||(u={});var d={};return u.defaults&&(u.bytes===String?d.drmCertificate="":(d.drmCertificate=[],u.bytes!==Array&&(d.drmCertificate=x.newBuffer(d.drmCertificate))),u.bytes===String?d.signature="":(d.signature=[],u.bytes!==Array&&(d.signature=x.newBuffer(d.signature))),d.signer=null,d.hashAlgorithm=u.enums===String?"HASH_ALGORITHM_UNSPECIFIED":0),l.drmCertificate!=null&&l.hasOwnProperty("drmCertificate")&&(d.drmCertificate=u.bytes===String?x.base64.encode(l.drmCertificate,0,l.drmCertificate.length):u.bytes===Array?Array.prototype.slice.call(l.drmCertificate):l.drmCertificate),l.signature!=null&&l.hasOwnProperty("signature")&&(d.signature=u.bytes===String?x.base64.encode(l.signature,0,l.signature.length):u.bytes===Array?Array.prototype.slice.call(l.signature):l.signature),l.signer!=null&&l.hasOwnProperty("signer")&&(d.signer=T.license_protocol.SignedDrmCertificate.toObject(l.signer,u)),l.hashAlgorithm!=null&&l.hasOwnProperty("hashAlgorithm")&&(d.hashAlgorithm=u.enums===String?T.license_protocol.HashAlgorithmProto[l.hashAlgorithm]===void 0?l.hashAlgorithm:T.license_protocol.HashAlgorithmProto[l.hashAlgorithm]:l.hashAlgorithm),d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.SignedDrmCertificate"},O}(),j.WidevinePsshData=function(){function O(h){if(this.keyIds=[],this.groupIds=[],this.entitledKeys=[],h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.keyIds=x.emptyArray,O.prototype.contentId=x.newBuffer([]),O.prototype.cryptoPeriodIndex=0,O.prototype.protectionScheme=0,O.prototype.cryptoPeriodSeconds=0,O.prototype.type=0,O.prototype.keySequence=0,O.prototype.groupIds=x.emptyArray,O.prototype.entitledKeys=x.emptyArray,O.prototype.videoFeature="",O.prototype.algorithm=0,O.prototype.provider="",O.prototype.trackType="",O.prototype.policy="",O.prototype.groupedLicense=x.newBuffer([]),O.create=function(l){return new O(l)},O.encode=function(l,u){if(u||(u=N.create()),l.algorithm!=null&&Object.hasOwnProperty.call(l,"algorithm")&&u.uint32(8).int32(l.algorithm),l.keyIds!=null&&l.keyIds.length)for(var d=0;d<l.keyIds.length;d+=1)u.uint32(18).bytes(l.keyIds[d]);if(l.provider!=null&&Object.hasOwnProperty.call(l,"provider")&&u.uint32(26).string(l.provider),l.contentId!=null&&Object.hasOwnProperty.call(l,"contentId")&&u.uint32(34).bytes(l.contentId),l.trackType!=null&&Object.hasOwnProperty.call(l,"trackType")&&u.uint32(42).string(l.trackType),l.policy!=null&&Object.hasOwnProperty.call(l,"policy")&&u.uint32(50).string(l.policy),l.cryptoPeriodIndex!=null&&Object.hasOwnProperty.call(l,"cryptoPeriodIndex")&&u.uint32(56).uint32(l.cryptoPeriodIndex),l.groupedLicense!=null&&Object.hasOwnProperty.call(l,"groupedLicense")&&u.uint32(66).bytes(l.groupedLicense),l.protectionScheme!=null&&Object.hasOwnProperty.call(l,"protectionScheme")&&u.uint32(72).uint32(l.protectionScheme),l.cryptoPeriodSeconds!=null&&Object.hasOwnProperty.call(l,"cryptoPeriodSeconds")&&u.uint32(80).uint32(l.cryptoPeriodSeconds),l.type!=null&&Object.hasOwnProperty.call(l,"type")&&u.uint32(88).int32(l.type),l.keySequence!=null&&Object.hasOwnProperty.call(l,"keySequence")&&u.uint32(96).uint32(l.keySequence),l.groupIds!=null&&l.groupIds.length)for(var d=0;d<l.groupIds.length;d+=1)u.uint32(106).bytes(l.groupIds[d]);if(l.entitledKeys!=null&&l.entitledKeys.length)for(var d=0;d<l.entitledKeys.length;d+=1)T.license_protocol.WidevinePsshData.EntitledKey.encode(l.entitledKeys[d],u.uint32(114).fork()).ldelim();return l.videoFeature!=null&&Object.hasOwnProperty.call(l,"videoFeature")&&u.uint32(122).string(l.videoFeature),u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.WidevinePsshData;l.pos<d;){var A=l.uint32();switch(A>>>3){case 2:{v.keyIds&&v.keyIds.length||(v.keyIds=[]),v.keyIds.push(l.bytes());break}case 4:{v.contentId=l.bytes();break}case 7:{v.cryptoPeriodIndex=l.uint32();break}case 9:{v.protectionScheme=l.uint32();break}case 10:{v.cryptoPeriodSeconds=l.uint32();break}case 11:{v.type=l.int32();break}case 12:{v.keySequence=l.uint32();break}case 13:{v.groupIds&&v.groupIds.length||(v.groupIds=[]),v.groupIds.push(l.bytes());break}case 14:{v.entitledKeys&&v.entitledKeys.length||(v.entitledKeys=[]),v.entitledKeys.push(T.license_protocol.WidevinePsshData.EntitledKey.decode(l,l.uint32()));break}case 15:{v.videoFeature=l.string();break}case 1:{v.algorithm=l.int32();break}case 3:{v.provider=l.string();break}case 5:{v.trackType=l.string();break}case 6:{v.policy=l.string();break}case 8:{v.groupedLicense=l.bytes();break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.keyIds!=null&&l.hasOwnProperty("keyIds")){if(!Array.isArray(l.keyIds))return"keyIds: array expected";for(var u=0;u<l.keyIds.length;u+=1)if(!(l.keyIds[u]&&typeof l.keyIds[u].length=="number"||x.isString(l.keyIds[u])))return"keyIds: buffer[] expected"}if(l.contentId!=null&&l.hasOwnProperty("contentId")&&!(l.contentId&&typeof l.contentId.length=="number"||x.isString(l.contentId)))return"contentId: buffer expected";if(l.cryptoPeriodIndex!=null&&l.hasOwnProperty("cryptoPeriodIndex")&&!x.isInteger(l.cryptoPeriodIndex))return"cryptoPeriodIndex: integer expected";if(l.protectionScheme!=null&&l.hasOwnProperty("protectionScheme")&&!x.isInteger(l.protectionScheme))return"protectionScheme: integer expected";if(l.cryptoPeriodSeconds!=null&&l.hasOwnProperty("cryptoPeriodSeconds")&&!x.isInteger(l.cryptoPeriodSeconds))return"cryptoPeriodSeconds: integer expected";if(l.type!=null&&l.hasOwnProperty("type"))switch(l.type){default:return"type: enum value expected";case 0:case 1:case 2:break}if(l.keySequence!=null&&l.hasOwnProperty("keySequence")&&!x.isInteger(l.keySequence))return"keySequence: integer expected";if(l.groupIds!=null&&l.hasOwnProperty("groupIds")){if(!Array.isArray(l.groupIds))return"groupIds: array expected";for(var u=0;u<l.groupIds.length;u+=1)if(!(l.groupIds[u]&&typeof l.groupIds[u].length=="number"||x.isString(l.groupIds[u])))return"groupIds: buffer[] expected"}if(l.entitledKeys!=null&&l.hasOwnProperty("entitledKeys")){if(!Array.isArray(l.entitledKeys))return"entitledKeys: array expected";for(var u=0;u<l.entitledKeys.length;u+=1){var d=T.license_protocol.WidevinePsshData.EntitledKey.verify(l.entitledKeys[u]);if(d)return"entitledKeys."+d}}if(l.videoFeature!=null&&l.hasOwnProperty("videoFeature")&&!x.isString(l.videoFeature))return"videoFeature: string expected";if(l.algorithm!=null&&l.hasOwnProperty("algorithm"))switch(l.algorithm){default:return"algorithm: enum value expected";case 0:case 1:break}return l.provider!=null&&l.hasOwnProperty("provider")&&!x.isString(l.provider)?"provider: string expected":l.trackType!=null&&l.hasOwnProperty("trackType")&&!x.isString(l.trackType)?"trackType: string expected":l.policy!=null&&l.hasOwnProperty("policy")&&!x.isString(l.policy)?"policy: string expected":l.groupedLicense!=null&&l.hasOwnProperty("groupedLicense")&&!(l.groupedLicense&&typeof l.groupedLicense.length=="number"||x.isString(l.groupedLicense))?"groupedLicense: buffer expected":null},O.fromObject=function(l){if(l instanceof T.license_protocol.WidevinePsshData)return l;var u=new T.license_protocol.WidevinePsshData;if(l.keyIds){if(!Array.isArray(l.keyIds))throw TypeError(".license_protocol.WidevinePsshData.keyIds: array expected");u.keyIds=[];for(var d=0;d<l.keyIds.length;d+=1)typeof l.keyIds[d]=="string"?x.base64.decode(l.keyIds[d],u.keyIds[d]=x.newBuffer(x.base64.length(l.keyIds[d])),0):l.keyIds[d].length>=0&&(u.keyIds[d]=l.keyIds[d])}switch(l.contentId!=null&&(typeof l.contentId=="string"?x.base64.decode(l.contentId,u.contentId=x.newBuffer(x.base64.length(l.contentId)),0):l.contentId.length>=0&&(u.contentId=l.contentId)),l.cryptoPeriodIndex!=null&&(u.cryptoPeriodIndex=l.cryptoPeriodIndex>>>0),l.protectionScheme!=null&&(u.protectionScheme=l.protectionScheme>>>0),l.cryptoPeriodSeconds!=null&&(u.cryptoPeriodSeconds=l.cryptoPeriodSeconds>>>0),l.type){default:if(typeof l.type=="number"){u.type=l.type;break}break;case"SINGLE":case 0:u.type=0;break;case"ENTITLEMENT":case 1:u.type=1;break;case"ENTITLED_KEY":case 2:u.type=2;break}if(l.keySequence!=null&&(u.keySequence=l.keySequence>>>0),l.groupIds){if(!Array.isArray(l.groupIds))throw TypeError(".license_protocol.WidevinePsshData.groupIds: array expected");u.groupIds=[];for(var d=0;d<l.groupIds.length;d+=1)typeof l.groupIds[d]=="string"?x.base64.decode(l.groupIds[d],u.groupIds[d]=x.newBuffer(x.base64.length(l.groupIds[d])),0):l.groupIds[d].length>=0&&(u.groupIds[d]=l.groupIds[d])}if(l.entitledKeys){if(!Array.isArray(l.entitledKeys))throw TypeError(".license_protocol.WidevinePsshData.entitledKeys: array expected");u.entitledKeys=[];for(var d=0;d<l.entitledKeys.length;d+=1){if(typeof l.entitledKeys[d]!="object")throw TypeError(".license_protocol.WidevinePsshData.entitledKeys: object expected");u.entitledKeys[d]=T.license_protocol.WidevinePsshData.EntitledKey.fromObject(l.entitledKeys[d])}}switch(l.videoFeature!=null&&(u.videoFeature=String(l.videoFeature)),l.algorithm){default:if(typeof l.algorithm=="number"){u.algorithm=l.algorithm;break}break;case"UNENCRYPTED":case 0:u.algorithm=0;break;case"AESCTR":case 1:u.algorithm=1;break}return l.provider!=null&&(u.provider=String(l.provider)),l.trackType!=null&&(u.trackType=String(l.trackType)),l.policy!=null&&(u.policy=String(l.policy)),l.groupedLicense!=null&&(typeof l.groupedLicense=="string"?x.base64.decode(l.groupedLicense,u.groupedLicense=x.newBuffer(x.base64.length(l.groupedLicense)),0):l.groupedLicense.length>=0&&(u.groupedLicense=l.groupedLicense)),u},O.toObject=function(l,u){u||(u={});var d={};if((u.arrays||u.defaults)&&(d.keyIds=[],d.groupIds=[],d.entitledKeys=[]),u.defaults&&(d.algorithm=u.enums===String?"UNENCRYPTED":0,d.provider="",u.bytes===String?d.contentId="":(d.contentId=[],u.bytes!==Array&&(d.contentId=x.newBuffer(d.contentId))),d.trackType="",d.policy="",d.cryptoPeriodIndex=0,u.bytes===String?d.groupedLicense="":(d.groupedLicense=[],u.bytes!==Array&&(d.groupedLicense=x.newBuffer(d.groupedLicense))),d.protectionScheme=0,d.cryptoPeriodSeconds=0,d.type=u.enums===String?"SINGLE":0,d.keySequence=0,d.videoFeature=""),l.algorithm!=null&&l.hasOwnProperty("algorithm")&&(d.algorithm=u.enums===String?T.license_protocol.WidevinePsshData.Algorithm[l.algorithm]===void 0?l.algorithm:T.license_protocol.WidevinePsshData.Algorithm[l.algorithm]:l.algorithm),l.keyIds&&l.keyIds.length){d.keyIds=[];for(var v=0;v<l.keyIds.length;v+=1)d.keyIds[v]=u.bytes===String?x.base64.encode(l.keyIds[v],0,l.keyIds[v].length):u.bytes===Array?Array.prototype.slice.call(l.keyIds[v]):l.keyIds[v]}if(l.provider!=null&&l.hasOwnProperty("provider")&&(d.provider=l.provider),l.contentId!=null&&l.hasOwnProperty("contentId")&&(d.contentId=u.bytes===String?x.base64.encode(l.contentId,0,l.contentId.length):u.bytes===Array?Array.prototype.slice.call(l.contentId):l.contentId),l.trackType!=null&&l.hasOwnProperty("trackType")&&(d.trackType=l.trackType),l.policy!=null&&l.hasOwnProperty("policy")&&(d.policy=l.policy),l.cryptoPeriodIndex!=null&&l.hasOwnProperty("cryptoPeriodIndex")&&(d.cryptoPeriodIndex=l.cryptoPeriodIndex),l.groupedLicense!=null&&l.hasOwnProperty("groupedLicense")&&(d.groupedLicense=u.bytes===String?x.base64.encode(l.groupedLicense,0,l.groupedLicense.length):u.bytes===Array?Array.prototype.slice.call(l.groupedLicense):l.groupedLicense),l.protectionScheme!=null&&l.hasOwnProperty("protectionScheme")&&(d.protectionScheme=l.protectionScheme),l.cryptoPeriodSeconds!=null&&l.hasOwnProperty("cryptoPeriodSeconds")&&(d.cryptoPeriodSeconds=l.cryptoPeriodSeconds),l.type!=null&&l.hasOwnProperty("type")&&(d.type=u.enums===String?T.license_protocol.WidevinePsshData.Type[l.type]===void 0?l.type:T.license_protocol.WidevinePsshData.Type[l.type]:l.type),l.keySequence!=null&&l.hasOwnProperty("keySequence")&&(d.keySequence=l.keySequence),l.groupIds&&l.groupIds.length){d.groupIds=[];for(var v=0;v<l.groupIds.length;v+=1)d.groupIds[v]=u.bytes===String?x.base64.encode(l.groupIds[v],0,l.groupIds[v].length):u.bytes===Array?Array.prototype.slice.call(l.groupIds[v]):l.groupIds[v]}if(l.entitledKeys&&l.entitledKeys.length){d.entitledKeys=[];for(var v=0;v<l.entitledKeys.length;v+=1)d.entitledKeys[v]=T.license_protocol.WidevinePsshData.EntitledKey.toObject(l.entitledKeys[v],u)}return l.videoFeature!=null&&l.hasOwnProperty("videoFeature")&&(d.videoFeature=l.videoFeature),d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.WidevinePsshData"},O.Type=function(){var h={},l=Object.create(h);return l[h[0]="SINGLE"]=0,l[h[1]="ENTITLEMENT"]=1,l[h[2]="ENTITLED_KEY"]=2,l}(),O.EntitledKey=function(){function h(l){if(l)for(var u=Object.keys(l),d=0;d<u.length;d+=1)l[u[d]]!=null&&(this[u[d]]=l[u[d]])}return h.prototype.entitlementKeyId=x.newBuffer([]),h.prototype.keyId=x.newBuffer([]),h.prototype.key=x.newBuffer([]),h.prototype.iv=x.newBuffer([]),h.prototype.entitlementKeySizeBytes=32,h.create=function(u){return new h(u)},h.encode=function(u,d){return d||(d=N.create()),u.entitlementKeyId!=null&&Object.hasOwnProperty.call(u,"entitlementKeyId")&&d.uint32(10).bytes(u.entitlementKeyId),u.keyId!=null&&Object.hasOwnProperty.call(u,"keyId")&&d.uint32(18).bytes(u.keyId),u.key!=null&&Object.hasOwnProperty.call(u,"key")&&d.uint32(26).bytes(u.key),u.iv!=null&&Object.hasOwnProperty.call(u,"iv")&&d.uint32(34).bytes(u.iv),u.entitlementKeySizeBytes!=null&&Object.hasOwnProperty.call(u,"entitlementKeySizeBytes")&&d.uint32(40).uint32(u.entitlementKeySizeBytes),d},h.encodeDelimited=function(u,d){return this.encode(u,d).ldelim()},h.decode=function(u,d){u instanceof D||(u=D.create(u));for(var v=d===void 0?u.len:u.pos+d,A=new T.license_protocol.WidevinePsshData.EntitledKey;u.pos<v;){var z=u.uint32();switch(z>>>3){case 1:{A.entitlementKeyId=u.bytes();break}case 2:{A.keyId=u.bytes();break}case 3:{A.key=u.bytes();break}case 4:{A.iv=u.bytes();break}case 5:{A.entitlementKeySizeBytes=u.uint32();break}default:u.skipType(z&7);break}}return A},h.decodeDelimited=function(u){return u instanceof D||(u=new D(u)),this.decode(u,u.uint32())},h.verify=function(u){return typeof u!="object"||u===null?"object expected":u.entitlementKeyId!=null&&u.hasOwnProperty("entitlementKeyId")&&!(u.entitlementKeyId&&typeof u.entitlementKeyId.length=="number"||x.isString(u.entitlementKeyId))?"entitlementKeyId: buffer expected":u.keyId!=null&&u.hasOwnProperty("keyId")&&!(u.keyId&&typeof u.keyId.length=="number"||x.isString(u.keyId))?"keyId: buffer expected":u.key!=null&&u.hasOwnProperty("key")&&!(u.key&&typeof u.key.length=="number"||x.isString(u.key))?"key: buffer expected":u.iv!=null&&u.hasOwnProperty("iv")&&!(u.iv&&typeof u.iv.length=="number"||x.isString(u.iv))?"iv: buffer expected":u.entitlementKeySizeBytes!=null&&u.hasOwnProperty("entitlementKeySizeBytes")&&!x.isInteger(u.entitlementKeySizeBytes)?"entitlementKeySizeBytes: integer expected":null},h.fromObject=function(u){if(u instanceof T.license_protocol.WidevinePsshData.EntitledKey)return u;var d=new T.license_protocol.WidevinePsshData.EntitledKey;return u.entitlementKeyId!=null&&(typeof u.entitlementKeyId=="string"?x.base64.decode(u.entitlementKeyId,d.entitlementKeyId=x.newBuffer(x.base64.length(u.entitlementKeyId)),0):u.entitlementKeyId.length>=0&&(d.entitlementKeyId=u.entitlementKeyId)),u.keyId!=null&&(typeof u.keyId=="string"?x.base64.decode(u.keyId,d.keyId=x.newBuffer(x.base64.length(u.keyId)),0):u.keyId.length>=0&&(d.keyId=u.keyId)),u.key!=null&&(typeof u.key=="string"?x.base64.decode(u.key,d.key=x.newBuffer(x.base64.length(u.key)),0):u.key.length>=0&&(d.key=u.key)),u.iv!=null&&(typeof u.iv=="string"?x.base64.decode(u.iv,d.iv=x.newBuffer(x.base64.length(u.iv)),0):u.iv.length>=0&&(d.iv=u.iv)),u.entitlementKeySizeBytes!=null&&(d.entitlementKeySizeBytes=u.entitlementKeySizeBytes>>>0),d},h.toObject=function(u,d){d||(d={});var v={};return d.defaults&&(d.bytes===String?v.entitlementKeyId="":(v.entitlementKeyId=[],d.bytes!==Array&&(v.entitlementKeyId=x.newBuffer(v.entitlementKeyId))),d.bytes===String?v.keyId="":(v.keyId=[],d.bytes!==Array&&(v.keyId=x.newBuffer(v.keyId))),d.bytes===String?v.key="":(v.key=[],d.bytes!==Array&&(v.key=x.newBuffer(v.key))),d.bytes===String?v.iv="":(v.iv=[],d.bytes!==Array&&(v.iv=x.newBuffer(v.iv))),v.entitlementKeySizeBytes=32),u.entitlementKeyId!=null&&u.hasOwnProperty("entitlementKeyId")&&(v.entitlementKeyId=d.bytes===String?x.base64.encode(u.entitlementKeyId,0,u.entitlementKeyId.length):d.bytes===Array?Array.prototype.slice.call(u.entitlementKeyId):u.entitlementKeyId),u.keyId!=null&&u.hasOwnProperty("keyId")&&(v.keyId=d.bytes===String?x.base64.encode(u.keyId,0,u.keyId.length):d.bytes===Array?Array.prototype.slice.call(u.keyId):u.keyId),u.key!=null&&u.hasOwnProperty("key")&&(v.key=d.bytes===String?x.base64.encode(u.key,0,u.key.length):d.bytes===Array?Array.prototype.slice.call(u.key):u.key),u.iv!=null&&u.hasOwnProperty("iv")&&(v.iv=d.bytes===String?x.base64.encode(u.iv,0,u.iv.length):d.bytes===Array?Array.prototype.slice.call(u.iv):u.iv),u.entitlementKeySizeBytes!=null&&u.hasOwnProperty("entitlementKeySizeBytes")&&(v.entitlementKeySizeBytes=u.entitlementKeySizeBytes),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.WidevinePsshData.EntitledKey"},h}(),O.Algorithm=function(){var h={},l=Object.create(h);return l[h[0]="UNENCRYPTED"]=0,l[h[1]="AESCTR"]=1,l}(),O}(),j.FileHashes=function(){function O(h){if(this.signatures=[],h)for(var l=Object.keys(h),u=0;u<l.length;u+=1)h[l[u]]!=null&&(this[l[u]]=h[l[u]])}return O.prototype.signer=x.newBuffer([]),O.prototype.signatures=x.emptyArray,O.create=function(l){return new O(l)},O.encode=function(l,u){if(u||(u=N.create()),l.signer!=null&&Object.hasOwnProperty.call(l,"signer")&&u.uint32(10).bytes(l.signer),l.signatures!=null&&l.signatures.length)for(var d=0;d<l.signatures.length;d+=1)T.license_protocol.FileHashes.Signature.encode(l.signatures[d],u.uint32(18).fork()).ldelim();return u},O.encodeDelimited=function(l,u){return this.encode(l,u).ldelim()},O.decode=function(l,u){l instanceof D||(l=D.create(l));for(var d=u===void 0?l.len:l.pos+u,v=new T.license_protocol.FileHashes;l.pos<d;){var A=l.uint32();switch(A>>>3){case 1:{v.signer=l.bytes();break}case 2:{v.signatures&&v.signatures.length||(v.signatures=[]),v.signatures.push(T.license_protocol.FileHashes.Signature.decode(l,l.uint32()));break}default:l.skipType(A&7);break}}return v},O.decodeDelimited=function(l){return l instanceof D||(l=new D(l)),this.decode(l,l.uint32())},O.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.signer!=null&&l.hasOwnProperty("signer")&&!(l.signer&&typeof l.signer.length=="number"||x.isString(l.signer)))return"signer: buffer expected";if(l.signatures!=null&&l.hasOwnProperty("signatures")){if(!Array.isArray(l.signatures))return"signatures: array expected";for(var u=0;u<l.signatures.length;u+=1){var d=T.license_protocol.FileHashes.Signature.verify(l.signatures[u]);if(d)return"signatures."+d}}return null},O.fromObject=function(l){if(l instanceof T.license_protocol.FileHashes)return l;var u=new T.license_protocol.FileHashes;if(l.signer!=null&&(typeof l.signer=="string"?x.base64.decode(l.signer,u.signer=x.newBuffer(x.base64.length(l.signer)),0):l.signer.length>=0&&(u.signer=l.signer)),l.signatures){if(!Array.isArray(l.signatures))throw TypeError(".license_protocol.FileHashes.signatures: array expected");u.signatures=[];for(var d=0;d<l.signatures.length;d+=1){if(typeof l.signatures[d]!="object")throw TypeError(".license_protocol.FileHashes.signatures: object expected");u.signatures[d]=T.license_protocol.FileHashes.Signature.fromObject(l.signatures[d])}}return u},O.toObject=function(l,u){u||(u={});var d={};if((u.arrays||u.defaults)&&(d.signatures=[]),u.defaults&&(u.bytes===String?d.signer="":(d.signer=[],u.bytes!==Array&&(d.signer=x.newBuffer(d.signer))),l.signer!=null&&l.hasOwnProperty("signer")&&(d.signer=u.bytes===String?x.base64.encode(l.signer,0,l.signer.length):u.bytes===Array?Array.prototype.slice.call(l.signer):l.signer)),l.signatures&&l.signatures.length){d.signatures=[];for(var v=0;v<l.signatures.length;v+=1)d.signatures[v]=T.license_protocol.FileHashes.Signature.toObject(l.signatures[v],u)}return d},O.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},O.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/license_protocol.FileHashes"},O.Signature=function(){function h(l){if(l)for(var u=Object.keys(l),d=0;d<u.length;d+=1)l[u[d]]!=null&&(this[u[d]]=l[u[d]])}return h.prototype.filename="",h.prototype.testSigning=!1,h.prototype.SHA512Hash=x.newBuffer([]),h.prototype.mainExe=!1,h.prototype.signature=x.newBuffer([]),h.create=function(u){return new h(u)},h.encode=function(u,d){return d||(d=N.create()),u.filename!=null&&Object.hasOwnProperty.call(u,"filename")&&d.uint32(10).string(u.filename),u.testSigning!=null&&Object.hasOwnProperty.call(u,"testSigning")&&d.uint32(16).bool(u.testSigning),u.SHA512Hash!=null&&Object.hasOwnProperty.call(u,"SHA512Hash")&&d.uint32(26).bytes(u.SHA512Hash),u.mainExe!=null&&Object.hasOwnProperty.call(u,"mainExe")&&d.uint32(32).bool(u.mainExe),u.signature!=null&&Object.hasOwnProperty.call(u,"signature")&&d.uint32(42).bytes(u.signature),d},h.encodeDelimited=function(u,d){return this.encode(u,d).ldelim()},h.decode=function(u,d){u instanceof D||(u=D.create(u));for(var v=d===void 0?u.len:u.pos+d,A=new T.license_protocol.FileHashes.Signature;u.pos<v;){var z=u.uint32();switch(z>>>3){case 1:{A.filename=u.string();break}case 2:{A.testSigning=u.bool();break}case 3:{A.SHA512Hash=u.bytes();break}case 4:{A.mainExe=u.bool();break}case 5:{A.signature=u.bytes();break}default:u.skipType(z&7);break}}return A},h.decodeDelimited=function(u){return u instanceof D||(u=new D(u)),this.decode(u,u.uint32())},h.verify=function(u){return typeof u!="object"||u===null?"object expected":u.filename!=null&&u.hasOwnProperty("filename")&&!x.isString(u.filename)?"filename: string expected":u.testSigning!=null&&u.hasOwnProperty("testSigning")&&typeof u.testSigning!="boolean"?"testSigning: boolean expected":u.SHA512Hash!=null&&u.hasOwnProperty("SHA512Hash")&&!(u.SHA512Hash&&typeof u.SHA512Hash.length=="number"||x.isString(u.SHA512Hash))?"SHA512Hash: buffer expected":u.mainExe!=null&&u.hasOwnProperty("mainExe")&&typeof u.mainExe!="boolean"?"mainExe: boolean expected":u.signature!=null&&u.hasOwnProperty("signature")&&!(u.signature&&typeof u.signature.length=="number"||x.isString(u.signature))?"signature: buffer expected":null},h.fromObject=function(u){if(u instanceof T.license_protocol.FileHashes.Signature)return u;var d=new T.license_protocol.FileHashes.Signature;return u.filename!=null&&(d.filename=String(u.filename)),u.testSigning!=null&&(d.testSigning=!!u.testSigning),u.SHA512Hash!=null&&(typeof u.SHA512Hash=="string"?x.base64.decode(u.SHA512Hash,d.SHA512Hash=x.newBuffer(x.base64.length(u.SHA512Hash)),0):u.SHA512Hash.length>=0&&(d.SHA512Hash=u.SHA512Hash)),u.mainExe!=null&&(d.mainExe=!!u.mainExe),u.signature!=null&&(typeof u.signature=="string"?x.base64.decode(u.signature,d.signature=x.newBuffer(x.base64.length(u.signature)),0):u.signature.length>=0&&(d.signature=u.signature)),d},h.toObject=function(u,d){d||(d={});var v={};return d.defaults&&(v.filename="",v.testSigning=!1,d.bytes===String?v.SHA512Hash="":(v.SHA512Hash=[],d.bytes!==Array&&(v.SHA512Hash=x.newBuffer(v.SHA512Hash))),v.mainExe=!1,d.bytes===String?v.signature="":(v.signature=[],d.bytes!==Array&&(v.signature=x.newBuffer(v.signature)))),u.filename!=null&&u.hasOwnProperty("filename")&&(v.filename=u.filename),u.testSigning!=null&&u.hasOwnProperty("testSigning")&&(v.testSigning=u.testSigning),u.SHA512Hash!=null&&u.hasOwnProperty("SHA512Hash")&&(v.SHA512Hash=d.bytes===String?x.base64.encode(u.SHA512Hash,0,u.SHA512Hash.length):d.bytes===Array?Array.prototype.slice.call(u.SHA512Hash):u.SHA512Hash),u.mainExe!=null&&u.hasOwnProperty("mainExe")&&(v.mainExe=u.mainExe),u.signature!=null&&u.hasOwnProperty("signature")&&(v.signature=d.bytes===String?x.base64.encode(u.signature,0,u.signature.length):d.bytes===Array?Array.prototype.slice.call(u.signature):u.signature),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,b.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.FileHashes.Signature"},h}(),O}(),j}(),T})(protobuf);const{SignedMessage:U3,LicenseRequest:j3}=protobuf.roots.default.license_protocol;function oI(b){const D=Array.from(b).map(N=>String.fromCharCode(N)).join("");return btoa(D)}function B3(b){b=b.replace(/^await\s+/,"");const D=/fetch\(['"](.+?)['"],\s*(\{.+?\})\)/s;b.split(`
|
||
`).map(O=>O.trim()).filter(Boolean);const N={method:"UNDEFINED",url:"",headers:{},body:null},x=b.match(D);if(!x)throw console.log(b),new Error("Invalid 'Copy as fetch' string.");N.url=x[1];const T=x[2],j=JSON.parse(T);return j.method&&(N.method=j.method),j.headers&&(N.headers=j.headers),j.body&&(N.body=j.body),N}const V3=new Uint8Array([237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237]),F3=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),K3=new Uint8Array([112,115,115,104]);function r1(b,D){const N=new ArrayBuffer(4);return new DataView(N).setUint32(0,b,D),new Uint8Array(N)}function $0(b,D){const N=new ArrayBuffer(2);return new DataView(N).setUint16(0,b,D),new Uint8Array(N)}function j2(b,D){const N=b.length,x=N+32,T=new Uint8Array([...r1(x,!1),...K3,...new Uint8Array(4),...D,...r1(N,!1),...b]);return oI(T)}function H3(b){const D=new Uint8Array([...$0(1,!0),...$0(b.length,!0),...b]);return new Uint8Array([...r1(D.length+2+4,!0),...$0(1,!0),...D])}function q3(b){const D=new Uint8Array(b.length*2);for(let N=0;N<b.length;N++){const x=b.charCodeAt(N);D[N*2]=x&255,D[N*2+1]=x>>8}return D}function z3(b){return Uint8Array.from(b.split("").map(D=>D.charCodeAt()))}async function G3(){try{const b=await navigator.clipboard.readText(),D=B3(b);let N,x;if(D.body.startsWith("<")){x=D.body;const T=x.match(/.*(<WRMHEADER.*<\/WRMHEADER>).*/),j=T?T[1]:null,O=q3(j),h=H3(O);N=j2(h,F3)}else{const T=z3(D.body);let j,O;try{j=U3.decode(T),O=j3.decode(j.msg)}catch(h){console.error("Decoding failed, returning empty pssh",h),N=""}if(O&&O.contentId&&O.contentId.widevinePsshData){const h=O.contentId.widevinePsshData.psshData[0];N=j2(h,V3)}W3(T)?x=oI(T):x=D.body}document.getElementById("licurl").value=D.url,document.getElementById("headers").value=JSON.stringify(D.headers),document.getElementById("pssh").value=N,document.getElementById("data").value=x}catch(b){console.error("Failed to read clipboard contents:",b)}}function W3(b){return b.some(D=>D>127)}function X3(){const[b,D]=we.useState(""),[N,x]=we.useState(!1),T=()=>{let u=document.getElementById("main_content");u.scrollTop=0},j=u=>{let d=document.getElementById("messageresults").innerHTML;d=d.replace(/<br\s*\/?>/gi,`
|
||
`),navigator.clipboard.writeText(d),console.log(d)},O=u=>{u.preventDefault()},h=u=>{let d=document.getElementById("pssh").value,v=document.getElementById("licurl").value,A=document.getElementById("proxy").value,z=document.getElementById("headers").value,I=document.getElementById("cookies").value,ee=document.getElementById("data").value;fetch("/api/decrypt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pssh:d,licurl:v,proxy:A,headers:z,cookies:I,data:ee})}).then(re=>re.json()).then(re=>{const ge=re.message.replace(/\n/g,"<br />");D(ge),x(!0)}).catch(re=>{console.error("Error during decryption request:",re),D("Error: Unable to process request."),x(!0)})},l=u=>{let d=document.getElementById("pssh"),v=document.getElementById("licurl");document.getElementById("proxy");let A=document.getElementById("headers"),z=document.getElementById("cookies"),I=document.getElementById("data");d.value="",v.value="",A.value="",z.value="",I.value="",D(""),x(!1)};return we.useEffect(()=>{if(N){let u=document.getElementById("main_content");u.scrollTop=u.scrollHeight}},[b,N]),ae.jsxs(ae.Fragment,{children:[ae.jsxs("div",{className:"w-full min-h-full bg-zinc-900 flex flex-col items-center justify-center",children:[ae.jsx(Qf,{children:ae.jsx("title",{children:"CDRM-Project"})}),ae.jsxs("form",{className:"flex flex-col w-8/10 min-h-8/10 bg-[rgba(0,0,0,0.2)] p-10 border-black border-1 rounded-xl shadow-lg shadow-cyan-500/50 overflow-y-auto",onSubmit:O,children:[ae.jsx("label",{htmlFor:"pssh",className:"text-white mb-1",children:"PSSH:"}),ae.jsx("input",{type:"text",id:"pssh",name:"pssh",className:"text-white bg-[rgba(0,0,0,0.2)] focus:outline-none rounded focus:shadow-sm focus:shadow-cyan-500/50 transition-shadow duration-300 ease-in-out p-2"}),ae.jsx("label",{htmlFor:"licurl",className:"text-white mb-1 mt-1",children:"License URL:"}),ae.jsx("input",{type:"text",id:"licurl",name:"licurl",className:"text-white bg-[rgba(0,0,0,0.2)] focus:outline-none rounded focus:shadow-sm focus:shadow-cyan-500/50 transition-shadow duration-300 ease-in-out p-2"}),ae.jsx("label",{htmlFor:"proxy",className:"text-white mb-1 mt-1",children:"Proxy:"}),ae.jsx("input",{type:"text",id:"proxy",name:"proxy",className:"text-white bg-[rgba(0,0,0,0.2)] focus:outline-none rounded focus:shadow-sm focus:shadow-cyan-500/50 transition-shadow duration-300 ease-in-out p-2"}),ae.jsx("label",{htmlFor:"headers",className:"text-white mb-1 mt-1",children:"Headers:"}),ae.jsx("textarea",{id:"headers",name:"headers",className:"text-white bg-[rgba(0,0,0,0.2)] h-24 focus:h-92 focus:outline-none rounded focus:shadow-sm focus:shadow-cyan-500/50 transition-all duration-300 ease-in-out p-2 resize-none"}),ae.jsx("label",{htmlFor:"cookies",className:"text-white mb-1 mt-1",children:"Cookies:"}),ae.jsx("textarea",{id:"cookies",name:"cookies",className:"text-white bg-[rgba(0,0,0,0.2)] h-24 focus:h-92 focus:outline-none rounded focus:shadow-sm focus:shadow-cyan-500/50 transition-all duration-300 ease-in-out p-2 resize-none"}),ae.jsx("label",{htmlFor:"data",className:"text-white mb-1 mt-1",children:"Data:"}),ae.jsx("textarea",{id:"data",name:"data",className:"text-white bg-[rgba(0,0,0,0.2)] h-24 focus:h-92 focus:outline-none rounded focus:shadow-sm focus:shadow-cyan-500/50 transition-all duration-300 ease-in-out p-2 resize-none"}),ae.jsxs("div",{className:"flex flex-row w-full justify-evenly mt-5 mb-5",children:[ae.jsx("button",{type:"button",onClick:h,className:"bg-cyan-500 text-white rounded p-2 hover:bg-cyan-600 transition-colors duration-300 ease-in-out w-1/6 cursor-pointer active:transform active:scale-95 overflow-x-hidden overflow-y-hidden",children:"Submit"}),ae.jsx("button",{type:"button",onClick:G3,className:"bg-yellow-500 text-white rounded p-2 hover:bg-yellow-600 transition-colors duration-300 ease-in-out w-1/6 cursor-pointer active:transform active:scale-95 overflow-x-hidden overflow-y-hidden",children:"Paste from fetch"}),ae.jsx("button",{type:"button",onClick:l,className:"bg-red-500 text-white rounded p-2 hover:bg-red-600 transition-colors duration-300 ease-in-out w-1/6 cursor-pointer active:transform active:scale-95 overflow-x-hidden overflow-y-hidden",children:"Reset"})]})]})]}),N&&ae.jsx("div",{className:"w-full min-h-full h-full bg-zinc-900 flex flex-col items-center justify-center",children:ae.jsxs("div",{className:"w-8/10 min-h-8/10 flex flex-col bg-[rgba(0,0,0,0.2)] items-center p-10 border-black border-1 rounded-xl shadow-lg shadow-cyan-500/50 overflow-y-auto",children:[ae.jsx("p",{className:"w-full text-center text-white text-2xl overflow-hidden mb-10 pb-2 border-b",children:"Results:"}),ae.jsx("p",{id:"messageresults",className:"w-8/10 h-6/10 text-center text-white text-2xl overflow-hidden bg-[rgba(0,0,0,0.2)] rounded-xl p-5",dangerouslySetInnerHTML:{__html:b}}),ae.jsxs("div",{className:"w-full h-1/10 flex justify-evenly mt-5 , mb-5",children:[ae.jsx("button",{type:"button",onClick:j,className:"bg-green-500 text-white rounded p-2 hover:bg-green-600 transition-colors duration-300 ease-in-out min-w-1/6 w-1/6 min-h-4/6 h-4/6 cursor-pointer active:transform active:scale-95 overflow-x-hidden overflow-y-hidden",children:"Copy"}),ae.jsx("button",{type:"button",onClick:T,className:"bg-yellow-600 text-white rounded p-2 hover:bg-yellow-700 transition-colors duration-300 ease-in-out min-w-1/6 w-1/6 min-h-4/6 h-4/6 cursor-pointer active:transform active:scale-95 overflow-x-hidden overflow-y-hidden",children:"Back to top"})]})]})})]})}const{protocol:i1,hostname:Y3,port:Yg}=window.location;let Yf=`${i1}//${Y3}`;(i1==="http:"&&Yg!=="80"||i1==="https:"&&Yg!=="443"&&Yg!=="")&&(Yf+=`:${Yg}`);function $3(){const[b,D]=we.useState({device_type:"",system_id:"",security_level:"",host:"",secret:"",device_name:""}),[N,x]=we.useState({security_level:"",host:"",secret:"",device_name:""});return we.useEffect(()=>{fetch("/remotecdm/widevine/deviceinfo").then(T=>T.json()).then(T=>{D({device_type:T.device_type,system_id:T.system_id,security_level:T.security_level,host:T.host,secret:T.secret,device_name:T.device_name})}).catch(T=>console.error("Error fetching Widevine info:",T)),fetch("/remotecdm/playready/deviceinfo").then(T=>T.json()).then(T=>{x({security_level:T.security_level,host:T.host,secret:T.secret,device_name:T.device_name})}).catch(T=>console.error("Error fetching PlayReady info:",T))},[]),ae.jsx(ae.Fragment,{children:ae.jsxs("div",{className:"min-w-full w-full min-h-full overflow-x-auto bg-zinc-900 shadow-lg shadow-black flex flex-col flex-wrap p-10 justify-around",children:[ae.jsx(Qf,{children:ae.jsx("title",{children:"API"})}),ae.jsxs("details",{open:!0,className:"p-5 mb-5 border shadow-lg shadow-black overflow-y-auto",children:[ae.jsxs("summary",{className:"bg-[rgba(0,0,0,0.2)] p-2 rounded text-white flex shadow-purple-900 shadow-sm",children:["Sending a decryption request | ","(Python)"]}),ae.jsx("br",{}),ae.jsx("div",{className:"h-9/10 bg-[rgba(0,0,0,0.2)] p-2 rounded text-white shadow-sm shadow-purple-900 w-full overflow-x-auto overflow-y-auto",children:ae.jsx("pre",{className:"p-2",children:`import requests
|
||
|
||
print(requests.post(
|
||
url='${Yf}/api/decrypt',
|
||
headers={
|
||
'Content-Type': 'application/json',
|
||
},
|
||
json={
|
||
'pssh': 'AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA==',
|
||
'licurl': 'https://cwip-shaka-proxy.appspot.com/no_auth',
|
||
'headers': str({
|
||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0',
|
||
'Accept': '*/*',
|
||
'Accept-Language': 'en-US,en;q=0.5',
|
||
})
|
||
}
|
||
).json()['message'])`})})]}),ae.jsxs("details",{open:!0,className:" p-5 mb-5 shadow-lg shadow-black border overflow-y-auto",children:[ae.jsxs("summary",{className:"bg-[rgba(0,0,0,0.2)] p-2 rounded text-white flex shadow-sm shadow-purple-900",children:["Sending a search request | ","(Python)"]}),ae.jsx("br",{}),ae.jsx("div",{className:"h-9/10 bg-[rgba(0,0,0,0.2)] p-2 rounded text-white shadow-sm shadow-purple-900",children:ae.jsx("pre",{className:"p-2",children:`import requests
|
||
|
||
print(requests.post(
|
||
url='${Yf}/api/cache/search',
|
||
json={
|
||
'input': 'AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA=='
|
||
}
|
||
).json())`})})]}),ae.jsxs("details",{open:!0,className:" p-5 mb-5 shadow-lg shadow-black border overflow-y-auto",children:[ae.jsxs("summary",{className:"bg-[rgba(0,0,0,0.2)] p-2 rounded text-white flex shadow-sm shadow-purple-900",children:["Remote CDM configuration (Widevine) | ","(For PyWidevine / Devine / VineTrimmer / Extensions)"]}),ae.jsx("br",{}),ae.jsx("div",{className:"h-9/10 bg-[rgba(0,0,0,0.2)] p-2 rounded text-white shadow-sm shadow-purple-900",children:ae.jsxs("p",{className:"p-2",children:["device_type: ",ae.jsxs("span",{id:"wv_device_type",children:['"',b.device_type,'"']}),ae.jsx("br",{}),"system_id: ",ae.jsx("span",{id:"wv_system_id",children:b.system_id}),ae.jsx("br",{}),"security_level: ",ae.jsx("span",{id:"wv_security_level",children:b.security_level}),ae.jsx("br",{}),"host: ",ae.jsxs("span",{id:"wv_host",children:['"',Yf,'/remotecdm/widevine"']}),ae.jsx("br",{}),"secret: ",ae.jsxs("span",{id:"wv_secret",children:['"',b.secret,'"']}),ae.jsx("br",{}),"device_name: ",ae.jsx("span",{id:"wv_device_name",children:b.device_name})]})})]}),ae.jsxs("details",{open:!0,className:" p-5 mb-5 shadow-lg shadow-black border overflow-y-auto",children:[ae.jsxs("summary",{className:"bg-[rgba(0,0,0,0.2)] p-2 rounded text-white flex shadow-sm shadow-purple-900",children:["Remote CDM configuration (PlayReady) | ","(For PyPlayReady / Extensions / PlayReady Proxy)"]}),ae.jsx("br",{}),ae.jsx("div",{className:"h-9/10 bg-[rgba(0,0,0,0.2)] p-2 rounded text-white shadow-sm shadow-purple-900",children:ae.jsxs("p",{className:"p-2",children:["device_name: ",ae.jsx("span",{id:"pr_device_name",children:N.device_name}),ae.jsx("br",{}),"security_level: ",ae.jsx("span",{id:"pr_security_level",children:N.security_level}),ae.jsx("br",{}),"host: ",ae.jsxs("span",{id:"pr_host",children:['"',Yf,'/remotecdm/playready"']}),ae.jsx("br",{}),"secret: ",ae.jsxs("span",{id:"pr_secret",children:['"',N.secret,'"']}),ae.jsx("br",{})]})})]}),ae.jsxs("details",{open:!0,className:"p-5 mb-5 shadow-lg shadow-black border overflow-y-auto",children:[ae.jsxs("summary",{className:"bg-[rgba(0,0,0,0.2)] p-2 rounded text-white flex shadow-sm shadow-purple-900 transition-all transition-300 ease-in",children:["Webvault configuration | ","(For Devine / VineTrimmer)"]}),ae.jsx("br",{}),ae.jsx("div",{className:"h-9/10 bg-[rgba(0,0,0,0.2)] p-2 rounded text-white shadow-sm shadow-purple-900",children:ae.jsx("pre",{className:"p-2",children:`key_vaults:
|
||
- type: API
|
||
name: "Online Vault"
|
||
uri: "${Yf}/api/cache"
|
||
token: "${b.secret}"`})})]})]})})}function J3(){const[b,D]=we.useState(""),[N,x]=we.useState([]),[T,j]=we.useState(0),O=we.useRef(null),h=d=>{const v=d.target.value;D(v),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{v.trim()!==""?u(v):x([])},1e3)},l=()=>{fetch("/api/cache/keycount").then(d=>d.json()).then(d=>{j(d.count)}).catch(d=>{console.error("Error fetching key count:",d)})};we.useEffect(()=>{const d=setInterval(l,1e4);return l(),()=>clearInterval(d)},[]);const u=d=>{fetch("/api/cache/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:d})}).then(v=>v.json()).then(v=>x(v)).catch(v=>console.error("Error:",v))};return ae.jsx(ae.Fragment,{children:ae.jsxs("div",{className:"w-full h-full bg-zinc-900 flex flex-col p-0",children:[ae.jsx(Qf,{children:ae.jsx("title",{children:"Cache"})}),ae.jsxs("div",{className:"flex flex-row w-full",children:[ae.jsx("form",{className:"flex flex-row w-8/10 p-10 h-full rounded-xl self-start",children:ae.jsx("input",{type:"text",id:"search",name:"search",value:b,onChange:h,placeholder:"Search by PSSH/KID",className:"w-full text-white bg-[rgba(0,0,0,0.2)] focus:outline-none rounded focus:shadow-sm focus:shadow-green-700/50 transition-shadow duration-300 ease-in-out p-2"})}),ae.jsxs("p",{className:"text-white w-2/10 p-10 rounded-xl self-start flex flex-col h-full",children:[ae.jsxs("span",{className:"text-white w-1/1 text-center",children:["Cached Keys: ",T," "]}),ae.jsx("a",{href:"/api/cache/download",children:ae.jsx("button",{className:" self-start w-1/1 bg-green-700 rounded-md mt-1 active:transform active:scale-95 cursor-pointer hover:bg-green-600/50 pt-1 pb-1",children:"Download"})})]})]}),ae.jsx("div",{className:"h-full w-full p-10 overflow-y-auto",children:ae.jsx("div",{className:"overflow-x-auto border p-10 rounded-2xl bg-[rgba(0,0,0,0.2)] shadow-md shadow-green-700 min-h-full overflow-y-auto",children:ae.jsxs("table",{className:"min-w-full text-white",children:[ae.jsx("thead",{children:ae.jsxs("tr",{children:[ae.jsx("th",{className:"p-2 border border-black",children:"PSSH"}),ae.jsx("th",{className:"p-2 border border-black",children:"KID"}),ae.jsx("th",{className:"p-2 border border-black",children:"Key"})]})}),ae.jsx("tbody",{children:N.length>0?N.map((d,v)=>ae.jsxs("tr",{children:[ae.jsx("td",{className:"p-2 border border-black",children:d.PSSH}),ae.jsx("td",{className:"p-2 border border-black",children:d.KID}),ae.jsx("td",{className:"p-2 border border-black",children:d.Key})]},v)):ae.jsx("tr",{children:ae.jsx("td",{colSpan:"3",className:"p-2 border border-black text-center",children:"No data found"})})})]})})})]})})}var J0={};/*
|
||
@license
|
||
Shaka Player
|
||
Copyright 2016 Google LLC
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/var B2;function Q3(){return B2||(B2=1,function(b){(function(){var D=typeof window<"u"?window:yD,N={};(function(T,j,O){var h;function l(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var u=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function d(e){e=[typeof globalThis=="object"&&globalThis,e,typeof T=="object"&&T,typeof self=="object"&&self,typeof j=="object"&&j];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}var v=d(this);function A(e,t){if(t)e:{var n=v;e=e.split(".");for(var r=0;r<e.length-1;r++){var i=e[r];if(!(i in n))break e;n=n[i]}e=e[e.length-1],r=n[e],t=t(r),t!=r&&t!=null&&u(n,e,{configurable:!0,writable:!0,value:t})}}A("Symbol",function(e){function t(o){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(r+(o||"")+"_"+i++,o)}function n(o,a){this.g=o,u(this,"description",{configurable:!0,writable:!0,value:a})}if(e)return e;n.prototype.toString=function(){return this.g};var r="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return t}),A("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var r=v[t[n]];typeof r=="function"&&typeof r.prototype[e]!="function"&&u(r.prototype,e,{configurable:!0,writable:!0,value:function(){return z(l(this))}})}return e});function z(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}function I(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if(typeof e.length=="number")return{next:l(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function ee(e){if(!(e instanceof Array)){e=I(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}var re=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},ge;if(typeof Object.setPrototypeOf=="function")ge=Object.setPrototypeOf;else{var Ae;e:{var oe={a:!0},De={};try{De.__proto__=oe,Ae=De.a;break e}catch{}Ae=!1}ge=Ae?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var Ge=ge;function mt(e,t){if(e.prototype=re(t.prototype),e.prototype.constructor=e,Ge)Ge(e,t);else for(var n in t)if(n!="prototype")if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.Fk=t.prototype}function ln(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function xn(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}ln.prototype.s=function(e){this.h=e};function mn(e,t){e.i={Eg:t,Rg:!0},e.g=e.m||e.j}ln.prototype.return=function(e){this.i={return:e},this.g=this.j};function _(e,t,n){return e.g=n,{value:t}}ln.prototype.u=function(e){this.g=e};function le(e){e.g=0}function pe(e,t,n){e.m=t,n!=null&&(e.j=n)}function qe(e,t){e.m=0,e.j=t||0}function be(e,t,n){e.g=t,e.m=n||0}function ke(e,t){return e.m=t||0,t=e.i.Eg,e.i=null,t}function Ut(e){e.A=[e.i],e.m=0,e.j=0}function Ot(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.Rg?e.g=e.m||e.j:n.u!=null&&e.j<n.u?(e.g=n.u,e.i=null):e.g=e.j:e.g=t}function Ue(e){this.g=new ln,this.h=e}function gt(e,t){xn(e.g);var n=e.g.l;return n?Xe(e,"return"in n?n.return:function(r){return{value:r,done:!0}},t,e.g.return):(e.g.return(t),se(e))}function Xe(e,t,n,r){try{var i=t.call(e.g.l,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.g.o=!1,i;var o=i.value}catch(a){return e.g.l=null,mn(e.g,a),se(e)}return e.g.l=null,r.call(e.g,o),se(e)}function se(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(n){e.g.h=void 0,mn(e.g,n)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Rg)throw t.Eg;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function Ie(e){this.next=function(t){return xn(e.g),e.g.l?t=Xe(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=se(e)),t},this.throw=function(t){return xn(e.g),e.g.l?t=Xe(e,e.g.l.throw,t,e.g.s):(mn(e.g,t),t=se(e)),t},this.return=function(t){return gt(e,t)},this[Symbol.iterator]=function(){return this}}function Lt(e){function t(r){return e.next(r)}function n(r){return e.throw(r)}return new Promise(function(r,i){function o(a){a.done?r(a.value):Promise.resolve(a.value).then(t,n).then(o,i)}o(e.next())})}function G(e){return Lt(new Ie(new Ue(e)))}function It(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}A("Promise",function(e){function t(a){this.h=0,this.i=void 0,this.g=[],this.o=!1;var f=this.j();try{a(f.resolve,f.reject)}catch(p){f.reject(p)}}function n(){this.g=null}function r(a){return a instanceof t?a:new t(function(f){f(a)})}if(e)return e;n.prototype.h=function(a){if(this.g==null){this.g=[];var f=this;this.i(function(){f.l()})}this.g.push(a)};var i=v.setTimeout;n.prototype.i=function(a){i(a,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var a=this.g;this.g=[];for(var f=0;f<a.length;++f){var p=a[f];a[f]=null;try{p()}catch(g){this.j(g)}}}this.g=null},n.prototype.j=function(a){this.i(function(){throw a})},t.prototype.j=function(){function a(g){return function(m){p||(p=!0,g.call(f,m))}}var f=this,p=!1;return{resolve:a(this.F),reject:a(this.l)}},t.prototype.F=function(a){if(a===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof t)this.H(a);else{e:switch(typeof a){case"object":var f=a!=null;break e;case"function":f=!0;break e;default:f=!1}f?this.C(a):this.m(a)}},t.prototype.C=function(a){var f=void 0;try{f=a.then}catch(p){this.l(p);return}typeof f=="function"?this.I(f,a):this.m(a)},t.prototype.l=function(a){this.s(2,a)},t.prototype.m=function(a){this.s(1,a)},t.prototype.s=function(a,f){if(this.h!=0)throw Error("Cannot settle("+a+", "+f+"): Promise already settled in state"+this.h);this.h=a,this.i=f,this.h===2&&this.G(),this.A()},t.prototype.G=function(){var a=this;i(function(){if(a.B()){var f=v.console;typeof f<"u"&&f.error(a.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var a=v.CustomEvent,f=v.Event,p=v.dispatchEvent;return typeof p>"u"?!0:(typeof a=="function"?a=new a("unhandledrejection",{cancelable:!0}):typeof f=="function"?a=new f("unhandledrejection",{cancelable:!0}):(a=v.document.createEvent("CustomEvent"),a.initCustomEvent("unhandledrejection",!1,!0,a)),a.promise=this,a.reason=this.i,p(a))},t.prototype.A=function(){if(this.g!=null){for(var a=0;a<this.g.length;++a)o.h(this.g[a]);this.g=null}};var o=new n;return t.prototype.H=function(a){var f=this.j();a.Od(f.resolve,f.reject)},t.prototype.I=function(a,f){var p=this.j();try{a.call(f,p.resolve,p.reject)}catch(g){p.reject(g)}},t.prototype.then=function(a,f){function p(E,C){return typeof E=="function"?function(P){try{g(E(P))}catch(L){m(L)}}:C}var g,m,w=new t(function(E,C){g=E,m=C});return this.Od(p(a,g),p(f,m)),w},t.prototype.catch=function(a){return this.then(void 0,a)},t.prototype.Od=function(a,f){function p(){switch(g.h){case 1:a(g.i);break;case 2:f(g.i);break;default:throw Error("Unexpected state: "+g.h)}}var g=this;this.g==null?o.h(p):this.g.push(p),this.o=!0},t.resolve=r,t.reject=function(a){return new t(function(f,p){p(a)})},t.race=function(a){return new t(function(f,p){for(var g=I(a),m=g.next();!m.done;m=g.next())r(m.value).Od(f,p)})},t.all=function(a){var f=I(a),p=f.next();return p.done?r([]):new t(function(g,m){function w(P){return function(L){E[P]=L,C--,C==0&&g(E)}}var E=[],C=0;do E.push(void 0),C++,r(p.value).Od(w(E.length-1),m),p=f.next();while(!p.done)})},t});function kt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}A("WeakMap",function(e){function t(p){if(this.g=(f+=Math.random()+1).toString(),p){p=I(p);for(var g;!(g=p.next()).done;)g=g.value,this.set(g[0],g[1])}}function n(){}function r(p){var g=typeof p;return g==="object"&&p!==null||g==="function"}function i(p){if(!kt(p,a)){var g=new n;u(p,a,{value:g})}}function o(p){var g=Object[p];g&&(Object[p]=function(m){return m instanceof n?m:(Object.isExtensible(m)&&i(m),g(m))})}if(function(){if(!e||!Object.seal)return!1;try{var p=Object.seal({}),g=Object.seal({}),m=new e([[p,2],[g,3]]);return m.get(p)!=2||m.get(g)!=3?!1:(m.delete(p),m.set(g,4),!m.has(p)&&m.get(g)==4)}catch{return!1}}())return e;var a="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var f=0;return t.prototype.set=function(p,g){if(!r(p))throw Error("Invalid WeakMap key");if(i(p),!kt(p,a))throw Error("WeakMap key fail: "+p);return p[a][this.g]=g,this},t.prototype.get=function(p){return r(p)&&kt(p,a)?p[a][this.g]:void 0},t.prototype.has=function(p){return r(p)&&kt(p,a)&&kt(p[a],this.g)},t.prototype.delete=function(p){return r(p)&&kt(p,a)&&kt(p[a],this.g)?delete p[a][this.g]:!1},t}),A("Map",function(e){function t(){var f={};return f.Ub=f.next=f.head=f}function n(f,p){var g=f[1];return z(function(){if(g){for(;g.head!=f[1];)g=g.Ub;for(;g.next!=g.head;)return g=g.next,{done:!1,value:p(g)};g=null}return{done:!0,value:void 0}})}function r(f,p){var g=p&&typeof p;g=="object"||g=="function"?o.has(p)?g=o.get(p):(g=""+ ++a,o.set(p,g)):g="p_"+p;var m=f[0][g];if(m&&kt(f[0],g))for(f=0;f<m.length;f++){var w=m[f];if(p!==p&&w.key!==w.key||p===w.key)return{id:g,list:m,index:f,entry:w}}return{id:g,list:m,index:-1,entry:void 0}}function i(f){if(this[0]={},this[1]=t(),this.size=0,f){f=I(f);for(var p;!(p=f.next()).done;)p=p.value,this.set(p[0],p[1])}}if(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var f=Object.seal({x:4}),p=new e(I([[f,"s"]]));if(p.get(f)!="s"||p.size!=1||p.get({x:4})||p.set({x:4},"t")!=p||p.size!=2)return!1;var g=p.entries(),m=g.next();return m.done||m.value[0]!=f||m.value[1]!="s"?!1:(m=g.next(),!(m.done||m.value[0].x!=4||m.value[1]!="t"||!g.next().done))}catch{return!1}}())return e;var o=new WeakMap;i.prototype.set=function(f,p){f=f===0?0:f;var g=r(this,f);return g.list||(g.list=this[0][g.id]=[]),g.entry?g.entry.value=p:(g.entry={next:this[1],Ub:this[1].Ub,head:this[1],key:f,value:p},g.list.push(g.entry),this[1].Ub.next=g.entry,this[1].Ub=g.entry,this.size++),this},i.prototype.delete=function(f){return f=r(this,f),f.entry&&f.list?(f.list.splice(f.index,1),f.list.length||delete this[0][f.id],f.entry.Ub.next=f.entry.next,f.entry.next.Ub=f.entry.Ub,f.entry.head=null,this.size--,!0):!1},i.prototype.clear=function(){this[0]={},this[1]=this[1].Ub=t(),this.size=0},i.prototype.has=function(f){return!!r(this,f).entry},i.prototype.get=function(f){return(f=r(this,f).entry)&&f.value},i.prototype.entries=function(){return n(this,function(f){return[f.key,f.value]})},i.prototype.keys=function(){return n(this,function(f){return f.key})},i.prototype.values=function(){return n(this,function(f){return f.value})},i.prototype.forEach=function(f,p){for(var g=this.entries(),m;!(m=g.next()).done;)m=m.value,f.call(p,m[1],m[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var a=0;return i}),A("Set",function(e){function t(n){if(this.g=new Map,n){n=I(n);for(var r;!(r=n.next()).done;)this.add(r.value)}this.size=this.g.size}return function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var n=Object.seal({x:4}),r=new e(I([n]));if(!r.has(n)||r.size!=1||r.add(n)!=r||r.size!=1||r.add({x:4})!=r||r.size!=2)return!1;var i=r.entries(),o=i.next();return o.done||o.value[0]!=n||o.value[1]!=n?!1:(o=i.next(),o.done||o.value[0]==n||o.value[0].x!=4||o.value[1]!=o.value[0]?!1:i.next().done)}catch{return!1}}()?e:(t.prototype.add=function(n){return n=n===0?0:n,this.g.set(n,n),this.size=this.g.size,this},t.prototype.delete=function(n){return n=this.g.delete(n),this.size=this.g.size,n},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(n){return this.g.has(n)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(n,r){var i=this;this.g.forEach(function(o){return n.call(r,o,o,i)})},t)});function dn(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var o=n++;return{value:t(o,e[o]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}A("Array.prototype.keys",function(e){return e||function(){return dn(this,function(t){return t})}});function on(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var o=e[i];if(t.call(n,o,i,e))return{Pg:i,v:o}}return{Pg:-1,v:void 0}}A("Array.prototype.findIndex",function(e){return e||function(t,n){return on(this,t,n).Pg}}),A("Array.from",function(e){return e||function(t,n,r){n=n??function(f){return f};var i=[],o=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if(typeof o=="function"){t=o.call(t);for(var a=0;!(o=t.next()).done;)i.push(n.call(r,o.value,a++))}else for(o=t.length,a=0;a<o;a++)i.push(n.call(r,t[a],a));return i}}),A("Array.prototype.values",function(e){return e||function(){return dn(this,function(t,n){return n})}}),A("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),A("Array.prototype.includes",function(e){return e||function(t,n){var r=this;r instanceof String&&(r=String(r));var i=r.length;for(n=n||0,0>n&&(n=Math.max(n+i,0));n<i;n++){var o=r[n];if(o===t||Object.is(o,t))return!0}return!1}});function Sn(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}A("String.prototype.includes",function(e){return e||function(t,n){return Sn(this,t,"includes").indexOf(t,n||0)!==-1}}),A("String.fromCodePoint",function(e){return e||function(t){for(var n="",r=0;r<arguments.length;r++){var i=Number(arguments[r]);if(0>i||1114111<i||i!==Math.floor(i))throw new RangeError("invalid_code_point "+i);65535>=i?n+=String.fromCharCode(i):(i-=65536,n+=String.fromCharCode(i>>>10&1023|55296),n+=String.fromCharCode(i&1023|56320))}return n}}),A("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=I(n);for(var r;!(r=n.next()).done;)this.add(r.value)}}return function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),r=Object.seal({}),i=new e([n]);return!i.has(n)||i.has(r)?!1:(i.delete(n),i.add(r),!i.has(n)&&i.has(r))}catch{return!1}}()?e:(t.prototype.add=function(n){return this.g.set(n,!0),this},t.prototype.has=function(n){return this.g.has(n)},t.prototype.delete=function(n){return this.g.delete(n)},t)}),A("Array.prototype.find",function(e){return e||function(t,n){return on(this,t,n).v}}),A("String.prototype.startsWith",function(e){return e||function(t,n){var r=Sn(this,t,"startsWith"),i=r.length,o=t.length;n=Math.max(0,Math.min(n|0,r.length));for(var a=0;a<o&&n<i;)if(r[n++]!=t[a++])return!1;return a>=o}}),A("Object.entries",function(e){return e||function(t){var n=[],r;for(r in t)kt(t,r)&&n.push([r,t[r]]);return n}});var oi=typeof Object.assign=="function"?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)kt(r,i)&&(e[i]=r[i])}return e};A("Object.assign",function(e){return e||oi}),A("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(n){return Promise.resolve(t()).then(function(){return n})},function(n){return Promise.resolve(t()).then(function(){throw n})})}}),A("Array.prototype.entries",function(e){return e||function(){return dn(this,function(t,n){return[t,n]})}}),A("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),A("String.prototype.repeat",function(e){return e||function(t){var n=Sn(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var r="";t;)t&1&&(r+=n),(t>>>=1)&&(n+=n);return r}}),A("Number.EPSILON",function(){return Math.pow(2,-52)}),A("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),A("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),A("Object.values",function(e){return e||function(t){var n=[],r;for(r in t)kt(t,r)&&n.push(t[r]);return n}}),A("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),A("String.prototype.endsWith",function(e){return e||function(t,n){var r=Sn(this,t,"endsWith");n===void 0&&(n=r.length),n=Math.max(0,Math.min(n|0,r.length));for(var i=t.length;0<i&&0<n;)if(r[--n]!=t[--i])return!1;return 0>=i}}),A("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||t===0)return t;var n=Math.floor(Math.abs(t));return 0>t?-n:n}});var lc=this||self;function Me(e,t){e=e.split(".");var n=lc;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)e.length||t===void 0?n[r]&&n[r]!==Object.prototype[r]?n=n[r]:n=n[r]={}:n[r]=t}function sc(){}function nd(){}function Ju(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}Ju.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)};function Bs(e){return e.h/(1-Math.pow(e.g,e.i))}function Qu(){this.h=new Ju(2),this.j=new Ju(5),this.g=0,this.i=128e3,this.l=16e3}Qu.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},Qu.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},Qu.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(Bs(this.h),Bs(this.j))};function Ph(){}function Ti(){}function ft(){}function xi(e){var t=It.apply(1,arguments);id.has(e)||(id.add(e),ft.apply(Ph,ee(t)))}function rd(){}function rv(){}function iv(){}var id=new Set;T.console&&(ft=function(){return console.warn.apply(console,ee(It.apply(0,arguments)))},Ti=function(){console.error.apply(console,ee(It.apply(0,arguments)))});function Vs(){this.g={}}h=Vs.prototype,h.push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},h.get=function(e){return(e=this.g[e])?e.slice():null},h.remove=function(e,t){e in this.g&&(this.g[e]=this.g[e].filter(function(n){return n!=t}),this.g[e].length==0&&delete this.g[e])},h.forEach=function(e){for(var t in this.g)e(t,this.g[t])},h.size=function(){return Object.keys(this.g).length},h.keys=function(){return Object.keys(this.g)};function At(){this.g=new Vs}h=At.prototype,h.release=function(){this.La(),this.g=null},h.D=function(e,t,n,r){this.g&&(e=new Fs(e,t,n,r),this.g.push(t,e))},h.la=function(e,t,n,r){function i(a){o.bb(e,t,i),n(a)}var o=this;this.D(e,t,i,r)},h.bb=function(e,t,n){if(this.g){var r=this.g.get(t)||[];r=I(r);for(var i=r.next();!i.done;i=r.next())i=i.value,i.target!=e||n!=i.listener&&n||(i.bb(),this.g.remove(t,i))}},h.La=function(){if(this.g){var e=this.g,t=[],n;for(n in e.g)t.push.apply(t,ee(e.g[n]));for(e=I(t),t=e.next();!t.done;t=e.next())t.value.bb();this.g.g={}}},Me("shaka.util.EventManager",At),At.prototype.removeAll=At.prototype.La,At.prototype.unlisten=At.prototype.bb,At.prototype.listenOnce=At.prototype.la,At.prototype.listen=At.prototype.D,At.prototype.release=At.prototype.release;function Fs(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=Dh(e,r),this.target.addEventListener(t,n,this.g)}Fs.prototype.bb=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function Dh(e,t){if(t==null)return!1;if(typeof t=="boolean")return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(r){return!n.has(r)}),Ks(e)?t:t.capture||!1}function Ks(e){var t=Hl;if(t==null){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch{t=!1}Hl=t}return t||!1}var Hl=void 0;function Un(e){if(ac.has(e))return ac.get(e);var t=T.ManagedMediaSource||T.MediaSource;return t?(t=t.isTypeSupported(e),ac.set(e,t),t):!1}function vu(){var e=T.ManagedSourceBuffer||T.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType}var ac=new Map;function od(e,t){this.g=e,this.h=t}od.prototype.toString=function(){return"v"+this.g+"."+this.h};function Rt(e,t){var n=new od(5,0),r=cc,i=r.g,o=n.h-i.h;(0<(n.g-i.g||o)?r.i:r.h)(r.g,n,e,t)}function ud(e,t,n,r){ft([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function ld(e,t,n,r){Ti([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(" "))}var cc=null;function Zu(){}Zu.prototype.extract=function(){},Zu.prototype.decode=function(){return[]},Zu.prototype.clear=function(){},Zu.prototype.getStreams=function(){return[]};function mu(){}mu.prototype.init=function(){},mu.prototype.parse=function(){return[]};function Xi(){}function vo(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=Ze(e);t=Ze(t);for(var r=0;r<e.byteLength;r++)if(n[r]!=t[r])return!1;return!0}function zr(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function Ze(e,t,n){return n=n===void 0?1/0:n,Hs(e,t===void 0?0:t,n,Uint8Array)}function sd(e,t,n){return n=n===void 0?1/0:n,Hs(e,t===void 0?0:t,n,Uint16Array)}function wr(e,t,n){return n=n===void 0?1/0:n,Hs(e,t===void 0?0:t,n,DataView)}function Hs(e,t,n,r){var i=ArrayBuffer.isView(e)?e.buffer:e,o=1;"BYTES_PER_ELEMENT"in r&&(o=r.BYTES_PER_ELEMENT);var a=((e.byteOffset||0)+e.byteLength)/o;return e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/o,a))),new r(i,e,Math.floor(Math.min(e+Math.max(n,0),a))-e)}Me("shaka.util.BufferUtils",Xi),Xi.toDataView=wr,Xi.toUint16=sd,Xi.toUint8=Ze,Xi.toArrayBuffer=zr,Xi.equal=vo;function ql(){}ql.prototype.init=function(){},ql.prototype.i=function(){},ql.prototype.g=function(){},ql.prototype.j=function(){},Me("shaka.media.IClosedCaptionParser",ql);function nr(e){this.l=new mu,(e=Su[e.toLowerCase()])&&(this.l=e()),this.h=new Zu,(e=mo)&&(this.h=e())}nr.prototype.init=function(e,t){t!==void 0&&t||this.g(),this.l.init(e)},nr.prototype.i=function(e){e=this.l.parse(e),e=I(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=Ze(t.packet);0<n.length&&this.h.extract(n,t.pts)}return this.h.decode()},nr.prototype.g=function(){this.h.clear()},nr.prototype.j=function(){return this.h.getStreams()},Me("shaka.media.ClosedCaptionParser",nr),nr.findDecoder=function(){return mo},nr.unregisterDecoder=function(){mo=null},nr.registerDecoder=function(e){mo=e},nr.findParser=function(e){return Su[e]},nr.unregisterParser=function(e){delete Su[e]},nr.registerParser=function(e,t){Su[e]=t};var Su={},mo=null;function el(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Xn,this.scroll=qs}Me("shaka.text.CueRegion",el);var Xn=1;el.units={PX:0,PERCENTAGE:Xn,LINES:2};var qs="";el.scrollMode={NONE:qs,UP:"up"};function zs(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function Gr(e,t){t=e.indexOf(t),-1<t&&e.splice(t,1)}function Oh(e,t,n){if(n||(n=zs),e.length!=t.length)return!1;t=t.slice(),e=I(e);for(var r=e.next(),i={};!r.done;i={Tg:void 0},r=e.next()){if(i.Tg=r.value,r=t.findIndex(function(o){return function(a){return n(o.Tg,a)}}(i)),r==-1)return!1;t[r]=t[t.length-1],t.pop()}return t.length==0}function Gs(e,t,n){if(n||(n=zs),e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Y(e,t,n){var r=It.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=r,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(i){this.stack=i.stack}}Y.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},Me("shaka.util.Error",Y),Y.Severity={RECOVERABLE:1,CRITICAL:2},Y.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},Y.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Ii(e){this.h=e,this.g=void 0}Ii.prototype.value=function(){return this.g==null&&(this.g=this.h()),this.g};function ad(e,t){return e.length&&t.length&&e!==t?0<fc(e,t).length:!0}function fc(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=I(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=I(t),o=i.next();!o.done;o=i.next())if(o=o.value,r.keySystem==o.keySystem){i=new Map;for(var a=I((r.initData||[]).concat(o.initData||[])),f=a.next();!f.done;f=a.next())f=f.value,i.set(f.keyId,f);i=Array.from(i.values()),a=r.keyIds&&o.keyIds?new Set([].concat(ee(r.keyIds),ee(o.keyIds))):r.keyIds||o.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||o.persistentStateRequired,videoRobustness:r.videoRobustness||o.videoRobustness,audioRobustness:r.audioRobustness||o.audioRobustness,serverCertificate:r.serverCertificate||o.serverCertificate,serverCertificateUri:r.serverCertificateUri||o.serverCertificateUri,initData:i,keyIds:a});break}}return n}function Ws(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Xs=new Ii(function(){return zr(new Uint8Array([0]))}),Ys=new Map;function zl(e){this.h=e,this.g=null}zl.prototype.aa=function(e){var t=this;this.stop();var n=!0,r=null;return this.g=function(){T.clearTimeout(r),n=!1},r=T.setTimeout(function(){n&&t.h()},1e3*e),this},zl.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function st(e){this.h=e,this.g=null}st.prototype.Hb=function(){return this.stop(),this.h(),this},st.prototype.aa=function(e){var t=this;return this.stop(),this.g=new zl(function(){t.h()}).aa(e),this},st.prototype.Aa=function(e){var t=this;return this.stop(),this.g=new zl(function(){t.g.aa(e),t.h()}).aa(e),this},st.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},Me("shaka.util.Timer",st),st.prototype.stop=st.prototype.stop,st.prototype.tickEvery=st.prototype.Aa,st.prototype.tickAfter=st.prototype.aa,st.prototype.tickNow=st.prototype.Hb;function Yi(){var e=T.ManagedMediaSource||T.MediaSource;return!!(e&&e.isTypeSupported)}function $s(e){return bh().canPlayType(e)!=""}function In(){return!!navigator.userAgent.match(/Edge?\//)}function $i(){return Tt("Xbox One")}function Mr(){return Tt("Tizen")}function Js(){return Tt("Tizen 3")}function Wr(){return Tt("Web0S")}function Tr(){return Tt("CrKey")}function Qs(){if(!Tt("Chrome")||navigator.userAgent.match(/Edge\//))return null;var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}function So(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Mr()&&!Tt("PC=EOS")&&!Tt("PC=APL")&&!Tt("VirginMedia")&&!cd()&&!Ei()&&!Tt("AFT")&&!Tt("WPE")&&!Tt("DT_STB_BCM")&&!Tt("Sky_STB")}function Xr(){return Tt("PlayStation 5")}function Ei(){return Tt("PlayStation 4")}function Yr(){return Tt("Hisense")||Tt("VIDAA")}function cd(){return Tt("SOPOpenBrowser")}function wu(){if(!So())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function Rh(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="macos":navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1}function Tu(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function xu(){return Tt("Android")}function tl(){return!!(Mr()||Wr()||$i()||Ei()||Xr()||Tt("AFT")||Tt("PC=EOS")||Tt("PC=APL")||Tt("VirginMedia")||cd()||Tt("WPE")||Tr()||Yr()||Tt("DT_STB_BCM"))}function Tt(e){return(navigator.userAgent||"").includes(e)}function bh(){return Iu||(pc||(pc=new st(function(){Iu=null})),(Iu=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Iu=document.createElement("video")),pc.aa(1),Iu)}function Zs(e){return e?e===T.shakaMediaKeysPolyfill:!!T.shakaMediaKeysPolyfill}function dc(){var e,t,n,r,i,o,a,f,p,g,m,w,E,C,P;return G(function(L){switch(L.g){case 1:if(e={width:1/0,height:1/0},Tr()){if(w=T.cast&&cast.__platform__&&cast.__platform__.canDisplayType,e.width=1280,e.height=720,pe(L,14),!(E=w)){L.u(16);break}return _(L,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(Mr()){e.width=1920,e.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(t=webapis.systeminfo.getMaxVideoResolution(),e.width=t.width,e.height=t.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch{ft("Tizen: Error detecting screen size, default screen size 1920x1080.")}L.u(3);break}if(Wr()){try{n=JSON.parse(T.PalmSystem.deviceInfo),e.width=Math.max(1920,n.screenWidth),e.height=Math.max(1080,n.screenHeight)}catch{ft("WebOS: Error detecting screen size, default screen size 1920x1080."),e.width=1920,e.height=1080}L.u(3);break}if(Yr()){T.Hisense_Get4KSupportState&&T.Hisense_Get4KSupportState()?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),L.u(3);break}if(!Ei()&&!Xr()){r=void 0;try{r=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}if(r){e.width=1920,e.height=1080;try{i=new r.Media.Protection.ProtectionCapabilities,o=r.Media.Protection.ProtectionCapabilityResult,a=null;do a=i.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(a===o.maybe);a===o.probably&&(e.width=3840,e.height=2160)}catch{ft("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else $i()&&(e.width=1920,e.height=1080,ft("Xbox: Error detecting screen size, default screen size 1920x1080."));L.u(3);break}return f=!1,pe(L,8),_(L,T.msdk.device.getDisplayInfo(),10);case 10:p=L.h,f=p.resolution==="4K",be(L,9);break;case 8:return ke(L),pe(L,11),_(L,T.msdk.device.getDisplayInfoImmediate(),13);case 13:g=L.h,f=g.resolution==="4K",be(L,9);break;case 11:m=ke(L),ft("PlayStation: Failed to get the display info:",m);case 9:f?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),L.u(3);break;case 17:E=L.h;case 16:if(E){e.width=3840,e.height=2160,L.u(18);break}if(!(C=w)){L.u(19);break}return _(L,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:C=L.h;case 19:C&&(e.width=1920,e.height=1080);case 18:be(L,3);break;case 14:P=ke(L),Ti("Failed to check canDisplayType:",P);case 3:return L.return(e)}})}var pc=null,Iu=null;function Ji(){}function Qt(e){if(!e)return"";if(e=Ze(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),T.TextDecoder&&!Ei())return e=new TextDecoder().decode(e),e.includes("<22>")&&Ti('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var r=65533;if((e[n]&128)==0?r=e[n]:e.length>=n+2&&(e[n]&224)==192&&(e[n+1]&192)==128?(r=(e[n]&31)<<6|e[n+1]&63,n+=1):e.length>=n+3&&(e[n]&240)==224&&(e[n+1]&192)==128&&(e[n+2]&192)==128?(r=(e[n]&15)<<12|(e[n+1]&63)<<6|e[n+2]&63,n+=2):e.length>=n+4&&(e[n]&241)==240&&(e[n+1]&192)==128&&(e[n+2]&192)==128&&(e[n+3]&192)==128&&(r=(e[n]&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63,n+=3),65535>=r)t+=String.fromCharCode(r);else{r-=65536;var i=r&1023;t+=String.fromCharCode(55296+(r>>10)),t+=String.fromCharCode(56320+i)}}return t}function wo(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new Y(2,2,2004);n=Math.floor(e.byteLength/2);var r=new Uint16Array(n);e=wr(e);for(var i=0;i<n;i++)r[i]=e.getUint16(2*i,t);return ea(r)}function jt(e){function t(r){return n.byteLength<=r||32<=n[r]&&126>=n[r]}if(!e)return"";var n=Ze(e);if(n[0]==239&&n[1]==187&&n[2]==191)return Qt(n);if(n[0]==254&&n[1]==255)return wo(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return wo(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return wo(e,!1);if(n[1]==0&&n[3]==0)return wo(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Qt(e);throw new Y(2,2,2003)}function ui(e){if(T.TextEncoder&&!Ei()){var t=new TextEncoder;return zr(t.encode(e))}e=encodeURIComponent(e),e=unescape(e),t=new Uint8Array(e.length);for(var n=0;n<e.length;n++)t[n]=e[n].charCodeAt(0);return zr(t)}function hc(e,t){for(var n=new ArrayBuffer(2*e.length),r=new DataView(n),i=0;i<e.length;++i)r.setUint16(2*i,e.charCodeAt(i),t);return n}function ea(e){return fd.value()(e)}function ur(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":" ","‎":"","‏":""},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return i[1]=="#"?(i=i[2]=="x"||i[2]=="X"?parseInt(i.substring(3),16):parseInt(i.substring(2),10),0<=i&&1114111>=i?String.fromCodePoint(i):""):t[i]||"'"}):e||""}Me("shaka.util.StringUtils",Ji),Ji.resetFromCharCode=function(){fd.g=void 0},Ji.toUTF16=hc,Ji.toUTF8=ui,Ji.fromBytesAutoDetect=jt,Ji.fromUTF16=wo,Ji.fromUTF8=Qt;var fd=new Ii(function(){function e(n){try{var r=new Uint8Array(n);return 0<String.fromCharCode.apply(null,r).length}catch{return!1}}for(var t={jc:65536};0<t.jc;t={jc:t.jc},t.jc/=2)if(e(t.jc))return function(n){return function(r){for(var i="",o=0;o<r.length;o+=n.jc)i+=String.fromCharCode.apply(null,r.subarray(o,o+n.jc));return i}}(t);return null});function nl(e){this.h=e||"",this.g=0}function Eu(e){To(e,/[ \t]+/gm)}function To(e,t){return t.lastIndex=e.g,t=t.exec(e.h),t=t==null?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||t==null||t.position!=e.g?null:(e.g+=t.length,t.results)}function $r(e){return e.g==e.h.length?null:(e=To(e,/[^ \t\n]*/gm))?e[0]:null}function Ci(e){if(e=To(e,ta),e==null)return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function li(e){return e?Ci(new nl(e)):null}var ta=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Lr(e){function t(r){switch(typeof r){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return r;default:if(!r||ArrayBuffer.isView(r))return r;if(n.has(r))return null;var i=r.constructor==Array;if(r.constructor!=Object&&!i)return null;n.add(r);var o=i?[]:{},a;for(a in r)o[a]=t(r[a]);return i&&(o.length=r.length),o}}var n=new WeakSet;return t(e)}function Jr(e){var t={},n;for(n in e)t[n]=e[n];return t}function dd(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var r=n.toString(),i=e[n];i!==void 0&&(i=dd(i))&&t.push(r+":"+i)}e="["+t.join(",")+"]"}else if(typeof e=="function")e="";else if(e instanceof Object){for(n=Object.keys(e),n.sort(),t=[],n=I(n),r=n.next();!r.done;r=n.next())i=r.value,r=JSON.stringify(i),i=e[i],i!==void 0&&(i=dd(i))&&t.push(r+":"+i);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function Gl(e,t){var n=n===void 0?!1:n;return e=jt(e),Qi(e,t,n)}function Qi(e,t,n){return e=Mh(e,n===void 0?!1:n),!t&&e.length?e[0]:(e=e.find(function(r){return t.split(",").includes(r.tagName)}))?e:null}function pd(e){return ol.has(e)?ol.get(e):""}function Mh(e,t){function n(o,a){a=a===void 0?!1:a;for(var f=[];e[i];)if(e.charCodeAt(i)==60){if(e.charCodeAt(i+1)===47){a=i+2,i=e.indexOf(">",i),a=e.substring(a,i);var p=a.indexOf(o);if(p==-1){var g=o.indexOf(".");0<g&&(p=a.indexOf(o.substring(0,g)))}if(p==-1)throw o=e.substring(0,i).split(`
|
||
`),Error(`Unexpected close tag
|
||
Line: `+(o.length-1)+`
|
||
Column: `+(o[o.length-1].length+1)+`
|
||
Char: `+e[i]);i+1&&(i+=1);break}else if(e.charCodeAt(i+1)===33){if(e.charCodeAt(i+2)==45){for(;i!==-1&&(e.charCodeAt(i)!==62||e.charCodeAt(i-1)!=45||e.charCodeAt(i-2)!=45||i==-1);)i=e.indexOf(">",i+1);i===-1&&(i=e.length)}else if(e.charCodeAt(i+2)===91&&e.charCodeAt(i+8)===91&&e.substr(i+3,5).toLowerCase()==="cdata"){p=e.indexOf("]]>",i),p==-1?(f.push(e.substr(i+9)),i=e.length):(f.push(e.substring(i+9,p)),i=p+3);continue}i++;continue}e:{g=a,i++;var m=r(),w={};for(p=[];e.charCodeAt(i)!==62&&e[i];){var E=e.charCodeAt(i);if(64<E&&91>E||96<E&&123>E){E=r();for(var C=e.charCodeAt(i);C&&C!==39&&C!==34&&!(64<C&&91>C||96<C&&123>C)&&C!==62;)i++,C=e.charCodeAt(i);var P=i+1;if(i=e.indexOf(e[i],P),P=e.slice(P,i),C===39||C===34){if(i===-1){if(g={tagName:m,attributes:w,children:p,parent:null},t)for(m=0;m<p.length;m++)typeof p[m]!="string"&&(p[m].parent=g);p=g;break e}}else P=null,i--;if(E.startsWith("xmlns:")){C=P;var L=E.split(":")[1];ol.set(C,L),Yl.set(L,C)}m==="tt"&&E==="xml:space"&&P==="preserve"&&(g=!0),w[E]=P}i++}for(e.charCodeAt(i-1)!==47?(i++,p=n(m,g)):i++,g={tagName:m,attributes:w,children:p,parent:null},m=p.length,w=0;w<m;w++)E=p[w],typeof E!="string"?t&&(E.parent=g):w==m-1&&E==`
|
||
`&&p.pop();p=g}if(f.push(p),typeof p=="string")break;p.tagName[0]==="?"&&p.children&&(f.push.apply(f,ee(p.children)),p.children=[])}else p=i,i=e.indexOf("<",i)-1,i===-2&&(i=e.length),p=e.slice(p,i+1),a?0<p.length&&f.push(p):(f.length&&p.length==1&&p[0]==`
|
||
`||0<p.trim().length)&&f.push(p),i++;return f}function r(){for(var o=i;`\r
|
||
>/= `.indexOf(e[i])===-1&&e[i];)i++;return e.slice(o,i)}var i=0;return n("")}function rl(e){return typeof e=="string"}function hd(e){var t=[];if(!e.children)return[];e=I(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function bt(e,t){var n=[];if(!e.children)return[];e=I(e.children);for(var r=e.next();!r.done;r=e.next())r=r.value,r.tagName===t&&n.push(r);return n}function sn(e){return typeof e=="string"?ur(e):(e=e.children.reduce(function(t,n){return typeof n=="string"?t+n:t},""),e===""?null:ur(e))}function rr(e){return Array.from(e.children).every(function(t){return typeof t=="string"})?((e=sn(e))&&(e=e.trim()),e):null}function xr(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=I(e.children);for(var r=e.next();!r.done;r=e.next())xr(r.value,t,n)}return n}function pn(e,t){return e=bt(e,t),e.length!=1?null:e[0]}function ki(e,t,n){return e=na(e,t,n),e.length!=1?null:e[0]}function rt(e,t,n,r){r=r===void 0?null:r;var i=null;return e=e.attributes[t],e!=null&&(i=n(e)),i??r}function Zi(e,t,n){return t=pd(t),e.attributes[t+":"+n]||null}function na(e,t,n){var r=pd(t);if(t=[],e.children)for(n=r?r+":"+n:n,e=I(e.children),r=e.next();!r.done;r=e.next())(r=r.value)&&r.tagName===n&&t.push(r);return t}function Ai(e,t,n){t=I(t);for(var r=t.next();!r.done;r=t.next())if(r=Zi(e,r.value,n))return r;return null}function Fo(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function lr(e){return!e||(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(e),!e)?null:(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null)}function Wl(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return!t||(e=Number(t[1]),!isFinite(e))?null:(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null)}function sr(e){return e=Number(e),e%1===0?e:null}function xo(e){return e=Number(e),e%1===0&&0<e?e:null}function jn(e){return e=Number(e),e%1===0&&0<=e?e:null}function il(e){return e=Number(e),isNaN(e)?null:e}function ra(e){return e?e.toLowerCase()==="true":!1}function si(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function Ko(e){var t=[];e=ur(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=I(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=n.match(/^([\w]+)/);if(r){var i=n.match(/(@id='(.*?)')/),o=n.match(/(@t='(\d+)')/),a=n.match(/(@n='(\d+)')/),f=n.match(/\[(\d+)\]/);t.push({name:r[0],id:i?i[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:o?Number(o[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:a?Number(a[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:f?Number(f[1])-1:null,Yb:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].Yb=n.slice(1))}return t}function yc(e,t){var n=Ko(t.attributes.sel||"");if(n.length){var r=n[n.length-1],i=t.attributes.pos||null;n=r.position,n==null&&(r.t!==null&&(n=Xl(e,"t",r.t)),r.n!==null&&(n=Xl(e,"n",r.n))),n===null?n=i==="prepend"?0:e.length:i==="prepend"?--n:i==="after"&&++n,i=t.tagName,(r=r.Yb)&&e[n]?Lh(e[n],i,r,rr(t)||""):(i!=="remove"&&i!=="replace"||e.splice(n,1),i!=="add"&&i!=="replace"||e.splice.apply(e,[n,0].concat(ee(t.children))))}}function Xl(e,t,n){var r=0;e=I(e);for(var i=e.next();!i.done;i=e.next()){if(Number(i.value.attributes[t])===n)return r;r++}return null}function Lh(e,t,n,r){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=r)}function gc(e){var t="",n=e.tagName.split(":");0<n.length&&(t=n[0],t=Yl.has(t)?Yl.get(t):""),t=document.createElementNS(t,e.tagName);for(var r in e.attributes)t.setAttribute(r,e.attributes[r]);for(e=I(e.children),r=e.next();!r.done;r=e.next())r=r.value,n=void 0,typeof r=="string"?n=new Text(r):n=gc(r),t.appendChild(n);return t}function ia(e){if(!e)return null;var t={tagName:e.tagName,attributes:Jr(e.attributes),children:[],parent:null};e=I(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=ia(n),n.parent=t),t.children.push(n);return t}var ol=new Map,Yl=new Map;function zt(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new el,this.position=null,this.positionAlign=wc,this.size=0,this.textAlign=Io,this.direction=la,this.writingMode=ul,this.lineInterpretation=ll,this.line=null,this.lineHeight="",this.lineAlign=sl,this.displayAlign=ua,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Bh,this.fontStyle=vd,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={nc:32,rows:15}}function Nh(e,t){return e=new zt(e,t,""),e.lineBreak=!0,e}zt.prototype.clone=function(){var e=new zt(0,0,""),t;for(t in this)e[t]=this[t],e[t]&&e[t].constructor==Array&&(e[t]=e[t].slice());return e};function vc(e,t){if(e.startTime!=t.startTime||e.endTime!=t.endTime||e.payload!=t.payload)return!1;for(var n in e)if(n!="startTime"&&n!="endTime"&&n!="payload"){if(n=="nestedCues"){if(!Gs(e.nestedCues,t.nestedCues,vc))return!1}else if(n=="region"||n=="cellResolution"){for(var r in e[n])if(e[n][r]!=t[n][r])return!1}else if(Array.isArray(e[n])){if(!Gs(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function mc(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&Sc(t);var r=n;n=[];for(var i=-1,o=0;o<r.length;o++)r[o]==="<"?i=o+1:r[o]===">"&&0<i&&(i=r.substr(i,o-i),i.match(uv)&&n.push(i),i=-1);for(n=I(n),o=n.next();!o.done;o=n.next())o=o.value,r=r.replace("<"+o+">",'<div time="'+o+'">'),r+="</div>";e:{o=r,i=[];var a=-1;n="",r=!1;for(var f=0;f<o.length;f++)if(o[f]==="/"){var p=o.indexOf(">",f);if(p===-1){n=o;break e}if((p=o.substring(f+1,p))&&p=="v"){r=!0;var g=null;if(i.length&&(g=i[i.length-1]),g){if(g===p)n+="/"+p+">";else{if(!g.startsWith("v")){n+=o[f];continue}n+="/"+g+">"}f+=p.length+1}else n+=o[f]}else n+=o[f]}else o[f]==="<"?(a=f+1,o[a]!="v"&&(a=-1)):o[f]===">"&&0<a&&(i.push(o.substr(a,f-a)),a=-1),n+=o[f];for(o=I(i),i=o.next();!i.done;i=o.next())i=i.value,a=i.replace(" ",".voice-"),n=n.replace("<"+i+">","<"+a+">"),n=n.replace("</"+i+">","</"+a+">"),r||(n+="</"+a+">")}n=ov(n),e.payload="";try{var m=Qi("<span>"+n+"</span>","span")}catch{}if(m)if(m=m.children,m.length!=1||m[0].tagName)for(m=I(m),n=m.next();!n.done;n=m.next())_h(n.value,e,t);else e.payload=ur(n);else e.payload=ur(n)}else e.payload=ur(n)}function Sc(e){for(var t=I(Object.entries(jh)),n=t.next();!n.done;n=t.next()){var r=I(n.value);n=r.next().value,r=r.next().value;var i=new zt(0,0,"");i.color=r,e.set("."+n,i)}for(t=I(Object.entries(gd)),n=t.next();!n.done;n=t.next())r=I(n.value),n=r.next().value,r=r.next().value,i=new zt(0,0,""),i.backgroundColor=r,e.set("."+n,i)}function ov(e){var t={"< ":""," >":" >"},n=/(< +>|<\s|\s>)/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return t[i]||""}):e||""}function _h(e,t,n){var r=t.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new el,r.position=null,r.size=0,r.textAlign=Io,e.tagName)for(var i=I(e.tagName.split(/(?=[ .])+/g)),o=i.next();!o.done;o=i.next()){var a=o=o.value;if(a.startsWith(".voice-")){var f=a.split("-").pop();a='v[voice="'+f+'"]',n.has(a)||(a="v[voice="+f+"]")}switch(n.has(a)&&(f=r,a=n.get(a))&&(f.backgroundColor=oa(a.backgroundColor,f.backgroundColor),f.color=oa(a.color,f.color),f.fontFamily=oa(a.fontFamily,f.fontFamily),f.fontSize=oa(a.fontSize,f.fontSize),f.textShadow=oa(a.textShadow,f.textShadow),f.fontWeight=a.fontWeight,f.fontStyle=a.fontStyle,f.opacity=a.opacity,f.rubyTag=a.rubyTag,f.textCombineUpright=a.textCombineUpright,f.wrapLine=a.wrapLine),o){case"br":r=Nh(r.startTime,r.endTime),t.nestedCues.push(r);return;case"b":r.fontWeight=$l;break;case"i":r.fontStyle=Jl;break;case"u":r.textDecoration.push(Ho);break;case"font":(o=e.attributes.color)&&(r.color=o);break;case"div":if(o=e.attributes.time,!o)break;(o=li(o))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}if(i=e.children,rl(e)||i.length==1&&rl(i[0]))for(n=sn(e).split(`
|
||
`),e=!0,n=I(n),i=n.next();!i.done;i=n.next())i=i.value,e||(e=Nh(r.startTime,r.endTime),t.nestedCues.push(e)),0<i.length&&(e=r.clone(),e.payload=ur(i),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(r),t=I(i),e=t.next();!e.done;e=t.next())_h(e.value,r,n)}function oa(e,t){return e&&0<e.length?e:t}Me("shaka.text.Cue",zt),zt.parseCuePayload=mc,zt.equal=vc,zt.prototype.clone=zt.prototype.clone;var wc="auto";zt.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:wc};var Io="center",Tc={LEFT:"left",RIGHT:"right",CENTER:Io,START:"start",END:"end"};zt.textAlign=Tc;var ua="after",Uh={BEFORE:"before",CENTER:"center",AFTER:ua};zt.displayAlign=Uh;var la="ltr";zt.direction={HORIZONTAL_LEFT_TO_RIGHT:la,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ul="horizontal-tb";zt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ul,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ll=0;zt.lineInterpretation={LINE_NUMBER:ll,PERCENTAGE:1};var sl="start",yd={CENTER:"center",START:sl,END:"end"};zt.lineAlign=yd;var jh={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};zt.defaultTextColor=jh;var gd={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};zt.defaultTextBackgroundColor=gd;var Bh=400,$l=700;zt.fontWeight={NORMAL:Bh,BOLD:$l};var vd="normal",Jl="italic",Vh={NORMAL:vd,ITALIC:Jl,OBLIQUE:"oblique"};zt.fontStyle=Vh;var Ho="underline";zt.textDecoration={UNDERLINE:Ho,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var uv=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Eo(){}Eo.prototype.destroy=function(){};function ai(e,t,n){xc[e.toLowerCase().split(";")[0]+"-"+n]={priority:n,ne:t}}function Cu(e,t){for(var n=e.toLowerCase().split(";")[0],r=I([md,Ec,Ic,qo]),i=r.next();!i.done;i=r.next())if(i=xc[n+"-"+i.value]){var o=i.ne(),a=o.isSupported(e,t);if(o.destroy(),a)return i.ne}return null}Me("shaka.transmuxer.TransmuxerEngine",Eo),Eo.findTransmuxer=Cu,Eo.unregisterTransmuxer=function(e,t){delete xc[e.toLowerCase().split(";")[0]+"-"+t]},Eo.registerTransmuxer=ai,Eo.prototype.destroy=Eo.prototype.destroy;var xc={},qo=1,Ic=2,Ec=3,md=4;Eo.PluginPriority={FALLBACK:qo,PREFERRED_SECONDARY:Ic,PREFERRED:Ec,APPLICATION:md};/*
|
||
@license
|
||
Copyright 2008 The Closure Library Authors
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/var Ql=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
||
@license
|
||
Copyright 2006 The Closure Library Authors
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/function hn(e){var t;e instanceof hn?(Cc(this,e.Gb),this.Dc=e.Dc,kc(this,e.ub),Ac(this,e.Xc),this.Za=e.Za,ku(this,e.g.clone()),this.oc=e.oc):e&&(t=String(e).match(Ql))?(Cc(this,t[1]||"",!0),this.Dc=zo(t[2]||""),kc(this,t[3]||"",!0),Ac(this,t[4]),this.Za=zo(t[5]||"",!0),ku(this,t[6]||"",!0),this.oc=zo(t[7]||"")):this.g=new al(null)}h=hn.prototype,h.Gb="",h.Dc="",h.ub="",h.Xc=null,h.Za="",h.oc="",h.toString=function(){var e=[],t=this.Gb;if(t&&e.push(Go(t,sa,!0),":"),t=this.ub){e.push("//");var n=this.Dc;n&&e.push(Go(n,sa,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.Xc,t!=null&&e.push(":",String(t))}return(t=this.Za)&&(this.ub&&t.charAt(0)!="/"&&e.push("/"),e.push(Go(t,t.charAt(0)=="/"?Fh:sv,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.oc)&&e.push("#",Go(t,wd)),e.join("")},h.resolve=function(e){var t=this.clone();t.Gb==="data"&&(t=new hn);var n=!!e.Gb;n?Cc(t,e.Gb):n=!!e.Dc,n?t.Dc=e.Dc:n=!!e.ub,n?kc(t,e.ub):n=e.Xc!=null;var r=e.Za;if(n)Ac(t,e.Xc);else if(n=!!e.Za){if(r.charAt(0)!="/")if(this.ub&&!this.Za)r="/"+r;else{var i=t.Za.lastIndexOf("/");i!=-1&&(r=t.Za.substr(0,i+1)+r)}if(r==".."||r==".")r="";else if(r.indexOf("./")!=-1||r.indexOf("/.")!=-1){i=r.lastIndexOf("/",0)==0,r=r.split("/");for(var o=[],a=0;a<r.length;){var f=r[a++];f=="."?i&&a==r.length&&o.push(""):f==".."?((1<o.length||o.length==1&&o[0]!="")&&o.pop(),i&&a==r.length&&o.push("")):(o.push(f),i=!0)}r=o.join("/")}}return n?t.Za=r:n=e.g.toString()!=="",n?ku(t,e.g.clone()):n=!!e.oc,n&&(t.oc=e.oc),t},h.clone=function(){return new hn(this)};function Cc(e,t,n){e.Gb=n?zo(t,!0):t,e.Gb&&(e.Gb=e.Gb.replace(/:$/,""))}function kc(e,t,n){e.ub=n?zo(t,!0):t}function Ac(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Xc=t}else e.Xc=null}function ku(e,t,n){t instanceof al?e.g=t:(n||(t=Go(t,Sd)),e.g=new al(t))}function zo(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Go(e,t,n){return e!=null?(e=encodeURI(e).replace(t,lv),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function lv(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var sa=/[#\/\?@]/g,sv=/[#\?:]/g,Fh=/[#\?]/g,Sd=/[#\?@]/g,wd=/#/g;function al(e){this.g=e||null}function aa(e){if(!e.Ra&&(e.Ra={},e.hd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];o=decodeURIComponent(o.replace(/\+/g," ")),i=i||"",e.add(o,decodeURIComponent(i.replace(/\+/g," ")))}}h=al.prototype,h.Ra=null,h.hd=null;function Td(e){return aa(e),e.hd}h.add=function(e,t){aa(this),this.g=null;var n=this.Ra.hasOwnProperty(e)?this.Ra[e]:null;return n||(this.Ra[e]=n=[]),n.push(t),this.hd++,this},h.set=function(e,t){return aa(this),this.g=null,this.Ra.hasOwnProperty(e)?this.Ra[e]=[t]:this.add(e,t),this},h.get=function(e){return aa(this),this.Ra[e]||[]},h.toString=function(){if(this.g)return this.g;if(!this.Ra)return"";var e=[],t;for(t in this.Ra)for(var n=encodeURIComponent(t),r=this.Ra[t],i=0;i<r.length;i++){var o=n;r[i]!==""&&(o+="="+encodeURIComponent(r[i])),e.push(o)}return this.g=e.join("&")},h.clone=function(){var e=new al;if(e.g=this.g,this.Ra){var t={},n;for(n in this.Ra)t[n]=this.Ra[n].concat();e.Ra=t,e.hd=this.hd}return e};function ar(){}function Pc(e){return e=ea(Ze(e)),btoa(e)}function Wo(e,t){return t=t??!0,e=Pc(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function ci(e){e=T.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}function cl(e){for(var t=e.length/2,n=new Uint8Array(t),r=0;r<t;r++)n[r]=T.parseInt(e.substr(2*r,2),16);return n}function Yn(e){var t=Ze(e);e="",t=I(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n=n.toString(16),n.length==1&&(n="0"+n),e+=n;return e}function rn(){for(var e=It.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var r=n=0;r<e.length;++r){var i=e[r];ArrayBuffer.isView(i)&&i.BYTES_PER_ELEMENT===1?t.set(i,n):t.set(Ze(i),n),n+=i.byteLength}return t}Me("shaka.util.Uint8ArrayUtils",ar),ar.concat=rn,ar.toHex=Yn,ar.fromHex=cl,ar.fromBase64=ci,ar.toBase64=Wo,ar.toStandardBase64=Pc;function Pn(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;if(e.length==1&&t.length==1){var r=new hn(e[0]);return t=new hn(t[0]),t=r.resolve(t),n&&ku(t,n),[t.toString()]}t=t.map(function(f){return new hn(f)}),r=[],e=I(e);for(var i=e.next();!i.done;i=e.next()){i=new hn(i.value);for(var o=I(t),a=o.next();!a.done;a=o.next())a=i.resolve(a.value),n&&ku(a,n),r.push(a.toString())}return r}function Xo(e,t,n,r){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},r&&(e.keySystemUris=new Set([r])),e}function xd(e,t){t=t===void 0?"cenc":t;var n=[],r=[],i=[];e.forEach(function(a,f){var p=f;p.length!=22&&(p=Wo(cl(f),!1));var g=a;g.length!=22&&(g=Wo(cl(a),!1)),a={kty:"oct",kid:p,k:g},n.push(a),r.push(a.kid),i.push(f)}),e=JSON.stringify({keys:n});var o=JSON.stringify({kids:r});return o=[{initData:Ze(ui(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+T.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(i)}}function ca(e,t){if(t.length==1)return t[0];if(e=cr(e,t),e!=null)return e;throw new Y(2,4,4025,t)}function cr(e,t){for(var n=I(Zl[e]),r=n.next();!r.done;r=n.next()){r=r.value;for(var i=I(t),o=i.next();!o.done;o=i.next())if(o=o.value,r.test(o.trim()))return o.trim()}return e==at?"":null}function Id(e,t){var n=[];e=I(Zl[e]);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=I(t),o=i.next();!o.done;o=i.next())o=o.value,r.test(o.trim())&&n.push(o.trim())}return n}var at="text",an={oa:"video",W:"audio",wa:at,Pe:"image",zj:"application"},Ed=1/15,Zl={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function fa(){}function yn(e,t){var n=e;return t&&!Cr.includes(e)&&(n+='; codecs="'+t+'"'),n}function Yo(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Au(e,t,n){var r=yn(e,t);return t=Yo(e,t),Cu(t)?(e=Cu(t))?(e=e(),n=e.convertCodecs(n,t),e.destroy()):n=t:n=e!="video/mp2t"&&n=="audio"?r.replace("video","audio"):r,n}function Cd(e,t,n){var r=[t];return Kh.forEach(function(i,o){var a=e[o];o=="codecs"?Cr.includes(e.mimeType)||r.push('codecs="'+n+'"'):a&&r.push(i+'="'+a+'"')}),e.hdr=="PQ"&&r.push('eotf="smpte2084"'),r.join(";")}function da(e){return e.split(";")[0].split("/")[1]}function bn(e){var t=kd(e);switch(e=t[0],t=t[1].toLowerCase(),!0){case(e==="mp4a"&&t==="69"):case(e==="mp4a"&&t==="6b"):case(e==="mp4a"&&t==="40.34"):return"mp3";case(e==="mp4a"&&t==="66"):case(e==="mp4a"&&t==="67"):case(e==="mp4a"&&t==="68"):case(e==="mp4a"&&t==="40.2"):case(e==="mp4a"&&t==="40.02"):case(e==="mp4a"&&t==="40.5"):case(e==="mp4a"&&t==="40.05"):case(e==="mp4a"&&t==="40.29"):case(e==="mp4a"&&t==="40.42"):return"aac";case(e==="mp4a"&&t==="a5"):return"ac-3";case(e==="mp4a"&&t==="a6"):return"ec-3";case(e==="mp4a"&&t==="b2"):return"dtsx";case(e==="mp4a"&&t==="a9"):return"dtsc";case e==="vp09":return"vp9";case e==="avc1":case e==="avc3":return"avc";case e==="hvc1":case e==="hev1":return"hevc";case e==="vvc1":case e==="vvi1":return"vvc";case e==="dvh1":case e==="dvhe":return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case e==="dvav":case e==="dva1":return"dovi-avc";case e==="dav1":return"dovi-av1";case e==="dvc1":case e==="dvi1":return"dovi-vvc"}return e}function $o(e){var t=[];e=I(e.split(","));for(var n=e.next();!n.done;n=e.next())n=kd(n.value),t.push(n[0]);return t.sort().join(",")}function Ir(e){return e.split(";")[0]}function Er(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function Dc(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"}function kd(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}Me("shaka.util.MimeUtils",fa),fa.getFullTypeWithAllCodecs=Yo,fa.getFullType=yn;var Kh=new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Cr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function eo(e){this.i=null,this.j=e,this.B=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function Pu(e){return gn[e]?!0:e=="application/cea-608"||e=="application/cea-708"?!!mo:!1}eo.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()};function av(e,t,n,r,i){var o,a,f,p,g,m,w;return G(function(E){if(E.g==1)return _(E,Promise.resolve(),2);if(!e.i||!e.j)return E.return();if(n==null||r==null)return e.i.parseInit(Ze(t)),E.return();for(o=e.B?n:e.s,a={periodStart:e.s,segmentStart:n,segmentEnd:r,vttOffset:o},f=e.i.parseMedia(Ze(t),a,i,[]),p=I(f),g=p.next();!g.done;g=p.next())m=g.value,e.A(m,i||null,a);w=f.filter(function(C){return C.startTime>=e.l&&C.startTime<e.m}),e.j.append(w),e.g==null&&(e.g=Math.max(n,e.l)),e.h=Math.min(r,e.m),le(E)})}eo.prototype.remove=function(e,t){var n=this;return G(function(r){if(r.g==1)return _(r,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||n.g==null||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),le(r)})};function cv(e,t,n){e.l=t,e.m=n}function es(e,t,n){if(e.C=t,t=e.o.get(t))for(var r=I(t.keys()),i=r.next();!i.done;i=r.next())(i=t.get(i.value).filter(function(o){return o.endTime<=n}))&&e.j.append(i)}function Hh(e,t,n){t.startTime+=n,t.endTime+=n,t=I(t.nestedCues);for(var r=t.next();!r.done;r=t.next())Hh(e,r.value,n)}function qh(e,t,n,r,i){var o=n+" "+r,a=new Map;t=I(t);for(var f=t.next();!f.done;f=t.next()){var p=f.value;f=p.stream,p=p.cue,a.has(f)||a.set(f,new Map),a.get(f).has(o)||a.get(f).set(o,[]),Hh(e,p,i),p.startTime>=e.l&&p.startTime<e.m&&(a.get(f).get(o).push(p),f==e.C&&e.j.append([p]))}for(i=I(a.keys()),o=i.next();!o.done;o=i.next())for(o=o.value,e.o.has(o)||e.o.set(o,new Map),t=I(a.get(o).keys()),f=t.next();!f.done;f=t.next())f=f.value,p=a.get(o).get(f),e.o.get(o).set(f,p);e.g=e.g==null?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(r,e.m))}Me("shaka.text.TextEngine",eo),eo.prototype.destroy=eo.prototype.destroy,eo.findParser=function(e){return gn[e]},eo.unregisterParser=function(e){delete gn[e]},eo.registerParser=function(e,t){gn[e]=t};var gn={};function En(e,t){return e.concat(t)}function Ad(){}function to(e){return e!=null}function Jo(e,t){return Promise.race([t,new Promise(function(n,r){new st(r).aa(e)})])}function fi(){}function Du(e,t){return e=Et(e),t=Et(t),e.split("-")[0]==t.split("-")[0]}function Qo(e,t){return e=Et(e),t=Et(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function ts(e,t){return e=Et(e),t=Et(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function Et(e){e=I(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=I(t.split("-"));return t=n.next().value,t=t===void 0?"":t,n=n.next().value,n=n===void 0?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=ha.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function Ou(e,t){return e=Et(e),t=Et(t),t==e?4:Qo(t,e)?3:ts(t,e)?2:Qo(e,t)?1:0}function Pd(e){var t=e.indexOf("-");return e=0<=t?e.substring(0,t):e,e=e.toLowerCase(),e=ha.get(e)||e}function Dd(e){return e.language?Et(e.language):e.audio&&e.audio.language?Et(e.audio.language):e.video&&e.video.language?Et(e.video.language):"und"}function pa(e,t){e=Et(e);var n=new Set;t=I(t);for(var r=t.next();!r.done;r=t.next())n.add(Et(r.value));for(t=I(n),r=t.next();!r.done;r=t.next())if(r=r.value,r==e)return r;for(t=I(n),r=t.next();!r.done;r=t.next())if(r=r.value,Qo(r,e))return r;for(t=I(n),r=t.next();!r.done;r=t.next())if(r=r.value,ts(r,e))return r;for(n=I(n),t=n.next();!t.done;t=n.next())if(t=t.value,Qo(e,t))return t;return null}Me("shaka.util.LanguageUtils",fi),fi.findClosestLocale=pa,fi.getLocaleForVariant=Dd,fi.getLocaleForText=function(e){return Et(e.language||"und")},fi.getBase=Pd,fi.relatedness=Ou,fi.areSiblings=function(e,t){var n=Pd(e),r=Pd(t);return e!=n&&t!=r&&n==r},fi.normalize=Et,fi.isSiblingOf=ts,fi.isParentOf=Qo,fi.areLanguageCompatible=Du,fi.areLocaleCompatible=function(e,t){return e=Et(e),t=Et(t),e==t};var ha=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ya(){}function Oc(e,t,n,r,i){if(i.length){var o=e.textStreams;i=I(i);for(var a=i.next(),f={};!a.done;f={hg:void 0},a=i.next())if(f.hg=a.value,a=o.filter(function(L){return function(M){return!!(M.codecs.startsWith(L.hg)||M.mimeType.startsWith(L.hg))}}(f)),a.length){o=a;break}e.textStreams=o}if(o=e.variants,(t.length||n.length)&&(o=Od(o,t,n)),r.length){for(t=new Vs,n=I(o),o=n.next();!o.done;o=n.next())o=o.value,t.push(String(o.video.width||0),o);var p=[];t.forEach(function(L,M){L=0;var B=[];M=I(M);for(var U=M.next(),K={};!U.done;K={Ie:void 0},U=M.next())K.Ie=U.value,U=r.filter(function(W){return function(X){return W.Ie.decodingInfos[0][X]}}(K)).length,U>L?(L=U,B=[K.Ie]):U==L&&B.push(K.Ie);p.push.apply(p,ee(B))}),o=p}for(n=new Set,t=new Set,o=I(o),i=o.next();!i.done;i=o.next())i=i.value,i.audio&&n.add(i.audio),i.video&&t.add(i.video);o=Array.from(n).sort(function(L,M){return L.bandwidth-M.bandwidth});var g=[];for(n=new Map,o=I(o),i=o.next();!i.done;i=o.next()){if(i=i.value,a=i.language+(i.channelsCount||0)+(i.audioSamplingRate||0)+i.roles.join(",")+i.label+i.groupId+i.fastSwitching,f=n.get(a)||[],f.length){var m=f[f.length-1],w=bn(m.codecs),E=bn(i.codecs);w!=E||i.bandwidth&&m.bandwidth&&!(i.bandwidth>m.bandwidth)||(f.push(i),g.push(i.id))}else f.push(i),g.push(i.id);n.set(a,f)}var C={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};o=Array.from(t).sort(function(L,M){if(!L.bandwidth||!M.bandwidth||L.bandwidth==M.bandwidth){if(L.codecs&&M.codecs&&L.codecs!=M.codecs&&L.width==M.width){var B=bn(L.codecs),U=bn(M.codecs);if(B!=U)return(C[B]||1)-(C[U]||1)}return L.width-M.width}return L.bandwidth-M.bandwidth}),t=vu();var P=[];for(n=new Map,o=I(o),i=o.next();!i.done;i=o.next()){if(i=i.value,a=Math.round(i.frameRate||0)+(i.hdr||"")+i.fastSwitching,f=n.get(a)||[],f.length){if(m=f[f.length-1],!t&&(w=bn(m.codecs),E=bn(i.codecs),w!==E))continue;i.width>m.width||i.height>m.height?(f.push(i),P.push(i.id)):i.width==m.width&&i.height==m.height&&(w=bn(m.codecs),E=bn(i.codecs),w!=E||i.bandwidth&&m.bandwidth&&!(i.bandwidth>m.bandwidth)||(f.push(i),P.push(i.id)))}else f.push(i),P.push(i.id);n.set(a,f)}e.variants=e.variants.filter(function(L){var M=L.audio;return L=L.video,!(M&&!g.includes(M.id)||L&&!P.includes(L.id))})}function Od(e,t,n){t=I(t);for(var r=t.next(),i={};!r.done;i={Dh:void 0},r=t.next())if(i.Dh=r.value,r=e.filter(function(o){return function(a){return a.video&&a.video.codecs.startsWith(o.Dh)}}(i)),r.length){e=r;break}for(n=I(n),t=n.next(),r={};!t.done;r={tg:void 0},t=n.next())if(r.tg=t.value,t=e.filter(function(o){return function(a){return a.audio&&a.audio.codecs.startsWith(o.tg)}}(r)),t.length){e=t;break}return e}function Rd(e,t,n){e.variants=e.variants.filter(function(r){return ns(r,t,n)})}function ns(e,t,n){function r(f,p,g){return f>=p&&f<=g}var i=e.video;if(i&&i.width&&i.height){var o=i.width,a=i.height;if(a>o&&(a=I([a,o]),o=a.next().value,a=a.next().value),!r(o,t.minWidth,Math.min(t.maxWidth,n.width))||!r(a,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!r(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function fv(e,t,n,r){return n=n===void 0?[]:n,r=r===void 0?{}:r,G(function(i){return i.g==1?_(i,bd(e,t,0<t.offlineSessionIds.length,n,r),2):(Zo(t),_(i,Ld(t),0))})}function bd(e,t,n,r,i){var o,a;return G(function(f){if(f.g==1)return $i()&&dv(t.variants),_(f,Md(t.variants,n,!1,r),2);o=null,e&&(a=e.h)&&(o=a.keySystem),t.variants=t.variants.filter(function(p){var g=pv(p,o,i);if(!g){var m=[];p.audio&&m.push(Nr(p.audio)),p.video&&m.push(Nr(p.video))}return g}),le(f)})}function dv(e){var t={dvav:"avc3",dva1:"avc1",dvhe:"hev1",dvh1:"hvc1",dvc1:"vvc1",dvi1:"vvi1"},n=new Set;e=I(e);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&n.add(r.video);for(n=I(n),e=n.next();!e.done;e=n.next()){e=e.value,r=I(Object.keys(t));for(var i=r.next();!i.done;i=r.next())if(i=i.value,e.codecs.includes(i)){e.codecs=e.codecs.replace(i,t[i]);break}}}function pv(e,t,n){if(!e.decodingInfos.some(function(p){return!(!p.supported||t&&(p=p.keySystemAccess)&&(n[p.keySystem]||p.keySystem)!=t)}))return!1;var r=$i(),i=Tt("Firefox")&&xu(),o=e.video,a=o&&o.width||0,f=o&&o.height||0;return r&&o&&(1920<a||1080<f)&&(o.codecs.includes("avc1.")||o.codecs.includes("avc3."))?!1:(e=e.audio,!(i&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")))}function Rc(e,t){var n,r,i,o,a,f,p;return G(function(g){if(g.g==1){for(n=function(m,w){if(m){var E=Jr(m);return E.supported=m.supported&&w.supported,E.powerEfficient=m.powerEfficient&&w.powerEfficient,E.smooth=m.smooth&&w.smooth,w.keySystemAccess&&!E.keySystemAccess&&(E.keySystemAccess=w.keySystemAccess),E}return w},r=null,i=[],o=I(t),a=o.next(),f={};!a.done;f={cache:void 0,Nd:void 0},a=o.next())p=a.value,f.Nd=dd(p),f.cache=Mu,f.cache[f.Nd]?r=n(r,f.cache[f.Nd]):i.push(Ru(p).then(function(m){return function(w){var E=null;w=I(w||[]);for(var C=w.next();!C.done;C=w.next())E=n(E,C.value);E&&(m.cache[m.Nd]=E,r=n(r,E))}}(f)));return _(g,Promise.all(i),2)}r&&e.decodingInfos.push(r),le(g)})}function Ru(e){var t=[""];e.video&&(t=Er(e.video.contentType).split(","));var n=[""];e.audio&&(n=Er(e.audio.contentType).split(","));var r=[];t=I(t);for(var i=t.next();!i.done;i=t.next()){i=i.value;for(var o=I(n),a=o.next(),f={};!a.done;f={Hc:void 0},a=o.next())a=a.value,f.Hc=Lr(e),e.video&&(f.Hc.video.contentType=yn(Ir(f.Hc.video.contentType),i)),e.audio&&(f.Hc.audio.contentType=yn(Ir(f.Hc.audio.contentType),a)),r.push(new Promise(function(p){return function(g,m){Jo(1,navigator.mediaCapabilities.decodingInfo(p.Hc)).then(function(w){g(w)}).catch(m)}}(f)))}return Promise.all(r).catch(function(){return JSON.stringify(e),null})}function Md(e,t,n,r){var i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X;return G(function(q){switch(q.g){case 1:if(e.some(function(F){return F.decodingInfos.length}))return q.return();i=I(r),o=i.next(),a={};case 2:if(o.done){q.u(4);break}a.dh=o.value,f=!1,p=I(e),g=p.next();case 5:if(g.done){q.u(7);break}m=g.value,w=fl(m,t,n).filter(function(F){return function(Q){return Q=Q[0],(Q.keySystemConfiguration&&Q.keySystemConfiguration.keySystem)===F.dh}}(a)),E=I(w),C=E.next();case 8:if(C.done){q.u(10);break}return P=C.value,_(q,Rc(m,P),9);case 9:C=E.next(),q.u(8);break;case 10:m.decodingInfos.length&&(f=!0),g=p.next(),q.u(5);break;case 7:if(f)return q.return();a={dh:void 0},o=i.next(),q.u(2);break;case 4:L=I(e),M=L.next();case 12:if(M.done){q.u(0);break}B=M.value,U=fl(B,t,n).filter(function(F){return F=F[0],F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem,!F||!r.includes(F)}),K=I(U),W=K.next();case 15:if(W.done){M=L.next(),q.u(12);break}return X=W.value,_(q,Rc(B,X),16);case 16:W=K.next(),q.u(15)}})}function fl(e,t,n){var r=e.audio,i=e.video,o=[],a=[];if(i)for(var f=I(i.fullMimeTypes),p=f.next();!p.done;p=f.next()){p=p.value;var g=Er(p);if(g.includes(",")&&!r){var m=g.split(","),w=Ir(p);g=ca("video",m),m=ca("audio",m),m=di(m,w),w=Au(w,m,"audio"),a.push({contentType:w,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(g=dl(g),p={contentType:Au(Ir(p),g,"video"),width:i.width||64,height:i.height||64,bitrate:i.bandwidth||e.bandwidth||1,framerate:i.frameRate||1},i.hdr)switch(i.hdr){case"SDR":p.transferFunction="srgb";break;case"PQ":p.transferFunction="pq";break;case"HLG":p.transferFunction="hlg"}i.colorGamut&&(p.colorGamut=i.colorGamut),o.push(p)}if(r)for(f=I(r.fullMimeTypes),p=f.next();!p.done;p=f.next())g=p.value,p=Ir(g),g=di(Er(g),p),p=Au(p,g,"audio"),a.push({contentType:p,channels:r.channelsCount||2,bitrate:r.bandwidth||e.bandwidth||1,samplerate:r.audioSamplingRate||1,spatialRendering:r.spatialAudio});for(f=[],o.length==0&&o.push(null),a.length==0&&a.push(null),o=I(o),p=o.next();!p.done;p=o.next())for(p=p.value,g=I(a),w=g.next();!w.done;w=g.next())w=w.value,m={type:n?"file":"media-source"},p&&(m.video=p),w&&(m.audio=w),f.push(m);if(a=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!a.length)return[f];for(e=[],n=new Map,a=I(a),o=a.next();!o.done;o=a.next())o=o.value,n.get(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o);for(a=t?"required":"optional",t=t?["persistent-license"]:["temporary"],o=I(n.keys()),p=o.next();!p.done;p=o.next()){for(p=p.value,w=n.get(p),g=new Map,w=I(w),m=w.next();!m.done;m=w.next()){m=m.value;var E=m.videoRobustness+","+m.audioRobustness;g.get(E)||g.set(E,[]),g.get(E).push(m)}for(g=I(g.values()),w=g.next();!w.done;w=g.next()){w=w.value,m=[],E=I(f);for(var C=E.next();!C.done;C=E.next()){C=Object.assign({},C.value);for(var P={keySystem:p,initDataType:"cenc",persistentState:a,distinctiveIdentifier:"optional",sessionTypes:t},L=I(w),M=L.next();!M.done;M=L.next()){if(M=M.value,M.initData&&M.initData.length){for(var B=new Set,U=I(M.initData),K=U.next();!K.done;K=U.next())B.add(K.value.initDataType);P.initDataType=M.initData[0].initDataType}M.distinctiveIdentifierRequired&&(P.distinctiveIdentifier="required"),M.persistentStateRequired&&(P.persistentState="required"),M.sessionType&&(P.sessionTypes=[M.sessionType]),r&&(P.audio?(M.encryptionScheme&&(P.audio.encryptionScheme=P.audio.encryptionScheme||M.encryptionScheme),P.audio.robustness=P.audio.robustness||M.audioRobustness):(P.audio={robustness:M.audioRobustness},M.encryptionScheme&&(P.audio.encryptionScheme=M.encryptionScheme)),P.audio.robustness==""&&delete P.audio.robustness),i&&(P.video?(M.encryptionScheme&&(P.video.encryptionScheme=P.video.encryptionScheme||M.encryptionScheme),P.video.robustness=P.video.robustness||M.videoRobustness):(P.video={robustness:M.videoRobustness},M.encryptionScheme&&(P.video.encryptionScheme=M.encryptionScheme)),P.video.robustness==""&&delete P.video.robustness)}C.keySystemConfiguration=P,m.push(C)}e.push(m)}}return e}function di(e,t){return e.toLowerCase()=="flac"?wu()?"fLaC":"flac":e.toLowerCase()==="opus"?wu()&&da(t)=="mp4"?"Opus":"opus":e}function dl(e){if(e.includes("avc1")){var t=e.split(".");if(t.length==3)return e=t.shift()+".",e+=parseInt(t.shift(),10).toString(16),e+=("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if(e=="vp9")return"vp09.00.41.08";return e}function Zo(e){e.textStreams=e.textStreams.filter(function(t){return t=yn(t.mimeType,t.codecs),Pu(t)})}function Ld(e){var t,n,r,i,o,a,f;return G(function(p){switch(p.g){case 1:t=[],n=I(e.imageStreams),r=n.next();case 2:if(r.done){p.u(4);break}if(i=r.value,o=i.mimeType,o=="application/mp4"&&i.codecs=="mjpg"&&(o="image/jpg"),dr.has(o)){p.u(5);break}if(a=bc.get(o),!a){dr.set(o,!1),p.u(5);break}return _(p,hv(a),7);case 7:f=p.h,dr.set(o,f);case 5:dr.get(o)&&t.push(i),r=n.next(),p.u(2);break;case 4:e.imageStreams=t,le(p)}})}function hv(e){return new Promise(function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then(function(){t(!0)}).catch(function(){t(!1)}):n.onload=n.onerror=function(){t(n.height===2)}})}function rs(e){var t=e.audio,n=e.video,r=t?t.mimeType:null,i=n?n.mimeType:null,o=t?t.codecs:null,a=n?n.codecs:null,f=[];a&&f.push(a),o&&f.push(o);var p=[];n&&p.push(n.mimeType),t&&p.push(t.mimeType),p=p[0]||null;var g=[];t&&g.push(t.kind),n&&g.push(n.kind),g=g[0]||null;var m=new Set;if(t)for(var w=I(t.roles),E=w.next();!E.done;E=w.next())m.add(E.value);if(n)for(w=I(n.roles),E=w.next();!E.done;E=w.next())m.add(E.value);return e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:g,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:p,audioMimeType:r,videoMimeType:i,codecs:f.join(", "),audioCodec:o,videoCodec:a,primary:e.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,a.includes(",")&&(e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage)),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage),e}function Co(e){return{id:e.id,active:!1,type:at,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function pl(e){var t=e.width||null,n=e.height||null,r=null;e.segmentIndex&&(r=ti(e.segmentIndex));var i=e.tilesLayout;return r&&(i=r.tilesLayout||i),i&&t!=null&&(t/=Number(i.split("x")[0])),i&&n!=null&&(n/=Number(i.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:i||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId,accessibilityPurpose:null,originalLanguage:null}}function bu(e){return e.__shaka_id||(e.__shaka_id=is++),e.__shaka_id}function ga(e){var t=hl(e);return t.active=e.mode!="disabled",t.type="text",t.originalTextId=e.id,e.kind=="captions"&&(t.mimeType="unknown"),e.kind=="subtitles"&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),e.kind=="forced"&&(t.forced=!0),t}function va(e){var t=hl(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,e.kind=="main"&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function hl(e){var t=e.language;return{id:bu(e),active:!1,type:"",bandwidth:0,language:Et(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:t}}function Pi(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function vn(e){return e.filter(function(t){return Pi(t)})}function un(e,t,n,r){var i=e,o=e.filter(function(p){return p.primary});o.length&&(i=o);var a=i.length?i[0].language:"";if(i=i.filter(function(p){return p.language==a}),t){var f=pa(Et(t),e.map(function(p){return p.language}));f&&(i=e.filter(function(p){return Et(p.language)==f}))}if(i=i.filter(function(p){return p.forced==r}),n){if(e=eu(i,n),e.length)return e}else if(e=i.filter(function(p){return p.roles.length==0}),e.length)return e;return e=i.map(function(p){return p.roles}).reduce(En,[]),e.length?eu(i,e[0]):i}function eu(e,t){return e.filter(function(n){return n.roles.includes(t)})}function fr(e,t){t.length&&(t=t.filter(function(n){return bn(e.codecs)==bn(n.codecs)}).sort(function(n,r){return n.bandwidth&&r.bandwidth&&n.bandwidth!=r.bandwidth?n.bandwidth-r.bandwidth:(n.width||0)-(r.width||0)}),e.trickModeVideo=t[0],1<t.length&&(t=t.find(function(n){return e.width==n.width&&e.height==n.height})))&&(e.trickModeVideo=t)}function Nr(e){return e.type=="audio"?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:e.type=="video"?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}Me("shaka.util.StreamUtils",ya),ya.meetsRestrictions=ns;var Mu={},is=0,dr=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),bc=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Zt(){var e=this;this.G=null,this.o=!1,this.m=new Qu,this.j=new At,navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(e.o&&e.g.useNetworkInformation){e.m=new Qu,e.g&&e.m.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.F=[],this.H=1,this.I=!1,this.h=this.l=this.g=this.s=null,this.A=new st(function(){if(e.o&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.B=T,"documentPictureInPicture"in T&&this.j.D(T.documentPictureInPicture,"enter",function(){e.B=T.documentPictureInPicture.window,e.A&&e.A.Hb(),e.j.la(e.B,"pagehide",function(){e.B=T,e.A&&e.A.Hb()})}),this.C=this.i=null}h=Zt.prototype,h.stop=function(){this.G=null,this.o=!1,this.F=[],this.H=1,this.l=this.s=null,this.h&&(this.h.disconnect(),this.h=null),this.A.stop(),this.C=this.i=null},h.release=function(){this.j.release(),this.A=null},h.init=function(e){this.G=e},h.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;e=this.B.screen.height*n,t=this.B.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var r=this.l.clientHeight,i=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(r=this.i.height,i=this.i.width),e=Math.min(e,r*n),t=Math.min(t,i*n)}if(n=this.F.filter(function(g){return g&&!(g.audio&&g.audio.fastSwitching||g.video&&g.video.fastSwitching)}),n.length||(n=this.F),r=n,n.length!=this.F.length&&(r=this.F.filter(function(g){return g&&!!(g.audio&&g.audio.fastSwitching||g.video&&g.video.fastSwitching)})),n=os(this,this.g.restrictions,r,1/0,1/0),e!=1/0||t!=1/0){for(n=zh(n),n=I(n),i=n.next();!i.done;i=n.next())if(i=i.value,i.height>=e&&i.width>=t){e=i.height,t=i.width;break}n=os(this,this.g.restrictions,r,e,t)}for(e=this.getBandwidthEstimate(),r.length&&!n.length&&(n=os(this,null,r,1/0,1/0),n=[n[0]]),t=n[0]||null,r=0;r<n.length;r++){i=n[r];for(var o=isNaN(this.H)?1:Math.abs(this.H),a=o*i.bandwidth/this.g.bandwidthDowngradeTarget,f={bandwidth:1/0},p=r+1;p<n.length;p++)if(i.bandwidth!=n[p].bandwidth){f=n[p];break}o=o*f.bandwidth/this.g.bandwidthUpgradeTarget,e>=a&&e<=o&&(t.bandwidth!=i.bandwidth||t.bandwidth==i.bandwidth&&t.video&&i.video&&(t.video.width<i.video.width||t.video.height<i.video.height))&&(t=i)}return this.s=Date.now(),t},h.enable=function(){this.o=!0},h.disable=function(){this.o=!1},h.segmentDownloaded=function(e,t,n){e<this.g.cacheLoadThreshold||(this.m.sample(e,t),n&&this.s!=null&&this.o&&Nd(this))},h.trySuggestStreams=function(){this.s!=null&&this.o&&Nd(this)},h.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.m.getBandwidthEstimate(e),this.C?this.C.getBandwidthEstimate(e):e)},h.setVariants=function(e){this.F=e},h.playbackRateChanged=function(e){this.H=e},h.setMediaElement=function(e){function t(){n.A.aa(tu)}var n=this;this.l=e,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in T&&(this.h=new ResizeObserver(t),this.h.observe(this.l)),this.j.D(e,"enterpictureinpicture",function(r){r.pictureInPictureWindow&&(n.i=r.pictureInPictureWindow,n.j.D(n.i,"resize",t))}),this.j.D(e,"leavepictureinpicture",function(){n.i&&n.j.bb(n.i,"resize",t),n.i=null})},h.setCmsdManager=function(e){this.C=e},h.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)};function Nd(e){if(!e.I){var t=e.m;if(!(t.g>=t.i))return;e.I=!0,e.s-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.s<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function os(e,t,n,r,i){if(e.C){var o=e.C.Lg();o&&(n=n.filter(function(a){return a.bandwidth&&o?a.bandwidth<=o:!0}))}return t&&(n=n.filter(function(a){return ns(a,t,{width:i,height:r})})),n.sort(function(a,f){return a.bandwidth-f.bandwidth})}function zh(e){var t=[];e=I(e);for(var n=e.next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(r,i){return r.width-i.width})}Me("shaka.abr.SimpleAbrManager",Zt),Zt.prototype.configure=Zt.prototype.configure,Zt.prototype.setCmsdManager=Zt.prototype.setCmsdManager,Zt.prototype.setMediaElement=Zt.prototype.setMediaElement,Zt.prototype.playbackRateChanged=Zt.prototype.playbackRateChanged,Zt.prototype.setVariants=Zt.prototype.setVariants,Zt.prototype.getBandwidthEstimate=Zt.prototype.getBandwidthEstimate,Zt.prototype.trySuggestStreams=Zt.prototype.trySuggestStreams,Zt.prototype.segmentDownloaded=Zt.prototype.segmentDownloaded,Zt.prototype.disable=Zt.prototype.disable,Zt.prototype.enable=Zt.prototype.enable,Zt.prototype.chooseVariant=Zt.prototype.chooseVariant,Zt.prototype.init=Zt.prototype.init,Zt.prototype.release=Zt.prototype.release,Zt.prototype.stop=Zt.prototype.stop;var tu=1;Me("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function ma(e,t){var n=Di();this.l=e.maxAttempts==null?n.maxAttempts:e.maxAttempts,this.j=e.baseDelay==null?n.baseDelay:e.baseDelay,this.o=e.fuzzFactor==null?n.fuzzFactor:e.fuzzFactor,this.m=e.backoffFactor==null?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=t===void 0?!1:t)&&(this.g=1)}function Mc(e){var t,n;return G(function(r){if(r.g==1){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new Y(2,7,1010);return t=e.g,e.g++,t==0?r.return():(n=e.h*(1+(2*Math.random()-1)*e.o),_(r,new Promise(function(i){new st(i).aa(n/1e3)}),2))}e.h*=e.m,le(r)})}function Di(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function Nt(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}Nt.prototype.resolve=function(){},Nt.prototype.reject=function(){};function $t(e,t){this.promise=e,this.i=t,this.g=null}function Oi(e){return new $t(Promise.reject(e),function(){return Promise.resolve()})}function Lu(){var e=Promise.reject(new Y(2,7,7001));return e.catch(function(){}),new $t(e,function(){return Promise.resolve()})}function nu(e){return new $t(Promise.resolve(e),function(){return Promise.resolve()})}function Sa(e){return new $t(e,function(){return e.catch(function(){})})}$t.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function pi(e){return new $t(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}$t.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},$t.prototype.Da=function(e,t){function n(f){return function(p){if(i.g&&f)o.reject(a);else{var g=f?e:t;g?r=Ri(g,p,o):(f?o.resolve:o.reject)(p)}}}function r(){return o.reject(a),i.abort()}var i=this,o=new Nt;o.catch(function(){});var a=new Y(2,7,7001);return this.promise.then(n(!0),n(!1)),new $t(o,function(){return r()})};function Ri(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then(function(){},function(){})})}catch(i){return n.reject(i),function(){return Promise.resolve()}}}v.Object.defineProperties($t.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),Me("shaka.util.AbortableOperation",$t),$t.prototype.chain=$t.prototype.Da,$t.prototype.finally=$t.prototype.finally,$t.all=pi,$t.prototype.abort=$t.prototype.abort,$t.notAbortable=Sa,$t.completed=nu,$t.aborted=Lu,$t.failed=Oi;function Te(e,t){if(t)if(t instanceof Map)for(var n=I(t.keys()),r=n.next();!r.done;r=n.next())r=r.value,Object.defineProperty(this,r,{value:t.get(r),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=T.performance&&T.performance.now?T.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function ko(e){var t=new Te(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}Te.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},Te.prototype.stopImmediatePropagation=function(){this.g=!0},Te.prototype.stopPropagation=function(){},Me("shaka.util.FakeEvent",Te);var bi={Bj:"abrstatuschanged",Cj:"adaptation",Dj:"audiotrackchanged",Ej:"buffering",Fj:"complete",Gj:"downloadcompleted",Hj:"downloadfailed",Ij:"downloadheadersreceived",Jj:"drmsessionupdate",Lj:"emsg",ek:"prft",Error:"error",Mj:"expirationupdated",Nj:"firstquartile",Oj:"gapjumped",Rj:"keystatuschanged",Vj:"loaded",Wj:"loading",Yj:"manifestparsed",Zj:"manifestupdated",$j:"mediaqualitychanged",ak:"mediasourcerecovered",Metadata:"metadata",bk:"midpoint",ck:"nospatialvideoinfo",dk:"onstatechange",fk:"ratechange",hk:"segmentappended",ik:"sessiondata",jk:"spatialvideoinfo",kk:"stalldetected",lk:"started",mk:"statechanged",nk:"streaming",pk:"textchanged",qk:"texttrackvisibility",rk:"thirdquartile",sk:"timelineregionadded",tk:"timelineregionenter",uk:"timelineregionexit",vk:"trackschanged",xk:"unloading",zk:"variantchanged"};function xt(){this.Ca=new Vs,this.xe=this}xt.prototype.addEventListener=function(e,t){this.Ca&&this.Ca.push(e,t)},xt.prototype.removeEventListener=function(e,t){this.Ca&&this.Ca.remove(e,t)},xt.prototype.dispatchEvent=function(e){if(!this.Ca)return!0;var t=this.Ca.get(e.type)||[],n=this.Ca.get("All");for(n&&(t=t.concat(n)),t=I(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.xe,e.currentTarget=this.xe;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},xt.prototype.release=function(){this.Ca=null};function yl(){this.g=[]}function ru(e,t){e.g.push(t.finally(function(){Gr(e.g,t)}))}yl.prototype.destroy=function(){for(var e=[],t=I(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)};function Bt(e,t,n,r,i,o,a){xt.call(this),this.i=!1,this.s=new yl,this.g=new Set,this.h=new Set,this.m=e||null,this.l=t||null,this.C=n||null,this.F=r||null,this.G=i||null,this.I=o||null,this.H=a||null,this.A=this.B=!1,this.o=16e3,this.j=new Map}mt(Bt,xt),h=Bt.prototype,h.ag=function(e){this.B=e},h.bg=function(e){this.A=e};function Bn(e,t,n,r){n=n||Ud;var i=iu[e];(!i||n>=i.priority)&&(iu[e]={priority:n,ne:t,Wi:r===void 0?!1:r})}function Qr(e,t){for(var n=I(e.g),r=n.next();!r.done;r=n.next())t.g.add(r.value);for(e=I(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}h.Zi=function(e){this.g.add(e)},h.uj=function(e){this.g.delete(e)},h.Sh=function(){this.g.clear()},h.$i=function(e){this.h.add(e)},h.vj=function(e){this.h.delete(e)},h.Th=function(){this.h.clear()},h.yg=function(){this.j.clear()};function wt(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:n===void 0?null:n}}h.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),this.j.clear(),xt.prototype.release.call(this),this.s.destroy()},h.request=function(e,t,n){var r=this,i=new Nc;if(this.i){var o=Promise.reject(new Y(2,7,7001));return o.catch(function(){}),new wa(o,function(){return Promise.resolve()},i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Lr(t.retryParameters):Di(),t.uris=Lr(t.uris),o=no(this,e,t,n);var a=o.Da(function(){return _d(r,e,t,n,new ma(t.retryParameters,!1),0,null,i)}),f=a.Da(function(E){return Gh(r,e,E,n)}),p=Date.now(),g=0;o.promise.then(function(){g=Date.now()-p},function(){});var m=0;a.promise.then(function(){m=Date.now()},function(){});var w=f.Da(function(E){var C=Date.now()-m,P=E.response;return P.timeMs+=g,P.timeMs+=C,E.Ci||!r.m||P.fromCache||t.method=="HEAD"||e!=_r||r.m(P.timeMs,P.data.byteLength,Lc(n)),r.H&&r.H(e,P,n),P},function(E){throw E&&(E.severity=2),E});return o=new wa(w.promise,function(){return w.abort()},i),ru(this.s,o),o};function no(e,t,n,r){function i(f){o=o.Da(function(){return n.body&&(n.body=zr(n.body)),f(t,n,r)})}var o=nu(void 0);e.G&&i(e.G),e=I(e.g);for(var a=e.next();!a.done;a=e.next())i(a.value);return o.Da(void 0,function(f){throw f instanceof Y&&f.code==7001?f:new Y(2,1,1006,f)})}function _d(e,t,n,r,i,o,a,f){e.B&&(n.uris[o]=n.uris[o].replace("https://","http://")),e.A&&(n.uris[o]=n.uris[o].replace("http://","https://")),0<o&&e.I&&e.I(t,r,n.uris[o],n.uris[o-1]);var p=new hn(n.uris[o]),g=p.Gb,m=!1;g||(g=location.protocol,g=g.slice(0,-1),Cc(p,g),n.uris[o]=p.toString()),g=g.toLowerCase();var w=(g=iu[g])?g.ne:null;if(!w)return Oi(new Y(2,1,1e3,p));var E=g.Wi;(p=e.j.get(p.ub))&&(n.headers["common-access-token"]=p);var C=null,P=null,L=!1,M=!1,B;return Sa(Mc(i)).Da(function(){if(e.i)return Lu();B=Date.now();var U=0;n.requestStartTime=Date.now();var K=w(n.uris[o],n,t,function(q,F,Q){C&&C.stop(),P&&P.aa(X/1e3),e.m&&t==_r&&(U++,n.packetNumber=U,e.m(q,F,Lc(r),n),m=!0,f.g=Q)},function(q){M=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.l&&e.l(q,n,t)},{minBytesForProgressEvents:e.o});if(!E)return K;var W=n.retryParameters.connectionTimeout;W&&(C=new st(function(){L=!0,K.abort()}),C.aa(W/1e3));var X=n.retryParameters.stallTimeout;return X&&(P=new st(function(){L=!0,K.abort()})),K}).Da(function(U){C&&C.stop(),P&&P.stop(),U.timeMs==null&&(U.timeMs=Date.now()-B);var K=U.headers["common-access-token"];if(K){var W=new hn(U.uri);e.j.set(W.ub,K)}return K={response:U,Ci:m},!M&&e.l&&e.l(U.headers,n,t),e.C&&e.C(n,U),K},function(U){if(C&&C.stop(),P&&P.stop(),e.F){var K=null,W=0;U instanceof Y&&(K=U,U.code==1001&&(W=U.data[1])),e.F(n,K,W,L)}if(e.i)return Lu();if(L&&(U=new Y(1,1,1003,n.uris[o],t)),U instanceof Y){if(U.code==7001)throw U;if(U.code==1010)throw a;if(U.severity==1)return K=new Map().set("error",U),K=new Te("retry",K),e.dispatchEvent(K),o=(o+1)%n.uris.length,_d(e,t,n,r,i,o,U,f)}throw U})}function Gh(e,t,n,r){var i=nu(void 0);e=I(e.h);for(var o=e.next(),a={};!o.done;a={ih:void 0},o=e.next())a.ih=o.value,i=i.Da(function(f){return function(){var p=n.response;return p.data&&(p.data=zr(p.data)),(0,f.ih)(t,p,r)}}(a));return i.Da(function(){return n},function(f){var p=2;if(f instanceof Y){if(f.code==7001)throw f;p=f.severity}throw new Y(p,1,1007,f)})}function Lc(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}Me("shaka.net.NetworkingEngine",Bt),Bt.prototype.request=Bt.prototype.request,Bt.prototype.destroy=Bt.prototype.destroy,Bt.makeRequest=wt,Bt.defaultRetryParameters=function(){return Di()},Bt.prototype.clearCommonAccessTokenMap=Bt.prototype.yg,Bt.prototype.clearAllResponseFilters=Bt.prototype.Th,Bt.prototype.unregisterResponseFilter=Bt.prototype.vj,Bt.prototype.registerResponseFilter=Bt.prototype.$i,Bt.prototype.clearAllRequestFilters=Bt.prototype.Sh,Bt.prototype.unregisterRequestFilter=Bt.prototype.uj,Bt.prototype.registerRequestFilter=Bt.prototype.Zi,Bt.unregisterScheme=function(e){delete iu[e]},Bt.registerScheme=Bn,Bt.prototype.setForceHTTPS=Bt.prototype.bg,Bt.prototype.setForceHTTP=Bt.prototype.ag;function Nc(){this.g=0}Bt.NumBytesRemainingClass=Nc;function wa(e,t,n){$t.call(this,e,t),this.h=n}mt(wa,$t),Bt.PendingRequest=wa;var _r=1;Bt.RequestType={MANIFEST:0,SEGMENT:_r,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},Bt.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var Ud=3;Bt.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ud};var iu={};function Nu(e){this.g=!1,this.h=new Nt,this.i=e}Nu.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))};function Ht(e,t){if(e.g)throw t instanceof Y&&t.code==7003?t:new Y(2,7,7003,t)}function gl(e,t){var n=[];e=I(e);for(var r=e.next();!r.done;r=e.next())n.push(t(r.value));return n}function _c(e,t){e=I(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function us(e){for(var t=new Map,n=I(Object.keys(e)),r=n.next();!r.done;r=n.next())r=r.value,t.set(r,e[r]);return t}function Uc(e){var t={};return e.forEach(function(n,r){t[r]=n}),t}function Mt(e,t){this.h=wr(e),this.i=t==Ta,this.g=0}h=Mt.prototype,h.ta=function(){return this.g<this.h.byteLength},h.xa=function(){return this.g},h.getLength=function(){return this.h.byteLength},h.U=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw Ao()}},h.ma=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw Ao()}},h.R=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw Ao()}},h.fh=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw Ao()}},h.Yc=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch{throw Ao()}if(2097151<t)throw new Y(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},h.Ab=function(e){if(this.g+e>this.h.byteLength)throw Ao();var t=Ze(this.h,this.g,e);return this.g+=e,t},h.skip=function(e){if(this.g+e>this.h.byteLength)throw Ao();this.g+=e},h.jh=function(e){if(this.g<e)throw Ao();this.g-=e},h.seek=function(e){if(0>e||e>this.h.byteLength)throw Ao();this.g=e},h.zc=function(){for(var e=this.g;this.ta()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=Ze(this.h,e,this.g-e),this.g+=1,Qt(e)};function Ao(){return new Y(2,3,3e3)}Me("shaka.util.DataViewReader",Mt),Mt.prototype.readTerminatedString=Mt.prototype.zc,Mt.prototype.seek=Mt.prototype.seek,Mt.prototype.rewind=Mt.prototype.jh,Mt.prototype.skip=Mt.prototype.skip,Mt.prototype.readBytes=Mt.prototype.Ab,Mt.prototype.readUint64=Mt.prototype.Yc,Mt.prototype.readInt32=Mt.prototype.fh,Mt.prototype.readUint32=Mt.prototype.R,Mt.prototype.readUint16=Mt.prototype.ma,Mt.prototype.readUint8=Mt.prototype.U,Mt.prototype.getLength=Mt.prototype.getLength,Mt.prototype.getPosition=Mt.prototype.xa,Mt.prototype.hasMoreData=Mt.prototype.ta;var Ta=1;Mt.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ta};function Vt(){this.i=[],this.h=[],this.g=!1}h=Vt.prototype,h.box=function(e,t){return e=vl(e),this.i[e]=jd,this.h[e]=t,this},h.S=function(e,t){return e=vl(e),this.i[e]=Bd,this.h[e]=t,this},h.stop=function(){this.g=!0},h.parse=function(e,t,n){for(e=new Mt(e,0),this.g=!1;e.ta()&&!this.g;)this.Vc(0,e,t,n)},h.Vc=function(e,t,n,r){var i=t.xa();if(r&&i+8>t.getLength())this.g=!0;else{var o=t.R(),a=t.R(),f=Ur(a),p=!1;switch(o){case 0:o=t.getLength()-i;break;case 1:if(r&&t.xa()+8>t.getLength()){this.g=!0;return}o=t.Yc(),p=!0}var g=this.h[a];if(g){var m=null,w=null;if(this.i[a]==Bd){if(r&&t.xa()+4>t.getLength()){this.g=!0;return}w=t.R(),m=w>>>24,w&=16777215}a=i+o,n&&a>t.getLength()&&(a=t.getLength()),r&&a>t.getLength()?this.g=!0:(r=a-t.xa(),t=0<r?t.Ab(r):new Uint8Array(0),t=new Mt(t,0),g({name:f,parser:this,partialOkay:n||!1,version:m,flags:w,reader:t,size:o,start:i+e,has64BitSize:p}))}else t.skip(Math.min(i+o-t.xa(),t.getLength()-t.xa()))}};function it(e){for(var t=Mi(e);e.reader.ta()&&!e.parser.g;)e.parser.Vc(e.start+t,e.reader,e.partialOkay)}function Po(e){for(var t=Mi(e),n=e.reader.R(),r=0;r<n&&(e.parser.Vc(e.start+t,e.reader,e.partialOkay),!e.parser.g);r++);}function pr(e){var t=Mi(e);for(e.reader.skip(78);e.reader.ta()&&!e.parser.g;)e.parser.Vc(e.start+t,e.reader,e.partialOkay)}function xa(e){var t=Mi(e);e.reader.skip(8);var n=e.reader.ma();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.ta()&&!e.parser.g;)e.parser.Vc(e.start+t,e.reader,e.partialOkay)}function _u(e){return function(t){e(t.reader.Ab(t.reader.getLength()-t.reader.xa()))}}function vl(e){var t=0;e=I(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function Ur(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function Mi(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}Me("shaka.util.Mp4Parser",Vt),Vt.headerSize=Mi,Vt.typeToString=Ur,Vt.allData=_u,Vt.audioSampleEntry=xa,Vt.visualSampleEntry=pr,Vt.sampleDescription=Po,Vt.children=it,Vt.prototype.parseNext=Vt.prototype.Vc,Vt.prototype.parse=Vt.prototype.parse,Vt.prototype.stop=Vt.prototype.stop,Vt.prototype.fullBox=Vt.prototype.S,Vt.prototype.box=Vt.prototype.box;var jd=0,Bd=1;function ro(e){var t=this;this.g=[],this.h=[],this.data=[],new Vt().box("moov",it).box("moof",it).S("pssh",function(n){if(!(1<n.version)){var r=Ze(n.reader.h,-12,n.size);if(t.data.push(r),t.g.push(Yn(n.reader.Ab(16))),0<n.version){r=n.reader.R();for(var i=0;i<r;i++){var o=Yn(n.reader.Ab(16));t.h.push(o)}}}}).parse(e)}function io(e,t,n,r){var i=e.length,o=t.length+16+i;0<r&&(o+=4+16*n.size);var a=new Uint8Array(o),f=wr(a),p=0;if(f.setUint32(p,o),p+=4,f.setUint32(p,1886614376),p+=4,1>r?f.setUint32(p,0):f.setUint32(p,16777216),p+=4,a.set(t,p),p+=t.length,0<r)for(f.setUint32(p,n.size),p+=4,t=I(n),n=t.next();!n.done;n=t.next())n=cl(n.value),a.set(n,p),p+=n.length;return f.setUint32(p,i),a.set(e,p+4),a}function ls(e){var t=this;this.C=e,this.l=this.A=null,this.ha=this.fa=!1,this.H=0,this.h=null,this.o=new At,this.i=new Map,this.V=[],this.B=new Map,this.K=!1,this.m=new Nt,this.g=null,this.s=function(n){n.severity==2&&t.m.reject(n),e.onError(n)},this.ba=new Map,this.ga=new Map,this.L=new st(function(){return ml(t)}),this.O=!1,this.M=[],this.$=!1,this.I=new st(function(){Pa(t)}),this.m.catch(function(){}),this.j=new Nu(function(){return Wh(t)}),this.da=!1,this.F=this.G=null,this.P=function(){return!1}}h=ls.prototype,h.destroy=function(){return this.j.destroy()};function Wh(e){return G(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.m.reject(),e.I.stop(),e.I=null,e.L.stop(),e.L=null,_(t,Mn(e),2);case 2:if(!e.l){t.u(3);break}return pe(t,4),_(t,e.l.setMediaKeys(null),6);case 6:be(t,5);break;case 4:ke(t);case 5:e.l=null;case 3:e.h=null,e.A=null,e.B=new Map,e.g=null,e.s=function(){},e.C=null,e.da=!1,e.G=null,le(t)}})}h.configure=function(e,t){this.g=e,t&&(this.P=t),this.I&&this.I.Aa(this.g.updateExpirationTime)};function ou(e,t,n){return e.ha=!0,e.B=new Map,e.O=n,Vd(e,t)}function uu(e,t,n){e.B=new Map,n=I(n);for(var r=n.next();!r.done;r=n.next())e.B.set(r.value,{initData:null,initDataType:null});for(n=I(e.g.persistentSessionsMetadata),r=n.next();!r.done;r=n.next())r=r.value,e.B.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.O=0<e.B.size,Vd(e,t)}function jc(e,t,n,r,i,o){var a=new Map;return i={audioCapabilities:i,videoCapabilities:o,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t},i.drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],a.set(t,i),Bc(e,a,[])}function Vd(e,t){var n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W;return G(function(X){if(X.g==1){for(Kc(e.g.clearKeys,t),n=t.some(function(q){return!!(q.video&&q.video.drmInfos.length||q.audio&&q.audio.drmInfos.length)}),n||(r=us(e.g.servers),kr(t,r)),i=new Set,o=I(t),a=o.next();!a.done;a=o.next())for(f=a.value,p=Aa(f),g=I(p),m=g.next();!m.done;m=g.next())w=m.value,i.add(w);for(E=I(i),C=E.next();!C.done;C=E.next())P=C.value,Hd(P,us(e.g.servers),us(e.g.advanced||{}),e.g.keySystemsMapping);for(L=function(q,F){var Q=[];q=I(q);for(var H=q.next();!H.done;H=q.next()){H=H.value;var Z=H[F]||e.g.advanced&&e.g.advanced[H.keySystem]&&e.g.advanced[H.keySystem][F]||"",$;if(($=Z=="")&&($=($=H.keySystem)?!!$.match(/^com\.widevine\.alpha/):!1),$&&(F=="audioRobustness"?Z=[e.g.defaultAudioRobustnessForWidevine]:F=="videoRobustness"&&(Z=[e.g.defaultVideoRobustnessForWidevine])),typeof Z=="string")Q.push(H);else if(Array.isArray(Z))for(Z.length===0&&(Z=[""]),Z=I(Z),$=Z.next();!$.done;$=Z.next()){var ue={};Q.push(Object.assign({},H,(ue[F]=$.value,ue)))}}return Q},M=I(t),B=M.next();!B.done;B=M.next())U=B.value,U.video&&(U.video.drmInfos=L(U.video.drmInfos,"videoRobustness"),U.video.drmInfos=L(U.video.drmInfos,"audioRobustness")),U.audio&&(U.audio.drmInfos=L(U.audio.drmInfos,"videoRobustness"),U.audio.drmInfos=L(U.audio.drmInfos,"audioRobustness"));return _(X,Md(t,e.O,e.da,e.g.preferredKeySystems),2)}return Ht(e.j),K=n||Object.keys(e.g.servers).length,K?(W=Bc(e,void 0,t),X.return(n?W:W.catch(function(){}))):(e.fa=!0,X.return(Promise.resolve()))})}function Ia(e){var t;return G(function(n){switch(n.g){case 1:if(e.l.mediaKeys)return n.return();if(!e.G){n.u(2);break}return _(n,e.G,3);case 3:return Ht(e.j),n.return();case 2:return pe(n,4),e.G=e.l.setMediaKeys(e.A),_(n,e.G,6);case 6:be(n,5);break;case 4:t=ke(n),e.s(new Y(2,6,6003,t.message));case 5:Ht(e.j),le(n)}})}function Xh(e,t){return G(function(n){if(n.g==1)return _(n,Ia(e),2);lu(e,t.initDataType,Ze(t.initData)),le(n)})}h.Xb=function(e){var t=this;return G(function(n){if(n.g==1)return t.A?(t.l=e,t.o.la(t.l,"play",function(){for(var r=I(t.M),i=r.next();!i.done;i=r.next())cs(t,i.value);t.$=!0,t.M=[]}),t.l.remote?(t.o.D(t.l.remote,"connect",function(){return Mn(t)}),t.o.D(t.l.remote,"connecting",function(){return Mn(t)}),t.o.D(t.l.remote,"disconnect",function(){return Mn(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.l&&t.o.D(t.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Mn(t)}),t.F=t.h&&t.h.initData.find(function(r){return 0<r.initData.length})||null,t.F||t.h.keySystem!=="com.apple.fps"||t.B.size?_(n,Ia(t),2):n.u(2)):(t.o.la(e,"encrypted",function(){t.s(new Y(2,6,6010))}),n.return());ss(t).catch(function(){}),t.F||t.B.size||t.g.parseInbandPsshEnabled||t.o.D(t.l,"encrypted",function(r){return Xh(t,r)}),le(n)})};function Ea(e){var t,n,r,i,o;return G(function(a){switch(a.g){case 1:if(!e.A||!e.h)return a.return();if(!e.h.serverCertificateUri||e.h.serverCertificate&&e.h.serverCertificate.length){a.u(2);break}return t=wt([e.h.serverCertificateUri],e.g.retryParameters),pe(a,3),n=e.C.Tb.request(5,t,{isPreload:e.P()}),_(a,n.promise,5);case 5:r=a.h,e.h.serverCertificate=Ze(r.data),be(a,4);break;case 3:throw i=ke(a),new Y(2,6,6017,i);case 4:if(e.j.g)return a.return();case 2:return!e.h.serverCertificate||!e.h.serverCertificate.length?a.return():(pe(a,6),_(a,e.A.setServerCertificate(e.h.serverCertificate),8));case 8:be(a,0);break;case 6:throw o=ke(a),new Y(2,6,6004,o.message)}})}function Do(e,t){var n,r,i;return G(function(o){if(o.g==1)return _(o,ka(e,t,{initData:null,initDataType:null}),2);if(o.g!=3)return n=o.h,n?(r=[],(i=e.i.get(n))&&(i.qb=new Nt,r.push(i.qb)),r.push(n.remove()),_(o,Promise.all(r),3)):o.return();e.i.delete(n),le(o)})}function ss(e){var t,n,r,i,o;return G(function(a){if(a.g==1)return e.B.size?(e.B.forEach(function(f,p){ka(e,p,f)}),_(a,e.m,3)):a.u(2);if(a.g!=2){if(t=e.h&&e.h.keyIds||new Set([]),0<t.size&&yv(e))return a.return(e.m);e.K=!1,e.m=new Nt,e.m.catch(function(){})}for(n=(e.h?e.h.initData:[])||[],r=I(n),i=r.next();!i.done;i=r.next())o=i.value,lu(e,o.initDataType,o.initData);return su(e)&&e.m.resolve(),a.return(e.m)})}function lu(e,t,n){if(n.length){if(e.g.ignoreDuplicateInitData){var r=e.i.values();r=I(r);for(var i=r.next();!i.done;i=r.next())if(vo(n,i.value.initData))return;var o=!1;if(e.B.forEach(function(a){!o&&vo(n,a.initData)&&(o=!0)}),o)return}e.K=!0,0<e.i.size&&su(e)&&(e.m.resolve(),e.K=!1,e.m=new Nt,e.m.catch(function(){})),Fd(e,t,n,e.h.sessionType)}}function Uu(e){return e=e.i.keys(),e=gl(e,function(t){return t.sessionId}),Array.from(e)}h.tf=function(){var e=this,t=this.i.keys();return t=gl(t,function(n){var r=e.i.get(n);return{sessionId:n.sessionId,sessionType:r.type,initData:r.initData,initDataType:r.initDataType}}),Array.from(t)},h.ld=function(){var e=1/0,t=this.i.keys();t=I(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},h.Vd=function(){return Uc(this.ga)};function Bc(e,t,n){var r,i,o,a,f,p,g,m;return G(function(w){switch(w.g){case 1:if(r=new Map,n.length){i=as(e,n,r),w.u(2);break}return _(w,Yh(e,t),3);case 3:i=w.h;case 2:if(o=i,!o)throw navigator.requestMediaKeySystemAccess?new Y(2,6,6001):new Y(2,6,6020);if(Ht(e.j),pe(w,4),o.getConfiguration(),a=e.g.keySystemsMapping[o.keySystem]||o.keySystem,n.length){var E=a,C=r.get(a),P=[],L=[],M=[],B=[],U=[],K=new Set,W=new Set;Fc(C,P,L,B,M,U,K,W);var X=e.O?"persistent-license":"temporary";for(E={keySystem:E,encryptionScheme:P[0],licenseServerUri:L[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||X,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:B[0],serverCertificateUri:M[0],initData:U,keyIds:K},0<W.size&&(E.keySystemUris=W),C=I(C),W=C.next();!W.done;W=C.next())W=W.value,W.distinctiveIdentifierRequired&&(E.distinctiveIdentifierRequired=W.distinctiveIdentifierRequired),W.persistentStateRequired&&(E.persistentStateRequired=W.persistentStateRequired);C=E}else C=a,W=t.get(a),E=[],P=[],L=[],M=[],B=[],U=new Set,Fc(W.drmInfos,E,P,M,L,B,U),C={keySystem:C,encryptionScheme:E[0],licenseServerUri:P[0],distinctiveIdentifierRequired:W.distinctiveIdentifier=="required",persistentStateRequired:W.persistentState=="required",sessionType:W.sessionTypes[0]||"temporary",audioRobustness:(W.audioCapabilities?W.audioCapabilities[0].robustness:"")||"",videoRobustness:(W.videoCapabilities?W.videoCapabilities[0].robustness:"")||"",serverCertificate:M[0],serverCertificateUri:L[0],initData:B,keyIds:U};if(e.h=C,!e.h.licenseServerUri)throw new Y(2,6,6012,e.h.keySystem);return _(w,o.createMediaKeys(),6);case 6:if(f=w.h,Ht(e.j),e.A=f,!(e.g.minHdcpVersion!=""&&"getStatusForPolicy"in e.A)){w.u(7);break}return pe(w,8),_(w,e.A.getStatusForPolicy({minHdcpVersion:e.g.minHdcpVersion}),10);case 10:if(p=w.h,p!="usable")throw new Y(2,6,6018);Ht(e.j),be(w,7,4);break;case 8:throw g=ke(w,4),g instanceof Y?g:new Y(2,6,6019,g.message);case 7:return e.fa=!0,_(w,Ea(e),11);case 11:Ht(e.j),be(w,0);break;case 4:throw m=ke(w),Ht(e.j,m),e.h=null,m instanceof Y?m:new Y(2,6,6002,m.message)}})}function as(e,t,n){for(var r=I(t),i=r.next();!i.done;i=r.next()){i=I(Aa(i.value));for(var o=i.next();!o.done;o=i.next())o=o.value,n.has(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o)}if(n.size==1&&n.has(""))throw new Y(2,6,6e3);for(r=I(e.g.preferredKeySystems),o=r.next(),i={};!o.done;i={eh:void 0},o=r.next()){i.eh=o.value,o=I(t);for(var a=o.next();!a.done;a=o.next())if(a=a.value.decodingInfos.find(function(m){return function(w){return w.supported&&w.keySystemAccess!=null&&w.keySystemAccess.keySystem==m.eh}}(i)))return a.keySystemAccess}for(r=I([!0,!1]),i=r.next();!i.done;i=r.next())for(i=i.value,o=I(t),a=o.next();!a.done;a=o.next()){a=I(a.value.decodingInfos);for(var f=a.next();!f.done;f=a.next())if(f=f.value,f.supported&&f.keySystemAccess){var p=f.keySystemAccess.keySystem,g=n.get(p);for(!g&&e.g.keySystemsMapping[p]&&(g=n.get(e.g.keySystemsMapping[p])),p=I(g),g=p.next();!g.done;g=p.next())if(!!g.value.licenseServerUri==i)return f.keySystemAccess}}return null}function Yh(e,t){var n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B;return G(function(U){switch(U.g){case 1:if(t.size==1&&t.has(""))throw new Y(2,6,6e3);for(r=I(t.values()),i=r.next();!i.done;i=r.next())o=i.value,o.audioCapabilities.length==0&&delete o.audioCapabilities,o.videoCapabilities.length==0&&delete o.videoCapabilities;a=I(e.g.preferredKeySystems),f=a.next();case 2:if(f.done){U.u(4);break}if(p=f.value,!t.has(p)){U.u(3);break}return g=t.get(p),pe(U,6),_(U,navigator.requestMediaKeySystemAccess(p,[g]),8);case 8:return n=U.h,U.return(n);case 6:ke(U);case 7:Ht(e.j);case 3:f=a.next(),U.u(2);break;case 4:m=I([!0,!1]),w=m.next();case 9:if(w.done){U.u(11);break}E=w.value,C=I(t.keys()),P=C.next();case 12:if(P.done){w=m.next(),U.u(9);break}if(L=P.value,M=t.get(L),B=M.drmInfos.some(function(K){return!!K.licenseServerUri}),B!=E){U.u(13);break}return pe(U,15),_(U,navigator.requestMediaKeySystemAccess(L,[M]),17);case 17:return n=U.h,U.return(n);case 15:ke(U);case 16:Ht(e.j);case 13:P=C.next(),U.u(12);break;case 11:return U.return(n)}})}function Ca(e){su(e)&&e.m.resolve()}function kn(e,t){new st(function(){t.loaded=!0,Ca(e)}).aa(Li)}function ka(e,t,n){var r,i,o,a,f,p,g;return G(function(m){switch(m.g){case 1:try{r=e.A.createSession("persistent-license")}catch(w){return i=new Y(2,6,6005,w.message),e.s(i),m.return(Promise.reject(i))}return e.o.D(r,"message",function(w){e.l&&e.g.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.$?e.M.push(w):cs(e,w)}),e.o.D(r,"keystatuseschange",function(w){return Vc(e,w)}),o={initData:n.initData,initDataType:n.initDataType,loaded:!1,Lf:1/0,qb:null,type:"persistent-license"},e.i.set(r,o),pe(m,2),_(m,r.load(t),4);case 4:return a=m.h,Ht(e.j),a||(e.i.delete(r),f=e.g.persistentSessionOnlinePlayback?1:2,e.s(new Y(f,6,6013)),o.loaded=!0),kn(e,o),Ca(e),m.return(r);case 2:p=ke(m),Ht(e.j,p),e.i.delete(r),g=e.g.persistentSessionOnlinePlayback?1:2,e.s(new Y(g,6,6005,p.message)),o.loaded=!0,Ca(e);case 3:return m.return(Promise.resolve())}})}function Fd(e,t,n,r){try{var i=e.A.createSession(r)}catch(o){e.s(new Y(2,6,6005,o.message));return}e.o.D(i,"message",function(o){e.l&&e.g.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.$?e.M.push(o):cs(e,o)}),e.o.D(i,"keystatuseschange",function(o){return Vc(e,o)}),e.i.set(i,{initData:n,initDataType:t,loaded:!1,Lf:1/0,qb:null,type:r});try{n=e.g.initDataTransform(n,t,e.h)}catch(o){t=o,o instanceof Y||(t=new Y(2,6,6016,o)),e.s(t);return}e.g.logLicenseExchange&&Wo(n),i.generateRequest(t,n).catch(function(o){if(!e.j.g){e.i.delete(i);var a=o.errorCode;if(a&&a.systemCode){var f=a.systemCode;0>f&&(f+=Math.pow(2,32)),f="0x"+f.toString(16)}e.s(new Y(2,6,6006,o.message,o,f))}})}function Kd(e){return G(function(t){return t.g==1?e.K?_(t,e.m,3):t.u(0):_(t,Promise.all(e.V.map(function(n){return n.promise})),0)})}function cs(e,t){var n,r,i,o,a,f,p,g,m,w,E,C,P,L;G(function(M){switch(M.g){case 1:if(n=t.target,e.g.logLicenseExchange&&Wo(t.message),r=e.i.get(n),i=e.h.licenseServerUri,o=e.g.advanced[e.h.keySystem],t.messageType=="individualization-request"&&o&&o.individualizationServer&&(i=o.individualizationServer),a=wt([i],e.g.retryParameters),a.body=t.message,a.method="POST",a.licenseRequestType=t.messageType,a.sessionId=n.sessionId,a.drmInfo=e.h,r&&(a.initData=r.initData,a.initDataType=r.initDataType),o&&o.headers)for(f in o.headers)a.headers[f]=o.headers[f];if(e.h.keySystem==="org.w3.clearkey"){var B=a,U=e.h;try{var K=jt(B.body);if(K){var W=JSON.parse(K);W.type||(W.type=U.sessionType,B.body=ui(JSON.stringify(W)))}}catch{}}if(Ws(e.h.keySystem))if(B=wo(a.body,!0,!0),B.includes("PlayReadyKeyMessage")){for(B=Qi(B,"PlayReadyKeyMessage"),U=xr(B,"HttpHeader"),U=I(U),K=U.next();!K.done;K=U.next())W=K.value,K=xr(W,"name")[0],W=xr(W,"value")[0],a.headers[sn(K)]=sn(W);B=xr(B,"Challenge")[0],a.body=ci(sn(B))}else a.headers["Content-Type"]="text/xml; charset=utf-8";return p=Date.now(),pe(M,2),m=e.C.Tb.request(2,a,{isPreload:e.P()}),e.V.push(m),_(M,m.promise,4);case 4:g=M.h,Gr(e.V,m),be(M,3);break;case 2:return w=ke(M),e.j.g||(E=new Y(2,6,6007,w),e.i.size==1?(e.s(E),r&&r.qb&&r.qb.reject(E)):(r&&r.qb&&r.qb.reject(E),e.i.delete(n),su(e)&&(e.m.resolve(),e.L.aa(.1)))),M.return();case 3:return e.j.g?M.return():(e.H+=(Date.now()-p)/1e3,e.g.logLicenseExchange&&Wo(g.data),pe(M,5),_(M,n.update(g.data),7));case 7:be(M,6);break;case 5:return C=ke(M),P=new Y(2,6,6008,C.message),e.s(P),r&&r.qb&&r.qb.reject(P),M.return();case 6:if(e.j.g)return M.return();L=new Te("drmsessionupdate"),e.C.onEvent(L),r&&(r.qb&&r.qb.resolve(),kn(e,r)),le(M)}})}function Vc(e,t){t=t.target;var n=e.i.get(t),r=!1;t.keyStatuses.forEach(function(o,a){if(typeof a=="string"){var f=a;a=o,o=f}if(Ws(e.h.keySystem)&&a.byteLength==16&&(In()||Ei())){f=wr(a);var p=f.getUint32(0,!0),g=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,p,!1),f.setUint16(4,g,!1),f.setUint16(6,m,!1)}o!="status-pending"&&(n.loaded=!0),o=="expired"&&(r=!0),a=Yn(a).slice(0,32),e.ba.set(a,o)});var i=t.expiration-Date.now();(0>i||r&&1e3>i)&&n&&!n.qb&&(e.i.delete(t),Gn(t)),su(e)&&(e.m.resolve(),e.L.aa(Da))}function ml(e){var t=e.ba,n=e.ga;n.clear(),t.forEach(function(r,i){return n.set(i,r)}),t=Array.from(n.values()),t.length&&t.every(function(r){return r=="expired"})&&e.s(new Y(2,6,6014)),e.C.ke(Uc(n))}function Dn(){var e,t,n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve;return G(function(Ce){if(Ce.g==1){if(e="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(T.MediaKeys&&T.navigator&&T.navigator.requestMediaKeySystemAccess&&T.MediaKeySystemAccess&&T.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=I(e),r=n.next();!r.done;r=n.next())i=r.value,t[i]=null;return Ce.return(t)}for(o="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),a=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],f=["150","2000","3000"],p={"com.widevine.alpha":a,"com.widevine.alpha.experiment":a,"com.microsoft.playready.recommendation":f},g=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],w={videoCapabilities:g,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]},E=[null,"cenc","cbcs","cbcs-1-9"],C=new Map,P=function(_e,Ve){var yt,pt,ze,Kt,Pt,ot,Yt,qt,lt,Tn,ii,An,Cn;return G(function(Rn){switch(Rn.g){case 1:return pe(Rn,2),_(Rn,Ve.createMediaKeys(),4);case 4:yt=Rn.h,be(Rn,3);break;case 2:return ke(Rn),Rn.return();case 3:if(ze=(pt=Ve.getConfiguration().sessionTypes)?pt.includes("persistent-license"):!1,Js()&&(ze=!1),Kt=Ve.getConfiguration().videoCapabilities,Pt=Ve.getConfiguration().audioCapabilities,ot={persistentState:ze,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},C.has(_e)&&C.get(_e)?ot=C.get(_e):C.set(_e,ot),(Yt=Kt[0].encryptionScheme)&&!ot.encryptionSchemes.includes(Yt)&&ot.encryptionSchemes.push(Yt),(qt=Kt[0].robustness)&&!ot.videoRobustnessLevels.includes(qt)&&ot.videoRobustnessLevels.push(qt),(lt=Pt[0].robustness)&&!ot.audioRobustnessLevels.includes(lt)&&ot.audioRobustnessLevels.push(lt),"getStatusForPolicy"in yt){for(Tn=[],ii=I(o),An=ii.next(),Cn={};!An.done;Cn={qd:void 0},An=ii.next())Cn.qd=An.value,ot.minHdcpVersions.includes(Cn.qd)||Tn.push(yt.getStatusForPolicy({minHdcpVersion:Cn.qd}).then(function(Wn){return function(ic){ic!="usable"||ot.minHdcpVersions.includes(Wn.qd)||ot.minHdcpVersions.push(Wn.qd)}}(Cn)));return _(Rn,Promise.all(Tn),0)}Rn.u(0)}})},L=function(_e,Ve,yt,pt){var ze,Kt,Pt,ot,Yt,qt,lt,Tn,ii,An;return G(function(Cn){switch(Cn.g){case 1:for(pe(Cn,2),ze=Lr(w),Kt=I(ze.videoCapabilities),Pt=Kt.next();!Pt.done;Pt=Kt.next())ot=Pt.value,ot.encryptionScheme=Ve,ot.robustness=yt;for(Yt=I(ze.audioCapabilities),qt=Yt.next();!qt.done;qt=Yt.next())lt=qt.value,lt.encryptionScheme=Ve,lt.robustness=pt;return Tn=Lr(ze),Tn.persistentState="required",Tn.sessionTypes=["persistent-license"],ii=[Tn,ze],_(Cn,Jo(1,navigator.requestMediaKeySystemAccess(_e,ii)),4);case 4:return An=Cn.h,_(Cn,P(_e,An),5);case 5:be(Cn,0);break;case 2:ke(Cn),le(Cn)}})},M=function(_e,Ve,yt,pt){var ze,Kt,Pt;return G(function(ot){switch(ot.g){case 1:return pe(ot,2),ze={type:"media-source",video:{contentType:g[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:m[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:_e,video:{encryptionScheme:Ve,robustness:yt},audio:{encryptionScheme:Ve,robustness:pt}}},_(ot,Jo(1,navigator.mediaCapabilities.decodingInfo(ze)),4);case 4:return Kt=ot.h,Pt=Kt.keySystemAccess,_(ot,P(_e,Pt),5);case 5:be(ot,0);break;case 2:ke(ot),le(ot)}})},B=I(e),U=B.next();!U.done;U=B.next())K=U.value,C.set(K,null);for(W=function(_e){return!(_e==="org.w3.clearkey"&&wu()||_e&&_e.match(/^com\.apple\.fps/)&&Tu()||Ws(_e)&&(Rh()||So())||Ws(_e)&&Tt("Firefox")||_e==="com.huawei.wiseplay"&&(Tu()||Rh()))},X=[],q=I(E),F=q.next();!F.done;F=q.next())for(Q=F.value,H=I(e),Z=H.next();!Z.done;Z=H.next())$=Z.value,W($)&&(X.push(L($,Q,"","")),X.push(M($,Q,"","")));for(ue=I(e),de=ue.next();!de.done;de=ue.next())for(ie=de.value,ce=I(p[ie]||[]),Se=ce.next();!Se.done;Se=ce.next())ve=Se.value,W(ie)&&(X.push(L(ie,null,ve,"")),X.push(L(ie,null,"",ve)),X.push(M(ie,null,ve,"")),X.push(M(ie,null,"",ve)));return _(Ce,Promise.all(X),2)}return Ce.return(Uc(C))})}function Gn(e){return G(function(t){if(t.g==1)return pe(t,2),_(t,Jo(Oo,Promise.all([e.close().catch(function(){}),e.closed])),4);if(t.g!=2)return be(t,0);ke(t),le(t)})}function Mn(e){var t;return G(function(n){return t=Array.from(e.i.entries()),e.i.clear(),_(n,Promise.all(t.map(function(r){r=I(r);var i=r.next().value,o=r.next().value;return G(function(a){if(a.g==1)return pe(a,2),e.ha||e.B.has(i.sessionId)||o.type!=="persistent-license"||e.g.persistentSessionOnlinePlayback?_(a,Gn(i),5):_(a,i.remove(),5);if(a.g!=2)return be(a,0);ke(a),le(a)})})),0)})}function Aa(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Pa(e){e.i.forEach(function(t,n){var r=t.Lf,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.C.onExpirationUpdated(n.sessionId,i),t.Lf=i)})}function su(e){return e=e.i.values(),_c(e,function(t){return t.loaded})}function yv(e){for(var t=I(e.h&&e.h.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.ba.get(n.value)!=="usable")return!1;return!0}function kr(e,t){var n=[];for(t.forEach(function(r,i){n.push({keySystem:i,licenseServerUri:r,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=I(e),t=e.next();!t.done;t=e.next())t=t.value,t.video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}function Fc(e,t,n,r,i,o,a,f){var p=[];e=I(e);for(var g=e.next(),m={};!g.done;m={ua:void 0},g=e.next()){if(m.ua=g.value,t.includes(m.ua.encryptionScheme)||t.push(m.ua.encryptionScheme),m.ua.keySystem=="org.w3.clearkey"&&m.ua.licenseServerUri.startsWith("data:application/json;base64,")?p.includes(m.ua.licenseServerUri)||p.push(m.ua.licenseServerUri):n.includes(m.ua.licenseServerUri)||n.push(m.ua.licenseServerUri),i.includes(m.ua.serverCertificateUri)||i.push(m.ua.serverCertificateUri),m.ua.serverCertificate&&(r.some(function(C){return function(P){return vo(P,C.ua.serverCertificate)}}(m))||r.push(m.ua.serverCertificate)),m.ua.initData){g=I(m.ua.initData);for(var w=g.next(),E={};!w.done;E={Af:void 0},w=g.next())E.Af=w.value,o.some(function(C){return function(P){var L=C.Af;return P.keyId&&P.keyId==L.keyId?!0:P.initDataType==L.initDataType&&vo(P.initData,L.initData)}}(E))||o.push(E.Af)}if(m.ua.keyIds)for(g=I(m.ua.keyIds),w=g.next();!w.done;w=g.next())a.add(w.value);if(m.ua.keySystemUris&&f)for(m=I(m.ua.keySystemUris),g=m.next();!g.done;g=m.next())f.add(g.value)}if(p.length==1)n.push(p[0]);else if(0<p.length){for(t=[],p=I(p),r=p.next();!r.done;r=p.next())r=T.atob(r.value.split("data:application/json;base64,").pop()),r=JSON.parse(r),t.push.apply(t,ee(r.keys));p=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+T.btoa(p))}}function Hd(e,t,n,r){var i=e.keySystem;i&&(i!="org.w3.clearkey"||!e.licenseServerUri)&&(t.size&&t.get(i)&&(t=t.get(i),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(i))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=n.persistentStateRequired),e.serverCertificate||(e.serverCertificate=n.serverCertificate),n.sessionType&&(e.sessionType=n.sessionType),e.serverCertificateUri||(e.serverCertificateUri=n.serverCertificateUri)),r[i]&&(e.keySystem=r[i]),T.cast&&T.cast.__platform__&&i=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function Kc(e,t){if(e=us(e),e.size!=0){e=xd(e),t=I(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}var Oo=1,Li=5,Da=.5;function fs(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=I(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}fs.prototype.add=function(e,t){var n=this.h;t=t===void 0?!0:t;var r;if(!(r=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(r=n.audio&&e.audio)){r=n.audio;var i=e.audio;r=!(!((!r.channelsCount||!i.channelsCount||2<r.channelsCount||2<i.channelsCount)&&r.channelsCount!=i.channelsCount||r.spatialAudio!==i.spatialAudio||t&&!Hc(r,i))&&qd(r.roles,i.roles)&&r.groupId===i.groupId)}return!r&&(r=n.video&&e.video)&&(n=n.video,r=e.video,r=!((!t||Hc(n,r))&&qd(n.roles,r.roles))),r?!1:(this.g.add(e),!0)},fs.prototype.values=function(){return this.g.values()};function Hc(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(r){return $o(r)}),t=t.codecs.split(",").map(function(r){return $o(r)}),e.length!=t.length))return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function qd(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=I(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}Me("shaka.media.AdaptationSet",fs),Me("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function qc(){}qc.prototype.create=function(){},qc.prototype.configure=function(){},Me("shaka.media.AdaptationSetCriteria",qc);function $h(){this.g=ds,this.i=new Map().set(ds,2).set(Sl,1),this.h=0}function zd(e,t,n){e.i.set(ds,n).set(Sl,t)}var Sl=0,ds=1;function zc(e,t,n){var r=e.video&&e.video.hdr?e.video.hdr:"",i=e.audio&&e.audio.spatialAudio?e.audio.spatialAudio:!1,o=e.video&&e.video.videoLayout?e.video.videoLayout:"",a=e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,f=e.audio&&e.audio.codecs?e.audio.codecs:"";this.g=n(),this.g.configure({language:e.language,role:"",channelCount:a,Oc:r,spatialAudio:i,videoLayout:o,Gc:"",cd:"",codecSwitchingStrategy:t,audioCodec:f})}zc.prototype.create=function(e){return this.g.create(e)},zc.prototype.configure=function(){};/*
|
||
@license
|
||
Shaka Player
|
||
Copyright 2023 Google LLC
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/function Gc(e,t,n){this.g=e,this.i=t,this.h=n}function ps(e,t){return G(function(n){if(n.g==1)return _(n,fv(e.h,t,e.g.drm.preferredKeySystems,e.g.drm.keySystemsMapping),2);if(e.g.streaming.dontChooseCodecs||Oc(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(Pi))throw new Y(2,4,4032);return n.return(Oa(e,t))})}function Gd(e,t){var n=e.g.restrictions;e=e.i;var r=!1;t=I(t.variants);for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=i.allowedByApplication;i.allowedByApplication=ns(i,n,e),o!=i.allowedByApplication&&(r=!0)}return r}function Oa(e,t){var n=Gd(e,t);if(t){var r=e.h?e.h.h:null;if(r&&e.h.A)for(var i=I(t.variants),o=i.next();!o.done;o=i.next())o=o.value,hs(e,r.keySystem,o.video),hs(e,r.keySystem,o.audio);Wd(e,t)}return n}function hs(e,t,n){if(n){n=I(n.drmInfos);for(var r=n.next();!r.done;r=n.next())if(r=r.value,r.keySystem==t){r=I(r.initData||[]);for(var i=r.next();!i.done;i=r.next())i=i.value,lu(e.h,i.initDataType,i.initData)}}}function Wd(e,t){e=e.h?e.h.Vd():{};var n=Object.keys(e);n=n.length&&n[0]=="00";var r=!1,i=!1,o=new Set,a=new Set;t=I(t.variants);for(var f=t.next();!f.done;f=t.next()){f=f.value;var p=[];f.audio&&p.push(f.audio),f.video&&p.push(f.video),p=I(p);for(var g=p.next();!g.done;g=p.next())if(g=g.value,g.keyIds.size){g=I(g.keyIds);for(var m=g.next();!m.done;m=g.next()){m=m.value;var w=e[n?"00":m];w?Wc.includes(w)&&a.add(w):o.add(m)}}f.allowedByApplication?f.allowedByKeySystem&&(r=!0):i=!0}if(!r)throw e={hasAppRestrictions:i,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(a)},new Y(2,4,4012,e)}var Wc=["output-restricted","internal-error"];function ys(){}function Xd(e,t){if(t){var n=hi[t.toLowerCase()];if(n)return n}throw new Y(2,4,4e3,e,t)}Me("shaka.media.ManifestParser",ys),ys.unregisterParserByMime=function(e){delete hi[e]},ys.registerParserByMime=function(e,t){hi[e]=t},ys.registerParserByExtension=function(){Rt("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},ys.AccessibilityPurpose={yk:"visually impaired",Pj:"hard of hearing"};var hi={};function Jh(e,t){function n(){o=!0}function r(m){f.push(m),it(m)}var i=e=Ze(e),o=!1,a,f=[],p=[];if(new Vt().box("moov",r).box("trak",r).box("mdia",r).box("minf",r).box("stbl",r).S("stsd",function(m){a=m,f.push(m),Po(m)}).S("encv",n).S("enca",n).S("dvav",function(m){p.push({box:m,Ya:1701733238})}).S("dva1",function(m){p.push({box:m,Ya:1701733238})}).S("dvh1",function(m){p.push({box:m,Ya:1701733238})}).S("dvhe",function(m){p.push({box:m,Ya:1701733238})}).S("dvc1",function(m){p.push({box:m,Ya:1701733238})}).S("dvi1",function(m){p.push({box:m,Ya:1701733238})}).S("hev1",function(m){p.push({box:m,Ya:1701733238})}).S("hvc1",function(m){p.push({box:m,Ya:1701733238})}).S("avc1",function(m){p.push({box:m,Ya:1701733238})}).S("avc3",function(m){p.push({box:m,Ya:1701733238})}).S("ac-3",function(m){p.push({box:m,Ya:1701733217})}).S("ec-3",function(m){p.push({box:m,Ya:1701733217})}).S("ac-4",function(m){p.push({box:m,Ya:1701733217})}).S("mp4a",function(m){p.push({box:m,Ya:1701733217})}).parse(e),o)return e;if(p.length==0||!a)throw Yn(e),new Y(2,3,3019,t);p.reverse(),t=I(p);for(var g=t.next();!g.done;g=t.next())g=g.value,i=Yd(i,a,g.box,f,g.Ya);return In()&&Tu()&&!$i()?(t=new Uint8Array(e.byteLength+i.byteLength),t.set(i),t.set(e,i.byteLength),t):i}function Yd(e,t,n,r,i){var o=Qh.value(),a=e.subarray(n.start,n.start+n.size),f=wr(a),p=new Uint8Array(n.size+o.byteLength);for(p.set(a,0),a=wr(p),a.setUint32(4,i),p.set(o,n.size),i=f.getUint32(4),a.setUint32(n.size+16,i),$d(p,0,p.byteLength),i=new Uint8Array(e.byteLength+p.byteLength),n=$i()||In()?n.start:n.start+n.size,o=e.subarray(n),i.set(e.subarray(0,n)),i.set(p,n),i.set(o,n+p.byteLength),e=I(r),r=e.next();!r.done;r=e.next())r=r.value,$d(i,r.start,r.size+p.byteLength);return p=wr(i,t.start),t=Mi(t),e=p.getUint32(t),p.setUint32(t,e+1),i}function $d(e,t,n){e=wr(e,t),t=e.getUint32(0),t!=0&&(t==1?(e.setUint32(8,n>>32),e.setUint32(12,n&4294967295)):e.setUint32(0,n))}var Qh=new Ii(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ar(e,t,n,r,i,o,a){this.N=e,this.Ma=t,this.va=n,this.Tc=r===void 0?null:r,this.timescale=i===void 0?null:i,this.g=o===void 0?null:o,this.aesKey=a===void 0?null:a,this.mimeType=this.codecs=null}Ar.prototype.bc=function(){return this.Ma},Ar.prototype.$b=function(){return this.va},Ar.prototype.Pb=function(){return this.g};function Jd(e,t){return e===t?!0:e&&t?e.bc()==t.bc()&&e.$b()==t.$b()&&Gs(e.N().sort(),t.N().sort())&&vo(e.Pb(),t.Pb()):e==t}Me("shaka.media.InitSegmentReference",Ar),Ar.prototype.getEndByte=Ar.prototype.$b,Ar.prototype.getStartByte=Ar.prototype.bc;function Fe(e,t,n,r,i,o,a,f,p,g,m,w,E,C,P,L){for(g=g===void 0?[]:g,C=C===void 0?au:C,this.startTime=e,this.j=this.endTime=t,this.C=n,this.Ma=r,this.va=i,this.ca=o,this.timestampOffset=a,this.appendWindowStart=f,this.appendWindowEnd=p,this.g=g,this.tilesLayout=m===void 0?"":m,this.A=w===void 0?null:w,this.h=E===void 0?null:E,this.status=C,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=P===void 0?null:P,this.thumbnailSprite=null,this.i=-1,this.s=L===void 0?!1:L,this.F=this.o=!1,e=I(this.g),t=e.next();!t.done;t=e.next())t.value.Xg();this.s&&this.g.length&&this.g[this.g.length-1].Wg(),this.B=this.bandwidth=this.mimeType=this.codecs=null}h=Fe.prototype,h.N=function(){return this.C()},h.getStartTime=function(){return this.startTime},h.ei=function(){return this.endTime},h.bc=function(){return this.Ma},h.$b=function(){return this.va},h.xi=function(){return this.tilesLayout},h.wi=function(){return this.A},h.cc=function(){return this.status},h.Pi=function(){this.status=Qd},h.If=function(){this.preload=!0},h.isPreload=function(){return this.preload},h.Sc=function(){this.l=!1},h.Hi=function(){return this.l},h.Xg=function(){this.o=!0},h.Ji=function(){return this.o},h.Wg=function(){this.F=!0},h.Ii=function(){return this.F},h.Vg=function(){this.m=!0},h.Di=function(){return this.m},h.we=function(e){this.thumbnailSprite=e},h.vi=function(){return this.thumbnailSprite},h.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=I(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},h.fg=function(e){this.h==null?Ti("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},h.qj=function(e){this.B=e},h.Pb=function(){return this.B};function Zh(e,t){e.ca=t,e=I(e.g);for(var n=e.next();!n.done;n=e.next())Zh(n.value,t)}Me("shaka.media.SegmentReference",Fe),Fe.prototype.getSegmentData=Fe.prototype.Pb,Fe.prototype.setSegmentData=Fe.prototype.qj,Fe.prototype.syncAgainst=Fe.prototype.fg,Fe.prototype.offset=Fe.prototype.offset,Fe.prototype.getThumbnailSprite=Fe.prototype.vi,Fe.prototype.setThumbnailSprite=Fe.prototype.we,Fe.prototype.hasByterangeOptimization=Fe.prototype.Di,Fe.prototype.markAsByterangeOptimization=Fe.prototype.Vg,Fe.prototype.isLastPartial=Fe.prototype.Ii,Fe.prototype.markAsLastPartial=Fe.prototype.Wg,Fe.prototype.isPartial=Fe.prototype.Ji,Fe.prototype.markAsPartial=Fe.prototype.Xg,Fe.prototype.isIndependent=Fe.prototype.Hi,Fe.prototype.markAsNonIndependent=Fe.prototype.Sc,Fe.prototype.isPreload=Fe.prototype.isPreload,Fe.prototype.markAsPreload=Fe.prototype.If,Fe.prototype.markAsUnavailable=Fe.prototype.Pi,Fe.prototype.getStatus=Fe.prototype.cc,Fe.prototype.getTileDuration=Fe.prototype.wi,Fe.prototype.getTilesLayout=Fe.prototype.xi,Fe.prototype.getEndByte=Fe.prototype.$b,Fe.prototype.getStartByte=Fe.prototype.bc,Fe.prototype.getEndTime=Fe.prototype.ei,Fe.prototype.getStartTime=Fe.prototype.getStartTime,Fe.prototype.getUris=Fe.prototype.N;var au=0,Qd=1;Fe.Status={Aj:au,wk:Qd,Xj:2};function gs(e){return e.length==1&&1e-4>e.end(0)-e.start(0)}function Xc(e){return!e||gs(e)?null:e.length?e.end(e.length-1):null}function vs(e,t){return!e||!e.length||gs(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function ey(e,t){if(!e||!e.length||gs(e))return 0;var n=0;e=I(ju(e));for(var r=e.next();!r.done;r=e.next()){var i=r.value;r=i.start,i=i.end,i>t&&(n+=i-Math.max(r,t))}return n}function gv(e,t,n){return!e||!e.length||gs(e)?null:(e=ju(e).findIndex(function(r,i,o){return r.start>t&&(i==0||o[i-1].end-t<=n)}),0<=e?e:null)}function ju(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function Ni(){}function Yc(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function oo(e){for(;e.firstChild;)e.removeChild(e.firstChild)}Me("shaka.util.Dom",Ni),Ni.removeAllChildren=oo;/*
|
||
@license
|
||
Shaka Player
|
||
Copyright 2022 Google LLC
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/function $c(){}function Zd(e,t){return t+10<=e.length&&e[t]===73&&e[t+1]===68&&e[t+2]===51&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function ep(e,t){return t+10<=e.length&&e[t]===51&&e[t+1]===68&&e[t+2]===73&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function Ra(e,t){var n=(e[t]&127)<<21;return n|=(e[t+1]&127)<<14,n|=(e[t+2]&127)<<7,n|=e[t+3]&127}function ms(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.type==="APIC"){if(2>e.size||e.data[0]!==3)return null;var n=e.data.subarray(1).indexOf(0);if(n===-1)return null;var r=Qt(Ze(e.data,1,n)),i=e.data[2+n],o=e.data.subarray(3+n).indexOf(0);if(o===-1)return null;var a=Qt(Ze(e.data,3+n,o)),f;return r==="-->"?f=Qt(Ze(e.data,4+n+o)):f=zr(e.data.subarray(4+n+o)),t.mimeType=r,t.pictureType=i,t.description=a,t.data=f,t}return e.type==="TXXX"?2>e.size||e.data[0]!==3||(r=e.data.subarray(1).indexOf(0),r===-1)?null:(n=Qt(Ze(e.data,1,r)),e=Qt(Ze(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="WXXX"?2>e.size||e.data[0]!==3||(r=e.data.subarray(1).indexOf(0),r===-1)?null:(n=Qt(Ze(e.data,1,r)),e=Qt(Ze(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="PRIV"?2>e.size||(n=e.data.indexOf(0),n===-1)?null:(n=Qt(Ze(e.data,0,n)),t.description=n,n=="com.apple.streaming.transportStreamTimestamp"?(n=e.data.subarray(n.length+1),e=n[3]&1,n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=4772185884e-2),t.data=n):(e=zr(e.data.subarray(n.length+1)),t.data=e),t):e.type[0]==="T"?2>e.size||e.data[0]!==3?null:(e=Qt(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):e.type[0]==="W"?(e=Qt(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=zr(e.data),t):null}function cu(e){for(var t=0,n=[];Zd(e,t);){var r=Ra(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,r=t+r;t+10<r;){var i=e.subarray(t),o=Ra(i,4);i={type:String.fromCharCode(i[0],i[1],i[2],i[3]),size:o,data:i.subarray(10,10+o)},(o=ms(i))&&n.push(o),t+=i.size+10}ep(e,t)&&(t+=10)}return n}function Bu(e,t){for(var n=t=t===void 0?0:t,r=0;Zd(e,t);)e[t+5]>>6&1&&(r+=10),r+=10,r+=Ra(e,t+6),ep(e,t+10)&&(r+=10),t+=r;return 0<r?e.subarray(n,n+r):new Uint8Array([])}Me("shaka.util.Id3Utils",$c),$c.getID3Data=Bu,$c.getID3Frames=cu;function ty(e,t){var n=null,r=null,i=null,o=e.R();return t&1&&(i=e.Yc()),t&2&&e.skip(4),t&8&&(n=e.R()),t&16&&(r=e.R()),{trackId:o,jd:n,Sd:r,Ak:i}}function ba(e,t){return t==1?(t=e.R(),e=e.R(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.R()}}function Ma(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.R(),e.skip(4),e=e.ma(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function tp(e,t,n){var r=e.R(),i=[],o=null;n&1&&(o=e.R()),n&4&&e.skip(4);for(var a=0;a<r;a++){var f={Wf:null,sampleSize:null,se:null};n&256&&(f.Wf=e.R()),n&512&&(f.sampleSize=e.R()),n&1024&&e.skip(4),n&2048&&(f.se=t==0?e.R():e.fh()),i.push(f)}return{Ek:r,kh:i,Xh:o}}function np(e){e.skip(6),e.skip(2),e.skip(8);var t=e.ma();return e.skip(2),e.skip(2),e.skip(2),e=e.ma()+e.ma()/65536,{channelCount:t,sampleRate:e}}function rp(e){return e=e.R(),{codec:Ur(e)}}function vv(e){var t=null,n=null,r=e.Ab(4),i=String.fromCharCode(r[0]);if(i+=String.fromCharCode(r[1]),i+=String.fromCharCode(r[2]),i+=String.fromCharCode(r[3]),i==="nclx"){switch(e.ma()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(r=e.ma(),e.ma(),r){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,Jd:n}}function ir(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function cn(e){return(10>e?"0":"")+e}function Ro(e,t){if(this.j=e,t!==void 0&&t){t=new Uint8Array(e.byteLength);for(var n=0,r=0;r<e.byteLength;r++)2<=r&&e[r]==3&&e[r-1]==0&&e[r-2]==0||(t[n]=e[r],n++);this.j=Ze(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function Jc(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),r=Math.min(4,e.i);r!==0&&(n.set(e.j.subarray(t,t+r)),e.h=new Mt(n,0).R(),e.g=8*r,e.i-=r)}function Pr(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,Jc(e)}e.h<<=t,e.g-=t}function dt(e,t){var n=Math.min(e.g,t),r=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&Jc(e),n=t-n,0<n?r<<n|dt(e,n):r}function Qc(e){var t;for(t=0;t<e.g;++t)if((e.h&2147483648>>>t)!==0)return e.h<<=t,e.g-=t,t;return Jc(e),t+Qc(e)}function or(e){Pr(e,1+Qc(e))}function Oe(e){var t=Qc(e);return dt(e,t+1)-1}function Vu(e){return e=Oe(e),1&e?1+e>>>1:-1*(e>>>1)}function Be(e){return dt(e,1)===1}function Ct(e){return dt(e,8)}function Ss(e,t){for(var n=8,r=8,i=0;i<t;i++)r!==0&&(r=Vu(e),r=(n+r+256)%256),n=r===0?n:r}function ip(e){return Ct(e),Oe(e),Oe(e)}Me("shaka.util.ExpGolomb",Ro);function Xt(){this.G=null,this.H=!1,this.m=this.I=null,this.j=[],this.g=[],this.A=this.B=null,this.i=[],this.h=[],this.C=null,this.l=[],this.F=this.o=this.s=null}h=Xt.prototype,h.clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},h.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,Ts(e)),n=e.length-(e.length+t)%188,r=!1,i=t;i<n;i+=188)if(e[i]==71){var o=!!(e[i+1]&64),a=((e[i+1]&31)<<8)+e[i+2];if(1<(e[i+3]&48)>>4){var f=i+5+e[i+4];if(f==i+188)continue}else f=i+4;switch(a){case 0:o&&(f+=e[f]+1),this.G=(e[f+10]&31)<<8|e[f+11];break;case 17:case 8191:break;case this.G:o&&(f+=e[f]+1),o=e,a={audio:-1,video:-1,$d:-1,audioCodec:"",videoCodec:""};var p=f+3+((o[f+1]&15)<<8|o[f+2])-4;for(f+=12+((o[f+10]&15)<<8|o[f+11]);f<p;){var g=(o[f+1]&31)<<8|o[f+2],m=(o[f+3]&15)<<8|o[f+4];switch(o[f]){case 6:if(0<m)for(var w=f+5,E=m;2<E;){var C=o[w+1]+2;switch(o[w]){case 5:var P=ea(o.subarray(w+2,w+C));a.audio==-1&&P==="Opus"?(a.audio=g,a.audioCodec="opus"):a.video==-1&&P==="AV01"&&(a.video=g,a.videoCodec="av1");break;case 106:a.audio==-1&&(a.audio=g,a.audioCodec="ac3");break;case 122:a.audio==-1&&(a.audio=g,a.audioCodec="ec3");break;case 124:a.audio==-1&&(a.audio=g,a.audioCodec="aac");break;case 127:a.audioCodec=="opus"&&(P=null,o[w+2]===128&&(P=o[w+3]),P!=null&&(this.F={channelCount:(P&15)===0?2:P&15,Rh:P,sampleRate:48e3}))}w+=C,E-=C}break;case 15:a.audio==-1&&(a.audio=g,a.audioCodec="aac");break;case 17:a.audio==-1&&(a.audio=g,a.audioCodec="aac-loas");break;case 21:a.$d==-1&&(a.$d=g);break;case 27:a.video==-1&&(a.video=g,a.videoCodec="avc");break;case 3:case 4:a.audio==-1&&(a.audio=g,a.audioCodec="mp3");break;case 36:a.video==-1&&(a.video=g,a.videoCodec="hvc");break;case 129:a.audio==-1&&(a.audio=g,a.audioCodec="ac3");break;case 132:case 135:a.audio==-1&&(a.audio=g,a.audioCodec="ec3")}f+=m+5}o=a,o.video!=-1&&(this.I=o.video,this.m=o.videoCodec),o.audio!=-1&&(this.B=o.audio,this.A=o.audioCodec),o.$d!=-1&&(this.C=o.$d),r&&!this.H&&(r=!1,i=t-188),this.H=!0;break;case this.I:f=e.subarray(f,i+188),o?this.j.push([f]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(f);break;case this.B:f=e.subarray(f,i+188),o?this.i.push([f]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(f);break;case this.C:f=e.subarray(f,i+188),o?this.l.push([f]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(f);break;default:r=!0}}return this};function La(e,t){if((t[0]<<16|t[1]<<8|t[2])!==1)return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var r=t[7];if(r&192){var i=536870912*(t[9]&14)+4194304*(t[10]&255)+16384*(t[11]&254)+128*(t[12]&255)+(t[13]&254)/2;e.s==null&&(e.s=i),n.pts=Zc(i,e.s),e.s=n.pts,n.dts=n.pts,r&64&&(r=536870912*(t[14]&14)+4194304*(t[15]&255)+16384*(t[16]&254)+128*(t[17]&255)+(t[18]&254)/2,e.o==null&&(e.o=r),n.dts=Zc(r,e.o)),e.o=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}h.Vi=function(e){return Rt("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Of(e,{Bd:null,state:null})},h.Of=function(e,t){var n=e.pts?e.pts/9e4:null;e=e.data;var r=e.byteLength,i=1;this.m=="hvc"&&(i=2);var o=t.state||0,a=o,f=0,p=[],g=-1,m=0;for(o==-1&&(g=0,m=this.m=="hvc"?e[0]>>1&63:e[0]&31,o=0,f=1);f<r;){var w=e[f++];o?o===1?o=w?0:2:w?w==1?(w=f-o-1,0<=g?p.push({data:e.subarray(g+i,w),fullData:e.subarray(g,w),type:m,time:n,state:null}):(o=p.length?p[p.length-1]:t.Bd)&&(a&&f<=4-a&&o.state&&(o.data=o.data.subarray(0,o.data.byteLength-a),o.fullData=o.fullData.subarray(0,o.fullData.byteLength-a)),0<w&&(w=e.subarray(0,w),o.data=rn(o.data,w),o.fullData=rn(o.fullData,w),o.state=0)),f<r?(m=this.m=="hvc"?e[f]>>1&63:e[f]&31,g=f,o=0):o=-1):o=0:o=3:o=w?0:1}return 0<=g&&0<=o&&p.push({data:e.subarray(g+i,r),fullData:e.subarray(g,r),type:m,time:n,state:o}),!p.length&&t.Bd&&(n=p.length?p[p.length-1]:t.Bd)&&(n.data=rn(n.data,e),n.fullData=rn(n.fullData,e)),t.state=o,p},h.getMetadata=function(){for(var e=[],t=I(this.l),n=t.next();!n.done;n=t.next())n=rn.apply(ar,ee(n.value)),(n=La(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:cu(n.data),dts:n.dts,pts:n.pts});return e},h.fb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=I(this.i),n=t.next();!n.done;n=t.next()){var r=rn.apply(ar,ee(n.value)),i=La(this,r);n=this.h.length?this.h[this.h.length-1]:null,i&&i.pts!=null&&i.dts!=null&&(!n||n.pts!=i.pts&&n.dts!=i.dts)?(this.h.length&&i.dts<(n.dts||0)&&(e=!0),this.h.push(i)):this.h.length&&(r=i?i.data:r)&&(n=this.h.pop(),n.data=rn(n.data,r),this.h.push(n))}e&&(this.h=this.h.sort(function(o,a){var f=(o.pts||0)-(a.pts||0);return(o.dts||0)-(a.dts||0)||f}))}return this.h},h.tc=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=!1,n=I(this.j),r=n.next();!r.done;r=n.next()){var i=rn.apply(ar,ee(r.value)),o=La(this,i);r=this.g.length?this.g[this.g.length-1]:null,o&&o.pts!=null&&o.dts!=null&&(!r||r.pts!=o.pts&&r.dts!=o.dts)?(this.g.length&&o.dts<(r.dts||0)&&(t=!0),this.g.push(o)):this.g.length&&(i=o?o.data:i)&&(r=this.g.pop(),r.data=rn(r.data,i),this.g.push(r))}if(e){for(n={Bd:null,state:null},r=[],i=I(this.g),o=i.next();!o.done;o=i.next())o=o.value,o.nalus=this.Of(o,n),o.nalus.length&&(r.push(o),n.Bd=o.nalus[o.nalus.length-1]);this.g=r}t&&(this.g=this.g.sort(function(a,f){var p=(a.pts||0)-(f.pts||0);return(a.dts||0)-(f.dts||0)||p}))}return e?this.g:(e=this.g,this.g=[],e)},h.getStartTime=function(e){if(e=="audio"){e=null;var t=this.fb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return e=="video"?(e=null,t=this.tc(!1),t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},h.kd=function(){return{audio:this.A,video:this.m}},h.Zd=function(){for(var e=[],t=I(this.tc()),n=t.next();!n.done;n=t.next())e.push.apply(e,ee(n.value.nalus));return e},h.Ai=function(){Rt("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.yf();return{height:e.height,width:e.width}},h.yf=function(){return this.m=="hvc"?ny(this):mv(this)};function Na(e){var t=e.tc();return 1<t.length&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(1/(t-e)*9e4):null}function mv(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Zd();if(!n.length||(n=n.find(function(C){return C.type==7}),!n))return t;n=new Ro(n.data);var r=Ct(n),i=Ct(n),o=Ct(n);if(or(n),fu.includes(r)){var a=Oe(n);if(a===3&&Pr(n,1),or(n),or(n),Pr(n,1),Be(n)){a=a!==3?8:12;for(var f=0;f<a;f++)Be(n)&&(6>f?Ss(n,16):Ss(n,64))}}if(or(n),a=Oe(n),a===0)Oe(n);else if(a===1)for(Pr(n,1),or(n),or(n),a=Oe(n),f=0;f<a;f++)or(n);or(n),Pr(n,1),a=Oe(n),f=Oe(n);var p=dt(n,1);p===0&&Pr(n,1),Pr(n,1);var g=0,m=0,w=0,E=0;return Be(n)&&(g=Oe(n),m=Oe(n),w=Oe(n),E=Oe(n)),t.height=String((2-p)*(f+1)*16-2*w-2*E),t.width=String(16*(a+1)-2*g-2*m),t.codec="avc1."+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+o.toString(16).toUpperCase()).slice(-2),t.frameRate=Na(e),t}function ny(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Zd();if(!n.length||(n=n.find(function(X){return X.type==33}),!n))return t;var r=new Ro(n.fullData,!0);Ct(r),Ct(r),dt(r,4);var i=dt(r,3);Be(r);var o=dt(r,2),a=dt(r,1),f=dt(r,5),p=dt(r,32);n=Ct(r);for(var g=Ct(r),m=Ct(r),w=Ct(r),E=Ct(r),C=Ct(r),P=Ct(r),L=[],M=[],B=0;B<i;B++)L.push(Be(r)),M.push(Be(r));if(0<i)for(B=i;8>B;B++)dt(r,2);for(B=0;B<i;B++)L[B]&&dt(r,88),M[B]&&Ct(r);Oe(r),i=Oe(r),i==3&&dt(r,1),L=Oe(r),M=Oe(r);var U=B=0,K=0,W=0;return Be(r)&&(B+=Oe(r),U+=Oe(r),K+=Oe(r),W+=Oe(r)),t.width=String(L-(B+U)*(i===1||i===2?2:1)),t.height=String(M-(K+W)*(i===1?2:1)),r=function(X){for(var q=0,F=0;32>F;F++)q|=(X>>F&1)<<31-F;return q>>>0}(p),a=a==1?"H":"L",o="hvc1"+("."+["","A","B","C"][o]+f),o+="."+r.toString(16).toUpperCase(),o+="."+a+P,C&&(o+="."+C.toString(16).toUpperCase()),E&&(o+="."+E.toString(16).toUpperCase()),w&&(o+="."+w.toString(16).toUpperCase()),m&&(o+="."+m.toString(16).toUpperCase()),g&&(o+="."+g.toString(16).toUpperCase()),n&&(o+="."+n.toString(16).toUpperCase()),t.codec=o,t.frameRate=Na(e),t}function Zc(e,t){var n=1;for(e>t&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function ws(e){return!(0>Ts(e))}function Ts(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(e[n]==71&&e[n+188]==71&&e[n+376]==71)return n;n++}return-1}Me("shaka.util.TsParser",Xt),Xt.syncOffset=Ts,Xt.probe=ws,Xt.prototype.getVideoInfo=Xt.prototype.yf,Xt.prototype.getVideoResolution=Xt.prototype.Ai,Xt.prototype.getVideoNalus=Xt.prototype.Zd,Xt.prototype.getCodecs=Xt.prototype.kd,Xt.prototype.getStartTime=Xt.prototype.getStartTime,Xt.prototype.getVideoData=Xt.prototype.tc,Xt.prototype.getAudioData=Xt.prototype.fb,Xt.prototype.getMetadata=Xt.prototype.getMetadata,Xt.prototype.parseNalus=Xt.prototype.Of,Xt.prototype.parseAvcNalus=Xt.prototype.Vi,Xt.prototype.parse=Xt.prototype.parse,Xt.prototype.clearData=Xt.prototype.clearData,Xt.Timescale=9e4;var fu=[100,110,122,244,44,83,86,118,128,138,139,134];function _a(e,t,n){this.g=null,this.o=-1,this.l=e,this.i=t,this.m=n,this.j=!1;e:{if(typeof libDPIModule>"u"&&ft("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u")this.h=LCEVCdec;else if(typeof LcevcDil<"u")this.h=LcevcDil,this.j=!0,Rt("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ft("Could not find LCEVC Library on this page"),e=!1;break e}typeof this.h.SupportObject>"u"?(ft("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||ft(this.h.SupportObject.SupportError),e=typeof this.h<"u"&&typeof libDPIModule<"u"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function op(e){e.g&&e.i.classList.add("shaka-hidden")}_a.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ef(e,t,n){var r=0,i=-1;switch(t.mimeType){case"video/webm":r=1;break;case"video/mp4":r=2}switch(n){case"DASH":i=1;break;case"HLS":i=0}e.g&&(e.o=t.id,e.g.setLevelSwitching(t.id,!0),e.g.setContainerFormat(r),e.j||e.g.setStreamingFormat(i))}Me("shaka.lcevc.Dec",_a),_a.prototype.release=_a.prototype.release;function up(e,t,n,r){var i=this;this.g=e,this.H=n,this.A=null,this.fa=t,this.i={},this.F={},this.Ia={},this.h=null,this.Ca=!1,this.da=r||null,this.o={},this.s=new At,this.j={},this.K=null,this.G=new Nt,this.Ba="",this.Pa=!1,this.sa=!0,this.$=!1,this.B=this.L=null,this.l=tf(this,this.G),this.I=!1,this.M=new Nu(function(){return Sv(i)}),this.C=!1,this.ba="UNKNOWN",this.Ha=this.Na=!1,this.za=new Nt,this.m=!1,this.pa=null,this.V={},this.ha=this.O=this.na=this.P=null,this.ga=new Nt,this.g.remote&&(this.$=this.g.remote.state!="disconnected",this.s.D(this.g.remote,"connect",function(){i.$=i.g.remote.state!="disconnected"}),this.s.D(this.g.remote,"connecting",function(){i.$=i.g.remote.state!="disconnected"}),this.s.D(this.g.remote,"disconnect",function(){i.$=i.g.remote.state!="disconnected"}))}function tf(e,t){if(e.sa=!0,T.ManagedMediaSource){e.B||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.s.D(n,"startstreaming",function(){e.sa=!0}),e.s.D(n,"endstreaming",function(){e.sa=!1})}else n=new MediaSource;return e.s.la(n,"sourceopen",function(){URL.revokeObjectURL(e.Ba),t.resolve()}),e.s.la(e.g,"playing",function(){e.Pa=!0}),e.Ba=ei(n),e.g.removeAttribute("src"),e.L&&e.g.removeChild(e.L),e.B&&e.g.removeChild(e.B),e.L=Yc(e.Ba),e.g.appendChild(e.L),e.B&&e.g.appendChild(e.B),e.g.load(),n}function Ua(e,t,n){e.g&&T.ManagedMediaSource&&e.l&&(e.B&&e.g.removeChild(e.B),e.B=Yc(t,n),e.g.appendChild(e.B),e.g.disableRemotePlayback=!1)}function Dr(e,t){var n,r,i,o,a,f,p,g,m,w,E;return G(function(C){if(C.g==1)return e.createSegmentIndex?_(C,e.createSegmentIndex(),2):C.u(2);if(!e.segmentIndex)return C.return(!1);if(e.segmentIndex.getNumReferences()==0)return C.return(!0);for(n=an,r=new Set,i=I(e.segmentIndex),o=i.next();!o.done;o=i.next())if(a=o.value,f=a.mimeType||e.mimeType||"",p=a.codecs||e.codecs||"",(f!=e.mimeType||p!=e.codecs)&&(g=f+":"+p,!r.has(g))){if(r.add(g),t==n.wa){if(m=yn(f,p),!Pu(m))return C.return(!1)}else if(t==n.oa?p=dl(p):t==n.W&&(p=di(p,f)),w=Cd(e,f,p),E=Yo(f,p),!Un(w)&&!Cu(E))return C.return(!1)}return C.return(!0)})}h=up.prototype,h.destroy=function(){return this.M.destroy()};function Sv(e){var t,n,r,i,o,a,f,p;return G(function(g){if(g.g==1){t=[];for(n in e.o)for(r=e.o[n],i=r[0],e.o[n]=r.slice(0,1),i&&t.push(i.p.catch(Ad)),o=I(r.slice(1)),a=o.next();!a.done;a=o.next())f=a.value,f.p.reject(new Y(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),_(g,Promise.all(t),2)}for(p in e.j)e.j[p].destroy();e.s&&(e.s.release(),e.s=null),e.g&&e.B&&e.g.removeChild(e.B),e.g&&e.L&&(e.g.removeChild(e.L),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.L=null,e.B=null,e.A=null,e.l=null,e.h=null,e.fa=null,e.i={},e.j={},e.K=null,e.o={},e.da=null,e.V={},e.H=null,le(g)})}h.init=function(e,t,n,r){t=t===void 0?!1:t,n=n===void 0?"UNKNOWN":n,r=r===void 0?!1:r;var i=this,o,a,f,p,g,m;return G(function(w){switch(w.g){case 1:return o=an,_(w,i.G,2);case 2:if(!wl(i)&&!Ke(i)){w.u(3);break}return Ti("Expected MediaSource to be open during init(); reopening the media source."),i.G=new Nt,i.l=tf(i,i.G),_(w,i.G,3);case 3:i.C=t,i.ba=n,i.Na=r,i.Ha=!i.C&&i.ba=="HLS"&&!i.Na,i.V={},i.P=null,i.na=null,i.O=null,i.ha=null,i.ga=new Nt,a=I(e.keys()),f=a.next();case 5:if(f.done){w.u(7);break}return p=f.value,g=e.get(p),_(w,nf(i,p,g,g.codecs),8);case 8:i.m?(i.o[o.W]=[],i.o[o.oa]=[]):i.o[p]=[],f=a.next(),w.u(5);break;case 7:(m=e.get(o.W))&&m.isAudioMuxedInVideo&&(i.m=!0),le(w)}})};function nf(e,t,n,r){var i,o,a,f,p,g,m,w,E,C,P,L;return G(function(M){switch(M.g){case 1:return i=an,o=sc,a=nd,_(M,Dr(n,t),2);case 2:if(a.call(o,M.h,"Type negotiation should happen before MediaSourceEngine.init!"),f=yn(n.mimeType,r),t==i.wa){$n(e,f,e.C,n.external),M.u(0);break}if(p=e.A.forceTransmux,(!Un(f)||!e.C&&Cr.includes(f))&&(p=!0),g=Yo(n.mimeType,r),!p){M.u(4);break}if(m=cr(i.W,(r||"").split(",")),w=cr(i.oa,(r||"").split(",")),!m||!w){M.u(5);break}return e.m=!0,_(M,nf(e,i.W,n,m),6);case 6:return _(M,nf(e,i.oa,n,w),7);case 7:return M.return();case 5:(E=Cu(g))&&(C=E(),e.j[t]=C,f=C.convertCodecs(t,g));case 4:P=f+e.A.addExtraFeaturesToSourceBuffer(f),Ht(e.M);try{L=e.l.addSourceBuffer(P)}catch(B){throw new Y(2,3,3015,B,"The mediaSource_ status was "+e.l.readyState+" expected 'open'",null)}e.C&&(L.mode=Jt),e.s.D(L,"error",function(){var B=e.o[t][0];B.p.reject(new Y(2,3,3014,e.g.error?e.g.error.code:0,B.uri))}),e.s.D(L,"updateend",function(){return bo(e,t)}),e.i[t]=L,e.F[t]=f,e.Ia[t]=!!n.drmInfos.length,le(M)}})}h.configure=function(e){this.A=e,this.h&&(this.h.A=e.modifyCueCallback)};function rf(e){return e.sa&&!e.$&&!e.I}function $n(e,t,n,r){e.h||(e.h=new eo(e.fa),e.h&&(e.h.A=e.A.modifyCueCallback));var i=e.h;r=r||e.Ca,e=e.ba,t=="application/cea-608"||t=="application/cea-708"?i.i=null:(i.i=(0,gn[t])(),i.i.setSequenceMode?i.i.setSequenceMode(n):Rt("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),i.i.setManifestType?i.i.setManifestType(e):Rt("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),i.B=r)}function wl(e){return e.I?!1:e.l?e.l.readyState=="ended":!0}function Ke(e){return e.I?!1:e.l?e.l.readyState=="closed":!0}function Fu(e,t){return Object.keys(e.i).length?t==at?e=e.h.g:(e=xs(e,t),e=!e||gs(e)?null:e.length==1&&0>e.start(0)?0:e.length?e.start(0):null):e=null,e}function Ku(e,t){return Object.keys(e.i).length?t==at?e.h.h:Xc(xs(e,t)):null}function ry(e,t,n){return t==at?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=xs(e,t),ey(e,n))}h.Eb=function(){var e={total:this.I?[]:ju(this.g.buffered),audio:ju(xs(this,"audio")),video:ju(xs(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;t!=null&&n!=null&&e.text.push({start:t,end:n})}return e};function xs(e,t){if(e.I||e.$)return null;try{return e.i[t].buffered}catch{return null}}function ja(e,t,n,r,i,o){var a=null,f=[],p=Ze(n);if(Cr.includes(o))t=cu(p),t.length&&r&&((n=t.find(function(C){return C.description==="com.apple.streaming.transportStreamTimestamp"}))&&(a=Math.round(n.data)/1e3),e.H.onMetadata([{cueTime:r.startTime,data:p,frames:t,dts:r.startTime,pts:r.startTime}],0,r.endTime));else if(o.includes("/mp4")&&r&&r.ca&&r.ca.timescale){var g=r.ca.timescale;if(!isNaN(g)){var m=i.emsgSchemeIdUris!=null&&0<i.emsgSchemeIdUris.length||e.A.dispatchAllEmsgBoxes,w=0,E=!1;p=new Vt,m&&p.S("emsg",function(C){var P=i.emsgSchemeIdUris;if(C.version===0)var L=C.reader.zc(),M=C.reader.zc(),B=C.reader.R(),U=C.reader.R(),K=C.reader.R(),W=C.reader.R(),X=r.startTime+U/B;else B=C.reader.R(),X=C.reader.Yc()/B+r.timestampOffset,U=X-r.startTime,K=C.reader.R(),W=C.reader.R(),L=C.reader.zc(),M=C.reader.zc();C=C.reader.Ab(C.reader.getLength()-C.reader.xa()),(P&&P.includes(L)||e.A.dispatchAllEmsgBoxes)&&(L=="urn:mpeg:dash:event:2012"?e.H.Ui():(P=X+K/B,B=new Map().set("detail",{startTime:X,endTime:P,schemeIdUri:L,value:M,timescale:B,presentationTimeDelta:U,eventDuration:K,id:W,messageData:C}),B=new Te("emsg",B),B.cancelable=!0,e.H.onEvent(B),!B.defaultPrevented&&(L=="https://aomedia.org/emsg/ID3"||L=="https://developer.apple.com/streaming/emsg-id3")&&(L=cu(C),L.length)&&e.H.onMetadata([{cueTime:X,data:C,frames:L,dts:X,pts:X}],0,P)))}),p.S("prft",function(C){var P=C.reader,L=C.version;P.R(),C=P.R();var M=P.R();C=1e3*C+M/Math.pow(2,32)*1e3,L===0?P=P.R():(L=P.R(),P=P.R(),P=L*Math.pow(2,32)+P),C=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+C).getTime(),P=new Map().set("detail",{wallClockTime:C,programStartDate:new Date(C-P/g*1e3)}),P=new Te("prft",P),e.H.onEvent(P)}).box("moof",it).box("traf",it).S("tfdt",function(C){E||(w=ba(C.reader,C.version).baseMediaDecodeTime/g,E=!0,m||C.parser.stop())}).parse(n,!0),E&&r.timestampOffset==0&&(a=w)}}else o.includes("/mp4")||o.includes("/webm")||!ws(p)||(e.V[t]?e.V[t].clearData():e.V[t]=new Xt,f=e.V[t].parse(p),p=f.getStartTime(t),p!=null&&(a=p),f=f.getMetadata());return{timestamp:a,metadata:f}}function Tl(e,t,n,r,i,o,a,f,p,g){a=a===void 0?!1:a,f=f===void 0?!1:f,p=p===void 0?!1:p,g=g===void 0?!1:g;var m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z;return G(function($){switch($.g){case 1:if(m=an,t!=m.wa){$.u(2);break}if(e.ba!="HLS"){$.u(3);break}return _($,e.za,4);case 4:w=$.h,e.h.s=w;case 3:return _($,av(e.h,n,r?r.startTime:null,r?r.endTime:null,r?r.N()[0]:null),5);case 5:return $.return();case 2:if(g||!e.m){$.u(6);break}return _($,Tl(e,m.W,n,r,i,o,a,f,p,!0),7);case 7:return _($,Tl(e,m.oa,n,r,i,o,a,f,p,!0),8);case 8:return $.return();case 6:if(!e.i[t])return $.return();if(E=e.i[t].timestampOffset,C=e.F[t],e.j[t]&&(C=e.j[t].getOriginalMimeType()),r&&(P=ja(e,t,n,r,i,C),L=P.timestamp,M=P.metadata,L!=null&&(e.P==null&&t==m.oa&&(e.P=L,e.na=r.startTime,e.O!=null&&(B=0,e.na==e.ha&&(B=e.P-e.O),e.ga.resolve(B))),e.O==null&&t==m.W&&(e.O=L,e.ha=r.startTime,e.P!=null&&(U=0,e.na==e.ha&&(U=e.P-e.O),e.ga.resolve(U))),K=L,W=Cr,!e.C&&W.includes(e.F[t])&&(K=0),X=r.startTime-K,q=Math.abs(E-X),(.001<=q||a||f)&&(!p||0<X||!E)&&(E=X,e.Ha&&(en(e,t,function(){return yi(e,t)},null),en(e,t,function(){return xl(e,t,E)},null))),(t==m.oa||!(m.oa in e.i))&&e.za.resolve(E)),M.length)&&e.H.onMetadata(M,E,r?r.endTime:null),o&&t==m.oa&&(e.h||$n(e,"application/cea-608",e.C,!1),e.K||(F=C.split(";",1)[0],e.K=new nr(F)),r?(Q=e.K.i(n),Q.length&&qh(e.h,Q,r.startTime,r.endTime,E)):e.K.init(n,f)),!e.j[t]){$.u(9);break}return _($,e.j[t].transmux(n,i,r,e.l.duration,t),10);case 10:n=$.h;case 9:if(n=ly(e,n,r?r.startTime:null,t,r?r.N()[0]:null),!r||!e.C||t==m.wa){$.u(11);break}if(!a&&!f){$.u(11);break}if(H=r.startTime,e.ba!="HLS"||e.m||t!=m.W||!e.i[m.oa]){$.u(13);break}return _($,e.ga,14);case 14:Z=$.h,.1<Math.abs(Z)&&(H-=Z);case 13:en(e,t,function(){return yi(e,t)},null),en(e,t,function(){return xl(e,t,H)},null);case 11:return _($,en(e,t,function(){var ue=n;if(t=="video"&&e.da){var de=e.da;de.g&&de.g.appendBuffer(ue,"video",de.o,-E)}e.i[t].appendBuffer(ue)},r?r.N()[0]:null),15);case 15:le($)}})}function lp(e,t){var n=Ku(e,"video")||0;es(e.h,t,n)}function iy(e){e.h&&es(e.h,"",0)}h.remove=function(e,t,n){var r=this,i;return G(function(o){return o.g==1?(i=an,e==i.wa?_(o,r.h.remove(t,n),0):_(o,en(r,e,function(){return Zr(r,e,t,n)},null),4)):r.m?_(o,en(r,i.W,function(){return Zr(r,i.W,t,n)},null),0):o.u(0)})};function sp(e,t){var n;return G(function(r){return r.g==1?(n=an,t==n.wa?e.h?_(r,e.h.remove(0,1/0),0):r.return():_(r,en(e,t,function(){return Zr(e,t,0,e.l.duration)},null),4)):e.m?_(r,en(e,n.W,function(){return Zr(e,n.W,0,e.l.duration)},null),0):r.u(0)})}h.flush=function(e){var t=this,n;return G(function(r){return r.g==1?(n=an,e==n.wa?r.return():_(r,en(t,e,function(){t.g.currentTime-=.001,bo(t,e)},null),2)):t.m?_(r,en(t,n.W,function(){var i=n.W;t.g.currentTime-=.001,bo(t,i)},null),0):r.u(0)})};function oy(e,t,n,r,i,o,a,f,p){var g,m,w;return G(function(E){return E.g==1?(g=an,t==g.wa?(o||(e.h.s=n),cv(e.h,r,i),E.return()):(m=[],_(E,of(e,t,a,f,p),2))):(w=E.h,w||(m.push(en(e,t,function(){return yi(e,t)},null)),e.m&&m.push(en(e,g.W,function(){return yi(e,g.W)},null))),o||(m.push(en(e,t,function(){return xl(e,t,n)},null)),e.m&&m.push(en(e,g.W,function(){return xl(e,g.W,n)},null))),(r!=0||i!=1/0)&&(m.push(en(e,t,function(){e.i[t].appendWindowStart=0,e.i[t].appendWindowEnd=i,e.i[t].appendWindowStart=r,bo(e,t)},null)),e.m&&m.push(en(e,g.W,function(){var C=g.W;e.i[C].appendWindowStart=0,e.i[C].appendWindowEnd=i,e.i[C].appendWindowStart=r,bo(e,C)},null))),m.length?_(E,Promise.all(m),0):E.u(0))})}function ap(e,t,n){var r,i;return G(function(o){return o.g==1?(r=an,t==r.wa||(t==r.oa&&(e.za=new Nt),!e.C||(i=Ku(e,t))&&.1>Math.abs(i-n))?o.return():(en(e,t,function(){return yi(e,t)},null),e.m&&en(e,r.W,function(){return yi(e,r.W)},null),_(o,en(e,t,function(){return xl(e,t,n)},null),2))):e.m?_(o,en(e,r.W,function(){return xl(e,r.W,n)},null),0):o.u(0)})}h.endOfStream=function(e){var t=this;return G(function(n){return _(n,Is(t,function(){wl(t)||Ke(t)||(e?t.l.endOfStream(e):t.l.endOfStream())}),0)})},h.ab=function(e){var t=this;return G(function(n){return _(n,Is(t,function(){if(e<t.l.duration)for(var r in t.i){var i={start:function(){},p:new Nt,uri:null};t.o[r].unshift(i)}t.l.duration=e,t.pa=e}),0)})},h.getDuration=function(){return this.l.duration};function cp(e,t,n){G(function(r){return wl(e)||Ke(e)?r.return():_(r,Is(e,function(){wl(e)||Ke(e)||e.l.setLiveSeekableRange(t,n)}),0)})}function Jn(e){G(function(t){return wl(e)||Ke(e)?t.return():_(t,Is(e,function(){wl(e)||Ke(e)||e.l.clearLiveSeekableRange()}),0)})}function Zr(e,t,n,r){r<=n?bo(e,t):e.i[t].remove(n,r)}function yi(e,t){var n=e.i[t].appendWindowStart,r=e.i[t].appendWindowEnd;e.i[t].abort(),e.i[t].appendWindowStart=n,e.i[t].appendWindowEnd=r,bo(e,t)}function xl(e,t,n){0>n&&(n+=.001),e.i[t].timestampOffset=n,bo(e,t)}function bo(e,t){if(!e.I){var n=e.o[t][0];n&&(n.p.resolve(),_i(e,t))}}function en(e,t,n,r){return Ht(e.M),n={start:n,p:new Nt,uri:r},e.o[t].push(n),e.o[t].length==1&&uy(e,t),n.p}function Is(e,t){var n,r,i,o,a,f,p,g,m,w,E,C;return G(function(P){switch(P.g){case 1:for(Ht(e.M),n=[],r=Object.keys(e.i),i=I(r),o=i.next(),a={};!o.done;a={ready:void 0},o=i.next())f=o.value,a.ready=new Nt,p={start:function(L){return function(){return L.ready.resolve()}}(a),p:a.ready,uri:null},e.o[f].push(p),n.push(a.ready),e.o[f].length==1&&p.start();return pe(P,2),_(P,Promise.all(n),4);case 4:be(P,3);break;case 2:throw g=ke(P),g;case 3:return pe(P,5,6),_(P,t(),6);case 6:for(Ut(P),m=I(r),w=m.next();!w.done;w=m.next())E=w.value,_i(e,E);Ot(P,0);break;case 5:throw C=ke(P),new Y(2,3,3015,C,e.g.error||"No error in the media element",null)}})}function _i(e,t){e.o[t].shift(),uy(e,t)}function uy(e,t){var n=e.o[t][0];if(n)try{n.start()}catch(r){r.name=="QuotaExceededError"?n.p.reject(new Y(2,3,3017,t)):n.p.reject(new Y(2,3,3015,r,e.g.error||"No error in the media element",n.uri)),_i(e,t)}}function ly(e,t,n,r,i){var o=n==null,a=e.Ia[r];return n=e.H.ji(),(o=e.A.insertFakeEncryptionInInit&&o&&a)&&(n=Ws(n),o=Mr()||$i()||cd()||In()&&Tu()&&n),o&&da(e.F[r])=="mp4"&&(t=Jh(t,i)),t}function sy(e,t,n,r){return en(e,t,function(){t!==at&&(vu()&&(e.j[t]&&(e.j[t].destroy(),delete e.j[t]),r&&(e.j[t]=r),e.i[t].changeType(n+e.A.addExtraFeaturesToSourceBuffer(n)),e.F[t]=n),bo(e,t))},null)}function ay(e,t){var n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K;return G(function(W){switch(W.g){case 1:n=an,e.I=!0,e.m=!1,r=e.g.currentTime,i=e.g.autoplay,o=e.g.paused,e.Pa&&(e.g.autoplay=!1),qe(W,2),e.s.La();for(a in e.j)e.j[a].destroy();for(f in e.i){p=e.i[f];try{e.l.removeSourceBuffer(p)}catch{}}return e.j={},e.i={},g=e.l.duration,e.G=new Nt,e.l=tf(e,e.G),_(W,e.G,4);case 4:!isNaN(g)&&g?e.l.duration=g:!isNaN(e.pa)&&e.pa&&(e.l.duration=e.pa),m=new Nt,w=e.l.sourceBuffers,E=t.size,C=0,P=function(){C++,C===E&&(m.resolve(),e.s.bb(w,"addsourcebuffer",P))},e.s.D(w,"addsourcebuffer",P),L=I(t.keys()),M=L.next();case 5:return M.done?((K=t.get(n.W))&&K.isAudioMuxedInVideo&&(e.m=!0),e.m&&!e.o[n.W]&&(e.o[n.W]=[]),e.g.currentTime=r,_(W,m,2)):(B=M.value,U=t.get(B),_(W,nf(e,B,U,U.codecs),6));case 6:M=L.next(),W.u(5);break;case 2:Ut(W),e.I=!1,Ht(e.M),e.s.la(e.g,"canplaythrough",function(){e.M.g||(e.g.autoplay=i,o||e.g.play())}),Ot(W,0)}})}function fp(e,t){return Is(e,function(){return ay(e,t)})}function cy(e,t,n,r){var i=!1,o=cr("audio",(r||"").split(",")),a=cr("video",(r||"").split(",")),f=a;t=="audio"&&(f=o),f||(f=r),r=yn(n,f);var p=e.A.forceTransmux;if((!Un(r)||!e.C&&Cr.includes(r))&&(p=!0),p&&(e=Yo(n,f),n=Cu(e))){var g=n();o&&a&&(i=!0),r=g.convertCodecs(t,e)}return t=bn(Er(r)),{jg:g,sj:i,vg:Ir(r),codec:t,mimeType:r}}function of(e,t,n,r,i){var o,a,f,p,g,m,w,E,C,P,L,M,B,U;return G(function(K){return K.g==1?(o=an,t==o.wa?K.return(!1):(a=bn(Er(e.F[t])),f=Ir(e.F[t]),p=cy(e,t,n,r),g=p.jg,m=p.sj,w=p.vg,E=p.codec,C=p.mimeType,P=!0,m&&(L=cy(e,o.W,n,r),M=bn(Er(e.F[o.W])),B=Ir(e.F[o.W]),P=M==L.codec&&B==L.vg,L.jg&&L.jg.destroy()),a===E&&f===w&&P?(e.j[t]&&!g?(e.j[t].destroy(),delete e.j[t]):!e.j[t]&&g?e.j[t]=g:g&&(e.j[t]&&e.j[t].transmux!=g.transmux?(e.j[t].destroy(),delete e.j[t],e.j[t]=g):g.destroy()),K.return(!1)):(U=!0,(e.m||m&&g&&!e.j[t])&&(U=!1),U&&e.A.codecSwitchingStrategy==="smooth"&&vu()?_(K,sy(e,t,C,g),3):(g&&g.destroy(),_(K,fp(e,i),3))))):K.return(!0)})}function dp(e,t,n,r){if(t==at)var i=!1;else{i=bn(Er(e.F[t]));var o=Ir(e.F[t]),a=yn(n,r),f=e.A.forceTransmux;(!Un(a)||!e.C&&Cr.includes(a))&&(f=!0),n=Yo(n,r),f&&(f=Cu(n))&&(f=f(),a=f.convertCodecs(t,n),f.destroy()),t=bn(Er(a)),a=Ir(a),i=i!==t||o!==a}return i?e.A.codecSwitchingStrategy!=="smooth"||!vu()||e.m:!1}var ei=T.URL.createObjectURL,Jt="sequence";function Le(e,t,n){this.i=e,this.C=t,this.o=this.l=1/0,this.h=1,this.g=this.j=null,this.A=0,this.B=!0,this.I=!1,this.H=0,this.F=n===void 0?!0:n,this.G=0,this.s=!1,this.m=e}h=Le.prototype,h.getDuration=function(){return this.l},h.li=function(){return this.h},h.rh=function(e){this.i=e},h.ab=function(e){this.l=e},h.pi=function(){return this.i},h.ph=function(e){this.A=e},h.Cc=function(e){e&&!this.B&&(this.I=!0),this.B=e},h.ve=function(e){this.o=e},h.Yd=function(){return this.o},h.$f=function(e){this.C=e},h.di=function(){return this.C},h.ah=function(e,t){if(e.length!=0){var n=(Date.now()+this.A)/1e3;if(e=e.filter(function(i){return i.start+t<n}),e.length!=0){var r=e[e.length-1].end+t;this.ie(e[0].start+t),this.h=e.reduce(function(i,o){return Math.max(i,o.end-o.start)},this.h),this.g=Math.max(this.g,r),this.i!=null&&this.F&&!this.s&&(this.i=n-this.g-this.h)}}},h.Cd=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,r=(Date.now()+this.A)/1e3;e=I(e);for(var i=e.next();!i.done;i=e.next())i=i.value,r<i.startTime||(t=Math.min(t,i.startTime),n=Math.max(n,i.endTime),this.h=Math.max(this.h,i.endTime-i.startTime));this.ie(t),this.g=Math.max(this.g,n),this.i!=null&&this.F&&!this.s&&(this.i=r-this.g-this.h)}},h.$g=function(e,t){this.ie(e),t==1/0||this.T()||(this.g=Math.max(this.g,t))},h.mi=function(){return this.g},h.de=function(){this.s=!0},h.Ki=function(){return this.s},h.qh=function(e){this.m=e},h.ii=function(){return this.m},h.ie=function(e){this.j==null?this.j=e:this.I||(this.j=Math.min(this.j,e))},h.Jf=function(e){this.h=Math.max(this.h,e)},h.offset=function(e){this.j!=null&&(this.j+=e),this.g!=null&&(this.g+=e)},h.T=function(){return this.l==1/0&&!this.B},h.vc=function(){return this.l!=1/0&&!this.B},h.nb=function(){return Math.max(this.H,this.ac()-this.o)},h.uh=function(e){this.H=e},h.ac=function(){return this.T()||this.vc()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l},h.nd=function(e){var t=Math.max(this.j,this.H);return this.o==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.ac()-this.o+e,this.wb()))},h.Ob=function(){return this.nd(0)},h.wb=function(){return Math.max(0,this.ac()-(this.T()||this.vc()?this.C:0))},h.Ch=function(){return!(this.i==null||this.g!=null&&this.F)},h.oh=function(e){this.G=e},h.ai=function(){return this.G},Me("shaka.media.PresentationTimeline",Le),Le.prototype.getAvailabilityTimeOffset=Le.prototype.ai,Le.prototype.setAvailabilityTimeOffset=Le.prototype.oh,Le.prototype.usingPresentationStartTime=Le.prototype.Ch,Le.prototype.getSeekRangeEnd=Le.prototype.wb,Le.prototype.getSeekRangeStart=Le.prototype.Ob,Le.prototype.getSafeSeekRangeStart=Le.prototype.nd,Le.prototype.getSegmentAvailabilityEnd=Le.prototype.ac,Le.prototype.setUserSeekStart=Le.prototype.uh,Le.prototype.getSegmentAvailabilityStart=Le.prototype.nb,Le.prototype.isInProgress=Le.prototype.vc,Le.prototype.isLive=Le.prototype.T,Le.prototype.offset=Le.prototype.offset,Le.prototype.notifyMaxSegmentDuration=Le.prototype.Jf,Le.prototype.notifyMinSegmentStartTime=Le.prototype.ie,Le.prototype.getInitialProgramDateTime=Le.prototype.ii,Le.prototype.setInitialProgramDateTime=Le.prototype.qh,Le.prototype.isStartTimeLocked=Le.prototype.Ki,Le.prototype.lockStartTime=Le.prototype.de,Le.prototype.getMaxSegmentEndTime=Le.prototype.mi,Le.prototype.notifyPeriodDuration=Le.prototype.$g,Le.prototype.notifySegments=Le.prototype.Cd,Le.prototype.notifyTimeRange=Le.prototype.ah,Le.prototype.getDelay=Le.prototype.di,Le.prototype.setDelay=Le.prototype.$f,Le.prototype.getSegmentAvailabilityDuration=Le.prototype.Yd,Le.prototype.setSegmentAvailabilityDuration=Le.prototype.ve,Le.prototype.setStatic=Le.prototype.Cc,Le.prototype.setClockOffset=Le.prototype.ph,Le.prototype.getPresentationStartTime=Le.prototype.pi,Le.prototype.setDuration=Le.prototype.ab,Le.prototype.setPresentationStartTime=Le.prototype.rh,Le.prototype.getMaxSegmentDuration=Le.prototype.li,Le.prototype.getDuration=Le.prototype.getDuration;function Vn(e,t,n){this.j=n,this.l=e,this.s=Il(e),this.g=e.g.currentTime,this.m=Date.now()/1e3,this.h=!1,this.o=0,this.A=t,this.i=function(){}}Vn.prototype.release=function(){this.j=this.l=null,this.i=function(){}};function hr(e,t){e.i=t}function gi(e){this.g=e}function Il(e){if(e.g.paused||e.g.playbackRate==0||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=I(ju(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(n=n.value,!(t<n.start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function Fn(e,t,n,r,i){var o=this;this.A=i,this.g=e,this.C=t,this.o=n,this.m=new At,this.l=this.B=!1,this.G=e.readyState,this.F=this.i=0,this.h=r,this.s=!1,this.m.D(e,"waiting",function(){return du(o)}),this.j=new st(function(){du(o)})}Fn.prototype.release=function(){this.m&&(this.m.release(),this.m=null),this.j!=null&&(this.j.stop(),this.j=null),this.h&&(this.h.release(),this.h=null),this.g=this.C=this.A=null},Fn.prototype.Mf=function(){this.s=!0,du(this)};function du(e){if(e.g.readyState!=0&&e.B){if(e.g.seeking){if(!e.l)return}else e.l=!1;if(!e.g.paused||e.g.currentTime==e.i&&(e.g.autoplay||e.g.currentTime!=e.i)){e.g.readyState!=e.G&&(e.G=e.g.readyState);var t;if(!(t=!e.h)){t=e.h;var n=t.l,r=Il(n),i=n.g.currentTime,o=Date.now()/1e3;(t.g!=i||t.s!=r)&&(t.m=o,t.g=i,t.s=r,t.h=!1),i=o-t.m,(r=i>=t.A&&r&&!t.h)&&(t.i(t.g,i),t.h=!0,t.g=n.g.currentTime,t.o++,t.j(new Te("stalldetected"))),t=!r}t&&(t=e.g.currentTime,n=e.g.buffered,r=gv(n,t,e.o.gapDetectionThreshold),r!=null&&(r!=0||e.s))&&(i=n.start(r),(navigator.userAgent.match(/Edge\//)||$i()||Mr())&&(i=Math.ceil(100*(i+e.o.gapPadding))/100),i>=e.C.wb()||.001>i-t||(r!=0&&n.end(r-1),e.g.currentTime=i,t==e.i&&(e.i=i),e.F++,e.A(new Te("gapjumped"))))}}}function Ui(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=uf.value().get(t),n.la(e,t,r))}var uf=new Ii(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function lf(e,t,n,r){var i=this;this.g=e,this.m=t,this.s=n,this.l=null,this.j=function(){return i.l==null&&(i.l=r()),i.l},this.o=!1,this.h=new At,this.i=new Mo(e),Ui(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){sf(i,i.j())})}lf.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i!=null&&(this.i.release(),this.i=null),this.m=function(){},this.g=null};function El(e){return e.o?e.g.currentTime:e.j()}function jr(e,t){0<e.g.readyState?Ba(e.i,t):Ui(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){sf(e,e.j())})}function sf(e,t){.001>Math.abs(e.g.currentTime-t)?Cl(e):(e.h.la(e.g,"seeking",function(){Cl(e)}),Ba(e.i,e.g.currentTime&&e.g.currentTime!=0?e.g.currentTime:t))}function Cl(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.s(e.g.currentTime)}function Mo(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new st(function(){0>=t.i||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}Mo.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null};function Ba(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Aa(.1)}function af(e){this.h=e,this.j=!1,this.g=null,this.i=new At}h=af.prototype,h.ready=function(){function e(){if(t.g==null||t.g==0&&t.h.duration!=1/0)t.j=!0;else{var n=t.h.currentTime,r=t.g;0>t.g&&(r=Math.max(0,n+t.g)),n!=r?(t.i.la(t.h,"seeking",function(){t.j=!0}),t.h.currentTime=r):t.j=!0}}var t=this;Ui(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){e()})},h.release=function(){this.i&&(this.i.release(),this.i=null),this.h=null},h.Qe=function(e){this.g=this.j?this.g:e},h.Kd=function(){return(this.j?this.h.currentTime:this.g)||0},h.rg=function(){return 0},h.qg=function(){return 0},h.Zg=function(){};function pu(e,t,n,r,i,o){var a=this;this.i=e,this.g=t.presentationTimeline,this.l=n,this.A=i,this.s=null,this.o=Ka(e,n,o),this.j=new Fn(e,t.presentationTimeline,n,this.o,o),this.h=new lf(e,function(){e:{var f=a.j;f.l=!0,f.s=!1,du(f);var p=El(a.h);if(f=hu(a,p),.001<Math.abs(f-p)){if(p=!1,!Tr()||Tr()&&xu())p=!0;else{var g=Date.now()/1e3,m=Tr()&&Tt("Fuchsia")?3:1;(!a.s||a.s<g-m)&&(a.s=g,p=!0)}if(p){jr(a.h,f),f=void 0;break e}}a.A(),f=void 0}return f},function(f){var p=a.j;p.B=!0,p.g.seeking&&!p.l&&(p.l=!0,p.i=f),p.j&&p.j.Aa(p.o.gapJumpTimerTime),du(p)},function(){var f=r;return f==null?f=1/0>a.g.getDuration()?a.g.Ob():a.g.wb():0>f&&(f=a.g.wb()+f),Va(a,Fa(a,f))}),this.m=new st(function(){if(a.i.readyState!=0&&!a.i.paused){var f=El(a.h),p=a.g.Ob(),g=a.g.wb();3>g-p&&(p=g-3),f<p&&(f=hu(a,f),a.i.currentTime=f)}})}h=pu.prototype,h.ready=function(){this.m.Aa(.25)},h.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.i=this.h=this.g=this.l=null,this.A=function(){}},h.Qe=function(e){jr(this.h,e)},h.Kd=function(){var e=El(this.h);return 0<this.i.readyState&&!this.i.paused?Fa(this,e):e},h.rg=function(){return this.o?this.o.o:0},h.qg=function(){return this.j.F},h.Zg=function(){this.j.Mf()};function Va(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function hu(e,t){var n=e.l.rebufferingGoal,r=e.l.safeSeekOffset,i=e.g.Ob(),o=e.g.wb(),a=e.g.getDuration();3>o-i&&(i=o-3);var f=e.g.nd(n),p=e.g.nd(r);return n=e.g.nd(n+r),t>=a?Va(e,t):t>o?o-e.l.safeSeekEndOffset:t<i?vs(e.i.buffered,p)?p:n:t>=f||vs(e.i.buffered,t)?t:n}function Fa(e,t){var n=e.g.Ob();return t<n?n:(e=e.g.wb(),t>e?e:t)}function Ka(e,t,n){if(!t.stallEnabled)return null;var r=t.stallSkip;return t=new Vn(new gi(e),t.stallThreshold,n),hr(t,function(){r?e.currentTime+=r:(e.pause(),e.play())}),t}function St(e){this.g=e,this.m=null,this.i=0,this.o=!1}h=St.prototype,h.getNumReferences=function(){return this.g.length},h.getNumEvicted=function(){return this.i},h.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},h.Qi=function(){this.o=!0},h.Db=function(e){for(var t=I(this.g),n=t.next();!n.done;n=t.next())e(n.value)};function ti(e){return e.g[0]||null}h.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var r=this.g[n],i=n<t?this.g[n+1].startTime:r.endTime;if(e>=r.startTime&&e<i)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},h.get=function(e){return this.g.length==0?null:(e-=this.i,0>e||e>=this.g.length?null:this.g[e])},h.offset=function(e){if(!this.o)for(var t=I(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},h.fe=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(n){return Math.round(1e3*n.startTime)/1e3<t}),this.g.push.apply(this.g,ee(e))}},h.yd=function(e,t){var n=this;e=e.filter(function(r){return r.endTime>t&&(n.g.length==0||r.endTime>n.g[0].startTime)}),this.fe(e),this.Ja(t)},h.Ja=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(n){return n.endTime>e}),this.i+=t-this.g.length}},h.Lc=function(e,t,n){if(n=n===void 0?!1:n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;this.g.length!=0&&(e=this.g[this.g.length-1],t=new Fe(e.startTime,t,e.C,e.Ma,e.va,e.ca,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.A,e.h,e.status,e.aesKey),t.mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},h.Be=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new st(function(){var r=t();r?n.g.push.apply(n.g,ee(r)):(n.m.stop(),n.m=null)}),this.m.Aa(e))},St.prototype[Symbol.iterator]=function(){return this.Nb(0)},St.prototype.Nb=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?!1:n;var r=this.find(e);if(r==null)return null;var i=this.get(r);n?r++:r--;var o=-1;if(i&&0<i.g.length)for(var a=i.g.length-1;0<=a;--a){var f=i.g[a];if(e>=f.startTime&&e<f.endTime){if(!t){for(;a&&!f.l;)a--,f=i.g[a];if(!f.l)return Ti("No independent partial segment found!"),null}n?r--:r++,o=a-1;break}}return new wn(this,r,o,n)};function kl(e,t,n){return e=new Fe(e,e+t,function(){return n},0,null,null,e,e,e+t),new St([e])}Me("shaka.media.SegmentIndex",St),St.forSingleSegment=kl,St.prototype.getIteratorForTime=St.prototype.Nb,St.prototype.updateEvery=St.prototype.Be,St.prototype.fit=St.prototype.Lc,St.prototype.evict=St.prototype.Ja,St.prototype.mergeAndEvict=St.prototype.yd,St.prototype.offset=St.prototype.offset,St.prototype.get=St.prototype.get,St.prototype.find=St.prototype.find,St.prototype.markImmutable=St.prototype.Qi,St.prototype.release=St.prototype.release,St.prototype.getNumEvicted=St.prototype.getNumEvicted,St.prototype.getNumReferences=St.prototype.getNumReferences;function wn(e,t,n,r){this.i=e,this.h=t,this.g=n,this.reverse=r}h=wn.prototype,h.bd=function(e){this.reverse=e},h.Wh=function(){return this.h},h.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.s&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e},h.next=function(){var e=this.i.get(this.h);return this.reverse?e&&0<e.g.length?(this.g--,0>this.g&&(this.h--,this.g=(e=this.i.get(this.h))&&0<e.g.length?e.g.length-1:0)):(this.h--,this.g=0):e&&0<e.g.length?(this.g++,e.s&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),e=this.current(),{value:e,done:!e}},h.Uf=function(){var e=this.current();if(e.o&&!e.l&&(e=this.i.get(this.h))&&0<e.g.length)for(var t=e.g[this.g];t.l&&!(0>=this.g);)this.g--,t=e.g[this.g]},Me("shaka.media.SegmentIterator",wn),wn.prototype.resetToLastIndependent=wn.prototype.Uf,wn.prototype.next=wn.prototype.next,wn.prototype.current=wn.prototype.current,wn.prototype.currentPosition=wn.prototype.Wh,wn.prototype.setReverse=wn.prototype.bd;function Gt(){St.call(this,[]),this.h=[]}mt(Gt,St),h=Gt.prototype,h.clone=function(){var e=new Gt;return e.h=this.h.slice(),e.i=this.i,e},h.release=function(){for(var e=I(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},h.Db=function(e){for(var t=I(this.h),n=t.next();!n.done;n=t.next())n.value.Db(e)},h.find=function(e){for(var t=this.i,n=I(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.find(e);if(i!=null)return i+t;t+=r.getNumEvicted()+r.getNumReferences()}return null},h.get=function(e){for(var t=this.i,n=I(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.get(e-t);if(i)return i;i=r.getNumReferences(),t+=r.getNumEvicted()+i}return null},h.offset=function(){},h.fe=function(){},h.Ja=function(e){for(var t=I(this.h),n=t.next();!n.done;n=t.next())n.value.Ja(e);for(;1<this.h.length&&this.h[0].getNumReferences()==0;)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},h.yd=function(){},h.Lc=function(){},h.Be=function(){},Me("shaka.media.MetaSegmentIndex",Gt),Gt.prototype.updateEvery=Gt.prototype.Be,Gt.prototype.fit=Gt.prototype.Lc,Gt.prototype.mergeAndEvict=Gt.prototype.yd,Gt.prototype.evict=Gt.prototype.Ja,Gt.prototype.merge=Gt.prototype.fe,Gt.prototype.offset=Gt.prototype.offset,Gt.prototype.get=Gt.prototype.get,Gt.prototype.find=Gt.prototype.find,Gt.prototype.forEachTopLevelReference=Gt.prototype.Db,Gt.prototype.release=Gt.prototype.release;function Br(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Xd(),this.h=new st(function(){t.g.Yg(.25*t.i)})}Br.prototype.release=function(){this.set(this.qc()),this.h&&(this.h.stop(),this.h=null),this.g=null},Br.prototype.set=function(e){this.i=e,Or(this)},Br.prototype.qc=function(){return this.g.qc()};function Or(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.Xd()!=t&&e.g.cg(t);return}catch{}e.h.Aa(.25),e.g.Xd()!=0&&e.g.cg(0)}function pp(e){var t=this;this.h=e,this.g=new Set,this.i=new st(function(){cf(t,!1)}).Aa(.25)}pp.prototype.release=function(){this.i.stop();for(var e=I(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function cf(e,t){for(var n=I(e.g),r=n.next();!r.done;r=n.next())r.value.j(e.h.currentTime,t)}function Es(e){xt.call(this),this.g=new Map,this.h=e}mt(Es,xt),Es.prototype.release=function(){this.g.clear(),xt.prototype.release.call(this)};function wv(e,t){var n=e.g.get(t);return n||(n={Gd:[],$e:null,contentType:t},e.g.set(t,n)),n}function Hu(e,t,n){var r=wv(e,t.contentType);yp(e,r),e={Tc:t,position:n},r=r.Gd,t=r.findIndex(function(i){return i.position>=n}),0<=t?r.splice(t,r[t].position==n?1:0,e):r.push(e)}Es.prototype.j=function(e){for(var t=I(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var r=n.$e;e:{for(var i=n.Gd,o=i.length-1;0<=o;o--){var a=i[o];if(a.position<=e){i=a.Tc;break e}}i=null}o=i&&!(r===i||r&&i&&r.bandwidth==i.bandwidth&&r.audioSamplingRate==i.audioSamplingRate&&r.codecs==i.codecs&&r.contentType==i.contentType&&r.frameRate==i.frameRate&&r.height==i.height&&r.mimeType==i.mimeType&&r.channelsCount==i.channelsCount&&r.pixelAspectRatio==i.pixelAspectRatio&&r.width==i.width),a=i&&r&&i.label&&r.label&&r.label!==i.label;var f=i&&r&&i.language&&r.language&&r.language!==i.language;r=i&&r&&i.roles&&r.roles&&!Gs(r.roles,i.roles),(a||f||r)&&hp(this,e,i.contentType)&&(n.$e=i,r=new Te("audiotrackchange",new Map([["quality",i],["position",e]])),this.dispatchEvent(r)),o&&hp(this,e,i.contentType)&&(n.$e=i,JSON.stringify(i),n=new Te("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}};function hp(e,t,n){return!!((e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function yp(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,r=e[e.length-1].end,i=t.Gd;t.Gd=i.filter(function(o,a){return!(o.position<=n&&a+1<i.length&&i[a+1].position<=n||o.position>=r)})}else t.Gd=[]}function Lo(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return e.type=="video"&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),e.type=="audio"&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function Ha(e){xt.call(this);var t=this;this.g=new Set,this.i=e,this.h=new st(function(){for(var n=t.i(),r=I(t.g),i=r.next();!i.done;i=r.next())i=i.value,i.endTime<n.start&&(t.g.delete(i),i=new Te("regionremove",new Map([["region",i]])),t.dispatchEvent(i))}).Aa(2)}mt(Ha,xt),Ha.prototype.release=function(){this.g.clear(),this.h.stop(),xt.prototype.release.call(this)};function No(e,t,n,r){this.m=e,this.i=t,this.l=n,this.h=new Map,this.j=new Map,this.g=null,this.o=r}function fy(e,t){e.l=t,e=I(e.h.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function Cs(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Nb(t,!0,e.o)),!e.g))return Promise.resolve();for(n&&e.g.next(),t=[];e.h.size<e.m&&(n=e.g.next().value,!!n);){var r=!0;n.isPreload()&&n.va!=null&&(r=!1),n.cc()==2&&(r=!1),n.Pb()&&(r=!1),r&&n.ca&&t.push(ff(e,n.ca)),r&&!e.h.has(n)&&(r=new mp(e.l),t.push(Al(r,n,e.i)),e.h.set(n,r))}return gp(e),Promise.all(t)}function ff(e,t){if(!e.i.segmentIndex||t.Pb()||Array.from(e.j.keys()).some(function(i){return Jd(i,t)}))return Promise.resolve();var n=new mp(e.l),r=Al(n,t,e.i);return e.j.set(t,n),r}function qa(e,t){t=I(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&lo(e,n)}function uo(e){qa(e,e.h),qa(e,e.j),e.g=null}No.prototype.Ja=function(e,t){t=t===void 0?!1:t;for(var n=I(this.h.keys()),r=n.next();!r.done;r=n.next())r=r.value,e>r.endTime&&lo(this,r);t&&gp(this)},No.prototype.bd=function(e){this.o=e,this.g&&this.g.bd(e)};function gp(e){for(var t=Array.from(e.h.keys()),n=I(e.j.keys()),r=n.next(),i={};!r.done;i={Bf:void 0},r=n.next())i.Bf=r.value,t.some(function(o){return function(a){return Jd(a.ca,o.Bf)}}(i))||lo(e,i.Bf)}function vp(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var r=n.pop();r&&lo(e,r)}gp(e)}function dy(e,t){t&&t!==e.i&&(uo(e),e.i=t)}function lo(e,t){var n=e.h;t instanceof Ar&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function mp(e){this.g=e,this.Ed=this.eg=null}function Al(e,t,n){var r=new Uint8Array(0);return e.Ed=e.g(t,n,function(i){return G(function(o){if(o.g==1)return 0<r.byteLength?r=rn(r,i):r=i,e.eg?_(o,e.eg(r),3):o.u(0);r=new Uint8Array(0),le(o)})}),e.Ed.promise.catch(function(i){return i instanceof Y&&i.code==7001?Promise.resolve():Promise.reject(i)})}mp.prototype.abort=function(){this.Ed&&this.Ed.abort()};function za(e){var t=Ir(e),n=t.split("/")[0];return e=Er(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Jd:null,colorGamut:null,frameRate:null}}function Ln(e,t,n){function r(F){B=F.name;var Q=F.reader;Q.skip(24);var H=Q.ma(),Z=Q.ma();Q.skip(50),E=String(H),w=String(Z),F.reader.ta()&&it(F)}function i(F){var Q=np(F.reader);C=Q.channelCount,P=Q.sampleRate,o(F.name)}function o(F){switch(F=F.toLowerCase(),F){case"avc1":case"avc3":f.push(F+".42E01E"),g=!0;break;case"hev1":case"hvc1":f.push(F+".1.6.L93.90"),g=!0;break;case"dvh1":case"dvhe":f.push(F+".05.04"),g=!0;break;case"vp09":f.push(F+".00.10.08"),g=!0;break;case"av01":f.push(F+".0.01M.08"),g=!0;break;case"mp4a":a.push("mp4a.40.2"),p=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":a.push(F),p=!0}}var a=[],f=[],p=!1,g=!1,m=null,w=null,E=null,C=null,P=null,L=null,M=null,B;if(new Vt().box("moov",it).box("trak",it).box("mdia",it).S("mdhd",function(F){m=Ma(F.reader,F.version).language}).box("minf",it).box("stbl",it).S("stsd",Po).box("mp4a",function(F){var Q=np(F.reader);C=Q.channelCount,P=Q.sampleRate,F.reader.ta()?it(F):o(F.name)}).box("esds",function(F){F=F.reader;for(var Q="mp4a",H,Z;F.ta();){H=F.U();for(var $=F.U();$&128;)$=F.U();if(H==3)F.ma(),$=F.U(),$&128&&F.ma(),$&64&&F.skip(F.U()),$&32&&F.ma();else if(H==4)Z=F.U(),F.skip(12);else if(H==5)break}Z&&(Q+="."+ir(Z),H==5&&F.ta()&&(H=F.U(),Z=(H&248)>>3,Z===31&&F.ta()&&(Z=32+((H&7)<<3)+((F.U()&224)>>5)),Q+="."+Z)),a.push(Q),p=!0}).box("ac-3",i).box("ec-3",i).box("ac-4",i).box("Opus",i).box("fLaC",i).box("avc1",r).box("avc3",r).box("hev1",r).box("hvc1",r).box("dva1",r).box("dvav",r).box("dvh1",r).box("dvhe",r).box("vp09",r).box("av01",r).box("avcC",function(F){var Q=B||"";switch(B){case"dvav":Q="avc3";break;case"dva1":Q="avc1"}F=F.reader,F.skip(1),F=Q+"."+ir(F.U())+ir(F.U())+ir(F.U()),f.push(F),g=!0}).box("hvcC",function(F){var Q=B||"";switch(B){case"dvh1":Q="hvc1";break;case"dvhe":Q="hev1"}var H=F.reader;H.skip(1),F=H.U();var Z=["","A","B","C"][F>>6],$=F&31,ue=H.R(),de=(F&32)>>5?"H":"L";F=[H.U(),H.U(),H.U(),H.U(),H.U(),H.U()],H=H.U();for(var ie=0,ce=0;32>ce&&(ie|=ue&1,ce!=31);ce++)ie<<=1,ue>>=1;for(Q=Q+("."+Z+$)+("."+ir(ie,!0)),Q+="."+de+H,Z="",$=F.length;$--;)((de=F[$])||Z)&&(Z="."+de.toString(16).toUpperCase()+Z);Q+=Z,f.push(Q),g=!0}).box("dvcC",function(F){var Q=B||"";switch(B){case"hvc1":Q="dvh1";break;case"hev1":Q="dvhe";break;case"avc1":Q="dva1";break;case"avc3":Q="dvav";break;case"av01":Q="dav1"}var H=F.reader;H.skip(2),F=H.U(),H=H.U(),f.push(Q+"."+cn(F>>1&127)+"."+cn(F<<5&32|H>>3&31)),g=!0}).box("dvvC",function(F){var Q=B||"";switch(B){case"hvc1":Q="dvh1";break;case"hev1":Q="dvhe";break;case"avc1":Q="dva1";break;case"avc3":Q="dvav";break;case"av01":Q="dav1"}var H=F.reader;H.skip(2),F=H.U(),H=H.U(),f.push(Q+"."+cn(F>>1&127)+"."+cn(F<<5&32|H>>3&31)),g=!0}).S("vpcC",function(F){var Q=B||"",H=F.reader;F=H.U();var Z=H.U();H=H.U()>>4&15,f.push(Q+"."+cn(F)+"."+cn(Z)+"."+cn(H)),g=!0}).box("av1C",function(F){var Q=B||"";switch(B){case"dav1":Q="av01"}var H=F.reader;H.skip(1),F=H.U(),H=H.U();var Z=F>>>5,$=(H&64)>>6;f.push(Q+"."+Z+"."+cn(F&31)+(H>>>7?"H":"M")+"."+cn(Z===2&&$?(H&32)>>5?12:10:$?10:8)+"."+((H&16)>>4)+"."+((H&8)>>3)+((H&4)>>2)+(H&3)+"."+cn(1)+"."+cn(1)+"."+cn(1)+".0"),g=!0}).box("enca",xa).box("encv",pr).box("sinf",it).box("frma",function(F){F=rp(F.reader).codec,o(F)}).box("colr",function(F){f=f.map(function(Z){if(Z.startsWith("av01.")){var $=F.reader,ue=$.xa(),de=$.Ab(4),ie=String.fromCharCode(de[0]);if(ie+=String.fromCharCode(de[1]),ie+=String.fromCharCode(de[2]),ie+=String.fromCharCode(de[3]),ie==="nclx"){de=$.ma(),ie=$.ma();var ce=$.ma(),Se=$.U()>>7,ve=Z.split(".");ve.length==10&&(ve[6]=cn(de),ve[7]=cn(ie),ve[8]=cn(ce),ve[9]=String(Se),Z=ve.join("."))}$.seek(ue)}return Z});var Q=vv(F.reader),H=Q.colorGamut;L=Q.Jd,M=H}).parse(e||t,!0),!a.length&&!f.length)return null;var U=p&&!g,K=new Map;if(g&&!n){n=new nr("video/mp4"),e&&n.init(e);try{n.i(t);for(var W=I(n.j()),X=W.next();!X.done;X=W.next()){var q=X.value;K.set(q,q)}}catch{}n.g()}return{type:U?"audio":"video",mimeType:U?"audio/mp4":"video/mp4",codecs:Sp(a.concat(f)).join(", "),language:m,height:w,width:E,channelCount:C,sampleRate:P,closedCaptions:K,Jd:L,colorGamut:M,frameRate:null}}function Sp(e){var t=new Set,n=[];e=I(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;var i=$o(r);t.has(i)||(n.push(r),t.add(i))}return t=Id("audio",n),r=Id("video",n),e=Id(at,n),r=py(r),t=t.concat(r).concat(e),n.length&&!t.length?n:t}function py(e){if(1>=e.length)return e;var t=e.find(function(n){return n.startsWith("dvav.")||n.startsWith("dva1.")||n.startsWith("dvh1.")||n.startsWith("dvhe.")||n.startsWith("dav1.")||n.startsWith("dvc1.")||n.startsWith("dvi1.")});return t?Un('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function Tv(e){var t=null;return new Vt().box("moov",it).box("trak",it).box("mdia",it).box("minf",it).box("stbl",it).S("stsd",Po).box("encv",pr).box("enca",xa).box("sinf",it).box("schi",it).S("tenc",function(n){n=n.reader,n.U(),n.U(),n.U(),n.U(),t=Yn(n.Ab(16))}).parse(e,!0),t}function df(e,t,n){var r,i,o,a,f;return G(function(p){if(p.g==1)return r=t,r.cryptoKey?p.u(2):_(p,r.fetchKey(),3);if(i=r.iv,!i)for(i=Ze(new ArrayBuffer(16)),o=r.firstMediaSequenceNumber+n,a=i.byteLength-1;0<=a;a--)i[a]=o&255,o>>=8;return t.blockCipherMode=="CBC"?f={name:"AES-CBC",iv:i}:f={name:"AES-CTR",counter:i,length:64},p.return(T.crypto.subtle.decrypt(f,r.cryptoKey,e))})}function Pl(e,t,n,r,i){return e=wt(e,r,i),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function wp(e,t){var n=this;this.g=t,this.l=e,this.h=null,this.H=new Map,this.C=1,this.s=this.j=null,this.K=0,this.i=new Map,this.G=!1,this.L=null,this.B=!1,this.m=new Nu(function(){return xv(n)}),this.M=Date.now()/1e3,this.o=new Map,this.I={projection:null,hfov:null},this.P=0,this.O=1/0,this.F=null,this.A=new st(function(){if(n.l&&n.g)if(n.l.presentationTimeline.T()){var r=n.l.presentationTimeline.Ob(),i=n.l.presentationTimeline.wb();1<i-r?cp(n.g.Z,r,i):Jn(n.g.Z)}else Jn(n.g.Z),n.A&&n.A.stop()})}h=wp.prototype,h.destroy=function(){return this.m.destroy()};function xv(e){var t,n,r,i,o,a,f;return G(function(p){if(p.g==1){for(t=[],n=I(e.i.values()),r=n.next();!r.done;r=n.next())i=r.value,Ya(i),t.push(zu(i)),i.X&&(uo(i.X),i.X=null);for(o=I(e.o.values()),a=o.next();!a.done;a=o.next())f=a.value,uo(f);return _(p,Promise.all(t),2)}e.i.clear(),e.o.clear(),e.g=null,e.l=null,e.h=null,e.A&&e.A.stop(),e.A=null,le(p)})}h.configure=function(e){if(this.h=e,this.L=new ma({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor},!0),e.disableAudioPrefetch){var t=this.i.get("audio");t&&t.X&&(uo(t.X),t.X=null),t=I(this.o.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,uo(this.o.get(n)),this.o.delete(n)}for(e.disableTextPrefetch&&(t=this.i.get(at))&&t.X&&(uo(t.X),t.X=null),e.disableVideoPrefetch&&(t=this.i.get("video"))&&t.X&&(uo(t.X),t.X=null),t=I(this.i.keys()),n=t.next();!n.done;n=t.next())n=this.i.get(n.value),n.X?(vp(n.X,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(uo(n.X),n.X=null)):0<e.segmentPrefetchLimit&&(n.X=yf(this,n.stream));e.disableAudioPrefetch||yy(this)};function ji(e,t,n){e.l.presentationTimeline.T()||(e.P=t,e.O=n)}h.start=function(e){var t=this;return G(function(n){if(n.g==1)return _(n,Ip(t,e||new Map),2);Ht(t.m),t.G=!0,le(n)})};function Tp(e,t){var n,r,i,o,a,f;G(function(p){switch(p.g){case 1:return n=an,e.K++,r=e.K,pe(p,2),_(p,sp(e.g.Z,n.wa),4);case 4:be(p,3);break;case 2:i=ke(p),e.g&&e.g.onError(i);case 3:o=yn(t.mimeType,t.codecs),$n(e.g.Z,o,e.l.sequenceMode,t.external),a=e.g.Z.fa,(a.isTextVisible()||e.h.alwaysStreamText)&&e.K==r&&(f=hy(e,t),e.i.set(n.wa,f),Qn(e,f,0)),le(p)}})}function Iv(e){var t=e.i.get(at);t&&(Ya(t),zu(t).catch(function(){}),e.F=e.i.get(at),e.i.delete(at)),e.s=null}function _o(e,t){for(var n=0>e.g.mb(),r=I(e.i.values()),i=r.next();!i.done;i=r.next())i=i.value,i.ja&&i.ja.bd(n),i.X&&i.X.bd(n);for(r=I(e.o.values()),i=r.next();!i.done;i=r.next())i.value.bd(n);(n=e.i.get("video"))&&(r=n.stream)&&(t?(t=r.trickModeVideo)&&!n.fc&&(qu(e,t,!1,0,!1),n.fc=r):(t=n.fc)&&(n.fc=null,qu(e,t,!0,0,!1)))}function Ga(e,t,n,r,i,o){n=n===void 0?!1:n,r=r===void 0?0:r,i=i===void 0?!1:i,o=o===void 0?!1:o,e.j=t,e.G&&(t.video&&qu(e,t.video,n,r,i,o),t.audio&&qu(e,t.audio,n,r,i,o))}function Uo(e,t){G(function(n){if(n.g==1)return e.F=null,e.s=t,e.G?t.segmentIndex?n.u(2):_(n,t.createSegmentIndex(),2):n.return();qu(e,t,!0,0,!1),le(n)})}function pf(e,t){for(var n=I(e.H.entries()),r=n.next();!r.done;r=n.next()){var i=I(r.value);r=i.next().value,i=i.next().value,r.includes(t.type)&&(i(),e.H.delete(r))}}function qu(e,t,n,r,i,o){var a=e.i.get(t.type);a||t.type!=at?a&&(a.fc&&(t.trickModeVideo?(a.fc=t,t=t.trickModeVideo):a.fc=null),a.stream!=t||i)&&(e.o.has(t)?a.X=e.o.get(t):a.X&&dy(a.X,t),t.type==at&&(i=yn(t.mimeType,t.codecs),$n(e.g.Z,i,e.l.sequenceMode,t.external)),!e.o.has(a.stream)&&a.stream.closeSegmentIndex&&(a.Fa?(i="("+a.type+":"+a.stream.id+")",e.H.has(i)||e.H.set(i,a.stream.closeSegmentIndex)):a.stream.closeSegmentIndex()),i=a.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,a.stream=t,a.ja=null,a.sg=!!o,i?c(e,!0,!1):(n?a.fd?a.Ke=!0:a.Fa?(a.lc=!0,a.Rd=r,a.Ke=!0):(Ya(a),Ap(e,a,!0,r).catch(function(f){e.g&&e.g.onError(f)})):a.Fa||a.jb||Qn(e,a,0),xp(e,a).catch(function(f){e.g&&e.g.onError(f)}))):Tp(e,t)}function xp(e,t){var n,r;return G(function(i){if(i.g==1)return t.pb?(n=t.stream,r=t.pb,n.segmentIndex?i.u(2):_(i,n.createSegmentIndex(),2)):i.return();if(t.pb!=r||t.stream!=n)return i.return();var o=e.g.md(),a=Ku(e.g.Z,t.type),f=t.stream.segmentIndex.find(t.Xa?t.Xa.endTime:o),p=f==null?null:t.stream.segmentIndex.get(f);f=p&&p.va?p.va-p.Ma:null,p&&!f&&(f=(p.endTime-p.getStartTime())*(t.stream.bandwidth||0)/8),f?((p=p.ca)&&(f+=(p.va?p.va-p.Ma:null)||0),p=e.g.getBandwidthEstimate(),o=8*f/p<(a||0)-o-e.h.rebufferingGoal||t.pb.h.g>f):o=!1,o&&t.pb.abort(),le(i)})}h.$c=function(){if(this.g)for(var e=this.g.md(),t=I(this.i.keys()),n=t.next();!n.done;n=t.next()){var r=n.value;n=this.i.get(r);var i=this.g.Z;if(r==at?(i=i.h,i=i.g==null||i.h==null?!1:e>=i.g&&e<i.h):(i=xs(i,r),i=vs(i,e)),!i){if(n.X&&(n.X.g=null),n.type==="audio"){i=I(this.o.values());for(var o=i.next();!o.done;o=i.next())o.value.g=null}n.ja=null,(Ku(this.g.Z,r)!=null||n.Fa)&&hf(this,n),n.pb&&(n.pb.abort(),n.pb=null),r===at&&(r=this.g.Z,r.K&&r.K.g()),n.$c=!0}}};function hf(e,t){t.fd||t.lc||(t.Fa?(t.lc=!0,t.Rd=0):Fu(e.g.Z,t.type)==null?t.jb==null&&Qn(e,t,0):(Ya(t),Ap(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function Ip(e,t){var n,r,i,o,a,f,p,g,m,w;return G(function(E){if(E.g==1){if(n=an,!e.j)throw new Y(2,5,5006);return r=new Map,i=new Set,e.j.audio&&(r.set(n.W,e.j.audio),i.add(e.j.audio)),e.j.video&&(r.set(n.oa,e.j.video),i.add(e.j.video)),e.s&&(r.set(n.wa,e.s),i.add(e.s)),o=e.g.Z,_(E,o.init(r,e.l.sequenceMode,e.l.type,e.l.ignoreManifestTimestampsInSegmentsMode),2)}for(Ht(e.m),e.updateDuration(),a=I(r.keys()),f=a.next();!f.done;f=a.next())p=f.value,g=r.get(p),e.i.has(p)||(m=hy(e,g),t.has(g.id)&&(w=t.get(g.id),fy(w,function(C,P,L){return Dl(C,P,L||null,e.h.retryParameters,e.g.Tb)}),m.X=w),e.i.set(p,m),Qn(e,m,0));le(E)})}function hy(e,t){return{stream:t,type:t.type,ja:null,X:yf(e,t),Xa:null,Rc:null,ce:null,xc:null,wc:null,fc:null,endOfStream:!1,Fa:!1,jb:null,lc:!1,Rd:0,Ke:!1,fd:!1,$c:!0,Sf:!1,pd:!1,pb:null}}function yf(e,t){if(t.type==="video"&&e.h.disableVideoPrefetch||t.type==="audio"&&e.h.disableAudioPrefetch||t.type===at&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===at&&e.h.disableTextPrefetch)return null;if(e.o.has(t))return e.o.get(t);var n=e.i.get(t.type);return(n=n&&n.X)&&t===n.i?n:0<e.h.segmentPrefetchLimit?new No(e.h.segmentPrefetchLimit,t,function(r,i,o){return Dl(r,i,o||null,e.h.retryParameters,e.g.Tb)},0>e.g.mb()):null}function yy(e){for(var t=e.h.segmentPrefetchLimit,n=e.h.prefetchAudioLanguages,r=I(e.l.variants),i=r.next(),o={};!i.done;o={sb:void 0},i=r.next())if(o.sb=i.value,o.sb.audio)if(e.o.has(o.sb.audio)){if(i=e.o.get(o.sb.audio),vp(i,t),!(0<t&&n.some(function(f){return function(p){return Du(f.sb.audio.language,p)}}(o)))){var a=e.i.get(o.sb.audio.type);i!==(a&&a.X)&&uo(i),e.o.delete(o.sb.audio)}}else 0>=t||!n.some(function(f){return function(p){return Du(f.sb.audio.language,p)}}(o))||!(i=yf(e,o.sb.audio))||(o.sb.audio.segmentIndex||o.sb.audio.createSegmentIndex(),e.o.set(o.sb.audio,i))}h.updateDuration=function(){var e=(e=T.ManagedMediaSource||T.MediaSource)&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1,t=this.l.presentationTimeline.getDuration();1/0>t?(e&&(this.A&&this.A.stop(),Jn(this.g.Z)),this.g.Z.ab(t)):e?(this.A&&this.A.Aa(.5),this.g.Z.ab(1/0)):this.g.Z.ab(Math.pow(2,32))};function gf(e,t){var n,r,i,o,a,f;return G(function(p){switch(p.g){case 1:if(Ht(e.m),t.Fa||t.jb==null||t.fd)return p.return();if(t.jb=null,!t.lc){p.u(2);break}return _(p,Ap(e,t,t.Ke,t.Rd),3);case 3:return p.return();case 2:if(pf(e,t),t.stream.segmentIndex){p.u(4);break}return n=t.stream,pe(p,5),_(p,t.stream.createSegmentIndex(),7);case 7:be(p,6);break;case 5:return r=ke(p),_(p,s(e,t,r),8);case 8:return p.return();case 6:if(n!=t.stream)return n.closeSegmentIndex&&n.closeSegmentIndex(),t.Fa||t.jb||Qn(e,t,0),p.return();case 4:pe(p,9),i=vf(e,t),i!=null&&(Qn(e,t,i),t.pd=!1),be(p,10);break;case 9:return o=ke(p),_(p,s(e,t,o),11);case 11:return p.return();case 10:if(a=Array.from(e.i.values()),!e.G||!a.every(function(g){return g.endOfStream})){p.u(0);break}return _(p,e.g.Z.endOfStream(),13);case 13:Ht(e.m),f=e.g.Z.getDuration(),f!=0&&f<e.l.presentationTimeline.getDuration()&&e.l.presentationTimeline.ab(f),le(p)}})}function vf(e,t){if(mf(t))return lp(e.g.Z,t.stream.originalId||""),null;if(t.type==at&&iy(e.g.Z),t.stream.isAudioMuxedInVideo)return null;if(!rf(e.g.Z)&&t.type!=at)return e.h.updateIntervalSeconds/2;var n=e.g.md();if(t.type==="audio")for(var r=I(e.o.keys()),i=r.next();!i.done;i=r.next())i=e.o.get(i.value),i.Ja(n,!0),Cs(i,n);r=t.Xa?t.Xa.endTime:n;var o=ry(e.g.Z,t.type,n),a=Math.max(1,Math.max(e.h.rebufferingGoal,e.h.bufferingGoal)*e.C),f=e.l.presentationTimeline.getDuration()-r;if(i=Ku(e.g.Z,t.type),1e-6>f&&i)return t.endOfStream=!0,t.type=="video"&&(e=e.i.get(at))&&mf(e)&&(e.endOfStream=!0),null;if(t.endOfStream=!1,o>=a)return e.h.updateIntervalSeconds/2;if(a=!t.ja,i=gy(e,t,n,i),!i)return e.h.updateIntervalSeconds;o=!1,a&&t.sg&&(o=!0,t.sg=!1),a=1/0,f=Array.from(e.i.values()),f=I(f);for(var p=f.next();!p.done;p=f.next())p=p.value,mf(p)||p.ja&&!p.ja.current()||(a=Math.min(a,p.Xa?p.Xa.endTime:n));return r>=a+e.l.presentationTimeline.h?e.h.updateIntervalSeconds:(t.X&&t.ja&&!e.o.has(t.stream)&&(t.X.Ja(i.startTime),Cs(t.X,i.startTime)),Ep(e,t,n,i,o).catch(function(){}),null)}function gy(e,t,n,r){if(t.ja)return t.ja.current();if(t.Xa||r)return n=t.Xa?t.Xa.endTime:r,e=0>e.g.mb(),t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Nb(n,!1,e)),t.ja&&t.ja.next().value;r=e.l.sequenceMode?0:e.h.inaccurateManifestTolerance;var i=Math.max(n-r,0);e=0>e.g.mb();var o=null;return r&&(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Nb(i,!1,e)),o=t.ja&&t.ja.next().value),o||(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Nb(n,!1,e)),o=t.ja&&t.ja.next().value),o}function Ep(e,t,n,r,i){var o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W;return G(function(X){switch(X.g){case 1:if(o=an,a=t.stream,f=t.ja,t.Fa=!0,pe(X,2),r.cc()==2)throw new Y(1,1,1011);return _(X,Cp(e,t,r,i),4);case 4:return Ht(e.m),e.B?X.return():(p=a.mimeType=="video/mp4"||a.mimeType=="audio/mp4",g=T.ReadableStream,e.h.lowLatencyMode&&e.l.isLowLatency&&g&&p&&(e.l.type!="HLS"||r.m)?(E=new Uint8Array(0),P=C=!1,M=function(q){var F,Q,H;return G(function(Z){switch(Z.g){case 1:if(C||(P=!0,Ht(e.m),e.B))return Z.return();if(pe(Z,2),E=Ev(E,q),F=!1,Q=0,new Vt().box("mdat",function($){Q=$.size+$.start,F=!0}).parse(E,!1,!0),!F){Z.u(4);break}return H=E.subarray(0,Q),E=E.subarray(Q),_(Z,Xa(e,t,n,a,r,H,!0,i),5);case 5:t.X&&t.ja&&Cs(t.X,r.startTime,!0);case 4:be(Z,0);break;case 2:L=ke(Z),le(Z)}})},_(X,kp(e,t,r,M),9)):(m=kp(e,t,r),_(X,m,7)));case 7:return w=X.h,Ht(e.m),e.B?X.return():(Ht(e.m),t.lc?(t.Fa=!1,Qn(e,t,0),X.return()):_(X,Xa(e,t,n,a,r,w,!1,i),6));case 9:if(B=X.h,L)throw L;if(P){X.u(10);break}return C=!0,Ht(e.m),e.B?X.return():t.lc?(t.Fa=!1,Qn(e,t,0),X.return()):_(X,Xa(e,t,n,a,r,B,!1,i),10);case 10:t.X&&t.ja&&Cs(t.X,r.startTime,!0);case 6:if(Ht(e.m),e.B)return X.return();t.Xa=r,f.next(),t.Fa=!1,t.Sf=!1,U=e.g.Z.Eb(),K=U[t.type],JSON.stringify(K),t.lc||e.g.Mf(r,t.stream),Qn(e,t,0),be(X,0);break;case 2:if(W=ke(X),Ht(e.m,W),e.B)return X.return();if(t.Fa=!1,W.code==7001)t.Fa=!1,Ya(t),Qn(e,t,0),X.u(0);else if(t.type==o.wa&&e.h.ignoreTextStreamFailures)e.i.delete(o.wa),X.u(0);else return W.code==3017?_(X,vy(e,t,W),0):(t.pd=!0,W.category==1&&t.X&&lo(t.X,r),W.severity=2,_(X,s(e,t,W),0))}})}function Ev(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function vy(e,t,n){var r,i,o,a;return G(function(f){if(f.g==1){if(r=Array.from(e.i.values()),r.some(function(p){return p!=t&&p.Sf}))return f.u(2);if(i=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,e.g.disableStream(t.stream,i))return f.return();if(o=Math.round(100*e.C),20<o)e.C-=.2;else if(4<o)e.C-=.04;else return t.pd=!0,e.B=!0,e.g.onError(n),f.return();return t.Sf=!0,a=e.g.md(),_(f,ks(e,t,a),2)}Qn(e,t,4),le(f)})}function Cp(e,t,n,r){var i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K;return G(function(W){switch(W.g){case 1:if(i=an,o=t.Xa==null,a=[],f=Math.max(0,Math.max(n.appendWindowStart,e.P)-.1),p=Math.min(n.appendWindowEnd,e.O)+.01,g=n.codecs||t.stream.codecs,m=$o(g),w=Ir(n.mimeType||t.stream.mimeType),E=n.timestampOffset,E==t.ce&&f==t.xc&&p==t.wc&&m==t.Ff&&w==t.Gf){W.u(2);break}if(C=t.Ff&&t.Gf&&dp(e.g.Z,t.type,w,g),!C){W.u(3);break}if(P=null,t.type===i.oa?P=e.i.get(i.W):t.type===i.W&&(P=e.i.get(i.oa)),!P){W.u(3);break}return _(W,zu(P).catch(function(){}),5);case 5:P.Rc=null,P.xc=null,P.wc=null,hf(e,P);case 3:return _(W,Wa(e,t,E,f,p,n,m,w),2);case 2:return Jd(n.ca,t.Rc)||(t.Rc=n.ca,n.l&&n.ca&&(L=kp(e,t,n.ca),M=function(){var X,q,F,Q,H,Z,$;return G(function(ue){switch(ue.g){case 1:return pe(ue,2),_(ue,L,4);case 4:return X=ue.h,Ht(e.m),q=null,F=new Map,Q={projection:null,hfov:null},H=new Vt,H.box("moov",it).box("trak",it).box("mdia",it).S("mdhd",function(de){q=Ma(de.reader,de.version).timescale}).box("hdlr",function(de){switch(de=de.reader,de.skip(8),de.zc()){case"soun":F.set(i.W,q);break;case"vide":F.set(i.oa,q)}q=null}).box("minf",it).box("stbl",it).S("stsd",Po).box("encv",pr).box("avc1",pr).box("avc3",pr).box("hev1",pr).box("hvc1",pr).box("dvav",pr).box("dva1",pr).box("dvh1",pr).box("dvhe",pr).box("dvc1",pr).box("dvi1",pr).box("vexu",it).box("proj",it).S("prji",function(de){de=de.reader.zc(),Q.projection=de}).box("hfov",function(de){de=de.reader.R()/1e3,Q.hfov=de}).parse(X),y(e,Q),F.has(t.type)?n.ca.timescale=F.get(t.type):q!=null&&(n.ca.timescale=q),Z=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,_(ue,e.g.wg(t.type,X),5);case 5:return _(ue,Tl(e.g.Z,t.type,X,null,t.stream,Z,t.$c,r),6);case 6:be(ue,0);break;case 2:throw $=ke(ue),t.Rc=null,$}})},B=n.startTime,o&&(U=Ku(e.g.Z,t.type),U!=null&&(B=U)),e.g.Ti(B,n.ca),a.push(M()))),K=t.Xa?t.Xa.i:null,n.i!=K&&a.push(ap(e.g.Z,t.type,n.startTime)),_(W,Promise.all(a),0)}})}function Wa(e,t,n,r,i,o,a,f){var p,g,m,w;return G(function(E){if(E.g==1)return p=an,g=new Map,e.j.audio&&g.set(p.W,e.j.audio),e.j.video&&g.set(p.oa,e.j.video),pe(E,2),t.xc=r,t.wc=i,a&&(t.Ff=a),f&&(t.Gf=f),t.ce=n,m=e.l.sequenceMode||e.l.type=="HLS",_(E,oy(e.g.Z,t.type,n,r,i,m,o.mimeType||t.stream.mimeType,o.codecs||t.stream.codecs,g),4);if(E.g!=2)return be(E,0);throw w=ke(E),t.xc=null,t.wc=null,t.Ff=null,t.Gf=null,t.ce=null,w})}function Xa(e,t,n,r,i,o,a,f){a=a===void 0?!1:a,f=f===void 0?!1:f;var p,g,m,w,E,C;return G(function(P){switch(P.g){case 1:return p=r.closedCaptions&&0<r.closedCaptions.size,e.h.shouldFixTimestampOffset&&(m=r.mimeType=="video/mp4"||r.mimeType=="audio/mp4",w=null,i.ca&&(w=i.ca.timescale),(E=m&&w&&r.type==="video"&&e.l.type=="DASH")&&(g=new Vt),E&&g.box("moof",it).box("traf",it).S("tfdt",function(L){var M,B,U,K,W,X;return G(function(q){return M=ba(L.reader,L.version),B=M.baseMediaDecodeTime,B?(U=-B/w,K=Number(t.ce)||0,K<U?(W=t.xc,X=t.wc,_(q,Wa(e,t,U,W,X,i),0)):q.u(0)):q.return()})}),E&&g.parse(o,!1,a)),_(P,ks(e,t,n),2);case 2:return Ht(e.m),C=t.$c,t.$c=!1,_(P,e.g.wg(t.type,o),3);case 3:return _(P,Tl(e.g.Z,t.type,o,i,r,p,C,f,a),4);case 4:Ht(e.m),le(P)}})}function ks(e,t,n){var r,i,o,a,f;return G(function(p){if(p.g==1)return r=t.stream.segmentIndex,r instanceof Gt&&r.Ja(e.l.presentationTimeline.nb()),i=Math.max(e.h.bufferBehind*e.C,e.l.presentationTimeline.h),o=Fu(e.g.Z,t.type),o==null?(e.F==t&&(e.F=null),p.return()):(a=n-o,f=a-i,f<=e.h.evictionGoal?p.return():_(p,e.g.Z.remove(t.type,o,o+f),2));if(p.g!=4)return Ht(e.m),e.F?_(p,ks(e,e.F,n),4):p.u(0);Ht(e.m),le(p)})}function mf(e){return e&&e.type==at&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function kp(e,t,n,r){var i,o,a,f,p;return G(function(g){switch(g.g){case 1:if(i=n.Pb())return g.return(i);if(o=null,t.X){var m=t.X,w=m.h;n instanceof Ar&&(w=m.j),w.has(n)?(m=w.get(n),r&&(m.eg=r),o=m.Ed):o=null}return o||(o=Dl(n,t.stream,r||null,e.h.retryParameters,e.g.Tb)),a=0,t.ja&&(a=t.ja.h),t.pb=o,_(g,o.promise,2);case 2:if(f=g.h,t.pb=null,p=f.data,!n.aesKey){g.u(3);break}return _(g,df(p,n.aesKey,a),4);case 4:p=g.h;case 3:return g.return(p)}})}function Dl(e,t,n,r,i,o){o=o===void 0?!1:o;var a=e instanceof Fe?e:void 0,f=a?1:0;return e=Pl(e.N(),e.Ma,e.va,r,n),e.contentType=t.type,i.request(_r,e,{type:f,stream:t,segment:a,isPreload:o})}function Ap(e,t,n,r){var i,o;return G(function(a){if(a.g==1)return t.lc=!1,t.Ke=!1,t.Rd=0,t.fd=!0,t.Xa=null,t.ja=null,t.X&&!e.o.has(t.stream)&&uo(t.X),r?(i=e.g.md(),o=e.g.Z.getDuration(),_(a,e.g.Z.remove(t.type,i+r,o),3)):_(a,sp(e.g.Z,t.type),4);if(a.g!=3)return Ht(e.m),n?_(a,e.g.Z.flush(t.type),3):a.u(3);Ht(e.m),t.fd=!1,t.endOfStream=!1,t.Fa||t.jb||Qn(e,t,0),le(a)})}function Qn(e,t,n){var r=t.type;(r!=at||e.i.has(r))&&(t.jb=new zl(function(){var i;return G(function(o){if(o.g==1)return pe(o,2),_(o,gf(e,t),4);if(o.g!=2)return be(o,0);i=ke(o),e.g&&e.g.onError(i),le(o)})}).aa(n))}function Ya(e){e.jb!=null&&(e.jb.stop(),e.jb=null)}function zu(e){return G(function(t){return e.pb?_(t,e.pb.abort(),0):t.u(0)})}function s(e,t,n){var r;return G(function(i){if(i.g==1)return _(i,Mc(e.L),2);if(Ht(e.m),n.category===1&&n.code!=1003){if(t.fc)return _o(e,!1),i.return();r=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,n.handled=e.g.disableStream(t.stream,r),n.handled&&(n.severity=1)}(!n.handled||n.code!=1011)&&e.g.onError(n),n.handled||e.h.failureCallback(n),le(i)})}function c(e,t,n){t=t===void 0?!1:t,n=n===void 0?!0:n;var r,i,o,a,f,p;return G(function(g){if(g.g==1){if(r=Date.now()/1e3,i=e.h.minTimeBetweenRecoveries,!t){if(!e.h.allowMediaSourceRecoveries||r-e.M<i)return g.return(!1);e.M=r}return o=an,(a=e.i.get(o.W))&&(a.Rc=null,a.xc=null,a.wc=null,n&&hf(e,a),zu(a).catch(function(){}),a.ja&&a.ja.Uf()),(f=e.i.get(o.oa))&&(f.Rc=null,f.xc=null,f.wc=null,n&&hf(e,f),zu(f).catch(function(){}),f.ja&&f.ja.Uf()),p=new Map,e.j.audio&&p.set(o.W,e.j.audio),e.j.video&&p.set(o.oa,e.j.video),_(g,fp(e.g.Z,p),2)}return!f||f.Fa||f.jb||Qn(e,f,0),!a||a.Fa||a.jb||Qn(e,a,0),g.return(!0)})}function y(e,t){if(e.I.projection!=t.projection||e.I.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new Te("spatialvideoinfo",n)}else n=new Te("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.I=t}}function S(){}function k(e,t,n,r,i){var o=i in r,a=o?n.constructor==Object&&Object.keys(r).length==0:n.constructor==Object&&Object.keys(n).length==0,f=o||a,p=!0,g;for(g in t){var m=i+"."+g,w=o?r[i]:n[g];f||g in n?t[g]===void 0?w===void 0||f?delete e[g]:e[g]=Lr(w):a?e[g]=t[g]:w.constructor==Object&&t[g]&&t[g].constructor==Object?(e[g]||(e[g]=Lr(w)),m=k(e[g],t[g],w,r,m),p=p&&m):typeof t[g]!=typeof w||t[g]==null||typeof t[g]!="function"&&t[g].constructor!=w.constructor?(Ti("Invalid config, wrong type for "+m),p=!1):(typeof n[g]=="function"&&n[g].length!=t[g].length&&ft("Unexpected number of arguments for "+m),e[g]=t[g]):(Ti("Invalid config, unrecognized key "+m),p=!1)}return p}function R(e,t){for(var n={},r=n,i=0,o=0;i=e.indexOf(".",i),!(0>i);)(i==0||e[i-1]!="\\")&&(o=e.substring(o,i).replace(/\\\./g,"."),r[o]={},r=r[o],o=i+1),i+=1;return r[e.substring(o).replace(/\\\./g,".")]=t,n}function V(e,t){return e&&t}function J(e,t){function n(a){for(var f=I(Object.keys(a)),p=f.next();!p.done;p=f.next())p=p.value,o(a[p])&&Object.keys(a[p]).length===0||i(a[p])||typeof a[p]=="function"?delete a[p]:o(a[p])&&(n(a[p]),Object.keys(a[p]).length===0&&delete a[p])}function r(a,f){return Object.keys(a).reduce(function(p,g){var m=a[g];return f.hasOwnProperty(g)?o(m)&&o(f[g])?(m=r(m,f[g]),(0<Object.keys(m).length||!o(m))&&(p[g]=m)):i(m)&&i(f[g])||Number.isNaN(m)&&Number.isNaN(f[g])||m!==f[g]&&(p[g]=m):p[g]=m,p},{})}function i(a){return Array.isArray(a)&&a.length===0}function o(a){return a&&typeof a=="object"&&!Array.isArray(a)}return e=r(e,t),n(e),e}Me("shaka.util.ConfigUtils",S),S.getDifferenceFromConfigObjects=J,S.convertToConfigObject=R,S.mergeConfigObjects=k;function te(){this.g=null}te.prototype.configure=function(e){this.g=e},te.prototype.create=function(e){var t=[];t=me(e,this.g.language);var n=e.filter(function(r){return r.primary});return t=t.length?t:n.length?n:e,e=Ee(t,this.g.role),e.length&&(t=e),this.g.videoLayout&&(e=tt(t,this.g.videoLayout),e.length&&(t=e)),this.g.Oc&&(e=et(t,this.g.Oc),e.length&&(t=e)),this.g.channelCount&&(e=He(t,this.g.channelCount),e.length&&(t=e)),this.g.Gc&&(e=Pe(t,this.g.Gc),e.length&&(t=e)),this.g.cd&&(e=xe(t,this.g.cd),e.length&&(t=e)),e=Kn(t,this.g.spatialAudio),e.length&&(t=e),this.g.audioCodec&&(e=fe(t,this.g.audioCodec),e.length&&(t=e)),new fs(t[0],t,!(this.g.codecSwitchingStrategy=="smooth"&&vu()))};function me(e,t){t=Et(t);var n=pa(t,e.map(function(r){return Dd(r)}));return n?e.filter(function(r){return n==Dd(r)}):[]}function Ee(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function Pe(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function xe(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function He(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount!=t)})}function et(e,t){return t=="AUTO"&&(t=T.matchMedia("(color-gamut: p3)").matches?e.some(function(n){return!!(n.video&&n.video.hdr&&n.video.hdr=="HLG")})?"HLG":"PQ":"SDR"),e.filter(function(n){return!(n.video&&n.video.hdr&&n.video.hdr!=t)})}function tt(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function Kn(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function fe(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function ne(){}function ye(e){return e=jt(e),new hn(e).ub}function Re(e,t,n){function r(f){wr(o).setUint32(a,f.byteLength,!0),a+=4,o.set(Ze(f),a),a+=f.byteLength}if(!n||!n.byteLength)throw new Y(2,6,6015);var i;typeof t=="string"?i=hc(t,!0):i=t,e=jt(e),e=hc(e,!0);var o=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),a=0;return r(e),r(i),r(n),o}function nt(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=jt(e).split("skd://").pop(),Re(e,n,t))}function ct(e,t){e===2&&(t.headers["Content-Type"]="application/octet-stream")}Me("shaka.util.FairPlayUtils",ne),ne.commonFairPlayResponse=function(e,t){if(e===2){try{var n=Qt(t.data)}catch{return}e=!1,n=n.trim(),n.substr(0,5)==="<ckc>"&&n.substr(-6)==="</ckc>"&&(n=n.slice(5,-6),e=!0);try{var r=JSON.parse(n);r.ckc&&(n=r.ckc,e=!0),r.CkcMessage&&(n=r.CkcMessage,e=!0),r.License&&(n=r.License,e=!0)}catch{}e&&(t.data=zr(ci(n)))}},ne.expressplayFairPlayRequest=function(e,t){ct(e,t)},ne.conaxFairPlayRequest=function(e,t){ct(e,t)},ne.ezdrmFairPlayRequest=function(e,t){ct(e,t)},ne.verimatrixFairPlayRequest=function(e,t){e===2&&(e=Ze(t.body),e=Wo(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=ui("spc="+e))},ne.expressplayInitDataTransform=function(e,t,n){return nt(e,t,n)},ne.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=jt(e).split("skd://").pop().split("?").shift(),n=T.atob(n);var r=new ArrayBuffer(2*n.length);r=sd(r);for(var i=0,o=n.length;i<o;i++)r[i]=n.charCodeAt(i);return Re(e,r,t)},ne.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=jt(e).split(";").pop(),Re(e,n,t))},ne.verimatrixInitDataTransform=function(e,t,n){return nt(e,t,n)},ne.initDataTransform=Re,ne.defaultGetContentId=ye,ne.isFairPlaySupported=function(){var e;return G(function(t){return t.g==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},pe(t,2),_(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.g!=2?t.return(!0):(ke(t),t.return(!1))})};function ut(){}function ht(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:Di(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,w,E){return Zs()&&w=="skd"&&(w=E.serverCertificate,E=ye(m),m=Re(m,E,w)),m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:$i(),minHdcpVersion:"",ignoreDuplicateInitData:!Tt("Tizen 2"),defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};($i()||Ei())&&t.preferredKeySystems.push("com.microsoft.playready");var n="reload",r=!1;!vu()||Mr()||Ei()||Xr()||Wr()&&Qs()===79||!(!Tr()||Tr()&&xu()||Tr()&&Tt("Fuchsia"))||Tu()&&In()||(n="smooth",r=!0),r={retryParameters:Di(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"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:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Sf,manifestPreprocessorTXml:my,sequenceMode:!1,multiTypeVariantsAllowed:r,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0,ignoreSupplementalCodecs:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:!(Js()||Tt("Tizen 2")||Wr()&&Qs()===38||Ei()),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,updatePeriod:-1,allowLowLatencyByteRangeOptimization:!0,ignoreSupplementalCodecs:!1},mss:{manifestPreprocessor:Sf,manifestPreprocessorTXml:my,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var i={retryParameters:Di(),failureCallback:function(m){return V([m])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:Ei()||Xr(),dontChooseCodecs:!1,shouldFixTimestampOffset:Wr()||Mr()};(Wr()||Mr()||Tr()||Yr())&&(i.stallSkip=0),Mr()&&(i.gapPadding=2);var o={trackSelectionCallback:function(m){return G(function(w){return w.return(m)})},downloadSizeCallback:function(m){var w;return G(function(E){return E.g==1?navigator.storage&&navigator.storage.estimate?_(E,navigator.storage.estimate(),3):E.return(!0):(w=E.h,E.return(w.usage+m<.95*w.quota))})},progressCallback:function(m,w){return V([m,w])},usePersistentLicense:!0,numberOfParallelDownloads:5};e={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:So()?.5:0,preferNetworkInformationBandwidth:!1},n={codecSwitchingStrategy:n,addExtraFeaturesToSourceBuffer:function(m){return V([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,w){return V([m,w])},dispatchAllEmsgBoxes:!1};var a=!1,f=!1,p=!0;tl()&&(f=a=!0,p=!1);var g={drm:t,manifest:r,streaming:i,mediaSource:n,offline:o,abrFactory:function(){return new Zt},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(te,[null].concat(ee(It.apply(0,arguments)))))},abr:e,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:a,skipPlayDetection:f,supportsMultipleMediaElements:p,disableHLSInterstitial:!1,disableDASHInterstitial:!1},ignoreHardwareResolution:!1};return o.trackSelectionCallback=function(m){return G(function(w){return w.return(Gu(m,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})},g}function Zn(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function _t(e,t,n){var r={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return k(e,t,n||ht(),r,"")}function Gu(e,t,n){var r=n;r=="AUTO"&&(r=T.matchMedia("(color-gamut: p3)").matches?e.some(function(f){return!!(f.hdr&&f.hdr=="HLG")})?"HLG":"PQ":"SDR");var i=e.filter(function(f){return!(f.type!="variant"||f.hdr&&f.hdr!=r)});n=[];var o=pa(t,i.map(function(f){return f.language}));o&&(n=i.filter(function(f){return Et(f.language)==o})),n.length==0&&(n=i.filter(function(f){return f.primary})),n.length==0&&(i.map(function(f){return f.language}),n=i);var a=n.filter(function(f){return f.height&&480>=f.height});for(a.length&&(a.sort(function(f,p){return p.height-f.height}),n=a.filter(function(f){return f.height==a[0].height})),t=[],n.length&&(i=Math.floor(n.length/2),n.sort(function(f,p){return f.bandwidth-p.bandwidth}),t.push(n[i])),e=I(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=at&&n.type!="image"||t.push(n);return t}function Sf(e){return V([e],e)}function my(e){return V([e],e)}Me("shaka.util.PlayerConfiguration",ut),ut.mergeConfigObjects=_t,ut.createDefaultForLL=Zn,ut.createDefault=ht;function uI(){this.g=null,this.h=[]}function Cv(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=I(e.h);for(var r=e.next();!r.done;r=e.next())r=r.value,n+=r.state==t?r.duration:0;return n}function lI(e){function t(o){return{timestamp:o.timestamp,state:o.state,duration:o.duration}}for(var n=[],r=I(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}function sI(){this.i=this.h=null,this.g=[]}function kv(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Sy(){this.mc=this.Ug=this.s=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.P=this.V=this.L=this.M=this.O=this.l=this.m=NaN,this.K=0,this.F=this.G=NaN,this.g=new uI,this.h=new sI}function Ol(e,t,n,r){xt.call(this),this.M=e,this.V=t,this.za=r.networkingEngine,this.B=n,this.o=null,this.sa=0,this.Na=r.Ic,this.F=r.Ni,this.Pa=r.Oi,this.g=r.config,this.j=this.G=this.h=null,this.ga=!1,this.H=r.Yi,this.na=!1,this.l=null,this.da=!1,this.i=this.C=null,this.ba=!1,this.L=new Map,this.pa=!1,this.Ba=r.Xi,this.$=new Sy,this.fa=new Nt,this.m=new Nt,this.O=null,this.s=!1,this.Ia=r.Nh,this.ha=null,this.Ha=r.Mh,this.P=!1,this.K=[],this.I=[],this.A=!0}mt(Ol,xt);function Pp(e,t,n){(e=t?e.I:e.K)?e.push(n):n()}function aI(e){if(e.I)for(var t=I(e.I),n=t.next();!n.done;n=t.next())n=n.value,n();e.I=null}function c1(e,t){if(e.O=t,e.P=!0,e.K){t=I(e.K);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.K=null}h=Ol.prototype,h.getStartTime=function(){return this.B},h.Nc=function(){return this.M},h.uf=function(){return this.h};function cI(e){return e.ba=!0,e.i}function fI(e){return e.na=!0,e.H}h.getStats=function(){return this.$};function dI(e){return e.da=!0,e.l}function pI(e){return e.pa=!0,e.L}h.start=function(){var e=this;(function(){var t;return G(function(n){switch(n.g){case 1:return _(n,Promise.resolve(),2);case 2:return pe(n,3),_(n,hI(e),5);case 5:return wf(e),_(n,yI(e),6);case 6:return wf(e),_(n,gI(e),7);case 7:return wf(e),_(n,Kd(e.l),8);case 8:wf(e),e.m.resolve(),be(n,0);break;case 3:t=ke(n),t instanceof Y&&(t.code==7001||t.code==7003)||e.m.reject(t),le(n)}})})()},h.dispatchEvent=function(e){return this.O?this.O.dispatchEvent(e):xt.prototype.dispatchEvent.call(this,e)},h.onError=function(e){e.severity===2&&(this.m.reject(e),this.destroy());var t=new Map().set("detail",e);t=new Te("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function wf(e){if(e.s)throw new Y(2,7,7003)}function Av(e,t){e.dispatchEvent(new Te("onstatechange",new Map().set("state",t)))}function hI(e){var t,n,r,i,o,a,f,p,g;return G(function(m){switch(m.g){case 1:if(Av(e,"manifest-parser"),e.j||(e.G=Xd(e.M,e.V),e.j=e.G(),e.j.configure(e.g.manifest,function(){return e.A})),t=Date.now()/1e3,Av(e,"manifest"),e.h){m.u(2);break}return _(m,e.j.start(e.M,e.Pa),3);case 3:if(e.h=m.h,e.h.variants.length!=1){m.u(2);break}for(n=[],r=e.h.variants[0],i=I([r.video,r.audio]),o=i.next();!o.done;o=i.next())(a=o.value)&&!a.segmentIndex&&n.push(a.createSegmentIndex());if(!(0<n.length)){m.u(2);break}return _(m,Promise.all(n),2);case 2:return e.fa.resolve(),f=new Te("manifestparsed",void 0),_(m,Promise.resolve(),7);case 7:if(e.dispatchEvent(f),e.h.variants.length==0)throw new Y(2,4,4036);vI(e.h),p=Date.now()/1e3,g=p-t,e.$.H=g,le(m)}})}function yI(e){var t,n,r,i,o;return G(function(a){switch(a.g){case 1:if(Av(e,"drm-engine"),e.sa=Date.now()/1e3,e.l=e.Na(),e.F.h=e.l,e.l.configure(e.g.drm,function(){return e.A}),t=Gd(e.F,e.h),!t){a.u(2);break}return n=new Te("trackschanged",void 0),_(a,Promise.resolve(),3);case 3:wf(e),e.dispatchEvent(n);case 2:return r=vn(e.h.variants),_(a,uu(e.l,r,e.h.offlineSessionIds),4);case 4:return wf(e),_(a,ps(e.F,e.h),5);case 5:if(i=a.h,!i){a.u(0);break}return o=new Te("trackschanged",void 0),_(a,Promise.resolve(),7);case 7:e.dispatchEvent(o),le(a)}})}h.configure=function(e,t){e=R(e,t),_t(this.g,e)},h.getConfiguration=function(){return Lr(this.g)};function gI(e){var t,n,r,i,o,a;return G(function(f){return e.o||(e.o=e.g.adaptationSetCriteriaFactory(),e.o.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredVariantRole,channelCount:e.g.preferredAudioChannelCount,Oc:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,Gc:e.g.preferredAudioLabel,cd:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:""})),e.Ha&&(t=e.g.abrFactory,e.C=t,e.i=t(),e.i.configure(e.g.abr)),!e.Ia||(n=e.h.presentationTimeline.T(),r=vn(e.h.variants),i=e.o.create(r),e.i.configure(e.g.abr),e.i.setVariants(Array.from(i.values())),o=e.i.chooseVariant(),!o)?f.u(0):(a=[],e.ha=o,o.video&&a.push(f1(e,o.video,n)),o.audio&&a.push(f1(e,o.audio,n)),_(f,Promise.all(a),0))})}function f1(e,t,n){var r,i,o,a,f;return G(function(p){return p.g==1?(r=e.g.streaming.segmentPrefetchLimit||2,i=new No(r,t,function(g,m,w){return Dl(g,m,w||null,e.g.streaming.retryParameters,e.za,e.A)},!1),e.L.set(t.id,i),t.segmentIndex?p.u(2):_(p,t.createSegmentIndex(),2)):(o=e.B||0,(f=(a=t.segmentIndex.Nb(o))?a.current():null)||(f=ti(t.segmentIndex)),f?n?f.ca?_(p,ff(i,f.ca),0):p.u(0):_(p,Cs(i,f.startTime),0):p.u(0))})}h.yj=function(){return this.m},h.destroy=function(){var e=this,t,n,r;return G(function(i){switch(i.g){case 1:if(e.s=!0,!e.j||e.ga){i.u(2);break}return _(i,e.j.stop(),2);case 2:if(!e.i||e.ba){i.u(4);break}return _(i,e.i.stop(),4);case 4:if(e.H&&!e.na&&e.H.release(),!e.l||e.da){i.u(6);break}return _(i,e.l.destroy(),6);case 6:if(0<e.L.size&&!e.pa)for(t=I(e.L.values()),n=t.next();!n.done;n=t.next())r=n.value,uo(r);le(i)}})};function vI(e){function t(n){return n.video&&n.audio||n.video&&n.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}Me("shaka.media.PreloadManager",Ol),Ol.prototype.destroy=Ol.prototype.destroy,Ol.prototype.waitForFinish=Ol.prototype.yj;function wy(e,t){xt.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Fc:null,Ec:Tf,uc:function(r,i){return $a(n,"enter",r,i)}},{Fc:Dp,Ec:Tf,uc:function(r,i){return $a(n,"enter",r,i)}},{Fc:Op,Ec:Tf,uc:function(r,i){return $a(n,"enter",r,i)}},{Fc:Tf,Ec:Dp,uc:function(r,i){return $a(n,"exit",r,i)}},{Fc:Tf,Ec:Op,uc:function(r,i){return $a(n,"exit",r,i)}},{Fc:Dp,Ec:Op,uc:function(r,i){return $a(n,"skip",r,i)}},{Fc:Op,Ec:Dp,uc:function(r,i){return $a(n,"skip",r,i)}}],this.h=new At,this.h.D(this.i,"regionremove",function(r){n.g.delete(r.region)})}mt(wy,xt),wy.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,xt.prototype.release.call(this)},wy.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=I(this.i.g),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.g.get(r),o=e<r.startTime?Dp:e>r.endTime?Op:Tf;this.g.set(r,o);for(var a=I(this.m),f=a.next();!f.done;f=a.next())f=f.value,f.Fc==i&&f.Ec==o&&f.uc(r,t)}}};function $a(e,t,n,r){t=new Te(t,new Map([["region",n],["seeking",r]])),e.dispatchEvent(t)}var Dp=1,Tf=2,Op=3;function Ja(e,t,n){var r,i,o,a,f,p,g;return G(function(m){switch(m.g){case 1:var w=new hn(e).Za.split("/").pop().split(".");return r=w.length==1?"":w.pop().toLowerCase(),(i=mI[r])?m.return(i):(o=0,a=wt([e],n),pe(m,2),a.method="HEAD",_(m,t.request(o,a).promise,4));case 4:f=m.h,i=f.headers["content-type"],be(m,3);break;case 2:if(p=ke(m),!p||p.code!=1002&&p.code!=1001){m.u(3);break}return a.method="GET",_(m,t.request(o,a).promise,6);case 6:g=m.h,i=g.headers["content-type"];case 3:return m.return(i?i.toLowerCase().split(";").shift():"")}})}var mI={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",mov:"video/quicktime",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",html:"text/html",htm:"text/html"};function d1(e,t){if(e.lineBreak)return`
|
||
`;if(e.nestedCues.length)return e.nestedCues.map(function(a){return d1(a,e)}).join("");if(!e.payload)return e.payload;var n=[],r=e.fontWeight>=$l,i=e.fontStyle==Jl,o=e.textDecoration.includes(Ho);return r&&n.push(["b"]),i&&n.push(["i"]),o&&n.push(["u"]),i=e.color,i==""&&t&&(i=t.color),r="",(i=p1(i))&&(r+="."+i),i=e.backgroundColor,i==""&&t&&(i=t.backgroundColor),(t=p1(i))&&(r+=".bg_"+t),r&&n.push(["c",r]),n.reduceRight(function(a,f){var p=I(f);return f=p.next().value,p=p.next().value,"<"+f+(p===void 0?"":p)+">"+a+"</"+f+">"},e.payload)}function p1(e){e=e.toLowerCase();var t=e.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(parseInt(t[1],10)|256).toString(16).slice(1)+(parseInt(t[2],10)|256).toString(16).slice(1)+(parseInt(t[3],10)|256).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function Pv(e,t){var n=[];e=I(h1(e));for(var r=e.next();!r.done;r=e.next())if(r=r.value,r.isContainer)n.push.apply(n,ee(Pv(r.nestedCues,r)));else{var i=r.clone();i.nestedCues=[],i.payload=d1(r,t),n.push(i)}return n}function h1(e){var t=[];e=I(e);for(var n=e.next(),r={};!n.done;r={Xe:void 0},n=e.next())r.Xe=n.value,t.some(function(i){return function(o){return vc(i.Xe,o)}}(r))||t.push(r.Xe);return t}function SI(e){function t(r){for(var i=5381,o=r.length;o;)i=33*i^r.charCodeAt(--o);return(i>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch{}return e.textAlign=="center"&&n.align!="center"&&(n.align="middle"),e.writingMode=="vertical-lr"?n.vertical="lr":e.writingMode=="vertical-rl"&&(n.vertical="rl"),e.lineInterpretation==1&&(n.snapToLines=!1),e.line!=null&&(n.line=e.line),e.position!=null&&(n.position=e.position),n}function wI(e){if(e.endTime===1/0||e.endTime<e.startTime)return null;var t=new zt(e.startTime,e.endTime,e.text);return t.line=typeof e.line=="number"?e.line:null,e.lineAlign&&(t.lineAlign=e.lineAlign),t.lineInterpretation=e.snapToLines?ll:1,t.position=typeof e.position=="number"?e.position:null,e.positionAlign&&(t.positionAlign=e.positionAlign),t.size=e.size,t.textAlign=e.align,e.vertical==="lr"?t.writingMode="vertical-lr":e.vertical==="rl"&&(t.writingMode="vertical-rl"),e.region&&(t.region.id=e.region.id,t.region.height=e.region.lines,t.region.heightUnits=2,t.region.regionAnchorX=e.region.regionAnchorX,t.region.regionAnchorY=e.region.regionAnchorY,t.region.scroll=e.region.scroll,t.region.viewportAnchorX=e.region.viewportAnchorX,t.region.viewportAnchorY=e.region.viewportAnchorY,t.region.viewportAnchorUnits=Xn,t.region.width=e.region.width,t.region.widthUnits=Xn),mc(t),t}function yr(e,t){for(this.h=e,this.i=t,this.g=null,e=I(Array.from(this.h.textTracks)),t=e.next();!t.done;t=e.next())t=t.value,t.kind!=="metadata"&&t.kind!=="chapters"&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}h=yr.prototype,h.configure=function(){},h.remove=function(e,t){return this.g?(g1(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0):!1},h.append=function(e){if(this.g){var t=Pv(e),n=[];e=this.g.cues?Array.from(this.g.cues):[],t=I(t);for(var r=t.next(),i={};!r.done;i={Pc:void 0},r=t.next())i.Pc=r.value,!e.some(function(o){return function(a){return a.startTime==o.Pc.startTime&&a.endTime==o.Pc.endTime&&a.text==o.Pc.payload}}(i))&&i.Pc.payload&&(r=SI(i.Pc))&&n.push(r);for(e=n.slice().sort(function(o,a){return o.startTime!=a.startTime?o.startTime-a.startTime:o.endTime!=a.endTime?o.endTime-a.startTime:"line"in VTTCue.prototype?n.indexOf(a)-n.indexOf(o):n.indexOf(o)-n.indexOf(a)}),e=I(e),t=e.next();!t.done;t=e.next())this.g.addCue(t.value)}},h.destroy=function(){return this.g&&(g1(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},h.isTextVisible=function(){return this.g?this.g.mode=="showing":!1},h.setTextVisibility=function(e){e&&!this.g&&y1(this),this.g&&(this.g.mode=e?"showing":"hidden")},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){y1(this)};function y1(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function g1(e,t){var n=e.mode;e.mode=n=="showing"?"showing":"hidden";for(var r=I(Array.from(e.cues)),i=r.next();!i.done;i=r.next())(i=i.value)&&t(i)&&e.removeCue(i);e.mode=n}Me("shaka.text.SimpleTextDisplayer",yr),yr.prototype.enableTextDisplayer=yr.prototype.enableTextDisplayer,yr.prototype.setTextLanguage=yr.prototype.setTextLanguage,yr.prototype.setTextVisibility=yr.prototype.setTextVisibility,yr.prototype.isTextVisible=yr.prototype.isTextVisible,yr.prototype.destroy=yr.prototype.destroy,yr.prototype.append=yr.prototype.append,yr.prototype.remove=yr.prototype.remove,yr.prototype.configure=yr.prototype.configure;function gr(){}h=gr.prototype,h.configure=function(){},h.remove=function(){},h.append=function(){},h.destroy=function(){},h.isTextVisible=function(){return!1},h.setTextVisibility=function(){},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){},Me("shaka.text.StubTextDisplayer",gr),gr.prototype.enableTextDisplayer=gr.prototype.enableTextDisplayer,gr.prototype.setTextLanguage=gr.prototype.setTextLanguage,gr.prototype.setTextVisibility=gr.prototype.setTextVisibility,gr.prototype.isTextVisible=gr.prototype.isTextVisible,gr.prototype.destroy=gr.prototype.destroy,gr.prototype.append=gr.prototype.append,gr.prototype.remove=gr.prototype.remove,gr.prototype.configure=gr.prototype.configure;function vr(e,t){var n=this;document.fullscreenEnabled||ft("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen"),this.m=!1,this.h=[],this.A=e,this.s=t,this.l=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.s.appendChild(this.g),this.C=new st(function(){n.A.paused||Qa(n)}).Aa(.25),this.i=new Map,this.j=new At,this.j.D(document,"fullscreenchange",function(){Qa(n,!0)}),this.j.D(this.A,"seeking",function(){Qa(n,!0)}),this.j.D(this.A,"resize",function(){var r=n.A,i=r.videoWidth;r=r.videoHeight,i&&r?n.l=i/r:n.l=null}),this.o=null,"ResizeObserver"in T&&(this.o=new ResizeObserver(function(){Qa(n,!0)}),this.o.observe(this.g)),this.B=new Map}h=vr.prototype,h.configure=function(e){this.C&&this.C.Aa(e.captionsUpdatePeriod)},h.append=function(e){var t=[].concat(ee(this.h));e=I(h1(e));for(var n=e.next(),r={};!n.done;r={Ye:void 0},n=e.next())r.Ye=n.value,t.some(function(i){return function(o){return vc(o,i.Ye)}}(r))||this.h.push(r.Ye);Qa(this)},h.destroy=function(){return this.g&&(this.s.removeChild(this.g),this.g=null,this.m=!1,this.h=[],this.C&&this.C.stop(),this.i.clear(),this.j&&(this.j.release(),this.j=null),this.o&&(this.o.disconnect(),this.o=null)),Promise.resolve()},h.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(r){return r.startTime<e||r.endTime>=t}),Qa(this,n>this.h.length),!0},h.isTextVisible=function(){return this.m},h.setTextVisibility=function(e){this.m=e,Qa(this,!0)},h.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},h.enableTextDisplayer=function(){};function TI(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function v1(e,t,n,r,i){var o=!1,a=[],f=[];t=I(t);for(var p=t.next();!p.done;p=t.next()){p=p.value,i.push(p);var g=e.i.get(p),m=p.startTime<=r&&p.endTime>r,w=g?g.Fh:null;g&&(a.push(g.Ze),g.Bc&&a.push(g.Bc),m||(o=!0,e.i.delete(p),g=null)),m&&(f.push(p),g?TI(e,w)||(o=!0):(xI(e,p,i),g=e.i.get(p),w=g.Fh,o=!0)),0<p.nestedCues.length&&w&&v1(e,p.nestedCues,w,r,i),i.pop()}if(o){for(r=I(a),i=r.next();!i.done;i=r.next())i=i.value,i.parentElement&&i.parentElement.removeChild(i);for(f.sort(function(E,C){return E.startTime!=C.startTime?E.startTime-C.startTime:E.endTime-C.endTime}),f=I(f),r=f.next();!r.done;r=f.next())r=e.i.get(r.value),r.Bc?(r.Bc.contains(n)&&r.Bc.removeChild(n),n.appendChild(r.Bc),r.Bc.appendChild(r.Ze)):n.appendChild(r.Ze)}}function Qa(e,t){if(e.g){var n=e.A.currentTime;if(!e.m||t!==void 0&&t){t=I(e.B.values());for(var r=t.next();!r.done;r=t.next())oo(r.value);oo(e.g),e.i.clear(),e.B.clear()}e.m&&v1(e,e.h,e.g,n,[])}}function xI(e,t,n){var r=1<n.length,i=r?"span":"div";t.lineBreak&&(i="br"),t.rubyTag&&(i=t.rubyTag),r=!r&&0<t.nestedCues.length;var o=document.createElement(i);if(i!="br"&&EI(e,o,t,n,r),n=null,t.region&&t.region.id){var a=t.region,f=e.l===4/3?2.5:1.9;if(n=a.id+"_"+a.width+"x"+a.height+(a.heightUnits==Xn?"%":"px")+"-"+a.viewportAnchorX+"x"+a.viewportAnchorY+(a.viewportAnchorUnits==Xn?"%":"px"),e.B.has(n))n=e.B.get(n);else{i=document.createElement("span");var p=a.heightUnits==Xn?"%":"px",g=a.widthUnits==Xn?"%":"px",m=a.viewportAnchorUnits==Xn?"%":"px";i.id="shaka-text-region---"+n,i.classList.add("shaka-text-region"),i.style.position="absolute";var w=a.height,E=a.width;a.heightUnits===2&&(w=5.33*a.height,p="%"),a.widthUnits===2&&(E=a.width*f,g="%"),i.style.height=w+p,i.style.width=E+g,a.viewportAnchorUnits===2?(f=a.viewportAnchorY/75*100,p=a.viewportAnchorX/(e.l===4/3?160:210)*100,f-=a.regionAnchorY*w/100,p-=a.regionAnchorX*E/100,i.style.top=f+"%",i.style.left=p+"%"):(i.style.top=a.viewportAnchorY-a.regionAnchorY*w/100+m,i.style.left=a.viewportAnchorX-a.regionAnchorX*E/100+m),a.heightUnits!==0&&a.widthUnits!==0&&a.viewportAnchorUnits!==0&&(a=Math.max(0,Math.min(100-(parseInt(i.style.width.slice(0,-1),10)||0),parseInt(i.style.left.slice(0,-1),10)||0)),i.style.top=Math.max(0,Math.min(100-(parseInt(i.style.height.slice(0,-1),10)||0),parseInt(i.style.top.slice(0,-1),10)||0))+"%",i.style.left=a+"%"),i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.justifyContent=t.displayAlign=="before"?"flex-start":t.displayAlign=="center"?"center":"flex-end",e.B.set(n,i),n=i}}i=o,r&&(i=document.createElement("span"),i.classList.add("shaka-text-wrapper"),i.style.backgroundColor=t.backgroundColor,i.style.lineHeight="normal",o.appendChild(i)),e.i.set(t,{Ze:o,Fh:i,Bc:n})}function II(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==wc?n:e==="left"||e==="start"&&t===la||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===la?"line-right":"center"}function EI(e,t,n,r,i){var o=t.style,a=n.nestedCues.length==0,f=1<r.length;o.whiteSpace="pre-wrap";var p=n.payload.replace(/\s+$/g,function(m){return" ".repeat(m.length)});if(o.webkitTextStrokeColor=n.textStrokeColor,o.webkitTextStrokeWidth=n.textStrokeWidth,o.color=n.color,o.direction=n.direction,o.opacity=n.opacity,o.paddingLeft=Dv(n.linePadding,n,e.s),o.paddingRight=Dv(n.linePadding,n,e.s),o.textCombineUpright=n.textCombineUpright,o.textShadow=n.textShadow,n.backgroundImage)o.backgroundImage="url('"+n.backgroundImage+"')",o.backgroundRepeat="no-repeat",o.backgroundSize="contain",o.backgroundPosition="center",n.backgroundColor&&(o.backgroundColor=n.backgroundColor),o.width="100%",o.height="100%";else{if(n.nestedCues.length)var g=t;else g=document.createElement("span"),t.appendChild(g);n.border&&(g.style.border=n.border),i||((t=CI(r,function(m){return m.backgroundColor}))?g.style.backgroundColor=t:p&&(g.style.backgroundColor="rgba(0, 0, 0, 0.8)")),p&&(g.textContent=p)}f&&!r[r.length-1].isContainer?o.display="inline":(o.display="flex",o.flexDirection="column",o.alignItems="center",n.textAlign=="left"||n.textAlign=="start"?(o.width="100%",o.alignItems="start"):(n.textAlign=="right"||n.textAlign=="end")&&(o.width="100%",o.alignItems="end"),o.justifyContent=n.displayAlign=="before"?"flex-start":n.displayAlign=="center"?"center":"flex-end"),a||(o.margin="0"),o.fontFamily=n.fontFamily,o.fontWeight=n.fontWeight.toString(),o.fontStyle=n.fontStyle,o.letterSpacing=n.letterSpacing,o.fontSize=Dv(n.fontSize,n,e.s),r=n.line,r!=null&&(a=n.lineInterpretation,a==ll&&(a=1,f=16,e.l&&1>e.l&&(f=32),r=0>r?100+r/f*100:r/f*100),a==1&&(o.position="absolute",n.writingMode==ul?(o.width="100%",n.lineAlign==sl?o.top=r+"%":n.lineAlign=="end"&&(o.bottom=100-r+"%")):n.writingMode=="vertical-lr"?(o.height="100%",n.lineAlign==sl?o.left=r+"%":n.lineAlign=="end"&&(o.right=100-r+"%")):(o.height="100%",n.lineAlign==sl?o.right=r+"%":n.lineAlign=="end"&&(o.left=100-r+"%")))),o.lineHeight=n.lineHeight,e=II(n),e=="line-left"?(o.cssFloat="left",n.position!==null&&(o.position="absolute",n.writingMode==ul?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%")):e=="line-right"?(o.cssFloat="right",n.position!==null&&(o.position="absolute",n.writingMode==ul?(o.right=100-n.position+"%",o.width="auto"):o.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(o.position="absolute",n.writingMode==ul?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%"),o.textAlign=n.textAlign,o.textDecoration=n.textDecoration.join(" "),o.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&o.writingMode==n.writingMode||(o.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==ul?o.width=n.size+"%":o.height=n.size+"%")}function Dv(e,t,n){var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;var i=r.value;switch(r.unit){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return e}}function CI(e,t){for(var n=e.length-1;0<=n;n--){var r=t(e[n]);if(r||r===0)return r}return null}Me("shaka.text.UITextDisplayer",vr),vr.prototype.enableTextDisplayer=vr.prototype.enableTextDisplayer,vr.prototype.setTextLanguage=vr.prototype.setTextLanguage,vr.prototype.setTextVisibility=vr.prototype.setTextVisibility,vr.prototype.isTextVisible=vr.prototype.isTextVisible,vr.prototype.remove=vr.prototype.remove,vr.prototype.destroy=vr.prototype.destroy,vr.prototype.append=vr.prototype.append,vr.prototype.configure=vr.prototype.configure;function kI(e,t){function n(o){for(var a=o,f=I(t),p=f.next();!p.done;p=f.next())p=p.value,p.end&&p.start<o&&(a+=p.end-p.start);return o=Math.floor(a/3600),f=Math.floor(a/60%60),p=Math.floor(a%60),a=Math.floor(1e3*a%1e3),(10>o?"0":"")+o+":"+(10>f?"0":"")+f+":"+(10>p?"0":"")+p+"."+(100>a?10>a?"00":"0":"")+a}var r=Pv(e);e=`WEBVTT
|
||
|
||
`,r=I(r);for(var i=r.next();!i.done;i=r.next())i=i.value,e+=n(i.startTime)+" --> "+n(i.endTime)+function(o){var a=[];switch(o.textAlign){case"left":a.push("align:left");break;case"right":a.push("align:right");break;case Io:a.push("align:middle");break;case"start":a.push("align:start");break;case"end":a.push("align:end")}switch(o.writingMode){case"vertical-lr":a.push("vertical:lr");break;case"vertical-rl":a.push("vertical:rl")}return a.length?" "+a.join(" "):""}(i)+`
|
||
`,e+=i.payload+`
|
||
|
||
`;return e}Me("shaka.text.WebVttGenerator",function(){});function Ov(e,t){this.h=e,this.g=t,this.i=void 0,this.s=!1,this.F=!0,this.l=this.B=!1,this.o=this.m=void 0,this.A=0,this.G=!1,this.C=new At,this.j=null}Ov.prototype.setMediaElement=function(e){this.j=e,RI(this)},Ov.prototype.configure=function(e){this.g=e};function AI(e){e.s=!1,e.F=!0,e.B=!1,e.l=!1,e.m=0,e.o=0,e.A=0,e.G=!1,e.j=null,e.C.La()}function PI(e,t){e.l=t,e.l?e.i==ky?e.i=Ay:e.i==Py&&(e.i=Dy):e.i==Ay?e.i=ky:e.i==Dy&&(e.i=Py)}function DI(e,t){if(e.j){var n=e.j.play();n&&n.then(function(){e.A=t}).catch(function(){e.A=0})}}function OI(e,t,n){try{if(!e.g.enabled)return t;var r=Rv(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var i=xy;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":i=Ey;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":i=S1;break e}i=void 0}r.ot=i,r.su=!0;var o=Ty(r);return bv(t,o)}catch(a){return xi("CMCD_SRC_ERROR","Could not generate src CMCD data.",a),t}}function RI(e){e.C.la(e.j,"play",function(){e.m||(e.m=Date.now())}),e.C.la(e.j,"playing",function(){e.o||(e.o=Date.now())})}function Rv(e){return e.g.sessionId||(e.g.sessionId=T.crypto.randomUUID()),{v:e.g.version,sf:e.i,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.h.getBandwidthEstimate()/1e3}}function xf(e,t,n){n=n===void 0?{}:n;var r=r===void 0?e.g.useHeaders:r;if(e.g.enabled){Object.assign(n,Rv(e)),n.pr=e.h.mb();var i=n.ot===Iy||n.ot===Ey;if(e.B&&i&&(n.bs=!0,n.su=!0,e.B=!1),n.su==null&&(n.su=e.F),n.v===jI&&(e.h.T()&&(n.ltc=e.h.Wd()),i=!e.G&&e.o&&e.m?e.o-(e.A||e.m):void 0,i!=null&&(n.msd=i,e.G=!0)),e=bI(e,n),r)r=_I(e),Object.keys(r).length&&Object.assign(t.headers,r);else{var o=Ty(e);o&&(t.uris=t.uris.map(function(a){return bv(a,o)}))}}}function bI(e,t){var n=e.g.includeKeys;return n.length?Object.keys(t).reduce(function(r,i){return n.includes(i)&&(r[i]=t[i]),r},{}):t}function MI(e){if(e.type===0)return UI;if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?Ey:Iy;if(t=="audio")return xy;if(t=="text")return e.mimeType==="application/mp4"?Cy:Mv}}function LI(e,t){if(t=e.h.Eb()[t],!t.length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?1e3*(e.end-n):NaN}function m1(e,t){if(t=e.h.Eb()[t],!t.length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?1e3*(e.end-n):0}function NI(e,t){var n=e.h.sc();if(!n.length)return NaN;e=n[0],n=I(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.type==="variant"&&r.bandwidth>e.bandwidth&&(e=r);switch(t){case Iy:return e.videoBandwidth||NaN;case xy:return e.audioBandwidth||NaN;default:return e.bandwidth}}function Ty(e){function t(w){return 100*n(w/100)}function n(w){return Math.round(w)}function r(w){return!Number.isNaN(w)&&w!=null&&w!==""&&w!==!1}var i=[],o={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(w){return encodeURIComponent(w)},rtp:t,tb:n},a=Object.keys(e||{}).sort();a=I(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var p=e[f];if(r(p)&&(f!=="v"||p!==1)&&(f!="pr"||p!==1)){var g=o[f];g&&(p=g(p)),g=typeof p;var m=void 0;m=g==="string"&&f!=="ot"&&f!=="sf"&&f!=="st"?f+"="+JSON.stringify(p):g==="boolean"?f:g==="symbol"?f+"="+p.description:f+"="+p,i.push(m)}}return i.join(",")}function _I(e){var t=Object.keys(e),n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};t=I(t);for(var a=t.next();!a.done;a=t.next())a=a.value,i[o[a]!=null?o[a]:1][a]=e[a];for(e=0;e<i.length;e++)(o=Ty(i[e]))&&(n["CMCD-"+r[e]]=o);return n}function bv(e,t){return!t||e.includes("offline:")?e:(e=new hn(e),e.g.set("CMCD",t),e.toString())}var S1="m",xy="a",Iy="v",Ey="av",UI="i",Mv="c",Cy="tt",jI=2,ky="d",Ay="ld",Py="h",Dy="lh";Me("shaka.util.CmcdManager.StreamingFormat",{DASH:ky,Tj:Ay,HLS:Py,Uj:Dy,gk:"s",OTHER:"o"});function so(e){this.h=e,this.g=null}h=so.prototype,h.configure=function(e){this.h=e},h.Lg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(x1)?1e3*this.g.get(x1):null},h.Jg=function(){return this.h.enabled&&this.g&&this.g.has(T1)?1e3*this.g.get(T1):null},h.ri=function(){return this.h.enabled&&this.g&&this.g.has(I1)?this.g.get(I1):null},h.si=function(){return this.h.enabled&&this.g&&this.g.has(E1)?this.g.get(E1):null},h.getBandwidthEstimate=function(e){var t=this.Jg();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e};function w1(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}Me("shaka.util.CmsdManager",so),so.prototype.getBandwidthEstimate=so.prototype.getBandwidthEstimate,so.prototype.getRoundTripTime=so.prototype.si,so.prototype.getResponseDelay=so.prototype.ri,so.prototype.getEstimatedThroughput=so.prototype.Jg,so.prototype.getMaxBitrate=so.prototype.Lg;var T1="etp",x1="mb",I1="rd",E1="rtt";function C1(){this.g=null,this.h=[]}function Lv(e,t){return G(function(n){if(n.g==1)return e.g?_(n,new Promise(function(r){return e.h.push(r)}),2):n.u(2);e.g=t,le(n)})}C1.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function he(e,t,n){t=t===void 0?null:t,xt.call(this);var r=this;this.m=My,this.h=null,this.oe=t,this.na=!1,this.ze=new At,this.vd=new At,this.l=new At,this.Ia=new At,this.Cb=new At,this.G=this.I=this.C=this.F=null,this.Je=0,this.ba=new C1,this.ha=this.Na=this.V=this.i=this.Pa=this.H=this.j=this.dc=this.M=this.pg=this.fa=this.L=this.td=this.O=this.pa=this.K=this.Mb=null,this.sa=!1,this.Ba=this.o=null,this.og=1e9,this.Dd=[],this.ng=-1,this.g=Rl(this),this.Me=Zn(),this.P=null,this.Le=-1,this.Ha=null,this.ga={width:1/0,height:1/0},this.me=new Gc(this.g,this.ga,null),this.re=[],this.A=null,this.$=this.g.adaptationSetCriteriaFactory(),this.$.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,Oc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Gc:this.g.preferredAudioLabel,cd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),this.Lb=this.g.preferredTextLanguage,this.zd=this.g.preferredTextRole,this.xd=this.g.preferForcedSubs,this.wd=[],n&&n(this),this.L=QI(this),this.fa=new so(this.g.cmsd),this.F=b1(this),this.F.ag(this.g.streaming.forceHTTP),this.F.bg(this.g.streaming.forceHTTPS),this.F.o=this.g.streaming.minBytesForProgressEvents,this.Qb=this.da=this.s=null,this.Oe=!1,this.Ne=new st(function(){return G(function(i){if(i.g==1)return r.da?_(i,r.Xb(r.Qb,!0),3):i.u(0);if(i.g!=4)return _(i,r.load(r.da),4);r.Oe?r.Qb.pause():r.Qb.play(),r.da=null,r.Oe=!1,le(i)})}),Ly&&(this.s=Ly(),this.s.configure(this.g.ads),this.Cb.D(this.s,"ad-content-pause-requested",function(i){var o;return G(function(a){if(a.g==1)return r.Ne.stop(),r.da?a.u(0):(r.Qb=r.h,r.Oe=r.Qc(),o=i.saveLivePosition||!1,_(a,r.Cg(!0,o),3));r.da=a.h,le(a)})}),this.Cb.D(this.s,"ad-content-resume-requested",function(i){if(i=i.offset||0,r.da){var o=r.da;o.B&&i&&(o.B+=i)}r.Ne.aa(.1)}),this.Cb.D(this.s,"ad-content-attach-requested",function(){return G(function(i){return r.h||!r.Qb?i.u(0):_(i,r.Xb(r.Qb,!0),0)})})),this.ze.D(T,"online",function(){Kv(r),r.Vf()}),this.pe=new st(function(){for(var i=Date.now()/1e3,o=!1,a=!0,f=I(r.i.variants),p=f.next();!p.done;p=f.next())p=p.value,0<p.disabledUntilTime&&p.disabledUntilTime<=i&&(p.disabledUntilTime=0,o=!0),0<p.disabledUntilTime&&(a=!1);a&&r.pe.stop(),o&&Cf(r,!1,void 0,!1,!1)}),this.za=null,e&&(Rt("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Xb(e,!0)),this.B=null}mt(he,xt);function Oy(e){e.M!=null&&(op(e.M),e.M.release(),e.M=null)}function BI(e,t){t.lcevc.enabled?(Oy(e),e.M==null&&(e.M=new _a(e.h,e.pg,t.lcevc),e.I&&(e.I.da=e.M))):Oy(e)}function tn(e,t){return new Te(e,t)}h=he.prototype,h.destroy=function(){var e=this,t;return G(function(n){switch(n.g){case 1:return e.m==jo?n.return():(Oy(e),t=e.detach(),e.m=jo,_(n,t,2));case 2:return _(n,e.af(),3);case 3:if(e.ze&&(e.ze.release(),e.ze=null),e.vd&&(e.vd.release(),e.vd=null),e.l&&(e.l.release(),e.l=null),e.Ia&&(e.Ia.release(),e.Ia=null),e.Cb&&(e.Cb.release(),e.Cb=null),e.Ba=null,e.g=null,e.A=null,e.oe=null,e.L=null,e.fa=null,!e.F){n.u(4);break}return _(n,e.F.destroy(),5);case 5:e.F=null;case 4:e.o&&(e.o.release(),e.o=null),xt.prototype.release.call(e),le(n)}})};function If(e,t){e.dispatchEvent(tn("onstatechange",new Map().set("state",t)))}h.Xb=function(e,t){t=t===void 0?!0:t;var n=this,r,i,o;return G(function(a){switch(a.g){case 1:if(n.m==jo)throw new Y(2,7,7e3);if(r=n.h&&n.h==e,!n.h||n.h==e){a.u(2);break}return _(a,n.detach(),2);case 2:return _(a,Nv(n,"attach"),4);case 4:if(a.h)return a.return();if(pe(a,5,6),r||(If(n,"attach"),i=function(){var f=Hv(n,!1);f&&kf(n,f)},n.vd.D(e,"error",i),n.h=e,n.L&&n.L.setMediaElement(e)),!t||!Yi()||n.I){a.u(6);break}return _(a,_v(n),6);case 6:Ut(a),n.ba.release(),Ot(a,0);break;case 5:return o=ke(a),_(a,n.detach(),10);case 10:throw o}})},h.Oh=function(e){this.pg=e},h.detach=function(e){e=e===void 0?!1:e;var t=this;return G(function(n){if(n.g==1){if(t.m==jo)throw new Y(2,7,7e3);return _(n,t.kc(!1,e),2)}if(n.g!=3)return _(n,Nv(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.vd.La(),t.h=null),If(t,"detach"),t.s&&!e&&t.s.release()}finally{t.ba.release()}le(n)})};function Nv(e,t){var n;return G(function(r){return r.g==1?(n=++e.Je,_(r,Lv(e.ba,t),2)):n!=e.Je?(e.ba.release(),r.return(!0)):r.return(!1)})}h.kc=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,r,i,o,a,f,p,g,m,w,E;return G(function(C){switch(C.g){case 1:return n.m!=jo&&(n.m=My),_(C,Nv(n,"unload"),2);case 2:return C.h?C.return():(qe(C,3),n.sa=!1,If(n,"unload"),e&&!Yi()&&(e=!1),Oy(n),r=n.wd.map(function(P){return P()}),n.wd=[],_(C,Promise.all(r),5));case 5:if(n.dispatchEvent(tn("unloading")),n.td&&(n.td.release(),n.td=null),n.h&&(n.l.La(),n.Ia.La()),n.pe.stop(),n.Mb&&(n.Mb.release(),n.Mb=null),n.pa&&(n.pa.stop(),n.pa=null),!n.H){C.u(6);break}return _(C,n.H.stop(),7);case 7:n.H=null,n.Pa=null;case 6:if(!n.o){C.u(8);break}return _(C,n.o.stop(),8);case 8:if(!n.j){C.u(10);break}return _(C,n.j.destroy(),11);case 11:n.j=null;case 10:if(n.K&&(n.K.release(),n.K=null),n.G&&(n.G.release(),n.G=null),!Zs("webkit")||!n.C){C.u(12);break}return _(C,n.C.destroy(),13);case 13:n.C=null;case 12:if(!n.I){C.u(14);break}return _(C,n.I.destroy(),15);case 15:n.I=null;case 14:if(n.s&&!t&&n.s.onAssetUnload(),n.da&&!t&&(n.da.destroy(),n.da=null),t||n.Ne.stop(),n.L&&AI(n.L),n.fa&&(n.fa.g=null),!n.B){C.u(16);break}return _(C,n.B.destroy(),17);case 17:n.B=null;case 16:if(n.h&&(oo(n.h),n.h.src&&(n.h.removeAttribute("src"),n.h.load())),!n.C){C.u(18);break}return _(C,n.C.destroy(),19);case 19:n.C=null;case 18:if(n.za&&n.V!=n.za.Nc()&&(n.za.s||n.za.destroy(),n.za=null),n.V=null,n.Na=null,n.O=null,n.i){for(i=I(n.i.variants),o=i.next();!o.done;o=i.next())for(a=o.value,f=I([a.audio,a.video]),p=f.next();!p.done;p=f.next())(g=p.value)&&g.segmentIndex&&g.segmentIndex.release();for(m=I(n.i.textStreams),w=m.next();!w.done;w=m.next())E=w.value,E.segmentIndex&&E.segmentIndex.release()}n.g&&n.g.streaming.clearDecodingCache&&(Mu={},Ys.clear()),n.i=null,n.A=new Sy,n.He=null,n.Ha=null,n.P=null,n.Le=-1,n.Dd=[],n.ng=-1,n.F&&n.F.yg(),Vv(n);case 3:Ut(C),n.ba.release(),Ot(C,4);break;case 4:if(e&&Yi()&&!n.I&&n.h)return _(C,_v(n),0);C.u(0)}})},h.xj=function(e){this.ha=e},h.load=function(e,t,n){t=t===void 0?null:t;var r=this,i,o,a,f,p,g,m,w,E,C,P,L,M;return G(function(B){switch(B.g){case 1:if(r.m==jo)throw new Y(2,7,7e3);return i=null,o="",e instanceof Ol?(i=e,o=i.Nc()||""):o=e||"",_(B,Lv(r.ba,"load"),2);case 2:if(r.ba.release(),!r.h)throw new Y(2,7,7002);if(!r.V){B.u(3);break}return r.V=o,_(B,r.kc(!1),3);case 3:if(a=++r.Je,f=function(){return G(function(U){if(U.g==1)return r.Je==a?U.u(0):i?_(U,i.destroy(),3):U.u(3);throw new Y(2,7,7e3)})},p=function(U,K){return G(function(W){switch(W.g){case 1:return qe(W,2),_(W,Lv(r.ba,K),4);case 4:return _(W,f(),5);case 5:return _(W,U(),6);case 6:return _(W,f(),7);case 7:i&&r.g&&(i.g=r.g);case 2:Ut(W),r.ba.release(),Ot(W,0)}})},pe(B,5,6),t==null&&i&&(t=i.getStartTime()),r.ha=t,r.sa=!1,r.dispatchEvent(tn("loading")),i){n=i.V,B.u(8);break}if(n){B.u(8);break}return _(B,p(function(){return G(function(U){if(U.g==1)return _(U,D1(r,o),2);n=U.h,le(U)})},"guessMimeType_"),8);case 8:if(g=!!i,i){c1(i,r),r.A=i.getStats(),B.u(11);break}return _(B,A1(r,o,t,n,!0),12);case 12:(i=B.h)?(i.A=!1,c1(i,r),r.A=i.getStats(),i.start(),i.m.catch(function(){})):r.A=new Sy;case 11:return m=!i,w=Date.now()/1e3,r.A=i?i.getStats():new Sy,r.V=o,r.Na=n||null,m?_(B,p(function(){return G(function(U){return _(U,HI(r,n),0)})},"initializeSrcEqualsDrmInner_"),21):_(B,p(function(){return G(function(U){if(U.g==1)return _(U,Promise.race([i.fa,i.m]),2);r.Pa=i.G;var K=i;K.ga=!0,r.H=K.j,r.i=i.uf(),le(U)})},"waitForFinish"),15);case 15:if(r.I){B.u(16);break}return _(B,p(function(){return G(function(U){return _(U,_v(r),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return r.i&&r.i.textStreams.length&&(r.B.enableTextDisplayer?r.B.enableTextDisplayer():Rt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),_(B,p(function(){return G(function(U){return _(U,i.m,0)})},"waitForFinish"),18);case 18:return r.g=i.getConfiguration(),r.me=i.F,r.H&&r.H.setMediaElement&&r.h&&r.H.setMediaElement(r.h),r.td=fI(i),r.dc=i.Ba,(E=i.o)&&(r.$=E),g&&r.h&&r.h.nodeName==="AUDIO"&&(VI(r),r.configure("manifest.disableVideo",!0)),r.C=dI(i),_(B,p(function(){return G(function(U){return _(U,r.C.Xb(r.h),0)})},"drmEngine_.attach"),19);case 19:return!(C=i.C)||r.Ba&&r.Ba==C||(r.o=cI(i),r.Ba=i.C,typeof r.o.setMediaElement!="function"&&(Rt("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),r.o.setMediaElement=function(){}),typeof r.o.setCmsdManager!="function"&&(Rt("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),r.o.setCmsdManager=function(){}),typeof r.o.trySuggestStreams!="function"&&(Rt("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),r.o.trySuggestStreams=function(){})),P=pI(i),L=i.ha,_(B,p(function(){return G(function(U){return _(U,KI(r,w,L,P),0)})},"loadInner_"),20);case 20:aI(i),r.Na&&wu()&&Dc(r.Na)&&Ua(r.I,r.V,r.Na),B.u(14);break;case 21:return _(B,p(function(){return G(function(U){return _(U,qI(r,w,n),0)})},"srcEqualsInner_"),14);case 14:r.dispatchEvent(tn("loaded"));case 6:if(Ut(B),!i){B.u(23);break}return _(B,i.destroy(),23);case 23:r.za=null,Ot(B,0);break;case 5:if(M=ke(B),!M||M.code==7e3){B.u(25);break}return _(B,r.kc(!1),25);case 25:throw M}})};function VI(e){for(var t=I(e.i.variants),n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(r){return r.audio})}h.tj=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,r;return G(function(i){return i.g==1?_(i,k1(n),2):i.g!=3?(r=i.h,_(i,n.kc(e,t),3)):i.return(r)})},h.Cg=function(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n=this,r;return G(function(i){return i.g==1?_(i,k1(n,t),2):i.g!=3?(r=i.h,_(i,n.detach(e),3)):i.return(r)})};function k1(e,t){t=t===void 0?!1:t;var n,r;return G(function(i){if(i.g==1)return n=null,e.i&&e.H&&e.Pa&&e.V?(r=e.h.currentTime,e.T()&&!t&&(r=null),_(i,P1(e,e.V,r,e.Na,!0,!1,!1),3)):i.u(2);if(i.g!=2){n=i.h,e.re.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var o=n,a=e.H,f=e.Pa;o.h=e.i,o.j=a,o.G=f,o=n,a=e.Ba,o.i=e.o,o.C=a,n.o=e.$,n.start(),e.i=null,e.H=null,e.Pa=null,e.o=null,e.Ba=null}return i.return(n)})}h.preload=function(e,t,n){t=t===void 0?null:t;var r=this,i;return G(function(o){return o.g==1?_(o,A1(r,e,t,n),2):((i=o.h)?i.start():kf(r,new Y(2,7,7005)),o.return(i))})},h.af=function(){var e=this,t,n,r,i;return G(function(o){for(t=[],n=I(e.re),r=n.next();!r.done;r=n.next())i=r.value,i.s||t.push(i.destroy());return e.re=[],_(o,Promise.all(t),0)})};function A1(e,t,n,r,i){i=i===void 0?!1:i;var o,a,f;return G(function(p){return p.g==1?r?p.u(2):_(p,D1(e,t),3):(p.g!=2&&(r=p.h),FI(e,r)?p.return(null):(o=!1,a=!0,i&&(e.o&&e.Ba==e.g.abrFactory&&(a=!1),e.h&&e.h.nodeName==="AUDIO"&&(o=!0)),f=P1(e,t,n,r||null,!i,o,a),f=i?f.then(function(g){return g.A=!1,g}):f.then(function(g){return e.re.push(g),g}),p.return(f)))})}function P1(e,t,n,r,i,o,a){i=i===void 0?!0:i,o=o===void 0?!1:o,a=a===void 0?!0:a;var f,p,g,m,w,E,C,P,L,M,B,U,K,W;return G(function(X){return X.g==1?(f=null,p=Lr(e.g),o&&(p.manifest.disableVideo=!0),g=function(){return f.P&&f.s?null:f},m=function(){return g()?g().getConfiguration():e.g},e.ga.width!=1/0||e.ga.height!=1/0||e.g.ignoreHardwareResolution?X.u(2):_(X,dc(),3)):(X.g!=2&&(w=X.h,e.ga.width=w.width,e.ga.height=w.height),E=new Gc(p,e.ga,null),C={networkingEngine:e.F,filter:function(q){var F,Q;return G(function(H){if(H.g==1)return _(H,ps(E,q),2);if(H.g!=4)return F=H.h,F?(Q=tn("trackschanged"),_(H,Promise.resolve(),4)):H.u(0);f.dispatchEvent(Q),le(H)})},makeTextStreamsForClosedCaptions:function(q){return tE(e,q)},onTimelineRegionAdded:function(q){var F=f.H;e:{for(var Q=I(F.g),H=Q.next();!H.done;H=Q.next())if(H=H.value,H.schemeIdUri==q.schemeIdUri&&H.id==q.id&&H.startTime==q.startTime&&H.endTime==q.endTime){Q=H;break e}Q=null}Q==null&&(F.g.add(q),q=new Te("regionadd",new Map([["region",q]])),F.dispatchEvent(q))},onEvent:function(q){return f.dispatchEvent(q)},onError:function(q){return f.onError(q)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){e.j&&f.P&&e.j.updateDuration()},newDrmInfo:function(q){var F=f.l,Q=F?F.h:null;Q&&F.A&&hs(E,Q.keySystem,q)},onManifestUpdated:function(){var q=new Map().set("isLive",e.T());f.dispatchEvent(tn("manifestupdated",q)),Pp(f,!1,function(){e.s&&e.s.onManifestUpdated(e.T())})},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},onMetadata:function(q,F,Q,H){var Z=q;q=="com.apple.hls.interstitial"&&(Z="com.apple.quicktime.HLS",q={startTime:F,endTime:Q,values:H},e.s)&&e.s.onHLSInterstitialMetadata(e,e.h,q),H=I(H),q=H.next();for(var $={};!q.done;$={Qf:void 0},q=H.next())$.Qf=q.value,$.Qf.name!="ID"&&Pp(f,!1,function(ue){return function(){Uv(e,F,Q,Z,ue.Qf)}}($))},disableStream:function(q){return e.disableStream(q,e.g.streaming.maxDisabledTime)},addFont:function(q,F){return e.addFont(q,F)}},P=new Ha(function(){return e.$a()}),P.addEventListener("regionadd",function(q){var F=q.region;Mp(e,"timelineregionadded",F,f),Pp(f,!1,function(){e.s&&(e.s.onDashTimedMetadata(F),e.s.onDASHInterstitialMetadata(e,e.h,F))})}),L=null,p.streaming.observeQualityChanges&&(L=new Es(function(){return e.Eb()}),L.addEventListener("qualitychange",function(q){z1(e,q.quality,q.position)}),L.addEventListener("audiotrackchange",function(q){z1(e,q.quality,q.position,!0)})),M=!0,B={Tb:e.F,onError:function(q){return f.onError(q)},ke:function(q){Pp(f,!0,function(){e:{var F=q,Q=tn("keystatuschanged");e.dispatchEvent(Q);var H=Object.keys(F);H.length==1&&H[0]==""&&(H=["00"],F={"00":F[""]}),Q=H.length==1&&H[0]=="00";var Z=!1;if(H.length){H=I(e.i.variants);for(var $=H.next();!$.done;$=H.next()){$=$.value;var ue=[];$.audio&&ue.push($.audio),$.video&&ue.push($.video),ue=I(ue);for(var de=ue.next();!de.done;de=ue.next()){var ie=de.value;if(de=$.allowedByKeySystem,ie.keyIds.size){$.allowedByKeySystem=!0,ie=I(ie.keyIds);for(var ce=ie.next();!ce.done;ce=ie.next())ce=ce.value,((ce=F[Q?"00":ce])||e.C.F)&&($.allowedByKeySystem=$.allowedByKeySystem&&!!ce&&!Wc.includes(ce))}de!=$.allowedByKeySystem&&(Z=!0)}}}if(Z&&(ni(e),!Za(e)))break e;(F=e.j.j)&&!F.allowedByKeySystem&&Cf(e)}})},onExpirationUpdated:function(q,F){var Q=tn("expirationupdated");f.dispatchEvent(Q),(Q=f.j)&&Q.onExpirationUpdated&&Q.onExpirationUpdated(q,F)},onEvent:function(q){f.dispatchEvent(q),q.type=="drmsessionupdate"&&M&&(M=!1,q=Date.now()/1e3-f.sa,(e.A||f.getStats()).j=q,e.M&&op(e.M))}},U=b1(e,g),Qr(e.F,U),K=function(){return e.Ic(B)},W={config:p,Oi:C,Yi:P,Xi:L,Ic:K,Ni:E,networkingEngine:U,Nh:i,Mh:a},f=new Ol(t,r,n,W),X.return(f))})}function D1(e,t){var n,r;return G(function(i){return i.g==1?(n=e.g.manifest.retryParameters,_(i,Ja(t,e.F,n),2)):(r=i.h,r=="application/x-mpegurl"&&So()&&(r="application/vnd.apple.mpegurl"),i.return(r))})}function FI(e,t){if(!Yi())return!0;if(t){if((e.h||bh()).canPlayType(t)=="")return!1;if(!(Yi()&&t in hi))return!0;if(Dc(t))return So()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if(t==="application/dash+xml"||t==="video/vnd.mpeg.dash.mpd")return e.g.streaming.preferNativeDash}return!1}function O1(e){var t=e.g.textDisplayFactory;t!==e.He&&(e.B=t(),e.B.configure?e.B.configure(e.g.textDisplayer):Rt("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.He=t,e.B.setTextVisibility(e.na))}function _v(e){var t,n,r;return G(function(i){if(i.g==1)return If(e,"media-source"),e.h.removeAttribute("src"),oo(e.h),O1(e),t=JI(e.h,e.B,{ji:function(){return e.keySystem()},onMetadata:function(o,a,f){o=I(o);for(var p=o.next();!p.done;p=o.next())if(p=p.value,p.data&&typeof p.cueTime=="number"&&p.frames){var g=p.cueTime+a,m=f;m&&g>m&&(m=g);for(var w=I(p.frames),E=w.next();!E.done;E=w.next())Uv(e,g,m,"org.id3",E.value);e.s&&e.s.onHlsTimedMetadata(p,g)}},onEvent:function(o){return e.dispatchEvent(o)},Ui:function(){e.H&&e.H.update&&e.H.update()}},e.M),t.configure(e.g.mediaSource),n=e.g.manifest,r=n.segmentRelativeVttTiming,t.Ca=r,_(i,t.G,2);e.I=t,le(i)})}function R1(e,t,n){function r(){return Fv(e)}e.l.D(t,"playing",r),e.l.D(t,"pause",r),e.l.D(t,"ended",r),e.l.D(t,"ratechange",function(){var i=e.h.playbackRate;i!=0&&(e.K&&e.K.set(i),i=tn("ratechange"),e.dispatchEvent(i))}),t.remote&&(e.l.D(t.remote,"connect",function(){return ni(e)}),e.l.D(t.remote,"connecting",function(){return ni(e)}),e.l.D(t.remote,"disconnect",function(){return G(function(i){if(i.g==1)return e.j&&t.remote.state=="disconnected"?_(i,c(e.j),2):i.u(2);ni(e),le(i)})})),t.audioTracks&&(e.l.D(t.audioTracks,"addtrack",function(){return ni(e)}),e.l.D(t.audioTracks,"removetrack",function(){return ni(e)}),e.l.D(t.audioTracks,"change",function(){return ni(e)})),t.textTracks&&(e.l.D(t.textTracks,"addtrack",function(i){if(i.track)switch(i=i.track,i.kind){case"metadata":WI(e,i);break;case"chapters":XI(e,i);break;default:ni(e)}}),e.l.D(t.textTracks,"removetrack",function(){return ni(e)}),e.l.D(t.textTracks,"change",function(){return ni(e)})),t.preload!="none"&&e.l.la(t,"loadedmetadata",function(){e.A.C=Date.now()/1e3-n})}function KI(e,t,n,r){var i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q;return G(function(H){switch(H.g){case 1:If(e,"load"),i=e.h,e.K=new Br({Xd:function(){return i.playbackRate},qc:function(){return i.defaultPlaybackRate},cg:function(Z){i.playbackRate=Z},Yg:function(Z){i.currentTime+=Z}}),R1(e,i,t),BI(e,e.g),e.Lb=e.g.preferredTextLanguage,e.zd=e.g.preferredTextRole,e.xd=e.g.preferForcedSubs,qv(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.o.init(function(Z,$,ue){e.i&&e.j&&Z!=e.j.j&&Rp(e,Z,!0,$===void 0?!1:$,ue===void 0?0:ue)}),e.o.setMediaElement(i),e.o.setCmsdManager(e.fa),e.j=ZI(e),e.j.configure(e.g.streaming),e.m=Vr,e.dispatchEvent(tn("streaming")),o=n;case 2:for((f=e.j.j)||o||(o=Za(e)?e.o.chooseVariant():null),p=[],a=f||o,g=I([a.video,a.audio]),m=g.next();!m.done;m=g.next())(w=m.value)&&!w.segmentIndex&&p.push(w.createSegmentIndex());if(!(0<p.length)){H.u(4);break}return _(H,Promise.all(p),4);case 4:if(!a||a.disabledUntilTime!=0){H.u(2);break}if(e.H&&e.H.onInitialVariantChosen&&e.H.onInitialVariantChosen(a),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Me):ft("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),e.L&&(PI(e.L,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),DI(e.L,1e3*t)),qv(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),ji(e.j,e.g.playRangeStart,e.g.playRangeEnd),E=function(Z){e.G=YI(e,Z),e.Mb=$I(e,Z),M1(e,i,e.g.streaming.rebufferingGoal)},e.g.streaming.startAtSegmentBoundary||(C=e.ha,C==null&&e.i.startTime&&(C=e.i.startTime),E(C)),f){H.u(7);break}if(!e.g.streaming.startAtSegmentBoundary){H.u(8);break}return P=e.i.presentationTimeline,L=e.ha||e.h.currentTime,e.ha==null&&e.i.startTime&&(L=e.i.startTime),M=P.Ob(),B=P.wb(),L<M?L=M:L>B&&(L=B),_(H,nE(o,L),9);case 9:U=H.h,E(U);case 8:Rp(e,o,!0,!1,0);case 7:return e.G.ready(),K=e.rc().find(function(Z){return Z.active}),K||((W=un(e.i.textStreams,e.Lb,e.zd,e.xd)[0]||null)&&kv(e.A.h,W,!0),o&&(W?(rE(e,o.audio,W)&&(e.na=!0),e.na&&e.B.setTextVisibility(!0),H1(e)):e.na=!1),W&&(e.g.streaming.alwaysStreamText||e.Df())&&(Uo(e.j,W),bp(e))),_(H,e.j.start(r),10);case 10:e.g.abr.enabled&&(e.o.enable(),q1(e)),ni(e),Za(e),e.i.variants.some(function(Z){return Z.primary}),((X=e.T())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(q=function(){return V1(e)},e.l.D(i,"timeupdate",q)),X||(F=function(){return Ry(e)},e.l.D(i,"timeupdate",F),Ry(e),e.i.nextUrl&&(0<e.g.streaming.preloadNextUrlWindow&&(Q=function(){var Z;return G(function($){if($.g==1)return Z=e.$a().end-e.h.currentTime,isNaN(Z)||!(Z<=e.g.streaming.preloadNextUrlWindow)?$.u(0):(e.l.bb(i,"timeupdate",Q),_($,e.preload(e.i.nextUrl),4));e.za=$.h,le($)})},e.l.D(i,"timeupdate",Q)),e.l.D(i,"ended",function(){e.load(e.za||e.i.nextUrl)}))),e.s&&e.s.onManifestUpdated(X),e.sa=!0,le(H)}})}function HI(e,t){var n,r,i,o,a;return G(function(f){return f.g==1?(n=an,r=Date.now()/1e3,i=!0,e.C=e.Ic({Tb:e.F,onError:function(p){kf(e,p)},ke:function(){},onExpirationUpdated:function(){var p=tn("expirationupdated");e.dispatchEvent(p)},onEvent:function(p){e.dispatchEvent(p),p.type=="drmsessionupdate"&&i&&(i=!1,e.A.j=Date.now()/1e3-r)}}),e.C.configure(e.g.drm),o={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:t?Ir(t):"",codecs:t?Er(t):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.oa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1},a.fullMimeTypes.add(yn(a.mimeType,a.codecs)),t.startsWith("audio/")?(a.type=n.W,o.audio=a):o.video=a,e.C.da=!0,_(f,uu(e.C,[o],[]),2)):_(f,e.C.Xb(e.h),0)})}function qI(e,t,n){var r,i,o,a,f,p,g,m,w,E,C,P;return G(function(L){switch(L.g){case 1:if(If(e,"src-equals"),r=e.h,e.G=new af(r),i=!1,e.wd.push(function(){i=!0}),e.ha!=null&&e.G.Qe(e.ha),e.K=new Br({Xd:function(){return r.playbackRate},qc:function(){return r.defaultPlaybackRate},cg:function(M){r.playbackRate=M},Yg:function(M){r.currentTime+=M}}),o=e.g.streaming.rebufferingGoal,M1(e,r,o),r.textTracks&&(O1(e),a=function(){var M=Ef(e).find(function(B){return B.mode!=="disabled"});M&&(M.mode="showing")},f=function(){var M=Ef(e).find(function(B){return B.mode!=="disabled"});M&&(M.mode="hidden")},e.l.D(r,"enterpictureinpicture",function(){return a()}),e.l.D(r,"leavepictureinpicture",function(){return f()}),r.remote?(e.l.D(r.remote,"connect",function(){return f()}),e.l.D(r.remote,"connecting",function(){return f()}),e.l.D(r.remote,"disconnect",function(){return f()})):"webkitCurrentPlaybackTargetIsWireless"in r&&e.l.D(r,"webkitcurrentplaybacktargetiswirelesschanged",function(){return f()}),p=r,p.webkitSupportsFullscreen&&e.l.D(p,"webkitpresentationmodechanged",function(){p.webkitPresentationMode!="inline"?a():f()})),R1(e,r,t),g=OI(e.L,e.V,n),!g.includes("#t=")&&(0<e.g.playRangeStart||isFinite(e.g.playRangeEnd))&&(g+="#t=",0<e.g.playRangeStart&&(g+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(g+=","+e.g.playRangeEnd)),!e.I){L.u(2);break}return _(L,e.I.destroy(),3);case 3:e.I=null;case 2:return oo(r),r.src=g,(Mr()||Wr())&&r.load(),r.preload!="none"&&!r.autoplay&&Dc(n)&&wu()&&r.load(),e.m=vi,e.dispatchEvent(tn("streaming")),m=new Nt,Ui(r,HTMLMediaElement.HAVE_METADATA,e.l,function(){e.G.ready(),m.resolve()}),Ui(r,HTMLMediaElement.HAVE_CURRENT_DATA,e.l,function(){var M,B,U,K,W;return G(function(X){if(X.g==1)return zI(e),M=Ef(e),M.find(function(q){return q.mode!="disabled"})?(0<M.length&&(e.na=!0,e.B.setTextVisibility(!0)),X.u(2)):_(X,new Promise(function(q){e.l.la(r.textTracks,"change",q),new st(q).aa(1)}),2);if(i)return X.return();for(Ef(e).length&&(e.B.enableTextDisplayer?e.B.enableTextDisplayer():Rt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),B=!1,U=I(M),K=U.next();!K.done;K=U.next())W=K.value,W.mode!=="disabled"&&(B?(W.mode="disabled",ft("Found more than one enabled text track, disabling it",W)):(_1(e,W),B=!0));GI(e),le(X)})}),r.error?m.reject(Hv(e)):r.preload=="none"&&(ft('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),m.resolve()),e.l.la(r,"error",function(){m.reject(Hv(e))}),_(L,Jo(e.g.streaming.loadTimeout,m),4);case 4:((w=e.T())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(E=function(){return V1(e)},e.l.D(r,"timeupdate",E)),w||(C=function(){return Ry(e)},e.l.D(r,"timeupdate",C),Ry(e)),e.s&&(e.s.onManifestUpdated(w),w&&(P=e.$a().end,e.l.D(r,"progress",function(){var M=e.$a().end;P!=M&&(e.s.onManifestUpdated(e.T()),P=M)}))),e.sa=!0,le(L)}})}function zI(e){var t=e.g.preferredAudioLanguage;t!=""&&e.lh(t,e.g.preferredVariantRole)}function GI(e){var t=e.g.preferredTextLanguage;t!=""&&e.Xf(t,e.g.preferredTextRole,e.g.preferForcedSubs)}function WI(e,t){if(t.kind=="metadata"){t.mode="hidden",e.l.D(t,"cuechange",function(){if(t.activeCues)for(var r=I(t.activeCues),i=r.next();!i.done;i=r.next())i=i.value,Uv(e,i.startTime,i.endTime,i.type,i.value),e.s&&e.s.onCueMetadataChange(i.value);if(t.cues){r=[],i=I(t.cues);for(var o=i.next(),a={};!o.done;a={Zb:void 0},o=i.next())a.Zb=o.value,a.Zb.type=="com.apple.quicktime.HLS"&&a.Zb.startTime!=null&&(o=r.find(function(f){return function(p){return p.startTime==f.Zb.startTime&&p.endTime==f.Zb.endTime}}(a)),o||(o={startTime:a.Zb.startTime,endTime:a.Zb.endTime,values:[]},r.push(o)),o.values.push(a.Zb.value));for(r=I(r),i=r.next();!i.done;i=r.next())i=i.value,i.values.some(function(f){return f.key=="X-ASSET-URI"||f.key=="X-ASSET-LIST"})&&e.s&&(i.values.push({key:"CUE",description:"",data:i.startTime!=0||e.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.s.onHLSInterstitialMetadata(e,e.h,i))}});var n=new st(function(){var r=eE(e);r=I(r);for(var i=r.next();!i.done;i=r.next())i.value.mode="hidden"}).Hb().aa(.5);e.wd.push(function(){n.stop()})}}function Uv(e,t,n,r,i){t=new Map().set("startTime",t).set("endTime",n).set("metadataType",r).set("payload",i),e.dispatchEvent(tn("metadata",t))}function XI(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new st(function(){t.mode="hidden"}).Hb().aa(.5);e.wd.push(function(){n.stop()})}}h.bj=function(){for(var e=this.ba;e.g;)e.release()},h.Ic=function(e){return new ls(e)};function b1(e,t){function n(i){t()?t().dispatchEvent(i):e.dispatchEvent(i)}function r(i){t()?Pp(t(),!0,i):i()}return t||(t=function(){return null}),new Bt(function(i,o,a,f){var p=t()?t().i:e.o;p&&p.segmentDownloaded(i,o,a,f)},function(i,o,a){o=new Map().set("headers",i).set("request",o).set("requestType",a),n(tn("downloadheadersreceived",o)),r(function(){if(e.fa){var f=e.fa;if(f.h.enabled){var p=i["cmsd-static"];if(p)try{var g=new Map,m=p.split(",");for(p=0;p<m.length;p++){var w=m[p].split("=");g.set(w[0],w1(w[1]))}}catch{}if(g=i["cmsd-dynamic"]){try{var E=new Map,C=g.split(";");for(g=1;g<C.length;g++){var P=C[g].split("=");E.set(P[0],w1(P[1]))}var L=E}catch{L=null}L&&(f.g=L)}}}})},function(i,o){i=new Map().set("request",i).set("response",o),n(tn("downloadcompleted",i))},function(i,o,a,f){i=new Map().set("request",i).set("error",o).set("httpResponseCode",a).set("aborted",f),n(tn("downloadfailed",i))},function(i,o,a){r(function(){var f=e.L,p=a;if(p=p===void 0?{}:p,f.g.enabled)if(o.method==="HEAD")xf(f,o);else switch(i){case 0:try{if(f.g.enabled){if(p.type){e:{switch(p.type){case 4:var g=f.l?Ay:ky;break e;case 3:case 2:g=f.l?Dy:Py;break e;case 5:g="s";break e}g=void 0}f.i=g}xf(f,o,{ot:S1,su:!f.s})}}catch(ie){xi("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",ie)}break;case _r:try{if(f.g.enabled){var m=p.segment;g=0,m&&(g=m.endTime-m.startTime);var w={d:1e3*g,st:f.h.T()?"l":"v"};w.ot=MI(p);var E=w.ot===Iy||w.ot===xy||w.ot===Ey||w.ot===Cy,C=p.stream;if(C){var P=f.h.mb();if(E&&(w.bl=LI(f,C.type),w.ot!==Cy)){var L=m1(f,C.type);w.dl=P?L/Math.abs(P):L}if(C.bandwidth&&(w.br=C.bandwidth/1e3),C.segmentIndex&&m){var M=C.segmentIndex.Nb(m.endTime,!0,0>P);if(M){var B=M.next().value;if(B&&B!=m){if(!Gs(m.N(),B.N())){var U=B.N()[0],K=o.uris[0],W=new URL(U),X=new URL(K);if(W.origin!==X.origin)var q=U;else{for(var F=W.pathname.split("/").slice(1),Q=X.pathname.split("/").slice(1,-1);F[0]===Q[0];)F.shift(),Q.shift();for(;Q.length;)Q.shift(),F.unshift("..");q=F.join("/")}w.nor=q}if((B.Ma||B.va)&&(m.Ma!=B.Ma||m.va!=B.va)){var H=B.Ma+"-";B.va&&(H+=B.va),w.nrr=H}}}var Z=f.h.mb()||1,$=m1(f,C.type)||500,ue=C.bandwidth,de=ue?ue*(m.endTime-m.startTime)/1e3/($/Z/1e3)*f.g.rtpSafetyFactor:NaN;isNaN(de)||(w.rtp=de)}}E&&w.ot!==Cy&&(w.tb=NI(f,w.ot)/1e3),xf(f,o,w)}}catch(ie){xi("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",ie)}break;case 2:case 5:case 6:xf(f,o,{ot:"k"});break;case 4:xf(f,o,{ot:"o"})}})},function(i,o,a,f){(i=t()?t().j:e.H)&&i.banLocation&&i.banLocation(f)},function(i,o){if(o.data){o=o.data.byteLength;var a=t()?t().getStats():e.A;a&&(a.mc=isNaN(a.mc)?o:a.mc+o,i===0&&(a.Ug=o))}})}function YI(e,t){return new pu(e.h,e.i,e.g.streaming,t,function(){e.Mb&&cf(e.Mb,!0),e.j&&e.j.$c(),e.O&&As(e)},function(n){return e.dispatchEvent(n)})}function $I(e,t){t=new wy(e.td,e.T()||0<t),t.addEventListener("enter",function(r){Mp(e,"timelineregionenter",r.region)}),t.addEventListener("exit",function(r){Mp(e,"timelineregionexit",r.region)}),t.addEventListener("skip",function(r){var i=r.region;r.seeking||(Mp(e,"timelineregionenter",i),Mp(e,"timelineregionexit",i))});var n=new pp(e.h);return n.g.add(t),e.dc&&n.g.add(e.dc),n}function M1(e,t,n){e.O=new $h,e.O.g=Sl,zd(e.O,n,Math.min(.5,n/2)),Vv(e),e.pa=new st(function(){As(e)}),e.g.streaming.rebufferingGoal&&e.pa.Aa(.25),e.l.D(t,"waiting",function(){return As(e)}),e.l.D(t,"stalled",function(){return As(e)}),e.l.D(t,"canplaythrough",function(){return As(e)}),e.l.D(t,"progress",function(){return As(e)}),e.l.D(t,"seeked",function(){return As(e)})}function As(e){switch(e.m){case vi:if(e.Qc())var t=!0;else{var n=Xc(e.h.buffered);t=n!=null&&n>=e.h.duration-1}break;case Vr:e:if(e.Qc()||wl(e.I))t=!0;else{if(e.i.presentationTimeline.T()){n=e.i.presentationTimeline.ac();var r=Xc(e.h.buffered);if(r!=null&&r>=n){t=!0;break e}}t=!1}break;default:t=!1}r=ey(e.h.buffered,e.h.currentTime),n=e.O;var i=t,o=n.i.get(n.g);t=n.g,r=i||r>=o&&0<r?ds:Sl,n.g=r,(t=t!=r)&&r===ds&&(n.h=Date.now()),t&&Vv(e)}function JI(e,t,n,r){return new up(e,t,n,r)}function QI(e){return new Ov({getBandwidthEstimate:function(){return e.o?e.o.getBandwidthEstimate():NaN},Eb:function(){return e.Eb()},getCurrentTime:function(){return e.h?e.h.currentTime:0},mb:function(){return e.mb()},vb:function(){return e.vb()},sc:function(){return e.sc()},T:function(){return e.T()},Wd:function(){return e.Wd()}},e.g.cmcd)}function ZI(e){return new wp(e.i,{md:function(){return e.G?e.G.Kd():0},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},mb:function(){return e.mb()},Z:e.I,Tb:e.F,onError:function(t){return kf(e,t)},onEvent:function(t){return e.dispatchEvent(t)},Mf:function(t,n){var r=t.startTime;t=t.endTime;var i=n.type;if(n=n.codecs.includes(","),i!=at){if(e.G){e.G.Zg();var o=Fu(e.I,i);!e.T()&&e.h.paused&&o!=null&&0<o&&e.G.Kd()<o&&e.G.Qe(o)}As(e)}r=new Map().set("start",r).set("end",t).set("contentType",i).set("isMuxed",n),e.dispatchEvent(tn("segmentappended",r))},Ti:function(t,n){(n=n.Tc)&&e.dc&&Hu(e.dc,n,t)},wg:function(t,n){var r=e.C;if(r.g.parseInbandPsshEnabled&&!r.F&&["audio","video"].includes(t)){t=new ro(Ze(n)),n=0;for(var i=I(t.data),o=i.next();!o.done;o=i.next())n+=o.value.length;if(n==0)r=Promise.resolve();else{for(n=new Uint8Array(n),i=0,t=I(t.data),o=t.next();!o.done;o=t.next())o=o.value,n.set(o,i),i+=o.length;lu(r,"cenc",n),r=r.m}}else r=Promise.resolve();return r},disableStream:function(t,n){return e.disableStream(t,n)}})}h.configure=function(e,t){if(arguments.length==2&&typeof e=="string"&&(e=R(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(Rt("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(Rt("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming&&(Rt("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&So(),delete e.streaming.useNativeHlsOnSafari),e.streaming&&typeof e.streaming.liveSync=="boolean"){Rt("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var n=e.streaming.liveSync;e.streaming.liveSync={},e.streaming.liveSync.enabled=n}if(e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){n=e.streaming.liveSyncMinLatency||0;var r=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+r,e.streaming.liveSync.targetLatencyTolerance=r}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(Rt("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(Rt("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(Rt("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(Rt("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(Rt("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(Rt("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(Rt("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(Rt("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){Rt("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var i=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return i},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(Rt("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(Rt("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(Rt("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(Rt("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(Rt("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.drm&&e.drm.advanced){n=!1;for(var o in e.drm.advanced){var a=e.drm.advanced[o];r=a.videoRobustness,a=a.audioRobustness,"videoRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].videoRobustness)&&(e.drm.advanced[o].videoRobustness=[r],n=!0),"audioRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].audioRobustness)&&(e.drm.advanced[o].audioRobustness=[a],n=!0)}n&&Rt("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return o=_t(this.g,e,Rl(this)),L1(this),o},h.Vh=function(e){this.Me=e};function L1(e){if(e.me=new Gc(e.g,e.ga,e.C),e.H){var t=Lr(e.g.manifest);e.h&&e.h.nodeName==="AUDIO"&&(t.disableVideo=!0),e.H.configure(t)}if(e.C&&e.C.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.m!=jo&&Oa(e.me,e.i)&&ni(e)}catch(i){kf(e,i)}e.o&&Za(e),t=e.j.j,!t||t.allowedByApplication&&t.allowedByKeySystem||Cf(e)}if(e.F&&(e.F.ag(e.g.streaming.forceHTTP),e.F.bg(e.g.streaming.forceHTTPS),e.F.o=e.g.streaming.minBytesForProgressEvents),e.I&&(e.I.configure(e.g.mediaSource),e.I.Ca=e.g.manifest.segmentRelativeVttTiming),e.B)if(t=e.g.textDisplayFactory,e.He!=t){var n=e.B;if(e.B=t(),e.B.configure?e.B.configure(e.g.textDisplayer):Rt("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.B.setTextLanguage||Rt("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),e.B.setTextVisibility(n.isTextVisible()),n.destroy(),e.I){n=e.I;var r=e.B;n.fa=r,n.h&&(n.h.j=r)}e.He=t,e.j&&(t=e.j,(n=t.i.get(at))&&qu(t,n.stream,!0,0,!0))}else e.B.configure&&e.B.configure(e.g.textDisplayer);e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),q1(e)),e.O&&(t=e.g.streaming.rebufferingGoal,zd(e.O,t,Math.min(.5,t/2))),e.pa&&(e.g.streaming.rebufferingGoal?e.pa.Aa(.25):e.pa.stop()),e.i&&qv(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.s&&e.s.configure(e.g.ads),e.L&&e.L.configure(e.g.cmcd),e.fa&&e.fa.configure(e.g.cmsd)}h.getConfiguration=function(){var e=Rl(this);return _t(e,this.g,Rl(this)),e},h.ci=function(){return this.Me},h.Mg=function(){var e=Rl(this);return _t(e,this.g,Rl(this)),J(this.g,Rl(this))},h.Hg=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(t=Math.min(this.h.currentTime+t,this.$a().end),e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},h.fj=function(){for(var e in this.g)delete this.g[e];_t(this.g,Rl(this),Rl(this)),L1(this)},h.Kg=function(){return this.m},h.vf=function(){return this.i?this.i.type:null},h.ni=function(){return this.h},h.vb=function(){return this.F},h.Nc=function(){return this.V},h.Gg=function(){return this.s?this.s:null},h.T=function(){return this.i&&!this.Ka()?this.i.presentationTimeline.T():this.h&&this.h.src?this.h.duration==1/0:!1},h.vc=function(){return this.i?this.i.presentationTimeline.vc():!1},h.Ei=function(){if(this.i&&!this.Ka()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},h.$a=function(){if(this.i&&!this.Ka()){if(!this.sa&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Ob(),end:e.wb()}}if(this.h&&this.h.src&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return e=Math.min(e.end(e.length-1),n),{start:t,end:e}}return{start:0,end:0}},h.Bi=function(){this.T()&&(this.h.currentTime=this.$a().end)},h.Fi=function(){return this.sa},h.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},h.drmInfo=function(){return this.C?this.C.h:null},h.ld=function(){return this.C?this.C.ld():1/0},h.tf=function(){return this.C?this.C.tf():[]},h.Vd=function(){return this.C?this.C.Vd():{}},h.Cf=function(){return this.O?this.O.g==Sl:!1},h.mb=function(){return this.h?this.K?this.K.i:1:0},h.Id=function(e,t){var n=this;t=t===void 0?!0:t,e==0?ft("A trick play rate of 0 is unsupported!"):(this.Ia.La(),this.K.set(e),this.m==Vr&&(this.o.playbackRateChanged(e),_o(this.j,t&&1<Math.abs(e))),this.T()&&this.Ia.D(this.h,"timeupdate",function(){var r=n.h.currentTime,i=n.$a(),o=n.g.streaming.safeSeekOffset;0<e?Math.floor(r)>=Math.floor(i.end)&&n.dd():Math.floor(r)<=Math.floor(i.start+o)&&n.dd()}))},h.dd=function(){var e=this.K.qc();this.m==vi&&this.K.set(e),this.m==Vr&&(this.K.set(e),this.o.playbackRateChanged(e),_o(this.j,!1)),this.Ia.La()},h.sc=function(){if(this.i&&!this.Ka()){for(var e=this.j?this.j.j:null,t=[],n=0,r=I(this.i.variants),i=r.next();!i.done;i=r.next())if(i=i.value,Pi(i)){var o=rs(i);o.active=i==e,o.active||n==1||e==null||i.video!=e.video||i.audio!=e.audio||(o.active=!0),o.active&&n++,t.push(o)}return t}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(a){return va(a)}):[]},h.rc=function(){if(this.i&&!this.Ka()){for(var e=this.j?this.j.s:null,t=[],n=I(this.i.textStreams),r=n.next();!r.done;r=n.next()){r=r.value;var i=Co(r);i.active=r==e,t.push(i)}return t}return this.h&&this.h.src&&this.h.textTracks?Ef(this).map(function(o){return ga(o)}):[]},h.hi=function(){var e=this.Dd;return this.i&&(e=this.i.imageStreams),e.map(function(t){return pl(t)})},h.Yh=function(e){var t=this,n,r,i,o;return G(function(a){return a.g==1?t.m!=Vr&&t.m!=vi?a.return(null):(n=t.Dd,t.i&&(n=t.i.imageStreams),(r=n.find(function(f){return f.id==e}))?r.segmentIndex?a.u(2):_(a,r.createSegmentIndex(),2):a.return(null)):a.g!=4?(i=[],r.segmentIndex.Db(function(f){var p=N1(f.tilesLayout||r.tilesLayout);if(p){p=p.rows*p.nc;for(var g=f.j-f.startTime,m=0;m<p;m++)i.push(t.Og(e,f.startTime+g*m/p))}}),_(a,Promise.all(i),4)):(o=a.h,a.return(o.filter(function(f){return f})))})};function N1(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{nc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}h.Og=function(e,t){var n=this,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W;return G(function(X){return X.g==1?n.m!=Vr&&n.m!=vi?X.return(null):(r=n.Dd,n.i&&(r=n.i.imageStreams),(i=r.find(function(q){return q.id==e}))?i.segmentIndex?X.u(2):_(X,i.createSegmentIndex(),2):X.return(null)):(o=i.segmentIndex.find(t),o==null||(a=i.segmentIndex.get(o),f=N1(a.tilesLayout||i.tilesLayout),!f)?X.return(null):(p=i.width||0,g=i.height||0,m=p/f.nc,w=g/f.rows,E=f.nc*f.rows,C=a.j-a.startTime,P=a.A||C/E,L=a.startTime,B=M=0,1<E&&(U=Math.floor((t-a.startTime)/P),L=a.startTime+U*P,M=U%f.nc*m,B=Math.floor(U/f.nc)*w),K=!1,(W=a.thumbnailSprite)&&(K=!0,w=W.height,M=W.positionX,B=W.positionY,m=W.width),X.return({segment:a,imageHeight:g,imageWidth:p,height:w,positionX:M,positionY:B,startTime:L,duration:P,uris:a.N(),width:m,sprite:K})))})},h.mh=function(e){function t(){var r=n.i.textStreams.find(function(i){return i.id==e.id});r&&r!=n.j.s&&(kv(n.A.h,r,!1),Uo(n.j,r),by(n),bp(n),n.Lb=r.language)}var n=this;this.i&&this.G&&(t(),!this.Ka())||function(){if(n.h&&n.h.textTracks){var r=Ef(n),i=r.find(function(o){return o.mode!=="disabled"});(r=r.find(function(o){return bu(o)===e.id}))&&(i!==r&&(i&&(i.mode="disabled",n.l.bb(i,"cuechange"),n.B.remove(0,1/0)),r&&_1(n,r)),by(n),bp(n))}}()};function _1(e,t){e.l.D(t,"cuechange",function(){e.B.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n=Array.from(t.activeCues||[]).map(wI).filter(to);e.B.append(n)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}h.Yf=function(e,t,n){function r(){var o=i.i.variants.find(function(f){return f.id==e.id});if(o&&Pi(o)){var a=i.j.j;i.g.abr.enabled&&(a.video!=o.video||a.audio&&o.audio&&a.audio.language==o.audio.language&&a.audio.channelsCount==o.audio.channelsCount)&&ft("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.Ka()?Rp(i,o,!1,!1,0):Rp(i,o,!1,t||!1,n||0),i.$=new zc(o,i.g.mediaSource.codecSwitchingStrategy,i.g.adaptationSetCriteriaFactory),Za(i)}}var i=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.G&&(r(),!this.Ka()))&&function(){if(i.h&&i.h.audioTracks){var o=Array.from(i.h.audioTracks);o=I(o);for(var a=o.next();!a.done;a=o.next())if(a=a.value,bu(a)==e.id){F1(i,a);break}}}()},h.$h=function(){return W1(this.sc())},h.ui=function(){return W1(this.rc())},h.Zh=function(){return Array.from(G1(this.sc()))},h.ti=function(){return Array.from(G1(this.rc()))},h.lh=function(e,t,n,r,i,o){function a(){function p(C,P){return C.video||P.video?C.video&&P.video?Math.abs((C.video.height||0)-(P.video.height||0))+Math.abs((C.video.width||0)-(P.video.width||0)):1/0:0}f.$=f.g.adaptationSetCriteriaFactory(),f.$.configure({language:e,role:t||"",channelCount:n||0,Oc:"",spatialAudio:o||!1,videoLayout:"",Gc:"",cd:"",codecSwitchingStrategy:f.g.mediaSource.codecSwitchingStrategy,audioCodec:i||""});var g=f.j.j,m=f.$.create(f.i.variants),w=null;m=I(m.values());for(var E=m.next();!E.done;E=m.next())E=E.value,Pi(E)&&(!w||p(w,g)>p(E,g))&&(w=E);w!=g&&(w?(g=rs(w),f.Yf(g,!0,r||0)):Cf(f))}var f=this;n=n===void 0?0:n,r=r===void 0?0:r,i=i===void 0?"":i,o=o===void 0?!1:o,!(this.i&&this.G&&(a(),!this.Ka()))&&function(){if(f.h&&f.h.audioTracks){var p=un(f.sc(),e,t||"",!1)[0];p&&f.Yf(p)}}()},h.Xf=function(e,t,n){function r(){i.Lb=e,i.zd=t||"",i.xd=n||!1;var o=un(i.i.textStreams,i.Lb,i.zd,i.xd)[0]||null;o&&o!=i.j.s&&(kv(i.A.h,o,!1),i.g.streaming.alwaysStreamText||i.Df())&&(Uo(i.j,o),by(i),bp(i))}var i=this;n=n===void 0?!1:n,!(this.i&&this.G&&(r(),!this.Ka()))&&function(){var o=un(i.rc(),e,t||"",n||!1)[0];o&&i.mh(o)}()},h.kj=function(e,t,n){function r(){for(var o=null,a=I(i.i.variants),f=a.next();!f.done;f=a.next())if(f=f.value,f.audio.label==e){o=f;break}o!=null&&(i.$=i.g.adaptationSetCriteriaFactory(),i.$.configure({language:o.language,role:"",channelCount:0,Oc:"",spatialAudio:!1,videoLayout:"",label:e,cd:"",Gc:"",codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),Cf(i,t,n))}var i=this;t=t===void 0?!0:t,n=n===void 0?0:n,!(this.i&&this.G&&(r(),!this.Ka()))&&function(){if(i.h&&i.h.audioTracks){var o=Array.from(i.h.audioTracks),a=null;o=I(o);for(var f=o.next();!f.done;f=o.next())f=f.value,f.label==e&&(a=f);a&&F1(i,a)}}()},h.Df=function(){var e=this.na;return this.B?this.B.isTextVisible():e},h.Ig=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?U1(this).map(function(e){return ga(e)}):[]},h.bi=function(e){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var t=Et(e),n=U1(this).filter(function(f){return Et(f.language)==t});if(!n||!n.length)return[];e=[];var r=new Set;n=I(n);for(var i=n.next();!i.done;i=n.next())if((i=i.value)&&i.cues){i=I(i.cues);for(var o=i.next();!o.done;o=i.next()){var a=o.value;(o=a.id)&&o!=""||(o=a.startTime+"-"+a.endTime+"-"+a.text),a={id:o,title:a.text,startTime:a.startTime,endTime:a.endTime},r.has(o)||(e.push(a),r.add(o))}}return e};function Ef(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function eE(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}function U1(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="chapters"})}h.sh=function(e){e=!!e,this.na!=e&&(this.na=e,this.m==Vr?(this.B.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.s||(e=un(this.i.textStreams,this.Lb,this.zd,this.xd),0<e.length&&(Uo(this.j,e[0]),by(this),bp(this))):Iv(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.B.setTextVisibility(e),H1(this))},h.oi=function(){if(this.G)var e=this.G.Kd();else{if(this.ha==null)return new Date;e=this.ha}if(this.i&&!this.Ka()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},h.Ng=function(){if(this.i&&!this.Ka()){var e=this.i.presentationTimeline;return new Date(1e3*(e.m||e.i))}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),isNaN(e.getTime())?null:e):null},h.Yd=function(){return this.T()&&this.i?this.i.presentationTimeline.Yd():null},h.Eb=function(){if(this.m==Vr)return this.I.Eb();var e={total:[],audio:[],video:[],text:[]};return this.m==vi&&(e.total=ju(this.h.buffered)),e},h.Wd=function(){if(!this.h)return null;var e=this.Ng().getTime()+1e3*this.h.currentTime;return Date.now()-e},h.getStats=function(){if(this.m!=Vr&&this.m!=vi)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};Fv(this);var e=this.h,t=e.currentTime/e.duration;if(!isNaN(t)&&!this.T()){var n=this.A;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.G&&(this.A.P=this.G.qg(),this.A.V=this.G.rg()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.A;var r=Number(n.totalVideoFrames);t.O=Number(n.droppedVideoFrames),t.M=r,this.A.L=Number(n.corruptedVideoFrames)}if(this.C?(n=this.C,n=n.H?n.H:NaN):n=NaN,this.A.o=n,this.m==Vr){if(n=this.j.j,t=this.j.s,n){r=this.K?this.K.i:1;var i=r*n.bandwidth;t&&t.bandwidth&&(i+=r*t.bandwidth),this.A.A=i}n&&n.video&&(t=this.A,r=n.video.height||NaN,t.m=n.video.width||NaN,t.l=r),this.T()&&(n=this.Wd()||0,this.A.B=n/1e3),this.i&&(this.A.G=this.i.periodCount,this.A.F=this.i.gapCount,this.i.presentationTimeline&&(this.A.I=this.i.presentationTimeline.h)),n=this.o.getBandwidthEstimate(),this.A.s=n}this.m==vi&&(n=this.A,n.mc=isNaN(n.mc)?NaN:n.mc+NaN,n=this.A,t=e.videoHeight||NaN,n.m=e.videoWidth||NaN,n.l=t);var o=this.A;e=o.m,n=o.l,t=o.A,r=o.M,i=o.O;var a=o.L,f=o.V,p=o.P,g=o.s,m=o.i,w=o.C,E=o.H,C=o.j,P=Cv(o.g,"playing"),L=Cv(o.g,"paused"),M=Cv(o.g,"buffering"),B=o.o,U=o.B,K=o.I,W=o.Ug,X=o.mc,q=o.K,F=o.G,Q=o.F,H=lI(o.g),Z=[];o=I(o.h.g);for(var $=o.next();!$.done;$=o.next())$=$.value,Z.push({timestamp:$.timestamp,id:$.id,type:$.type,fromAdaptation:$.fromAdaptation,bandwidth:$.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:r,droppedFrames:i,corruptedFrames:a,stallsDetected:f,gapsJumped:p,estimatedBandwidth:g,completionPercent:m,loadLatency:w,manifestTimeSeconds:E,drmTimeSeconds:C,playTime:P,pauseTime:L,bufferingTime:M,licenseTime:B,liveLatency:U,maxSegmentDuration:K,manifestSizeBytes:W,bytesDownloaded:X,nonFatalErrorCount:q,manifestPeriodCount:F,manifestGapCount:Q,stateHistory:H,switchHistory:Z}},h.Jh=function(e,t,n,r,i,o,a){a=a===void 0?!1:a;var f=this,p,g,m,w,E,C,P,L,M,B,U,K,W;return G(function(X){switch(X.g){case 1:if(f.m!=Vr&&f.m!=vi)throw new Y(1,7,7004);if(n!="subtitles"&&n!="captions"&&ft("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),r){X.u(2);break}return _(X,jv(f,e),3);case 3:r=X.h;case 2:if(p=[],f.s&&(p=f.s.getCuePoints()),f.m!=vi){X.u(4);break}return a&&(n="forced"),_(X,j1(f,e,t,n,r,o||"",p),5);case 5:if(g=Et(t),m=f.rc(),w=m.find(function(q){return Et(q.language)==g&&q.label==(o||"")&&q.kind==n}))return ni(f),X.return(w);throw new Y(1,2,2012);case 4:if(E=an,C=f.$a(),P=C.end-C.start,f.i&&(P=f.i.presentationTimeline.getDuration()),P==1/0)throw new Y(1,4,4033);if(!p.length){X.u(6);break}return _(X,Bv(f,e,f.F,f.g.streaming.retryParameters),7);case 7:L=X.h,M=B1(f,L,r,p),B=new Blob([M],{type:"text/vtt"}),e=ei(B),r="text/vtt";case 6:if(U={id:f.og++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:kl(0,P,[e]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:o||null,type:E.wa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!a,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([yn(r||"",i||"")]),isAudioMuxedInVideo:!1},K=yn(U.mimeType,U.codecs),W=Pu(K),!W)throw new Y(2,2,2014,r);return f.i.textStreams.push(U),ni(f),X.return(Co(U))}})},h.Kh=function(e,t){var n=this,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W;return G(function(X){switch(X.g){case 1:if(n.m!=Vr&&n.m!=vi)throw new Y(1,7,7004);if(t){X.u(2);break}return _(X,jv(n,e),3);case 3:t=X.h;case 2:if(t!="text/vtt")throw new Y(1,2,2017,e);if(r=an,i=n.$a(),o=i.end-i.start,n.i&&(o=n.i.presentationTimeline.getDuration()),o==1/0)throw new Y(1,4,4045);return _(X,Bv(n,e,n.F,n.g.streaming.retryParameters),4);case 4:if(a=X.h,f=gn[t],!f)throw new Y(2,2,2014,t);for(p=f(),g={periodStart:0,segmentStart:0,segmentEnd:o,vttOffset:0},m=Ze(a),w=p.parseMedia(m,g,e,[]),E=[],C=I(w),P=C.next(),L={};!P.done;L={Ge:void 0,Jc:void 0},P=C.next())L.Jc=P.value,L.Ge=null,M=function(q){return function(){return q.Ge==null&&(q.Ge=Pn([e],[q.Jc.payload])),q.Ge||[]}}(L),B=new Fe(L.Jc.startTime,L.Jc.endTime,M,0,null,null,0,0,1/0),L.Jc.payload.includes("#xywh")&&(U=L.Jc.payload.split("#xywh=")[1].split(","),U.length===4&&B.we({height:parseInt(U[3],10),positionX:parseInt(U[0],10),positionY:parseInt(U[1],10),width:parseInt(U[2],10)})),E.push(B);if(K=t,!E.length){X.u(5);break}return _(X,Ja(E[0].N()[0],n.F,n.g.manifest.retryParameters),6);case 6:K=X.h;case 5:return W={id:n.og++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new St(E),mimeType:K||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:r.Pe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([yn(K||"","")]),isAudioMuxedInVideo:!1},n.m==vi?n.Dd.push(W):n.i.imageStreams.push(W),ni(n),X.return(pl(W))}})},h.Ih=function(e,t,n){var r=this,i,o,a,f;return G(function(p){switch(p.g){case 1:if(r.m!=Vr&&r.m!=vi)throw new Y(1,7,7004);if(n){p.u(2);break}return _(p,jv(r,e),3);case 3:n=p.h;case 2:return i=[],r.s&&(i=r.s.getCuePoints()),_(p,j1(r,e,t,"chapters",n,"",i),4);case 4:if(o=p.h,a=r.Ig(),f=a.find(function(g){return g.language==t}),!f){p.u(5);break}return _(p,new Promise(function(g,m){r.l.la(o,"load",g),r.l.la(o,"error",function(){m(new Y(1,2,2015))})}),6);case 6:return ni(r),p.return(f);case 5:throw new Y(1,2,2012)}})};function jv(e,t){var n;return G(function(r){switch(r.g){case 1:return pe(r,2),_(r,Ja(t,e.F,e.g.streaming.retryParameters),4);case 4:n=r.h,be(r,3);break;case 2:ke(r);case 3:if(n)return r.return(n);throw new Y(1,2,2011,t)}})}function j1(e,t,n,r,i,o,a){var f,p,g,m;return G(function(w){if(w.g==1)return i!="text/vtt"||a.length?_(w,Bv(e,t,e.F,e.g.streaming.retryParameters),3):w.u(2);w.g!=2&&(f=w.h,p=B1(e,f,i,a),g=new Blob([p],{type:"text/vtt"}),t=ei(g),i="text/vtt"),m=document.createElement("track");var E=e.L,C=t;try{if(E.g.enabled){var P=Rv(E);P.ot=Mv,P.su=!0;var L=Ty(P),M=bv(C,L)}else M=C}catch(B){xi("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",B),M=C}return m.src=M,m.label=o,m.kind=r,m.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(m),w.return(m)})}function Bv(e,t,n,r){var i,o,a;return G(function(f){if(f.g==1){i=_r,o=wt([t],r),o.method="GET";var p=e.L;try{p.g.enabled&&xf(p,o,{ot:Mv,su:!0})}catch(g){xi("CMCD_TEXT_ERROR","Could not generate text CMCD data.",g)}return _(f,n.request(i,o).promise,2)}return a=f.h,f.return(a.data)})}function B1(e,t,n,r){var i=gn[n];if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=Ze(t),t=n.parseMedia(t,e,null,[]),kI(t,r);throw new Y(2,2,2014,n)}h.pj=function(e,t){this.ga.width=e,this.ga.height=t},h.Vf=function(e){if(this.m==Vr){var t=this.j;if(e=e===void 0?.1:e,t.m.g)t=!1;else if(t.B)t=!1;else{for(var n=I(t.i.values()),r=n.next();!r.done;r=n.next())r=r.value,!r.pd||r.Fa||r.jb||(r.pd=!1,Qn(t,r,e));t=!0}}else t=!1;return t},h.uf=function(){return ft("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},h.ki=function(){return this.Pa},h.fi=function(){var e={video:null,audio:null,text:null};if(this.m!=Vr)return e;var t=this.j.j,n=this.h.currentTime;t=I([t.video,t.audio,this.j.s]);for(var r=t.next();!r.done;r=t.next())if((r=r.value)&&r.segmentIndex){var i=r.segmentIndex.find(n);i=r.segmentIndex.get(i),i={codecs:i.codecs||r.codecs,mimeType:i.mimeType||r.mimeType,bandwidth:i.bandwidth||r.bandwidth},r.type=="video"?(i.width=r.width,i.height=r.height,e.video=i):r.type=="audio"?e.audio=i:r.type==at&&(e.text=i)}return e};function Rl(e){var t=ht();return t.streaming.failureCallback=function(n){if(e.T()){var r=null;n.code==1001||n.code==1002?(r=1,e.g.streaming.lowLatencyMode&&(r=.1)):n.code==1003&&(r=.1),r!=null&&(n.severity=1,e.Vf(r))}},t.textDisplayFactory=function(){return!e.oe||wu()&&!document.fullscreenEnabled?HTMLMediaElement.prototype.addTextTrack?new yr(e.h,"Shaka Player TextTrack"):new gr:new vr(e.h,e.oe)},t}h.vh=function(e){this.oe=e};function tE(e,t){for(var n=new Set,r=I(t.textStreams),i=r.next();!i.done;i=r.next())i=i.value,i.mimeType!="application/cea-608"&&i.mimeType!="application/cea-708"||n.add(i.originalId);for(r=I(t.variants),i=r.next();!i.done;i=r.next())if((i=i.value.video)&&i.closedCaptions){for(var o=I(i.closedCaptions.keys()),a=o.next();!a.done;a=o.next())if(a=a.value,!n.has(a)){var f=a.startsWith("CC")?"application/cea-608":"application/cea-708",p=new Gt,g=i.closedCaptions.get(a);f={id:e.og++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:p,mimeType:f,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:g,originalLanguage:g,label:null,type:at,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:i.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([yn(f,"")]),isAudioMuxedInVideo:!1},t.textStreams.push(f),n.add(a)}}}function nE(e,t){var n,r,i,o,a;return G(function(f){return f.g==1?(n=e.audio,r=e.video,i=function(p,g){var m,w,E;return G(function(C){return C.g==1?p?p.segmentIndex?C.u(2):_(C,p.createSegmentIndex(),2):C.return(null):(w=(m=p.segmentIndex.Nb(g))?m.next().value:null,w?(E=w.startTime,C.return(E)):C.return(null))})},_(f,i(n,t),2)):f.g!=3?(o=f.h,_(f,i(r,t),3)):(a=f.h,a!=null&&o!=null?f.return(Math.max(a,o)):a!=null?f.return(a):o!=null?f.return(o):f.return(t))})}function Vv(e){var t=e.Cf();if(e.A&&e.O&&e.G){if(e.g.streaming.rebufferingGoal==0){var n=e.K;n.j=!1,Or(n)}else n=e.K,n.j=t,Or(n);if(e.L&&(n=e.L,t||n.s||(n.s=!0),n.s&&t&&(n.B=!0),n.F=t),Fv(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Le<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.P&&(e.P=Math.min(e.P+ ++e.Le*i,n-r))}}t=new Map().set("buffering",t),e.dispatchEvent(tn("buffering",t))}function Fv(e){if(e.A&&e.O){var t=e.A.g,n="playing";e.O.g==Sl?n="buffering":e.Qc()?n="ended":e.h.paused&&(n="paused");var r=n;if(t.g==null)t.g={timestamp:Date.now()/1e3,state:r,duration:0},t=!0;else{var i=Date.now()/1e3;t.g.duration=i-t.g.timestamp,t.g.state==r?t=!1:(t.h.push(t.g),t.g={timestamp:i,state:r,duration:0},t=!0)}t&&(n=new Map().set("newstate",n),e.dispatchEvent(tn("statechanged",n)))}}function V1(e){var t=e.h.playbackRate,n=e.T();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var r=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,i=e.Hg();i<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=r&&e.Id(r,!1):i==1&&t!==e.K.qc()&&e.dd()}if(n&&(n=e.$a(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var o=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var a=e.g.streaming.liveSync.targetLatency,f=a+r,p=Math.max(0,a-r),g=e.g.streaming.liveSync.maxPlaybackRate,m=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(a=e.i.serviceDescription.targetLatency,e.i.serviceDescription.targetLatency!=null?f=e.i.serviceDescription.targetLatency+r:e.i.serviceDescription.maxLatency!=null&&(f=e.i.serviceDescription.maxLatency),e.i.serviceDescription.targetLatency!=null?p=Math.max(0,e.i.serviceDescription.targetLatency-r):e.i.serviceDescription.minLatency!=null&&(p=e.i.serviceDescription.minLatency),g=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,m=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.P||typeof a!="number"||(e.P=a);var w=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;i&&e.Ha&&e.P!==null&&typeof a=="number"&&e.Le<w&&Date.now()-e.Ha>1e3*o&&(o=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.P=Math.max(e.P-(a-o)/2,o+r),e.Ha=Date.now()),i&&e.P!==null&&(f=e.P+r,p=e.P-r),a=n.end-e.h.currentTime,r=0,e.m==vi&&(i=e.h.buffered,0<i.length&&(r=i.end(i.length-1),r=Math.max(g,r-n.end))),n=e.g.streaming.liveSync.panicMode,i=1e3*e.g.streaming.liveSync.panicThreshold,o=Date.now()-e.O.h,n&&!m&&(m=e.g.streaming.liveSync.minPlaybackRate),n&&m&&o<=i?t!=m&&e.Id(m,!1):f!=null&&g&&a-r>f?(t!=g&&e.Id(g,!1),e.Ha=null):p!=null&&m&&a-r<p?(t!=m&&e.Id(m,!1),e.Ha=null):t!==e.K.qc()&&(e.dd(),e.Ha=Date.now())}}function Ry(e){if(e.h){var t=function(i,o){var a=a===void 0?Number.EPSILON:a;if(i===o)a=!0;else{var f=Math.abs(i-o);a=f<=a?!0:a!==Number.EPSILON?Math.abs(f-a)<=Number.EPSILON:!1}return(a||o>i)&&e.ng<i?(e.ng=i,!0):!1},n=e.$a();if(n=n.end-n.start,n=0<n?e.h.currentTime/n:0,!isNaN(n)){if(n*=100,t(0,n))var r=tn("started");else t(25,n)?r=tn("firstquartile"):t(50,n)?r=tn("midpoint"):t(75,n)?r=tn("thirdquartile"):(t(100,n)&&(r=tn("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Qc()&&e.h.pause());r&&e.dispatchEvent(r)}}}function Za(e){try{Wd(e.me,e.i)}catch(n){return kf(e,n),!1}var t=vn(e.i.variants);return t=e.$.create(t),e.o.setVariants(Array.from(t.values())),!0}function Cf(e,t,n,r,i){t=t===void 0?!0:t,n=n===void 0?0:n,r=r===void 0?!1:r,i=i===void 0?!0:i;var o;(o=Za(e)?e.o.chooseVariant():null)&&Rp(e,o,i,t,n,r)}function Rp(e,t,n,r,i,o){o=o===void 0?!1:o;var a=e.j.j;if(t==a)r&&Ga(e.j,t,r,i,!0);else{var f=e.A.h;f.h!=t&&(f.h=t,f.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Ga(e.j,t,r,i,o,n),r=null,a&&(r=rs(a)),t=rs(t),t.active=!0,n?(n=new Map().set("oldTrack",r).set("newTrack",t),e.M&&ef(e.M,t,e.vf()),n=tn("adaptation",n),Af(e,n)):K1(e,r,t)}}function F1(e,t){var n=Array.from(e.h.audioTracks).find(function(r){return r.enabled});t.enabled=!0,n&&(t.id!==n.id&&(n.enabled=!1),n=va(n),t=va(t),K1(e,n,t))}function rE(e,t,n){if(e.g.autoShowText==0)return!1;if(e.g.autoShowText==1)return!0;var r=Et(e.g.preferredTextLanguage);return n=Et(n.language),e.g.autoShowText==2?Du(n,r):e.g.autoShowText==3?t?(e=Et(t.language),Du(n,r)&&!Du(e,n)):!1:(ft("Invalid autoShowText setting!"),!1)}function ni(e){var t=tn("trackschanged");Af(e,t)}function K1(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),e.M&&ef(e.M,n,e.vf()),n=tn("variantchanged",t),Af(e,n)}function by(e){var t=tn("textchanged");Af(e,t)}function H1(e){var t=tn("texttrackvisibility");Af(e,t)}function q1(e){e.g.abr.enabled||Kv(e);var t=new Map().set("newStatus",e.g.abr.enabled);Af(e,tn("abrstatuschanged",t))}function bp(e){var t=e.rc().find(function(n){return n.active});t&&e.B&&e.B.setTextLanguage&&e.B.setTextLanguage(t.language)}function Kv(e,t){if(t=t===void 0?!0:t,e.m==Vr){e.pe.stop();for(var n=I(e.i.variants),r=n.next();!r.done;r=n.next())r.value.disabledUntilTime=0;t&&Za(e)}}h.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===jo||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(f){var p=f[e.type];return p&&p.id!==e.id&&!f.disabledUntilTime?e.type=="audio"?e.language===p.language:!0:!1})){for(var n=!1,r=!1,i=I(this.i.variants),o=i.next();!o.done;o=i.next()){o=o.value;var a=o[e.type];a&&(a.id===e.id?(o.disabledUntilTime=Date.now()/1e3+t,n=!0):a.trickModeVideo&&a.trickModeVideo.id==e.id&&(r=!0))}return!n&&r?!1:(this.pe.Aa(1),t=this.Eb().video.reduce(function(f,p){return f+p.end-p.start},0),Cf(this,!1,t,!0,!1),!0)}return!1};function kf(e,t){var n,r,i,o;return G(function(a){switch(a.g){case 1:if(e.m==jo)return a.return();if(t.severity===1&&e.A.K++,n=!0,!(e.sa&&e.i&&e.j)||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3018){a.u(2);break}return pe(a,3),_(a,c(e.j),5);case 5:r=a.h,n=!r,r&&(i=tn("mediasourcerecovered"),e.dispatchEvent(i)),be(a,2);break;case 3:ke(a),n=!0;case 2:if(!n)return a.return();t.severity===2&&Kv(e,!1),o=tn("error",new Map().set("detail",t)),e.dispatchEvent(o),o.defaultPrevented&&(t.handled=!0),le(a)}})}h.addFont=function(e,t){var n,r,i,o,a;return G(function(f){if(f.g==1)return"fonts"in document&&"FontFace"in T?_(f,document.fonts.ready,3):f.u(0);if(!("entries"in document.fonts))return f.return();for(n=function(p){p=p.entries();for(var g=[],m=p.next();m.done===!1;)g.push(m.value),m=p.next();return g},r=I(n(document.fonts)),i=r.next();!i.done;i=r.next())if(o=i.value,o.family==e&&o.display=="swap")return f.return();a=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(a),le(f)})};function Mp(e,t,n,r){r=r===void 0?e:r,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement,eventNode:n.eventNode}),r.dispatchEvent(tn(t,e))}function z1(e,t,n,r){r=r===void 0?!1:r,t=new Map().set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(tn(r?"audiotrackchanged":"mediaqualitychanged",t))}function Hv(e,t){if(t=t===void 0?!0:t,!e.h.error)return t?new Y(2,3,3016):null;var n=e.h.error.code;return!t&&n==1?null:((t=e.h.error.msExtendedCode)&&(0>t&&(t+=Math.pow(2,32)),t=t.toString(16)),new Y(2,3,3016,n,t,e.h.error.message))}function qv(e,t,n){0<t&&(e.T()||e.uh(t)),t=e.getDuration(),n<t&&(e.T()||e.ab(n))}function Af(e,t){G(function(n){if(n.g==1)return _(n,Promise.resolve(),2);e.m!=jo&&e.dispatchEvent(t),le(n)})}function G1(e){var t=new Set;e=I(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.language?t.add(Et(n.language)):t.add("und");return t}function W1(e){var t=new Map,n=new Map;e=I(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;var i="und",o=[];r.language&&(i=Et(r.language)),r.type=="variant"?o=r.audioRoles:o=r.roles,o&&o.length||(o=[""]),t.has(i)||t.set(i,new Set),o=I(o);for(var a=o.next();!a.done;a=o.next())a=a.value,t.get(i).add(a),r.label&&(n.has(i)||n.set(i,new Map),n.get(i).set(a,r.label))}var f=[];return t.forEach(function(p,g){p=I(p);for(var m=p.next();!m.done;m=p.next()){m=m.value;var w=null;n.has(g)&&n.get(g).has(m)&&(w=n.get(g).get(m)),f.push({language:g,role:m,label:w})}}),f}h.Ka=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1},h.Qc=function(){return!this.h||this.h.ended?!0:this.sa&&!this.T()&&this.h.currentTime>=this.$a().end},Me("shaka.Player",he),he.prototype.isEnded=he.prototype.Qc,he.prototype.isRemotePlayback=he.prototype.Ka,he.prototype.addFont=he.prototype.addFont,he.prototype.setVideoContainer=he.prototype.vh,he.prototype.getFetchedPlaybackInfo=he.prototype.fi,he.prototype.getManifestParserFactory=he.prototype.ki,he.prototype.getManifest=he.prototype.uf,he.prototype.retryStreaming=he.prototype.Vf,he.prototype.setMaxHardwareResolution=he.prototype.pj,he.prototype.addChaptersTrack=he.prototype.Ih,he.prototype.addThumbnailsTrack=he.prototype.Kh,he.prototype.addTextTrackAsync=he.prototype.Jh,he.prototype.getStats=he.prototype.getStats,he.prototype.getBufferedInfo=he.prototype.Eb,he.prototype.getSegmentAvailabilityDuration=he.prototype.Yd,he.prototype.getPresentationStartTimeAsDate=he.prototype.Ng,he.prototype.getPlayheadTimeAsDate=he.prototype.oi,he.prototype.setTextTrackVisibility=he.prototype.sh,he.prototype.getChapters=he.prototype.bi,he.prototype.getChaptersTracks=he.prototype.Ig,he.prototype.isTextTrackVisible=he.prototype.Df,he.prototype.selectVariantsByLabel=he.prototype.kj,he.prototype.selectTextLanguage=he.prototype.Xf,he.prototype.selectAudioLanguage=he.prototype.lh,he.prototype.getTextLanguages=he.prototype.ti,he.prototype.getAudioLanguages=he.prototype.Zh,he.prototype.getTextLanguagesAndRoles=he.prototype.ui,he.prototype.getAudioLanguagesAndRoles=he.prototype.$h,he.prototype.selectVariantTrack=he.prototype.Yf,he.prototype.selectTextTrack=he.prototype.mh,he.prototype.getThumbnails=he.prototype.Og,he.prototype.getAllThumbnails=he.prototype.Yh,he.prototype.getImageTracks=he.prototype.hi,he.prototype.getTextTracks=he.prototype.rc,he.prototype.getVariantTracks=he.prototype.sc,he.prototype.cancelTrickPlay=he.prototype.dd,he.prototype.trickPlay=he.prototype.Id,he.prototype.getPlaybackRate=he.prototype.mb,he.prototype.isBuffering=he.prototype.Cf,he.prototype.getKeyStatuses=he.prototype.Vd,he.prototype.getActiveSessionsMetadata=he.prototype.tf,he.prototype.getExpiration=he.prototype.ld,he.prototype.drmInfo=he.prototype.drmInfo,he.prototype.keySystem=he.prototype.keySystem,he.prototype.isFullyLoaded=he.prototype.Fi,he.prototype.goToLive=he.prototype.Bi,he.prototype.seekRange=he.prototype.$a,he.prototype.isAudioOnly=he.prototype.Ei,he.prototype.isInProgress=he.prototype.vc,he.prototype.isLive=he.prototype.T,he.prototype.getAdManager=he.prototype.Gg,he.prototype.getAssetUri=he.prototype.Nc,he.prototype.getNetworkingEngine=he.prototype.vb,he.prototype.getMediaElement=he.prototype.ni,he.prototype.getManifestType=he.prototype.vf,he.prototype.getLoadMode=he.prototype.Kg,he.prototype.resetConfiguration=he.prototype.fj,he.prototype.getBufferFullness=he.prototype.Hg,he.prototype.getNonDefaultConfiguration=he.prototype.Mg,he.prototype.getConfigurationForLowLatency=he.prototype.ci,he.prototype.getConfiguration=he.prototype.getConfiguration,he.prototype.configurationForLowLatency=he.prototype.Vh,he.prototype.configure=he.prototype.configure,he.prototype.releaseAllMutexes=he.prototype.bj,he.prototype.destroyAllPreloads=he.prototype.af,he.prototype.preload=he.prototype.preload,he.prototype.detachAndSavePreload=he.prototype.Cg,he.prototype.unloadAndSavePreload=he.prototype.tj,he.prototype.load=he.prototype.load,he.prototype.updateStartTime=he.prototype.xj,he.prototype.unload=he.prototype.kc,he.prototype.detach=he.prototype.detach,he.prototype.attachCanvas=he.prototype.Oh,he.prototype.attach=he.prototype.Xb,he.probeSupport=function(e){e=e===void 0?!0:e;var t,n,r,i,o,a,f;return G(function(p){switch(p.g){case 1:if(t={},!e){p.u(2);break}return _(p,Dn(),3);case 3:t=p.h;case 2:var g={};if(Yi())for(var m in hi)g[m]=!0;m=I(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var w=m.next();!w.done;w=m.next())w=w.value,g[w]=Yi()?!!hi[w]:$s(w);for(n=g,m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ee(Cr)),g={},m=I(m),w=m.next();!w.done;w=m.next()){w=w.value,g[w]=Pu(w)?!0:Yi()?Un(w)||!!Cu(w):$s(w);var E=w.split(";")[0];g[E]=g[E]||g[w]}return r=g,_(p,dc(),4);case 4:i=p.h,o={manifest:n,media:r,drm:t,hardwareResolution:i},a=zv;for(f in a)o[f]=a[f]();return p.return(o)}})},he.isBrowserSupported=function(){if(T.Promise||ft("A Promise implementation or polyfill is required"),!(T.Promise&&T.Uint8Array&&Array.prototype.forEach)||Tt("Trident/"))return!1;var e=wu();return e&&9>e?!1:Yi()?!0:$s("application/x-mpegurl")},he.setAdManagerFactory=function(e){Ly=e},he.registerSupportPlugin=function(e,t){zv[e]=t},he.prototype.destroy=he.prototype.destroy;var jo=0,My=1,Vr=2,vi=3;he.LoadMode={DESTROYED:jo,NOT_LOADED:My,MEDIA_SOURCE:Vr,SRC_EQUALS:vi},he.version="v4.13.0";var X1=["4","13"];cc=new function(e){this.g=e,this.i=ud,this.h=ld}(new od(Number(X1[0]),Number(X1[1])));var zv={},Ly=null;function Y1(){this.g=[],this.i=this.l=this.j=this.h=0}function iE(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function Ye(e,t,n){var r=this;this.g=e,this.h=t,this.j=n,this.i=!1,this.l=this.h.getVolume(),this.m=new At,this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){r.i=!0}),this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){r.i=!1})}h=Ye.prototype,h.needsSkipUI=function(){return!1},h.isClientRendering=function(){return!0},h.isUsingAnotherMediaElement=function(){return!0},h.getDuration=function(){return this.g.getDuration()},h.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},h.getRemainingTime=function(){return this.h.getRemainingTime()},h.isPaused=function(){return this.i},h.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},h.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},h.canSkipNow=function(){return this.h.getAdSkippableState()},h.skip=function(){return this.h.skip()},h.pause=function(){return this.h.pause()},h.play=function(){return this.h.resume()},h.getVolume=function(){return this.h.getVolume()},h.setVolume=function(e){return this.j.volume=e,this.h.setVolume(e)},h.isMuted=function(){return this.h.getVolume()==0},h.isLinear=function(){return this.g.isLinear()},h.resize=function(e,t){var n=!1,r=this.j;document.fullscreenEnabled?n=!!document.fullscreenElement:r.webkitSupportsFullscreen&&(n=r.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},h.setMuted=function(e){(this.j.muted=e)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)},h.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},h.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},h.getTitle=function(){return this.g.getTitle()},h.getDescription=function(){return this.g.getDescription()},h.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},h.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},h.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},h.getAdId=function(){return this.g.getAdId()},h.getCreativeAdId=function(){return this.g.getCreativeAdId()},h.getAdvertiserName=function(){return this.g.getAdvertiserName()},h.getMediaUrl=function(){return this.g.getMediaUrl()},h.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},h.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},h.release=function(){this.h=this.g=null},Me("shaka.ads.ClientSideAd",Ye),Ye.prototype.release=Ye.prototype.release,Ye.prototype.getPodIndex=Ye.prototype.getPodIndex,Ye.prototype.getTimeOffset=Ye.prototype.getTimeOffset,Ye.prototype.getMediaUrl=Ye.prototype.getMediaUrl,Ye.prototype.getAdvertiserName=Ye.prototype.getAdvertiserName,Ye.prototype.getCreativeAdId=Ye.prototype.getCreativeAdId,Ye.prototype.getAdId=Ye.prototype.getAdId,Ye.prototype.getVastMediaWidth=Ye.prototype.getVastMediaWidth,Ye.prototype.getVastMediaHeight=Ye.prototype.getVastMediaHeight,Ye.prototype.getVastMediaBitrate=Ye.prototype.getVastMediaBitrate,Ye.prototype.getDescription=Ye.prototype.getDescription,Ye.prototype.getTitle=Ye.prototype.getTitle,Ye.prototype.getPositionInSequence=Ye.prototype.getPositionInSequence,Ye.prototype.getSequenceLength=Ye.prototype.getSequenceLength,Ye.prototype.setMuted=Ye.prototype.setMuted,Ye.prototype.resize=Ye.prototype.resize,Ye.prototype.isLinear=Ye.prototype.isLinear,Ye.prototype.isMuted=Ye.prototype.isMuted,Ye.prototype.setVolume=Ye.prototype.setVolume,Ye.prototype.getVolume=Ye.prototype.getVolume,Ye.prototype.play=Ye.prototype.play,Ye.prototype.pause=Ye.prototype.pause,Ye.prototype.skip=Ye.prototype.skip,Ye.prototype.canSkipNow=Ye.prototype.canSkipNow,Ye.prototype.getTimeUntilSkippable=Ye.prototype.getTimeUntilSkippable,Ye.prototype.isSkippable=Ye.prototype.isSkippable,Ye.prototype.isPaused=Ye.prototype.isPaused,Ye.prototype.getRemainingTime=Ye.prototype.getRemainingTime,Ye.prototype.getMinSuggestedDuration=Ye.prototype.getMinSuggestedDuration,Ye.prototype.getDuration=Ye.prototype.getDuration,Ye.prototype.isUsingAnotherMediaElement=Ye.prototype.isUsingAnotherMediaElement,Ye.prototype.isClientRendering=Ye.prototype.isClientRendering,Ye.prototype.needsSkipUI=Ye.prototype.needsSkipUI;function nn(){}function $1(e,t){var n=[];e=I(bt(e,"Ad"));for(var r=e.next();!r.done;r=e.next())if((r=pn(r.value,"InLine"))&&(r=pn(r,"Creatives"))){r=I(bt(r,"Creative"));for(var i=r.next();!i.done;i=r.next()){i=i.value;var o=pn(i,"Linear");if(o&&oE(n,t,o),i=pn(i,"NonLinearAds")){i=bt(i,"NonLinear"),i=I(i);for(var a=i.next();!a.done;a=i.next())e:{o=n;var f=t,p=a.value,g=pn(p,"StaticResource");if(g)a=g.attributes.creativeType;else{if(g=pn(p,"HTMLResource"),!g)break e;a="text/html"}if(g=rr(g)){a==="text/html"&&(g="data:text/html;charset=UTF-8,"+encodeURIComponent(g));var m=rt(p,"width",sr)||rt(p,"expandedWidth",sr),w=rt(p,"height",sr)||rt(p,"expandedHeight",sr);if(m||w){var E=null;(p=p.attributes.minSuggestedDuration)&&(E=li(p)),p=0,f!=null&&(p=f),o.push({id:null,groupId:null,startTime:p,endTime:null,uri:g,mimeType:a,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:E,once:!0,pre:f==null,post:f==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:m||0,y:w||0}}})}}}}}}return n}function oE(e,t,n){var r=0;t!=null&&(r=t);var i=null;if(n.attributes.skipoffset&&(i=li(n.attributes.skipoffset),isNaN(i)&&(i=null)),n=pn(n,"MediaFiles")){var o=bt(n,"MediaFile");for(n=o,o=o.filter(function(f){return f.attributes.delivery=="streaming"}),o.length&&(n=o),n=n.sort(function(f,p){return(parseInt(p.attributes.height,10)||0)-(parseInt(f.attributes.height,10)||0)}),n=I(n),o=n.next();!o.done;o=n.next())if(o=o.value,!o.attributes.apiFramework){var a=rr(o);if(a){e.push({id:null,groupId:null,startTime:r,endTime:null,uri:a,mimeType:o.attributes.type||null,isSkippable:i!=null,skipOffset:i,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:t==null,post:t==1/0,timelineRange:!1,loop:!1,overlay:null});break}}}}Me("shaka.ads.Utils",nn),nn.ADS_LOADED="ads-loaded",nn.AD_STARTED="ad-started",nn.AD_FIRST_QUARTILE="ad-first-quartile",nn.AD_MIDPOINT="ad-midpoint",nn.AD_THIRD_QUARTILE="ad-third-quartile",nn.AD_COMPLETE="ad-complete",nn.AD_STOPPED="ad-stopped",nn.AD_SKIPPED="ad-skipped",nn.AD_VOLUME_CHANGED="ad-volume-changed",nn.AD_MUTED="ad-muted",nn.AD_PAUSED="ad-paused",nn.AD_RESUMED="ad-resumed",nn.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",nn.CUEPOINTS_CHANGED="ad-cue-points-changed",nn.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",nn.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",nn.AD_CLICKED="ad-clicked",nn.AD_PROGRESS="ad-progress",nn.AD_BUFFERING="ad-buffering",nn.AD_IMPRESSION="ad-impression",nn.AD_DURATION_CHANGED="ad-duration-changed",nn.AD_CLOSED="ad-closed",nn.AD_LOADED="ad-loaded",nn.ALL_ADS_COMPLETED="all-ads-completed",nn.AD_LINEAR_CHANGED="ad-linear-changed",nn.AD_METADATA="ad-metadata",nn.AD_RECOVERABLE_ERROR="ad-recoverable-error",nn.AD_ERROR="ad-error",nn.AD_BREAK_READY="ad-break-ready",nn.AD_INTERACTION="ad-interaction",nn.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",nn.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",nn.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Ny(e,t,n,r,i){var o=this;this.s=e,this.i=t,this.F=!1,this.A=this.o=null,this.G=NaN,this.l=i,this.j=null,this.h=new At,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.s,this.i),this.C.initialize(),this.m=new google.ima.AdsLoader(this.C),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.13.0"),this.g=null,this.B=r||new google.ima.AdsRenderingSettings,this.h.D(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(a){uE(o,a)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(a){J1(o,a)}),this.h.D(this.i,"ended",function(){o.m.contentComplete()}),this.h.la(this.i,"play",function(){o.F=!0})}Ny.prototype.configure=function(e){this.o=e},Ny.prototype.stop=function(){this.g&&this.g.stop(),this.s&&oo(this.s)},Ny.prototype.release=function(){this.stop(),this.A&&this.A.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.C.destroy()};function J1(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new Te("ad-error",t)),Uy(e,null),e.l(new Te("ad-cue-points-changed",new Map().set("cuepoints",[])))}function uE(e,t){if(e.l(new Te("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.G))),e.o.customPlayheadTracker){var n={currentTime:e.i.currentTime};e.g=t.getAdsManager(n,e.B),e.i.muted?e.g.setVolume(0):e.g.setVolume(e.i.volume),e.h.D(e.i,"timeupdate",function(){e.i.duration&&(n.currentTime=e.i.currentTime)}),e.h.D(e.i,"volumechange",function(){e.j&&(e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))})}else e.g=t.getAdsManager(e.i,e.B);e.l(new Te("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var r=e.g.getCuePoints();if(r.length){t=[],r=I(r);for(var i=r.next();!i.done;i=r.next())t.push({start:i.value,end:null});e.l(new Te("ad-cue-points-changed",new Map().set("cuepoints",t)))}lE(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight,_y(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),e.h.D(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,_y(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in T?(e.A=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,_y(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.A.observe(e.i)):e.h.D(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,_y(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.F||e.o.skipPlayDetection?e.g.start():e.h.la(e.i,"play",function(){e.F=!0,e.g.start()})}catch{Uy(e,null)}}function _y(e){return document.fullscreenEnabled?!!document.fullscreenElement:(e=e.i,e.webkitSupportsFullscreen?e.webkitDisplayingFullscreen:!1)}function lE(e){function t(n,r){n=new Map().set("originalEvent",n),e.l(new Te(r,n))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){J1(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){Q1(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,function(n){Q1(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(n){t(n,"ad-first-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.MIDPOINT,function(n){t(n,"ad-midpoint")}),e.h.D(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(n){t(n,"ad-third-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.COMPLETE,function(n){t(n,"ad-complete")}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){Uy(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){Uy(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPED,function(n){t(n,"ad-skipped")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(n){t(n,"ad-volume-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(n){t(n,"ad-muted")}),e.h.D(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.D(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.CLICK,function(n){t(n,"ad-clicked")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(n){t(n,"ad-progress")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(n){t(n,"ad-buffering")}),e.h.D(e.g,google.ima.AdEvent.Type.IMPRESSION,function(n){t(n,"ad-impression")}),e.h.D(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(n){t(n,"ad-duration-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(n){t(n,"ad-closed")}),e.h.D(e.g,google.ima.AdEvent.Type.LOADED,function(n){t(n,"ad-loaded")}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed")}),e.h.D(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(n){t(n,"ad-linear-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_METADATA,function(n){t(n,"ad-metadata")}),e.h.D(e.g,google.ima.AdEvent.Type.LOG,function(n){t(n,"ad-recoverable-error")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(n){t(n,"ad-break-ready")}),e.h.D(e.g,google.ima.AdEvent.Type.INTERACTION,function(n){t(n,"ad-interaction")})}function Q1(e,t){var n=t.getAd();n?(e.j=new Ye(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new Te("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new Te("ad-started",t)),e.j.isLinear()&&(e.s.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(t=e.j,t.l=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):ft("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function Uy(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new Te("ad-content-resume-requested")),e.l(new Te("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.s.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function $e(e,t,n,r,i,o){this.g=e,this.i=t,this.j=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.A=n,this.o=r,this.m=i,this.s=o,this.B=t.overlay}h=$e.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!0},h.isUsingAnotherMediaElement=function(){return this.s},h.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},h.isPaused=function(){return this.g.paused},h.isSkippable=function(){return this.h&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},h.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},h.canSkipNow=function(){return this.h&&this.getTimeUntilSkippable()==0},h.skip=function(){this.canSkipNow()&&this.A()},h.pause=function(){return this.g.pause()},h.play=function(){return this.g.play()},h.getVolume=function(){return this.g.volume},h.setVolume=function(e){this.g.volume=e},h.isMuted=function(){return this.g.muted},h.isLinear=function(){return this.B==null},h.resize=function(){},h.setMuted=function(e){this.g.muted=e},h.getSequenceLength=function(){return this.o},h.getPositionInSequence=function(){return this.m},h.getTitle=function(){return""},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getAdId=function(){return this.i.id||""},h.getCreativeAdId=function(){return""},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return this.i.uri},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){this.g=null},Me("shaka.ads.InterstitialAd",$e),$e.prototype.release=$e.prototype.release,$e.prototype.getPodIndex=$e.prototype.getPodIndex,$e.prototype.getTimeOffset=$e.prototype.getTimeOffset,$e.prototype.getMediaUrl=$e.prototype.getMediaUrl,$e.prototype.getAdvertiserName=$e.prototype.getAdvertiserName,$e.prototype.getCreativeAdId=$e.prototype.getCreativeAdId,$e.prototype.getAdId=$e.prototype.getAdId,$e.prototype.getVastMediaWidth=$e.prototype.getVastMediaWidth,$e.prototype.getVastMediaHeight=$e.prototype.getVastMediaHeight,$e.prototype.getVastMediaBitrate=$e.prototype.getVastMediaBitrate,$e.prototype.getDescription=$e.prototype.getDescription,$e.prototype.getTitle=$e.prototype.getTitle,$e.prototype.getPositionInSequence=$e.prototype.getPositionInSequence,$e.prototype.getSequenceLength=$e.prototype.getSequenceLength,$e.prototype.setMuted=$e.prototype.setMuted,$e.prototype.resize=$e.prototype.resize,$e.prototype.isLinear=$e.prototype.isLinear,$e.prototype.isMuted=$e.prototype.isMuted,$e.prototype.setVolume=$e.prototype.setVolume,$e.prototype.getVolume=$e.prototype.getVolume,$e.prototype.play=$e.prototype.play,$e.prototype.pause=$e.prototype.pause,$e.prototype.skip=$e.prototype.skip,$e.prototype.canSkipNow=$e.prototype.canSkipNow,$e.prototype.getTimeUntilSkippable=$e.prototype.getTimeUntilSkippable,$e.prototype.isSkippable=$e.prototype.isSkippable,$e.prototype.isPaused=$e.prototype.isPaused,$e.prototype.getRemainingTime=$e.prototype.getRemainingTime,$e.prototype.getMinSuggestedDuration=$e.prototype.getMinSuggestedDuration,$e.prototype.getDuration=$e.prototype.getDuration,$e.prototype.isUsingAnotherMediaElement=$e.prototype.isUsingAnotherMediaElement,$e.prototype.isClientRendering=$e.prototype.isClientRendering,$e.prototype.needsSkipUI=$e.prototype.needsSkipUI;function Je(e,t,n){this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}h=Je.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!0},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return-1},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return-1},h.isPaused=function(){return!1},h.isSkippable=function(){return!1},h.getTimeUntilSkippable=function(){return 0},h.canSkipNow=function(){return!1},h.skip=function(){},h.pause=function(){},h.play=function(){},h.getVolume=function(){return 1},h.setVolume=function(){},h.isMuted=function(){return!1},h.isLinear=function(){return this.i},h.resize=function(){},h.setMuted=function(){},h.getSequenceLength=function(){return this.j},h.getPositionInSequence=function(){return this.h},h.getTitle=function(){return""},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getAdId=function(){return this.g.id||""},h.getCreativeAdId=function(){return""},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return this.g.uri},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){},Me("shaka.ads.InterstitialStaticAd",Je),Je.prototype.release=Je.prototype.release,Je.prototype.getPodIndex=Je.prototype.getPodIndex,Je.prototype.getTimeOffset=Je.prototype.getTimeOffset,Je.prototype.getMediaUrl=Je.prototype.getMediaUrl,Je.prototype.getAdvertiserName=Je.prototype.getAdvertiserName,Je.prototype.getCreativeAdId=Je.prototype.getCreativeAdId,Je.prototype.getAdId=Je.prototype.getAdId,Je.prototype.getVastMediaWidth=Je.prototype.getVastMediaWidth,Je.prototype.getVastMediaHeight=Je.prototype.getVastMediaHeight,Je.prototype.getVastMediaBitrate=Je.prototype.getVastMediaBitrate,Je.prototype.getDescription=Je.prototype.getDescription,Je.prototype.getTitle=Je.prototype.getTitle,Je.prototype.getPositionInSequence=Je.prototype.getPositionInSequence,Je.prototype.getSequenceLength=Je.prototype.getSequenceLength,Je.prototype.setMuted=Je.prototype.setMuted,Je.prototype.resize=Je.prototype.resize,Je.prototype.isLinear=Je.prototype.isLinear,Je.prototype.isMuted=Je.prototype.isMuted,Je.prototype.setVolume=Je.prototype.setVolume,Je.prototype.getVolume=Je.prototype.getVolume,Je.prototype.play=Je.prototype.play,Je.prototype.pause=Je.prototype.pause,Je.prototype.skip=Je.prototype.skip,Je.prototype.canSkipNow=Je.prototype.canSkipNow,Je.prototype.getTimeUntilSkippable=Je.prototype.getTimeUntilSkippable,Je.prototype.isSkippable=Je.prototype.isSkippable,Je.prototype.isPaused=Je.prototype.isPaused,Je.prototype.getRemainingTime=Je.prototype.getRemainingTime,Je.prototype.getMinSuggestedDuration=Je.prototype.getMinSuggestedDuration,Je.prototype.getDuration=Je.prototype.getDuration,Je.prototype.isUsingAnotherMediaElement=Je.prototype.isUsingAnotherMediaElement,Je.prototype.isClientRendering=Je.prototype.isClientRendering,Je.prototype.needsSkipUI=Je.prototype.needsSkipUI;function Z1(e,t,n,r){function i(){if(!o.I&&o.m&&!o.B.Ka()){o.m=o.h.currentTime,o.s&&!o.s.pre&&!o.s.post&&o.m<o.s.startTime&&(o.s=null);var p=Np(o);p&&jy(o,p,1,1,Date.now())}}var o=this;if(this.O=null,this.G=e,this.B=t,this.h=n,this.H=null,this.A=!0,this.g=this.h,this.i=r,this.K=new Set,this.F=new Set,this.C=new Map,this.j=new he,Wv(this),this.L=new At,this.l=new At,this.I=!1,this.V=this.o=this.s=this.m=null,this.L.D(this.h,"timeupdate",function(){if(!(o.I||o.m||o.B.Ka())){o.m=o.h.currentTime;var p=Np(o,!0);p&&jy(o,p,1,1,Date.now())}}),this.L.D(this.h,"ended",function(){i()}),this.M=new st(i),"requestVideoFrameCallback"in this.h&&!tl()){var a=this.h,f=function(){i(),a.requestVideoFrameCallback(f)};a.requestVideoFrameCallback(f)}else this.M.Aa(.025);this.P=new st(function(){var p,g,m,w,E,C,P,L,M,B,U;return G(function(K){switch(K.g){case 1:if(!o.F.size||o.m==null){K.u(0);break}if(p=o.B.Kg(),p==jo||p==My)return K.return();g=!1,m=Array.from(o.F),w=o.B.$a(),E=I(m),C=E.next();case 3:if(C.done){K.u(5);break}if(P=C.value,P==o.s){K.u(4);break}if(L=P.endTime||P.startTime,!(1<=w.start-L)){M=P.startTime-o.m,0<M&&10>=M&&!o.C.has(P)&&eS(P)&&o.C.set(P,o.j.preload(P.uri,null,P.mimeType||void 0)),K.u(4);break}if(!o.C.has(P)){K.u(7);break}return _(K,o.C.get(P),8);case 8:(B=K.h)&&B.destroy(),o.C.delete(P);case 7:U=JSON.stringify(P),o.K.has(U)&&o.K.delete(U),o.F.delete(P),P.overlay||(g=!0);case 4:C=E.next(),K.u(3);break;case 5:g&&By(o),le(K)}})}).Aa(1)}h=Z1.prototype,h.configure=function(e){this.O=e,Gv(this)};function Gv(e){if(e.G&&e.O&&!e.I){var t=e.O.supportsMultipleMediaElements,n=e.h;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.A==t&&(e.A=!t,e.A?(e.g=e.h,e.H&&(e.H.parentElement&&e.G.removeChild(e.H),e.H=null)):(e.H||(t=document.createElement(e.h.tagName),t.autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.backgroundColor="rgb(0, 0, 0)",t.style.display="none",t.setAttribute("playsinline",""),e.H=t),e.g=e.H))}}h.stop=function(){this.l&&this.l.La(),this.K.clear(),this.F.clear(),this.j.af(),this.C.clear(),this.j.detach(),this.I=!1,this.s=this.m=null,this.A=!0,this.g=this.h,this.H=null,this.G&&oo(this.G),this.o&&(this.o.stop(),this.o=null)},h.release=function(){this.stop(),this.L&&this.L.release(),this.l&&this.l.release(),this.M&&(this.M.stop(),this.M=null),this.P&&(this.P.stop(),this.P=null),this.j.destroy()},h.wf=function(){return this.j};function sE(e,t){var n;G(function(r){if(r.g==1)return Wv(e),_(r,dE(e,t),2);n=r.h,n.length?Lp(e,n):ft("Unsupported HLS interstitial",t),le(r)})}function aE(e,t){var n=pn(t.eventNode,"OverlayEvent"),r=n.attributes.uri,i=n.attributes.mimeType,o=n.attributes.loop=="true";if(r&&i){var a={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},f=pn(n,"Viewport"),p=pn(n,"TopLeft");if(n=pn(n,"Size"),f&&p&&n){if(a=rt(f,"x",sr),a==null||(f=rt(f,"y",sr),f==null))return;var g=rt(p,"x",sr);if(g==null||(p=rt(p,"y",sr),p==null))return;var m=rt(n,"x",sr);if(m==null||(n=rt(n,"y",sr),n==null))return;a={viewport:{x:a,y:f},topLeft:{x:g,y:p},size:{x:m,y:n}}}Lp(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:r,mimeType:i,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:o,overlay:a}])}}h.addAdUrlInterstitial=function(e){var t=this,n,r,i,o,a,f,p,g,m;return G(function(w){switch(w.g){case 1:return n={type:12},_(w,Xv(t,e,n),2);case 2:if(r=w.h,i=Gl(r,"VAST,vmap:VMAP"),!i)throw new Y(2,10,10007);if(o=[],i.tagName=="VAST"){o=$1(i,t.m),w.u(3);break}if(i.tagName!="vmap:VMAP"){w.u(3);break}for(var E=[],C=I(bt(i,"vmap:AdBreak")),P=C.next();!P.done;P=C.next()){var L=P.value,M=L.attributes.timeOffset;M&&(P=null,M=="start"?P=0:M=="end"?P=1/0:P=li(M),(L=pn(L,"vmap:AdSource"))&&(L=pn(L,"vmap:AdTagURI"))&&(L=sn(L))&&E.push({time:P,uri:L}))}a=I(E),f=a.next();case 5:if(f.done){w.u(3);break}return p=f.value,_(w,Xv(t,p.uri,n),8);case 8:if(g=w.h,m=Gl(g,"VAST"),!m)throw new Y(2,10,10007);o.push.apply(o,ee($1(m,p.time))),f=a.next(),w.u(5);break;case 3:Lp(t,o),le(w)}})};function Lp(e,t){var n,r,i,o,a,f,p,g;G(function(m){switch(m.g){case 1:n=!1,r=I(t),i=r.next();case 2:if(i.done){m.u(4);break}if(o=i.value,!o.uri){ft("Missing URL in interstitial",o),m.u(3);break}if(o.mimeType){m.u(5);break}return pe(m,6),a=e.j.vb(),_(m,Ja(o.uri,a,e.B.getConfiguration().streaming.retryParameters),8);case 8:o.mimeType=m.h,be(m,5);break;case 6:ke(m);case 5:if(f=o.id||JSON.stringify(o),e.K.has(f)){m.u(3);break}o.loop&&!o.overlay&&ft("Loop is only supported in overlay interstitials",o),o.overlay||(n=!0),e.K.add(f),e.F.add(o),p=!1,o.pre&&e.m==null?p=!0:o.startTime!=0||o.canJump?e.m!=null&&(g=o.startTime-e.m,0<g&&10>=g&&(p=!0)):p=!0,p&&!e.C.has(o)&&eS(o)&&e.C.set(o,e.j.preload(o.uri,null,o.mimeType||void 0));case 3:i=r.next(),m.u(2);break;case 4:n&&By(e),le(m)}})}function Np(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var r=0,i=null;if(e.F.size&&e.m!=null){var o=e.h.ended,a=Array.from(e.F).sort(function(m,w){return w.startTime-m.startTime}),f=a;for(f=t?a.filter(function(m){return m.pre}):o?a.filter(function(m){return m.post}):a.filter(function(m){return!m.pre&&!m.post}),a=I(f),f=a.next();!f.done;f=a.next()){f=f.value;var p=!1;if(t)p=f.pre;else if(o)p=f.post;else if(!f.pre&&!f.post){var g=e.m-Math.round(1e3*f.startTime)/1e3;0<g&&(1>=g||!f.canJump)&&(p=!(n==null&&e.s&&!e.s.pre&&!e.s.post&&e.s.startTime>=f.startTime))}p&&(!e.s||f.startTime>=e.s.startTime)&&(r==(n||0)?i=f:i&&!f.canJump&&.001<Math.round(1e3*f.startTime)/1e3-Math.round(1e3*i.startTime)/1e3&&(i=f,r=0),r++)}}return i}function jy(e,t,n,r,i,o){o=o===void 0?0:o,e.s=t,Gv(e),!e.g.parentElement&&e.G&&e.G.appendChild(e.g),r==1&&n==1&&(n=Array.from(e.F).filter(function(a){return t.pre?a.pre==t.pre:t.post?a.post==t.post:.001>Math.abs(a.startTime-t.startTime)}).length),t.once&&(o++,e.F.delete(t),t.overlay||By(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?cE(e,t,n,r,o):ft("Unsupported interstitial",t):e.A&&t.overlay?ft("Unsupported interstitial",t):fE(e,t,n,r,i,o)}function cE(e,t,n,r,i){function o(){e.o&&(e.o.stop(),e.o=null),e.G.removeChild(p),e.i(new Te("ad-stopped"));var E=Np(e,t.pre,r-i);E?(e.l.La(),jy(e,E,n,++r,Date.now(),i)):e.I=!1}var a=t.overlay,f=t.mimeType=="text/html"?"iframe":"img",p=document.createElement(f);p.style.objectFit="contain",p.style.position="absolute",p.style.border="none",e.i(new Te("ad-started",new Map().set("ad",new Je(t,n,r)))),f=="iframe"?p.src=t.uri:(p.src=t.uri,p.onerror=function(E){e.i(new Te("ad-error",new Map().set("originalEvent",E))),o()});var g=a.viewport,m=a.topLeft;a=a.size,g.x==0&&g.y==0?(p.width=t.overlay.size.x,p.height=t.overlay.size.y,p.style.bottom="10%",p.style.left="0",p.style.right="0",p.style.width="100%",t.overlay.size.y||f!="iframe"||(p.style.height="auto")):(p.style.height=a.y/g.y*100+"%",p.style.left=m.x/g.x*100+"%",p.style.top=m.y/g.y*100+"%",p.style.width=a.x/g.x*100+"%"),e.G.appendChild(p);var w=Date.now();e.o&&e.o.stop(),e.o=new st(function(){t.playoutLimit&&(Date.now()-w)/1e3>t.playoutLimit?(e.i(new Te("ad-complete")),o()):t.endTime&&e.h.currentTime>t.endTime?(e.i(new Te("ad-complete")),o()):e.h.currentTime<t.startTime&&(e.i(new Te("ad-skipped")),o())}),t.playoutLimit&&!t.endTime?e.o.aa(t.playoutLimit):t.endTime&&e.o.Aa(.025)}function fE(e,t,n,r,i,o){var a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q;G(function(F){switch(F.g){case 1:if(a=Date.now(),e.I=!0,!e.A||r!=1){F.u(2);break}return e.i(new Te("ad-content-pause-requested",new Map().set("saveLivePosition",!0))),f=new Nt,p=function(Q){return G(function(H){if(H.g==1)return Q.state!="detach"?H.u(0):tl()?_(H,new Promise(function(Z){return new st(Z).aa(.1)}),3):H.u(3);f.resolve(),e.l.bb(e.B,"onstatechange",p),le(H)})},e.l.D(e.B,"onstatechange",p),_(F,f,2);case 2:return e.A||(e.g.style.display="",t.overlay?(e.g.loop=t.loop,g=t.overlay.viewport,m=t.overlay.topLeft,w=t.overlay.size,e.g.style.height=w.y/g.y*100+"%",e.g.style.left=m.x/g.x*100+"%",e.g.style.top=m.y/g.y*100+"%",e.g.style.width=w.x/g.x*100+"%"):(e.h.pause(),t.resumeOffset!=null&&t.resumeOffset!=0&&(e.h.currentTime+=t.resumeOffset),e.g.loop=!1,e.g.style.height="100%",e.g.style.left="0",e.g.style.top="0",e.g.style.width="100%")),E=!1,C=function(){if(!e.A&&!t.overlay&&t.resumeOffset==null)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.h.currentTime!=t.endTime&&(e.h.currentTime=t.endTime);else{var Q=Date.now();e.h.currentTime+=(Q-i)/1e3,i=Q}},P=function(Q){var H,Z;return G(function($){if($.g==1){if(C(),H=Np(e,t.pre,r-o),Q&&t.groupId)for(;H&&H.groupId==t.groupId;)r++,H=Np(e,t.pre,r-o);return e.o&&(!t.groupId||H&&H.groupId!=t.groupId)&&(e.o.stop(),e.o=null),H&&!H.overlay?$.u(2):(t.post&&(e.m=null,e.s=null),e.A?_($,e.j.detach(),4):_($,e.j.kc(),4))}$.g!=2&&(e.A&&(Z=t.resumeOffset,Z==null&&(Z=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.m||0):(Date.now()-i)/1e3),e.i(new Te("ad-content-resume-requested",new Map().set("offset",Z)))),e.i(new Te("ad-stopped")),e.l.La(),e.I=!1,e.A?By(e):(e.g.style.display="none",C(),e.h.ended||e.h.play())),Gv(e),H&&(e.i(new Te("ad-stopped")),e.l.La(),jy(e,H,n,++r,i,o)),le($)})},L=function(Q){return G(function(H){return E?H.return():(E=!0,e.i(new Te("ad-error",new Map().set("originalEvent",Q))),_(H,P(!1),0))})},M=function(){return G(function(Q){if(Q.g==1)return E?Q.return():(E=!0,_(Q,P(!1),2));e.i(new Te("ad-complete")),le(Q)})},e.V=function(){return G(function(Q){return E?Q.return():(E=!0,e.i(new Te("ad-skipped")),_(Q,P(!0),0))})},B=new $e(e.g,t,e.V,n,r,!e.A),e.A||(B.setMuted(e.h.muted),B.setVolume(e.h.volume)),e.i(new Te("ad-started",new Map().set("ad",B))),(U=B.canSkipNow())&&e.i(new Te("ad-skip-state-changed")),e.l.la(e.j,"error",L),e.l.D(e.g,"timeupdate",function(){if(e.g.duration){var Q=B.canSkipNow();U!=Q&&0<B.getRemainingTime()&&0<B.getDuration()&&e.i(new Te("ad-skip-state-changed")),U=Q}}),e.l.la(e.j,"firstquartile",function(){C(),e.i(new Te("ad-first-quartile"))}),e.l.la(e.j,"midpoint",function(){C(),e.i(new Te("ad-midpoint"))}),e.l.la(e.j,"thirdquartile",function(){C(),e.i(new Te("ad-third-quartile"))}),e.l.la(e.j,"complete",M),e.l.D(e.g,"play",function(){e.i(new Te("ad-resumed"))}),e.l.D(e.g,"pause",function(){var Q=e.j.getConfiguration();e.g.currentTime>=Q.playRangeEnd?M():e.i(new Te("ad-paused"))}),e.l.D(e.g,"volumechange",function(){e.g.muted?e.i(new Te("ad-muted")):e.i(new Te("ad-volume-changed"))}),pe(F,4),Wv(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(K=t.endTime-t.startTime,0<K&&e.j.configure("playRangeEnd",K)),t.playoutLimit&&!e.o&&(e.o=new st(function(){e.V()}).aa(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),_(F,e.j.Xb(e.g),6);case 6:return e.C.has(t)?_(F,e.C.get(t),10):_(F,e.j.load(t.uri,null,t.mimeType||void 0),8);case 10:return W=F.h,e.C.delete(t),W?_(F,e.j.load(W),8):_(F,e.j.load(t.uri,null,t.mimeType||void 0),8);case 8:X=(Date.now()-a)/1e3,e.i(new Te("ads-loaded",new Map().set("loadTime",X))),e.A&&e.h.play(),be(F,0);break;case 4:if(q=ke(F),!e.I)return F.return();L(q),le(F)}})}function dE(e,t){var n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve,Ce,_e,Ve,yt,pt,ze,Kt,Pt,ot,Yt;return G(function(qt){switch(qt.g){case 1:if(n=[],!t||(r=t.values.find(function(lt){return lt.key=="X-ASSET-URI"}),i=t.values.find(function(lt){return lt.key=="X-ASSET-LIST"}),!r&&!i))return qt.return(n);if(o=null,(a=t.values.find(function(lt){return lt.key=="ID"}))&&(o=a.data),f=o==null?Math.floor(10*t.startTime)/10:t.startTime,(p=t.endTime)&&t.endTime!=1/0&&typeof t.endTime=="number"&&(p=o==null?Math.floor(10*t.endTime)/10:t.endTime),g=t.values.find(function(lt){return lt.key=="X-RESTRICT"}),w=m=!0,g&&g.data&&(E=g.data,m=!E.includes("SKIP"),w=!E.includes("JUMP")),C=m?0:null,(P=t.values.find(function(lt){return lt.key=="X-ENABLE-SKIP-AFTER"}))&&(L=P.data,C=parseFloat(L),isNaN(C)&&(C=m?0:null)),M=null,(B=t.values.find(function(lt){return lt.key=="X-ENABLE-SKIP-FOR"}))&&(U=B.data,M=parseFloat(U),isNaN(C)&&(M=null)),K=null,(W=t.values.find(function(lt){return lt.key=="X-RESUME-OFFSET"}))&&(X=W.data,K=parseFloat(X),isNaN(K)&&(K=null)),q=null,(F=t.values.find(function(lt){return lt.key=="X-PLAYOUT-LIMIT"}))&&(Q=F.data,q=parseFloat(Q),isNaN(q)&&(q=null)),$=Z=H=!1,(ue=t.values.find(function(lt){return lt.key=="CUE"}))&&(de=ue.data,H=de.includes("ONCE"),Z=de.includes("PRE"),$=de.includes("POST")),ie=!1,(ce=t.values.find(function(lt){return lt.key=="X-TIMELINE-OCCUPIES"}))?(Se=ce.data,ie=Se.includes("RANGE")):!W&&e.B.T()&&(ie=!Z&&!$),r){if(ve=r.data,!ve)return qt.return(n);n.push({id:o,groupId:null,startTime:f,endTime:p,uri:ve,mimeType:null,isSkippable:m,skipOffset:C,skipFor:M,canJump:w,resumeOffset:K,playoutLimit:q,once:H,pre:Z,post:$,timelineRange:ie,loop:!1,overlay:null}),qt.u(2);break}if(!i){qt.u(2);break}return Ce=i.data,Ce?(pe(qt,4),_e={type:11},_(qt,Xv(e,Ce,_e),6)):qt.return(n);case 6:for(Ve=qt.h,yt=Qt(Ve),pt=JSON.parse(yt),(ze=pt["SKIP-CONTROL"])&&(Kt=ze["ENABLE-SKIP-AFTER"],typeof Kt=="number"&&(C=parseFloat(Kt),isNaN(Kt)&&(C=m?0:null)),Pt=ze["ENABLE-SKIP-FOR"],typeof Pt=="number"&&(M=parseFloat(Pt),isNaN(Pt)&&(M=null))),ot=0;ot<pt.ASSETS.length;ot++)Yt=pt.ASSETS[ot],Yt.URI&&n.push({id:o+"_shaka_asset_"+ot,groupId:o,startTime:f,endTime:p,uri:Yt.URI,mimeType:null,isSkippable:m,skipOffset:C,skipFor:M,canJump:w,resumeOffset:K,playoutLimit:q,once:H,pre:Z,post:$,timelineRange:ie,loop:!1,overlay:null});be(qt,2);break;case 4:ke(qt);case 2:return qt.return(n)}})}function By(e){for(var t=[],n=I(e.F),r=n.next(),i={};!r.done;i={Wb:void 0},r=n.next())r=r.value,r.overlay||(i.Wb={start:r.startTime,end:null},r.pre?(i.Wb.start=0,i.Wb.end=null):r.post?(i.Wb.start=-1,i.Wb.end=null):r.timelineRange&&(i.Wb.end=r.endTime),t.find(function(o){return function(a){return o.Wb.start==a.start&&o.Wb.end==a.end}}(i))||t.push(i.Wb));e.i(new Te("ad-cue-points-changed",new Map().set("cuepoints",t)))}function Wv(e){e.j.configure(e.B.Mg()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),Qr(e.B.vb(),e.j.vb())}function Xv(e,t,n){var r,i,o;return G(function(a){return a.g==1?(r=wt([t],Di()),i=e.B.vb().request(7,r,n),_(a,i.promise,2)):(o=a.h,a.return(o.data))})}function eS(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function We(e,t,n,r,i){this.h=e,this.j=li(this.h.skipOffset),this.g=i,this.i=t,this.l=n,this.o=r,this.m=!1}h=We.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!1},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return this.h.durationInSeconds},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},h.isPaused=function(){return this.g.paused},h.isSkippable=function(){return typeof this.j=="number"},h.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},h.canSkipNow=function(){return this.getTimeUntilSkippable()==0},h.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},h.pause=function(){return this.g.pause()},h.play=function(){return this.g.play()},h.getVolume=function(){return this.g.volume},h.setVolume=function(e){this.g.volume=e},h.isMuted=function(){return this.g.muted},h.isLinear=function(){return this.o},h.resize=function(){},h.setMuted=function(e){this.g.muted=e},h.getSequenceLength=function(){return this.l?this.l:1},h.getPositionInSequence=function(){return this.i?this.i:1},h.getTitle=function(){return this.h.adTitle},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getAdId=function(){return this.h.adId},h.getCreativeAdId=function(){return this.h.creativeId},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return null},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){this.l=this.i=this.g=this.h=null},Me("shaka.ads.MediaTailorAd",We),We.prototype.release=We.prototype.release,We.prototype.getPodIndex=We.prototype.getPodIndex,We.prototype.getTimeOffset=We.prototype.getTimeOffset,We.prototype.getMediaUrl=We.prototype.getMediaUrl,We.prototype.getAdvertiserName=We.prototype.getAdvertiserName,We.prototype.getCreativeAdId=We.prototype.getCreativeAdId,We.prototype.getAdId=We.prototype.getAdId,We.prototype.getVastMediaWidth=We.prototype.getVastMediaWidth,We.prototype.getVastMediaHeight=We.prototype.getVastMediaHeight,We.prototype.getVastMediaBitrate=We.prototype.getVastMediaBitrate,We.prototype.getDescription=We.prototype.getDescription,We.prototype.getTitle=We.prototype.getTitle,We.prototype.getPositionInSequence=We.prototype.getPositionInSequence,We.prototype.getSequenceLength=We.prototype.getSequenceLength,We.prototype.setMuted=We.prototype.setMuted,We.prototype.resize=We.prototype.resize,We.prototype.isLinear=We.prototype.isLinear,We.prototype.isMuted=We.prototype.isMuted,We.prototype.setVolume=We.prototype.setVolume,We.prototype.getVolume=We.prototype.getVolume,We.prototype.play=We.prototype.play,We.prototype.pause=We.prototype.pause,We.prototype.skip=We.prototype.skip,We.prototype.canSkipNow=We.prototype.canSkipNow,We.prototype.getTimeUntilSkippable=We.prototype.getTimeUntilSkippable,We.prototype.isSkippable=We.prototype.isSkippable,We.prototype.isPaused=We.prototype.isPaused,We.prototype.getRemainingTime=We.prototype.getRemainingTime,We.prototype.getMinSuggestedDuration=We.prototype.getMinSuggestedDuration,We.prototype.getDuration=We.prototype.getDuration,We.prototype.isUsingAnotherMediaElement=We.prototype.isUsingAnotherMediaElement,We.prototype.isClientRendering=We.prototype.isClientRendering,We.prototype.needsSkipUI=We.prototype.needsSkipUI;function _p(e,t,n,r){this.B=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=r,this.I=!1,this.A=null,this.j=[],this.M=[],this.L=this.C=this.g=null,this.F=new Map,this.m=[],this.s=[],this.G="",this.O=!0,this.H="",this.o=new At}_p.prototype.stop=function(){for(var e=I(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.bb(t.target,t.type,t.listener);Pf(this),this.m=[],this.s=[],this.G="",this.O=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},_p.prototype.release=function(){this.stop(),this.o&&this.o.release()},_p.prototype.onManifestUpdated=function(e){this.I=e,this.G!=""&&(hE(this,this.G,this.O),this.O=!1)},_p.prototype.getCuePoints=function(){for(var e=[],t=I(this.j),n=t.next();!n.done;n=t.next()){n=I(n.value.ads);for(var r=n.next();!r.done;r=n.next())r=r.value,e.push({start:r.startTimeInSeconds,end:r.startTimeInSeconds+r.durationInSeconds})}return e};function pE(e,t,n){var r,i,o,a,f,p,g,m,w,E,C,P;G(function(L){if(L.g==1)return r={type:7},i=wt([t],Di()),i.method="POST",n&&(o=JSON.stringify(n),i.body=ui(o)),a=e.K.request(7,i,r),pe(L,2),_(L,a.promise,4);if(L.g!=2){if(f=L.h,p=Qt(f.data),g=JSON.parse(p),g.manifestUrl&&g.trackingUrl)m=new hn(t),w=new hn(g.trackingUrl),e.G=m.resolve(w).toString(),E=Date.now()/1e3,C=E-e.P,e.i(new Te("ads-loaded",new Map().set("loadTime",C))),P=new hn(g.manifestUrl),e.l.resolve(m.resolve(P).toString()),e.l=null;else throw Error("Insufficient data from MediaTailor.");return be(L,0)}if(ke(L),!e.H.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,L.return();e.l.resolve(e.H),e.l=null,le(L)})}function hE(e,t,n){var r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U;G(function(K){if(K.g==1)return r={type:8},i=wt([t],Di()),o=e.K.request(7,i,r),pe(K,2),_(K,o.promise,4);if(K.g!=2){if(a=K.h,f=[],p=Qt(a.data),g=JSON.parse(p),0<g.avails.length){if(JSON.stringify(e.j)!=JSON.stringify(g.avails)){for(e.j=g.avails,m=I(e.j),w=m.next();!w.done;w=m.next())for(E=w.value,C=I(E.nonLinearAdsList),P=C.next();!P.done;P=C.next())for(L=P.value,M=I(L.nonLinearAdList),B=M.next();!B.done;B=M.next())U=B.value,yE(e,U);f=e.getCuePoints(),e.i(new Te("ad-cue-points-changed",new Map().set("cuepoints",f)))}}else e.j.length&&e.i(new Te("ad-cue-points-changed",new Map().set("cuepoints",f))),Pf(e),e.j=[];return n&&(e.I||0<f.length)&&gE(e),be(K,0)}ke(K),le(K)})}function yE(e,t){var n,r,i,o,a,f,p,g;G(function(m){if(m.g==1)return!t.staticResource||(n=tS(t),e.F.get(n))?m.return():(r={type:9},i=wt([t.staticResource],Di()),o=e.K.request(7,i,r),pe(m,2),e.F.set(n,[]),_(m,o.promise,4));if(m.g!=2)return a=m.h,f=Qt(a.data),p=JSON.parse(f),g=p.apps,e.F.set(n,g),be(m,0);ke(m),e.F.delete(n),le(m)})}function tS(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function gE(e){rS(e),e.I||(nS(e),e.o.D(e.h,"seeked",function(){nS(e)}),e.o.D(e.h,"ended",function(){Pf(e)})),e.o.D(e.h,"timeupdate",function(){rS(e)})}function nS(e){var t=e.h.currentTime;if(t!=0&&e.A==null){for(var n,r,i=I(e.j),o=i.next();!o.done;o=i.next()){o=o.value;for(var a=I(o.ads),f=a.next();!f.done;f=a.next())if(f=f.value,!r)f.startTimeInSeconds<t&&(r=f,n=o);else if(f.startTimeInSeconds<t&&f.startTimeInSeconds>r.startTimeInSeconds+r.durationInSeconds){r=f,n=o;break}}n&&r&&!e.M.includes(r.adId)&&(e.A=t,e.h.currentTime=n.startTimeInSeconds)}}function rS(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var r=e.C,i=r.startTimeInSeconds+.5*r.durationInSeconds,o=r.startTimeInSeconds+.75*r.durationInSeconds;t>=r.startTimeInSeconds+.25*r.durationInSeconds&&!e.s.includes("firstQuartile")?(e.s.push("firstQuartile"),Fr(e,"firstQuartile")):t>=i&&!e.s.includes("midpoint")?(e.s.push("midpoint"),Fr(e,"midpoint")):t>=o&&!e.s.includes("thirdQuartile")&&(e.s.push("thirdQuartile"),Fr(e,"thirdQuartile")),r=e.g.getRemainingTime(),i=e.g.getDuration(),e.g.canSkipNow()&&0<r&&0<i&&Fr(e,"skipStateChanged"),0<i&&(0>=r||r>i)&&Pf(e)}if(!e.g||!e.g.isLinear()){e:for(r=I(e.j),i=r.next();!i.done&&(i=i.value,!(e.g&&e.g.isLinear()));i=r.next())for(o=0;o<i.ads.length;o++){var a=i.ads[o],f=a.startTimeInSeconds+a.durationInSeconds;if(a.startTimeInSeconds<=t&&f>t){if(e.M.includes(a.adId)){if(e.h.ended)continue;e.h.currentTime=f;break e}Pf(e),e.L=i,e.g=new We(a,o+1,i.ads.length,!0,e.h),e.C=a,o===0&&Fr(e,"breakStart"),iS(e);break}}if(!e.g){for(r=I(e.j),i=r.next();!i.done&&(i=i.value,!e.g);i=r.next())for(o=0;o<i.nonLinearAdsList.length;o++)if(a=i.nonLinearAdsList[o],a.nonLinearAdList.length){f=i.startTimeInSeconds;var p=e.F.get(tS(a.nonLinearAdList[0]));if(f<=t&&p&&p.length){Pf(e),f=e,p=I(p);for(var g=p.next();!g.done;g=p.next())if(g=g.value,g.data.source.length){var m=document.createElement("img");m.src=g.data.source[0].url,m.style.top=(g.placeholder.top||0)+"%",m.style.height=100-(g.placeholder.top||0)+"%",m.style.left=(g.placeholder.left||0)+"%",m.style.maxWidth=100-(g.placeholder.left||0)+"%",m.style.objectFit="contain",m.style.position="absolute",f.B.appendChild(m)}e.L=i,e.g=new We(a,o+1,i.ads.length,!1,e.h),e.C=a,o===0&&Fr(e,"breakStart"),iS(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function Pf(e){if(e.g){for(;e.B.lastChild;)e.B.removeChild(e.B.firstChild);e.I||e.M.push(e.C.adId);var t=e.g.m;t!==void 0&&t?Fr(e,"skip"):Fr(e,"complete"),t=I(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.bb(n.target,n.type,n.listener);e.m=[],e.s=[],t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&Fr(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function iS(e){var t=!1;e.h.paused?t=!0:(Fr(e,"impression"),Fr(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&Fr(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||Fr(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(Fr(e,"impression"),Fr(e,"start"),t=!1):Fr(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){Fr(e,"pause")}});for(var n=I(e.m),r=n.next();!r.done;r=n.next())r=r.value,e.o.D(r.target,r.type,r.listener)}function Fr(e,t){var n=e.C.trackingEvents.find(function(o){return o.eventType==t});if(n||(n=e.L.adBreakTrackingEvents.find(function(o){return o.eventType==t})),n){var r={type:10};n=I(n.beaconUrls);for(var i=n.next();!i.done;i=n.next())(i=i.value)&&i!=""&&(i=wt([i],Di()),i.method="POST",e.K.request(7,i,r))}switch(t){case"impression":e.i(new Te("ad-impression"));break;case"start":e.i(new Te("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new Te("ad-muted"));break;case"unmute":e.i(new Te("ad-volume-changed"));break;case"resume":e.i(new Te("ad-resumed"));break;case"pause":e.i(new Te("ad-paused"));break;case"firstQuartile":e.i(new Te("ad-first-quartile"));break;case"midpoint":e.i(new Te("ad-midpoint"));break;case"thirdQuartile":e.i(new Te("ad-third-quartile"));break;case"complete":e.i(new Te("ad-complete")),e.i(new Te("ad-stopped"));break;case"skip":e.i(new Te("ad-skipped")),e.i(new Te("ad-stopped"));break;case"breakStart":e.B.setAttribute("ad-active","true");break;case"breakEnd":e.B.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new Te("ad-skip-state-changed"))}}function Qe(e,t){this.g=e,this.i=null,this.h=t}h=Qe.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!1},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return this.i?this.i.duration:-1},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},h.isPaused=function(){return this.h.paused},h.isSkippable=function(){return this.g.isSkippable()},h.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},h.canSkipNow=function(){return this.getTimeUntilSkippable()==0},h.skip=function(){this.h.currentTime+=this.getRemainingTime()},h.pause=function(){return this.h.pause()},h.play=function(){return this.h.play()},h.getVolume=function(){return this.h.volume},h.setVolume=function(e){this.h.volume=e},h.isMuted=function(){return this.h.muted},h.isLinear=function(){return!0},h.resize=function(){},h.setMuted=function(e){this.h.muted=e},h.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},h.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},h.getTitle=function(){return this.g.getTitle()},h.getDescription=function(){return this.g.getDescription()},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},h.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},h.getAdId=function(){return this.g.getAdId()},h.getCreativeAdId=function(){return this.g.getCreativeAdId()},h.getAdvertiserName=function(){return this.g.getAdvertiserName()},h.getMediaUrl=function(){return null},h.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},h.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},h.release=function(){this.h=this.i=this.g=null},Me("shaka.ads.ServerSideAd",Qe),Qe.prototype.release=Qe.prototype.release,Qe.prototype.getPodIndex=Qe.prototype.getPodIndex,Qe.prototype.getTimeOffset=Qe.prototype.getTimeOffset,Qe.prototype.getMediaUrl=Qe.prototype.getMediaUrl,Qe.prototype.getAdvertiserName=Qe.prototype.getAdvertiserName,Qe.prototype.getCreativeAdId=Qe.prototype.getCreativeAdId,Qe.prototype.getAdId=Qe.prototype.getAdId,Qe.prototype.getVastMediaWidth=Qe.prototype.getVastMediaWidth,Qe.prototype.getVastMediaHeight=Qe.prototype.getVastMediaHeight,Qe.prototype.getVastMediaBitrate=Qe.prototype.getVastMediaBitrate,Qe.prototype.getDescription=Qe.prototype.getDescription,Qe.prototype.getTitle=Qe.prototype.getTitle,Qe.prototype.getPositionInSequence=Qe.prototype.getPositionInSequence,Qe.prototype.getSequenceLength=Qe.prototype.getSequenceLength,Qe.prototype.setMuted=Qe.prototype.setMuted,Qe.prototype.resize=Qe.prototype.resize,Qe.prototype.isLinear=Qe.prototype.isLinear,Qe.prototype.isMuted=Qe.prototype.isMuted,Qe.prototype.setVolume=Qe.prototype.setVolume,Qe.prototype.getVolume=Qe.prototype.getVolume,Qe.prototype.play=Qe.prototype.play,Qe.prototype.pause=Qe.prototype.pause,Qe.prototype.skip=Qe.prototype.skip,Qe.prototype.canSkipNow=Qe.prototype.canSkipNow,Qe.prototype.getTimeUntilSkippable=Qe.prototype.getTimeUntilSkippable,Qe.prototype.isSkippable=Qe.prototype.isSkippable,Qe.prototype.isPaused=Qe.prototype.isPaused,Qe.prototype.getRemainingTime=Qe.prototype.getRemainingTime,Qe.prototype.getMinSuggestedDuration=Qe.prototype.getMinSuggestedDuration,Qe.prototype.getDuration=Qe.prototype.getDuration,Qe.prototype.isUsingAnotherMediaElement=Qe.prototype.isUsingAnotherMediaElement,Qe.prototype.isClientRendering=Qe.prototype.isClientRendering,Qe.prototype.needsSkipUI=Qe.prototype.needsSkipUI;function oS(e,t,n,r){var i=this;this.s=e,this.l=t,this.j=null,this.F=NaN,this.i=r,this.G=!1,this.A=this.m=this.o=null,this.B="",this.C=[],this.h=new At,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.s,e),this.i(new Te("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(o){vE(i,o)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){i.B.length?i.j.resolve(i.B):i.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),i.j=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(o){o=o.getAd(),i.m=new Qe(o,i.l),i.A&&(i.m.i=i.A),i.i(new Te("ad-started",new Map().set("ad",i.m))),i.s.setAttribute("ad-active","true")}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){i.s.removeAttribute("ad-active");var o=i.l.currentTime;i.o&&i.o>o&&(i.l.currentTime=i.o,i.o=null)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(o){i.A=o.getStreamData().adProgressData,i.m&&(i.m.i=i.A)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){i.i(new Te("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){i.i(new Te("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){i.i(new Te("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){i.i(new Te("ad-complete")),i.i(new Te("ad-stopped")),i.s.removeAttribute("ad-active"),i.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){i.i(new Te("ad-skipped")),i.i(new Te("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(o){var a=o.getStreamData();o=[],a=I(a.cuepoints);for(var f=a.next();!f.done;f=a.next())f=f.value,o.push({start:f.start,end:f.end});i.C=o,i.i(new Te("ad-cue-points-changed",new Map().set("cuepoints",o)))})}h=oS.prototype,h.configure=function(){},h.stop=function(){this.B="",this.o=null,this.C=[]},h.release=function(){this.stop(),this.h&&this.h.release()},h.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},h.getCuePoints=function(){return this.C};function vE(e,t){e.i(new Te("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.F))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.G||e.h.D(e.l,"seeked",function(){var n=e.l.currentTime;if(n!=0){e.g.streamTimeForContentTime(n);var r=e.g.previousCuePointForStreamTime(n);r&&!r.played&&(e.o=n,e.l.currentTime=r.start)}})}function Ne(){xt.call(this),this.h=this.i=this.j=this.g=null,this.m=new Y1,this.o=navigator.language,this.l=null}mt(Ne,xt),h=Ne.prototype,h.setLocale=function(e){this.o=e},h.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},h.initInterstitial=function(e,t,n){var r=this;this.g&&this.g.release(),this.g=new Z1(e,t,n,function(i){return Vy(r,i)}),this.g.configure(this.l)},h.initClientSide=function(e,t,n){var r=this;if(!T.google||!google.ima||!google.ima.AdsLoader)throw new Y(2,10,1e4);this.j&&this.j.release(),this.j=new Ny(e,t,this.o,n,function(i){return Vy(r,i)}),this.j.configure(this.l)},h.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),xt.prototype.release.call(this)},h.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new Te("ad-stopped")),this.dispatchEvent(new Te("ad-content-attach-requested")),this.m=new Y1},h.requestClientSideAds=function(e){if(!this.j)throw new Y(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.G=Date.now()/1e3,t.m.requestAds(e)},h.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new Y(1,10,10001);var t=this.j;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},h.initMediaTailor=function(e,t,n){var r=this;this.i&&this.i.release(),this.i=new _p(e,t,n,function(i){return Vy(r,i)})},h.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new Y(1,10,10005);var r=this.i;return n=n===void 0?"":n,r.l?e=Promise.reject(new Y(1,10,10004)):(r.l=new Nt,pE(r,e,t),r.H=n||"",r.P=Date.now()/1e3,e=r.l),e},h.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new Y(1,10,10005);var t=this.i;t.G=e,t.i(new Te("ads-loaded",new Map().set("loadTime",0)))},h.initServerSide=function(e,t){var n=this;if(!T.google||!google.ima||!google.ima.dai)throw new Y(2,10,10002);this.h&&this.h.release(),this.h=new oS(e,t,this.o,function(r){return Vy(n,r)}),this.h.configure(this.l)},h.requestServerSideStream=function(e,t){if(t=t===void 0?"":t,!this.h)throw new Y(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&ft('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.13.0",n=this.h,n.j?e=Promise.reject(new Y(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new Nt,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},h.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new Y(1,10,10003);(e.mpt||e.mpv)&&ft('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v4.13.0",this.h.g.replaceAdTagParameters(e)},h.getServerSideCuePoints=function(){return Rt("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},h.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},h.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:iE(e),started:e.h,playedCompletely:e.j,skipped:e.l,errors:e.i}},h.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},h.onDashTimedMetadata=function(e){this.h&&e.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},h.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},h.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},h.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&sE(this.g,n))},h.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var r=n.schemeIdUri;if(r=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||r=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,e,t),this.g){for(e=this.g,t=I(n.eventNode.children),r=t.next();!r.done;r=t.next())if(r=r.value,r.tagName=="AlternativeMPD"&&(r=r.attributes.uri)){var i=r;break}i?(t=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",r=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",(t||r)&&Lp(e,[{id:n.id,groupId:null,startTime:n.startTime,endTime:n.endTime,uri:i,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:r?0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:t&&!r,loop:!1,overlay:null}])):ft("Unsupported MPD alternate",n)}}else r=="urn:mpeg:dash:event:2012"&&n.eventNode&&pn(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&aE(this.g,n))}},h.addCustomInterstitial=function(e){if(!this.g)throw new Y(1,10,10006);Lp(this.g,[e])},h.addAdUrlInterstitial=function(e){if(!this.g)throw new Y(1,10,10006);return this.g.addAdUrlInterstitial(e)},h.getInterstitialPlayer=function(){if(!this.g)throw new Y(1,10,10006);return this.g.wf()};function Vy(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;break;case"ad-complete":e.m.j++;break;case"ad-skipped":e.m.l++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}Me("shaka.ads.AdManager",Ne),Ne.prototype.getInterstitialPlayer=Ne.prototype.getInterstitialPlayer,Ne.prototype.addAdUrlInterstitial=Ne.prototype.addAdUrlInterstitial,Ne.prototype.addCustomInterstitial=Ne.prototype.addCustomInterstitial,Ne.prototype.onDASHInterstitialMetadata=Ne.prototype.onDASHInterstitialMetadata,Ne.prototype.onHLSInterstitialMetadata=Ne.prototype.onHLSInterstitialMetadata,Ne.prototype.onCueMetadataChange=Ne.prototype.onCueMetadataChange,Ne.prototype.onHlsTimedMetadata=Ne.prototype.onHlsTimedMetadata,Ne.prototype.onDashTimedMetadata=Ne.prototype.onDashTimedMetadata,Ne.prototype.onManifestUpdated=Ne.prototype.onManifestUpdated,Ne.prototype.getStats=Ne.prototype.getStats,Ne.prototype.getCuePoints=Ne.prototype.getCuePoints,Ne.prototype.getServerSideCuePoints=Ne.prototype.getServerSideCuePoints,Ne.prototype.replaceServerSideAdTagParameters=Ne.prototype.replaceServerSideAdTagParameters,Ne.prototype.requestServerSideStream=Ne.prototype.requestServerSideStream,Ne.prototype.initServerSide=Ne.prototype.initServerSide,Ne.prototype.addMediaTailorTrackingUrl=Ne.prototype.addMediaTailorTrackingUrl,Ne.prototype.requestMediaTailorStream=Ne.prototype.requestMediaTailorStream,Ne.prototype.initMediaTailor=Ne.prototype.initMediaTailor,Ne.prototype.updateClientSideAdsRenderingSettings=Ne.prototype.updateClientSideAdsRenderingSettings,Ne.prototype.requestClientSideAds=Ne.prototype.requestClientSideAds,Ne.prototype.onAssetUnload=Ne.prototype.onAssetUnload,Ne.prototype.release=Ne.prototype.release,Ne.prototype.initClientSide=Ne.prototype.initClientSide,Ne.prototype.initInterstitial=Ne.prototype.initInterstitial,Ne.prototype.configure=Ne.prototype.configure,Ne.prototype.setLocale=Ne.prototype.setLocale,Ne.ADS_LOADED="ads-loaded",Ne.AD_STARTED="ad-started",Ne.AD_FIRST_QUARTILE="ad-first-quartile",Ne.AD_MIDPOINT="ad-midpoint",Ne.AD_THIRD_QUARTILE="ad-third-quartile",Ne.AD_COMPLETE="ad-complete",Ne.AD_STOPPED="ad-stopped",Ne.AD_SKIPPED="ad-skipped",Ne.AD_VOLUME_CHANGED="ad-volume-changed",Ne.AD_MUTED="ad-muted",Ne.AD_PAUSED="ad-paused",Ne.AD_RESUMED="ad-resumed",Ne.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Ne.CUEPOINTS_CHANGED="ad-cue-points-changed",Ne.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Ne.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Ne.AD_CLICKED="ad-clicked",Ne.AD_PROGRESS="ad-progress",Ne.AD_BUFFERING="ad-buffering",Ne.AD_IMPRESSION="ad-impression",Ne.AD_DURATION_CHANGED="ad-duration-changed",Ne.AD_CLOSED="ad-closed",Ne.AD_LOADED="ad-loaded",Ne.ALL_ADS_COMPLETED="all-ads-completed",Ne.AD_LINEAR_CHANGED="ad-linear-changed",Ne.AD_METADATA="ad-metadata",Ne.AD_RECOVERABLE_ERROR="ad-recoverable-error",Ne.AD_ERROR="ad-error",Ne.AD_BREAK_READY="ad-break-ready",Ne.AD_INTERACTION="ad-interaction",Ne.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",Ne.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",Ne.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",Ly=function(){return new Ne};function uS(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(n instanceof Event||n instanceof Te){var r={};for(i in n)(t=n[i])&&typeof t=="object"?i=="detail"&&(r[i]=t):i in Event||(r[i]=t);return r}if(n instanceof Error){var i=new Set(["name","message","stack"]);for(r in n)i.add(r);for(r=I(Object.getOwnPropertyNames(n)),t=r.next();!t.done;t=r.next())i.add(t.value);for(r={},i=I(i),t=i.next();!t.done;t=i.next())t=t.value,r[t]=n[t];n={__type__:"Error",contents:r}}else if(n instanceof TimeRanges){for(i={__type__:"TimeRanges",length:n.length,start:[],end:[]},n=I(ju(n)),r=n.next();!r.done;r=n.next())r=r.value,t=r.end,i.start.push(r.start),i.end.push(t);n=i}else n=ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(n)}:typeof n=="number"?isNaN(n)?"NaN":isFinite(n)?n:0>n?"-Infinity":"Infinity":n;return n}})}function Yv(e){return JSON.parse(e,function(t,n){if(n=="NaN")var r=NaN;else if(n=="-Infinity")r=-1/0;else if(n=="Infinity")r=1/0;else if(n&&typeof n=="object"&&n.__type__=="TimeRanges")r=mE(n);else if(n&&typeof n=="object"&&n.__type__=="Uint8Array")r=new Uint8Array(n.entries);else if(n&&typeof n=="object"&&n.__type__=="Error"){t=n.contents,n=Error(t.message);for(r in t)n[r]=t[r];r=n}else r=n;return r})}function mE(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var lS="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),SE="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),$v=["loop","playbackRate"],wE=["pause","play"],Fy={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1,isEnded:1},Ky={getConfiguration:4,getConfigurationForLowLatency:4,getStats:5,getTextTracks:2,getVariantTracks:2},Jv={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},sS=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],aS=[["isTextTrackVisible","setTextTrackVisibility"]],TE="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),xE=["attach","attachCanvas","detach","load","unload"];function Qv(e,t,n,r,i,o,a){var f=this;this.G=e,this.K=a,this.l=new st(t),this.L=n,this.s=!1,this.A=r,this.F=i,this.M=o,this.h=this.m=!1,this.I="",this.o=null,this.B=function(){return Zv(f)},this.C=function(p,g){switch(p=Yv(g),p.type){case"event":var m=p.targetName,w=ko(p.event);f.A(m,w);break;case"update":m=p.update;for(w in m){p=f.g[w]||{};for(var E in m[w])p[E]=m[w][E]}f.s&&(f.L(),f.s=!1);break;case"asyncComplete":if(w=p.id,E=p.error,p=f.i[w],delete f.i[w],p)if(E){w=new Y(E.severity,E.category,E.code);for(m in E)w[m]=E[m];p.reject(w)}else p.resolve()}},this.g={video:{},player:{}},this.H=0,this.i={},this.j=null,jp.add(this)}h=Qv.prototype,h.destroy=function(){return jp.delete(this),em(this),Bo&&fS(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.h=this.m=!1,this.C=this.B=this.j=this.i=this.g=this.o=null,Promise.resolve()},h.ob=function(){return this.h},h.Rf=function(){return this.I},h.init=function(){if(this.G.length)if(T.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.Hb();var e=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=I(jp),r=n.next();!r.done;r=n.next()){r=r.value;var i=t;r.j=new Nt,r.s=!0,Hy(r,i)}},function(t){for(var n=I(jp),r=n.next();!r.done;r=n.next())r=r.value,qy=t=="available",r.l.Hb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),qy&&this.l.aa(EE),(e=Bo)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Nt,this.s=!0,Hy(this,e)):Bo=null}else T.__onGCastApiAvailable!==dS&&(zy=T.__onGCastApiAvailable||null,T.__onGCastApiAvailable=dS)},h.Zf=function(e){this.o=e,this.h&&Up(this,{type:"appData",appData:this.o})},h.cast=function(){var e=this;return G(function(t){if(!e.m)throw new Y(1,8,8e3);if(!qy)throw new Y(1,8,8001);if(e.h)throw new Y(1,8,8002);return e.j=new Nt,chrome.cast.requestSession(function(n){return Hy(e,n)},function(n){return cS(e,n)}),_(t,e.j,0)})};function IE(e){e.h&&chrome.cast.requestSession(function(t){return Hy(e,t)},function(t){return cS(e,t)})}h.Mc=function(){if(this.h){if(em(this),Bo){fS(this);try{Bo.stop(function(){},function(){})}catch{}Bo=null}Zv(this)}},h.get=function(e,t){var n=this;if(e=="video"){if(wE.includes(t))return function(){return n.hh.apply(n,[e,t].concat(ee(It.apply(0,arguments))))}}else if(e=="player"){if(Jv[t]&&!this.get("player","isLive")())return function(){};if(TE.includes(t))return function(){return n.hh.apply(n,[e,t].concat(ee(It.apply(0,arguments))))};if(xE.includes(t))return function(){return n.cj.apply(n,[e,t].concat(ee(It.apply(0,arguments))))};if(Fy[t]||Ky[t])return function(){return n.g[e][t]}}return this.g[e][t]},h.set=function(e,t,n){this.g[e][t]=n,Up(this,{type:"set",targetName:e,property:t,value:n})};function Hy(e,t){var n=e.M();Bo=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),Zv(e),Up(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function cS(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new Y(2,8,n,t))}h.hh=function(e,t){Up(this,{type:"call",targetName:e,methodName:t,args:It.apply(2,arguments)})},h.cj=function(e,t){var n=It.apply(2,arguments),r=new Nt,i=this.H.toString();this.H++,this.i[i]=r;try{Up(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:i})}catch(o){r.reject(o)}return r};function fS(e){var t=Bo;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function Zv(e){var t=Bo?Bo.status=="connected":!1;if(e.h&&!t){e.F();for(var n in e.g)e.g[n]={};em(e)}e.h=t,e.I=t?Bo.receiver.friendlyName:"",e.l.Hb()}function em(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new Y(1,7,7e3))}}function Up(e,t){t=uS(t);var n=Bo;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},rd)}catch(r){throw t=new Y(2,8,8005,r),n=new Te("error",new Map().set("detail",t)),e.A("player",n),e.Mc(),t}}var EE=.02,qy=!1,Bo=null,zy=null,jp=new Set;function dS(e){if(zy?T.__onGCastApiAvailable=zy:delete T.__onGCastApiAvailable,zy=null,e)for(var t=I(jp),n=t.next();!n.done;n=t.next())n.value.init();typeof T.__onGCastApiAvailable=="function"&&T.__onGCastApiAvailable(e)}function On(e,t,n,r){r=r===void 0?!1:r,xt.call(this);var i=this;this.i=e,this.h=t,this.m=this.o=this.j=this.s=this.l=null,this.C=n,this.B=r,this.A=new Map,this.g=new Qv(n,function(){return yS(i)},function(){return gS(i)},function(o,a){return mS(i,o,a)},function(){return vS(i)},function(){return hS(i)},r),CE(this)}mt(On,xt),h=On.prototype,h.destroy=function(e){return e&&this.g.Mc(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.s=this.l=this.i=null,xt.prototype.release.call(this),Promise.all(e)},h.zi=function(){return this.l},h.wf=function(){return this.s},h.Ph=function(){return this.g.m&&qy},h.ob=function(){return this.g.ob()},h.Rf=function(){return this.g.Rf()},h.cast=function(){var e=this;return G(function(t){return t.g==1?_(t,e.g.cast(),2):e.h?_(t,e.h.kc(),0):t.return()})},h.Zf=function(e){this.g.Zf(e)},h.rj=function(){IE(this.g)},h.Mc=function(){this.g.Mc()},h.Qh=function(e,t){t=t===void 0?!1:t;var n=this;return G(function(r){if(r.g==1)return e==n.C&&t==n.B?r.return():(n.C=e,n.B=t,n.g.Mc(),_(r,n.g.destroy(),2));n.g=null,n.g=new Qv(e,function(){return yS(n)},function(){return gS(n)},function(i,o){return mS(n,i,o)},function(){return vS(n)},function(){return hS(n)},t),n.g.init(),le(r)})};function CE(e){e.g.init(),e.m=new At;for(var t=I(lS),n=t.next();!n.done;n=t.next())e.m.D(e.i,n.value,function(o){e.g.ob()||(o=ko(o),e.j.dispatchEvent(o))});for(var r in bi)e.m.D(e.h,bi[r],function(o){e.g.ob()||e.o.dispatchEvent(o)});e.l={},t={};for(var i in e.i)t={ud:t.ud},t.ud=i,Object.defineProperty(e.l,t.ud,{configurable:!1,enumerable:!0,get:function(o){return function(){return AE(e,o.ud)}}(t),set:function(o){return function(a){var f=o.ud;e.g.ob()?e.g.set("video",f,a):e.i[f]=a}}(t)});e.s={},pS(e,function(o){Object.defineProperty(e.s,o,{configurable:!1,enumerable:!0,get:function(){return PE(e,o)}})}),kE(e),e.j=new xt,e.j.xe=e.l,e.o=new xt,e.o.xe=e.s}function kE(e){var t=new Map;pS(e,function(n,r){t.has(r)?(r=t.get(r),n.length<r.length?e.A.set(n,r):e.A.set(r,n)):t.set(r,n)})}function pS(e,t){function n(p){return p=="constructor"||typeof r[p]!="function"?!1:!i.has(p)}var r=e.h,i=new Set,o;for(o in r)n(o)&&(i.add(o),t(o,r[o]));for(e=Object.getPrototypeOf(r),o=Object.getPrototypeOf({});e&&e!=o;){for(var a=I(Object.getOwnPropertyNames(e)),f=a.next();!f.done;f=a.next())f=f.value,n(f)&&(i.add(f),t(f,r[f]));e=Object.getPrototypeOf(e)}}function hS(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Nc(),startTime:null};e.i.pause();for(var n=I($v),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.i[r];for(e.i.ended||(t.startTime=e.i.currentTime),n=I(sS),r=n.next();!r.done;r=n.next()){var i=r.value;r=i[1],i=e.h[i[0]](),t.player[r]=i}for(n=I(aS),r=n.next();!r.done;r=n.next())i=r.value,r=i[1],i=e.h[i[0]](),t.playerAfterLoad[r]=i;return t}function yS(e){var t=new Te("caststatuschanged");e.dispatchEvent(t)}function gS(e){var t=new Te(e.l.paused?"pause":"play");e.j.dispatchEvent(t)}function vS(e){for(var t=I(sS),n=t.next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.h[n](r)}var i=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),t=Promise.resolve();var o=e.i.autoplay;n=null,r||(n=e.g.get("video","currentTime"));var a;(r=e.g.get("player","getTextTracks")())&&r.length&&(a=r.find(function(g){return g.active}));var f=e.g.get("player","isTextTrackVisible")();i&&(e.i.autoplay=!1,t=e.h.load(i,n));var p={};for(n=I($v),r=n.next();!r.done;r=n.next())r=r.value,p[r]=e.g.get("video",r);t.then(function(){if(e.i){for(var g=I($v),m=g.next();!m.done;m=g.next())m=m.value,e.i[m]=p[m];for(g=I(aS),m=g.next();!m.done;m=g.next()){var w=m.value;m=w[1],w=e.g.get("player",w[0])(),e.h[m](w)}e.h.sh(f),a&&e.h.Xf(a.language,a.roles,a.forced),e.i.autoplay=o,i&&e.i.play()}},function(g){g=new Map().set("detail",g),g=new Te("error",g),e.h.dispatchEvent(g)})}function AE(e,t){if(t=="addEventListener")return function(r,i,o){return e.j.addEventListener(r,i,o)};if(t=="removeEventListener")return function(r,i,o){return e.j.removeEventListener(r,i,o)};if(e.g.ob()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return e.g.ob()?e.g.get("video",t):(t=e.i[t],typeof t=="function"&&(t=t.bind(e.i)),t)}function PE(e,t){if(e.A.has(t)&&(t=e.A.get(t)),t=="addEventListener")return function(n,r,i){return e.o.addEventListener(n,r,i)};if(t=="removeEventListener")return function(n,r,i){return e.o.removeEventListener(n,r,i)};if(t=="getMediaElement")return function(){return e.l};if(t=="getSharedConfiguration")return e.g.get("player","getConfiguration");if(t=="getNetworkingEngine")return function(){return e.h.vb()};if(t=="getDrmEngine")return function(){return e.h.C};if(t=="getAdManager")return function(){return e.h.Gg()};if(t=="setVideoContainer")return function(n){return e.h.vh(n)};if(e.g.ob()){if(t=="getManifest"||t=="drmInfo")return function(){return ft(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return ft(t+"() does not work while casting!"),Promise.resolve()}}return e.g.ob()&&Object.keys(e.g.g.video).length==0&&(Fy[t]||Ky[t])||!e.g.ob()?e.h[t].bind(e.h):e.g.get("player",t)}function mS(e,t,n){e.g.ob()&&(t=="video"?e.j.dispatchEvent(n):t=="player"&&e.o.dispatchEvent(n))}Me("shaka.cast.CastProxy",On),On.prototype.changeReceiverId=On.prototype.Qh,On.prototype.forceDisconnect=On.prototype.Mc,On.prototype.suggestDisconnect=On.prototype.rj,On.prototype.setAppData=On.prototype.Zf,On.prototype.cast=On.prototype.cast,On.prototype.receiverName=On.prototype.Rf,On.prototype.isCasting=On.prototype.ob,On.prototype.canCast=On.prototype.Ph,On.prototype.getPlayer=On.prototype.wf,On.prototype.getVideo=On.prototype.zi,On.prototype.destroy=On.prototype.destroy;function mr(e,t,n,r){xt.call(this);var i=this;this.g=e,this.h=t,this.j=new At,this.H={video:e,player:t},this.F=n||function(){},this.I=r||function(o){return o},this.i=null,this.G=!1,this.o=!0,this.m=0,this.B=!1,this.A=!0,this.s=this.l=null,this.C=new st(function(){tm(i)}),DE(this)}mt(mr,xt),h=mr.prototype,h.isConnected=function(){return this.G},h.Gi=function(){return this.o},h.nj=function(e){this.i=e},h.Uh=function(){this.i=null},h.oj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},h.mj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},h.lj=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},h.destroy=function(){var e=this,t,n;return G(function(r){if(r.g==1)return e.j&&(e.j.release(),e.j=null),t=[],e.h&&(t.push(e.h.destroy()),e.h=null),e.C&&(e.C.stop(),e.C=null),e.g=null,e.H=null,e.F=null,e.G=!1,e.o=!0,e.l=null,e.s=null,xt.prototype.release.call(e),_(r,Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),le(r)})};function DE(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return SS(e)},t.onSenderDisconnected=function(){return SS(e)},t.onSystemVolumeChanged=function(){var i=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();i&&bl(e,{type:"update",update:{video:{volume:i.level,muted:i.muted}}},e.l),bl(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.s=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.s.onMessage=function(i){return bE(e,i)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(i){return RE(e,i)},t.start(),t=I(lS);for(var n=t.next();!n.done;n=t.next())e.j.D(e.g,n.value,function(i){return wS(e,"video",i)});for(var r in bi)e.j.D(e.h,bi[r],function(i){return wS(e,"player",i)});e.j.D(e.g,"loadeddata",function(){e.B=!0}),e.j.D(e.h,"loading",function(){e.o=!1,Df(e)}),e.j.D(e.g,"playing",function(){e.o=!1,Df(e)}),e.j.D(e.g,"pause",function(){Df(e)}),e.j.D(e.h,"unloading",function(){e.o=!0,Df(e)}),e.j.D(e.g,"ended",function(){new st(function(){e.g&&e.g.ended&&(e.o=!0,Df(e))}).aa(LE)})}function SS(e){e.m=0,e.A=!0,e.G=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,Df(e)}function Df(e){var t;G(function(n){if(n.g==1)return _(n,Promise.resolve(),2);if(!e.h)return n.return();t=new Te("caststatuschanged"),e.dispatchEvent(t),TS(e)||Ml(e),le(n)})}function OE(e,t,n){var r,i,o,a,f,p,g,m,w,E;G(function(C){switch(C.g){case 1:for(r in t.player)i=t.player[r],e.h[r](i);return e.F(n),o=e.g.autoplay,t.manifest?(e.g.autoplay=!1,pe(C,5),_(C,e.h.load(t.manifest,t.startTime),7)):_(C,Promise.resolve(),3);case 7:be(C,3);break;case 5:return a=ke(C),f=new Map().set("detail",a),p=new Te("error",f),e.h&&e.h.dispatchEvent(p),C.return();case 3:if(!e.h)return C.return();for(g in t.video)m=t.video[g],e.g[g]=m;for(w in t.playerAfterLoad)E=t.playerAfterLoad[w],e.h[w](E);e.g.autoplay=o,t.manifest&&(e.g.play(),Ml(e)),le(C)}})}function wS(e,t,n){e.h&&(tm(e),bl(e,{type:"event",targetName:t,event:n},e.l))}function tm(e){e.C.aa(ME);for(var t={video:{},player:{}},n=I(SE),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.g[r];if(e.h.T())for(var i in Jv)e.m%Jv[i]==0&&(t.player[i]=e.h[i]());for(var o in Fy)e.m%Fy[o]==0&&(t.player[o]=e.h[o]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),bl(e,{type:"update",update:t},e.l);for(var a in Ky)e.m%Ky[a]==0&&(t={player:{}},t.player[a]=e.h[a](),bl(e,{type:"update",update:t},e.l));e.B&&(e.m+=1),TS(e)}function TS(e){return e.A&&(e.g.duration||e.h.T())?(nm(e),e.A=!1,!0):!1}function nm(e,t){var n={contentId:e.h.Nc(),streamType:e.h.T()?"LIVE":"BUFFERED",contentType:""};e.h.T()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),Ml(e,t===void 0?0:t,n)}function RE(e,t){var n=Yv(t.data);switch(n.type){case"init":e.m=0,e.B=!1,e.A=!0,OE(e,n.initState,n.appData),tm(e);break;case"appData":e.F(n.appData);break;case"set":var r=n.targetName,i=n.property;if(n=n.value,r=="video"){if(t=cast.receiver.CastReceiverManager.getInstance(),i=="volume"){t.setSystemVolumeLevel(n);break}else if(i=="muted"){t.setSystemVolumeMuted(n);break}}e.H[r][i]=n;break;case"call":r=e.H[n.targetName],r[n.methodName].apply(r,n.args);break;case"asyncCall":r=n.targetName,i=n.methodName,r=="player"&&i=="load"&&(e.m=0,e.B=!1);var o=n.id,a=t.senderId;t=e.H[r],n=t[i].apply(t,n.args),r=="player"&&i=="load"&&(n=n.then(function(){e.A=!0})),n.then(function(){return xS(e,a,o,null)},function(f){return xS(e,a,o,f)})}}function bE(e,t){var n=Yv(t.data);switch(n.type){case"PLAY":e.g.play(),Ml(e);break;case"PAUSE":e.g.pause(),Ml(e);break;case"SEEK":t=n.currentTime;var r=n.resumeState;t!=null&&(e.g.currentTime=Number(t)),r&&r=="PLAYBACK_START"?(e.g.play(),Ml(e)):r&&r=="PLAYBACK_PAUSE"&&(e.g.pause(),Ml(e));break;case"STOP":e.h.kc().then(function(){e.h&&Ml(e)});break;case"GET_STATUS":nm(e,Number(n.requestId));break;case"VOLUME":r=n.volume,t=r.level,r=r.muted;var i=e.g.volume,o=e.g.muted;t!=null&&(e.g.volume=Number(t)),r!=null&&(e.g.muted=r),i==e.g.volume&&o==e.g.muted||Ml(e);break;case"LOAD":e.m=0,e.B=!1,e.A=!1,t=n.media,r=n.currentTime,i=e.I(t.contentId),o=n.autoplay||!0,e.F(t.customData),o&&(e.g.autoplay=!0),e.h.load(i,r).then(function(){e.h&&nm(e)}).catch(function(a){var f="LOAD_FAILED";a.category==7&&a.code==7e3&&(f="LOAD_CANCELLED"),bl(e,{requestId:Number(n.requestId),type:f},e.s)});break;default:bl(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.s)}}function xS(e,t,n,r){e.h&&bl(e,{type:"asyncComplete",id:n,error:r},e.l,t)}function bl(e,t,n,r){e.G&&(e=uS(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function Ml(e,t,n){n=n===void 0?null:n;var r={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?NE:e.h.Cf()?UE:e.g.paused?jE:_E,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(r.media=n),bl(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[r]},e.s)}Me("shaka.cast.CastReceiver",mr),mr.prototype.destroy=mr.prototype.destroy,mr.prototype.setContentArtist=mr.prototype.lj,mr.prototype.setContentImage=mr.prototype.mj,mr.prototype.setContentTitle=mr.prototype.oj,mr.prototype.clearContentMetadata=mr.prototype.Uh,mr.prototype.setContentMetadata=mr.prototype.nj,mr.prototype.isIdle=mr.prototype.Gi,mr.prototype.isConnected=mr.prototype.isConnected;var ME=.5,LE=5,NE="IDLE",_E="PLAYING",UE="BUFFERING",jE="PAUSED";function IS(e,t,n,r,i){if(r>=i)return null;for(var o=-1,a=-1,f=0;f<n.length;f++)if(n[f].some(function(W){return W!=null&&W.g.trim()!=""})){o=f;break}for(f=n.length-1;0<=f;f--)if(n[f].some(function(W){return W!=null&&W.g.trim()!=""})){a=f;break}if(o===-1||a===-1)return null;for(var p=f=!1,g="white",m="black",w=rm(r,i,f,p,g,m);o<=a;o++){for(var E=n[o],C=-1,P=-1,L=0;L<E.length;L++)if(E[L]!=null&&E[L].g.trim()!==""){C=L;break}for(L=E.length-1;0<=L;L--)if(E[L]!=null&&E[L].g.trim()!==""){P=L;break}if(C===-1||P===-1)E=ES(r,i),e.nestedCues.push(E);else{for(;C<=P;C++)if(L=E[C]){var M=L.l,B=L.i,U=L.j,K=L.h;(M!=f||B!=p||U!=g||K!=m)&&(w.payload&&e.nestedCues.push(w),w=rm(r,i,M,B,U,K),f=M,p=B,g=U,m=K),w.payload+=L.g}else w.payload+=" ";w.payload&&e.nestedCues.push(w),o!==a&&(w=ES(r,i),e.nestedCues.push(w)),w=rm(r,i,f,p,g,m)}}return e.nestedCues.length?{cue:e,stream:t}:null}function rm(e,t,n,r,i,o){return e=new zt(e,t,""),n&&e.textDecoration.push(Ho),r&&(e.fontStyle=Jl),e.color=i,e.backgroundColor=o,e}function ES(e,t){return e=new zt(e,t,""),e.lineBreak=!0,e}function CS(e,t,n,r,i){this.g=e,this.l=t,this.i=n,this.h=r,this.j=i}function im(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.B=t,this.j=this.m=!1,this.l="white",this.o="black",this.s=this.A=null,Bp(this)}function Gy(e,t,n){var r="CC"+((e.C<<1|e.B)+1),i=new zt(t,n,"");i.lineInterpretation=1;var o=PS.get(e.g);return o&&(i.line=o),e.s!=null&&e.A!=null&&(i.position=10+Math.min(70,10*e.s)+2.5*e.A),(t=IS(i,r,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(o=PS.get(e.g+3-t.cue.nestedCues.length))&&(i.line=o),t}function Bp(e){Ll(e,0,15),e.g=1}function Of(e,t,n){if(!(32>n||127<n)){var r="";switch(t){case 0:r=AS.has(n)?AS.get(n):String.fromCharCode(n);break;case 1:r=BE.get(n);break;case 2:e.i[e.g].pop(),r=VE.get(n);break;case 3:e.i[e.g].pop(),r=FE.get(n)}r&&e.i[e.g].push(new CS(r,e.m,e.j,e.o,e.l))}}function kS(e,t,n,r){if(!(0>n||0>t))if(t>=n)for(--r;0<=r;r--)e.i[t+r]=e.i[n+r].map(function(o){return o});else for(var i=0;i<r;i++)e.i[t+i]=e.i[n+i].map(function(o){return o})}function Ll(e,t,n){for(var r=0;r<=n;r++)e.i[t+r]=[]}var AS=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),BE=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),VE=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),FE=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]),PS=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Wy(e,t){this.h=0,this.o=new im(e,t),this.i=new im(e,t),this.g=this.j=new im(e,t),this.l=0,this.m=null}function om(e,t,n){e.g=e.i;var r=e.g,i=null;return e.h!==3&&e.h!==4&&(i=Gy(r,e.l,n),n=e.i,n.g=0<n.h?n.h:0,Ll(n,0,15),n=e.j,n.g=0<n.h?n.h:0,Ll(n,0,15),r.g=15),e.h=3,r.h=t,i}function DS(e){e.h=1,e.g=e.j,e.g.h=0}function OS(e){xi("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var KE="black green blue cyan red yellow magenta black".split(" "),RS="white green blue cyan red yellow magenta white_italics".split(" ");function um(e,t){this.I=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.s="black",lm(this)}function lm(e){e.i=[];for(var t=0;16>t;t++)e.i.push(sm())}function sm(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function Ps(e,t){bS(e)&&(e.i[e.h][e.g]=new CS(t,e.C,e.A,e.s,e.B),e.g++)}function bS(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}um.prototype.isVisible=function(){return this.l};function HE(e){for(var t=0,n=1;16>n;n++,t++)e.i[t]=e.i[n];for(n=0;1>n;n++,t++)e.i[t]=sm()}function ec(e,t,n){var r=new zt(e.j,t,"");r.textAlign=e.F===0?"left":e.F===1?"right":Io;var i=r.region;switch(e.I&&(i.id+="svc"+e.I),i.id+="win"+e.M,i.height=e.o,i.width=e.m,i.heightUnits=2,i.widthUnits=2,i.viewportAnchorX=e.H,i.viewportAnchorY=e.L,i.viewportAnchorUnits=e.K?Xn:2,e.G){case 0:i.regionAnchorX=0,i.regionAnchorY=0;break;case 1:i.regionAnchorX=50,i.regionAnchorY=0;break;case 2:i.regionAnchorX=100,i.regionAnchorY=0;break;case 3:i.regionAnchorX=0,i.regionAnchorY=50;break;case 4:i.regionAnchorX=50,i.regionAnchorY=50;break;case 5:i.regionAnchorX=100,i.regionAnchorY=50;break;case 6:i.regionAnchorX=0,i.regionAnchorY=100;break;case 7:i.regionAnchorX=50,i.regionAnchorY=100;break;case 8:i.regionAnchorX=100,i.regionAnchorY=100}return(n=IS(r,"svc"+n,e.i,e.j,t))&&(e.j=t),n}um.prototype.display=function(){this.l=!0};function qE(){this.i=[],this.h=null,this.g=0}function zE(e,t){t.type===3?(e.g=2*(t.value&63)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),e.g===0&&(e.i.push(new Vp(e.h)),e.h=null,e.g=0))}function Vp(e){this.g=0,this.h=e}Vp.prototype.ta=function(){return this.g<this.h.length},Vp.prototype.xa=function(){return this.g};function Hn(e){if(!e.ta())throw new Y(2,2,3e3);return e.h[e.g++]}Vp.prototype.skip=function(e){if(this.g+e>this.h.length)throw new Y(2,2,3e3);this.g+=e},Vp.prototype.jh=function(e){if(0>this.g-e)throw new Y(2,2,3e3);this.g-=e};function GE(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function WE(e,t,n,r){if(!e.g)return[];if(n==24)return n=Hn(t).value,r=Hn(t).value,n=function(o){return o.map(function(a){return("0"+(a&255).toString(16)).slice(-2)}).join("")}([n,r]),Ps(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var i=null;switch(n){case 8:!bS(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(i=ec(t,r,e.i)),t.h+1>=t.o?HE(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(i=ec(t,r,e.i)),t.i[t.h]=sm(),t.g=0;break;case 12:t.isVisible()&&(i=ec(t,r,e.i)),lm(t),t.h=0,t.g=0}return i?[i]:[]}function XE(e,t,n,r){if(128<=n&&135>=n)r=n&7,e.h[r]&&(e.g=e.h[r]);else{if(n===136){n=Hn(t).value,t=[],n=I(Fp(e,n));for(var i=n.next();!i.done;i=n.next()){if(i=e.h[i.value],i.isVisible()){var o=ec(i,r,e.i);o&&t.push(o)}lm(i)}return t}if(n===137)for(t=Hn(t).value,t=I(Fp(e,t)),n=t.next();!n.done;n=t.next())n=e.h[n.value],n.isVisible()||(n.j=r),n.display();else{if(n===138){for(n=Hn(t).value,t=null,n=I(Fp(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()&&(t=ec(i,r,e.i)),i.l=!1;return t?[t]:[]}if(n===139){for(n=Hn(t).value,t=null,n=I(Fp(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()?t=ec(i,r,e.i):i.j=r,i.l=!i.l;return t?[t]:[]}if(n===140)return t=Hn(t).value,MS(e,t,r);if(n===143)return r=MS(e,255,r),LS(e),r;if(n===144)t.skip(1),r=Hn(t).value,e.g&&(e.g.A=0<(r&128),e.g.C=0<(r&64));else if(n===145)r=Hn(t).value,n=Hn(t).value,t.skip(1),e.g&&(t=NS((n&48)>>4,(n&12)>>2,n&3),e.g.B=NS((r&48)>>4,(r&12)>>2,r&3),e.g.s=t);else if(n===146)r=Hn(t).value,t=Hn(t).value,e.g&&(e=e.g,e.h=r&15,e.g=t&63);else if(n===151)t.skip(1),t.skip(1),r=Hn(t).value,t.skip(1),e.g&&(e.g.F=r&3);else if(152<=n&&159>=n){n=(n&15)-8,i=e.h[n]!==null,i||(o=new um(n,e.i),o.j=r,e.h[n]=o),r=Hn(t).value,o=Hn(t).value;var a=Hn(t).value,f=Hn(t).value,p=Hn(t).value;t=Hn(t).value,i&&(t&7)===0||(t=e.h[n],t.h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.s="black"),t=e.h[n],t.l=0<(r&32),t.L=o&127,t.H=a,t.G=(f&240)>>4,t.K=0<(o&128),t.o=(f&15)+1,t.m=(p&63)+1,e.g=e.h[n]}}}return[]}function Fp(e,t){for(var n=[],r=0;8>r;r++)(t&1)===1&&e.h[r]&&n.push(r),t>>=1;return n}function MS(e,t,n){var r=[];t=I(Fp(e,t));for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=e.h[i];o.isVisible()&&(o=ec(o,n,e.i))&&r.push(o),e.h[i]=null}return r}function LS(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function NS(e,t,n){var r={0:0,1:0,2:1,3:1};return e=r[e],t=r[t],n=r[n],YE[e<<2|t<<1|n]}var _S=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),YE="black blue green cyan red magenta yellow white".split(" ");function Rf(){this.h=[],this.g=[],this.i=new qE,this.l=0,this.m=new Map([["CC1",new Wy(0,0)],["CC2",new Wy(0,1)],["CC3",new Wy(1,0)],["CC4",new Wy(1,1)]]),this.s=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,am(this)}Rf.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,am(this),e=I(this.j.values());for(var t=e.next();!t.done;t=e.next())LS(t.value)};function am(e){e.o=0,e.s=0;for(var t=I(e.m.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,Bp(n.i),Bp(n.j),Bp(n.o);e.B=!0}Rf.prototype.extract=function(e,t){if(this.B){for(var n=I(this.m.values()),r=n.next();!r.done;r=n.next())r.value.l=t;this.B=!1}if(e=new Mt(e,0),!(8>e.getLength())&&e.U()===181&&e.ma()===49&&e.R()===1195456820&&e.U()===3&&(n=e.U(),(n&64)!==0))for(n&=31,e.skip(1),r=0;r<n;r++){var i=e.U(),o=(i&4)>>2,a=e.U(),f=e.U();o&&(i&=3,i===0||i===1?this.h.push({pts:t,type:i,lb:a,Ib:f,order:this.h.length}):(this.g.push({pts:t,type:i,value:a,order:this.g.length}),this.g.push({pts:t,type:2,value:f,order:this.g.length})))}},Rf.prototype.decode=function(){function e(i,o){return i.pts-o.pts||i.order-o.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=I(this.h),r=n.next();!r.done;r=n.next())(r=$E(this,r.value))&&t.push(r);for(n=I(this.g),r=n.next();!r.done;r=n.next())zE(this.i,r.value);for(n=I(this.i.i),r=n.next();!r.done;r=n.next())r=JE(this,r.value),t.push.apply(t,ee(r));return this.i.i=[],this.h=[],this.g=[],t};function $E(e,t){var n=t.type;if((t.lb&112)===16){var r=t.lb>>3&1;n===0?e.o=r:e.s=r}if(r="CC"+((n<<1|(n?e.s:e.o))+1),n=e.m.get(r),t.lb===255&&t.Ib===255||!t.lb&&!t.Ib||!US(t.lb)||!US(t.Ib))return 45<=++e.l&&am(e),null;e.l=0,t.lb&=127,t.Ib&=127;var i=t.lb;if(1<=i&&15>=i||!t.lb&&!t.Ib)return null;if(i=null,(t.lb&112)===16)e:{if(e.A.add(r),r=t.lb,e=t.Ib,n.m===(r<<8|e))n.m=null;else if(n.m=r<<8|e,(r&240)===16&&(e&192)===64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(r&7)<<1|e>>5&1],r="white",i=!1;var o=null,a=95<e?e-96:e-64;13>=a?r=RS[Math.floor(a/2)]:15>=a?i=!0:o=Math.floor((a-16)/2),e=(e&1)===1,n.h!==4&&(a=n.g,n.h===3&&t!==a.g&&(n=1+t-a.h,kS(a,n,1+a.g-a.h,a.h),Ll(a,0,n-1),Ll(a,t+1,15-t)),a.g=t,a.m=e,a.j=i,a.l=r,a.s=o,a.o="black")}else if((r&247)===17&&(e&240)===32)n.g.m=!1,n.g.j=!1,n.g.l="white",Of(n.g,0,32),r=!1,t=RS[(e&14)>>1],t==="white_italics"&&(t="white",r=!0),n.g.m=(e&1)===1,n.g.j=r,n.g.l=t;else if((r&247)===16&&(e&240)===32||(r&247)===23&&(e&255)===45)t="black",(r&7)===0&&(t=KE[(e&14)>>1]),n.g.o=t;else if((r&247)===17&&(e&240)===48)Of(n.g,1,e);else if((r&246)===18&&(e&224)===32)Of(n.g,r&1?3:2,e);else{if((r&246)===20&&(e&240)===32){switch(e=t.pts,r=null,t.Ib){case 32:DS(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:r=om(n,2,e);break;case 38:r=om(n,3,e);break;case 39:r=om(n,4,e);break;case 40:Of(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Bp(n.o),OS(n);break;case 43:OS(n);break;case 44:t=n.i,r=null,n.h!==4&&(r=Gy(t,n.l,e)),Ll(t,0,15);break;case 45:t=n.g,n.h!==3?r=null:(r=Gy(t,n.l,e),i=t.g-t.h+1,kS(t,i-1,i,t.h),Ll(t,0,i-1),Ll(t,t.g,15-t.g),n.l=e);break;case 46:Ll(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=Gy(n.i,n.l,e)),r=n.j,n.j=n.i,n.i=r,DS(n),n.l=e,r=t}i=r;break e}(r==23||r==31)&&33<=e&&35>=e&&(n.g.A=e-32)}i=null}else e=t.Ib,Of(n.g,0,t.lb),Of(n.g,0,e);return i}function JE(e,t){var n=[];try{for(;t.ta();){var r=Hn(t).value,i=(r&224)>>5,o=r&31;if(i===7&&o!=0&&(i=Hn(t).value&63),i!=0){e.A.add("svc"+i),e.j.has(i)||e.j.set(i,new GE(i));for(var a=e.j.get(i),f=t.xa();t.xa()-f<o;){i=a;var p=t,g=Hn(p),m=g.value,w=g.pts;if(m===16){var E=Hn(p);m=m<<16|E.value}if(0<=m&&31>=m)var C=WE(i,p,m,w);else if(128<=m&&159>=m)C=XE(i,p,m,w);else{if(4096<=m&&4127>=m)i=p,p=m&255,8<=p&&15>=p?i.skip(1):16<=p&&23>=p?i.skip(2):24<=p&&31>=p&&i.skip(3);else if(4224<=m&&4255>=m)i=p,p=m&255,128<=p&&135>=p?i.skip(4):136<=p&&143>=p&&i.skip(5);else if(32<=m&&127>=m)p=m,i.g&&(p===127?Ps(i.g,"♪"):Ps(i.g,String.fromCharCode(p)));else if(160<=m&&255>=m)i.g&&Ps(i.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(p=m&255,i.g)if(_S.has(p)){var P=_S.get(p);Ps(i.g,P)}else Ps(i.g,"_")}else 4256<=m&&4351>=m&&i.g&&((m&255)!=160?Ps(i.g,"_"):Ps(i.g,"[CC]"));C=[]}n.push.apply(n,ee(C))}}}}catch(L){if(L instanceof Y&&L.code===3e3)xi("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw L}return n}function US(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}Rf.prototype.getStreams=function(){return Array.from(this.A)},Me("shaka.cea.CeaDecoder",Rf),mo=function(){return new Rf};function jS(e){for(var t=[],n=e,r=e=0;r<n.length;)e==2&&n[r]==3?(e=0,n=[].concat(ee(n)),n.splice(r,1),n=new Uint8Array(n)):n[r]==0?e++:e=0,r++;for(e=n,r=0;r<e.length;){for(n=0;e[r]==255;)n+=255,r++;n+=e[r++];for(var i=0;e[r]==255;)i+=255,r++;i+=e[r++],n==4&&t.push(e.subarray(r,r+i)),r+=i}return t}function Xy(){this.j=new Map,this.i=this.h=0,this.g=cm}Xy.prototype.init=function(e){function t(o){o=o.name,o in Yy&&(n.g=Yy[o])}var n=this,r=[],i=[];if(new Vt().box("moov",it).box("mvex",it).S("trex",function(o){var a=o.reader;a.skip(4),a.skip(4),o=a.R(),a=a.R(),n.h=o,n.i=a}).box("trak",it).S("tkhd",function(o){var a=o.reader;o=o.version,o==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var f=a.R();o==1?a.skip(8):a.skip(4),a.skip(4),a.skip(8),a.skip(2),a.skip(2),a.skip(2),a.skip(2),a.skip(36),a.ma(),a.ma(),a.ma(),a.ma(),r.push(f)}).box("mdia",it).S("mdhd",function(o){o=Ma(o.reader,o.version),i.push(o.timescale)}).box("minf",it).box("stbl",it).S("stsd",Po).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",pr).box("sinf",it).box("frma",function(o){o=rp(o.reader).codec,o in Yy&&(n.g=Yy[o])}).parse(e,!0),!r.length||!i.length||r.length!=i.length)throw new Y(2,2,2010);this.g==cm&&ft("Unable to determine bitstream format for CEA parsing!"),r.forEach(function(o,a){n.j.set(o,i[a])})},Xy.prototype.parse=function(e){var t=this;if(this.g==cm)return[];var n=[],r=0,i=[];return new Vt().box("moof",function(o){r=o.start,i=[],it(o)}).box("traf",function(o){i.push({baseMediaDecodeTime:null,jd:t.h,Sd:t.i,bh:[],timescale:9e4}),it(o)}).S("trun",function(o){var a=i[i.length-1];o=tp(o.reader,o.version,o.flags),a.bh.push(o)}).S("tfhd",function(o){var a=i[i.length-1];o=ty(o.reader,o.flags),a.jd=o.jd||t.h,a.Sd=o.Sd||t.i,o=o.trackId,t.j.has(o)&&(a.timescale=t.j.get(o))}).S("tfdt",function(o){var a=i[i.length-1];o=ba(o.reader,o.version),a.baseMediaDecodeTime=o.baseMediaDecodeTime}).box("mdat",function(o){for(var a=r-o.start-8,f=o.reader.xa(),p=I(i),g=p.next();!g.done;g=p.next()){if(g=g.value,g.baseMediaDecodeTime===null)throw ft("Unable to find base media decode time for CEA captions!"),new Y(2,2,2010);o.reader.seek(f),QE(t,o.reader,g.baseMediaDecodeTime,g.timescale,g.jd,g.Sd,a,g.bh,n)}}).parse(e,!1),n};function QE(e,t,n,r,i,o,a,f,p){var g=0,m=o,w=f.map(function(P){return P.kh});for(w=[].concat.apply([],ee(w)),w.length&&(m=w[0].sampleSize||o),t.skip(a+f[0].Xh);t.ta();){a=t.R();var E=t.U(),C=null;switch(C=!1,f=1,e.g){case Kp:C=E&31,C=C==6;break;case Hp:f=2,t.skip(1),C=E>>1&63,C=C==39||C==40;break;case qp:f=2,t.skip(1),C=E>>1&63,C=C==23||C==24;break;default:return}if(C)for(E=0,g<w.length&&(E=w[g].se||0),E=(n+E)/r,f=I(jS(t.Ab(a-f))),C=f.next();!C.done;C=f.next())p.push({packet:C.value,pts:E});else try{t.skip(a-f)}catch{break}m-=a+4,m==0&&(n=g<w.length?n+(w[g].Wf||i):n+i,g++,g<w.length?m=w[g].sampleSize||o:m=o)}}Me("shaka.cea.Mp4CeaParser",Xy);var cm=0,Kp=1,Hp=2,qp=3,Yy={avc1:Kp,avc3:Kp,dvav:Kp,dva1:Kp,hev1:Hp,hvc1:Hp,dvh1:Hp,dvhe:Hp,vvc1:qp,vvi1:qp,dvc1:qp,dvi1:qp};Su["video/mp4"]=function(){return new Xy};function $y(){this.g=null}$y.prototype.init=function(){},$y.prototype.parse=function(e){this.g?this.g.clearData():this.g=new Xt;var t=[];if(e=Ze(e),!ws(e))return t;e=this.g.parse(e);var n=e.kd(),r=e.Zd();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(n=I(r),r=n.next();!r.done;r=n.next())if(r=r.value,e.includes(r.type)&&r.time!=null)for(var i=I(jS(r.data)),o=i.next();!o.done;o=i.next())t.push({packet:o.value,pts:r.time});return t},Me("shaka.cea.TsCeaParser",$y),Su["video/mp2t"]=function(){return new $y};function ZE(e){var t=0,n=wr(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,(i&1)!=0||i+e>n.byteLength){n=[];break e}var o=Ze(n,e,i);t.push({type:r,value:o}),e+=i}n=t}return n}function BS(e){return e=ci(sn(e)),e=ZE(e).filter(function(t){return t.type===eC})[0],e?(e=wo(e.value,!0),(e=Qi(e,"WRMHEADER"))?e:null):null}function Jy(e){try{var t=BS(e);if(t)e:{for(var n=I(xr(t,"DATA")),r=n.next();!r.done;r=n.next()){var i=r.value;if(i.children)for(var o=I(i.children),a=o.next();!a.done;a=o.next()){var f=a.value;if(f.tagName=="LA_URL"){var p=sn(f);break e}}}p=""}else p="";return p}catch{return""}}var eC=1;function VS(e,t,n){var r=rC(e),i=null;e=[];var o=[],a=null,f=new Set(r.map(function(g){return g.keyId}));f.delete(null);var p="cenc";if(1<f.size)throw new Y(2,4,4010);if(!t){if(o=r.filter(function(g){return g.Zc=="urn:mpeg:dash:sea:2012"}),1<o.length)throw new Y(2,4,4050);o.length&&(a=oC(o[0])),(o=r.find(function(g){return g.Zc=="urn:mpeg:dash:mp4protection:2011"}))&&o.encryptionScheme&&(p=o.encryptionScheme),o=r.filter(function(g){return g.Zc=="urn:mpeg:dash:mp4protection:2011"?(i=g.init||i,!1):g.Zc!="urn:mpeg:dash:sea:2012"}),o.length&&(e=nC(i,p,o,n,f),e.length==0&&(e=[Xo("",p,i)]))}if(r.length&&!a&&(t||!o.length))for(e=[],t=I(Object.values(n)),n=t.next();!n.done;n=t.next())n=n.value,n!="org.w3.clearkey"&&e.push(Xo(n,p,i));if(f=Array.from(f)[0]||null)for(p=I(e),t=p.next();!t.done;t=p.next())for(t=I(t.value.initData),n=t.next();!n.done;n=t.next())n.value.keyId=f;return{Ag:f,Bk:i,drmInfos:e,Re:a,Fg:!0}}function tC(e,t,n,r){var i=VS(e,n,r);if(t.Fg)e=t.drmInfos.length==1&&!t.drmInfos[0].keySystem,n=i.drmInfos.length==0,(t.drmInfos.length==0||e&&!n)&&(t.drmInfos=i.drmInfos),t.Fg=!1;else if(0<i.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(o){return i.drmInfos.some(function(a){return a.keySystem==o.keySystem})}),t.drmInfos.length==0))throw new Y(2,4,4008);return i.Ag||t.Ag}function Qy(e){var t=ki(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=sn(t)))return t;if((t=ki(e.node,"urn:microsoft:playready","pro"))&&sn(t))return Jy(t);if((e=ki(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=sn(e))){t=ci(e),e=8,t=wr(t);var n=t.getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),e=Ze(t,e+4),e=Pc(e),e=Qi("<pro>"+e+"</pro>"),Jy(e)}return""}function nC(e,t,n,r,i){var o=[];n=I(n);for(var a=n.next();!a.done;a=n.next()){a=a.value;var f=r[a.Zc];if(f){var p;if((p=ki(a.node,"urn:microsoft:playready","pro"))&&sn(p)){p=sn(p),p=ci(p);var g=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);p=[{initData:io(p,g,new Set,0),initDataType:"cenc",keyId:a.keyId}]}else p=null;if(g=null,a.Zc==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){g=a;var m=i;if(m.size==0)g=null;else{var w=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),E=new Uint8Array([]);g=[{initData:io(E,w,m,1),initDataType:"cenc",keyId:g.keyId}]}}p=Xo(f,t,a.init||e||p||g),(f=uC.get(f))&&(p.licenseServerUri=f(a)),o.push(p)}}return o}function rC(e){var t=[];e=I(e);for(var n=e.next();!n.done;n=e.next())(n=iC(n.value))&&t.push(n);return t}function iC(e){var t=e.attributes.schemeIdUri,n=Zi(e,"urn:mpeg:cenc:2013","default_KID"),r=na(e,"urn:mpeg:cenc:2013","pssh").map(rr),i=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),n.includes(" ")))throw new Y(2,4,4009);var o=[];try{o=r.map(function(a){return{initDataType:"cenc",initData:ci(a),keyId:null}})}catch{throw new Y(2,4,4007)}return{node:e,Zc:t,keyId:n,init:0<o.length?o:null,encryptionScheme:i}}function oC(e){if(!T.crypto||!T.crypto.subtle)throw ft("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new Y(2,4,4042);var t=ki(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new Y(2,4,4051);if(t.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new Y(2,4,4051);if(t=ki(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new Y(2,4,4051);if(e=t.attributes.IV,t=ur(t.attributes.keyUriTemplate),!e||!t)throw new Y(2,4,4051);if(e=cl(e.substr(2)),e.byteLength!=16)throw new Y(2,4,4048);return{Li:t,iv:e}}var uC=new Map().set("com.apple.fps",function(e){if(Zs())throw new Y(2,4,4054);return(e=ki(e.node,"https://dashif.org/CPS","Laurl"))&&(e=sn(e))?e:""}).set("com.widevine.alpha",function(e){var t=ki(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=sn(t))?t:(e=ki(e.node,"urn:microsoft","laurl"))&&ur(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",Qy).set("com.microsoft.playready.recommendation",Qy).set("com.microsoft.playready.software",Qy).set("com.microsoft.playready.hardware",Qy).set("org.w3.clearkey",function(e){var t=ki(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=sn(t))?t:(e=ki(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=sn(e))?e:""});function zp(e,t,n,r,i,o){var a={RepresentationID:t,Number:n,SubNumber:r,Bandwidth:i,Time:o};return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(f,p,g,m){if(f=="$$")return"$";var w=a[p];if(w==null)return f;switch(p=="RepresentationID"&&g&&(g=void 0),p=="Time"&&typeof w!="bigint"&&(.2<=Math.abs(w-Math.round(w))&&ft("Calculated $Time$ values must be close to integers"),w=Math.round(w)),m){case void 0:case"d":case"i":case"u":f=w.toString();break;case"o":f=w.toString(8);break;case"x":f=w.toString(16);break;case"X":f=w.toString(16).toUpperCase();break;default:f=w.toString()}return g=T.parseInt(g,10)||1,Array(Math.max(0,g-f.length)+1).join("0")+f})}function FS(e,t){var n=Vo(e,t,"timescale"),r=1;n&&(r=xo(n)||1),n=Vo(e,t,"duration");var i=(n=xo(n||""))?n/r:null,o=Vo(e,t,"startNumber"),a=Number(Vo(e,t,"presentationTimeOffset"))||0,f=jn(o||"");if((o==null||f==null)&&(f=1),o=null,t=bf(e,t,"SegmentTimeline")){t=bt(t,"S"),o=r,e=e.ka.duration||1/0;for(var p=f,g=[],m=-a,w=0;w<t.length;++w){var E=t[w],C=t[w+1],P=rt(E,"t",jn),L=rt(E,"d",jn),M=rt(E,"r",sr);if(E=rt(E,"k",sr)||0,P!=null&&(P-=a),L){if(P=P??m,M=M||0,0>M)if(C){if(C=rt(C,"t",jn),C==null)break;if(P>=C)break;M=Math.ceil((C-P)/L)-1}else{if(e==1/0)break;if(P/o>=e)break;M=Math.ceil((e*o-P)/L)-1}for(0<g.length&&P!=m&&(g[g.length-1].end=P/o),C=0;C<=M;++C)m=P+L,g.push({start:P/o,end:m/o,mg:P,Fb:E,jj:g.length+p}),P=m}}o=g}return{timescale:r,Ae:n,Sa:i,Hd:f,hc:a/r||0,lg:a,timeline:o}}function KS(e,t){return[t(e.J),t(e.ia),t(e.qa)].filter(to)}function Vo(e,t,n){t=KS(e,t),e=null,t=I(t);for(var r=t.next();!r.done&&!(e=r.value.attributes[n]);r=t.next());return e}function bf(e,t,n){t=KS(e,t),e=null,t=I(t);for(var r=t.next();!r.done&&!(e=pn(r.value,n));r=t.next());return e}function lC(e,t,n,r,i,o){for(var a=Zi(e,"http://www.w3.org/1999/xlink","href"),f=Zi(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",p=I(Object.keys(e.attributes)),g=p.next();!g.done;g=p.next()){g=g.value;var m=g.split(":"),w=pd("http://www.w3.org/1999/xlink");m[0]==w&&delete e.attributes[g]}if(5<=o)return Oi(new Y(2,4,4028));if(f!="onLoad")return Oi(new Y(2,4,4027));var E=Pn([r],[a]);return i.request(0,wt(E,t)).Da(function(C){if(C=Gl(C.data,e.tagName),!C)return Oi(new Y(2,4,4001,a));for(e.children=[];C.children.length;){var P=C.children.shift();e.children.push(P)}P=I(Object.keys(C.attributes));for(var L=P.next();!L.done;L=P.next())L=L.value,e.attributes[L]=C.attributes[L];return Zy(e,t,n,E[0],i,o+1)})}function Zy(e,t,n,r,i,o){if(o=o===void 0?0:o,Zi(e,"http://www.w3.org/1999/xlink","href")){var a=lC(e,t,n,r,i,o);return n&&(a=a.Da(void 0,function(){return Zy(e,t,n,r,i,o)})),a}a=[];for(var f=I(hd(e)),p=f.next(),g={};!p.done;g={ed:void 0},p=f.next())g.ed=p.value,Zi(g.ed,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter(function(m){return function(w){return w!==m.ed}}(g)):g.ed.tagName!="SegmentTimeline"&&a.push(Zy(g.ed,t,n,r,i,o));return pi(a).Da(function(){return e})}function sC(e,t,n,r,i,o,a){var f,p=new Vt().S("sidx",function(g){f=aC(t,r,i,o,a,n,g)});if(e&&p.parse(e),f)return f;throw new Y(2,3,3004)}function aC(e,t,n,r,i,o,a){var f=[];a.reader.skip(4);var p=a.reader.R();if(p==0)throw new Y(2,3,3005);if(a.version==0)var g=a.reader.R(),m=a.reader.R();else g=a.reader.Yc(),m=a.reader.Yc();a.reader.skip(2);var w=a.reader.ma();for(e=e+a.size+m,m=0;m<w;m++){var E=a.reader.R(),C=(E&2147483648)>>>31;E&=2147483647;var P=a.reader.R();if(a.reader.skip(4),C==1)throw new Y(2,3,3006);f.push(new Fe(g/p+n,(g+P)/p+n,function(){return o},e,e+E-1,t,n,r,i)),g+=P,e+=E}return a.parser.stop(),f}function Ds(e){this.h=wr(e),this.g=new Mt(this.h,0)}Ds.prototype.ta=function(){return this.g.ta()};function Nl(e){var t=HS(e);if(7<t.length)throw new Y(2,3,3002);var n=0;t=I(t);for(var r=t.next();!r.done;r=t.next())n=256*n+r.value;t=HS(e);e:{r=I(cC);for(var i=r.next();!i.done;i=r.next())if(vo(t,new Uint8Array(i.value))){r=!0;break e}r=!1}if(r)t=e.h.byteLength-e.g.xa();else{if(t.length==8&&t[1]&224)throw new Y(2,3,3001);for(i=r=0;i<t.length;i++){var o=t[i];r=i==0?o&(1<<8-t.length)-1:256*r+o}t=r}return t=e.g.xa()+t<=e.h.byteLength?t:e.h.byteLength-e.g.xa(),r=wr(e.h,e.g.xa(),t),e.g.skip(t),new fC(n,r)}function HS(e){var t=e.g.xa(),n=e.g.U();if(n==0)throw new Y(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),Ze(e.h,t,n)}var cC=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function fC(e,t){this.id=e,this.g=t}function fm(e){if(8<e.g.byteLength)throw new Y(2,3,3002);if(e.g.byteLength==8&&e.g.getUint8(0)&224)throw new Y(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){var r=e.g.getUint8(n);t=256*t+r}return t}function dC(e,t,n,r,i,o,a,f,p){function g(){return i}var m=[];e=new Ds(e.g);for(var w=null,E=null;e.ta();){var C=Nl(e);if(C.id==187){var P=pC(C);P&&(C=n*P.wj,P=t+P.aj,w!=null&&m.push(new Fe(w+a,C+a,g,E,P-1,o,a,f,p)),w=C,E=P)}}return w!=null&&m.push(new Fe(w+a,r+a,g,E,null,o,a,f,p)),m}function pC(e){var t=new Ds(e.g);if(e=Nl(t),e.id!=179)throw new Y(2,3,3013);if(e=fm(e),t=Nl(t),t.id!=183)throw new Y(2,3,3012);t=new Ds(t.g);for(var n=0;t.ta();){var r=Nl(t);if(r.id==241){n=fm(r);break}}return{wj:e,aj:n}}function qS(e,t,n){if(t=bf(e,t,"Initialization"),!t)return null;var r=e.J.Qa(),i=t.attributes.sourceURL;i&&(r=Pn(r,[ur(i)],e.rb())),i=0;var o=null;return(t=rt(t,"range",Wl))&&(i=t.start,o=t.end),n=new Ar(function(){return r},i,o,XS(e),null,null,n),n.codecs=e.J.codecs,n.mimeType=e.J.mimeType,n}function hC(e,t,n){var r=Number(Vo(e,Mf,"presentationTimeOffset"))||0,i=Vo(e,Mf,"timescale"),o=1;i&&(o=xo(i)||1);var a=r/o||0,f=qS(e,Mf,n);yC(e,f);var p=Jr(e);return{pc:function(){var g=bf(p,Mf,"RepresentationIndex"),m=p.J.Qa();return g&&(g=ur(g.attributes.sourceURL))&&(m=Pn(m,[g],p.rb())),g=GS(p),zS(p,t,f,m,g.start,g.end,a)}}}function zS(e,t,n,r,i,o,a){var f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q;return G(function(H){if(H.g==1)return f=e.presentationTimeline,p=!e.Kb||!e.ka.Sg,g=e.ka.start,m=e.ka.duration,w=e.J.mimeType.split("/")[1],E=t,C=null,P=[E(r,i,o,!1),w=="webm"?E(n.N(),n.Ma,n.va,!0):null],E=null,_(H,Promise.all(P),2);if(L=H.h,M=L[0],B=L[1]||null,U=null,K=g-a,W=g,X=m?g+m:1/0,w=="mp4")var Z=sC(M,i,r,n,K,W,X);else{Z=M;var $=new Ds(B);if(Nl($).id!=440786851)throw new Y(2,3,3008);var ue=Nl($);if(ue.id!=408125543)throw new Y(2,3,3009);$=ue.g.byteOffset,ue=new Ds(ue.g);for(var de=null;ue.ta();){var ie=Nl(ue);if(ie.id==357149030){de=ie;break}}if(!de)throw new Y(2,3,3010);for(de=new Ds(de.g),ie=1e6,ue=null;de.ta();){var ce=Nl(de);if(ce.id==2807729)ie=fm(ce);else if(ce.id==17545)if(ce.g.byteLength==4)ue=ce.g.getFloat32(0);else if(ce.g.byteLength==8)ue=ce.g.getFloat64(0);else throw new Y(2,3,3003)}if(ue==null)throw new Y(2,3,3011);if(de=ie/1e9,ue*=de,Z=Nl(new Ds(Z)),Z.id!=475249515)throw new Y(2,3,3007);Z=dC(Z,$,de,ue,r,n,K,W,X)}for(U=Z,q=I(U),F=q.next();!F.done;F=q.next())Q=F.value,Q.codecs=e.J.codecs,Q.mimeType=e.J.mimeType,Q.bandwidth=e.bandwidth;return f.Cd(U),C=new St(U),p&&C.Lc(W,X,!0),H.return(C)})}function Mf(e){return e.ad}function GS(e){var t=bf(e,Mf,"RepresentationIndex");return e=Vo(e,Mf,"indexRange"),e=Wl(e||""),t&&(e=rt(t,"range",Wl,e)),e}function yC(e,t){if(WS(e,t),!GS(e))throw new Y(2,4,4002)}function WS(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=at&&n!="mp4"&&n!="webm")throw new Y(2,4,4006);if(n=="webm"&&!t)throw new Y(2,4,4005)}function XS(e){var t=e.J;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.je,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ia.label||null,roles:e.roles||null,language:e.ia.language||null}}function gC(e,t,n){var r=qS(e,YS,n),i=vC(e);if(!i.Sa&&!i.timeline&&1<i.Uc.length)throw new Y(2,4,4002);if(!i.Sa&&!e.ka.duration&&!i.timeline&&i.Uc.length==1)throw new Y(2,4,4002);if(i.timeline&&i.timeline.length==0)throw new Y(2,4,4002);var o=null,a=null;e.qa.id&&e.J.id&&(a=t[e.qa.id+","+e.J.id])&&(o=a.segmentIndex);var f=mC(e.ka.start,e.ka.duration,e.J.Qa,i,r,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.rb);return t=!o,o?o.yd(f,e.presentationTimeline.nb()):o=new St(f),e.presentationTimeline.Cd(f),e.Kb&&e.ka.Sg||o.Lc(e.ka.start,e.ka.duration?e.ka.start+e.ka.duration:1/0,t),a&&(a.segmentIndex=o),{pc:function(){return o&&o.getNumReferences()!=0||o.fe(f),Promise.resolve(o)}}}function YS(e){return e.Vb}function vC(e){var t=SC(e);e=FS(e,YS);var n=e.Hd;n==0&&(n=1);var r=0;return e.Sa?r=e.Sa*(n-1):e.timeline&&0<e.timeline.length&&(r=e.timeline[0].start),{Sa:e.Sa,startTime:r,Hd:n,hc:e.hc,timeline:e.timeline,Uc:t}}function mC(e,t,n,r,i,o,a,f,p,g){var m=r.Uc.length;r.timeline&&r.timeline.length!=r.Uc.length&&(m=Math.min(r.timeline.length,r.Uc.length));for(var w=e-r.hc,E=t?e+t:1/0,C=[],P=r.startTime,L={},M=0;M<m;L={Ce:void 0,te:void 0},M++){L.te=r.Uc[M];var B=P;P=void 0,P=r.Sa!=null?B+r.Sa:r.timeline?r.timeline[M].end:B+t,L.Ce=null,L=new Fe(e+B,e+P,function(U){return function(){return U.Ce==null&&(U.Ce=Pn(n(),[U.te.Ri],g())),U.Ce}}(L),L.te.start,L.te.end,i,w,e,E,[],"",null,null,au,o),L.codecs=f,L.mimeType=a,L.bandwidth=p,C.push(L)}return C}function SC(e){return[e.J.Vb,e.ia.Vb,e.qa.Vb].filter(to).map(function(t){return bt(t,"SegmentURL")}).reduce(function(t,n){return 0<t.length?t:n}).map(function(t){t.attributes.indexRange&&!e.zf&&(e.zf=!0);var n=ur(t.attributes.media);return t=rt(t,"mediaRange",Wl,{start:0,end:null}),{Ri:n,start:t.start,end:t.end}})}function $S(e,t,n,r,i,o,a,f,p){p||e.J.ae||(e.J.ae=Vo(e,Os,"initialization"));var g=e.J.ae?IC(e,a):null,m=wC(e);TC(m);var w=Jr(e);if(m.sd)return WS(e,g),{pc:function(){var L=zp(m.sd,w.J.id,null,null,w.bandwidth||null,null);return L=Pn(w.J.Qa(),[L]),zS(w,t,g,L,0,null,m.hc)}};if(m.Sa)return r||e.ia.contentType==="image"||e.ia.contentType==="text"||(n=e.ka.start,r=e.qa.id,p=e.ka.duration,r=(r=r!=null&&o[r]||p)?n+r:1/0,e.presentationTimeline.Jf(m.Sa),e.presentationTimeline.$g(n,r)),{pc:function(){return xC(w,m,i,g,o,a,f,e.J.ue)}};var E=null;r=r=null,e.qa.id&&e.J.id&&(r=e.qa.id+","+e.J.id,r=n[r])&&(E=r.segmentIndex);var C=e.ka.start,P=e.ka.duration?C+e.ka.duration:1/0;return E?(n=E,JS(n,m,C,P,g),n.Ja(e.presentationTimeline.nb())):E=new eg(m,e.J.id,e.bandwidth,e.J.Qa,e.rb,C,P,g,a,e.J.ue),m.timeline&&e.ia.contentType!=="image"&&e.ia.contentType!=="text"&&e.presentationTimeline.ah(E.h?E.h.timeline:[],C),r&&e.Kb&&(r.segmentIndex=E),{pc:function(){return E instanceof eg&&E.getNumReferences()==0&&JS(E,m,C,P,g),Promise.resolve(E)}}}function Os(e){return e.ic}function wC(e){var t=FS(e,Os),n=Vo(e,Os,"media"),r=Vo(e,Os,"index"),i=Vo(e,Os,"k"),o=0;return i&&(o=parseInt(i,10)),{Ae:t.Ae,Sa:t.Sa,timescale:t.timescale,Hd:t.Hd,hc:t.hc,lg:t.lg,timeline:t.timeline,ec:n&&ur(n),sd:r,mimeType:e.J.mimeType,codecs:e.J.codecs,bandwidth:e.bandwidth,Si:o}}function TC(e){var t=e.sd?1:0;if(t+=e.timeline?1:0,t+=e.Sa?1:0,t==0)throw new Y(2,4,4002);if(t!=1&&(e.sd&&(e.timeline=null),e.Ae=null,e.Sa=null),!e.sd&&!e.ec)throw new Y(2,4,4002)}function xC(e,t,n,r,i,o,a,f){function p(ue){var de=ue-M,ie=de*L,ce=t.Ae,Se=de*ce;"BigInt"in T&&Se>Number.MAX_SAFE_INTEGER&&(Se=BigInt(de)*BigInt(ce)),ie+=E,de=ie+L,ce=Math.min(de,m());var ve=[],Ce=t.Si;if(Ce)for(var _e=(ce-ie)/Ce,Ve={},yt=0;yt<Ce;Ve={xh:void 0},yt++){var pt=ie+_e*yt,ze=pt+_e;Ve.xh=yt+1,Ve=new Fe(pt,ze,function(Kt){return function(){var Pt=zp(B,K,ue,Kt.xh,U,Se);return Pn(W(),[Pt],X())}}(Ve),0,null,r,q,E,m(),[],"",null,null,au,o),Ve.codecs=e.J.codecs,Ve.mimeType=e.J.mimeType,f==0?0<yt&&Ve.Sc():yt%f!=0&&Ve.Sc(),ve.push(Ve)}return ie=new Fe(ie,ce,function(){if(Ce)return[];var Kt=zp(B,K,ue,null,U,Se);return Pn(W(),[Kt],X())},0,null,r,q,E,m(),ve,"",null,null,au,o,0<ve.length),ie.codecs=e.J.codecs,ie.mimeType=e.J.mimeType,ie.bandwidth=e.bandwidth,ie.j=de,ie}function g(){var ue=[Math.max(w.nb(),E),Math.min(w.ac(),m())].map(function(de){return de-E});return ue=[Math.ceil(ue[0]/L),Math.ceil(ue[1]/L)-1],e.J.cb&&ue[1]++,ue.map(function(de){return de+M})}function m(){var ue=C!=null&&i[C]||P;return ue?E+ue:1/0}var w=e.presentationTimeline,E=e.ka.start,C=e.qa.id,P=e.ka.duration,L=t.Sa,M=t.Hd,B=t.ec,U=e.bandwidth||null,K=e.J.id,W=e.J.Qa,X=e.rb,q=E-t.hc,F=g();n=e.Kb?Math.max(F[0],F[1]-n+1):F[0],a=a||F[1],F=[];for(var Q=n;Q<=a;++Q){var H=p(Q);F.push(H)}var Z=new St(F);if(F=w.ac()<m(),Q=w.T(),F||Q){var $=Math.max(n,a+1);n=L,e.J.cb&&(n=.1),Z.Be(n,function(){var ue=w.nb();Z.Ja(ue);var de=I(g());de.next(),de=de.next().value;for(var ie=[];$<=de;){var ce=p($);ie.push(ce),$++}return ue>m()&&!ie.length?null:ie})}return Promise.resolve(Z)}function IC(e,t){var n=e.J.ae;if(n||(n=Vo(e,Os,"initialization")),!n)return null;n=ur(n);var r=e.J.id,i=e.bandwidth||null,o=e.J.Qa,a=e.rb;return t=new Ar(function(){var f=zp(n,r,null,null,i,null);return Pn(o(),[f],a())},0,null,XS(e),null,null,t),t.codecs=e.J.codecs,t.mimeType=e.J.mimeType,t}function eg(e,t,n,r,i,o,a,f,p,g){St.call(this,[]),this.h=e,this.F=t,this.B=n,this.C=r,this.H=i,this.j=o,this.l=a,this.s=f,this.A=p,this.G=g,dm(this)}mt(eg,St),h=eg.prototype,h.getNumReferences=function(){return this.h?this.h.timeline.length:0},h.release=function(){St.prototype.release.call(this),this.h=null},h.Ja=function(e){if(this.h){for(var t=0,n=this.h.timeline,r=0;r<n.length&&n[r].end+this.j<=e;r+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,this.getNumReferences()===0&&this.release())}};function JS(e,t,n,r,i){if(EC(e,i),e.h){if(n=e.h.timeline,e.h.ec!==t.ec&&(e.h.ec=t.ec),n.length){var o=n[n.length-1];t=t.timeline.filter(function(a){return a.end>o.end})}else t=t.timeline.slice();0<t.length&&e.h.timeline.push.apply(e.h.timeline,ee(t)),e.l!==r&&(e.l=r)}else e.h=t,e.j=n,e.l=r;dm(e)}function EC(e,t){if(e.s!==t){e.s=t,e=I(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&Zh(n,t)}}function dm(e){if(!e.o){for(var t=[],n=I(e.h.timeline),r=n.next();!r.done;r=n.next())r=r.value,r.start>=e.l||0>=r.end||t.push(r);e.h.timeline=t,e.Ja(e.j)}}h.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,r=0;r<t.length;r++){var i=t[r],o=i.start+this.j;if(i=r<n?t[r+1].start+this.j:this.l===1/0?i.end+this.j:this.l,e>=o&&e<i)return r+this.i}return null},h.get=function(e){var t=this;if(e-=this.i,0>e||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var r=this.h.timeline[e],i=r.jj,o=r.mg+this.h.lg;n=this.j-this.h.hc;var a=this.j+r.end,f=a;e===this.getNumReferences()-1&&this.l!==1/0&&(f=this.l);for(var p=this.h.codecs,g=this.h.mimeType,m=this.h.bandwidth,w=[],E=(r.end-r.start)/r.Fb,C={},P=0;P<r.Fb;C={De:void 0,yh:void 0},P++){var L=r.start+E*P,M=L+E;C.yh=P+1,C.De=null,C=new Fe(this.j+L,this.j+M,function(B){return function(){return t.h?(B.De==null&&(B.De=QS(t.h.ec,t.F,i,t.B,o,B.yh,t.C,t.H)),B.De):[]}}(C),0,null,this.s,n,this.j,this.l,[],"",null,null,au,this.A),C.codecs=p,C.mimeType=g,C.bandwidth=m,this.G==0?0<P&&C.Sc():P%this.G!=0&&C.Sc(),w.push(C)}n=new Fe(this.j+r.start,f,function(){return 0<r.Fb||!t.h?[]:QS(t.h.ec,t.F,i,t.B,o,null,t.C,t.H)},0,null,this.s,n,this.j,this.l,w,"",null,null,au,this.A,0<r.Fb),n.codecs=p,n.mimeType=g,n.j=a,n.bandwidth=m,this.g[e]=n}return n},h.Db=function(e){dm(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}};function QS(e,t,n,r,i,o,a,f){return e=zp(e,t,n,o,r||null,i),Pn(a(),[e],f()).map(function(p){return p.toString()})}function Lf(e){this.o=null,this.A=e,this.G=new yl,this.i=[],this.h=null,this.m=[],this.B=null,this.F=[],this.C=300,this.l=new Map,this.j=new Map,this.g=null,this.s="UNKNOWN"}Lf.prototype.configure=function(e){this.o=e},Lf.prototype.destroy=function(){return this.A=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),this.g!=null&&(this.g.stop(),this.g=null),this.G.destroy()},Lf.prototype.setManifestType=function(e){this.s=e};function Gp(e,t){var n,r,i,o,a,f,p;return G(function(g){if(g.g==1)return n=Pn(e.i,[CC(e,t)]),r=wt(n,e.o.retryParameters),i=e.A.networkingEngine.request(8,r),ru(e.G,i),pe(g,2),_(g,i.promise,4);if(g.g!=2)return o=g.h,a=Qt(o.data),f=JSON.parse(a),f.VERSION==1&&kC(e,f,o.uri),be(g,0);if((p=ke(g))&&p.code==7001)return g.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new st(function(){Gp(e,t)}),e.g.aa(e.C),le(g)})}function CC(e,t){if(!e.m.length)return t;t=new hn(t);var n=e.B||e.m[0],r=Math.round(e.A.getBandwidthEstimate()),i=t.g;return e.s=="DASH"?(i.add("_DASH_pathway",n),i.add("_DASH_throughput",String(r))):e.s=="HLS"&&(i.add("_HLS_pathway",n),i.add("_HLS_throughput",String(r))),Td(i)&&ku(t,i),t.toString()}function kC(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var r=t["RELOAD-URI"]||n;e.g=new st(function(){Gp(e,r)}),(n=t.TTL)&&(e.C=n),e.g.aa(e.C),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}function Nf(e,t,n,r){var i=e.l.get(t);i||(i=new Map),i.set(n,r),e.l.set(t,i)}Lf.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function Wp(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var r=[],i=I(e.m),o=i.next(),a={};!o.done;a={Wc:void 0},o=i.next())if(a.Wc=o.value,o=t.get(a.Wc))r.push({Pf:a.Wc,location:o});else if(o=e.F.find(function(p){return function(g){return g.Qj==p.Wc}}(a))){var f=t.get(o["BASE-ID"]);f&&(o["URI-REPLACEMENT"].Gh?(f=new hn(f),kc(f,o["URI-REPLACEMENT"].Gh),r.push({Pf:a.Wc,location:f.toString()})):r.push({Pf:a.Wc,location:f}))}for(i=Date.now(),a=I(e.j.keys()),o=a.next();!o.done;o=a.next())o=o.value,f=e.j.get(o),i>f&&e.j.delete(o);if(r=r.filter(function(p){for(var g=I(e.j.keys()),m=g.next();!m.done;m=g.next())if(m.value.includes(new hn(p.location).ub))return!1;return!0}),r.length&&(e.B=r[0].Pf),r=r.map(function(p){return p.location}),!r.length&&e.h)for(i=I(e.h.split(",")),a=i.next();!a.done;a=i.next())(a=t.get(a.value))&&(e.B=e.h,r.push(a));if(!r.length)for(t=I(t.values()),i=t.next();!i.done;i=t.next())r.push(i.value);return n?r:Pn(e.i,r)}function Rr(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.s=this.o=!1,this.m=new Set}h=Rr.prototype,h.release=function(){for(var e=I(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.s=this.o=!1,this.m.clear()},h.yi=function(){return this.l},h.xf=function(){return this.j.slice()},h.gi=function(){return this.i},h.Bg=function(e,t){if(e){if(e.type=="audio")for(var n=I(this.h),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});else if(e.type=="video")for(n=I(this.g),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e}),r.trickModeVideo&&(r.trickModeVideo.matchedStreams=r.trickModeVideo.matchedStreams.filter(function(i){return i!==e}));else if(e.type==at)for(n=I(this.j),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});else if(e.type=="image")for(n=I(this.i),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}};function ZS(e,t){var n=[],r=[],i=[],o=[];e=I(e);for(var a=e.next();!a.done;a=e.next()){var f=a.value;a=new Map(f.audioStreams.map(function(w){return[gm(w),w]}));var p=new Map(f.videoStreams.map(function(w){return[ym(w),w]})),g=new Map(f.textStreams.map(function(w){return[Jp(w),w]}));if(f=new Map(f.imageStreams.map(function(w){return[Qp(w),w]})),t){var m=ow(at);g.set(Jp(m),m),m=ow("image"),f.set(Qp(m),m)}n.push(a),r.push(p),i.push(g),o.push(f)}return{ug:n,Eh:r,Ah:i,Qg:o}}h.Ve=function(e,t,n){n=n===void 0?!1:n;var r=this,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve;return G(function(Ce){if(Ce.g==1){if(i=an,!t&&e.length==1)return o=ZS(e,!1),a=o.ug,f=o.Eh,p=o.Ah,g=o.Qg,r.h=Array.from(a[0].values()),r.g=Array.from(f[0].values()),r.j=Array.from(p[0].values()),r.i=Array.from(g[0].values()),Ce.u(2);for(m=n?r.m.size:0,w=-1,E=0;E<e.length;E++)C=e[E],r.m.has(C.id)||(r.m.add(C.id),w==-1&&(w=E));return w==-1?Ce.return():(P=ZS(e,!0),L=P.ug,M=P.Eh,B=P.Ah,U=P.Qg,_(Ce,Promise.all([Rs(r,r.h,L,w,Xp,_f,m),Rs(r,r.g,M,w,Xp,_f,m),Rs(r,r.j,B,w,Xp,_f,m),Rs(r,r.i,U,w,Xp,_f,m)]),2))}if(K=0,W=[],r.g.length&&r.h.length)for(Z=I(r.h),$=Z.next();!$.done;$=Z.next())for(ue=$.value,de=I(r.g),ie=de.next();!ie.done;ie=de.next())ce=ie.value,Se=fc(ue.drmInfos,ce.drmInfos),ue.drmInfos.length&&ce.drmInfos.length&&!Se.length||(ve=K++,W.push({id:ve,language:ue.language,disabledUntilTime:0,primary:ue.primary,audio:ue,video:ce,bandwidth:(ue.bandwidth||0)+(ce.bandwidth||0),drmInfos:Se,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(X=r.g.length?r.g:r.h,q=I(X),F=q.next();!F.done;F=q.next())Q=F.value,H=K++,W.push({id:H,language:Q.language,disabledUntilTime:0,primary:Q.primary,audio:Q.type==i.W?Q:null,video:Q.type==i.oa?Q:null,bandwidth:Q.bandwidth||0,drmInfos:Q.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});r.l=W,le(Ce)})};function ew(e){var t,n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie;return G(function(ce){switch(ce.g){case 1:if(t=an,e.length==1)return ce.return(e[0]);for(n=e.map(function(Se){return new Map(Se.filter(function(ve){return ve.type===t.W}).map(function(ve){return[gm(ve),ve]}))}),r=e.map(function(Se){return new Map(Se.filter(function(ve){return ve.type===t.oa}).map(function(ve){return[ym(ve),ve]}))}),i=e.map(function(Se){return new Map(Se.filter(function(ve){return ve.type===t.wa}).map(function(ve){return[Jp(ve),ve]}))}),o=e.map(function(Se){return new Map(Se.filter(function(ve){return ve.type===t.Pe}).map(function(ve){return[Qp(ve),ve]}))}),a=I(i),f=a.next();!f.done;f=a.next())p=f.value,g=iw(t.wa),p.set(Jp(g),g);for(m=I(o),w=m.next();!w.done;w=m.next())E=w.value,C=iw(t.Pe),E.set(Qp(C),C);return P=new Rr,_(ce,Rs(P,[],n,0,tg,ng,0),2);case 2:return L=ce.h,_(ce,Rs(P,[],r,0,tg,ng,0),3);case 3:return M=ce.h,_(ce,Rs(P,[],i,0,tg,ng,0),4);case 4:return B=ce.h,_(ce,Rs(P,[],o,0,tg,ng,0),5);case 5:if(U=ce.h,K=0,M.length&&L.length)for(Q=I(L),H=Q.next();!H.done;H=Q.next())for(Z=H.value,$=I(M),ue=$.next();!ue.done;ue=$.next())de=ue.value,ie=K++,de.variantIds.push(ie),Z.variantIds.push(ie);else for(W=M.concat(L),X=I(W),q=X.next();!q.done;q=X.next())F=q.value,F.variantIds=[K++];return ce.return(M.concat(L).concat(B).concat(U))}})}function Rs(e,t,n,r,i,o,a){var f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H;return G(function(Z){switch(Z.g){case 1:for(f=[],p=0;p<n.length;p++)p>=r?f.push(new Set(n[p].values())):f.push(new Set);g=I(t),m=g.next();case 2:if(m.done){Z.u(4);break}return w=m.value,_(Z,AC(e,w,n,r,o,f,a),5);case 5:if(E=Z.h,!E)throw new Y(2,4,4037);m=g.next(),Z.u(2);break;case 4:for(C=I(f),P=C.next();!P.done;P=C.next())for(L=P.value,M=I(L),B=M.next();!B.done;B=M.next())U=B.value,(K=PC(e,U,n,i,o,f))&&t.push(K);for(W=I(f),X=W.next();!X.done;X=W.next())for(q=X.value,F=I(q),Q=F.next(),H={};!Q.done;H={dg:void 0},Q=F.next())if(H.dg=Q.value,!hm(H.dg)&&t.some(function($){return function(ue){return pm(e,$.dg,ue)}}(H)))throw new Y(2,4,4037);return Z.return(t)}})}function AC(e,t,n,r,i,o,a){return G(function(f){return f.g==1?(rw(e,n,t,0<a),t.matchedStreams?t.segmentIndex?_(f,tw(t,r+a),2):f.u(2):f.return(!1)):(nw(t,r,i,o,a),f.return(!0))})}function tw(e,t){var n,r,i,o,a,f;return G(function(p){if(p.g==1){for(n=[],r=e.matchedStreams,i=t;i<r.length;i++)o=r[i],n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex());return _(p,Promise.all(n),2)}if(e.segmentIndex instanceof Gt)for(a=t;a<r.length;a++)f=r[a],f.segmentIndex&&e.segmentIndex.h.push(f.segmentIndex);le(p)})}function PC(e,t,n,r,i,o){if(hm(t))return null;var a=r(t);return rw(e,n,a),a.createSegmentIndex&&(a.createSegmentIndex=function(){return G(function(f){return a.segmentIndex?f.u(0):(a.segmentIndex=new Gt,_(f,tw(a,0),0))})}),!a.matchedStreams||!a.matchedStreams.length?null:(nw(a,0,i,o,0),a)}function nw(e,t,n,r,i){var o=e.matchedStreams;for(t+=i;t<o.length;t++){var a=o[t];n(e,a);var f=!0;if(e.type=="audio"&&Ou(e.language,a.language)==0&&(f=!1),f&&(r[t-i].delete(a),a.fullMimeTypes))for(a=I(a.fullMimeTypes.values()),f=a.next();!f.done;f=a.next())e.fullMimeTypes.add(f.value)}}function Xp(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var n=I(t.matchedStreams),r=n.next();!r.done;r=n.next())r=r.value,r.segmentIndex&&(r.segmentIndex.release(),r.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set,t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t}function tg(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set,t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function _f(e,t){function n(a,f){a||(a=[]),f=I(f);for(var p=f.next();!p.done;p=f.next())p=p.value,a.includes(p)||a.push(p);return a}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var r=I(t.keyIds),i=r.next();!i.done;i=r.next())e.keyIds.add(i.value);if(e.originalId==null?e.originalId=t.originalId:(r=t.originalId||"")&&!e.originalId.endsWith(r)&&(e.originalId+=","+r),r=fc(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!r.length)throw new Y(2,4,4038);if(e.drmInfos=r,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=I(t.closedCaptions),i=r.next();!i.done;i=r.next()){var o=I(i.value);i=o.next().value,o=o.next().value,e.closedCaptions.set(i,o)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=Xp(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var a=new Gt,f=I(e.trickModeVideo.matchedStreams),p=f.next();!p.done;p=f.next())a.h.push(p.value.segmentIndex);return e.trickModeVideo.segmentIndex=a,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),_f(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),_f(e.trickModeVideo,t))}function ng(e,t){var n=e.roles;n||(n=[]);for(var r=I(t.roles),i=r.next();!i.done;i=r.next())i=i.value,n.includes(i)||n.push(i);for(e.roles=n,n=I(t.keyIds),r=n.next();!r.done;r=n.next())e.keyIds.add(r.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,ee(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=I(t.closedCaptions),n=t.next();!n.done;n=t.next())r=I(n.value),n=r.next().value,r=r.next().value,e.closedCaptions.set(n,r)}function rw(e,t,n,r){r=r!==void 0&&r?n.matchedStreams:[],t=I(t);for(var i=t.next();!i.done;i=t.next()){if(i=DC(e,i.value,n),!i)return;r.push(i)}n.matchedStreams=r}function DC(e,t,n){var r={audio:gm,video:ym,text:Jp,image:Qp}[n.type],i=null,o=r(n);if(t.has(o))i=t.get(o);else{o={audio:function(g,m){return pm(e,g,m)},video:function(g,m){return pm(e,g,m)},text:OC,image:RC}[n.type];for(var a={audio:bC,video:MC,text:LC,image:NC}[n.type],f=I(t.values()),p=f.next();!p.done;p=f.next())p=p.value,!o(n,p)||n.fastSwitching!=p.fastSwitching||i&&!a(n,i,p)||(i=p)}return e.s&&!hm(i)&&t.delete(r(i)),i}function Yp(e,t){return e.mimeType!=t.mimeType?!1:rg(e.codecs)===rg(t.codecs)}h.nh=function(e){this.o=e},h.th=function(e){this.s=e};function pm(e,t,n){return!(!Yp(t,n)&&!e.o||t.drmInfos&&!ad(t.drmInfos,n.drmInfos))}function OC(e,t){return t.language?!(e.forced!==t.forced||Ou(e.language,t.language)==0||t.kind!=e.kind):!0}function RC(){return!0}function bC(e,t,n){var r=Yp(e,t),i=Yp(e,n);if(r&&!i)return!1;if(!r&&i||(r=Ou(e.language,t.language),i=Ou(e.language,n.language),i>r))return!0;if(i<r)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(o){return e.roles.includes(o)}),i=n.roles.filter(function(o){return e.roles.includes(o)}),i.length>r.length)return!0;if(i.length<r.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&n.primary?!0:t.primary&&!n.primary?!1:(r=$p(e.channelsCount,t.channelsCount,n.channelsCount),r==yu?!0:r==_l?!1:(r=$p(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),r==yu?!0:r==_l?!1:!!(e.bandwidth&&uw(e.bandwidth,t.bandwidth,n.bandwidth)==yu)))}function MC(e,t,n){var r=Yp(e,t),i=Yp(e,n);if(r&&!i)return!1;if(!r&&i||(r=$p(e.width*e.height,t.width*t.height,n.width*n.height),r==yu))return!0;if(r==_l)return!1;if(e.frameRate){if(r=$p(e.frameRate,t.frameRate,n.frameRate),r==yu)return!0;if(r==_l)return!1}return!!(e.bandwidth&&uw(e.bandwidth,t.bandwidth,n.bandwidth)==yu)}function LC(e,t,n){var r=Ou(e.language,t.language),i=Ou(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(o){return e.roles.includes(o)}),i=n.roles.filter(function(o){return e.roles.includes(o)}),i.length>r.length)return!0;if(i.length<r.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!(n.mimeType!=e.mimeType||n.codecs!=e.codecs||t.mimeType==e.mimeType&&t.codecs==e.codecs)}function NC(e,t,n){return $p(e.width*e.height,t.width*t.height,n.width*n.height)==yu}function iw(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function ow(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new St([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1}}function $p(e,t,n){if(t==e&&e!=n)return _l;if(n==e&&e!=t)return yu;if(t>e){if(n<=e||n-e<t-e)return yu;if(n-e>t-e)return _l}else{if(n>e)return _l;if(e-n<e-t)return yu;if(e-n>e-t)return _l}return lw}function uw(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?yu:t<e?_l:lw}function hm(e){switch(e.type){case at:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function ym(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,rg(e.codecs),e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth])}function gm(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,rg(e.codecs),e.mimeType,e.roles,e.audioSamplingRate,e.primary])}function Jp(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Qp(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function rg(e){if(!vm.has(e)){var t=bn(e);vm.set(e,t)}return vm.get(e)}Me("shaka.util.PeriodCombiner",Rr),Rr.prototype.setUseStreamOnce=Rr.prototype.th,Rr.prototype.setAllowMultiTypeVariants=Rr.prototype.nh,Rr.prototype.combinePeriods=Rr.prototype.Ve,Rr.prototype.deleteStream=Rr.prototype.Bg,Rr.prototype.getImageStreams=Rr.prototype.gi,Rr.prototype.getTextStreams=Rr.prototype.xf,Rr.prototype.getVariants=Rr.prototype.yi;var yu=1,lw=0,_l=-1,vm=new Map;function _C(e,t){var n=new DOMParser,r=UC.value()(e);e=null;try{e=n.parseFromString(r,"text/xml")}catch{return null}if(n=e.documentElement,!n||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function sw(e,t){try{var n=jt(e);return _C(n,t)}catch{return null}}var UC=new Ii(function(){if(typeof trustedTypes<"u"){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(t){return t}});return function(t){return e.createHTML(t)}}return function(t){return t}});function ig(){var e=this;this.j=this.g=null,this.A=[],this.i=null,this.pa=1,this.F=[],this.l={he:"",type:"",profiles:[],Sb:null,cb:0,Qa:null,Fd:0},this.s=new Map,this.o={},this.B={},this.ha={},this.m=new Rr,this.I=0,this.na=new Ju(5),this.K=new st(function(){if(e.H&&!e.g.continueLoadingWhenPaused&&(e.G.bb(e.H,"timeupdate"),e.H.paused)){e.G.la(e.H,"timeupdate",function(){return hw(e)});return}hw(e)}),this.O=new yl,this.M=null,this.C=[],this.da=1/0,this.ga=!1,this.h=null,this.L=0,this.P=!1,this.G=new At,this.H=null,this.V=!1,this.ba="",this.fa=function(){return!1},this.$=[]}h=ig.prototype,h.configure=function(e,t){var n=this.j&&e.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=e.dash.updatePeriod;this.g=e,t&&(this.fa=t),n&&this.i&&this.i.presentationTimeline.T()&&this.K.Hb(),this.h&&this.h.configure(this.g),this.m&&(this.m.nh(this.g.dash.multiTypeVariantsAllowed&&vu()),this.m.th(this.g.dash.useStreamOnceInPeriodFlattening))},h.start=function(e,t){var n=this,r;return G(function(i){if(i.g==1)return n.ga=t.isLowLatencyMode(),n.A=[e],n.j=t,_(i,mm(n),2);if(r=i.h,n.j&&Sm(n,r),!n.j)throw new Y(2,7,7001);return i.return(n.i)})},h.stop=function(){for(var e=I(Object.values(this.o)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.A=[],this.i=null,this.o={},this.B={},this.s.clear(),this.l={he:"",type:"",profiles:[],Sb:null,cb:0,Qa:null,Fd:0},this.m=null,this.K!=null&&(this.K.stop(),this.K=null),this.h&&this.h.destroy(),this.G&&(this.G.release(),this.G=null),this.O.destroy()},h.update=function(){var e=this,t;return G(function(n){if(n.g==1)return pe(n,2),_(n,mm(e),4);if(n.g!=2)return be(n,0);if(t=ke(n),!e.j||!t)return n.return();e.j.onError(t),le(n)})},h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(e){if(this.i&&this.i.presentationTimeline.T()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.ac();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.I=t.endTime-e,Sm(this,0))}}},h.banLocation=function(e){this.h&&this.h.banLocation(e)},h.setMediaElement=function(e){this.H=e};function mm(e){var t,n,r,i,o,a,f,p,g,m,w;return G(function(E){return E.g==1?(t=4,n="MPD",r=ek(e),i=e.A,r.length?(i=r,n="Patch",t=6):1<e.A.length&&e.h&&(o=Wp(e.h,"Location",!0),o.length&&(i=o)),a=wt(i,e.g.retryParameters),f=Date.now(),_(E,Tm(e,a,0,{type:t}),2)):E.g!=3?(p=E.h,e.j?(p.uri&&p.uri!=p.originalUri&&!e.A.includes(p.uri)&&e.A.unshift(p.uri),g=new hn(p.uri),e.ba=g.g.toString(),_(E,jC(e,p.data,p.uri,n),3)):E.return(0)):(m=Date.now(),w=(m-f)/1e3,e.na.sample(1,w),E.return(w))})}function jC(e,t,n,r){var i,o,a,f,p,g,m,w,E,C;return G(function(P){if(P.g==1){if(i=t,o=e.g.dash.manifestPreprocessor,a=Sf,o!=a){if(Rt("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),f=sw(i,r),!f)throw new Y(2,4,4001,n);o(f),i=ui(f.outerHTML)}if(p=Gl(i,r),!p)throw new Y(2,4,4001,n);return g=e.g.dash.manifestPreprocessorTXml,m=my,g!=m&&g(p),r==="Patch"?P.return(BC(e,p)):e.g.dash.disableXlinkProcessing?P.return(aw(e,p,n)):(w=e.g.dash.xlinkFailGracefully,E=Zy(p,e.g.retryParameters,w,n,e.j.networkingEngine),ru(e.O,E),_(P,E.promise,2))}return C=P.h,P.return(aw(e,C,n))})}function aw(e,t,n){var r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve,Ce,_e,Ve,yt,pt,ze,Kt,Pt,ot,Yt,qt,lt,Tn,ii,An,Cn,Rn,Wn,ic,jl,Ls;return G(function(go){switch(go.g){case 1:for(e.h&&e.h.l.clear(),r=[n],i=[],o=new Map,a=bt(t,"Location"),f=I(a),p=f.next();!p.done;p=f.next())g=p.value,m=g.attributes.serviceLocation,(w=rr(g))&&(E=Pn(r,[w])[0],m&&(e.h?Nf(e.h,"Location",m,E):o.set(m,E)),i.push(E));if(e.h?(C=Wp(e.h,"Location",!0),0<C.length&&(r=e.A=C)):i.length&&(r=e.A=i),e.l.he=t.attributes.id||"",e.l.Fd=rt(t,"publishTime",Fo)||0,e.F=bt(t,"PatchLocation"),P=Promise.resolve(),(L=pn(t,"ContentSteering"))&&e.j)for(M=L.attributes.defaultServiceLocation,e.h?(e.h.i=r,e.h.h=M):(e.h=new Lf(e.j),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=r,e.h.h=M,(B=rr(L))&&(rt(L,"queryBeforeStart",ra,!1)?P=Gp(e.h,B):Gp(e.h,B))),U=I(o.keys()),K=U.next();!K.done;K=U.next())W=K.value,X=o.get(W),Nf(e.h,"Location",W,X);if(q=bt(t,"BaseURL"),F=!1,e.h)for(Q=I(q),H=Q.next();!H.done;H=Q.next())Z=H.value,$=Z.attributes.serviceLocation,ue=rr(Z),$&&ue&&(Nf(e.h,"BaseURL",$,ue),F=!0);if(e.$=null,F&&e.h||(de=q.map(rr),e.$=Pn(r,de)),ie=function(){return e.h&&F?Wp(e.h,"BaseURL"):e.$?e.$:[]},e.l.Qa=ie,ce=0,q&&q.length&&(ce=rt(q[0],"availabilityTimeOffset",il)||0),e.l.cb=ce,e.I=rt(t,"minimumUpdatePeriod",lr,-1),Se=rt(t,"availabilityStartTime",Fo),ve=rt(t,"timeShiftBufferDepth",lr),Ce=e.g.dash.ignoreSuggestedPresentationDelay,_e=null,Ce||(_e=rt(t,"suggestedPresentationDelay",lr)),Ve=e.g.dash.ignoreMaxSegmentDuration,yt=null,Ve||(yt=rt(t,"maxSegmentDuration",lr)),pt=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.V=e.i.presentationTimeline.T()&&pt=="static"),e.l.type=pt,e.i)for(ze=e.i.presentationTimeline,Kt=ze.nb(),Pt=I(Object.values(e.o)),ot=Pt.next();!ot.done;ot=Pt.next())Yt=ot.value,Yt.segmentIndex&&Yt.segmentIndex.Ja(Kt);else qt=e.g.dash.ignoreMinBufferTime,lt=0,qt||(lt=rt(t,"minBufferTime",lr)||0),Tn=0,Tn=_e!=null?Math.min(_e,ve||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*lt,ve||1/0),ze=new Le(Se,Tn,e.g.dash.autoCorrectDrift);return ze.Cc(pt=="static"),ze.T()&&!isNaN(e.g.availabilityWindowOverride)&&(ve=e.g.availabilityWindowOverride),ve==null&&(ve=1/0),ze.ve(ve),ii=t.attributes.profiles||"",e.l.profiles=ii.split(","),An={Kb:pt!="static",presentationTimeline:ze,qa:null,ka:null,ia:null,J:null,bandwidth:0,zf:!1,cb:ce,Sb:null,profiles:ii.split(","),roles:null,rb:function(){return""}},e.L=0,Cn=pw(e,An,ie,t,!1),Rn=Cn.duration,Wn=Cn.periods,(pt!="static"||e.V)&&Cn.Dg||ze.ab(Rn||1/0),e.P&&e.ga&&ze.oh(e.da),ze.Jf(yt||1),_(go,P,2);case 2:return e.P&&e.ga&&(ic=_e??e.g.defaultPresentationDelay,ze.$f(ic)),e.i?(e.i.periodCount=Wn.length,e.i.gapCount=e.L,_(go,cw(e,Wn,!1),4)):_(go,e.m.Ve(Wn,An.Kb),6);case 6:if(e.i={presentationTimeline:ze,variants:e.m.l,textStreams:e.m.xf(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:KC(t),nextUrl:HC(t),periodCount:Wn.length,gapCount:e.L,isLowLatency:e.P,startTime:null},!ze.Ch()){go.u(7);break}return jl=bt(t,"UTCTiming"),_(go,QC(e,ie,jl),8);case 8:if(Ls=go.h,!e.j)return go.return();ze.ph(Ls);case 7:ze.de();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),qC(e),le(go)}})}function cw(e,t,n){var r;return G(function(i){if(i.g==1)return _(i,e.m.Ve(t,!0,n),2);e.i.variants=e.m.l,r=e.m.xf(),0<r.length&&(e.i.textStreams=r),e.i.imageStreams=e.m.i,e.j.filter(e.i),le(i)})}function BC(e,t){var n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue;return G(function(de){if(de.g==1){if(n=t.attributes.mpdId,r=rt(t,"originalPublishTime",Fo),!n||n!==e.l.he||r!==e.l.Fd)throw e.F=[],new Y(1,4,4052);for(i=[],o=[],a=new Set,f=I(hd(t)),p=f.next();!p.done;p=f.next())if(g=p.value,m=Ko(g.attributes.sel||""),w=m[m.length-1],E=rr(g)||"",w.name==="MPD")if(w.Yb==="mediaPresentationDuration"){C=rr(g)||"";var ie=lr(C);if(ie!=null){e.l.Sb=ie;for(var ce=I(e.s.values()),Se=ce.next();!Se.done;Se=ce.next())Se.value.Sb=ie}}else if(w.Yb==="type"){for(e.i.presentationTimeline.Cc(E=="static"),e.l.type=E,ie=I(e.s.values()),ce=ie.next();!ce.done;ce=ie.next())ce.value.Kb=E=="dynamic";E=="static"&&(e.I=-1)}else w.Yb==="publishTime"?e.l.Fd=Fo(E)||0:w.Yb===null&&g.tagName==="add"&&o.push(g);else if(w.name==="PatchLocation")yc(e.F,g);else if(w.name==="Period")g.tagName==="add"?o.push(g):g.tagName==="remove"&&w.id&&FC(e,w.id);else if(w.name==="SegmentTemplate"){if(ce=Ko(g.attributes.sel||""),ie=ce[ce.length-1],ie.Yb){ce=fw(e,ce),Se=rr(g)||"";for(var ve=I(ce),Ce=ve.next();!Ce.done;Ce=ve.next())Ce=e.s.get(Ce.value),Lh(Ce.J.ic,g.tagName,ie.Yb,Se);ie=ce}else ie=[];for(P=ie,L=I(P),M=L.next();!M.done;M=L.next())B=M.value,a.add(B)}else if(w.name==="SegmentTimeline"||w.name==="S"){for(ie=Ko(g.attributes.sel||""),ie=fw(e,ie),ce=I(ie),Se=ce.next();!Se.done;Se=ce.next())Se=e.s.get(Se.value),Se=bf(Se,Os,"SegmentTimeline"),ve=bt(Se,"S"),yc(ve,g),Se.children=ve;for(U=ie,K=I(U),W=K.next();!W.done;W=K.next())X=W.value,a.add(X)}for(q=I(a),F=q.next();!F.done;F=q.next())Q=F.value,dw(e,Q);for(H=I(o),Z=H.next();!Z.done;Z=H.next())$=Z.value,i.push.apply(i,ee(VC(e,$)));return i.length?(e.i.periodCount+=i.length,e.i.gapCount=e.L,_(de,cw(e,i,!0),2)):de.u(2)}e.l.type=="static"&&(ue=e.l.Sb,e.i.presentationTimeline.ab(ue||1/0)),le(de)})}function VC(e,t){return pw(e,{Kb:e.l.type=="dynamic",presentationTimeline:e.i.presentationTimeline,qa:null,ka:null,ia:null,J:null,bandwidth:0,zf:!1,cb:e.l.cb,profiles:e.l.profiles,Sb:e.l.Sb,roles:null,rb:function(){return""}},e.l.Qa,t,!0).periods}function FC(e,t){e.i.periodCount--;for(var n=I(e.s.keys()),r=n.next();!r.done;r=n.next())if(r=r.value,r.startsWith(t)){var i=e.s.get(r);bf(i,Os,"SegmentTimeline").children=[],dw(e,r),e.s.delete(r)}e.C=e.C.filter(function(o){return o!==t})}function fw(e,t){var n="",r="",i=-1,o="";t=I(t);for(var a=t.next();!a.done;a=t.next())a=a.value,a.name==="Period"?n=a.id:a.name==="AdaptationSet"?(r=a.id,a.position!==null&&(i=a.position)):a.name==="Representation"&&(o=a.id);if(t=[],o)t.push(n+","+o);else if(r)for(i=I(e.s.values()),e=i.next();!e.done;e=i.next())e=e.value,e.qa.id===n&&e.ia.id===r&&e.J.id&&t.push(n+","+e.J.id);else if(-1<i)for(r=I(e.s.values()),e=r.next();!e.done;e=r.next())e=e.value,e.qa.id===n&&e.ia.position===i&&e.J.id&&t.push(n+","+e.J.id);return t}function dw(e,t){var n=e.s.get(t),r=e.o[t];r.segmentIndex&&r.segmentIndex.Ja(e.i.presentationTimeline.nb());try{var i=$S(n,function(o,a,f,p){return gw(e,o,a,f,p)},e.o,!0,e.g.dash.initialSegmentLimit,e.ha,n.J.aesKey,null,!0);r.createSegmentIndex=function(){return G(function(o){if(o.g==1)return r.segmentIndex?o.u(0):_(o,i.pc(),3);r.segmentIndex=o.h,le(o)})}}catch(o){if(t=n.J.contentType,t!=at&&t!="application"&&t!="image"||o.code!=4002)throw o}}function KC(e){var t=pn(e,"ServiceDescription");if(!t||(e=pn(t,"Latency"),t=pn(t,"PlaybackRate"),!e&&!t))return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}function HC(e){if(e=bt(e,"SupplementalProperty"),!e.length)return null;e=I(e);for(var t=e.next();!t.done;t=e.next())if(t=t.value,t.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016")return t.attributes.value;return null}function pw(e,t,n,r,i){var o=t.Sb;o||(o=rt(r,"mediaPresentationDuration",lr),e.l.Sb=o);var a=0;e.i&&e.i.presentationTimeline&&e.V&&(a=e.i.presentationTimeline.Ob());var f=[],p=a;r=bt(r,"Period");for(var g=0;g<r.length;g++){var m=r[g],w=r[g+1],E=rt(m,"start",lr,p),C=m.attributes.id,P=rt(m,"duration",lr);E=g==0&&E==0&&e.V?a:E;var L=null;if(w){var M=rt(w,"start",lr);M!=null&&(L=M-E+a)}else o!=null&&(L=o-E+a);if(M=Ed,L&&P&&Math.abs(L-P)>M&&L>P&&e.L++,L==null&&(L=P),!(e.M!==null&&C!==null&&E!==null&&E<e.M)||e.C.includes(C)||g+1==r.length){if(E!==null&&(e.M===null||E>e.M)&&(e.M=E),p=zC(e,t,n,{start:E,duration:L,node:m,Sg:L==null||!w}),f.push(p),t.qa.id&&L&&(e.ha[t.qa.id]=L),L==null){p=null;break}p=E+L}}if(i)for(t=I(f),n=t.next();!n.done;n=t.next())n=n.value.id,e.C.includes(n)||e.C.push(n);else e.C=f.map(function(B){return B.id});return o!=null?{periods:f,duration:o+a,Dg:!1}:{periods:f,duration:p,Dg:!0}}function qC(e){var t=Object.keys(e.B).filter(function(f){return!e.C.includes(f)});t=I(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var r=!0,i=I(e.B[n]),o=i.next();!o.done;o=i.next()){o=o.value;var a=e.o[o];a&&(a.segmentIndex&&a.segmentIndex.getNumReferences()!=0?r=!1:(e.m&&e.m.Bg(e.o[o],n),delete e.o[o]))}r&&delete e.B[n]}}function zC(e,t,n,r){t.qa=wm(e,r.node,null,n),t.ka=r,t.qa.cb=t.cb,t.qa.id||(t.qa.id="__shaka_period_"+r.start);var i=bt(r.node,"EventStream");n=t.presentationTimeline.nb(),i=I(i);for(var o=i.next();!o.done;o=i.next())ZC(e,r.start,r.duration,o.value,n);for(n=bt(r.node,"SupplementalProperty"),n=I(n),i=n.next();!i.done;i=n.next())i=i.value,i.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(i=Zp(e,i))&&(t.rb=i);if(n=bt(r.node,"AdaptationSet").map(function(g,m){return GC(e,t,m,g)}).filter(to),t.Kb){for(r=[],i=I(n),o=i.next();!o.done;o=i.next()){o=I(o.value.ej);for(var a=o.next();!a.done;a=o.next())r.push(a.value)}if(r.length!=new Set(r).size)throw new Y(2,4,4018)}if(r=n.filter(function(g){return!g.kg}),n=n.filter(function(g){return g.kg}),!e.g.disableIFrames)for(n=I(n),i=n.next();!i.done;i=n.next()){i=i.value,o=i.kg.split(" "),a=I(r);for(var f=a.next();!f.done;f=a.next())if(f=f.value,o.includes(f.id)){f=I(f.streams);for(var p=f.next();!p.done;p=f.next())fr(p.value,i.streams)}}if(n=og(e.g.disableAudio,r,"audio"),i=og(e.g.disableVideo,r,"video"),o=og(e.g.disableText,r,at),r=og(e.g.disableThumbnails,r,"image"),i.length===0&&n.length===0)throw new Y(2,4,4004);return{id:t.qa.id,audioStreams:n,videoStreams:i,textStreams:o,imageStreams:r}}function og(e,t,n){return e||!t.length?[]:t.reduce(function(r,i){return i.contentType!=n||r.push.apply(r,ee(i.streams)),r},[])}function GC(e,t,n,r){function i($){var ue=$.attributes["dvb:fontFamily"];$=$.attributes["dvb:url"],ue&&$&&($=Pn(t.ia.Qa(),[$],t.rb()),e.j.addFont(ue,$[0]))}function o($){switch($){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function a($){switch($){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.ia=wm(e,r,t.qa,null),t.ia.position=n;var f=!1;n=bt(r,"Role");var p=n.map(function($){return $.attributes.value}).filter(to),g=void 0,m=t.ia.contentType==at;m&&(g="subtitle"),n=I(n);for(var w=n.next();!w.done;w=n.next()){w=w.value;var E=w.attributes.schemeIdUri;if(E==null||E=="urn:mpeg:dash:role:2011")switch(w=w.attributes.value,w){case"main":f=!0;break;case"caption":case"subtitle":g=w}}var C=bt(r,"EssentialProperty");n=null;var P=!1;w=null,E=!1,C=I(C);for(var L=C.next();!L.done;L=C.next()){L=L.value;var M=L.attributes.schemeIdUri;if(M=="http://dashif.org/guidelines/trickmode")n=L.attributes.value;else if(M=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var B=a(parseInt(L.attributes.value,10));else if(M=="urn:mpeg:mpegB:cicp:ColourPrimaries")var U=o(parseInt(L.attributes.value,10));else M!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(M=="urn:mpeg:dash:ssr:2023"&&e.g.dash.enableFastSwitching?P=!0:M=="urn:dvb:dash:fontdownload:2014"?i(L):M=="urn:mpeg:dash:urlparam:2014"&&(w=Zp(e,L))||(E=!0))}if(E)return null;var K=null;for(E=bt(r,"SupplementalProperty"),E=I(E),C=E.next();!C.done;C=E.next())C=C.value,L=C.attributes.schemeIdUri,L=="http://dashif.org/guidelines/last-segment-number"?K=parseInt(C.attributes.value,10)-1:L=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?B=a(parseInt(C.attributes.value,10)):L=="urn:mpeg:mpegB:cicp:ColourPrimaries"?U=o(parseInt(C.attributes.value,10)):L=="urn:dvb:dash:fontdownload:2014"?i(C):L=="urn:mpeg:dash:urlparam:2014"&&(w=Zp(e,C));w&&(t.rb=w),w=bt(r,"Accessibility");var W=new Map,X;for(w=I(w),E=w.next();!E.done;E=w.next())if(C=E.value,E=C.attributes.schemeIdUri,C=C.attributes.value,E!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText)if(E!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText)E=="urn:mpeg:dash:role:2011"?C!=null&&(p.push(C),C=="captions"&&(g="caption")):E=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(C=="1"?X="visually impaired":C=="2"&&(X="hard of hearing"));else if(E=1,C!=null)for(C=I(C.split(";")),L=C.next();!L.done;L=C.next()){M=L.value;var q=L=void 0;M.includes("=")?(M=M.split("="),L="svc"+M[0],q=M[1].split(",")[0].split(":").pop()):(L="svc"+E,E++,q=M),W.set(L,Et(q))}else W.set("svc1","und");else if(E=1,C!=null)for(C=C.split(";"),L=I(C),M=L.next();!M.done;M=L.next()){q=M.value;var F=M=void 0;q.includes("=")?(q=q.split("="),M=q[0].startsWith("CC")?q[0]:"CC"+q[0],F=q[1]||"und"):(M="CC"+E,C.length==2?E+=2:E++,F=q),W.set(M,Et(F))}else W.set("CC1","und");w=bt(r,"ContentProtection");var Q=VS(w,e.g.dash.ignoreDrmInfo,e.g.dash.keySystemsByURI),H=Et(t.ia.language||"und"),Z=t.ia.label;if(r=bt(r,"Representation"),!e.g.dash.ignoreSupplementalCodecs){for(w=[],E=I(r),C=E.next();!C.done;C=E.next())L=C.value,(C=Zi(L,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(L=Lr(L),L.attributes.codecs=C.split(" ").join(","),w.push(L));r.push.apply(r,ee(w))}if(w=r.map(function($){return($=WC(e,t,Q,g,H,Z,f,p,W,$,X,K))&&($.hdr=$.hdr||B,$.colorGamut=$.colorGamut||U,$.fastSwitching=P),$}).filter(function($){return!!$}),w.length==0){if(n=t.ia.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||m||n)return null;throw new Y(2,4,4003)}if(!t.ia.contentType||t.ia.contentType=="application")for(t.ia.contentType=vw(w[0].mimeType,w[0].codecs),m=I(w),E=m.next();!E.done;E=m.next())E.value.type=t.ia.contentType;for(m=t.ia.id||"__fake__"+e.pa++,E=I(w),C=E.next();!C.done;C=E.next()){for(C=C.value,L=I(Q.drmInfos),M=L.next();!M.done;M=L.next())M=M.value,M.keyIds=M.keyIds&&C.keyIds?new Set([].concat(ee(M.keyIds),ee(C.keyIds))):M.keyIds||C.keyIds;C.groupId=m}return r=r.map(function($){return $.attributes.id}).filter(to),{id:m,contentType:t.ia.contentType,language:H,Ck:f,streams:w,drmInfos:Q.drmInfos,kg:n,ej:r}}function Zp(e,t){if((t=ki(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&rt(t,"useMPDUrlQuery",ra,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return n=="$querypart$"?e.ba:n.split("&").map(function(r){if(r=="$querypart$")return e.ba;var i=/\$query:(.*?)\$/g.exec(r);if(i&&i.length==2){i=i[1];var o=new al(e.ba).get(i);if(o.length)return i+"="+o[0]}return r}).join("&")}}return null}function WC(e,t,n,r,i,o,a,f,p,g,m,w){t.J=wm(e,g,t.ia,null);var E=t.J.id;if(e.da=Math.min(e.da,t.J.cb),e.P=0<e.da,!JC(t.J))return null;var C=t.ka.start;t.bandwidth=rt(g,"bandwidth",xo)||0,t.roles=f;var P=bt(g,"SupplementalProperty"),L=bt(g,"EssentialProperty"),M=null,B=L.find(function(ce){return ce.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});(B||(B=P.find(function(ce){return ce.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"})))&&(M=Zp(e,B)),M&&(t.rb=M),B=t.J.contentType,M=B==at||B=="application",B=B=="image";try{var U=void 0;if(n.Re){var K=t.J.Qa,W=t.rb,X=Pn(K(),[n.Re.Li],W()),q=wt(X,e.g.retryParameters);U={bitsKey:128,blockCipherMode:"CBC",iv:n.Re.iv,firstMediaSequenceNumber:0,fetchKey:function(){var ce,Se,ve;return G(function(Ce){if(Ce.g==1)return _(Ce,Tm(e,q,6),2);if(Ce.g!=3){if(ce=Ce.h,!ce.data||ce.data.byteLength!=16)throw new Y(2,4,4049);return Se={name:"AES-CBC"},ve=U,_(Ce,T.crypto.subtle.importKey("raw",ce.data,Se,!0,["decrypt"]),3)}ve.cryptoKey=Ce.h,U.fetchKey=void 0,le(Ce)})}}}if(t.J.aesKey=U,K=function(ce,Se,ve,Ce){return gw(e,ce,Se,ve,Ce)},t.J.ad)var F=hC(t,K,U);else if(t.J.Vb)F=gC(t,e.o,U);else if(t.J.ic)F=$S(t,K,e.o,!!e.i,e.g.dash.initialSegmentLimit,e.ha,U,w,!1);else{var Q=t.ka.duration||0,H=t.J.Qa,Z=t.J.mimeType,$=t.J.codecs;F={pc:function(){var ce=kl(C,Q,H());return ce.Db(function(Se){Se.mimeType=Z,Se.codecs=$}),Promise.resolve(ce)}}}}catch(ce){if((M||B)&&ce.code==4002)return null;throw ce}g=bt(g,"ContentProtection"),g=tC(g,n,e.g.dash.ignoreDrmInfo,e.g.dash.keySystemsByURI),g=new Set(g?[g]:[]),K=P.some(function(ce){return ce.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&ce.attributes.value=="JOC"}),P=t.J.codecs,W=P.includes("ec-3")&&384e3<=t.bandwidth,w=!1,(K||W)&&(w=!0),K=!1,M&&(K=f.includes("forced_subtitle")||f.includes("forced-subtitle"));var ue;if(B&&((L=L.find(function(ce){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(ce.attributes.schemeIdUri)}))&&(ue=L.attributes.value),!ue))return null;var de;t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(P.includes("hvc1.2.4.L153.B0")||P.includes("hev1.2.4.L153.B0"))&&(de="PQ"),L=t.J.id?t.qa.id+","+t.J.id:"",e.F.length&&E&&e.s.set(t.qa.id+","+E,XC(t));var ie=L&&e.o[L]?e.o[L]:{id:e.pa++,originalId:t.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){ie.segmentIndex&&(ie.segmentIndex.release(),ie.segmentIndex=null)},segmentIndex:null,mimeType:t.J.mimeType,codecs:P,frameRate:t.J.frameRate,pixelAspectRatio:t.J.pixelAspectRatio,bandwidth:t.bandwidth,width:t.J.width,height:t.J.height,kind:r,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:g,language:i,originalLanguage:t.ia.language,label:o,type:t.ia.contentType,primary:a,trickModeVideo:null,emsgSchemeIdUris:t.J.emsgSchemeIdUris,roles:f,forced:K,channelsCount:t.J.je,audioSamplingRate:t.J.audioSamplingRate,spatialAudio:w,closedCaptions:p,hdr:de,colorGamut:void 0,videoLayout:void 0,tilesLayout:ue,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([yn(t.J.mimeType,t.J.codecs)]),isAudioMuxedInVideo:!1};return ie.createSegmentIndex=function(){var ce;return G(function(Se){if(Se.g==1)return ie.segmentIndex?Se.u(0):(ce=ie,_(Se,F.pc(),3));ce.segmentIndex=Se.h,le(Se)})},L&&t.Kb&&!e.o[L]&&(t=t.qa.id||"",e.B[t]||(e.B[t]=[]),e.o[L]=ie,e.B[t].push(L)),ie}function XC(e){function t(n){return n?(n=Jr(n),n.ad=null,n.Vb=null,n.ic=ia(n.ic),n):null}return e=Jr(e),e.qa=t(e.qa),e.ia=t(e.ia),e.J=t(e.J),e.ka&&(e.ka=Jr(e.ka),e.ka.node=null),e}function hw(e){var t,n;return G(function(r){switch(r.g){case 1:return t=0,pe(r,2),_(r,mm(e),4);case 4:t=r.h,be(r,3);break;case 2:if(n=ke(r),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),r.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return r.return();e.j.onManifestUpdated(),Sm(e,t),le(r)}})}function Sm(e,t){if(!(0>e.I)){var n=e.I;0<=e.g.dash.updatePeriod&&(n=e.g.dash.updatePeriod),e.K.aa(Math.max(n-t,Bs(e.na)))}}function wm(e,t,n,r){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,je:null,audioSamplingRate:null,cb:0,ue:0},r=r||n.Qa;var i=t.attributes.id,o=bt(t,"BaseURL"),a,f=!1;if(e.h)for(var p=I(o),g=p.next();!g.done;g=p.next()){var m=g.value;g=m.attributes.serviceLocation,m=rr(m),g&&m&&(Nf(e.h,i,g,m),f=!0)}f&&e.h||(a=o.map(rr)),p=t.attributes.contentType||n.contentType,g=t.attributes.mimeType||n.mimeType,m=Sp([t.attributes.codecs||n.codecs]).join(",");var w=rt(t,"frameRate",si)||n.frameRate,E=t.attributes.sar||n.pixelAspectRatio,C=YC(bt(t,"InbandEventStream"),n.emsgSchemeIdUris),P=bt(t,"AudioChannelConfiguration");P=$C(P)||n.je;var L=rt(t,"audioSamplingRate",jn)||n.audioSamplingRate;p||(p=vw(g,m));var M=pn(t,"SegmentBase"),B=pn(t,"SegmentTemplate"),U=M&&rt(M,"availabilityTimeOffset",il)||0,K=B&&rt(B,"availabilityTimeOffset",il)||0,W=o&&o.length&&rt(o[0],"availabilityTimeOffset",il)||0;U=n.cb+W+U+K,K=null,(W=pn(t,"SegmentSequenceProperties"))&&(W=pn(W,"SAP"))&&(K=rt(W,"cadence",sr)),W=t.attributes.label;var X=bt(t,"Label");return X&&X.length&&(X=X[0],sn(X)&&(W=sn(X))),{Qa:function(){return Pn(r(),o.length?e.h&&f?Wp(e.h,i):a||[]:[])},ad:M||n.ad,Vb:pn(t,"SegmentList")||n.Vb,ic:B||n.ic,width:rt(t,"width",jn)||n.width,height:rt(t,"height",jn)||n.height,contentType:p,mimeType:g,codecs:m,frameRate:w,pixelAspectRatio:E,emsgSchemeIdUris:C,id:i,language:t.attributes.lang,je:P,audioSamplingRate:L,cb:U,ae:null,ue:K||n.ue,label:W||null}}function YC(e,t){t=t.slice(),e=I(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}function $C(e){e=I(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=t.attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(t,10),!t)continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],t=parseInt(t,16),!t)continue;for(var r=0,i=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),t=parseInt(t,16),!t)continue;for(i=r=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&0<t&&t<n.length)return n[t]}}return null}function JC(e){var t=e.ad?1:0;return t+=e.Vb?1:0,t+=e.ic?1:0,t==0?e.contentType==at||e.contentType=="application":(t!=1&&(e.ad&&(e.Vb=null),e.ic=null),!0)}function yw(e,t,n,r){var i,o,a,f,p,g,m;return G(function(w){if(w.g==1)return i=[ur(n)],o=Pn(t(),i),a=wt(o,e.g.retryParameters),a.method=r,f=e.j.networkingEngine.request(4,a,{isPreload:e.fa()}),ru(e.O,f),_(w,f.promise,2);if(p=w.h,r=="HEAD"){if(!p.headers||!p.headers.date)return w.return(0);g=p.headers.date}else g=Qt(p.data);return m=Date.parse(g),isNaN(m)?w.return(0):w.return(m-Date.now())})}function QC(e,t,n){var r,i,o,a,f,p,g,m;return G(function(w){switch(w.g){case 1:r=n.map(function(E){return{scheme:E.attributes.schemeIdUri,value:E.attributes.value}}),i=e.g.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),o=I(r),a=o.next();case 2:if(a.done){w.u(4);break}switch(f=a.value,pe(w,5),p=f.scheme,g=f.value,p){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return w.u(7);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":return w.u(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return m=Date.parse(g),w.return(isNaN(m)?0:m-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":ft("NTP UTCTiming scheme is not supported");break;default:ft("Unrecognized scheme in UTCTiming element",p)}w.u(9);break;case 7:return _(w,yw(e,t,g,"HEAD"),10);case 10:return w.return(w.h);case 8:return _(w,yw(e,t,g,"GET"),11);case 11:return w.return(w.h);case 9:be(w,3);break;case 5:ke(w);case 3:a=o.next(),w.u(2);break;case 4:return ft("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),w.return(0)}})}function ZC(e,t,n,r,i){var o=r.attributes.schemeIdUri||"",a=r.attributes.value||"",f=rt(r,"timescale",jn)||1,p=rt(r,"presentationTimeOffset",jn)||0;r=I(bt(r,"Event"));for(var g=r.next();!g.done;g=r.next()){g=g.value;var m=rt(g,"presentationTime",jn)||0,w=rt(g,"duration",jn)||0;m=Math.max((m-p)/f+t,t),w=m+w/f,n!=null&&(m=Math.min(m,t+n),w=Math.min(w,t+n)),w<i||(g={schemeIdUri:o,value:a,startTime:m,endTime:w,id:g.attributes.id||"",eventElement:gc(g),eventNode:ia(g)},e.j.onTimelineRegionAdded(g))}}function gw(e,t,n,r,i){var o,a,f,p;return G(function(g){return g.g==1?(o=_r,a=i?0:1,f=Pl(t,n,r,e.g.retryParameters),_(g,Tm(e,f,o,{type:a}),2)):(p=g.h,g.return(p.data))})}function vw(e,t){return t=yn(e,t),Pu(t)?at:e.split("/")[0]}function Tm(e,t,n,r){return r||(r={}),r.isPreload=e.fa(),t=e.j.networkingEngine.request(n,t,r),ru(e.O,t),t.promise}function ek(e){var t=e.l.Fd;if(!e.l.he||!t||!e.F.length)return[];var n=Date.now()/1e3,r=e.F.filter(function(i){return i=jn(i.attributes.ttl),!i||t+i>n}).map(rr).filter(to);return r.length?Pn(e.A,r):[]}Me("shaka.dash.DashParser",ig),hi["application/dash+xml"]=function(){return new ig},hi["video/vnd.mpeg.dash.mpd"]=function(){return new ig};function ug(){}Me("shaka.dependencies",ug),ug.has=function(e){return xm.has(e)},ug.add=function(e,t){if(!Sw[e])throw Error(e+" is not supported");e==mw?Rt("mux.js","mux.js is no longer used in Shaka Player."):xm.set(e,function(){return t})};var mw="muxjs",Sw={Dk:mw,ISOBoxer:"ISOBoxer"};ug.Allowed=Sw;var xm=new Map([["ISOBoxer",function(){return T.ISOBoxer}]]);function ww(e,t,n){this.type=e,this.Y=t,this.segments=n||null}function Im(e,t,n,r){this.id=e,this.name=t,this.attributes=n,this.value=r===void 0?null:r}Im.prototype.toString=function(e){function t(i){return i.name+"="+(isNaN(Number(i.value))?'"'+i.value+'"':i.value)}var n="#"+this.name,r=this.attributes?this.attributes.filter(function(i){return e?!e.has(i.name):!0}).map(t):[];return this.value&&r.unshift(this.value),0<r.length&&(n+=":"+r.join(",")),n};function Tw(e,t){return t?e.toString():(t=new Set().add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function Uf(e,t){return e=e.attributes.filter(function(n){return n.name==t}),e.length?e[0]:null}function je(e,t,n){return(e=Uf(e,t))?e.value:n||null}function Ft(e,t){if(e=Uf(e,t),!e)throw new Y(2,4,4023,t);return e.value}function xw(e,t,n){n=n===void 0?[]:n,this.Y=t,this.g=e,this.Fb=n}function Em(e,t){this.name=e,this.value=t}function ao(e,t){return e.filter(function(n){return n.name==t})}function Iw(e,t){return e.filter(function(n){return Ft(n,"TYPE")==t})}function er(e,t){e=I(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function jf(e,t,n){return n=n===void 0?0:n,(e=er(e,t))?Number(e.value):n}function bs(e,t,n){return t?Ew(e,[t],n):[]}function Ew(e,t,n){if(!t.length)return[];t=Pn(e,t),e=[],t=I(t);for(var r=t.next();!r.done;r=t.next())e.push(Cw(r.value,n));return e}function Cw(e,t){if(!t||!t.size)return e;e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}");var n=e.match(/{\$\w*}/g);if(n){n=I(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;var i=r.slice(2,r.length-1),o=t.get(i);if(o)e=e.replace(r,o);else throw new Y(2,4,4039,i)}}return e}function tk(){this.g=0}function Cm(e,t){t=Qt(t),t=t.replace(/\r\n|\r(?=[^\n]|$)/gm,`
|
||
`).trim();var n=t.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new Y(2,4,4015);t=0;for(var r=!0,i=I(n),o=i.next();!o.done;o=i.next())if(o=o.value,/^#(?!EXT)/m.test(o)||r)r=!1;else if(o=km(e,o),--e.g,kw.includes(o.name)){t=1;break}else o.name=="EXT-X-STREAM-INF"&&(r=!0);for(i=[],r=!0,o=0;o<n.length;o++){var a=n[o],f=n[o+1];if(/^#(?!EXT)/m.test(a)||r)r=!1;else{if(a=km(e,a),nk.includes(a.name)){if(t!=1)throw new Y(2,4,4017);a=n.splice(o,n.length-o),n=[],r=[],o=[],f=null,a=I(a);for(var p=a.next();!p.done;p=a.next())p=p.value,/^(#EXT)/.test(p)?(p=km(e,p),kw.includes(p.name)?i.push(p):p.name=="EXT-X-MAP"?f=p:p.name=="EXT-X-PART"?o.push(p):p.name=="EXT-X-PRELOAD-HINT"?je(p,"TYPE")=="PART"?o.push(p):je(p,"TYPE")=="MAP"&&(p.name="EXT-X-MAP",f=p):r.push(p)):/^#(?!EXT)/m.test(p)||(p=p.trim(),f&&r.push(f),n.push(new xw(p,r,o)),r=[],o=[]);return o.length&&(f&&r.push(f),n.push(new xw("",r,o))),new ww(t,i,n)}i.push(a),a.name=="EXT-X-STREAM-INF"&&(a.attributes.push(new Em("URI",f)),r=!0)}}return new ww(t,i)}function km(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new Y(2,4,4016,t);t=n[1];var r=n[2];n=[];var i;if(r){r=new nl(r);var o;(o=To(r,/^([^,=]+)(?:,|$)/g))&&(i=o[1]);for(var a=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;o=To(r,a);)n.push(new Em(o[1],o[2]||o[3])),Eu(r)}return new Im(e,t,n,i)}var kw="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),nk="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function Aw(){}function Pw(e,t){try{var n=lg(e);return nu({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(r){return Oi(r)}}function lg(e){var t=e.split(":");if(2>t.length||t[0]!="data")throw new Y(2,1,1004,e);if(t=t.slice(1).join(":").split(","),2>t.length)throw new Y(2,1,1004,e);var n=t[0];e=T.decodeURIComponent(t.slice(1).join(",")),t=n.split(";"),n=t[0];var r=!1;1<t.length&&t[t.length-1]=="base64"&&(r=!0,t.pop());var i;return r?i=ci(e):i=ui(e),{data:i,contentType:n}}Me("shaka.net.DataUriPlugin",Aw),Aw.parse=Pw,Bn("data",Pw);function sg(){var e=this;this.g=this.h=null,this.C=1,this.A=new Map,this.H=new Map,this.M=new Map,this.M.set("video",new Map),this.M.set("audio",new Map),this.M.set(at,new Map),this.M.set("image",new Map),this.Cb=new Set,this.i=new Map,this.l=null,this.L="",this.Ia=new tk,this.I=-1,this.fa=1/0,this.da=this.dc=this.Pa=!1,this.B=new st(function(){if(e.$&&!e.g.continueLoadingWhenPaused&&(e.V.bb(e.$,"timeupdate"),e.$.paused)){e.V.la(e.$,"timeupdate",function(){return Xw(e)});return}Xw(e)}),this.Ca=pg,this.m=null,this.Na=0,this.o=1/0,this.Ha=this.za=this.P=0,this.ba=new yl,this.F=new Map,this.G=new Map,this.sa=new Map,this.ha=new Map,this.K=new Map,this.na=new Map,this.pa=new Map,this.Qb=this.ga=!1,this.Lb=new Ju(5),this.j=null,this.O=!0,this.Ba=new Set,this.V=new At,this.s=this.$=null,this.Mb=function(){return!1}}h=sg.prototype,h.configure=function(e,t){var n=this.h&&e.hls.updatePeriod!=this.g.hls.updatePeriod&&0<=e.hls.updatePeriod;this.g=e,t&&(this.Mb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.T()&&this.B.Hb()},h.start=function(e,t){var n=this,r;return G(function(i){return i.g==1?(n.h=t,n.ga=t.isLowLatencyMode(),_(i,Lm(n,[e]).promise,2)):i.g!=3?(r=i.h,n.L=r.uri,_(i,ok(n,r.data,e),3)):i.return(n.m)})},h.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.ba&&(e.push(this.ba.destroy()),this.ba=null),this.g=this.h=null,this.Cb.clear(),this.m=null,this.i.clear(),this.H.clear(),this.G.clear(),this.A.clear(),this.sa.clear(),this.ha.clear(),this.K.clear(),this.na.clear(),this.pa.clear(),this.Ba.clear(),this.j&&this.j.destroy(),this.V&&(this.V.release(),this.V=null),Promise.all(e)},h.update=function(){var e=this,t,n,r,i,o,a,f,p,g,m,w,E;return G(function(C){if(C.g==1){if(!Kr(e))return C.return();for(t=[],n=Array.from(e.i.values()),e.o=1/0,e.m.gapCount=0,r=n.filter(function(P){return P.stream.segmentIndex}),i=I(r),o=i.next();!o.done;o=i.next())a=o.value,t.push(rk(e,a));return _(C,Promise.all(t),2)}for(Nw(e,r.map(function(P){return P.stream})),f=r.some(function(P){return P.od==0}),r.length&&!f&&(p=kk,fg(e,p.Hh),g=r.map(function(P){return P.Rb}),e.l.ab(Math.min.apply(Math,ee(g))),e.h.updateDuration()),f&&Pm(e),m=I(r),w=m.next();!w.done;w=m.next())E=w.value,E.stream.isAudioMuxedInVideo||!E.stream.segmentIndex||ti(E.stream.segmentIndex)||e.h.disableStream(E.stream);le(C)})};function Am(e,t){return Kr(e)?e.M.get(t.type):t.ee}function rk(e,t){var n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve,Ce,_e;return G(function(Ve){switch(Ve.g){case 1:if(t.stream.isAudioMuxedInVideo)return Ve.return();for(n=[],r=I(t.N()),i=r.next();!i.done;i=r.next())o=i.value,a=new hn(o),f=a.g,t.Pd&&(0<=t.yb&&f.add("_HLS_msn",String(t.yb)),0<=t.zb&&f.add("_HLS_part",String(t.zb))),t.Qd&&f.add("_HLS_skip","YES"),Td(f)&&ku(a,f),n.push(a.toString());return pe(Ve,2),_(Ve,Lm(e,n,!0).promise,4);case 4:p=Ve.h,be(Ve,3);break;case 2:throw g=ke(Ve),e.h&&e.h.disableStream(t.stream),g;case 3:if(!t.stream.segmentIndex)return Ve.return();if(m=Cm(e.Ia,p.data),m.type!=1)throw new Y(2,4,4017);return w=p.uri,w==p.originalUri||t.N().includes(w)||t.gh.push(w),E=ao(m.Y,"EXT-X-DEFINE"),C=Dm(e,E,w),P=t.stream,L=Am(e,t),_(Ve,Bw(e,m,P.mimeType,t.N,C),5);case 5:for(M=Ve.h,B=M.keyIds,U=M.drmInfos,K=function(yt,pt){return yt.size===pt.size&&[].concat(ee(yt)).every(function(ze){return pt.has(ze)})},K(P.keyIds,B)||(P.keyIds=B,P.drmInfos=U,e.h.newDrmInfo(P)),W=zw(e,m,L,C,t.N,t.type),X=W.segments,(q=W.bandwidth)&&(P.bandwidth=q),F=Lo(P),Q=I(X),H=Q.next();!H.done;H=Q.next())Z=H.value,Z.ca&&(Z.ca.Tc=F);P.segmentIndex.yd(X,e.l.nb()),X.length&&($=jf(m.Y,"EXT-X-MEDIA-SEQUENCE",0),de=(ue=er(m.Y,"EXT-X-SKIP"))?Number(je(ue,"SKIPPED-SEGMENTS")):0,ie=Uw($,X),ce=ie.yb,Se=ie.zb,t.yb=ce+de,t.zb=Se,ve=L.get($),P.segmentIndex.Ja(ve)),(Ce=ti(P.segmentIndex))&&(t.yc=Ce.startTime,_e=X[X.length-1],t.Rb=_e.endTime),er(m.Y,"EXT-X-ENDLIST")&&(t.od=!0),Rm(e,m),bm(e,m.Y,P.type,C,t.N),le(Ve)}})}h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(){},h.banLocation=function(e){this.j&&this.j.banLocation(e)},h.setMediaElement=function(e){this.$=e};function Dw(e,t,n){n=n===void 0?!1:n;for(var r=e.I==-1,i=I(t),o=i.next();!o.done;o=i.next()){o=o.value;var a=o.stream.segmentIndex,f=Am(e,o);if(a=ti(a)){f=I(f);for(var p=f.next();!p.done;p=f.next()){p=I(p.value);var g=p.next().value;if(p.next().value==a.startTime){r&&(e.I=Math.max(e.I,g)),o.bf=g;break}}}}if(!(0>e.I))for(t=I(t),r=t.next();!r.done;r=t.next())r=r.value,(eh(e,r.type)||n)&&(i=r.stream.segmentIndex)&&(o=e.I-r.bf,0<o&&(i.g.splice(0,o),i=ti(i))&&(i=-i.startTime,r.stream.segmentIndex.offset(i),Ow(e,r,i)))}function ik(e,t){if(e.fa==1/0){t=I(t);for(var n=t.next();!n.done;n=t.next())n=ti(n.value.stream.segmentIndex),n!=null&&n.h!=null&&(e.fa=Math.min(e.fa,n.h))}if(t=e.fa,t!=1/0){n=I(e.i.values());for(var r=n.next();!r.done;r=n.next())if(r=r.value,!eh(e,r.type)){var i=r.stream.segmentIndex;if(i!=null){var o=ti(i);if(o)if(o.h==null)Ti("Missing EXT-X-PROGRAM-DATE-TIME for stream",r.N(),"Expect AV sync issues!");else for(Ow(e,r,o.h-t-o.startTime),r=I(i),i=r.next();!i.done;i=r.next())i.value.fg(t)}}}}function Ow(e,t,n){t.yc+=n,t.Rb+=n,e=Am(e,t);for(var r=I(e),i=r.next();!i.done;i=r.next()){var o=I(i.value);i=o.next().value,o=o.next().value,e.set(i,o+n)}t.N()}function ok(e,t,n){var r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve,Ce,_e,Ve,yt;return G(function(pt){switch(pt.g){case 1:return r=an,i=Cm(e.Ia,t),o=ao(i.Y,"EXT-X-DEFINE"),a=[],f=[],p=[],e.l=new Le(null,0),e.l.Cc(!0),g=function(){return[n]},m=null,w=new Map,i.type==1?(e.O=!1,$=ao(i.Y,"EXT-X-DEFINE"),w=Dm(e,$,e.L),m=r.oa,ue="",de=new Map,_(pt,_w(e,e.C++,w,i,g,"",m,ue,!0,"Media Playlist",null,de,null,!1,null,!1),7)):(lk(e,o),E=ao(i.Y,"EXT-X-MEDIA"),C=ao(i.Y,"EXT-X-STREAM-INF"),P=ao(i.Y,"EXT-X-IMAGE-STREAM-INF"),L=ao(i.Y,"EXT-X-I-FRAME-STREAM-INF"),M=ao(i.Y,"EXT-X-SESSION-KEY"),B=ao(i.Y,"EXT-X-SESSION-DATA"),U=ao(i.Y,"EXT-X-CONTENT-STEERING"),ak(e,B),_(pt,ck(e,U),4));case 4:if(!e.g.hls.ignoreSupplementalCodecs){for(K=[],W=I(C),X=W.next(),q={};!X.done;q={zh:void 0},X=W.next())F=X.value,(Q=je(F,"SUPPLEMENTAL-CODECS"))&&(q.zh=Q.split(/\s*,\s*/).map(function(ze){return ze.split("/")[0]}),H=F.attributes.map(function(ze){return function(Kt){var Pt=Kt.name;return Kt=Kt.value,Pt=="CODECS"&&(Kt=ze.zh.join(",")),new Em(Pt,Kt)}}(q)),K.push(new Im(F.id,F.name,H,null)));C.push.apply(C,ee(K))}return sk(e,C),mk(e,E),Z=hk(e,L),_(pt,yk(e,C,M,E,g,e.A,Z),5);case 5:return a=pt.h,f=fk(e,E),_(pt,dk(e,P,L),6);case 6:p=pt.h,pt.u(3);break;case 7:ie=pt.h,e.i.set(n,ie),ie.stream&&(ce=Lo(ie.stream),ie.stream.segmentIndex.Db(function(ze){ze.ca&&(ze.ca.Tc=ce)})),m=ie.stream.type,a.push({id:0,language:Et(ue||"und"),disabledUntilTime:0,primary:!0,audio:m=="audio"?ie.stream:null,video:m=="video"?ie.stream:null,bandwidth:ie.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new Y(2,7,7001);if(Fw(e,i),i.type==1&&(Kr(e)&&(Kw(e,i),Se=e.o,e.B.aa(Se)),ve=Array.from(e.i.values()),Om(e,ve),Pm(e),bm(e,i.Y,m,w,g)),e.m={presentationTimeline:e.l,variants:a,textStreams:f,imageStreams:p,offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.s},e.da||!e.g.hls.disableCodecGuessing){pt.u(8);break}for(Ce=[],_e=I(e.m.variants),Ve=_e.next();!Ve.done;Ve=_e.next())yt=Ve.value,yt.audio&&yt.audio.codecs===""&&Ce.push(yt.audio.createSegmentIndex()),yt.video&&yt.video.codecs===""&&Ce.push(yt.video.createSegmentIndex());return _(pt,Promise.all(Ce),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.m),le(pt)}})}function uk(e,t){var n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q;return G(function(H){switch(H.g){case 1:if(n=za(e.g.hls.mediaPlaylistFullMimeType),!t.length)return H.return(n);if(r=Gw(e,t),i=r.segment,o=r.segmentIndex,a=i.N(),f=a[0],p=new hn(f),g=p.Za.split(".").pop(),m=Nm[g])return H.return(za(m));if(w=_r,C=E=null,P=i.ca,!P){H.u(2);break}return L=Pl(P.N(),P.bc(),P.$b(),e.g.retryParameters),_(H,Ul(e,L,w,{type:0}).promise,3);case 3:if(M=H.h,E=M.data,!P.aesKey){H.u(4);break}return _(H,df(E,P.aesKey,0),5);case 5:E=H.h;case 4:(C=M.headers["content-type"])&&(C=C.split(";")[0].toLowerCase());case 2:return B=Pl(i.N(),i.bc(),i.$b(),e.g.retryParameters),_(H,Ul(e,B,w,{type:1}).promise,6);case 6:if(U=H.h,K=U.data,!i.aesKey){H.u(7);break}return _(H,df(K,i.aesKey,o),8);case 8:K=H.h;case 7:if((W=U.headers["content-type"])&&(W=W.split(";")[0].toLowerCase()),X="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),q=["audio/mp4","video/mp4","video/iso.segment"],ws(Ze(K))){var Z=K,$=e.g.disableAudio,ue=e.g.disableVideo,de=e.g.disableText,ie=Ze(Z),ce=new Xt().parse(ie),Se=ce.kd();ie=ce.yf();var ve=[],Ce=!1,_e=!1;if(!$)switch(Se.audio){case"aac":case"aac-loas":ce.fb().length&&(ve.push("mp4a.40.2"),Ce=!0);break;case"mp3":ce.fb().length&&(ve.push("mp4a.40.34"),Ce=!0);break;case"ac3":ce.fb().length&&(ve.push("ac-3"),Ce=!0);break;case"ec3":ce.fb().length&&(ve.push("ec-3"),Ce=!0);break;case"opus":ce.fb().length&&(ve.push("opus"),Ce=!0)}if(!ue)switch(Se.video){case"avc":ie.codec?ve.push(ie.codec):ve.push("avc1.42E01E"),_e=!0;break;case"hvc":ie.codec?ve.push(ie.codec):ve.push("hvc1.1.6.L93.90"),_e=!0;break;case"av1":ve.push("av01.0.01M.08"),_e=!0}if(ve.length){if($=Ce&&!_e,ue=new Map,_e&&!de){for(de=new nr("video/mp2t"),de.i(Z),Z=I(de.j()),_e=Z.next();!_e.done;_e=Z.next())_e=_e.value,ue.set(_e,_e);de.g()}ie={type:$?"audio":"video",mimeType:"video/mp2t",codecs:ve.join(", "),language:null,height:ie.height,width:ie.width,channelCount:null,sampleRate:null,closedCaptions:ue,Jd:null,colorGamut:null,frameRate:ie.frameRate}}else ie=null;if(F=ie)return H.return(F)}else if((X.includes(g)||q.includes(W)||C&&q.includes(C))&&(Q=Ln(E,K,e.g.disableText)))return H.return(Q);return W?H.return(za(W)):C?H.return(za(C)):H.return(n)}})}function Pm(e){if(Kr(e)){if(e.Ca==hg){for(var t=1/0,n=1/0,r=I(e.i.values()),i=r.next();!i.done;i=r.next())i=i.value,i.stream.segmentIndex&&i.stream.type!="text"&&!i.stream.isAudioMuxedInVideo&&(t=Math.min(t,i.Rb),n=Math.min(n,i.yc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.ve(t)}}else e.l.ab(Lw(e));if(!e.l.s)for(t=I(e.i.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=ti(n.stream.segmentIndex))&&n.h&&e.l.qh(n.h);e.l.de()}function lk(e,t){var n=new hn(e.L).g;t=I(t);for(var r=t.next();!r.done;r=t.next()){var i=r.value;r=je(i,"NAME");var o=je(i,"VALUE");i=je(i,"QUERYPARAM"),r&&o&&(e.A.has(r)||e.A.set(r,o)),i&&(r=n.get(i)[0])&&!e.A.has(r)&&e.A.set(i,r)}}function Dm(e,t,n){n=new hn(n).g;var r=new Map;t=I(t);for(var i=t.next();!i.done;i=t.next()){var o=i.value,a=je(o,"NAME"),f=je(o,"VALUE");i=je(o,"QUERYPARAM"),o=je(o,"IMPORT"),a&&f&&(r.has(a)||r.set(a,f)),i&&(a=n.get(i)[0])&&!r.has(a)&&r.set(i,a),o&&(i=e.A.get(o))&&r.set(o,i)}return r}function sk(e,t){t=I(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=je(r,"AUDIO");n=je(r,"VIDEO");var o=je(r,"SUBTITLES");if(r=Rw(e,r),o){var a=cr(at,r);e.G.set(o,a),Gr(r,a)}i&&(o=cr("audio",r),o||(o=e.g.hls.defaultAudioCodec),e.G.set(i,o)),n&&(i=cr("video",r),i||(i=e.g.hls.defaultVideoCodec),e.G.set(n,i))}}function ak(e,t){t=I(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=je(r,"DATA-ID");n=je(r,"URI");var o=je(r,"LANGUAGE");r=je(r,"VALUE"),i=new Map().set("id",i),n&&i.set("uri",bs([e.L],n,e.A)[0]),o&&i.set("language",o),r&&i.set("value",r),n=new Te("sessiondata",i),e.h&&e.h.onEvent(n)}}function ck(e,t){var n,r,i,o,a,f;return G(function(p){if(!e.h||!e.g)return p.return();for(r=I(t),i=r.next();!i.done;i=r.next())if(o=i.value,a=je(o,"PATHWAY-ID"),f=je(o,"SERVER-URI"),a&&f){e.j=new Lf(e.h),e.j.configure(e.g),e.j.i=[e.L],e.j.setManifestType("HLS"),e.j.h=a,n=Gp(e.j,f);break}return _(p,n,0)})}function fk(e,t){var n=Iw(t,"SUBTITLES");t=n.map(function(a){if(e.g.disableText)return null;try{return bw(e,[a],new Map).stream}catch(f){if(e.g.hls.ignoreTextStreamFailures)return null;throw f}}),n=I(n);for(var r=n.next();!r.done;r=n.next()){var i=Ft(r.value,"GROUP-ID");if((r=e.G.get(i))&&(i=e.H.get(i))){i=I(i);for(var o=i.next();!o.done;o=i.next())o=o.value,o.stream.codecs=r,o.stream.mimeType=Mm(at,r)||cg(at),tc(o.stream)}}return t.filter(function(a){return a})}function tc(e){var t=new Set([yn(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Db(function(n){n.mimeType&&t.add(yn(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function dk(e,t,n){var r,i;return G(function(o){return o.g==1?(r=t.map(function(a){var f,p;return G(function(g){if(g.g==1)return e.g.disableThumbnails?g.return(null):(pe(g,2),_(g,Sk(e,a),4));if(g.g!=2)return f=g.h,g.return(f.stream);if(p=ke(g),e.g.hls.ignoreImageStreamFailures)return g.return(null);throw p})}).concat(n.map(function(a){if(e.g.disableThumbnails)return null;try{var f=Mw(e,a);return f.stream.type!=="image"?null:f.stream}catch(p){if(e.g.hls.ignoreImageStreamFailures)return null;throw p}})),_(o,Promise.all(r),2)):(i=o.h,o.return(i.filter(function(a){return a})))})}function pk(e,t,n){t=t.filter(function(f){var p=je(f,"URI")||"";return f=je(f,"TYPE"),f!="SUBTITLES"&&(p!=""||f=="AUDIO")});var r={};t=I(t);for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=Tw(i,!e.j);r[o]?r[o].push(i):r[o]=[i]}for(var a in r)bw(e,r[a],n,!1)}function hk(e,t){return t.map(function(n){return n=Mw(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function yk(e,t,n,r,i,o,a){var f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve,Ce,_e,Ve,yt,pt,ze,Kt,Pt;return G(function(ot){switch(ot.g){case 1:if(f=[],p=new Set,!(0<n.length)){ot.u(2);break}g=I(n),m=g.next();case 3:if(m.done){ot.u(2);break}if(w=m.value,E=Ft(w,"METHOD"),C=je(w,"KEYFORMAT")||"identity",P=null,E=="NONE"){ot.u(4);break}if(dg(E)){L=bs(i(),Ft(w,"URI"),o),M=L.sort().join(""),e.K.has(M)||(B=wt(L,e.g.retryParameters),U=Ul(e,B,6).promise,e.K.set(M,U)),ot.u(4);break}if(C!="identity"){P=(K=Jw[C])?K(w,""):null,ot.u(6);break}return _(ot,Yw(e,w,"",i,null,o),9);case 9:P=ot.h;case 6:if(P){if(P.keyIds)for(W=I(P.keyIds),X=W.next();!X.done;X=W.next())q=X.value,p.add(q);f.push(P)}case 4:m=g.next(),ot.u(3);break;case 2:for(F={},Q=I(t),H=Q.next();!H.done;H=Q.next())Z=H.value,$=Tw(Z,!e.j),F[$]?F[$].push(Z):F[$]=[Z];ue=[];for(de in F)ie=F[de],ce=ie[0],Se=je(ce,"FRAME-RATE"),ve=Number(je(ce,"AVERAGE-BANDWIDTH"))||Number(Ft(ce,"BANDWIDTH")),Ce=je(ce,"RESOLUTION"),_e=I(Ce?Ce.split("x"):[null,null]),Ve=_e.next().value,yt=_e.next().value,pt=je(ce,"VIDEO-RANGE"),(ze=je(ce,"REQ-VIDEO-LAYOUT"))&&ze.includes(",")&&(Kt=ze.split(",").filter(function(Yt){return Yt=="CH-STEREO"||Yt=="CH-MONO"}),ze=Kt[0]),ze=ze||"CH-MONO",Pt=gk(e,ie,r),ue.push.apply(ue,ee(vk(e,Pt.audio,Pt.video,ve,Ve,yt,Se,pt,ze,f,p,a)));return ot.return(ue.filter(function(Yt){return Yt!=null}))}})}function gk(e,t,n){for(var r={audio:[],video:[]},i=new Map,o=[],a=!1,f=!1,p=I(t),g=p.next();!g.done;g=p.next()){var m=g.value;g=je(m,"AUDIO");var w=je(m,"VIDEO"),E=g||w;E&&(o.includes(E)||o.push(E),(m=je(m,"PATHWAY-ID"))&&i.set(E,m),g?a=!0:w&&(f=!0))}o.length&&n.length&&(n=n.filter(function(P){return o.includes(Ft(P,"GROUP-ID"))}),pk(e,n,i)),n=(i=o.sort().join(","))&&e.H.has(i)?e.H.get(i):[],a?r.audio.push.apply(r.audio,ee(n)):f&&r.video.push.apply(r.video,ee(n)),a=!1;var C=t.map(function(P){return Ft(P,"URI")});return g=r.audio.find(function(P){return P&&P.N().find(function(L){return C.includes(L)})}),f=Rw(e,t[0]),n=cr("video",f),(p=cr("audio",f))&&!n?(g="audio",a=0<r.audio.length):!r.audio.length&&!r.video.length&&p&&n?(g="video",f=[[n,p].join()]):r.audio.length&&g?(g="audio",a=!0):g=r.video.length&&!r.audio.length?"audio":"video",a||(e=wk(e,t,f,g),i&&(e.stream.groupId=i),r[e.stream.type]=[e]),r}function Rw(e,t){return t=je(t,"CODECS")||"",e.da=0<t.length,e.da||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),Sp(t.split(/\s*,\s*/))}function vk(e,t,n,r,i,o,a,f,p,g,m,w){for(var E=I(n),C=E.next();!C.done;C=E.next())Ww(C.value.stream,i,o,a,f,p,null);for(i=e.g.disableAudio,(!t.length||i)&&(t=[null]),i=e.g.disableVideo,(!n.length||i)&&(n=[null]),i=[],t=I(t),o=t.next();!o.done;o=t.next())for(o=o.value,a=I(n),f=a.next();!f.done;f=a.next()){var P=f.value;(f=o?o.stream:null)&&(f.drmInfos=g,f.keyIds=m),(p=P?P.stream:null)&&(p.drmInfos=g,p.keyIds=m,e.g.disableIFrames||fr(p,w)),p&&!f&&(p.bandwidth=r),!p&&f&&(f.bandwidth=r),E=o?o.stream.drmInfos:null,C=P?P.stream.drmInfos:null,P=P?P.N().sort().join(","):"";var L=o?o.N().sort().join(","):"",M=[];f&&f.codecs&&M.push(f.codecs),p&&p.codecs&&M.push(p.codecs),P=[P,L,M.sort()].join("-"),f&&p&&!ad(E,C)||e.Cb.has(P)||(f={id:e.C++,language:f?f.language:"und",disabledUntilTime:0,primary:!!f&&f.primary||!!p&&p.primary,audio:f,video:p,bandwidth:r,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},i.push(f),e.Cb.add(P))}return i}function mk(e,t){t=Iw(t,"CLOSED-CAPTIONS"),e.O=t.length==0,t=I(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=je(r,"LANGUAGE");n=Et(i||"und"),i||(i=je(r,"NAME"))&&(n=i),i=Ft(r,"GROUP-ID"),r=Ft(r,"INSTREAM-ID").replace("SERVICE","svc"),e.F.get(i)||e.F.set(i,new Map),e.F.get(i).set(r,n)}}function bw(e,t,n,r){r=r===void 0?!0:r;for(var i=[],o=[],a=new Map,f=I(t),p=f.next();!p.done;p=f.next()){var g=p.value;p=r?Ft(g,"URI"):je(g,"URI")||"shaka://hls-muxed",g=Ft(g,"GROUP-ID"),i.push(p),o.push(g),a.set(g,p)}if(r=o.sort().join(","),p=t[0],t="",f=Ft(p,"TYPE").toLowerCase(),f=="subtitles"&&(f=at),f==at)t=je(p,"CODECS")||"";else for(o=I(o),g=o.next();!g.done;g=o.next())if(g=g.value,e.G.has(g)){t=e.G.get(g);break}if(o=i.sort().join(","),e.i.has(o))return e.i.get(o);if(g=e.C++,e.j){a=I(a);for(var m=a.next();!m.done;m=a.next()){var w=I(m.value);m=w.next().value,w=w.next().value,(m=n.get(m))&&Nf(e.j,g,m,w)}}n=je(p,"LANGUAGE"),a=je(p,"NAME"),m=je(p,"DEFAULT")=="YES",f=="audio"?w=(w=je(p,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;var E=f=="audio"&&(E=je(p,"CHANNELS"))?E.includes("/JOC"):!1,C=je(p,"CHARACTERISTICS"),P=je(p,"FORCED")=="YES";return f=="audio"?p=(p=je(p,"SAMPLE-RATE"))?parseInt(p,10):null:p=null,i=ag(e,g,i,t,f,n,m,a,w,null,C,P,p,E),i.stream&&(i.stream.groupId=r),e.H.has(r)?e.H.get(r).push(i):e.H.set(r,[i]),e.i.set(o,i),i}function Sk(e,t){var n,r,i,o,a,f,p,g,m,w;return G(function(E){return E.g==1?(n=Ft(t,"URI"),r=je(t,"CODECS","jpeg")||"",e.i.has(n)?E.return(e.i.get(n)):(i=je(t,"LANGUAGE"),o=je(t,"NAME"),a=je(t,"CHARACTERISTICS"),f=ag(e,e.C++,[n],r,"image",i,!1,o,null,null,a,!1,null,!1),(p=je(t,"RESOLUTION"))?_(E,f.stream.createSegmentIndex(),3):E.u(2))):(E.g!=2&&(g=ti(f.stream.segmentIndex),m=g.tilesLayout)&&(f.stream.width=Number(p.split("x")[0])*Number(m.split("x")[0]),f.stream.height=Number(p.split("x")[1])*Number(m.split("x")[1])),(w=je(t,"BANDWIDTH"))&&(f.stream.bandwidth=Number(w)),e.i.set(n,f),E.return(f))})}function Mw(e,t){var n="video",r=Ft(t,"URI"),i=je(t,"CODECS")||"";if(i=="mjpg"&&(n="image"),e.i.has(r))return e.i.get(r);var o=je(t,"LANGUAGE"),a=je(t,"NAME"),f=je(t,"CHARACTERISTICS");return n=ag(e,e.C++,[r],i,n,o,!1,a,null,null,f,!1,null,!1),i=je(t,"RESOLUTION"),o=I(i?i.split("x"):[null,null]),i=o.next().value,o=o.next().value,n.stream.width=Number(i)||void 0,n.stream.height=Number(o)||void 0,(t=je(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(r,n),n}function wk(e,t,n,r){for(var i=e.C++,o=[],a=I(t),f=a.next();!f.done;f=a.next()){var p=f.value;f=Ft(p,"URI"),p=je(p,"PATHWAY-ID"),e.j&&p&&Nf(e.j,i,p,f),o.push(f)}if(a=o.sort().join(",")+n.sort().join(","),e.i.has(a))return e.i.get(a);e:{if(t=je(t[0],"CLOSED-CAPTIONS"),r=="video"){if(e.g.disableText){e.O=!1,t=null;break e}if(t){if(t!="NONE"){t=e.F.get(t);break e}e.O=!1}else if(!t&&e.F.size)for(t=I(e.F.keys()).next();!t.done;){t=e.F.get(t.value);break e}}t=null}return n=ca(r,n),r=ag(e,i,o,n,r,null,!1,null,null,t,null,!1,null,!1),e.i.set(a,r),r}function ag(e,t,n,r,i,o,a,f,p,g,m,w,E,C){function P(X){var q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve,Ce,_e,Ve,yt,pt,ze,Kt,Pt,ot,Yt,qt;return G(function(lt){switch(lt.g){case 1:return q=an,pe(lt,2),F=U.N(),_(lt,X.promise,4);case 4:if(Q=lt.h,X.aborted)return lt.return();if(H=Q.uri,H==Q.originalUri||F.includes(H)||B.push(H),Z=Cm(e.Ia,Q.data),Z.type!=1)throw new Y(2,4,4017);return $=ao(Z.Y,"EXT-X-DEFINE"),ue=Dm(e,$,H),de=!1,(!e.da&&e.g.hls.disableCodecGuessing||e.O&&i==q.oa&&!e.g.hls.disableClosedCaptionsDetection)&&0<Z.segments.length&&(e.O=!1,de=!0),ie=!e.da&&e.g.hls.disableCodecGuessing,ce=Kr(e),_(lt,_w(e,0,ue,Z,L,r,i,o,a,f,p,g,m,w,E,C,void 0,de,ie),5);case 5:if(Se=lt.h,X.aborted)return lt.return();if(ve=Se.stream,Fw(e,Z),Kr(e)&&!ce&&Kw(e,Z),U.yc=Se.yc,U.Rb=Se.Rb,U.Qd=Se.Qd,U.Pd=Se.Pd,U.od=Se.od,U.ee=Se.ee,U.yb=Se.yb,U.zb=Se.zb,U.Hf=!0,M.segmentIndex=ve.segmentIndex,M.encrypted=ve.encrypted,M.drmInfos=ve.drmInfos,M.keyIds=ve.keyIds,M.mimeType=ve.mimeType,M.bandwidth=M.bandwidth||ve.bandwidth,M.codecs=M.codecs||ve.codecs,M.closedCaptions=M.closedCaptions||ve.closedCaptions,M.width=M.width||ve.width,M.height=M.height||ve.height,M.hdr=M.hdr||ve.hdr,M.colorGamut=M.colorGamut||ve.colorGamut,M.frameRate=M.frameRate||ve.frameRate,M.language=="und"&&ve.language!="und"&&(M.language=ve.language),M.language=M.language||ve.language,M.channelsCount=M.channelsCount||ve.channelsCount,M.audioSamplingRate=M.audioSamplingRate||ve.audioSamplingRate,tc(M),M.drmInfos.length&&e.h.newDrmInfo(M),Ce=!1,(!g&&M.closedCaptions||g&&M.closedCaptions&&g.size!=M.closedCaptions.size)&&(Ce=!0),e.m&&Ce&&e.h.makeTextStreamsForClosedCaptions(e.m),i==q.oa||i==q.W)for(_e=I(e.i.values()),Ve=_e.next();!Ve.done;Ve=_e.next())yt=Ve.value,yt.Hf||yt.type!=i||(yt.stream.mimeType=ve.mimeType,tc(yt.stream));i==q.wa&&(pt=ti(ve.segmentIndex))&&pt.ca&&(M.mimeType="application/mp4",tc(M)),ze=Lo(M),M.segmentIndex.Db(function(Tn){Tn.ca&&(Tn.ca.Tc=ze)}),Tk(e)&&(e.dc?Om(e,[U]):(e.dc=!0,Kt=Array.from(e.i.values()),Pt=Kt.filter(function(Tn){return Tn.stream.segmentIndex}),Om(e,Pt),Pm(e),ot=e.o,0<ot&&e.B.aa(ot))),bm(e,Z.Y,M.type,ue,L),e.m&&(e.m.startTime=e.s),be(lt,0);break;case 2:if(Yt=ke(lt),M.closeSegmentIndex(),Yt.code===7001)return lt.return();if(qt=e.h.disableStream(M),!qt)throw Yt;le(lt)}})}function L(){return e.j&&1<n.length?Wp(e.j,t):B.concat(Ew([e.L],n,e.A))}var M=jw(e,r,i,o,a,f,p,g,m,w,E,C);n.includes("shaka://hls-muxed")&&(M.isAudioMuxedInVideo=!0,M.mimeType="video/mp2t",tc(M));var B=[],U={stream:M,type:i,gh:B,N:L,yc:0,Rb:0,ee:new Map,Qd:!1,Pd:!1,od:!1,bf:-1,yb:-1,zb:-1,Hf:!1},K=null,W;return M.createSegmentIndex=function(){return K||(M.isAudioMuxedInVideo?(M.segmentIndex=new St([]),Promise.resolve()):(W=Lm(e,U.N(),!0),K=new Promise(function(X){X(P(W))})))},M.closeSegmentIndex=function(){K&&!M.segmentIndex&&W.abort(),M.segmentIndex&&(M.segmentIndex.release(),M.segmentIndex=null),K=null},U}function Lw(e){var t=1/0;e=I(e.i.values());for(var n=e.next();!n.done;n=e.next())n=n.value,n.stream.segmentIndex&&n.stream.type!="text"&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Rb));return t}function Nw(e,t){var n=[];t=I(t);for(var r=t.next();!r.done;r=t.next())r=r.value,r.segmentIndex&&r.segmentIndex.Db(function(i){n.push(i)});e.l.Cd(n)}function Om(e,t){if(!Kr(e))for(var n=Lw(e),r=I(t),i=r.next();!i.done;i=r.next())i.value.stream.segmentIndex.Lc(0,n);Nw(e,t.map(function(o){return o.stream})),r=Array.from(e.i.values()).filter(function(o){return o.stream.segmentIndex}),n=r.some(function(o){return o.stream.type=="audio"}),i=r.some(function(o){return o.stream.type=="video"}),r=Kr(e)&&!e.Pa,n=!Kr(e)&&e.Pa&&!(n&&i),e.g.hls.ignoreManifestProgramDateTime||r||n?Dw(e,t,r):(ik(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Dw(e,t))}function eh(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function Tk(e){if(!e.m)return!1;var t=[],n=[];e=I(e.m.variants);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&t.push(r.video),r.audio&&n.push(r.audio);return!(0<t.length&&!t.some(function(i){return i.segmentIndex})||0<n.length&&!n.some(function(i){return i.segmentIndex}))}function _w(e,t,n,r,i,o,a,f,p,g,m,w,E,C,P,L,M,B,U){B=B===void 0?!0:B,U=U===void 0?!0:U;var K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve,Ce,_e,Ve,yt,pt,ze,Kt,Pt,ot,Yt,qt,lt,Tn,ii;return G(function(An){switch(An.g){case 1:if(K=r.segments||[],W=K.every(function(Cn){return!!er(Cn.Y,"EXT-X-GAP")}),!K.length||W)throw new Y(2,4,4053);if(xk(e,r),Kr(e)&&Rm(e,r),X=Kr(e)?e.M.get(a):new Map,q=zw(e,r,X,n,i,a),F=q.segments,Q=q.bandwidth,de=ue=$=Z=H=null,!(0<F.length&&B)){An.u(2);break}return _(An,uk(e,F),3);case 3:ie=An.h,a=ie.type,f=ie.language,m=ie.channelCount,P=ie.sampleRate,e.g.disableText||(w=ie.closedCaptions),Z=ie.height,H=ie.width,$=ie.Jd,ue=ie.colorGamut,de=ie.frameRate,U&&(M=ie.mimeType,o=ie.codecs);case 2:if(M){An.u(4);break}return _(An,Ck(e,a,o,F),5);case 5:M=An.h,a!=at||o||M!="application/mp4"||!F[0]||F[0].ca||(M="text/vtt");case 4:return _(An,Bw(e,r,M,i,n),6);case 6:if(ce=An.h,Se=ce.drmInfos,ve=ce.keyIds,Ce=ce.encrypted,_e=ce.Lh,Ce&&!Se.length&&!_e)throw new Y(2,4,4026);return Ve=jw(e,o,a,f,p,g,m,w,E,C,P,L),Ve.encrypted=Ce&&!_e,Ve.drmInfos=Se,Ve.keyIds=ve,Ve.mimeType=M,Q&&(Ve.bandwidth=Q),tc(Ve),a=="video"&&(H||Z||$||ue)&&Ww(Ve,H,Z,de,$,null,ue),Kr(e)&&Rm(e,r),yt=F[0].startTime,pt=F[F.length-1],ze=pt.endTime,Kt=new St(F),Ve.segmentIndex=Kt,ot=(Pt=er(r.Y,"EXT-X-SERVER-CONTROL"))?Uf(Pt,"CAN-SKIP-UNTIL")!=null:!1,Yt=Pt?Uf(Pt,"CAN-BLOCK-RELOAD")!=null:!1,qt=jf(r.Y,"EXT-X-MEDIA-SEQUENCE",0),lt=Uw(qt,F),Tn=lt.yb,ii=lt.zb,An.return({stream:Ve,type:a,gh:[],N:i,yc:yt,Rb:ze,Qd:ot,Pd:Yt,od:!1,bf:-1,yb:Tn,zb:ii,ee:X,Hf:!1})}})}function Uw(e,t){e=e+t.length-1;var n=-1;if(!t.length)return e++,{yb:e,zb:n};t=t[t.length-1];var r=t.g;return t.g.length?(n=r.length-1,r[r.length-1].isPreload()||(e++,n=0),{yb:e,zb:n}):(e++,t.m&&(n=0),{yb:e,zb:n})}function jw(e,t,n,r,i,o,a,f,p,g,m,w){var E=Mm(n,t)||cg(n),C=[];if(p){p=I(p.split(","));for(var P=p.next();!P.done;P=p.next())C.push(P.value)}return p=void 0,P=null,n==at?p=C.includes("public.accessibility.transcribes-spoken-dialog")&&C.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":C.includes("public.accessibility.describes-video")&&(P="visually impaired"),C.length||p!=="subtitle"||C.push("subtitle"),e={id:e.C++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:E,codecs:t,kind:n==at?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Et(r||"und"),originalLanguage:r,label:o,type:n,primary:i,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:C,forced:g,channelsCount:a,audioSamplingRate:m,spatialAudio:w,closedCaptions:f,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:P,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1},tc(e),e}function Bw(e,t,n,r,i){var o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se;return G(function(ve){switch(ve.g){case 1:if(o=new Map,t.segments){for(a=I(t.segments),f=a.next();!f.done;f=a.next())if(p=f.value,g=ao(p.Y,"EXT-X-KEY"),m=null,g.length)for(m=Hw(e,t,p.Y,r,i),w=I(g),E=w.next();!E.done;E=w.next())C=E.value,o.set(C,m)}L=P=!1,M=[],B=new Set,U=I(o),K=U.next();case 2:if(K.done){ve.u(4);break}if(W=K.value,X=I(W),q=X.next().value,F=X.next().value,Q=q,H=F,Z=Ft(Q,"METHOD"),Z=="NONE"){ve.u(3);break}if(P=!0,$=je(Q,"KEYFORMAT")||"identity",ue=null,dg(Z)){L=!0,ve.u(3);break}if($!="identity"){ue=(de=Jw[$])?de(Q,n):null,ve.u(6);break}return _(ve,Yw(e,Q,n,r,H,i),8);case 8:ue=ve.h;case 6:if(ue){if(ue.keyIds)for(ie=I(ue.keyIds),ce=ie.next();!ce.done;ce=ie.next())Se=ce.value,B.add(Se);M.push(ue)}case 3:K=U.next(),ve.u(2);break;case 4:return ve.return({drmInfos:M,keyIds:B,encrypted:P,Lh:L})}})}function Vw(e,t,n,r,i){if(!T.crypto||!T.crypto.subtle)throw ft("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new Y(2,4,4042);var o=0,a=je(t,"IV","");if(a){var f=cl(a.substr(2));if(f.byteLength!=16)throw new Y(2,4,4048)}else o=jf(n.Y,"EXT-X-MEDIA-SEQUENCE",0);var p=bs(r(),Ft(t,"URI"),i),g=p.sort().join("");if(n=t.toString()+"-"+o+"-"+g,!e.ha.has(n)){var m={bitsKey:128,blockCipherMode:"CBC",iv:f,firstMediaSequenceNumber:o};switch(Ft(t,"METHOD")){case"AES-256":m.bitsKey=256;break;case"AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var w,E,C,P;return G(function(L){if(L.g==1)return e.K.has(g)||(w=wt(p,e.g.retryParameters),E=Ul(e,w,6).promise,e.K.set(g,E)),_(L,e.K.get(g),2);if(L.g!=3){if(C=L.h,!C.data||C.data.byteLength!=m.bitsKey/8)throw new Y(2,4,4049);return P={name:m.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:m.bitsKey},_(L,T.crypto.subtle.importKey("raw",C.data,P,!0,["decrypt"]),3)}m.cryptoKey=L.h,m.fetchKey=void 0,le(L)})},e.ha.set(n,m)}return e.ha.get(n)}function Fw(e,t){e.s==null&&(t=er(t.Y,"EXT-X-START"))&&(e.s=Number(Ft(t,"TIME-OFFSET")))}function xk(e,t){var n=er(t.Y,"EXT-X-PLAYLIST-TYPE");t=er(t.Y,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?fg(e,pg):n?fg(e,hg):fg(e,Qw)}function Rm(e,t){var n=1/0,r=t.segments;if(r.length)for(var i=r.length-1;0<=i;){var o=er(r[i].Y,"EXTINF");if(o){n=Number(o.value.split(",")[0]);break}i--}if(r=er(t.Y,"EXT-X-TARGETDURATION"),!r)throw new Y(2,4,4024,"EXT-X-TARGETDURATION");r=Number(r.value),(i=er(t.Y,"EXT-X-PART-INF"))&&(e.P=Number(Ft(i,"PART-TARGET"))),t=er(t.Y,"EXT-X-SERVER-CONTROL"),e.ga&&e.P?(e.o=e.Qb?5*e.P<=n?Math.min(e.P,e.o):Math.min(n,e.o):Math.min(e.P,e.o),e.Ha=t?Number(Ft(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),n=t?Uf(t,"HOLD-BACK"):null,e.za=n?Number(n.value):0),e.Na=Math.max(r,e.Na)}function Kw(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Ha)n=e.Ha;else if(e.za)n=e.za;else{var r=t.segments.length,i=e.g.hls.liveSegmentsDelay;for(i>r-2&&(i=Math.max(1,r-2)),i=r-i;i<r;i++){var o=er(t.segments[i].Y,"EXTINF");n=o?n+Math.ceil(Number(o.value.split(",")[0])):n+e.Na}}e.s&&0>e.s&&(n=Math.min(-e.s,n),e.s+=n),e.l.rh(0),e.l.$f(n),e.l.Cc(!1)}function Hw(e,t,n,r,i){var o=er(n,"EXT-X-MAP");if(!o)return null;var a=Ft(o,"URI"),f=bs(r(),a,i);if(a=[f.toString(),je(o,"BYTERANGE","")].join("-"),!e.sa.has(a)){var p=void 0,g=null;n=I(n);for(var m=n.next();!m.done;m=n.next())m=m.value,m.name=="EXT-X-KEY"?dg(Ft(m,"METHOD"))&&m.id<o.id&&(p=Vw(e,m,t,r,i)):m.name=="EXT-X-BYTERANGE"&&m.id<o.id&&(g=m);t=Ik(f,o,g,p),e.sa.set(a,t)}return e.sa.get(a)}function Ik(e,t,n,r){var i=0,o=null;return t=je(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(i=t.split("@"),o=Number(i[0]),i=Number(i[1]),o=i+o-1,r&&(n=o+1-i,n%16&&(o+=16-n%16))),new Ar(function(){return e},i,o,null,null,null,r)}function Ek(e,t,n,r,i,o,a,f,p){function g(Ce){Ce=new hn(Ce).Za.split(".").pop();var _e=_m[a][Ce];return _e||(_e=Nm[Ce]),_e}var m=r.Y,w=er(m,"EXTINF"),E=0,C=0,P=null;r.Fb.length&&(e.m.isLowLatency=!0);var L=null;if(!e.g.hls.ignoreManifestProgramDateTime){var M=er(m,"EXT-X-PROGRAM-DATE-TIME");M&&M.value&&(L=Fo(M.value),e.Pa=!0)}var B=au;if(er(m,"EXT-X-GAP")&&(e.m.gapCount++,B=2),!w){if(r.Fb.length==0)throw new Y(2,4,4024,"EXTINF");if(!e.ga)return null}var U=[];M=!1;var K=null,W=!1,X=!1;if(e.ga&&r.Fb.length){E=t&&T.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var q=L,F={},Q=0;Q<r.Fb.length;F={Ee:void 0,le:void 0},Q++){var H=r.Fb[Q],Z=Q==0?n:U[U.length-1],$=Q==0?i:Z.endTime,ue=Number(je(H,"DURATION"))||e.P;if(ue){var de=$+ue,ie=0,ce=null;if(H.name=="EXT-X-PRELOAD-HINT"?(ie=(ie=je(H,"BYTERANGE-START"))?Number(ie):0,(Z=je(H,"BYTERANGE-LENGTH"))?ce=ie+Number(Z)-1:ie&&(ce=Number.MAX_SAFE_INTEGER)):(ie=je(H,"BYTERANGE"),ce=I(qw(Z,ie)),ie=ce.next().value,ce=ce.next().value),F.le=je(H,"URI"),F.le){Z=au,je(H,"GAP")=="YES"&&(e.m.gapCount++,Z=2,W=!0),F.Ee=null;var Se=function(Ce){return function(){return Ce.Ee==null&&(Ce.Ee=bs(f(),Ce.le,o)),Ce.Ee}}(F);E&&0<=ie&&ce!=null&&(K=Se,M=!0),$=new Fe($,de,Se,ie,ce,t,0,0,1/0,[],"",null,q,Z,p),H.name=="EXT-X-PRELOAD-HINT"&&($.If(),X=!0),je(H,"INDEPENDENT")!="YES"&&0<Q&&$.Sc(),(F=g(F.le))&&($.mimeType=F,$w.has(F)&&($.ca=null)),U.push($),q&&(q+=ue)}}}}if(w){if(w=Number(w.value.split(",")[0]),w==0)return null;E=i+w}else if(U.length)E=U[U.length-1].endTime;else return null;M&&(W||U[0].Ma!=0?(M=!1,K=null):U=[]),(w=er(m,"EXT-X-BYTERANGE"))?(P=I(qw(n,w.value)),C=P.next().value,P=P.next().value):U.length&&(C=U[0].Ma,P=U[U.length-1].va),n="",w=null,a=="image"&&(n="1x1",m=er(m,"EXT-X-TILES"))&&(n=Ft(m,"LAYOUT"),(m=je(m,"DURATION"))&&(w=Number(m)));var ve=null;return t=new Fe(i,E,function(){return K?K():(ve==null&&(ve=bs(f(),r.g,o)),ve||[])},C,P,t,0,0,1/0,U,n,w,L,B,p,0<U.length&&!!r.g),(i=g(r.g))&&(t.mimeType=i,$w.has(i)&&(t.ca=null)),M&&(e.Qb=!0,t.Vg(),X&&t.If()),t}function qw(e,t){var n=0,r=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.va+1,r=n+t-1),[n,r]}function bm(e,t,n,r,i){if(n=="video"||n=="audio"){var o=e.l.m;if(o&&!eh(e,n))for(t=ao(t,"EXT-X-DATERANGE"),t=t.filter(function($){return Uf($,"START-DATE")!=null}).sort(function($,ue){return $=Ft($,"START-DATE"),ue=Ft(ue,"START-DATE"),$<ue?-1:$>ue?1:0}),n=0;n<t.length;n++){var a=t[n];try{var f=Ft(a,"ID");if(!e.Ba.has(f)){var p=Ft(a,"START-DATE"),g=Fo(p);if(!isNaN(g)){var m=Math.max(0,g-o),w=null,E=je(a,"END-DATE");if(E){var C=Fo(E);if(!isNaN(C)&&(w=C-o,0>w))continue}if(w==null){var P=je(a,"DURATION")||je(a,"PLANNED-DURATION");if(P){var L=parseFloat(P);if(isNaN(L)||(w=m+L),0>g-o+L)continue}}var M=je(a,"CLASS")||"com.apple.quicktime.HLS",B=je(a,"END-ON-NEXT")=="YES";if(w==null&&B){for(var U=n+1;U<t.length;U++){var K=je(t[U],"CLASS")||"com.apple.quicktime.HLS";if(M==K){var W=Ft(t[U],"START-DATE"),X=Fo(W);if(!isNaN(X)&&X&&X>g){w=Math.max(0,X-o);break}}}if(w==null)continue}U=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var q=[],F=I(a.attributes),Q=F.next();!Q.done;Q=F.next()){var H=Q.value;if(!U.includes(H.name)){var Z=Cw(H.value,r);(H.name=="X-ASSET-URI"||H.name=="X-ASSET-LIST")&&(Z=bs(i(),H.value,r)[0]),q.push({key:H.name,description:"",data:Z,mimeType:null,pictureType:null})}}1<q.length&&e.h.onMetadata(M,m,w,q),e.Ba.add(f)}}}catch{}}}}function zw(e,t,n,r,i,o){var a=t.segments,f=void 0,p=jf(t.Y,"EXT-X-DISCONTINUITY-SEQUENCE",-1),g=jf(t.Y,"EXT-X-MEDIA-SEQUENCE",0),m=er(t.Y,"EXT-X-SKIP"),w=m?Number(je(m,"SKIPPED-SEGMENTS")):0,E=g+w,C=0;Kr(e)&&n.has(E)&&(C=n.get(E)),C===0&&e.Ca==hg&&0<n.size&&!n.has(E)&&e.l.i!=null&&(C=e.l.nb());var P=[],L=null;m=[];for(var M=0;M<a.length;M++){var B=a[M],U=M==0?C:L.endTime;E=g+w+M,er(B.Y,"EXT-X-DISCONTINUITY")&&p++;for(var K=I(B.Y),W=K.next();!W.done;W=K.next())W=W.value,W.name=="EXT-X-KEY"&&(dg(Ft(W,"METHOD"))?f=Vw(e,W,t,i,r):f=void 0);n.set(E,U),K=Hw(e,t,B.Y,i,r),(U=Ek(e,K,L,B,U,r,o,i,f))&&((L=jf(B.Y,"EXT-X-BITRATE"))?m.push({bitrate:L,duration:U.endTime-U.startTime}):m.length&&(L=m.pop(),L.duration+=U.endTime-U.startTime,m.push(L)),L=U,U.i=p,eh(e,o)&&e.I!=null&&E<e.I||P.push(U))}if(t=void 0,m.length&&(t=m.reduce(function(X,q){return X+q.duration},0),t=Math.round(m.reduce(function(X,q){return X+q.bitrate*q.duration},0)/t*1e3)),m=P.some(function(X){return X.h!=null})){for(n={},r=0;r<P.length;n={Ud:void 0,Td:void 0,Md:void 0,Ac:void 0,Ld:void 0},r++)if(n.Ac=P[r],n.Ac.h==null)for(n.Td=0,n.Ud=r,i=function(X){return function(){var q=P[X.Ud];if(q){if(q.h!=null)return q.h+X.Td;X.Td-=q.endTime-q.startTime,X.Ud+=1}return null}}(n),n.Ld=0,n.Md=r,a=function(X){return function(){var q=P[X.Md];if(q){if(q!=X.Ac&&(X.Ld+=q.endTime-q.startTime),q.h!=null)return q.h+X.Ld;--X.Md}return null}}(n);n.Ac.h==null;)n.Ac.h=a(),n.Ac.h==null&&(n.Ac.h=i())}if(m)for(n=I(P),r=n.next();!r.done;r=n.next())for(i=r.value,r=i.h,i=I(i.g),a=i.next();!a.done;a=i.next())a=a.value,a.h=r,r+=a.endTime-a.startTime;if(n=e.fa,m&&n!=1/0&&!eh(e,o))for(e=I(P),o=e.next();!o.done;o=e.next())o.value.fg(n);return{segments:P,bandwidth:t}}function Mm(e,t){if(e==at){if(t=="vtt"||t=="wvtt")return"text/vtt";if(t&&t!=="")return"application/mp4"}return e!="image"||t&&t!="jpeg"?e=="audio"&&t=="mp4a.40.34"?"audio/mpeg":t=="mjpg"?"application/mp4":null:"image/jpeg"}function cg(e){return e==at?"text/vtt":_m[e].mp4}function Gw(e,t){e=Kr(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.cc()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function Ck(e,t,n,r){var i,o,a,f,p,g,m,w,E,C,P,L,M,B;return G(function(U){switch(U.g){case 1:return i=_r,o=Gw(e,r),a=o.segment,a.status==2?U.return(cg(t)):(f=a.N(),p=new hn(f[0]),g=p.Za.split(".").pop(),m=_m[t],(w=m[g])||(w=Nm[g])||(w=Mm(t,n))?U.return(w):(C=1,P=wt(f,e.g.retryParameters),pe(U,2),P.method="HEAD",_(U,Ul(e,P,i,{type:C}).promise,4)));case 4:L=U.h,E=L.headers["content-type"],be(U,3);break;case 2:if(M=ke(U),!M||M.code!=1002&&M.code!=1001){U.u(3);break}return P.method="GET",_(U,Ul(e,P,i,{type:C}).promise,6);case 6:B=U.h,E=B.headers["content-type"];case 3:return E?U.return(E.toLowerCase().split(";")[0]):U.return(cg(t))}})}function Ww(e,t,n,r,i,o,a){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(r)||void 0,e.hdr=i||void 0,e.videoLayout=o||void 0,e.colorGamut=a||void 0)}function Lm(e,t,n){return Ul(e,wt(t,e.g.retryParameters),0,{type:n?2:3})}function Xw(e){var t,n,r,i,o,a;return G(function(f){switch(f.g){case 1:return e.h?(pe(f,2),t=Date.now(),_(f,e.update(),4)):f.return();case 4:n=Date.now(),Kr(e)&&(r=(n-t)/1e3,e.Lb.sample(1,r),i=0<e.g.hls.updatePeriod?e.g.hls.updatePeriod:e.o,o=Math.max(0,i-Bs(e.Lb)),e.B.aa(o)),be(f,3);break;case 2:if(a=ke(f),!e.h)return f.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(a),f.return();a.severity=1,e.h.onError(a),e.B.aa(.1);case 3:if(!e.h)return f.return();e.h.onManifestUpdated(),le(f)}})}function Kr(e){return e.Ca!=pg}function fg(e,t){e.Ca=t,e.l&&e.l.Cc(!Kr(e)),Kr(e)||e.B.stop()}function Ul(e,t,n,r){if(!e.ba)throw new Y(2,7,7001);return r||(r={}),r.isPreload=e.Mb(),t=e.h.networkingEngine.request(n,t,r),ru(e.ba,t),t}function dg(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"}function Yw(e,t,n,r,i,o){var a,f,p,g,m,w,E,C,P,L,M,B,U,K,W;return G(function(X){switch(X.g){case 1:if(n=="video/mp2t")throw new Y(2,4,4040);if(Zs())throw new Y(2,4,4041);if(a=Ft(t,"METHOD"),f=["SAMPLE-AES","SAMPLE-AES-CTR"],!f.includes(a))return X.return(null);if(p=bs(r(),Ft(t,"URI"),o),p[0].startsWith("data:text/plain;base64,")){g=Yn(ci(p[0].split("data:text/plain;base64,").pop())),X.u(2);break}return m=p.sort().join(""),e.na.has(m)||(w=wt(p,e.g.retryParameters),E=Ul(e,w,6).promise,e.na.set(m,E)),_(X,e.na.get(m),3);case 3:C=X.h,g=Yn(C.data);case 2:if(P="00000000000000000000000000000000",!i){X.u(4);break}if(e.pa.has(i)){L=e.pa.get(i),X.u(5);break}return M=Pl(i.N(),i.bc(),i.$b(),e.g.retryParameters),B=_r,_(X,Ul(e,M,B,{type:0}).promise,6);case 6:U=X.h,L=Tv(U.data),e.pa.set(i,L);case 5:L&&(P=L);case 4:return K=new Map,K.set(P,g),W="cenc",a=="SAMPLE-AES"&&(W="cbcs"),X.return(xd(K,W))}})}Me("shaka.hls.HlsParser",sg);var Nm={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},_m={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},$w=new Set(["video/mp2t"].concat(ee(Cr))),Jw={"com.apple.streamingkeydelivery":function(e,t){if(t=="video/mp2t")throw new Y(2,4,4040);if(Zs())throw new Y(2,4,4041);if(t=Ft(e,"METHOD"),!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return t=="SAMPLE-AES"&&(n="cbcs"),Xo("com.apple.fps",n,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],Ft(e,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=Ft(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return t=="SAMPLE-AES"&&(n="cbcs"),t=Ft(e,"URI"),t=lg(t.split("?")[0]),t=Ze(t.data),n=Xo("com.widevine.alpha",n,[{initDataType:"cenc",initData:t}]),(e=je(e,"KEYID"))&&(n.keyIds=new Set([e.toLowerCase().substr(2)])),n},"com.microsoft.playready":function(e){var t=Ft(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return t=="SAMPLE-AES"&&(n="cbcs"),e=Ft(e,"URI"),e=lg(e.split("?")[0]),e=Ze(e.data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),t=io(e,t,new Set,0),n=Xo("com.microsoft.playready",n,[{initDataType:"cenc",initData:t}]),(e=Qi(["<PLAYREADY>",Wo(e),"</PLAYREADY>"].join(`
|
||
`)))&&(n.licenseServerUri=Jy(e)),n},"urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":function(e){var t=Ft(e,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t))return null;var n="cenc";return t=="SAMPLE-AES"&&(n="cbcs"),t=Ft(e,"URI"),t=lg(t.split("?")[0]),t=Ze(t.data),n=Xo("com.huawei.wiseplay",n,[{initDataType:"cenc",initData:t}]),(e=je(e,"KEYID"))&&(n.keyIds=new Set([e.toLowerCase().substr(2)])),n}},pg="VOD",Qw="EVENT",hg="LIVE",kk={Hh:pg,Kj:Qw,Sj:hg};hi["application/x-mpegurl"]=function(){return new sg},hi["application/vnd.apple.mpegurl"]=function(){return new sg};function yg(e){return Jy(e)}var Ak=new Map().set("com.microsoft.playready",yg).set("com.microsoft.playready.recommendation",yg).set("com.microsoft.playready.software",yg).set("com.microsoft.playready.hardware",yg);function Bf(e){if(!nT){nT=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);gg=vt("ftyp",t,r,t,n),t=vt("dref",jk),Um=vt("dinf",t)}this.g=e}function Vf(e){for(var t=[],n=I(e.g),r=n.next();!r.done;r=n.next()){var i=t,o=i.push,a=r.value;r=vt;var f=a.id+1,p=a.stream.width||0,g=a.stream.height||0;a.type=="audio"&&(g=p=0);var m=a.duration*a.timescale,w=Math.floor(m/(Ms+1));switch(m=Math.floor(m%(Ms+1)),f=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(ee(fn(f,4)),[0,0,0,0],ee(fn(w,4)),ee(fn(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],ee(fn(p,2)),[0,0],ee(fn(g,2)),[0,0])),f=vt("tkhd",f),p=vt,w=a.duration*a.timescale,g=Math.floor(w/(Ms+1)),w=Math.floor(w%(Ms+1)),m=a.stream.language,m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96,g=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(ee(fn(a.timescale,4)),ee(fn(g,4)),ee(fn(w,4)),ee(fn(m,2)),[0,0])),g=vt("mdhd",g),w=a,m=new Uint8Array([]),w.type){case"video":m=Dk;break;case"audio":m=Ok}w=vt("hdlr",m);e:{switch(a.type){case"video":a=vt("minf",vt("vmhd",Nk),Um,Zw(a));break e;case"audio":a=vt("minf",vt("smhd",_k),Um,Zw(a));break e}a=new Uint8Array([])}a=p("mdia",g,w,a),r=r("trak",f,a),o.call(i,r)}for(t=rn.apply(ar,ee(t)),o=e.g[0],n=vt,r=o.duration*o.timescale,i=Math.floor(r/(Ms+1)),r=Math.floor(r%(Ms+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(ee(fn(o.timescale,4)),ee(fn(i,4)),ee(fn(r,4)),[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])),i=vt("mvhd",i),r=[],e=I(e.g),p=e.next();!p.done;p=e.next())a=r,f=a.push,p=new Uint8Array([0,0,0,0].concat(ee(fn(p.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),p=vt("trex",p),f.call(a,p);if(e=rn.apply(ar,ee(r)),e=vt("mvex",e),r=[],o.encrypted){for(o=I(o.stream.drmInfos),a=o.next();!a.done;a=o.next())if(a=a.value,a.initData)for(a=I(a.initData),f=a.next();!f.done;f=a.next())r.push(f.value.initData);o=rn.apply(ar,ee(r))}else o=new Uint8Array([]);return e=n("moov",i,t,e,o),t=new Uint8Array(gg.byteLength+e.byteLength),t.set(gg),t.set(e,gg.byteLength),t}function Zw(e){var t=vt,n=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){n=e.stream.width||0;var r=e.stream.height||0;if(0<e.ya.byteLength)var i=vt("avcC",e.ya);else{i=vt;for(var o=7,a=[],f=[],p=0,g=0,m=0,w=0;w<e.kb.length;w++){var E=tT(e.kb[w]);switch(E[0]&31){case 7:a.push(E),o+=E.length+2;break;case 8:f.push(E),o+=E.length+2}}for(0<a.length&&(p=a[0][1],m=a[0][2],g=a[0][3]),o=new Uint8Array(o),w=0,o[w++]=1,o[w++]=p,o[w++]=m,o[w++]=g,o[w++]=255,o[w++]=224|a.length,p=0;p<a.length;p++)o[w++]=(a[p].length&65280)>>8,o[w++]=a[p].length&255,o.set(a[p],w),w+=a[p].length;for(o[w++]=f.length,a=0;a<f.length;a++)o[w++]=(f[a].length&65280)>>8,o[w++]=f[a].length&255,o.set(f[a],w),w+=f[a].length;i=i("avcC",o)}n=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].concat(ee(fn(n,2)),ee(fn(r,2)),[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])),r="avc1",f=eT(e),a=new Uint8Array([]),e.encrypted&&(a=Ff(e),r="encv"),n=vt(r,n,i,f,a)}else e.codecs.includes("hvc1")&&(r=e.stream.width||0,i=e.stream.height||0,n=new Uint8Array([]),0<e.ya.byteLength&&(n=vt("hvcC",e.ya)),r=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].concat(ee(fn(r,2)),ee(fn(i,2)),[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])),i="hvc1",f=eT(e),a=new Uint8Array([]),e.encrypted&&(a=Ff(e),i="encv"),n=vt(i,r,n,f,a));break;case"audio":e.codecs.includes("mp3")?e=vt(".mp3",th(e)):e.codecs.includes("ac-3")?(n=vt("dac3",e.ra),r="ac-3",i=new Uint8Array([]),e.encrypted&&(i=Ff(e),r="enca"),e=vt(r,th(e),n,i)):e.codecs.includes("ec-3")?(n=vt("dec3",e.ra),r="ec-3",i=new Uint8Array([]),e.encrypted&&(i=Ff(e),r="enca"),e=vt(r,th(e),n,i)):e.codecs.includes("opus")?(n=vt("dOps",e.ra),r="Opus",i=new Uint8Array([]),e.encrypted&&(i=Ff(e),r="enca"),e=vt(r,th(e),n,i)):(0<e.ra.byteLength?n=vt("esds",e.ra):(n=vt,r=e.id+1,i=e.stream.channelsCount||2,a=e.stream.audioSamplingRate||44100,p=ca("audio",e.codecs.split(",")),g={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},f=g[a],(p==="mp4a.40.5"||p==="mp4a.40.29")&&(f=g[2*a]),a=parseInt(p.split(".").pop(),10),r=new Uint8Array([0,0,0,0,3,25].concat(ee(fn(r,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,a<<3|f>>>1,f<<7|i<<3,6,1,2])),n=n("esds",r)),r="mp4a",i=new Uint8Array([]),e.encrypted&&(i=Ff(e),r="enca"),e=vt(r,th(e),n,i)),n=e}return e=vt("stsd",Uk,n),t("stbl",e,vt("stts",Rk),vt("stsc",bk),vt("stsz",Lk),vt("stco",Mk))}function eT(e){if(!e.Ea&&!e.Ga)return new Uint8Array([]);var t=e.Ga;return e=new Uint8Array([].concat(ee(fn(e.Ea,4)),ee(fn(t,4)))),vt("pasp",e)}function th(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(ee(fn(e.stream.audioSamplingRate||44100,2)),[0,0]))}function Ff(e){for(var t=vt,n=e.codecs.substring(0,e.codecs.indexOf(".")),r=0,i=0;i<n.length;i+=1)r|=n.charCodeAt(i)<<8*(n.length-i-1);n=new Uint8Array([].concat(ee(fn(r,4)))),n=vt("frma",n),r=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]),r=vt("schm",r),i=vt;var o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e=I(e.stream.drmInfos);for(var a=e.next();!a.done;a=e.next())if((a=a.value)&&a.keyIds&&a.keyIds.size){a=I(a.keyIds);for(var f=a.next();!f.done;f=a.next())o=tT(f.value)}return e=new Uint8Array([0,0,0,0,0,0,1,8]),o=vt("tenc",e,o),t("sinf",n,r,i("schi",o))}function nh(e){var t=[];e=I(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=t.push,i=r.apply,o=vt,a=new Uint8Array([0,0,0,0].concat(ee(fn(n.data?n.data.Bb:0,4))));a=vt("mfhd",a);var f,p=n.data?n.data.ib:[],g=new Uint8Array(4+p.length);for(f=0;f<p.length;f++){var m=p[f].flags;g[f+4]=m.Ua<<4|m.Wa<<2|m.Va}p=vt("sdtp",g);var w=p.length+92;g=vt,f=new Uint8Array([0,0,0,58].concat(ee(fn(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),f=vt("tfhd",f),m=n.data?n.data.baseMediaDecodeTime:0;var E=Math.floor(m%(Ms+1));m=new Uint8Array([1,0,0,0].concat(ee(fn(Math.floor(m/(Ms+1)),4)),ee(fn(E,4)))),m=vt("tfdt",m);var C=w;w=n.data?n.data.ib:[],E=w.length;var P=12+16*E,L=new Uint8Array(P);for(C+=8+P,L.set([n.type==="video"?1:0,0,15,1].concat(ee(fn(E,4)),ee(fn(C,4))),0),C=0;C<E;C++){var M=w[C];P=fn(M.duration,4);var B=fn(M.size,4),U=M.flags;M=fn(M.eb,4),L.set([].concat(ee(P),ee(B),[U.gb<<2|U.Ua,U.Wa<<6|U.Va<<4|U.hb,U.Ta&61440,U.Ta&15],ee(M)),12+16*C)}w=vt("trun",L),p=g("traf",f,m,w,p),o=o("moof",a,p),i.call(r,t,[o,Pk(n)])}return rn.apply(ar,ee(t))}function Pk(e){return e=(e.data?e.data.ib:[]).map(function(t){return t.data}),e=rn.apply(ar,ee(e)),vt("mdat",e)}function fn(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function tT(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function vt(e){var t=It.apply(1,arguments),n=rT[e];n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],rT[e]=n);for(var r=8,i=t.length-1;0<=i;i--)r+=t[i].byteLength;for(i=new Uint8Array(r),i[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=r&255,i.set(n,4),n=0,r=8;n<t.length;n++)i.set(t[n],r),r+=t[n].byteLength;return i}var nT=!1,Ms=Math.pow(2,32)-1,rT={},Dk=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]),Ok=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]),Rk=new Uint8Array([0,0,0,0,0,0,0,0]),bk=new Uint8Array([0,0,0,0,0,0,0,0]),Mk=new Uint8Array([0,0,0,0,0,0,0,0]),Lk=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Nk=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),_k=new Uint8Array([0,0,0,0,0,0,0,0]),Uk=new Uint8Array([0,0,0,0,0,0,0,1]),gg=new Uint8Array([]),jk=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Um=new Uint8Array([]);function jm(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.s=1,this.i=null,this.C=new Ju(5),this.o=new st(function(){Bk(e)}),this.B=new yl,this.m=new Map,this.A=function(){return!1}}h=jm.prototype,h.configure=function(e,t){this.g=e,t&&(this.A=t)},h.start=function(e,t){var n=this;return G(function(r){if(r.g==1)return n.l=[e],n.h=t,_(r,Bm(n),2);if(!n.h)throw new Y(2,7,7001);return r.return(n.j)})};function Bk(e){var t;G(function(n){switch(n.g){case 1:return pe(n,2),_(n,Bm(e),4);case 4:be(n,3);break;case 2:t=ke(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();le(n)}})}h.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,this.o!=null&&(this.o.stop(),this.o=null),this.m.clear(),this.B.destroy()},h.update=function(){var e=this,t;return G(function(n){if(n.g==1)return pe(n,2),_(n,Bm(e),4);if(n.g!=2)return be(n,0);if(t=ke(n),!e.h||!t)return n.return();e.h.onError(t),le(n)})},h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(){},h.banLocation=function(){},h.setMediaElement=function(){};function Bm(e){var t,n,r,i,o,a,f;return G(function(p){if(p.g==1)return t=wt(e.l,e.g.retryParameters),n=e.h.networkingEngine,r=Date.now(),i=n.request(0,t,{type:5,isPreload:e.A()}),ru(e.B,i),_(p,i.promise,2);if(o=p.h,!e.h)return p.return();o.uri&&!e.l.includes(o.uri)&&e.l.unshift(o.uri);var g=o.uri,m=o.data,w=e.g.mss.manifestPreprocessor;if(w!=Sf){if(Rt("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),m=sw(m,"SmoothStreamingMedia"),!m)throw new Y(2,4,4046,g);w(m),m=ui(m.outerHTML)}var E=Gl(m,"SmoothStreamingMedia");if(!E)throw new Y(2,4,4046,g);if(g=e.g.mss.manifestPreprocessorTXml,g!=my&&g(E),e.i||(e.i=new Le(null,0)),g=rt(E,"IsLive",ra,!1))throw new Y(2,4,4047);e.i.Cc(!g),w=rt(E,"TimeScale",jn,1e7),m=rt(E,"DVRWindowLength",jn),g&&(m===0||isNaN(m))&&(m=1/0);var C=rt(E,"CanSeek",ra,!1);m===0&&C&&(m=1/0),C=null,m&&0<m&&(C=m/w),g&&!isNaN(e.g.availabilityWindowOverride)&&(C=e.g.availabilityWindowOverride),C==null&&(C=1/0),e.i.ve(C),m=rt(E,"Duration",jn,1/0),g||e.i.ab(m/w),g={variants:[],textStreams:[],timescale:w,duration:m/w};var P;for(C=bt(E,"Protection"),w=e.g.mss.keySystemsBySystemId,m=[],C=I(C),P=C.next();!P.done;P=C.next())m=m.concat(bt(P.value,"ProtectionHeader"));if(m.length){for(C=[],P=0;P<m.length;P++){var L=m[P],M=L.attributes.SystemID.toLowerCase(),B=w[M];if(B){var U;e:{if(U=BS(L)){U=I(xr(U,"DATA"));for(var K=U.next();!K.done;K=U.next())if(K=pn(K.value,"KID")){U=ci(sn(K)),U=new Uint8Array([U[3],U[2],U[1],U[0],U[5],U[4],U[7],U[6]].concat(ee(U.slice(8)))),U=Yn(U);break e}}U=null}K=ci(sn(L)),M=cl(M.replace(/-/g,"")),M=[{initData:io(K,M,new Set,0),initDataType:"cenc",keyId:U}],M=Xo(B,"cenc",M),U&&M.keyIds.add(U),(B=Ak.get(B))&&(M.licenseServerUri=B(L)),C.push(M)}}w=C}else w=[];for(P=w,C=[],w=[],m=[],E=bt(E,"StreamIndex"),E=I(E),L=E.next();!L.done;L=E.next()){L=L.value,B=bt(L,"QualityLevel"),M=g.timescale,U=g.duration,K=bt(L,"c");for(var W=[],X=0,q=0;q<K.length;++q){var F=K[q],Q=K[q+1],H=rt(F,"t",jn),Z=rt(F,"d",jn);if(F=rt(F,"r",sr),!Z)break;if(H=H??X,(F=F||0)&&F--,0>F)if(Q){if(Q=rt(Q,"t",jn),Q==null)break;if(H>=Q)break;F=Math.ceil((Q-H)/Z)-1}else{if(U==1/0)break;if(H/M>=U)break;F=Math.ceil((U*M-H)/Z)-1}for(Q=0;Q<=F;++Q)X=H+Z,W.push({start:H/M,end:X/M,mg:H}),H=X}for(M=W,B=I(B),U=B.next();!U.done;U=B.next())(U=Vk(e,L,U.value,M,P,g))&&(U.type!="audio"||e.g.disableAudio?U.type!="video"||e.g.disableVideo?U.type!=at||e.g.disableText||m.push(U):w.push(U):C.push(U))}for(E=[],C=I(0<C.length?C:[null]),P=C.next();!P.done;P=C.next())for(P=P.value,L=I(0<w.length?w:[null]),W=L.next();!W.done;W=L.next())B=E,M=B.push,U=e,K=P,W=W.value,q=0,K&&K.bandwidth&&0<K.bandwidth&&(q+=K.bandwidth),W&&W.bandwidth&&0<W.bandwidth&&(q+=W.bandwidth),U={id:U.s++,language:K?K.language:"und",disabledUntilTime:0,primary:!!K&&K.primary||!!W&&W.primary,audio:K,video:W,bandwidth:q,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},M.call(B,U);g.variants=E,g.textStreams=m,e.j?(e.j.variants=g.variants,e.j.textStreams=g.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:g.variants,textStreams:g.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.de()),Promise.resolve(),a=Date.now(),f=(a-r)/1e3,e.C.sample(1,f),le(p)})}function Vk(e,t,n,r,i,o){var a=t.attributes.Type;if(a!=="audio"&&a!=="video"&&a!=="text")return ft("Ignoring unrecognized type:",a),null;var f=t.attributes.Language,p=e.s++,g=rt(n,"Bitrate",xo),m=rt(n,"MaxWidth",xo),w=rt(n,"MaxHeight",xo),E=rt(n,"Channels",xo),C=rt(n,"SamplingRate",xo),P=o.duration;r.length&&(P=r[r.length-1].end-r[0].start);var L=e.i.getDuration();e.i.ab(Math.min(P,L));var M={id:p,originalId:t.attributes.Name||String(p),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:g||0,width:m||void 0,height:w||void 0,kind:"",encrypted:0<i.length,drmInfos:i,keyIds:new Set,language:Et(f||"und"),originalLanguage:f,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:E,audioSamplingRate:C,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:P,timescale:o.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1};if((i=t.attributes.Subtype)&&((i=Gk[i])&&M.roles.push(i),i==="main"&&(M.primary=!0)),i=n.attributes.FourCC,(i===null||i==="")&&(i=t.attributes.FourCC),!i){if(a==="audio")i="AAC";else if(a==="video")return ft('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!zk.includes(i.toUpperCase()))return ft("Codec not supported:",i),null;switch(n=Fk(n,a,i,M),M.mssPrivateData.codecPrivateData=n,a){case"audio":if(!n)return ft("Quality unsupported without CodecPrivateData",a),null;M.type="audio",M.mimeType="mss/audio/mp4",M.codecs=Kk(i,n);break;case"video":if(!n)return ft("Quality unsupported without CodecPrivateData",a),null;M.type="video",M.mimeType="mss/video/mp4",M.codecs=Hk(n);break;case"text":M.type=at,M.mimeType="application/mp4",(i==="TTML"||i==="DFXP")&&(M.codecs="stpp")}return M.fullMimeTypes.add(yn(M.mimeType,M.codecs)),M.createSegmentIndex=function(){if(M.segmentIndex)return Promise.resolve();if(e.m.has(M.id))var B=e.m.get(M.id);else B=[],M.type=="video"&&(B=M.mssPrivateData.codecPrivateData.split("00000001").slice(1)),B={id:M.id,type:M.type,codecs:M.codecs,encrypted:M.encrypted,timescale:M.mssPrivateData.timescale,duration:M.mssPrivateData.duration,kb:B,ra:new Uint8Array([]),ya:new Uint8Array([]),Ea:0,Ga:0,data:null,stream:M},B=Vf(new Bf([B])),e.m.set(M.id,B);return B=qk(e,new Ar(function(){return[]},0,null,Lo(M),M.mssPrivateData.timescale,B),M,t,r),M.segmentIndex=new St(B),Promise.resolve()},M.closeSegmentIndex=function(){M.segmentIndex&&(M.segmentIndex.release(),M.segmentIndex=null)},M}function Fk(e,t,n,r){if(e=e.attributes.CodecPrivateData)return e;if(t!=="audio")return null;t=r.channelsCount||2,e=r.audioSamplingRate||44100;var i={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return r=i[e],n==="AACH"?(n=new Uint8Array(4),e=i[2*e],n[0]=40|r>>1,n[1]=r<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|r>>1,n[1]=r<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}function Kk(e,t){var n=0;return e==="AACH"&&(n=5),t?n===0&&(n=(parseInt(t.substr(0,2),16)&248)>>3):(n=2,e==="AACH"&&(n=5)),"mp4a.40."+n}function Hk(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}function qk(e,t,n,r,i){var o=r.attributes.Url.replace("{bitrate}",String(n.bandwidth));r=[],i=I(i);for(var a=i.next(),f={};!a.done;f={ye:void 0},a=i.next())f.ye=a.value,r.push(new Fe(f.ye.start,f.ye.end,function(p){return function(){return Pn(e.l,[o.replace("{start time}",String(p.ye.mg))])}}(f),0,null,t,0,0,n.mssPrivateData.duration));return r}Me("shaka.mss.MssParser",jm);var zk="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Gk={CAPT:"main",SUBT:"alternate",DESC:"main"};hi["application/vnd.ms-sstr+xml"]=function(){return new jm};function iT(e,t,n,r,i,o,a){if(200<=n&&299>=n&&n!=202)return{uri:i||r,originalUri:r,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:o};o=null;try{o=jt(t)}catch{}throw new Y(n==401||n==403?2:1,1,1001,r,n,o,e,a,i||r)}function Vm(){}function vg(e,t,n,r,i,o){var a=new Jk;us(t.headers).forEach(function(m,w){a.append(w,m)});var f=new Yk,p={xg:!1,Bh:!1};if(e=Wk(e,t,n,{body:t.body||void 0,headers:a,method:t.method,signal:f.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},p,r,i,t.streamDataCallback,o.minBytesForProgressEvents||0),e=new $t(e,function(){return p.xg=!0,f.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var g=new st(function(){p.Bh=!0,f.abort()});g.aa(t/1e3),e.finally(function(){g.stop()})}return e}function Wk(e,t,n,r,i,o,a,f,p){var g,m,w,E,C,P,L,M,B,U,K,W,X;return G(function(q){switch(q.g){case 1:return g=Xk,m=$k,E=new ArrayBuffer(0),P=C=0,L=Date.now(),pe(q,2),_(q,g(e,r),4);case 4:if(w=q.h,a(oT(w.headers)),r.method=="HEAD"){q.u(5);break}return M=w.clone().body.getReader(),U=(B=w.headers.get("Content-Length"))?parseInt(B,10):0,K=function(F){function Q(){var H,Z,$,ue;return G(function(de){switch(de.g){case 1:return pe(de,2),_(de,M.read(),4);case 4:H=de.h,be(de,3);break;case 2:return ke(de),de.return();case 3:if(H.done){de.u(5);break}if(C+=H.value.byteLength,!f){de.u(5);break}return _(de,f(H.value),5);case 5:Z=Date.now(),$=C-P,(100<Z-L&&$>=p||H.done)&&(ue=H.done?0:U-C,o(Z-L,$,ue),P=C,L=Z),H.done?F.close():(F.enqueue(H.value),Q()),le(de)}})}Q()},new m({start:K}),_(q,w.arrayBuffer(),6);case 6:E=q.h;case 5:be(q,3);break;case 2:throw W=ke(q),i.xg?new Y(1,1,7001,e,n):i.Bh?new Y(1,1,1003,e,n):new Y(1,1,1002,e,W,n);case 3:return X=oT(w.headers),q.return(iT(X,E,w.status,e,w.url,t,n))}})}function oT(e){var t={};return e.forEach(function(n,r){t[r.trim()]=n}),t}function uT(){if(T.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(T.Response){if(!new Response("").body)return!1}else return!1;return!(!T.fetch||"polyfill"in T.fetch||!T.AbortController)}Me("shaka.net.HttpFetchPlugin",Vm),Vm.isSupported=uT,Vm.parse=vg;var Xk=T.fetch,Yk=T.AbortController,$k=T.ReadableStream,Jk=T.Headers;uT()&&(Bn("http",vg,2,!0),Bn("https",vg,2,!0),Bn("blob",vg,2,!0));function lT(){}function mg(e,t,n,r,i,o){var a=new Qk,f=Date.now(),p=0,g=new Promise(function(m,w){a.open(t.method,e,!0),a.responseType="arraybuffer",a.timeout=t.retryParameters.timeout,a.withCredentials=t.allowCrossSiteCredentials,a.onabort=function(){w(new Y(1,1,7001,e,n))};var E=!1;a.onreadystatechange=function(){if(a.readyState==2&&!E){var P=sT(a);i(P),E=!0}},a.onload=function(P){var L=sT(a),M=a.response;try{r(Date.now()-f,P.loaded-p,0);var B=iT(L,M,a.status,e,a.responseURL,t,n);m(B)}catch(U){w(U)}},a.onerror=function(P){w(new Y(1,1,1002,e,P,n))},a.ontimeout=function(){w(new Y(1,1,1003,e,n))},a.onprogress=function(P){var L=Date.now(),M=o.minBytesForProgressEvents||0,B=P.loaded-p;(100<L-f&&B>=M||P.lengthComputable&&P.loaded==P.total)&&(r(L-f,B,a.readyState==4?0:P.total-P.loaded),p=P.loaded,f=L)};for(var C in t.headers)a.setRequestHeader(C.toLowerCase(),t.headers[C]);a.send(t.body)});return new $t(g,function(){return a.abort(),Promise.resolve()})}function sT(e){var t=e.getAllResponseHeaders().trim().split(`\r
|
||
`);e={},t=I(t);for(var n=t.next();!n.done;n=t.next())n=n.value.split(": "),e[n[0].toLowerCase()]=n.slice(1).join(": ");return e}Me("shaka.net.HttpXHRPlugin",lT),lT.parse=mg;var Qk=T.XMLHttpRequest;Bn("http",mg,1,!0),Bn("https",mg,1,!0),Bn("blob",mg,1,!0);function aT(e,t,n,r,i){this.g=e,this.i=t,this.groupId=n,this.h=r,this.j=i}function Fm(e){var t=e.Pb();return t?Wo(t):e.N().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.Ma+":"+e.va}function Zk(e,t){return Pl(e.g.N(),e.g.Ma,e.g.va,t.streaming.retryParameters)}function cT(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function fT(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}cT.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}};function dT(e){return e.i==0?0:e.j/e.i}function pT(e){var t=this;this.s=e,this.i=new Map,this.h=new Nu(function(){return Km(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new cT,this.l=!1}pT.prototype.destroy=function(){return this.h.destroy()};function eA(e,t,n){e.o=t,e.m=n}function Km(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}function tA(e,t,n,r,i,o){Ht(e.h);var a=(e.i.get(t)||Promise.resolve()).then(function(){var f,p,g,m,w,E,C;return G(function(P){if(P.g==1)return _(P,iA(e,n),2);if(f=P.h,e.h.g)throw new Y(2,9,7001);if(i)for(m in p=Ze(f),g=new ro(p),g.data)w=Number(m),E=g.data[w],C=g.g[w],e.m(E,C);return e.g.close(r,f.byteLength),e.o(dT(e.g),e.g.g),P.return(o(f))})});e.i.set(t,a)}function nA(e,t,n,r,i,o){Ht(e.h);var a=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new Y(2,9,7001);if(i){var f=Ze(n);f=new ro(f);for(var p in f.data){var g=Number(p);e.m(f.data[g],f.g[g])}}return e.g.close(r,n.byteLength),e.o(dT(e.g),e.g.g),o(n)});e.i.set(t,a)}function rA(e){return G(function(t){return t.g==1?_(t,Promise.all(e.i.values()),2):t.return(e.g.g)})}function iA(e,t){var n,r,i,o;return G(function(a){return a.g==1?(n=_r,r=e.s.request(n,t),i=function(){return r.abort()},e.j.push(i),_(a,r.promise,2)):(o=a.h,Gr(e.j,i),a.return(o.data))})}function Sg(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new Nt,e.onabort=function(r){r.preventDefault(),n.g.reject()},e.onerror=function(r){r.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}Sg.prototype.abort=function(){var e=this;return G(function(t){if(t.g==1){try{e.i.abort()}catch{}return pe(t,2),_(t,e.g,4)}if(t.g!=2)return be(t,0);ke(t),le(t)})};function Hm(e,t){return new Promise(function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(){var o;return G(function(a){if(a.g==1)return i.result==null?(n(),a.return()):(o=i.result,_(a,t(o.key,o.value,o),2));o.continue(),le(a)})}})}Sg.prototype.store=function(){return this.h},Sg.prototype.promise=function(){return this.g};function qm(e){this.h=e,this.g=[]}qm.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function nc(e,t){return wg(e,t,"readwrite")}function wg(e,t,n){n=e.h.transaction([t],n);var r=new Sg(n,t);return e.g.push(r),r.promise().then(function(){Gr(e.g,r)},function(){Gr(e.g,r)}),r}function rc(e,t,n){this.h=new qm(e),this.i=t,this.g=n}h=rc.prototype,h.destroy=function(){return this.h.destroy()},h.hasFixedKeySpace=function(){return!0},h.addSegments=function(){return hT(this.i)},h.removeSegments=function(e,t){return yT(this,this.i,e,t)},h.getSegments=function(e){var t=this,n;return G(function(r){return r.g==1?_(r,gT(t,t.i,e),2):(n=r.h,r.return(n.map(function(i){return t.zg(i)})))})},h.addManifests=function(){return hT(this.g)},h.updateManifest=function(){return Promise.reject(new Y(2,9,9016,"Cannot modify values in "+this.g))};function oA(e,t,n){e=nc(e.h,e.g);var r=e.store();return r.get(t).onsuccess=function(){r.put(n,t)},e.promise()}h.updateManifestExpiration=function(e,t){var n=nc(this.h,this.g),r=n.store();return r.get(e).onsuccess=function(i){(i=i.target.result)&&(i.expiration=t,r.put(i,e))},n.promise()},h.removeManifests=function(e,t){return yT(this,this.g,e,t)},h.getManifests=function(e){var t=this,n;return G(function(r){return r.g==1?_(r,gT(t,t.g,e),2):(n=r.h,r.return(Promise.all(n.map(function(i){return t.gd(i)}))))})},h.getAllManifests=function(){var e=this,t,n;return G(function(r){return r.g==1?(t=wg(e.h,e.g,"readonly"),n=new Map,_(r,Hm(t,function(i,o){var a;return G(function(f){if(f.g==1)return _(f,e.gd(o),2);a=f.h,n.set(i,a),le(f)})}),2)):r.g!=3?_(r,t.promise(),3):r.return(n)})},h.zg=function(e){return e},h.gd=function(e){return Promise.resolve(e)};function hT(e){return Promise.reject(new Y(2,9,9011,"Cannot add new value to "+e))}h.add=function(e,t){var n=this,r,i,o,a,f,p,g;return G(function(m){if(m.g==1){for(r=nc(n.h,e),i=r.store(),o=[],a=I(t),f=a.next(),p={};!f.done;p={Tf:void 0},f=a.next())g=f.value,p.Tf=i.add(g),p.Tf.onsuccess=function(w){return function(){o.push(w.Tf.result)}}(p);return _(m,r.promise(),2)}return m.return(o)})};function yT(e,t,n,r){e=nc(e.h,t),t=e.store(),n=I(n);for(var i=n.next(),o={};!i.done;o={Ef:void 0},i=n.next())o.Ef=i.value,t.delete(o.Ef).onsuccess=function(a){return function(){return r(a.Ef)}}(o);return e.promise()}function gT(e,t,n){var r,i,o,a,f,p,g;return G(function(m){if(m.g==1){for(r=wg(e.h,t,"readonly"),i=r.store(),o={},a=[],f=I(n),p=f.next(),g={};!p.done;g={qe:void 0,be:void 0},p=f.next())g.be=p.value,g.qe=i.get(g.be),g.qe.onsuccess=function(w){return function(){w.qe.result==null&&a.push(w.be),o[w.be]=w.qe.result}}(g);return _(m,r.promise(),2)}if(a.length)throw new Y(2,9,9012,"Could not find values for "+a);return m.return(n.map(function(w){return o[w]}))})}function rh(e){this.g=new qm(e)}rh.prototype.destroy=function(){return this.g.destroy()},rh.prototype.getAll=function(){var e=this,t,n;return G(function(r){return r.g==1?(t=wg(e.g,"session-ids","readonly"),n=[],_(r,Hm(t,function(i,o){n.push(o)}),2)):r.g!=3?_(r,t.promise(),3):r.return(n)})},rh.prototype.add=function(e){var t=nc(this.g,"session-ids"),n=t.store();e=I(e);for(var r=e.next();!r.done;r=e.next())n.add(r.value);return t.promise()},rh.prototype.remove=function(e){var t=this,n;return G(function(r){return r.g==1?(n=nc(t.g,"session-ids"),_(r,Hm(n,function(i,o,a){e.includes(o.sessionId)&&a.delete()}),2)):_(r,n.promise(),0)})};function ri(){this.g=new Map}ri.prototype.destroy=function(){for(var e=[],t=I(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},ri.prototype.init=function(){var e=this;ih.forEach(function(i,o){(i=i())&&e.g.set(o,i)});for(var t=[],n=I(this.g.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)};function vT(e){var t=null;if(e.g.forEach(function(n,r){n.getCells().forEach(function(i,o){i.hasFixedKeySpace()||t||(t={path:{xb:r,Oa:o},Oa:i})})}),t)return t;throw new Y(2,9,9013,"Could not find a cell that supports add-operations")}function uA(e,t){e.g.forEach(function(n,r){n.getCells().forEach(function(i,o){t({xb:r,Oa:o},i)})})}function Tg(e,t,n){if(e=e.g.get(t),!e)throw new Y(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n),!t)throw new Y(2,9,9013,"Could not find cell with name "+n);return t}function lA(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function sA(e){var t=Array.from(e.g.keys());if(!t.length)throw new Y(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}function aA(e){var t,n,r;return G(function(i){return i.g==1?(t=Array.from(e.g.values()),n=0<t.length,n||(r=ih,r.forEach(function(o){(o=o())&&t.push(o)})),_(i,Promise.all(t.map(function(o){return o.erase()})),2)):n?i.u(0):_(i,Promise.all(t.map(function(o){return o.destroy()})),0)})}function mT(e,t){ih.set(e,t)}Me("shaka.offline.StorageMuxer",ri),ri.unregister=function(e){ih.delete(e)},ri.register=mT,ri.prototype.destroy=ri.prototype.destroy;var ih=new Map;function oh(){rc.apply(this,arguments)}mt(oh,rc),oh.prototype.updateManifestExpiration=function(e,t){var n=this,r,i,o;return G(function(a){return r=nc(n.h,n.g),i=r.store(),o=new Nt,i.get(e).onsuccess=function(f){(f=f.target.result)?(f.expiration=t,i.put(f),o.resolve()):o.reject(new Y(2,9,9012,"Could not find values for "+e))},_(a,Promise.all([r.promise(),o]),0)})},oh.prototype.gd=function(e){var t,n,r,i,o,a;return G(function(f){if(f.g==1){for(t=[],n=0;n<e.periods.length;++n)r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime,o=cA(e.periods[n],i),t.push(o);return _(f,ew(t),2)}return a=f.h,f.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration==null?1/0:e.expiration,streams:a,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})};function cA(e,t){dA(e);for(var n=I(e.streams),r=n.next();!r.done;r=n.next());return e.streams.map(function(i){return fA(i,e.startTime,t)})}function fA(e,t,n){var r=e.initSegmentUri?ST(e.initSegmentUri):null,i=t+e.presentationTimeOffset,o=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:r,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(a){var f=ST(a.uri);return{startTime:t+a.startTime,endTime:t+a.endTime,dataKey:f,initSegmentKey:r,appendWindowStart:t,appendWindowEnd:o,timestampOffset:i,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}oh.prototype.zg=function(e){return{data:e.data}};function ST(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new Y(2,9,9004,"Could not parse uri "+e)}function dA(e){var t=e.streams.filter(function(f){return f.contentType=="audio"});if(e=e.streams.filter(function(f){return f.contentType=="video"}),!t.every(function(f){return f.variantIds})||!e.every(function(f){return f.variantIds})){for(var n=I(t),r=n.next();!r.done;r=n.next())r.value.variantIds=[];for(n=I(e),r=n.next();!r.done;r=n.next())r.value.variantIds=[];if(n=0,e.length&&!t.length){r=n++;for(var i=I(e),o=i.next();!o.done;o=i.next())o.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,i=I(t),o=i.next();!o.done;o=i.next())o.value.variantIds.push(r);if(e.length&&t.length)for(t=I(t),r=t.next();!r.done;r=t.next())for(r=r.value,i=I(e),o=i.next();!o.done;o=i.next()){o=o.value;var a=n++;r.variantIds.push(a),o.variantIds.push(a)}}}function xg(){rc.apply(this,arguments)}mt(xg,rc),xg.prototype.gd=function(e){var t,n,r,i,o,a;return G(function(f){if(f.g==1){for(t=[],n=0;n<e.periods.length;++n){r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime;for(var p=e.periods[n],g=[],m=I(p.streams),w=m.next();!w.done;w=m.next())w=w.value,w.variantIds.length!=0&&g.push(pA(w,p.startTime,p.startTime+i));o=g,t.push(o)}return _(f,ew(t),2)}return a=f.h,f.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration==null?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:a,sequenceMode:!1})})};function pA(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(r){return{startTime:t+r.startTime,endTime:t+r.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:r.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function zm(){rc.apply(this,arguments)}mt(zm,rc),h=zm.prototype,h.hasFixedKeySpace=function(){return!1},h.addSegments=function(e){return this.add(this.i,e)},h.addManifests=function(e){return this.add(this.g,e)},h.updateManifest=function(e,t){return oA(this,e,t)},h.gd=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function wT(){this.m=this.j=this.i=this.h=this.g=this.l=null}h=wT.prototype,h.init=function(){var e=this,t=new Nt,n=!1,r=new st(function(){n=!0,t.reject(new Y(2,9,9017))});r.aa(5);var i=T.indexedDB.open("shaka_offline_db",5);return i.onsuccess=function(){if(!n){var o=i.result;e.l=o;var a=o.objectStoreNames;a=a.contains("manifest")&&a.contains("segment")?new oh(o,"segment","manifest"):null,e.g=a,a=o.objectStoreNames,a=a.contains("manifest-v2")&&a.contains("segment-v2")?new xg(o,"segment-v2","manifest-v2"):null,e.h=a,a=o.objectStoreNames,a=a.contains("manifest-v3")&&a.contains("segment-v3")?new xg(o,"segment-v3","manifest-v3"):null,e.i=a,a=o.objectStoreNames,a=a.contains("manifest-v5")&&a.contains("segment-v5")?new zm(o,"segment-v5","manifest-v5"):null,e.j=a,o=o.objectStoreNames.contains("session-ids")?new rh(o):null,e.m=o,r.stop(),t.resolve()}},i.onupgradeneeded=function(){for(var o=i.result,a=I(["segment-v5","manifest-v5","session-ids"]),f=a.next();!f.done;f=a.next())f=f.value,o.objectStoreNames.contains(f)||o.createObjectStore(f,{autoIncrement:!0})},i.onerror=function(o){n||(t.reject(new Y(2,9,9001,i.error)),r.stop(),o.preventDefault())},t},h.destroy=function(){var e=this;return G(function(t){switch(t.g){case 1:if(!e.g){t.u(2);break}return _(t,e.g.destroy(),2);case 2:if(!e.h){t.u(4);break}return _(t,e.h.destroy(),4);case 4:if(!e.i){t.u(6);break}return _(t,e.i.destroy(),6);case 6:if(!e.j){t.u(8);break}return _(t,e.j.destroy(),8);case 8:if(!e.m){t.u(10);break}return _(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),le(t)}})},h.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},h.getEmeSessionCell=function(){return this.m},h.erase=function(){var e=this;return G(function(t){switch(t.g){case 1:if(!e.g){t.u(2);break}return _(t,e.g.destroy(),2);case 2:if(!e.h){t.u(4);break}return _(t,e.h.destroy(),4);case 4:if(!e.i){t.u(6);break}return _(t,e.i.destroy(),6);case 6:if(!e.j){t.u(8);break}return _(t,e.j.destroy(),8);case 8:return e.l&&e.l.close(),_(t,hA(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,_(t,e.init(),0)}})};function hA(){var e=new Nt,t=T.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new Y(2,9,9001,t.error)),n.preventDefault()},e}mT("idb",function(){return(!Tr()||Tr()&&xu())&&!$i()&&T.indexedDB?new wT:null});function Wu(e,t,n,r){this.g=e,this.i=t,this.h=n,this.l=r,this.j=["offline:",e,"/",t,"/",n,"/",r].join("")}Wu.prototype.xb=function(){return this.i},Wu.prototype.Oa=function(){return this.h},Wu.prototype.key=function(){return this.l},Wu.prototype.toString=function(){return this.j};function Gm(e){if(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e),e==null)return null;var t=e[1];if(t!="manifest"&&t!="segment")return null;var n=e[2];if(!n)return null;var r=e[3];return r&&t!=null?new Wu(t,n,r,Number(e[4])):null}function TT(e,t){this.h=e,this.g=t}function xT(e,t){var n=new Le(null,0);n.ab(t.duration);var r=t.streams.filter(function(g){return g.type=="audio"}),i=t.streams.filter(function(g){return g.type=="video"});r=yA(e,r,i,n),i=t.streams.filter(function(g){return g.type==at}).map(function(g){return Ig(e,g,n)});var o=t.streams.filter(function(g){return g.type=="image"}).map(function(g){return Ig(e,g,n)}),a=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var f=I(r.values()),p=f.next();!p.done;p=f.next())p=p.value,p.audio&&p.audio.encrypted&&(p.audio.drmInfos=a),p.video&&p.video.encrypted&&(p.video.drmInfos=a);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(r.values()),textStreams:i,imageStreams:o,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function yA(e,t,n,r){for(var i=new Set,o=I(t),a=o.next();!a.done;a=o.next()){a=I(a.value.variantIds);for(var f=a.next();!f.done;f=a.next())i.add(f.value)}for(o=I(n),a=o.next();!a.done;a=o.next())for(a=I(a.value.variantIds),f=a.next();!f.done;f=a.next())i.add(f.value);for(o=new Map,i=I(i),a=i.next();!a.done;a=i.next())a=a.value,o.set(a,{id:a,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=I(t),i=t.next();!i.done;i=t.next())for(a=i.value,i=Ig(e,a,r),a=I(a.variantIds),f=a.next();!f.done;f=a.next())f=o.get(f.value),f.language=i.language,f.primary=f.primary||i.primary,f.audio=i;for(n=I(n),t=n.next();!t.done;t=n.next())for(i=t.value,t=Ig(e,i,r),i=I(i.variantIds),a=i.next();!a.done;a=i.next())a=o.get(a.value),a.primary=a.primary||t.primary,a.video=t;return o}function Ig(e,t,n){var r=t.segments.map(function(i){return gA(e,i,t)});return n.Cd(r),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new St(r),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([yn(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1}}function gA(e,t,n){var r=new Wu("segment",e.h,e.g,t.dataKey);return e=new Fe(t.startTime,t.endTime,function(){return[r.toString()]},0,null,t.initSegmentKey!=null?vA(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.we(t.thumbnailSprite),e}function vA(e,t){var n=new Wu("segment",e.h,e.g,t);return new Ar(function(){return[n.toString()]},0,null)}function IT(){this.g=null}h=IT.prototype,h.configure=function(){},h.start=function(e,t){var n=this,r,i,o,a,f,p,g;return G(function(m){switch(m.g){case 1:if(r=Gm(e),n.g=r,r==null||r.g!="manifest")throw new Y(2,1,9004,e);return i=new ri,qe(m,2),_(m,i.init(),4);case 4:return _(m,Tg(i,r.xb(),r.Oa()),5);case 5:return o=m.h,_(m,o.getManifests([r.key()]),6);case 6:return a=m.h,f=a[0],p=new TT(r.xb(),r.Oa()),g=xT(p,f),t.makeTextStreamsForClosedCaptions(g),m.return(g);case 2:return Ut(m),_(m,i.destroy(),7);case 7:Ot(m,0)}})},h.stop=function(){return Promise.resolve()},h.update=function(){},h.onExpirationUpdated=function(e,t){var n=this,r,i,o,a,f,p,g;return G(function(m){switch(m.g){case 1:return r=n.g,i=new ri,pe(m,2,3),_(m,i.init(),5);case 5:return _(m,Tg(i,r.xb(),r.Oa()),6);case 6:return o=m.h,_(m,o.getManifests([r.key()]),7);case 7:if(a=m.h,f=a[0],p=f.sessionIds.includes(e),g=f.expiration==null||f.expiration>t,!p||!g){m.u(3);break}return _(m,o.updateManifestExpiration(r.key(),t),3);case 3:return Ut(m),_(m,i.destroy(),10);case 10:Ot(m,0);break;case 2:ke(m),m.u(3)}})},h.onInitialVariantChosen=function(){},h.banLocation=function(){},h.setMediaElement=function(){},hi["application/x-offline-manifest"]=function(){return new IT};function ET(){}function CT(e,t){var n=Gm(e);return n&&n.g=="manifest"?(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t},e=nu(e)):e=n&&n.g=="segment"?mA(n.key(),n,t):Oi(new Y(2,1,9004,e)),e}function mA(e,t,n){var r=new ri;return nu(void 0).Da(function(){return r.init()}).Da(function(){return Tg(r,t.xb(),t.Oa())}).Da(function(i){return i.getSegments([t.key()])}).Da(function(i){return{uri:t,data:i[0].data,headers:{},originalRequest:n}}).finally(function(){return r.destroy()})}Me("shaka.offline.OfflineScheme",ET),ET.plugin=CT,Bn("offline",CT);function kT(e,t,n){var r,i,o,a,f,p;return G(function(g){switch(g.g){case 1:r=[];for(var m=[],w=I(n),E=w.next();!E.done;E=w.next()){E=E.value;for(var C=!1,P=I(m),L=P.next();!L.done;L=P.next())if(L=L.value,wA(L.info,E)){L.sessionIds.push(E.sessionId),C=!0;break}C||m.push({info:E,sessionIds:[E.sessionId]})}i=I(m),o=i.next();case 2:if(o.done){g.u(4);break}return a=o.value,f=SA(e,t,a),_(g,f,5);case 5:p=g.h,r=r.concat(p),o=i.next(),g.u(2);break;case 4:return g.return(r)}})}function SA(e,t,n){var r,i;return G(function(o){switch(o.g){case 1:return r=new ls({Tb:t,onError:function(){},ke:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),pe(o,2),r.configure(e),_(o,jc(r,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:be(o,3);break;case 2:return ke(o),_(o,r.destroy(),5);case 5:return o.return([]);case 3:return i=[],_(o,Promise.all(n.sessionIds.map(function(a){return G(function(f){if(f.g==1)return pe(f,2),_(f,Do(r,a),4);if(f.g!=2)return i.push(a),be(f,0);ke(f),le(f)})})),6);case 6:return _(o,r.destroy(),7);case 7:return o.return(i)}})}function wA(e,t){function n(r,i){return r.robustness==i.robustness&&r.contentType==i.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Oh(e.audioCapabilities,t.audioCapabilities,n)&&Oh(e.videoCapabilities,t.videoCapabilities,n)}function TA(e,t,n){var r=t.presentationTimeline.getDuration();return t=AT(t),{offlineUri:null,originalManifestUri:e,duration:r,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function Wm(e,t){var n=xT(new TT(e.xb(),e.Oa()),t),r=t.appMetadata||{};return n=AT(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r,isIncomplete:t.isIncomplete||!1}}function AT(e){var t=[],n=vn(e.variants);n=I(n);for(var r=n.next();!r.done;r=n.next())t.push(rs(r.value));for(e=I(e.textStreams),n=e.next();!n.done;n=e.next())t.push(Co(n.value));return t}function xA(){this.g={}}function IA(e,t){var n=t.audio,r=t.video;if(n&&!r&&(e.g[n.id]=n.bandwidth||t.bandwidth),!n&&r&&(e.g[r.id]=r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,o=r.bandwidth||t.bandwidth-i;0>=o&&(o=t.bandwidth),e.g[n.id]=i,e.g[r.id]=o}}function EA(e,t){e.g[t.id]=t.bandwidth||2048}function PT(e,t){return e=e.g[t],e==null&&(e=0),e}function tr(e){var t=this;if(e&&e.constructor!=he)throw new Y(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.vb()):(this.h=ht(),this.g=new Bt),this.i=[],this.l=[];var n=!e;this.j=new Nu(function(){var r,i,o,a,f;return G(function(p){switch(p.g){case 1:return _(p,Promise.all(t.l.map(function(g){return Km(g)})),2);case 2:for(r=function(){},i=[],o=I(t.i),a=o.next();!a.done;a=o.next())f=a.value,i.push(f.then(r,r));return _(p,Promise.all(i),3);case 3:if(!n){p.u(4);break}return _(p,t.g.destroy(),4);case 4:t.h=null,t.g=null,le(p)}})}),this.m=1e9}function Xm(){if(Yi())e:{for(var e=I(ih.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}h=tr.prototype,h.destroy=function(){return this.j.destroy()},h.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=R(e,t)),_t(this.h,e)},h.getConfiguration=function(){var e=ht();return _t(e,this.h,ht()),e},h.vb=function(){return this.g},h.store=function(e,t,n,r,i){var o=this,a=this.getConfiguration(),f=new pT(this.g);return this.l.push(f),t=CA(this,e,t||{},r||[],i||[],function(){var p;return G(function(g){return g.g==1?n?g.u(2):_(g,Ja(e,o.g,a.manifest.retryParameters),3):(g.g!=2&&(n=g.h),p=Xd(e,n||null),g.return(p()))})},a,f),t=new $t(t,function(){return Km(f)}),t.finally(function(){Gr(o.l,f)}),FA(this,t)};function CA(e,t,n,r,i,o,a,f){var p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce;return G(function(Se){switch(Se.g){case 1:return Eg(),g=p=null,m=new ri,C=E=w=null,pe(Se,2,3),_(Se,o(),5);case 5:return p=Se.h,_(Se,LA(e,t,p,a),6);case 6:if(P=Se.h,Bi(e),L=!P.presentationTimeline.T()&&!P.presentationTimeline.vc(),!L)throw new Y(2,9,9005,t);M=I(r),B=M.next();case 7:if(B.done){Se.u(9);break}return U=B.value,_(Se,NA(e,U,P),10);case 10:K=Se.h,P.imageStreams.push(K),Bi(e),B=M.next(),Se.u(7);break;case 9:W=I(i),X=W.next();case 11:return X.done?(Kc(a.drm.clearKeys,P.variants),Q=P.variants.some(function(ve){if(ve.audio){for(var Ce=I(ve.audio.drmInfos),_e=Ce.next();!_e.done;_e=Ce.next())if(_e.value.licenseServerUri.startsWith("data:"))return!0}if(ve.video){for(ve=I(ve.video.drmInfos),Ce=ve.next();!Ce.done;Ce=ve.next())if(Ce.value.licenseServerUri.startsWith("data:"))return!0}return!1}),H=a.offline.usePersistentLicense,Q&&(H=!1),_(Se,e.Ic(P,function(ve){C=C||ve},a,H),15)):(q=X.value,_(Se,_A(e,P,q.uri,q.language,q.kind,q.mime,q.codecs),14));case 14:F=Se.h,P.textStreams.push(F),Bi(e),X=W.next(),Se.u(11);break;case 15:if(g=Se.h,Bi(e),C)throw C;return _(Se,AA(P,g,a,H),16);case 16:return _(Se,m.init(),17);case 17:return Bi(e),_(Se,vT(m),18);case 18:return w=Se.h,Bi(e),Z=PA(g,P,t,n,a,f,H),$=Z.Mi,ue=Z.ig,_(Se,w.Oa.addManifests([$]),19);case 19:if(de=Se.h,Bi(e),E=de[0],Bi(e),C)throw C;return _(Se,kA(e,ue,E,$,f,a,w.Oa,P,g,H),20);case 20:return Bi(e),bT(P,$,g,H),_(Se,w.Oa.updateManifest(E,$),21);case 21:return Bi(e),ie=new Wu("manifest",w.path.xb,w.path.Oa,E),Se.return(Wm(ie,$));case 3:return Ut(Se),_(Se,m.destroy(),22);case 22:if(!p){Se.u(23);break}return _(Se,p.stop(),23);case 23:if(!g){Se.u(25);break}return _(Se,g.destroy(),25);case 25:Ot(Se,0);break;case 2:if(ce=ke(Se),E==null){Se.u(27);break}return _(Se,DT(E),27);case 27:throw C||ce}})}function kA(e,t,n,r,i,o,a,f,p,g){var m,w,E,C,P,L,M,B,U,K,W;return G(function(X){switch(X.g){case 1:if(m={},w=0,E=function(){if(e.j.g||i.l)throw new Y(2,9,7001)},C=function(q,F){var Q,H,Z,$,ue,de,ie,ce,Se;return G(function(ve){if(ve.g==1){for(Q=I(q),H=Q.next(),Z={};!H.done;Z={Jb:void 0},H=Q.next())Z.Jb=H.value,E(),$=Zk(Z.Jb,o),ue=Z.Jb.i,de=Z.Jb.h,ie=function(Ce){return function(_e){var Ve,yt,pt;return G(function(ze){switch(ze.g){case 1:if(Ve=Ce.Jb.g,yt=Fm(Ve),!Ve.aesKey){ze.u(2);break}return _(ze,df(_e,Ve.aesKey,Ce.Jb.j),3);case 3:_e=ze.h;case 2:return _(ze,a.addSegments([{data:_e}]),4);case 4:pt=ze.h,E(),m[yt]=pt[0],w+=_e.byteLength,le(ze)}})}}(Z),ce=Z.Jb.g,(Se=ce.Pb())?nA(i,Z.Jb.groupId,Se,ue,de,ie):tA(i,Z.Jb.groupId,$,ue,de,ie);return _(ve,rA(i),2)}return E(),!F||i.l?ve.u(0):(bT(f,r,p,g),_(ve,a.updateManifest(n,r),0))})},P=!1,pe(X,2),!Ym(f)||!P||RT(f)){X.u(4);break}return _(X,C(t.filter(function(q){return q.h}),!0),5);case 5:return E(),t=t.filter(function(q){return!q.h}),L=m,M=w,m={},w=0,_(X,OT(a,n,r,L,M,function(){return Bi(e)}),6);case 6:E();case 4:if(P){X.u(7);break}return _(X,C(t,!1),8);case 8:return E(),B=m,U=w,m={},w=0,_(X,OT(a,n,r,B,U,function(){return E()}),9);case 9:E();case 7:be(X,0);break;case 2:return K=ke(X),W=Object.values(m),_(X,a.removeSegments(W,function(){}),10);case 10:throw K}})}function DT(e){var t,n,r,i;return G(function(o){switch(o.g){case 1:return t=new ri,_(o,t.init(),2);case 2:return _(o,vT(t),3);case 3:return n=o.h,r=new Wu("manifest",n.path.xb,n.path.Oa,e),_(o,t.destroy(),4);case 4:return i=new tr,_(o,i.remove(r.toString()),0)}})}function OT(e,t,n,r,i,o){var a,f,p,g,m,w,E,C,P,L,M;return G(function(B){switch(B.g){case 1:for(a=!1,pe(B,2),f=!0,p=I(n.streams),g=p.next();!g.done;g=p.next())for(m=g.value,w=I(m.segments),E=w.next();!E.done;E=w.next())C=E.value,P=C.pendingSegmentRefId?r[C.pendingSegmentRefId]:null,P!=null&&(C.dataKey=P,C.pendingSegmentRefId=void 0),P=C.pendingInitSegmentRefId?r[C.pendingInitSegmentRefId]:null,P!=null&&(C.initSegmentKey=P,C.pendingInitSegmentRefId=void 0),C.pendingSegmentRefId&&(f=!1),C.pendingInitSegmentRefId&&(f=!1);return n.size+=i,f&&(n.isIncomplete=!1),_(B,e.updateManifest(t,n),4);case 4:a=!0,o(),be(B,0);break;case 2:return L=ke(B),_(B,DT(t),5);case 5:if(a){B.u(6);break}return M=Object.values(r),_(B,e.removeSegments(M,function(){}),6);case 6:throw L}})}function AA(e,t,n,r){var i,o,a,f,p,g,m,w,E,C,P,L,M,B,U,K,W,X,q,F,Q,H,Z,$,ue,de,ie,ce,Se,ve;return G(function(Ce){switch(Ce.g){case 1:return i={width:1/0,height:1/0},Rd(e,n.restrictions,i),_(Ce,bd(t,e,r,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(o=[],a=n.preferredDecodingAttributes,f=n.preferredVideoCodecs,p=n.preferredAudioCodecs,g=n.preferredTextFormats,Oc(e,f,p,a,g),m=I(e.variants),w=m.next();!w.done;w=m.next())E=w.value,o.push(rs(E));for(C=I(e.textStreams),P=C.next();!P.done;P=C.next())L=P.value,o.push(Co(L));for(M=I(e.imageStreams),B=M.next();!B.done;B=M.next())U=B.value,o.push(pl(U));return _(Ce,n.offline.trackSelectionCallback(o),3);case 3:for(K=Ce.h,W=e.presentationTimeline.getDuration(),X=0,q=I(K),F=q.next();!F.done;F=q.next())Q=F.value,H=Q.bandwidth*W/8,X+=H;return pe(Ce,4),_(Ce,n.offline.downloadSizeCallback(X),6);case 6:if(Z=Ce.h,!Z)throw new Y(2,9,9014);be(Ce,5);break;case 4:throw $=ke(Ce),$ instanceof Y?$:new Y(2,9,9015);case 5:for(ue=new Set,de=new Set,ie=new Set,ce=I(K),Se=ce.next();!Se.done;Se=ce.next())ve=Se.value,ve.type=="variant"&&ue.add(ve.id),ve.type=="text"&&de.add(ve.id),ve.type=="image"&&ie.add(ve.id);e.variants=e.variants.filter(function(_e){return ue.has(_e.id)}),e.textStreams=e.textStreams.filter(function(_e){return de.has(_e.id)}),e.imageStreams=e.imageStreams.filter(function(_e){return ie.has(_e.id)}),qA(e),le(Ce)}})}function PA(e,t,n,r,i,o,a){var f=TA(n,t,r),p=i.offline.progressCallback;eA(o,function(P,L){f.size=L,p(f,P)},function(P,L){g&&a&&m==L&&lu(e,"cenc",P)});var g=Ym(t)&&!RT(t),m=null;g&&(m=zA.get(e.h.keySystem));for(var w=new xA,E=I(t.textStreams),C=E.next();!C.done;C=E.next())w.g[C.value.id]=52;for(E=I(t.imageStreams),C=E.next();!C.done;C=E.next())EA(w,C.value);for(E=I(t.variants),C=E.next();!C.done;C=E.next())IA(w,C.value);return o=jA(o,w,t,i),i=o.streams,o=o.ig,(w=e.h)&&a&&(w.initData=[]),{Mi:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.ld(),streams:i,sessionIds:a?Uu(e):[],drmInfo:w,appMetadata:r,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},ig:o}}function Ym(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function RT(e){return e.variants.some(function(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[]).some(function(n){return n.initData&&n.initData.length})})}function bT(e,t,n,r){if(t.expiration=n.ld(),n=Uu(n),t.sessionIds=r?n:[],Ym(e)&&r&&!n.length)throw new Y(2,9,9007)}h.remove=function(e){return $m(this,DA(this,e))};function DA(e,t){var n,r,i,o,a,f;return G(function(p){switch(p.g){case 1:if(Eg(),n=Gm(t),n==null||n.g!="manifest")throw new Y(2,9,9004,t);return r=n,i=new ri,qe(p,2),_(p,i.init(),4);case 4:return _(p,Tg(i,r.xb(),r.Oa()),5);case 5:return o=p.h,_(p,o.getManifests([r.key()]),6);case 6:return a=p.h,f=a[0],_(p,Promise.all([OA(e,f,i),RA(o,r,f)]),2);case 2:return Ut(p),_(p,i.destroy(),8);case 8:Ot(p,0)}})}function MT(e,t){for(var n=[],r=I(e.streams),i=r.next();!i.done;i=r.next())i=i.value,t&&i.type=="video"?n.push({contentType:yn(i.mimeType,i.codecs),robustness:e.drmInfo.videoRobustness}):t||i.type!="audio"||n.push({contentType:yn(i.mimeType,i.codecs),robustness:e.drmInfo.audioRobustness});return n}function OA(e,t,n){return G(function(r){return _(r,HA(e.g,e.h.drm,n,t),0)})}function RA(e,t,n){function r(){}var i=KA(n);return Wm(t,n),Promise.all([e.removeSegments(i,r),e.removeManifests([t.key()],r)])}h.dj=function(){return $m(this,bA(this))};function bA(e){var t,n,r,i,o,a,f,p,g,m;return G(function(w){switch(w.g){case 1:return Eg(),t=e.g,n=e.h.drm,r=new ri,i=!1,qe(w,2),_(w,r.init(),4);case 4:o=[],lA(r,function(E){return o.push(E)}),a=I(o),f=a.next();case 5:if(f.done){w.u(2);break}return p=f.value,_(w,p.getAll(),8);case 8:return g=w.h,_(w,kT(n,t,g),9);case 9:return m=w.h,_(w,p.remove(m),10);case 10:m.length!=g.length&&(i=!0),f=a.next(),w.u(5);break;case 2:return Ut(w),_(w,r.destroy(),11);case 11:Ot(w,3);break;case 3:return w.return(!i)}})}h.list=function(){return $m(this,MA())};function MA(){var e,t,n;return G(function(r){switch(r.g){case 1:return Eg(),e=[],t=new ri,qe(r,2),_(r,t.init(),4);case 4:return n=Promise.resolve(),uA(t,function(i,o){n=n.then(function(){var a;return G(function(f){if(f.g==1)return _(f,o.getAllManifests(),2);a=f.h,a.forEach(function(p,g){p=Wm(new Wu("manifest",i.xb,i.Oa,g),p),e.push(p)}),le(f)})})}),_(r,n,2);case 2:return Ut(r),_(r,t.destroy(),6);case 6:Ot(r,3);break;case 3:return r.return(e)}})}function LA(e,t,n,r){var i,o,a,f,p;return G(function(g){if(g.g==1)return i=null,o=e.g,a={networkingEngine:o,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){i=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(r.manifest),Bi(e),_(g,n.start(t,a),2);if(g.g!=3)return f=g.h,Bi(e),p=NT(f),_(g,Promise.all(gl(p,function(m){return m.createSegmentIndex()})),3);if(Bi(e),i)throw i;return g.return(f)})}function NA(e,t,n){var r,i,o,a,f,p,g,m,w,E,C,P,L,M,B;return G(function(U){switch(U.g){case 1:return _(U,LT(e,t),2);case 2:if(r=U.h,r!="text/vtt")throw new Y(1,2,2017,t);return _(U,UA(t,e.g,e.h.streaming.retryParameters),3);case 3:if(i=U.h,o=gn[r],!o)throw new Y(2,2,2014,r);for(a=o(),f={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},p=Ze(i),g=a.parseMedia(p,f,t,[]),m=[],w=I(g),E=w.next(),C={};!E.done;C={Fe:void 0,Kc:void 0},E=w.next())C.Kc=E.value,C.Fe=null,P=function(K){return function(){return K.Fe==null&&(K.Fe=Pn([t],[K.Kc.payload])),K.Fe||[]}}(C),L=new Fe(C.Kc.startTime,C.Kc.endTime,P,0,null,null,0,0,1/0),C.Kc.payload.includes("#xywh")&&(M=C.Kc.payload.split("#xywh=")[1].split(","),M.length===4&&L.we({height:parseInt(M[3],10),positionX:parseInt(M[0],10),positionY:parseInt(M[1],10),width:parseInt(M[2],10)})),m.push(L);if(B=r,!m.length){U.u(4);break}return _(U,Ja(m[0].N()[0],e.g,e.h.manifest.retryParameters),5);case 5:B=U.h;case 4:return U.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new St(m),mimeType:B||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([yn(B||"","")]),isAudioMuxedInVideo:!1})}})}function _A(e,t,n,r,i,o,a){var f,p,g;return G(function(m){if(m.g==1)return o?m.u(2):_(m,LT(e,n),3);if(m.g!=2&&(o=m.h),f={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:kl(0,t.presentationTimeline.getDuration(),[n]),mimeType:o||"",codecs:a||"",kind:i,encrypted:!1,drmInfos:[],keyIds:new Set,language:r,originalLanguage:r,label:null,type:at,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([yn(o||"",a||"")]),isAudioMuxedInVideo:!1},p=yn(f.mimeType,f.codecs),g=Pu(p),!g)throw new Y(2,2,2014,o);return m.return(f)})}function LT(e,t){var n;return G(function(r){switch(r.g){case 1:return pe(r,2),_(r,Ja(t,e.g,e.h.streaming.retryParameters),4);case 4:n=r.h,be(r,3);break;case 2:ke(r);case 3:if(n)return r.return(n);throw new Y(1,2,2011,t)}})}function UA(e,t,n){var r,i,o;return G(function(a){return a.g==1?(r=_r,i=wt([e],n),i.method="GET",_(a,t.request(r,i).promise,2)):(o=a.h,a.return(o.data))})}h.Ic=function(e,t,n,r){var i=this,o;return G(function(a){return a.g==1?(o=new ls({Tb:i.g,onError:t,ke:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o.configure(n.drm),_(a,ou(o,e.variants,r),2)):a.g!=3?_(a,ss(o),3):a.return(o)})};function jA(e,t,n,r){var i=new Map,o=NT(n),a=new Map;o=I(o);for(var f=o.next();!f.done;f=o.next()){f=f.value;var p=BA(e,t,n,f,r,i);a.set(f.id,p)}for(e=I(n.variants),t=e.next();!t.done;t=e.next())t=t.value,t.audio&&a.get(t.audio.id).variantIds.push(t.id),t.video&&a.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(a.values()),ig:Array.from(i.values())}}function BA(e,t,n,r,i,o){var a={id:r.id,originalId:r.originalId,groupId:r.groupId,primary:r.primary,type:r.type,mimeType:r.mimeType,codecs:r.codecs,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,colorGamut:r.colorGamut,videoLayout:r.videoLayout,kind:r.kind,language:r.language,originalLanguage:r.originalLanguage,label:r.label,width:r.width||null,height:r.height||null,encrypted:r.encrypted,keyIds:r.keyIds,segments:[],variantIds:[],roles:r.roles,forced:r.forced,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,closedCaptions:r.closedCaptions,tilesLayout:r.tilesLayout,mssPrivateData:r.mssPrivateData,external:r.external,fastSwitching:r.fastSwitching,isAudioMuxedInVideo:r.isAudioMuxedInVideo},f=i.offline.numberOfParallelDownloads,p=f===0?r.id:0;return VA(r,n.presentationTimeline.nb(),function(g,m){var w=Fm(g),E=void 0;if(!o.has(w)){var C=g.endTime-g.startTime;C=PT(t,r.id)*C,C=fT(e.g,C),o.set(w,new aT(g,C,p,!1,m))}g.ca&&(E=Fm(g.ca),o.has(E)||(C=.5*PT(t,r.id),C=fT(e.g,C),o.set(E,new aT(g.ca,C,p,!0,m)))),a.segments.push({pendingInitSegmentRefId:E,initSegmentKey:E?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,pendingSegmentRefId:w,dataKey:0,mimeType:g.mimeType,codecs:g.codecs,thumbnailSprite:g.thumbnailSprite}),f!==0&&(p=(p+1)%f)}),a}function VA(e,t,n){if(t=e.segmentIndex.find(t),t!=null)for(var r=e.segmentIndex.get(t);r;)n(r,t),r=e.segmentIndex.get(++t)}function Bi(e){if(e.j.g)throw new Y(2,9,7001)}function Eg(){if(!Xm())throw new Y(2,9,9e3)}function $m(e,t){return G(function(n){return n.g==1?(e.i.push(t),qe(n,2),_(n,t,4)):n.g!=2?n.return(n.h):(Ut(n),Gr(e.i,t),Ot(n,0))})}function FA(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){Gr(e.i,n)})}function KA(e){var t=new Set;e=I(e.streams);for(var n=e.next();!n.done;n=e.next()){n=I(n.value.segments);for(var r=n.next();!r.done;r=n.next())r=r.value,r.initSegmentKey!=null&&t.add(r.initSegmentKey),t.add(r.dataKey)}return Array.from(t)}function HA(e,t,n,r){var i,o,a;return G(function(f){return f.g==1?r.drmInfo?(i=sA(n),o=r.sessionIds.map(function(p){return{sessionId:p,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:MT(r,!1),videoCapabilities:MT(r,!0)}}),_(f,kT(t,e,o),2)):f.return():f.g!=3?(a=f.h,_(f,i.remove(a),3)):_(f,i.add(o.filter(function(p){return!a.includes(p.sessionId)})),0)})}function NT(e){for(var t=new Set,n=I(e.variants),r=n.next();!r.done;r=n.next())r=r.value,r.audio&&t.add(r.audio),r.video&&t.add(r.video);for(n=I(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(e=I(e.imageStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function qA(e){e.variants.map(function(o){return o.video});var t=new Set(e.variants.map(function(o){return o.audio}));e=e.textStreams;for(var n=I(t),r=n.next();!r.done;r=n.next()){r=I(t);for(var i=r.next();!i.done;i=r.next());}for(t=I(e),n=t.next();!n.done;n=t.next())for(n=I(e),r=n.next();!r.done;r=n.next());}Me("shaka.offline.Storage",tr),tr.deleteAll=function(){var e;return G(function(t){return t.g==1?(e=new ri,qe(t,2),_(t,aA(e),2)):t.g!=5?(Ut(t),_(t,e.destroy(),5)):Ot(t,0)})},tr.prototype.list=tr.prototype.list,tr.prototype.removeEmeSessions=tr.prototype.dj,tr.prototype.remove=tr.prototype.remove,tr.prototype.store=tr.prototype.store,tr.prototype.getNetworkingEngine=tr.prototype.vb,tr.prototype.getConfiguration=tr.prototype.getConfiguration,tr.prototype.configure=tr.prototype.configure,tr.prototype.destroy=tr.prototype.destroy,tr.support=Xm;var zA=new Map().set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");zv.offline=Xm;function br(){}function mi(e,t){for(e={priority:t||0,callback:e},t=0;t<uh.length;t++)if(uh[t].priority<e.priority){uh.splice(t,0,e);return}uh.push(e)}Me("shaka.polyfill",br),br.register=mi,br.installAll=function(){for(var e=I(uh),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){ft("Error installing polyfill!",n)}}};var uh=[];function _T(){}function UT(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=I(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())GA(t.value)}function GA(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(n){n==null||n==null?this.removeAttribute(t):this.setAttribute(t,n)}})}br.Aria=_T,_T.install=UT,mi(UT);function jT(){}function BT(){Ei()||Tt("Sky_STB")||Yx()}br.EncryptionScheme=jT,jT.install=BT,mi(BT,-2);function VT(){}function FT(){if(T.Document){var e=Element.prototype;e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||e.webkitRequestFullscreen,e=Document.prototype,e.exitFullscreen=e.exitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen||e.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Kf),document.addEventListener("webkitfullscreenerror",Kf),document.addEventListener("mozfullscreenchange",Kf),document.addEventListener("mozfullscreenerror",Kf),document.addEventListener("MSFullscreenChange",Kf),document.addEventListener("MSFullscreenError",Kf)}}function Kf(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}br.Fullscreen=VT,VT.install=FT,mi(FT);function Cg(){}function KT(){var e=!0;!Tr()||Tr()&&xu()||Tr()&&Tt("Fuchsia")||(e=!1),(So()||Xr()||Ei()||Wr()||Mr()||Tt("PC=EOS")||Yr()||Tt("WPE"))&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),HT=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=WA)}function WA(e){var t,n,r,i,o,a,f,p,g,m,w;return G(function(E){switch(E.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},n=e.video,r=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(i=n.contentType,o=$s(i),!o)||r&&(a=r.contentType,f=$s(a),!f))return E.return(t)}else return E.return(t);E.u(2);break}if(!Yi())return E.return(t);if(!n){E.u(3);break}return _(E,XA(n),4);case 4:if(p=E.h,!p)return E.return(t);case 3:if(r){var C=r.contentType;if(Tr()&&r.spatialRendering&&(C+="; spatialRendering=true"),g=Un(C),!g)return E.return(t)}case 2:return e.keySystemConfiguration?(m=e.keySystemConfiguration,_(E,YA(n,r,m),6)):(t.supported=!0,E.return(t));case 6:(w=E.h)&&(t.supported=!0,t.keySystemAccess=w);case 5:return E.return(t)}})}function XA(e){var t,n;return G(function(r){return r.g==1?Tr()?_(r,$A(e),3):Mr()?(t=e.contentType,e.width&&e.height&&(t+="; width="+e.width,t+="; height="+e.height),e.framerate&&(t+="; framerate="+e.framerate),e.bitrate&&(t+="; bitrate="+e.bitrate),r.return(Un(t))):r.u(2):r.g!=2?(n=r.h,r.return(n)):r.return(Un(e.contentType))})}function YA(e,t,n){var r,i,o,a,f,p,g,m,w,E,C;return G(function(P){switch(P.g){case 1:if(r=[],i=[],n.audio&&(o={robustness:n.audio.robustness||"",contentType:t.contentType},Mr()&&t.contentType.includes('codecs="ac-3"')&&(o.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(o.encryptionScheme=n.audio.encryptionScheme),r.push(o)),n.video&&(a={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(a.encryptionScheme=n.video.encryptionScheme),i.push(a)),f={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},r.length&&(f.audioCapabilities=r),i.length&&(f.videoCapabilities=i),p=e?e.contentType:"",g=t?t.contentType:"",m=Ir(p)+";"+$o(p),w=Ir(g)+";"+$o(g),E=n.keySystem,C=null,pe(P,2),Ys.has(m+"#"+w+"#"+E)){C=Ys.get(m+"#"+w+"#"+E)||null,P.u(4);break}return _(P,navigator.requestMediaKeySystemAccess(n.keySystem,[f]),5);case 5:C=P.h,Ys.set(m+"#"+w+"#"+E,C);case 4:be(P,3);break;case 2:ke(P);case 3:return P.return(C)}})}function $A(e){var t,n,r,i;return G(function(o){if(o.g==1){if(!(T.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return o.return(Un(e.contentType));switch(t=e.contentType,e.width&&e.height&&1280<e.width&&720<e.height&&(t+="; width="+e.width+"; height="+e.height),e.framerate&&(n=Math.round(e.framerate),24>n||30<n)&&(t+="; framerate="+e.framerate),r=e.transferFunction||"",r){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return o.return(!1)}return i=!1,t in kg?(i=kg[t],o.u(2)):_(o,cast.__platform__.canDisplayType(t),3)}return o.g!=2&&(i=o.h,kg[t]=i),o.return(i)})}br.MediaCapabilities=Cg,Cg.install=KT;var HT=null;Cg.originalMcap=HT;var kg={};Cg.memoizedCanDisplayTypeRequests_=kg,mi(KT,-1);function qT(){}function zT(){var e=wu();(T.MediaSource||T.ManagedMediaSource)&&(e&&T.MediaSource?10>=e?T.MediaSource=null:12>=e?(Ag(),Jm()):15>=e&&Ag():Tt("DT_STB_BCM")?(Ag(),Jm()):Tt("Tizen 2")||Js()||Tt("Tizen 4")?QA():Tt("WPE")&&(Ag(),Jm())),(T.MediaSource||T.ManagedMediaSource)&&JA(),T.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ZA()}function Ag(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,It.apply(0,arguments));return t.abort=function(){},t}}function Jm(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function JA(){if(T.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return da(n)!="mp2t"&&e(n)}}if(T.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);T.ManagedMediaSource.isTypeSupported=function(n){return da(n)!="mp2t"&&t(n)}}}function QA(){var e=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(n){return $o(n)!="opus"&&e(n)},T.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);T.ManagedMediaSource.isTypeSupported=function(n){return $o(n)!="opus"&&t(n)}}}function ZA(){var e=MediaSource.isTypeSupported;Wr()||(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),r=n.findIndex(function(a){return a.startsWith("codecs=")});if(0>r)return e(t);var i=n[r].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),o=i.findIndex(function(a){return a.startsWith("vp09")});return 0<=o&&(i[o]="vp9",n[r]='codecs="'+i.join(",")+'"',t=n.join("; ")),e(t)})}br.MediaSource=qT,qT.install=zT,mi(zT);function GT(){}function WT(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=null?eP():T.orientation!=null&&tP())}function eP(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()}),screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}function tP(){function e(){switch(T.orientation){case-90:t.type="landscape-secondary",t.angle=270;break;case 0:t.type="portrait-primary",t.angle=0;break;case 90:t.type="landscape-primary",t.angle=90;break;case 180:t.type="portrait-secondary",t.angle=180}}var t=new Pg;screen.orientation=t,e(),T.addEventListener("orientationchange",function(){e();var n=new Te("change");t.dispatchEvent(n)})}br.Orientation=GT,GT.install=WT;function Pg(){xt.call(this),this.type="",this.angle=0}mt(Pg,xt),Pg.prototype.lock=function(e){function t(r){return screen.lockOrientation?screen.lockOrientation(r):screen.mozLockOrientation?screen.mozLockOrientation(r):screen.msLockOrientation?screen.msLockOrientation(r):!1}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():(e=Error("screen.orientation.lock() is not available on this device"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},Pg.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},mi(WT);function Qm(){}var Zm,e0,t0,n0,r0,i0;function nP(e,t){try{var n=new Dg(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function rP(e){var t=this.mediaKeys;return t&&t!=e&&XT(t,null),delete this.mediaKeys,(this.mediaKeys=e)?XT(e,this):Promise.resolve()}function iP(e){if(e=Ze(e.initData),wr(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=wo(e.subarray(4),!0),e=ui(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=zr(e),this.dispatchEvent(t)}br.PatchedMediaKeysApple=Qm,Qm.uninstall=function(){Zm&&(Zm=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",e0),HTMLMediaElement.prototype.setMediaKeys=t0,T.MediaKeys=n0,T.MediaKeySystemAccess=r0,navigator.requestMediaKeySystemAccess=i0,e0=i0=t0=r0=n0=null,T.shakaMediaKeysPolyfill="")},Qm.install=function(e){T.HTMLVideoElement&&T.WebKitMediaKeys&&(e!==void 0&&e&&(Zm=!0,e0=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),t0=HTMLMediaElement.prototype.setMediaKeys,n0=T.MediaKeys,r0=T.MediaKeySystemAccess,i0=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rP,T.MediaKeys=lh,T.MediaKeySystemAccess=Dg,navigator.requestMediaKeySystemAccess=nP,T.shakaMediaKeysPolyfill=oP)};function Dg(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=I(t),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.persistentState=="required")t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var r=!1,i=!1;if(n.audioCapabilities)for(var o=I(n.audioCapabilities),a=o.next();!a.done;a=o.next())a=a.value,a.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.audioCapabilities.push(a),i=!0));if(n.videoCapabilities)for(n=I(n.videoCapabilities),o=n.next();!o.done;o=n.next())o=o.value,o.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.videoCapabilities.push(o),i=!0));r||(i=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=i?t:null}if(t){this.g=t;return}}throw e=Error("Unsupported keySystem"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Dg.prototype.createMediaKeys=function(){var e=new lh(this.keySystem);return Promise.resolve(e)},Dg.prototype.getConfiguration=function(){return this.g};function lh(e){this.h=new WebKitMediaKeys(e),this.g=new At}lh.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new o0(this.h)},lh.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function XT(e,t){if(e.g.La(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",iP);try{return Ui(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}lh.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function o0(e){xt.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new At,this.sessionId="",this.expiration=NaN,this.closed=new Nt,this.keyStatuses=new YT}mt(o0,xt),h=o0.prototype,h.generateRequest=function(e,t){var n=this;this.h=new Nt;try{var r=this.l.createSession("video/mp4",Ze(t));this.i=r,this.sessionId=r.sessionId||"",this.j.D(this.i,"webkitkeymessage",function(i){n.h&&(n.h.resolve(),n.h=null),i=new Map().set("messageType",n.keyStatuses.cc()==null?"license-request":"license-renewal").set("message",zr(i.message)),i=new Te("message",i),n.dispatchEvent(i)}),this.j.D(r,"webkitkeyadded",function(){n.g&&(Og(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(r,"webkitkeyerror",function(){var i=Error("EME PatchedMediaKeysApple key error");if(i.errorCode=n.i.error,n.h!=null)n.h.reject(i),n.h=null;else if(n.g!=null)n.g.reject(i),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Og(n,"output-not-allowed");break;default:Og(n,"internal-error")}}),Og(this,"status-pending")}catch(i){this.h.reject(i)}return this.h},h.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},h.update=function(e){this.g=new Nt;try{this.i.update(Ze(e))}catch(t){this.g.reject(t)}return this.g},h.close=function(){try{this.i.close(),this.closed.resolve(),this.j.La()}catch(e){this.closed.reject(e)}return this.closed},h.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Og(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new Te("keystatuseschange"),e.dispatchEvent(t)}function YT(){this.size=0,this.g=void 0}h=YT.prototype,h.cc=function(){return this.g},h.forEach=function(e){this.g&&e(this.g,Xs.value())},h.get=function(e){if(this.has(e))return this.g},h.has=function(e){var t=Xs.value();return!!(this.g&&vo(e,t))},h.entries=function(){},h.keys=function(){},h.values=function(){};var oP="apple";function $T(){}function JT(){T.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Js()||Tt("Tizen 4")||Tt("Tizen 5.0")||Wr()&&Qs()===38)&&(MediaKeys.prototype.setServerCertificate=uP)}function uP(){return Promise.resolve(!1)}br.PatchedMediaKeysCert=$T,$T.install=JT,mi(JT);function QT(){}function ZT(){if(!(!T.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)c0="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=lP,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=sP,T.MediaKeys=sh,T.MediaKeySystemAccess=Rg,T.shakaMediaKeysPolyfill=aP}}function u0(e){var t=c0;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function lP(e,t){try{var n=new Rg(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function sP(e){var t=this.mediaKeys;return t&&t!=e&&ex(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&ex(e,this),Promise.resolve()}br.PatchedMediaKeysWebkit=QT,QT.install=ZT;function Rg(e,t){this.g=this.keySystem=e;var n=!1;e=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video"),t=I(t);for(var o=t.next();!o.done;o=t.next()){o=o.value;var a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},f=!1;if(o.audioCapabilities)for(var p=I(o.audioCapabilities),g=p.next();!g.done;g=p.next())g=g.value,g.contentType&&(f=!0,i.canPlayType(g.contentType.split(";")[0],this.g)&&(a.audioCapabilities.push(g),r=!0));if(o.videoCapabilities)for(p=I(o.videoCapabilities),g=p.next();!g.done;g=p.next())g=g.value,g.contentType&&(f=!0,i.canPlayType(g.contentType,this.g)&&(a.videoCapabilities.push(g),r=!0));if(f||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),o.persistentState=="required"&&(n?(a.persistentState="required",a.sessionTypes=["persistent-license"]):r=!1),r){this.h=a;return}}throw n="Unsupported keySystem",(e=="org.w3.clearkey"||e=="com.widevine.alpha")&&(n="None of the requested configurations were supported."),e=Error(n),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Rg.prototype.createMediaKeys=function(){var e=new sh(this.g);return Promise.resolve(e)},Rg.prototype.getConfiguration=function(){return this.h};function sh(e){this.l=e,this.h=null,this.g=new At,this.i=[],this.j=new Map}function ex(e,t){e.h=t,e.g.La();var n=c0;t&&(e.g.D(t,n+"needkey",function(r){var i=new CustomEvent("encrypted");i.initDataType="cenc",i.initData=zr(r.initData),e.h.dispatchEvent(i)}),e.g.D(t,n+"keymessage",function(r){var i=l0(e,r.sessionId);i&&(r=new Map().set("messageType",i.keyStatuses.cc()==null?"licenserequest":"licenserenewal").set("message",r.message),r=new Te("message",r),i.h&&(i.h.resolve(),i.h=null),i.dispatchEvent(r))}),e.g.D(t,n+"keyadded",function(r){(r=l0(e,r.sessionId))&&r.ready()}),e.g.D(t,n+"keyerror",function(r){var i=l0(e,r.sessionId);if(i){var o=Error("EME v0.1b key error"),a=r.errorCode;a.systemCode=r.systemCode,o.errorCode=a,!r.sessionId&&i.h?(r.systemCode==45&&(o.message="Unsupported session type."),i.h.reject(o),i.h=null):r.sessionId&&i.g?(i.g.reject(o),i.g=null):(o=r.systemCode,r.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?bg(i,"output-restricted"):o==1?bg(i,"expired"):bg(i,"internal-error"))}}))}sh.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary"&&e!="persistent-license")throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new s0(t,this.l,e),this.i.push(e),e},sh.prototype.setServerCertificate=function(){return Promise.resolve(!1)},sh.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function l0(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function s0(e,t,n){xt.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new Nt,this.keyStatuses=new nx}mt(s0,xt),h=s0.prototype,h.ready=function(){bg(this,"usable"),this.g&&this.g.resolve(),this.g=null};function tx(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if(e.l=="persistent-license")if(n)var r=Ze(ui("LOAD_SESSION|"+n));else{var i=ui("PERSISTENT|");r=rn(i,t)}else r=Ze(t)}catch(a){return Promise.reject(a)}e.h=new Nt;var o=u0("generateKeyRequest");try{e.j[o](e.i,r)}catch(a){if(a.name!="InvalidStateError")return e.h=null,Promise.reject(a);new st(function(){try{e.j[o](e.i,r)}catch(f){e.h.reject(f),e.h=null}}).aa(.01)}return e.h}function a0(e,t,n){if(e.g)e.g.then(function(){return a0(e,t,n)}).catch(function(){return a0(e,t,n)});else{if(e.g=t,e.i=="webkit-org.w3.clearkey"){var r=Qt(n),i=JSON.parse(r);i.keys[0].kty!="oct"&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),r=ci(i.keys[0].k),i=ci(i.keys[0].kid)}else r=Ze(n),i=null;var o=u0("addKey");try{e.j[o](e.i,r,i,e.sessionId)}catch(a){e.g.reject(a),e.g=null}}}function bg(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new Te("keystatuseschange"),e.dispatchEvent(t)}h.generateRequest=function(e,t){return tx(this,t,null)},h.load=function(e){return this.l=="persistent-license"?tx(this,null,e):Promise.reject(Error("Not a persistent session."))},h.update=function(e){var t=new Nt;return a0(this,t,e),t},h.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=u0("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},h.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function nx(){this.size=0,this.g=void 0}h=nx.prototype,h.cc=function(){return this.g},h.forEach=function(e){this.g&&e(this.g,Xs.value())},h.get=function(e){if(this.has(e))return this.g},h.has=function(e){var t=Xs.value();return!!(this.g&&vo(e,t))},h.entries=function(){},h.keys=function(){},h.values=function(){};var c0="",aP="webkit";mi(ZT);function rx(){}function ix(){if(T.HTMLVideoElement){var e=HTMLVideoElement.prototype;e.requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=fP,Object.defineProperty(e,"disablePictureInPicture",{get:pP,set:hP,enumerable:!0,configurable:!0}),document.exitPictureInPicture=dP,document.addEventListener("webkitpresentationmodechanged",cP,!0))}}function cP(e){if(e=e.target,e.webkitPresentationMode=="picture-in-picture"){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function fP(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function dP(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function pP(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function hP(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}br.PiPWebkit=rx,rx.install=ix,mi(ix);function ox(){}function ux(){T.crypto&&("randomUUID"in T.crypto||(T.crypto.randomUUID=yP))}function yP(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}br.RandomUUID=ox,ox.install=ux,mi(ux);function lx(){}function sx(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:gP})}function gP(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}br.Symbol=lx,lx.install=sx,mi(sx);function ax(){}function cx(){if(T.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}br.VideoPlayPromise=ax,ax.install=cx,mi(cx);function fx(){}function dx(){if(T.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||Wr()&&Qs()===38)&&(e.getVideoPlaybackQuality=vP)}}function vP(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}br.VideoPlaybackQuality=fx,fx.install=dx,mi(dx);function px(){}function hx(){if(!T.VTTCue&&T.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=f0;else if(t==6)e=mP;else{try{var n=!!f0(1,2,"")}catch{n=!1}n&&(e=f0)}e&&(T.VTTCue=function(r,i,o){return e(r,i,o)})}}function f0(e,t,n){return new T.TextTrackCue(e,t,n)}function mP(e,t,n){return new T.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}br.VTTCue=px,px.install=hx,mi(hx);function Vi(){}Vi.prototype.parseInit=function(){},Vi.prototype.setSequenceMode=function(){},Vi.prototype.setManifestType=function(){},Vi.prototype.parseMedia=function(e,t){var n=null,r=[];e=Qt(e).split(/\r?\n/),e=I(e);for(var i=e.next();!i.done;i=e.next())if((i=i.value)&&!/^\s+$/.test(i)&&(i=SP.exec(i))){var o=wP.exec(i[1]);o=60*parseInt(o[1],10)+parseFloat(o[2].replace(",",".")),i=new zt(o,t.segmentEnd?t.segmentEnd:o+2,i[2]),n&&(n.endTime=o,r.push(n)),n=i}return n&&r.push(n),r},Me("shaka.text.LrcTextParser",Vi),Vi.prototype.parseMedia=Vi.prototype.parseMedia,Vi.prototype.setManifestType=Vi.prototype.setManifestType,Vi.prototype.setSequenceMode=Vi.prototype.setSequenceMode,Vi.prototype.parseInit=Vi.prototype.parseInit;var SP=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,wP=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;gn["application/x-subtitle-lrc"]=function(){return new Vi};function Si(){}Si.prototype.parseInit=function(){},Si.prototype.setSequenceMode=function(){},Si.prototype.setManifestType=function(){},Si.prototype.parseMedia=function(e,t,n,r){var i=Qt(e);if(e=[],i=="")return e;var o=Qi(i,"tt",!0);if(!o)throw new Y(2,2,2005,"Failed to parse TTML.");if(i=xr(o,"body")[0],!i)return[];var a=Ai(o,ah,"frameRate"),f=Ai(o,ah,"subFrameRate"),p=Ai(o,ah,"frameRateMultiplier"),g=Ai(o,ah,"tickRate"),m=Ai(o,ah,"cellResolution"),w=o.attributes["xml:space"]||"default",E=Ai(o,Ng,"extent");if(w!="default"&&w!="preserve")throw new Y(2,2,2005,"Invalid xml:space value: "+w);w=w=="default",a=new CP(a,f,p,g),m=EP(m),f=xr(o,"metadata")[0],f=(f?f.children:[]).filter(function(L){return L!=`
|
||
`}),p=xr(o,"style"),o=xr(o,"region"),g=[];for(var C=I(o),P=C.next();!P.done;P=C.next())(P=TP(P.value,p,E))&&g.push(P);if(bt(i,"p").length)throw new Y(2,2,2001,"<p> can only be inside <div> in TTML");for(E=I(bt(i,"div")),C=E.next();!C.done;C=E.next())if(bt(C.value,"span").length)throw new Y(2,2,2001,"<span> can only be inside <p> in TTML");return(t=yx(i,t,a,f,p,o,g,w,m,null,!1,n,r))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function yx(e,t,n,r,i,o,a,f,p,g,m,w,E){var C=g;if(rl(e)){if(!m)return null;var P={tagName:"span",children:[sn(e)],attributes:{},parent:null}}else P=e;for(var L=null,M=I(Cx),B=M.next();!B.done&&!(L=Lg(P,"backgroundImage",r,"#",B.value)[0]);B=M.next());M=null,B=Ai(P,Cx,"backgroundImage");var U=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(B&&U.test(B)){if(M=parseInt(B.split(":").pop(),10)-1,M>=E.length)return null;M=E[M]}else w&&B&&!B.startsWith("#")&&(U=new hn(w),B=new hn(B),(B=U.resolve(B).toString())&&(M=B));if((e.tagName=="p"||L||M)&&(m=!0),e=m,B=(P.attributes["xml:space"]||(f?"default":"preserve"))=="default",U=P.children.every(rl),f=[],!U)for(var K=I(P.children),W=K.next();!W.done;W=K.next())(W=yx(W.value,t,n,r,i,o,a,B,p,P,m,w,E))&&f.push(W);if(r=g!=null,w=sn(P),w=P.children.length&&w&&/\S/.test(w),K=P.attributes.begin||P.attributes.end||P.attributes.dur,!(K||w||P.tagName=="br"||f.length!=0||r&&!B))return null;for(E=mx(P,n),w=E.start,E=E.end;C&&C.tagName&&C.tagName!="tt";)E=IP(C,n,w,E),w=E.start,E=E.end,C=C.parent;if(w==null&&(w=0),w+=t.periodStart,E=E==null?1/0:E+t.periodStart,w=Math.max(w,t.segmentStart),E=Math.min(E,t.segmentEnd),!K&&0<f.length)for(w=1/0,E=0,t=I(f),n=t.next();!n.done;n=t.next())n=n.value,w=Math.min(w,n.startTime),E=Math.max(E,n.endTime);if(P.tagName=="br")return i=new zt(w,E,""),i.lineBreak=!0,i;if(t="",U&&(t=ur(sn(P)||""),B&&(t=t.replace(/\s+/g," "))),t=new zt(w,E,t),t.nestedCues=f,m||(t.isContainer=!0),p&&(t.cellResolution=p),p=Lg(P,"region",o,"")[0],P.attributes.region&&p&&p.attributes["xml:id"]){var X=p.attributes["xml:id"];t.region=a.filter(function(q){return q.id==X})[0]}return a=p,g&&r&&!P.attributes.region&&!P.attributes.style&&(a=Lg(g,"region",o,"")[0]),xP(t,P,a,L,M,i,e,f.length==0),t}function TP(e,t,n){var r=new el,i=e.attributes["xml:id"];if(!i)return null;r.id=i,i=null,n&&(i=g0.exec(n)||v0.exec(n)),n=i?Number(i[1]):null,i=i?Number(i[2]):null;var o,a=Mg(e,t,"extent");if(a){var f=(o=g0.exec(a))||v0.exec(a);f!=null&&(r.width=Number(f[1]),r.height=Number(f[2]),o||(n!=null&&(r.width=100*r.width/n),i!=null&&(r.height=100*r.height/i)),r.widthUnits=o||n!=null?Xn:0,r.heightUnits=o||i!=null?Xn:0)}return(e=Mg(e,t,"origin"))&&(f=(o=g0.exec(e))||v0.exec(e),f!=null&&(r.viewportAnchorX=Number(f[1]),r.viewportAnchorY=Number(f[2]),o?a||(r.width=100-r.viewportAnchorX,r.widthUnits=Xn,r.height=100-r.viewportAnchorY,r.heightUnits=Xn):(i!=null&&(r.viewportAnchorY=100*r.viewportAnchorY/i),n!=null&&(r.viewportAnchorX=100*r.viewportAnchorX/n)),r.viewportAnchorUnits=o||n!=null?Xn:0)),r}function d0(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&(t=t[1].split(","),t.length==4)?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function xP(e,t,n,r,i,o,a,f){if(a=a||f,Sr(t,n,o,"direction",a)=="rtl"&&(e.direction="rtl"),f=Sr(t,n,o,"writingMode",a),f=="tb"||f=="tblr"?e.writingMode="vertical-lr":f=="tbrl"?e.writingMode="vertical-rl":f=="rltb"||f=="rl"?e.direction="rtl":f&&(e.direction=la),(f=Sr(t,n,o,"textAlign",!0))?(e.positionAlign=PP[f],e.lineAlign=AP[f],e.textAlign=Tc[f.toUpperCase()]):e.textAlign=Io,(f=Sr(t,n,o,"displayAlign",!0))&&(e.displayAlign=Uh[f.toUpperCase()]),(f=Sr(t,n,o,"color",a))&&(e.color=d0(f)),(f=Sr(t,n,o,"backgroundColor",a))&&(e.backgroundColor=d0(f)),(f=Sr(t,n,o,"border",a))&&(e.border=f),f=Sr(t,n,o,"fontFamily",a))switch(f){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=f.split(",").filter(function(p){return p!="default"}).join(",")}switch((f=Sr(t,n,o,"fontWeight",a))&&f=="bold"&&(e.fontWeight=$l),f=Sr(t,n,o,"wrapOption",a),e.wrapLine=!(f&&f=="noWrap"),(f=Sr(t,n,o,"lineHeight",a))&&f.match(Hf)&&(e.lineHeight=f),(f=Sr(t,n,o,"fontSize",a))&&(f.match(Hf)||f.match(kP))&&(e.fontSize=f),(f=Sr(t,n,o,"fontStyle",a))&&(e.fontStyle=Vh[f.toUpperCase()]),r?(i=r.attributes.imageType||r.attributes.imagetype,f=r.attributes.encoding,r=sn(r).trim(),i=="PNG"&&f=="Base64"&&r&&(e.backgroundImage="data:image/png;base64,"+r)):i&&(e.backgroundImage=i),(r=Sr(t,n,o,"textOutline",a))&&(r=r.split(" "),r[0].match(Hf)?e.textStrokeColor=e.color:(e.textStrokeColor=d0(r[0]),r.shift()),r[0]&&r[0].match(Hf)?e.textStrokeWidth=r[0]:e.textStrokeColor=""),(r=Sr(t,n,o,"letterSpacing",a))&&r.match(Hf)&&(e.letterSpacing=r),(r=Sr(t,n,o,"linePadding",a))&&r.match(Hf)&&(e.linePadding=r),(r=Sr(t,n,o,"opacity",a))&&(e.opacity=parseFloat(r)),(r=Mg(n,o,"textDecoration"))&&gx(e,r),(r=p0(t,o,"textDecoration"))&&gx(e,r),(r=Sr(t,n,o,"textCombine",a))&&(e.textCombineUpright=r),Sr(t,n,o,"ruby",a)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}function gx(e,t){t=I(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(Ho)||e.textDecoration.push(Ho);break;case"noUnderline":e.textDecoration.includes(Ho)&&Gr(e.textDecoration,Ho);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Gr(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Gr(e.textDecoration,"overline")}}function Sr(e,t,n,r,i){return i=i===void 0?!0:i,(e=p0(e,n,r))?e:i?Mg(t,n,r):null}function Mg(e,t,n){if(!e)return null;var r=Ai(e,Ng,n);return r||vx(e,t,n)}function p0(e,t,n){var r=Ai(e,Ng,n);return r||vx(e,t,n)}function vx(e,t,n){e=Lg(e,"style",t,"");for(var r=null,i=0;i<e.length;i++){var o=Zi(e[i],"urn:ebu:tt:style",n);o||(o=Ai(e[i],Ng,n)),o||(o=p0(e[i],t,n)),o&&(r=o)}return r}function Lg(e,t,n,r,i){var o=[];if(!e||1>n.length)return o;var a=e;for(e=null;!e&&!(e=i?Zi(a,i,t):a.attributes[t])&&(a=a.parent,a););if(t=e){for(t=I(t.split(" ")),i=t.next();!i.done;i=t.next())for(i=i.value,e=I(n),a=e.next();!a.done;a=e.next())if(a=a.value,r+a.attributes["xml:id"]==i){o.push(a);break}}return o}function IP(e,t,n,r){return e=mx(e,t),n==null?n=e.start:e.start!=null&&(n+=e.start),r==null?r=e.end:e.start!=null&&(r+=e.start),{start:n,end:r}}function mx(e,t){var n=h0(e.attributes.begin,t),r=h0(e.attributes.end,t);return e=h0(e.attributes.dur,t),r==null&&e!=null&&(r=n+e),{start:n,end:r}}function h0(e,t){var n=null;if(Sx.test(e)){e=Sx.exec(e),n=Number(e[1]);var r=Number(e[2]),i=Number(e[3]),o=Number(e[4]);o+=(Number(e[5])||0)/t.h,i+=o/t.frameRate,n=i+60*r+3600*n}else if(wx.test(e))n=y0(wx,e);else if(Tx.test(e))n=y0(Tx,e);else if(xx.test(e))e=xx.exec(e),n=Number(e[1])/t.frameRate;else if(Ix.test(e))e=Ix.exec(e),n=Number(e[1])/t.g;else if(Ex.test(e))n=y0(Ex,e);else if(e)throw new Y(2,2,2001,"Could not parse cue time range in TTML");return n}function y0(e,t){return e=e.exec(t),e==null||e[0]==""?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function EP(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{nc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}Me("shaka.text.TtmlTextParser",Si),Si.prototype.parseMedia=Si.prototype.parseMedia,Si.prototype.setManifestType=Si.prototype.setManifestType,Si.prototype.setSequenceMode=Si.prototype.setSequenceMode,Si.prototype.parseInit=Si.prototype.parseInit;function CP(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),this.g==0&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}var g0=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,kP=/^(\d{1,4}(?:\.\d+)?|100)%$/,Hf=/^(\d+px|\d+em|\d*\.?\d+c)$/,v0=/^(\d+)px (\d+)px$/,Sx=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,wx=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Tx=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,xx=/^(\d*(?:\.\d*)?)f$/,Ix=/^(\d*(?:\.\d*)?)t$/,Ex=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),AP={left:sl,center:"center",right:"end",start:sl,end:"end"},PP={left:"line-left",center:"center",right:"line-right"},ah=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Ng=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Cx=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];gn["application/ttml+xml"]=function(){return new Si};function qn(){this.g=new Si}qn.prototype.parseInit=function(e){var t=!1;if(new Vt().box("moov",it).box("trak",it).box("mdia",it).box("minf",it).box("stbl",it).S("stsd",Po).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new Y(2,2,2007)},qn.prototype.setSequenceMode=function(){},qn.prototype.setManifestType=function(){},qn.prototype.parseMedia=function(e,t,n){var r=this,i=!1,o=[],a=[];if(new Vt().box("moof",it).box("traf",it).S("subs",function(f){a=[];for(var p=f.reader,g=p.R(),m=0;m<g;m++){p.R();for(var w=p.ma(),E=0;E<w;E++)f.version==1?a.push(p.R()):a.push(p.ma()),p.U(),p.U(),p.R()}}).box("mdat",_u(function(f){if(i=!0,a.length){for(var p=Ze(f,0,a[0]),g=[],m=a[0],w=1;w<a.length;w++){var E=Ze(f,m,a[w]);E=Pc(E),g.push("data:image/png;base64,"+E),m+=a[w]}o=o.concat(r.g.parseMedia(p,t,n,g))}else o=o.concat(r.g.parseMedia(f,t,n,[]))})).parse(e,!1),!i)throw new Y(2,2,2007);return o},Me("shaka.text.Mp4TtmlParser",qn),qn.prototype.parseMedia=qn.prototype.parseMedia,qn.prototype.setManifestType=qn.prototype.setManifestType,qn.prototype.setSequenceMode=qn.prototype.setSequenceMode,qn.prototype.parseInit=qn.prototype.parseInit,gn['application/mp4; codecs="stpp"']=function(){return new qn},gn['application/mp4; codecs="stpp.ttml"']=function(){return new qn},gn['application/mp4; codecs="stpp.ttml.im1i"']=function(){return new qn},gn['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new qn},gn['application/mp4; codecs="stpp.ttml.im2i"']=function(){return new qn},gn['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new qn},gn['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new qn},gn['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new qn},gn['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new qn},gn['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new qn};function Hr(){this.g="UNKNOWN"}Hr.prototype.parseInit=function(){},Hr.prototype.setSequenceMode=function(){},Hr.prototype.setManifestType=function(e){this.g=e},Hr.prototype.parseMedia=function(e,t){e=Qt(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,`
|
||
`);var n=e.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new Y(2,2,2e3);if(e=t.vttOffset,this.g=="HLS")if(n[0].includes("X-TIMESTAMP-MAP")){var r=n[0];if(e=r.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),r=r.match(/MPEGTS:(\d+)/m),!e||!r)throw new Y(2,2,2e3);if(e=li(e[1]),e==null)throw new Y(2,2,2e3);r=Number(r[1]);for(var i=t.segmentStart-t.periodStart;95443.7176888889<=i;)i-=95443.7176888889,r+=8589934592;e=t.periodStart+r/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],r=I(n[0].split(`
|
||
`)),i=r.next();!i.done;i=r.next())if(i=i.value,/^Region:/.test(i)){i=new nl(i);var o=new el;$r(i),Eu(i);for(var a=$r(i);a;){var f=o,p=a;(a=/^id=(.*)$/.exec(p))?f.id=a[1]:(a=/^width=(\d{1,2}|100)%$/.exec(p))?f.width=Number(a[1]):(a=/^lines=(\d+)$/.exec(p))?(f.height=Number(a[1]),f.heightUnits=2):(a=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))?(f.regionAnchorX=Number(a[1]),f.regionAnchorY=Number(a[2])):(a=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))?(f.viewportAnchorX=Number(a[1]),f.viewportAnchorY=Number(a[2])):/^scroll=up$/.exec(p)&&(f.scroll="up"),Eu(i),a=$r(i)}t.push(o)}for(r=new Map,Sc(r),i=[],n=I(n.slice(1)),o=n.next();!o.done;o=n.next()){if(o=o.value.split(`
|
||
`),(o.length!=1||o[0])&&!/^NOTE($|[ \t])/.test(o[0])&&o[0]=="STYLE"){for(f=[],a=-1,p=1;p<o.length;p++)o[p].includes("::cue")&&(f.push([]),a=f.length-1),a!=-1&&(f[a].push(o[p]),o[p].includes("}")&&(a=-1));for(f=I(f),a=f.next();!a.done;a=f.next()){var g=a.value;a="global",(p=g[0].match(/\((.*)\)/))&&(a=p.pop()),p=g.slice(1,-1),g[0].includes("}")&&(g=/\{(.*?)\}/.exec(g[0]))&&(p=g[1].split(";")),(g=r.get(a))||(g=new zt(0,0,""));for(var m=!1,w=0;w<p.length;w++){var E=/^\s*([^:]+):\s*(.*)/.exec(p[w]);if(E){var C=E[2].trim().replace(";","");switch(E[1].trim()){case"background-color":case"background":m=!0,g.backgroundColor=C;break;case"color":m=!0,g.color=C;break;case"font-family":m=!0,g.fontFamily=C;break;case"font-size":m=!0,g.fontSize=C;break;case"font-weight":(700<=parseInt(C,10)||C=="bold")&&(m=!0,g.fontWeight=$l);break;case"font-style":switch(C){case"normal":m=!0,g.fontStyle=vd;break;case"italic":m=!0,g.fontStyle=Jl;break;case"oblique":m=!0,g.fontStyle="oblique"}break;case"opacity":m=!0,g.opacity=parseFloat(C);break;case"text-combine-upright":m=!0,g.textCombineUpright=C;break;case"text-shadow":m=!0,g.textShadow=C;break;case"white-space":m=!0,g.wrapLine=C!="noWrap"}}}m&&r.set(a,g)}}if(g=o,m=e,g.length==1&&!g[0]||/^NOTE($|[ \t])/.test(g[0])||g[0]=="STYLE"||g[0]=="REGION")o=null;else if(o=null,g[0].includes("-->")||(o=g[0],g.splice(0,1)),f=new nl(g[0]),a=Ci(f),w=To(f,/[ \t]+--\x3e[ \t]+/g),p=Ci(f),a==null||w==null||p==null)ft("Failed to parse VTT time code. Cue skipped:",o,g),o=null;else{for(a+=m,p+=m,m=g.slice(1).join(`
|
||
`).trim(),r.has("global")?(g=r.get("global").clone(),g.startTime=a,g.endTime=p,g.payload=m):g=new zt(a,p,m),Eu(f),a=$r(f);a;)kx(g,a,t),Eu(f),a=$r(f);mc(g,r),o!=null&&(g.id=o),o=g}o&&i.push(o)}return i};function kx(e,t,n){var r;(r=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=r[1],t=="middle"?e.textAlign=Io:e.textAlign=Tc[t.toUpperCase()]):(r=/^vertical:(lr|rl)$/.exec(t))?e.writingMode=r[1]=="lr"?"vertical-lr":"vertical-rl":(r=/^size:([\d.]+)%$/.exec(t))?e.size=Number(r[1]):(r=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign=t=="line-left"||t=="start"?"line-left":t=="line-right"||t=="end"?"line-right":t=="center"||t=="middle"?"center":wc)):(r=/^region:(.*)$/.exec(t))?(t=DP(n,r[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=yd[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=ll,e.line=Number(n[1]),n[2]&&(e.lineAlign=yd[n[2].toUpperCase()]))}function DP(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}Me("shaka.text.VttTextParser",Hr),Hr.prototype.parseMedia=Hr.prototype.parseMedia,Hr.prototype.setManifestType=Hr.prototype.setManifestType,Hr.prototype.setSequenceMode=Hr.prototype.setSequenceMode,Hr.prototype.parseInit=Hr.prototype.parseInit,gn["text/vtt"]=function(){return new Hr},gn['text/vtt; codecs="vtt"']=function(){return new Hr},gn['text/vtt; codecs="wvtt"']=function(){return new Hr};function Fi(){this.g=null}Fi.prototype.parseInit=function(e){var t=this,n=!1;if(new Vt().box("moov",it).box("trak",it).box("mdia",it).S("mdhd",function(r){r=Ma(r.reader,r.version),t.g=r.timescale}).box("minf",it).box("stbl",it).S("stsd",Po).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new Y(2,2,2008);if(!n)throw new Y(2,2,2008)},Fi.prototype.setSequenceMode=function(){},Fi.prototype.setManifestType=function(){},Fi.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new Y(2,2,2008);var n=0,r=[],i,o=[],a=!1,f=!1,p=!1,g=null;if(new Vt().box("moof",it).box("traf",it).S("tfdt",function(K){a=!0,n=ba(K.reader,K.version).baseMediaDecodeTime}).S("tfhd",function(K){g=ty(K.reader,K.flags).jd}).S("trun",function(K){f=!0,r=tp(K.reader,K.version,K.flags).kh}).box("mdat",_u(function(K){p=!0,i=K})).parse(e,!1),!p&&!a&&!f)throw new Y(2,2,2008);e=n;for(var m=new Mt(i,0),w=I(r),E=w.next();!E.done;E=w.next()){E=E.value;var C=E.Wf||g,P=E.se?n+E.se:e;e=P+(C||0);var L=0;do{var M=m.R();L+=M;var B=m.R(),U=null;Ur(B)=="vttc"?8<M&&(U=m.Ab(M-8)):m.skip(M-8),C&&U&&(M=OP(U,t.periodStart+P/this.g,t.periodStart+e/this.g),o.push(M))}while(E.sampleSize&&L<E.sampleSize)}return o.filter(to)};function OP(e,t,n){var r,i,o;return new Vt().box("payl",_u(function(a){r=Qt(a)})).box("iden",_u(function(a){i=Qt(a)})).box("sttg",_u(function(a){o=Qt(a)})).parse(e),r?RP(r,i,o,t,n):null}function RP(e,t,n,r,i){if(e=new zt(r,i,e),mc(e),t&&(e.id=t),n)for(t=new nl(n),n=$r(t);n;)kx(e,n,[]),Eu(t),n=$r(t);return e}Me("shaka.text.Mp4VttParser",Fi),Fi.prototype.parseMedia=Fi.prototype.parseMedia,Fi.prototype.setManifestType=Fi.prototype.setManifestType,Fi.prototype.setSequenceMode=Fi.prototype.setSequenceMode,Fi.prototype.parseInit=Fi.prototype.parseInit,gn['application/mp4; codecs="wvtt"']=function(){return new Fi};function Ki(){}Ki.prototype.parseInit=function(){},Ki.prototype.setSequenceMode=function(){},Ki.prototype.setManifestType=function(){},Ki.prototype.parseMedia=function(e){var t=Qt(e).replace(/\r+/g,"");if(t=t.trim(),e=[],t=="")return e;t=I(t.split(`
|
||
|
||
`));for(var n=t.next();!n.done;n=t.next()){n=n.value.split(`
|
||
`);var r=new nl(n[0]),i=Ci(r),o=To(r,/,/g);if(r=Ci(r),i==null||o==null||r==null)throw new Y(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new zt(i,r,n.slice(1).join(`
|
||
`).trim()))}return e},Me("shaka.text.SbvTextParser",Ki),Ki.prototype.parseMedia=Ki.prototype.parseMedia,Ki.prototype.setManifestType=Ki.prototype.setManifestType,Ki.prototype.setSequenceMode=Ki.prototype.setSequenceMode,Ki.prototype.parseInit=Ki.prototype.parseInit,gn["text/x-subviewer"]=function(){return new Ki};function wi(){this.g=new Hr}wi.prototype.parseInit=function(){},wi.prototype.setSequenceMode=function(){},wi.prototype.setManifestType=function(){},wi.prototype.parseMedia=function(e,t,n){return e=Qt(e),e=Ax(e),e=Ze(ui(e)),this.g.parseMedia(e,t,n,[])};function Ax(e){var t=`WEBVTT
|
||
|
||
`;if(e=="")return t;e=e.replace(/\r+/g,""),e=e.trim(),e=I(e.split(`
|
||
|
||
`));for(var n=e.next();!n.done;n=e.next())n=n.value.split(/\n/),n[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join(`
|
||
`).replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+`
|
||
|
||
`;return t}Me("shaka.text.SrtTextParser",wi),wi.srt2webvtt=Ax,wi.prototype.parseMedia=wi.prototype.parseMedia,wi.prototype.setManifestType=wi.prototype.setManifestType,wi.prototype.setSequenceMode=wi.prototype.setSequenceMode,wi.prototype.parseInit=wi.prototype.parseInit,gn["text/srt"]=function(){return new wi};function Hi(){}Hi.prototype.parseInit=function(){},Hi.prototype.setSequenceMode=function(){},Hi.prototype.setManifestType=function(){},Hi.prototype.parseMedia=function(e){var t="",n="",r=null,i=null;for(i=Qt(e).split(/\r?\n\s*\r?\n/),e=I(i),i=e.next();!i.done;i=e.next()){var o=i.value;i=o,(o=MP.exec(o))&&(r=o[1],i=o[2]),r=="V4 Styles"||r=="V4+ Styles"?(t=i,t=n?t+(`
|
||
`+i):i):r=="Events"&&(n=n?n+(`
|
||
`+i):i)}for(r=[],i=null,t=I(t.split(/\r?\n/)),e=t.next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(o=Ox.exec(e))){if(e=o[1].trim(),o=o[2].trim(),e=="Format")i=o.split(_g);else if(e=="Style"){e=o.split(_g),o={};for(var a=0;a<i.length&&a<e.length;a++)o[i[a]]=e[a];r.push(o)}}for(i=[],t=null,n=I(n.split(/\r?\n/)),o=n.next(),e={};!o.done;e={wh:void 0},o=n.next())if(o=o.value,!/^\s*;/.test(o)&&(a=Ox.exec(o))){if(o=a[1].trim(),a=a[2].trim(),o=="Format")t=a.split(_g);else if(o=="Dialogue"){a=a.split(_g),o={};for(var f=0;f<t.length&&f<a.length;f++)o[t[f]]=a[f];f=Dx(o.Start);var p=Dx(o.End);a=new zt(f,p,a.slice(t.length-1).join(",").replace(/\\N/g,`
|
||
`).replace(/\{[^}]+\}/g,"")),e.wh=o.Style,(e=r.find(function(g){return function(m){return m.Name==g.wh}}(e)))&&bP(a,e),i.push(a)}}return i};function bP(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=Px(n))&&(e.color=n),(n=t.BackColour)&&(n=Px(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=$l),t.Italic&&(e.fontStyle=Jl),t.Underline&&e.textDecoration.push(Ho),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=ua,e.textAlign="start";break;case 2:e.displayAlign=ua,e.textAlign=Io;break;case 3:e.displayAlign=ua,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Io;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=Io;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function Px(e){return e=parseInt(e.replace("&H",""),16),0<=e?"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function Dx(e){return e=LP.exec(e),3600*(e[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Me("shaka.text.SsaTextParser",Hi),Hi.prototype.parseMedia=Hi.prototype.parseMedia,Hi.prototype.setManifestType=Hi.prototype.setManifestType,Hi.prototype.setSequenceMode=Hi.prototype.setSequenceMode,Hi.prototype.parseInit=Hi.prototype.parseInit;var MP=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Ox=/^\s*([^:]+):\s*(.*)/,_g=/\s*,\s*/,LP=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;gn["text/x-ssa"]=function(){return new Hi};function Rx(e,t){var n=e[t+1]&1?7:9;return t+n<=e.length&&(e=((e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5)-n,0<e)?{rd:n,ea:e}:null}function bx(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=(e[t+2]&60)>>>2;if(r>n.length-1)return null;var i=((e[t+2]&192)>>>6)+1,o=(e[t+2]&1)<<2;return o|=(e[t+3]&192)>>>6,{sampleRate:n[r],channelCount:o,codec:"mp4a.40."+i}}function Mx(e,t){if(t+1<e.length&&e[t]===255&&(e[t+1]&246)===240){var n=e[t+1]&1?7:9;if(t+n>=e.length)return!1;var r=(e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5;return r<=n?!1:(t+=r,t===e.length||t+1<e.length&&e[t]===255&&(e[t+1]&246)===240)}return!1}function NP(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2||t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}function qi(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=qi.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?Un(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(Er(t)||"mp4a.40.2")+'"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,r){for(var i=Ze(e),o=Bu(i),a=o.length;a<i.length&&!Mx(i,a);a++);if(e=1e3*n.endTime,o=cu(o),o.length&&n&&(o=o.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(e=o.data),o=bx(i,a),!o)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=o.sampleRate,t.channelsCount=o.channelCount;for(var f=[];a<i.length;){var p=Rx(i,a);if(!p)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));var g=p.rd+p.ea;a+g<=i.length&&f.push({data:i.subarray(a+p.rd,a+g),size:p.ea,duration:1024,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),a+=g}return i=o.sampleRate,e=Math.floor(e*i/1e3),r={id:t.id,type:"audio",codecs:o.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:i,duration:r,kb:[],ra:new Uint8Array([]),ya:new Uint8Array([]),Ea:0,Ga:0,data:{Bb:this.h,baseMediaDecodeTime:e,ib:f},stream:t},r=new Bf([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Vf(r),this.g.set(n,t)),n=this.i!==t,r=nh(r),this.i=t,this.h++,n?(t=rn(t,r),Promise.resolve(t)):Promise.resolve(r)},Me("shaka.transmuxer.AacTransmuxer",qi),qi.prototype.transmux=qi.prototype.transmux,qi.prototype.getOriginalMimeType=qi.prototype.getOriginalMimeType,qi.prototype.convertCodecs=qi.prototype.convertCodecs,qi.prototype.isSupported=qi.prototype.isSupported,qi.prototype.destroy=qi.prototype.destroy,ai("audio/aac",function(){return new qi("audio/aac")},qo);function Lx(e,t){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return null;var n=e[t+4]>>6;if(3<=n)return null;var r=e[t+4]&63,i=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*r+n];if(t+i>e.length)return null;var o=e[t+6]>>5,a=0;o===2?a+=2:(o&1&&o!==1&&(a+=2),o&4&&(a+=2)),a=(e[t+6]<<8|e[t+7])>>12-a&1;var f=e[t+5]&7;return e=new Uint8Array([n<<6|e[t+5]>>3<<1|f>>2,(f&3)<<6|o<<3|a<<2|r>>4,r<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][o]+a,ra:e,ea:i}}function _P(e,t){if(e[t]===11&&e[t+1]===119){var n=0,r=5;t+=r;for(var i,o;0<r;){o=e[t];var a=Math.min(r,8),f=8-a;i=4278190080>>>24+f<<f,i=(o&i)>>f,n=n?n<<a|i:i,t+=1,r-=a}if(16>n)return!0}return!1}function co(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=co.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?Un(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?'audio/mp4; codecs="ac-3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,r){e=Ze(e);for(var i=Bu(e),o=i.length;o<e.length&&!_P(e,o);o++);var a=1e3*n.endTime;i=cu(i),i.length&&n&&(i=i.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(a=i.data),i=0;for(var f=new Uint8Array([]),p=[];o<e.length;){var g=Lx(e,o);if(!g)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=g.sampleRate,t.channelsCount=g.channelCount,i=g.sampleRate,f=g.ra,p.push({data:e.subarray(o,o+g.ea),size:g.ea,duration:1536,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),o+=g.ea}return e=Math.floor(a*i/1e3),r={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:i,duration:r,kb:[],ra:f,ya:new Uint8Array([]),Ea:0,Ga:0,data:{Bb:this.h,baseMediaDecodeTime:e,ib:p},stream:t},r=new Bf([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Vf(r),this.g.set(n,t)),n=this.i!==t,r=nh(r),this.i=t,this.h++,n?(t=rn(t,r),Promise.resolve(t)):Promise.resolve(r)},Me("shaka.transmuxer.Ac3Transmuxer",co),co.prototype.transmux=co.prototype.transmux,co.prototype.getOriginalMimeType=co.prototype.getOriginalMimeType,co.prototype.convertCodecs=co.prototype.convertCodecs,co.prototype.isSupported=co.prototype.isSupported,co.prototype.destroy=co.prototype.destroy,ai("audio/ac3",function(){return new co("audio/ac3")},qo);function Nx(e,t){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return null;var n=new Ro(e.subarray(t+2));Pr(n,2),Pr(n,3);var r=dt(n,11)+1<<1,i=dt(n,2);if(i==3){i=dt(n,2),i=[24e3,22060,16e3][i];var o=3}else i=[48e3,44100,32e3][i],o=dt(n,2);var a=dt(n,3),f=dt(n,1);return n=dt(n,5),t+r>e.byteLength?null:(e=Math.floor(r*i/(16*[1,2,3,6][o])),e=new Uint8Array([(e&8160)>>5,(e&31)<<3,i<<6|n<<1|0,0|a<<1|f<<0,0]),{sampleRate:i,channelCount:[2,1,2,3,3,4,4,5][a]+f,ra:e,ea:r})}function fo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=fo.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?Un(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,r){e=Ze(e);for(var i=Bu(e),o=i.length;o<e.length&&(e[o]<<8|e[o+1]<<0)!==2935;o++);var a=1e3*n.endTime;i=cu(i),i.length&&n&&(i=i.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(a=i.data),i=0;for(var f=new Uint8Array([]),p=[];o<e.length;){var g=Nx(e,o);if(!g)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=g.sampleRate,t.channelsCount=g.channelCount,i=g.sampleRate,f=g.ra,p.push({data:e.subarray(o,o+g.ea),size:g.ea,duration:1536,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),o+=g.ea}return e=Math.floor(a*i/1e3),r={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:i,duration:r,kb:[],ra:f,ya:new Uint8Array([]),Ea:0,Ga:0,data:{Bb:this.h,baseMediaDecodeTime:e,ib:p},stream:t},r=new Bf([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Vf(r),this.g.set(n,t)),n=this.i!==t,r=nh(r),this.i=t,this.h++,n?(t=rn(t,r),Promise.resolve(t)):Promise.resolve(r)},Me("shaka.transmuxer.Ec3Transmuxer",fo),fo.prototype.transmux=fo.prototype.transmux,fo.prototype.getOriginalMimeType=fo.prototype.getOriginalMimeType,fo.prototype.convertCodecs=fo.prototype.convertCodecs,fo.prototype.isSupported=fo.prototype.isSupported,fo.prototype.destroy=fo.prototype.destroy,ai("audio/ec3",function(){return new fo("audio/ec3")},qo);function UP(e){if(!e.length)return null;var t=e.find(function(L){return L.type==7});if(e=e.find(function(L){return L.type==8}),!t||!e)return null;var n=new Ro(t.data),r=Ct(n);if(Ct(n),Ct(n),or(n),BP.includes(r)&&(r=Oe(n),r===3&&Pr(n,1),or(n),or(n),Pr(n,1),Be(n))){r=r!==3?8:12;for(var i=0;i<r;i++)Be(n)&&(6>i?Ss(n,16):Ss(n,64))}if(or(n),r=Oe(n),r===0)Oe(n);else if(r===1)for(Pr(n,1),or(n),or(n),r=Oe(n),i=0;i<r;i++)or(n);or(n),Pr(n,1);var o=Oe(n),a=Oe(n),f=dt(n,1);f===0&&Pr(n,1),Pr(n,1);var p=0,g=0,m=0,w=0;if(Be(n)&&(p=Oe(n),g=Oe(n),m=Oe(n),w=Oe(n)),i=r=1,Be(n)&&Be(n)){var E=Ct(n),C=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],P=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<E&&16>=E?(r=C[E-1],i=P[E-1]):E===255&&(r=dt(n,16),i=dt(n,16))}return n=(2-f)*(a+1)*16-2*m-2*w,o=16*(o+1)-2*p-2*g,p=[],t=t.fullData,p.push(t.byteLength>>>8&255),p.push(t.byteLength&255),p=p.concat.apply(p,ee(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(e.byteLength&255),t=t.concat.apply(t,ee(e)),e=new Uint8Array([1,p[3],p[4],p[5],255,225].concat(p,[1],t)),{height:n,width:o,ya:e,Ea:r,Ga:i}}function jP(e){function t(P){i={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:P.pts,dts:P.dts,nalus:[]}}function n(){if(i&&i.nalus.length&&i.frame){for(var P=[],L=I(i.nalus),M=L.next();!M.done;M=L.next()){M=M.value;var B=M.fullData.byteLength,U=new Uint8Array(4);U[0]=B>>24&255,U[1]=B>>16&255,U[2]=B>>8&255,U[3]=B&255,P.push(U),P.push(M.fullData)}i.data=rn.apply(ar,ee(P)),r.push(i)}}for(var r=[],i=null,o=!1,a=0;a<e.length;a++){var f=e[a],p=f.nalus,g=!1;i&&p.length&&!o&&(n(),t(f)),p=I(f.nalus);for(var m=p.next();!m.done;m=p.next()){m=m.value;var w=!1;switch(m.type){case 1:var E=!1;w=!0;var C=m.data;g&&4<C.length&&(C=ip(new Ro(C)),C===2||C===4||C===7||C===9)&&(E=!0),E&&i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(f),i.frame=!0,i.isKeyframe=E;break;case 5:w=!0,i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(f),i.frame=!0,i.isKeyframe=!0;break;case 6:w=!0;break;case 7:g=w=!0;break;case 8:w=!0;break;case 9:o=w=!0,i&&i.frame&&(n(),i=null),i||t(f);break;case 12:w=!0;break;default:w=!1}i&&w&&i.nalus.push(m)}}return n(),r}var BP=[100,110,122,244,44,83,86,118,128,138,139,134];function VP(e){if(!e.length)return null;var t=e.find(function(a){return a.type==32}),n=e.find(function(a){return a.type==33}),r=e.find(function(a){return a.type==34});if(!t||!n||!r)return null;var i=FP(t.fullData);e=KP(n.fullData);var o=HP(r.fullData);return t=qP(t.fullData,n.fullData,r.fullData,{Kf:i.Kf,gg:i.gg,qf:e.qf,rf:e.rf,jf:e.jf,pf:e.pf,kf:e.kf,lf:e.lf,mf:e.mf,nf:e.nf,cf:e.cf,df:e.df,ef:e.ef,ff:e.ff,gf:e.gf,hf:e.hf,We:e.We,ge:e.ge,Ue:e.Ue,Te:e.Te,Se:e.Se,Nf:o.Nf}),{height:e.height,width:e.width,ya:t,Ea:e.ij,Ga:e.hj}}function FP(e){var t=new Ro(e,!0);return Ct(t),Ct(t),dt(t,4),dt(t,2),dt(t,6),e=dt(t,3),t=Be(t),{Kf:e+1,gg:t}}function KP(e){e=new Ro(e,!0),Ct(e),Ct(e);var t=0,n=0,r=0,i=0;dt(e,4);var o=dt(e,3);Be(e);for(var a=dt(e,2),f=dt(e,1),p=dt(e,5),g=Ct(e),m=Ct(e),w=Ct(e),E=Ct(e),C=Ct(e),P=Ct(e),L=Ct(e),M=Ct(e),B=Ct(e),U=Ct(e),K=Ct(e),W=[],X=[],q=0;q<o;q++)W.push(Be(e)),X.push(Be(e));if(0<o)for(q=o;8>q;q++)dt(e,2);for(q=0;q<o;q++)W[q]&&dt(e,88),X[q]&&Ct(e);Oe(e),W=Oe(e),W==3&&dt(e,1),X=Oe(e),q=Oe(e),Be(e)&&(t+=Oe(e),n+=Oe(e),r+=Oe(e),i+=Oe(e));var F=Oe(e),Q=Oe(e),H=Oe(e);if(Be(e))for(var Z=0;Z<=o;Z++)Oe(e),Oe(e),Oe(e);else Oe(e),Oe(e),Oe(e);if(Oe(e),Oe(e),Oe(e),Oe(e),Oe(e),Oe(e),Be(e)&&Be(e))for(Z=0;4>Z;Z++)for(var $=0;$<(Z===3?2:6);$++)if(Be(e)){var ue=Math.min(64,1<<4+(Z<<1));1<Z&&Vu(e);for(var de=0;de<ue;de++)Vu(e)}else Oe(e);for(Be(e),Be(e),Be(e)&&(Ct(e),Oe(e),Oe(e),Be(e)),Z=Oe(e),ue=$=0;ue<Z;ue++)if(de=!1,ue!==0&&(de=Be(e)),de){ue===Z&&Oe(e),Be(e),Oe(e);for(var ie=de=0;ie<=$;ie++){var ce=Be(e),Se=!1;ce||(Se=Be(e)),(ce||Se)&&de++}$=de}else{for(ie=Oe(e),de=Oe(e),$=ie+de,ce=0;ce<ie;ce++)Oe(e),Be(e);for(ie=0;ie<de;ie++)Oe(e),Be(e)}if(Be(e))for(Z=Oe(e),$=0;$<Z;$++){for(ue=0;ue<H+4;ue++)dt(e,1);dt(e,1)}if(Z=H=1,$=0,Be(e),Be(e),Be(e)){if(Be(e)&&(ue=Ct(e),de=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],ie=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<ue&&16>=ue?(H=de[ue-1],Z=ie[ue-1]):ue===255&&(H=dt(e,16),Z=dt(e,16))),Be(e)&&Be(e),Be(e)&&(dt(e,3),Be(e),Be(e)&&(Ct(e),Ct(e),Ct(e))),Be(e)&&(Oe(e),Oe(e)),Be(e),Be(e),Be(e),(ue=Be(e))&&(Oe(e),Oe(e),Oe(e),Oe(e)),Be(e)&&(dt(e,32),dt(e,32),Be(e)&&Oe(e),Be(e)))for(ie=!1,ue=Be(e),de=Be(e),(ue||de)&&((ie=Be(e))&&(Ct(e),dt(e,5),Be(e),dt(e,5)),dt(e,4),dt(e,4),ie&&dt(e,4),dt(e,5),dt(e,5),dt(e,5)),ce=0;ce<=o;ce++){var ve=!0;Se=1,Be(e)||(ve=Be(e));var Ce=!1;if(ve?Oe(e):Ce=Be(e),Ce||(Se=Oe(e)+1),ue){for(ve=0;ve<Se;ve++)Oe(e),Oe(e),ie&&(Oe(e),Oe(e));Be(e)}if(de){for(ve=0;ve<Se;ve++)Oe(e),Oe(e),ie&&(Oe(e),Oe(e));Be(e)}}Be(e)&&(Be(e),Be(e),Be(e),$=Oe(e),Oe(e),Oe(e),Oe(e),Oe(e))}return{jf:K,qf:a,rf:f,pf:p,kf:g,lf:m,mf:w,nf:E,cf:C,df:P,ef:L,ff:M,gf:B,hf:U,ge:$,We:0,Ue:W,Te:F,Se:Q,width:X-(t+n)*(W===1||W===2?2:1),height:q-(r+i)*(W===1?2:1),ij:H,hj:Z}}function HP(e){var t=new Ro(e,!0);Ct(t),Ct(t),Oe(t),Oe(t),Be(t),Be(t),dt(t,3),Be(t),Be(t),Oe(t),Oe(t),Vu(t),Be(t),Be(t),Be(t)&&Oe(t),Vu(t),Vu(t),Be(t),Be(t),Be(t),Be(t),e=Be(t),t=Be(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Nf:n}}function qP(e,t,n,r){var i=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return i[0]=1,i[1]=(r.qf&3)<<6|(r.rf?1:0)<<5|r.pf&31,i[2]=r.kf,i[3]=r.lf,i[4]=r.mf,i[5]=r.nf,i[6]=r.cf,i[7]=r.df,i[8]=r.ef,i[9]=r.ff,i[10]=r.gf,i[11]=r.hf,i[12]=r.jf,i[13]=240|(r.ge&3840)>>8,i[14]=r.ge&255,i[15]=252|r.Nf&3,i[16]=252|r.Ue&3,i[17]=248|r.Te&7,i[18]=248|r.Se&7,i[19]=0,i[20]=0,i[21]=(r.We&3)<<6|(r.Kf&7)<<3|(r.gg?1:0)<<2|3,i[22]=3,i[23]=160,i[24]=0,i[25]=1,i[26]=(e.byteLength&65280)>>8,i[27]=(e.byteLength&255)>>0,i.set(e,28),i[23+(5+e.byteLength)]=161,i[e.byteLength+29]=0,i[e.byteLength+30]=1,i[e.byteLength+31]=(t.byteLength&65280)>>8,i[e.byteLength+32]=(t.byteLength&255)>>0,i.set(t,e.byteLength+33),i[23+(e.byteLength+10+t.byteLength)]=162,i[e.byteLength+10+t.byteLength+24]=0,i[e.byteLength+10+t.byteLength+25]=1,i[e.byteLength+10+t.byteLength+26]=(n.byteLength&65280)>>8,i[e.byteLength+10+t.byteLength+27]=(n.byteLength&255)>>0,i.set(n,e.byteLength+10+t.byteLength+28),i}function Ug(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,o=e[t+2]>>2&3;if(n!==1&&i!==0&&i!==15&&o!==3){var a=e[t+3]>>6;i=1e3*zP[14*(n===3?3-r:r===3?3:4)+i-1],o=GP[3*(n===3?0:n===2?1:2)+o],n=WP[n][r];var f=XP[r],p=Math.floor(n*i/o+(e[t+2]>>1&1))*f,g=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(g=g?parseInt(g[1],10):0)&&87>=g&&r===2&&224e3<=i&&a===0&&(e[t+3]|=128),{sampleRate:o,channelCount:a===3?1:2,ea:p,gj:8*n*f}}return null}function _x(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function Ux(e,t){if(t+1<e.length&&_x(e,t)){var n=Ug(e,t),r=4;return n&&n.ea&&(r=n.ea),t+=r,t===e.length||t+1<e.length&&_x(e,t)}return!1}var zP=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],GP=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],WP=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],XP=[0,1,1,4];function po(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=po.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?Un(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,r){for(var i=Ze(e),o=Bu(i).length;o<i.length&&!Ux(i,o);o++);var a;for(e=[];o<i.length;){var f=Ug(i,o);if(!f)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));a||(a=f),o+f.ea<=i.length&&e.push({data:i.subarray(o,o+f.ea),size:f.ea,duration:1152,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),o+=f.ea}return a?(i=9e4*a.gj/a.sampleRate*this.h,r={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:a.sampleRate,duration:r,kb:[],ra:new Uint8Array([]),ya:new Uint8Array([]),Ea:0,Ga:0,data:{Bb:this.h,baseMediaDecodeTime:i,ib:e},stream:t},r=new Bf([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Vf(r),this.g.set(n,t)),n=this.i!==t,r=nh(r),this.i=t,this.h++,n?(t=rn(t,r),Promise.resolve(t)):Promise.resolve(r)):Promise.reject(new Y(2,3,3018,n?n.N()[0]:null))},Me("shaka.transmuxer.Mp3Transmuxer",po),po.prototype.transmux=po.prototype.transmux,po.prototype.getOriginalMimeType=po.prototype.getOriginalMimeType,po.prototype.convertCodecs=po.prototype.convertCodecs,po.prototype.isSupported=po.prototype.isSupported,po.prototype.destroy=po.prototype.destroy,ai("audio/mpeg",function(){return new po("audio/mpeg")},qo);function ho(e){this.h=e,this.g=null}h=ho.prototype,h.destroy=function(){},h.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=Er(e).split(","),n=cr("audio",t);return t=cr("video",t),!n||t||bn(n)!="mp3"?!1:Un(this.convertCodecs("audio",e))},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},h.getOriginalMimeType=function(){return this.h},h.transmux=function(e,t,n,r,i){if(this.g?this.g.clearData():this.g=new Xt,e=Ze(e),e=this.g.parse(e),e.kd().audio!="mp3"||i!="audio")return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));for(n=new Uint8Array([]),i=I(e.fb()),e=i.next();!e.done;e=i.next())if(e=e.value.data)for(t=0;t<e.length;)(r=Ug(e,t))?(t+r.ea<=e.length&&(n=rn(n,e.subarray(t,t+r.ea))),t+=r.ea):t++;return Promise.resolve(n)},Me("shaka.transmuxer.MpegTsTransmuxer",ho),ho.prototype.transmux=ho.prototype.transmux,ho.prototype.getOriginalMimeType=ho.prototype.getOriginalMimeType,ho.prototype.convertCodecs=ho.prototype.convertCodecs,ho.prototype.isSupported=ho.prototype.isSupported,ho.prototype.destroy=ho.prototype.destroy,ai("video/mp2t",function(){return new ho("video/mp2t")},Ic);/*
|
||
@license
|
||
MSS Transmuxer
|
||
Copyright 2015 Dash Industry Forum
|
||
SPDX-License-Identifier: BSD-3-Clause
|
||
*/function zi(e){this.h=e,(this.g=xm.get("ISOBoxer")())&&YP(this)}function YP(e){function t(){this._procFullBox(),this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(n){this._procEntryField(n,"InitializationVector","data",8),this.flags&2&&(this._procEntryField(n,"NumberOfEntries","uint",16),this._procSubEntries(n,"clearAndCryptedData",n.NumberOfEntries,function(r){this._procEntryField(r,"BytesOfClearData","uint",16),this._procEntryField(r,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var n=!0,r=0;16>r;r++)this.usertype[r]!==$P[r]&&(n=!1);n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}h=zi.prototype,h.destroy=function(){},h.isSupported=function(e,t){var n=e.startsWith("mss/");return!this.g||!n?!1:t?Un(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Un(t)||Un(e))},h.convertCodecs=function(e,t){return t.replace("mss/","")},h.getOriginalMimeType=function(){return this.h},h.transmux=function(e,t,n){if(!n)return Promise.resolve(Ze(e));if(!t.mssPrivateData)return Promise.reject(new Y(2,3,3020,n?n.N()[0]:null));try{var r,i=this.g.parseBuffer(e),o=i.fetch("tfhd");o.track_ID=t.id+1;var a=i.fetch("tfdt"),f=i.fetch("traf");a===null&&(a=this.g.createFullBox("tfdt",f,o),a.version=1,a.flags=0,a.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var p=i.fetch("trun"),g=i.fetch("tfxd");g&&g._parent.boxes.splice(g._parent.boxes.indexOf(g),1);var m=i.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var w=i.fetch("sepiff");if(w!==null){w.type="senc",w.usertype=void 0;var E=i.fetch("saio");if(E===null){E=this.g.createFullBox("saio",f),E.version=0,E.flags=0,E.entry_count=1,E.offset=[0];var C=this.g.createFullBox("saiz",f);if(C.version=0,C.flags=0,C.sample_count=w.sample_count,C.default_sample_info_size=0,C.sample_info_size=[],w.flags&2)for(r=0;r<w.sample_count;r+=1)C.sample_info_size[r]=10+6*w.entry[r].NumberOfEntries;else C.default_sample_info_size=8}}o.flags&=16777214,o.flags|=131072,p.flags|=1;var P=i.fetch("moof");p.data_offset=P.getLength()+8;var L=i.fetch("saio");L!==null&&(L.offset[0]=jx(P,"traf")+jx(f,"senc")+16);var M=Ze(i.write());return Promise.resolve(M)}catch(B){return B instanceof Y?Promise.reject(B):Promise.reject(new Y(2,3,3022,n?n.N()[0]:null))}};function jx(e,t){for(var n=8,r=0;r<e.boxes.length&&e.boxes[r].type!==t;r++)n+=e.boxes[r].size;return n}Me("shaka.transmuxer.MssTransmuxer",zi),zi.prototype.transmux=zi.prototype.transmux,zi.prototype.getOriginalMimeType=zi.prototype.getOriginalMimeType,zi.prototype.convertCodecs=zi.prototype.convertCodecs,zi.prototype.isSupported=zi.prototype.isSupported,zi.prototype.destroy=zi.prototype.destroy;var $P=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);ai("mss/audio/mp4",function(){return new zi("mss/audio/mp4")},qo),ai("mss/video/mp4",function(){return new zi("mss/video/mp4")},qo);function yo(e){this.m=e,this.g=0,this.i=new Map,this.l=this.h=this.j=null}h=yo.prototype,h.destroy=function(){this.i.clear(),this.h&&this.h.destroy()},h.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var r=Er(n).split(",");return n=cr("audio",r),r=cr("video",r),n&&(n=bn(n),!JP.includes(n))||r&&(n=bn(r),!QP.includes(n))?!1:t?Un(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Un(t)||Un(e))},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=Er(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return di(n,"audio/mp4")}).map(dl).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},h.getOriginalMimeType=function(){return this.m},h.transmux=function(e,t,n,r,i){var o=Ze(e);if(i=="audio"&&!ws(o)){for(var a=Bu(o),f=a.length;f<o.length;f++)if(Ux(o,f))return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));for(f=a.length;f<o.length;f++)if(Mx(o,f))return this.h||(this.h=new qi("audio/aac")),this.h.transmux(e,t,n,r,i);return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null))}this.j?this.j.clearData():this.j=new Xt;var p=this.j.parse(o),g=[],m=p.kd();try{var w=null;if(i=="video"){switch(m.video){case"avc":var E=[],C=null,P=p.tc(),L=jP(P);if(!L.length)throw new Y(2,3,3023,n?n.N()[0]:null);for(var M=0;M<L.length;M++){var B=L[M];C==null&&(C=B.dts);var U=void 0;U=M+1<L.length?(L[M+1].dts||0)-(B.dts||0):1<L.length?(B.dts||0)-(L[M-1].dts||0):9e4*(n.endTime-n.startTime),E.push({data:B.data,size:B.data.byteLength,duration:U,eb:Math.round((B.pts||0)-(B.dts||0)),flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:B.isKeyframe?2:1,hb:B.isKeyframe?0:1}})}for(var K=[],W=I(P),X=W.next();!X.done;X=W.next())K.push.apply(K,ee(X.value.nalus));var q=UP(K);if(!q||C==null)throw new Y(2,3,3018,n?n.N()[0]:null);t.height=q.height,t.width=q.width,w={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:r,kb:[],ra:new Uint8Array([]),ya:q.ya,Ea:q.Ea,Ga:q.Ga,data:{Bb:this.g,baseMediaDecodeTime:C,ib:E},stream:t};break;case"hvc":var F=[],Q=null,H=[],Z=p.tc();if(!Z.length)throw new Y(2,3,3023,n?n.N()[0]:null);for(var $=0;$<Z.length;$++){var ue=Z[$],de=ue.nalus;H.push.apply(H,ee(de));for(var ie=!1,ce=[],Se=!1,ve=I(de),Ce=ve.next();!Ce.done;Ce=ve.next()){var _e=Ce.value;switch(_e.type){case 1:case 0:var Ve=Se=!0;break;case 19:case 20:case 21:ie=Ve=Se=!0;break;case 32:Ve=!0;break;case 33:Ve=!0;break;case 34:Ve=!0;break;case 35:Se=Ve=!0;break;case 39:case 40:Ve=!0;break;default:Ve=!1}if(Se&&Ve){var yt=_e.fullData.byteLength,pt=new Uint8Array(4);pt[0]=yt>>24&255,pt[1]=yt>>16&255,pt[2]=yt>>8&255,pt[3]=yt&255,ce.push(pt),ce.push(_e.fullData)}}var ze=ce.length?{data:rn.apply(ar,ee(ce)),isKeyframe:ie}:null;if(ze){Q==null&&ue.dts!=null&&(Q=ue.dts);var Kt=void 0;Kt=$+1<Z.length?(Z[$+1].dts||0)-(ue.dts||0):1<Z.length?(ue.dts||0)-(Z[$-1].dts||0):9e4*(n.endTime-n.startTime),F.push({data:ze.data,size:ze.data.byteLength,duration:Kt,eb:Math.round((ue.pts||0)-(ue.dts||0)),flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:ze.isKeyframe?2:1,hb:ze.isKeyframe?0:1}})}}var Pt=VP(H);if(!Pt||Q==null)throw new Y(2,3,3018,n?n.N()[0]:null);t.height=Pt.height,t.width=Pt.width,w={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:r,kb:[],ra:new Uint8Array([]),ya:Pt.ya,Ea:Pt.Ea,Ga:Pt.Ga,data:{Bb:this.g,baseMediaDecodeTime:Q,ib:F},stream:t}}w&&(g.push(w),w=null)}if(i=="audio"){switch(m.audio){case"aac":for(var ot=[],Yt,qt=null,lt=null,Tn=null,ii=I(p.fb()),An=ii.next();!An.done;An=ii.next()){var Cn=An.value,Rn=Cn.data;if(Rn){var Wn=0;if(lt==-1&&Tn)Rn=rn(Tn,Cn.data),lt=null;else if(lt!=null&&Tn){Wn=Math.max(0,lt);var ic=rn(Tn,Rn.subarray(0,Wn));ot.push({data:ic,size:ic.byteLength,duration:1024,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),lt=Tn=null}if(Yt=bx(Rn,Wn),!Yt)throw new Y(2,3,3018,n?n.N()[0]:null);for(t.audioSamplingRate=Yt.sampleRate,t.channelsCount=Yt.channelCount,qt==null&&Cn.pts!==null&&(qt=Cn.pts);Wn<Rn.length;){var jl=Rx(Rn,Wn);if(!jl){Tn=Rn.subarray(Wn,Rn.length),lt=-1;break}var Ls=jl.rd+jl.ea;lt=Math.max(0,Wn+Ls-Rn.length),lt!=0?Tn=Rn.subarray(Wn+jl.rd,Wn+Ls):Wn+Ls<=Rn.length&&ot.push({data:Rn.subarray(Wn+jl.rd,Wn+Ls),size:jl.ea,duration:1024,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),Wn+=Ls}}}if(!Yt||qt==null){if(!p.tc().length)throw new Y(2,3,3018,n?n.N()[0]:null);qt=9e4*n.startTime;var go=cr("audio",t.codecs.split(","));if(!go||!t.channelsCount||!t.audioSamplingRate)throw new Y(2,3,3018,n?n.N()[0]:null);Yt={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:go};var T0=NP(go,t.channelsCount);if(!T0)throw new Y(2,3,3018,n?n.N()[0]:null);for(var iD=qt+9e4*(n.endTime-n.startTime),Qx=qt;Qx<iD;)ot.push({data:T0,size:T0.byteLength,duration:1024,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),Qx+=1024/Yt.sampleRate*9e4}var Zx=Yt.sampleRate,oD=qt/9e4*Zx;w={id:t.id,type:"audio",codecs:Yt.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Zx,duration:r,kb:[],ra:new Uint8Array([]),ya:new Uint8Array([]),Ea:0,Ga:0,data:{Bb:this.g,baseMediaDecodeTime:oD,ib:ot},stream:t};break;case"ac3":for(var e2=[],Bg=0,x0=new Uint8Array([]),Vg=null,t2=I(p.fb()),I0=t2.next();!I0.done;I0=t2.next()){var E0=I0.value,C0=E0.data;Vg==null&&E0.pts!==null&&(Vg=E0.pts);for(var qf=0;qf<C0.length;){var Ns=Lx(C0,qf);Ns?(t.audioSamplingRate=Ns.sampleRate,t.channelsCount=Ns.channelCount,Bg=Ns.sampleRate,x0=Ns.ra,e2.push({data:C0.subarray(qf,qf+Ns.ea),size:Ns.ea,duration:1536,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),qf+=Ns.ea):qf++}}if(Bg==0||x0.byteLength==0||Vg==null)throw new Y(2,3,3018,n?n.N()[0]:null);var uD=Vg/9e4*Bg;w={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Bg,duration:r,kb:[],ra:x0,ya:new Uint8Array([]),Ea:0,Ga:0,data:{Bb:this.g,baseMediaDecodeTime:uD,ib:e2},stream:t};break;case"ec3":for(var n2=[],Fg=0,k0=new Uint8Array([]),Kg=null,r2=I(p.fb()),A0=r2.next();!A0.done;A0=r2.next()){var P0=A0.value,D0=P0.data;Kg==null&&P0.pts!==null&&(Kg=P0.pts);for(var zf=0;zf<D0.length;){var _s=Nx(D0,zf);_s?(t.audioSamplingRate=_s.sampleRate,t.channelsCount=_s.channelCount,Fg=_s.sampleRate,k0=_s.ra,n2.push({data:D0.subarray(zf,zf+_s.ea),size:_s.ea,duration:1536,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),zf+=_s.ea):zf++}}if(Fg==0||k0.byteLength==0||Kg==null)throw new Y(2,3,3018,n?n.N()[0]:null);var lD=Kg/9e4*Fg;w={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Fg,duration:r,kb:[],ra:k0,ya:new Uint8Array([]),Ea:0,Ga:0,data:{Bb:this.g,baseMediaDecodeTime:lD,ib:n2},stream:t};break;case"mp3":for(var i2=[],Hg,qg=null,o2=I(p.fb()),O0=o2.next();!O0.done;O0=o2.next()){var R0=O0.value,dh=R0.data;if(dh){qg==null&&R0.pts!==null&&(qg=R0.pts);for(var oc=0;oc<dh.length;){var Gf=Ug(dh,oc);Gf?(Hg||(Hg=Gf),oc+Gf.ea<=dh.length&&i2.push({data:dh.subarray(oc,oc+Gf.ea),size:Gf.ea,duration:1152,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),oc+=Gf.ea):oc++}}}if(!Hg||qg==null)throw new Y(2,3,3018,n?n.N()[0]:null);var u2=Hg.sampleRate,sD=qg/9e4*u2;w={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:u2,duration:r,kb:[],ra:new Uint8Array([]),ya:new Uint8Array([]),Ea:0,Ga:0,data:{Bb:this.g,baseMediaDecodeTime:sD,ib:i2},stream:t};break;case"opus":var l2=[],zg=null,Xu=p.F;if(!Xu)throw new Y(2,3,3018,n?n.N()[0]:null);var qr=[];switch(Xu.Rh){case 1:case 2:qr=[0];break;case 0:qr=[255,1,1,0,1];break;case 128:qr=[255,2,0,0,1];break;case 3:qr=[1,2,1,0,2,1];break;case 4:qr=[1,2,2,0,1,2,3];break;case 5:qr=[1,3,2,0,4,1,2,3];break;case 6:qr=[1,4,2,0,4,1,2,3,5];break;case 7:qr=[1,4,2,0,4,1,2,3,5,6];break;case 8:qr=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:qr=[1,1,2,0,1];break;case 131:qr=[1,1,3,0,1,2];break;case 132:qr=[1,1,4,0,1,2,3];break;case 133:qr=[1,1,5,0,1,2,3,4];break;case 134:qr=[1,1,6,0,1,2,3,4,5];break;case 135:qr=[1,1,7,0,1,2,3,4,5,6];break;case 136:qr=[1,1,8,0,1,2,3,4,5,6,7]}for(var s2=new Uint8Array([0,Xu.channelCount,0,0,Xu.sampleRate>>>24&255,Xu.sampleRate>>>17&255,Xu.sampleRate>>>8&255,Xu.sampleRate>>>0&255,0,0].concat(ee(qr))),a2=Xu.sampleRate,c2=I(p.fb()),b0=c2.next();!b0.done;b0=c2.next()){var M0=b0.value,Wf=M0.data;zg==null&&M0.pts!==null&&(zg=M0.pts);for(var ph=0;ph<Wf.length;){for(var aD=(Wf[ph+1]&16)!==0,cD=(Wf[ph+1]&8)!==0,Bl=ph+2,Gg=0;Wf[Bl]===255;)Gg+=255,Bl+=1;Gg+=Wf[Bl],Bl+=1,Bl+=aD?2:0,Bl+=cD?2:0;var f2=Wf.slice(Bl,Bl+Gg);l2.push({data:f2,size:f2.byteLength,duration:960,eb:0,flags:{gb:0,Wa:0,Va:0,Ta:0,Ua:2,hb:0}}),ph=Bl+Gg}}if(s2.byteLength==0||zg==null)throw new Y(2,3,3018,n?n.N()[0]:null);t.audioSamplingRate=Xu.sampleRate,t.channelsCount=Xu.channelCount;var fD=zg/9e4*a2;w={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:a2,duration:r,kb:[],ra:s2,ya:new Uint8Array([]),Ea:0,Ga:0,data:{Bb:this.g,baseMediaDecodeTime:fD,ib:l2},stream:t}}w&&(g.push(w),w=null)}}catch(N0){return N0&&N0.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(N0)}if(!g.length)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));var d2=new Bf(g),L0=t.id+"_"+n.i;if(this.i.has(L0))var hh=this.i.get(L0);else hh=Vf(d2),this.i.set(L0,hh);var dD=this.l!==hh,p2=nh(d2);if(this.l=hh,this.g++,dD){var pD=rn(hh,p2);return Promise.resolve(pD)}return Promise.resolve(p2)},Me("shaka.transmuxer.TsTransmuxer",yo),yo.prototype.transmux=yo.prototype.transmux,yo.prototype.getOriginalMimeType=yo.prototype.getOriginalMimeType,yo.prototype.convertCodecs=yo.prototype.convertCodecs,yo.prototype.isSupported=yo.prototype.isSupported,yo.prototype.destroy=yo.prototype.destroy;var JP=["aac","ac-3","ec-3","mp3","opus"],QP=["avc","hevc"];ai("video/mp2t",function(){return new yo("video/mp2t")},Ec);/*
|
||
@license
|
||
EME Encryption Scheme Polyfill
|
||
Copyright 2019 Google LLC
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/function Bx(){}var ch;function Vx(){ch||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(ch=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=ZP,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function ZP(e,t){var n=this,r;return G(function(i){return i.g==1?(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),_(i,ch.call(n,e,t),2)):(r=i.h,Xx(r)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=ch,i.return(r)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=Fx,i.return(Fx.call(n,e,t))))})}function Fx(e,t){var n=this,r,i,o,a,f,p,g,m,w,E,C,P;return G(function(L){if(L.g==1){for(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),r=Wx(e),i=[],o=I(t),a=o.next();!a.done;a=o.next())f=a.value,p=Kx(f.videoCapabilities,r),g=Kx(f.audioCapabilities,r),f.videoCapabilities&&f.videoCapabilities.length&&!p.length||f.audioCapabilities&&f.audioCapabilities.length&&!g.length||(m=Object.assign({},f),m.videoCapabilities=p,m.audioCapabilities=g,i.push(m));if(!i.length)throw w=Error("Unsupported keySystem or supportedConfigurations."),w.name="NotSupportedError",w.code=DOMException.NOT_SUPPORTED_ERR,w;return _(L,ch.call(n,e,i),2)}return E=L.h,P=C=null,i[0]&&(i[0].videoCapabilities&&(C=i[0].videoCapabilities[0].encryptionScheme),i[0].audioCapabilities&&(P=i[0].audioCapabilities[0].encryptionScheme)),L.return(new jg(E,C,P))})}function Kx(e,t){return e&&e.filter(function(n){return m0(n.encryptionScheme,t)})}Me("EmeEncryptionSchemePolyfill",Bx),Bx.install=Vx;function Hx(){}var fh;function qx(){fh||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(fh=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=eD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function eD(e){var t=this,n,r;return G(function(i){switch(i.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),_(i,fh.call(t,e),2);case 2:if(n=i.h,!e.keySystemConfiguration)return i.return(n);if((r=n.keySystemAccess)&&Xx(r))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=fh,i.return(n);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=zx,r){i.u(3);break}return _(i,Gx(e),4);case 4:return n.keySystemAccess=i.h,i.return(n);case 3:return i.return(zx.call(t,e))}})}function zx(e){var t=this,n,r,i,o,a,f,p;return G(function(g){switch(g.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),r=n=null,!e.keySystemConfiguration||(i=e.keySystemConfiguration,o=i.keySystem,r=i.audio&&i.audio.encryptionScheme,n=i.video&&i.video.encryptionScheme,a=Wx(o),f={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},m0(r,a)&&m0(n,a))?_(g,fh.call(t,e),2):g.return(f);case 2:if(p=g.h,p.keySystemAccess){p.keySystemAccess=new jg(p.keySystemAccess,n,r),g.u(3);break}if(!e.keySystemConfiguration){g.u(3);break}return _(g,Gx(e),5);case 5:p.keySystemAccess=g.h;case 3:return g.return(p)}})}function Gx(e){var t,n;return G(function(r){if(r.g==1){var i=e.keySystemConfiguration,o=[],a=[];return i.audio&&o.push({robustness:i.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:i.audio.encryptionScheme}),i.video&&a.push({robustness:i.video.robustness||"",contentType:e.video.contentType,encryptionScheme:i.video.encryptionScheme}),i={initDataTypes:i.initDataType?[i.initDataType]:[],distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes},o.length&&(i.audioCapabilities=o),a.length&&(i.videoCapabilities=a),t=i,_(r,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=r.h,r.return(n)})}Me("McEncryptionSchemePolyfill",Hx),Hx.install=qx;function jg(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}jg.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=I(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=I(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},jg.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function Wx(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs":e.startsWith("com.huawei")?"cenc":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function Xx(e){e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function m0(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&(nD||rD||tD))}function S0(){}function Yx(){Vx(),qx()}Me("EncryptionSchemePolyfills",S0),S0.install=Yx;var tD=navigator.userAgent.includes("CrKey"),nD=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10),w0,$x=navigator.userAgent||"";if($x.includes("Web0S")){var Jx=$x.match(/Chrome\/(\d+)/);w0=Jx?79<=parseInt(Jx[1],10):!1}else w0=!1;var rD=w0;typeof O<"u"&&O.exports&&(O.exports=S0)}).call(N,D,D,void 0);for(var x in N.shaka)b[x]=N.shaka[x]})()}(J0)),J0}var Z3=Q3();const eR=Zf(Z3);function tR(){const[b,D]=we.useState(""),[N,x]=we.useState(""),[T,j]=we.useState(""),O=we.useRef(null),h=()=>{if(b&&N&&T){const l=N.split(`
|
||
`).map(z=>z.trim()),u=T.split(`
|
||
`).map(z=>z.trim());if(l.length!==u.length){console.error("The number of KIDs and Keys must be the same.");return}const d=new eR.Player(O.current),v={drm:{clearKeys:{}}};l.forEach((z,I)=>{v.drm.clearKeys[z]=u[I]}),console.log("Configuring player with the following DRM config:",v),d.configure(v);const A=b;d.load(A).then(()=>{console.log("Shaka Player loaded successfully."),O.current.play()}).catch(z=>{console.error("Error loading the stream:",z)})}};return ae.jsxs("div",{className:"min-w-full w-full min-h-full h-full bg-zinc-900 shadow-lg shadow-black flex flex-row overflow-y-auto pt-5 pl-5 pr-5 items-center justify-around",children:[ae.jsx(Qf,{children:ae.jsx("title",{children:"Test Player"})}),ae.jsxs("div",{className:"min-8/10 w-8/10 min-h-8/10 h-8/10 flex flex-row overflow-y-auto items-center justify-around border shadow-lg shadow-red-700 rounded-2xl",children:[ae.jsx("div",{className:"w-7/10 h-7/10 border border-black rounded-2xl p-5 bg-[rgba(0,0,0,0.2)] shadow-lg shadow-black",children:ae.jsx("video",{ref:O,className:"w-full h-full",controls:!0})}),ae.jsx("div",{className:"w-2/10 h-7/10 flex flex-col border border-black rounded-2xl p-5 bg-[rgba(0,0,0,0.2)] shadow-lg shadow-black focus-within:w-3/10 transition-all duration-300 ease-in-out",children:ae.jsxs("form",{className:"h-full flex flex-col gap-2",children:[ae.jsx("input",{type:"text",placeholder:"MPD URL",id:"player_mpd",name:"player_mpd",value:b,onChange:l=>D(l.target.value),className:"text-white bg-[rgba(0,0,0,0.2)] focus:outline-none rounded focus:shadow-sm focus:shadow-red-700/50 transition-all duration-300 ease-in-out p-2"}),ae.jsx("textarea",{placeholder:"KIDs, separated by new lines",id:"player_kid",name:"player_kid",value:N,onChange:l=>x(l.target.value),className:"text-white bg-[rgba(0,0,0,0.2)] focus:outline-none rounded h-1/4 focus:h-1/3 overflow-y-auto focus:shadow-sm focus:shadow-red-700/50 transition-all duration-300 ease-in-out p-2 resize-none"}),ae.jsx("textarea",{placeholder:"Keys, separated by new lines",id:"player_key",name:"player_key",value:T,onChange:l=>j(l.target.value),className:"text-white bg-[rgba(0,0,0,0.2)] focus:outline-none rounded h-1/4 focus:h-1/3 focus:shadow-sm focus:shadow-red-700/50 transition-all duration-300 ease-in-out p-2 resize-none"}),ae.jsx("button",{type:"button",onClick:h,className:"mt-auto bg-white text-black rounded p-2 hover:bg-slate-200 transition-colors duration-300 ease-in-out w-full cursor-pointer active:transform active:scale-95 overflow-x-hidden overflow-y-hidden",children:"Submit"})]})})]})]})}function nR(){return ae.jsx(BO,{children:ae.jsxs("div",{className:"flex flex-row",children:[ae.jsx("div",{className:"w-1/8 h-dvh overflow-y-auto",children:ae.jsx(ZO,{})}),ae.jsx("div",{className:"w-7/8 h-dvh overflow-y-auto scroll-smooth",id:"main_content",children:ae.jsxs(yO,{children:[ae.jsx(wh,{path:"/",element:ae.jsx(X3,{})}),ae.jsx(wh,{path:"/api",element:ae.jsx($3,{})}),ae.jsx(wh,{path:"/testplayer",element:ae.jsx(tR,{})}),ae.jsx(wh,{path:"/cache",element:ae.jsx(J3,{})})]})})]})})}function rR(){return ae.jsx(ae.Fragment,{children:ae.jsx(nR,{})})}ED.createRoot(document.getElementById("root")).render(ae.jsx(we.StrictMode,{children:ae.jsx(rR,{})}))});export default iR();
|